.play-page { min-height: 100svh; font-family: var(--font-body); background: radial-gradient(circle at 50% -20%, rgba(254,199,45,.1), transparent 42%), var(--bg); }
.play-page p, .play-page h1, .play-page h2, .play-page legend { text-wrap: pretty; }
.play-header { position: relative; z-index: 10; border-bottom: 1px solid var(--border); background: rgba(9,8,6,.9); backdrop-filter: blur(18px); }
.play-header__inner { min-height: 74px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 18px; }
.play-back { display: inline-flex; align-items: center; gap: 10px; width: max-content; color: var(--muted); font-size: .94rem; font-weight: 700; }
.play-back:hover { color: var(--text); gap: 14px; }
.play-brand { justify-self: center; }
.play-header__actions { justify-self: end; display: flex; align-items: center; gap: 10px; }
.beta-pill, .profile-button { display: inline-flex; align-items: center; gap: 8px; min-height: 38px; padding: 0 14px; border: 1px solid var(--border); border-radius: 999px; color: var(--muted); background: var(--surface); font-size: .78rem; font-weight: 800; letter-spacing: .015em; }
.beta-pill i { width: 6px; height: 6px; border-radius: 50%; background: var(--green); box-shadow: 0 0 12px var(--green); }
.profile-button:hover { color: var(--text); border-color: var(--border-strong); }

.play-main { position: relative; min-height: calc(100svh - 74px); display: grid; align-items: center; padding-block: 54px; }
.play-ambient { position: fixed; z-index: -1; width: 560px; height: 560px; left: 50%; top: 30%; transform: translate(-50%, -50%); border-radius: 50%; background: rgba(254,199,45,.045); filter: blur(90px); pointer-events: none; }
.play-panel { border: 1px solid var(--border-strong); border-radius: var(--radius-xl); background: linear-gradient(155deg, rgba(27,23,16,.96), rgba(13,12,9,.98)); box-shadow: var(--shadow), inset 0 1px rgba(255,255,255,.05); }

.auth-panel { width: min(930px, 100%); margin-inline: auto; display: grid; grid-template-columns: .92fr 1.08fr; overflow: hidden; }
.auth-panel__brand { display: flex; flex-direction: column; justify-content: center; padding: clamp(32px, 6vw, 68px); background: radial-gradient(circle at 0 0, rgba(254,199,45,.16), transparent 44%); border-right: 1px solid var(--border); }
.auth-panel__brand img { width: min(260px, 86%); margin-bottom: 42px; }
.auth-panel__brand h1, .result-summary h1 { margin-top: 15px; font-family: var(--font-display); font-size: clamp(2.2rem, 5vw, 4rem); line-height: .98; letter-spacing: -.045em; text-transform: uppercase; text-wrap: balance; }
.auth-panel__brand > p:last-child { margin-top: 22px; color: var(--muted); font-size: .98rem; line-height: 1.65; }
.auth-form { display: grid; align-content: center; gap: 18px; padding: clamp(30px, 5vw, 56px); }
.field { display: grid; gap: 9px; color: var(--text); font-size: .9rem; font-weight: 800; }
.field span { display: flex; justify-content: space-between; align-items: baseline; }
.field em { color: var(--faint); font-size: .76rem; font-style: normal; font-weight: 650; }
.field input { width: 100%; min-height: 54px; padding: 0 16px; border: 1px solid var(--border); border-radius: 12px; outline: 0; color: var(--text); background: rgba(0,0,0,.28); font-size: 1rem; }
.field input:hover { border-color: var(--border-strong); }
.field input:focus { border-color: var(--gold); box-shadow: 0 0 0 4px rgba(254,199,45,.09); }
.field input:user-invalid { border-color: rgba(240,90,79,.7); }
.field small { color: var(--faint); font-size: .74rem; font-weight: 650; letter-spacing: .045em; }
.auth-submit { width: 100%; margin-top: 4px; border: 0; }
.auth-submit:disabled { opacity: .55; cursor: wait; transform: none; }
.auth-privacy { display: flex; gap: 10px; color: var(--muted); font-size: .82rem; line-height: 1.55; }
.auth-privacy > span:first-child { color: var(--gold); }
.auth-data-note { display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 12px; padding: 15px; border: 1px solid rgba(166,224,34,.2); border-radius: 13px; background: linear-gradient(135deg, rgba(166,224,34,.075), rgba(254,199,45,.035)); }
.auth-data-note__icon { width: 32px; height: 32px; display: grid; place-items: center; border: 1px solid rgba(166,224,34,.32); border-radius: 50%; color: var(--green); background: rgba(166,224,34,.07); font-size: .84rem; font-weight: 900; }
.auth-data-note strong { display: block; color: var(--text); font-size: .83rem; font-weight: 850; }
.auth-data-note p { margin-top: 5px; color: var(--muted); font-size: .77rem; line-height: 1.5; }
.auth-agreement { display: grid; grid-template-columns: 20px minmax(0, 1fr); align-items: start; gap: 10px; color: var(--muted); font-size: .77rem; line-height: 1.55; cursor: pointer; }
.auth-agreement input { width: 18px; height: 18px; margin-top: 1px; accent-color: var(--gold); cursor: pointer; }
.auth-agreement input:focus-visible { outline: 3px solid rgba(254,199,45,.3); outline-offset: 3px; }
.auth-agreement a { color: var(--gold); text-decoration: underline; text-decoration-color: rgba(254,199,45,.4); text-underline-offset: 3px; }
.auth-agreement a:hover { text-decoration-color: currentColor; }
.form-error { padding: 12px 14px; border: 1px solid rgba(240,90,79,.35); border-radius: 10px; color: #ff8f86; background: rgba(240,90,79,.07); font-size: .86rem; line-height: 1.45; }

.game-layout { width: min(1000px, 100%); margin-inline: auto; display: grid; grid-template-columns: minmax(0, 1fr) 220px; align-items: stretch; gap: 18px; }
.game-stage { padding: clamp(25px, 5vw, 48px); }
.game-stage__top { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; }
.round-state { display: flex; align-items: center; gap: 9px; color: var(--gold); font-size: .78rem; font-weight: 850; letter-spacing: .105em; text-transform: uppercase; }
.round-state i { width: 8px; height: 8px; border-radius: 50%; background: var(--faint); }
.round-state.is-live i { background: var(--green); box-shadow: 0 0 15px rgba(166,224,34,.8); }
.player-name { margin-top: 9px; color: var(--muted); font-size: .95rem; line-height: 1.4; }
.player-name strong { color: var(--text); font-weight: 800; }
.score-box { display: grid; justify-items: end; }
.score-box span { color: var(--muted); font-size: .76rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.score-box strong { color: var(--gold); font-size: 2.15rem; font-weight: 850; line-height: 1.08; font-variant-numeric: tabular-nums; }
.round-clock { margin: 32px auto 26px; text-align: center; }
.round-clock span { display: block; color: var(--muted); font-size: .82rem; font-weight: 800; text-transform: uppercase; letter-spacing: .115em; }
.round-clock strong { display: block; margin-top: 5px; font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace; font-size: clamp(3.2rem, 8vw, 5.8rem); font-weight: 850; font-variant-numeric: tabular-nums; line-height: 1; letter-spacing: -.085em; }
.round-clock.is-urgent strong { color: var(--red); }
.prices { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.prices > div { min-width: 0; min-height: 112px; display: grid; align-content: center; justify-items: center; gap: 9px; padding: 22px 16px; border: 2px solid rgba(254,199,45,.22); border-radius: 16px; background: linear-gradient(150deg, rgba(254,199,45,.075), rgba(0,0,0,.28)); box-shadow: inset 0 1px rgba(255,255,255,.035), 0 14px 30px rgba(0,0,0,.12); }
.prices span { color: #c4bdad; font-size: .84rem; font-weight: 850; text-transform: uppercase; letter-spacing: .075em; }
.prices strong { max-width: 100%; overflow: hidden; color: var(--text); font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace; font-size: clamp(1.3rem, 3.3vw, 1.7rem); font-weight: 850; font-variant-numeric: tabular-nums; letter-spacing: -.025em; text-overflow: ellipsis; }
.prediction { margin-top: 34px; border: 0; }
.prediction legend { width: 100%; margin-bottom: 23px; text-align: center; font-size: 1.18rem; font-weight: 850; line-height: 1.4; }
.prediction__buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.prediction-button { min-height: 138px; display: grid; grid-template-columns: auto auto; grid-template-rows: 1fr 1fr; place-content: center; align-items: center; gap: 0 13px; border: 2px solid; border-radius: 19px; box-shadow: inset 0 1px rgba(255,255,255,.045), 0 15px 34px rgba(0,0,0,.16); }
.prediction-button > span { grid-row: 1 / 3; font-size: 3.05rem; font-weight: 800; }
.prediction-button strong { align-self: end; font-size: 1.42rem; font-weight: 900; letter-spacing: .04em; }
.prediction-button small { align-self: start; opacity: .92; font-size: .94rem; font-weight: 800; }
.prediction-button--up { color: #aeea20; background: linear-gradient(145deg, rgba(166,224,34,.13), rgba(166,224,34,.055)); border-color: rgba(166,224,34,.46); }
.prediction-button--down { color: #ff5d52; background: linear-gradient(145deg, rgba(240,90,79,.14), rgba(240,90,79,.055)); border-color: rgba(240,90,79,.46); }
.prediction-button:hover:not(:disabled) { transform: translateY(-3px); filter: brightness(1.15); }
.prediction-button.is-selected { box-shadow: 0 0 0 2px currentColor, 0 12px 38px rgba(0,0,0,.35); }
.prediction:disabled .prediction-button { opacity: .44; cursor: not-allowed; }
.game-status { min-height: 25px; margin-top: 19px; color: var(--muted); text-align: center; font-size: .9rem; font-weight: 650; line-height: 1.45; }
.game-status.is-error { color: #ff8f86; }
.game-aside { display: grid; gap: 12px; }
.aside-card { display: flex; flex-direction: column; justify-content: space-between; min-height: 130px; padding: 18px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); }
.aside-card__icon { width: max-content; color: var(--gold); font-family: ui-monospace, monospace; font-size: .78rem; font-weight: 850; }
.aside-card p { color: var(--muted); font-size: .86rem; font-weight: 600; line-height: 1.55; }
.aside-card--privacy { border-color: rgba(166,224,34,.19); }

.results-panel { width: min(1000px, 100%); margin-inline: auto; display: grid; grid-template-columns: .8fr 1.2fr; overflow: hidden; }
.result-summary { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; padding: clamp(30px, 5vw, 54px); border-right: 1px solid var(--border); background: radial-gradient(circle at 0 0, rgba(254,199,45,.12), transparent 45%); }
.result-icon { width: 58px; height: 58px; display: grid; place-items: center; margin: 28px 0 10px; border: 1px solid currentColor; border-radius: 50%; color: var(--green); font-size: 1.7rem; }
.result-summary.is-loss .result-icon { color: var(--red); }
.result-summary.is-neutral .result-icon { color: var(--gold); }
.result-summary > p:not(.eyebrow) { margin-top: 17px; color: var(--muted); font-size: .96rem; line-height: 1.65; }
.result-points { display: flex; align-items: baseline; gap: 14px; margin-top: 28px; color: var(--muted); font-size: .8rem; font-weight: 800; text-transform: uppercase; letter-spacing: .075em; }
.result-points strong { color: var(--gold); font-size: 2.3rem; font-weight: 850; font-variant-numeric: tabular-nums; }
.result-summary .button { margin-top: 26px; border: 0; }
.leaderboard-card { padding: clamp(28px, 5vw, 48px); }
.leaderboard-card__heading { display: flex; justify-content: space-between; align-items: baseline; gap: 20px; margin-bottom: 24px; }
.leaderboard-card__heading h2 { font-size: 1.65rem; font-weight: 850; letter-spacing: -.025em; }
.leaderboard-list { display: grid; gap: 8px; list-style: none; counter-reset: leaderboard; }
.leaderboard-list li { counter-increment: leaderboard; display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; align-items: center; gap: 11px; min-height: 56px; padding: 9px 14px; border: 1px solid transparent; border-radius: 12px; background: rgba(255,255,255,.025); }
.leaderboard-list li::before { content: counter(leaderboard, decimal-leading-zero); color: var(--faint); font-family: ui-monospace, monospace; font-size: .78rem; font-weight: 750; }
.leaderboard-list li.is-current { border-color: var(--border-strong); background: rgba(254,199,45,.07); }
.leaderboard-login { overflow: hidden; font-size: .96rem; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.leaderboard-points { color: var(--gold); font-family: ui-monospace, monospace; font-size: .9rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.leaderboard-empty { display: block !important; color: var(--faint); text-align: center; }
.leaderboard-empty::before { content: none !important; }

.profile-dialog { width: min(430px, calc(100% - 28px)); padding: 0; border: 1px solid var(--border-strong); border-radius: var(--radius-lg); color: var(--text); background: var(--surface); box-shadow: var(--shadow); }
.profile-dialog::backdrop { background: rgba(0,0,0,.72); backdrop-filter: blur(5px); }
.profile-dialog__heading { display: flex; justify-content: space-between; align-items: center; padding: 22px 24px; border-bottom: 1px solid var(--border); }
.profile-dialog__heading h2 { font-size: 1.15rem; }
.profile-dialog__heading button { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; color: var(--muted); background: rgba(255,255,255,.04); font-size: 1.25rem; }
.profile-login { padding: 22px 24px; color: var(--muted); font-size: .86rem; }
.profile-login strong { color: var(--text); }
.account-action { width: calc(100% - 48px); min-height: 46px; margin: 0 24px 10px; padding: 0 14px; border: 1px solid var(--border); border-radius: 10px; color: var(--text); text-align: left; }
.account-action:hover { border-color: var(--border-strong); background: rgba(255,255,255,.03); }
.account-action--danger { margin-bottom: 24px; color: #ff8f86; border-color: rgba(240,90,79,.25); }
.delete-confirmation { margin: 0 24px 24px; padding: 16px; border: 1px solid rgba(240,90,79,.3); border-radius: 12px; background: rgba(240,90,79,.06); }
.delete-confirmation p { color: #eeb2ad; font-size: .78rem; }
.delete-confirmation > div { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 14px; }
.danger-button, .quiet-button { min-height: 38px; padding: 0 12px; border-radius: 8px; font-size: .76rem; font-weight: 750; }
.danger-button { color: #1b0806; background: var(--red); }
.quiet-button { color: var(--muted); border: 1px solid var(--border); }

.play-legal-footer { border-top: 1px solid var(--border); background: rgba(9,8,6,.88); }
.play-legal-footer__inner { min-height: 108px; display: flex; align-items: center; justify-content: space-between; gap: 28px; padding-block: 24px; }
.play-legal-footer p { max-width: 580px; color: var(--faint); font-size: .76rem; line-height: 1.55; }
.play-legal-footer p strong { display: block; margin-bottom: 4px; color: var(--muted); font-size: .72rem; letter-spacing: .09em; text-transform: uppercase; }
.play-legal-footer nav { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 12px 20px; }
.play-legal-footer a { color: var(--muted); font-size: .76rem; font-weight: 700; }
.play-legal-footer a:hover { color: var(--gold); }

[hidden] { display: none !important; }

@media (max-width: 820px) {
  .play-header__inner { grid-template-columns: 1fr auto; }
  .play-brand { display: none; }
  .beta-pill { display: none; }
  .auth-panel, .results-panel { grid-template-columns: 1fr; }
  .auth-panel__brand, .result-summary { border-right: 0; border-bottom: 1px solid var(--border); }
  .auth-panel__brand img { width: 190px; margin-bottom: 28px; }
  .game-layout { grid-template-columns: 1fr; }
  .game-aside { grid-template-columns: repeat(3, 1fr); }
  .aside-card { min-height: 110px; }
}

@media (max-width: 560px) {
  .play-header__inner { min-height: 64px; }
  .play-back span:last-child { display: none; }
  .profile-button { padding-inline: 10px; }
  .play-main { min-height: calc(100svh - 64px); padding-block: 24px; }
  .auth-panel__brand { padding: 30px 24px; }
  .auth-panel__brand img { width: 160px; }
  .auth-panel__brand h1 { font-size: 2.4rem; }
  .auth-form { padding: 26px 22px; }
  .game-stage { padding: 24px 18px; }
  .round-clock { margin-block: 25px 20px; }
  .prices { grid-template-columns: 1fr; }
  .prediction legend { font-size: 1.05rem; }
  .prediction-button { min-height: 112px; }
  .prediction-button > span { font-size: 2.55rem; }
  .prediction-button strong { font-size: 1.2rem; }
  .prediction-button small { font-size: .82rem; }
  .game-aside { grid-template-columns: 1fr; }
  .aside-card { min-height: 95px; }
  .result-summary, .leaderboard-card { padding: 28px 22px; }
  .leaderboard-card__heading { margin-bottom: 20px; }
  .play-legal-footer__inner { align-items: flex-start; flex-direction: column; gap: 16px; }
  .play-legal-footer nav { justify-content: flex-start; }
}
