/* WHO? Sports — game page */
:root {
  --ink: #0a0a0a; --ink-2: #333; --muted: #737373; --faint: #a3a3a3; --line: #ececec;
  --bg: #fafafa; --card: #fff; --neon: #00ff87; --neon-2: #00e676; --neon-soft: #e9fff3; --green-ink: #067a43;
  --red: #e5484d; --red-soft: #fdecec; --radius: 22px;
  --shadow: 0 1px 2px rgba(10,10,10,.04), 0 12px 32px -16px rgba(10,10,10,.18);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 15px/1.5 'Inter', -apple-system, BlinkMacSystemFont, sans-serif; -webkit-font-smoothing: antialiased; }
a { color: inherit; }
button, input { font: inherit; color: inherit; }
[hidden] { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 13px; }

/* top bar */
.top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px; padding: 10px max(16px, env(safe-area-inset-left)); background: rgba(255,255,255,.86); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid var(--line); }
.logo img { height: 34px; width: auto; display: block; }
.sport-btn { display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 12px 0 10px; border-radius: 12px; border: 1px solid var(--line); background: #fff; font-weight: 800; font-size: 14px; cursor: pointer; }
.sport-btn:hover { border-color: #d6d6d6; }
.sport-btn .emoji { font-size: 17px; }
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.icon-btn { width: 38px; height: 38px; display: inline-grid; place-items: center; border-radius: 12px; border: 0; background: none; cursor: pointer; color: var(--ink-2); text-decoration: none; font-size: 15px; }
.icon-btn:hover { background: #f1f1f1; color: var(--ink); }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--ink); color: var(--neon); display: grid; place-items: center; font-weight: 900; font-size: 14px; text-decoration: none; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 42px; padding: 0 18px; border-radius: 13px; border: 1px solid var(--line); background: #fff; font-weight: 800; font-size: 14.5px; cursor: pointer; text-decoration: none; white-space: nowrap; transition: transform .08s, background .15s, box-shadow .15s; }
.btn:hover { background: #f7f7f7; }
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .55; }
.btn-primary { background: linear-gradient(180deg, var(--neon), var(--neon-2)); border-color: transparent; color: var(--ink); box-shadow: 0 6px 18px -8px rgba(0, 200, 110, .7); }
.btn-primary:hover { background: linear-gradient(180deg, #33ffa0, #00d96f); }
.btn-dark { background: var(--ink); color: #fff; border-color: var(--ink); }
.btn-dark:hover { background: #262626; }
.btn-ghost { border-color: transparent; background: none; }
.btn-sm { height: 36px; padding: 0 14px; font-size: 13.5px; border-radius: 11px; }
.btn-lg { height: 52px; padding: 0 22px; font-size: 16px; border-radius: 15px; }
.btn-block { width: 100%; }
.link { background: none; border: 0; padding: 0; font-weight: 700; text-decoration: underline; cursor: pointer; }
:focus-visible { outline: 3px solid rgba(0, 230, 118, .55); outline-offset: 2px; }

/* layout */
.wrap { max-width: 600px; margin: 0 auto; padding: 22px 16px 60px; }
.meta-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.eyebrow { font-size: 11px; font-weight: 800; letter-spacing: .15em; text-transform: uppercase; color: var(--faint); }
.eyebrow .dot { margin: 0 4px; }
.date { font-weight: 800; font-size: 17px; letter-spacing: -.01em; }
.tabs { display: inline-flex; background: #efefef; border-radius: 13px; padding: 3px; }
.tabs button { border: 0; background: none; padding: 7px 13px; border-radius: 10px; font-weight: 800; font-size: 13px; color: var(--muted); cursor: pointer; }
.tabs button.on { background: #fff; color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.1); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }

/* puzzle */
.puzzle { padding: 24px 22px 22px; box-shadow: var(--shadow); position: relative; overflow: hidden; }
.puzzle::before { content: ''; position: absolute; inset: 0 0 auto; height: 4px; background: linear-gradient(90deg, var(--neon), var(--neon-2)); opacity: 0; transition: opacity .3s; }
.puzzle.solved::before { opacity: 1; }
.puzzle-head { display: flex; align-items: center; justify-content: space-between; }
.puzzle h1 { margin: 0; font-size: 30px; font-weight: 900; letter-spacing: -.04em; }
.lead { margin: 4px 0 22px; color: var(--muted); font-weight: 500; }
.lives { display: flex; gap: 7px; }
.lives i { width: 14px; height: 14px; border-radius: 50%; background: var(--ink); transition: background .25s, transform .25s; }
.lives i.lost { background: #e4e4e4; transform: scale(.85); }
.solved .lives i:not(.lost):not(.win) { background: none; box-shadow: inset 0 0 0 2px #e4e4e4; }
.lives i.win { background: var(--neon); box-shadow: 0 0 0 4px var(--neon-soft); }

.clues { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; position: relative; padding-top: 2px; }
.clues::before { content: ''; position: absolute; top: 30px; left: 12.5%; right: 12.5%; height: 3px; background: repeating-linear-gradient(90deg, #dcdcdc 0 6px, transparent 6px 11px); z-index: 0; }
.clue { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 9px; position: relative; z-index: 1; animation: rise .45s cubic-bezier(.2,.8,.2,1) both; animation-delay: calc(var(--i, 0) * 70ms); }
.clue .node { width: 60px; height: 60px; border-radius: 50%; display: grid; place-items: center; background: #f1f1f1; border: 3px solid #fff; box-shadow: 0 0 0 1px var(--line); font-weight: 900; font-size: 18px; letter-spacing: -.02em; color: var(--ink-2); }
.clue b { font-size: 13.5px; font-weight: 800; line-height: 1.25; letter-spacing: -.01em; overflow-wrap: anywhere; }
.clue.mystery .node { background: var(--ink); color: var(--neon); font-size: 26px; box-shadow: 0 0 0 1px var(--ink); }
.clue.mystery b { color: var(--faint); }
.solved .clue.mystery .node { background: var(--neon); color: var(--ink); box-shadow: 0 0 0 5px var(--neon-soft); }
.solved .clue.mystery b { color: var(--ink); }
.clue.skeleton { height: 92px; border-radius: 16px; background: linear-gradient(90deg, #f3f3f3, #fafafa, #f3f3f3); background-size: 200% 100%; animation: shimmer 1.2s infinite; }
.empty { grid-column: 1 / -1; text-align: center; color: var(--muted); padding: 20px; }

.hints { display: flex; flex-direction: column; gap: 8px; margin-top: 20px; }
.hints:empty { display: none; }
.hint { background: #f7f7f7; border-radius: 14px; padding: 11px 14px; display: flex; flex-direction: column; gap: 2px; font-weight: 600; font-size: 14.5px; animation: rise .35s cubic-bezier(.2,.8,.2,1) both; }
.hint-label { font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--green-ink); }
.history { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.history:empty { display: none; }
.miss { display: inline-flex; align-items: center; gap: 6px; background: var(--red-soft); color: #9f1c1c; border-radius: 10px; padding: 5px 10px; font-weight: 700; font-size: 13px; text-decoration: line-through; text-decoration-color: rgba(159,28,28,.4); animation: rise .3s both; }
.miss .x { text-decoration: none; font-size: 11px; }

.guess { display: flex; gap: 8px; margin-top: 20px; }
.ac { position: relative; flex: 1; min-width: 0; }
.ac input { width: 100%; height: 52px; border-radius: 15px; border: 1.5px solid #dedede; padding: 0 16px; font-size: 16px; font-weight: 600; background: #fff; transition: border-color .15s, box-shadow .15s; }
.ac input:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 4px rgba(0, 255, 135, .25); }
.ac input::placeholder { color: #b3b3b3; font-weight: 500; }
.ac-list { position: absolute; left: 0; right: 0; bottom: calc(100% + 6px); margin: 0; padding: 6px; list-style: none; background: #fff; border: 1px solid var(--line); border-radius: 15px; box-shadow: var(--shadow); display: none; z-index: 5; }
.ac-list.show { display: block; }
.ac-list li { padding: 10px 12px; border-radius: 10px; cursor: pointer; font-weight: 600; }
.ac-list li:hover, .ac-list li.on { background: #f3f3f3; }
.ac-list mark { background: none; color: var(--ink); font-weight: 900; }
.author { text-align: center; font-size: 11.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); margin-top: 12px; }
.author:empty { display: none; }
.author b { color: var(--muted); }

/* result */
.result { margin-top: 22px; border-top: 1px solid var(--line); padding-top: 20px; }
.result.pop { animation: rise .5s cubic-bezier(.2,.8,.2,1) both; }
.res-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.res-answer { font-size: 30px; font-weight: 900; letter-spacing: -.035em; line-height: 1.1; margin: 4px 0 6px; }
.res-title { font-weight: 700; color: var(--muted); }
.res-points { background: var(--ink); color: #fff; border-radius: 16px; padding: 10px 14px; text-align: center; line-height: 1; }
.res-points b { display: block; font-size: 26px; font-weight: 900; color: var(--neon); }
.res-points span { font-size: 11px; font-weight: 700; color: #9a9a9a; text-transform: uppercase; letter-spacing: .1em; }
.res-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 18px 0 14px; padding: 12px 14px; background: #f7f7f7; border-radius: 15px; }
.streak { display: flex; align-items: baseline; gap: 6px; }
.streak b { font-size: 22px; font-weight: 900; }
.streak span:last-child { color: var(--muted); font-weight: 600; font-size: 13px; }
.share-line { font-size: 22px; letter-spacing: 2px; }
.res-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.everyone { margin-top: 20px; }
.everyone-sum { margin: 6px 0 10px; font-weight: 600; color: var(--muted); }
.everyone-sum b { color: var(--ink); font-size: 18px; font-weight: 900; }
.dist-row { display: grid; grid-template-columns: 52px 1fr 76px; align-items: center; gap: 10px; margin: 6px 0; font-size: 13px; font-weight: 700; }
.dist-row .bar { height: 22px; background: #f2f2f2; border-radius: 7px; overflow: hidden; }
.dist-row .bar i { display: block; height: 100%; background: #cfcfcf; border-radius: 7px; transition: width .6s cubic-bezier(.2,.8,.2,1); }
.dist-row b { text-align: right; font-variant-numeric: tabular-nums; }
.dist-row.me .bar i { background: var(--neon-2); }
.dist-row.me span { color: var(--green-ink); }
.dist-row.me b::after { content: ' · you'; color: var(--green-ink); }
.next { margin-top: 18px; text-align: center; color: var(--muted); font-weight: 600; }
.next b { color: var(--ink); font-variant-numeric: tabular-nums; }

/* more */
.more { margin-top: 22px; }
.section-title { font-size: 12px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--faint); margin: 0 4px 10px; }
.sport-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.sport-tile { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 14px 8px 12px; border-radius: 16px; background: #fff; border: 1px solid var(--line); text-decoration: none; transition: border-color .15s, transform .1s; }
.sport-tile:hover { border-color: #cfcfcf; transform: translateY(-1px); }
.sport-tile .emoji { font-size: 26px; }
.sport-tile b { font-size: 13.5px; font-weight: 800; }
.sport-tile .state { font-size: 11.5px; font-weight: 700; color: var(--faint); }
.sport-tile.current { border-color: var(--ink); }

.ad { margin: 22px 0; text-align: center; }
.ad-label { font-size: 10px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: #c2c2c2; margin-bottom: 6px; }
.how { margin-top: 18px; padding: 16px; }
.how-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.how-grid div { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; font-weight: 600; color: var(--ink-2); line-height: 1.35; }
.how-grid b { flex: none; width: 24px; height: 24px; border-radius: 50%; background: var(--ink); color: var(--neon); display: grid; place-items: center; font-size: 12px; }
.submit-cta { display: flex; align-items: center; gap: 14px; margin-top: 12px; padding: 16px 18px; text-decoration: none; font-size: 14px; }
.submit-cta:hover { border-color: #d6d6d6; }
.submit-cta .spark { width: 38px; height: 38px; border-radius: 12px; background: var(--neon-soft); color: var(--green-ink); display: grid; place-items: center; font-size: 18px; flex: none; }
.submit-cta .arrow { margin-left: auto; font-weight: 900; color: var(--faint); }
.foot { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 16px; margin-top: 34px; font-size: 12.5px; color: var(--faint); }
.foot a { text-decoration: none; font-weight: 600; }
.foot a:hover { color: var(--ink); }
.foot span { width: 100%; text-align: center; }

/* sheets (bottom sheet on phones, dialog on desktop) */
.sheet { position: fixed; inset: 0; z-index: 50; background: rgba(10,10,10,.35); display: flex; align-items: flex-end; justify-content: center; opacity: 0; transition: opacity .2s; }
.sheet.open { opacity: 1; }
.sheet-panel { width: min(520px, 100%); max-height: 88vh; overflow-y: auto; background: #fff; border-radius: 24px 24px 0 0; padding: 18px 20px calc(22px + env(safe-area-inset-bottom)); transform: translateY(30px); transition: transform .25s cubic-bezier(.2,.8,.2,1); display: flex; flex-direction: column; gap: 14px; }
.sheet.open .sheet-panel { transform: none; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; }
.sheet-head h2 { margin: 0; font-size: 20px; font-weight: 900; letter-spacing: -.02em; }
.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.stat-row div { background: #f6f6f6; border-radius: 14px; padding: 12px 6px; text-align: center; }
.stat-row b { display: block; font-size: 24px; font-weight: 900; font-variant-numeric: tabular-nums; }
.stat-row span { font-size: 11.5px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.note { background: var(--neon-soft); border-radius: 14px; padding: 12px 14px; font-size: 13.5px; font-weight: 500; }
.code-row { display: flex; gap: 8px; }
.code-row input { flex: 1; height: 44px; border-radius: 13px; border: 1.5px solid #dedede; padding: 0 14px; font-size: 15px; min-width: 0; }
.shared { display: flex; flex-direction: column; gap: 8px; }
.shared-item { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; border-radius: 14px; background: #f6f6f6; text-decoration: none; }
.shared-item > span:first-child { display: flex; flex-direction: column; }
.auth-frame { width: 100%; height: 400px; border: 0; border-radius: 14px; }
.auth-frame.tall { height: 470px; }

.toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); transform: translate(-50%, 16px); background: var(--ink); color: #fff; padding: 11px 16px; border-radius: 14px; font-weight: 700; font-size: 14px; opacity: 0; pointer-events: none; transition: all .2s; z-index: 60; max-width: calc(100vw - 32px); white-space: pre-line; text-align: center; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

.skeleton.line { height: 14px; border-radius: 7px; background: linear-gradient(90deg, #f0f0f0, #f8f8f8, #f0f0f0); background-size: 200% 100%; animation: shimmer 1.2s infinite; }
.shake { animation: shake .4s; }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes shimmer { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { *, *::before { animation: none !important; transition: none !important; } }

@media (min-width: 700px) {
  .sheet { align-items: center; }
  .sheet-panel { border-radius: 24px; }
  .wrap { padding-top: 34px; }
  .puzzle { padding: 30px 30px 26px; }
  .clue .node { width: 72px; height: 72px; font-size: 21px; }
  .clues::before { top: 36px; }
  .clue b { font-size: 14.5px; }
}
@media (max-width: 480px) {
  .hide-xs { display: none; }
  .logo img { height: 28px; }
  .top { gap: 8px; }
  .sport-btn { padding: 0 9px 0 8px; font-size: 13px; }
  .puzzle { padding: 20px 16px 18px; }
  .puzzle h1 { font-size: 26px; }
  .clue .node { width: 52px; height: 52px; font-size: 16px; }
  .clues::before { top: 26px; }
  .clue b { font-size: 12.5px; }
  .guess { flex-direction: column; }
  .guess .btn { width: 100%; }
  .how-grid { grid-template-columns: 1fr; }
  .res-answer { font-size: 26px; }
  .tabs button { padding: 7px 10px; }
}
