/* The celebrity lobby: a pink event field (your odds and the counts behind them) beside a navy panel with the inputs.
   Base in ../style.css. */
.stage { display: grid; }
.field { position: relative; overflow: hidden; background: var(--pink); color: var(--ink); padding: 0 var(--pad) 22px; display: flex; flex-direction: column; }
.field > * { position: relative; }
/* One giant pictogram, cropped off the field's edge. Navy, since the field is pink. */
.giant { position: absolute; top: 62px; right: calc(-1 * clamp(28px, 5vw, 80px)); width: clamp(120px, 22vw, 300px); aspect-ratio: 1; color: var(--ink); }
.giant svg { width: 100%; height: 100%; display: block; }
@media (max-width: 899px) { .giant { top: 36px; right: -22vw; width: 64vw; color: rgba(20, 33, 61, 0.14); } }
.field h1 { font-size: clamp(36px, 9vw, 68px); margin: 22px 0 20px; max-width: min(6.5em, calc(100% - clamp(80px, 16vw, 220px))); }

/* Your odds, big, with what they're the odds of. */
.answer .big { font-size: clamp(64px, 9vw, 120px); font-weight: 800; letter-spacing: -0.05em; line-height: 0.85; font-variant-numeric: tabular-nums; white-space: nowrap; }
.answer .line { margin-top: 12px; max-width: 26em; font-size: clamp(17px, 2vw, 21px); font-weight: 700; line-height: 1.3; }

/* Your months: outlined squares, white once played; navy with a white star where a celebrity turns up. */
.run { margin-top: 22px; }
.months { display: grid; grid-template-columns: repeat(var(--cols, 12), minmax(0, 1fr)); gap: clamp(3px, 0.5vw, 6px); max-width: 760px; }
.months i { aspect-ratio: 1; outline: 2px solid rgba(20, 33, 61, 0.35); outline-offset: -2px; display: grid; place-items: center; font: 800 11px var(--font); font-style: normal; color: rgba(20, 33, 61, 0.55); }
.months i.on { background: #fff; outline-color: #fff; color: var(--ink); }
.months i.hit { background: var(--ink); outline-color: var(--ink); color: #fff; animation: pop 0.4s var(--ease) both; }
.months i svg { width: 64%; display: block; }
@keyframes pop { from { transform: scale(1.6); } }
.outcome { margin-top: 14px; font-size: 18px; font-weight: 700; line-height: 1.3; }
.outcome b { font-size: clamp(26px, 5vw, 36px); font-weight: 800; letter-spacing: -0.03em; margin-right: 6px; }
.play { margin-top: 14px; padding: 16px 24px; border: 2px solid var(--ink); border-radius: 0; background: var(--ink); color: #fff; font: 800 14px var(--font); letter-spacing: 0.08em; text-transform: uppercase; cursor: pointer; transition: background 0.15s var(--ease), color 0.15s var(--ease); }
@media (hover: hover) { .play:hover:not(:disabled) { background: #fff; color: var(--ink); } }
.play:active { transform: scale(0.97); }
.play:disabled { opacity: 0.5; cursor: default; }
@media (prefers-reduced-motion: reduce) { .months i.hit { animation: none; } }

.status { display: flex; flex-wrap: wrap; gap: 10px clamp(24px, 5vw, 56px); margin-top: 22px; padding-top: 10px; border-top: 2px solid var(--ink); }
.num { font-size: clamp(30px, 5vw, 48px); font-weight: 800; letter-spacing: -0.03em; line-height: 1; font-variant-numeric: tabular-nums; }

.panel { background: var(--navy); color: #fff; padding: 24px var(--pad) 28px; }
.soft, .ev.soft { color: var(--navy-soft); }
.panel-title { font-size: clamp(28px, 5vw, 38px); letter-spacing: -0.02em; line-height: 1.05; }
.panel .more { display: inline-block; margin-top: 28px; color: #fff; }

.inputs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 10px; margin-top: 20px; max-width: 560px; }
.inputs label { display: grid; gap: 6px; align-content: end; }
.inputs .unit { display: flex; align-items: baseline; gap: 6px; border: 2px solid #fff; padding: 8px 10px; font-size: 14px; color: var(--navy-soft); white-space: nowrap; }
.inputs .unit:focus-within { border-color: var(--orange); }
.inputs input { width: 100%; min-width: 0; border: 0; padding: 0; background: transparent; color: #fff; font: 800 26px var(--font); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; outline: 0; -moz-appearance: textfield; }
.inputs input::-webkit-inner-spin-button, .inputs input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.inputs .unit.over { border-color: var(--orange); }
.limit { margin-top: 10px; max-width: 560px; padding: 8px 10px; background: var(--orange); color: var(--ink); font-size: 15px; font-weight: 700; }
.note { margin-top: 10px; font-size: 14px; max-width: 560px; }

.result { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 22px; padding-top: 10px; border-top: 2px solid rgba(255, 255, 255, 0.3); max-width: 560px; }
.result .val { font-size: clamp(30px, 5vw, 44px); font-weight: 800; letter-spacing: -0.03em; line-height: 1; margin-top: 6px; font-variant-numeric: tabular-nums; }

/* The math: strikes in a row, the month's games, and the expected value; the odds on a green field. */
.math { padding-top: clamp(40px, 7vw, 72px); }
.math h2 { font-size: clamp(36px, 6vw, 64px); padding-bottom: 14px; border-bottom: var(--rule) solid var(--ink); }
.math .therefore { margin-top: clamp(20px, 3vw, 32px); font-size: clamp(18px, 2vw, 22px); max-width: 36em; color: var(--ink-soft); }
.math .ladder { list-style: none; margin: clamp(20px, 3vw, 32px) 0 0; padding: 0; max-width: 900px; }
.math .ladder li { display: grid; grid-template-columns: 7em 10em 1fr; align-items: center; gap: 12px; padding: 7px 0; border-top: 1px solid rgba(20, 33, 61, 0.15); }
.math .ladder b { font-size: clamp(17px, 2vw, 22px); font-weight: 800; text-align: right; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; white-space: nowrap; }
.math .ladder i { display: block; height: 14px; min-width: 2px; background: var(--ink); }
.math .ladder .gap { display: block; text-align: center; color: var(--ink-soft); letter-spacing: 0.3em; border-top: 0; padding: 2px 0; }
.math .ladder .last { border-top: var(--rule) solid var(--ink); }
.math .ladder .last i { background: var(--orange); }
.math .steps-math { margin: clamp(28px, 4vw, 44px) 0 0; padding: 0; list-style: none; counter-reset: s; display: grid; gap: 14px; max-width: 40em; }
.math .steps-math li { counter-increment: s; display: grid; grid-template-columns: 34px 1fr; gap: 12px; font-size: clamp(17px, 1.8vw, 20px); color: var(--ink-soft); }
.math .steps-math li::before { content: counter(s); display: grid; place-items: center; width: 34px; height: 34px; background: var(--ink); color: #fff; font-weight: 800; }
.math .steps-math b { color: var(--ink); }
.math .worked { margin-top: clamp(24px, 4vw, 40px); font-size: clamp(28px, 5.6vw, 72px); font-weight: 800; letter-spacing: -0.03em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.math .worked .hl { background: var(--orange); padding: 0 0.12em; }
.math .odds { margin-top: clamp(32px, 5vw, 56px); background: var(--green); color: #fff; padding: clamp(20px, 4vw, 40px); }
.math .odds h3 { font-size: clamp(24px, 3vw, 34px); letter-spacing: -0.02em; }
.math table { width: 100%; border-collapse: collapse; margin: 18px 0 20px; }
.math th, .math td { padding: 12px 0; border-top: 2px solid rgba(255, 255, 255, 0.5); text-align: left; vertical-align: baseline; }
.math th { font-weight: 700; font-size: 17px; padding-right: 16px; }
.math td { text-align: right; font-size: clamp(24px, 4vw, 44px); font-weight: 800; letter-spacing: -0.03em; white-space: nowrap; font-variant-numeric: tabular-nums; }
.math .odds p { max-width: 40em; color: rgba(255, 255, 255, 0.92); }
.math .source { margin-top: 32px; font-size: 15px; color: var(--ink-soft); max-width: 60em; }

.math .ladder .last b { color: var(--ink); }

@media (min-width: 900px) {
  .stage { grid-template-columns: minmax(0, 1.55fr) minmax(380px, 1fr); min-height: 100svh; }
  .field { padding-bottom: 36px; }
  .field h1 { margin: 30px 0 0; }
  .answer { margin-top: 28px; }
  .run { margin-bottom: auto; }
  .panel { padding-top: 76px; padding-bottom: 36px; display: flex; flex-direction: column; }
  .panel .more { margin-top: auto; padding-top: 28px; align-self: flex-start; }
}
/* Phones mid-run: the title and giant step aside so the months, the result and the button share the screen. */
@media (max-width: 899px) {
  body.playing .field h1, body.playing .giant { display: none; }
  body.playing .answer { margin-top: 18px; }
  .answer .big { font-size: clamp(52px, 15vw, 72px); }
}
@media (max-width: 640px) {
  .inputs input { font-size: 22px; }
  .inputs .unit { font-size: 12px; padding: 8px; }
  .status .num { font-size: 26px; }
  .math .ladder li { grid-template-columns: 5.6em 8.6em 1fr; gap: 8px; }
}
