/* Shift simulator prototype. Brand: white, #0094D4, #675B5B text, #F7A900 highlight. */
@font-face {
  font-family: "Nunito Sans";
  src: url("fonts/nunito-sans-latin-wght-normal.woff2") format("woff2");
  font-weight: 200 1000;
  font-display: swap;
}

:root {
  --white: #FFFFFF;
  --blue: #0094D4;          /* large type, icons, fills, focus */
  --blue-ink: #0077AB;      /* small blue text and filled buttons with white text (5:1) */
  --blue-wash: #E8F5FB;
  --text: #675B5B;          /* body text (6.5:1) */
  --text-strong: #3D3535;
  --highlight: #F7A900;     /* fills and markers only */
  --on-highlight: #3D3535;
  --highlight-wash: #FFF4D9;
  --bad: #C2412D;
  --bad-wash: #FCEBE7;
  --good: #1E7F4F;
  --good-wash: #E6F4EC;
  --line: #E6E1E1;
  --shadow-lg: 0 24px 60px rgb(61 53 53 / .16), 0 4px 14px rgb(61 53 53 / .08);
  --shadow-sm: 0 2px 8px rgb(61 53 53 / .08);
  --ease: cubic-bezier(.22, .8, .24, 1);
  --font: "Nunito Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; background: var(--white); color: var(--text); font-family: var(--font); font-size: 17px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
button { font: inherit; color: inherit; }
img { display: block; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 10px; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 12px 22px; border-radius: 999px; cursor: pointer;
  border: 2px solid var(--blue-ink); background: var(--white); color: var(--blue-ink); font-weight: 800; letter-spacing: .01em;
  transition: transform .15s var(--ease), background .15s, box-shadow .15s;
}
.btn:hover { box-shadow: var(--shadow-sm); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn.primary { background: var(--blue-ink); color: var(--white); }
.btn.quiet { border-color: transparent; background: transparent; }

/* ---------- Stage ---------- */
.stage { position: fixed; inset: 0; overflow: hidden; }
.scene { position: absolute; inset: 0; }
.scene img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transform: scale(1.04); transition: opacity .9s var(--ease), transform 8s linear; }
.scene img.on { opacity: 1; transform: scale(1); }
.scene::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgb(255 255 255 / 0) 40%, rgb(255 255 255 / .55) 70%, rgb(255 255 255 / .85) 100%); }

/* HUD */
.hud {
  position: absolute; top: 16px; left: 16px; right: 16px; z-index: 5;
  display: flex; align-items: center; gap: 18px; padding: 10px 14px 10px 18px;
  background: rgb(255 255 255 / .92); backdrop-filter: blur(10px); border-radius: 18px; box-shadow: var(--shadow-sm);
}
.hud .name { font-weight: 900; color: var(--blue); font-size: 15px; letter-spacing: .02em; white-space: nowrap; }
.meters { display: flex; gap: 18px; flex: 1; justify-content: center; }
.meter { width: 200px; }
.meter-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; white-space: nowrap; font-size: 12px; font-weight: 800; color: var(--text-strong); }
.meter-top .state { font-weight: 700; color: var(--text); }
.meter-track { position: relative; height: 8px; border-radius: 99px; background: var(--line); margin-top: 4px; overflow: visible; }
.meter-fill { position: absolute; inset: 0 auto 0 0; border-radius: inherit; background: var(--blue); transition: width .8s var(--ease), background .4s; }
.meter-fill.low { background: var(--bad); }
.meter-fill.mid { background: var(--highlight); }
.delta { position: absolute; right: 0; top: 12px; z-index: 1; font-size: 12px; font-weight: 900; padding: 1px 7px; border-radius: 99px; animation: floatUp 1.8s var(--ease) forwards; }
.delta.up { background: var(--good-wash); color: var(--good); }
.delta.down { background: var(--bad-wash); color: var(--bad); }
@keyframes floatUp { 0% { opacity: 0; transform: translateY(6px); } 15% { opacity: 1; transform: none; } 80% { opacity: 1; } 100% { opacity: 0; transform: translateY(-6px); } }
.you { display: flex; align-items: center; gap: 8px; }
.avatar { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; background: var(--blue-wash); flex: none; }
.avatar.icon { display: grid; place-items: center; }
.avatar.icon img { width: 20px; height: 20px; }

/* Moment caption over the scene */
.caption:empty { display: none; }
.caption {
  position: absolute; left: 32px; bottom: 32px; z-index: 4; max-width: 460px;
  background: var(--white); border-radius: 22px; padding: 18px 22px; box-shadow: var(--shadow-lg);
  animation: rise .7s var(--ease) both;
}
.time { display: inline-flex; align-items: center; gap: 6px; background: var(--highlight); color: var(--on-highlight); font-weight: 900; font-size: 14px; padding: 3px 12px; border-radius: 99px; }
.caption h1 { margin: 8px 0 4px; font-size: clamp(1.5rem, 3vw, 2.1rem); line-height: 1.1; color: var(--blue); font-weight: 900; letter-spacing: -.01em; }
.caption p { margin: 0; color: var(--text-strong); font-weight: 600; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }

/* ---------- Device panel ---------- */
.device {
  position: absolute; z-index: 6; top: 96px; right: 24px; bottom: 24px; width: min(440px, 40vw);
  display: flex; flex-direction: column; background: var(--white); border-radius: 26px; box-shadow: var(--shadow-lg); overflow: hidden;
  animation: slideIn .7s var(--ease) both;
}
@keyframes slideIn { from { opacity: 0; transform: translateX(30px); } }
.tabs { display: flex; gap: 4px; padding: 10px; border-bottom: 1px solid var(--line); }
.tab { flex: 1; min-height: 42px; border: 0; border-radius: 12px; background: transparent; font-weight: 800; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px; color: var(--text); }
.tab[aria-selected="true"] { background: var(--blue-wash); color: var(--blue-ink); }
.badge { min-width: 22px; height: 22px; padding: 0 6px; border-radius: 99px; background: var(--highlight); color: var(--on-highlight); font-size: 12px; font-weight: 900; display: inline-grid; place-items: center; }
.badge.pulse { animation: pulse 1.4s ease-in-out 3; }
@keyframes pulse { 50% { transform: scale(1.18); } }
.view { flex: 1; overflow-y: auto; padding: 16px; scroll-behavior: smooth; }

/* Chat */
.msg { display: flex; gap: 10px; align-items: flex-end; margin: 0 0 12px; animation: pop .45s var(--ease) both; }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.98); } }
.msg .who { font-size: 12px; font-weight: 800; color: var(--text-strong); margin: 0 0 3px 4px; }
.msg .who span { font-weight: 600; color: var(--text); }
.bubble { background: #F5F2F2; color: var(--text-strong); padding: 10px 14px; border-radius: 18px 18px 18px 6px; max-width: 300px; font-size: 16px; }
.msg.me { flex-direction: row-reverse; }
.msg.me .who { text-align: right; margin: 0 4px 3px 0; }
.msg.me .bubble { background: var(--blue-ink); color: var(--white); border-radius: 18px 18px 6px 18px; }
.sticker { width: 72px; height: 72px; }
.typing .bubble { display: inline-flex; gap: 4px; padding: 14px 16px; }
.typing i { width: 7px; height: 7px; border-radius: 50%; background: #B9AFAF; animation: dot 1s infinite; }
.typing i:nth-child(2) { animation-delay: .15s; } .typing i:nth-child(3) { animation-delay: .3s; }
@keyframes dot { 50% { transform: translateY(-4px); opacity: .5; } }
.stamp { text-align: center; margin: 14px 0; }
.stamp span { font-size: 12px; font-weight: 900; background: var(--highlight-wash); color: var(--on-highlight); padding: 3px 10px; border-radius: 99px; }

.event { border-radius: 18px; overflow: hidden; border: 1px solid var(--line); margin: 0 0 12px; animation: pop .5s var(--ease) both; background: var(--white); }
.event img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.event .body { padding: 12px 14px; }
.why { display: flex; gap: 10px; padding: 12px 14px; border-radius: 14px; margin: 0 0 12px; animation: pop .45s var(--ease) both; font-size: 16px; color: var(--text-strong); }
.why b { display: block; font-size: 13px; letter-spacing: .02em; }
.why.bad { background: var(--bad-wash); } .why.bad b { color: var(--bad); }
.why.tip { background: var(--highlight-wash); border-left: 5px solid var(--highlight); } .why.tip b { color: var(--on-highlight); }
.why.good { background: var(--good-wash); } .why.good b { color: var(--good); }

/* Composer: the learner's choices */
.composer { border-top: 1px solid var(--line); padding: 14px 16px 16px; background: #FCFBFB; }
.composer h2 { font-size: 14px; font-weight: 900; color: var(--blue-ink); margin: 0 0 10px; letter-spacing: .02em; }
.composer h2:focus { outline: none; }
.replies { display: grid; gap: 8px; }
.reply {
  text-align: left; padding: 12px 14px; border-radius: 16px; border: 2px solid var(--line); background: var(--white);
  color: var(--text-strong); cursor: pointer; font-size: 15.5px; line-height: 1.4; transition: border-color .15s, transform .15s var(--ease);
}
.reply:hover { border-color: var(--blue); transform: translateY(-1px); }
.reply[aria-disabled="true"] { opacity: .5; cursor: not-allowed; transform: none; border-style: dashed; }
.reply .tried { display: block; font-size: 12px; font-weight: 800; color: var(--bad); margin-top: 4px; }

/* Inbox */
.plan { border: 2px solid var(--blue); border-radius: 18px; padding: 12px 14px; margin-bottom: 16px; }
.plan summary { cursor: pointer; font-weight: 900; color: var(--blue-ink); list-style: none; display: flex; justify-content: space-between; }
.plan summary::after { content: "Hide"; font-size: 13px; font-weight: 700; }
.plan:not([open]) summary::after { content: "Show"; }
.plan ol { margin: 10px 0 6px; padding-left: 20px; }
.plan li { padding: 4px 6px; border-radius: 8px; transition: background .4s; }
.plan li.flash { background: var(--highlight); color: var(--on-highlight); }
.plan li small { display: block; font-size: 13px; }
.plan p { margin: 0; font-size: 14px; }
.term { border: 0; background: none; padding: 0; color: var(--blue-ink); font-weight: 800; text-decoration: underline dotted 2px; text-underline-offset: 3px; cursor: help; }
.term-pop { display: block; margin: 6px 0; padding: 8px 12px; border-radius: 12px; background: var(--blue-wash); color: var(--text-strong); font-size: 14px; }

.card {
  border-radius: 20px; background: var(--white); border: 1px solid var(--line); box-shadow: var(--shadow-sm); padding: 16px;
  animation: deal .55s var(--ease) both;
}
@keyframes deal { from { opacity: 0; transform: translateY(-18px) rotate(-2deg); } }
.card.out-now { animation: outRight .45s var(--ease) forwards; }
.card.out-wait { animation: outLeft .45s var(--ease) forwards; }
@keyframes outRight { to { opacity: 0; transform: translateX(60px) rotate(4deg); } }
@keyframes outLeft { to { opacity: 0; transform: translateX(-60px) rotate(-4deg); } }
.card .from { font-size: 12px; font-weight: 900; color: var(--blue-ink); letter-spacing: .03em; }
.card .what { font-size: 18px; font-weight: 800; color: var(--text-strong); margin: 4px 0 14px; line-height: 1.3; }
.card .acts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.count { font-size: 13px; font-weight: 700; margin: 0 0 8px; }
.piles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }
.pile { border-radius: 16px; background: #F8F6F6; padding: 10px; min-height: 80px; }
.pile h3 { margin: 0 0 6px; font-size: 13px; font-weight: 900; color: var(--text-strong); }
.pile ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.pile li { font-size: 13px; background: var(--white); border-radius: 10px; padding: 6px 8px; animation: pop .4s var(--ease) both; color: var(--text-strong); }
.pile li .r { display: block; font-weight: 800; font-size: 12px; }
.pile li.ok .r { color: var(--good); }
.pile li.fix .r { color: var(--bad); }

.call { text-align: center; padding: 18px; border-radius: 20px; background: var(--blue-wash); animation: pop .5s var(--ease) both; margin-bottom: 12px; }
.call .ring { width: 64px; height: 64px; margin: 0 auto 8px; border-radius: 50%; background: var(--white); display: grid; place-items: center; box-shadow: var(--shadow-sm); }
.call .ring img { width: 30px; height: 30px; }
.call.ringing .ring { animation: ring 1s ease-in-out 2; }
@keyframes ring { 25% { transform: rotate(-8deg); } 75% { transform: rotate(8deg); } }
.call b { display: block; color: var(--text-strong); }
.call .dead { margin-top: 8px; font-weight: 800; color: var(--bad); }

/* ---------- Full-screen cards: start, time jump, wrap ---------- */
.overlay { position: fixed; inset: 0; z-index: 20; display: grid; place-items: center; padding: 24px; background: rgb(255 255 255 / .55); backdrop-filter: blur(6px); animation: fade .5s var(--ease) both; overflow-y: auto; }
@keyframes fade { from { opacity: 0; } }
.panel { width: min(640px, 100%); background: var(--white); border-radius: 28px; padding: 32px; box-shadow: var(--shadow-lg); animation: rise .7s var(--ease) both; }
.panel h1 { font-size: clamp(2rem, 5vw, 3rem); line-height: 1.05; margin: 10px 0 10px; color: var(--blue); font-weight: 900; letter-spacing: -.02em; }
.panel p { margin: 0 0 14px; }
.panel .lead { font-size: 1.15rem; color: var(--text-strong); font-weight: 600; }
.small { font-size: 14px; }
.roles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 18px 0 22px; }
.role { border: 2px solid var(--line); border-radius: 18px; padding: 8px; background: var(--white); cursor: pointer; text-align: center; font-weight: 800; font-size: 14px; color: var(--text-strong); transition: border-color .15s, transform .15s var(--ease); }
.role img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 12px; margin-bottom: 6px; }
.role:hover { transform: translateY(-2px); }
.role[aria-pressed="true"] { border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-wash); }
.jump { text-align: center; }
.jump .big { font-size: clamp(4rem, 14vw, 7rem); font-weight: 900; color: var(--blue); line-height: 1; letter-spacing: -.03em; }
.result-meters { display: grid; gap: 12px; margin: 18px 0; }
.result-meters .meter { width: 100%; }
.practised { padding-left: 0; list-style: none; display: grid; gap: 8px; }
.practised li { display: flex; gap: 10px; align-items: flex-start; font-weight: 700; color: var(--text-strong); }
.practised li::before { content: ""; flex: none; width: 10px; height: 10px; margin-top: 8px; border-radius: 50%; background: var(--highlight); }

/* ---------- Phone ---------- */
@media (max-width: 860px) {
  body { font-size: 16px; }
  .stage { position: relative; inset: auto; min-height: 100%; overflow: visible; }
  .scene { position: relative; height: 38vh; min-height: 220px; }
  .scene::after { background: linear-gradient(180deg, rgb(255 255 255 / 0) 55%, rgb(255 255 255 / .9) 100%); }
  .hud { position: sticky; top: 0; left: 0; right: 0; border-radius: 0; padding: 8px 12px; gap: 10px; }
  .hud .name { display: none; }
  .meters { gap: 10px; justify-content: space-between; }
  .meter { width: auto; flex: 1; }
  .meter-top .state { display: none; }
  .meter-top { font-size: 11px; }
  .you .avatar { width: 30px; height: 30px; }
  .caption { left: 12px; right: 12px; bottom: 12px; max-width: none; padding: 12px 16px; }
  .device { position: relative; top: auto; right: auto; bottom: auto; width: auto; margin: -8px 0 0; border-radius: 26px 26px 0 0; min-height: 62vh; }
  .view { overflow: visible; }
  .roles { grid-template-columns: repeat(2, 1fr); }
  .panel { padding: 22px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .scene img { transform: none; }
}

/* ===== Full course additions ===== */
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 16px; }
.h-md { font-size: clamp(1.6rem, 3.6vw, 2.2rem) !important; }
.h-sm { font-size: 1.15rem; color: var(--blue-ink); margin: 20px 0 8px; }
.panel.wide { width: min(860px, 100%); }
.panel h2 { font-size: 1.05rem; color: var(--blue-ink); margin: 0 0 6px; }

/* Pocket guide button in the top bar */
.guide-btn { min-height: 40px; padding: 6px 14px; border-radius: 999px; border: 2px solid var(--highlight); background: var(--highlight-wash); color: var(--on-highlight); font-weight: 900; cursor: pointer; white-space: nowrap; }
.guide-btn .count { display: inline-block; margin-left: 4px; padding: 0 7px; border-radius: 99px; background: var(--highlight); }

/* Explainer player and placeholder */
.vid { position: relative; aspect-ratio: 16 / 9; border-radius: 18px; overflow: hidden; background: #0B2733; margin: 12px 0; }
.vid video { width: 100%; height: 100%; display: block; }
.vid.placeholder { display: grid; place-items: center; text-align: center; padding: 28px;
  background: radial-gradient(120% 120% at 15% 10%, #0094D4 0%, #0077AB 45%, #0B3A52 100%); color: #fff; }
.vid.placeholder::before { content: ""; position: absolute; left: 8%; right: 8%; bottom: 22%; height: 3px; border-radius: 3px; background: rgb(255 255 255 / .55); }
.vid.placeholder::after { content: ""; position: absolute; bottom: calc(22% - 6px); left: 8%; width: 15px; height: 15px; border-radius: 50%; background: var(--highlight); animation: travel 6s linear infinite; }
@keyframes travel { to { left: 92%; } }
.ph-tag { position: absolute; top: 16px; left: 16px; font-size: 12px; font-weight: 900; letter-spacing: .04em; background: var(--highlight); color: var(--on-highlight); padding: 3px 10px; border-radius: 99px; }
.ph-beat { font-size: clamp(1.15rem, 2.8vw, 1.9rem); font-weight: 800; line-height: 1.25; max-width: 30ch; }
.ph-beat.in { animation: beatIn .6s var(--ease) both; }
@keyframes beatIn { from { opacity: 0; transform: translateY(10px); } }
details.transcript summary { cursor: pointer; font-weight: 800; color: var(--blue-ink); min-height: 40px; display: flex; align-items: center; }
details.transcript ol { margin: 6px 0 0; padding-left: 22px; color: var(--text-strong); }

/* Moment framing */
.stakes { display: grid; gap: 6px; margin: 4px auto 18px; max-width: 520px; text-align: left; background: #F8F6F6; border-radius: 16px; padding: 12px 16px; }
.stakes p { margin: 0; color: var(--text-strong); font-weight: 700; }
.stakes .tag { display: inline-block; font-size: 12px; font-weight: 900; color: var(--on-highlight); background: var(--highlight); padding: 1px 8px; border-radius: 99px; margin-right: 6px; }
.hint-btn { margin-top: 8px; color: var(--blue-ink); text-decoration: underline; text-underline-offset: 3px; min-height: 40px; padding: 6px 4px; }
.why.hint { background: var(--blue-wash); border-left: 5px solid var(--blue); } .why.hint b { color: var(--blue-ink); }

.habits { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 10px; }
.habits li { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: 16px; border: 2px solid var(--line); }
.habits li.done { border-color: var(--blue); background: var(--blue-wash); }
.habits p { margin: 2px 0; color: var(--text-strong); }
.tick { flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-weight: 900; border: 2px solid var(--line); color: var(--white); }
.done .tick, .habit-done .tick { background: var(--blue-ink); border-color: var(--blue-ink); }

.debrief { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 14px 0 20px; }
.debrief > div { background: #F8F6F6; border-radius: 16px; padding: 14px 16px; }
.debrief p { margin: 0; color: var(--text-strong); }
.debrief .real { background: var(--highlight-wash); grid-column: 1 / -1; }
.debrief .habit-done { grid-column: 1 / -1; display: flex; gap: 12px; align-items: center; background: var(--blue-wash); }
.habit-done b { display: block; color: var(--blue-ink); }
.deltas { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; font-weight: 800; }
.deltas .up { color: var(--good); } .deltas .up::before { content: "\2191  "; }
.deltas .down { color: var(--bad); } .deltas .down::before { content: "\2193  "; }

/* Rumour network */
.rumour-net svg { width: 100%; height: auto; display: block; background: #F8F6F6; }
.rumour-net line { stroke: #E0DADA; stroke-width: 1.5; }
.rumour-net circle { fill: #D3CCCC; transition: fill .3s, r .3s; }
.rumour-net circle.hit { fill: var(--bad); }
.rumour-net .body { display: grid; gap: 2px; }
.rumour-net .seen { color: var(--bad); font-size: 18px; }

/* Update builder */
.builder .chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.chip { min-height: 40px; padding: 6px 14px; border-radius: 999px; border: 2px solid var(--line); background: var(--white); color: var(--text-strong); font: inherit; font-size: 14.5px; font-weight: 700; cursor: pointer; text-align: left; }
.chip:hover { border-color: var(--blue); }
.chip[aria-pressed="true"] { background: var(--blue-ink); border-color: var(--blue-ink); color: #fff; }
.chip.flagged { border-color: var(--bad); color: var(--bad); text-decoration: line-through; }
.chip[aria-disabled="true"] { cursor: default; }
.preview { min-height: 64px; border-radius: 14px; padding: 10px 12px; background: var(--blue-wash); color: var(--text-strong); font-weight: 600; }
.flag { margin: 8px 0 0; font-size: 14px; color: var(--bad); }

/* Lanes and timeline */
.lane-cards { list-style: none; padding: 0; margin: 10px 0; display: grid; gap: 8px; }
.lane-card { padding: 10px 12px; border-radius: 14px; background: #F8F6F6; color: var(--text-strong); font-weight: 700; animation: pop .4s var(--ease) both; }
.lane-acts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.lane-card .r { display: block; font-size: 13px; margin-top: 4px; }
.r.ok { color: var(--good); } .r.fix { color: var(--bad); }
.timeline { margin-top: 12px; display: grid; gap: 6px; }
.tl-row { display: grid; grid-template-columns: 110px 1fr; gap: 8px; align-items: center; }
.tl-name { font-size: 12px; font-weight: 900; color: var(--text-strong); }
.tl-track { position: relative; height: 26px; border-radius: 99px; background: #F2EEEE; }
.tl-dot { position: absolute; top: 50%; transform: translate(-50%, -50%); width: 16px; height: 16px; border-radius: 50%; background: var(--blue); box-shadow: 0 0 0 3px #fff; animation: pop .4s var(--ease) both; }
.tl-dot span { position: absolute; top: -18px; left: 50%; transform: translateX(-50%); font-size: 10px; font-weight: 900; color: var(--text-strong); white-space: nowrap; }
.tl-axis { display: flex; justify-content: space-between; margin-left: 118px; font-size: 11px; color: var(--text); }

/* Plan check */
.doc-head { display: flex; gap: 12px; align-items: center; margin-bottom: 6px; }
.doc-head b { display: block; color: var(--text-strong); }
.logo-slot { flex: none; font-size: 11px; font-weight: 800; border: 2px dashed var(--line); border-radius: 10px; padding: 8px; color: var(--text); }
.plandoc h4 { margin: 12px 0 6px; font-size: 13px; letter-spacing: .03em; color: var(--blue-ink); }
.doc-rows { display: grid; gap: 6px; }
.doc-row { text-align: left; padding: 9px 12px; border-radius: 12px; border: 2px solid var(--line); background: var(--white); color: var(--text-strong); font: inherit; font-size: 14.5px; cursor: pointer; }
.doc-row:hover { border-color: var(--blue); }
.doc-row.found { border-color: var(--bad); background: var(--bad-wash); cursor: default; }
.doc-row.revealed { border-style: dashed; }
.why-row { display: block; margin-top: 4px; font-size: 13px; font-weight: 800; color: var(--bad); }
.doc-note { font-size: 14px; min-height: 20px; }

/* Ending */
.replay { list-style: none; padding: 0; margin: 14px 0; display: grid; gap: 8px; }
.replay li { display: grid; grid-template-columns: 96px 1fr; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 14px; background: #F8F6F6; border-left: 5px solid var(--line); }
.replay li.ok { border-left-color: var(--good); }
.replay li.learnt { border-left-color: var(--highlight); }
.replay .when { font-weight: 900; color: var(--blue-ink); }
.replay b { display: block; color: var(--text-strong); }
.review { padding-left: 18px; } .review p { margin: 2px 0; }
.ready { display: grid; gap: 10px; margin: 14px 0; }
.ready-item { padding: 12px 14px; border-radius: 16px; border: 2px solid var(--line); }
.ready-item p { margin: 0 0 8px; font-weight: 800; color: var(--text-strong); }
.pair { display: flex; flex-wrap: wrap; gap: 8px; }
.pair .btn { min-height: 42px; padding: 8px 16px; }
.pair .btn[aria-pressed="true"] { background: var(--blue-ink); color: #fff; }
.take-card { border: 3px solid var(--blue); border-radius: 22px; padding: 20px 22px; margin: 14px 0; }
.take-card h2 { color: var(--blue); font-size: 1.3rem; }
.take-card ol { padding-left: 20px; color: var(--text-strong); }
.take-card li { margin-bottom: 6px; }
.take-card dl { display: grid; grid-template-columns: max-content 1fr; gap: 4px 12px; font-size: 14px; }
.take-card dt { font-weight: 900; }
.take-card dd { margin: 0; }
.resume { background: var(--blue-wash); border-radius: 16px; padding: 14px 16px; margin: 12px 0; }
.resume p { margin: 0; color: var(--text-strong); }

@media (max-width: 860px) {
  .hud .guide-btn { padding: 4px 10px; font-size: 13px; }
  .debrief { grid-template-columns: 1fr; }
  .tl-row { grid-template-columns: 82px 1fr; }
  .tl-axis { margin-left: 90px; }
  .replay li { grid-template-columns: 76px 1fr; }
}

@media print {
  .stage, .no-print, .row { display: none !important; }
  .overlay { position: static; background: none; backdrop-filter: none; padding: 0; }
  .panel { box-shadow: none; width: 100%; padding: 0; }
}

@media (max-width: 860px) {
  .hud { flex-wrap: wrap; row-gap: 6px; }
  .hud .guide-btn { margin-left: auto; }
  .hud .meters { order: 2; flex-basis: 100%; min-width: 0; }
  .meter { min-width: 0; }
  .meter-top span:first-child { overflow: hidden; text-overflow: ellipsis; }
}
.btn[aria-disabled="true"] { opacity: .45; cursor: not-allowed; box-shadow: none; transform: none; }
.tl-dot.below span { top: auto; bottom: -18px; }
.tl-row { margin-bottom: 4px; }
@media (max-width: 560px) {
  .take-card dl { grid-template-columns: 1fr; }
  .take-card dd { margin-bottom: 8px; }
}

/* Orientation */
.help-btn { min-height: 40px; padding: 6px 14px; border-radius: 999px; border: 2px solid var(--blue-ink); background: var(--white); color: var(--blue-ink); font-weight: 900; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.help-btn > span:first-child { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--blue-ink); color: #fff; font-size: 13px; }
.outcomes { padding-left: 22px; margin: 0 0 14px; color: var(--text-strong); }
.outcomes li { margin-bottom: 6px; }
.expect { list-style: none; padding: 0; margin: 14px 0 0; display: grid; gap: 12px; }
.expect li { display: flex; gap: 14px; align-items: flex-start; }
.expect .ico { flex: none; width: 44px; height: 44px; border-radius: 14px; background: var(--blue-wash); display: grid; place-items: center; }
.expect .ico img { width: 24px; height: 24px; }
.expect b { color: var(--text-strong); }
.expect p { margin: 2px 0 0; }
.sample { margin: 0; padding: 14px; border: 2px dashed var(--line); border-radius: 16px; text-align: center; font-weight: 700; }

.tour { position: fixed; inset: 0; z-index: 30; }
.tour-spot { position: fixed; border-radius: 22px; box-shadow: 0 0 0 9999px rgb(30 25 25 / .58); outline: 3px solid var(--highlight); transition: all .35s var(--ease); pointer-events: none; }
.tour-tip { position: fixed; width: min(360px, calc(100vw - 32px)); background: var(--white); border-radius: 20px; padding: 18px 20px; box-shadow: var(--shadow-lg); transition: top .35s var(--ease), left .35s var(--ease); }
.tour-tip h2 { margin: 4px 0 6px; font-size: 1.25rem; color: var(--blue); }
.tour-tip p { margin: 0; color: var(--text-strong); }
.tour-tip .row { margin-top: 14px; justify-content: flex-end; }
.tour-tip .btn { min-height: 42px; padding: 8px 16px; }
.tour-tip [data-a="skip"] { margin-right: auto; }

@media (max-width: 860px) {
  .help-btn .lbl { display: none; }
  .help-btn { padding: 6px 8px; }
  .tour-tip { left: 16px !important; right: 16px; bottom: 16px; top: auto !important; width: auto; }
}

/* ===== Realistic phone: status bar, chat app and mail app ===== */
.device { background: #FBFAFA; }
.statusbar { display: flex; justify-content: space-between; align-items: center; padding: 10px 22px 4px; font-size: 13px; font-weight: 800; color: var(--text-strong); background: var(--white); }
.sb-icons { display: inline-flex; gap: 6px; align-items: center; }
.sb-icons i { display: inline-block; }
.sig { width: 16px; height: 10px; background: linear-gradient(90deg, var(--text-strong) 0 20%, transparent 20% 27%, var(--text-strong) 27% 47%, transparent 47% 54%, var(--text-strong) 54% 74%, transparent 74% 81%, var(--text-strong) 81%); clip-path: polygon(0 100%, 100% 0, 100% 100%); }
.wifi { width: 14px; height: 10px; border-radius: 14px 14px 0 0; border: 3px solid var(--text-strong); border-bottom: 0; }
.batt { width: 22px; height: 11px; border: 2px solid var(--text-strong); border-radius: 3px; position: relative; }
.batt::after { content: ""; position: absolute; inset: 1px 5px 1px 1px; background: var(--text-strong); border-radius: 1px; }
.appbar { display: flex; align-items: center; gap: 12px; padding: 8px 16px 10px; background: var(--white); }
.ab-stack { display: flex; }
.ab-stack .avatar { width: 30px; height: 30px; margin-left: -10px; box-shadow: 0 0 0 2px var(--white); }
.ab-stack .avatar:first-child { margin-left: 0; }
.ab-text { display: grid; min-width: 0; }
.ab-text b { color: var(--text-strong); font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ab-text span { font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ab-text span.typing-now { color: var(--good); font-weight: 800; }
.device .tabs { background: var(--white); padding: 0 12px 10px; border-bottom: 1px solid var(--line); }
.device .tab { min-height: 38px; border-radius: 999px; }

.banner { position: absolute; z-index: 3; top: 104px; left: 12px; right: 12px; display: flex; gap: 10px; align-items: center; text-align: left;
  padding: 10px 12px; border: 0; border-radius: 16px; background: rgb(255 255 255 / .97); box-shadow: var(--shadow-lg); cursor: pointer; font-size: 14px; color: var(--text-strong); }
.banner.show { animation: drop .4s var(--ease) both; }
@keyframes drop { from { opacity: 0; transform: translateY(-14px); } }
.banner .avatar { width: 32px; height: 32px; }
.bn-text { display: grid; min-width: 0; }
.bn-text b { font-size: 13px; }

.day-divider { text-align: center; margin: 4px 0 14px; }
.day-divider span { font-size: 12px; font-weight: 800; color: var(--text); background: #F0ECEC; padding: 3px 12px; border-radius: 99px; }
.msg { margin-bottom: 4px; }
.msg + .msg:not(.cont) { margin-top: 10px; }
.msg.cont .avatar { visibility: hidden; }
.msg-body { position: relative; display: grid; justify-items: start; }
.msg.me .msg-body { justify-items: end; }
.bubble { background: var(--white); box-shadow: 0 1px 1px rgb(61 53 53 / .08); }
.msg.cont .bubble { border-top-left-radius: 6px; }
.msg.me.cont .bubble { border-top-right-radius: 6px; border-top-left-radius: 18px; }
.meta { display: flex; gap: 6px; font-size: 11px; color: var(--text); margin: 2px 6px 0; }
.receipt.seen { color: var(--blue-ink); font-weight: 800; }
.reaction { position: relative; margin: -10px 0 0 10px; display: inline-flex; align-items: center; padding: 2px 6px; border-radius: 99px; background: var(--white); box-shadow: var(--shadow-sm); animation: pop .35s var(--ease) both; }
.msg.me .reaction { margin: -10px 10px 0 0; }
.reaction img { width: 20px; height: 20px; }

.composer { background: #FBFAFA; border-top: 0; padding-bottom: 8px; }
.composer h2 { font-size: 12px; text-transform: none; color: var(--text); font-weight: 800; }
.reply { border-radius: 18px 18px 6px 18px; border-color: #D8E9F2; background: var(--white); margin-left: 24px; }
.reply:hover { border-color: var(--blue); background: var(--blue-wash); }
.inputbar { display: flex; align-items: center; gap: 10px; padding: 10px 14px 14px; background: var(--white); border-top: 1px solid var(--line); }
.ib-field { flex: 1; min-height: 40px; display: flex; align-items: center; padding: 8px 14px; border-radius: 999px; background: #F2EFEF; color: #9A8F8F; font-size: 14.5px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.inputbar.active .ib-field { color: var(--text-strong); background: #EAF5FB; }
.ib-send { flex: none; width: 38px; height: 38px; border-radius: 50%; background: #CFE3EE; position: relative; transition: background .15s, transform .15s var(--ease); }
.ib-send::after { content: ""; position: absolute; left: 13px; top: 11px; border: 8px solid transparent; border-left: 13px solid #fff; border-right: 0; }
.inputbar.active .ib-send { background: var(--blue-ink); }
.inputbar.sending .ib-send { transform: scale(.88); }

/* Mail app */
.empty-inbox { display: grid; place-items: center; text-align: center; gap: 4px; padding: 40px 16px; color: var(--text-strong); }
.hint-row { margin-bottom: 8px; }
.plan summary .pin { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--highlight); margin-right: 8px; }
.plan summary { justify-content: flex-start; align-items: center; }
.plan summary::after { margin-left: auto; }
.folders { display: flex; gap: 6px; margin: 0 0 10px; }
.folders span { flex: 1; text-align: center; font-size: 12.5px; font-weight: 800; color: var(--text-strong); background: #F2EFEF; border-radius: 12px; padding: 6px 4px; }
.folders b { display: block; font-size: 17px; color: var(--blue-ink); }
.mail-list { list-style: none; margin: 0; padding: 0; border-radius: 16px; overflow: hidden; border: 1px solid var(--line); background: var(--white); }
.mail-list li + li { border-top: 1px solid #EEEAEA; }
.mail-row { width: 100%; display: flex; gap: 12px; align-items: flex-start; text-align: left; padding: 12px 14px; border: 0; background: var(--white); cursor: pointer; position: relative; font: inherit; }
.mail-row:hover { background: var(--blue-wash); }
.mail-row.unread::before { content: ""; position: absolute; left: 4px; top: 22px; width: 7px; height: 7px; border-radius: 50%; background: var(--blue); }
.mail-av { flex: none; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 900; font-size: 13px; }
.mail-main { display: grid; min-width: 0; flex: 1; }
.mail-top { display: flex; justify-content: space-between; gap: 8px; }
.mail-top b { color: var(--text-strong); font-size: 14.5px; }
.mail-time { font-size: 12px; color: var(--text); }
.mail-row.unread .mail-time { color: var(--blue-ink); font-weight: 800; }
.mail-subj { font-size: 14.5px; color: var(--text-strong); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mail-row.unread .mail-subj { font-weight: 800; }
.mail-prev { font-size: 13px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mail-row.sorted { cursor: default; background: #FCFBFB; }
.mail-row.sorted .mail-prev { display: none; }
.mail-tag { font-size: 12.5px; font-weight: 700; }
.mail-row.ok .mail-tag { color: var(--good); }
.mail-row.fix .mail-tag { color: var(--bad); }
.folder-tag { display: inline-block; font-size: 11px; font-weight: 900; padding: 1px 8px; border-radius: 99px; margin: 4px 4px 0 0; color: #fff; }
.folder-tag.now { background: var(--blue-ink); }
.folder-tag.wait { background: var(--text); }
.mail-detail { animation: slideIn .35s var(--ease) both; }
.back-btn { min-height: 38px; padding: 4px 6px; margin-bottom: 6px; }
.back-btn::before { content: "\2039"; font-size: 22px; line-height: 1; margin-right: 4px; }
.mail-open { background: var(--white); border: 1px solid var(--line); border-radius: 18px; padding: 16px; }
.mail-open h3 { margin: 0 0 12px; font-size: 18px; color: var(--text-strong); line-height: 1.3; }
.mail-open h3:focus { outline: none; }
.mail-from { display: flex; gap: 10px; align-items: center; margin-bottom: 12px; }
.mail-from b { display: block; color: var(--text-strong); }
.mail-open p { color: var(--text-strong); }
.mail-open .acts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }

@media (max-width: 860px) {
  .banner { position: sticky; top: 92px; margin: 8px 12px 0; }
}

/* ===== Coach panel: caption plus hints and next steps, outside the phone ===== */
.side { position: absolute; left: 32px; bottom: 32px; z-index: 4; width: min(460px, calc(100vw - 560px)); display: grid; gap: 12px; }
.side .caption { position: static; max-width: none; }
.coach { background: var(--white); border-radius: 22px; padding: 16px 20px; box-shadow: var(--shadow-lg); display: grid; gap: 12px; animation: rise .45s var(--ease) both; }
.coach-hint:empty, .coach-act:empty { display: none; }
.coach .hint-btn { min-height: 40px; padding: 6px 14px; border-radius: 999px; border: 2px solid var(--blue); background: var(--blue-wash); color: var(--blue-ink); font-weight: 900; cursor: pointer; text-decoration: none; margin: 0; }
.hint-card { border-left: 5px solid var(--blue); background: var(--blue-wash); border-radius: 12px; padding: 10px 14px; }
.hint-card b { color: var(--blue-ink); font-size: 13px; }
.hint-card p { margin: 2px 0 0; color: var(--text-strong); }
.coach-text { margin: 0 0 10px; color: var(--text-strong); font-weight: 600; }
.coach-text:only-child { margin: 0; }
.coach-text.bad { color: var(--bad); }
.coach-go { width: 100%; }
.coach .sample { margin: 0; }

/* Wider phone so the conversation has room */
.device { width: min(480px, 42vw); }

/* Real send button and suggested phrases */
.ib-send { border: 0; cursor: default; padding: 0; }
.ib-send:not(:disabled) { cursor: pointer; background: var(--blue-ink); }
.ib-send:not(:disabled):hover { transform: scale(1.06); }
.compose-help { margin: -4px 0 8px; font-size: 13px; }
.composer .chips { display: flex; flex-wrap: wrap; gap: 6px; max-height: 190px; overflow-y: auto; }
.inputbar.active .ib-field { white-space: normal; line-height: 1.35; max-height: 92px; overflow-y: auto; }

/* Pocket guide nudge */
.guide-btn.pulse { animation: guidePulse 1.3s ease-in-out infinite; }
@keyframes guidePulse { 50% { box-shadow: 0 0 0 6px rgb(247 169 0 / .35); } }

@media (max-width: 1100px) and (min-width: 861px) {
  .side { width: calc(58vw - 64px); }
}
@media (max-width: 860px) {
  .device { width: auto; }
  .side { position: static; width: auto; display: block; }
  .side .caption { position: relative; margin: -56px 12px 0; }
  .coach { position: fixed; z-index: 15; left: 10px; right: 10px; bottom: 10px; padding: 12px 14px; border-radius: 18px; box-shadow: 0 -4px 30px rgb(61 53 53 / .22); max-height: 46vh; overflow-y: auto; }
  body.coach-on .device { padding-bottom: 150px; }
}
@media (max-width: 860px) { .side .caption { left: auto; right: auto; bottom: auto; } }
/* Keep the conversation visible: the reply area never takes more than about 45% of the phone */
.composer { max-height: 45%; overflow-y: auto; flex: none; }
.composer:empty { padding: 0; }
@media (max-width: 860px) {
  .composer { max-height: none; }
  body.coach-on .device { padding-bottom: var(--coach-h, 150px); }
  .inputbar { scroll-margin-bottom: var(--coach-h, 0px); }
}

/* ===== Pointing hand ===== */
.pointer { position: fixed; left: 0; top: 0; z-index: 40; pointer-events: none; will-change: transform; }
.pointer .hand { display: block; filter: drop-shadow(0 6px 10px rgb(61 53 53 / .35)); transform-origin: 14px 3px; }
.pointer.travel { transition: transform 1.1s cubic-bezier(.45, .05, .25, 1); }
.pointer.arrived:not(.still) .hand { animation: tap 1.3s ease-in-out infinite; }
@keyframes tap { 0%, 100% { transform: translate(0, 0) scale(1); } 45% { transform: translate(-2px, -6px) scale(1.04); } 60% { transform: translate(0, 1px) scale(.94); } }
.pointer .ripple { position: absolute; left: 14px; top: 3px; width: 0; height: 0; }
.pointer.arrived:not(.still) .ripple::before { content: ""; position: absolute; left: -22px; top: -22px; width: 44px; height: 44px; border-radius: 50%;
  border: 3px solid var(--highlight); animation: ripple 1.3s ease-out infinite; animation-delay: .55s; opacity: 0; }
@keyframes ripple { 0% { transform: scale(.3); opacity: .95; } 100% { transform: scale(1.5); opacity: 0; } }
.pointer-label { position: absolute; left: 44px; top: 48px; white-space: nowrap; background: var(--on-highlight); color: #fff; font-weight: 900; font-size: 15px;
  padding: 7px 14px; border-radius: 999px; box-shadow: var(--shadow-sm); opacity: 0; transition: opacity .3s; }
.pointer.arrived .pointer-label { opacity: 1; }
.pointer.label-left .pointer-label { left: auto; right: 34px; }
@media (prefers-reduced-motion: reduce) { .pointer .hand, .pointer .ripple::before { animation: none !important; } }
.coach-note:empty { display: none; }
.coach .why { margin: 0; animation: rise .35s var(--ease) both; }
.pointer.label-up .pointer-label { top: calc(var(--lift, 44px) * -1); }
.reaction { margin: -8px 0 2px 10px; }
.msg.me .reaction { margin: -8px 10px 2px 0; }

/* ===== Opening film ===== */
.intro { position: fixed; inset: 0; z-index: 60; background: radial-gradient(120% 90% at 50% 40%, #FFFFFF 0%, #EAF4FA 60%, #DCEDF7 100%); color: var(--text-strong);
  transition: opacity 1.2s var(--ease), transform 1.3s var(--ease), filter 1.2s var(--ease); }
.intro.leaving { opacity: 0; transform: scale(1.04); filter: blur(8px); pointer-events: none; }
.intro-splash { position: absolute; inset: 0; display: grid; place-content: center; justify-items: start; padding: 32px; max-width: 760px; margin: 0 auto; animation: rise .8s var(--ease) both; }
.intro-rule { width: 56px; height: 5px; border-radius: 3px; background: var(--highlight); margin-bottom: 18px; }
.intro-splash h1 { margin: 0; font-size: clamp(2.4rem, 7vw, 4.6rem); line-height: 1.02; letter-spacing: -.03em; color: #0B3A52; font-weight: 900; }
.intro-strap { margin: 12px 0 28px; font-size: clamp(1.05rem, 2.2vw, 1.4rem); font-weight: 700; color: var(--blue-ink); }
.intro-play { display: inline-flex; align-items: center; gap: 14px; min-height: 64px; padding: 10px 28px 10px 12px; border: 0; border-radius: 999px; background: var(--blue-ink); color: #fff;
  font: inherit; font-size: 1.2rem; font-weight: 900; cursor: pointer; box-shadow: 0 14px 34px rgb(0 119 171 / .32); transition: transform .2s var(--ease); }
.intro-play:hover { transform: translateY(-2px) scale(1.02); }
.intro-play .tri { width: 46px; height: 46px; border-radius: 50%; background: #fff; position: relative; }
.intro-play .tri::after { content: ""; position: absolute; left: 18px; top: 13px; border: 10px solid transparent; border-left: 15px solid var(--blue-ink); border-right: 0; }
.intro-meta { margin: 16px 0 6px; font-size: 14px; font-weight: 600; }
.intro-link { border: 0; background: none; padding: 8px 0; color: var(--blue-ink); font: inherit; font-weight: 800; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }

.intro-film { position: absolute; inset: 0; }
.intro-film video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: transparent; }
.intro-film video::cue { font-family: var(--font); font-size: clamp(16px, 2.2vw, 26px); background: rgb(11 58 82 / .82); color: #fff; }
.intro-skip { position: absolute; top: 18px; right: 18px; min-height: 44px; padding: 8px 18px; border-radius: 999px; border: 2px solid rgb(11 58 82 / .25);
  background: rgb(255 255 255 / .85); color: #0B3A52; font: inherit; font-weight: 900; cursor: pointer; backdrop-filter: blur(6px); transition: opacity .4s; }
.intro-bar { position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%); width: min(720px, calc(100% - 24px)); display: flex; align-items: center; gap: 8px;
  padding: 8px 10px; border-radius: 999px; background: rgb(255 255 255 / .88); box-shadow: var(--shadow-lg); backdrop-filter: blur(8px); transition: opacity .4s; }
.intro-film.idle .intro-bar, .intro-film.idle .intro-skip { opacity: 0; }
.intro-film.idle { cursor: none; }
.ib-btn { flex: none; min-width: 44px; min-height: 44px; border-radius: 999px; border: 0; background: transparent; color: #0B3A52; cursor: pointer; display: grid; place-items: center; font: inherit; font-weight: 800; font-size: 14px; }
.ib-btn:hover { background: var(--blue-wash); }
.ib-btn.text { padding: 0 12px; }
.ib-btn[aria-pressed="true"].text, .ib-btn[aria-expanded="true"] { background: var(--blue-wash); color: var(--blue-ink); }
.intro-progress { flex: 1; height: 6px; border-radius: 6px; background: rgb(11 58 82 / .12); overflow: hidden; }
.intro-progress > div { height: 100%; width: 0; background: var(--blue); border-radius: inherit; }
.ico-pause { width: 14px; height: 16px; border-left: 5px solid currentColor; border-right: 5px solid currentColor; }
.ico-play { width: 0; height: 0; border: 9px solid transparent; border-left: 14px solid currentColor; border-right: 0; margin-left: 4px; }
.ico-replay { width: 16px; height: 16px; border: 3px solid currentColor; border-radius: 50%; border-top-color: transparent; transform: rotate(45deg); }
.ico-sound, .ico-muted { width: 18px; height: 14px; position: relative; }
.ico-sound::before, .ico-muted::before { content: ""; position: absolute; left: 0; top: 2px; width: 10px; height: 10px; background: currentColor; clip-path: polygon(0 30%, 40% 30%, 100% 0, 100% 100%, 40% 70%, 0 70%); }
.ico-sound::after { content: ""; position: absolute; right: 0; top: 1px; width: 6px; height: 12px; border: 2px solid currentColor; border-left: 0; border-radius: 0 8px 8px 0; }
.ico-muted::after { content: ""; position: absolute; right: 0; top: 6px; width: 8px; height: 2px; background: currentColor; transform: rotate(45deg); box-shadow: 0 0 0 0 currentColor; }
.intro-script { position: absolute; right: 18px; bottom: 90px; width: min(440px, calc(100% - 36px)); max-height: 60vh; overflow-y: auto; padding: 16px 20px; border-radius: 20px;
  background: rgb(255 255 255 / .96); box-shadow: var(--shadow-lg); }
.intro-script h2 { margin: 0 0 8px; font-size: 1.05rem; color: var(--blue-ink); }
.intro-script ol { margin: 0; padding-left: 20px; }
.intro-script li { margin-bottom: 8px; }
.rewatch { margin-top: 8px; padding-left: 0; color: var(--blue-ink); text-decoration: underline; text-underline-offset: 3px; }

@media (max-width: 860px) {
  .intro-splash { padding: 24px; }
  .intro-bar { bottom: 12px; gap: 2px; }
  .ib-btn.text { padding: 0 8px; font-size: 13px; }
  .intro-script { bottom: 80px; right: 12px; }
}
@media (prefers-reduced-motion: reduce) { .intro.leaving { transform: none; filter: none; } }
.intro-turn { display: none; }
@media (max-width: 860px) and (orientation: portrait) {
  .intro-turn { display: block; position: absolute; left: 50%; top: calc(50% + 31vw + 18px); transform: translateX(-50%); white-space: nowrap;
    font-size: 13px; font-weight: 800; color: #0B3A52; background: rgb(255 255 255 / .85); padding: 6px 14px; border-radius: 999px; transition: opacity .4s; }
  .intro-film.idle .intro-turn { opacity: 0; }
}
.rewatch { margin-top: 12px; padding-left: 10px; text-decoration: none; display: inline-flex; gap: 10px; }
.rewatch .tri { width: 26px; height: 26px; border-radius: 50%; background: var(--blue-ink); position: relative; flex: none; }
.rewatch .tri::after { content: ""; position: absolute; left: 10px; top: 7px; border: 6px solid transparent; border-left: 9px solid #fff; border-right: 0; }

/* ===== Meters that explain themselves ===== */
button.meter { display: block; border: 0; background: transparent; padding: 4px 6px; margin: -4px -6px; border-radius: 10px; font: inherit; color: inherit; text-align: left; cursor: pointer; }
button.meter:hover, button.meter[aria-expanded="true"] { background: var(--blue-wash); }
.meter-top { display: flex; }
.meter-track, .meter-fill { display: block; }
.meter-top > span:first-child::after { content: " \24D8"; font-weight: 700; color: var(--blue-ink); opacity: .7; }
.result-meters .meter-top > span:first-child::after { content: none; }
.meter-pop { position: fixed; z-index: 35; width: min(340px, calc(100vw - 24px)); background: var(--white); border-radius: 18px; padding: 14px 16px; box-shadow: var(--shadow-lg); border-top: 4px solid var(--blue); animation: rise .25s var(--ease) both; }
.meter-pop b { color: var(--blue-ink); font-size: 16px; }
.meter-pop p { margin: 6px 0 0; color: var(--text-strong); font-size: 14.5px; }
.mp-row span { display: inline-block; min-width: 46px; margin-right: 6px; font-size: 12px; font-weight: 900; padding: 1px 8px; border-radius: 99px; color: #fff; text-align: center; }
.mp-row.high span { background: var(--good); }
.mp-row.low span { background: var(--bad); }
.mp-now { padding-top: 8px; border-top: 1px solid var(--line); font-size: 13.5px !important; }

.meter-why { background: #F8F6F6; border-radius: 14px; padding: 10px 12px; animation: rise .3s var(--ease) both; }
.mw-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.mw { font-size: 13px; font-weight: 900; padding: 3px 10px; border-radius: 99px; }
.mw.up { background: var(--good-wash); color: var(--good); }
.mw.down { background: var(--bad-wash); color: var(--bad); }
.meter-why p { margin: 6px 0 0; font-size: 14px; color: var(--text-strong); }
.coach-meters:empty { display: none; }
