/* Birthday Drop — game-shell UI for DOUBLE TROUBLE */
:root {
    --bg: #08090b;
    --bg-soft: #101216;
    --surface: #15181d;
    --surface-2: #1c2026;
    --surface-3: #242a31;
    --line: #303740;
    --line-soft: rgba(255,255,255,.1);
    --ink: #f5f3ed;
    --muted: #9da5af;
    --muted-2: #8994a2;
    --red: #e10600;
    --red-bright: #ff3b30;
    --gold: #ffc83d;
    --gold-soft: #ffe69a;
    --green: #3ddc97;
    --c1: #8c9299;
    --c2: #5b9bd5;
    --c3: #4b69ff;
    --c4: #8847ff;
    --c5: #ffc83d;
    --c6: #eb4b4b;
    --c7: #ffc83d;
    /* One Vietnamese-capable family for whole words, including their accents.
       No unbundled display fonts (Impact/condensed faces) or remote requests. */
    --body: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --head: var(--body);
    --gutter: clamp(16px, 3vw, 40px);
    --content: 1120px;
    --form: 560px;
    --ease-out: cubic-bezier(.16,.84,.24,1);
    --ease-spring: cubic-bezier(.18,.88,.28,1.18);
    color-scheme: dark;
    box-sizing: border-box;
}
*, *::before, *::after { box-sizing: inherit; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 76px; }
html, body { width: 100%; min-height: 100%; margin: 0; background: var(--bg); color: var(--ink); }
body {
    min-height: 100dvh;
    font: 400 16px/1.5 var(--body);
    background:
        radial-gradient(circle at 50% 118%, rgba(225,6,0,.27), transparent 38%),
        radial-gradient(circle at 8% 10%, rgba(255,200,61,.045), transparent 28%),
        linear-gradient(145deg, #08090b 0%, #0e1013 58%, #070809 100%);
}
body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    opacity: .55;
    background-image: linear-gradient(rgba(255,255,255,.018) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.018) 1px, transparent 1px);
    background-size: 32px 32px;
    mask-image: linear-gradient(to bottom, #000, transparent 88%);
}
button, input { font: inherit; }
button { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
section {
    display: none;
    flex-direction: column;
    align-items: center;
    gap: clamp(14px, 2vh, 22px);
    width: 100%;
    min-height: 100vh;
    min-height: 100dvh;
    padding: max(76px, calc(64px + env(safe-area-inset-top)))
             max(var(--gutter), env(safe-area-inset-right))
             max(32px, calc(24px + env(safe-area-inset-bottom)))
             max(var(--gutter), env(safe-area-inset-left));
    text-align: center;
    isolation: isolate;
}
/* Use the document scroll on phones: long content and an open keyboard must
   not compress controls or hide the beginning/end of a fixed-height screen. */
section > * { flex-shrink: 0; min-width: 0; max-width: 100%; }
section > h1, section > h2 { width: min(100%, 960px); }
section :where(button, input, a) { scroll-margin-block: 80px 24px; }
:where(button, p, label, legend, small, b, strong) { overflow-wrap: anywhere; }
section.on { display: flex; z-index: 20; }
section.enter > * { animation: screenIn .45s var(--ease-out) backwards; }
section.enter > *:nth-child(2) { animation-delay: .05s; }
section.enter > *:nth-child(3) { animation-delay: .1s; }
section.enter > *:nth-child(4) { animation-delay: .15s; }
section.enter > *:nth-child(5) { animation-delay: .2s; }
section.enter > *:nth-child(n+6) { animation-delay: .25s; }
@keyframes screenIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
h1, h2, h3, .eyebrow, .screen-code, .btn, .logo, .plate, .case b, .it b, .it i, .inventory-item, .power-label, .panel-heading, .meme-status, .meme-meta small, .date-option small {
    font-family: var(--head);
}
h1, h2, h3 { margin: 0; font-weight: 800; text-transform: uppercase; line-height: 1.25; letter-spacing: -.025em; text-wrap: balance; overflow-wrap: break-word; }
h1 { font-size: clamp(2rem, 6vw, 5.25rem); }
h2 { font-size: clamp(1.625rem, 4.1vw, 3rem); }
h3 { font-size: clamp(1.25rem, 3vw, 1.75rem); }
.sub { max-width: 54ch; margin: 0; color: var(--muted); line-height: 1.62; }
.sub strong { color: var(--gold-soft); }
.gold { color: var(--gold); }
[hidden] { display: none !important; }

/* Shared game chrome */
.smoke { position: fixed; inset: 0; z-index: -1; pointer-events: none; background: radial-gradient(circle at 18% 90%, rgba(255,255,255,.045), transparent 34%), radial-gradient(circle at 82% 92%, rgba(255,255,255,.035), transparent 38%); }
.haz { position: fixed; right: 0; bottom: 0; left: 0; z-index: 50; height: 6px; background: repeating-linear-gradient(-45deg, var(--red) 0 12px, #14171b 12px 24px); }
#snd { position: fixed; top: max(12px, env(safe-area-inset-top)); right: max(12px, env(safe-area-inset-right)); z-index: 1000; min-width: 88px; min-height: 44px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 3px; background: rgba(16,18,22,.92); color: var(--ink); cursor: pointer; font: 800 .72rem var(--head); letter-spacing: .1em; text-transform: uppercase; -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.screen-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; width: min(100%, var(--content)); }
.screen-head > * { min-width: 0; }
.screen-head .eyebrow { overflow-wrap: anywhere; text-align: left; }
.eyebrow { margin: 0; color: var(--gold); font-size: .75rem; font-weight: 700; line-height: 1.6; letter-spacing: .09em; text-transform: uppercase; }
.screen-code { flex: none; max-width: 100%; padding: 5px 8px; border: 1px solid var(--line); color: var(--muted); font-size: .75rem; font-weight: 700; line-height: 1.5; letter-spacing: .06em; }
.legendary-code { border-color: rgba(255,200,61,.65); color: var(--gold); }
.btn {
    min-width: 0;
    width: min(100%, 360px);
    max-width: 100%;
    min-height: 52px;
    padding: 13px 22px;
    border: 1px solid rgba(255,255,255,.14);
    border-radius: 3px;
    background: linear-gradient(180deg, var(--red-bright), var(--red));
    color: #fff;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: .025em;
    line-height: 1.5;
    text-transform: uppercase;
    box-shadow: 0 12px 28px rgba(0,0,0,.26), inset 0 1px rgba(255,255,255,.16);
    transition: transform .18s var(--ease-out), filter .18s ease, border-color .18s ease, background .18s ease;
}
.btn.alt { background: linear-gradient(180deg, #2d333b, #20252b); }
.btn.mini-action { width: auto; min-width: 0; min-height: 48px; padding: 10px 14px; font-size: .875rem; }
.btn:disabled { opacity: .42; cursor: not-allowed; filter: saturate(.35); }
@media (hover: hover) {
    .btn:not(:disabled):hover { transform: translateY(-2px); filter: brightness(1.1); }
    .case:hover { transform: translateY(-5px); border-color: #626c77; }
}
.btn:active, .case:active, .date-option:active, .drk:active, .chip:active, .rs:active { transform: translateY(1px); }
.btn:focus-visible, .case:focus-visible, .rs:focus-visible, .drk:focus-visible, .chip:focus-visible, .date-option:focus-visible, input:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }

/* Intro and case selection */
#boot { justify-content: center; justify-content: safe center; }
#boot > .sub { max-width: 52ch; }
#final h1 { max-width: 880px; }
.final-signoff { max-width: 46ch; margin: 0; font: 800 clamp(.95rem, 2vw, 1.2rem)/1.6 var(--head); letter-spacing: .02em; text-wrap: balance; }
.logo { display: inline-flex; align-items: center; justify-content: center; padding: 7px 18px 6px; background: var(--red); color: white; font-size: 1.45rem; font-weight: 900; letter-spacing: .16em; transform: skewX(-8deg); box-shadow: 8px 8px rgba(225,6,0,.13); }
.plate { padding: 3px 14px; border: 3px solid #0a0b0c; outline: 2px solid var(--ink); border-radius: 3px; background: var(--ink); color: #101114; font-size: 1.15rem; font-weight: 900; letter-spacing: .18em; }
#boot h1 { max-width: 960px; font-size: clamp(2.1rem, 8vw, 5.75rem); }
.rev { width: min(78vw, 360px); height: 4px; overflow: hidden; background: var(--surface-3); }
.rev i { display: block; width: 35%; height: 100%; background: linear-gradient(90deg, var(--red), var(--gold)); box-shadow: 0 0 16px var(--gold); }
.cases { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; width: min(100%, 920px); }
.case { position: relative; display: grid; grid-template-rows: auto auto 1fr; gap: 12px; min-width: 0; min-height: 260px; padding: 16px; overflow: hidden; border: 1px solid var(--line); border-radius: 4px; background: linear-gradient(150deg, var(--surface-3), var(--surface)); color: var(--ink); cursor: pointer; text-align: left; box-shadow: 0 16px 36px rgba(0,0,0,.28); transition: transform .22s var(--ease-out), border-color .22s ease, box-shadow .22s ease; }
.case::before { content: "CASE SELECT"; position: absolute; top: 12px; right: -28px; width: 112px; padding: 3px 0; transform: rotate(45deg); background: var(--red); color: white; font: 800 .56rem var(--head); letter-spacing: .12em; text-align: center; }
.case.sel { border-color: var(--gold); box-shadow: 0 0 0 1px rgba(255,200,61,.2), 0 22px 48px rgba(0,0,0,.36), 0 0 38px rgba(255,200,61,.1); transform: translateY(-5px); }
.crate { position: relative; height: 132px; margin: 0; overflow: hidden; border: 1px solid #48515c; border-top: 6px solid var(--red); border-radius: 3px; background: linear-gradient(135deg, #3a4149, #15181c); }
.crate::after { content: "BD"; position: absolute; inset: 0; display: grid; place-items: center; color: #d8dce0; font: 900 2.4rem var(--head); text-shadow: 0 2px 0 #000; }
.crate.has::after { display: none; }
.crate img { width: 100%; height: 100%; object-fit: cover; filter: blur(12px); }
.case b { min-width: 0; align-self: end; font-size: 1.125rem; font-weight: 800; line-height: 1.4; text-transform: uppercase; }
.case small { min-width: 0; align-self: start; color: var(--muted); font-size: .875rem; line-height: 1.6; }

/* Opening bay and roulette */
#open { gap: 12px; }
#open > h2 { max-width: 900px; }
.screen-lead { max-width: 56ch; margin: 0; color: var(--muted); text-align: center; }
.opening-bay { position: relative; display: grid; place-items: center; width: min(100%, 900px); min-height: 178px; padding: 18px; border: 1px solid var(--line); border-radius: 5px; background: linear-gradient(135deg, rgba(255,255,255,.04), rgba(255,255,255,.01)), repeating-linear-gradient(135deg, transparent 0 26px, rgba(255,255,255,.018) 26px 27px); box-shadow: inset 0 0 50px rgba(0,0,0,.35); }
.opening-bay::before, .opening-bay::after { content: ""; position: absolute; top: 16px; bottom: 16px; width: 4px; background: var(--red); opacity: .75; }
.opening-bay::before { left: 16px; } .opening-bay::after { right: 16px; }
#bigcase { position: relative; display: grid; place-items: center; width: 190px; height: 142px; border: 1px solid #515b66; border-top: 12px solid var(--red); border-radius: 4px; background: linear-gradient(145deg, #3d454e, #15191e); color: var(--ink); font: 900 3.8rem var(--head); box-shadow: 0 28px 65px -22px rgba(225,6,0,.9); transform-origin: center bottom; will-change: transform, filter, box-shadow; }
#bigcase span { line-height: .8; }
#bigcase small { position: absolute; right: 10px; bottom: 8px; color: var(--gold); font: 800 .62rem var(--head); letter-spacing: .18em; }
.opening-scan { position: absolute; right: 8%; left: 8%; bottom: 18px; height: 1px; background: linear-gradient(90deg, transparent, var(--gold), transparent); opacity: .5; }
.opening-scan i { display: block; width: 18%; height: 3px; margin-top: -1px; background: var(--gold); box-shadow: 0 0 14px var(--gold); animation: scan 2.2s ease-in-out infinite; }
.opening-copy { position: absolute; top: 14px; left: 24px; display: flex; align-items: center; gap: 7px; color: var(--muted-2); font: 800 .6rem var(--head); letter-spacing: .12em; }
.status-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--green); box-shadow: 0 0 9px var(--green); }
#roul { position: relative; display: none; width: min(100%, 1120px); height: 252px; overflow: hidden; border: 1px solid var(--line); border-radius: 5px; background: #0c0f12; box-shadow: inset 0 0 50px rgba(0,0,0,.7), 0 18px 50px rgba(0,0,0,.3); }
.roulette-label { position: relative; z-index: 4; display: flex; justify-content: space-between; align-items: center; height: 42px; padding: 0 14px; border-bottom: 1px solid var(--line); color: var(--muted); font: 800 .64rem var(--head); letter-spacing: .14em; }
.roulette-label b { color: var(--gold); font-weight: 800; }
#track { display: flex; height: 208px; will-change: transform; }
.it { position: relative; display: flex; flex: 0 0 148px; flex-direction: column; align-items: center; justify-content: center; width: 148px; height: 190px; min-width: 0; margin: 9px 5px; padding: 9px 8px; overflow: hidden; border: 1px solid rgba(255,255,255,.1); border-bottom: 4px solid var(--c); border-radius: 3px; background: linear-gradient(180deg, #20262c, #14181c); color: var(--ink); gap: 5px; }
.it::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(120deg, rgba(255,255,255,.05), transparent 34%); }
.it .item-rarity-bar { position: absolute; top: 0; right: 0; left: 0; height: 3px; background: var(--c); }
.it .ph { display: grid; flex: 1; place-items: center; width: 100%; min-height: 0; }
.it b, .it i { flex-shrink: 0; }
.it .ph img { width: 100%; height: 100%; object-fit: contain; }
.it .ph .fb { color: var(--c); font: 900 2rem var(--head); }
.it b { width: 100%; overflow-wrap: anywhere; color: var(--ink); font-size: .8125rem; font-weight: 700; line-height: 1.4; text-align: center; text-transform: uppercase; }
.it i { color: var(--c); font-size: .6875rem; font-style: normal; font-weight: 700; line-height: 1.5; letter-spacing: .025em; text-transform: uppercase; }
.it.win { outline: 2px solid var(--gold); box-shadow: 0 0 36px rgba(255,200,61,.4), inset 0 0 22px rgba(255,200,61,.12); }
#mark { position: absolute; top: 42px; bottom: 0; left: 50%; z-index: 5; width: 3px; background: var(--gold); box-shadow: 0 0 14px var(--gold); transform: translateX(-50%); animation: markerPulse 1.05s ease-in-out infinite; }
#mark::before { content: ""; position: absolute; top: -1px; left: 50%; border: 6px solid transparent; border-top: 0; border-bottom: 8px solid var(--gold); transform: translateX(-50%); }
#mark i { position: absolute; top: 0; bottom: 0; left: -9px; width: 21px; background: rgba(255,200,61,.08); }
#roul::before, #roul::after { content: ""; position: absolute; top: 42px; bottom: 0; z-index: 3; width: 18%; pointer-events: none; }
#roul::before { left: 0; background: linear-gradient(90deg, #0b0e11, transparent); }
#roul::after { right: 0; background: linear-gradient(270deg, #0b0e11, transparent); }
#gwrap { display: grid; justify-items: center; gap: 10px; width: min(100%, 420px); }
.power-label { display: flex; justify-content: space-between; width: min(100%, 360px); color: var(--muted); font-size: .68rem; font-weight: 800; letter-spacing: .14em; }
.power-label b { color: var(--gold); }
#gauge { width: min(100%, 360px); height: 12px; overflow: hidden; border: 1px solid var(--line); border-radius: 2px; background: var(--surface); }
#gauge i { display: block; width: 0; height: 100%; background: linear-gradient(90deg, var(--green), var(--gold) 65%, var(--red) 90%); transition: width .08s linear; }
#openBtn { touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
#ghint { max-width: 46ch; font-size: .84rem; }

/* Inventory */
.inventory-panel { width: min(100%, 1120px); padding: 14px; border: 1px solid var(--line); border-radius: 5px; background: rgba(15,18,22,.72); text-align: left; }
.panel-heading { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 12px; margin-bottom: 12px; color: var(--muted); font-size: .75rem; font-weight: 700; line-height: 1.5; letter-spacing: .05em; }
.panel-heading b { color: var(--gold); font-weight: 800; }
.inventory-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr)); gap: 10px; }
.inventory-item { position: relative; display: flex; align-items: center; gap: 10px; min-width: 0; min-height: 80px; padding: 12px 28px 12px 10px; overflow: hidden; border: 1px solid var(--line); border-left: 3px solid var(--c); border-radius: 3px; background: linear-gradient(145deg, var(--surface-2), var(--surface)); }
.inventory-item.rarity-5 { border-color: rgba(255,200,61,.7); background: linear-gradient(145deg, rgba(255,200,61,.18), var(--surface)); box-shadow: inset 0 0 20px rgba(255,200,61,.08); }
.mystery-item { border-style: dashed; border-color: rgba(255,200,61,.55); background: linear-gradient(145deg, rgba(255,200,61,.10), rgba(10,11,13,.9)); }
.mystery-icon span { color: var(--gold); font: 900 1.7rem var(--head); text-shadow: 0 0 14px rgba(255,200,61,.55); }
.mystery-item .inventory-copy b { letter-spacing: .035em; }
.mystery-item .inventory-copy small { color: var(--muted); }
.inventory-icon { display: grid; place-items: center; flex: none; width: 48px; height: 48px; overflow: hidden; border: 1px solid rgba(255,255,255,.1); background: #0b0d10; }
.inventory-icon img { width: 100%; height: 100%; object-fit: contain; }
.inventory-icon svg { width: 38px; height: 28px; }
.inventory-copy { min-width: 0; }
.inventory-copy b { display: block; overflow-wrap: break-word; color: var(--ink); font-size: .8125rem; font-weight: 700; line-height: 1.45; text-transform: uppercase; }
.inventory-copy small { display: block; margin-top: 4px; color: var(--c); font-size: .75rem; font-weight: 600; line-height: 1.5; letter-spacing: .025em; text-transform: uppercase; }
.inventory-level { position: absolute; top: 5px; right: 6px; color: var(--muted-2); font-size: .6875rem; line-height: 1.5; }

/* Legendary reveal */
#reveal { gap: 12px; }
.reveal-kicker { margin: 0; font: 800 clamp(1rem, 2.5vw, 1.5rem)/1.5 var(--head); letter-spacing: .025em; text-align: center; }
.legendary-stage { position: relative; display: grid; place-items: center; width: min(100%, 640px); min-height: 330px; }
.legendary-orbit { position: absolute; width: min(82vw, 420px); aspect-ratio: 1; border: 1px solid rgba(255,200,61,.25); border-radius: 50%; box-shadow: 0 0 60px rgba(255,200,61,.08); }
.legendary-orbit::after { content: ""; position: absolute; inset: 12%; border: 1px dashed rgba(255,200,61,.22); border-radius: 50%; }
.leg { position: relative; z-index: 1; width: min(100%, 440px); min-width: 0; padding: 13px; border: 1px solid var(--gold); border-radius: 5px; background: linear-gradient(145deg, rgba(255,200,61,.19), #14130f 40%, #0e1012); box-shadow: 0 24px 70px rgba(0,0,0,.45), 0 0 70px rgba(255,200,61,.16); }
.leg::before { content: "LEGENDARY DROP"; position: absolute; top: -11px; left: 18px; padding: 3px 9px; background: var(--gold); color: #1b1606; font: 900 .64rem var(--head); letter-spacing: .12em; }
.meme-status { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; color: var(--muted); font-size: .75rem; font-weight: 700; line-height: 1.5; letter-spacing: .025em; text-transform: uppercase; }
.meme-status b { padding: 5px 8px; border: 1px solid var(--gold); color: var(--gold); font-weight: 900; }
#rev { display: grid; place-items: center; width: 100%; aspect-ratio: 16 / 10; max-height: 340px; overflow: hidden; border: 1px solid var(--line); background: #080a0c; }
#rev img { width: 100%; height: 100%; object-fit: contain; }
#rev .fb { color: var(--gold); font: 900 4rem var(--head); }
.meme-meta { display: grid; gap: 4px; padding: 11px 3px 2px; text-align: left; }
.meme-meta small { color: var(--gold); font-size: .66rem; font-weight: 900; letter-spacing: .12em; }
.meme-meta b { overflow-wrap: break-word; font-size: clamp(1rem, 3vw, 1.25rem); font-weight: 800; line-height: 1.45; text-transform: uppercase; }
.meme-meta p { margin: 2px 0 0; color: var(--muted); font-size: .8rem; line-height: 1.4; }
.reveal-copy { display: grid; gap: 8px; max-width: 640px; }
.reveal-copy h2 { color: var(--ink); font-size: clamp(1.5rem, 4.5vw, 2.75rem); }
.reveal-copy h2 span { color: var(--gold); }
.reveal-joke { max-width: 52ch; font-size: .92rem; text-align: center; }
.reveal-actions { display: flex; gap: 10px; width: min(100%, 640px); justify-content: center; }
.reveal-actions .btn { flex: 1; min-width: 0; }

/* Date poll and notification */
.availability-form, .rsvp, #dopts, #cardbox, .tbl { width: min(100%, var(--form)); min-width: 0; }
.availability-form > *, .rsvp > *, #cardbox > *, .tbl > * { min-width: 0; max-width: 100%; }
fieldset { min-inline-size: 0; margin: 0; }
legend { max-width: 100%; white-space: normal; }
.availability-form { display: grid; gap: 11px; text-align: left; }
.availability-form > label, .rsvp > label, .companion-poll label { color: var(--gold); font: 700 .8125rem/1.5 var(--head); letter-spacing: .045em; text-transform: uppercase; }
input { width: 100%; min-width: 0; max-width: 100%; min-height: 50px; font-size: 1rem; line-height: 1.5; padding: 11px 13px; border: 1px solid var(--line); border-radius: 3px; outline: none; background: #0e1114; color: var(--ink); }
input::placeholder { color: var(--muted-2); }
.date-poll { display: grid; gap: 10px; margin: 2px 0 0; padding: 14px; border: 1px solid var(--line); border-radius: 4px; background: rgba(17,20,24,.72); }
.date-poll legend, .companion-poll legend { padding: 0 6px; color: var(--gold); font: 700 .8125rem/1.5 var(--head); letter-spacing: .025em; text-transform: uppercase; }
.date-input-label { color: var(--muted); font-size: .78rem; }
.date-input-row { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.date-input-row input { min-width: 0; }
.date-options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.date-option { display: grid; align-content: center; min-height: 70px; padding: 9px; border: 1px solid var(--line); border-radius: 3px; background: linear-gradient(180deg, var(--surface-2), var(--surface)); color: var(--ink); cursor: pointer; text-align: left; transition: transform .18s var(--ease-out), border-color .18s ease, background .18s ease; touch-action: manipulation; }
@media (hover: hover) { .date-option:hover { transform: translateY(-2px); border-color: #69737e; } }
.date-option span { font: 700 1rem/1.5 var(--head); }
.date-option small { margin-top: 5px; color: var(--muted); font-size: .75rem; font-weight: 600; line-height: 1.5; letter-spacing: .025em; }
.date-option.selected { border-color: var(--gold); background: linear-gradient(180deg, rgba(255,200,61,.2), rgba(255,200,61,.05)); box-shadow: inset 3px 0 var(--gold); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; min-height: 0; }
.chip { min-height: 44px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 3px; background: var(--surface-2); color: var(--ink); cursor: pointer; font: 800 .9rem var(--head); text-transform: uppercase; }
.chip.on { border-color: var(--gold); color: var(--gold); }
.date-helper { margin: 0; color: var(--muted-2); font-size: .78rem; line-height: 1.45; }
.sys { width: 100%; margin: 0; padding: 10px 13px; border: 1px solid rgba(255,200,61,.55); border-radius: 3px; background: rgba(255,200,61,.06); color: var(--gold-soft); font: 500 .875rem/1.65 var(--body); letter-spacing: normal; }
.notification-backdrop { position: fixed; inset: 0; z-index: 2000; display: grid; place-items: center; overflow-y: auto; padding: max(16px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(16px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left)); background: rgba(3,4,5,.82); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.sound-notice { z-index: 1500; background: rgba(3,4,5,.54); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.notification-modal { display: grid; justify-items: center; gap: 12px; width: min(100%, 500px); min-width: 0; max-height: calc(100vh - 32px - env(safe-area-inset-top) - env(safe-area-inset-bottom)); max-height: calc(100dvh - 32px - env(safe-area-inset-top) - env(safe-area-inset-bottom)); overflow-y: auto; overscroll-behavior: contain; padding: 30px 24px 24px; border: 1px solid var(--gold); border-radius: 5px; background: linear-gradient(145deg, #282113, #101216 64%); box-shadow: 0 24px 90px rgba(0,0,0,.6), 0 0 50px rgba(255,200,61,.13); text-align: center; animation: modalIn .32s var(--ease-spring) both; }
.sound-notice .notification-modal { width: min(100%, 420px); padding: 24px 22px 20px; border-color: rgba(255,200,61,.58); box-shadow: 0 18px 58px rgba(0,0,0,.45), 0 0 36px rgba(255,200,61,.08); }
.notification-mark { display: grid; place-items: center; width: 42px; height: 42px; border: 1px solid var(--gold); border-radius: 50%; color: var(--gold); font: 900 1.5rem var(--head); }
.sound-mark { font-size: 1.25rem; }
.notification-modal > * { min-width: 0; max-width: 100%; }
.notification-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; width: 100%; }
.notification-actions .btn { min-width: 0; width: 100%; }
.notification-modal h2 { font-size: clamp(1.5rem, 4vw, 2rem); }
.notification-modal p:not(.eyebrow) { max-width: 42ch; margin: 0; color: var(--gold-soft); line-height: 1.6; }

/* Drinks, brief, RSVP and share card */
#dopts { position: relative; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; min-height: 236px; align-content: start; }
.drk { position: relative; min-height: 60px; padding: 13px 15px; border: 1px solid var(--line); border-radius: 4px; background: linear-gradient(145deg, var(--surface-2), var(--surface)); color: var(--ink); cursor: pointer; font-weight: 650; text-align: left; transition: transform .28s var(--ease-out), border-color .18s ease, box-shadow .18s ease; touch-action: manipulation; }
.drk[data-k="C"] { grid-column: 1 / -1; }
#drinkD { justify-self: start; width: min(100%, 240px); min-height: 76px; }
.dodge-zone { position: relative; grid-column: 1 / -1; height: max(100px, 6.25rem); }
.dodge-zone > #drinkD { position: absolute; top: 0; left: 0; }
#drinks > .sys, #drinks > .btn { width: min(100%, 560px); }
#drinks > .btn { align-self: center; }
.drk b { display: inline-block; min-width: 28px; margin-right: 6px; color: var(--gold); font: 900 1.6rem/1 var(--head); }
.drk.sel { border-color: var(--gold); color: var(--gold-soft); box-shadow: 0 0 0 1px rgba(255,200,61,.25), 0 0 24px rgba(255,200,61,.1); }
#drinkD.dodge { animation: drinkDodge .36s var(--ease-out) both; }
#drinkD.bounce-dodge { animation: dodgeBounce .42s cubic-bezier(.34,.66,.64,1) both; }
#drinkD.catchable { animation: dodgePulse .6s ease-in-out infinite; cursor: grab; }
#drinkD.dodge::after { content: "NE!"; position: absolute; top: -28px; left: 50%; padding: 3px 8px; transform: translateX(-50%) rotate(-7deg); background: var(--gold); color: #1a1406; font: 900 .68rem var(--head); letter-spacing: .12em; box-shadow: 0 6px 18px rgba(255,200,61,.25); }
.tbl { display: grid; gap: 9px; }
.row { display: grid; gap: 2px; padding: 13px 15px; border: 1px solid var(--line); border-left: 4px solid var(--red); border-radius: 3px; background: linear-gradient(145deg, var(--surface-2), var(--surface)); text-align: left; }
.row small { color: var(--muted); font: 800 .68rem var(--head); letter-spacing: .12em; text-transform: uppercase; }
.row b { overflow-wrap: anywhere; }
.rsvp { display: grid; gap: 10px; }
.rs { min-height: 52px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 3px; background: var(--surface); color: var(--ink); cursor: pointer; font: 700 1rem/1.5 var(--head); text-transform: uppercase; white-space: normal; }
.rs.sel { border-color: var(--gold); background: linear-gradient(180deg, rgba(255,200,61,.2), rgba(255,200,61,.05)); color: var(--gold); }
.rs[data-v="no"].sel { border-color: var(--red); color: var(--red); background: linear-gradient(180deg, rgba(225,6,0,.2), rgba(225,6,0,.05)); }
.companion-poll { display: grid; gap: 9px; padding: 13px; border: 1px solid var(--line); border-radius: 4px; text-align: left; }
.companion-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.companion-options .rs { min-height: 46px; padding: 9px; }
.companion-poll label { display: grid; gap: 6px; }
.rsvp-final-actions { display: grid; gap: 9px; width: min(100%, 560px); }
#rsvp > .sys, #final > .sys { width: min(100%, 560px); }
.rsvp-final-actions .btn { width: 100%; min-width: 0; }
.rickroll { max-width: 52ch; margin: 0; padding: 12px 16px; border: 1px dashed rgba(255,200,61,.55); border-radius: 4px; background: rgba(255,200,61,.06); color: var(--muted); line-height: 1.55; }
.rickroll a { color: var(--gold); font-weight: 800; text-underline-offset: 3px; }
#cardbox { display: grid; justify-items: center; gap: 10px; }
#cardbox > label { width: 100%; color: var(--gold); font: 800 .72rem var(--head); letter-spacing: .12em; text-align: left; text-transform: uppercase; }
#cardimg { width: min(100%, 380px); height: auto; border: 1px solid var(--gold); border-radius: 4px; box-shadow: 0 20px 55px rgba(255,200,61,.14); }

/* Controlled motion */
#bigcase.rev { animation: caseRev .18s linear infinite; }
#bigcase.shake { animation: caseShake .09s linear infinite; }
#bigcase.pop { animation: casePop .48s var(--ease-out) forwards; }
.it.win { animation: legendaryWin .62s var(--ease-spring) both; }
.rays { position: fixed; inset: 0; z-index: -1; overflow: hidden; opacity: 0; pointer-events: none; transition: opacity .6s ease; }
.rays::before { content: ""; position: absolute; top: calc(50% - 50vmax); left: calc(50% - 50vmax); width: 100vmax; height: 100vmax; background: repeating-conic-gradient(rgba(255,200,61,.22) 0 6deg, transparent 6deg 18deg); mask-image: radial-gradient(circle, #000, transparent 55%); }
.rays.on { opacity: 1; }
.rays.on::before { animation: raysSweep 5s linear infinite; }
#flash { position: fixed; inset: 0; z-index: 2100; opacity: 0; pointer-events: none; }
#cv { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 2050; pointer-events: none; }
#bgm { position: fixed; width: 1px; height: 1px; left: -9999px; top: auto; overflow: hidden; opacity: 0; pointer-events: none; }
#bgm iframe { width: 320px; height: 180px; border: 0; }

@keyframes scan { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(450%); } }
@keyframes markerPulse { 0%, 100% { filter: brightness(1); box-shadow: 0 0 12px var(--gold); } 50% { filter: brightness(1.5); box-shadow: 0 0 24px var(--gold); } }
@keyframes caseRev { 0%,100% { transform: translate(0,0) rotate(0); } 25% { transform: translate(-1px,1px) rotate(-.35deg); } 50% { transform: translate(1px,-1px) rotate(.35deg); } 75% { transform: translate(.5px,1px) rotate(-.2deg); } }
@keyframes caseShake { 0%,100% { transform: translate(calc(var(--sh,5) * -1px), 2px) rotate(-1deg); } 33% { transform: translate(calc(var(--sh,5) * 1px), -3px) rotate(1deg); } 66% { transform: translate(calc(var(--sh,5) * -.7px), 1px) rotate(-.5deg); } }
@keyframes casePop { 0% { transform: scale(1); filter: brightness(1); } 45% { transform: scale(.92) rotateX(8deg); filter: brightness(1.8); } 100% { transform: scale(2.1) rotateY(10deg); filter: brightness(3); opacity: 0; } }
@keyframes legendaryWin { 0% { transform: scale(.92); filter: brightness(.7); } 55% { transform: scale(1.07); filter: brightness(1.75); } 100% { transform: scale(1); filter: brightness(1); } }
@keyframes raysSweep { to { transform: rotate(360deg); } }
@keyframes modalIn { from { opacity: 0; transform: translateY(16px) scale(.94); } to { opacity: 1; transform: none; } }
@keyframes drinkDodge { 0% { transform: translate(var(--dx, 0), var(--dy, 0)) scale(1) rotate(var(--dr, 0deg)); opacity: 1; } 50% { transform: translate(var(--dx, 0), var(--dy, 0)) scale(1.08) rotate(calc(var(--dr, 0deg) + 15deg)); } 100% { transform: translate(var(--dx, 0), var(--dy, 0)) scale(1) rotate(var(--dr, 0deg)); opacity: 1; } }
@keyframes dodgeBounce { 0% { transform: translate(var(--dx, 0), var(--dy, 0)) scale(1) rotate(0deg); } 25% { transform: translate(calc(var(--dx, 0) - 4px), calc(var(--dy, 0) - 8px)) scale(1.08) rotate(var(--dr, 0deg)); } 50% { transform: translate(var(--dx, 0), calc(var(--dy, 0) - 12px)) scale(1.12) rotate(calc(var(--dr, 0deg) * 1.5)); } 75% { transform: translate(calc(var(--dx, 0) + 3px), calc(var(--dy, 0) - 6px)) scale(1.1) rotate(var(--dr, 0deg)); } 100% { transform: translate(var(--dx, 0), var(--dy, 0)) scale(1) rotate(0deg); } }
@keyframes dodgePulse { 0% { box-shadow: 0 0 0 0 rgba(255, 59, 48, .7), inset 0 0 12px rgba(255,200,61,.2); } 100% { box-shadow: 0 0 0 20px rgba(255, 59, 48, 0), inset 0 0 12px rgba(255,200,61,.2); } }
@keyframes duckRun { 0% { left: -120px; opacity: 1; } 60% { opacity: 1; } 100% { left: 110vw; opacity: 0; } }
@keyframes duckWaddle { 0%, 100% { transform: scaleY(1) rotate(0deg); } 50% { transform: scaleY(0.95) rotate(-2deg); } }
@keyframes drinkAbducted { 0% { opacity: 1; transform: translate(0, 0) scale(1); } 50% { opacity: 0.8; transform: translate(40px, -10px) scale(0.95); } 100% { opacity: 0; transform: translate(100px, -40px) scale(0.8); } }
#duckThief { position: absolute; top: 50%; left: -120px; z-index: 100; width: clamp(60px, 12vw, 140px); height: auto; pointer-events: none; user-select: none; transform-origin: center center; }
#duckThief img { width: 100%; height: 100%; object-fit: contain; }
#duckThief.robber-active { animation: duckRun 2.5s ease-in-out forwards, duckWaddle 0.4s ease-in-out 6.25; }
#drinkD.abducted { animation: drinkAbducted 2.5s ease-in-out forwards; }

@media (max-width: 899px) {
    .cases { grid-template-columns: 1fr; width: min(100%, var(--form)); }
    .case { grid-template-columns: 112px minmax(0, 1fr); grid-template-rows: auto auto; gap: 8px 16px; min-height: 136px; }
    .crate { grid-row: 1 / 3; align-self: center; height: 104px; }
}
@media (max-width: 560px) {
    section { --gutter: 16px; gap: 16px; }
    .screen-head { align-items: flex-start; }
    .screen-head .eyebrow { flex: 1 1 200px; }
    .logo { font-size: 1.125rem; }
    .plate { font-size: 1rem; }
    #bigcase { width: 162px; height: 126px; }
    .opening-bay { min-height: 180px; padding-top: 32px; }
    .opening-copy { right: 16px; left: 16px; font-size: .6875rem; line-height: 1.5; letter-spacing: .025em; }
    #roul { height: 234px; }
    #track { height: 190px; }
    .roulette-label { gap: 8px; padding-inline: 10px; font-size: .6875rem; letter-spacing: .025em; }
    .it { flex-basis: 136px; width: 136px; height: 172px; margin: 9px 4px; }
    .legendary-stage { min-height: 0; padding-block: 12px; }
    .meme-reveal { width: min(100%, 420px); }
    #rev { aspect-ratio: 4 / 3; }
    .reveal-actions { flex-direction: column; width: min(100%, 420px); }
    .reveal-actions .btn { width: 100%; }
    .date-options { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .date-input-row { grid-template-columns: minmax(0, 1fr); }
    .date-input-row .btn { width: 100%; }
    .notification-modal { padding-inline: 18px; }
    #drinkD { width: min(80%, 240px); }
    .rickroll { padding: 12px; text-align: left; }
}
@media (max-width: 380px) {
    .case { grid-template-columns: 80px minmax(0, 1fr); gap: 8px 12px; padding: 12px; }
    .crate { height: 88px; }
    .case b { font-size: 1rem; }
    .notification-actions { grid-template-columns: minmax(0, 1fr); }
}
@media (max-height: 850px) {
    /* Short laptop/landscape windows: reduce hero heading to fit without overflow. */
    #boot h1 { font-size: clamp(1.8rem, 6vw, 4.5rem); }
}
@media (max-height: 600px) {
    /* Short laptop/landscape windows must start at the top, never above it. */
    #boot { justify-content: flex-start; }
    .notification-modal, .sound-notice .notification-modal { gap: 10px; padding-block: 16px; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
    #bigcase.rev, #bigcase.shake, #bigcase.pop, #mark, .it.win, .rays.on::before, .opening-scan i, #drinkD, #drinkD.dodge, .notification-modal { animation: none !important; }
    .legendary-orbit { transform: none !important; }
}
