/* Live tour with review (js/cyber-tour.js) - the stage around the labs, the cursor, the review bar.
 * Central on purpose: every tour page (HTML/tours/*.html) only declares its panes, the look lives here.
 * Colours as in the films' stage (videopipeline/mission-control/stage.html): dark blue ground, never black.
 */
:root {
    --tour-ground: #081428;
    --tour-ink: #e6eefa;
    --tour-dim: #8ba1c0;
    --tour-lambda: rgb(245, 194, 66);
    --tour-phi: rgb(121, 158, 49);
    --tour-red: rgb(176, 36, 24);
    --tour-cyan: #00d2ff;
    --tour-line: rgba(120, 160, 220, 0.25);
    --tour-panel: rgba(10, 24, 48, 0.92);
}

html, body.cyber-tour {
    margin: 0;
    height: 100%;
    overflow: hidden;
    background: var(--tour-ground);
}

body.cyber-tour {
    display: flex;
    flex-direction: column;
    color: var(--tour-ink);
    font-family: Outfit, system-ui, sans-serif;
    background-image: radial-gradient(900px 500px at 15% -10%, #0f2a55 0%, transparent 60%),
                      radial-gradient(700px 420px at 95% 0%, #10203f 0%, transparent 58%);
    -webkit-user-select: none;
    user-select: none;
}

/* everything the viewer watches: chapter line + stage (+ title card and veil on top of both) */
#tour-view {
    position: relative;
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    border-radius: 0 0 12px 12px;
    transition: box-shadow 0.25s;
}

#tour-view.rec { box-shadow: inset 0 0 0 3px var(--tour-red), inset 0 0 40px rgba(176, 36, 24, 0.45); }

/* ------------------------------------------------------------ chapter line */
#tour-cap {
    flex: 0 0 48px;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 0 16px;
    font-family: Orbitron, sans-serif;
}

/* "KAPITEL 04" as one word block, both big and yellow (Doc, 19.09.2026: "und Kapitel auch groß und gelb") */
#tour-cap .k { font-size: 20px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--tour-lambda); }
#tour-cap .k:empty { display: none; }
#tour-cap .n { font-size: 20px; font-weight: 700; color: var(--tour-lambda); min-width: 30px; margin-left: -4px; }
#tour-cap .t { font-size: 17px; font-weight: 700; letter-spacing: 0.04em; }
/* no signature top right any more (Doc, 19.09.2026: "rechts oben steht Doc Alvers Mathe-Labor, das mach bitte weg") */
#tour-cap .k, #tour-cap .n, #tour-cap .t { transition: opacity 0.35s; }
#tour-cap.swap .k, #tour-cap.swap .n, #tour-cap.swap .t { opacity: 0; }

/* ------------------------------------------------------------------ stage */
.tour-stage {
    position: relative;
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    gap: 16px;
    padding: 0 16px 12px;
}

/* the avatar (def.avatar): a round head in the lower right corner of the stage, like Solita in the films */
#tour-avatar {
    position: absolute;
    right: 32px;
    bottom: 24px;
    z-index: 5;
    width: var(--avatar-size, 304px);
    height: var(--avatar-size, 304px);
    border-radius: 50%;
    overflow: hidden;
    pointer-events: none;
    background: #0a1a36 center var(--avatar-y, 42%) / 150% no-repeat;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.45);
}

/* the talking clip, framed exactly like the poster underneath: same zoom, same height (--avatar-y, default 42 %) */
#tour-avatar video {
    position: absolute;
    left: 50%;
    top: var(--avatar-y, 42%);
    width: calc(var(--avatar-zoom, 1.5) * 100%);
    height: calc(var(--avatar-zoom, 1.5) * 100%);
    transform: translate(-50%, calc(-1 * var(--avatar-y, 42%)));
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.3s;
}

#tour-avatar video.on { opacity: 1; }

.tour-col { position: relative; display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.tour-col.grow { flex: 1 1 auto; }

.tour-label {
    flex: 0 0 18px;
    font-family: Orbitron, sans-serif;
    font-size: 10px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--tour-dim);
    padding-left: 2px;
}

.tour-pane {
    position: relative;
    flex: 1 1 auto;
    min-height: 0;
    border: 1px solid var(--tour-line);
    border-radius: 10px;
    overflow: hidden;
    background: #0a1a36;
}

/* iframes are zoomed from inside (js sets documentElement.style.zoom from data-width) - never a transform,
   a transform scales the finished picture and small letters go soft (Doc, 18.09.2026: "schon wieder so unscharf") */
.tour-pane > iframe, .tour-screen > iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
    background: var(--tour-ground);
}

/* a second page over the first (fades in with t.show) */
iframe.tour-over { opacity: 0; transition: opacity 0.6s; pointer-events: none; }
iframe.tour-over.on { opacity: 1; pointer-events: auto; }

/* a phone: a 390 px wide page, zoomed to the screen's width */
.tour-phone {
    position: relative;
    flex: 0 0 auto;
    height: calc(100% - 18px);         /* the column minus its label; the width follows from the ratio */
    aspect-ratio: 312 / 640;
    border-radius: 34px;
    background: #02060e;
    border: 2px solid #2a3f66;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.45);
    padding: 10px;
    box-sizing: border-box;
}

.tour-col.phone { flex: 0 0 auto; align-items: flex-start; }

.tour-screen { position: relative; width: 100%; height: 100%; border-radius: 24px; overflow: hidden; background: #0a1a36; }
/* the rounded clip lets a light hairline shine through along the corners - thin white arcs over a red lock screen
   (Doc, 19.09.2026: "in den Ecken ... ganz leichte weiße Linien", then "immer noch ... sieht wie ein Fehler aus").
   A ring INSIDE the clip does not help: its edge is smoothed on the very same pixels (measured at dsf 2). So the
   ring sits on the phone, outside the clip, from 1 px beyond the screen's edge to 2 px into it, in bezel colour. */
.tour-phone::after {
    content: '';
    position: absolute;
    inset: 9px;
    z-index: 3;
    border-radius: 25px;
    box-shadow: inset 0 0 0 3px #02060e;
    pointer-events: none;
}
/* the scanned test comes in slowly, the dark scan screen melts into the light page (Doc, 19.09.2026: "kann man langsam
   überblenden, von jetzt blau auf weiß") */
.tour-screen > iframe { background: #f6f7fb; opacity: 0; transition: opacity 1.8s ease-in-out; }
.tour-screen > iframe.on { opacity: 1; }

.tour-screen .off {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    text-align: center;
    color: var(--tour-dim);
    font-family: Orbitron, sans-serif;
    font-size: 12px;
    letter-spacing: 0.12em;
    line-height: 1.9;
}

/* a phone waiting for a QR code: camera dark, a viewfinder with corners, a faint code and a running scan line
   (Doc, 19.09.2026, on the plain "Zettel scannen …": "nicht so schön"). The line stands while the tour stands. */
.tour-screen .off.tour-scan {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 22px;
    background: radial-gradient(120% 70% at 50% 42%, #0d2244 0%, #050d1c 70%);
}

.tour-scan .finder { position: relative; width: 58%; aspect-ratio: 1; }
.tour-scan .finder i { position: absolute; width: 24%; height: 24%; border: 3px solid var(--tour-cyan); filter: drop-shadow(0 0 6px rgba(0, 210, 255, 0.55)); }
.tour-scan .finder i:nth-child(1) { left: 0; top: 0; border-right: 0; border-bottom: 0; border-top-left-radius: 12px; }
.tour-scan .finder i:nth-child(2) { right: 0; top: 0; border-left: 0; border-bottom: 0; border-top-right-radius: 12px; }
.tour-scan .finder i:nth-child(3) { left: 0; bottom: 0; border-right: 0; border-top: 0; border-bottom-left-radius: 12px; }
.tour-scan .finder i:nth-child(4) { right: 0; bottom: 0; border-left: 0; border-top: 0; border-bottom-right-radius: 12px; }
.tour-scan .finder svg { position: absolute; inset: 20%; width: 60%; height: 60%; opacity: 0.3; }
.tour-scan .finder b {
    position: absolute;
    left: 9%;
    right: 9%;
    top: 12%;
    height: 2px;
    border-radius: 1px;
    background: linear-gradient(90deg, transparent, var(--tour-cyan) 20%, #bff4ff 50%, var(--tour-cyan) 80%, transparent);
    box-shadow: 0 0 12px rgba(0, 210, 255, 0.9), 0 0 26px rgba(0, 210, 255, 0.45);
    animation: tour-scanline 2.4s ease-in-out infinite alternate;
}

@keyframes tour-scanline { to { top: 86%; } }
body.cyber-tour:not(.running) .tour-scan .finder b { animation-play-state: paused; }

.tour-scan .lbl { font-family: Orbitron, sans-serif; font-size: 14px; font-weight: 700; letter-spacing: 0.22em; text-transform: uppercase; color: var(--tour-ink); }

/* the school on top and what is being written, the whole block centred (Doc, 19.09.2026: "das IBB-Logo auf weißem
   Grund ist Mist ... das Logo ein bisschen größer und den ganzen Block bitte zentriert"). The logo comes in as inline
   SVG: its grey lettering (.st2, made for white paper) turns light here, the red mark stays red. */
.tour-scan .head { display: flex; justify-content: center; margin-bottom: 4px; }
.tour-scan .head svg { display: block; height: 59px; width: auto; max-width: 84%; }   /* 54 px + 10 % (Doc, 19.09.2026) */
.tour-scan .head svg .st2 { fill: var(--tour-ink); }
.tour-scan .what { display: flex; flex-direction: column; align-items: center; gap: 6px; margin-bottom: 6%; }
.tour-scan .what b { font-family: Orbitron, sans-serif; font-size: 17px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--tour-lambda); }
.tour-scan .what span { font-family: Outfit, sans-serif; font-size: 14px; letter-spacing: 0.02em; color: var(--tour-ink); }
.tour-scan .sub { margin-top: -12px; font-size: 13px; color: var(--tour-dim); }

/* devices that work unseen (the rest of the class): laid out at their real size, off screen */
#tour-offstage { position: fixed; left: -12000px; top: 0; width: 390px; height: 844px; overflow: hidden; pointer-events: none; }
#tour-offstage iframe { position: absolute; left: 0; top: 0; width: 390px; height: 844px; border: 0; }

/* while the tour runs, the pages are the tour's - a click by the viewer would change what the next scene
   expects. Paused, they are free to be tried out. */
body.cyber-tour.running .tour-stage { pointer-events: none; }

/* -------------------------------------------------------------- title card */
#tour-card {
    position: absolute;
    inset: 0;
    z-index: 20;
    display: grid;
    place-items: center;
    text-align: center;
    overflow: hidden;
    background: radial-gradient(900px 520px at 50% 40%, #0f2a55 0%, var(--tour-ground) 70%);
    transition: opacity 0.8s;
}

#tour-card.hide { opacity: 0; pointer-events: none; }
#tour-card h1 { margin: 0; font-family: Orbitron, sans-serif; font-weight: 700; font-size: clamp(28px, 4.6vw, 58px); letter-spacing: 0.01em; }
#tour-card p { margin: 18px 0 0; font-size: clamp(15px, 1.6vw, 20px); color: var(--tour-dim); font-weight: 300; }
#tour-card .sig { margin-top: 34px; font-family: Orbitron, sans-serif; font-size: 13px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--tour-lambda); }
#tour-card .blk { transition: transform 1.1s cubic-bezier(.3, .1, .2, 1); }
#tour-card.img .blk { transform: translateY(-24vh); }

/* the picture and, before the start, the big play button under it share one column */
#tour-card .media {
    position: absolute;
    left: 50%;
    top: 38%;                           /* "Bild und Play Stück hoch" (Doc, 19.09.2026) */
    width: min(640px, 70%, calc((52vh - 170px) * 1.905));   /* picture + button stay inside short windows (measured) */
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 44px;                          /* "Stück runter" (Doc, 19.09.2026) */
}

/* A tour without a card picture (the silent lab walkthroughs): .media then holds nothing but the play button,
   and 38 % is where the headline is - the green circle sat right on the title (Doc, 20.09.2026: "play muss
   runter (wie sonst)"). With a picture the text block moves up by 24vh and the button lands below it; without
   one the text stays centred, so the button goes below the signature instead. */
#tour-card:not(.img) .media { top: 64%; }

#tour-card img {
    width: 100%;
    aspect-ratio: 640 / 336;
    object-fit: cover;
    object-position: 50% 38%;
    border-radius: 16px;
    box-shadow: 0 16px 50px rgba(0, 0, 0, 0.55);          /* no border (Doc, 19.09.2026: "das Bild hat einen Rand, weg bitte") */
    opacity: 0;
    transform: translateY(30px) scale(0.96);
    transition: opacity 1s ease 0.35s, transform 1.1s cubic-bezier(.3, .1, .2, 1) 0.35s;
}

#tour-card.img img { opacity: 1; transform: none; }

/* before the start: a big green play under the class, pulsing (Doc, 19.09.2026: "am Anfang einen großen Play unter die
   Kids, grün waber") - a click is space */
#tour-start {
    display: none;
    place-items: center;
    width: 92px;
    height: 92px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: var(--tour-phi);
    color: #fff;
    cursor: pointer;
    animation: tour-glow-box 1.8s ease-in-out infinite;
}
#tour-start svg { display: block; width: 46px; height: 46px; }
body.cyber-tour.idle #tour-start { display: grid; }
/* before the start the big play is the only one: the small one and "– bereit" go (Doc, 19.09.2026: "das dann auch weg") */
body.cyber-tour.idle #tour-play, body.cyber-tour.idle #tour-now { visibility: hidden; }
#tour-card.still .blk, #tour-card.still img { transition: none; }

/* --------------------------------------------------- fast forward to a scene */
#tour-veil {
    position: absolute;
    inset: 0;
    z-index: 25;
    display: none;
    place-items: center;
    text-align: center;
    background: rgba(8, 20, 40, 0.94);
    font-family: Orbitron, sans-serif;
    letter-spacing: 0.08em;
}

#tour-veil.on { display: grid; }
#tour-veil b { display: block; font-size: 22px; color: var(--tour-lambda); margin-bottom: 14px; }
#tour-veil span { font-size: 13px; color: var(--tour-dim); }
#tour-veil i { display: block; width: 320px; max-width: 70vw; height: 4px; margin: 18px auto 0; border-radius: 2px; background: rgba(120, 160, 220, 0.25); overflow: hidden; }
#tour-veil i::after { content: ''; display: block; height: 100%; width: var(--p, 0%); background: var(--tour-cyan); transition: width 0.3s; }

/* ------------------------------------------------ cursor, ripple, callout */
#tour-cursor {
    position: fixed;
    left: 50%;
    top: 50%;
    z-index: 30;
    width: 26px;
    height: 38px;
    pointer-events: none;
    transform: translate(-4px, -2px);
    transition: left 0.55s cubic-bezier(.4, .1, .2, 1), top 0.55s cubic-bezier(.4, .1, .2, 1), opacity 0.4s;
    opacity: 0;
}

#tour-cursor.on { opacity: 1; }
/* riding on a dragging finger (t.drag, t.slide): every step lands at once */
#tour-cursor.follow { transition: opacity 0.4s; }
body.cyber-tour.fast #tour-cursor { transition: none; }

.tour-rip {
    position: fixed;
    z-index: 29;
    width: 58px;
    height: 58px;
    border-radius: 50%;
    pointer-events: none;
    border: 4px solid #ffd93d;
    box-shadow: 0 0 18px rgba(255, 217, 61, 0.8);
    transform: translate(-50%, -50%) scale(0.25);
    animation: tour-rip 0.6s ease-out forwards;
}

@keyframes tour-rip { to { transform: translate(-50%, -50%) scale(1.8); opacity: 0; } }

#tour-callout {
    position: fixed;
    z-index: 31;
    padding: 8px 15px;
    border-radius: 10px;
    background: rgba(8, 20, 42, 0.94);
    border: 2px solid #ffd93d;
    color: #fff;
    font-family: Orbitron, sans-serif;
    font-size: 18px;
    letter-spacing: 0.04em;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.55);
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.3s, transform 0.3s;
}

#tour-callout.on { opacity: 1; transform: none; }

/* ------------------------------------------------------------- review bar */
#tour-live {
    flex: 0 0 auto;
    display: flex;
    flex-direction: row-reverse;     /* a long remark keeps its newest words in sight (as filmkritik.html) */
    overflow: hidden;
    white-space: nowrap;
    min-height: 26px;
    /* margin, not padding: overflow is clipped at the padding box, so with padding the text ran out right up to the
       window's edge (Doc, 19.09.2026: "Schrift läuft raus"); the words leaving on the left fade out */
    padding: 6px 0 0;
    margin: 0 16px;
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 48px);
    mask-image: linear-gradient(90deg, transparent 0, #000 48px);
    font-size: 0.98rem;
    color: #cfe0f5;
}

#tour-live span { margin: 0 auto; flex: 0 0 auto; }

/* Solita's words (js/cyber-tour.js, key u): a row of their own, two lines high whatever the line - a row that grew and
   shrank with the text would resize the lab under it every sentence */
#tour-sub {
    flex: 0 0 auto;
    display: none;
    height: 2.7em;
    margin: 6px 16px 0;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-size: 1.05rem;
    line-height: 1.3;
    color: #f2f6fc;
    overflow: hidden;
}
body.cyber-tour.subs #tour-sub { display: flex; }
#tour-sub span { max-width: 62em; text-wrap: balance; }
#tour-live.empty { color: #7d93b4; }

/* submitted: the line and the button glow green until the review goes on (Doc, 19.09.2026: "Abgeschickt ... grün wabernd") */
@keyframes tour-glow-text {
    0%, 100% { opacity: 1; text-shadow: 0 0 6px rgba(121, 158, 49, 0.35); }
    50% { opacity: 0.6; text-shadow: 0 0 18px rgba(121, 158, 49, 0.95); }
}
@keyframes tour-glow-box {
    0%, 100% { box-shadow: 0 0 6px rgba(121, 158, 49, 0.3); filter: brightness(1); }
    50% { box-shadow: 0 0 24px rgba(121, 158, 49, 0.85); filter: brightness(1.25); }
}
body.cyber-tour.submitted #tour-live { color: #a8d24e; }
body.cyber-tour.submitted #tour-live span { animation: tour-glow-text 1.8s ease-in-out infinite; }
body.cyber-tour.submitted #tour-send { color: #fff; background: var(--tour-phi); border-color: var(--tour-phi); animation: tour-glow-box 1.8s ease-in-out infinite; }

#tour-hud {
    flex: 0 0 auto;
    display: grid;
    /* outer columns equal: the bar is centred; never narrower than the buttons on the right (--side, js fitHud) */
    grid-template-columns: minmax(var(--side, 0px), 1fr) minmax(0, 3fr) minmax(var(--side, 0px), 1fr);
    align-items: center;
    gap: 10px 18px;
    padding: 8px 16px 12px;
    font-size: 0.86rem;
    color: #9fb4d6;
}
#tour-hud .hud-l, #tour-hud .hud-c, #tour-hud .hud-r { display: flex; align-items: center; gap: 12px; min-width: 0; }
/* a narrow window (js fitHud): bar and times on top over the whole width, play and review buttons below */
#tour-hud.stack { grid-template-columns: minmax(0, 1fr) auto; }
#tour-hud.stack .hud-c { grid-column: 1 / -1; grid-row: 1; }
#tour-hud.stack .hud-l, #tour-hud.stack .hud-r { grid-row: 2; }
#tour-hud .hud-r { justify-content: flex-end; gap: 10px; }

.tour-btn {
    font-family: Orbitron, sans-serif;
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    color: var(--tour-ink);
    background: rgba(10, 24, 48, 0.8);
    border: 1px solid rgba(0, 210, 255, 0.4);
    border-radius: 999px;
    padding: 9px 14px;
    cursor: pointer;
    white-space: nowrap;
}

.tour-btn:hover { border-color: #9de8ff; }
.tour-btn:disabled { opacity: 0.4; cursor: default; }

#tour-play { width: 40px; height: 40px; padding: 0; display: grid; place-items: center; }
#tour-play svg { display: block; }

/* on the bar's height (Doc, 19.09.2026: "so hoch wie bar ... die Schrift ist zu tief"): Orbitron keeps room for
   descenders below its capitals, so a centred line box put the letters low. text-box trims the box to capitals and
   baseline, centring then means the capitals' middle on the bar's middle; the clip margin keeps the "g" visible. */
/* size: 12.5 px was too small, 19.4 px (capitals = bar) "zuu groß" - the middle (Doc, 19.09.2026) */
.tour-now { font-family: Orbitron, sans-serif; font-size: 16px; letter-spacing: 0.05em; color: var(--tour-ink); min-width: 0; white-space: nowrap;
    overflow: clip; overflow-clip-margin: 6px; text-overflow: ellipsis; max-width: 30ch; text-box: trim-both cap alphabetic; }
.tour-now b { color: var(--tour-lambda); margin-right: 8px; }

/* one segment per scene, as wide as the scene is long; a click jumps there */
#tour-segs { flex: 1 1 auto; display: flex; gap: 3px; height: 14px; min-width: 120px; }
#tour-segs .seg { position: relative; flex: 1 1 0; border-radius: 3px; background: rgba(120, 160, 220, 0.2); cursor: pointer; overflow: hidden; }
#tour-segs .seg:hover { background: rgba(157, 232, 255, 0.35); }
#tour-segs .seg i { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: var(--tour-cyan); }
#tour-segs .seg.done i { width: 100%; background: rgba(0, 210, 255, 0.55); }
#tour-segs .seg .mk { position: absolute; top: 0; bottom: 0; width: 3px; margin-left: -1px; background: var(--tour-lambda); }

.tour-time { font-variant-numeric: tabular-nums; min-width: 3.2em; text-align: right; }
.tour-time.run { text-align: left; color: var(--tour-ink); }

/* the microphone: only while the tour stands, red as the recording frame - in the bar, never on the picture */
/* hidden, not gone: its place stays reserved, or it pushed over the total time the moment the tour started (19.09.2026) */
#tour-mic { display: inline-flex; visibility: hidden; align-items: center; gap: 8px; color: #fff; background: var(--tour-red); border-color: var(--tour-red); }
#tour-mic svg { width: 16px; height: 16px; }
body.cyber-tour.can-rec #tour-mic { visibility: visible; }
body.cyber-tour.recording #tour-mic { visibility: visible; animation: tour-pulse 1s infinite; }
@keyframes tour-pulse { 50% { opacity: 0.45; } }

#tour-rec {
    position: absolute;
    top: 8px;
    left: 50%;
    z-index: 26;
    transform: translateX(-50%);
    display: none;
    align-items: center;
    gap: 9px;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(176, 36, 24, 0.92);
    color: #fff;
    font-family: Orbitron, sans-serif;
    font-size: 0.74rem;
    letter-spacing: 1.5px;
}

#tour-rec i { width: 11px; height: 11px; border-radius: 50%; background: #fff; animation: tour-pulse 1s infinite; }
#tour-view.rec #tour-rec { display: flex; }

/* the remarks, above the bar */
#tour-drawer {
    position: fixed;
    right: 16px;
    bottom: 72px;
    z-index: 40;
    width: min(420px, calc(100vw - 32px));
    max-height: 50vh;
    display: none;
    flex-direction: column;
    gap: 8px;
    padding: 12px;
    border: 1px solid rgba(0, 210, 255, 0.35);
    border-radius: 12px;
    background: var(--tour-panel);
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.5);
}

#tour-drawer.on { display: flex; }
#tour-drawer h3 { margin: 0; font-family: Orbitron, sans-serif; font-size: 0.8rem; letter-spacing: 0.1em; color: var(--tour-phi); }
#tour-drawer .list { display: flex; flex-direction: column; gap: 7px; overflow: auto; }
#tour-drawer .empty { color: var(--tour-dim); font-size: 0.85rem; }

.tour-item {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 8px;
    align-items: start;
    padding: 8px 10px;
    border: 1px solid rgba(0, 210, 255, 0.22);
    border-radius: 9px;
    background: rgba(10, 24, 48, 0.72);
    cursor: pointer;
    font-size: 0.82rem;
    color: #dbe8f7;
}

.tour-item:hover { border-color: #9de8ff; }
.tour-item b { font-family: Orbitron, sans-serif; color: var(--tour-lambda); font-size: 0.74rem; white-space: nowrap; }
.tour-item .x { color: #e06a5e; padding: 0 4px; }
.tour-item .leer { color: #9fb4d6; font-style: italic; }

@media (max-width: 900px) {
    .tour-stage { flex-direction: column; overflow: auto; }
    .tour-col.phone { height: 70vh; align-self: center; }
    .tour-col.grow { min-height: 60vh; }
    .tour-now { max-width: 18ch; }
    #tour-hud { grid-template-columns: minmax(0, 1fr); }
}
