/* Christmas artwork for the existing Yofeb quiz and its two loading views. */
body.yq-quiz .yq-shell,
dialog.yofebq-watch-dialog,
html #yofebq-wait {
    --festive-frame: min(100vw, 620px);
    --festive-ink: #321049;
    --festive-sky:
        radial-gradient(ellipse at 2% 36%, #bafff4a8, transparent 15%),
        radial-gradient(ellipse at 98% 38%, #eab9ffac, transparent 16%),
        radial-gradient(ellipse at 50% 30%, #f5f2ff 4%, transparent 52%),
        linear-gradient(175deg, #e6e2fc 0%, #e6ddff 34%, #e2e5fc 60%, #dcd5fb 79%, #efe9ff 100%);
    background: var(--festive-sky);
    color: var(--festive-ink);
}

/* Frost and stars are drawn behind the live controls. */
body.yq-quiz .yq-shell,
dialog.yofebq-watch-dialog .yofebq-watch-inner,
html #yofebq-wait .wait-card {
    position: relative;
    isolation: isolate;
}
body.yq-quiz .yq-shell::before,
dialog.yofebq-watch-dialog .yofebq-watch-inner::before,
html #yofebq-wait .wait-card::before {
    content: '';
    position: absolute;
    pointer-events: none;
    z-index: -1;
    top: 0;
    bottom: 0;
    left: 50%;
    width: min(100%, 620px);
    transform: translateX(-50%);
    background-image:
        radial-gradient(ellipse 4px 1px at 6% 27%, white 38%, transparent 100%),
        radial-gradient(ellipse 1px 5px at 6% 27%, white 30%, transparent 100%),
        radial-gradient(ellipse 6px 1.5px at 96% 67%, white 24%, transparent 100%),
        radial-gradient(ellipse 1.5px 7px at 96% 67%, white 20%, transparent 100%),
        radial-gradient(ellipse 3px 1px at 86% 37%, #fff 35%, transparent 100%),
        radial-gradient(ellipse 1px 3px at 86% 37%, #fff 35%, transparent 100%),
        radial-gradient(circle 1px at 3% 77%, #fff, transparent),
        radial-gradient(circle 1.5px at 90% 15%, #fff, transparent);
    background-size: 100% 127px;
}
body.yq-quiz .yq-shell::after,
dialog.yofebq-watch-dialog .yofebq-watch-inner::after,
html #yofebq-wait .wait-card::after {
    content: '\2744\FE0E';
    position: absolute;
    z-index: -1;
    pointer-events: none;
    color: #fffffff0;
    font: 400 clamp(14px, 3.8vw, 24px)/1 serif;
    top: clamp(110px, 38vw, 236px);
    left: max(2%, calc(50% - 301px));
    text-shadow: calc(var(--festive-frame) * .90) 33px 1px white,
                 calc(var(--festive-frame) * .02) 150px 1px #ffffffcd,
                 calc(var(--festive-frame) * .89) 247px 2px #ffffffe0;
}

/* Keep the original Home link and its accessible name. */
body.yq-quiz .yq-shell .yq-header,
dialog.yofebq-watch-dialog .yq-loading-brand,
html #yofebq-wait .wait-brand {
    flex: none;
    width: 100%;
    height: auto;
    max-width: 620px;
    aspect-ratio: 864 / 260;
    margin: 0 auto;
}
body.yq-quiz .yq-shell .yq-brand {
    position: relative;
    width: 100%;
    aspect-ratio: 864 / 260;
}
body.yq-quiz .yq-shell .yq-brand-art {
    display: block;
    width: 100%;
    height: 100%;
    opacity: 0;
}
dialog.yofebq-watch-dialog .yq-loading-brand,
html #yofebq-wait .wait-brand {
    object-fit: none;
    object-position: -10000px -10000px;
    max-height: none;
    mask: none;
}

body.yq-quiz .yq-shell .yq-main {
    padding-inline: calc(var(--festive-frame) * .078);
}
body.yq-quiz .yq-shell .yq-question {
    margin-inline: calc(var(--festive-frame) * -.05);
    padding-top: clamp(4px, 1vw, 7px);
}
body.yq-quiz .yq-shell .yq-title {
    color: var(--festive-ink);
    font-size: clamp(18px, 5.85vw, 36px);
    line-height: 1.08;
    letter-spacing: -.055em;
}
body.yq-quiz .yq-shell [data-yq-panel="3"] .yq-title {
    max-width: 90%;
    margin-inline: auto;
    font-size: clamp(21px, 6.05vw, 37px);
}
body.yq-quiz .yq-shell .yq-title em {
    color: #009d82;
    background-image: linear-gradient(105deg, #00a87a, #007e85);
}
body.yq-quiz .yq-shell .yq-context {
    color: #443952;
    margin: clamp(4px, 1.2vw, 8px) 0 0;
    font-size: clamp(11px, 2.85vw, 17px);
}
body.yq-quiz .yq-shell .yq-description {
    color: #40364e;
    font-size: clamp(14px, 3.8vw, 23px);
    margin-top: clamp(6px, 1.7vw, 11px);
}
body.yq-quiz .yq-shell .yq-question::after {
    width: 26%;
    height: clamp(4px, .75vw, 6px);
    margin: clamp(6px, 1.5vw, 10px) auto 0;
    background: linear-gradient(90deg, #00c6a9, #02d198);
}
body.yq-quiz .yq-shell .yq-progress {
    width: 87%;
    max-width: none;
    height: clamp(27px, 6.8vw, 42px);
    margin: clamp(6px, 1.65vw, 10px) auto 0;
}
body.yq-quiz .yq-shell .yq-progress .yq-dot {
    width: clamp(25px, 6.5vw, 40px);
    height: clamp(25px, 6.5vw, 40px);
}
body.yq-quiz .yq-shell .yq-options {
    gap: clamp(5px, 1.45vw, 9px);
    margin-top: clamp(8px, 2.6vw, 16px);
}
body.yq-quiz .yq-shell .yq-choice {
    min-height: max(44px, calc(var(--festive-frame) * .122));
    grid-template-columns: 21% minmax(0, 1fr) 9%;
    gap: clamp(4px, 1.1vw, 7px);
    padding: 2px 3.8%;
    border-radius: clamp(18px, 4.65vw, 29px);
    border: 1.5px solid white;
    color: #331048;
    font-size: clamp(15px, 4.32vw, 27px);
    line-height: 1.15;
    font-weight: 850;
    background: linear-gradient(168deg, #fcfaff 5%, #faf8ff 38%, #ece9fa 95%);
    box-shadow: inset 0 0 9px #fff, 0 2px 2px #968bb538, 0 5px 10px #8e7cb947;
}
body.yq-quiz .yq-shell .yq-choice-icon {
    width: 100%;
    height: auto;
    max-height: none;
    object-fit: none;
    object-position: -10000px -10000px;
    filter: none;
    pointer-events: none;
}
body.yq-quiz .yq-shell [data-yq-panel="1"] .yq-choice:first-child,
body.yq-quiz .yq-shell [data-yq-panel="2"] .yq-choice:first-child {
    min-height: max(46px, calc(var(--festive-frame) * .134));
    background: radial-gradient(ellipse at 82% 55%, #56e6c6, transparent 72%), linear-gradient(110deg, #d4ffec, #a4ffe3 55%, #75efd7);
    border-color: #e9fff7;
    box-shadow: inset 0 0 9px 2px #e7fff5, 0 0 9px 3px #68ffe2ca, 0 6px 10px #3ac3a953;
}
body.yq-quiz .yq-shell [data-yq-panel="1"] .yq-choice:last-child {
    background: linear-gradient(105deg, #7a36f8 0%, #9241f5 62%, #d971f4 100%);
    border: 2px solid #fff4ff;
    box-shadow: inset 0 0 8px #f4d0ff, 0 0 8px 2px #b15bf5a1, 0 4px 9px #8d5be88a;
    color: white;
}
body.yq-quiz .yq-shell .yq-arrow {
    width: clamp(23px, 6vw, 37px);
    height: clamp(23px, 6vw, 37px);
}
body.yq-quiz .yq-shell [data-yq-panel="3"] .yq-choice {
    min-height: max(48px, calc(var(--festive-frame) * .136));
    border-radius: 100px;
    border: 2px solid white;
    color: white;
    font-size: clamp(16px, 4.5vw, 28px);
    background: linear-gradient(108deg, #a92ce8, #8842ec 37%, #3068c7 62%, #00bfb9 94%);
    box-shadow: inset 0 0 10px #efe9ffb5, 0 0 11px 1px #dca2fcd6, 0 5px 12px #8474af6b;
}
@media (hover: hover) {
    body.yq-quiz .yq-shell .yq-options .yq-choice:hover {
        filter: brightness(1.035);
        transform: translateY(-2px);
    }
}
body.yq-quiz .yq-shell .yq-skip-row {
    margin-top: 0;
    position: relative;
    z-index: 1;
}
body.yq-quiz .yq-shell .yq-skip {
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
}
body.yq-quiz .yq-shell .yq-world {
    margin: clamp(-21px, -4.7vw, -16px) auto 0;
    max-width: 620px;
    width: 100%;
    height: auto;
    aspect-ratio: 864 / 354;
}
body.yq-quiz .yq-shell .yq-footer {
    background: linear-gradient(145deg, #faf8ffed, #f3edfff2);
    color: #30243c;
    margin-top: -1px;
    border-color: white;
    font-size: clamp(11px, 2.82vw, 16px);
}

/* Preserve the timer-driven width of the existing bar and the dialog states. */
html #yofebq-wait {
    --diameter: clamp(82px, min(32vw, calc(var(--vh) * 23)), 198px);
}
html #yofebq-wait .wait-title,
dialog.yofebq-watch-dialog .yq-loading-title {
    color: #39104f;
    text-shadow: 0 1px 0 white;
}
html #yofebq-wait .wait-spin,
dialog.yofebq-watch-dialog .yq-loading-orb {
    background: radial-gradient(circle, #f2e7ff, #d6cbfc 47%, #c5bbef 51%, #ebe3fa 53%, #fffaff 69%, #eadff9);
}
html #yofebq-wait .wait-spin::after,
dialog.yofebq-watch-dialog .yq-loading-orb::after {
    content: '';
    display: block;
    position: absolute;
    left: 50%;
    bottom: -7%;
    width: 83%;
    height: auto;
    aspect-ratio: 225 / 84;
    transform: translateX(-50%);
    pointer-events: none;
}
html #yofebq-wait .wait-text {
    color: #473b57;
    line-height: 1.25;
    max-width: min(76%, 430px);
}
html #yofebq-wait .wait-bar,
dialog.yofebq-watch-dialog .yq-loading-track {
    width: 82%;
    height: clamp(18px, 5.2vw, 26px);
    background: #d3cef4c9;
    box-shadow: inset 0 2px 4px #938bd657, 0 0 9px #fffd;
}
html #yofebq-wait .wait-bar i,
dialog.yofebq-watch-dialog .yq-loading-track span {
    background: linear-gradient(105deg, #bf23ec, #8b3cf4 32%, #4378df 63%, #00dab0);
}
html #yofebq-wait .wait-world,
dialog.yofebq-watch-dialog .yq-loading-world {
    flex: 0 0 auto;
    width: 100%;
    height: auto;
    max-width: 620px;
    aspect-ratio: 864 / 354;
    pointer-events: none;
}
html #yofebq-wait .wait-card {
    justify-content: space-between;
    min-height: 100%;
    height: auto;
}
html #yofebq-wait {
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
}
@media (max-height: 650px) {
    html #yofebq-wait .wait-spin { margin-block: 6px 10px; }
    html #yofebq-wait .wait-bar { margin-block: 9px 3px; }
}
@media (max-height: 520px) {
    html #yofebq-wait .wait-brand { display: none; }
}
@media (max-height: 380px), (max-height: 480px) and (min-aspect-ratio: 1/1) {
    html #yofebq-wait .wait-world { display: none; }
}
@media (min-width: 650px) {
    body.yq-quiz .yq-shell,
    dialog.yofebq-watch-dialog,
    html #yofebq-wait {
        background: radial-gradient(ellipse at 50% 27%, #eeebfc, transparent 60%), linear-gradient(120deg, #cfc5ee, #e7e3fd 40%, #daf1f6 76%, #d5c6ef);
    }
}

body.yq-quiz .yq-shell .yq-brand::before {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
}

body.yq-quiz .yq-shell .yq-brand::before,
dialog.yofebq-watch-dialog .yq-loading-brand,
html #yofebq-wait .wait-brand {
    aspect-ratio: 864 / 260;
    background: url("assets/amounts.webp") 0% 0.7837% / 100% 590.76923% no-repeat;
    clip-path: polygon(0 25%,23% 25%,31% 17%,38% 10%,42% 2%,57% 2%,63% 11%,71% 21%,75% 23%,100% 23%,100% 100%,0 100%);
    -webkit-mask-image: linear-gradient(to bottom, black 86%, transparent 100%);
    mask-image: linear-gradient(to bottom, black 86%, transparent 100%);
}

body.yq-quiz .yq-shell .yq-world,
dialog.yofebq-watch-dialog .yq-loading-world,
html #yofebq-wait .wait-world {
    aspect-ratio: 864 / 354;
    background-image: url("assets/winter.webp") !important;
    background: 0% 80.37225% / 100% 433.89831% no-repeat;
    -webkit-mask-image: linear-gradient(to bottom, transparent, black 4%, black 100%);
    mask-image: linear-gradient(to bottom, transparent, black 4%, black 100%);
}

body.yq-quiz .yq-shell [data-yq-panel="1"] .yq-choice:nth-child(1) .yq-choice-icon {
    aspect-ratio: 147 / 103;
    background: url("assets/amounts.webp") 14.64435% 34.12421% / 587.7551% 1491.26214% no-repeat;
    clip-path: polygon(1% 73%,6% 65%,2% 48%,13% 51%,17% 40%,16% 26%,26% 13%,43% 5%,53% 0,70% 8%,82% 17%,84% 47%,100% 39%,96% 51%,100% 58%,88% 65%,94% 72%,85% 76%,93% 89%,76% 88%,71% 100%,66% 90%,46% 92%,24% 89%,11% 93%,4% 86%);
}

body.yq-quiz .yq-shell [data-yq-panel="1"] .yq-choice:nth-child(2) .yq-choice-icon {
    aspect-ratio: 141 / 89;
    background: url("assets/amounts.webp") 16.32089% 42.43262% / 612.76596% 1725.8427% no-repeat;
    clip-path: polygon(0% 61%,3% 29%,21% 9%,37% 2%,53% 11%,62% 24%,60% 39%,68% 30%,77% 27%,86% 28%,95% 35%,97% 42%,94% 49%,97% 51%,97% 87%,77% 99%,57% 94%,45% 88%,32% 94%,8% 79%);
}

body.yq-quiz .yq-shell [data-yq-panel="1"] .yq-choice:nth-child(3) .yq-choice-icon {
    aspect-ratio: 151 / 82;
    background: url("assets/amounts.webp") 15.70827% 50.2751% / 572.18543% 1873.17073% no-repeat;
    clip-path: polygon(1% 58%,7% 47%,24% 41%,27% 24%,40% 14%,51% 3%,61% 0%,79% 11%,81% 44%,78% 57%,89% 55%,98% 43%,96% 59%,100% 66%,89% 72%,91% 87%,80% 87%,76% 96%,63% 100%,52% 93%,47% 97%,41% 90%,18% 95%,2% 88%);
}

body.yq-quiz .yq-shell [data-yq-panel="1"] .yq-choice:nth-child(4) .yq-choice-icon {
    aspect-ratio: 146 / 91;
    background: url("assets/amounts.webp") 15.04178% 58.3391% / 591.78082% 1687.91209% no-repeat;
    clip-path: polygon(2% 98%,9% 92%,15% 89%,14% 64%,12% 40%,11% 34%,26% 27%,23% 21%,24% 10%,31% 1%,39% 2%,49% 16%,56% 15%,65% 3%,76% 1%,79% 10%,78% 22%,72% 27%,86% 26%,91% 33%,91% 54%,89% 57%,88% 84%,95% 91%,100% 98%);
}

body.yq-quiz .yq-shell [data-yq-panel="2"] .yq-choice:nth-child(1) .yq-choice-icon {
    aspect-ratio: 124 / 91;
    background: url("assets/uses.webp") 13.37838% 35.0173% / 696.77419% 1687.91209% no-repeat;
    clip-path: polygon(2% 83%,8% 61%,17% 31%,29% 15%,40% 12%,43% 5%,55% 3%,67% 5%,72% 12%,80% 20%,85% 38%,99% 78%,97% 89%,83% 92%,80% 83%,76% 94%,40% 99%,25% 94%,26% 79%,18% 94%,7% 93%);
}

body.yq-quiz .yq-shell [data-yq-panel="2"] .yq-choice:nth-child(2) .yq-choice-icon {
    aspect-ratio: 138 / 88;
    background: url("assets/uses.webp") 13.91185% 43.92265% / 626.08696% 1745.45455% no-repeat;
    clip-path: polygon(2% 46%,7% 32%,20% 27%,53% 10%,68% 6%,78% 10%,81% 26%,78% 31%,82% 41%,86% 47%,83% 58%,85% 67%,78% 76%,29% 94%,18% 98%,8% 92%,6% 77%,10% 70%,7% 61%,4% 60%);
}

body.yq-quiz .yq-shell [data-yq-panel="2"] .yq-choice:nth-child(3) .yq-choice-icon {
    aspect-ratio: 145 / 82;
    background: url("assets/uses.webp") 14.7427% 52.33838% / 595.86207% 1873.17073% no-repeat;
    clip-path: polygon(2% 41%,6% 35%,8% 27%,12% 24%,13% 15%,39% 7%,45% 4%,50% 8%,49% 15%,57% 12%,69% 8%,74% 14%,77% 22%,79% 36%,75% 43%,68% 45%,64% 52%,48% 55%,41% 65%,30% 67%,28% 80%,26% 96%,17% 93%,13% 89%,17% 59%,9% 59%,5% 53%,2% 54%);
}

html #yofebq-wait .wait-spin::after,
dialog.yofebq-watch-dialog .yq-loading-orb::after {
    aspect-ratio: 225 / 84;
    background: url("assets/winter.webp") 50.07825% 36.01928% / 384% 1828.57143% no-repeat;
    clip-path: polygon(0% 54%,9% 43%,2% 30%,12% 32%,11% 22%,22% 26%,18% 13%,29% 20%,36% 2%,41% 0%,49% 15%,57% 13%,65% 1%,72% 1%,76% 14%,72% 26%,83% 18%,82% 28%,93% 23%,91% 33%,100% 32%,95% 43%,100% 53%,89% 56%,93% 67%,79% 65%,76% 78%,68% 72%,67% 94%,57% 88%,53% 69%,47% 95%,40% 83%,36% 79%,38% 67%,28% 72%,21% 63%,14% 71%,13% 64%,4% 71%,9% 58%);
}

body.yq-quiz .yq-shell .yq-choice:first-child .yq-arrow::before {
    content: '\2744\FE0E';
    position: absolute;
    right: 145%;
    bottom: 60%;
    color: white;
    font: 400 clamp(10px, 2.8vw, 17px)/1 serif;
    filter: grayscale(1) brightness(0) invert(1);
    opacity: .8;
    pointer-events: none;
}
body.yq-quiz .yq-shell::after,
dialog.yofebq-watch-dialog .yofebq-watch-inner::after,
html #yofebq-wait .wait-card::after {
    filter: grayscale(1) brightness(0) invert(1);
    opacity: .86;
}
@media (min-width: 650px) {
    body.yq-quiz .yq-shell .yq-brand::before,
    dialog.yofebq-watch-dialog .yq-loading-brand,
    html #yofebq-wait .wait-brand {
        -webkit-mask-image: linear-gradient(to bottom, black 86%, transparent), linear-gradient(90deg, transparent, black 9%, black 91%, transparent);
        mask-image: linear-gradient(to bottom, black 86%, transparent), linear-gradient(90deg, transparent, black 9%, black 91%, transparent);
        -webkit-mask-composite: source-in;
        mask-composite: intersect;
    }
    body.yq-quiz .yq-shell .yq-world,
    dialog.yofebq-watch-dialog .yq-loading-world,
    html #yofebq-wait .wait-world {
        -webkit-mask-image: linear-gradient(to bottom, transparent, black 5%), linear-gradient(90deg, transparent, black 8%, black 92%, transparent);
        mask-image: linear-gradient(to bottom, transparent, black 5%), linear-gradient(90deg, transparent, black 8%, black 92%, transparent);
        -webkit-mask-composite: source-in;
        mask-composite: intersect;
    }
}
