.cinematic-launch {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    min-height: 44px;
    padding: 0 12px;
    border: 1px solid #ffffff33;
    border-radius: 12px;
    font: inherit;
    font-size: .84rem;
    font-weight: 800;
    white-space: nowrap;
    background: #a93539;
    color: #fff;
    cursor: pointer;
}
.cinematic-launch:hover:not(:disabled) { background: #bd4045; }
:root[data-theme="classic"] .cinematic-launch,
:root[data-theme="tech"] .cinematic-launch {
    background: linear-gradient(180deg, var(--theme-brand-strong), var(--theme-brand-deep));
    border-color: var(--theme-brand-deeper);
    color: var(--theme-paper);
}
:root[data-theme="tech"] .cinematic-launch { color: var(--theme-ink); }
:root[data-theme] .cinematic-launch:hover:not(:disabled) { background: var(--theme-brand-strong); }
.cinematic-launch:disabled { opacity: .55; cursor: wait; }
.cinematic-launch:focus-visible, .cinematic-actions button:focus-visible { outline: 3px solid white; outline-offset: 3px; }
.cinematic-overlay[hidden] { display: none; }
.cinematic-video-panel[hidden], .cinematic-video-panel [hidden] { display: none !important; }
.cinematic-video-panel { position: absolute; z-index: 20; top: 78px; right: 18px; width: min(350px, calc(100% - 36px)); box-sizing: border-box; padding: 20px; border: 1px solid #ffffff55; border-radius: 16px; background: #172029f5; color: white; box-shadow: 0 8px 30px #0005; font: 15px/1.5 system-ui, sans-serif; }
.cinematic-video-panel strong { display: block; padding-right: 35px; font-size: 19px; }
.cinematic-video-panel progress { width: 100%; accent-color: #ef8e84; }
.cinematic-video-panel button, .cinematic-video-panel a { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; box-sizing: border-box; padding: 8px 12px; margin: 4px 0; color: white; background: #344957; border: 1px solid #ffffff55; border-radius: 20px; font: inherit; text-decoration: none; cursor: pointer; }
.cinematic-video-panel #btnVideoPanelClose { position: absolute; right: 8px; top: 4px; width: 44px; border: 0; background: transparent; font-size: 24px; }
.cinematic-overlay { position: absolute; inset: 0; z-index: 9; pointer-events: none; color: #fff; }
.cinematic-overlay::before {
    content: "";
    position: absolute;
    inset: 0;
    background: #10171d;
    opacity: 0;
    transition: opacity 120ms ease;
}
.is-cinematic-cutting .cinematic-overlay::before { opacity: 1; }
.is-cinematic-preparing .cinematic-overlay::before { opacity: 1; transition: none; }
.is-cinematic-preparing .cinematic-caption { left: 50%; bottom: 50%; transform: translate(-50%, 50%); }
.is-cinematic-preparing .cinematic-caption-weather { display: none; }
.is-cinematic-preparing .cinematic-caption-heading { display: block; }
.is-cinematic-preparing #cinematicShotDetail { max-width: none; margin: 6px 0 14px; white-space: normal; }
.is-cinematic-preparing #cinematicShotTitle::before {
    content: "";
    display: inline-block;
    width: 14px;
    height: 14px;
    margin-right: 10px;
    border: 2px solid #ffffff40;
    border-top-color: #ef8e84;
    border-radius: 50%;
    animation: cinematic-preparing-spin 900ms linear infinite;
}
@keyframes cinematic-preparing-spin { to { transform: rotate(360deg); } }
.cinematic-actions {
    position: absolute;
    top: max(18px, env(safe-area-inset-top));
    right: max(18px, env(safe-area-inset-right));
    display: flex;
    gap: 10px;
    pointer-events: auto;
}
.cinematic-actions button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 16px;
    color: #fff;
    background: #172029e8;
    border: 1px solid #ffffff55;
    border-radius: 24px;
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 180ms ease, border-color 180ms ease, color 180ms ease, text-shadow 180ms ease;
}
.cinematic-actions button:disabled { opacity: .55; cursor: wait; }
.cinematic-actions button[hidden] { display: none; }
.cinematic-actions button[aria-pressed="true"] { background: #fff; color: #162029; border-color: #fff; }
.is-cinematic:not(.is-cinematic-preparing) .cinematic-actions button {
    color: #ffffff73;
    background: #1720290d;
    border-color: #ffffff14;
    text-shadow: 0 1px 3px #0006;
}
.is-cinematic:not(.is-cinematic-preparing) .cinematic-actions button[aria-pressed="true"] {
    background: #ffffff12;
    border-color: #ffffff3d;
    color: #ffffffa6;
}
.is-cinematic:not(.is-cinematic-preparing) .cinematic-actions button:active:not(:disabled),
.is-cinematic:not(.is-cinematic-preparing) .cinematic-actions button:focus-visible {
    color: #fff;
    background: #17202999;
    border-color: #ffffffb3;
    text-shadow: 0 1px 3px #000b;
}
@media (hover: hover) and (pointer: fine) {
    .is-cinematic:not(.is-cinematic-preparing) .cinematic-actions button:hover:not(:disabled) {
        color: #fff;
        background: #17202999;
        border-color: #ffffffb3;
        text-shadow: 0 1px 3px #000b;
    }
}
.cinematic-actions svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.cinematic-actions button > span:first-child { font-size: 22px; }
#btnCinematicVideo > span { font-size: inherit; }
.cinematic-caption {
    position: absolute;
    left: max(32px, calc(env(safe-area-inset-left) + 20px));
    bottom: max(64px, calc(env(safe-area-inset-bottom) + 50px));
    width: min(520px, calc(100% - 64px));
    padding: 0;
    box-sizing: border-box;
    border: 0;
    background: transparent;
    text-shadow: 0 1px 3px #000, 0 3px 14px #000d;
    font-family: inherit;
}
.cinematic-caption-context { margin-bottom: 7px; color: #fff; }
#cinematicActivityName { display: block; max-width: 100%; font-size: clamp(22px, 2.2vw, 30px); font-weight: 500; line-height: 1.3; letter-spacing: .04em; }
#cinematicActivityName, #cinematicBirdName, #cinematicShotTitle, #cinematicShotDetail {
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    pointer-events: auto;
}
.cinematic-caption-meta { display: flex; align-items: baseline; gap: 0; color: #e1e7ec; font-size: 12px; line-height: 1.5; letter-spacing: .02em; }
.cinematic-caption-meta > :empty { display: none; }
.cinematic-caption-meta > [hidden] { display: none; }
#cinematicDate, #cinematicClock { flex-shrink: 0; white-space: nowrap; font-variant-numeric: tabular-nums; }
#cinematicClock {
    /* Reserve HH:MM:SS plus the separator; fallback fonts must not move the ring ID. */
    width: calc(9ch + 16px);
    font-family: "SF Mono", "Cascadia Mono", Consolas, Menlo, monospace;
    font-kerning: none;
    letter-spacing: 0;
}
#cinematicClock:not(:empty)::before, #cinematicBirdName:not(:empty)::before { content: "·"; margin: 0 8px; color: #bfcbd4; }
#cinematicShotCount { flex-shrink: 0; margin-left: auto; padding-left: 12px; font-variant-numeric: tabular-nums; }
.cinematic-caption-heading { display: flex; align-items: baseline; gap: 10px; margin-top: 12px; }
#cinematicShotTitle { flex: 0 1 auto; font-size: 19px; font-weight: 500; line-height: 1.4; letter-spacing: .03em; }
#cinematicShotDetail { flex: 0 1 auto; max-width: 50%; margin: 0; color: #ebeff3; font-size: 14px; line-height: 1.5; }
.cinematic-caption-weather { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 6px 18px; align-items: start; margin: 9px 0 0; font-size: 14px; line-height: 1.5; }
#cinematicWeatherLabel { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
#cinematicWeather { display: flex; flex-wrap: wrap; gap: 7px 18px; color: #fff; }
.cinematic-weather-metric { display: inline-flex; align-items: center; gap: 7px; }
.cinematic-weather-metric svg { flex-shrink: 0; width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 1px 2px #000); }
#cinematicLocation { display: flex; min-width: 0; min-height: 21px; align-items: center; gap: 6px; pointer-events: auto; }
#cinematicLocation[hidden] { display: flex; visibility: hidden; }
#cinematicLocation svg { flex: 0 0 18px; width: 18px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 1px 2px #000); }
#cinematicLocationName { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.cinematic-progress { display: none; width: 120px; height: 1px; background: #ffffff40; overflow: hidden; }
.is-cinematic-preparing .cinematic-progress { display: block; }
.cinematic-progress span { display: block; width: 100%; height: 100%; background: #fff; transform: scaleX(0); transform-origin: left; }
.viewer-frame.is-cinematic #tracksPanel,
.viewer-frame.is-cinematic #bottomOverlay,
.viewer-frame.is-cinematic #telemetryOverlay,
.viewer-frame.is-cinematic #pigeonLabelLayer,
.viewer-frame.is-cinematic #weather3dStatus,
.viewer-frame.is-cinematic #weatherNoticeToast,
.viewer-frame.is-cinematic #weatherRebuildLoader,
.viewer-frame.is-cinematic #mapReadinessStatus,
.viewer-frame.is-cinematic #btnStartCinematic,
.viewer-frame.is-cinematic .cesium-viewer-fullscreenContainer,
.viewer-frame.is-cinematic .pigeon-demo-tools { display: none !important; }
.viewer-frame.is-cinematic .brand-watermark-viewer { left: 12px; bottom: 8px; z-index: 10; gap: 4px; padding: 6px 8px; min-height: 24px; }
.viewer-frame.is-cinematic .brand-watermark-logo { width: 12px; height: 12px; }
.viewer-frame.is-cinematic .brand-watermark-text { font-size: 8px; }
.cinematic-overlay > .cesium-credits-panel { position: absolute; right: 8px; bottom: 8px; max-width: calc(100% - 125px); }
@media (max-width: 900px) {
    .cinematic-actions { top: max(12px, env(safe-area-inset-top)); right: max(12px, env(safe-area-inset-right)); gap: 8px; }
    .cinematic-actions button { padding: 0 12px; }
    .cinematic-caption { left: max(20px, env(safe-area-inset-left)); width: min(420px, calc(100% - 40px)); }
    #cinematicShotTitle { font-size: 18px; }
    .cinematic-caption-weather { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 380px) {
    .cinematic-actions { gap: 5px; right: 10px; }
    .cinematic-actions button { padding: 0 9px; font-size: 14px; gap: 4px; }
    .cinematic-actions svg { width: 18px; height: 18px; }
}
@media (max-width: 600px) {
    #cinematicActivityName { font-size: 20px; }
    .cinematic-caption-heading { margin-top: 10px; }
    #cinematicShotDetail { font-size: 12px; }
    #cinematicClock { width: calc(9ch + 12px); }
    #cinematicClock:not(:empty)::before, #cinematicBirdName:not(:empty)::before { margin: 0 6px; }
}
@media (max-height: 500px) and (orientation: landscape) {
    .cinematic-caption { left: max(20px, env(safe-area-inset-left)); width: min(340px, calc(50% - 28px)); bottom: 50px; }
    .cinematic-caption-context { margin-bottom: 5px; }
    .cinematic-caption-heading { margin-top: 8px; }
    #cinematicActivityName { font-size: 20px; }
    #cinematicShotDetail { font-size: 12px; }
    .cinematic-caption-weather { margin-top: 7px; font-size: 12px; }
    #cinematicWeather { gap: 4px 10px; }
}
@media (prefers-reduced-motion: reduce) {
    .cinematic-overlay::before, .cinematic-actions button { transition: none; }
    .is-cinematic-preparing #cinematicShotTitle::before { animation: none; }
}

/* Soundtrack uses the existing quiet controls; recording is a URL-gated trial. */
.cinematic-music-menu { position:static; }
.cinematic-music-panel[hidden], .music-muted-stroke { display:none; }
.is-muted .music-muted-stroke { display:initial; }
.cinematic-music-panel { position:absolute; top:calc(100% + 10px); right:0; width:270px;
    padding:16px; max-height:calc(100dvh - 90px); overflow-y:auto; border-radius:14px; background:#172029f5; color:white; box-shadow:0 8px 24px #0006;
    border:1px solid #ffffff33; font:14px/1.5 system-ui,sans-serif; }
.cinematic-music-panel strong, .cinematic-music-panel > span { display:block; }
.cinematic-music-panel > div { display:flex; gap:8px; margin:12px 0; }
.cinematic-music-panel a { color:#c4dfee; font-size:12px; }
.cinematic-music-panel #cinematicMusicStatus:empty { display:none; }
.cinematic-music-panel #cinematicMusicStatus { margin-top:10px; font-size:12px; color:#ffe0d5; }
.is-cinematic .cinematic-actions .cinematic-music-panel button { color:white; background:#344957; border-color:#ffffff44; font-size:14px; padding:0 12px; }
#btnCinematicRecord.is-recording svg { color:#ed6666; }
.cinematic-recording-result { position:fixed; margin:auto; width:min(760px,calc(100vw - 32px)); max-height:calc(100dvh - 32px);
    overflow:auto; box-sizing:border-box; padding:24px; border:1px solid #ffffff44; border-radius:18px;
    background:#172029; color:white; font:15px/1.5 system-ui,sans-serif; box-shadow:0 18px 50px #0009; }
.cinematic-recording-result::backdrop { background:#050c16b3; }
.cinematic-recording-result strong { display:block; font-size:20px; padding-right:32px; }
.cinematic-recording-result video { display:block; width:100%; max-height:55dvh; background:#000; border-radius:10px; }
.cinematic-recording-result [hidden] { display:none !important; }
.cinematic-recording-result button { border:1px solid #ffffff44; border-radius:12px; background:#344957; color:white; min-height:44px; padding:8px 16px; font:inherit; cursor:pointer; }
.cinematic-recording-result button:focus-visible { outline:3px solid #61bbff; outline-offset:2px; }
.cinematic-recording-result .recording-close { position:absolute; right:10px; top:8px; width:44px; border:0; background:transparent; font-size:24px; padding:0; }
.recording-result-actions { display:flex; flex-wrap:wrap; gap:10px; }
#cinematicRecordingDetails { font-size:12px; color:#bdcdda; }
@media (max-width:600px) {
    .cinematic-actions { gap:5px; max-width:calc(100% - 20px); }
    .cinematic-actions > button, .cinematic-actions > .cinematic-music-menu > button { min-width:44px; padding:0 10px; }
    #btnCinematicRecord > span, #cinematicRepeatLabel { display:none; }
    .cinematic-music-panel { position:fixed; top:66px; right:12px; box-sizing:border-box; max-width:calc(100vw - 24px); }
    .cinematic-recording-result { padding:18px; }
}
@media (max-width:600px) {
    #cinematicPauseLabel { display:none; }
    .cinematic-actions #cinematicPauseGlyph { display:inline; }
}
@media (max-width:380px) {
    #cinematicExitLabel { display:none; }
    .cinematic-actions #btnCinematicExit > span:first-child { display:inline; }
}
