/* SpellingRank — honey & ink. Light and dark themes; phone first. */
:root {
  --bg: #fff8ea;
  --bg-2: #fff1d1;
  --surface: #ffffff;
  --ink: #1d2138;
  --ink-2: #3a3f5c;
  --muted: #6d7088;
  --line: #f0e4c8;
  --honey: #ffc83d;
  --honey-deep: #f2a100;
  --honey-soft: #fff0c2;
  --on-honey: #1d2138;
  --good: #2b8a3e;
  --good-soft: #e5f6e9;
  --bad: #d6336c;
  --bad-soft: #fde8ef;
  --easy: #2fb36b;
  --medium: #f08c00;
  --hard: #7048e8;
  --op-add: #2f9e44;
  --op-subtract: #e8590c;
  --op-multiply: #ae3ec9;
  --op-divide: #1c7ed6;
  --shadow: 0 1px 0 rgba(29, 33, 56, 0.04), 0 10px 30px -12px rgba(29, 33, 56, 0.18);
  --radius: 22px;
  --font-display: "Fredoka", "Nunito", system-ui, sans-serif;
  --font-body: "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #12131c;
    --bg-2: #1a1b27;
    --surface: #1d1f2e;
    --ink: #f3f2ee;
    --ink-2: #d6d5d0;
    --muted: #a0a2b8;
    --line: #2d3045;
    --honey: #ffcf52;
    --honey-deep: #ffb020;
    --honey-soft: #3a3120;
    --good: #69db7c;
    --good-soft: #1b3325;
    --bad: #ff8fab;
    --bad-soft: #3d1f2a;
    --shadow: 0 1px 0 rgba(0, 0, 0, 0.3), 0 12px 30px -12px rgba(0, 0, 0, 0.6);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #12131c; --bg-2: #1a1b27; --surface: #1d1f2e; --ink: #f3f2ee; --ink-2: #d6d5d0; --muted: #a0a2b8;
  --line: #2d3045; --honey: #ffcf52; --honey-deep: #ffb020; --honey-soft: #3a3120; --good: #69db7c;
  --good-soft: #1b3325; --bad: #ff8fab; --bad-soft: #3d1f2a; color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  background-image: radial-gradient(circle at 1px 1px, color-mix(in srgb, var(--honey-deep) 18%, transparent) 1px, transparent 0);
  background-size: 22px 22px;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
h1, h2, h3 { font-family: var(--font-display); line-height: 1.15; margin: 0 0 0.4em; letter-spacing: -0.01em; }
h1 { font-size: clamp(1.8rem, 5vw, 2.6rem); font-weight: 700; }
h2 { font-size: 1.35rem; font-weight: 600; }
h3 { font-size: 1.1rem; font-weight: 600; }
p { margin: 0 0 0.8em; }
a { color: inherit; }
button { font: inherit; }
.muted { color: var(--muted); }
.small { font-size: 0.88rem; }
.strong { font-weight: 800; }
.center { text-align: center; }
.error { color: var(--bad); font-weight: 700; min-height: 1.2em; margin: 6px 0; }
.error:empty { display: none; }

/* ---- layout ---------------------------------------------------------------------------------- */
.app { min-height: 100vh; display: flex; flex-direction: column; }
.main { width: 100%; max-width: 1040px; margin: 0 auto; padding: 24px 16px 48px; flex: 1; }
.site-header {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 16px;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.logo { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-display); font-weight: 700; font-size: 1.25rem; text-decoration: none; }
.logo-bee {
  display: grid; place-items: center; width: 36px; height: 36px; border-radius: 11px;
  background: var(--honey); box-shadow: inset 0 -3px 0 var(--honey-deep); font-size: 1.1rem;
}
.nav { display: flex; align-items: center; gap: 4px; }
.nav a { text-decoration: none; font-weight: 700; padding: 8px 12px; border-radius: 12px; color: var(--ink-2); white-space: nowrap; }
.nav a:hover { background: var(--honey-soft); }
.nav a.active { color: var(--ink); background: var(--honey-soft); }
.nav .me-link { max-width: 150px; overflow: hidden; text-overflow: ellipsis; }
.site-footer { text-align: center; padding: 28px 16px 36px; border-top: 1px solid var(--line); font-size: 0.9rem; }
.site-footer p { margin: 4px 0; }

.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; box-shadow: var(--shadow); margin-bottom: 16px; min-width: 0;
}
.two-col { display: grid; grid-template-columns: 1fr; gap: 16px; margin-top: 16px; }
.two-col > .card { margin-bottom: 0; }
@media (min-width: 760px) { .two-col { grid-template-columns: 1fr 1fr; } }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 8px 0 12px; }
.section-head h1, .section-head h2 { margin: 0; }
.more { font-weight: 700; text-decoration: none; color: var(--honey-deep); }
.row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.eyebrow { font-weight: 800; font-size: 0.85rem; color: var(--honey-deep); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 6px; }

/* ---- controls -------------------------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 11px 18px; border-radius: 14px; border: 2px solid transparent;
  font-weight: 800; text-decoration: none; cursor: pointer; line-height: 1.2;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.55; cursor: default; transform: none; }
.btn.primary { background: var(--honey); color: var(--on-honey); box-shadow: inset 0 -3px 0 var(--honey-deep); }
.btn.primary:hover:not(:disabled) { filter: brightness(1.04); }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn.ghost:hover { background: var(--honey-soft); }
.btn.big { padding: 15px 24px; font-size: 1.08rem; }
.btn.small { padding: 6px 12px; font-size: 0.88rem; border-radius: 10px; }
.btn.wide { width: 100%; }
.btn.google { background: var(--surface); color: var(--ink); border-color: var(--line); }
.btn.google:hover:not(:disabled) { background: var(--honey-soft); }
.btn.google .g-mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 20px; height: 20px; border-radius: 50%;
  background: #fff; color: #4285f4; border: 1px solid var(--line);
  font-weight: 900; font-size: 0.82rem;
}
.google-signin { display: flex; flex-direction: column; align-items: center; gap: 10px; margin-top: 4px; }
.google-signin .btn.google { width: 100%; }
.or-sep { color: var(--muted); font-weight: 700; font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.06em; }
.linked-note { font-weight: 700; }
.age-overlay { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(29, 33, 56, 0.55); }
.age-card { max-width: 420px; width: 100%; }
.age-card .row { margin-top: 12px; flex-wrap: nowrap; }
.age-card .input { flex: 1; }
.ad-slot { max-width: 728px; margin: 18px auto; padding: 0 16px; text-align: center; }
.ad-slot .ad-label { display: block; font-size: 0.68rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.ad-slot .adsbygoogle { display: block; min-height: 90px; }
.link-btn { background: none; border: none; color: var(--muted); text-decoration: underline; cursor: pointer; padding: 6px 0; font-size: 0.9rem; }
.input {
  width: 100%; padding: 12px 14px; border-radius: 14px; border: 2px solid var(--line);
  background: var(--bg); color: var(--ink); font: inherit; font-size: 1rem;
}
.input:focus { outline: none; border-color: var(--honey-deep); }
.field-label { display: block; font-weight: 800; font-size: 0.9rem; margin: 14px 0 8px; }
.pill { display: inline-block; padding: 4px 10px; border-radius: 999px; background: var(--honey-soft); font-weight: 800; font-size: 0.85rem; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pill-btn {
  padding: 8px 14px; border-radius: 999px; border: 2px solid var(--line); background: transparent;
  color: var(--ink); font-weight: 800; cursor: pointer; text-decoration: none; font-size: 0.95rem;
}
.pill-btn.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.chip { padding: 5px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); cursor: pointer; font-weight: 700; font-size: 0.9rem; }
.chip:hover { border-color: var(--honey-deep); }
.chip.ghost { color: var(--muted); }
:focus-visible { outline: 3px solid var(--honey-deep); outline-offset: 2px; }

/* ---- home -------------------------------------------------------------------------------------- */
.hero { text-align: center; padding: 28px 0 20px; }
.hero h1 { font-size: clamp(2.4rem, 9vw, 4.2rem); margin-bottom: 12px; }
.hero .hl { background: linear-gradient(transparent 58%, var(--honey) 58%, var(--honey) 90%, transparent 90%); padding: 0 4px; }
.lead { font-size: 1.12rem; color: var(--ink-2); max-width: 560px; margin: 0 auto 22px; }
.hero-cta { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-bottom: 14px; }
.countdown { font-weight: 800; color: var(--ink); font-variant-numeric: tabular-nums; }

.stats-strip {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin: 8px 0 24px; align-items: stretch;
}
@media (min-width: 760px) { .stats-strip { grid-template-columns: repeat(5, 1fr); } }
.stat {
  background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 14px 12px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; min-width: 0;
}
.stat strong { font-family: var(--font-display); font-size: 1.6rem; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat span { color: var(--muted); font-size: 0.85rem; font-weight: 700; }
.stat.accent { background: var(--honey); border-color: var(--honey-deep); }
.stat.accent span { color: var(--on-honey); }
.stat.accent strong { color: var(--on-honey); }
.stats-strip .live-dot { grid-column: 1 / -1; justify-self: center; }
.stats-strip > .stat:last-child:nth-child(odd) { grid-column: 1 / -1; }
@media (min-width: 760px) { .stats-strip > .stat:last-child:nth-child(odd) { grid-column: auto; } }
@media (min-width: 760px) { .stats-strip .live-dot { grid-column: auto; justify-self: center; align-self: center; } }

.live-dot { display: inline-flex; align-items: center; gap: 6px; font-size: 0.82rem; font-weight: 800; color: var(--muted); white-space: nowrap; }
.live-dot::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--muted); }
.live-dot.on { color: var(--good); }
.live-dot.on::before { background: var(--good); box-shadow: 0 0 0 0 color-mix(in srgb, var(--good) 60%, transparent); animation: ping 1.8s infinite; }
@keyframes ping { 70% { box-shadow: 0 0 0 8px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }

.level-cards { display: grid; grid-template-columns: 1fr; gap: 14px; }
@media (min-width: 760px) { .level-cards { grid-template-columns: repeat(3, 1fr); } }
.level-card { margin-bottom: 0; border-top: 6px solid var(--line); padding-top: 16px; }
.level-card.easy { border-top-color: var(--easy); }
.level-card.medium { border-top-color: var(--medium); }
.level-card.hard { border-top-color: var(--hard); }
.level-card-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.level-card-head h3 { margin: 0; }

.feed { list-style: none; padding: 0; margin: 0; }
.feed li { padding: 10px 0; border-bottom: 1px dashed var(--line); font-size: 0.95rem; overflow-wrap: anywhere; }
.feed li:last-child { border-bottom: none; }
.feed a { text-decoration: none; }
.feed .pts { font-weight: 800; color: var(--honey-deep); margin-right: 6px; }
.steps { padding-left: 1.2em; margin: 0 0 16px; }
.steps li { margin-bottom: 10px; }

/* ---- boards ------------------------------------------------------------------------------------ */
.board { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.board th { text-align: left; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); padding: 6px 8px; border-bottom: 2px solid var(--line); }
.board td { padding: 10px 8px; border-bottom: 1px solid var(--line); }
.board tr:last-child td { border-bottom: none; }
.board .rank { width: 44px; font-weight: 800; text-align: center; }
.board .name { font-weight: 800; overflow-wrap: anywhere; }
.board .name a { text-decoration: none; }
.board .name a:hover { text-decoration: underline; }
.board .num { text-align: right; }
.board tr.me td { background: var(--honey-soft); }
.board tr.me td:first-child { border-radius: 10px 0 0 10px; }
.board tr.me td:last-child { border-radius: 0 10px 10px 0; }
.board.compact td { padding: 7px 6px; font-size: 0.95rem; }
.board-empty { padding: 18px 8px; color: var(--muted); text-align: center; font-weight: 700; }
.tabs { display: flex; gap: 6px; margin-bottom: 14px; border-bottom: 2px solid var(--line); }
.tab {
  padding: 10px 16px; font-weight: 800; text-decoration: none; color: var(--muted); border-bottom: 3px solid transparent;
  margin-bottom: -2px; background: none; border-left: none; border-right: none; border-top: none; cursor: pointer;
}
.tab.on { color: var(--ink); border-bottom-color: var(--honey-deep); }
.board-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 12px; }
.board-head p { margin: 0; }

/* ---- play -------------------------------------------------------------------------------------- */
.mode-card { border-top: 6px solid var(--honey); }
.mode-card.practice { border-top-color: var(--ink-2); }
.level-buttons { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 14px 0; }
.btn.level { color: #fff; box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.18); }
.btn.level.easy { background: var(--easy); }
.btn.level.medium { background: var(--medium); }
.btn.level.hard { background: var(--hard); }
.btn.level.add { background: var(--op-add); }
.btn.level.subtract { background: var(--op-subtract); }
.btn.level.multiply { background: var(--op-multiply); }
.btn.level.divide { background: var(--op-divide); }
.mode-card .btn.wide { margin-top: 18px; }

/* ---- game -------------------------------------------------------------------------------------- */
.game-wrap { max-width: 560px; margin: 0 auto; }
.game-intro h1 { margin-bottom: 14px; }
.rules { list-style: none; padding: 0; margin: 0 0 18px; }
.rules li { padding: 8px 0; border-bottom: 1px dashed var(--line); }
.voice-row { display: grid; grid-template-columns: auto 1fr auto; gap: 8px; align-items: center; margin-bottom: 18px; }
.voice-row label { font-weight: 800; }
.voice-row select { min-width: 0; }
.game-intro .btn.big { width: 100%; margin-bottom: 8px; }

.game-top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 10px; font-size: 0.92rem; }
.game-score { margin-left: auto; display: inline-flex; gap: 10px; font-weight: 800; font-variant-numeric: tabular-nums; }
.streak { color: var(--medium); }
.progress { height: 8px; border-radius: 4px; background: var(--line); overflow: hidden; margin-bottom: 14px; }
.progress > div { height: 100%; background: var(--ink); border-radius: 4px; transition: width 0.3s; }
.timer { display: flex; align-items: center; gap: 10px; margin-bottom: 20px; }
.timer .track { flex: 1; height: 12px; border-radius: 6px; background: var(--line); overflow: hidden; }
.timer .fill { height: 100%; background: var(--good); border-radius: 6px; transition: background 0.3s; }
.timer .fill.warn { background: var(--medium); }
.timer .fill.danger { background: var(--bad); }
.timer .secs { font-weight: 800; min-width: 42px; text-align: right; font-variant-numeric: tabular-nums; }
.timer .secs.danger { color: var(--bad); animation: blink 0.5s infinite alternate; }
@keyframes blink { to { opacity: 0.4; } }
.timer-off { text-align: center; color: var(--muted); font-weight: 700; font-size: 0.85rem; margin-bottom: 16px; }

.speaker {
  display: grid; place-items: center; width: 120px; height: 120px; margin: 4px auto 16px;
  border-radius: 50%; border: none; cursor: pointer; font-size: 3rem;
  background: var(--honey); color: var(--on-honey);
  box-shadow: inset 0 -6px 0 var(--honey-deep), 0 10px 26px -8px color-mix(in srgb, var(--honey-deep) 70%, transparent);
  transition: transform 0.12s;
}
.speaker:active { transform: scale(0.95); }
.speaker.talking { animation: pulse 1s infinite; }
@keyframes pulse { 50% { box-shadow: inset 0 -6px 0 var(--honey-deep), 0 0 0 16px color-mix(in srgb, var(--honey) 25%, transparent); } }

/* Flash: same footprint as .speaker, but a plain dark ring so the flashed number reads as a number
   on a screen, not a button to press. Empty between numbers; scales in as each one appears. */
.flash-display {
  display: grid; place-items: center; width: 120px; height: 120px; margin: 4px auto 16px;
  border-radius: 50%; border: 3px solid var(--line); background: var(--surface);
}
.flash-num { font-family: var(--font-display); font-size: 2.6rem; font-weight: 700; color: var(--ink); transform: scale(0.6); opacity: 0; transition: none; }
.flash-num.showing { transform: scale(1); opacity: 1; transition: transform 0.15s ease-out, opacity 0.1s ease-out; }
.tools { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-bottom: 16px; }
.tools .btn { padding: 8px 12px; font-size: 0.9rem; }
.hintbox { background: var(--honey-soft); border-radius: 14px; padding: 12px 14px; margin-bottom: 14px; font-weight: 600; }
.edits { background: var(--bad-soft); color: var(--bad); border-radius: 14px; padding: 8px 14px; margin-bottom: 14px; font-weight: 700; font-size: 0.9rem; text-align: center; }
input.answer {
  width: 100%; font-size: 1.6rem; text-align: center; padding: 14px; border-radius: 16px;
  border: 3px solid var(--line); background: var(--bg); color: var(--ink); letter-spacing: 0.05em; font-family: var(--font-display);
}
input.answer:focus { outline: none; border-color: var(--honey-deep); }
input.answer:disabled { opacity: 0.8; }
.feedback { border-radius: 16px; padding: 14px 16px; margin-top: 14px; animation: pop 0.25s ease; }
.feedback.good { background: var(--good-soft); color: var(--good); }
.feedback.bad { background: var(--bad-soft); color: var(--bad); }
.feedback strong { font-size: 1.15rem; font-family: var(--font-display); }
.feedback .word { font-size: 1.35rem; font-weight: 800; letter-spacing: 0.06em; font-family: var(--font-display); }
.bonus { font-size: 0.92rem; font-weight: 700; margin-top: 2px; }
@keyframes pop { from { transform: scale(0.97); opacity: 0; } }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.actions > * { flex: 1 1 auto; }

/* ---- results & share ----------------------------------------------------------------------------- */
.results, .result-card { text-align: center; }
.big-score { font-family: var(--font-display); font-size: clamp(3.4rem, 14vw, 5rem); font-weight: 700; line-height: 1; margin: 6px 0 16px; }
.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 16px; }
.stat-row:has(> :nth-child(2):last-child) { grid-template-columns: repeat(2, 1fr); }
.grid-emoji { font-size: 1.5rem; letter-spacing: 2px; margin-bottom: 18px; overflow-wrap: anywhere; }
.new-badges { background: var(--honey-soft); border-radius: 18px; padding: 14px; margin-bottom: 18px; animation: pop 0.4s ease; }
.new-badges .badge-grid { justify-content: center; }
.results h3, .result-card h2 { margin-top: 10px; }
.share { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 10px 0 6px; }
.share-native { flex-basis: 100%; }
.share-btn {
  padding: 9px 14px; border-radius: 12px; font-weight: 800; font-size: 0.92rem; text-decoration: none;
  border: none; cursor: pointer; color: #fff;
}
.share-btn.wa { background: #25d366; }
.share-btn.x { background: #111; }
.share-btn.fb { background: #1877f2; }
.share-btn.tg { background: #229ed9; }
.share-btn.copy { background: var(--ink); color: var(--bg); }
.review { list-style: none; padding: 0; margin: 8px 0 0; text-align: left; }
.review li { display: flex; justify-content: space-between; gap: 10px; padding: 9px 4px; border-bottom: 1px solid var(--line); }
.review .ok { font-weight: 800; }
.review .you { color: var(--bad); text-decoration: line-through; overflow-wrap: anywhere; }
.result-card h1 a { text-decoration: none; border-bottom: 3px solid var(--honey); }

/* ---- badges -------------------------------------------------------------------------------------- */
.badge-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; }
.badge {
  display: flex; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 16px;
  border: 1px solid var(--line); background: var(--bg); text-align: left; min-width: 0;
}
.badge-icon { font-size: 1.7rem; width: 44px; height: 44px; flex: none; display: grid; place-items: center; border-radius: 12px; background: var(--honey-soft); }
.badge strong { display: block; font-size: 0.95rem; }
.badge small { color: var(--muted); display: block; line-height: 1.3; }
.badge.locked { opacity: 0.55; }
.badge.locked .badge-icon { background: var(--line); filter: grayscale(1); }

/* ---- profile ------------------------------------------------------------------------------------- */
.profile-head { display: flex; align-items: center; gap: 16px; margin-bottom: 16px; }
.profile-head > div:nth-child(2) { flex: 1; min-width: 0; }
.profile-head h1 { margin: 0; overflow-wrap: anywhere; }
.profile-head p { margin: 0; }
.avatar {
  width: 72px; height: 72px; flex: none; border-radius: 22px; display: grid; place-items: center;
  font-family: var(--font-display); font-size: 2.2rem; font-weight: 700; color: #fff;
  box-shadow: inset 0 -5px 0 rgba(0, 0, 0, 0.15);
}
.profile .stats-strip { grid-template-columns: repeat(2, 1fr); }
@media (min-width: 760px) { .profile .stats-strip { grid-template-columns: repeat(5, 1fr); } }
.week-ranks-group { margin-bottom: 14px; }
.week-ranks-group:last-child { margin-bottom: 0; }
.week-ranks { display: grid; grid-template-columns: repeat(auto-fit, minmax(80px, 1fr)); gap: 10px; }
.week-rank {
  display: flex; flex-direction: column; align-items: center; padding: 12px 6px; border-radius: 16px;
  text-decoration: none; border: 1px solid var(--line); border-top: 5px solid var(--line);
}
.week-rank.easy { border-top-color: var(--easy); }
.week-rank.medium { border-top-color: var(--medium); }
.week-rank.hard { border-top-color: var(--hard); }
.week-rank.add { border-top-color: var(--op-add); }
.week-rank.subtract { border-top-color: var(--op-subtract); }
.week-rank.multiply { border-top-color: var(--op-multiply); }
.week-rank.divide { border-top-color: var(--op-divide); }
.week-rank span { font-weight: 800; font-size: 0.85rem; color: var(--muted); }
.week-rank strong { font-family: var(--font-display); font-size: 1.6rem; }
.week-rank small { color: var(--muted); }
.mine { border: 2px dashed var(--honey-deep); }
.player-code { display: block; padding: 12px; border-radius: 12px; background: var(--bg); border: 1px solid var(--line); font-size: 0.95rem; overflow-wrap: anywhere; user-select: all; margin-bottom: 8px; }

/* ---- join ---------------------------------------------------------------------------------------- */
.join-form { display: flex; gap: 8px; }
.join-form .input { flex: 1; min-width: 0; font-size: 1.15rem; font-weight: 700; }
.ideas { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 10px 0 8px; }

/* ---- admin --------------------------------------------------------------------------------------- */
.admin-words { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 0.9rem; margin-bottom: 10px; }
.admin-controls .btn { margin-top: 14px; }
.admin-msg { margin-top: 10px; font-weight: 700; }

/* ---- loading ------------------------------------------------------------------------------------- */
.skeleton { color: var(--muted); font-weight: 700; animation: fade 1.2s ease-in-out infinite alternate; }
@keyframes fade { to { opacity: 0.45; } }
[data-pending] { opacity: 0.7; transition: opacity 0.2s; }

@media (max-width: 420px) {
  .nav a { padding: 8px 8px; }
  .logo span:last-child { display: none; }
  .card { padding: 18px 16px; }
  .speaker { width: 104px; height: 104px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
