/* Shared visual language for the two games in the color-sense lab. */
:root {
  color-scheme: light;
  --ink: #29464a;
  --muted: #637b7c;
  --bg: #f2faf7;
  --surface: #ffffff;
  --line: #dbeae4;
  --accent: #197d76;
  --accent-hover: #12655f;
  --accent-soft: #e6f5ef;
  --panel-pad: 24px;
  font-family: "Pretendard", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans KR", "Malgun Gothic", sans-serif;
}
body { padding: 24px 20px 48px; }
main { max-width: 660px; }
.top-nav { justify-content: space-between; align-items: center; margin-bottom: 28px; font-size: 13px; }
.top-nav a { text-decoration: none; padding: 0 4px; color: var(--muted); }
.top-nav a:first-child { background: #fff; color: var(--ink); padding: 0 16px; border: 1px solid var(--line); border-radius: 24px; font-weight: 700; box-shadow: 0 3px 0 #dbeae480; }
.top-nav a:hover { color: var(--accent); }
a:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; border-radius: 5px; }
.game-eyebrow { display: inline-flex; color: var(--accent); background: var(--accent-soft); border-radius: 20px; padding: 5px 10px; font-size: 11px; font-weight: 700; letter-spacing: .02em; margin: 0 0 10px; }
h1 { font-size: clamp(27px, 5.5vw, 36px); line-height: 1.35; letter-spacing: -.035em; margin: 0 0 12px; }
h2 { letter-spacing: -.025em; }
.lead { color: var(--muted); font-size: 14px; line-height: 1.85; margin-bottom: 24px; word-break: keep-all; }
.lead strong { color: var(--ink); }
.hint { font-size: 12px; line-height: 1.8; word-break: keep-all; }
.status { padding: 14px 12px; border-radius: 15px; background: #eef2e9; gap: 10px; }
.stat-label { font-size: 11px; margin-bottom: 3px; letter-spacing: .02em; }
.stat-value { font-size: 26px; letter-spacing: -.025em; font-variant-numeric: tabular-nums; }
.timebar { height: 5px; background: #e5e9df; border-radius: 4px; margin: 10px 0 18px; }
.board, .cover { border-radius: 24px; }
.board { padding: 10px; border-color: #dfe5db; grid-auto-rows: minmax(0, 1fr); caret-color: transparent; user-select: none; -webkit-user-select: none; }
.tile { border-radius: 7px; overflow: hidden; line-height: 1; caret-color: transparent; user-select: none; -webkit-user-select: none; touch-action: manipulation; }
.cover { gap: 24px; }
.rules { font-size: 14px; color: var(--muted); line-height: 2; word-break: keep-all; }
.rules strong { color: var(--ink); }
.btn { border-radius: 18px; font-size: 15px; min-height: 50px; transition: background .2s, transform .2s, box-shadow .2s; }
.btn:hover { background: var(--accent-hover); transform: translateY(-1px); }
.btn.secondary:hover { background: var(--accent-soft); }
.btn:active { transform: translateY(3px); box-shadow: none; }
.panel, .result { padding: var(--panel-pad); border-radius: 24px; box-shadow: 0 6px 0 #dbeae452, 0 12px 30px #335d4f05; }
.result { margin-top: 20px; }
.result-score { color: var(--accent); }
.result-note, .outcome-note { font-size: 14px; line-height: 1.8; }
.swatch { border-radius: 12px; }
.swatch-text, .diff-line { font-size: 13px; line-height: 1.8; }
.swatch-text code { font-size: 13px; overflow-wrap: anywhere; }
.actions { gap: 10px 16px; }
.actions a { font-size: 13px; }
.ch-btn { border-radius: 15px; border-width: 1px; gap: 10px; padding: 20px 8px; background: #fcfdf9; transition: background .2s, border-color .2s; }
.ch-btn:hover { background: #f2f5ec; border-color: #8ea58f; }
.ch-letter { font-size: 34px; }
.ch-name { font-size: 14px; }
.ch-record { font-size: 11px; line-height: 1.6; }
.bar-track { background: #eef0e9; height: 20px; }
.bar-label, .bar-text { font-size: 12px; }
.question, details p { font-size: 14px; }
.game-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 12px; }
.game-heading > div { min-width: 0; }
.game-heading h1 { margin-bottom: 0; }
.game-emblem { display: grid; place-items: center; width: 76px; height: 76px; flex-shrink: 0; padding: 4px; color: var(--accent); transform: rotate(5deg); }
.game-emblem svg { display: block; width: 100%; height: 100%; }
.board { border-color: #dedfd8; box-shadow: 0 6px 18px #252b2206; }
.btn { display: inline-flex; justify-content: center; align-items: center; gap: 16px; box-shadow: 0 4px 0 var(--accent-hover), 0 7px 14px #233b2a09; }
.btn > span[aria-hidden] { font-size: 20px; line-height: 1; }
.result-summary { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; margin: calc(-1 * var(--panel-pad)) calc(-1 * var(--panel-pad)) 20px; padding: 26px var(--panel-pad); border-radius: 23px 23px 0 0; border-bottom: 1px solid var(--line); background: var(--accent-soft); color: var(--ink); }
.result-summary .result-eyebrow { margin: 0 0 8px; color: var(--accent); font-size: 11px; font-weight: 700; letter-spacing: .02em; }
.result-summary .result-eyebrow::before { content: "✦"; margin-right: 6px; }
.result-summary h2 { margin: 0; color: var(--ink); font-size: 20px; line-height: 1.5; }
.result-summary .result-score, .result-summary .total-score { margin: 0; color: var(--accent); font-size: 48px; font-weight: 800; line-height: 1.15; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.result-summary small { font-size: 15px; font-weight: 500; letter-spacing: 0; }
.sprint-game { --accent: #b8513d; --accent-hover: #98422f; --accent-soft: #fff0e7; }
.sprint-game .status { padding: 0; border: 0; gap: 12px; background: transparent; }
.sprint-game .stat { padding: 16px; text-align: left; border: 1px solid var(--line); border-radius: 19px; background: #fff; box-shadow: 0 3px 0 #dbeae466; }
.sprint-game .stat:first-child { background: #edf3ff; border-color: #d8e3f4; }
.sprint-game .stat-score { background: #e9f7ef; border-color: #d1e9dc; }
.sprint-game .stat-label { color: var(--muted); font-weight: 600; margin-bottom: 8px; }
.sprint-game .stat-value { font-size: 32px; font-weight: 750; line-height: 1.2; }
.sprint-game .stat-time { background: #fff1e8; border-color: #efdbce; }
.sprint-game .timebar { height: 8px; border-radius: 8px; margin: 14px 0 20px; background: #e5efea; }
.sprint-game .timebar-fill { border-radius: inherit; }
.sprint-game .penalty { z-index: 1; padding: 4px 9px; background: #fff; border: 1px solid #efd1c8; border-radius: 20px; font-size: 13px; }
.sprint-game .cover { gap: 18px; overflow-y: auto; background: #fffcf8; border: 1px solid #eadfd3; box-shadow: 0 6px 0 #e8e4d850; }
.cover-title { margin: 0; font-size: 22px; line-height: 1.4; }
.cover-preview { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; width: 104px; height: 104px; padding: 9px; border: 1px solid #f0d9c8; border-radius: 22px; background: #fff; box-shadow: 0 5px 0 #f2dfce; transform: rotate(-6deg); }
.cover-preview i { display: block; background: #e88e72; border-radius: 6px; }
.cover-preview i:nth-child(5) { position: relative; background: #ffcfac; }
.cover-preview i:nth-child(5)::before { content: ""; position: absolute; width: 3px; height: 4px; left: 7px; top: 7px; border-radius: 50%; background: #784635; box-shadow: 8px 0 #784635; }
.cover-preview i:nth-child(5)::after { content: ""; position: absolute; width: 7px; height: 4px; left: 9px; top: 13px; border-bottom: 2px solid #784635; border-radius: 0 0 8px 8px; }
.sprint-game #startBtn { min-width: 200px; }
.sprint-game .result-note { margin: 0 0 20px; }
@media (max-width: 480px) {
  :root { --panel-pad: 16px; }
  body { padding: 16px 16px 32px; }
  .top-nav { margin-bottom: 22px; }
  .panel, .result { padding: 16px; }
  .ch-btn { padding: 16px 5px; }
  .ch-name { font-size: 12px; }
  .board { padding: 7px; gap: 5px; }
  .rules { font-size: 13px; line-height: 1.9; }
  .cover { padding: 18px; gap: 18px; }
  .game-emblem { width: 58px; height: 58px; padding: 2px; }
  .sprint-game .status { gap: 8px; }
  .sprint-game .stat { padding: 12px 10px; }
  .sprint-game .stat-value { font-size: 26px; }
  .sprint-game .stat-label { font-size: 10px; }
  .sprint-game .cover { gap: 12px; }
  .cover-preview { display: none; }
  .cover-title { font-size: 19px; }
  .sprint-game .rules { font-size: 12px; line-height: 1.7; }
  .result-summary { gap: 12px; padding-top: 20px; padding-bottom: 20px; }
  .result-summary .result-score, .result-summary .total-score { font-size: 40px; }
}
@media (prefers-reduced-motion: reduce) {
  .btn, .ch-btn { transition: none; }
  .btn:active { transform: none; }
}
