.game-page {
  --ink: #f4f1fb;
  --muted: #c1b9d2;
  --edge: #514267;
  --panel: #1c172c;
  --accent: #b9f6dc;
  min-height: 100vh;
  color: var(--ink);
  background: radial-gradient(ellipse at 28% 0%, #312047 0%, #161222 42%, #100d1a 79%);
}

.run-header, .run-layout { width: min(1216px, calc(100% - 48px)); margin-inline: auto; }
.run-header { min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid #453654; }
.settings { display: flex; flex-wrap: wrap; justify-content: end; gap: 8px; }
.run-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(236px, 280px); gap: 24px; padding-block: 34px; }
.game-heading { display: flex; justify-content: space-between; gap: 12px; align-items: end; margin-bottom: 15px; }
.section-label { margin: 0 0 4px; color: #e2bbfc; font-size: .85rem; font-weight: 650; }
.game-heading h1 { font-size: clamp(2.4rem, 5vw, 4.5rem); line-height: .98; letter-spacing: -.065em; margin: 0; }
.personal { margin: 0; color: var(--muted); font-size: .85rem; text-align: right; }
.personal strong { display: block; font-size: 1.35rem; color: var(--accent); font-variant-numeric: tabular-nums; }

.console { overflow: hidden; border: 1px solid var(--edge); border-radius: 17px; background: #141124; box-shadow: 0 18px 56px #08051180; }
.hud { display: flex; min-height: 66px; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 14px; background: #211932; border-bottom: 1px solid var(--edge); }
.hud div > span { display: block; font-size: .74rem; color: var(--muted); white-space: nowrap; }
.hud div > strong { display: block; font-size: 1rem; font-variant-numeric: tabular-nums; }
#charge, #charge i { background: none; }
#charge { display: flex; align-items: center; gap: 4px; height: 23px; }
#charge i { display: block; width: 11px; height: 11px; border: 1px solid #b09dc8; transform: rotate(45deg); }
#charge i.filled { background: #ffd198; border-color: #ffd198; }
.stage { position: relative; min-height: 360px; aspect-ratio: 8 / 5; isolation: isolate; }
.stage canvas { position: absolute; width: 100%; height: 100%; inset: 0; display: block; touch-action: none; }
.overlay { position: absolute; inset: 0; display: grid; place-items: center; overflow: auto; padding: 14px; background: #100c22a8; }
.overlay-content { width: min(100%, 405px); padding: 19px 23px; border: 1px solid #79658f; border-radius: 14px; background: #1d152def; box-shadow: 0 14px 40px #0a0827a0; }
.game-page [hidden] { display: none !important; }
.overlay h2, .sidebar h2 { margin: 0 0 8px; letter-spacing: -.025em; }
.overlay p { margin: 0 0 10px; color: var(--muted); line-height: 1.42; }
.overlay .warning { padding: 8px 10px; border-left: 3px solid #e7ad84; background: #402638; color: #f6d9cf; font-size: .88rem; }
.warning strong { color: #ffe6d6; }
.quiet, .primary, .entry-row input { font: inherit; font-size: .875rem; }
.quiet, .primary { cursor: pointer; min-height: 40px; padding: 7px 12px; border-radius: 8px; font-weight: 650; }
.quiet { border: 1px solid #66557e; background: #241b36; color: var(--ink); }
.quiet:hover:not(:disabled) { background: #38264f; }
.quiet[aria-pressed="true"] { border-color: var(--accent); color: var(--accent); }
.primary { border: 1px solid var(--accent); background: var(--accent); color: #162b28; }
.primary:hover:not(:disabled) { background: #dcfff0; }
.game-page button:disabled { opacity: .52; cursor: default; }
.game-page :focus-visible { outline: 2px solid #ffe0a2; outline-offset: 3px; }
.result-score { font-size: clamp(1.8rem, 5vw, 3rem); line-height: 1.05; font-weight: 750; color: var(--accent); margin-bottom: 6px; }
.run-summary { font-size: .88rem; }
#score-form label { display: block; font-weight: 600; font-size: .84rem; margin-bottom: 4px; }
.entry-row { display: flex; flex-wrap: wrap; gap: 6px; }
.entry-row input { min-width: 115px; width: 150px; flex: 1; padding: 7px 9px; min-height: 40px; border: 1px solid #79658f; background: #151122; color: var(--ink); border-radius: 8px; }
.overlay .submission { font-size: .8rem; min-height: 16px; margin: 4px 0; }
.play-controls { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 12px; }
.play-controls p { margin: 0 0 0 4px; font-size: .8rem; color: var(--muted); }
.play-controls button { min-width: 44px; touch-action: manipulation; }
.play-controls kbd { font: inherit; font-weight: 700; color: #f3e3fb; }
.sidebar { display: grid; align-content: start; gap: 13px; padding-top: 5px; }
.board, .tips { background: var(--panel); border: 1px solid #433651; border-radius: 14px; padding: 17px; }
.board-heading { display: flex; align-items: start; justify-content: space-between; gap: 7px; }
.board-heading h2, .tips h2 { font-size: 1.14rem; }
#board-mode { font-size: .75rem; white-space: nowrap; color: var(--accent); }
#board-note { color: var(--muted); font-size: .84rem; margin: 0 0 7px; }
#scores { margin: 0; padding: 0; list-style: none; }
#scores li { display: grid; grid-template-columns: 24px minmax(0, 1fr) auto; gap: 7px; padding: 8px 0; border-bottom: 1px solid #40364c; align-items: baseline; font-size: .88rem; }
#scores li span:first-child { color: #d9abd1; font-variant-numeric: tabular-nums; }
#scores li span:nth-child(2) { overflow-wrap: anywhere; }
#scores li strong { color: var(--accent); font-variant-numeric: tabular-nums; }
.tips dl, .tips dd { margin: 0; }
.tips dl { display: grid; gap: 10px; }
.tips dt { font-weight: 650; font-size: .91rem; }
.tips dd { color: var(--muted); font-size: .86rem; }

@media (max-width: 850px) {
  .run-layout { grid-template-columns: 1fr; }
  .sidebar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 540px) {
  .run-header, .run-layout { width: calc(100% - 22px); }
  .run-header { min-height: 57px; gap: 5px; }
  .run-header .brand-name { display: none; }
  .settings { gap: 5px; }
  .run-layout { padding-block: 20px; gap: 14px; }
  .console { border-radius: 11px; }
  .hud { gap: 5px; min-height: 53px; padding: 5px; }
  .hud .quiet { padding-inline: 6px; }
  .hud div > strong { font-size: .85rem; }
  .stage { min-height: 350px; }
  .overlay { padding: 9px; }
  .overlay-content { padding: 12px 13px; }
  .sidebar { grid-template-columns: 1fr; }
}

.privacy-link{margin-left:8px;font-size:.85em;font-weight:500;color:inherit;text-decoration:underline;opacity:.8}
