/* tutor.css — the Cockpit Tutorials player (story-format animated tours), 2026-10-09.
   Hook-in: zero app.js / styles.css edits. Everything is themed from the site's own tokens
   (--bg --panel --text --muted --accent --bull --bear --amber --border) so the 18 skins and
   light/dark carry through. Only transforms and opacity animate; the vibe canvas is blurred
   statically. prefers-reduced-motion: no keyframe animation at all. */

/* ---- toolbar button, guide card, toast ---- */
#tutor-btn { color: var(--accent) !important; border-color: color-mix(in srgb, var(--accent) 45%, var(--border)) !important; font-weight: 600; }
#tutor-btn:hover { background: var(--accent-soft); }
.tutor-menu { position: fixed; z-index: 10001; min-width: 260px; max-width: min(380px, 92vw); max-height: 70vh; overflow: auto;
  background: var(--panel); color: var(--text); border: 1px solid var(--border); border-radius: 10px;
  box-shadow: 0 12px 40px rgba(0,0,0,.28); padding: 8px; font-size: 13px; }
.tutor-menu h5 { margin: 6px 8px 4px; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.tutor-menu button { display: flex; width: 100%; align-items: center; gap: 8px; text-align: left; background: none; border: 0; color: var(--text);
  padding: 7px 8px; border-radius: 7px; cursor: pointer; font: inherit; font-size: 13px; }
.tutor-menu button:hover { background: var(--accent-soft); color: var(--accent); }
.tutor-menu button .tm-min { margin-left: auto; color: var(--muted); font-size: 11px; white-space: nowrap; }
.tutor-menu button .tm-ok { color: var(--bull); font-weight: 700; }
.tutor-menu .tm-empty { color: var(--muted); padding: 6px 8px; }
.tutor-gc { display: flex; align-items: center; gap: 12px; margin: 0 0 10px; padding: 10px 12px; border: 1px solid color-mix(in srgb, var(--accent) 40%, var(--border));
  background: linear-gradient(100deg, var(--accent-soft), transparent 70%); border-radius: 10px; }
.tutor-gc button { font: inherit; font-size: 13px; font-weight: 700; color: #fff; background: var(--accent); border: 0; border-radius: 8px; padding: 7px 12px; cursor: pointer; white-space: nowrap; }
.tutor-gc span { color: var(--muted); font-size: 12.5px; line-height: 1.4; }
.tutor-toast { position: fixed; right: 16px; bottom: 16px; z-index: 10001; display: flex; align-items: center; gap: 10px; max-width: min(420px, calc(100vw - 32px));
  background: var(--panel); color: var(--text); border: 1px solid color-mix(in srgb, var(--accent) 45%, var(--border)); border-left: 4px solid var(--accent);
  border-radius: 10px; padding: 10px 12px; box-shadow: 0 10px 36px rgba(0,0,0,.25); font-size: 13px; transform: translateY(0); opacity: 1;
  transition: transform .35s cubic-bezier(.2,.8,.2,1), opacity .35s; }
.tutor-toast.off { transform: translateY(16px); opacity: 0; pointer-events: none; }
.tutor-toast b { color: var(--accent); }
.tutor-toast .tt-play { font: inherit; font-size: 13px; font-weight: 700; color: #fff; background: var(--accent); border: 0; border-radius: 7px; padding: 6px 10px; cursor: pointer; white-space: nowrap; }
.tutor-toast .tt-x { font: inherit; background: none; border: 0; color: var(--muted); cursor: pointer; font-size: 15px; padding: 2px 4px; }

/* ---- the player root ---- */
.tutor { position: fixed; inset: 0; z-index: 10000; color: var(--text); font-size: 16px; line-height: 1.35; -webkit-font-smoothing: antialiased; }
.tutor, .tutor * { box-sizing: border-box; }
.tutor[data-mode="scene"] { background: var(--tu-stage, #0b1020); }
.tutor[data-mode="route"] { background: transparent; }
.tutor[data-mode="spot"] { background: transparent; }
.tutor[data-mode="try"] { background: transparent; pointer-events: none; }
.tutor[data-mode="try"] .tutor-bar, .tutor[data-mode="try"] .tutor-callout, .tutor[data-mode="try"] .tutor-chap { pointer-events: auto; }
.tutor-vibe { position: absolute; inset: -6%; width: 112%; height: 112%; filter: blur(26px) saturate(1.35); opacity: 0; transition: opacity .5s; pointer-events: none; }
.tutor[data-mode="scene"] .tutor-vibe { opacity: 1; }
@media (prefers-reduced-motion: no-preference) { .tutor[data-mode="scene"] .tutor-vibe { animation: tutor-hue 28s linear infinite; } }
@keyframes tutor-hue { from { filter: blur(26px) saturate(1.35) hue-rotate(0deg); } to { filter: blur(26px) saturate(1.35) hue-rotate(360deg); } }
.tutor-grain { position: absolute; inset: 0; pointer-events: none; opacity: .18; mix-blend-mode: overlay;
  background-image: radial-gradient(circle at 20% 30%, rgba(255,255,255,.25) 0 1px, transparent 1.5px), radial-gradient(circle at 70% 80%, rgba(255,255,255,.2) 0 1px, transparent 1.5px);
  background-size: 7px 7px, 11px 11px; display: none; }
.tutor[data-mode="scene"] .tutor-grain { display: block; }

/* spotlight mask + ring */
.tutor-mask { position: absolute; inset: 0; width: 100%; height: 100%; display: none; }
.tutor[data-mode="spot"] .tutor-mask, .tutor[data-mode="try"] .tutor-mask { display: block; }
.tutor[data-mode="try"] .tutor-mask { pointer-events: none; }
.tutor-mask path { fill: rgba(5, 8, 20, .62); fill-rule: evenodd; }
.tutor-ring { position: absolute; display: none; border: 2px solid var(--accent); border-radius: 10px; pointer-events: none;
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 35%, transparent), 0 0 34px color-mix(in srgb, var(--accent) 65%, transparent); }
.tutor[data-mode="spot"] .tutor-ring, .tutor[data-mode="try"] .tutor-ring { display: block; }
@media (prefers-reduced-motion: no-preference) { .tutor-ring { animation: tutor-pulse 1.6s ease-in-out infinite; } }
@keyframes tutor-pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.025); } }
.tutor-cursor { position: absolute; width: 22px; height: 22px; margin: -11px 0 0 -11px; border-radius: 50%; background: var(--accent); opacity: 0; pointer-events: none;
  box-shadow: 0 0 0 6px color-mix(in srgb, var(--accent) 30%, transparent), 0 4px 18px rgba(0,0,0,.35); will-change: transform; }

/* callout (spot / try captions) */
.tutor-callout { position: absolute; display: none; width: min(460px, calc(100vw - 24px)); background: var(--panel); color: var(--text);
  border: 1px solid color-mix(in srgb, var(--accent) 40%, var(--border)); border-radius: 12px; padding: 14px 16px 12px; box-shadow: 0 14px 44px rgba(0,0,0,.35); }
.tutor[data-mode="spot"] .tutor-callout, .tutor[data-mode="try"] .tutor-callout { display: flex; gap: 10px; align-items: flex-end; }
.tutor-callout .tc-av { flex: 0 0 60px; height: 86px; margin: -4px 0 -14px -8px; }
.tutor-callout .tc-body { flex: 1; min-width: 0; }
.tutor-callout::before { content: ""; position: absolute; width: 14px; height: 14px; background: var(--panel); border-left: 1px solid color-mix(in srgb, var(--accent) 40%, var(--border)); border-top: 1px solid color-mix(in srgb, var(--accent) 40%, var(--border)); transform: rotate(45deg); left: var(--tu-arrow-x, 28px); top: -8px; }
.tutor-callout.above::before { top: auto; bottom: -8px; transform: rotate(225deg); }
.tutor-callout .tc-kicker { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); margin-bottom: 4px; }
.tutor-callout .tc-text { font-size: clamp(15px, 1.5vw, 19px); line-height: 1.4; }
.tutor-callout .tc-try { display: flex; gap: 8px; align-items: center; margin-top: 10px; }
.tutor-callout .tc-try .tc-do { font-weight: 700; color: var(--accent); }
.tutor-callout .tc-skip { margin-left: auto; font: inherit; font-size: 12px; color: var(--muted); background: none; border: 1px solid var(--border); border-radius: 6px; padding: 3px 8px; cursor: pointer; }
.tutor-callout .tc-ok { color: var(--bull); font-weight: 700; }

/* stage (scene content) */
.tutor-stage { position: absolute; inset: 0 0 118px 0; display: none; align-items: center; justify-content: center; padding: clamp(14px, 3vw, 40px); overflow: hidden; }
.tutor[data-mode="scene"] .tutor-stage { display: flex; }
.tutor-stage > * { width: min(1040px, 100%); }
.tu-title { text-align: center; }
.tu-title h1 { margin: 0; font-size: clamp(30px, 5.2vw, 62px); line-height: 1.05; letter-spacing: -.02em; font-weight: 800; color: var(--tu-ink, #fff); text-shadow: 0 2px 30px rgba(0,0,0,.35); will-change: transform, opacity; }
.tu-title .tu-sub { margin: 14px auto 0; font-size: clamp(16px, 2.2vw, 24px); color: var(--tu-ink2, rgba(255,255,255,.82)); max-width: 760px; will-change: transform, opacity; }
.tu-title .tu-kicker { display: inline-block; margin-bottom: 14px; padding: 5px 12px; border-radius: 999px; font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  background: color-mix(in srgb, var(--accent) 28%, transparent); color: var(--tu-ink, #fff); border: 1px solid color-mix(in srgb, var(--accent) 60%, transparent); }

.tu-versus { display: grid; grid-template-columns: 1fr auto 1fr; gap: clamp(10px, 2vw, 28px); align-items: stretch; }
@media (max-width: 640px) { .tu-versus { grid-template-columns: 1fr; } .tu-versus .tu-vs { display: none; } .tutor-chap .tch { display: none; } }
.tu-versus > *, .tu-card, .tu-bars, .tu-quiz, .tu-end, .tu-steps { min-width: 0; max-width: 100%; }
.tu-card { background: color-mix(in srgb, var(--panel) 86%, transparent); border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--border)); border-radius: 18px; padding: clamp(14px, 2vw, 24px);
  box-shadow: 0 20px 60px rgba(0,0,0,.35); will-change: transform, opacity; position: relative; overflow: hidden; }
.tu-card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 14%, transparent), transparent 60%); pointer-events: none; }
.tu-card .tu-emoji { font-size: clamp(30px, 4vw, 48px); line-height: 1; }
.tu-card .tu-name { font-size: clamp(18px, 2.4vw, 28px); font-weight: 800; margin-top: 6px; letter-spacing: -.01em; }
.tu-card .tu-sym { font-size: 12px; color: var(--muted); font-weight: 600; letter-spacing: .06em; }
.tu-card .tu-rows { margin-top: 12px; display: grid; gap: 8px; }
.tu-card .tu-row { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: 8px 10px; border-radius: 10px; background: color-mix(in srgb, var(--bg) 55%, transparent); }
.tu-card .tu-row .tu-lab { font-size: 12.5px; color: var(--muted); }
.tu-card .tu-row .tu-val { font-size: clamp(18px, 2.4vw, 30px); font-weight: 800; font-variant-numeric: tabular-nums; }
.tu-card .tu-row.win { outline: 2px solid var(--bull); outline-offset: -2px; }
.tu-card .tu-row.win .tu-val::after { content: " ✓"; color: var(--bull); font-size: .7em; }
.tu-card .tu-row.lose { opacity: .8; }
.tu-val.up { color: var(--bull); } .tu-val.dn { color: var(--bear); }
.tu-vs { align-self: center; font-size: clamp(22px, 4vw, 44px); font-weight: 900; color: var(--tu-ink, #fff); text-shadow: 0 0 30px color-mix(in srgb, var(--accent) 80%, transparent); will-change: transform, opacity; }

.tu-bars { background: color-mix(in srgb, var(--panel) 86%, transparent); border: 1px solid var(--border); border-radius: 18px; padding: clamp(14px, 2vw, 24px); box-shadow: 0 20px 60px rgba(0,0,0,.35); }
.tu-bars h3 { margin: 0 0 12px; font-size: clamp(16px, 2vw, 22px); font-weight: 800; }
.tu-bars .tu-brow { display: grid; grid-template-columns: minmax(90px, 160px) 1fr minmax(64px, auto); gap: 10px; align-items: center; margin: 7px 0; font-size: clamp(13px, 1.4vw, 16px); }
.tu-bars .tu-brow .tu-bl { color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tu-bars .tu-brow.cast .tu-bl { font-weight: 800; color: var(--accent); }
.tu-bars .tu-btrack { height: clamp(14px, 1.8vw, 22px); background: color-mix(in srgb, var(--bg) 60%, transparent); border-radius: 999px; overflow: hidden; }
.tu-bars .tu-bfill { height: 100%; width: 100%; transform-origin: left center; border-radius: 999px; background: linear-gradient(90deg, var(--accent), color-mix(in srgb, var(--accent) 50%, var(--bull))); will-change: transform; }
.tu-bars .tu-brow.neg .tu-bfill { background: linear-gradient(90deg, var(--bear), color-mix(in srgb, var(--bear) 60%, var(--amber))); }
.tu-bars .tu-bv { font-weight: 800; font-variant-numeric: tabular-nums; text-align: right; }

.tu-fact { text-align: center; }
.tu-fact .tu-big { font-size: clamp(56px, 12vw, 150px); font-weight: 900; letter-spacing: -.04em; line-height: 1; color: var(--tu-ink, #fff); font-variant-numeric: tabular-nums; text-shadow: 0 0 60px color-mix(in srgb, var(--accent) 70%, transparent); will-change: transform; }
.tu-fact .tu-flab { margin-top: 14px; font-size: clamp(16px, 2.2vw, 24px); color: var(--tu-ink2, rgba(255,255,255,.85)); max-width: 820px; margin-left: auto; margin-right: auto; }

.tu-steps { display: grid; gap: 12px; max-width: 820px; margin: 0 auto; }
.tu-steps .tu-step { display: flex; gap: 14px; align-items: center; padding: 14px 18px; border-radius: 14px; background: color-mix(in srgb, var(--panel) 86%, transparent); border: 1px solid var(--border); font-size: clamp(16px, 2vw, 22px); font-weight: 600; will-change: transform, opacity; }
.tu-steps .tu-step .tu-n { flex: 0 0 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: #fff; font-weight: 900; }
.tu-steps .tu-step.done .tu-n { background: var(--bull); }

.tu-quiz { background: color-mix(in srgb, var(--panel) 90%, transparent); border: 1px solid var(--border); border-radius: 18px; padding: clamp(16px, 2.4vw, 28px); max-width: 820px; margin: 0 auto; box-shadow: 0 20px 60px rgba(0,0,0,.35); }
.tu-quiz h3 { margin: 0 0 14px; font-size: clamp(18px, 2.4vw, 26px); }
.tu-quiz .tu-opts { display: grid; gap: 10px; }
.tu-quiz .tu-opt { font: inherit; font-size: clamp(15px, 1.8vw, 19px); text-align: left; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--border); background: color-mix(in srgb, var(--bg) 60%, transparent); color: var(--text); cursor: pointer; }
.tu-quiz .tu-opt:hover { border-color: var(--accent); }
.tu-quiz .tu-opt.right { border-color: var(--bull); background: var(--bull-bg); }
.tu-quiz .tu-opt.wrong { border-color: var(--bear); background: var(--bear-bg); }
.tu-quiz .tu-why { margin-top: 12px; color: var(--muted); font-size: clamp(14px, 1.6vw, 17px); }

.tu-end { text-align: center; }
.tu-end h2 { margin: 0 0 14px; font-size: clamp(26px, 4vw, 44px); color: var(--tu-ink, #fff); font-weight: 800; }
.tu-end ul { list-style: none; padding: 0; margin: 0 auto 18px; max-width: 760px; display: grid; gap: 8px; text-align: left; }
.tu-end li { padding: 10px 14px; border-radius: 12px; background: color-mix(in srgb, var(--panel) 86%, transparent); border: 1px solid var(--border); font-size: clamp(15px, 1.8vw, 19px); }
.tu-end li::before { content: "✓ "; color: var(--bull); font-weight: 900; }
.tu-end .tu-acts { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.tu-end .tu-acts button { font: inherit; font-size: 15px; font-weight: 700; padding: 10px 16px; border-radius: 10px; border: 1px solid var(--border); background: var(--panel); color: var(--text); cursor: pointer; }
.tu-end .tu-acts button.pri { background: var(--accent); color: #fff; border-color: var(--accent); }

/* caption = the narrator's speech bubble (scene mode): avatar at the left, bubble with a tail */
.tutor-cap { position: absolute; left: 50%; bottom: 66px; transform: translateX(-50%); width: min(980px, calc(100vw - 24px)); display: none; align-items: flex-end; gap: 10px; text-align: left; }
.tutor[data-mode="scene"] .tutor-cap.on { display: flex; }
.tutor-cap.empty { display: none !important; }
.tutor-cap .tc-av { flex: 0 0 92px; height: 128px; margin-bottom: -8px; }
.tutor-cap .tc-av svg, .tutor-callout .tc-av svg { width: 100%; height: 100%; overflow: visible; display: block; }
.tutor-cap .tc-bubble { position: relative; flex: 1; min-width: 0; padding: 14px 22px; border-radius: 18px; background: color-mix(in srgb, var(--panel) 90%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--border)); color: var(--text); font-size: clamp(17px, 2vw, 27px); line-height: 1.35; font-weight: 600; box-shadow: 0 14px 44px rgba(0,0,0,.35); }
.tutor-cap .tc-bubble::before { content: ""; position: absolute; left: -9px; bottom: 30px; width: 18px; height: 18px; background: inherit; border-left: inherit; border-bottom: inherit; transform: rotate(45deg); }
.tutor-cap .tw { display: inline-block; opacity: 0; transform: translateY(10px); will-change: transform, opacity; margin-right: .28em; }
.tutor-cap .tw.k { color: var(--accent); }
.tutor-cap .tw.num { font-variant-numeric: tabular-nums; }
@media (max-width: 640px) { .tutor-cap .tc-av { flex-basis: 64px; height: 90px; } }

/* animated scenes (inline SVG from tutor_chars.js) */
.tutor-stage > .tu-scene { width: min(1240px, 100%); height: auto; max-height: 100%; display: block; overflow: visible; }
.tu-scene text { font-family: inherit; }
.tu-scene .ch, .tu-scene .ch g, .tu-scene .ch rect, .tu-scene .ch path, .tu-scene .ch text { will-change: transform; }

/* controls */
.tutor-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 58px; display: flex; align-items: center; gap: 8px; padding: 0 12px;
  background: color-mix(in srgb, var(--panel) 92%, transparent); border-top: 1px solid var(--border); color: var(--text); font-size: 12.5px; }
.tutor-bar button { font: inherit; font-size: 12.5px; color: var(--text); background: none; border: 1px solid var(--border); border-radius: 7px; padding: 5px 9px; cursor: pointer; white-space: nowrap; }
.tutor-bar button:hover { border-color: var(--accent); color: var(--accent); }
.tutor-bar button.on { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.tutor-bar .tb-play { font-weight: 900; min-width: 42px; }
.tutor-bar .tb-time { font-variant-numeric: tabular-nums; color: var(--muted); min-width: 86px; text-align: center; }
.tutor-bar input[type="range"] { flex: 1; min-width: 80px; accent-color: var(--accent); }
.tutor-bar .tb-x { margin-left: 4px; }
@media (max-width: 640px) { .tutor-bar .tb-speed, .tutor-bar .tb-cc, .tutor-bar .tb-time { display: none; } }
.tutor-chap { position: absolute; top: 10px; left: 12px; right: 12px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.tutor-chap .tch { font: inherit; font-size: 11.5px; color: var(--text); background: color-mix(in srgb, var(--panel) 80%, transparent); border: 1px solid var(--border); border-radius: 999px; padding: 4px 10px; cursor: pointer; }
.tutor-chap .tch.on { background: var(--accent); color: #fff; border-color: var(--accent); }
.tutor-chap .tch-title { margin-left: auto; font-size: 12px; color: var(--muted); max-width: 46vw; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tutor[data-export="1"] .tutor-bar, .tutor[data-export="1"] .tutor-chap { display: none; }
/* export mode: nothing may run on the wall clock — every pixel is a function of the story time t */
.tutor[data-export="1"], .tutor[data-export="1"] * { animation: none !important; transition: none !important; }
.tutor[data-export="1"] .tutor-stage { inset: 0 0 150px 0; }
.tutor-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---- cinematic layer (v6): letterbox, vignette, impact flash, start overlay, episode title ---- */
.tutor[data-cine="1"]::before, .tutor[data-cine="1"]::after { content: ""; position: absolute; left: 0; right: 0; height: 6.5vh; background: #000; z-index: 4; pointer-events: none; }
.tutor[data-cine="1"]::before { top: 0; } .tutor[data-cine="1"]::after { bottom: 58px; }
.tutor[data-cine="1"][data-mode="spot"]::before, .tutor[data-cine="1"][data-mode="spot"]::after, .tutor[data-cine="1"][data-mode="try"]::before, .tutor[data-cine="1"][data-mode="try"]::after, .tutor[data-cine="1"][data-mode="route"]::before, .tutor[data-cine="1"][data-mode="route"]::after { display: none; }
.tutor[data-export="1"]::after { bottom: 0; }
.tutor-vignette { position: absolute; inset: 0; pointer-events: none; z-index: 2; display: none; background: radial-gradient(ellipse at center, transparent 50%, rgba(0,0,0,.6) 100%); }
.tutor[data-mode="scene"] .tutor-vignette { display: block; }
.tutor-flash { position: absolute; inset: 0; background: #fff; opacity: 0; pointer-events: none; z-index: 5; }
.tutor-chap { z-index: 6; } .tutor-cap { z-index: 3; } .tutor-stage { z-index: 1; }
.tutor-start { position: absolute; inset: 0; z-index: 7; display: grid; place-items: center; background: rgba(0,0,0,.42); }
.tutor-start button { display: grid; justify-items: center; gap: 6px; font: inherit; color: #fff; background: color-mix(in srgb, var(--accent) 85%, #000); border: 2px solid #fff; border-radius: 22px; padding: 22px 40px; cursor: pointer; box-shadow: 0 0 60px color-mix(in srgb, var(--accent) 70%, transparent); font-size: 22px; font-weight: 800; }
.tutor-start button .ts-play { font-size: 56px; line-height: 1; }
.tutor-start button small { font-size: 13px; opacity: .85; font-weight: 600; }
@media (prefers-reduced-motion: no-preference) { .tutor-start button { animation: tutor-pulse 1.8s ease-in-out infinite; } }
.tu-title h1 { text-transform: uppercase; letter-spacing: .14em; font-size: clamp(38px, 8vw, 118px); font-weight: 900; }
.tu-title .tu-sub { letter-spacing: .08em; text-transform: uppercase; font-size: clamp(13px, 1.6vw, 20px); font-weight: 700; }
.tu-title .tu-bar { height: 5px; width: min(420px, 60%); margin: 16px auto 0; background: linear-gradient(90deg, transparent, var(--accent), transparent); }
.tutor[data-cine="1"] .tutor-vibe { opacity: .9; }
.tutor[data-cine="1"][data-mode="scene"] .tutor-cap { bottom: calc(58px + 6.5vh + 10px); z-index: 5; }
.tutor[data-cine="1"] .tutor-stage { inset: 6.5vh 0 calc(58px + 6.5vh) 0; }
.tutor[data-cine="1"] .tutor-grain { opacity: .14; }
.tu-end h2 { text-transform: uppercase; letter-spacing: .14em; }

/* ---- presentation layer v8: HUD, chapter cards, wipe, reticle, progress, controls ---- */
.tutor[data-cine="1"] .tutor-chap .tch { display: none; }
.tutor-hud { position: absolute; top: 1.6vh; left: 18px; z-index: 6; display: none; align-items: center; gap: 10px; font-size: 12px; font-weight: 800; letter-spacing: .18em; text-transform: uppercase; color: #e9d5ff; text-shadow: 0 0 12px rgba(167,139,250,.8); }
.tutor-hud::before { content: ""; width: 10px; height: 10px; border: 2px solid #a78bfa; transform: rotate(45deg); box-shadow: 0 0 10px #a78bfa; }
.tutor-hud .hud-sep { opacity: .5; }
.tutor[data-cine="1"][data-mode="scene"] .tutor-hud { display: flex; }
.tutor-prog { position: absolute; top: 0; left: 0; right: 0; height: 3px; z-index: 7; background: linear-gradient(90deg, #7c3aed, #a78bfa, #5eead4); transform-origin: left center; transform: scaleX(0); box-shadow: 0 0 10px rgba(167,139,250,.9); }
.tutor-wipe { position: absolute; top: -10%; bottom: -10%; left: 0; width: 60%; z-index: 6; pointer-events: none; display: none; background: linear-gradient(90deg, transparent, #0b0618 20%, #1b0f3f 50%, #0b0618 80%, transparent); box-shadow: 0 0 80px rgba(124,58,237,.6); }
.tutor-chapcard { position: absolute; left: 7%; top: 18%; z-index: 6; display: none; pointer-events: none; color: #fff; }
.tutor-chapcard .cc-num { font-size: clamp(60px, 11vw, 150px); font-weight: 900; line-height: .9; letter-spacing: -.04em; color: transparent; -webkit-text-stroke: 3px #c4b5fd; text-shadow: 0 0 40px rgba(167,139,250,.5); }
.tutor-chapcard .cc-title { font-size: clamp(22px, 3.2vw, 44px); font-weight: 900; letter-spacing: .16em; text-transform: uppercase; margin-top: 6px; text-shadow: 0 2px 20px rgba(0,0,0,.6); }
.tutor-chapcard .cc-bar { height: 6px; width: min(520px, 50vw); margin-top: 12px; transform-origin: left center; background: linear-gradient(90deg, #5eead4, #a78bfa, transparent); }
.tutor-ret { position: absolute; z-index: 3; pointer-events: none; display: none; transform-origin: center; }
.tutor-ret i { position: absolute; width: 18px; height: 18px; border: 3px solid #5eead4; box-shadow: 0 0 10px #5eead4; }
.tutor-ret i:nth-child(1) { left: 0; top: 0; border-right: 0; border-bottom: 0; } .tutor-ret i:nth-child(2) { right: 0; top: 0; border-left: 0; border-bottom: 0; }
.tutor-ret i:nth-child(3) { left: 0; bottom: 0; border-right: 0; border-top: 0; } .tutor-ret i:nth-child(4) { right: 0; bottom: 0; border-left: 0; border-top: 0; }
.tutor[data-cine="1"] .tutor-bar { background: rgba(6,6,18,.94); border-top: 1px solid rgba(167,139,250,.35); color: #e9d5ff; }
.tutor[data-cine="1"] .tutor-bar button { color: #e9d5ff; border-color: rgba(167,139,250,.35); }
.tutor[data-cine="1"] .tutor-bar button:hover, .tutor[data-cine="1"] .tutor-bar button.on { border-color: #a78bfa; color: #fff; background: rgba(124,58,237,.35); box-shadow: 0 0 12px rgba(167,139,250,.5); }
.tutor[data-cine="1"] .tutor-bar input[type="range"] { accent-color: #a78bfa; }
.tutor[data-cine="1"] .tutor-bar .tb-time { color: #c4b5fd; }
.tutor[data-cine="1"][data-mode="scene"] .tutor-cap .tc-bubble { background: rgba(8,6,22,.86); border: 1px solid rgba(167,139,250,.55); color: #f5f3ff; box-shadow: 0 0 30px rgba(124,58,237,.35), 0 14px 44px rgba(0,0,0,.5); }
.tutor[data-cine="1"][data-mode="scene"] .tutor-cap .tw.k { color: #c4b5fd; }
.tutor[data-cine="1"] .tutor-callout { background: rgba(8,6,22,.94); border-color: rgba(94,234,212,.6); color: #f5f3ff; box-shadow: 0 0 30px rgba(94,234,212,.25), 0 14px 44px rgba(0,0,0,.5); }
.tutor[data-cine="1"] .tutor-callout::before { background: rgba(8,6,22,.94); border-color: rgba(94,234,212,.6); }
.tutor[data-cine="1"] .tutor-callout .tc-kicker { color: #5eead4; }
.tutor[data-cine="1"] .tutor-ring { border-color: #5eead4; box-shadow: 0 0 0 4px rgba(94,234,212,.3), 0 0 34px rgba(94,234,212,.7); }
.tutor[data-cine="1"] .tu-end li { background: rgba(8,6,22,.8); border-color: rgba(167,139,250,.45); color: #f5f3ff; }
.tutor[data-cine="1"] .tu-end .tu-acts button { background: rgba(8,6,22,.9); color: #f5f3ff; border-color: rgba(167,139,250,.45); }
.tutor[data-cine="1"] .tu-end .tu-acts button.pri { background: #7c3aed; border-color: #a78bfa; }
.tutor[data-cine="1"] .tu-end h2 { color: #fff; text-shadow: 0 0 30px rgba(167,139,250,.8); }
.tutor[data-cine="1"] .tutor-vibe { opacity: .55; }

/* ---- v9 cinema subtitles: no cartoon avatar; a film subtitle bar; sleek callout ---- */
.tutor[data-cine="1"][data-mode="scene"] .tutor-cap { justify-content: center; width: min(1000px, calc(100vw - 24px)); }
.tutor[data-cine="1"][data-mode="scene"] .tutor-cap .tc-av { display: none; }
.tutor[data-cine="1"][data-mode="scene"] .tutor-cap .tc-bubble { flex: 0 1 auto; max-width: 100%; text-align: center; padding: 10px 26px 12px; border-radius: 6px; background: rgba(3,3,10,.55); border: 0; border-top: 2px solid rgba(167,139,250,.75); box-shadow: 0 10px 40px rgba(0,0,0,.45); font-size: clamp(16px, 1.7vw, 24px); font-weight: 600; letter-spacing: .01em; color: #f5f3ff; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.tutor[data-cine="1"][data-mode="scene"] .tutor-cap .tc-bubble::before { display: none; }
.tutor[data-cine="1"] .tutor-callout .tc-av { flex-basis: 54px; height: 84px; margin: -2px 0 -12px -4px; }
.tutor[data-cine="1"] .tutor-callout .tc-av svg { overflow: visible; }
.tutor[data-cine="1"] .tutor-callout { border-radius: 8px; border-top: 2px solid rgba(94,234,212,.8); }
.tutor[data-cine="1"] .tutor-chapcard .cc-num { -webkit-text-stroke: 2px #a78bfa; opacity: .9; }
.tutor[data-cine="1"] .tutor-chapcard .cc-title { letter-spacing: .3em; font-weight: 800; }
.tutor[data-cine="1"] .tu-end li { font-weight: 600; letter-spacing: .01em; }
.tutor[data-cine="1"] .tutor-vibe { opacity: .35; }
.tutor[data-cine="1"] .tutor-grain { opacity: .1; }
