/* track svg */
.trackbox { position: relative; min-width: 0; display: grid; gap: .5rem }
.trackbox svg { width: 100%; height: auto; display: block; overflow: visible }
.trk-loop { font-family: var(--font-display); font-weight: 800; font-style: italic; font-size: 15px; fill: var(--ink-3); letter-spacing: .02em; transition: fill .2s }
.trk-loop.now { fill: var(--ink) }
.trk-small { font-family: var(--font-mono); font-size: 10px; fill: var(--ink-3) }
.trk-tag { font-family: var(--font-mono); font-size: 10px; font-weight: 600; letter-spacing: .08em }
.trk-end { font-family: var(--font-mono); font-size: 11px; fill: var(--ink-2) }
.trk-end.alt { fill: var(--ink-3) }
.trk-extra { fill: var(--steer) }
.track-legend { justify-content: center; row-gap: .35rem }
.track-legend span { display: inline-flex; align-items: center; gap: .35rem }
.track-legend i { display: inline-block; flex: none; margin: 0; vertical-align: middle; border: 0 }
.track-legend i.sw-own { width: 1.6rem; height: .75rem; border-radius: 2px; background: var(--own-lane); box-shadow: inset 0 0 0 1px var(--lane-edge) }
.track-legend i.sw-alt { width: 1.6rem; height: .75rem; border-radius: 2px; box-shadow: inset 0 0 0 1px var(--lane-edge);
  background: repeating-conic-gradient(var(--alt-a) 0 25%, var(--alt-b) 0 50%) 0 0 / 6px 6px }
.track-legend i.sw-dot { width: .75rem; height: .75rem; border-radius: 50% }
.track-legend i.sw-zone { width: 1.6rem; height: .9rem; border-radius: 3px; border: 1.2px dashed var(--ink-3); background: rgba(255,255,255,.8) }
.track-legend i.sw-pipe { width: 1.6rem; height: .55rem; border: 2px solid var(--ink-2); border-top: 0; border-radius: 0 0 3px 3px }
.track-legend i.sw-halo { width: .95rem; height: .95rem; border-radius: 50%; border: 1px dashed var(--refuse); background: rgba(220,38,38,.16) }
.trackbox > svg { overflow: hidden; touch-action: pan-y; cursor: grab; user-select: none; -webkit-user-select: none }
.trackbox > svg > g { pointer-events: none }
.trackbox > svg:active { cursor: grabbing }
.trackbox.mini svg { max-height: 200px }
.arch-track > svg, .recovery-trackbox > svg { position: absolute; inset: 0; height: 100%; max-height: none }
/* 3D views: a canvas drawn by the shared WebGL renderer, with HTML labels placed over it */
.s3 { position: relative; width: 100%; touch-action: pan-y; cursor: grab; user-select: none; -webkit-user-select: none; overflow: hidden }
.s3:active { cursor: grabbing }
.s3 canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block }
.s3-labs { position: absolute; inset: 0; pointer-events: none }
.s3-lab { position: absolute; left: 0; top: 0; white-space: nowrap; line-height: 1; will-change: transform }
.s3-loop { font-family: var(--font-display); font-weight: 800; font-style: italic; font-size: 15px; color: var(--ink-3); letter-spacing: .02em; text-transform: uppercase; transition: color .2s }
.s3-loop.now { color: var(--ink) }
.s3-loop small { display: block; text-align: center; margin-top: 3px; font-family: var(--font-mono); font-size: 9.5px; font-style: normal; font-weight: 600; text-transform: none; letter-spacing: .04em; color: var(--steer) }
.s3-small { font-family: var(--font-mono); font-size: 10px; color: var(--ink-3); background: rgba(255,255,255,.72); padding: 1px 3px; border-radius: 3px }
.s3-extra { color: var(--steer) }
.s3-tag { font-family: var(--font-mono); font-size: 10px; font-weight: 600; letter-spacing: .08em; background: var(--panel); border: 1.2px solid var(--steer);
  color: var(--steer); border-radius: 4px; padding: 3px 6px; transition: opacity .2s }
.s3-tag.erase { border-color: var(--ink-3); border-style: dashed; color: var(--ink-2) }
.s3-hint { position: absolute; right: 4px; bottom: 2px; font-family: var(--font-mono); font-size: 10px; color: var(--ink-3); transition: opacity .5s; pointer-events: none }
.s3-hint.off { opacity: 0 }
.s3.mini .s3-small { font-size: 9.5px }
