:root {
  --ink: #22305a; --ink-2: #4b5878; --paper: #ffffff; --line: #dfe4f0; --wash: #e8eefc;
  --accent: #2f6fde; --hot: #ff5a6e; --cold: #5aa9ff;
  --sans: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Roboto Mono", ui-monospace, Menlo, monospace;
  color-scheme: light;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; background: var(--paper); color: var(--ink); font: 16px/1.5 var(--sans); overflow: hidden; }
.mono { font-family: var(--mono); }
b { font-weight: 700; }

.stage { position: fixed; inset: 0; background: radial-gradient(120% 70% at 50% 110%, #dfe8fb 0%, #f3f6fe 45%, #fff 75%); }
#scene { position: absolute; inset: 0; width: 100%; height: 100%; display: block; cursor: grab; touch-action: none; }
#scene.grabbing { cursor: grabbing; }
#scene.pointing { cursor: pointer; }
#labels { position: absolute; inset: 0; pointer-events: none; }

/* top bar */
.bar { position: absolute; top: 0; left: 0; right: 0; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 22px; pointer-events: none; }
.bar > * { pointer-events: auto; }
.brand { font-weight: 800; letter-spacing: -0.01em; display: flex; align-items: center; gap: 10px; }
.brand .mono { font-size: 11px; font-weight: 700; color: #fff; background: var(--ink); padding: 2px 7px; border-radius: 4px; letter-spacing: 0.08em; }
.chapters { list-style: none; display: flex; gap: 4px; margin: 0; padding: 4px; background: rgba(255,255,255,0.8); border: 1px solid var(--line); border-radius: 999px; backdrop-filter: blur(6px); }
.chapters li { font: 500 12px var(--mono); padding: 4px 12px; border-radius: 999px; color: var(--ink-2); }
.chapters li.on { background: var(--ink); color: #fff; }
.bar nav { display: flex; gap: 6px; }
.bar nav a { font-size: 13px; color: var(--ink); text-decoration: none; padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; background: rgba(255,255,255,0.85); }
.bar nav a:hover { border-color: var(--ink); }

.loading { position: absolute; top: 64px; left: 50%; transform: translateX(-50%); font-size: 12px; color: var(--ink-2); }
.loading:empty { display: none; }

/* visual-novel dialogue */
.dialogue { position: absolute; left: 50%; bottom: 24px; transform: translateX(-50%); width: min(880px, calc(100% - 32px));
  background: rgba(255,255,255,0.94); border: 1.5px solid var(--ink); border-radius: 14px; padding: 22px 24px 16px;
  box-shadow: 0 12px 40px rgba(34,48,90,0.14), 6px 6px 0 rgba(34,48,90,0.12); backdrop-filter: blur(8px); }
.dname { position: absolute; top: -13px; left: 20px; font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  color: #fff; background: var(--ink); padding: 3px 10px; border-radius: 5px; }
.dtext { font-size: 19px; line-height: 1.55; min-height: 3.1em; }
.dtext .cite { display: block; font: 600 11px var(--mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent); margin-bottom: 4px; }
.dacts { display: flex; justify-content: flex-end; gap: 8px; margin-top: 10px; min-height: 38px; }
.choice { font: 600 14px var(--sans); color: var(--ink); background: #fff; border: 1.5px solid var(--ink); border-radius: 9px; padding: 8px 16px; cursor: pointer; transition: transform .12s, box-shadow .12s; box-shadow: 3px 3px 0 var(--ink); }
.choice:hover { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--ink); }
.choice:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
.choice.primary { background: var(--ink); color: #fff; }

/* labels anchored in the scene (ContextXR-style mono tags) */
.tag3d { position: absolute; left: 0; top: 0; font: 600 12px var(--mono); color: #fff; background: var(--ink); padding: 3px 8px; border-radius: 4px; white-space: nowrap;
  opacity: 0; transition: opacity .3s, margin .3s; margin-top: 6px; }
.tag3d.in { opacity: 1; margin-top: 0; }
.tag3d i { font-style: normal; color: #9fb4ff; margin-right: 4px; }
.tag3d.chip { background: #fff; color: var(--ink); border: 1.5px solid var(--ink); box-shadow: 2px 2px 0 var(--ink); }
.tag3d.chip i { color: var(--accent); }
.tag3d.chip.hot { border-color: var(--hot); box-shadow: 2px 2px 0 var(--hot); }
.tag3d.chip.cold { border-color: var(--cold); box-shadow: 2px 2px 0 var(--cold); }
.tag3d.phone { background: var(--hot); }
.tag3d.speech { background: #fff; color: var(--ink); border: 1.5px solid var(--ink); font: 500 13px var(--sans); border-radius: 12px; padding: 6px 12px; }
.tag3d.hint { background: var(--accent); animation: bob 1.4s ease-in-out infinite; }
.tag3d.flash { background: #ffd166; color: var(--ink); font-size: 13px; }
@keyframes bob { 50% { margin-top: -6px; } }

/* speaker / phone tooltip */
.tip { position: absolute; left: 0; top: 0; pointer-events: none; min-width: 220px; background: #fff; border: 1.5px solid var(--ink); border-radius: 10px; padding: 10px 12px; box-shadow: 4px 4px 0 var(--ink); }
.tip .t-k { font: 600 10px var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); }
.tip .t-t { font-weight: 800; font-size: 17px; line-height: 1.2; }
.tip .t-a { color: var(--ink-2); font-size: 13px; }
.tip .t-m { display: flex; gap: 8px; margin-top: 6px; font: 500 11px var(--mono); color: var(--ink-2); }
.tip .t-m span { background: var(--wash); padding: 1px 6px; border-radius: 4px; }
.tip .t-bar { height: 4px; background: var(--wash); border-radius: 2px; margin-top: 8px; overflow: hidden; }
.tip .t-bar i { display: block; height: 100%; background: var(--ink); }

/* intro + outro */
.intro { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(255,255,255,0.55); backdrop-filter: blur(3px); transition: opacity .6s; }
.intro.gone { opacity: 0; pointer-events: none; }
.intro .card { max-width: 560px; background: #fff; border: 1.5px solid var(--ink); border-radius: 16px; padding: 32px; box-shadow: 8px 8px 0 var(--ink); }
.intro .kicker { font-size: 12px; color: var(--accent); letter-spacing: 0.04em; }
.intro h1 { margin: 6px 0 10px; font-size: 44px; line-height: 1.05; letter-spacing: -0.03em; }
.intro p { margin: 0 0 18px; color: var(--ink-2); font-size: 17px; }
.intro .small { font-size: 13px; margin: 14px 0 0; }
.begin { font: 700 17px var(--sans); color: #fff; background: var(--ink); border: 0; border-radius: 10px; padding: 12px 22px; cursor: pointer; box-shadow: 4px 4px 0 var(--accent); }
.begin:disabled { opacity: 0.6; cursor: progress; }
.outro { position: absolute; left: 50%; top: 76px; transform: translateX(-50%); display: grid; grid-template-columns: repeat(4, 210px); gap: 12px; }
.outro a { display: flex; flex-direction: column; gap: 2px; text-decoration: none; color: var(--ink); background: #fff; border: 1.5px solid var(--ink); border-radius: 12px; padding: 12px 14px; box-shadow: 4px 4px 0 var(--ink); font-size: 13px; }
.outro a:hover { transform: translate(-1px, -1px); box-shadow: 5px 5px 0 var(--ink); }
.outro .mono { font-size: 10px; color: var(--accent); font-weight: 700; }
.outro b { font-size: 16px; }

@media (max-width: 760px) {
  .vizcard { width: calc(100% - 32px); left: 16px; }
  .chapters, .bar nav { display: none; }
  .dtext { font-size: 16px; }
  .outro { grid-template-columns: 1fr; top: 70px; }
}
@media (prefers-reduced-motion: reduce) { .tag3d.hint { animation: none; } }

/* centre card: live interfaces from the demo pages, or paper figures */
.vizcard { position: absolute; left: 22px; top: 68px; transform: translate(-12px, 0); width: min(640px, calc(50% - 30px));
  background: #0e0e17; color: #ececf4; border-radius: 14px; padding: 12px 14px 14px; box-shadow: 0 16px 50px rgba(14,14,23,0.35), 6px 6px 0 rgba(34,48,90,0.25);
  opacity: 0; pointer-events: none; transition: opacity .35s, transform .35s; }
.vizcard.on { pointer-events: auto; }
.vizcard.on { opacity: 1; transform: translate(0, 0); }
.vizcard.fig { background: #fff; color: var(--ink); border: 1.5px solid var(--ink); }
.vz-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.vz-kind { font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; padding: 2px 7px; border-radius: 4px; background: #ffd166; color: #0e0e17; }
.vizcard.fig .vz-kind { background: var(--ink); color: #fff; }
.vz-title { font-weight: 700; font-size: 15px; }
.vz-canvas { display: none; width: 100%; height: 250px; border-radius: 10px; }
.vz-canvas.on { display: block; }
.vz-figs { display: none; grid-template-columns: 1fr; gap: 14px; align-items: end; }
.vz-figs.on { display: grid; }
.vz-figs.one { grid-template-columns: 1fr; }
.vz-figs figure { margin: 0; text-align: center; }
.vz-figs img { width: 100%; max-height: 160px; object-fit: contain; display: block; }
.vz-figs figcaption { font-size: 13px; font-weight: 700; margin-top: 4px; }
.vz-figs figcaption i { font-style: normal; display: block; font-weight: 600; font-size: 12px; }
.vz-figs .bad i { color: #d6402f; } .vz-figs .good i { color: #2e9e48; } .vz-figs .neu i { color: #e8892f; }

/* David's thought bubbles */
.tag3d.thought { background: #fff; color: var(--ink); border: 1.5px solid var(--ink); border-radius: 18px; padding: 8px 14px; font: 600 14px var(--sans); box-shadow: 3px 3px 0 rgba(34,48,90,0.18); }
.tag3d.thought::before, .tag3d.thought::after { content: ""; position: absolute; background: #fff; border: 1.5px solid var(--ink); border-radius: 50%; }
.tag3d.thought::before { width: 12px; height: 12px; left: 46%; bottom: -16px; }
.tag3d.thought::after { width: 7px; height: 7px; left: calc(46% - 8px); bottom: -27px; }
.tag3d.thought.bad { border-color: var(--hot); box-shadow: 3px 3px 0 rgba(255,90,110,0.35); }
.tag3d.thought.bad::before, .tag3d.thought.bad::after { border-color: var(--hot); }

/* poster lightbox */
.lightbox { position: absolute; inset: 0; z-index: 20; background: rgba(14,14,23,0.55); backdrop-filter: blur(4px); display: grid; place-items: center; }
.lb-card { position: relative; background: #fff; border: 1.5px solid var(--ink); border-radius: 14px; padding: 14px; box-shadow: 8px 8px 0 var(--ink); display: flex; flex-direction: column; align-items: center; gap: 12px; max-height: calc(100vh - 60px); }
.lb-card img { max-height: calc(100vh - 150px); max-width: min(560px, 90vw); object-fit: contain; display: block; }
.lb-card a { text-decoration: none; }
.lb-x { position: absolute; top: -14px; right: -14px; width: 32px; height: 32px; border-radius: 50%; border: 1.5px solid var(--ink); background: #fff; font-size: 14px; cursor: pointer; }
.vz-replay { margin-left: auto; flex: none; pointer-events: auto; font: 700 12px var(--sans); color: #0e0e17; background: #ffd166; border: 0; border-radius: 7px; padding: 5px 10px; cursor: pointer; }
.vz-replay:hover { background: #ffe199; }

.choice.locked, .choice:disabled { opacity: 0.55; cursor: progress; box-shadow: 3px 3px 0 var(--ink); transform: none; }
.vz-loops { display: flex; align-items: center; gap: 10px; margin-top: 8px; font-size: 12px; color: #c9cbe0; }
.vz-loops .mono { font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; }
.vz-loops select { flex: 1; font: 600 13px var(--sans); color: #0e0e17; background: #ffd166; border: 0; border-radius: 7px; padding: 5px 8px; pointer-events: auto; }

/* MultiVerse: C³ Venn + lyric */
.vz-mv.on { display: grid; grid-template-columns: 230px 1fr; gap: 14px; height: auto; min-height: 250px; }
.mv-venn { position: relative; display: flex; flex-direction: column; gap: 6px; }
.mv-venn canvas { width: 230px; height: 200px; display: block; cursor: default; }
.mv-info { font-size: 12px; line-height: 1.3; color: #b9b9cc; min-height: 48px; }
.mv-info b { display: block; color: #fff; font-size: 13px; }
.mv-info.star b { color: #ffd166; }
.mv-lyr { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.mv-who { font: 700 11px "Roboto Mono", monospace; letter-spacing: 0.06em; color: #ffd166; text-transform: uppercase; }
.mv-orig { font-size: 12.5px; color: #8d8da3; font-style: italic; }
.mv-new { font-size: 19px; line-height: 1.3; font-weight: 700; color: #fff; }
.mv-new.bad { color: #ff8a7a; }
.mv-new mark { background: none; color: #ffd166; }
.mv-new u { text-decoration: none; color: #7fe3ef; }
.mv-ctl { list-style: none; margin: 2px 0 0; padding: 0; display: grid; gap: 5px; }
.mv-ctl li { font-size: 12.5px; line-height: 1.3; color: #ececf4; padding: 4px 8px; border-left: 3px solid var(--c); background: rgba(255,255,255,0.05); border-radius: 0 6px 6px 0; animation: mvIn .4s ease-out; }
.mv-ctl li i { font-style: normal; font: 800 10px Inter, sans-serif; letter-spacing: 0.1em; color: var(--c); margin-right: 6px; }
@keyframes mvIn { from { opacity: 0; transform: translateX(-6px); } }
.lb-acts { display: flex; gap: 10px; }

/* opening: David's phone, front view, drawn over the room */
.phonecut { position: absolute; left: max(24px, 6vw); bottom: 196px; width: 340px; height: 440px; transform: none; z-index: 6; pointer-events: none; transition: opacity .6s, transform .6s; }
.phonecut.gone { opacity: 0; transform: translateY(30px) scale(0.96); }
.phonecut::before { content: ""; position: absolute; inset: -10px -40px 0; border-radius: 50%; background: radial-gradient(closest-side, rgba(255,255,255,0.96), rgba(255,255,255,0.85) 70%, rgba(255,255,255,0)); }
.pc-david { position: absolute; left: 0; top: 0; width: 520px; height: 470px; }
.pc-phone { position: absolute; left: 50%; top: 0; width: 180px; height: 330px; transform: translateX(-50%) rotate(-3deg); background: #22305a; border-radius: 28px; padding: 10px; box-shadow: 6px 8px 0 rgba(34,48,90,0.25); pointer-events: auto; animation: pcIn .7s cubic-bezier(.2,.8,.2,1); }
@keyframes pcIn { from { transform: translateX(-50%) translateY(80px) rotate(4deg); opacity: 0; } }
.pc-screen { height: 100%; border-radius: 20px; background: #fff; display: flex; flex-direction: column; align-items: center; padding: 16px 14px; gap: 5px; }
.pc-app { font: 700 9px var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-2); }
.pc-art { width: 118px; height: 118px; border-radius: 10px; margin: 6px 0 4px; display: grid; place-items: center; background: linear-gradient(135deg, #ffb36b, #ff5a8a 55%, #8a5cff); color: #fff; font-size: 44px; border: 1.5px solid var(--ink); }
.pc-title { font: 800 15px var(--sans); color: var(--ink); }
.pc-artist { font: 600 12px var(--sans); color: var(--ink-2); }
.pc-bar { width: 100%; height: 4px; border-radius: 2px; background: var(--line); margin: 8px 0 6px; overflow: hidden; }
.pc-bar i { display: block; height: 100%; width: 0; background: var(--accent); }
.phonecut.playing .pc-bar i { width: 18%; transition: width 2s linear; }
.pc-play { width: 54px; height: 54px; border-radius: 50%; border: 0; background: var(--ink); cursor: pointer; display: grid; place-items: center; animation: pcPulse 1.4s ease-in-out infinite; }
.pc-play svg { width: 26px; height: 26px; fill: #fff; }
.pc-play .i-pause { display: none; }
.phonecut.playing .pc-play { animation: none; background: var(--accent); }
.phonecut.playing .pc-play .i-play { display: none; } .phonecut.playing .pc-play .i-pause { display: block; }
@keyframes pcPulse { 50% { box-shadow: 0 0 0 10px rgba(47,111,222,0.22); } }
.pc-hand { height: 150px; overflow: hidden; position: absolute; left: 50%; top: 262px; width: 260px; transform: translateX(-50%); }
.pc-thumb { position: absolute; left: calc(50% + 40px); top: 272px; width: 64px; transform-origin: 50% 100%; transition: transform .25s; }
.phonecut.tap .pc-thumb { transform: translate(-26px, -46px) rotate(-14deg); }
@media (prefers-reduced-motion: reduce) { .pc-play { animation: none; } .pc-phone { animation: none; } }
.phonecut.edm .pc-art { background: linear-gradient(135deg, #2bd2ff, #2b6cff 55%, #12123a); }
@media (max-height: 760px) { .phonecut { transform: scale(0.78); transform-origin: 0 100%; } .phonecut.gone { transform: translateY(30px) scale(0.74); } }

/* the narrator's portrait, visual-novel style */
.dialogue { padding-left: 158px !important; }
.dface { position: absolute; left: 16px; bottom: 16px; width: 126px; height: 126px; object-fit: cover; object-position: 50% 30%; border-radius: 14px; border: 1.5px solid var(--ink); box-shadow: 4px 4px 0 var(--ink); background: #fff; transform-origin: 50% 100%; }
.dialogue.talking .dface { animation: dTalk .32s ease-in-out infinite alternate; }
@keyframes dTalk { to { transform: translateY(-2px) rotate(-0.6deg); } }
@media (prefers-reduced-motion: reduce) { .dialogue.talking .dface { animation: none; } }
@media (max-width: 640px) { .dialogue { padding-left: 96px !important; } .dface { width: 70px; height: 70px; } }
.dname { left: 158px; }
@media (max-width: 640px) { .dname { left: 96px; } }

.pc-list { display: none; width: 100%; flex-direction: column; gap: 6px; margin-top: 6px; }
.pc-app .pl { display: none; }
.phonecut.pick .pc-app .np { display: none; } .phonecut.pick .pc-app .pl { display: inline; }
.phonecut.pick .pc-list { display: flex; }
.phonecut.pick .pc-art, .phonecut.pick .pc-title, .phonecut.pick .pc-artist, .phonecut.pick .pc-bar, .phonecut.pick .pc-play { display: none; }
.pc-row { display: flex; align-items: center; gap: 8px; width: 100%; padding: 7px; border: 1.5px solid var(--line); border-radius: 10px; background: #fff; cursor: pointer; text-align: left; font: inherit; }
.pc-row:hover, .pc-row:focus-visible { border-color: var(--ink); box-shadow: 2px 2px 0 var(--ink); }
.pc-row i { flex: none; width: 34px; height: 34px; border-radius: 7px; display: grid; place-items: center; color: #fff; font-style: normal; font-size: 16px; border: 1px solid var(--ink); }
.pc-row span { display: flex; flex-direction: column; font: 600 10px var(--sans); color: var(--ink-2); line-height: 1.25; min-width: 0; }
.pc-row b { font: 800 12px var(--sans); color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.phonecut.pick .pc-row:first-child { animation: pcPulse 1.4s ease-in-out infinite; }
.pc-row b { white-space: normal; }
.dface { object-fit: contain; object-position: 50% 100%; background: #fbf8f0; padding: 4px 2px 0; }
.pc-ctl { display: flex; align-items: center; gap: 14px; }
.pc-skip { display: none; width: 34px; height: 34px; border-radius: 50%; border: 1.5px solid var(--line); background: #fff; color: var(--ink); font-size: 13px; cursor: pointer; }
.pc-skip:hover { border-color: var(--ink); }
.phonecut.multi .pc-skip { display: grid; place-items: center; }
.pc-thumb { left: calc(50% + 62px); top: 300px; }
.phonecut.tap .pc-thumb { transform: translate(-58px, -70px) rotate(-18deg); }

/* the paper being presented, in the row-poster style: coloured head, teaser on the right */
.papercard { pointer-events: auto; display: grid; grid-template-columns: 230px 150px; width: 380px; min-height: 104px; border-radius: 12px; overflow: hidden; border: 1.5px solid var(--ink); background: #fff; box-shadow: 4px 4px 0 rgba(34,48,90,0.22); text-decoration: none; color: #fff; transition: transform .2s, box-shadow .2s; animation: pkIn .45s cubic-bezier(.2,.8,.2,1); }
.papercard:hover, .papercard:focus-visible { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--ink); }
@keyframes pkIn { from { opacity: 0; transform: translateY(-8px); } }
.pk-head { background: var(--pk); padding: 9px 11px; display: flex; flex-direction: column; gap: 3px; }
.pk-venue { align-self: flex-start; font: 800 9.5px var(--sans); letter-spacing: 0.04em; background: rgba(255,255,255,0.22); border-radius: 4px; padding: 1px 6px; }
.pk-title { font: 900 13px/1.15 var(--sans); }
.pk-auth { font: 600 10px var(--sans); opacity: 0.92; }
.pk-teaser { width: 150px; height: 100%; object-fit: contain; background: #fff; padding: 4px; }
.chapters { position: absolute; left: 50%; top: 16px; transform: translateX(-50%); }
.papercard { position: absolute; right: 22px; top: 14px; }
.vizcard.peek { opacity: 0.1 !important; }
.chapters li { cursor: pointer; }
.chapters li:hover:not(.on) { background: var(--wash); }
.chapters { pointer-events: auto; }
.vz-skipwrap.on { display: block; position: relative; height: 250px; }
.vz-skipwrap canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.sk-play { position: absolute; left: 6px; width: 128px; padding: 9px 10px; border-radius: 10px; border: 0; background: #ffd166; color: #0e0e17; font: 800 13px var(--sans); cursor: pointer; text-align: left; }
.sk-play:hover { background: #ffe199; }
.sk-play[data-lane="0"] { top: 52px; } .sk-play[data-lane="1"] { top: 156px; background: #7ee0a1; } .sk-play[data-lane="1"]:hover { background: #a6f0c0; }

.mv-persona { display: flex; flex-direction: column; gap: 4px; }
.mv-pbtn { display: flex; align-items: center; gap: 8px; width: 100%; padding: 5px 8px; border-radius: 8px; border: 1px solid rgba(255,255,255,0.18); background: rgba(255,255,255,0.06); color: #ececf4; cursor: pointer; text-align: left; font: inherit; }
.mv-pbtn:hover { border-color: #ffd166; }
.mv-pbtn i { flex: none; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: #1fa4b8; color: #fff; font: 800 12px var(--sans); font-style: normal; }
.mv-pbtn span { display: flex; flex-direction: column; font-size: 11px; color: #b9b9cc; line-height: 1.2; flex: 1; }
.mv-pbtn b { color: #fff; font-size: 12.5px; }
.mv-pbtn em { font: 700 10px var(--mono); color: #ffd166; font-style: normal; }
.mv-pfacts { margin: 0; padding: 8px 10px; border-radius: 8px; background: rgba(31,164,184,0.1); border: 1px solid rgba(31,164,184,0.4); display: grid; grid-template-columns: auto 1fr; gap: 3px 10px; font-size: 11.5px; line-height: 1.3; }
.mv-pfacts[hidden] { display: none; }
.mv-pfacts dt { color: #7fe3ef; font-weight: 700; }
.mv-pfacts dd { margin: 0; color: #ececf4; }

/* first-time guidance */
.choice.coach { position: relative; animation: coachPulse 1.3s ease-in-out infinite; }
.choice.coach::after { content: attr(data-hint); position: absolute; right: 0; bottom: calc(100% + 10px); white-space: nowrap; font: 700 11px var(--mono); color: #fff; background: var(--accent); padding: 4px 8px; border-radius: 6px; pointer-events: none; animation: coachBob 1.3s ease-in-out infinite; }
@keyframes coachPulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(47,111,222,0.55); } 50% { box-shadow: 0 0 0 9px rgba(47,111,222,0); } }
@keyframes coachBob { 50% { transform: translateY(-3px); } }
.pc-hint { display: none; font: 700 10px var(--mono); color: #fff; background: var(--accent); padding: 3px 8px; border-radius: 6px; margin-bottom: 2px; animation: coachBob 1.3s ease-in-out infinite; }
.phonecut.coach .pc-hint { display: block; }
.phonecut.coach .pc-play { animation: coachPulse 1.3s ease-in-out infinite; }
.phonecut.multi .pc-skip { opacity: 0.45; transform: scale(0.85); border-color: transparent; }
.phonecut.multi .pc-skip:hover { opacity: 0.9; }
.vz-skipwrap.coach .sk-play { animation: coachPulse 1.3s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) { .choice.coach, .choice.coach::after, .pc-hint, .phonecut.coach .pc-play, .vz-skipwrap.coach .sk-play { animation: none; } }
.choice.coach::after { right: calc(100% + 12px); bottom: auto; top: 50%; margin-top: -11px; }

/* green call icon by the phone, pulsing on the beat */
.tag3d.callcue { background: none; padding: 0; border-radius: 50%; pointer-events: none; --p: 0; }
.cc { position: relative; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: #34c759; border: 2px solid #fff;
  transform: scale(calc(1 + 0.2 * var(--p))); box-shadow: 0 0 calc(4px + 22px * var(--p)) calc(1px + 5px * var(--p)) rgba(52,199,89,0.7); }
.cc svg { width: 20px; height: 20px; fill: #fff; animation: ccWiggle 0.9s ease-in-out infinite; }
.cc::after { content: ""; position: absolute; inset: -2px; border-radius: 50%; border: 2px solid #34c759; animation: ccRing 1.1s ease-out infinite; }
@keyframes ccRing { from { transform: scale(1); opacity: 0.9; } to { transform: scale(2.1); opacity: 0; } }
@keyframes ccWiggle { 0%, 100% { transform: rotate(0); } 20% { transform: rotate(-14deg); } 40% { transform: rotate(12deg); } 60% { transform: rotate(-8deg); } }
@media (prefers-reduced-motion: reduce) { .cc svg, .cc::after { animation: none; } }

/* countdown to the adapted ringtone */
.tag3d.cdtag { background: none; padding: 0; }
.cd { display: inline-block; font: 800 14px var(--sans); color: #fff; background: #2fae74; padding: 5px 11px; border-radius: 999px; box-shadow: 0 0 14px rgba(52,199,89,0.55); animation: cdPop .35s cubic-bezier(.2,1.6,.4,1); }
.cd b { font-size: 17px; }
.cd.last { background: #34c759; font-size: 16px; box-shadow: 0 0 22px rgba(52,199,89,0.8); }
.cd.last b { font-size: 22px; }
@keyframes cdPop { from { transform: scale(0.6) translateY(6px); opacity: 0.3; } }
.vz-skipwrap.coach .sk-play { animation: coachPulse 1.3s ease-in-out infinite; }
#vz-cutplay .sk-play[data-lane="2"] { top: 60px; background: #ffd166; } #vz-cutplay .sk-play[data-lane="3"] { top: 164px; background: #7ee0a1; }
#vz-cutplay.on { height: 320px; } #vz-cutplay .sk-play[data-lane="2"] { top: 54px; } #vz-cutplay .sk-play[data-lane="3"] { top: 198px; }

/* chapter title card: pops up in the middle when a new paper starts, then fades */
.chtitle { position: absolute; left: 50%; top: 34%; transform: translate(-50%, -50%); z-index: 15; pointer-events: none; display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; opacity: 0; --c: var(--accent); }
.chtitle::before, .chtitle::after { content: ""; position: absolute; left: 50%; width: 0; height: 2px; background: linear-gradient(90deg, transparent, var(--c), transparent); transform: translateX(-50%); }
.chtitle::before { top: -14px; } .chtitle::after { bottom: -14px; }
.chtitle::selection { background: none; }
.ct-num { font: 700 13px var(--mono); letter-spacing: 0.4em; text-transform: uppercase; color: var(--c); padding-left: 0.4em; }
.ct-name { font: 900 64px/1 var(--sans); letter-spacing: -0.02em; color: var(--ink); white-space: nowrap;
  text-shadow: 0 2px 0 #fff, 0 0 30px rgba(255,255,255,0.95), 0 0 60px rgba(255,255,255,0.9); }
.ct-sub { font: 600 15px var(--sans); color: var(--ink-2); letter-spacing: 0.02em; text-shadow: 0 0 18px #fff, 0 0 30px #fff; }
.chtitle.show { animation: ctIn 3.6s cubic-bezier(.2,.7,.2,1) forwards; }
.chtitle.show::before, .chtitle.show::after { animation: ctLine 3.6s cubic-bezier(.2,.7,.2,1) forwards; }
.chtitle.show .ct-name { animation: ctName 3.6s cubic-bezier(.2,.7,.2,1) forwards; }
@keyframes ctIn { 0% { opacity: 0; } 12% { opacity: 1; } 78% { opacity: 1; } 100% { opacity: 0; } }
@keyframes ctLine { 0% { width: 0; } 25% { width: 420px; } 78% { width: 460px; opacity: 1; } 100% { width: 520px; opacity: 0; } }
@keyframes ctName { 0% { letter-spacing: 0.12em; filter: blur(8px); transform: translateY(8px); } 22% { letter-spacing: -0.02em; filter: blur(0); transform: none; } 100% { letter-spacing: 0.01em; } }
@media (max-width: 640px) { .ct-name { font-size: 38px; } }
@media (prefers-reduced-motion: reduce) { .chtitle.show .ct-name, .chtitle.show::before, .chtitle.show::after { animation: none; } .chtitle.show::before, .chtitle.show::after { width: 420px; } }
.chtitle { padding: 26px 70px; }
.chtitle .ct-num, .chtitle .ct-name, .chtitle .ct-sub { position: relative; z-index: 1; }
.chtitle { background: radial-gradient(closest-side, rgba(255,255,255,0.94), rgba(255,255,255,0.8) 60%, rgba(255,255,255,0)); }
.chtitle::before { top: 12px; } .chtitle::after { bottom: 12px; }
.ct-sub { color: var(--ink); }
.ct-name em, .ct-sub em { font-style: normal; color: var(--c); }
.ct-sub em { font-weight: 900; }
.ct-sub { font-size: 16px; }
.dtext .paper { font-weight: 800; }

/* Alex's name card, from the drawer */
.pf-card { position: relative; display: flex; gap: 20px; align-items: center; background: #fffdf6; border: 1.5px solid var(--ink); border-radius: 16px; padding: 22px 26px 22px 22px; box-shadow: 8px 8px 0 var(--ink); max-width: min(560px, 92vw); border-top: 10px solid var(--ink); }
.pf-card img { width: 120px; height: 120px; border-radius: 50%; border: 2px solid var(--ink); background: #fbf8f0; object-fit: cover; object-position: 50% 20%; flex: none; }
.pf-body { display: flex; flex-direction: column; gap: 4px; font: 500 14px var(--sans); color: var(--ink-2); }
.pf-body b { font: 900 28px var(--sans); color: var(--ink); }
.pf-role { font: 800 16px var(--sans); color: var(--accent); }
.pf-links { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 6px; }
.pf-links a { font: 600 13px var(--mono); color: var(--accent); }
.pf-card .lb-x { position: absolute; right: 10px; top: 6px; }
.cd { animation: cdPop .11s cubic-bezier(.3,1.8,.5,1) both; }
@keyframes cdPop { from { transform: scale(0.7); opacity: 0.5; } to { transform: scale(1); opacity: 1; } }


/* jump flash: arrow back (loop) or forward (skip), instant on, ~1 s fade */
.jumpflash { position: absolute; left: 50%; top: 40%; transform: translate(-50%, -50%); z-index: 14; pointer-events: none; display: flex; flex-direction: column; align-items: center; opacity: 0; }
.jumpflash svg { width: 220px; height: 110px; fill: none; stroke-width: 9; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 0 14px rgba(255,255,255,0.9)); }
.jumpflash span { font: 900 30px var(--sans); letter-spacing: 0.18em; margin-top: -6px; text-shadow: 0 0 14px #fff, 0 0 26px #fff; }
.jumpflash.loop { color: #e8a33d; } .jumpflash.skip { color: #2fae74; }
.jumpflash svg path { stroke: currentColor; }
.jumpflash.loop .ar-skip, .jumpflash.skip .ar-loop { display: none; }
.jumpflash.go { animation: jf 1.1s linear forwards; }
@keyframes jf { 0% { opacity: 1; transform: translate(-50%, -50%) scale(1.06); } 15% { transform: translate(-50%, -50%) scale(1); } 100% { opacity: 0; transform: translate(-50%, -50%) scale(1); } }

/* loop red, skip blue everywhere */
.sk-play[data-lane="0"] { background: #e6e7ef; }
.sk-play[data-lane="1"], #vz-cutplay .sk-play[data-lane="3"] { background: #5cc8ff; color: #fff; }
.sk-play[data-lane="1"]:hover, #vz-cutplay .sk-play[data-lane="3"]:hover { background: #8ad8ff; }
#vz-cutplay .sk-play[data-lane="2"] { background: #ff4d5e; color: #fff; } #vz-cutplay .sk-play[data-lane="2"]:hover { background: #ff7a87; }
/* jump flash: a sharp arrow in a dark badge, over the visualization card */
.jumpflash { position: absolute; left: auto; top: auto; z-index: 14; transform: none; display: flex; flex-direction: row; align-items: center; gap: 10px; padding: 10px 18px 10px 14px; border-radius: 14px; background: rgba(14,14,23,0.92); box-shadow: 0 10px 30px rgba(14,14,23,0.35); opacity: 0; pointer-events: none; }
.jumpflash svg { width: 78px; height: 40px; filter: none; }
.jumpflash svg * { fill: currentColor; stroke: none; }
.jumpflash span { font: 900 22px var(--sans); letter-spacing: 0.14em; margin: 0; text-shadow: none; }
.jumpflash.loop { color: #ff4d5e; } .jumpflash.skip { color: #5cc8ff; }
.jumpflash.go { animation: jf2 1.05s ease-in forwards; }
@keyframes jf2 { 0% { opacity: 1; } 100% { opacity: 0; } }
.sk-play[data-lane="1"], #vz-cutplay .sk-play[data-lane="3"] { color: #0e0e17; }
.jumpflash { padding: 14px 26px 14px 20px; border: 2px solid currentColor; } .jumpflash svg { width: 110px; height: 56px; } .jumpflash span { font-size: 30px; }
.homebtn { display: inline-grid; place-items: center; width: 30px; height: 30px; margin-right: 10px; border-radius: 8px; border: 1.5px solid var(--ink); background: #fff; color: var(--ink); box-shadow: 2px 2px 0 var(--ink); transition: transform .15s, box-shadow .15s; vertical-align: middle; pointer-events: auto; }
.homebtn svg { width: 16px; height: 16px; fill: currentColor; }
.homebtn:hover { transform: translate(-1px, -1px); box-shadow: 3px 3px 0 var(--ink); }
.brand { display: flex; align-items: center; gap: 6px; }
.homebtn { position: relative; z-index: 30; }

/* floating questions at the end */
.questions { position: absolute; inset: 70px 0 200px; z-index: 12; display: flex; flex-wrap: wrap; align-content: center; justify-content: center; gap: 22px 34px; padding: 0 8%; pointer-events: none; }
.qbub { pointer-events: auto; font: 700 17px var(--sans); color: var(--ink); background: #fff; border: 1.5px solid var(--ink); border-radius: 22px; padding: 14px 20px; box-shadow: 4px 4px 0 var(--ink); cursor: pointer; position: relative;
  animation: qIn .6s cubic-bezier(.2,1.4,.4,1) both, qFloat 3.6s ease-in-out infinite; animation-delay: calc(var(--k) * 0.15s), calc(var(--k) * -1.2s); }
.qbub::after { content: ""; position: absolute; left: 26px; bottom: -9px; width: 14px; height: 14px; background: #fff; border-right: 1.5px solid var(--ink); border-bottom: 1.5px solid var(--ink); transform: rotate(45deg); }
.qbub:hover { background: #fffbea; transform: translateY(-3px) scale(1.04); box-shadow: 6px 6px 0 var(--ink); }
@keyframes qIn { from { opacity: 0; transform: translateY(20px) scale(0.8); } }
@keyframes qFloat { 50% { translate: 0 -8px; } }
@media (prefers-reduced-motion: reduce) { .qbub { animation: none; } }
.qbub.done { background: #f2f4fa; color: var(--ink-2); box-shadow: 2px 2px 0 rgba(34,48,90,0.4); }
.qbub.done::after { background: #f2f4fa; }
.qbub.fresh { background: #fff6d6; border-color: #e8a33d; box-shadow: 4px 4px 0 #e8a33d; }
.qbub.fresh::after { background: #fff6d6; border-color: #e8a33d; }
.qbub.fresh::before { content: "NEW"; position: absolute; top: -10px; right: 14px; font: 800 10px var(--mono); letter-spacing: 0.1em; color: #fff; background: #e8a33d; padding: 2px 6px; border-radius: 6px; }

/* question unlock: the bubble hides inside a glowing orb, which shakes, bursts, and reveals it */
.qbub.unlock { color: transparent; background: transparent; border-color: transparent; box-shadow: none; animation: none; }
.qbub.unlock::after { opacity: 0; }
.qbub.unlocked { animation: qPop .7s cubic-bezier(.2,1.8,.4,1) both, qFloat 3.6s ease-in-out .7s infinite; }
@keyframes qPop { 0% { transform: scale(0.2); opacity: 0; } 60% { transform: scale(1.12); opacity: 1; } 100% { transform: scale(1); } }
.unlockfx { position: absolute; left: 50%; top: 50%; width: 0; height: 0; pointer-events: none; z-index: 3; }
.uf-orb { position: absolute; left: -34px; top: -34px; width: 68px; height: 68px; border-radius: 50%; display: grid; place-items: center; font: 900 34px var(--sans); color: #7a5200;
  background: radial-gradient(circle at 35% 30%, #fffbe6, #ffd166 45%, #e8a33d 80%); box-shadow: 0 0 30px 8px rgba(255,209,102,0.8), 0 0 70px 20px rgba(255,209,102,0.35);
  animation: orb 1.25s ease-in forwards; }
@keyframes orb { 0% { transform: scale(0) rotate(-90deg); } 25% { transform: scale(1.1) rotate(0); } 35%, 75% { transform: scale(1) translateX(0); }
  40% { transform: translateX(-5px) rotate(-8deg); } 45% { transform: translateX(5px) rotate(8deg); } 50% { transform: translateX(-6px) rotate(-10deg); } 55% { transform: translateX(6px) rotate(10deg); }
  60% { transform: translateX(-7px) scale(1.08); } 65% { transform: translateX(7px) scale(1.12); } 70% { transform: scale(1.2); }
  92% { transform: scale(1.5); opacity: 1; filter: brightness(1.6); } 100% { transform: scale(2.6); opacity: 0; filter: brightness(2.5); } }
.uf-rays { position: absolute; left: -140px; top: -140px; width: 280px; height: 280px; border-radius: 50%; opacity: 0;
  background: repeating-conic-gradient(rgba(255,209,102,0.55) 0 8deg, transparent 8deg 22deg); -webkit-mask: radial-gradient(circle, #000 20%, transparent 70%); mask: radial-gradient(circle, #000 20%, transparent 70%);
  animation: rays 2.6s ease-out 1.1s forwards; }
@keyframes rays { 0% { opacity: 0; transform: scale(0.3) rotate(0); } 20% { opacity: 1; } 100% { opacity: 0; transform: scale(1.3) rotate(60deg); } }
.unlockfx i { position: absolute; left: -4px; top: -4px; width: 8px; height: 8px; border-radius: 50%; background: var(--c); box-shadow: 0 0 8px var(--c); opacity: 0;
  animation: spark 1.1s cubic-bezier(.1,.8,.3,1) 1.15s forwards; }
@keyframes spark { 0% { opacity: 1; transform: rotate(var(--a)) translateX(0) scale(1.3); } 100% { opacity: 0; transform: rotate(var(--a)) translateX(calc(var(--d) * 2)) scale(0.3); } }
.uf-banner { position: absolute; left: 50%; top: -78px; transform: translateX(-50%); white-space: nowrap; font: 800 14px var(--sans); color: #7a5200; letter-spacing: 0.02em;
  background: linear-gradient(135deg, #fff6d6, #f6d77a 55%, #e3b23c); border: 1.5px solid #7a5200; padding: 6px 14px; border-radius: 999px; box-shadow: 0 4px 16px rgba(232,163,61,0.5); opacity: 0;
  animation: banner 2.4s ease 1.2s forwards; }
@keyframes banner { 0% { opacity: 0; transform: translate(-50%, 10px) scale(0.7); } 15% { opacity: 1; transform: translate(-50%, 0) scale(1.05); } 25%, 80% { opacity: 1; transform: translate(-50%, 0) scale(1); } 100% { opacity: 0; transform: translate(-50%, -8px); } }
@media (prefers-reduced-motion: reduce) { .uf-orb, .uf-rays, .unlockfx i, .uf-banner, .qbub.unlocked { animation-duration: .01s; animation-delay: 0s; } }
.qbub.unlock::before { opacity: 0; }
.uf-banner { z-index: 5; }
.t-call { display: flex; align-items: center; gap: 10px; }
.t-call img { width: 46px; height: 46px; border-radius: 50%; object-fit: cover; border: 2px solid #34c759; flex: none; }
