:root {
  --ink: #061014;
  --mineral: #d9d6ca;
  --mineral-dim: #979b94;
  --line: rgba(217, 214, 202, 0.2);
  --accent: #e5a95b;
  --panel: rgba(5, 14, 18, 0.82);
  color-scheme: dark;
  font-family: "Yu Gothic UI", "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; width: 100%; height: 100%; background: var(--ink); color: var(--mineral); }
a { color: var(--accent); }
button, input { font: inherit; }
.map-page { position: relative; width: 100%; height: 100%; overflow: hidden; }
#map { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; cursor: grab; }
#map:active { cursor: grabbing; }
.masthead { position: absolute; top: 0; left: 0; right: 0; display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; padding: 16px; pointer-events: none; }
.masthead > * { pointer-events: auto; }
.eyebrow { margin: 0; font-size: 11px; letter-spacing: 0.18em; color: var(--accent); }
h1 { margin: 2px 0 0; font-size: 28px; text-shadow: 0 1px 6px #000; }
.nav { display: flex; gap: 8px; }
.nav a { padding: 7px 12px; border: 1px solid var(--line); border-radius: 6px; background: var(--panel); color: var(--mineral); text-decoration: none; font-size: 14px; }
.nav a[aria-current] { border-color: var(--accent); color: var(--accent); }
.panel { position: absolute; top: 84px; left: 16px; width: 280px; max-height: calc(100% - 200px); overflow: auto; padding: 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); backdrop-filter: blur(6px); }
.panel h2 { display: inline; margin: 0; font-size: 15px; }
.panel summary { margin-bottom: 8px; cursor: pointer; }
.panel:not([open]) summary { margin-bottom: 0; }
.panel h2 small { color: var(--mineral-dim); font-weight: 400; }
.ramp { height: 12px; border-radius: 3px; }
.ramp-ticks { position: relative; height: 18px; font-size: 11px; color: var(--mineral-dim); }
.ramp-ticks span { position: absolute; transform: translateX(-50%); }
.layers { display: grid; gap: 10px; margin-top: 8px; }
.layer label.row { display: flex; align-items: center; gap: 8px; font-size: 14px; cursor: pointer; }
.layer input[type="range"] { width: 100%; margin: 4px 0 0; accent-color: var(--accent); }
.hint { margin: 12px 0 8px; font-size: 12px; color: var(--mineral-dim); }
.zoom-buttons { display: flex; gap: 6px; }
.zoom-buttons button { width: 36px; height: 36px; border: 1px solid var(--line); border-radius: 6px; background: transparent; color: var(--mineral); cursor: pointer; }
.readout { position: absolute; right: 16px; top: 84px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); font-size: 13px; }
.readout:empty { display: none; }
.credit { position: absolute; left: 0; right: 0; bottom: 0; padding: 8px 16px; background: linear-gradient(transparent, rgba(0, 0, 0, 0.75)); font-size: 11px; line-height: 1.5; color: var(--mineral-dim); pointer-events: none; }
.credit p { margin: 0; }
.credit a { pointer-events: auto; }
@media (max-width: 640px) {
  .panel { top: auto; bottom: 96px; left: 12px; right: 12px; width: auto; max-height: 40%; }
  .readout { top: 72px; right: 12px; }
  h1 { font-size: 22px; }
}
/* about page */
.doc { max-width: 860px; margin: 0 auto; padding: 16px 16px 64px; line-height: 1.8; overflow-y: auto; height: 100%; }
.doc h2 { margin-top: 2.2em; border-bottom: 1px solid var(--line); padding-bottom: 6px; }
.doc .masthead { position: static; padding: 0 0 16px; }
.doc .note { color: var(--mineral-dim); font-size: 13px; }
.widget { margin: 16px 0; padding: 14px; border: 1px solid var(--line); border-radius: 8px; background: rgba(255, 255, 255, 0.03); }
.widget label { display: block; margin: 8px 0; font-size: 14px; }
.widget input[type="range"] { width: 100%; accent-color: var(--accent); }
.widget svg { width: 100%; height: auto; display: block; }
.state { font-weight: 700; color: var(--accent); }
.bars div { height: 22px; margin: 6px 0; border-radius: 3px; background: var(--accent); color: #111; padding: 0 8px; font-size: 13px; line-height: 22px; white-space: nowrap; }
table { border-collapse: collapse; width: 100%; font-size: 14px; display: block; overflow-x: auto; }
th, td { border: 1px solid var(--line); padding: 6px 10px; text-align: left; }
.coax{width:100%;max-width:420px;height:auto;display:block;margin:12px 0}
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 16px 0 0; border-bottom: 1px solid var(--line); }
.tabs button { padding: 9px 14px; border: 1px solid transparent; border-bottom: 0; border-radius: 6px 6px 0 0; background: transparent; color: var(--mineral-dim); cursor: pointer; }
.tabs button[aria-selected="true"] { border-color: var(--line); background: rgba(255, 255, 255, 0.05); color: var(--accent); }
.tab-panel > h2:first-child { margin-top: 1em; border-bottom: 0; }
