/* Games */
.modes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 20px; }
@media (max-width: 820px) { .modes { grid-template-columns: 1fr; } }
.mode {
  font: inherit; color: var(--text); text-align: left; cursor: pointer; display: flex; flex-direction: column; gap: 8px;
  transition: transform .15s, border-color .15s;
}
.mode:hover, .mode[aria-pressed="true"] { transform: translateY(-3px); border-color: var(--accent); }
.mode-tiles { display: flex; gap: 6px; align-items: center; min-height: 48px; }
.mode-tiles .tile .sym { font-size: 21px; }
.mode-q { font-family: var(--font-display); font-size: 1.6rem; }
.mode-q.ok { color: var(--accent); } .mode-q.no { color: var(--bad); }
.mode-name { font-family: var(--font-display); font-size: 1.3rem; }
.mode-desc { color: var(--muted); font-size: .93rem; }
.mode-best { font-size: .85rem; font-weight: 700; color: var(--accent); min-height: 1.2em; }

.game { margin-top: 22px; }
.hud { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-bottom: 10px; }
.hud-item { background: var(--bg2); border: 1px solid var(--line); border-radius: 12px; padding: 6px 14px; text-align: center; min-width: 88px; }
.hud-k { display: block; font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); font-weight: 700; }
.hud-v { font-family: var(--font-display); font-size: 1.4rem; }
.hud-v.low { color: var(--bad); }
.center-t { text-align: center; }
.center-row { justify-content: center; margin-top: 16px; }

/* split */
.split-word { display: flex; flex-wrap: wrap; justify-content: center; align-items: stretch; row-gap: 10px; margin: 18px auto 8px; max-width: 100%; }
.letter {
  display: inline-grid; place-items: center; width: clamp(30px, 8vw, 50px); height: clamp(46px, 11vw, 64px);
  font-family: var(--font-display); font-size: clamp(1.2rem, 4.6vw, 2rem); text-transform: uppercase;
  background: var(--bg2); border: 2px solid var(--line); color: var(--text);
}
.letter.seg-start { border-top-left-radius: 10px; border-bottom-left-radius: 10px; }
.letter.seg-end { border-top-right-radius: 10px; border-bottom-right-radius: 10px; }
.letter.ok { background: linear-gradient(150deg, var(--tile-a), var(--tile-b)); border-color: var(--tile-edge); color: #fff; }
.letter.bad { border-color: var(--bad); color: var(--bad); }
.gapbtn {
  width: clamp(12px, 3.2vw, 20px); border: 0; background: transparent; cursor: pointer; position: relative; padding: 0; color: var(--muted);
}
.gapbtn::after { content: ""; position: absolute; left: 50%; top: 18%; bottom: 18%; width: 2px; transform: translateX(-50%); background: var(--line); border-radius: 2px; }
.gapbtn:hover::after { background: var(--accent-2); }
.gapbtn[aria-pressed="true"] { width: clamp(16px, 4vw, 26px); }
.gapbtn[aria-pressed="true"]::after { background: transparent; }
.gapbtn.joined { width: 0; }
.gapbtn.joined::after { display: none; }
.split-tiles { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px; min-height: 64px; margin-top: 6px; }
.split-tiles .tile { --t: 56px; }
.solved .letter { animation: pop .4s ease both; }

/* sprint */
.diff h2 { text-align: center; }
.diff-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
@media (max-width: 720px) { .diff-grid { grid-template-columns: 1fr; } }
.diff-btn { font: inherit; color: var(--text); cursor: pointer; text-align: left; display: flex; flex-direction: column; gap: 4px; }
.diff-btn:hover { border-color: var(--accent); }
.diff-btn span { color: var(--muted); font-size: .9rem; }
.q-prompt { display: flex; flex-direction: column; align-items: center; gap: 10px; margin: 14px 0; text-align: center; font-size: 1.2rem; font-weight: 600; }
.q-prompt .tile { --t: 110px; }
.q-prompt .big-name { font-family: var(--font-display); font-size: clamp(1.8rem, 7vw, 2.8rem); }
.q-choices { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; max-width: 560px; margin: 0 auto; }
.q-choice {
  font: inherit; font-weight: 700; font-size: 1.1rem; padding: 16px 10px; border-radius: 14px; cursor: pointer;
  background: var(--bg2); border: 2px solid var(--line); color: var(--text);
}
.q-choice:hover:not([disabled]) { border-color: var(--accent); }
.q-choice.right { background: color-mix(in srgb, var(--accent) 30%, transparent); border-color: var(--accent); }
.q-choice.wrong { background: color-mix(in srgb, var(--bad) 25%, transparent); border-color: var(--bad); }
.q-choice.sym { font-family: var(--font-display); font-size: 1.5rem; }
.q-feedback { text-align: center; min-height: 3em; color: var(--muted); margin-top: 12px; }

/* odd */
.odd-word { text-align: center; font-family: var(--font-display); font-size: clamp(2rem, 9vw, 3.8rem); margin: 22px 0 6px; letter-spacing: .03em; word-break: break-word; }
.odd-reveal { display: flex; justify-content: center; flex-wrap: wrap; gap: 4px; min-height: 52px; align-items: center; }
.odd-reveal .tile { --t: 44px; }
.odd-reveal .msg { width: 100%; text-align: center; font-weight: 700; margin-top: 4px; }
.odd-reveal .msg.good { color: var(--accent); } .odd-reveal .msg.bad { color: var(--bad); }
.big-btn { font-size: 1.15rem; padding: 16px 24px; min-width: 160px; }
.big-btn.no { background: var(--bad); }
.big-btn kbd { font-family: var(--font-mono); font-size: .75rem; opacity: .7; border: 1px solid currentColor; border-radius: 4px; padding: 0 4px; }
@media (max-width: 520px) { .big-btn kbd { display: none; } .big-btn { min-width: 0; flex: 1; } }

/* end */
.end-score { font-family: var(--font-display); font-size: clamp(3rem, 12vw, 5rem); color: var(--accent); line-height: 1; margin: 6px 0 10px; }
.review { list-style: none; padding: 0; display: grid; gap: 6px; margin: 10px 0 0; }
.review li { display: flex; align-items: center; gap: 10px; font-size: .92rem; }
.review .tile { --t: 36px; }
