/* Sora jump viewer */
.viewer-main { max-width: 1440px; margin: 0 auto; padding: 14px 14px 0; }
.v-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.v-title h1 { font-size: clamp(1.4rem, 3vw, 2.1rem); margin: 0; }
.v-title p { margin: 4px 0 0; }
.badge { padding: 1px 10px; border-radius: 999px; background: rgba(255, 138, 0, 0.18); color: #ffd29a; font-size: 0.8rem; }
.v-actions { display: flex; gap: 8px; align-items: center; }
.v-actions .btn { padding: 9px 16px; font-size: 0.95rem; }
.downloads { position: relative; }
.downloads summary { list-style: none; }
.downloads summary::-webkit-details-marker { display: none; }
.downloads .menu {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; min-width: 220px;
  background: var(--panel-solid); border: 1px solid var(--line); border-radius: 14px; padding: 6px; display: flex; flex-direction: column;
}
.downloads .menu a { padding: 10px 12px; border-radius: 10px; color: var(--text); }
.downloads .menu a:hover { background: rgba(255, 255, 255, 0.08); text-decoration: none; }

.v-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(128px, 1fr)); gap: 10px; margin-bottom: 12px; }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 10px 14px; }
.stat .k { display: block; font-size: 0.72rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.stat .v { display: block; font-size: 1.35rem; font-weight: 800; }
.stat .s { display: block; font-size: 0.78rem; color: var(--muted); }
.stat.ff .v { color: #ffb199; }
.stat.cn .v { color: #9ff3ff; }

.v-body { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(320px, 1fr); gap: 12px; align-items: start; }
.v-map { position: relative; height: calc(100vh - 230px); min-height: 420px; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); position: sticky; top: 64px; }
#map { position: absolute; inset: 0; }
.map-ctl { position: absolute; top: 10px; left: 10px; z-index: 5; display: flex; flex-wrap: wrap; gap: 6px; }
.seg { display: inline-flex; background: rgba(6, 20, 46, 0.85); border: 1px solid var(--line); border-radius: 999px; padding: 3px; }
.seg button, .chip {
  border: 0; background: transparent; color: var(--text); font: 600 0.85rem var(--font);
  padding: 7px 12px; border-radius: 999px; cursor: pointer;
}
.seg button.on { background: var(--accent); color: #1b0f00; }
.chip { background: rgba(6, 20, 46, 0.85); border: 1px solid var(--line); }
.chip[aria-pressed="true"] { background: var(--accent2); color: #002a30; }
.legend {
  position: absolute; left: 10px; bottom: 28px; z-index: 5; display: flex; gap: 10px;
  background: rgba(6, 20, 46, 0.8); border: 1px solid var(--line); border-radius: 999px; padding: 5px 12px; font-size: 0.8rem;
}
.legend i { display: inline-block; width: 18px; height: 4px; border-radius: 2px; margin-right: 6px; vertical-align: middle; }

.v-side { display: flex; flex-direction: column; gap: 12px; }
.v-side h2 { font-size: 0.95rem; margin: 0 0 6px; color: var(--muted); font-weight: 700; }
.replay { position: sticky; top: 64px; z-index: 6; background: rgba(14, 42, 87, 0.95); }
.replay-row { display: flex; align-items: center; gap: 10px; }
.replay .play {
  width: 44px; height: 44px; border-radius: 50%; border: 0; cursor: pointer; flex: none;
  background: linear-gradient(90deg, #ff5e3a, #ffc233); color: #1b0f00; font-size: 1.1rem; font-weight: 900;
}
.replay input[type=range] { flex: 1; accent-color: var(--accent); }
.replay select { width: auto; padding: 6px 8px; }
.readout { margin-top: 8px; font-variant-numeric: tabular-nums; display: grid; grid-template-columns: repeat(auto-fit, minmax(92px, 1fr)); gap: 6px; }
.readout div { font-size: 0.78rem; color: var(--muted); }
.readout b { display: block; font-size: 1.05rem; color: var(--text); }
.replay .units { margin-top: 10px; }
.chart { width: 100%; min-height: 150px; }
.uplot, .u-legend { color: var(--text); font-family: var(--font); }
.u-legend { font-size: 0.8rem; }
.u-legend .u-marker { border-radius: 2px; }
.notes { white-space: normal; margin: 0; }
.analysis dl { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; margin: 0; }
.analysis dt { color: var(--muted); }
.analysis dd { margin: 0; font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; }
.analysis h3 { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.06em; margin: 14px 0 6px; color: var(--accent); }
.winds table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; font-size: 0.9rem; }
.winds th, .winds td { padding: 6px 4px; border-bottom: 1px solid var(--line); text-align: right; }
.winds th:first-child, .winds td:first-child { text-align: left; }
.winds tr.exit td { color: #ffd29a; font-weight: 700; }
.winds tr.above td { opacity: .55; }
.winds .arrow { display: inline-block; }
.cta p { margin-top: 0; }
.marker { width: 16px; height: 16px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.35); }
.marker.exit { background: var(--ff); }
.marker.deploy { background: var(--canopy); }
.marker.land { background: var(--ok); }
.marker.target { background: transparent; border-color: #ffd600; width: 22px; height: 22px; }
.maplibregl-ctrl-attrib { font-size: 11px; }
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 50;
  background: var(--panel-solid); border: 1px solid var(--line); border-radius: 999px; padding: 10px 18px;
}
@media (max-width: 920px) {
  .v-body { grid-template-columns: 1fr; }
  .v-map { position: relative; top: 0; height: 58vh; min-height: 340px; }
  .replay { top: 56px; }
}
