/* System fonts and native SVG; no external assets. */
:root {
  font-family: Arial, Helvetica, sans-serif;
  color: #161a1d;
  background: #f5f3f4;
  font-synthesis: none;
  color-scheme: light;
  --muted: #555052;
  --line: #d3d3d3;
  --foreground: #161a1d;
}
* { box-sizing: border-box; }
body { margin: 0; }
button { font: inherit; cursor: pointer; }
button:disabled { cursor: default; }
button:focus-visible { outline: 3px solid #e5383b; outline-offset: 4px; }
[hidden] { display: none !important; }
.shell { max-width: 1280px; margin: auto; padding: 0 44px 24px; }
.masthead { height: 68px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.game-intro { margin: 14px 0 0; max-width: 1000px; font-size: 15px; line-height: 1.5; color: #555052; }
.wordmark { display: flex; gap: 6px; align-items: center; margin: 0; font-size: 17px; font-weight: 700; letter-spacing: -.6px; }
.wordmark > span:last-child { font-weight: 400; }
.brand-mark { display: flex; align-items: flex-end; gap: 3px; height: 24px; width: 32px; margin-right: 10px; }
.brand-mark i { width: 5px; background: #e5383b; height: 65%; }
.brand-mark i:nth-child(2) { height: 100%; }
.brand-mark i:nth-child(3) { height: 43%; }
.brand-mark i:nth-child(4) { height: 80%; }
.quiet-button { border: 1px solid #b1a7a6; border-radius: 6px; padding: 9px 16px; background: transparent; color: #161a1d; font-size: 12px; min-width: 80px; }
.quiet-button:hover { background: #ffffff; }
.header-tools { display: grid; grid-template-columns: auto auto; align-items: center; gap: 4px 16px; margin-left: auto; }
.header-tools .version { grid-column: 2; justify-self: end; }
.header-tools .header-actions { grid-column: 2; grid-row: 2; }
.header-tools .level-hint { grid-column: 1; grid-row: 2; }
.version { font-size: 10px; line-height: 1; color: var(--muted); font-variant-numeric: tabular-nums; }
.header-actions, .level-controls { display: flex; align-items: center; gap: 8px; }
.header-actions { gap: 16px; }
.level-button { display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 6px; background: transparent; color: #555052; font-size: 12px; }
.level-button[aria-pressed="true"] { background: #a4161a; border-color: #a4161a; color: #ffffff; }
.level-button:disabled { color: #555052; background: #f5f3f4; }
.lock-icon { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 1.5; flex: none; }
.level-button[aria-pressed="true"]:disabled { opacity: 1; background: #a4161a; color: #ffffff; }
.dashboard { display: grid; grid-template-columns: minmax(160px, 1fr) minmax(220px, 1.8fr) 150px; gap: 38px; align-items: center; padding: 30px 0 26px; }
.contribution-card, .time-card { display: flex; flex-direction: column; }
.metric-label { font-size: 12px; letter-spacing: 1.2px; font-weight: 700; color: var(--muted); }
.contribution-card > strong { font-size: 70px; font-weight: 500; letter-spacing: -4px; font-variant-numeric: tabular-nums; line-height: 1.2; }
.live-rate { font-size: 16px; color: var(--foreground); font-variant-numeric: tabular-nums; }
.time-card { border-left: 1px solid var(--line); padding-left: 26px; }
.time-card > strong { font-size: 38px; font-weight: 500; font-variant-numeric: tabular-nums; letter-spacing: -1.5px; margin: 12px 0 10px; }
.time-track { height: 3px; width: 100%; background: #d3d3d3; }
.time-track i { display: block; height: 100%; width: 100%; background: #e5383b; }
.history-card { min-width: 0; position: relative; }
.chart-empty { position: absolute; inset: 35px 0 30px; margin: 0; display: grid; place-items: center; font-size: 13px; color: #555052; background: #f5f3f4; pointer-events: none; }
.level-hint { font-size: 12px; color: var(--muted); margin: 0; }
.level-note { margin: 0; padding: 10px 20px 0; text-align: center; font-size: 13px; color: #555052; }
.history-card > .metric-label { display: block; margin: 0 0 8px 12px; }
.chart-frame { position: relative; height: 106px; }
.contribution-history { display: block; width: 100%; height: 100%; overflow: visible; }
.chart-guide { fill: none; stroke: #d3d3d3; stroke-width: 1; }
.chart-area { fill: #a4161a; opacity: .35; }
.chart-line { fill: none; stroke: var(--foreground); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart-comparison { fill: none; stroke: #e5383b; stroke-width: 2; stroke-dasharray: 5 4; stroke-linejoin: round; stroke-linecap: round; }
.chart-legend { display: flex; justify-content: center; gap: 18px; font-size: 12px; color: var(--muted); margin: 2px 0 8px; }
.chart-legend span { display: inline-flex; align-items: center; gap: 6px; }
.chart-legend span::before { content: ''; width: 20px; border-top: 2px solid var(--foreground); }
.chart-legend span:last-child::before { border-top: 2px dashed #e5383b; }
.chart-maximum, .chart-time-axis { position: absolute; color: var(--muted); font-family: inherit; font-size: 11px; font-weight: 400; line-height: 1; font-variant-numeric: tabular-nums; pointer-events: none; }
.chart-maximum { top: 0; left: 3.333333%; }
.chart-time-axis { bottom: 3px; left: 3.333333%; right: 3.333333%; display: flex; justify-content: space-between; }
.chart-time-axis span:nth-child(2) { position: absolute; left: 50%; transform: translateX(-50%); }
.workload { background: #ffffff; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.board-help { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px 24px; padding: 12px 20px; border-top: 1px solid var(--line); }
.input-help { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
kbd { font: inherit; padding: 2px 5px; border: 1px solid #b1a7a6; border-bottom-width: 2px; border-radius: 4px; background: #f5f3f4; color: var(--foreground); }
.board-hint { padding: 0; margin: 0; text-align: center; font-size: 16px; font-weight: 600; color: #161a1d; line-height: 1.4; }
.board { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px; padding: 24px 36px 28px; }
.column { min-width: 0; width: 70%; justify-self: center; --fill: #a4161a26; --ink: #a4161a; --wash: #f5f3f4; }
.column.is-locked { --fill: #b1a7a6; --ink: #b1a7a6; --wash: #d3d3d3; }
.column.is-locked .column-track { border-color: #b1a7a6; }
.column.is-locked .column-progress { color: #555052; }
.column-progress { position: absolute; top: 0; left: 0; right: 0; height: 10%; min-height: 32px; display: flex; align-items: center; justify-content: center; color: #161a1d; background: transparent; z-index: 3; font-size: 30px; font-variant-numeric: tabular-nums; letter-spacing: -1px; font-weight: 500; pointer-events: none; }
.contribution-note { margin: 12px 0 0; text-align: center; font-size: 13px; line-height: 1.5; color: var(--muted); }
.contribution-note span { display: inline-block; margin-top: 3px; color: var(--foreground); font-variant-numeric: tabular-nums; }
.column-track { height: clamp(190px, 36vh, 350px); position: relative; background: var(--wash); border: 1px solid #b1a7a6; border-radius: 7px; overflow: hidden; isolation: isolate; }
.column-track::after { content: ''; position: absolute; inset: 0; background: repeating-linear-gradient(to top, transparent 0, transparent calc(25% - 1px), #161a1d1c calc(25% - 1px), #161a1d1c 25%); z-index: 2; pointer-events: none; }
.column-fill { position: absolute; inset: auto 0 0; height: 0; background: var(--fill); border-top: 1px solid #a4161a66; }
.column.is-active .column-track { border-color: var(--ink); }
.activator { display: flex; position: relative; flex-direction: column; align-items: center; justify-content: center; gap: 1px; width: 100%; height: 48px; margin-top: 12px; border: 1px solid #b1a7a6; border-radius: 6px; color: #161a1d; background: var(--wash); font-size: 14px; font-weight: 600; overflow: hidden; touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.warmup-label { font-size: 11px; font-weight: 400; line-height: 1.1; }
.warmup-meter { position: absolute; bottom: 0; left: 0; height: 2px; background: currentColor; opacity: .7; }
.activator:hover:enabled { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.activator:disabled { opacity: .5; }
.column.is-active .activator { background: #a4161a1a; color: #660708; border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.primary-button { display: flex; align-items: center; justify-content: space-between; width: 100%; border: 0; border-radius: 6px; background: #a4161a; color: #ffffff; padding: 13px 20px; font-size: 13px; font-weight: 600; }
.primary-button:hover { background: #ba181b; }
.secondary-button { border: 1px solid #b1a7a6; background: #ffffff; color: #161a1d; }
.secondary-button:hover { background: #f5f3f4; }
#next-level { margin-bottom: 10px; }
dialog { border: 1px solid var(--line); border-radius: 14px; background: #ffffff; color: #161a1d; padding: 0; width: min(480px, calc(100% - 32px)); max-height: 90vh; }
dialog::backdrop { background: #0b090acc; backdrop-filter: blur(4px); }
.result-content { padding: 28px 32px; }
.result-content h2 { font-size: 25px; font-weight: 500; margin: 0 0 22px; letter-spacing: -.7px; }
.result-content > .metric-label { display: block; }
.result-total { display: block; font-size: 72px; line-height: 1.2; letter-spacing: -4px; font-weight: 500; font-variant-numeric: tabular-nums; }
.result-content > p { font-size: 12px; color: var(--muted); margin: 8px 0 18px; }
.result-history { margin-bottom: 12px; }
.result-comparison { padding: 12px 0; margin-bottom: 12px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.result-comparison h3 { font-size: 12px; font-weight: 500; color: var(--muted); margin: 0 0 6px; }
.result-comparison p { font-size: 15px; font-weight: 600; margin: 0 0 8px; }
.result-comparison .comparison-message { font-size: 13px; font-weight: 400; line-height: 1.4; color: var(--foreground); margin-bottom: 12px; }
.result-comparison table { width: 100%; border-collapse: collapse; font-size: 12px; font-variant-numeric: tabular-nums; }
.result-comparison th, .result-comparison td { padding: 4px 0; text-align: right; }
.result-comparison tbody th { text-align: left; font-weight: 400; color: var(--muted); }
.result-comparison thead th { font-size: 10px; color: var(--muted); }
.has-comparison .result-content { padding: 18px 24px; }
.has-comparison .result-content h2 { margin-bottom: 8px; font-size: 22px; }
.has-comparison .result-total { font-size: 48px; }
.has-comparison .result-content > p { margin: 4px 0 8px; }
.has-comparison .result-history { height: 80px; margin-bottom: 4px; }
@media (min-width: 850px) and (max-height: 820px) {
  .masthead { height: 52px; }
  .game-intro { margin-top: 10px; }
  .dashboard { padding: 10px 0; }
  .contribution-card > strong { font-size: 60px; }
  .history-card > .metric-label { margin-bottom: 4px; }
  .chart-frame { height: 92px; }
  .board-help { padding: 10px 16px; }
  .board { padding: 18px 30px 20px; gap: 24px; }
  .column-progress { font-size: 26px; }
  .column-track { height: clamp(140px, 32vh, 245px); }
  .activator { height: 44px; margin-top: 10px; }
  .result-content { padding: 22px 28px; }
  .result-content h2 { margin-bottom: 14px; }
  .result-total { font-size: 58px; }
}
@media (min-width: 850px) and (max-height: 650px) {
  .shell { padding-bottom: 8px; }
  .game-intro { max-width: none; }
  .board-help { padding: 8px 16px; }
  .history-card .chart-legend { position: absolute; top: 0; right: 0; margin: 0; font-size: 10px; gap: 12px; }
  .board { padding-top: 14px; padding-bottom: 16px; }
  .column-track { height: clamp(140px, 30vh, 245px); }
  .contribution-note { margin-top: 6px; }
  .contribution-note span { margin-top: 1px; }
}
@media (max-width: 849px) {
  .column { width: 85%; }
  .shell { padding: 0 22px 20px; }
  .dashboard { grid-template-columns: 1fr 1.4fr 110px; gap: 20px; }
  .contribution-card > strong { font-size: 52px; }
  .time-card { padding-left: 14px; }
  .time-card > strong { font-size: 30px; }
  .board { padding: 20px; gap: 16px; }
  .column-progress { font-size: 25px; }
}
@media (max-width: 580px) {
  .column { width: 100%; }
  .masthead { height: auto; min-height: 58px; padding: 12px 0; gap: 10px; flex-wrap: wrap; }
  .header-actions { gap: 8px; }
  .header-tools { gap: 4px 10px; }
  .header-tools .level-hint { grid-column: 1 / -1; grid-row: 3; justify-self: end; }
  .level-button { font-size: 11px; padding: 7px 9px; }
  .wordmark { font-size: 14px; }
  .brand-mark { margin-right: 3px; width: 26px; }
  .quiet-button { min-width: auto; padding: 8px 10px; }
  .dashboard { grid-template-columns: 1fr 1fr; gap: 18px; padding: 22px 0 16px; }
  .history-card { grid-column: 1 / -1; grid-row: 2; }
  .history-card > .metric-label { margin-left: 0; }
  .chart-frame { height: 90px; }
  .time-card { justify-self: end; width: 110px; }
  .board { padding: 16px 10px; gap: 9px; }
  .column-progress { font-size: 23px; }
  .column-track { height: 190px; }
  .activator { gap: 2px; font-size: 12px; }
  .board-hint { font-size: 14px; }
  .chart-empty { font-size: 12px; }
  .game-intro { font-size: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
