:root {
    --yellow: #f7c600;
    --yellow-hi: #ffdf3a;
    --yellow-deep: #d9a800;
    --ink: #0d0d0d;
    --panel: #151515;
    --panel-2: #1c1c1c;
    --line: #2b2b2b;
    --paper: #f4efe4;
    --muted: #9c988f;
    --danger: #f0b09a;
    --font-display: "Arial Black", "Segoe UI Black", Impact, sans-serif;
    --font-body: "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
    --key-art: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 900' preserveAspectRatio='xMidYMid meet'%3E%3Cg fill='none' stroke='%23101010' stroke-width='30' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='350' cy='450' r='330'/%3E%3Ccircle cx='350' cy='450' r='145'/%3E%3Cpath d='M680 450h450'/%3E%3Cpath d='M870 450V230a55 55 0 0 1 110 0v220'/%3E%3Cpath d='M1000 450V200a55 55 0 0 1 110 0v250'/%3E%3C/g%3E%3C/svg%3E");
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    scrollbar-gutter: stable;
}

body {
    margin: 0;
    min-height: 100vh;
    overflow-x: hidden;
    background: #0a0a0a;
    color: var(--paper);
    font-family: var(--font-body);
    -webkit-font-smoothing: antialiased;
}

body.has-result {
    overflow: hidden;
}

button {
    font-family: inherit;
}

.page-texture {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background:
        radial-gradient(1200px 700px at 50% -15%, rgba(247, 198, 0, .16), transparent 62%),
        radial-gradient(900px 600px at 110% 105%, rgba(247, 198, 0, .055), transparent 62%),
        repeating-linear-gradient(115deg, transparent 0 54px, rgba(255, 255, 255, .012) 54px 55px);
}

.page-texture::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at center, transparent 38%, rgba(0, 0, 0, .6) 100%);
}

.topbar {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 20px 0 8px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--paper);
    text-decoration: none;
}

.brand:hover {
    color: var(--paper);
}

.brand__mark {
    display: grid;
    place-items: center;
    flex: none;
    width: 42px;
    height: 42px;
    color: var(--ink);
    background: var(--yellow);
    border-radius: 12px;
    box-shadow: 0 6px 24px rgba(247, 198, 0, .24);
}

.brand__mark svg {
    width: 26px;
    height: 26px;
}

.brand__name {
    font-family: var(--font-display);
    font-style: italic;
    font-size: 1.1rem;
    font-weight: 900;
    letter-spacing: -.04em;
}

.brand__name b {
    color: var(--yellow);
}

.brand__stage {
    padding-left: 12px;
    border-left: 1px solid #343434;
    color: var(--muted);
    font-size: .66rem;
    font-weight: 700;
    letter-spacing: .26em;
}

.score {
    display: flex;
    align-items: baseline;
    gap: 10px;
    padding: 8px 16px;
    border: 1px solid #2c2c2c;
    border-radius: 999px;
    background: rgba(255, 255, 255, .03);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.score__label {
    color: var(--muted);
    font-size: .62rem;
    font-weight: 700;
    letter-spacing: .2em;
}

.score__value {
    display: inline-block;
    color: var(--yellow);
    font-size: 1.3rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    transform-origin: center;
}

.score__value.is-bump {
    animation: scoreBump .45s cubic-bezier(.2, .9, .3, 1.4);
}

.stage {
    position: relative;
    z-index: 1;
    width: min(980px, calc(100% - 32px));
    margin: 0 auto;
    padding: 22px 0 60px;
}

.stage__intro {
    max-width: 780px;
    margin: 0 auto 26px;
    text-align: center;
}

.stage__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 12px;
    color: var(--yellow);
    font-size: .64rem;
    font-weight: 800;
    letter-spacing: .28em;
}

.stage__eyebrow span {
    width: 26px;
    height: 2px;
    background: var(--yellow);
}

h1 {
    margin: 0 0 14px;
    font-family: var(--font-display);
    font-style: italic;
    font-size: clamp(2rem, 5.5vw, 4.4rem);
    font-weight: 900;
    line-height: .95;
    letter-spacing: -.045em;
    text-transform: uppercase;
}

h1 em {
    position: relative;
    display: inline-block;
    color: var(--yellow);
    font-style: inherit;
}

h1 em::after {
    content: "";
    position: absolute;
    right: .02em;
    bottom: .02em;
    left: .02em;
    height: .12em;
    background: var(--yellow);
    opacity: .35;
    transform: skewX(-18deg);
}

.stage__lead {
    max-width: 610px;
    margin: 0 auto;
    color: var(--muted);
    font-size: .95rem;
    line-height: 1.6;
}

.stage__lead strong {
    color: var(--paper);
}

.hud {
    display: flex;
    align-items: stretch;
    gap: 10px;
    margin: 0 0 12px;
}

.hud__stat {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 60px;
    padding: 10px 16px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(255, 255, 255, .035);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.hud__icon {
    flex: none;
    width: 26px;
    height: 26px;
    color: var(--yellow);
}

.hud__stat span {
    display: block;
    margin-bottom: 2px;
    color: var(--muted);
    font-size: .6rem;
    font-weight: 700;
    letter-spacing: .18em;
    text-transform: uppercase;
}

.hud__stat strong {
    display: block;
    color: var(--paper);
    font-size: 1.05rem;
    font-variant-numeric: tabular-nums;
}

.hud__stat--attempts {
    gap: 18px;
}

.attempts {
    display: flex;
    align-items: center;
    gap: 5px;
}

.attempt {
    width: 9px;
    height: 28px;
    border-radius: 3px;
    background: var(--yellow);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5), 0 2px 6px rgba(0, 0, 0, .3);
    transform-origin: 50% 100%;
    transition: transform .3s ease, background .3s ease, opacity .3s ease;
}

.attempt.is-off {
    opacity: .55;
    background: #2c2c2c;
    box-shadow: inset 0 0 0 1px #383838;
    transform: scaleY(.55) rotate(8deg);
}

.attempts.is-shaking {
    animation: attemptShake .4s ease;
}

.hud__restart {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 60px;
    margin-left: auto;
    padding: 0 18px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: transparent;
    color: var(--muted);
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    cursor: pointer;
    transition: color .2s, background .2s, border-color .2s;
}

.hud__restart svg {
    width: 16px;
    height: 16px;
}

.hud__restart:hover {
    border-color: var(--yellow);
    background: var(--yellow);
    color: var(--ink);
}

.hud__restart:focus-visible,
.btn-main:focus-visible,
.locker:focus-visible {
    outline: 3px solid var(--paper);
    outline-offset: 3px;
}

.wall-shell {
    position: relative;
    padding: 14px;
    border: 1px solid #2e2e2e;
    border-radius: 26px;
    background: linear-gradient(150deg, #1a1a1a, #0d0d0d 70%);
    box-shadow: 0 30px 90px rgba(0, 0, 0, .65), inset 0 1px 0 rgba(255, 255, 255, .06);
}

.wall-sign {
    position: relative;
    z-index: 12;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 2px 6px 13px;
}

.wall-sign__brand {
    color: var(--yellow);
    font-family: var(--font-display);
    font-style: italic;
    font-size: 1.02rem;
    letter-spacing: -.04em;
}

.wall-sign__brand b {
    color: var(--paper);
}

.wall-sign__line {
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, #3a3a3a, transparent);
}

.wall-sign__label {
    color: var(--muted);
    font-size: .58rem;
    font-weight: 700;
    letter-spacing: .3em;
    white-space: nowrap;
}

.wall {
    position: relative;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    padding: 6px;
    border-radius: 16px;
    background: #080808;
    box-shadow: inset 0 0 0 1px #000, inset 0 4px 20px rgba(0, 0, 0, .8);
}

.locker {
    position: relative;
    aspect-ratio: .72;
    padding: 0;
    border: 0;
    border-radius: 4px;
    background: transparent;
    cursor: pointer;
    perspective: 1100px;
    -webkit-tap-highlight-color: transparent;
}

.locker:disabled {
    cursor: default;
}

.locker.is-open {
    z-index: 10;
    pointer-events: none;
}

.locker__interior {
    position: absolute;
    inset: 0;
    overflow: hidden;
    border-radius: 3px;
    background: radial-gradient(circle at 50% 72%, #25251f 0%, #0b0b0a 70%);
    box-shadow: inset 0 8px 18px rgba(0, 0, 0, .9);
}

.locker__interior::before {
    content: "";
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(0deg, transparent 0 20px, rgba(255, 255, 255, .022) 20px 21px);
    opacity: .7;
}

.locker__door {
    position: absolute;
    inset: 0;
    display: block;
    z-index: 2;
    transform-style: preserve-3d;
    transform-origin: left center;
    transition: transform .62s cubic-bezier(.2, .75, .25, 1);
    will-change: transform;
}

.locker.is-open .locker__door {
    transform: rotateY(-112deg);
}

.locker:not(.is-open):hover .locker__door {
    transform: rotateY(-4deg);
}

.locker:focus-visible .locker__door {
    transform: rotateY(-4deg);
}

.locker.is-first-col .locker__door {
    transform-origin: right center;
}

.locker.is-first-col:not(.is-open):hover .locker__door,
.locker.is-first-col:focus-visible .locker__door {
    transform: rotateY(4deg);
}

.locker.is-first-col.is-open .locker__door {
    transform: rotateY(112deg);
}

.locker__front,
.locker__back {
    position: absolute;
    inset: 0;
    overflow: hidden;
    border-radius: 4px;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.locker__front {
    background: linear-gradient(145deg, #ffdc2e 0%, #f8c600 42%, #e7ad00 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45), inset -1px 0 0 rgba(0, 0, 0, .18), 0 2px 4px rgba(0, 0, 0, .35);
}

.locker__front::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 2;
    background: linear-gradient(160deg, rgba(255, 255, 255, .26), transparent 36%, rgba(0, 0, 0, .09) 100%);
    pointer-events: none;
}

.locker__back {
    background: linear-gradient(145deg, #d9a800, #b88900);
    box-shadow: inset 0 0 30px rgba(0, 0, 0, .3);
    transform: rotateY(180deg);
}

.locker__back::before {
    content: "";
    position: absolute;
    inset: 12%;
    border: 1px solid rgba(0, 0, 0, .15);
    border-radius: 2px;
}

.locker__mural {
    position: absolute;
    inset: 0;
    z-index: 1;
    background-image: var(--key-art);
    background-repeat: no-repeat;
    opacity: .93;
    pointer-events: none;
}

.locker__number {
    position: absolute;
    top: 8px;
    left: 50%;
    z-index: 3;
    padding: 2px 6px;
    border-radius: 3px;
    background: var(--ink);
    color: var(--yellow);
    font-size: .55rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    letter-spacing: .1em;
    transform: translateX(-50%);
}

.locker__hinge {
    position: absolute;
    left: 4px;
    z-index: 3;
    width: 5px;
    height: 18px;
    border-radius: 1px;
    background: var(--ink);
    box-shadow: 1px 1px 0 rgba(0, 0, 0, .25);
}

.locker__hinge--top {
    top: 8px;
}

.locker__hinge--bottom {
    bottom: 8px;
}

.locker__latch {
    position: absolute;
    top: 50%;
    right: 5px;
    z-index: 3;
    width: 7px;
    height: 30px;
    border-radius: 2px;
    background: var(--ink);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .15);
    transform: translateY(-50%);
}

.locker__latch::after {
    content: "";
    position: absolute;
    top: 50%;
    left: -2px;
    width: 11px;
    height: 5px;
    border-radius: 2px;
    background: var(--ink);
    transform: translateY(-50%);
}

.locker__vent {
    position: absolute;
    bottom: 12px;
    left: 8px;
    z-index: 3;
    width: 18px;
    height: 6px;
    background: repeating-linear-gradient(0deg, var(--ink) 0 1px, transparent 1px 3px);
    opacity: .85;
}

.locker.is-first-col .locker__hinge {
    right: 4px;
    left: auto;
}

.locker.is-first-col .locker__latch {
    right: auto;
    left: 5px;
}

.locker.is-first-col .locker__latch::after {
    right: -2px;
    left: auto;
}

.locker.is-first-col .locker__vent {
    right: 8px;
    left: auto;
}

.locker__content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 100%;
    padding: 8px;
    text-align: center;
    opacity: 0;
    transform: translateY(10px) scale(.88);
    transition: opacity .3s ease .18s, transform .35s ease .18s;
}

.locker.is-open .locker__content {
    opacity: 1;
    transform: none;
}

.locker__icon {
    font-size: clamp(2rem, 5vw, 3.4rem);
    line-height: 1;
    filter: drop-shadow(0 10px 16px rgba(0, 0, 0, .55));
}

.locker__label {
    max-width: 100%;
    color: #b9b3a6;
    font-size: .6rem;
    line-height: 1.2;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.locker.is-empty .locker__interior {
    background: radial-gradient(circle at 50% 55%, #4b3f0c 0%, #171509 55%, #080808 100%);
    box-shadow: inset 0 0 30px rgba(247, 198, 0, .08);
}

.locker.is-empty.is-open .locker__interior {
    box-shadow: inset 0 0 0 2px rgba(247, 198, 0, .45), inset 0 0 34px rgba(247, 198, 0, .16);
}

.locker.is-empty .locker__icon {
    color: var(--yellow);
    font-size: clamp(1.5rem, 3.4vw, 2.2rem);
    text-shadow: 0 0 22px rgba(247, 198, 0, .8);
}

.locker.is-empty .locker__label {
    color: var(--yellow);
    font-size: .65rem;
    font-weight: 800;
    letter-spacing: .16em;
}

.locker.is-empty.is-open .locker__interior::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 50%, rgba(247, 198, 0, .18), transparent 65%);
    animation: emptyPulse 1.8s ease-in-out infinite;
}

.start {
    position: absolute;
    inset: 0;
    z-index: 30;
    display: grid;
    place-items: center;
    padding: 20px;
    border-radius: 26px;
    background: rgba(6, 6, 6, .66);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    transition: opacity .35s ease, visibility .35s;
}

.start.is-hidden {
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
}

.start__card {
    width: min(390px, 100%);
    padding: 30px 28px;
    border: 1px solid #343434;
    border-radius: 22px;
    background: linear-gradient(160deg, rgba(32, 32, 32, .98), rgba(12, 12, 12, .98));
    box-shadow: 0 30px 80px rgba(0, 0, 0, .65);
    text-align: center;
    animation: cardIn .45s cubic-bezier(.2, .8, .2, 1);
}

.start__icon {
    display: grid;
    place-items: center;
    width: 64px;
    height: 64px;
    margin: 0 auto 16px;
    border-radius: 50%;
    background: var(--yellow);
    color: var(--ink);
    box-shadow: 0 0 0 8px rgba(247, 198, 0, .08);
}

.start__icon svg {
    width: 34px;
    height: 34px;
}

.start__kicker {
    margin: 0 0 6px;
    color: var(--yellow);
    font-size: .58rem;
    font-weight: 700;
    letter-spacing: .28em;
}

.start h2 {
    margin: 0 0 10px;
    font-family: var(--font-display);
    font-style: italic;
    font-size: 1.7rem;
    letter-spacing: -.03em;
    text-transform: uppercase;
}

.start__copy {
    max-width: 290px;
    margin: 0 auto 22px;
    color: var(--muted);
    font-size: .88rem;
    line-height: 1.55;
}

.start__copy strong {
    color: var(--paper);
}

.btn-main {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    min-height: 50px;
    padding: 0 26px;
    border: 0;
    border-radius: 999px;
    background: var(--yellow);
    color: var(--ink);
    font-size: .82rem;
    font-weight: 900;
    letter-spacing: .12em;
    text-transform: uppercase;
    cursor: pointer;
    box-shadow: 0 10px 26px rgba(247, 198, 0, .18), inset 0 1px 0 rgba(255, 255, 255, .5);
    transition: transform .18s ease, background .18s ease, box-shadow .18s ease;
}

.btn-main:hover {
    background: var(--yellow-hi);
    box-shadow: 0 14px 34px rgba(247, 198, 0, .3);
    transform: translateY(-2px);
}

.btn-main:active {
    transform: translateY(0) scale(.98);
}

.btn-main span {
    font-size: 1.1em;
}

.status {
    min-height: 1.6em;
    margin: 15px 2px 0;
    color: var(--muted);
    font-size: .9rem;
    line-height: 1.5;
    text-align: center;
    transition: color .2s ease;
}

.status strong {
    color: var(--paper);
    font-weight: 700;
}

.status.is-good,
.status.is-good strong {
    color: var(--yellow);
}

.status.is-bad {
    color: var(--danger);
}

.status.is-bad strong {
    color: #ffd0bf;
}

.result {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: grid;
    place-items: center;
    padding: 20px;
}

.result[hidden] {
    display: none;
}

.result__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(4, 4, 4, .78);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    animation: fadeIn .25s ease;
}

.result__card {
    position: relative;
    width: min(470px, 100%);
    max-height: calc(100vh - 40px);
    overflow: auto;
    padding: 34px 32px 30px;
    border: 1px solid #343434;
    border-radius: 24px;
    background: linear-gradient(165deg, #1d1d1d, #0e0e0e);
    box-shadow: 0 40px 110px rgba(0, 0, 0, .75);
    text-align: center;
    animation: resultIn .38s cubic-bezier(.2, .9, .3, 1.15);
}

.result__card::before {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    height: 5px;
    border-radius: 24px 24px 0 0;
    background: var(--yellow);
}

.result.is-loss .result__card::before {
    background: #3a3a3a;
}

.result__icon {
    display: grid;
    place-items: center;
    width: 74px;
    height: 74px;
    margin: 2px auto 16px;
    border-radius: 50%;
    background: var(--yellow);
    color: var(--ink);
    font-size: 2rem;
    font-weight: 900;
    box-shadow: 0 0 0 9px rgba(247, 198, 0, .08);
    animation: iconPop .5s .12s backwards;
}

.result.is-loss .result__icon {
    background: #272727;
    color: var(--muted);
    box-shadow: 0 0 0 9px rgba(255, 255, 255, .03);
}

.result__kicker {
    margin: 0 0 6px;
    color: var(--yellow);
    font-size: .58rem;
    font-weight: 700;
    letter-spacing: .3em;
}

.result.is-loss .result__kicker {
    color: var(--muted);
}

.result h2 {
    margin: 0 0 10px;
    font-family: var(--font-display);
    font-style: italic;
    font-size: 1.85rem;
    line-height: 1;
    letter-spacing: -.04em;
    text-transform: uppercase;
}

.result__text {
    max-width: 340px;
    margin: 0 auto 22px;
    color: var(--muted);
    font-size: .88rem;
    line-height: 1.55;
}

.result__stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin: 0 0 14px;
}

.result__stats > div {
    padding: 12px 6px;
    border: 1px solid #2c2c2c;
    border-radius: 12px;
    background: rgba(255, 255, 255, .025);
}

.result__stats span {
    display: block;
    margin-bottom: 4px;
    color: var(--muted);
    font-size: .55rem;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
}

.result__stats strong {
    font-size: 1rem;
    font-variant-numeric: tabular-nums;
}

.result__points {
    border-color: rgba(247, 198, 0, .35) !important;
    background: rgba(247, 198, 0, .08) !important;
}

.result__points strong {
    color: var(--yellow);
    font-size: 1.15rem;
}

.result__total {
    margin: 0 0 22px;
    color: var(--muted);
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.result__total strong {
    color: var(--paper);
}

.float-score {
    position: fixed;
    z-index: 120;
    color: var(--yellow);
    font-family: var(--font-display);
    font-style: italic;
    font-size: 1.5rem;
    letter-spacing: -.03em;
    text-shadow: 0 4px 18px rgba(0, 0, 0, .75);
    pointer-events: none;
    transform: translate(-50%, -50%);
    animation: floatScore 1.1s cubic-bezier(.2, .7, .3, 1) forwards;
}

@keyframes scoreBump {
    0% { transform: scale(1); }
    35% { color: #fff; transform: scale(1.22); }
    100% { transform: scale(1); }
}

@keyframes attemptShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-4px); }
    50% { transform: translateX(4px); }
    75% { transform: translateX(-2px); }
}

@keyframes emptyPulse {
    0%, 100% { opacity: .45; }
    50% { opacity: 1; }
}

@keyframes cardIn {
    from { opacity: 0; transform: translateY(14px) scale(.97); }
    to { opacity: 1; transform: none; }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes resultIn {
    from { opacity: 0; transform: translateY(18px) scale(.96); }
    to { opacity: 1; transform: none; }
}

@keyframes iconPop {
    from { opacity: 0; transform: scale(.6); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes floatScore {
    0% { opacity: 0; transform: translate(-50%, -30%) scale(.7); }
    20% { opacity: 1; transform: translate(-50%, -55%) scale(1.08); }
    100% { opacity: 0; transform: translate(-50%, -190%) scale(.95); }
}

@media (max-width: 760px) {
    .topbar {
        padding-top: 14px;
    }

    .brand__stage {
        display: none;
    }

    .stage {
        padding-top: 10px;
    }

    .stage__intro {
        margin-bottom: 20px;
    }

    .stage__lead {
        font-size: .9rem;
    }

    .hud {
        flex-wrap: wrap;
        gap: 8px;
    }

    .hud__stat {
        min-height: 54px;
        padding: 8px 12px;
    }

    .hud__restart {
        order: 3;
        flex: 1;
        min-height: 44px;
        margin-left: 0;
    }

    .wall-shell {
        padding: 10px;
        border-radius: 20px;
    }

    .wall {
        gap: 4px;
        padding: 4px;
    }

    .start {
        border-radius: 20px;
    }

    .result__card {
        padding: 28px 20px;
    }

    .result h2 {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .topbar {
        width: calc(100% - 24px);
    }

    .brand__mark {
        width: 36px;
        height: 36px;
        border-radius: 10px;
    }

    .brand__mark svg {
        width: 22px;
        height: 22px;
    }

    .brand__name {
        font-size: .95rem;
    }

    .score {
        padding: 6px 12px;
    }

    .score__value {
        font-size: 1.15rem;
    }

    .stage {
        width: calc(100% - 20px);
    }

    .stage__eyebrow {
        font-size: .58rem;
    }

    h1 {
        font-size: clamp(1.85rem, 10vw, 2.7rem);
    }

    .stage__lead {
        padding: 0 8px;
        font-size: .82rem;
    }

    .hud__stat {
        flex: 1;
    }

    .hud__restart {
        font-size: .62rem;
    }

    .wall-shell {
        padding: 8px;
    }

    .wall-sign {
        padding: 0 4px 10px;
    }

    .wall-sign__label {
        font-size: .5rem;
        letter-spacing: .22em;
    }

    .locker__number {
        top: 5px;
        padding: 1px 4px;
        font-size: .48rem;
    }

    .locker__hinge {
        width: 4px;
        height: 14px;
    }

    .locker__latch {
        width: 6px;
        height: 22px;
    }

    .locker__vent {
        bottom: 8px;
        left: 6px;
        width: 13px;
    }

    .locker__label {
        font-size: .46rem;
        letter-spacing: .08em;
    }

    .locker.is-empty .locker__label {
        font-size: .52rem;
    }

    .start {
        padding: 14px;
    }

    .start__card {
        padding: 24px 18px;
    }

    .start h2 {
        font-size: 1.4rem;
    }

    .start__copy {
        font-size: .8rem;
    }

    .result__card {
        padding: 26px 16px 22px;
    }

    .result__stats strong {
        font-size: .9rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .locker__door,
    .locker__content,
    .attempt,
    .start,
    .btn-main {
        transition-duration: .01ms !important;
    }

    .locker.is-empty.is-open .locker__interior::after,
    .score__value.is-bump,
    .attempts.is-shaking,
    .start__card,
    .result__card,
    .result__icon,
    .float-score {
        animation: none !important;
    }
}
