@charset "UTF-8";

:root {
    font-family: "Segoe UI", Arial, sans-serif;
    color: #eef9fa;
    background: #101e28;
    color-scheme: dark;
    font-synthesis: none
}

* {
    box-sizing: border-box
}

body {
    margin: 0
}

button,
a {
    -webkit-tap-highlight-color: transparent
}

button {
    font: inherit;
    cursor: pointer
}

a {
    color: inherit
}

button:focus-visible,
a:focus-visible {
    outline: 3px solid #ffd976;
    outline-offset: 4px
}

[hidden] {
    display: none !important
}

.topbar {
    height: 54px;
    padding: 0 max(20px, env(safe-area-inset-right)) 0 max(20px, env(safe-area-inset-left));
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    border-bottom: 1px solid #ffffff17;
    background: #101e28
}

.back {
    text-decoration: none;
    font-size: 13px;
    font-weight: 650
}

.edition,
.eyebrow {
    font-size: 10px;
    letter-spacing: 1.7px;
    font-weight: 750;
    color: #97dccc
}

.quiet {
    padding: 7px 10px;
    border: 1px solid #567079;
    border-radius: 7px;
    color: #d2e4e9;
    background: transparent;
    font-size: 12px
}

main {
    min-height: calc(100svh - 54px)
}

.screen {
    max-width: 1500px;
    margin: auto
}

.intro {
    min-height: calc(100svh - 54px);
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 5%;
    padding: 35px 5%
}

.intro h1 {
    font-size: clamp(30px, 4.7vw, 66px);
    line-height: 1.05;
    letter-spacing: -1.5px;
    margin: 14px 0
}

.intro em {
    font-style: normal;
    color: #a0f0d7
}

.intro p {
    color: #beced4;
    line-height: 1.65;
    max-width: 500px;
    font-size: 15px
}

.how-to {
    margin: 18px 0 24px;
    max-width: 520px;
}

.how-to h2 {
    font-size: 12px;
    font-weight: 750;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: #a0f0d7;
    margin: 0 0 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.how-to h2::before {
    content: "";
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #a0f0d7;
    box-shadow: 0 0 8px #a0f0d7aa;
}

.how-to ol {
    margin: 0;
    padding: 0;
    list-style: none;
    counter-reset: howto-step;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.how-to li {
    position: relative;
    padding-left: 32px;
    font-size: 13.5px;
    line-height: 1.5;
    color: #beced4;
}

.how-to li::before {
    counter-increment: howto-step;
    content: counter(howto-step);
    position: absolute;
    left: 0;
    top: 1px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #17353b;
    border: 1px solid #3d6a6c;
    color: #a0f0d7;
    font-size: 11px;
    font-weight: 750;
    display: flex;
    align-items: center;
    justify-content: center;
}

.how-to li strong {
    color: #f1f7f6;
    font-weight: 650;
}

.how-to li em {
    color: #f5d68a;
    font-style: normal;
}

.facts {
    display: flex;
    gap: 24px;
    margin: 20px 0;
    font-size: 11px;
    color: #b4cad2
}

.facts b {
    display: block;
    font-size: 22px;
    color: #fff
}

.primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    border: 0;
    border-radius: 9px;
    padding: 13px 22px;
    background: #a0f0d7;
    color: #123b35;
    font-weight: 750;
    font-size: 14px;
    text-decoration: none;
    min-height: 44px
}

.primary:disabled {
    opacity: .5;
    cursor: wait
}

.intro .hint {
    font-size: 11px;
    margin: 10px 0 0
}

.intro-art {
    height: 65vh;
    max-height: 560px;
    border-radius: 20px;
    position: relative;
    background: linear-gradient(0deg, #081e30e0, transparent 65%), url("assets/sample-preparation-game-assets/bg-img.png") 45% center/cover;
    border: 1px solid #ffffff25
}

.intro-art-label {
    position: absolute;
    bottom: 30px;
    left: 24px;
    font-size: clamp(16px, 2vw, 28px);
    font-weight: 800;
    line-height: 1.3;
    letter-spacing: 1px
}

.walkthrough {
    position: relative;
    height: calc(100svh - 54px);
    max-width: none;
    background: #000;
    display: grid;
    place-items: center
}

.walkthrough video {
    width: 100%;
    height: 100%;
    object-fit: contain
}

.walkthrough.blackout video,
.walkthrough.blackout .video-caption {
    visibility: hidden
}

.video-caption {
    position: absolute;
    left: 20px;
    bottom: 16px;
    padding: 8px 12px;
    background: #081522b3;
    border-radius: 6px;
    font-size: 10px;
    letter-spacing: 1.6px
}

.skip-video-btn {
    position: absolute;
    top: 20px;
    right: 24px;
    z-index: 25;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: 999px;
    background: rgba(14, 28, 38, .85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(160, 240, 215, .5);
    color: #f3fffb;
    font-size: 13px;
    font-weight: 750;
    letter-spacing: .5px;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(0, 0, 0, .45);
    transition: background .2s, border-color .2s, transform .15s;
    touch-action: manipulation
}

.skip-video-btn:hover {
    background: rgba(22, 54, 60, .95);
    border-color: #a0f0d7;
    transform: scale(1.04)
}

.skip-video-btn:active {
    transform: scale(.96)
}

.skip-video-btn[hidden] {
    display: none !important
}

.walkthrough.blackout .skip-video-btn {
    display: none !important
}

@media (max-width: 600px) {
    .skip-video-btn {
        top: 14px;
        right: 16px;
        padding: 8px 14px;
        font-size: 11px
    }
}

.video-recovery {
    position: absolute;
    inset: 0;
    background: #081522e6;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px
}

.game {
    height: calc(100svh - 54px);
    padding: 16px 20px 20px;
    display: flex;
    flex-direction: column;
    gap: 14px
}

.game-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px
}

.game-heading h1 {
    font-size: 23px;
    margin: 5px 0 0;
    letter-spacing: -.5px
}

.hud {
    display: flex;
    gap: 22px
}

.hud>span {
    font-size: 9px;
    letter-spacing: 1px;
    color: #a6bdc7
}

.hud b {
    display: block;
    font-size: 25px;
    letter-spacing: 0;
    color: #fff;
    font-variant-numeric: tabular-nums
}

.hud .urgent b {
    color: #ffb0a4
}

.workspace {
    position: relative;
    min-height: 0
}

.shelf-help {
    margin: 0;
    color: #b7cbd2;
    font-size: 11px;
    line-height: 1.4
}

.lab {
    position: relative;
    overflow-x: auto;
    overflow-y: hidden;
    border-radius: 12px;
    border: 1px solid #617988;
    background: #a9b6bf;
    min-height: 0;
    scrollbar-color: #8fb3bf #243e4b;
    overscroll-behavior-x: contain
}

.shelf-scene {
    position: relative;
    width: 100%;
    min-width: 1000px;
    height: 100%;
    container-type: size;
    background: linear-gradient(rgba(0, 0, 0, 0.28), rgba(0, 0, 0, 0.28)), url("assets/sample-preparation-game-assets/bg-img.png") 28% top/138.5% 179.8% no-repeat;
}

.bottles {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: repeat(9, 1fr);
    grid-template-rows: 29% 31.4% 31.4%;
    padding: 0 1.5%;
    gap: 0 1%
}

.bottle {
    position: relative;
    justify-self: center;
    align-self: end;
    width: 100%;
    height: 94%;
    padding: 0;
    border: 0;
    background: transparent;
    color: #132733;
    touch-action: pan-x pan-y;
    min-width: 44px
}

.bottle img {
    position: absolute;
    height: 100%;
    min-width: 76px;
    max-width: 100%;
    width: auto;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    filter: drop-shadow(2px 4px 3px #0005);
    pointer-events: none
}

.bottle-label {
    position: absolute;
    top: 46%;
    left: 50%;
    transform: translateX(-50%);
    width: 94%;
    min-height: 41%;
    padding: 4px 3px;
    background: #f8faf3;
    border: 1px solid #c8ceca;
    border-radius: 2px;
    box-shadow: 0 1px 2px #0003;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 2px;
    font-size: clamp(10px, 1.2cqw, 14px);
    font-weight: 750;
    line-height: 1.1;
    pointer-events: none
}

.bottle-formula {
    font-size: .9em;
    font-weight: 600
}

.bottle-mark {
    position: absolute;
    top: 12%;
    right: 9%;
    display: none;
    place-items: center;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    font-size: 18px;
    font-weight: 850;
    box-shadow: 0 1px 6px #0006;
    background: #a0f0d7;
    color: #123b35
}

.bottle[data-state="correct"] .bottle-mark,
.bottle[data-state="wrong"] .bottle-mark {
    display: grid
}

.bottle[data-state="correct"] .bottle-label {
    background: #d7fff1;
    border: 2px solid #20886d
}

.bottle[data-state="wrong"] .bottle-label {
    background: #ffe4de;
    border: 2px solid #ae463b
}

.bottle[data-state="wrong"] .bottle-mark {
    background: #ffb6a6;
    color: #65251f
}

.bottle:disabled {
    cursor: default
}

.bottle:not(:disabled):hover img {
    filter: drop-shadow(0 0 5px #d0fff0)
}

.bottle:focus-visible {
    outline-offset: -3px;
    border-radius: 12px
}

.shelf-rail {
    position: absolute;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(#f3f7fc, #647381);
    box-shadow: 0 2px 3px #0006;
    pointer-events: none
}

.rail-one {
    top: 28.9%
}

.rail-two {
    top: 60.3%
}

.rail-three {
    top: 91.7%
}

.mission {
    border: 1px solid #35505c;
    border-radius: 12px;
    background: #172d38;
    padding: 18px;
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain
}

.mission-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 5px
}

.mission-heading .eyebrow {
    font-size: 9px;
    letter-spacing: 1px
}

#list-countdown {
    font-size: 13px;
    font-weight: 750;
    color: #ffe09d
}

.list-instruction {
    font-size: 12px;
    color: #c1d4d9;
    margin: 14px 0 8px
}

#targets {
    padding: 0;
    list-style: none;
    margin: 0;
    display: grid;
    gap: 8px
}

#targets li {
    border-left: 2px solid #a0f0d7;
    padding: 6px 9px;
    background: #ffffff07;
    font-size: 14px;
    font-weight: 650
}

#targets small {
    display: block;
    color: #b8d7d4;
    font-size: 12px;
    margin-top: 3px
}

.list-hidden {
    padding: 20px 0 10px
}

.list-hidden>span {
    font-size: 36px;
    color: #90c2c1
}

.list-hidden h2 {
    font-size: 17px;
    margin: 8px 0
}

.list-hidden p {
    font-size: 12px;
    line-height: 1.5;
    color: #b7cbd2
}

.recall {
    margin-top: auto;
    background: #243e4b;
    border: 1px solid #6eaaa3;
    border-radius: 8px;
    color: #d8fff3;
    padding: 11px 6px;
    font-size: 12px;
    font-weight: 650;
    min-height: 40px
}

.recall[aria-disabled="true"] {
    color: #9aafb9;
    border-color: #425965;
    background: #1b323e
}

.recall-note {
    font-size: 10px;
    color: #a2bcc5;
    margin: 7px 0
}

.feedback {
    font-size: 12px;
    line-height: 1.4;
    min-height: 34px;
    margin: 8px 0 0;
    color: #f5dea5
}

.results {
    padding: 35px 6%;
    max-width: 920px
}

.results h1 {
    font-size: clamp(26px, 4vw, 46px);
    margin: 12px 0
}

.results>p {
    color: #b9ccd3
}

.result-stats {
    display: flex;
    gap: 30px;
    margin: 24px 0;
    color: #bed4dc;
    font-size: 12px
}

.result-stats b {
    font-size: 30px;
    color: #a0f0d7;
    display: block
}

.review {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px
}

.review>div {
    padding: 14px;
    border: 1px solid #44606b;
    border-radius: 9px;
    background: #172d38;
    font-size: 14px;
    line-height: 1.5
}

.review small {
    display: block;
    color: #a8c4ce
}

.review strong {
    display: block;
    font-size: 11px;
    color: #a0f0d7;
    margin-top: 7px
}

.result-actions {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-top: 24px
}

.secondary {
    font-size: 13px;
    text-underline-offset: 4px
}

.rotate {
    position: fixed;
    inset: 0;
    z-index: 100;
    background: #101e28;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 30px
}

.rotate-icon {
    font-size: 75px;
    color: #a0f0d7
}

.rotate h2 {
    font-size: 28px;
    margin: 15px 0 0
}

.rotate p {
    font-size: 15px;
    line-height: 1.7;
    color: #bfd2db
}

.rotate a {
    margin-top: 25px;
    font-size: 13px
}

.noscript {
    position: fixed;
    inset: 0;
    background: #101e28;
    padding: 30px;
    z-index: 200
}

@media(max-height:550px) and (orientation:landscape) {
    .topbar {
        height: 40px;
        padding-left: max(12px, env(safe-area-inset-left));
        padding-right: max(12px, env(safe-area-inset-right))
    }

    .edition {
        font-size: 8px
    }

    .back {
        font-size: 11px
    }

    .quiet {
        font-size: 10px;
        padding: 5px 8px
    }

    main {
        min-height: calc(100svh - 40px)
    }

    .intro {
        min-height: calc(100svh - 40px);
        padding: 14px 4%;
        gap: 4%
    }

    .intro h1 {
        font-size: 32px;
        margin: 6px 0
    }

    .how-to {
        margin: 6px 0 10px;
    }

    .how-to h2 {
        font-size: 10px;
        margin-bottom: 5px;
        letter-spacing: 1px;
    }

    .how-to ol {
        gap: 4px;
    }

    .how-to li {
        font-size: 11px;
        line-height: 1.35;
        padding-left: 24px;
    }

    .how-to li::before {
        width: 16px;
        height: 16px;
        font-size: 9px;
        top: 0;
    }

    .facts {
        gap: 20px;
        margin: 10px 0;
        font-size: 10px
    }

    .facts b {
        font-size: 17px
    }

    .intro .hint {
        font-size: 9px
    }

    .intro .primary {
        min-height: 36px;
        padding: 9px 18px;
        font-size: 12px
    }

    .intro-art {
        height: 72vh
    }

    .walkthrough,
    .game {
        height: calc(100svh - 40px)
    }

    .game {
        padding: 8px 10px 10px;
        gap: 7px
    }

    .game-heading h1 {
        font-size: 16px;
        margin: 0
    }

    .game-heading .eyebrow {
        display: none
    }

    .hud {
        gap: 16px
    }

    .hud>span {
        font-size: 8px
    }

    .hud b {
        display: inline;
        font-size: 17px;
        margin-left: 4px
    }

    .mission {
        padding: 10px
    }

    .mission-heading .eyebrow {
        font-size: 8px
    }

    .list-instruction {
        font-size: 10px;
        margin: 7px 0
    }

    #targets {
        gap: 4px
    }

    #targets li {
        padding: 4px 7px;
        font-size: 11px
    }

    #targets small {
        font-size: 10px;
        margin-top: 1px
    }

    .list-hidden {
        padding: 6px 0
    }

    .list-hidden>span {
        font-size: 25px
    }

    .list-hidden h2 {
        font-size: 13px;
        margin: 4px 0
    }

    .list-hidden p {
        font-size: 10px;
        margin: 5px 0
    }

    .recall {
        font-size: 10px;
        min-height: 32px;
        padding: 7px 4px
    }

    .recall-note {
        font-size: 9px;
        margin: 4px 0
    }

    .feedback {
        font-size: 10px;
        min-height: 27px;
        margin: 3px 0 0
    }

    .bottle-label {
        padding: 2px;
        font-size: 11px
    }

    .bottle-mark {
        width: 19px;
        height: 19px;
        font-size: 14px
    }

    .results {
        padding: 16px 5%
    }

    .results h1 {
        font-size: 27px;
        margin: 7px 0
    }

    .results>p {
        font-size: 12px;
        margin: 6px 0
    }

    .result-stats {
        margin: 12px 0;
        gap: 25px
    }

    .result-stats b {
        font-size: 23px
    }

    .review>div {
        font-size: 12px;
        padding: 8px
    }

    .result-actions {
        margin-top: 14px
    }

    .result-actions .primary {
        min-height: 36px;
        padding: 9px 16px
    }
}

@media(prefers-reduced-motion:reduce) {
    * {
        scroll-behavior: auto !important
    }
}

/* Game chrome stays outside the laboratory; only the timed request overlays it. */
#app[data-view="game"] .topbar {
    display: none
}

#game {
    position: fixed;
    inset: 0;
    max-width: none;
    width: 100%;
    height: 100svh;
    padding: 0;
    display: grid;
    grid-template-rows: 54px minmax(0, 1fr) 56px;
    gap: 0;
    background: #0b1720;
    overflow: hidden
}

#game .game-heading {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px max(18px, env(safe-area-inset-right)) 8px max(18px, env(safe-area-inset-left));
    background: #132932;
    border-bottom: 1px solid #48606b;
    gap: 20px;
    z-index: 3
}

#game .game-heading .eyebrow {
    display: none
}

#game .game-heading h1 {
    font-size: 18px;
    letter-spacing: -.3px;
    margin: 0
}

#game .hud {
    display: flex;
    align-items: center;
    gap: 24px;
    flex-shrink: 0
}

#game .hud>span {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 9px;
    letter-spacing: 1px;
    color: #b5cbd1
}

#game .hud b {
    display: inline;
    font-size: 23px;
    margin: 0;
    font-variant-numeric: tabular-nums
}

#game .hud .clock {
    border-left: 1px solid #56717b;
    padding-left: 20px
}

#game .workspace {
    position: relative;
    display: block;
    grid-template-columns: none;
    gap: 0;
    min-width: 0;
    min-height: 0;
    overflow: hidden;
    background: #07121a
}

#game .lab {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    min-width: 0;
    min-height: 0;
    border: 0;
    border-radius: 0;
    overflow: hidden;
    background: none;
    container-type: normal;
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
}

#game .shelf-scene {
    width: 100%;
    min-width: 0;
    height: 100%;
    position: absolute;
    inset: 0;
    --bg-overlay-opacity: 0.5;
    /* Adjust this value: 0.15 (lighter) to 0.50 (darker) */
    background: linear-gradient(rgba(0, 0, 0, var(--bg-overlay-opacity)), rgba(0, 0, 0, var(--bg-overlay-opacity))), url("assets/sample-preparation-game-assets/bg-img.png") center/100% 100% no-repeat;
    container-type: size;
    touch-action: none;
    will-change: transform;
}

#game .bottles {
    inset: .8% auto auto 12.5%;
    width: 61.5%;
    height: 49.7%;
    padding: 0;
    grid-template-columns: repeat(9, minmax(0, 1fr));
    grid-template-rows: repeat(3, minmax(0, 1fr));
    gap: 4.5% 1.2%
}

#game .bottle {
    width: 100%;
    height: 100%;
    min-width: 0;
    touch-action: manipulation;
    transition: opacity .25s, filter .25s
}

#game .bottle[data-on-bench="true"] {
    opacity: .35;
    filter: grayscale(.6);
    transform: scale(.95)
}

#game .bottle img {
    width: 100%;
    height: 100%;
    min-width: 0;
    max-width: 100%;
    object-fit: contain;
    filter: drop-shadow(1px 2px 1px #0005)
}

#game .bottle-label {
    top: 45%;
    width: 86%;
    min-height: 42%;
    padding: 1px 2px;
    gap: 0;
    box-sizing: border-box;
    overflow: hidden;
    border: 1.5px solid #627e8d;
    border-radius: 3px;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
    background: #ffffff;
    color: #071720;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center
}

#game .bottle-formula {
    display: inline-block;
    max-width: 100%;
    white-space: nowrap;
    text-overflow: clip;
    overflow: hidden;
    font-size: clamp(9.5px, 1.45vw, 15px);
    font-weight: 850;
    letter-spacing: -.2px;
    color: #071720;
    line-height: 1
}

#game .bottle-formula.formula-medium {
    font-size: clamp(8px, 1.2vw, 13px);
    letter-spacing: -.3px
}

#game .bottle-formula.formula-long {
    font-size: clamp(7.2px, 1.05vw, 11.5px);
    letter-spacing: -.4px;
    transform: scaleX(.97);
    transform-origin: center
}

#game .bottle-mark {
    display: none !important
}

#game .shelf-rail {
    left: 8.5%;
    right: 21.5%;
    height: .35%;
    background: linear-gradient(#e8edf1, #62727f, #e8edf1);
    box-shadow: 0 1px 1px #0007;
    z-index: 2
}

#game .rail-one {
    top: 14.1%
}

#game .rail-two {
    top: 31.7%
}

#game .rail-three {
    top: 48.5%
}

#game .table-tray {
    position: absolute;
    left: 18%;
    width: 50%;
    bottom: 2.2%;
    height: 22%;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 7%;
    z-index: 3;
    pointer-events: auto
}

.bench-slot {
    position: relative;
    width: 24%;
    max-width: 92px;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    border-radius: 6px;
    transition: all .25s ease
}

.bench-slot.empty {
    border: 2px dashed #ffffff2d;
    background: #00000028;
    height: 82%;
    justify-content: center;
    color: #91abb6;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .8px
}

.bench-slot.empty::before {
    content: "SLOT 0" attr(data-slot);
    opacity: .7
}

.bench-bottle {
    position: relative;
    width: 100%;
    height: 95%;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    cursor: pointer;
    touch-action: manipulation;
    animation: bench-place .35s cubic-bezier(.18, .9, .3, 1.15) both
}

.bench-bottle img {
    position: absolute;
    bottom: 0;
    height: 100%;
    width: auto;
    max-width: 100%;
    object-fit: contain;
    filter: drop-shadow(0 6px 8px #0009);
    transition: transform .2s
}

.bench-bottle:hover img {
    transform: translateY(-3px) scale(1.02)
}

.bench-bottle .bottle-label {
    position: absolute;
    top: 45%;
    left: 50%;
    transform: translateX(-50%);
    width: 86%;
    min-height: 42%;
    box-sizing: border-box;
    overflow: hidden;
    background: #ffffff;
    border: 1.5px solid #627e8d;
    border-radius: 3px;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    box-shadow: 0 2px 4px #0004;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1px 2px;
    z-index: 2
}

.bench-bottle .bottle-formula {
    display: inline-block;
    max-width: 100%;
    white-space: nowrap;
    text-overflow: clip;
    overflow: hidden;
    font-size: clamp(9.5px, 1.45vw, 15px);
    font-weight: 850;
    color: #071720;
    line-height: 1
}

.bench-bottle .bottle-formula.formula-medium {
    font-size: clamp(8px, 1.2vw, 13px);
    letter-spacing: -.3px
}

.bench-bottle .bottle-formula.formula-long {
    font-size: clamp(7.2px, 1.05vw, 11.5px);
    letter-spacing: -.4px;
    transform: scaleX(.97);
    transform-origin: center
}

.bench-remove-btn {
    position: absolute;
    top: -6px;
    right: -6px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #e05248;
    color: #fff;
    border: 2px solid #0d1e27;
    font-size: 12px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transition: opacity .2s, transform .2s;
    z-index: 5
}

.bench-bottle:hover .bench-remove-btn,
.bench-bottle:focus-visible .bench-remove-btn {
    opacity: 1;
    transform: scale(1.05)
}

/* Shelves Zoom Controls & Floating UI */
.zoom-controls {
    position: absolute;
    bottom: 14px;
    left: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
    z-index: 25;
    pointer-events: auto;
}

/* Game Start Briefing Overlay */
.game-briefing {
    position: absolute;
    inset: 0;
    z-index: 40;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(7, 18, 26, 0.82);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding: 16px;
    animation: game-reveal 0.35s ease-out both;
}

.game-briefing[hidden] {
    display: none !important;
}

.briefing-card {
    background: linear-gradient(145deg, #112632, #0c1c25);
    border: 1px solid rgba(160, 240, 215, 0.4);
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.12);
    max-width: 480px;
    width: 100%;
    padding: 26px 24px 22px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.briefing-card .eyebrow {
    color: #e9c980;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1.8px;
    margin: 0;
}

.briefing-card h2 {
    font-size: clamp(24px, 3.8vw, 32px);
    margin: 0;
    color: #fff;
    font-weight: 850;
    letter-spacing: -0.5px;
    line-height: 1.15;
}

.briefing-card p {
    color: #beced4;
    font-size: 13.5px;
    line-height: 1.5;
    margin: 0;
    max-width: 410px;
}

.briefing-card p strong {
    color: #a0f0d7;
}

.briefing-tip {
    font-size: 12.5px;
    color: #a0f0d7;
    background: rgba(16, 42, 47, 0.7);
    border: 1px solid rgba(160, 240, 215, 0.3);
    border-radius: 9px;
    padding: 9px 14px;
    margin: 4px 0 6px;
    line-height: 1.45;
}

.briefing-tip em {
    color: #f5d68a;
    font-style: normal;
    font-weight: 700;
}

.briefing-card .primary {
    min-width: 220px;
    margin-top: 4px;
}

.zoom-btn {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    border: 1px solid rgba(160, 240, 215, 0.35);
    background: rgba(14, 30, 42, 0.88);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: #a0f0d7;
    font-size: 18px;
    font-weight: 700;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.45);
    touch-action: manipulation;
    transition: background 0.15s, transform 0.15s, opacity 0.15s;
    user-select: none;
    -webkit-user-select: none;
    padding: 0;
}

.zoom-btn:not(:disabled):hover {
    background: rgba(32, 65, 80, 0.95);
    transform: scale(1.06);
}

.zoom-btn:not(:disabled):active {
    transform: scale(0.94);
}

.zoom-btn:disabled {
    opacity: 0.3;
    cursor: default;
    border-color: rgba(255, 255, 255, 0.1);
}

.zoom-btn.zoom-reset {
    width: auto;
    min-width: 56px;
    padding: 0 9px;
    font-size: 11px;
    font-weight: 750;
    letter-spacing: 0.5px;
    color: #f5d68a;
    border-color: rgba(245, 214, 138, 0.45);
}

.zoom-hint {
    position: absolute;
    top: 10px;
    left: 12px;
    z-index: 25;
    pointer-events: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 20px;
    background: rgba(10, 24, 35, 0.85);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border: 1px solid rgba(160, 240, 215, 0.3);
    color: #a0f0d7;
    font-size: 11px;
    font-weight: 650;
    letter-spacing: 0.3px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
    opacity: 1;
    transition: opacity 0.5s ease-out;
}

.zoom-hint.fade-out {
    opacity: 0;
}

@keyframes bench-place {
    from {
        opacity: 0;
        transform: translateY(-35px) scale(.88)
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1)
    }
}

#game .shelf-help {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap
}

#game .game-toolbar {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 6px max(18px, env(safe-area-inset-right)) 6px max(18px, env(safe-area-inset-left));
    border-top: 1px solid #48606b;
    background: #132932;
    z-index: 3
}

#game .game-exit {
    font-size: 12px;
    font-weight: 650;
    text-decoration: none;
    white-space: nowrap;
    padding: 10px 2px
}

#game .recall {
    flex-shrink: 0;
    margin: 0;
    min-height: 36px;
    padding: 8px 14px;
    border: 1px solid #a0f0d7;
    border-radius: 6px;
    background: #a0f0d7;
    color: #163b34;
    font-size: 12px
}

#game .recall[aria-disabled="true"] {
    background: #243c46;
    border-color: #49636d;
    color: #afc2c8
}

#game .feedback {
    flex: 1;
    margin: 0;
    min-height: 0;
    font-size: 12px;
    line-height: 1.35;
    color: #d0dfdc
}

#game .game-toolbar .primary {
    min-height: 36px;
    padding: 8px 14px;
    font-size: 12px;
    flex-shrink: 0
}

#game .game-toolbar .primary:disabled {
    opacity: .4;
    cursor: not-allowed
}

#game .game-toolbar .quiet {
    flex-shrink: 0;
    min-height: 36px;
    font-size: 11px
}

#game .mission {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: min(420px, 80%);
    max-height: 92%;
    overflow-y: auto;
    z-index: 4;
    padding: 20px;
    background: #f7f6ef;
    color: #1c343b;
    border: 1px solid #9aaca8;
    border-top: 5px solid #2c746b;
    border-radius: 9px;
    box-shadow: 0 8px 35px #0008;
    gap: 10px
}

#game .mission-heading .eyebrow {
    font-size: 12px;
    color: #35555a;
    letter-spacing: 1.5px
}

#game #list-countdown {
    padding: 4px 9px;
    border-radius: 5px;
    background: #e5e8dc;
    color: #695321;
    font-size: 14px
}

#game .list-instruction {
    font-size: 13px;
    color: #4a5c60;
    margin: 0 0 10px
}

#game #targets {
    gap: 8px
}

#game #targets li {
    font-size: 17px;
    padding: 8px 12px;
    border-left: 3px solid #517b75;
    background: #304a4e0b;
    line-height: 1.3
}

#game #targets small {
    display: inline;
    margin-left: 10px;
    font-size: .8em;
    color: #425b62
}

#game .list-hidden {
    display: none
}

@media(max-height:550px) and (orientation:landscape) {
    #game {
        grid-template-rows: 38px minmax(0, 1fr) 44px
    }

    #game .game-heading {
        padding: 4px max(12px, env(safe-area-inset-right)) 4px max(12px, env(safe-area-inset-left));
        gap: 12px
    }

    #game .game-heading h1 {
        font-size: 13px
    }

    #game .hud {
        gap: 14px
    }

    #game .hud>span {
        font-size: 8px;
        gap: 5px
    }

    #game .hud b {
        font-size: 17px
    }

    #game .hud .clock {
        padding-left: 12px
    }

    #game .game-toolbar {
        gap: 10px;
        padding: 4px max(12px, env(safe-area-inset-right)) 4px max(12px, env(safe-area-inset-left))
    }

    #game .game-exit {
        font-size: 10px
    }

    #game .recall {
        font-size: 10px;
        padding: 6px 9px;
        min-height: 32px
    }

    #game .feedback {
        font-size: 10px
    }

    #game .game-toolbar .quiet {
        min-height: 32px;
        font-size: 10px;
        padding: 5px 8px
    }

    #game .mission {
        width: 340px;
        padding: 12px;
        gap: 6px
    }

    #game .mission-heading .eyebrow {
        font-size: 10px
    }

    #game #list-countdown {
        font-size: 11px;
        padding: 3px 7px
    }

    #game .list-instruction {
        font-size: 11px;
        margin-bottom: 6px
    }

    #game #targets {
        gap: 5px
    }

    #game #targets li {
        font-size: 13px;
        padding: 5px 8px
    }
}

/* Start and result screens share the lab's restrained palette and clear hierarchy. */
#intro {
    max-width: 1240px;
    gap: 6%;
    padding: 40px 5%
}

#intro .eyebrow {
    display: inline-block;
    padding: 7px 10px;
    border: 1px solid #38554f;
    border-radius: 5px;
    background: #203b352e;
    font-size: 9px;
    letter-spacing: 1.3px
}

#intro .intro-lead {
    font-size: 18px;
    color: #edf6f4;
    font-weight: 650;
    margin-bottom: 5px
}

#intro .facts {
    padding: 16px 0;
    border-top: 1px solid #314b53;
    border-bottom: 1px solid #314b53;
    justify-content: space-between;
    gap: 12px
}

#intro .facts b {
    color: #a0f0d7;
    font-size: 25px;
    margin-bottom: 4px
}

#intro .primary {
    min-width: 200px;
    box-shadow: 0 4px 16px #0003
}

#intro .intro-art {
    height: 58vh;
    max-height: 520px;
    border-radius: 12px;
    box-shadow: 0 18px 55px #0004;
    background-position: 40% center
}

.lab-preview-badge {
    position: absolute;
    top: 16px;
    left: 16px;
    padding: 7px 10px;
    border-radius: 5px;
    background: #102631dd;
    border: 1px solid #ffffff35;
    font-size: 10px;
    letter-spacing: 2px;
    font-weight: 750
}

.intro-art-label small {
    display: block;
    margin-top: 12px;
    font-size: 12px;
    font-weight: 400;
    letter-spacing: 0;
    color: #c9d8de
}

.scene-fade {
    position: fixed;
    inset: 0;
    z-index: 90;
    background: #000;
    opacity: 0;
    pointer-events: none;
    transition: opacity .45s cubic-bezier(.4, 0, .2, 1)
}

.scene-fade[data-dark="true"] {
    opacity: 1;
    pointer-events: auto
}

.fullscreen-help {
    position: fixed;
    inset: 0;
    z-index: 150;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #0a161edb;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 24px;
    text-align: center
}

.fullscreen-help h2 {
    font-size: clamp(18px, 2.5vw, 26px);
    color: #a0f0d7;
    margin: 0 0 14px
}

.fullscreen-help p {
    max-width: 460px;
    font-size: 13px;
    line-height: 1.6;
    color: #d1e2e7;
    background: #142934;
    border: 1px solid #36535f;
    border-radius: 12px;
    padding: 18px;
    margin: 0 0 18px;
    text-align: left
}

.fullscreen-help strong {
    color: #a0f0d7
}

.fullscreen-help .primary {
    min-width: 180px
}

#results {
    --result-accent: #a0f0d7;
    --result-tint: #193e37;
    width: calc(100% - 40px);
    max-width: 920px;
    margin: 24px auto;
    padding: 26px 30px;
    border: 1px solid #385b57;
    border-top: 4px solid var(--result-accent);
    border-radius: 16px;
    background: linear-gradient(140deg, var(--result-tint), #132631 60%);
    box-shadow: 0 16px 45px #0003
}

#results[data-outcome="success"] {
    --result-accent: #a0f0d7;
    --result-tint: #12382f;
    border-color: #2a7b68
}

#results[data-outcome="failed"] {
    --result-accent: #ff8375;
    --result-tint: #3d181d;
    border-color: #823138
}

.result-icon {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    margin-bottom: 14px;
    border: 1px solid var(--result-accent);
    border-radius: 50%;
    font-size: 26px;
    font-weight: 750;
    color: var(--result-accent);
    background: #ffffff08
}

#results .eyebrow,
#results .result-stats b {
    color: var(--result-accent)
}

#results h1 {
    font-size: clamp(23px, 3.2vw, 38px);
    letter-spacing: -.8px;
    margin: 8px 0
}

#results>p {
    max-width: 650px;
    line-height: 1.6;
    font-size: 14px;
    margin: 6px 0
}

#results .result-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin: 18px 0
}

#results .result-stats>span {
    padding: 12px;
    border: 1px solid #ffffff1f;
    border-radius: 9px;
    background: #081a2466
}

#results .result-stats b {
    font-size: 28px;
    margin-bottom: 2px
}

.review {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin: 18px 0
}

.compare-card {
    background: #0e1e27;
    border: 1px solid #2f4955;
    border-radius: 12px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: transform .2s, box-shadow .2s
}

.compare-card[data-status="success"] {
    border-color: #1c7a62;
    background: linear-gradient(165deg, #11332a, #0c1a21);
    box-shadow: 0 4px 18px #a0f0d715
}

.compare-card[data-status="failed"] {
    border-color: #7a252c;
    background: linear-gradient(165deg, #2e1619, #0c1a21);
    box-shadow: 0 4px 18px #ff706015
}

.compare-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #ffffff12;
    padding-bottom: 6px
}

.slot-tag {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1px;
    color: #9cb5bd
}

.status-pill {
    font-size: 9px;
    font-weight: 800;
    padding: 2px 7px;
    border-radius: 12px;
    letter-spacing: .5px
}

.pill-success {
    background: #a0f0d724;
    color: #a0f0d7;
    border: 1px solid #a0f0d777
}

.pill-failed {
    background: #ff706024;
    color: #ff8e82;
    border: 1px solid #ff706077
}

.compare-body {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    padding: 4px 0
}

.compare-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px
}

.compare-col-label {
    font-size: 8px;
    font-weight: 750;
    letter-spacing: .8px;
    color: #859da5
}

.compare-bottle-box {
    width: 100%;
    height: 80px;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    background: #00000030;
    border-radius: 7px;
    padding: 5px 3px 4px
}

.compare-bottle-box.empty-box {
    justify-content: center;
    border: 1px dashed #ffffff20
}

.empty-icon {
    font-size: 18px;
    color: #637780
}

.compare-img {
    height: 48px;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 3px 4px #0007)
}

.compare-formula-tag {
    margin-top: 3px;
    font-size: 10px;
    font-weight: 800;
    color: #fff;
    background: #1a333f;
    padding: 2px 5px;
    border-radius: 3px;
    border: 1px solid #ffffff18
}

.compare-formula-tag.tag-correct {
    background: #13453a;
    color: #a0f0d7;
    border-color: #248b74
}

.compare-formula-tag.tag-wrong {
    background: #47191e;
    color: #ff988e;
    border-color: #8f343d
}

.compare-formula-tag.tag-empty {
    background: transparent;
    border-color: transparent;
    color: #788e96;
    font-size: 9px
}

.compare-vs {
    font-size: 9px;
    font-weight: 800;
    color: #5a727c;
    letter-spacing: 1px
}

#results .primary {
    background: var(--result-accent);
    color: #15262b
}

#results .secondary {
    color: #dce9ec
}

@media(max-height:550px) and (orientation:landscape) {
    #intro {
        padding: 16px 4%;
        gap: 4%
    }

    #intro .eyebrow {
        padding: 4px 7px;
        font-size: 8px
    }

    #intro .intro-lead {
        font-size: 13px;
        margin: 6px 0
    }

    #intro .facts {
        padding: 9px 0;
        margin: 10px 0
    }

    #intro .facts b {
        font-size: 19px;
        margin-bottom: 2px
    }

    #intro .intro-art {
        height: 70vh
    }

    #intro .primary {
        min-width: 160px
    }

    .intro-art-label small {
        font-size: 10px;
        margin-top: 7px
    }

    #results {
        margin: 8px auto;
        padding: 12px 18px;
        border-radius: 10px
    }

    #results .result-icon {
        float: right;
        width: 32px;
        height: 32px;
        font-size: 18px;
        margin: 0 0 4px 8px
    }

    #results h1 {
        font-size: 22px;
        margin: 4px 0
    }

    #results>p {
        font-size: 11px;
        line-height: 1.35;
        margin: 3px 0
    }

    #results .result-stats {
        margin: 8px 0;
        gap: 8px
    }

    #results .result-stats>span {
        padding: 6px;
        font-size: 9px
    }

    #results .result-stats b {
        font-size: 18px
    }

    .review {
        gap: 8px;
        margin: 10px 0
    }

    .compare-card {
        padding: 7px;
        gap: 4px
    }

    .compare-bottle-box {
        height: 60px;
        padding: 2px
    }

    .compare-img {
        height: 34px
    }

    .compare-formula-tag {
        font-size: 8px;
        padding: 1px 3px
    }

    #results .result-actions {
        margin-top: 10px
    }
}

/* Diegetic note: always mounted so the exit travels below the stage. */
#game .mission {
    top: auto;
    bottom: 16px;
    left: 50%;
    width: min(430px, 72%);
    max-height: calc(100% - 30px);
    padding: 24px 28px 18px 45px;
    gap: 9px;
    border: 0;
    border-radius: 2px;
    background: linear-gradient(90deg, transparent 31px, #d07a7b88 32px, #d07a7b88 33px, transparent 34px), repeating-linear-gradient(#fff8dc 0, #fff8dc 27px, #a6c5d66b 28px, #fff8dc 29px);
    color: #28446c;
    box-shadow: 4px 9px 0 #0002, 0 15px 30px #0005;
    transform-origin: 50% 100%;
    transform: translate(-50%, calc(100% + 50px)) rotate(5deg);
    visibility: hidden;
    pointer-events: none;
    transition: transform .36s cubic-bezier(.55, 0, 1, .45), visibility 0s .36s;
    font-family: "Segoe Print", "Bradley Hand", "Comic Sans MS", cursive
}

#game .mission::before {
    content: "";
    position: absolute;
    top: 1px;
    left: 38%;
    width: 90px;
    height: 15px;
    background: #e4d6a6c9;
    transform: rotate(-5deg);
    box-shadow: 0 1px 2px #0001
}

#game .mission[data-open="true"] {
    transform: translate(-50%, 0) rotate(-2deg);
    visibility: visible;
    pointer-events: auto;
    transition: transform .4s cubic-bezier(.18, .85, .25, 1.12), visibility 0s;
    animation: note-arrive .4s cubic-bezier(.18, .85, .25, 1.12) both
}

#game .mission-heading .eyebrow {
    font: 700 25px/1.3 "Segoe Print", "Bradley Hand", "Comic Sans MS", cursive;
    color: #28446c;
    letter-spacing: 0;
    text-transform: none
}

#game #list-countdown {
    font: 700 14px/1.2 "Segoe UI", sans-serif;
    color: #934838;
    border: 2px solid #bc7665;
    border-radius: 50%;
    padding: 7px;
    background: transparent;
    transform: rotate(8deg)
}

#game .list-instruction {
    font: 14px/1.4 "Segoe Print", "Bradley Hand", "Comic Sans MS", cursive;
    color: #456087;
    margin: 0 0 9px
}

#game #targets {
    counter-reset: samples;
    gap: 6px
}

#game #targets li {
    position: relative;
    counter-increment: samples;
    background: none;
    border: 0;
    border-bottom: 1px dashed #365f7b25;
    padding: 6px 0 6px 22px;
    font: 700 20px/1.4 "Segoe Print", "Bradley Hand", "Comic Sans MS", cursive;
    color: #233e68
}

#game #targets li::before {
    content: counter(samples) ".";
    position: absolute;
    left: 0;
    color: #b36d58;
    font-size: .8em
}

#game #targets li:nth-child(2) {
    transform: rotate(.7deg)
}

#game #targets li:nth-child(3) {
    transform: rotate(-.6deg)
}

#game #targets small {
    font-size: .8em;
    color: #51668a;
    white-space: nowrap;
    display: inline-block
}

.note-signature {
    display: block;
    text-align: right;
    margin-top: 13px;
    font-size: 11px;
    color: #7c5e4a;
    font-style: italic
}

@keyframes note-arrive {
    from {
        transform: translate(-50%, calc(100% + 50px)) rotate(5deg)
    }

    to {
        transform: translate(-50%, 0) rotate(-2deg)
    }
}

/* A physical dossier lives on the bench, not in the toolbar. */
#game .recall.dossier {
    position: absolute;
    right: max(24px, env(safe-area-inset-right));
    bottom: 20px;
    z-index: 3;
    width: 94px;
    height: 83px;
    min-height: 0;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: none;
    color: #513715;
    box-shadow: none;
    transform: rotate(-6deg);
    transition: transform .2s, filter .2s;
    isolation: isolate;
    filter: drop-shadow(3px 7px 4px #0006)
}

.dossier-cover {
    position: absolute;
    inset: 14px 0 0;
    background: linear-gradient(135deg, #f3d696, #c9984b);
    border: 1px solid #a87937;
    border-radius: 3px 5px 6px 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-size: 14px;
    font-weight: 850;
    line-height: 1.15;
    letter-spacing: 1px;
    transform-origin: center bottom;
    transition: transform .2s
}

.dossier-cover::before {
    content: "";
    position: absolute;
    left: -1px;
    top: -10px;
    width: 40%;
    height: 12px;
    border: 1px solid #a87937;
    border-bottom: 0;
    border-radius: 5px 9px 0 0;
    background: #ebc77e
}

.dossier-paper {
    position: absolute;
    left: 9px;
    right: 8px;
    top: 6px;
    bottom: 6px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 10px;
    background: #fff7dd;
    border-radius: 2px;
    transform: rotate(6deg);
    transition: transform .2s
}

.dossier-paper i {
    height: 2px;
    background: #53749355;
    width: 100%
}

.dossier-count {
    position: absolute;
    right: -8px;
    top: -3px;
    z-index: 2;
    width: 26px;
    height: 26px;
    display: grid;
    place-items: center;
    border: 2px solid #153e36;
    border-radius: 50%;
    background: #a0f0d7;
    color: #173f35;
    font-size: 14px;
    font-weight: 850
}

.dossier-caption {
    position: absolute;
    left: 50%;
    bottom: -16px;
    transform: translateX(-50%) rotate(6deg);
    white-space: nowrap;
    font-size: 10px;
    font-weight: 750;
    background: #102631e8;
    color: #ffebbc;
    padding: 3px 7px;
    border-radius: 4px
}

#game .recall.dossier[aria-disabled="false"] {
    animation: dossier-float 3s ease-in-out infinite
}

#game .recall.dossier:hover,
#game .recall.dossier:focus-visible {
    transform: translateY(-6px) rotate(-2deg);
    animation: none
}

#game .recall.dossier:hover .dossier-cover,
#game .recall.dossier:focus-visible .dossier-cover {
    transform: skewX(-6deg) scaleY(.94)
}

#game .recall.dossier:hover .dossier-paper {
    transform: translateY(-7px) rotate(3deg)
}

#game .recall.dossier[aria-disabled="true"] {
    filter: drop-shadow(2px 4px 3px #0005) saturate(.5)
}

#game .recall.dossier[aria-disabled="true"] .dossier-count {
    background: #dad9c9;
    color: #50564e;
    border-color: #58635b
}

@keyframes dossier-float {

    0%,
    100% {
        transform: translateY(0) rotate(-6deg)
    }

    50% {
        transform: translateY(-4px) rotate(-3deg)
    }
}

/* A laboratory mission screen, with a slow specimen float and a beckoning start. */
#intro {
    position: relative;
    isolation: isolate;
    max-width: none;
    overflow: hidden;
    background: radial-gradient(ellipse at 77% 50%, #3e8e8a2b, transparent 55%), linear-gradient(130deg, #0d1a26, #112c36);
    min-height: calc(100svh - 54px)
}

#intro .intro-copy {
    animation: game-reveal .55s ease-out both
}

#intro h1 {
    text-shadow: 0 3px 0 #0004;
    font-weight: 900;
    letter-spacing: -2px
}

#intro h1 em {
    color: #f5d68a;
    text-shadow: 0 0 30px #ffe6a533
}

#intro .eyebrow {
    border: 0;
    background: none;
    padding-left: 0;
    color: #e9c980
}

#intro .intro-art {
    background: linear-gradient(0deg, #0d2534, transparent 85%), url("assets/sample-preparation-game-assets/bg-img.png") center/cover;
    border: 1px solid #72b4ae55;
    box-shadow: 0 0 65px #72d5b515, inset 0 0 50px #0717239c;
    overflow: hidden;
    animation: game-reveal .75s .1s ease-out both
}

#intro .intro-art::after {
    content: "";
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(transparent 0, transparent 4px, #0614210c 5px);
    pointer-events: none
}

.hero-specimens {
    position: absolute;
    left: 12%;
    right: 12%;
    top: 20%;
    height: 46%;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 8%;
    filter: drop-shadow(0 10px 12px #0008)
}

.hero-specimens img {
    height: 85%;
    width: 26%;
    object-fit: contain;
    animation: specimen-float 4.4s ease-in-out infinite
}

.hero-specimens img:nth-child(2) {
    height: 100%;
    animation-delay: -1.4s
}

.hero-specimens img:nth-child(3) {
    animation-delay: -2.8s
}

#intro .primary {
    background: linear-gradient(#ffe8a5, #efbd5b);
    color: #483217;
    border: 1px solid #ffeaa8;
    border-bottom: 4px solid #a57431;
    border-radius: 10px;
    box-shadow: 0 5px 0 #081923, 0 0 25px #f3cb6826;
    animation: start-glow 2.8s ease-in-out infinite;
    transition: transform .15s
}

#intro .primary:hover {
    transform: translateY(-2px)
}

#intro .primary:active {
    transform: translateY(2px)
}

#intro .facts>span {
    animation: game-reveal .5s .15s both
}

#intro .facts>span:nth-child(2) {
    animation-delay: .25s
}

#intro .facts>span:nth-child(3) {
    animation-delay: .35s
}

#intro .how-to {
    animation: game-reveal .55s .25s both;
}

@keyframes specimen-float {

    0%,
    100% {
        transform: translateY(0) rotate(-3deg)
    }

    50% {
        transform: translateY(-12px) rotate(3deg)
    }
}

@keyframes start-glow {

    0%,
    100% {
        box-shadow: 0 5px 0 #081923, 0 0 15px #f3cb681a
    }

    50% {
        box-shadow: 0 5px 0 #081923, 0 0 30px #f3cb6855
    }
}

@keyframes game-reveal {
    from {
        opacity: 0;
        transform: translateY(18px)
    }

    to {
        opacity: 1;
        transform: translateY(0)
    }
}

/* Outcome reveal: medal stamp, staggered score cards and short celebratory sparks. */
#results {
    position: relative;
    isolation: isolate;
    border-width: 2px;
    border-top-width: 4px;
    animation: game-reveal .45s ease-out both;
    background: radial-gradient(ellipse at 90% 0, var(--result-tint), transparent 65%), #102530
}

#results .result-icon {
    border: 3px double var(--result-accent);
    background: var(--result-tint);
    box-shadow: 0 0 0 5px #ffffff06, 0 0 30px #ffffff0a;
    animation: medal-stamp .65s cubic-bezier(.16, .9, .35, 1.3) both
}

#results #result-badge {
    display: inline-block;
    border: 1px solid var(--result-accent);
    padding: 5px 9px;
    border-radius: 3px;
    transform: rotate(-2deg);
    animation: medal-stamp .5s .15s both
}

#results .result-stats>span {
    animation: game-reveal .45s .2s both;
    border-bottom: 3px solid var(--result-accent)
}

#results .result-stats>span:nth-child(2) {
    animation-delay: .3s
}

#results .result-stats>span:nth-child(3) {
    animation-delay: .4s
}

#results .review>div {
    animation: game-reveal .45s .45s both
}

#results .review>div:nth-child(2) {
    animation-delay: .52s
}

#results .review>div:nth-child(3) {
    animation-delay: .59s
}

#results .primary {
    border-bottom: 4px solid #0004;
    box-shadow: 0 4px 0 #071720;
    transition: transform .15s
}

#results .primary:hover {
    transform: translateY(-2px)
}

#results .primary:active {
    transform: translateY(2px)
}

.result-particles {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: -1;
    border-radius: inherit
}

.result-particles i {
    position: absolute;
    left: var(--x);
    top: 0;
    width: 6px;
    height: 12px;
    background: var(--result-accent);
    opacity: 0;
    animation: result-spark 1.9s var(--delay) ease-out both
}

.result-particles i:nth-child(1) {
    --x: 8%;
    --delay: .1s
}

.result-particles i:nth-child(2) {
    --x: 20%;
    --delay: .3s
}

.result-particles i:nth-child(3) {
    --x: 32%;
    --delay: .05s
}

.result-particles i:nth-child(4) {
    --x: 44%;
    --delay: .25s
}

.result-particles i:nth-child(5) {
    --x: 56%;
    --delay: .15s
}

.result-particles i:nth-child(6) {
    --x: 68%;
    --delay: .35s
}

.result-particles i:nth-child(7) {
    --x: 80%;
    --delay: .2s
}

.result-particles i:nth-child(8) {
    --x: 92%;
    --delay: .4s
}

#results[data-outcome="failed"] .result-particles {
    display: none
}

@keyframes medal-stamp {
    0% {
        opacity: 0;
        transform: scale(1.55) rotate(-12deg)
    }

    65% {
        opacity: 1;
        transform: scale(.94) rotate(3deg)
    }

    100% {
        opacity: 1;
        transform: scale(1) rotate(0)
    }
}

@keyframes result-spark {
    0% {
        opacity: 0;
        transform: translateY(-10px) rotate(0)
    }

    15% {
        opacity: .8
    }

    100% {
        opacity: 0;
        transform: translateY(290px) rotate(260deg)
    }
}

#app[data-paused="true"] *,
#app[data-paused="true"] *::before,
#app[data-paused="true"] *::after {
    animation-play-state: paused !important
}

@media(max-height:550px) and (orientation:landscape) {
    #game .mission {
        width: min(350px, 65%);
        padding: 15px 18px 12px 40px;
        bottom: 10px;
        gap: 4px
    }

    #game .mission-heading .eyebrow {
        font-size: 20px
    }

    #game #list-countdown {
        font-size: 11px;
        padding: 5px
    }

    #game .list-instruction {
        font-size: 12px;
        margin-bottom: 3px
    }

    #game #targets {
        gap: 2px
    }

    #game #targets li {
        font-size: 16px;
        padding: 3px 0 3px 20px
    }

    .note-signature {
        font-size: 10px;
        margin-top: 6px
    }

    #game .recall.dossier {
        right: 20px;
        bottom: 18px;
        width: 64px;
        height: 55px
    }

    .dossier-cover {
        font-size: 10px;
        inset: 10px 0 0
    }

    .dossier-cover::before {
        height: 9px;
        top: -8px
    }

    .dossier-paper {
        top: 4px;
        padding: 7px;
        gap: 5px
    }

    .dossier-count {
        width: 21px;
        height: 21px;
        font-size: 11px;
        right: -6px;
        top: -4px
    }

    .dossier-caption {
        font-size: 8px;
        bottom: -14px
    }

    #intro {
        min-height: calc(100svh - 40px)
    }

    .hero-specimens {
        top: 20%;
        height: 44%
    }

    #intro .intro-art-label {
        bottom: 18px;
        left: 18px;
        font-size: 16px
    }

    .zoom-controls {
        bottom: 8px;
        left: 10px;
        gap: 5px;
    }

    .briefing-card {
        max-width: 440px;
        padding: 14px 18px;
        gap: 8px;
        border-radius: 12px;
    }

    .briefing-card h2 {
        font-size: 20px;
    }

    .briefing-card p {
        font-size: 11.5px;
        line-height: 1.4;
    }

    .briefing-tip {
        font-size: 10.5px;
        padding: 5px 10px;
        margin: 2px 0 4px;
        border-radius: 6px;
    }

    .briefing-card .primary {
        min-height: 36px;
        padding: 8px 18px;
        font-size: 12px;
        min-width: 180px;
    }

    .zoom-btn {
        width: 28px;
        height: 28px;
        font-size: 15px;
        border-radius: 6px;
    }

    .zoom-btn.zoom-reset {
        min-width: 46px;
        font-size: 10px;
        padding: 0 6px;
    }

    .zoom-hint {
        top: 6px;
        left: 8px;
        padding: 4px 9px;
        font-size: 9.5px;
    }
}

@media(prefers-reduced-motion:reduce) {

    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important
    }

    #game .mission[data-open="true"] {
        transform: translate(-50%, 0) rotate(-2deg)
    }

    .result-particles {
        display: none
    }
}