:root {
  color-scheme: dark;
  --ink: #101827;
  --deep: #080d16;
  --panel: #151c28;
  --graphite: #25232a;
  --gold: #c9a45c;
  --gold-light: #edd59c;
  --paper: #f2e5cb;
  --brown: #59402d;
  --burgundy: #762e32;
  --cream: #f8f4ea;
  --muted: #a5a39d;
  --display: "Cinzel", Georgia, serif;
  --letter: "Cormorant Garamond", Georgia, serif;
  --body: "Inter", system-ui, sans-serif;
  font-family: var(--body);
  background: var(--deep);
  color: var(--cream);
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--deep); }
body { margin: 0; min-width: 320px; min-height: 100vh; background: radial-gradient(circle at 75% 12%, rgba(201,164,92,.1), transparent 34rem), var(--deep); }
button, input { font: inherit; }
button { color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button:focus-visible, input:focus-visible, a:focus-visible { outline: 2px solid var(--gold-light); outline-offset: 3px; }
[hidden] { display: none !important; }

.skip-link { position: fixed; top: .7rem; left: .7rem; z-index: 200; padding: .7rem 1rem; color: var(--ink); background: var(--cream); transform: translateY(-150%); }
.skip-link:focus { transform: translateY(0); }
.grain { position: fixed; inset: 0; z-index: 100; opacity: .035; pointer-events: none; background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }

.site-header { position: fixed; inset: 0 0 auto; z-index: 40; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; min-height: 76px; padding: max(.75rem, env(safe-area-inset-top)) clamp(1rem, 3vw, 2.5rem) .6rem; background: linear-gradient(180deg, rgba(8,13,22,.94), rgba(8,13,22,.5), transparent); }
.brand { display: flex; align-items: center; gap: .65rem; justify-self: start; padding: 0; border: 0; background: transparent; cursor: pointer; font-family: var(--display); font-size: .88rem; }
.brand img { width: 40px; height: 40px; border: 1px solid rgba(201,164,92,.65); border-radius: 50%; object-fit: cover; }
.brand > span > span { color: var(--gold); }
.header-status { display: flex; align-items: center; gap: .5rem; color: rgba(248,244,234,.48); font-size: .6rem; letter-spacing: .11em; text-transform: uppercase; }
.status-dot { width: 6px; height: 6px; border-radius: 50%; background: #7daf82; box-shadow: 0 0 9px #7daf82; }
.language-button { justify-self: end; width: 38px; height: 38px; border: 1px solid rgba(248,244,234,.22); border-radius: 50%; background: rgba(8,13,22,.3); cursor: pointer; font-size: .62rem; font-weight: 600; }

.landing-view { position: relative; min-height: 100vh; min-height: 100dvh; overflow: hidden; isolation: isolate; }
.hero-media, .hero-shade { position: absolute; inset: 0; z-index: -2; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; object-position: center center; filter: saturate(.82) contrast(1.06) brightness(.62); animation: heroIn 13s ease-out both; }
.hero-shade { z-index: -1; background: linear-gradient(90deg, rgba(6,10,17,.96) 0%, rgba(6,10,17,.78) 35%, rgba(6,10,17,.2) 72%), linear-gradient(0deg, #080d16 0%, transparent 36%), radial-gradient(circle at 74% 35%, transparent 0 15%, rgba(6,10,17,.42) 75%); }
.hero-content { display: flex; flex-direction: column; justify-content: center; width: min(100%, 670px); min-height: 100vh; min-height: 100dvh; padding: 7rem clamp(1.2rem, 7vw, 6rem) 2rem; }
.eyebrow, .section-label, .document-label { margin: 0; color: var(--gold-light); font-size: .61rem; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; }
.eyebrow { display: flex; align-items: center; gap: .7rem; }
.eyebrow > span { width: 34px; height: 1px; background: var(--gold); }
h1, h2 { font-family: var(--display); }
.hero-content h1 { margin: 1.1rem 0 .9rem; font-size: clamp(2.45rem, 6vw, 5.2rem); font-weight: 500; line-height: .98; letter-spacing: -.04em; text-transform: uppercase; text-shadow: 0 5px 28px #000; }
.hero-content h1 em { color: var(--gold-light); font-style: normal; }
.hero-lead { max-width: 550px; margin: 0 0 1.8rem; color: rgba(248,244,234,.7); font-family: var(--letter); font-size: clamp(1.05rem, 2vw, 1.3rem); line-height: 1.45; }

.entry-actions { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; max-width: 650px; }
.entry-card { position: relative; display: grid; grid-template-columns: 42px 1fr 24px; gap: .85rem; align-items: center; min-height: 112px; padding: 1.15rem; overflow: hidden; border: 1px solid rgba(201,164,92,.25); color: var(--cream); background: rgba(12,18,29,.78); backdrop-filter: blur(12px); text-align: left; cursor: pointer; transition: transform .25s ease, border-color .25s ease, background .25s ease; }
.entry-card:hover { transform: translateY(-3px); border-color: rgba(201,164,92,.65); background: rgba(18,26,40,.92); }
.entry-card::after { content: ""; position: absolute; inset: 5px; border: 1px solid rgba(255,255,255,.05); pointer-events: none; }
.primary-entry { background: linear-gradient(120deg, rgba(118,46,50,.3), rgba(12,18,29,.88)); }
.entry-index { position: absolute; top: .55rem; right: .7rem; color: rgba(201,164,92,.5); font-family: var(--display); font-size: .48rem; }
.entry-icon { position: relative; width: 38px; height: 38px; border: 1px solid var(--gold); border-radius: 50%; }
.host-icon::before { content: ""; position: absolute; left: 11px; top: 8px; width: 13px; height: 15px; border: 1px solid var(--gold); border-radius: 8px 8px 2px 2px; }
.host-icon::after { content: ""; position: absolute; left: 8px; right: 8px; bottom: 7px; height: 1px; background: var(--gold); }
.join-icon::before, .join-icon::after { content: ""; position: absolute; width: 8px; height: 8px; border: 1px solid var(--gold); border-radius: 50%; }
.join-icon::before { left: 9px; top: 8px; }.join-icon::after { right: 7px; top: 13px; }
.entry-copy { min-width: 0; }.entry-copy strong, .entry-copy small { display: block; }
.entry-copy strong { margin-bottom: .35rem; font-family: var(--display); font-size: .85rem; font-weight: 500; }
.entry-copy small { color: rgba(248,244,234,.5); font-size: .62rem; line-height: 1.45; }
.entry-arrow { color: var(--gold); font-size: 1.1rem; }
.trust-row { display: flex; gap: 1.6rem; margin-top: 1.3rem; color: rgba(248,244,234,.4); font-size: .56rem; letter-spacing: .08em; text-transform: uppercase; }
.trust-row i { color: var(--gold-light); font-family: var(--display); font-style: normal; }

.gate-dialog { width: min(calc(100% - 1.5rem), 780px); padding: 0; overflow: hidden; border: 1px solid rgba(201,164,92,.38); color: var(--cream); background: var(--panel); box-shadow: 0 28px 100px rgba(0,0,0,.8); }
.gate-dialog::backdrop { background: rgba(4,8,14,.86); backdrop-filter: blur(8px); }
.dialog-close { position: absolute; top: .8rem; right: .8rem; z-index: 3; width: 42px; height: 42px; border: 1px solid rgba(248,244,234,.22); border-radius: 50%; background: rgba(8,13,22,.5); cursor: pointer; font-size: 1.2rem; }
.gate-art { position: absolute; inset: 0 52% 0 0; background: linear-gradient(90deg, rgba(8,13,22,.25), rgba(8,13,22,.88)), url("assets/questoria-banner.jpg") center/cover; }
.gate-content { position: relative; width: 58%; min-height: 510px; margin-left: 42%; padding: 4.2rem 3rem 2.5rem; background: linear-gradient(135deg, rgba(21,28,40,.96), #101722); }
.gate-content h2 { margin: .8rem 0 .7rem; font-size: 2rem; line-height: 1.05; }
.gate-description { margin: 0 0 1.6rem; color: rgba(248,244,234,.56); font-family: var(--letter); font-size: 1.08rem; line-height: 1.4; }
.field-label { display: block; margin: .9rem 0 .45rem; color: var(--gold-light); font-size: .54rem; font-weight: 600; letter-spacing: .15em; text-transform: uppercase; }
.text-field { width: 100%; height: 52px; padding: 0 .9rem; border: 1px solid rgba(201,164,92,.28); border-radius: 0; color: var(--cream); background: rgba(255,255,255,.035); outline: none; }
.text-field:focus { border-color: var(--gold); }
.gold-button { display: flex; align-items: center; justify-content: space-between; width: 100%; min-height: 54px; margin-top: 1.25rem; padding: 0 1.2rem; border: 0; color: #17130c; background: linear-gradient(100deg, #b98c3c, #e2c57f 48%, #b98c3c); cursor: pointer; font-size: .67rem; font-weight: 600; letter-spacing: .13em; text-transform: uppercase; }
.gold-button:disabled { cursor: wait; filter: grayscale(.8); opacity: .65; }
.form-message { min-height: 1.1em; margin: .65rem 0 0; color: rgba(248,244,234,.4); font-size: .59rem; line-height: 1.4; }.form-message.error { color: #e78d93; }
.license-note { display: flex; align-items: center; gap: .8rem; margin-top: 1rem; padding: .75rem; border: 1px solid rgba(125,175,130,.3); background: rgba(125,175,130,.06); }
.license-check { display: grid; place-items: center; width: 28px; height: 28px; border: 1px solid #7daf82; border-radius: 50%; color: #a7d2ab; }
.license-note strong, .license-note small { display: block; }.license-note strong { font-size: .68rem; }.license-note small { margin-top: .2rem; color: rgba(248,244,234,.45); font-size: .55rem; }

.room-view { min-height: 100vh; padding-top: 76px; background: linear-gradient(135deg, #111a2a, #090f19 58%); }
.room-loading { display: grid; place-items: center; align-content: center; min-height: calc(100vh - 76px); color: var(--muted); font-size: .65rem; letter-spacing: .12em; text-transform: uppercase; }
.seal-loader, .event-seal { display: grid; place-items: center; border-radius: 50%; font-family: var(--display); background: radial-gradient(circle at 35% 30%, #a9434a, #571a20 72%); box-shadow: 0 6px 18px rgba(0,0,0,.45); }
.seal-loader { width: 54px; height: 54px; margin-bottom: 1rem; animation: pulseSeal 1.6s ease-in-out infinite; }
.room-header { position: sticky; top: 0; z-index: 30; display: grid; grid-template-columns: 48px 1fr auto; gap: 1rem; align-items: center; min-height: 72px; padding: .7rem clamp(1rem,4vw,3rem); border-bottom: 1px solid rgba(201,164,92,.13); background: rgba(8,13,22,.92); backdrop-filter: blur(15px); }
.back-link { width: 42px; height: 42px; border: 1px solid rgba(248,244,234,.15); background: transparent; cursor: pointer; }
.room-case span, .room-case strong { display: block; }.room-case span { color: var(--gold); font-size: .5rem; letter-spacing: .15em; text-transform: uppercase; }.room-case strong { margin-top: .2rem; font-family: var(--display); font-size: .82rem; }
.pin-badge { padding: .45rem .8rem; border: 1px solid rgba(201,164,92,.25); background: rgba(201,164,92,.06); cursor: pointer; text-align: right; }.pin-badge small, .pin-badge b { display: block; }.pin-badge small { color: var(--muted); font-size: .45rem; letter-spacing: .12em; text-transform: uppercase; }.pin-badge b { margin-top: .15rem; color: var(--gold-light); font-family: var(--display); font-size: .85rem; letter-spacing: .16em; }

.lobby-shell { display: grid; grid-template-columns: minmax(300px, .8fr) 1.2fr; min-height: calc(100vh - 148px); }
.lobby-art { position: relative; min-height: 610px; overflow: hidden; }.lobby-art::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent 40%, #0d1522), linear-gradient(0deg,#0d1522,transparent 35%); }.lobby-art img { width: 100%; height: 100%; object-fit: cover; filter: saturate(.7) brightness(.72); }
.lobby-copy { align-self: center; width: min(100%, 700px); padding: 3rem clamp(1.2rem,5vw,5rem) 3rem 2rem; }
.lobby-copy h1 { margin: .8rem 0 .3rem; font-size: clamp(2rem,4vw,3.8rem); line-height: 1; }.location { color: var(--gold); font-size: .58rem; letter-spacing: .12em; text-transform: uppercase; }.briefing { max-width: 620px; color: rgba(248,244,234,.7); font-family: var(--letter); font-size: 1.18rem; line-height: 1.45; }
.join-callout { display: grid; grid-template-columns: 1fr auto; gap: .25rem 1rem; align-items: center; margin: 1.4rem 0; padding: 1rem 1.2rem; border: 1px solid rgba(201,164,92,.3); background: rgba(201,164,92,.05); }.join-callout span { color: var(--muted); font-size: .54rem; letter-spacing: .14em; text-transform: uppercase; }.join-callout strong { grid-row: span 2; font-family: var(--display); font-size: 1.5rem; letter-spacing: .18em; }.join-callout button { padding: 0; border: 0; color: var(--gold-light); background: none; cursor: pointer; font-size: .59rem; text-align: left; }
.lobby-team { margin: 1.2rem 0; }.lobby-team > div:first-child { display: flex; justify-content: space-between; margin-bottom: .65rem; }.lobby-team > div:first-child b { color: var(--gold); font-size: .7rem; }
.participants { display: flex; flex-wrap: wrap; gap: .45rem; }.participant { display: flex; align-items: center; gap: .4rem; padding: .35rem .6rem .35rem .35rem; border: 1px solid rgba(255,255,255,.1); color: rgba(248,244,234,.65); font-size: .58rem; }.participant i { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; color: var(--gold-light); background: #273143; font-style: normal; }.participant b { color: var(--gold); font-size: .43rem; text-transform: uppercase; }
.wide { max-width: 420px; }.dossier-link { display: inline-block; margin-top: 1rem; color: rgba(248,244,234,.5); font-size: .58rem; letter-spacing: .05em; }
.waiting-card { display: flex; align-items: center; gap: .8rem; padding: 1rem; border: 1px solid rgba(201,164,92,.2); background: rgba(255,255,255,.025); }.waiting-card strong, .waiting-card small { display: block; }.waiting-card strong { font-size: .7rem; }.waiting-card small { margin-top: .25rem; color: var(--muted); font-size: .56rem; }.pulse { width: 10px; height: 10px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 0 rgba(201,164,92,.45); animation: waiting 1.8s infinite; }

.game-shell { display: grid; grid-template-columns: 310px minmax(0,760px); justify-content: center; gap: clamp(1rem,4vw,4rem); padding: 2rem clamp(1rem,3vw,3rem) 4rem; }
.case-sidebar { align-self: start; position: sticky; top: 96px; padding: 1.2rem; border: 1px solid rgba(201,164,92,.16); background: rgba(15,22,34,.75); }.progress-copy { display: flex; justify-content: space-between; color: var(--muted); font-size: .53rem; letter-spacing: .1em; text-transform: uppercase; }.progress-copy b { color: var(--gold); }.progress-track { height: 2px; margin: .65rem 0 1.2rem; background: rgba(255,255,255,.08); }.progress-track i { display: block; height: 100%; background: var(--gold); transition: width .5s ease; }
.envelope-list { display: grid; gap: .35rem; }.envelope-tab { display: grid; grid-template-columns: 28px 16px 1fr; align-items: center; min-height: 52px; padding: .45rem; opacity: .35; border: 1px solid transparent; }.envelope-tab > span { font-family: var(--display); font-size: .57rem; }.envelope-tab > i { position: relative; width: 10px; height: 8px; border: 1px solid currentColor; }.envelope-tab > i::before { content: ""; position: absolute; inset: -1px; clip-path: polygon(0 0,50% 60%,100% 0); background: currentColor; }.envelope-tab small, .envelope-tab strong { display: block; }.envelope-tab small { font-size: .42rem; letter-spacing: .1em; text-transform: uppercase; }.envelope-tab strong { margin-top: .15rem; font-family: var(--letter); font-size: .85rem; font-weight: 500; }.envelope-tab.current { opacity: 1; border-color: rgba(201,164,92,.35); color: var(--gold-light); background: rgba(201,164,92,.06); }.envelope-tab.solved { opacity: .7; color: #8fbd94; }.team-mini { margin-top: 1.4rem; padding-top: 1rem; border-top: 1px solid rgba(255,255,255,.08); }.team-mini > .section-label { display: block; margin-bottom: .6rem; }.team-mini .participant { padding-right: .35rem; }.team-mini .participant { font-size: 0; }.team-mini .participant i { font-size: .55rem; }

.evidence-stage { position: relative; min-width: 0; }.envelope-opening { height: 178px; overflow: hidden; display: grid; place-items: end center; }.paper-envelope { position: relative; width: 190px; height: 122px; background: #b99c71; box-shadow: 0 18px 40px rgba(0,0,0,.38); transform: translateY(12px) rotate(-1deg); animation: envelopeArrive .7s ease-out both; }.paper-envelope::after { content: ""; position: absolute; inset: 0; clip-path: polygon(0 100%,50% 43%,100% 100%); background: #c8aa7f; }.paper-envelope span { position: absolute; inset: 0; z-index: 1; clip-path: polygon(0 0,50% 55%,100% 0); background: #dcc59f; animation: flapOpen .8s .45s ease both; transform-origin: top; }.paper-envelope b { position: absolute; z-index: 2; left: 75px; top: 46px; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #a9434a, #571a20 72%); font-family: var(--display); animation: sealBreak .45s .65s ease both; }
.stage-heading { display: flex; justify-content: space-between; gap: 1rem; align-items: start; margin-top: .5rem; }.stage-heading h1 { margin: .5rem 0 .35rem; font-size: clamp(1.8rem,4vw,3rem); line-height: 1; }.document-label { color: rgba(248,244,234,.45); }.attempts { min-width: 62px; padding: .6rem; border: 1px solid rgba(201,164,92,.25); text-align: center; }.attempts small, .attempts b { display: block; }.attempts small { color: var(--muted); font-size: .44rem; letter-spacing: .08em; text-transform: uppercase; }.attempts b { margin-top: .2rem; color: var(--gold-light); font-family: var(--display); font-size: 1.1rem; }
.stage-story { margin: 1rem 0; color: rgba(248,244,234,.73); font-family: var(--letter); font-size: 1.18rem; line-height: 1.5; }.case-document { position: relative; margin: 1.4rem 0; padding: 1.6rem; color: var(--brown); background: linear-gradient(rgba(242,229,203,.97),rgba(230,210,171,.97)); box-shadow: 0 16px 35px rgba(0,0,0,.25); transform: rotate(-.2deg); }.case-document::after { content: "CONFIDENTIAL"; position: absolute; right: 1rem; bottom: 1rem; color: rgba(118,46,50,.11); font-family: var(--display); font-size: 1.5rem; transform: rotate(-8deg); }.case-document > span { color: var(--burgundy); font-size: .52rem; font-weight: 600; letter-spacing: .15em; text-transform: uppercase; }.case-document h3 { margin: .45rem 0 .7rem; font-family: var(--display); font-size: 1rem; }.case-document p { position: relative; z-index: 1; margin: .6rem 0; font-family: var(--letter); font-size: 1.1rem; line-height: 1.45; }.case-document i { display: block; margin-top: .9rem; font-size: .5rem; letter-spacing: .12em; text-transform: uppercase; }.case-document dl { display: grid; gap: .4rem; margin: 1rem 0 0; font-size: .62rem; }.case-document dl div { display: grid; grid-template-columns: minmax(90px, .4fr) 1fr; gap: .7rem; border-top: 1px solid rgba(74,52,32,.16); padding-top: .35rem; }.case-document dt { color: rgba(74,52,32,.65); text-transform: uppercase; letter-spacing: .08em; }.case-document dd { margin: 0; }.case-document img { display: block; max-width: 100%; max-height: 420px; margin-top: 1rem; object-fit: contain; }
.question-card { padding: 1.4rem; border: 1px solid rgba(201,164,92,.25); background: rgba(255,255,255,.025); }.question-card h2 { margin: .6rem 0 1rem; font-family: var(--letter); font-size: 1.5rem; font-weight: 500; line-height: 1.15; }.hint, .hint-locked { margin: .8rem 0; padding: .7rem .9rem; color: rgba(248,244,234,.58); background: rgba(201,164,92,.07); font-size: .63rem; line-height: 1.4; }.hint span { display: block; margin-bottom: .25rem; color: var(--gold); font-size: .48rem; letter-spacing: .12em; text-transform: uppercase; }.hint-locked { border: 1px dashed rgba(201,164,92,.2); background: none; }.answer-form label { display: block; margin: 1rem 0 .4rem; color: var(--gold); font-size: .5rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; }.answer-form > div { display: grid; grid-template-columns: 1fr auto; }.answer-form input { min-width: 0; height: 54px; padding: 0 .9rem; border: 1px solid rgba(201,164,92,.35); color: var(--cream); background: rgba(8,13,22,.6); outline: none; }.answer-form button { padding: 0 1.2rem; border: 0; color: #17130c; background: var(--gold); cursor: pointer; font-size: .62rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }.answer-form p { min-height: 1em; margin: .5rem 0 0; color: #df8d93; font-size: .58rem; }

.finale-shell { position: relative; max-width: 850px; margin: 0 auto; padding: 5rem 1.2rem; overflow: hidden; text-align: center; }.finale-glow { position: absolute; z-index: -1; top: -12rem; left: 50%; width: 40rem; height: 40rem; border-radius: 50%; background: radial-gradient(circle, rgba(201,164,92,.18), transparent 65%); transform: translateX(-50%); }.finale-shell > .eyebrow { justify-content: center; }.finale-shell h1 { margin: 1rem auto; font-size: clamp(2rem,5vw,4rem); line-height: 1; }.finale-kicker { margin: 2rem 0 .5rem; color: var(--muted); font-size: .6rem; letter-spacing: .2em; text-transform: uppercase; }.culprit-name { color: var(--gold-light); font-family: var(--display); font-size: clamp(2.4rem,8vw,6rem); text-transform: uppercase; text-shadow: 0 0 40px rgba(201,164,92,.25); }.finale-letter { margin: 2.5rem 0; padding: 2rem; color: var(--brown); background: var(--paper); text-align: left; transform: rotate(-.2deg); }.finale-letter > span { color: var(--burgundy); font-size: .52rem; font-weight: 600; letter-spacing: .15em; text-transform: uppercase; }.finale-letter p, .finale-letter blockquote { font-family: var(--letter); font-size: 1.12rem; line-height: 1.5; }.finale-letter blockquote { margin: 1rem 0 0; padding-left: 1rem; border-left: 2px solid var(--burgundy); font-style: italic; }.finale-stats { display: grid; grid-template-columns: repeat(3,1fr); margin: 1.5rem 0; }.finale-stats span { padding: .6rem; border-right: 1px solid rgba(201,164,92,.22); color: var(--muted); font-size: .53rem; text-transform: uppercase; }.finale-stats span:last-child { border: 0; }.finale-stats b { display: block; margin-bottom: .2rem; color: var(--cream); font-family: var(--display); font-size: 1rem; }.outline-button { padding: .9rem 1.4rem; border: 1px solid var(--gold); color: var(--gold-light); background: transparent; cursor: pointer; font-size: .6rem; letter-spacing: .12em; text-transform: uppercase; }

.event-overlay { position: fixed; inset: 0; z-index: 120; display: grid; place-items: center; padding: 1rem; background: rgba(5,9,15,.88); backdrop-filter: blur(8px); animation: overlayIn .25s ease both; }.event-overlay.leaving { animation: overlayOut .5s ease both; }.event-card { width: min(100%,430px); text-align: center; }.event-seal { width: 74px; height: 74px; margin: 0 auto 1.2rem; font-size: 1.4rem; animation: eventSeal .7s ease both; }.event-card .eyebrow { justify-content: center; }.event-card h2 { margin: .8rem 0 .5rem; font-size: 1.8rem; }.event-card > p:last-child { color: rgba(248,244,234,.58); font-family: var(--letter); font-size: 1.05rem; line-height: 1.4; }.event-overlay.retry .event-seal { background: radial-gradient(circle at 35% 30%, #9a4147,#401318 72%); animation: sealReject .55s ease both; }.event-overlay.advanced .event-seal, .event-overlay.completed .event-seal { color: #18301d; background: radial-gradient(circle at 35% 30%,#b8d8a9,#608667 72%); }
.toast { position: fixed; left: 50%; bottom: 1.2rem; z-index: 150; max-width: calc(100% - 2rem); padding: .75rem 1rem; border: 1px solid rgba(201,164,92,.35); background: rgba(16,24,39,.96); font-size: .66rem; opacity: 0; pointer-events: none; transform: translate(-50%,14px); transition: .25s ease; }.toast.is-visible { opacity: 1; transform: translate(-50%,0); }

@keyframes heroIn { from{transform:scale(1.08)} to{transform:scale(1)} }
@keyframes pulseSeal { 50%{transform:scale(1.07);box-shadow:0 6px 28px rgba(118,46,50,.7)} }
@keyframes waiting { 70%{box-shadow:0 0 0 8px rgba(201,164,92,0)} }
@keyframes envelopeArrive { from{opacity:0;transform:translateY(75px) rotate(-6deg)} }
@keyframes flapOpen { to{transform:rotateX(155deg);filter:brightness(.75)} }
@keyframes sealBreak { to{opacity:0;transform:translateY(28px) rotate(24deg) scale(.8)} }
@keyframes overlayIn { from{opacity:0} }
@keyframes overlayOut { to{opacity:0} }
@keyframes eventSeal { from{opacity:0;transform:scale(1.8) rotate(-18deg)} }
@keyframes sealReject { 20%,60%{transform:translateX(-9px) rotate(-7deg)}40%,80%{transform:translateX(9px) rotate(7deg)} }

@media (max-width: 820px) {
  .header-status { display: none; }.site-header { grid-template-columns: 1fr auto; }.hero-shade { background: linear-gradient(0deg,#080d16 0%,rgba(6,10,17,.55) 55%,rgba(6,10,17,.28)), radial-gradient(circle at 60% 30%,transparent,rgba(6,10,17,.55)); }.hero-content { justify-content: flex-end; padding: 7rem 1.05rem 2rem; }.entry-actions { grid-template-columns: 1fr; }.trust-row { justify-content: space-between; gap: .5rem; }.gate-art { display: none; }.gate-content { width: 100%; min-height: 0; margin: 0; padding: 4rem 1.3rem 1.5rem; }.lobby-shell { display: block; }.lobby-art { min-height: 280px; height: 38vh; }.lobby-art::after { background: linear-gradient(0deg,#0d1522,transparent 75%); }.lobby-copy { margin-top: -3rem; padding: 1rem 1rem 2.5rem; position: relative; }.game-shell { display: block; padding: 1rem 1rem 3rem; }.case-sidebar { position: static; padding: .85rem; }.envelope-list { display: flex; overflow-x: auto; gap: .4rem; padding-bottom: .35rem; }.envelope-tab { flex: 0 0 52px; display: grid; place-items: center; min-height: 46px; padding: .3rem; }.envelope-tab > i, .envelope-tab > div { display: none; }.envelope-tab > span { font-size: .65rem; }.team-mini { display: none; }.envelope-opening { height: 145px; }.stage-heading { margin-top: .2rem; }.answer-form > div { grid-template-columns: 1fr; }.answer-form button { min-height: 50px; }.finale-stats { grid-template-columns: 1fr; }.finale-stats span { border-right: 0; border-bottom: 1px solid rgba(201,164,92,.2); }
}

@media (max-width: 430px) {
  .brand { font-size: .73rem; }.brand img { width: 35px; height: 35px; }.hero-content h1 { font-size: 2.35rem; }.hero-lead { font-size: 1rem; }.entry-card { min-height: 94px; }.trust-row { font-size: .46rem; }.room-header { grid-template-columns: 42px 1fr auto; gap: .55rem; padding: .55rem .7rem; }.room-case strong { max-width: 130px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }.pin-badge { padding: .4rem .5rem; }.pin-badge b { font-size: .73rem; }.join-callout { grid-template-columns: 1fr; }.join-callout strong { grid-row: auto; }.stage-heading h1 { font-size: 1.65rem; }.attempts { min-width: 54px; }.case-document, .question-card { padding: 1.1rem; }
}

@media (prefers-reduced-motion: reduce) { *,*::before,*::after { animation-duration:.01ms!important; animation-iteration-count:1!important; transition-duration:.01ms!important; } }
