:root {
    --cv-accent: #e8b04a;
    --cv-ink: #f4f4f2;
    --cv-panel: rgba(18, 20, 26, 0.82);
}

.cv-loader {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: grid;
    place-items: center;
    background: radial-gradient(ellipse at 50% 40%, #2b3a52 0%, #11151d 75%);
    transition: opacity 0.8s ease;
    font: 15px/1.4 system-ui, sans-serif;
    color: var(--cv-ink);
}
.cv-loader.cv-gone {
    opacity: 0;
    pointer-events: none;
}
.cv-loader-card {
    width: min(440px, calc(100vw - 32px));
    text-align: center;
}
.cv-loader-title {
    font-size: 30px;
    font-weight: 650;
    letter-spacing: 0.01em;
}
.cv-loader-sub {
    opacity: 0.75;
    margin: 6px 0 26px;
}
.cv-loader-bar {
    height: 4px;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.15);
    overflow: hidden;
}
.cv-loader-bar > div {
    height: 100%;
    width: 0;
    background: var(--cv-accent);
    transition: width 0.3s ease;
}
.cv-loader-status {
    margin-top: 12px;
    font-size: 13px;
    opacity: 0.7;
}
.cv-loader-now {
    margin-top: 18px;
    padding: 8px 18px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 18px;
    background: transparent;
    color: var(--cv-ink);
    cursor: pointer;
}

.cv-pins {
    position: fixed;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: 10;
}
.cv-pin {
    position: absolute;
    left: 0;
    top: 0;
    display: flex;
    align-items: center;
    gap: 6px;
    transform-origin: 0 50%;
    margin: -7px 0 0 -7px;
    padding: 0;
    border: 0;
    background: none;
    color: var(--cv-ink);
    font: 600 13px/1 system-ui, sans-serif;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
    pointer-events: auto;
    cursor: pointer;
    white-space: nowrap;
}
.cv-pin-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--cv-accent);
    border: 2px solid #fff;
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.5);
}
.cv-pin-label {
    padding: 4px 8px;
    border-radius: 10px;
    background: var(--cv-panel);
}
.cv-pin:hover .cv-pin-label,
.cv-pin.cv-selected .cv-pin-label {
    background: var(--cv-accent);
    color: #1b1b1b;
    text-shadow: none;
}

.cv-card {
    position: fixed;
    left: 16px;
    bottom: 16px;
    z-index: 20;
    width: min(340px, calc(100vw - 32px));
    padding: 16px 18px;
    border-radius: 12px;
    background: var(--cv-panel);
    color: var(--cv-ink);
    font: 14px/1.45 system-ui, sans-serif;
    backdrop-filter: blur(6px);
}
.cv-card h2 {
    margin: 2px 0 6px;
    font-size: 19px;
}
.cv-card p {
    margin: 0;
    opacity: 0.85;
}
.cv-card-sub {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--cv-accent);
}
.cv-card-close {
    position: absolute;
    top: 6px;
    right: 8px;
    border: 0;
    background: none;
    color: var(--cv-ink);
    font-size: 22px;
    cursor: pointer;
}

.cv-bar {
    position: fixed;
    top: 16px;
    left: 16px;
    z-index: 20;
    display: flex;
    gap: 6px;
}
.cv-bar button {
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 10px;
    background: var(--cv-panel);
    color: var(--cv-ink);
    font-size: 19px;
    cursor: pointer;
}
.cv-bar button.cv-on {
    color: var(--cv-accent);
}

/* "Loading detail" and other one-line notes (detail.js) */
.cv-note {
    position: fixed;
    left: 50%;
    bottom: 64px;
    transform: translateX(-50%);
    z-index: 25;
    max-width: calc(100vw - 32px);
    padding: 6px 16px;
    border-radius: 18px;
    background: var(--cv-panel);
    color: var(--cv-ink);
    font: 13px/1.4 system-ui, sans-serif;
    text-align: center;
    backdrop-filter: blur(6px);
    pointer-events: none;
}
.cv-note[hidden] {
    display: none;
}
/* two lines while detail is loading: what it means, then the count */
.cv-note b {
    display: block;
    font-weight: 600;
}
.cv-note span {
    display: block;
    font-size: 12px;
    opacity: 0.8;
    white-space: nowrap;
}

/* flythrough editor (sequencer.js) */
.cv-seq {
    position: fixed;
    top: 66px;
    left: 16px;
    z-index: 30;
    width: min(400px, calc(100vw - 32px));
    max-height: calc(100vh - 90px);
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 12px 14px;
    border-radius: 12px;
    background: var(--cv-panel);
    color: var(--cv-ink);
    font: 13px/1.4 system-ui, sans-serif;
    backdrop-filter: blur(6px);
}
.cv-seq[hidden] {
    display: none;
}
.cv-seq button,
.cv-seq select,
.cv-seq input[type='number'] {
    font: inherit;
    color: var(--cv-ink);
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 7px;
    padding: 3px 8px;
}
.cv-seq button {
    cursor: pointer;
}
.cv-seq button:hover {
    background: rgba(255, 255, 255, 0.2);
}
.cv-seq-head {
    display: flex;
    align-items: baseline;
    gap: 8px;
}
.cv-seq-head b {
    font-size: 15px;
}
.cv-seq-info {
    flex: 1;
    opacity: 0.7;
    font-size: 12px;
}
.cv-seq-head button {
    border: 0;
    background: none;
    font-size: 16px;
}
.cv-seq-tools,
.cv-seq-opts,
.cv-seq-foot {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}
.cv-seq-tools [data-act='add'] {
    background: var(--cv-accent);
    color: #1b1b1b;
    border-color: transparent;
    font-weight: 600;
}
.cv-seq-scrub {
    flex: 1;
    min-width: 90px;
    accent-color: var(--cv-accent);
}
.cv-seq-time {
    width: 46px;
    text-align: right;
    font-variant-numeric: tabular-nums;
}
.cv-seq-opts {
    font-size: 12px;
    opacity: 0.9;
}
.cv-seq-opts input[type='number'] {
    width: 52px;
}
.cv-seq-list {
    margin: 0;
    padding: 0;
    list-style: none;
    overflow-y: auto;
    max-height: 40vh;
}
.cv-seq-list li {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 2px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.cv-seq-list li.cv-sel {
    background: rgba(232, 176, 74, 0.15);
}
.cv-seq-n {
    width: 20px;
    text-align: right;
    opacity: 0.7;
    font-variant-numeric: tabular-nums;
}
.cv-seq-list input[type='number'] {
    width: 64px;
}
.cv-seq-unit {
    opacity: 0.6;
    margin-right: auto;
}
.cv-seq-cmd {
    font: 11px/1.4 ui-monospace, Consolas, monospace;
    opacity: 0.75;
    word-break: break-all;
    user-select: all;
}
/* render mode (render_flythrough.py): nothing over the scene */
body.cv-render .cv-bar,
body.cv-render .cv-note,
body.cv-render .cv-pins,
body.cv-render .cv-card,
body.cv-render .cv-loader {
    display: none !important;
}

.cv-error {
    position: fixed;
    inset: auto 16px 16px 16px;
    z-index: 2000;
    padding: 12px;
    background: #3a1214;
    color: #ffd2d2;
    white-space: pre-wrap;
}

@media (max-width: 600px) {
    .cv-pin {
        font-size: 12px;
    }
    .cv-card {
        left: 16px;
        right: 16px;
        width: auto;
    }
}

/* credit line of the 2D map around the model (basemap.js) */
.cv-map-credit {
    position: fixed;
    left: 8px;
    bottom: 6px;
    z-index: 5;
    padding: 2px 7px;
    border-radius: 4px;
    font: 11px/1.4 system-ui, sans-serif;
    color: #fff;
    background: rgba(0, 0, 0, 0.45);
    pointer-events: auto;
}
.cv-map-credit a {
    color: #fff;
}
body.cv-render .cv-map-credit {
    display: none;
}

/* map layers panel (layers.js) */
.cv-layers {
    position: fixed;
    top: 66px;
    left: 16px;
    z-index: 30;
    width: min(310px, calc(100vw - 32px));
    max-height: calc(100vh - 90px);
    overflow-y: auto;
    box-sizing: border-box;
    padding: 10px 14px 12px;
    border-radius: 12px;
    background: var(--cv-panel);
    color: var(--cv-ink);
    font: 13px/1.4 system-ui, sans-serif;
    backdrop-filter: blur(6px);
}
.cv-layers[hidden],
.cv-ly-info[hidden],
.cv-live-credit[hidden],
.cv-marks > div[hidden] {
    display: none;
}
.cv-ly-head {
    margin-bottom: 4px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    opacity: 0.6;
}
.cv-ly {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 6px 0;
    cursor: pointer;
}
.cv-ly input {
    width: 16px;
    height: 16px;
    margin: 0;
    accent-color: var(--cv-accent);
}
.cv-ly em {
    margin-left: auto;
    font-style: normal;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--cv-accent);
}
.cv-ly-info {
    margin: 0 0 6px 25px;
    font-size: 12px;
}
.cv-ly-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 2px 7px;
    padding: 2px 0;
}
.cv-ly-row i {
    width: 10px;
    height: 10px;
    border-radius: 2px;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.4);
}
.cv-ly-row[data-line] {
    cursor: pointer;
}
.cv-ly-row.cv-delays span {
    color: #f4c430;
}
.cv-ly-row.cv-stopped span {
    color: #ff9a9a;
}
.cv-ly-row.cv-good span {
    opacity: 0.8;
}
.cv-ly-row p {
    flex-basis: 100%;
    margin: 2px 0 4px;
    opacity: 0.8;
}
.cv-ly-info small,
.cv-info-body small {
    display: block;
    margin-top: 5px;
    font-size: 11px;
    opacity: 0.6;
}

/* the live layers over the picture (overlay.js): lines on a canvas, markers as buttons */
.cv-overlay {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    z-index: 8;
    pointer-events: none;
}
.cv-marks {
    position: fixed;
    inset: 0;
    z-index: 9;
    overflow: hidden;
    pointer-events: none;
}
.cv-stn,
.cv-tfc {
    position: absolute;
    left: 0;
    top: 0;
    padding: 0;
    border: 0;
    background: none;
    pointer-events: auto;
    cursor: pointer;
}
.cv-stn {
    display: flex;
    align-items: center;
    gap: 5px;
    height: 18px;
    margin: -9px 0 0 -7px;
    transform-origin: 7px 50%;
    color: var(--cv-ink);
    font: 600 11px/1 system-ui, sans-serif;
    white-space: nowrap;
}
.cv-stn i {
    box-sizing: border-box;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #fff;
    border: 3px solid #14161c;
    box-shadow: 0 0 0 1.5px #fff, 0 1px 5px rgba(0, 0, 0, 0.6);
}
.cv-stn-hub i {
    border-width: 2.5px;
    border-color: #dc241f;
}
.cv-stn span {
    padding: 3px 6px;
    border-radius: 8px;
    background: var(--cv-panel);
}
.cv-stn.cv-far span {
    display: none;
}
.cv-stn:hover span {
    display: block;
    background: #fff;
    color: #14161c;
}
.cv-tfc {
    display: grid;
    place-items: center;
    width: 26px;
    height: 26px;
    margin: -13px 0 0 -13px;
    border-radius: 50%;
    background: var(--cv-panel);
    box-shadow: 0 0 0 2px #f4c430, 0 1px 6px rgba(0, 0, 0, 0.6);
    font-size: 14px;
    line-height: 1;
}
.cv-tfc-closed {
    box-shadow: 0 0 0 2px #e03a3e, 0 1px 6px rgba(0, 0, 0, 0.6);
}
.cv-tfc-cam {
    box-shadow: 0 0 0 2px #8fb8e8, 0 1px 6px rgba(0, 0, 0, 0.6);
}

/* the card of a station, a disruption or a camera */
.cv-info {
    z-index: 21;
    box-sizing: border-box;
    max-height: min(62vh, 480px);
    overflow-y: auto;
}
.cv-info,
.cv-layers {
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.3) transparent;
}
.cv-info[hidden] {
    display: none;
}
.cv-info-body p {
    margin: 0 0 6px;
}
.cv-arr-row {
    display: flex;
    gap: 9px;
    padding: 5px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.cv-arr-row i {
    flex: 0 0 5px;
    border-radius: 3px;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.3);
}
.cv-arr-row em {
    display: block;
    font-style: normal;
    font-size: 12px;
    opacity: 0.75;
}
.cv-arr-row span {
    font-size: 13px;
}
.cv-arr-row b {
    color: var(--cv-accent);
    font-weight: 650;
}
.cv-arr-alert {
    margin: 0 0 6px;
    padding: 4px 8px;
    border-radius: 6px;
    background: rgba(224, 58, 62, 0.28);
    font-size: 12px;
}
.cv-arr-note {
    opacity: 0.8;
}
.cv-cam-img {
    display: block;
    width: 100%;
    aspect-ratio: 352 / 288;
    object-fit: cover;
    border-radius: 8px;
    background: #000;
}
/* the live feeds' credit, above the map's */
.cv-live-credit {
    position: fixed;
    left: 8px;
    bottom: 28px;
    z-index: 5;
    max-width: calc(100vw - 16px);
    box-sizing: border-box;
    padding: 2px 7px;
    border-radius: 4px;
    font: 10px/1.4 system-ui, sans-serif;
    color: #fff;
    background: rgba(0, 0, 0, 0.45);
}
body.cv-render .cv-overlay,
body.cv-render .cv-marks,
body.cv-render .cv-layers,
body.cv-render .cv-info,
body.cv-render .cv-live-credit {
    display: none !important;
}

/* a place's tour (tour.js): the "enter" badge beside its pin, the card's button, and the tour itself */
.cv-pin-tour {
    position: absolute;
    left: 0;
    top: 0;
    display: flex;
    align-items: center;
    gap: 5px;
    height: 21px;
    margin: -7px 0 0 -7px;
    padding: 0 9px 0 7px;
    transform-origin: 0 50%;
    border: 0;
    border-radius: 11px;
    background: var(--cv-accent);
    color: #1b1b1b;
    font: 700 12px/1 system-ui, sans-serif;
    white-space: nowrap;
    box-shadow: 0 0 0 2px #fff, 0 1px 6px rgba(0, 0, 0, 0.55);
    pointer-events: auto;
    cursor: pointer;
}
.cv-pin-tour:hover {
    background: #fff;
}
.cv-card-tour {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    padding: 9px 14px;
    border: 0;
    border-radius: 10px;
    background: var(--cv-accent);
    color: #1b1b1b;
    font: 700 14px/1 system-ui, sans-serif;
    cursor: pointer;
}
.cv-card-tour[hidden],
.cv-tour[hidden] {
    display: none;
}
.cv-card-tour:hover {
    background: #fff;
}
.cv-tour {
    position: fixed;
    inset: 0;
    z-index: 900;
    display: flex;
    flex-direction: column;
    background: #0c0e13;
}
.cv-tour-bar {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 8px 12px;
    color: var(--cv-ink);
    font: 14px/1.3 system-ui, sans-serif;
}
.cv-tour-back {
    padding: 8px 14px;
    border: 0;
    border-radius: 10px;
    background: var(--cv-accent);
    color: #1b1b1b;
    font: 700 14px/1 system-ui, sans-serif;
    cursor: pointer;
}
.cv-tour-title {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    opacity: 0.85;
}
.cv-tour-new {
    color: var(--cv-ink);
    opacity: 0.75;
    white-space: nowrap;
}
.cv-tour iframe {
    flex: 1;
    width: 100%;
    border: 0;
}
@media (max-width: 600px) {
    .cv-tour-new {
        display: none;
    }
}

/* ---- on the splatter viewer (2026-11-17) ---- */
/* the splatter page turns touch gestures off everywhere; the panels and cards have to scroll by finger */
.cv-layers,
.cv-layers *,
.cv-info,
.cv-info *,
.cv-card,
.cv-card * {
    touch-action: pan-y;
}
/* the quality button's panel (quality.js): one row per level */
.cv-bar button.cv-bar-text {
    font: 700 13px/1 system-ui, sans-serif;
    letter-spacing: 0.02em;
}
.cv-quality .cv-ly em {
    text-transform: none;
    letter-spacing: 0;
    font-size: 11px;
    color: inherit;
    opacity: 0.65;
}
/* flying with the arrow keys or the phone's fly button is off (camera limits, limits.js): no dead button, and
   the gear menu's help leaves the flying lines out */
#fly-button-container {
    display: none !important;
}
#controlsHelp .row:has(.text-muted) {
    display: none;
}
/* on a phone a card fills the bottom of the screen: the one-line notes go under the bar instead */
@media (max-width: 600px) {
    .cv-note {
        top: 66px;
        bottom: auto;
    }
}
