:root {
  --bg: #06101c;
  --panel: rgba(13, 25, 42, .84);
  --panel-2: rgba(18, 34, 55, .92);
  --line: rgba(159, 191, 223, .16);
  --text: #edf7ff;
  --muted: #90a6bb;
  --accent: #e8bf63;
  --accent-2: #35d6c1;
  --green: #267a61;
  --gold: #967329;
  --wrong: #511821;
  --danger: #bd5260;
  --shadow: 0 28px 70px rgba(0,0,0,.35);
}

* { box-sizing: border-box; }
html { color-scheme: dark; }
body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 50% -10%, rgba(29, 80, 117, .28), transparent 38%),
    linear-gradient(180deg, #071421 0%, #06101c 55%, #040a11 100%);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  overflow-x: hidden;
}
button, input { font: inherit; }
button { cursor: pointer; }

.bg-orb { position: fixed; border-radius: 999px; filter: blur(80px); opacity: .18; pointer-events:none; }
.orb-a { width: 420px; height: 420px; background: #27a7a0; top: 18%; left: -220px; }
.orb-b { width: 520px; height: 520px; background: #927b2f; right: -280px; top: 44%; }

.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; justify-content: space-between; align-items: center;
  width: min(1180px, calc(100% - 28px)); margin: 0 auto;
  padding: 18px 0;
  backdrop-filter: blur(15px);
}
.brand { color: var(--text); text-decoration:none; display:flex; align-items:center; gap:10px; font-weight:800; letter-spacing:-.02em; }
.brand-mark {
  display:grid; place-items:center; width:38px; height:38px; border:1px solid rgba(232,191,99,.45); border-radius:12px;
  background: linear-gradient(145deg, rgba(232,191,99,.17), rgba(53,214,193,.08)); color: var(--accent); font-size:13px;
}
.top-actions { display:flex; gap:8px; }
.icon-btn { width:38px; height:38px; border-radius:11px; border:1px solid var(--line); background:rgba(16,30,48,.75); color:var(--text); }
.icon-btn:hover { border-color:rgba(232,191,99,.55); }

.shell { width: min(1180px, calc(100% - 28px)); margin: 0 auto; padding: 54px 0 70px; }
.hero { max-width: 850px; margin: 0 auto 34px; text-align:center; }
.eyebrow { color: var(--accent); font-size:12px; letter-spacing:.16em; font-weight:800; margin-bottom:12px; }
h1 { margin:0; font-size: clamp(36px, 6vw, 68px); line-height:1.02; letter-spacing:-.055em; }
.hero > p { margin:18px auto 0; color:var(--muted); max-width:680px; font-size:16px; line-height:1.65; }
.status-row { display:flex; justify-content:center; flex-wrap:wrap; gap:9px; margin-top:22px; }
.pill { border:1px solid var(--line); background:rgba(11,24,39,.6); border-radius:999px; padding:8px 12px; color:var(--muted); font-size:13px; }
.pill strong { color:var(--text); }

.game-card { border:1px solid var(--line); border-radius:24px; background:linear-gradient(180deg, rgba(16,32,52,.9), rgba(9,20,34,.94)); box-shadow:var(--shadow); padding:24px; }
.input-label { display:block; margin-bottom:8px; color:var(--muted); font-size:13px; font-weight:700; }
.guess-input-wrap { position:relative; display:flex; gap:10px; max-width:650px; margin:0 auto; }
#championInput { flex:1; min-width:0; border:1px solid rgba(159,191,223,.22); border-radius:14px; background:#0a1726; color:var(--text); padding:14px 16px; outline:none; }
#championInput:focus { border-color:rgba(53,214,193,.75); box-shadow:0 0 0 3px rgba(53,214,193,.1); }
#submitBtn, .share-btn { border:0; border-radius:14px; padding:0 20px; font-weight:800; color:#08131d; background:linear-gradient(135deg, #e6bd61, #f0d286); }
#submitBtn:hover, .share-btn:hover { transform: translateY(-1px); filter:brightness(1.04); }
#submitBtn:disabled { opacity:.45; cursor:not-allowed; transform:none; }
.suggestions { position:absolute; top:56px; left:0; right:98px; z-index:10; max-height:300px; overflow:auto; border:1px solid var(--line); border-radius:14px; background:#0b1929; box-shadow:0 20px 40px rgba(0,0,0,.35); }
.suggestion { display:flex; align-items:center; gap:10px; padding:10px 12px; border-bottom:1px solid rgba(159,191,223,.08); cursor:pointer; }
.suggestion:last-child { border-bottom:0; }
.suggestion:hover, .suggestion.active { background:rgba(53,214,193,.09); }
.suggestion img { width:36px; height:36px; border-radius:9px; object-fit:cover; }
.suggestion span { font-weight:700; }
.message { min-height:24px; margin:10px auto 0; text-align:center; color:var(--muted); font-size:13px; }
.message.error { color:#ff93a0; }

.table-wrap { overflow-x:auto; margin-top:22px; padding-bottom:4px; }
.guess-grid { min-width:1440px; display:grid; grid-template-columns: 1.45fr .95fr 1.05fr 1.2fr 1fr 1fr 1.15fr .82fr .78fr .78fr; gap:8px; }
.header-row { margin-bottom:8px; color:var(--muted); font-size:11px; font-weight:800; text-transform:uppercase; letter-spacing:.08em; text-align:center; }
.header-row span:first-child { text-align:left; padding-left:6px; }
.guesses { display:flex; flex-direction:column; gap:8px; }
.guess-row { animation: rise .35s ease both; perspective: 900px; }
@keyframes rise { from { opacity:0; transform:translateY(8px); } to { opacity:1; transform:none; } }
.cell { min-height:70px; border:1px solid rgba(255,255,255,.055); border-radius:12px; display:flex; align-items:center; justify-content:center; text-align:center; padding:8px; background:var(--wrong); font-size:13px; font-weight:750; }
.cell.reveal-pending { opacity:0; transform:rotateY(-88deg) scale(.96); transform-origin:left center; backface-visibility:hidden; }
.cell.reveal-pending.revealed { animation: revealCell .48s cubic-bezier(.2,.82,.24,1) forwards; }
@keyframes revealCell {
  0% { opacity:0; transform:rotateY(-88deg) scale(.96); }
  62% { opacity:1; transform:rotateY(8deg) scale(1.015); }
  100% { opacity:1; transform:rotateY(0) scale(1); }
}
@media (prefers-reduced-motion: reduce) {
  .cell.reveal-pending { opacity:1; transform:none; }
  .cell.reveal-pending.revealed { animation:none; }
}
.cell.exact { background:linear-gradient(145deg, #246a57, #2c8b6d); }
.cell.close { background:linear-gradient(145deg, #7b6128, #a58031); }
.cell.wrong { background:linear-gradient(145deg, #43131b, #65202b); border-color:rgba(231,92,108,.16); }
.champion-cell { justify-content:flex-start; gap:10px; text-align:left; }
.champion-cell img { width:48px; height:48px; border-radius:10px; object-fit:cover; box-shadow:0 6px 16px rgba(0,0,0,.28); }
.champion-meta { display:flex; flex-direction:column; gap:2px; }
.arrow { margin-left:5px; color:#fff4bb; font-size:14px; }

.result-card { margin-top:24px; border:1px solid rgba(232,191,99,.26); border-radius:18px; background:rgba(232,191,99,.07); padding:18px; display:grid; grid-template-columns:auto 72px 1fr auto; gap:16px; align-items:center; }
.result-card[hidden] { display:none; }
.result-badge { writing-mode:vertical-rl; transform:rotate(180deg); letter-spacing:.12em; font-size:10px; font-weight:900; color:var(--accent); }
.result-card img { width:72px; height:72px; border-radius:15px; object-fit:cover; }
.result-kicker { margin:0 0 3px; color:var(--muted); font-size:12px; }
.result-card h2 { margin:0; font-size:24px; }
.result-card p:last-child { margin:4px 0 0; color:var(--muted); font-size:13px; }
.share-btn { min-height:44px; }

.legend { margin:18px auto 0; display:flex; justify-content:center; flex-wrap:wrap; gap:16px; color:var(--muted); font-size:12px; }
.legend > div { display:flex; align-items:center; gap:6px; }
.legend-box { width:14px; height:14px; border-radius:4px; display:inline-block; }
.legend-box.exact { background:var(--green); }.legend-box.close { background:var(--gold); }.legend-box.wrong { background:var(--wrong); }

.dialog { width:min(520px, calc(100% - 28px)); border:1px solid var(--line); border-radius:20px; color:var(--text); background:#0a1726; box-shadow:var(--shadow); padding:26px; }
.dialog::backdrop { background:rgba(0,0,0,.62); backdrop-filter:blur(5px); }
.dialog h2 { margin-top:0; }
.dialog p, .dialog li { color:var(--muted); line-height:1.6; }
.dialog-close { position:absolute; right:14px; top:12px; width:34px; height:34px; border-radius:10px; border:1px solid var(--line); background:#102137; color:var(--text); font-size:20px; }
.stat-grid { display:grid; grid-template-columns:repeat(4,1fr); gap:10px; }
.stat-grid div { border:1px solid var(--line); border-radius:14px; padding:16px 8px; text-align:center; background:#102036; }
.stat-grid strong { display:block; font-size:22px; }
.stat-grid span { color:var(--muted); font-size:11px; }

footer { width:min(900px, calc(100% - 28px)); margin:0 auto; padding:0 0 40px; color:#61768b; text-align:center; font-size:11px; line-height:1.5; }
footer p { margin:4px 0; }


.mode-tabs {
  display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px;
  max-width:720px; margin:0 auto 16px;
}
.mode-tab {
  display:flex; align-items:center; gap:12px; text-align:left;
  min-height:70px; padding:12px 16px; border:1px solid var(--line); border-radius:16px;
  background:rgba(10,23,38,.72); color:var(--text); transition:.18s ease;
}
.mode-tab:hover { border-color:rgba(232,191,99,.45); transform:translateY(-1px); }
.mode-tab.active { border-color:rgba(232,191,99,.62); background:linear-gradient(145deg,rgba(232,191,99,.13),rgba(53,214,193,.07)); box-shadow:0 10px 30px rgba(0,0,0,.16); }
.mode-tab:disabled { opacity:.55; cursor:not-allowed; transform:none; }
.mode-icon { display:grid; place-items:center; width:42px; height:42px; flex:0 0 auto; border-radius:12px; background:#0b1c2d; font-size:20px; }
.mode-tab strong { display:block; font-size:14px; }
.mode-tab small { display:block; margin-top:3px; color:var(--muted); font-size:11px; }

.ability-clue {
  display:grid; grid-template-columns:180px 1fr; gap:20px; align-items:stretch;
  margin-bottom:22px; padding:18px; border:1px solid rgba(232,191,99,.22); border-radius:18px;
  background:linear-gradient(145deg,rgba(232,191,99,.07),rgba(53,214,193,.04));
}
.ability-clue[hidden] { display:none; }
.ability-visual { display:flex; flex-direction:column; justify-content:center; align-items:center; gap:10px; }
.ability-label { color:var(--accent); font-size:10px; font-weight:900; letter-spacing:.13em; text-align:center; }
.ability-icon-frame { width:104px; height:104px; padding:5px; border-radius:22px; background:linear-gradient(145deg,#d4a94d,#42656e); box-shadow:0 16px 34px rgba(0,0,0,.3); }
.ability-icon-frame img { display:block; width:100%; height:100%; object-fit:cover; border-radius:17px; background:#07111f; filter: grayscale(1) contrast(1.05) brightness(.96); }
.ability-hints { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:9px; }
.ability-hint { min-height:72px; border:1px solid var(--line); border-radius:13px; padding:11px 12px; background:#102036; display:flex; flex-direction:column; justify-content:center; }
.ability-hint.wide { grid-column:1/-1; min-height:84px; }
.ability-hint span { color:var(--muted); text-transform:uppercase; letter-spacing:.08em; font-size:9px; font-weight:900; margin-bottom:5px; }
.ability-hint strong { font-size:13px; line-height:1.4; }
.ability-hint.locked { opacity:.55; background:rgba(12,25,41,.65); }
.ability-hint.unlocked { animation:hintPop .38s cubic-bezier(.2,.8,.2,1) both; border-color:rgba(232,191,99,.35); }
@keyframes hintPop { from { opacity:.2; transform:scale(.97) translateY(4px); } to { opacity:1; transform:none; } }

.ability-board { margin-top:20px; }
.ability-board[hidden] { display:none; }
.ability-history-label { margin:0 0 9px; color:var(--muted); font-size:11px; font-weight:800; text-transform:uppercase; letter-spacing:.08em; }
.ability-guesses { display:flex; flex-wrap:wrap; gap:8px; }
.ability-guess { display:flex; align-items:center; gap:8px; min-width:150px; padding:8px 10px; border:1px solid rgba(255,255,255,.06); border-radius:12px; background:linear-gradient(145deg,#43131b,#65202b); animation:rise .32s ease both; }
.ability-guess.correct { background:linear-gradient(145deg,#246a57,#2c8b6d); }
.ability-guess img { width:34px; height:34px; border-radius:8px; object-fit:cover; }
.ability-guess strong { font-size:12px; }
.ability-guess-mark { margin-left:auto; font-weight:900; }
.stats-mode-label { margin:-8px 0 14px !important; color:var(--accent) !important; font-size:12px; font-weight:800; text-transform:uppercase; letter-spacing:.1em; }

@media (max-width: 720px) {
  .shell { padding-top:30px; }
  .mode-tabs { grid-template-columns:1fr; }
  .ability-clue { grid-template-columns:1fr; }
  .ability-hints { grid-template-columns:1fr 1fr; }
  .ability-hint.wide { grid-column:1/-1; }
  .game-card { padding:16px; border-radius:18px; }
  .guess-input-wrap { flex-direction:column; }
  #submitBtn { height:46px; }
  .suggestions { right:0; top:54px; }
  .result-card { grid-template-columns:58px 1fr; }
  .result-badge { display:none; }
  .result-card img { width:58px; height:58px; }
  .share-btn { grid-column:1/-1; }
  .stat-grid { grid-template-columns:repeat(2,1fr); }
}

/* v0.8: four-mode hub + visual guessing modes */
.mode-tabs { grid-template-columns:repeat(3,minmax(0,1fr)); max-width:980px; }

.visual-clue {
  margin-bottom:22px;
  padding:18px;
  border:1px solid rgba(232,191,99,.22);
  border-radius:18px;
  background:linear-gradient(145deg,rgba(232,191,99,.07),rgba(53,214,193,.04));
}
.visual-clue[hidden] { display:none; }
.visual-label {
  margin-bottom:12px;
  color:var(--accent);
  font-size:10px;
  font-weight:900;
  letter-spacing:.13em;
  text-align:center;
}
.splash-frame {
  width:min(100%, 760px);
  aspect-ratio:16 / 8;
  margin:0 auto;
  overflow:hidden;
  border:1px solid rgba(255,255,255,.08);
  border-radius:18px;
  background:#050b12;
  box-shadow:0 18px 38px rgba(0,0,0,.28);
}
.splash-frame img {
  width:100%;
  height:100%;
  display:block;
  object-fit:cover;
  transform-origin:50% 46%;
  transition:transform .65s cubic-bezier(.2,.8,.2,1);
}
.reveal-meter {
  width:min(100%,760px);
  margin:12px auto 0;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  color:var(--muted);
  font-size:11px;
  font-weight:800;
  text-transform:uppercase;
  letter-spacing:.08em;
}
.reveal-meter strong { color:var(--accent); }
.visual-help {
  margin:6px auto 0;
  color:var(--muted);
  text-align:center;
  font-size:12px;
}

@media (max-width: 900px) {
  .mode-tabs { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media (max-width: 720px) {
  .mode-tabs { grid-template-columns:1fr; }
  .splash-frame { aspect-ratio:4 / 3; }
}

/* v0.12: Skin + Sound */
.skin-frame {
  width:min(100%, 820px);
  aspect-ratio:16 / 9;
  margin:0 auto;
  overflow:hidden;
  border:1px solid rgba(255,255,255,.08);
  border-radius:18px;
  background:#050b12;
  box-shadow:0 18px 38px rgba(0,0,0,.28);
}
.skin-frame img {
  width:100%; height:100%; display:block;
  object-fit:contain; object-position:center;
  background:#050b12;
  transform-origin:center center;
  transition:transform .35s ease;
}
.sound-clue {
  margin-bottom:22px; padding:22px; text-align:center;
  border:1px solid rgba(232,191,99,.22); border-radius:18px;
  background:linear-gradient(145deg,rgba(232,191,99,.07),rgba(53,214,193,.04));
}
.sound-clue[hidden] { display:none; }
.sound-orb {
  width:136px; height:136px; margin:0 auto 16px; border-radius:50%; display:flex; align-items:center; justify-content:center; gap:6px;
  background:radial-gradient(circle, rgba(53,214,193,.17), rgba(9,20,34,.9) 66%); border:1px solid rgba(53,214,193,.24);
  box-shadow:0 18px 42px rgba(0,0,0,.28), inset 0 0 32px rgba(53,214,193,.06);
}
.sound-orb span { width:6px; border-radius:999px; background:linear-gradient(#f0d286,#35d6c1); animation:soundBars 1s ease-in-out infinite alternate; }
.sound-orb span:nth-child(1), .sound-orb span:nth-child(5) { height:28px; animation-delay:.15s; }
.sound-orb span:nth-child(2), .sound-orb span:nth-child(4) { height:50px; animation-delay:.32s; }
.sound-orb span:nth-child(3) { height:72px; }
@keyframes soundBars { from { transform:scaleY(.45); opacity:.65; } to { transform:scaleY(1); opacity:1; } }
.sound-play-btn { min-height:48px; padding:0 22px; border:0; border-radius:14px; font-weight:900; color:#08131d; background:linear-gradient(135deg,#e6bd61,#f0d286); }
.sound-note { margin:8px auto 0; max-width:620px; color:#74899d; font-size:11px; line-height:1.5; }
@media (prefers-reduced-motion: reduce) { .sound-orb span { animation:none; } }
@media (max-width:900px) { .mode-tabs { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media (max-width:720px) { .mode-tabs { grid-template-columns:1fr; } .skin-frame { aspect-ratio:4/3; } }

/* v0.14: zoomed Skin Guess + Laugh Guess */
.skin-frame img {
  transform-origin:50% 48%;
  transition:transform .65s cubic-bezier(.2,.8,.2,1);
  will-change:transform;
}
.laugh-orb {
  background:radial-gradient(circle, rgba(232,191,99,.18), rgba(9,20,34,.92) 66%);
  border-color:rgba(232,191,99,.26);
}


/* Emoji mode */
.text-clue {
  margin-bottom:22px;
  padding:18px;
  border:1px solid rgba(232,191,99,.22);
  border-radius:18px;
  background:linear-gradient(145deg,rgba(232,191,99,.07),rgba(53,214,193,.04));
}
.text-clue[hidden] { display:none; }
.emoji-reveal {
  width:min(100%,620px);
  margin:0 auto 14px;
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:12px;
}
.emoji-slot {
  min-height:92px;
  display:grid;
  place-items:center;
  border:1px solid rgba(255,255,255,.09);
  border-radius:18px;
  background:#0c1b2b;
  font-size:42px;
  box-shadow:0 12px 28px rgba(0,0,0,.18);
  transition:.25s ease;
}
.emoji-slot.locked {
  color:#60758a;
  background:#091522;
  border-color:rgba(255,255,255,.05);
  font-size:28px;
}
.emoji-slot.revealed { border-color:rgba(232,191,99,.28); }
.emoji-slot.emoji-pop { animation:emojiReveal .48s cubic-bezier(.2,.82,.24,1) both; }
@keyframes emojiReveal {
  0% { opacity:.2; transform:rotateY(-85deg) scale(.92); }
  65% { opacity:1; transform:rotateY(8deg) scale(1.04); }
  100% { opacity:1; transform:none; }
}
.emoji-meter { width:min(100%,620px); }
.text-hints { grid-template-columns:repeat(2,minmax(0,1fr)); }
@media (max-width: 720px) {
  .emoji-reveal { gap:8px; }
  .emoji-slot { min-height:70px; font-size:30px; border-radius:14px; }
  .text-hints { grid-template-columns:1fr; }
}


/* v0.20: daily dashboard, global streak & profile */
.mode-tab { position:relative; }
.mode-tab.completed::after {
  content:'✓';
  position:absolute;
  top:8px;
  right:9px;
  display:grid;
  place-items:center;
  width:22px;
  height:22px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.12);
  font-size:11px;
  font-weight:900;
  background:#1f6c57;
  color:#effff9;
  box-shadow:0 5px 16px rgba(0,0,0,.22);
}
.mode-tab.completed.failed::after {
  content:'×';
  background:#671e2a;
  color:#ffd9df;
}
.mode-tab.completed.won { border-color:rgba(53,214,193,.34); }
.profile-dialog { width:min(660px, calc(100% - 28px)); }
.profile-kicker {
  margin:2px 0 10px !important;
  color:var(--accent) !important;
  font-size:10px;
  font-weight:900;
  letter-spacing:.13em;
}
.profile-grid {
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:10px;
}
.profile-grid > div {
  min-width:0;
  border:1px solid var(--line);
  border-radius:14px;
  padding:15px 8px;
  text-align:center;
  background:linear-gradient(145deg,#102036,#0c1a2a);
}
.profile-grid strong { display:block; font-size:21px; color:var(--text); }
.profile-grid span { display:block; margin-top:3px; color:var(--muted); font-size:10px; line-height:1.3; }
.profile-divider { height:1px; margin:20px 0 16px; background:var(--line); }
@media (max-width:600px) {
  .profile-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
}

/* v0.21: language switch + yesterday answer */
.language-control { display:flex; align-items:center; }
.language-control select {
  height:38px;
  padding:0 30px 0 11px;
  border:1px solid var(--line);
  border-radius:10px;
  background:#102137;
  color:var(--text);
  font:inherit;
  font-size:12px;
  font-weight:850;
  cursor:pointer;
}
.sr-only {
  position:absolute !important;
  width:1px !important;
  height:1px !important;
  padding:0 !important;
  margin:-1px !important;
  overflow:hidden !important;
  clip:rect(0,0,0,0) !important;
  white-space:nowrap !important;
  border:0 !important;
}
.yesterday-card {
  width:min(720px,100%);
  margin:0 auto 16px;
  min-height:66px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  padding:10px 14px;
  border:1px solid var(--line);
  border-radius:16px;
  background:rgba(10,23,38,.64);
  box-shadow:0 10px 28px rgba(0,0,0,.12);
}
.yesterday-label {
  color:var(--muted);
  font-size:11px;
  font-weight:850;
  text-transform:uppercase;
  letter-spacing:.08em;
}
.yesterday-answer { display:flex; align-items:center; gap:10px; }
.yesterday-answer img {
  width:42px;
  height:42px;
  border-radius:10px;
  object-fit:cover;
  background:#081421;
  border:1px solid rgba(255,255,255,.08);
}
.yesterday-answer img:not([src]) { visibility:hidden; }
.yesterday-answer strong { font-size:14px; }
@media (max-width:600px) {
  .yesterday-card { align-items:flex-start; flex-direction:column; gap:8px; }
}

/* v0.25: Daily hub + richer profile */
.daily-hub {
  width:min(980px,100%);
  margin:0 auto 18px;
  padding:18px;
  border:1px solid rgba(232,191,99,.2);
  border-radius:20px;
  background:linear-gradient(145deg,rgba(14,31,49,.92),rgba(8,21,34,.9));
  box-shadow:0 16px 42px rgba(0,0,0,.18);
}
.daily-hub-head {
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:18px;
}
.daily-hub-kicker {
  margin:0 0 4px;
  color:var(--accent);
  font-size:10px;
  font-weight:900;
  letter-spacing:.14em;
}
.daily-hub h2 {
  margin:0;
  font-size:20px;
  line-height:1.2;
}
.daily-hub-sub {
  margin:6px 0 0;
  color:var(--muted);
  font-size:12px;
  line-height:1.5;
}
.perfect-badge {
  flex:0 0 auto;
  max-width:220px;
  padding:8px 11px;
  border:1px solid rgba(232,191,99,.28);
  border-radius:999px;
  background:rgba(232,191,99,.08);
  color:var(--accent);
  text-align:center;
  font-size:11px;
  font-weight:900;
}
.perfect-badge.perfect {
  border-color:rgba(53,214,193,.42);
  background:rgba(53,214,193,.12);
  color:#bffdf3;
}
.perfect-badge.missed {
  border-color:rgba(231,92,108,.3);
  background:rgba(101,32,43,.22);
  color:#ffd4db;
}
.daily-progress {
  height:9px;
  margin-top:16px;
  overflow:hidden;
  border:1px solid rgba(255,255,255,.055);
  border-radius:999px;
  background:#07131f;
}
.daily-progress-fill {
  width:0;
  height:100%;
  border-radius:inherit;
  background:linear-gradient(90deg,#2c8b6d,#d4a94d);
  transition:width .35s ease;
}
.daily-hub-meta {
  display:flex;
  justify-content:space-between;
  gap:12px;
  margin-top:7px;
  color:var(--muted);
  font-size:11px;
}
.daily-hub-meta strong { color:var(--text); }
.daily-overview-grid {
  display:grid;
  grid-template-columns:repeat(7,minmax(0,1fr));
  gap:8px;
  margin-top:14px;
}
.daily-overview-item {
  min-width:0;
  min-height:82px;
  padding:10px 8px;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:5px;
  border:1px solid var(--line);
  border-radius:14px;
  background:#0d1e30;
  color:var(--text);
  text-align:center;
  transition:.18s ease;
}
.daily-overview-item:hover { transform:translateY(-1px); border-color:rgba(232,191,99,.38); }
.daily-overview-item.active { outline:1px solid rgba(232,191,99,.48); background:#12283d; }
.daily-overview-item.won { border-color:rgba(53,214,193,.3); background:linear-gradient(145deg,rgba(36,106,87,.34),rgba(13,30,48,.95)); }
.daily-overview-item.lost { border-color:rgba(231,92,108,.28); background:linear-gradient(145deg,rgba(101,32,43,.32),rgba(13,30,48,.95)); }
.daily-overview-icon { font-size:20px; line-height:1; }
.daily-overview-copy { min-width:0; }
.daily-overview-copy strong { display:block; font-size:11px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.daily-overview-copy small { display:block; margin-top:2px; color:var(--muted); font-size:9px; }
.daily-overview-item.won .daily-overview-copy small { color:#a9e9dc; }
.daily-overview-item.lost .daily-overview-copy small { color:#efadb7; }
.daily-overview-score { color:var(--accent); font-size:9px; font-weight:850; }

.profile-spotlight {
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:10px;
  margin-top:10px;
}
.profile-spotlight > div {
  padding:13px 14px;
  border:1px solid var(--line);
  border-radius:14px;
  background:#0c1b2b;
}
.profile-spotlight span { display:block; color:var(--muted); font-size:9px; font-weight:850; text-transform:uppercase; letter-spacing:.08em; }
.profile-spotlight strong { display:block; margin-top:5px; font-size:14px; }
.perfect-text { color:#95f0df !important; }
.profile-mode-breakdown { display:flex; flex-direction:column; gap:7px; }
.profile-mode-row {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  padding:10px 12px;
  border:1px solid var(--line);
  border-radius:13px;
  background:#0c1b2b;
}
.profile-mode-identity { display:flex; align-items:center; gap:10px; min-width:0; }
.profile-mode-identity > span:first-child { width:30px; height:30px; display:grid; place-items:center; border-radius:9px; background:#10263b; }
.profile-mode-identity strong { display:block; font-size:12px; }
.profile-mode-identity small { display:block; margin-top:2px; color:var(--muted); font-size:9px; }
.profile-mode-metrics { display:flex; align-items:center; gap:18px; }
.profile-mode-metrics > span { min-width:58px; text-align:right; }
.profile-mode-metrics strong { display:block; font-size:12px; }
.profile-mode-metrics small { display:block; margin-top:2px; color:var(--muted); font-size:8px; }

@media (max-width:900px) {
  .daily-overview-grid { grid-template-columns:repeat(4,minmax(0,1fr)); }
}
@media (max-width:620px) {
  .daily-hub-head { flex-direction:column; }
  .perfect-badge { max-width:none; width:100%; }
  .daily-overview-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .daily-hub-meta { flex-direction:column; gap:3px; }
  .profile-spotlight { grid-template-columns:1fr; }
  .profile-mode-row { align-items:flex-start; }
  .profile-mode-metrics { gap:10px; }
}


/* v0.26: Endless Classic */
.mode-tab.endless-tab {
  border-color:rgba(53,214,193,.24);
  background:linear-gradient(145deg,rgba(53,214,193,.07),rgba(10,23,38,.72));
}
.mode-tab.endless-tab.active {
  border-color:rgba(53,214,193,.62);
  background:linear-gradient(145deg,rgba(53,214,193,.15),rgba(232,191,99,.07));
}
.result-actions { display:flex; flex-direction:column; gap:8px; min-width:150px; }
.endless-next-btn {
  border-color:rgba(53,214,193,.36);
  background:rgba(53,214,193,.12);
  color:#c7fff6;
}
.endless-next-btn[hidden] { display:none; }
@media (max-width:720px) {
  .result-actions { grid-column:1/-1; width:100%; }
  .result-actions .share-btn { width:100%; }
}

.yesterday-card[hidden] { display:none !important; }
.endless-profile-row { border-color:rgba(53,214,193,.2); }


/* v0.28 account + leaderboard */
.account-btn,.mini-btn,.secondary-btn{border:1px solid var(--line);background:#102137;color:var(--text);border-radius:10px;font-weight:800;cursor:pointer}.account-btn{height:38px;padding:0 12px}.mini-btn{padding:8px 12px}.secondary-btn{padding:11px 14px}.leaderboard-card{margin-top:18px;border-top:1px solid var(--line);padding-top:18px}.leaderboard-head{display:flex;align-items:center;justify-content:space-between;gap:12px}.leaderboard-head h3{margin:2px 0 0}.leaderboard-list{display:flex;flex-direction:column;gap:7px;margin-top:12px}.leaderboard-row{display:grid;grid-template-columns:42px 1fr auto auto;gap:10px;align-items:center;padding:10px 12px;border:1px solid var(--line);border-radius:12px;background:rgba(12,27,43,.7)}.leaderboard-row.me{border-color:rgba(232,191,99,.55);background:rgba(232,191,99,.08)}.leaderboard-rank{font-weight:900;color:var(--accent)}.leaderboard-user{font-weight:800}.leaderboard-score{font-weight:900}.leaderboard-meta,.leaderboard-empty{color:var(--muted);font-size:12px}.auth-label{display:flex;flex-direction:column;gap:6px;margin:12px 0;color:var(--muted);font-size:12px;font-weight:800}.auth-label input{height:44px;border-radius:11px;border:1px solid var(--line);background:#071523;color:var(--text);padding:0 12px;font:inherit}.auth-actions{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:14px}.signed-in-card{padding:14px;border:1px solid var(--line);border-radius:12px;background:#102036;margin-bottom:12px}.signed-in-card span{display:block;color:var(--muted);font-size:11px}.signed-in-card strong{font-size:18px}@media(max-width:620px){.leaderboard-row{grid-template-columns:34px 1fr auto}.leaderboard-meta{display:none}.account-btn{max-width:110px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.auth-actions{grid-template-columns:1fr}}

/* v0.30 clearer account login / signup flow */
.auth-dialog{width:min(460px,calc(100vw - 28px))}
.auth-dialog h2{margin-bottom:7px}
.auth-dialog #authDescription{margin-top:0;color:var(--muted);line-height:1.5}
.auth-mode-switch{display:grid;grid-template-columns:1fr 1fr;gap:7px;padding:5px;margin:18px 0 10px;border:1px solid var(--line);border-radius:13px;background:#071523}
.auth-mode-tab{min-height:42px;padding:9px 12px;border:1px solid transparent;border-radius:9px;background:transparent;color:var(--muted);font:inherit;font-weight:900;cursor:pointer}
.auth-mode-tab.active{border-color:rgba(232,191,99,.45);background:#142a42;color:var(--text);box-shadow:0 0 0 1px rgba(232,191,99,.08) inset}
.auth-mode-hint{margin:10px 2px 14px;padding:10px 12px;border-left:3px solid var(--accent);border-radius:0 8px 8px 0;background:rgba(232,191,99,.07);color:var(--text);font-size:13px;line-height:1.45}
.auth-label span{color:var(--text);font-size:13px}
.auth-label input:focus{outline:2px solid rgba(232,191,99,.38);outline-offset:1px;border-color:var(--accent)}
.auth-actions-single{grid-template-columns:1fr}
.auth-primary-btn{min-height:45px;border:1px solid rgba(232,191,99,.5);border-radius:11px;background:#183553;color:var(--text);font:inherit;font-weight:900;cursor:pointer}
.auth-primary-btn:hover,.auth-mode-tab:hover{filter:brightness(1.1)}
@media(max-width:480px){.auth-mode-switch{grid-template-columns:1fr}.auth-mode-tab{min-height:40px}}

/* v0.32: friend challenges */
.challenge-card {
  margin-top:18px;
  border-top:1px solid var(--line);
  padding-top:18px;
}
.challenge-head {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}
.challenge-head h3 { margin:2px 0 0; }
.challenge-description {
  margin:8px 0 0;
  color:var(--muted);
  font-size:12px;
  line-height:1.5;
}
.challenge-share-row {
  display:grid;
  grid-template-columns:1fr auto;
  gap:8px;
  margin-top:12px;
}
.challenge-share-row[hidden], .challenge-status[hidden] { display:none; }
.challenge-share-row input {
  min-width:0;
  height:38px;
  border:1px solid var(--line);
  border-radius:10px;
  background:#071523;
  color:var(--muted);
  padding:0 10px;
  font:inherit;
  font-size:11px;
}
.challenge-status {
  margin-top:14px;
  padding:14px;
  border:1px solid rgba(232,191,99,.23);
  border-radius:14px;
  background:linear-gradient(145deg,rgba(232,191,99,.07),rgba(53,214,193,.035));
}
.challenge-intro {
  margin-bottom:10px;
  color:var(--accent);
  font-size:12px;
  font-weight:900;
  text-align:center;
}
.challenge-duel {
  display:grid;
  grid-template-columns:1fr auto 1fr;
  gap:10px;
  align-items:center;
}
.challenge-player {
  min-width:0;
  padding:11px;
  border:1px solid var(--line);
  border-radius:12px;
  background:rgba(7,21,35,.7);
  text-align:center;
}
.challenge-player span {
  display:block;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  color:var(--text);
  font-size:13px;
  font-weight:900;
}
.challenge-player strong {
  display:block;
  margin-top:4px;
  color:var(--muted);
  font-size:11px;
  font-weight:750;
}
.challenge-vs { color:var(--accent); font-size:11px; letter-spacing:.08em; }
.challenge-verdict {
  margin-top:10px;
  color:#d9e6f2;
  font-size:12px;
  font-weight:850;
  text-align:center;
}
#createChallengeBtn:disabled { opacity:.48; cursor:not-allowed; }
@media (max-width:620px) {
  .challenge-head { align-items:flex-start; flex-direction:column; }
  .challenge-share-row { grid-template-columns:1fr; }
  .challenge-duel { grid-template-columns:1fr; }
  .challenge-vs { text-align:center; }
}
