:root {
  --ink: #17140f;
  --paper: #ece4d2;
  --paper-2: #d8cdb7;
  --rust: #c84f2f;
  --gold: #d9a443;
  --sage: #6e8062;
  --muted: #988e7a;
  --line: rgba(236, 228, 210, .18);
  --serif: Georgia, "Times New Roman", serif;
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

html { min-height: 100%; background: var(--ink); }

body {
  min-height: 100vh;
  margin: 0;
  color: var(--paper);
  background:
    radial-gradient(circle at 75% 15%, rgba(200, 79, 47, .13), transparent 28rem),
    radial-gradient(circle at 20% 100%, rgba(110, 128, 98, .1), transparent 35rem),
    var(--ink);
  font-family: var(--sans);
  overflow-x: hidden;
}

button, input { font: inherit; }
button { color: inherit; }
[hidden] { display: none !important; }

.noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .16;
  z-index: 0;
  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='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.18'/%3E%3C/svg%3E");
  mix-blend-mode: soft-light;
}

.masthead, main, footer { position: relative; z-index: 1; }

.masthead, main, footer { width: min(1180px, calc(100% - 48px)); margin-inline: auto; }

.masthead {
  height: 92px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.brand {
  color: var(--paper);
  text-decoration: none;
  font-weight: 900;
  letter-spacing: .14em;
}

.brand-mark { color: var(--rust); margin-right: .5rem; }
.edition { color: var(--muted); font-size: .7rem; font-weight: 800; letter-spacing: .16em; }
.edition span { color: var(--paper); margin-left: .35rem; }

.screen { min-height: calc(100vh - 174px); animation: enter .45s cubic-bezier(.22,.8,.24,1) both; }

@keyframes enter {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.landing {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(340px, .72fr);
  align-items: center;
  gap: clamp(48px, 8vw, 120px);
  padding: 70px 0 90px;
}

.kicker, .eyebrow {
  margin: 0 0 18px;
  color: var(--rust);
  font-size: .72rem;
  font-weight: 900;
  letter-spacing: .18em;
  text-transform: uppercase;
}

h1, h2, p { text-wrap: pretty; }

h1 {
  max-width: 780px;
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(3.7rem, 7vw, 7.2rem);
  line-height: .88;
  letter-spacing: -.06em;
  font-weight: 500;
}

h1 em { color: var(--gold); font-weight: 400; }

.lede {
  max-width: 620px;
  margin: 30px 0 34px;
  color: var(--paper-2);
  font-family: var(--serif);
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  line-height: 1.55;
}

.primary-button, .secondary-button {
  border: 0;
  cursor: pointer;
  font-weight: 900;
  letter-spacing: .04em;
  transition: transform .18s ease, background .18s ease, color .18s ease;
}

.primary-button {
  min-width: 240px;
  padding: 17px 20px;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  background: #a63b22;
  color: #fff;
  box-shadow: 5px 5px 0 rgba(216, 164, 67, .9);
}

.primary-button:hover, .primary-button:focus-visible { transform: translate(-2px, -2px); box-shadow: 7px 7px 0 var(--gold); }
.primary-button:active { transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--gold); }
.primary-button:disabled { cursor: wait; opacity: .65; transform: none; box-shadow: none; }
.primary-button.compact { min-width: 128px; box-shadow: none; justify-content: center; }
.fine-print { margin-top: 18px; color: var(--muted); font-size: .75rem; }

.hero-card { width: min(100%, 390px); margin-inline: auto; position: relative; transform: rotate(2.5deg); }

.card-shell {
  aspect-ratio: 5 / 7;
  padding: 18px;
  border: 10px solid #080807;
  border-radius: 24px;
  color: #16130f;
  background: linear-gradient(145deg, #b7ada0, #e6dfd4 36%, #9f9588);
  box-shadow: 0 30px 70px #0008, inset 0 0 0 2px #fff6;
}

.card-name, .type-line {
  min-height: 35px;
  padding: 7px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 2px solid #474039;
  background: linear-gradient(90deg, #d9d3c9, #bdb5a9);
  font-family: var(--serif);
  font-weight: 700;
  box-shadow: inset 0 0 6px #0003;
}

.mana { width: 23px; height: 23px; display: grid; place-items: center; border-radius: 50%; background: #1d1b19; color: #d9d3c9; font-size: .65rem; }

.card-art, .mini-art {
  position: relative;
  overflow: hidden;
  background: radial-gradient(circle at 50% 35%, #ddd2b5 0 3%, #504e58 4% 10%, #17151f 11% 44%, #08080b 45%);
}

.card-art { height: 48%; border: 3px solid #35302c; border-top: 0; }
.moon { position: absolute; width: 80px; height: 80px; left: calc(50% - 40px); top: 18%; border: 2px solid #b9ad8d; border-radius: 50%; box-shadow: 0 0 40px #d4c69888; }
.hand { position: absolute; left: 44%; bottom: -20px; width: 34px; height: 150px; border-radius: 50% 50% 0 0; background: linear-gradient(90deg, #2e2b34, #817565, #2c2931); transform: rotate(-12deg); }
.hand::before, .hand::after { content: ""; position: absolute; width: 12px; height: 80px; top: -45px; background: #5f574f; border-radius: 50% 50% 0 0; }
.hand::before { left: 0; transform: rotate(-18deg); }.hand::after { right: 0; transform: rotate(18deg); }

.type-line { min-height: 29px; padding-block: 4px; font-size: .82rem; }
.rules-box { height: 26%; padding: 12px; border: 2px solid #474039; border-top: 0; background: #d8d1c4cc; font-family: var(--serif); font-size: .86rem; }
.rules-box p { margin: 0 0 10px; }.rules-box .flavor { padding-top: 10px; border-top: 1px solid #0004; font-style: italic; }
.collector { padding: 5px 3px; font-size: .52rem; font-weight: 800; letter-spacing: .08em; }

.score-stamp {
  position: absolute;
  right: -38px;
  bottom: 13%;
  width: 130px;
  height: 130px;
  display: grid;
  place-content: center;
  text-align: center;
  border: 4px double var(--ink);
  border-radius: 50%;
  background: #f0c45e;
  color: #080706;
  transform: rotate(-12deg);
  box-shadow: 0 5px 0 #0005;
}

.score-stamp strong { font-family: var(--serif); font-size: 2.6rem; line-height: .8; }
.score-stamp span { margin-top: 8px; font-size: .55rem; font-weight: 950; letter-spacing: .12em; }

.game { padding: 44px 0 80px; }
.round-topline { display: flex; justify-content: space-between; align-items: flex-end; }
.round-topline > div:first-child { display: flex; align-items: baseline; gap: 12px; }
.round-topline .eyebrow { margin: 0; }
.round-topline strong { font-family: var(--serif); font-size: 1.2rem; }
.total-score { text-align: right; }.total-score span { display: block; color: var(--muted); font-size: .62rem; letter-spacing: .15em; }.total-score strong { font-size: 1.8rem; }

.timer-meta { margin: 13px 0 7px; display: flex; align-items: baseline; justify-content: space-between; color: var(--muted); font-size: .58rem; font-weight: 850; letter-spacing: .14em; }
.timer-meta strong { color: var(--paper); font-family: var(--serif); font-size: 1rem; letter-spacing: 0; font-variant-numeric: tabular-nums; }
.timer-track { height: 5px; margin: 0 0 50px; background: var(--line); overflow: hidden; }
.timer-bar { width: 100%; height: 100%; background: var(--gold); transform-origin: left; }
.timer-bar.urgent { background: var(--rust); box-shadow: 0 0 12px rgba(200, 79, 47, .45); }

.play-grid { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 80px; }
.prompt-panel { max-width: 790px; }
.prompt-glyph { width: 62px; height: 62px; margin-bottom: 34px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; color: var(--gold); font-size: 2rem; }
.prompt-panel h2, .reveal-copy h2, .results h2 { margin: 0; font-family: var(--serif); font-size: clamp(2.8rem, 6vw, 5.7rem); line-height: .98; font-weight: 500; letter-spacing: -.045em; }
.prompt-hint { margin: 18px 0 40px; color: var(--muted); }

form label { display: block; margin-bottom: 9px; color: var(--paper-2); font-size: .72rem; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; }
.answer-row { display: flex; gap: 10px; }
.input-wrap { position: relative; flex: 1; }
input {
  width: 100%;
  height: 58px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 0;
  outline: 0;
  background: #242019;
  color: var(--paper);
  font-family: var(--serif);
  font-size: 1.08rem;
}
input:focus { border-color: var(--gold); box-shadow: 0 0 0 2px #d9a44322; }
input::placeholder { color: #7e7566; }
.answer-status { min-height: 20px; margin: 10px 0; color: var(--muted); font-size: .78rem; }
.answer-status.error { color: #f08d72; }

.text-button { min-height: 44px; padding: 5px 0; border: 0; border-bottom: 1px solid var(--muted); background: transparent; color: var(--muted); cursor: pointer; font-size: .8rem; }
.text-button:hover { color: var(--paper); border-color: var(--paper); }

.run-strip { padding-left: 28px; border-left: 1px solid var(--line); }
.run-strip ol { margin: 0; padding: 0; list-style: none; }
.run-strip li { min-height: 67px; padding: 14px 0; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 28px 1fr auto; align-items: center; gap: 10px; }
.run-strip li .num { color: var(--muted); font-family: var(--serif); }
.run-strip li .answer-name { font-size: .82rem; font-weight: 750; }.run-strip li .answer-name small { display: block; margin-top: 4px; color: var(--muted); font-size: .68rem; font-weight: 500; }
.run-strip li .answer-points { color: var(--gold); font-family: var(--serif); font-size: 1.1rem; }
.run-strip li.pending { color: #625a4e; }

.reveal { padding: 70px 0 90px; display: grid; place-items: center; }
.reveal-grid { width: 100%; display: grid; grid-template-columns: minmax(280px, 440px) minmax(0, 1fr); align-items: center; gap: clamp(50px, 9vw, 130px); }
.mini-card { max-width: 400px; padding: 15px; border: 8px solid #080807; border-radius: 20px; background: linear-gradient(140deg, #b7ada0, #e6dfd4 40%, #968c7d); color: var(--ink); box-shadow: 0 30px 70px #0008; transform: rotate(-1.5deg); }
.mini-art { aspect-ratio: 1 / 1.08; border: 3px solid #35302c; }
.art-land { background: radial-gradient(circle at 60% 35%, #f2db89 0 3%, #c07336 4% 12%, transparent 13%), linear-gradient(160deg, #2b4051 0 40%, #90663e 41% 51%, #263525 52%); }
.art-creature { background: radial-gradient(ellipse at 50% 58%, #19242e 0 18%, transparent 19%), linear-gradient(160deg, #526276 0 45%, #bfaa7e 46% 60%, #453b32 61%); }
.art-treasure { background: radial-gradient(circle at 48% 48%, #f2d477 0 8%, #9e5d21 9% 21%, transparent 22%), linear-gradient(145deg, #4f281d, #121e22 50%, #936c31); }
.art-fire { background: radial-gradient(ellipse at 52% 65%, #f5c74f 0 10%, #d34f27 11% 30%, transparent 31%), linear-gradient(#241928, #6e271e 55%, #191414); }
.art-artist { background: radial-gradient(circle at 30% 30%, #d9d7a5 0 8%, transparent 9%), linear-gradient(145deg, #98b6b0, #506861 45%, #463d52 46% 70%, #8c785d); }
.mini-art::after { content: ""; position: absolute; inset: 12%; border: 1px solid #fff5; border-radius: 50% 44% 52% 45%; transform: rotate(20deg); }
.mini-card-body { padding: 16px 5px 8px; font-family: var(--serif); }.mini-card-body strong { display: block; font-size: 1.35rem; }.mini-card-body span { color: #5a5146; font-size: .8rem; }
.verdict { margin-bottom: 8px; }
.big-score { display: flex; align-items: baseline; gap: 10px; color: var(--gold); font-family: var(--serif); }
.big-score span { font-size: clamp(4rem, 9vw, 7.8rem); line-height: .85; letter-spacing: -.05em; }.big-score small { font-family: var(--sans); font-weight: 900; letter-spacing: .16em; }
.reveal-rank { width: fit-content; margin: 14px 0 0; padding: 7px 10px; border: 1px solid var(--line); color: var(--paper-2); font-size: .68rem; font-weight: 850; letter-spacing: .07em; text-transform: uppercase; }
.reveal-copy h2 { margin: 20px 0 12px; font-size: clamp(2.5rem, 5vw, 4.8rem); }
.reveal-detail { color: var(--paper-2); font-family: var(--serif); font-size: 1.15rem; }
.depth-meter { margin: 34px 0 18px; }.meter-labels { display: grid; grid-template-columns: 1fr 1fr 1fr; color: var(--muted); font-size: .68rem; }.meter-labels strong { color: var(--paper); text-align: center; }.meter-labels span:last-child { text-align: right; }
.meter-rail { position: relative; height: 8px; margin-top: 9px; background: linear-gradient(90deg, #726f61, var(--gold), var(--rust)); }.meter-rail span { position: absolute; top: -5px; left: 70%; width: 4px; height: 18px; background: #fff; box-shadow: 0 0 0 2px var(--ink); transition: left .4s ease; }
.simulation-note { max-width: 570px; margin: 0 0 28px; color: var(--muted); font-size: .72rem; line-height: 1.5; }

.results { padding: 68px 0 90px; text-align: center; }
.results h2 { font-size: clamp(3rem, 6vw, 5rem); }.results .lede { margin-inline: auto; }.final-score { color: var(--gold); font-family: var(--serif); }.final-score span { font-size: clamp(5rem, 12vw, 10rem); line-height: .9; letter-spacing: -.06em; }.final-score small { color: var(--muted); font-size: 1rem; }
.data-note { margin: -18px 0 0; color: var(--muted); font-size: .68rem; }
.result-cards { margin: 45px auto; display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
.result-card { min-height: 184px; border: 1px solid var(--line); background: #201c16; text-align: left; transition: border-color .18s ease, background .18s ease, transform .18s ease; }
.result-card:hover { border-color: rgba(217, 164, 67, .55); transform: translateY(-2px); }
.result-card.selected { border-color: var(--gold); background: #292218; }
.result-card-toggle { width: 100%; min-height: 182px; padding: 17px 14px; display: flex; flex-direction: column; justify-content: space-between; gap: 7px; border: 0; background: transparent; color: inherit; cursor: pointer; text-align: left; }
.result-card-toggle:focus-visible { outline: 2px solid var(--gold); outline-offset: -4px; }
.result-card-topline { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.result-card .prompt-no { color: #f08d72; font-size: .62rem; font-weight: 900; letter-spacing: .12em; }
.result-card-cue { color: var(--muted); font-size: .58rem; font-weight: 900; letter-spacing: .08em; line-height: 1; text-transform: uppercase; }
.result-card.selected .result-card-cue { color: var(--gold); }
.result-card-prompt { min-height: 30px; color: var(--muted); font-size: .64rem; line-height: 1.4; }
.result-card strong { margin-block: auto; font-family: var(--serif); font-size: 1.05rem; line-height: 1.12; }
.result-card-bottom { display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; }
.result-card .points { color: var(--gold); font-family: var(--serif); font-size: 1.45rem; line-height: 1; }
.result-rank { color: var(--muted); font-size: .58rem; font-weight: 800; letter-spacing: .05em; }
.result-card.skipped { opacity: .62; }

.answer-explorer { margin: -24px auto 45px; border: 1px solid rgba(217, 164, 67, .52); background: #15120e; box-shadow: 0 24px 70px #0006; text-align: left; animation: explorer-enter .25s ease both; }
@keyframes explorer-enter { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }
.answer-explorer-head { padding: 26px 28px 22px; display: flex; align-items: flex-start; justify-content: space-between; gap: 28px; border-bottom: 1px solid var(--line); background: linear-gradient(110deg, rgba(200, 79, 47, .12), transparent 55%); }
.answer-explorer-head .eyebrow { margin-bottom: 9px; }
.answer-explorer h3 { margin: 0; font-family: var(--serif); font-size: clamp(1.5rem, 3vw, 2.5rem); font-weight: 500; letter-spacing: -.025em; }
.answer-explorer-hint { margin: 9px 0 0; color: var(--muted); font-size: .78rem; }
.answer-explorer-close { width: 38px; height: 38px; flex: 0 0 auto; border: 1px solid var(--line); background: #201c16; color: var(--paper); cursor: pointer; font-size: 1.5rem; line-height: 1; }
.answer-explorer-close:hover, .answer-explorer-close:focus-visible { border-color: var(--gold); color: var(--gold); }
.answer-search-label { display: block; margin: 24px 28px 8px; color: var(--paper-2); font-size: .68rem; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; }
.answer-search { width: calc(100% - 56px); height: 48px; margin: 0 28px; background: #211c16; font-family: var(--sans); font-size: .9rem; }
.answer-list-status { margin: 10px 28px 15px; color: var(--muted); font-size: .7rem; }
.answer-list { max-height: min(56vh, 560px); margin: 0; padding: 0 28px 24px; overflow-y: auto; overscroll-behavior: contain; list-style: none; scrollbar-color: var(--rust) #211c16; }
.answer-list-row { min-height: 76px; display: grid; grid-template-columns: 50px minmax(0, 1fr) 125px 80px; align-items: center; gap: 16px; border-top: 1px solid var(--line); }
.answer-list-row.player-answer { margin-inline: -10px; padding-inline: 10px; border-color: rgba(217, 164, 67, .55); background: linear-gradient(90deg, rgba(217, 164, 67, .13), transparent 70%); }
.answer-rank { color: var(--muted); font-family: var(--serif); font-size: 1.05rem; }
.answer-identity { min-width: 0; }
.answer-identity strong { display: block; overflow: hidden; font-family: var(--serif); font-size: 1rem; text-overflow: ellipsis; white-space: nowrap; }
.answer-identity small { display: block; margin-top: 5px; overflow: hidden; color: var(--muted); font-size: .7rem; text-overflow: ellipsis; white-space: nowrap; }
.answer-depth { color: var(--paper-2); font-size: .68rem; font-weight: 800; letter-spacing: .07em; text-align: right; text-transform: uppercase; }
.answer-depth small { display: block; margin-top: 5px; color: var(--gold); font-size: .56rem; }
.answer-list-score { color: var(--gold); font-family: var(--serif); font-size: 1.35rem; text-align: right; }
.answer-list-score small { margin-left: 4px; color: var(--muted); font-family: var(--sans); font-size: .5rem; font-weight: 900; letter-spacing: .09em; }
.answer-list-empty { padding: 34px 0 42px; border-top: 1px solid var(--line); color: var(--muted); font-family: var(--serif); text-align: center; }
.share-box { max-width: 650px; margin: auto; padding: 20px 24px; display: flex; align-items: center; justify-content: space-between; gap: 24px; border: 1px solid var(--line); background: #201c16; text-align: left; }.share-box p { margin: 5px 0 0; color: var(--gold); letter-spacing: .2em; }.secondary-button { padding: 12px 18px; border: 1px solid var(--paper); background: transparent; }.secondary-button:hover { background: var(--paper); color: var(--ink); }.replay { margin-top: 28px; }

footer { min-height: 82px; padding: 20px 0; display: flex; align-items: center; justify-content: space-between; gap: 20px; border-top: 1px solid var(--line); color: var(--muted); font-size: .68rem; }

@media (max-width: 820px) {
  .masthead, main, footer { width: min(100% - 28px, 680px); }
  .masthead { height: 72px; }
  .landing { grid-template-columns: 1fr; padding-top: 54px; }
  .hero-card { width: 300px; margin-top: 10px; }
  .score-stamp { right: -20px; width: 105px; height: 105px; }.score-stamp strong { font-size: 2rem; }
  .play-grid { grid-template-columns: 1fr; gap: 44px; }.run-strip { padding: 24px 0 0; border-left: 0; border-top: 1px solid var(--line); }.run-strip ol { display: grid; grid-template-columns: repeat(5, 1fr); gap: 5px; }.run-strip li { display: block; min-height: 70px; padding: 8px 4px; border: 1px solid var(--line); text-align: center; }.run-strip .answer-name small, .run-strip .answer-points { display: none; }
  .reveal-grid { grid-template-columns: 1fr; }.mini-card { width: min(280px, 80vw); margin: auto; }.reveal-copy { text-align: center; }.reveal-rank { margin-inline: auto; }.simulation-note { margin-inline: auto; }.reveal-copy .primary-button { margin-inline: auto; }
  .result-cards { grid-template-columns: 1fr 1fr; }.result-card:last-child { grid-column: 1 / -1; }
  .answer-list-row { grid-template-columns: 42px minmax(0, 1fr) 100px 66px; gap: 10px; }
}

@media (max-width: 520px) {
  h1 { font-size: clamp(3.15rem, 16vw, 5rem); }
  .landing { padding: 44px 0 70px; }
  .hero-card { width: 255px; }.card-shell { padding: 12px; border-width: 8px; }.rules-box { font-size: .68rem; }
  .game { padding-top: 18px; }.timer-track { margin-bottom: 24px; }.prompt-glyph { display: none; }.prompt-panel .kicker { margin-bottom: 10px; }.prompt-panel h2 { font-size: clamp(2.15rem, 11vw, 2.65rem); }.prompt-hint { margin: 12px 0 22px; line-height: 1.4; }.answer-row { display: block; }.answer-row .primary-button { width: 100%; margin-top: 9px; }.input-wrap { width: 100%; }
  .run-strip ol { grid-template-columns: repeat(5, 1fr); }.run-strip li .answer-name { font-size: .62rem; overflow: hidden; text-overflow: ellipsis; }
  .results { padding-top: 48px; }.data-note { margin-top: -8px; line-height: 1.5; }.result-cards { grid-template-columns: 1fr; }.result-card:last-child { grid-column: auto; }.result-card, .result-card-toggle { min-height: 142px; }.result-card-prompt { min-height: 0; }.result-card strong { margin-block: 5px; }
  .answer-explorer { margin-top: -26px; }
  .answer-explorer-head { padding: 20px 18px 18px; gap: 14px; }
  .answer-search-label { margin: 20px 18px 8px; }
  .answer-search { width: calc(100% - 36px); margin-inline: 18px; }
  .answer-list-status { margin-inline: 18px; }
  .answer-list { max-height: 430px; padding-inline: 18px; }
  .answer-list-row { min-height: 86px; grid-template-columns: 34px minmax(0, 1fr) 62px; gap: 8px; }
  .answer-depth { display: none; }
  .answer-list-score { font-size: 1.15rem; }
  .share-box { align-items: stretch; flex-direction: column; text-align: center; }
  footer { align-items: flex-start; flex-direction: column; justify-content: center; }
}

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

/* Production interaction layer */
.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 100;
  padding: 10px 14px;
  background: var(--paper);
  color: var(--ink);
  transform: translateY(-140%);
}
.skip-link:focus { transform: translateY(0); }

.brand { padding: 0; border: 0; background: transparent; cursor: pointer; font: inherit; }
.edition { display: flex; gap: .45rem; align-items: baseline; }
.edition strong { color: var(--paper); font-size: .7rem; }
.challenge-date { margin: -18px 0 28px; color: var(--gold); font-size: .76rem; font-weight: 800; letter-spacing: .06em; }
.how-it-works { max-width: 610px; margin-top: 28px; color: var(--muted); font-size: .78rem; line-height: 1.55; }
.how-it-works summary { width: fit-content; color: var(--paper-2); cursor: pointer; font-weight: 800; }
.how-it-works p { margin-bottom: 0; }

:where(button, input, summary, textarea):focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
}
.answer-row input { flex: 1 1 auto; min-width: 0; width: auto; }
.timer-track.urgent { outline: 1px solid rgba(240, 141, 114, .65); outline-offset: 3px; }

.card-image-frame {
  position: relative;
  overflow: hidden;
  border: 8px solid #090806;
  border-radius: 4.9% / 3.5%;
  background: #242019;
  box-shadow: 0 28px 70px #0008;
  aspect-ratio: 488 / 680;
}
.card-image-frame > img { width: 100%; height: 100%; display: block; object-fit: cover; }
.reveal-image-frame { width: min(100%, 420px); margin: 0; overflow: visible; transform: rotate(-1deg); }
.reveal-image-frame figcaption {
  position: absolute;
  right: 8px;
  bottom: 8px;
  left: 8px;
  padding: 13px 14px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  background: rgba(12, 10, 8, .94);
  color: var(--paper);
  font-size: .72rem;
  transform: translateY(calc(100% + 22px));
}
.reveal-image-frame figcaption strong { overflow: hidden; font-family: var(--serif); font-size: 1rem; text-overflow: ellipsis; white-space: nowrap; }
.reveal-image-frame figcaption span { flex: 0 0 auto; color: var(--muted); }
.image-skeleton { position: absolute; inset: 0; background: linear-gradient(100deg, #211d17 30%, #302a21 45%, #211d17 60%); background-size: 250% 100%; animation: shimmer 1.25s linear infinite; }
@keyframes shimmer { to { background-position-x: -250%; } }
.image-fallback { position: absolute; inset: 0; padding: 26px; display: grid; place-content: center; gap: 10px; background: radial-gradient(circle at 50% 35%, #4b4439, #17140f 62%); color: var(--paper-2); font-family: var(--serif); text-align: center; }
.image-fallback strong { font-size: 1.4rem; }
.face-toggle { position: absolute; right: 10px; bottom: -68px; min-height: 44px; padding: 8px 13px; border: 1px solid var(--line); background: var(--ink); color: var(--paper); cursor: pointer; }

.result-card { position: relative; }
.view-card-button { min-height: 44px; margin: 0 14px 14px; padding: 7px 10px; border: 1px solid var(--line); background: transparent; color: var(--paper-2); cursor: pointer; font-size: .72rem; font-weight: 800; }
@media (hover: hover) and (pointer: fine) { .view-card-button { display: none; } }
.result-card:has(.view-card-button) .result-card-toggle { min-height: 146px; }

.card-preview {
  position: fixed;
  z-index: 50;
  width: 250px;
  padding: 8px;
  border: 1px solid rgba(217, 164, 67, .7);
  background: #100e0b;
  box-shadow: 0 24px 80px #000c;
}
.card-preview .card-image-frame { width: 100%; border-width: 4px; box-shadow: none; }
.card-preview > strong { display: block; padding: 9px 6px 3px; font-family: var(--serif); font-size: .92rem; }

.modal-open { overflow: hidden; }
.modal-backdrop { position: fixed; inset: 0; z-index: 80; padding: 18px; display: grid; place-items: center; overflow-y: auto; background: rgba(8, 7, 5, .86); backdrop-filter: blur(6px); }
.modal-sheet { position: relative; width: min(410px, 100%); padding: 22px; border: 1px solid rgba(217, 164, 67, .65); background: #17140f; box-shadow: 0 28px 100px #000; text-align: center; }
.modal-sheet .card-image-frame { width: min(100%, 330px); margin: 14px auto; border-width: 5px; box-shadow: none; }
.modal-sheet h3 { margin: 18px 36px 6px; font-family: var(--serif); font-size: 1.5rem; }
.modal-sheet p { color: var(--muted); }
.icon-button { width: 44px; height: 44px; border: 1px solid var(--line); background: #201c16; color: var(--paper); cursor: pointer; font-size: 1.55rem; line-height: 1; }
.icon-button:hover { border-color: var(--gold); color: var(--gold); }
.modal-close { position: absolute; top: 10px; right: 10px; z-index: 2; }
.share-fallback-sheet { width: min(560px, 100%); text-align: left; }
.share-fallback-sheet textarea { width: 100%; padding: 14px; border: 1px solid var(--line); background: #242019; color: var(--paper); font: .85rem/1.55 var(--sans); resize: vertical; }
.share-fallback-sheet .primary-button { margin-top: 16px; }

.load-more { display: block; margin: -8px auto 24px; cursor: pointer; }
.next-countdown { margin: 22px 0 0; color: var(--muted); font-variant-numeric: tabular-nums; font-size: .76rem; font-weight: 800; letter-spacing: .08em; }

@media (max-width: 820px) {
  .reveal-image-frame { width: min(300px, 82vw); margin: 0 auto 58px; }
  .card-preview { display: none; }
}

@media (max-width: 520px) {
  .edition { max-width: 48%; justify-content: flex-end; flex-wrap: wrap; line-height: 1; text-align: right; }
  .edition strong { font-size: .58rem; }
  .answer-row input { width: 100%; }
  .view-card-button { width: calc(100% - 28px); }
  .result-card:has(.view-card-button) .result-card-toggle { min-height: 128px; }
  .reveal-image-frame figcaption { align-items: flex-start; flex-direction: column; }
  .modal-backdrop { padding: 10px; align-items: end; }
  .modal-sheet { max-height: 96vh; overflow-y: auto; }
}

@media (prefers-contrast: more) {
  :root { --muted: #c0b6a4; --line: rgba(255, 255, 255, .42); }
  .result-card, .answer-explorer, input, textarea { border-width: 2px; }
}
