body { margin:0; color:#203850; background:#f5f4ed; font:16px/1.55 var(--pd-font-ui,system-ui); }
* { box-sizing:border-box; }
a { color:#12665e; text-underline-offset:3px; }
a:focus-visible,button:focus-visible { outline:3px solid #b35024; outline-offset:3px; }
.top { display:flex; justify-content:space-between; align-items:center; gap:12px; padding:8px max(16px,calc((100% - 1120px)/2)); border-bottom:1px solid #dbe1d7; background:#fffdf7; }
.top a { font-size:14px; font-weight:700; text-decoration:none; }
.langs { display:flex; gap:4px; }.langs a { padding:10px; }.langs [aria-current=page] { border-radius:8px; background:#e0f0e7; }
main { max-width:1160px; margin:auto; padding:24px 20px 48px; }
.eyebrow { margin:0; font-size:12px; letter-spacing:.12em; color:#12665e; font-weight:770; }
h1 { margin:2px 0; font-size:clamp(30px,4vw,48px); line-height:1.2; }
.subtitle { margin:6px 0 18px; color:#4d6373; }
.layout { display:grid; grid-template-columns:minmax(0,1.8fr) minmax(260px,1fr); gap:16px; align-items:start; }
.board-panel,.panel { background:#fffdf7; border:1px solid #d9dfd5; border-radius:14px; padding:14px; min-width:0; }
.board-head { display:flex; align-items:center; justify-content:space-between; gap:8px; margin-bottom:8px; }
h2 { font-size:17px; margin:0; }h3 { font-size:13px; margin:12px 0 4px; }
#clock { white-space:nowrap; color:#365961; font-weight:700; font-size:13px; }
canvas { display:block; width:100%; height:auto; background:#e6efe0; border-radius:8px; }
@media (min-width:721px) and (max-height:850px) {
  main { padding-top:14px; }
  h1 { font-size:36px; }
  canvas { width:min(100%, max(390px, (100vh - 414px) * 10 / 7)); margin-inline:auto; }
  .route-controls { display:flex; flex-wrap:wrap; gap:6px 14px; }
  .board-panel .status { min-height:24px; }
}
.legend { color:#4d6373; font-size:11px; margin:8px 0; }
.status { font-size:13px; min-height:42px; margin:6px 0; color:#2e5159; }
.status[data-result=collision],.status[data-result=wrongPlatform],.status[data-result=late] { color:#983b2f; }
.actions,.control-row,.levels { display:flex; flex-wrap:wrap; gap:6px; }
.control-row { margin-top:8px; }
button { font:650 13px/1.3 var(--pd-font-ui,system-ui); background:#eef0e8; color:#203850; border:1px solid #c9d5c8; border-radius:7px; min-height:44px; padding:8px 11px; cursor:pointer; }
button[hidden] { display:none; } button:disabled { opacity:.5; cursor:default; }
button[aria-pressed=true] { background:#e0f1e6; border-color:#8db7a2; }button[data-stop=true] { background:#f9e8df; border-color:#e4b9a8; }
button.primary { flex:1; background:#176d63; border-color:#176d63; color:white; }
.levels { margin-top:8px; }.levels button { flex:1; min-width:34px; padding:6px; }
.levels button[aria-current=true] { background:#176d63; color:white; }
.panel + .panel { margin-top:12px; }
#routes { margin:0; list-style:none; padding:0; font-size:13px; }
#routes li { margin:4px 0; overflow-wrap:anywhere; }
.guide p { font-size:13px; margin:6px 0; }.guide a { font-size:14px; font-weight:650; }
@media(max-width:720px) {
  main { padding:16px 11px 32px; }.layout { display:contents; }
  aside { display:contents; }.board-panel,.panel { margin-top:8px; padding:10px; }
  main { display:flex; flex-direction:column; }.board-panel { order:0; }
  .panel:nth-child(2) { order:1; }.panel:first-child { order:2; }.guide { order:3; }
  .subtitle { font-size:14px; margin-bottom:4px; }.status { min-height:0; }.legend { font-size:10px; }
}
