:root { --ink:#16212c; --muted:#5a6775; --line:#d3dae1; --accent:#e8742a; --bg:#eef2f6; --card:#ffffffee; --bar:56px; }
* { box-sizing:border-box; }
html, body { margin:0; height:100%; overflow:hidden; background:var(--bg); color:var(--ink); font:15px/1.4 system-ui,-apple-system,"Segoe UI",Roboto,sans-serif; }
canvas#gl { position:fixed; inset:0; width:100%; height:100%; display:block; touch-action:none; outline:none; }
button, select { font:inherit; color:var(--ink); background:#fff; border:1px solid #9fb0bf; border-radius:10px; padding:8px 14px; cursor:pointer; }
button:hover { background:#f3f6f9; }
button.primary { background:var(--ink); color:#fff; border-color:var(--ink); }
button.mobile-only { display:none; }
button:disabled { opacity:.4; cursor:default; }
header#top { position:fixed; top:0; left:0; right:0; display:flex; gap:10px; align-items:center; padding:8px 12px; background:var(--card); backdrop-filter:blur(6px); border-bottom:1px solid var(--line); z-index:5; }
header#top .back { color:#1d5fa8; text-decoration:none; white-space:nowrap; font-size:14px; }
header#top select { max-width:46vw; padding:6px 10px; }
#stepLabel { font-weight:700; margin-left:auto; white-space:nowrap; }
header#top .back + .back { margin-left:auto; } header#top .back + .back + #stepLabel { margin-left:0; }
#panelToggle { display:none; padding:6px 12px; }
aside#panel { position:fixed; top:56px; right:10px; bottom:76px; width:min(340px,38vw); overflow:auto; background:var(--card); backdrop-filter:blur(6px); border:1px solid var(--line); border-radius:14px; padding:12px 14px; z-index:4; }
aside#panel h2 { margin:0 0 4px; font-size:19px; }
aside#panel h3 { margin:14px 0 2px; font-size:14px; text-transform:uppercase; letter-spacing:.04em; color:var(--muted); }
aside#panel p { margin:4px 0; font-size:14px; }
#stepMeta { color:var(--muted); }
#stepWhere { font-size:13px; background:#fff7e8; border:1px solid #f0d9a8; border-radius:8px; padding:6px 9px; }
#notes p { color:#7a3b0f; }
.hint { color:var(--muted); font-size:12.5px !important; margin:0 0 4px !important; }
ul#need { list-style:none; margin:0; padding:0; display:grid; gap:4px; }
ul#need li { display:flex; gap:9px; align-items:center; padding:4px 6px; border:2px solid transparent; border-radius:10px; cursor:pointer; user-select:none; }
ul#need li:hover { background:#f3f6f9; }
ul#need li.sel { border-color:#f2c200; background:#fffbe0; }
ul#need img { width:56px; height:42px; object-fit:contain; flex:none; }
ul#need b { font-size:18px; min-width:30px; }
ul#need .nm { font-size:13px; line-height:1.2; }
ul#need .nm small { color:var(--muted); display:block; }
.sw { display:inline-block; width:11px; height:11px; border-radius:3px; border:1px solid #0006; vertical-align:-1px; margin-right:4px; }
details#about { margin-top:12px; font-size:13px; } details#about summary { cursor:pointer; color:var(--muted); }
div#tools { position:fixed; left:10px; top:66px; display:flex; flex-direction:column; gap:6px; z-index:4; align-items:flex-start; }
div#tools button { padding:6px 12px; background:var(--card); font-size:14px; }
div#tools label { background:var(--card); border:1px solid var(--line); border-radius:10px; padding:4px 10px; font-size:13.5px; display:flex; gap:6px; align-items:center; cursor:pointer; }
nav#stepbar { position:fixed; left:50%; transform:translateX(-50%); bottom:calc(10px + env(safe-area-inset-bottom)); width:min(760px,calc(100vw - 20px)); display:flex; gap:10px; align-items:center; padding:8px; background:var(--card); backdrop-filter:blur(6px); border:1px solid var(--line); border-radius:16px; z-index:5; }
nav#stepbar input { flex:1; min-width:0; accent-color:var(--accent); height:28px; }
nav#stepbar button { min-width:84px; padding:11px 14px; }
#loading { position:fixed; inset:0; background:var(--bg); display:flex; align-items:center; justify-content:center; z-index:20; transition:opacity .3s; }
#loading.done { opacity:0; pointer-events:none; }
#loading .box { width:min(360px,80vw); text-align:center; }
#bar { height:8px; background:var(--line); border-radius:4px; overflow:hidden; margin-top:10px; } #bar i { display:block; height:100%; width:0; background:var(--accent); transition:width .2s; }
#err { color:#b00020; margin-top:10px; }
@media (max-width:760px) {
  #panelToggle { display:inline-block; }
  aside#panel { top:auto; left:8px; right:8px; bottom:76px; width:auto; max-height:42vh; }
  aside#panel.hidden { display:none; }
  header#top { gap:6px; padding:8px 8px; }
  header#top .back { font-size:0; } header#top .back::before { content:'←'; font-size:20px; }
  header#top select { flex:1; max-width:none; min-width:0; }
  #stepLabel { font-size:13px; }
  div#tools { top:54px; left:6px; right:6px; flex-direction:row; flex-wrap:wrap; gap:4px; }
  div#tools button { padding:4px 9px; font-size:13px; }
  div#tools label { padding:2px 7px; font-size:12px; display:none; }
  div#tools.open label { display:flex; }
  button.mobile-only { display:inline-block; }
  nav#stepbar button { min-width:70px; }
}

/* ---- build overview (overview.html) */
body.tour header#top .ttl { font-size:16px; }
body.tour header#top .sp { flex:1; }
section#tourbar { position:fixed; left:50%; transform:translateX(-50%); bottom:calc(10px + env(safe-area-inset-bottom)); width:min(980px,calc(100vw - 20px)); background:var(--card); backdrop-filter:blur(6px); border:1px solid var(--line); border-radius:16px; padding:10px 14px 8px; z-index:5; }
#tourbar .cap { display:flex; gap:16px; align-items:flex-start; justify-content:space-between; }
#tourbar h2 { margin:0; font-size:19px; }
#tourbar p { margin:2px 0 0; font-size:13.5px; color:var(--muted); max-width:62ch; }
#tourbar .count { text-align:right; white-space:nowrap; } #tourbar .count b { display:block; font-size:26px; line-height:1.1; font-variant-numeric:tabular-nums; } #tourbar .count span { font-size:12px; color:var(--muted); }
#tourbar .ctl { display:flex; gap:10px; align-items:center; margin:8px 0 4px; }
#tourbar .ctl button { padding:8px 14px; min-width:44px; }
#tPlay { min-width:104px !important; }
#speed { display:flex; } #speed button { border-radius:0; padding:8px 9px !important; min-width:0 !important; margin-left:-1px; } #speed button:first-child { border-radius:10px 0 0 10px; margin:0; } #speed button:last-child { border-radius:0 10px 10px 0; }
#speed button.on { background:var(--ink); color:#fff; border-color:var(--ink); }
.scrub { position:relative; flex:1; min-width:0; }
.scrub input { width:100%; accent-color:var(--accent); height:28px; margin:0; position:relative; z-index:1; background:transparent; }
#ticks { position:absolute; left:8px; right:8px; top:50%; height:0; } #ticks i { position:absolute; top:-9px; width:2px; height:18px; background:#9fb0bf; border-radius:1px; }
#tourbar .row3 { display:flex; gap:12px; align-items:center; }
#chapters { display:flex; gap:6px; overflow-x:auto; flex:1; padding-bottom:4px; scrollbar-width:thin; }
#chapters button { padding:3px 10px; font-size:12.5px; white-space:nowrap; border-radius:999px; flex:none; }
#chapters button.on { background:var(--accent); border-color:var(--accent); color:#fff; }
#tHint { font-size:12.5px; color:var(--muted); white-space:nowrap; } #tourbar .len { font-size:12.5px; color:var(--muted); white-space:nowrap; }
body.tour.playing canvas#gl { cursor:grab; }
@media (max-width:760px) {
  #tourbar .cap p { display:none; } #tourbar h2 { font-size:16px; } #tourbar .count b { font-size:20px; }
  #tourbar .ctl { flex-wrap:wrap; } .scrub { flex:1 1 100%; order:5; }
  #tHint, #tourbar .len { display:none; }
}
@media (max-width:760px) { body.tour header#top #tExplore { font-size:13px; } body.tour header#top #tExplore::before { content:none; } body.tour header#top .ttl { font-size:15px; } }

#tMusic.on { background:#fff7e8; border-color:#e8742a; }
#tMusic { white-space:nowrap; }

#tStart { position:fixed; left:0; right:0; top:50px; bottom:150px; display:flex; align-items:center; justify-content:center; z-index:6; pointer-events:none; }
#tStart[hidden] { display:none; }
#tStart button { pointer-events:auto; font-size:22px; padding:16px 30px; border-radius:16px; box-shadow:0 6px 28px #0004; display:flex; flex-direction:column; align-items:center; gap:2px; }
#tStart small { font-size:13px; font-weight:400; opacity:.8; }
