/* LifeSphere partner briefing — "Modern Robot" theme: deep navy, electric blue, cyan. Fonts bundled (Kanit, Sarabun; OFL). */
@font-face { font-family: Kanit; src: url(assets/fonts/Kanit_300Light.ttf); font-weight: 300; }
@font-face { font-family: Kanit; src: url(assets/fonts/Kanit_400Regular.ttf); font-weight: 400; }
@font-face { font-family: Kanit; src: url(assets/fonts/Kanit_500Medium.ttf); font-weight: 500; }
@font-face { font-family: Kanit; src: url(assets/fonts/Kanit_600SemiBold.ttf); font-weight: 600; }
@font-face { font-family: Kanit; src: url(assets/fonts/Kanit_700Bold.ttf); font-weight: 700; }
@font-face { font-family: Sarabun; src: url(assets/fonts/Sarabun_400Regular.ttf); font-weight: 400; }
@font-face { font-family: Sarabun; src: url(assets/fonts/Sarabun_600SemiBold.ttf); font-weight: 600; }

:root {
  --bg: #030816;
  --bg-2: #071229;
  --panel: rgba(8, 22, 48, 0.62);
  --panel-solid: #0a1a38;
  --line: rgba(64, 196, 255, 0.28);
  --line-strong: rgba(64, 214, 255, 0.7);
  --blue: #2f7bff;
  --blue-deep: #1747c9;
  --cyan: #22e1ff;
  --ice: #d6f6ff;
  --text: #eaf4ff;
  --muted: #9db4d3;
  --pain: #ff6b7d;
  --ok: #3ee6a8;
  --warn: #ffc857;
  --glow: 0 0 18px rgba(34, 225, 255, 0.45), 0 0 2px rgba(34, 225, 255, 0.9);
  --radius: 18px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: radial-gradient(1200px 700px at 75% 20%, #0b2a5e 0%, transparent 60%), radial-gradient(900px 600px at 10% 90%, #08204a 0%, transparent 55%), var(--bg);
  color: var(--text);
  font-family: Kanit, Sarabun, system-ui, sans-serif;
  font-weight: 300;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }

/* ---------- ambient layers ---------- */
#bg-canvas { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; }
.hud-grid {
  position: fixed; inset: 0; z-index: 0; pointer-events: none; opacity: .35;
  background-image: linear-gradient(rgba(47, 123, 255, .08) 1px, transparent 1px), linear-gradient(90deg, rgba(47, 123, 255, .08) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse at center, #000 30%, transparent 80%);
}
.scanline {
  position: fixed; left: 0; right: 0; height: 120px; z-index: 1; pointer-events: none;
  background: linear-gradient(transparent, rgba(34, 225, 255, .05), transparent);
  animation: scan 7s linear infinite;
}
@keyframes scan { from { top: -120px; } to { top: 100%; } }

/* ---------- top bar ---------- */
.topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 20; height: 64px;
  display: flex; align-items: center; gap: 16px; padding: 0 24px;
  background: linear-gradient(rgba(3, 8, 22, .85), rgba(3, 8, 22, 0));
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 500; font-size: 20px; letter-spacing: .5px; }
.brand b { color: var(--cyan); font-weight: 600; }
.brand-orb { width: 22px; height: 22px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #fff, var(--cyan) 35%, var(--blue-deep) 75%); box-shadow: var(--glow); animation: pulse 2.6s ease-in-out infinite; }
.brand-tag { font-size: 11px; letter-spacing: 3px; text-transform: uppercase; color: var(--muted); border: 1px solid var(--line); padding: 3px 8px; border-radius: 99px; }
.scene-counter { margin-left: auto; font-size: 13px; letter-spacing: 2px; color: var(--muted); font-variant-numeric: tabular-nums; }
.top-actions { display: flex; gap: 8px; }
@keyframes pulse { 50% { transform: scale(1.12); filter: brightness(1.3); } }

.icon-btn, .chip-btn, .play-btn {
  background: rgba(10, 28, 60, .7); border: 1px solid var(--line); border-radius: 12px;
  min-width: 40px; height: 40px; padding: 0 12px; display: inline-flex; align-items: center; justify-content: center; gap: 4px;
  transition: border-color .2s, box-shadow .2s, background .2s;
}
.icon-btn:hover, .chip-btn:hover, .play-btn:hover { border-color: var(--line-strong); box-shadow: var(--glow); }
.chip-btn { font-size: 13px; font-weight: 500; letter-spacing: 1px; white-space: nowrap; }
.chip-btn[aria-pressed="false"] { opacity: .5; }
.play-btn { width: 54px; height: 54px; border-radius: 50%; font-size: 18px; background: linear-gradient(135deg, var(--blue), var(--cyan)); color: #001024; border: none; box-shadow: 0 0 24px rgba(34, 225, 255, .55); }

/* ---------- stage ---------- */
.stage { position: fixed; inset: 0; z-index: 5; }
.scene { position: absolute; inset: 0; opacity: 0; visibility: hidden; transition: opacity .7s var(--ease), visibility .7s; }
.scene.active { opacity: 1; visibility: visible; }
.scene-bg { position: absolute; inset: 0; background-size: cover; background-position: center right; transform: scale(1.08); transition: transform 14s linear; }
.scene.active .scene-bg { transform: scale(1); }
.scene-bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(3, 8, 22, .96) 0%, rgba(3, 8, 22, .82) 34%, rgba(3, 8, 22, .25) 70%, rgba(3, 8, 22, .55) 100%), linear-gradient(0deg, rgba(3, 8, 22, .9) 0%, transparent 30%); }
.scene-inner { position: relative; height: 100%; padding: 92px 56px 150px; display: flex; flex-direction: column; justify-content: center; max-width: 1500px; margin: 0 auto; }

.kicker { font-size: 13px; font-weight: 500; letter-spacing: 4px; text-transform: uppercase; color: var(--cyan); display: flex; align-items: center; gap: 12px; }
.kicker::before { content: ""; width: 34px; height: 2px; background: var(--cyan); box-shadow: var(--glow); }
.title { font-size: clamp(28px, 3.6vw, 56px); line-height: 1.18; font-weight: 600; margin: 14px 0 12px; max-width: 1120px; }
:lang(th) .kicker, :lang(th) .real-badge { letter-spacing: 1.5px; }
.scene.dim-bg .scene-bg { opacity: .35; filter: blur(3px) saturate(.8); }
.screens-inner { padding-top: 84px; padding-bottom: 120px; }
.screens-inner .sub { margin-bottom: 10px; }
.screens-inner .title { margin: 8px 0 6px; }
.title em { font-style: normal; background: linear-gradient(90deg, var(--cyan), #7fb2ff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.sub { font-family: Sarabun, Kanit, sans-serif; font-size: clamp(15px, 1.35vw, 20px); color: var(--muted); max-width: 760px; margin: 0 0 26px; line-height: 1.55; }

/* reveal animation: [data-cue] items appear when their cue fires */
[data-cue] { opacity: 0; transform: translateY(18px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
[data-cue].in { opacity: 1; transform: none; }
.scene.active .kicker, .scene.active .title, .scene.active .sub { animation: rise .9s var(--ease) both; }
.scene.active .title { animation-delay: .12s; }
.scene.active .sub { animation-delay: .24s; }
@keyframes rise { from { opacity: 0; transform: translateY(24px); filter: blur(4px); } to { opacity: 1; transform: none; filter: none; } }

.glass { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); position: relative; }
.glass::before { content: ""; position: absolute; inset: -1px; border-radius: inherit; padding: 1px; background: linear-gradient(135deg, var(--line-strong), transparent 40%, transparent 60%, rgba(47, 123, 255, .5)); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; pointer-events: none; }

/* ---------- hero ---------- */
.hero .title { font-size: clamp(34px, 5vw, 76px); }
.hero-stats { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 8px; }
.hero-stat { padding: 12px 18px; font-size: 15px; }
.hero-stat b { display: block; color: var(--cyan); font-weight: 600; font-size: 13px; letter-spacing: 2px; }
.start-btn { margin-top: 30px; align-self: flex-start; display: inline-flex; align-items: center; gap: 12px; padding: 14px 26px; border-radius: 99px; border: none; font-size: 18px; font-weight: 500; color: #001024; background: linear-gradient(135deg, var(--blue), var(--cyan)); box-shadow: 0 0 32px rgba(34, 225, 255, .5); animation: breathe 2.4s ease-in-out infinite; }
@keyframes breathe { 50% { box-shadow: 0 0 52px rgba(34, 225, 255, .8); } }

/* ---------- persona / pain ---------- */
.pains { display: grid; grid-template-columns: repeat(2, minmax(0, 420px)); gap: 14px; }
.pain { padding: 16px 18px 16px 56px; font-family: Sarabun, Kanit, sans-serif; font-size: 16px; line-height: 1.5; }
.pain::after { content: "!"; position: absolute; left: 16px; top: 16px; width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; font-weight: 700; color: var(--pain); border: 1px solid rgba(255, 107, 125, .6); background: rgba(255, 107, 125, .1); font-family: Kanit; }
.pain.in { animation: glitch .5s steps(2) 1; }
@keyframes glitch { 0% { clip-path: inset(0 0 60% 0); transform: translateX(-6px); } 50% { clip-path: inset(40% 0 0 0); transform: translateX(6px); } 100% { clip-path: none; transform: none; } }
.persona-tag { position: absolute; right: 56px; bottom: 150px; padding: 10px 16px; font-size: 13px; letter-spacing: 2px; color: var(--muted); }
.persona-tag b { color: var(--pain); }

/* ---------- context graph ---------- */
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 36px; align-items: center; }
.cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.card { padding: 16px 18px; }
.card h4 { margin: 0 0 6px; font-weight: 600; font-size: 17px; color: var(--cyan); }
.card p { margin: 0; font-family: Sarabun, Kanit, sans-serif; font-size: 15px; color: var(--muted); line-height: 1.5; }
.graph-wrap { aspect-ratio: 1.25; position: relative; }
.graph-wrap svg { width: 100%; height: 100%; overflow: visible; }
.g-edge { stroke: rgba(34, 225, 255, .35); stroke-width: 1.6; fill: none; stroke-dasharray: 6 6; animation: dash 1.6s linear infinite; }
.g-edge.hot { stroke: var(--cyan); stroke-width: 2.6; filter: drop-shadow(0 0 6px var(--cyan)); }
@keyframes dash { to { stroke-dashoffset: -24; } }
.g-node { cursor: pointer; }
.g-node circle.core { fill: #0b2147; stroke: var(--cyan); stroke-width: 2; transition: r .3s; }
.g-node circle.halo { fill: none; stroke: var(--cyan); opacity: .35; animation: halo 2.4s ease-out infinite; transform-box: fill-box; transform-origin: center; }
.g-node text { fill: var(--text); font-size: 13px; text-anchor: middle; font-family: Kanit; pointer-events: none; }
.g-node .ico { font-size: 22px; }
.g-node:hover circle.core, .g-node.sel circle.core { fill: #134a9c; stroke-width: 3; }
@keyframes halo { from { transform: scale(1); opacity: .5; } to { transform: scale(1.9); opacity: 0; } }
.packet { fill: var(--ice); filter: drop-shadow(0 0 6px var(--cyan)); }
.graph-info { position: absolute; left: 0; right: 0; bottom: -34px; margin: auto; width: fit-content; max-width: 92%; padding: 10px 16px; font-family: Sarabun, Kanit; font-size: 15px; text-align: center; }

/* ---------- AI loop ---------- */
.loop-wrap { position: relative; aspect-ratio: 1; width: min(100%, 60vh); margin: auto; }
.loop-ring { position: absolute; inset: 12%; border-radius: 50%; border: 1px dashed var(--line-strong); animation: spin 40s linear infinite; }
.loop-ring::after { content: ""; position: absolute; top: -6px; left: 50%; width: 12px; height: 12px; border-radius: 50%; background: var(--cyan); box-shadow: var(--glow); }
@keyframes spin { to { transform: rotate(360deg); } }
.loop-core { position: absolute; inset: 36%; border-radius: 50%; display: grid; place-items: center; text-align: center; font-weight: 600; font-size: clamp(14px, 1.3vw, 19px); background: radial-gradient(circle, rgba(47, 123, 255, .45), rgba(3, 8, 22, .2) 70%); border: 1px solid var(--line-strong); box-shadow: inset 0 0 40px rgba(34, 225, 255, .25); }
.loop-step { position: absolute; width: 30%; transform: translate(-50%, -50%); padding: 10px 12px; text-align: center; }
.loop-step h4 { margin: 0; font-size: 16px; font-weight: 600; color: var(--cyan); }
.loop-step p { margin: 4px 0 0; font-family: Sarabun, Kanit; font-size: 13px; color: var(--muted); line-height: 1.4; }
.loop-step.now { border-color: var(--cyan); box-shadow: var(--glow); }
.loop-step.decide h4 { color: var(--ok); }

/* ---------- real screens ---------- */
.phones { display: flex; gap: clamp(14px, 2.4vw, 40px); justify-content: center; align-items: flex-end; perspective: 1400px; }
.phone { width: min(15vw, 240px, calc((100vh - 440px) * 0.44)); border-radius: 30px; padding: 9px; background: linear-gradient(160deg, #1d2f55, #070e1f); border: 1px solid var(--line-strong); box-shadow: 0 30px 60px rgba(0, 0, 0, .55), 0 0 30px rgba(34, 225, 255, .15); cursor: zoom-in; transition: transform .6s var(--ease), box-shadow .6s; transform: rotateY(var(--ry, 0deg)) translateY(var(--ty, 0)); }
.phone img { display: block; width: 100%; border-radius: 22px; aspect-ratio: 390 / 844; object-fit: cover; object-position: top; }
.phone figcaption { margin-top: 10px; text-align: center; font-family: Sarabun, Kanit; font-size: 13px; color: var(--muted); line-height: 1.4; min-height: 2.8em; }
.phone.now { --ty: -14px; box-shadow: 0 40px 70px rgba(0, 0, 0, .6), 0 0 44px rgba(34, 225, 255, .55); border-color: var(--cyan); }
.phone.now figcaption { color: var(--ice); }
.real-badge { display: inline-flex; gap: 8px; align-items: center; font-size: 12px; letter-spacing: 2px; color: var(--ok); border: 1px solid rgba(62, 230, 168, .5); padding: 4px 10px; border-radius: 99px; margin-bottom: 18px; align-self: flex-start; }
.real-badge::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 8px var(--ok); animation: pulse 1.6s infinite; }

/* ---------- data flow ---------- */
.flow { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; position: relative; margin-top: 6px; }
.flow-line { position: absolute; left: 4%; right: 4%; top: 46px; height: 2px; background: linear-gradient(90deg, var(--blue), var(--cyan)); opacity: .55; }
.flow-dot { position: absolute; top: 41px; width: 12px; height: 12px; border-radius: 50%; background: var(--ice); box-shadow: var(--glow); animation: travel 3.2s linear infinite; }
@keyframes travel { from { left: 3%; opacity: 0; } 8% { opacity: 1; } 92% { opacity: 1; } to { left: 96%; opacity: 0; } }
.stage-card { padding: 16px 14px 16px; cursor: pointer; text-align: left; transition: border-color .3s, box-shadow .3s, transform .3s; }
.stage-card .num { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; font-weight: 600; background: linear-gradient(135deg, var(--blue-deep), var(--blue)); border: 1px solid var(--line-strong); margin-bottom: 30px; position: relative; z-index: 1; }
.stage-card h4 { margin: 0 0 4px; font-size: 16px; font-weight: 600; }
.stage-card p { margin: 0; font-family: Sarabun, Kanit; font-size: 13px; color: var(--muted); line-height: 1.4; }
.stage-card.now, .stage-card:hover { border-color: var(--cyan); box-shadow: var(--glow); transform: translateY(-4px); }
.flow-detail { margin-top: 18px; padding: 16px 20px; font-family: Sarabun, Kanit; font-size: 17px; min-height: 64px; display: flex; gap: 14px; align-items: center; }
.flow-detail b { color: var(--cyan); font-family: Kanit; font-weight: 600; white-space: nowrap; }
.legend { display: flex; gap: 18px; font-size: 13px; color: var(--muted); margin-top: 14px; flex-wrap: wrap; }
.st-now { color: var(--ok); } .st-contract { color: var(--warn); } .st-roadmap { color: #8fa3c4; }

/* ---------- contract ---------- */
.contract { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 26px; align-items: start; }
.dev-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.dev-tab { padding: 8px 14px; border-radius: 99px; border: 1px solid var(--line); background: rgba(10, 28, 60, .6); font-size: 14px; }
.dev-tab[aria-selected="true"] { border-color: var(--cyan); box-shadow: var(--glow); background: rgba(34, 225, 255, .12); }
.metrics { padding: 18px; min-height: 270px; }
.metric-row { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px dashed rgba(64, 196, 255, .18); font-family: ui-monospace, Consolas, monospace; font-size: 14px; animation: rise .5s var(--ease) both; }
.metric-row span:last-child { color: var(--cyan); }
.metric-note { margin-top: 12px; font-family: Sarabun, Kanit; font-size: 14px; color: var(--muted); line-height: 1.5; }
.status-pill { display: inline-block; font-size: 12px; letter-spacing: 1px; padding: 3px 10px; border-radius: 99px; border: 1px solid currentColor; margin-bottom: 10px; }
pre.payload { margin: 0; padding: 18px; font-size: 13px; line-height: 1.55; color: var(--ice); white-space: pre-wrap; font-family: ui-monospace, Consolas, monospace; min-height: 290px; }
pre.payload .caret { display: inline-block; width: 8px; height: 15px; background: var(--cyan); vertical-align: -2px; animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.rules { list-style: none; padding: 0; margin: 14px 0 0; display: grid; gap: 8px; }
.rules li { font-family: Sarabun, Kanit; font-size: 14px; padding-left: 22px; position: relative; color: var(--muted); }
.rules li::before { content: "▸"; position: absolute; left: 4px; color: var(--cyan); }

/* ---------- trust ---------- */
.hex-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; max-width: 1000px; }
.hex { padding: 18px 18px 18px 64px; }
.hex::after { content: "🛡"; position: absolute; left: 18px; top: 18px; width: 32px; height: 32px; display: grid; place-items: center; border-radius: 10px; background: rgba(47, 123, 255, .2); border: 1px solid var(--line-strong); font-size: 16px; }
.hex h4 { margin: 0 0 6px; font-size: 16px; font-weight: 600; color: var(--ice); }
.hex p { margin: 0; font-family: Sarabun, Kanit; font-size: 14px; color: var(--muted); line-height: 1.45; }

/* ---------- partner ---------- */
.values { list-style: none; padding: 0; margin: 0 0 26px; display: grid; grid-template-columns: repeat(2, minmax(0, 470px)); gap: 12px; }
.values li { padding: 14px 16px 14px 50px; font-family: Sarabun, Kanit; font-size: 16px; line-height: 1.45; }
.values li::after { content: "✓"; position: absolute; left: 16px; top: 13px; color: var(--ok); font-weight: 700; font-family: Kanit; font-size: 18px; }
.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; max-width: 1000px; position: relative; }
.step { padding: 16px; display: flex; gap: 12px; align-items: center; font-family: Sarabun, Kanit; font-size: 15px; line-height: 1.4; }
.step b { flex: none; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font-family: Kanit; font-weight: 600; color: #001024; background: linear-gradient(135deg, var(--blue), var(--cyan)); box-shadow: var(--glow); }
.thanks { margin-top: 26px; font-size: clamp(22px, 2.4vw, 34px); font-weight: 600; letter-spacing: 1px; }
.thanks span { color: var(--cyan); }

/* ---------- subtitle, controls, notes ---------- */
.subtitle {
  position: fixed; left: 50%; bottom: 96px; transform: translateX(-50%); z-index: 15; max-width: min(1100px, 92vw);
  text-align: center; font-family: Sarabun, Kanit; font-size: clamp(16px, 1.4vw, 21px); line-height: 1.5; font-weight: 400;
  padding: 8px 18px; border-radius: 12px; background: rgba(2, 6, 18, .78); border: 1px solid rgba(64, 196, 255, .2);
  opacity: 0; transition: opacity .3s;
}
.subtitle.on { opacity: 1; }
.controls {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; height: 84px; display: flex; align-items: center; gap: 12px; padding: 0 24px;
  background: linear-gradient(rgba(3, 8, 22, 0), rgba(3, 8, 22, .92) 45%);
}
.timeline { flex: 1; display: flex; gap: 4px; align-items: center; height: 40px; }
.tl-seg { flex: 1; height: 6px; border-radius: 4px; background: rgba(64, 196, 255, .18); position: relative; overflow: hidden; border: none; padding: 0; transition: height .2s; }
.tl-seg:hover { height: 10px; }
.tl-seg i { position: absolute; inset: 0; width: 0; background: linear-gradient(90deg, var(--blue), var(--cyan)); box-shadow: var(--glow); }
.tl-seg.done i { width: 100%; }
.time { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; min-width: 92px; text-align: right; }
.notes { position: fixed; top: 72px; right: 16px; bottom: 96px; width: min(440px, 92vw); z-index: 30; display: flex; flex-direction: column; background: rgba(5, 14, 32, .95); border: 1px solid var(--line-strong); border-radius: var(--radius); box-shadow: 0 20px 60px rgba(0, 0, 0, .6); }
.notes[hidden] { display: none; }
.notes-head { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.notes-body { overflow: auto; padding: 8px 16px 16px; font-family: Sarabun, Kanit; font-size: 15px; line-height: 1.6; }
.notes-body section { padding: 10px 0; border-bottom: 1px dashed var(--line); cursor: pointer; }
.notes-body section.now { color: var(--ice); }
.notes-body section.now h5 { color: var(--cyan); }
.notes-body h5 { margin: 0 0 4px; font-family: Kanit; font-weight: 500; font-size: 13px; letter-spacing: 1px; color: var(--muted); }
.notes-body p { margin: 0; color: var(--muted); }
.notes-body section.now p { color: var(--text); }
.lightbox { position: fixed; inset: 0; z-index: 40; background: rgba(1, 4, 12, .9); display: grid; place-items: center; align-content: center; gap: 12px; cursor: zoom-out; }
.lightbox[hidden] { display: none; }
.lightbox img { max-height: 84vh; max-width: 92vw; border-radius: 24px; border: 1px solid var(--line-strong); box-shadow: var(--glow); }
.lightbox p { margin: 0; color: var(--muted); font-family: Sarabun, Kanit; }
.credits { position: fixed; right: 24px; bottom: 84px; z-index: 16; margin: 0; font-size: 11px; color: rgba(157, 180, 211, .6); max-width: 60vw; text-align: right; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  body { overflow: auto; }
  .scene-inner { padding: 80px 16px 170px; justify-content: flex-start; overflow-y: auto; }
  .pains, .cards, .values, .hex-grid, .steps, .split, .contract { grid-template-columns: minmax(0, 1fr); }
  .flow { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .flow-line, .flow-dot { display: none; }
  .phones { flex-wrap: wrap; }
  .phone { width: 42vw; }
  .brand-tag, .scene-counter, .credits, .time { display: none; }
  .topbar, .controls { padding: 0 12px; }
  .persona-tag { display: none; }
  .subtitle { bottom: 92px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  [data-cue] { opacity: 1; transform: none; }
}
