:root {
  --ink: #16181d; --muted: #5f6673; --line: #dcdfe5; --paper: #fff; --ground: #f8f9fa; --accent: #4465e9;
  font: 15px/1.5 system-ui, -apple-system, "Segoe UI", sans-serif; color: var(--ink);
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; overflow: hidden; background: var(--ground); }
.bar { position: fixed; inset: 0 0 auto 0; z-index: 3; display: flex; align-items: center; gap: 14px; min-height: 48px; padding: 6px 14px; background: var(--paper); border-bottom: 1px solid var(--line); }
.brand { font-weight: 650; color: var(--ink); text-decoration: none; }
.maps { display: flex; gap: 2px; }
.maps button { font: inherit; white-space: nowrap; padding: 4px 10px; border: 0; border-radius: 6px; background: none; color: var(--muted); cursor: pointer; }
.maps button[aria-current="true"] { background: #eceef2; color: var(--ink); font-weight: 550; }
.blurb { flex: 1; margin: 0; color: var(--muted); font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.back { color: var(--muted); font-size: 13.5px; white-space: nowrap; }
.stage { position: fixed; inset: 49px 0 0 0; overflow: hidden; cursor: grab; touch-action: none; outline: none; }
.stage.dragging { cursor: grabbing; }
.world { position: absolute; left: 0; top: 0; transform-origin: 0 0; }
.world svg { display: block; overflow: visible; }
.mark { position: absolute; left: 0; top: 0; border: 2.5px solid var(--accent); border-radius: 4px; box-shadow: 0 0 0 5px rgb(68 101 233 / .22); pointer-events: none; }
.frame-label { position: absolute; left: 0; top: 0; padding: 1px 7px; font-size: 13px; font-weight: 600; white-space: nowrap; color: var(--ink); background: var(--ground); border-radius: 4px; transform-origin: 0 100%; pointer-events: none; }
.card { position: fixed; z-index: 3; top: 62px; right: 14px; width: 340px; max-height: calc(100vh - 150px); overflow: auto; padding: 14px 16px; background: var(--paper); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 6px 24px rgb(20 24 32 / .12); }
.card h2 { margin: 0 24px 6px 0; font-size: 16px; line-height: 1.3; }
.detail { margin: 0 0 10px; white-space: pre-line; }
.detail:empty { display: none; }
.close { position: absolute; top: 8px; right: 8px; width: 26px; height: 26px; font-size: 18px; line-height: 1; border: 0; border-radius: 6px; background: none; color: var(--muted); cursor: pointer; }
.see { list-style: none; margin: 0 0 10px; padding: 8px 0 0; border-top: 1px solid var(--line); font-size: 13.5px; }
.see:empty { display: none; }
.see button, .walk button { font: inherit; font-size: 13.5px; color: var(--ink); background: none; cursor: pointer; text-align: left; }
.see button { padding: 2px 0; border: 0; color: var(--accent); }
.walk { display: flex; flex-wrap: wrap; gap: 6px; }
.walk button { flex: 1 1 100%; padding: 5px 9px; border: 1px solid var(--line); border-radius: 6px; }
.walk button:hover { background: var(--ground); }
.walk .next { text-align: right; }
.controls { position: fixed; z-index: 3; left: 14px; bottom: 14px; display: flex; background: var(--paper); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.controls button { font: inherit; min-width: 36px; height: 34px; padding: 0 10px; border: 0; background: none; color: var(--ink); cursor: pointer; }
.controls button:hover { background: var(--ground); }
.hint { position: fixed; z-index: 2; left: 136px; bottom: 14px; max-width: calc(100vw - 150px); margin: 0; padding: 0 10px; pointer-events: none; color: var(--muted); background: var(--paper); border: 1px solid var(--line); border-radius: 8px; font-size: 13px; line-height: 34px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
kbd { font: inherit; font-size: 12px; padding: 0 5px; border: 1px solid var(--line); border-radius: 4px; background: var(--paper); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
@media (max-width: 720px) {
  .blurb, .hint, .back { display: none; }
  .bar { gap: 6px; padding: 6px 8px; }
  .maps { overflow-x: auto; }
  .maps button { padding: 4px 7px; font-size: 14px; }
  .card { top: auto; right: 8px; left: 8px; bottom: 8px; width: auto; max-height: 45vh; }
  .controls { bottom: auto; top: 58px; left: 8px; }
}
