/* =========================================================================
   beside LP — styles (visual-first revision)
   Aesthetic: product-native operations console meets professional editorial.
   White paper base · near-black ink · confident blue accent (logo dot #3478FF)
   · semantic red (alert / 要注意) → green (improvement / 改善傾向).
   Mobile-first. Every section is led by a "screen fragment" visual.
   ========================================================================= */

:root {
  /* ink / paper */
  --ink: #0b0f14;
  --ink-1: #232c38;
  --ink-2: #566172;
  --ink-3: #8a94a3;
  --paper: #ffffff;
  --surface: #f5f8fc;
  --surface-2: #eef2f8;
  --line: rgba(16, 26, 43, 0.09);
  --line-strong: rgba(16, 26, 43, 0.16);

  /* brand — unified to product blue (#2563eb) */
  --blue: #2563eb;
  --blue-ink: #1d4ed8;   /* AA on white for text/links */
  --blue-50: #eff4ff;
  --blue-100: #dbe6fe;

  /* semantic — matched to the room-view state palette
     (ok #10b981 / caution #f59e0b / warn #ef4444) */
  --alert: #ef4444;
  --alert-ink: #c62828;  /* darker for AA text on white */
  --alert-bg: #fbecec;
  --caution: #f59e0b;
  --caution-ink: #b45309; /* AA text on white */
  --caution-bg: #fbf3e3;
  --good: #10b981;
  --good-ink: #047857;   /* darker for AA text on white */
  --good-bg: #e7f7f0;

  /* room-view state tokens (identical to RoomScene.css) */
  --state-ok: #10b981;
  --state-caution: #f59e0b;
  --state-warn: #ef4444;
  --floor-neutral: #eef2f6;
  --floor-ok: #e7f7f0;
  --floor-caution: #fbf3e3;
  --floor-warn: #fbecec;
  --ring-own: rgba(37, 99, 235, 0.6);
  --ring-cp: rgba(245, 158, 11, 0.65);

  /* dark panel (mirrors the app tile / dashboard sidebar) */
  --panel: #0d1219;
  --panel-2: #141b25;

  /* type */
  --font-sans: "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Yu Gothic",
    "YuGothic", "Noto Sans JP", Meiryo, system-ui, -apple-system, sans-serif;
  --font-mono: ui-monospace, "SF Mono", "SFMono-Regular", "Roboto Mono",
    Menlo, Consolas, "Courier New", monospace;

  /* layout */
  --wrap: 1120px;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow-card: 0 1px 2px rgba(16, 26, 43, 0.04),
    0 12px 32px -18px rgba(16, 26, 43, 0.28);
  --shadow-float: 0 24px 60px -28px rgba(16, 26, 43, 0.45);

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);

  /* One shared clock for all five FEATURES mini-demos. Every card is a loop of
     this exact length driven off the same easing, so the grid breathes together
     instead of five independent cycles strobing against each other.
       0–10%   setup / first element lands
       10–70%  the demo plays out (the part that explains the feature)
       70–90%  hold on the finished state (readable, quiet)
       90–100% clear, ready to replay */
  --feat-loop: 8s;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.75;
  font-feature-settings: "palt" 1;
  letter-spacing: 0.01em;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: 22px;
}

.pc-br { display: none; }

.txt-alert { color: #ff5c66; }
.txt-good { color: var(--good); }
.nowrap { display: inline-block; }

/* ---- skip link ---- */
.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 100;
  background: var(--ink);
  color: #fff;
  padding: 10px 16px;
  border-radius: 10px;
  transition: top 0.2s var(--ease);
}
.skip-link:focus { top: 12px; }

/* =========================================================================
   Buttons
   ========================================================================= */
.btn {
  --_bg: var(--ink);
  --_fg: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: var(--_bg);
  color: var(--_fg);
  font: inherit;
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: transform 0.18s var(--ease), box-shadow 0.18s var(--ease),
    background 0.18s var(--ease), color 0.18s var(--ease);
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 12px 24px -12px rgba(16, 26, 43, 0.55); }
.btn:active { transform: translateY(0); }
.btn:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 3px;
}
.btn-lg { min-height: 54px; padding: 0 30px; font-size: 1.02rem; }
.btn-sm { min-height: 40px; padding: 0 18px; font-size: 0.92rem; }

.btn-ghost {
  --_bg: transparent;
  --_fg: var(--ink);
  border-color: var(--line-strong);
}
.btn-ghost:hover { background: var(--surface-2); box-shadow: none; }

/* =========================================================================
   Header
   ========================================================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
}
.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand-mark { width: 40px; height: 40px; }
.brand-word {
  font-weight: 800;
  font-size: 1.24rem;
  letter-spacing: -0.02em;
}
.brand-status {
  margin-left: 2px;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--blue-ink);
  background: var(--blue-50);
  border: 1px solid var(--blue-100);
  padding: 3px 8px;
  border-radius: 999px;
  line-height: 1;
}
.header-cta { flex: none; }

/* =========================================================================
   Hero
   ========================================================================= */
.hero {
  position: relative;
  padding-top: clamp(52px, 9vw, 96px);
  padding-bottom: clamp(56px, 10vw, 110px);
  background:
    linear-gradient(180deg, #fff 0%, var(--surface) 62%, #fff 100%);
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(16, 26, 43, 0.035) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(16, 26, 43, 0.035) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(120% 90% at 70% 10%, #000 25%, transparent 75%);
  -webkit-mask-image: radial-gradient(120% 90% at 70% 10%, #000 25%, transparent 75%);
  pointer-events: none;
}
.hero-glow {
  position: absolute;
  top: -160px;
  right: -140px;
  width: 520px;
  height: 520px;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.16), transparent 62%);
  filter: blur(10px);
  pointer-events: none;
}
.hero-inner {
  position: relative;
  display: grid;
  gap: clamp(36px, 6vw, 64px);
}
.hero-copy { position: relative; z-index: 2; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 20px;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--ink-1);
  background: var(--paper);
  border: 1px solid var(--line);
  padding: 7px 14px 7px 12px;
  border-radius: 999px;
  box-shadow: var(--shadow-card);
}
.eyebrow-dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--blue);
  box-shadow: 0 0 0 4px var(--blue-50);
}
.hero-title {
  margin: 0 0 22px;
  font-size: clamp(2.5rem, 10.5vw, 4.6rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.03em;
}
.ink-accent {
  position: relative;
  color: var(--blue-ink);
  white-space: nowrap;
}
.ink-accent::after {
  content: "";
  position: absolute;
  left: -2px; right: -2px; bottom: 0.08em;
  height: 0.16em;
  background: linear-gradient(90deg, var(--blue), rgba(37, 99, 235, 0.15));
  border-radius: 999px;
  z-index: -1;
}
.hero-lead {
  margin: 0 0 30px;
  font-size: clamp(1.02rem, 2.6vw, 1.2rem);
  color: var(--ink-1);
  max-width: 34em;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
}
.hero-note {
  margin: 0;
  font-size: 0.9rem;
  color: var(--ink-2);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.hero-note::before {
  content: "";
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--good);
  box-shadow: 0 0 0 3px var(--good-bg);
}

/* =========================================================================
   Hero visual — live monitor mock (要注意 → 改善傾向)
   ========================================================================= */
.hero-visual { position: relative; z-index: 1; }
.monitor {
  max-width: 440px;
  margin-inline: auto;
  border-radius: var(--radius);
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-float);
  overflow: hidden;
}
.monitor-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 12px 16px;
  background: var(--panel);
  color: #fff;
}
.mon-dot { width: 10px; height: 10px; border-radius: 50%; background: rgba(255, 255, 255, 0.24); }
.monitor-title {
  margin-left: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: rgba(255, 255, 255, 0.82);
}
.monitor-body { padding: 18px; display: grid; gap: 15px; }

.mon-row { display: flex; align-items: flex-start; justify-content: space-between; }
.mon-company { font-weight: 800; font-size: 1.02rem; letter-spacing: -0.01em; }
.mon-owner { font-size: 0.8rem; color: var(--ink-2); margin-top: 2px; }
.mon-live {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-mono);
  font-size: 0.7rem; font-weight: 700; letter-spacing: 0.08em;
  color: var(--alert-ink);
  background: var(--alert-bg);
  padding: 4px 9px; border-radius: 6px;
}
.live-dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--alert);
  animation: livePulse 1.6s var(--ease) infinite;
}
@keyframes livePulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.35; transform: scale(0.72); }
}

/* status pill crossfade */
.mon-status { position: relative; height: 60px; }
.status-pill {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.5rem;
  letter-spacing: 0.06em;
  border-radius: var(--radius-sm);
  border: 1.5px solid transparent;
}
.status-alert {
  color: var(--alert-ink);
  background: var(--alert-bg);
  border-color: rgba(239, 68, 68, 0.28);
  animation: pillAlert 8s var(--ease) infinite;
}
.status-improved {
  color: var(--good-ink);
  background: var(--good-bg);
  border-color: rgba(16, 185, 129, 0.28);
  animation: pillImproved 8s var(--ease) infinite;
}
@keyframes pillAlert {
  0%, 42% { opacity: 1; transform: scale(1); }
  50%, 92% { opacity: 0; transform: scale(0.98); }
  100% { opacity: 1; transform: scale(1); }
}
@keyframes pillImproved {
  0%, 42% { opacity: 0; transform: scale(0.98); }
  50%, 92% { opacity: 1; transform: scale(1); }
  100% { opacity: 0; transform: scale(0.98); }
}

.mon-metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.metric {
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid var(--line);
}
.metric-label { display: block; font-size: 0.72rem; color: var(--ink-2); margin-bottom: 4px; }
.metric-value {
  position: relative;
  display: block;
  height: 34px;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 1.9rem;
  line-height: 34px;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.metric-value small { font-size: 0.9rem; margin-left: 1px; }
.mv { position: absolute; left: 0; top: 0; }
.metric-alertable .mv-a { color: var(--alert-ink); }
.mv-a { animation: pillAlert 8s var(--ease) infinite; }
.mv-b { animation: pillImproved 8s var(--ease) infinite; color: var(--good-ink); }
.metric:not(.metric-alertable) .mv-a { color: var(--ink); }

/* talk ratio bar */
.talk-head {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 0.74rem; color: var(--ink-2); margin-bottom: 7px;
}
.talk-legend { display: inline-flex; align-items: center; gap: 5px; }
.lg { width: 9px; height: 9px; border-radius: 3px; display: inline-block; }
/* Role colours, not severity colours: every talk-ratio surface on the page
   uses 自社 = blue and 顧客 = amber, matching the pixel avatars' rings
   (--ring-own / --ring-cp). "Too much of us talking" is signalled by the
   要注意 badge, the red room tint and the silence chip — never by the bar. */
.lg-rep { background: var(--blue); margin-right: 1px; }
.lg-cust { background: var(--caution); margin-left: 8px; margin-right: 1px; }
.talk-bar {
  display: flex;
  height: 12px;
  border-radius: 999px;
  overflow: hidden;
  background: var(--surface-2);
}
.talk-rep {
  background: var(--blue);
  width: 88%;
  animation: talkRep 8s var(--ease) infinite;
}
.talk-cust {
  background: var(--caution);
  flex: 1;
}
/* Only the width moves. The colour stays fixed to the speaker, so the eye
   reads "who is talking" from hue and "how lopsided" from length. */
@keyframes talkRep {
  0%, 42% { width: 88%; }
  52%, 92% { width: 48%; }
  100% { width: 88%; }
}

.mon-support {
  display: grid;
  gap: 3px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: var(--panel);
  color: #fff;
  position: relative;
}
.mon-support::before {
  content: "";
  position: absolute; left: 0; top: 12px; bottom: 12px;
  width: 3px; border-radius: 3px; background: var(--blue);
}
.support-quote { font-weight: 700; font-size: 0.96rem; padding-left: 12px; }
.support-from { font-size: 0.7rem; color: rgba(255, 255, 255, 0.6); padding-left: 12px; }

/* =========================================================================
   Scene gating — in-scene animations run only when scrolled into view
   (scenes carry .scene + data-reveal; app.js adds .is-in)
   ========================================================================= */
.js .scene :is(.stack i, .meet-alert, .meet-alert-ping, .chip-rep, .voice i,
  .rec-dot, .mrow-hot, .mstatus-alert, .toast-live, .mm-rep, .mm-num i,
  .sup-compose, .sup-inbox, .wave i, .caret, .stt-line, .j-line, .j-fly,
  .j-pill, .fc-live, .fc-stack, .fc-stack i) {
  animation-play-state: paused;
}
.js .scene.is-in :is(.stack i, .meet-alert, .meet-alert-ping, .chip-rep, .voice i,
  .rec-dot, .mrow-hot, .mstatus-alert, .toast-live, .mm-rep, .mm-num i,
  .sup-compose, .sup-inbox, .wave i, .caret, .stt-line, .j-line, .j-fly,
  .j-pill, .fc-live, .fc-stack, .fc-stack i) {
  animation-play-state: running;
}

/* =========================================================================
   Narrative — animated online-meeting scene (dark)
   ========================================================================= */
.narrative {
  padding: clamp(56px, 10vw, 104px) 0;
  background:
    radial-gradient(100% 70% at 50% 0%, #151d29 0%, var(--ink) 60%);
  color: #fff;
  overflow: hidden;
}
.narrative-title {
  margin: 0 0 clamp(30px, 5vw, 44px);
  font-size: clamp(1.3rem, 5.4vw, 2.7rem);
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: -0.02em;
  text-align: center;
}
.narrative-caption {
  margin: clamp(28px, 5vw, 40px) 0 0;
  text-align: center;
  font-size: clamp(1.05rem, 3.4vw, 1.5rem);
  font-weight: 700;
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.72);
}
.narrative-caption .txt-good { font-size: 1.12em; }

/* --- the meeting window --- */
.meet {
  max-width: 560px;
  margin-inline: auto;
  border-radius: var(--radius);
  background: var(--panel-2);
  border: 1px solid rgba(255, 255, 255, 0.09);
  box-shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.8);
  overflow: hidden;
}
.meet-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 11px 14px;
  background: rgba(255, 255, 255, 0.04);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}
.meet-dot { width: 9px; height: 9px; border-radius: 50%; background: rgba(255, 255, 255, 0.18); }
.meet-name {
  margin-left: 6px;
  font-size: 0.78rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.72);
}
.meet-rec {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.55);
}
.rec-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--alert);
  animation: livePulse 1.6s var(--ease) infinite;
}

.meet-tiles {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 14px;
}
.tile {
  position: relative;
  margin: 0;
  aspect-ratio: 4 / 3.4;
  border-radius: 12px;
  overflow: hidden;
  display: grid;
  place-items: center;
}
/* Lit video-call tiles: the avatar face sits on a bright screen so the
   navy/grey suits pop (the surrounding meet window stays dark — chrome only).
   A faint role tint (cool for 自社, warm for 先方) + subtle inner border reads
   as an illuminated panel; the avatar's white keyline naturally disappears
   here, which is the intended trade. */
.tile-rep {
  background: linear-gradient(160deg, #f2f7fd 0%, #dde9f6 100%);
  box-shadow: inset 0 0 0 1px rgba(37, 99, 235, 0.14);
}
.tile-cust {
  background: linear-gradient(160deg, #faf6ef 0%, #ece2d3 100%);
  box-shadow: inset 0 0 0 1px rgba(245, 158, 11, 0.16);
}
.avatar {
  width: 52%;
  color: rgba(255, 255, 255, 0.28);
}
.tile-cust .avatar { color: rgba(255, 255, 255, 0.18); }
.tile-name {
  position: absolute;
  left: 8px; bottom: 8px;
  font-size: 0.68rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.85);
  background: rgba(0, 0, 0, 0.45);
  padding: 3px 8px;
  border-radius: 6px;
  backdrop-filter: blur(4px);
}

/* rep keeps talking: bouncing voice bars */
.voice {
  position: absolute;
  right: 8px; bottom: 8px;
  display: inline-flex;
  align-items: flex-end;
  gap: 2.5px;
  height: 16px;
  padding: 4px 7px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.45);
  box-sizing: content-box;
}
.voice i {
  width: 3px;
  height: 100%;
  border-radius: 2px;
  background: var(--blue);
  transform-origin: bottom;
  animation: voiceBounce 0.9s ease-in-out infinite;
}
.voice i:nth-child(2) { animation-delay: 0.15s; }
.voice i:nth-child(3) { animation-delay: 0.3s; }
.voice i:nth-child(4) { animation-delay: 0.45s; }
@keyframes voiceBounce {
  0%, 100% { transform: scaleY(0.3); }
  50% { transform: scaleY(1); }
}

/* customer silence chip with ticking counter */
.silence-chip {
  position: absolute;
  right: 8px; bottom: 8px;
  display: inline-flex;
  align-items: baseline;
  gap: 3px;
  font-size: 0.68rem;
  font-weight: 600;
  color: #ffb3b8;
  background: rgba(0, 0, 0, 0.5);
  padding: 4px 8px;
  border-radius: 6px;
}

/* stacked crossfading values (8 → 12 → 18 / 24% → 18% → 12%) */
.stack {
  position: relative;
  display: inline-block;
  min-width: 2ch;
  height: 1.25em;
  font-family: var(--font-mono);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.stack i {
  position: absolute;
  inset: 0;
  font-style: normal;
  text-align: center;
  opacity: 0;
  line-height: 1.25em;
}
/* The first value is visible with no animation applied at all, so the metric
   always reads as a number — before the scene is revealed, while the
   animation is paused, and if the animation never starts. The keyframes
   below simply take over once it runs. */
.stack i:first-child { opacity: 1; }
.stack i:nth-child(1) { animation: step1 7s steps(1) infinite; }
.stack i:nth-child(2) { animation: step2 7s steps(1) infinite; }
.stack i:nth-child(3) { animation: step3 7s steps(1) infinite; }
/* step1 comes back on at 96.01% to close the loop. Previously step3 switched
   off at 96.01% and nothing switched on until the loop restarted, so all
   three digits sat at opacity 0 for the last ~4% (≈280ms of every 7s) and
   the value flashed blank — the same wrap-around the FEATURES counters
   (mmNum1) already handle. */
@keyframes step1 { 0%, 28% { opacity: 1; } 28.01%, 96% { opacity: 0; } 96.01%, 100% { opacity: 1; } }
@keyframes step2 { 28.01%, 55% { opacity: 1; } 0%, 28%, 55.01%, 100% { opacity: 0; } }
@keyframes step3 { 55.01%, 96% { opacity: 1; } 0%, 55%, 96.01%, 100% { opacity: 0; } }

/* the alert that fires over the meeting at the story's turn */
.meet-alert {
  position: absolute;
  top: 50%; left: 50%;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 26px;
  border-radius: 999px;
  background: var(--alert);
  color: #fff;
  font-weight: 800;
  font-size: clamp(1.05rem, 3.6vw, 1.3rem);
  letter-spacing: 0.1em;
  box-shadow: 0 14px 40px -8px rgba(239, 68, 68, 0.7);
  transform: translate(-50%, -50%) scale(0);
  animation: alertPop 7s var(--spring) infinite;
  z-index: 3;
}
@keyframes alertPop {
  0%, 57% { transform: translate(-50%, -50%) scale(0); opacity: 0; }
  62% { transform: translate(-50%, -50%) scale(1.06); opacity: 1; }
  64% { transform: translate(-50%, -50%) scale(1); }
  96% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
  100% { transform: translate(-50%, -50%) scale(0.9); opacity: 0; }
}
.meet-alert-ping {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border: 2px solid rgba(255, 255, 255, 0.75);
  animation: alertPing 7s var(--ease) infinite;
}
@keyframes alertPing {
  0%, 62% { transform: scale(1); opacity: 0; }
  66% { opacity: 0.9; transform: scale(1); }
  80%, 100% { transform: scale(1.7); opacity: 0; }
}

/* degrading metric chips under the tiles */
.meet-metrics {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  padding: 0 14px 14px;
}
.meet-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.74rem;
  color: rgba(255, 255, 255, 0.6);
}
.chip-label { flex: none; }
/* 顧客発話 is a talk-share figure → amber, the 顧客 role colour (readable on
   the dark scene). 沈黙 stays red: it is a warning, not a speaker. */
.stack-cust { min-width: 3.5ch; color: #fcd34d; font-size: 0.9rem; }
.stack-sil { color: #ffb3b8; font-size: 0.85rem; }
.meet-chip--bar { flex: 1; }
/* The track is the 顧客 share (amber); .chip-rep overlays the 自社 share
   (blue) from the left — same role→hue mapping as the hero talk bar. */
.chip-bar {
  position: relative;
  flex: 1;
  height: 8px;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.45);
  overflow: hidden;
}
.chip-rep {
  position: absolute;
  inset: 0 auto 0 0;
  width: 64%;
  border-radius: inherit;
  background: var(--blue);
  animation: chipCreep 7s var(--ease) infinite;
}
@keyframes chipCreep {
  0% { width: 64%; }
  55%, 96% { width: 88%; }
  100% { width: 64%; }
}

/* =========================================================================
   Section shared
   ========================================================================= */
.section-head { max-width: 40em; margin-bottom: clamp(30px, 5vw, 52px); }
.section-kicker {
  margin: 0 0 12px;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  color: var(--blue-ink);
}
.section-kicker.on-dark { color: var(--blue-100); }
.section-title {
  margin: 0 0 10px;
  font-size: clamp(1.7rem, 5.6vw, 2.6rem);
  font-weight: 800;
  line-height: 1.22;
  letter-spacing: -0.025em;
}
.section-sub { margin: 0; color: var(--ink-3); font-size: 0.88rem; }

/* =========================================================================
   Features — screen-fragment cards
   ========================================================================= */
.features { padding: clamp(60px, 10vw, 110px) 0; background: var(--paper); }
.feature-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}
.feature-card {
  position: relative;
  padding: 18px 18px 24px;
  border-radius: var(--radius);
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-card);
  transition: transform 0.22s var(--ease), box-shadow 0.22s var(--ease), border-color 0.22s var(--ease);
}
.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-float);
  border-color: var(--line-strong);
}
.feature-name { margin: 18px 6px 4px; font-size: 1.1rem; font-weight: 800; letter-spacing: -0.01em; }
.feature-desc { margin: 0 6px; color: var(--ink-2); font-size: 0.94rem; }
.feature-tag {
  display: inline-block;
  margin: 12px 6px 0;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--ink-1);
  background: var(--surface-2);
  border: 1px solid var(--line);
  padding: 4px 9px;
  border-radius: 7px;
}

/* --- shared mock chrome --- */
.mock {
  border-radius: var(--radius-sm);
  background: linear-gradient(170deg, var(--surface) 0%, var(--surface-2) 100%);
  border: 1px solid var(--line);
  padding: 16px;
  min-height: 150px;
  display: grid;
  align-content: center;
  gap: 10px;
  overflow: hidden;
}
/* (The grey skeleton-line helpers `.l` / `.l-w*` were removed: every FEATURES
   card now carries real Japanese content, since a placeholder bar cannot show
   what the feature actually says. Don't reintroduce them here.) */

/* --- 1. live monitor list --- */
.mrow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 12px;
  border-radius: 10px;
  background: var(--paper);
  border: 1px solid var(--line);
}
.mrow-lines { flex: 1; min-width: 0; }
.mstatus {
  flex: none;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
}
.mstatus-live { color: var(--blue-ink); background: var(--blue-50); }
.mstatus-alert { color: #fff; background: var(--alert); }
.mrow-hot {
  border-color: rgba(239, 68, 68, 0.4);
  animation: hotRow 2.4s var(--ease) infinite;
}
@keyframes hotRow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.25); }
  50% { box-shadow: 0 0 0 5px rgba(239, 68, 68, 0); }
}
.feature-card:hover .mrow-hot { border-color: var(--alert); }

/* --- 2. alert toast — a real notification, not a skeleton. The 要注意 toast
   slides in from the right over an older 注意 that has settled behind it, so
   the card shows *what gets said* when the room turns. --- */
.mock-toast { position: relative; }
.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  border-radius: 12px;
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-card);
}
.toast-ghost {
  opacity: 0.5;
  box-shadow: none;
  transform: scale(0.94);
}
/* slides in on the shared clock, holds through the read, then clears */
.toast-live {
  border-color: rgba(239, 68, 68, 0.35);
  animation: toastIn var(--feat-loop) var(--spring) infinite;
}
@keyframes toastIn {
  0%, 6% { transform: translateX(34%) scale(0.94); opacity: 0; }
  16% { transform: translateX(0) scale(1.02); opacity: 1; }
  22%, 86% { transform: translateX(0) scale(1); opacity: 1; }
  94%, 100% { transform: translateX(12%) scale(0.97); opacity: 0; }
}
.toast-icon {
  flex: none;
  width: 34px; height: 34px;
  display: grid; place-items: center;
  border-radius: 9px;
  background: var(--alert-bg);
  color: var(--alert-ink);
}
.toast-icon svg { width: 18px; height: 18px; }
.toast-icon--dim { background: var(--caution-bg); color: var(--caution-ink); }
.toast-body { flex: 1; min-width: 0; display: grid; gap: 2px; }
.toast-title {
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--ink-1);
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.toast-text {
  font-size: 0.72rem;
  color: var(--ink-2);
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mstatus-caution { color: var(--caution-ink); background: var(--caution-bg); }

/* --- 3. metrics --- */
.mock-metrics {
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 16px;
}
.mm-stat { display: grid; gap: 2px; }
.mm-label { font-size: 0.7rem; color: var(--ink-2); }
.mm-value {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 2.1rem;
  line-height: 1.1;
  color: var(--alert-ink);
  font-variant-numeric: tabular-nums;
}
.mm-value small { font-size: 0.95rem; }
.mm-bars { display: grid; gap: 6px; min-width: 0; }

/* --- counting numerals: three values stacked in one grid cell and cross-cut
   with steps(1), so the digits change without ever reflowing the layout.
   Beats line up with the bar keyframes below (27% / 55%). --- */
.mm-num {
  display: inline-grid;
  justify-items: center;
  min-width: 2ch;
  font-variant-numeric: tabular-nums;
}
.mm-num--sm { min-width: 2ch; }
.mm-num i { grid-area: 1 / 1; font-style: normal; opacity: 0; }
/* first value visible with no animation running (see .stack i:first-child) */
.mm-num i:first-child { opacity: 1; }
.mm-num i:nth-child(1) { animation: mmNum1 var(--feat-loop) steps(1) infinite; }
.mm-num i:nth-child(2) { animation: mmNum2 var(--feat-loop) steps(1) infinite; }
.mm-num i:nth-child(3) { animation: mmNum3 var(--feat-loop) steps(1) infinite; }
@keyframes mmNum1 { 0%, 27% { opacity: 1; } 27.01%, 94% { opacity: 0; } 94.01%, 100% { opacity: 1; } }
@keyframes mmNum2 { 0%, 27% { opacity: 0; } 27.01%, 55% { opacity: 1; } 55.01%, 100% { opacity: 0; } }
@keyframes mmNum3 { 0%, 55% { opacity: 0; } 55.01%, 94% { opacity: 1; } 94.01%, 100% { opacity: 0; } }

.mm-ratio {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.7rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
/* gap:0 — the label already carries its own space, and a flex gap would push
   the "%" off the numeral it belongs to */
.mm-side { display: inline-flex; align-items: baseline; gap: 0; white-space: nowrap; }
/* label colours track the bar segments: 自社 blue, 顧客 amber (both AA on white) */
.mm-side--rep { color: var(--blue-ink); }
.mm-side--cust { color: var(--caution-ink); }

.mm-bar {
  height: 10px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  overflow: hidden;
}
.mm-bar i { display: block; height: 100%; }
/* one split bar (自社 | 顧客) reads as a ratio; two separate bars did not */
.mm-bar--duo { display: flex; }
.mm-rep {
  width: 52%;
  background: var(--blue);
  animation: mmTip var(--feat-loop) var(--ease) infinite;
}
.mm-cust { flex: 1; background: var(--caution); }
/* tips 52 → 65 → 78% toward 自社, holds on the finished state, then resets */
@keyframes mmTip {
  0%, 20% { width: 52%; }
  34%, 48% { width: 65%; }
  62%, 90% { width: 78%; }
  97%, 100% { width: 52%; }
}

/* --- 4. support message -------------------------------------------------
   Two zones, read top → bottom: the manager sends the one-liner (composer),
   then it lands on the rep's screen as a full receive toast. The arrival is
   the point of the feature, so it gets the size, the shadow, the avatar and
   the ✓ — the sentence is never abbreviated on the receiving end. */
.mock-chat { gap: 12px; }

/* top zone — the manager's composer */
.sup-compose {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 7px 7px 10px;
  border-radius: 12px;
  background: var(--paper);
  border: 1px solid var(--line);
  animation: supCompose var(--feat-loop) var(--spring) infinite;
}
@keyframes supCompose {
  0%, 2% { transform: translateY(8px) scale(0.96); opacity: 0; }
  9%, 88% { transform: none; opacity: 1; }
  96%, 100% { transform: translateY(-6px) scale(0.98); opacity: 0; }
}
.sup-compose-to {
  flex: none;
  font-size: 0.66rem;
  font-weight: 700;
  color: var(--ink-3);
  padding-right: 8px;
  border-right: 1px solid var(--line);
}
.sup-compose-field {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 2px;
  font-size: 0.74rem;
  color: var(--ink-2);
}
/* the composer may clip — the receiving toast below carries the full copy */
.sup-compose-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sup-caret {
  flex: none;
  width: 1.5px;
  height: 0.95em;
  background: var(--blue);
}
/* blinks while the manager types, gone the moment it is sent */
@keyframes supCaret {
  0%, 6% { opacity: 1; }
  6.01%, 11% { opacity: 0; }
  11.01%, 17% { opacity: 1; }
  17.01%, 100% { opacity: 0; }
}
.send-btn {
  flex: none;
  width: 32px; height: 32px;
  display: grid; place-items: center;
  border-radius: 9px;
  background: var(--blue);
  color: #fff;
  transition: background 0.2s var(--ease);
}
.send-btn svg { width: 16px; height: 16px; }
.feature-card:hover .send-btn { background: var(--blue-ink); }
/* the press that launches the message, on the shared clock */
@keyframes supPress {
  0%, 17% { transform: scale(1); }
  20% { transform: scale(0.84); }
  25% { transform: scale(1.1); }
  30%, 100% { transform: scale(1); }
}

/* bottom zone — the rep's screen receives it (mirrors the desktop InboxStack) */
.sup-inbox {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-left: 3px solid var(--blue);
  box-shadow: var(--shadow-card);
  animation: supArrive var(--feat-loop) var(--spring) infinite;
}
/* drops out of the composer above and settles — this is the card's climax */
@keyframes supArrive {
  0%, 22% { opacity: 0; transform: translateY(-18px) scale(0.94); }
  31% { opacity: 1; transform: translateY(2px) scale(1.02); }
  37%, 88% { opacity: 1; transform: translateY(0) scale(1); }
  95%, 100% { opacity: 0; transform: translateY(-6px) scale(0.98); }
}
.sup-inbox-avatar {
  flex: none;
  width: 36px; height: 36px;
  display: grid; place-items: center;
  border-radius: 9px;
  background: var(--blue-50);
  overflow: hidden;
}
.sup-face { display: block; width: 26px; height: 33px; }
.sup-inbox-body { flex: 1; min-width: 0; display: grid; gap: 2px; }
.sup-inbox-head { display: flex; align-items: center; gap: 6px; }
.sup-inbox-who { font-size: 0.67rem; font-weight: 700; color: var(--ink-3); }
/* full sentence, at a size meant to be read */
.sup-inbox-msg {
  font-size: 0.84rem;
  font-weight: 700;
  line-height: 1.45;
  color: var(--ink);
}

/* --- 5. transcription (wide card) --- */
.feature-card--wide .mock-stt { min-height: 0; }
.wave {
  display: flex;
  align-items: center;
  gap: 3px;
  height: 34px;
}
.wave i {
  flex: 1;
  height: 60%;
  border-radius: 2px;
  background: var(--blue);
  opacity: 0.9;
  transform-origin: center;
  /* Long, smooth cycle; each bar carries its own scattered phase (below) so
     the row reads as live speech, never a synchronized strobe. */
  animation: waveMove 2.6s ease-in-out infinite;
}
/* Per-bar height (amplitude envelope) + scattered negative delays: no two
   neighbours share a phase, so nothing blinks in unison. */
.wave i:nth-child(1)  { height: 48%; animation-delay: -0.05s; }
.wave i:nth-child(2)  { height: 66%; animation-delay: -0.32s; }
.wave i:nth-child(3)  { height: 52%; animation-delay: -0.61s; }
.wave i:nth-child(4)  { height: 80%; animation-delay: -0.18s; }
.wave i:nth-child(5)  { height: 60%; animation-delay: -0.88s; }
.wave i:nth-child(6)  { height: 44%; animation-delay: -0.44s; }
.wave i:nth-child(7)  { height: 72%; animation-delay: -1.15s; }
.wave i:nth-child(8)  { height: 56%; animation-delay: -0.72s; }
.wave i:nth-child(9)  { height: 88%; animation-delay: -0.27s; }
.wave i:nth-child(10) { height: 50%; animation-delay: -1.42s; }
.wave i:nth-child(11) { height: 64%; animation-delay: -0.55s; }
.wave i:nth-child(12) { height: 46%; animation-delay: -1.02s; }
.wave i:nth-child(13) { height: 76%; animation-delay: -0.12s; }
.wave i:nth-child(14) { height: 58%; animation-delay: -1.68s; }
.wave i:nth-child(15) { height: 42%; animation-delay: -0.83s; }
.wave i:nth-child(16) { height: 70%; animation-delay: -0.39s; }
.wave i:nth-child(17) { height: 54%; animation-delay: -1.90s; }
.wave i:nth-child(18) { height: 82%; animation-delay: -0.66s; }
.wave i:nth-child(19) { height: 48%; animation-delay: -1.25s; }
.wave i:nth-child(20) { height: 62%; animation-delay: -0.95s; }
@keyframes waveMove {
  0%, 100% { transform: scaleY(0.55); }
  50% { transform: scaleY(1); }
}
.stt-lines { display: grid; gap: 6px; }
/* Lines land one at a time (~0.3s / 1.4s / 2.6s) and all clear together at the
   end of the shared loop, so the block reads as a transcript filling in rather
   than three independently blinking rows. Explicit per-line keyframes (not
   animation-delay) keep the reset synchronised. The waveform above keeps its
   own scattered 2.6s phases — it is ambient, not a metronome. */
.stt-line {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--ink-1);
  opacity: 0;
}
.stt-line:nth-child(1) { animation: sttL1 var(--feat-loop) var(--ease) infinite; }
.stt-line:nth-child(2) { animation: sttL2 var(--feat-loop) var(--ease) infinite; }
.stt-line:nth-child(3) { animation: sttL3 var(--feat-loop) var(--ease) infinite; }
@keyframes sttL1 {
  0% { opacity: 0; transform: translateY(6px); }
  4%, 88% { opacity: 1; transform: none; }
  95%, 100% { opacity: 0; transform: none; }
}
@keyframes sttL2 {
  0%, 14% { opacity: 0; transform: translateY(6px); }
  18%, 88% { opacity: 1; transform: none; }
  95%, 100% { opacity: 0; transform: none; }
}
@keyframes sttL3 {
  0%, 28% { opacity: 0; transform: translateY(6px); }
  32%, 88% { opacity: 1; transform: none; }
  95%, 100% { opacity: 0; transform: none; }
}
.stt-who {
  flex: none;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 6px;
  background: var(--surface-2);
  color: var(--ink-2);
}
.stt-who--rep { color: var(--blue-ink); background: var(--blue-50); }
.stt-who--cust { color: var(--ink-1); }
.stt-sil {
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--alert-ink);
  background: var(--alert-bg);
  padding: 2px 10px;
  border-radius: 6px;
}
.caret {
  width: 8px; height: 15px;
  background: var(--ink-3);
  animation: caretBlink 1s steps(1) infinite;
}
@keyframes caretBlink { 0%, 49% { opacity: 1; } 50%, 100% { opacity: 0; } }
.wide-copy { padding-top: 2px; }

/* =========================================================================
   Journey — 検知 → 支援 → 改善 (visual color story)
   ========================================================================= */
.journey-sec { padding: clamp(60px, 10vw, 110px) 0; background: var(--surface); }
.journey {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 34px;
  position: relative;
}
.j-step {
  --j: var(--ink-2);
  --j-bg: var(--surface-2);
  position: relative;
  padding: 18px 18px 22px;
  border-radius: var(--radius);
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-card);
  transition: transform 0.22s var(--ease), box-shadow 0.22s var(--ease);
}
.j-step:hover { transform: translateY(-4px); box-shadow: var(--shadow-float); }
.j-alert { --j: var(--alert-ink); --j-raw: var(--alert); --j-bg: var(--alert-bg); }
.j-send  { --j: var(--blue-ink);  --j-raw: var(--blue);  --j-bg: var(--blue-50); }
.j-good  { --j: var(--good-ink);  --j-raw: var(--good);  --j-bg: var(--good-bg); }

/* connector: vertical on mobile */
.j-step:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -30px;
  width: 2px;
  height: 26px;
  background: repeating-linear-gradient(
    to bottom, var(--line-strong) 0 4px, transparent 4px 9px);
}

.j-screen {
  position: relative;
  display: grid;
  gap: 12px;
  justify-items: center;
  align-content: center;
  min-height: 128px;
  padding: 16px;
  border-radius: var(--radius-sm);
  background: linear-gradient(170deg, var(--surface) 0%, var(--j-bg) 130%);
  border: 1px solid var(--line);
  overflow: hidden;
}
.j-pill {
  display: inline-block;
  padding: 8px 22px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: 0.08em;
  color: #fff;
  background: var(--j-raw);
  box-shadow: 0 10px 26px -10px var(--j-raw);
  animation: jPillPulse 2.6s var(--ease) infinite;
}
@keyframes jPillPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}
.j-graph { width: min(200px, 80%); height: 44px; color: var(--j-raw); }
.j-line {
  stroke-dasharray: 160;
  stroke-dashoffset: 160;
  animation: jDraw 2.6s var(--ease) infinite;
}
@keyframes jDraw {
  0% { stroke-dashoffset: 160; }
  45%, 88% { stroke-dashoffset: 0; }
  100% { stroke-dashoffset: 0; opacity: 0; }
}
.j-bubble {
  max-width: 92%;
  padding: 10px 14px;
  border-radius: 13px 13px 13px 4px;
  background: var(--panel);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 600;
}
.j-fly {
  flex: none;
  width: 34px; height: 34px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--blue);
  color: #fff;
  box-shadow: 0 6px 16px -6px var(--blue);
  animation: jFly 2.8s var(--ease) infinite;
}
.j-fly svg { width: 16px; height: 16px; }
@keyframes jFly {
  0%, 20% { transform: translate(0, 0) scale(1); opacity: 1; }
  60% { transform: translate(34px, -22px) scale(0.82); opacity: 0; }
  61% { transform: translate(-16px, 10px) scale(0.82); opacity: 0; }
  85%, 100% { transform: translate(0, 0) scale(1); opacity: 1; }
}

.j-name {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 16px 4px 4px;
  font-size: 1.08rem;
  font-weight: 800;
}
.j-num {
  flex: none;
  width: 28px; height: 28px;
  display: grid; place-items: center;
  border-radius: 50%;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--j);
  background: var(--j-bg);
}
.j-desc { margin: 0 4px; color: var(--ink-2); font-size: 0.92rem; }

/* =========================================================================
   Register
   ========================================================================= */
.register {
  position: relative;
  padding: clamp(64px, 11vw, 128px) 0;
  background:
    radial-gradient(90% 120% at 50% -10%, #182233 0%, var(--panel) 55%, #070a0f 100%);
  color: #fff;
  overflow: hidden;
}
.register-inner { position: relative; z-index: 2; max-width: 720px; text-align: center; margin-inline: auto; }
.register-glow {
  position: absolute;
  top: -120px; left: 50%;
  width: 640px; height: 360px;
  transform: translateX(-50%);
  background: radial-gradient(circle, rgba(37, 99, 235, 0.32), transparent 66%);
  filter: blur(14px);
  z-index: 1;
  pointer-events: none;
}
.register-title {
  margin: 0 0 14px;
  font-size: clamp(1.85rem, 6.4vw, 3rem);
  font-weight: 800;
  line-height: 1.18;
  letter-spacing: -0.03em;
}
.register-sub {
  margin: 0 auto 34px;
  max-width: 32em;
  color: rgba(255, 255, 255, 0.74);
  font-size: clamp(1rem, 2.6vw, 1.12rem);
}

/* form */
.signup { max-width: 560px; margin-inline: auto; text-align: left; }
.signup-field { margin-bottom: 12px; }
.signup-label {
  display: block;
  margin-bottom: 8px;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.82);
}
.signup-row { display: grid; grid-template-columns: 1fr; gap: 10px; }
.signup-input {
  width: 100%;
  min-height: 54px;
  padding: 0 18px;
  font: inherit;
  font-size: 1rem;
  color: var(--ink);
  background: #fff;
  border: 1.5px solid transparent;
  border-radius: 12px;
  transition: box-shadow 0.18s var(--ease), border-color 0.18s var(--ease);
}
.signup-input::placeholder { color: var(--ink-3); }
.signup-input:focus-visible {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.35);
}
.signup-input[aria-invalid="true"] {
  border-color: #ff8a8a;
  box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.3);
}
.signup-submit { width: 100%; }
.signup-submit:disabled { opacity: 0.62; cursor: progress; transform: none; box-shadow: none; }

.signup-error {
  margin: 10px 0 0;
  font-size: 0.86rem;
  font-weight: 600;
  color: #ffd0d0;
  display: flex;
  align-items: center;
  gap: 7px;
}
.signup-error::before { content: "!"; display: grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: var(--alert); color: #fff; font-size: 0.72rem; font-weight: 800; flex: none; }
/* display: flex がUAの [hidden] { display: none } を上書きしてしまうため明示する */
.signup-error[hidden] { display: none; }
.signup-hint { margin: 6px 0 0; font-size: 0.82rem; color: rgba(255, 255, 255, 0.58); }
.signup-status { margin: 8px 0 0; font-size: 0.86rem; color: rgba(255, 255, 255, 0.72); min-height: 1px; }

/* success */
.signup-success {
  max-width: 560px;
  margin-inline: auto;
  text-align: center;
  padding: 40px 28px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.14);
  animation: successIn 0.5s var(--ease) both;
}
@keyframes successIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
.success-check {
  width: 60px; height: 60px;
  margin: 0 auto 18px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--good);
  color: #fff;
  box-shadow: 0 0 0 8px rgba(16, 185, 129, 0.22);
  animation: checkPop 0.45s var(--spring) 0.1s both;
}
@keyframes checkPop { from { transform: scale(0.6); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.success-check svg { width: 30px; height: 30px; }
.success-title { margin: 0 0 10px; font-size: 1.4rem; font-weight: 800; }
.success-text { margin: 0; color: rgba(255, 255, 255, 0.78); font-size: 1rem; }

/* =========================================================================
   Footer
   ========================================================================= */
.site-footer { padding: 52px 0 44px; background: var(--paper); border-top: 1px solid var(--line); }
.footer-inner { display: grid; gap: 20px; }
.footer-brand { display: flex; align-items: center; gap: 12px; }
.footer-brand .brand-word { font-size: 1.1rem; }
.footer-tagline { margin: 2px 0 0; font-size: 0.84rem; color: var(--ink-2); }
.footer-note { margin: 0; max-width: 52em; font-size: 0.84rem; color: var(--ink-2); line-height: 1.85; }
.footer-copy { margin: 0; font-family: var(--font-mono); font-size: 0.78rem; color: var(--ink-3); letter-spacing: 0.04em; }

/* =========================================================================
   Reveal-on-scroll (progressive enhancement; visible without JS)
   ========================================================================= */
.reveal { opacity: 1; }
.js .reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.js .reveal.is-in {
  opacity: 1;
  transform: none;
}
/* ファーストビュー内の要素は演出なしで即表示（app.js が付与）。アプリ内
   ブラウザ等でアニメーションフレームが止まっても真っ白にならないため。 */
.js .reveal.reveal-instant {
  transition: none;
}
.js .reveal[data-reveal-delay="1"] { transition-delay: 0.08s; }
.js .reveal[data-reveal-delay="2"] { transition-delay: 0.16s; }
.js .reveal[data-reveal-delay="3"] { transition-delay: 0.24s; }
.js .reveal[data-reveal-delay="4"] { transition-delay: 0.32s; }

/* =========================================================================
   Responsive — tablet / desktop
   ========================================================================= */
@media (min-width: 720px) {
  .pc-br { display: inline; }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .feature-card--wide { grid-column: span 2; }
  .feature-card--wide {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 22px;
    align-items: center;
  }
  .feature-card--wide .feature-name { margin-top: 0; }
  .journey { grid-template-columns: repeat(3, 1fr); gap: 40px; }
  /* connector: horizontal arrows on desktop */
  .j-step:not(:last-child)::after {
    left: auto;
    right: -32px;
    top: 50%;
    bottom: auto;
    width: 26px;
    height: 2px;
    transform: translateY(-50%);
    background: repeating-linear-gradient(
      to right, var(--line-strong) 0 4px, transparent 4px 9px);
  }
  .j-step:not(:last-child)::before {
    content: "";
    position: absolute;
    right: -34px;
    top: 50%;
    width: 8px;
    height: 8px;
    border-top: 2px solid var(--line-strong);
    border-right: 2px solid var(--line-strong);
    transform: translateY(-50%) rotate(45deg);
    z-index: 1;
  }
  .signup-row { grid-template-columns: 1fr auto; }
  .signup-submit { width: auto; }
}

@media (min-width: 940px) {
  .hero-inner {
    grid-template-columns: 1.05fr 0.95fr;
    align-items: center;
  }
  .hero-copy { max-width: 560px; }
  .monitor { max-width: 460px; margin-right: 0; }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .meet { max-width: 620px; }
}

/* =========================================================================
   Accessibility — reduced motion
   ========================================================================= */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  /* freeze the hero monitor on the improved (green) end-state */
  .status-alert, .mv-a, .live-dot { opacity: 0 !important; }
  .status-improved, .mv-b { opacity: 1 !important; }
  /* width only — the bar keeps its 自社 blue in every state */
  .talk-rep { width: 48% !important; }
  /* freeze the meeting scene on the informative state (alert shown) */
  .meet-alert { transform: translate(-50%, -50%) scale(1) !important; opacity: 1 !important; }
  .meet-alert-ping { opacity: 0 !important; }
  .stack i { opacity: 0 !important; }
  .stack i:nth-child(3) { opacity: 1 !important; }
  .chip-rep { width: 88% !important; }
  .voice i { transform: scaleY(0.7) !important; }
  /* journey: show completed states */
  .j-line { stroke-dashoffset: 0 !important; opacity: 1 !important; }
  .j-fly { transform: none !important; opacity: 1 !important; }
  .toast, .sup-compose, .sup-inbox, .stt-line { opacity: 1 !important; transform: none !important; }
  .js .reveal { opacity: 1 !important; transform: none !important; }
}

/* =========================================================================
   Room-view skin — base styles ported from the dashboard component group
   (apps/web/dashboard/src/components/roomScene/{RoomScene,PixelAvatar}.css).
   Namespaced (.room-scene__* / .ra-avatar*) so they drop in cleanly. The
   per-instance floor grid <pattern> was removed at generation time, so the
   .room-scene__floor-grid rules below are inert (kept for parity).
   ========================================================================= */
.room-scene {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}
.room-scene__floor { fill: #eef2f6; }
.room-scene--ok .room-scene__floor { fill: #e7f7f0; }
.room-scene--caution .room-scene__floor { fill: #fbf3e3; }
.room-scene--warn .room-scene__floor { fill: #fbecec; }
.room-scene--ended .room-scene__floor { fill: #f1f4f7; }
.room-scene--pending .room-scene__floor { fill: #eef1f5; }
.room-scene--visit .room-scene__floor { fill: #f6ecdd; }
.room-scene__floor-grid { stroke: rgba(15, 23, 42, 0.05); stroke-width: 1; }
.room-scene--visit .room-scene__floor-grid { stroke: rgba(146, 95, 46, 0.12); }
.room-scene__tone-ring { fill: none; stroke-width: 3; }
.room-scene--ok .room-scene__tone-ring { stroke: rgba(16, 185, 129, 0.4); }
.room-scene--caution .room-scene__tone-ring { stroke: rgba(245, 158, 11, 0.45); }
.room-scene--warn .room-scene__tone-ring { stroke: #ef4444; stroke-dasharray: 7 5; }
.room-scene--ended .room-scene__tone-ring { stroke: rgba(100, 116, 139, 0.4); }
.room-scene--pending .room-scene__tone-ring { stroke: rgba(148, 163, 184, 0.4); stroke-dasharray: 2 5; }
.room-scene__wall { fill: none; stroke: rgba(71, 85, 105, 0.38); stroke-width: 3; }
.room-scene--visit .room-scene__wall { stroke: rgba(146, 95, 46, 0.42); }
.room-scene--ended { filter: saturate(0.55); }
.room-scene--dimmed { opacity: 0.62; }
.room-scene__plant-pot { fill: #b45309; }
.room-scene__plant-leaf-1 { fill: #16a34a; }
.room-scene__plant-leaf-2 { fill: #22c55e; }
.room-scene__plant-leaf-3 { fill: #15803d; }
.room-scene__table { stroke-width: 2; }
.room-scene__table--online { fill: #bd8a50; stroke: #8c6136; }
.room-scene__table--visit { fill: #573a23; stroke: #33231a; }
.room-scene__prop-laptop { fill: #3b4759; }
.room-scene__prop-laptop-screen { fill: #5a8fd0; }
.room-scene__prop-paper { fill: #eef2f7; stroke: #d6dde8; }
.room-scene__prop-mug { fill: #7c5a3a; stroke: #9aa7b8; stroke-width: 1.5; }
.room-scene__chair { fill: #6d84a1; stroke: #4e627c; stroke-width: 1.5; }
.room-scene__seat-label { font-size: 9px; font-weight: 600; fill: #334155; }
.room-scene__seat-label-bg { fill: rgba(255, 255, 255, 0.85); }
.room-scene__monitor { fill: #0d1526; stroke: #475569; stroke-width: 2; }
.room-scene__tile { fill: #1a2534; stroke: rgba(245, 158, 11, 0.35); stroke-width: 1.25; }
.room-scene__tile--speaking { stroke: #fbbf24; stroke-width: 2; filter: drop-shadow(0 0 4px rgba(251, 191, 36, 0.6)); }
.room-scene__tile--more { fill: #141d2b; stroke: rgba(219, 228, 240, 0.3); stroke-dasharray: 3 2; }
.room-scene__tile-more-text { font-size: 11px; font-weight: 700; fill: #dbe4f0; }
.room-scene__plate-bg { fill: rgba(15, 23, 42, 0.78); }
.room-scene__plate-text { font-size: 7.5px; font-weight: 600; fill: #dbe4f0; }
.room-scene__voice-badge-bg { fill: #ffffff; filter: drop-shadow(0 2px 4px rgba(15, 23, 42, 0.25)); }
.room-scene__voice-badge-text { font-size: 9px; font-weight: 700; fill: #334155; }
.room-scene__voice-bar { fill: #64748b; }
.room-scene__voice-badge--speaking .room-scene__voice-bar { fill: #d97706; }

.ra-avatar { display: block; shape-rendering: crispEdges; image-rendering: pixelated; overflow: visible; }
.ra-avatar__ring { fill: none; stroke-width: 2.5; }
.ra-avatar--speaking .ra-avatar__ring { stroke: #f59e0b; stroke-width: 3; filter: drop-shadow(0 0 3px rgba(245, 158, 11, 0.75)); }
@media (prefers-reduced-motion: no-preference) {
  .ra-avatar--speaking { animation: ra-avatar-pulse 1.6s ease-in-out infinite; }
}
@keyframes ra-avatar-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.85; }
}

/* =========================================================================
   HERO STORY STAGE — one deal auto-plays as a 5-act loop.
   Every animated part shares the SAME 18s duration; each act is carved out
   by keyframe percentages so the whole scene stays in lock-step.
     ① 入室・開始   0.0–2.5s    →   0–14%
     ② 会話（停滞） 2.5–6.0s    →  14–32%
     ③ 異変         6.0–9.0s    →  32–50%
     ④ 支援受信     8.6–11.9s   →  48–66%
     ⑤ 再開・改善  11.5–18.0s   →  64–100%

   The clock was 16s. Acts ①–④ keep their ABSOLUTE seconds (percentages simply
   rescaled ×16/18), so their felt tempo is unchanged; the whole +2s went to
   act ⑤, which grew 3.5s → 6.5s. That buys each of its three beats a hold
   long enough to actually read:
     自社「近い規模の…」    12.0–14.1s (2.1s)   67–78%
     先方「ぜひ伺いたいです」 14.3–16.5s (2.2s)   79–92%
     改善傾向ピル           14.9–17.9s (3.1s)   82.5–99.5%
   The pill is the story's conclusion — what the support actually achieved —
   so it holds longest of any beat. Every element is back to opacity 0 by
   100%: the loop must restart on an empty room, so don't let a beat run to
   the edge when retiming.

   The script is a causal chain, not four unrelated beats:
     ② 先方が費用対効果の懸念を出す → 担当者は機能説明に逃げる（弱い返し）
     ③ 会話が止まる（沈黙 8→12→18秒）→ 要注意
     ④ マネージャーが②で*やっていない*具体策を送る（同規模の導入事例）
     ⑤ 担当者がそれを実行 → 先方が前のめりに戻る → 改善傾向
   Act ④ must never restate what the rep already said in ②, or the support
   reads as worthless. Act ⑤ carries two bubbles so the recovery is *spoken*.
   ========================================================================= */
.stage { max-width: 460px; margin-inline: auto; }
.stage-frame {
  border-radius: var(--radius);
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-float);
  overflow: hidden;
}
.stage-chrome {
  display: flex; align-items: center; gap: 7px;
  padding: 12px 16px; background: var(--panel); color: #fff;
}
.stage-chrome-dot { width: 10px; height: 10px; border-radius: 50%; background: rgba(255, 255, 255, 0.24); }
.stage-chrome-title {
  margin-left: 8px; font-size: 0.82rem; font-weight: 600;
  letter-spacing: 0.03em; color: rgba(255, 255, 255, 0.82);
}
.stage-rec {
  margin-left: auto; display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-mono); font-size: 0.7rem; font-weight: 700;
  letter-spacing: 0.08em; color: #ffd7d7;
}
.stage-rec i {
  width: 7px; height: 7px; border-radius: 50%; background: var(--alert);
  animation: livePulse 1.6s var(--ease) infinite;
}

.stage-scene { position: relative; aspect-ratio: 300 / 220; background: #fff; }
.stage-scene > .room-scene { position: absolute; inset: 0; width: 100%; height: 100%; }

/* floor tint travels neutral → caution → warn → ok → neutral over the loop */
.stage-scene .room-scene__floor { animation: heroFloor 18s var(--ease) infinite; }
@keyframes heroFloor {
  0%, 30% { fill: var(--floor-neutral); }
  37% { fill: var(--floor-caution); }
  44%, 68% { fill: var(--floor-warn); }
  80%, 96% { fill: var(--floor-ok); }
  100% { fill: var(--floor-neutral); }
}
/* wall monitor powers on at ①, off at the loop reset */
.stage-monitor { animation: heroMonitor 18s var(--ease) infinite; }
@keyframes heroMonitor {
  0%, 3% { opacity: 0; }
  9%, 96% { opacity: 1; }
  100% { opacity: 0; }
}
/* counterpart tile glows amber while the customer speaks in ② */
.stage-scene .room-scene__tile { animation: heroTile 18s var(--ease) infinite; }
@keyframes heroTile {
  0%, 14% { stroke: rgba(245, 158, 11, 0.35); stroke-width: 1.25; }
  18%, 27% { stroke: #fbbf24; stroke-width: 2; }
  30%, 100% { stroke: rgba(245, 158, 11, 0.35); stroke-width: 1.25; }
}
/* dashed warn ring appears during ③ */
.stage-warn-ring {
  stroke: var(--state-warn); stroke-width: 3; stroke-dasharray: 7 5;
  opacity: 0; animation: heroWarnRing 18s var(--ease) infinite;
}
@keyframes heroWarnRing {
  0%, 37% { opacity: 0; }
  41%, 68% { opacity: 1; }
  76%, 100% { opacity: 0; }
}

/* own rep walks in from the left and takes the near seat (①) */
.stage-avatar { position: absolute; left: 44%; top: 64%; width: 12%; animation: heroAvatar 18s linear infinite; }
.stage-avatar .ra-avatar { width: 100%; height: auto; }
@keyframes heroAvatar {
  0% { transform: translate(-360%, 0); opacity: 0; }
  1.8% { opacity: 1; }
  4.4% { transform: translate(-260%, -22%); }
  7.1% { transform: translate(-170%, 0); }
  9.8% { transform: translate(-85%, -18%); }
  12.4%, 96% { transform: translate(0, 0); opacity: 1; }
  98.5% { transform: translate(0, 0); opacity: 0; }
  100% { transform: translate(-360%, 0); opacity: 0; }
}
/* blue speaking glow behind the own rep during ⑤ */
.stage-avatar-glow {
  position: absolute; inset: -20%; border-radius: 16px;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.55), transparent 70%);
  opacity: 0; animation: heroGlow 18s var(--ease) infinite;
}
/* peaks while the own rep delivers the 事例 line at 67–78% (12.0–14.1s) */
@keyframes heroGlow {
  0%, 63% { opacity: 0; transform: scale(0.8); }
  68% { opacity: 1; transform: scale(1.05); }
  77% { opacity: 0.7; transform: scale(1); }
  84%, 100% { opacity: 0; transform: scale(0.9); }
}

/* speech bubbles — act ② (the stall) and act ⑤ (the recovery).
   Both acts reuse the same two anchors so ⑤ reads as *the same conversation
   resumed*: counterpart speaks upper-left, own rep answers lower-right. */
.stage-bubble {
  position: absolute; max-width: 46%;
  padding: 7px 11px; border-radius: 12px;
  font-size: clamp(0.62rem, 2.4vw, 0.8rem); font-weight: 700; line-height: 1.35;
  background: #fff; color: var(--ink-1); box-shadow: var(--shadow-card);
  opacity: 0; transform: scale(0.7); transform-origin: bottom center; z-index: 3;
}
.stage-bubble--cp,
.stage-bubble--cp2 { border: 1px solid var(--caution-bg); }
.stage-bubble--own,
.stage-bubble--own2 {
  border: 1px solid var(--blue-100); color: var(--blue-ink);
}
.stage-bubble--cp {
  left: 20%; top: 30%;
  animation: heroBubbleCp 18s var(--spring) infinite;
}
.stage-bubble--own {
  right: 14%; top: 50%;
  animation: heroBubbleOwn 18s var(--spring) infinite;
}
@keyframes heroBubbleCp {
  0%, 14% { opacity: 0; transform: scale(0.7); }
  18%, 27% { opacity: 1; transform: scale(1); }
  30%, 100% { opacity: 0; transform: scale(0.7); }
}
@keyframes heroBubbleOwn {
  0%, 21% { opacity: 0; transform: scale(0.7); }
  25%, 32% { opacity: 1; transform: scale(1); }
  36%, 100% { opacity: 0; transform: scale(0.7); }
}

/* act ⑤ — the rep acts on the advice, then the customer leans back in.
   Sequenced own → cp → 改善傾向 pill inside the 78–100% slot, and every part
   is faded out by 100% so the loop restarts on an empty room. Positions are
   nudged clear of the 改善傾向 pill (centred at top:40%). */
.stage-bubble--own2 {
  right: 12%; top: 50%;
  animation: heroBubbleOwn2 18s var(--spring) infinite;
}
/* sits just under the wall monitor (so it never covers the 先方 tiles) and
   above the 改善傾向 pill's band at top:47% */
.stage-bubble--cp2 {
  left: 16%; top: 30%;
  animation: heroBubbleCp2 18s var(--spring) infinite;
}
/* own2 holds 12.0–14.1s (2.1s) — long enough to read a 17-char line */
@keyframes heroBubbleOwn2 {
  0%, 64% { opacity: 0; transform: scale(0.7); }
  67%, 78% { opacity: 1; transform: scale(1); }
  81%, 100% { opacity: 0; transform: scale(0.7); }
}
/* cp2 holds 14.3–16.5s (2.2s) and is fully up before the pill lands */
@keyframes heroBubbleCp2 {
  0%, 77% { opacity: 0; transform: scale(0.7); }
  79%, 92% { opacity: 1; transform: scale(1); }
  96%, 100% { opacity: 0; transform: scale(0.7); }
}

/* silence chip counts up 8 → 12 → 18 (③) */
.stage-silence {
  position: absolute; left: 50%; top: 33%; transform: translateX(-50%) scale(0.8);
  display: inline-flex; align-items: baseline; gap: 4px;
  padding: 5px 11px; border-radius: 999px;
  font-size: clamp(0.6rem, 2.3vw, 0.76rem); font-weight: 700;
  color: var(--alert-ink); background: #fff;
  border: 1px solid rgba(239, 68, 68, 0.3); box-shadow: var(--shadow-card);
  opacity: 0; animation: heroSilence 18s var(--ease) infinite; z-index: 3;
}
@keyframes heroSilence {
  0%, 32% { opacity: 0; transform: translateX(-50%) scale(0.8); }
  36%, 64% { opacity: 1; transform: translateX(-50%) scale(1); }
  70%, 100% { opacity: 0; transform: translateX(-50%) scale(0.9); }
}
.stage-count {
  position: relative; display: inline-block; min-width: 2ch; height: 1.2em;
  font-family: var(--font-mono); font-variant-numeric: tabular-nums; text-align: center;
}
.stage-count i { position: absolute; inset: 0; font-style: normal; opacity: 0; }
.stage-count i:nth-child(1) { animation: heroCount1 18s steps(1) infinite; }
.stage-count i:nth-child(2) { animation: heroCount2 18s steps(1) infinite; }
.stage-count i:nth-child(3) { animation: heroCount3 18s steps(1) infinite; }
@keyframes heroCount1 { 0%, 39% { opacity: 1; } 39.01%, 100% { opacity: 0; } }
@keyframes heroCount2 { 39.01%, 44% { opacity: 1; } 0%, 39%, 44.01%, 100% { opacity: 0; } }
@keyframes heroCount3 { 44.01%, 64% { opacity: 1; } 0%, 44%, 64.01%, 100% { opacity: 0; } }

/* 要注意 badge fires (③) */
.stage-badge {
  position: absolute; left: 50%; top: 47%; transform: translate(-50%, -50%) scale(0);
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 20px; border-radius: 999px; background: var(--alert); color: #fff;
  font-weight: 800; font-size: clamp(0.9rem, 3.4vw, 1.15rem); letter-spacing: 0.1em;
  box-shadow: 0 14px 40px -8px rgba(239, 68, 68, 0.7);
  opacity: 0; animation: heroBadge 18s var(--spring) infinite; z-index: 4;
}
@keyframes heroBadge {
  0%, 37% { opacity: 0; transform: translate(-50%, -50%) scale(0); }
  41% { opacity: 1; transform: translate(-50%, -50%) scale(1.08); }
  44% { transform: translate(-50%, -50%) scale(1); }
  55% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  60%, 100% { opacity: 0; transform: translate(-50%, -50%) scale(0.9); }
}
.stage-badge-ping {
  position: absolute; inset: 0; border-radius: inherit;
  border: 2px solid rgba(255, 255, 255, 0.75); animation: heroBadgePing 18s var(--ease) infinite;
}
@keyframes heroBadgePing {
  0%, 39% { transform: scale(1); opacity: 0; }
  43% { opacity: 0.9; transform: scale(1); }
  52%, 100% { transform: scale(1.7); opacity: 0; }
}

/* support message flies in from the manager (④) */
.stage-toast {
  position: absolute; right: 6%; top: 56%; max-width: 56%;
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 12px; border-radius: 12px; background: var(--panel); color: #fff;
  font-size: clamp(0.62rem, 2.4vw, 0.8rem); font-weight: 700; line-height: 1.35;
  box-shadow: 0 16px 40px -12px rgba(11, 15, 20, 0.6); border-left: 3px solid var(--blue);
  opacity: 0; animation: heroToast 18s var(--spring) infinite; z-index: 5;
}
/* The toast clears by 66% (11.9s) so act ⑤ owns the lower-right anchor it
   shares with the rep's reply bubble. */
@keyframes heroToast {
  0%, 48% { opacity: 0; transform: translate(60%, -80%) scale(0.7); }
  53% { opacity: 1; transform: translate(0, 0) scale(1.03); }
  55% { transform: translate(0, 0) scale(1); }
  63% { opacity: 1; transform: translate(0, 0) scale(1); }
  66%, 100% { opacity: 0; transform: translate(0, 0) scale(0.95); }
}
.stage-toast-check {
  flex: none; width: 16px; height: 16px; border-radius: 50%;
  background: var(--good); color: #fff; display: grid; place-items: center;
  font-size: 0.62rem; font-weight: 900;
}

/* 改善傾向 pill (⑤) */
.stage-pill {
  position: absolute; left: 50%; top: 47%; transform: translate(-50%, -50%) scale(0);
  padding: 7px 18px; border-radius: 999px; background: var(--good); color: #fff;
  font-weight: 800; font-size: clamp(0.82rem, 3.2vw, 1.05rem); letter-spacing: 0.08em;
  box-shadow: 0 12px 30px -10px var(--good);
  opacity: 0; animation: heroPill 18s var(--spring) infinite; z-index: 4;
}
/* The conclusion of the whole story, so it gets the longest hold of any beat:
   opacity 1 from 82.5% to 99.5% = 17% × 18s ≈ 3.1s. It fires while the
   customer's reply is still on screen, so the status flip reads as *caused by*
   the exchange rather than as a detached label. */
@keyframes heroPill {
  0%, 80% { opacity: 0; transform: translate(-50%, -50%) scale(0); }
  82.5% { opacity: 1; transform: translate(-50%, -50%) scale(1.06); }
  84% { transform: translate(-50%, -50%) scale(1); }
  99.5% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(0.9); }
}

/* mini floor: one room lights up red in sync with the deal's downturn */
.stage-floor { display: flex; gap: 6px; padding: 12px 16px 0; }
.fr { flex: 1; height: 16px; border-radius: 5px; background: var(--floor-ok); border: 1px solid var(--line); }
.fr-hot { animation: heroFloorHot 18s var(--ease) infinite; }
@keyframes heroFloorHot {
  0%, 35% { background: var(--floor-ok); border-color: var(--line); }
  44%, 68% { background: var(--floor-warn); border-color: rgba(239, 68, 68, 0.55); }
  80%, 100% { background: var(--floor-ok); border-color: var(--line); }
}
.stage-caption { margin: 10px 16px 2px; font-size: 0.76rem; color: var(--ink-2); text-align: center; }

/* =========================================================================
   NARRATIVE — pixel-avatar tiles + scroll-linked degradation ring
   (app.js adds .stage-1/.stage-2/.stage-3 on <section class="narrative"> as
   it scrolls through; without JS the existing pure-CSS loop still plays)
   ========================================================================= */
.tile .ra-avatar { width: 46%; height: auto; }
.tile-cust .ra-avatar { opacity: 0.96; }
.narrative .meet { transition: border-color 0.6s var(--ease), box-shadow 0.6s var(--ease); }
.narrative.stage-2 .meet {
  border-color: rgba(245, 158, 11, 0.5);
  box-shadow: 0 0 0 1px rgba(245, 158, 11, 0.4), 0 30px 80px -30px rgba(0, 0, 0, 0.8);
}
.narrative.stage-3 .meet {
  border-color: rgba(239, 68, 68, 0.6);
  box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.5), 0 30px 80px -30px rgba(0, 0, 0, 0.8);
}

/* =========================================================================
   FEATURES ① — mini floor: small meeting-room cards, one turning red.
   Same tint language as the hero's mini floor bar (.fr / .fr-hot).
   ========================================================================= */
.mock-floor { grid-template-columns: repeat(3, 1fr); gap: 10px; align-content: center; }
.floor-card {
  position: relative;
  aspect-ratio: 5 / 4;
  border-radius: 10px;
  background: var(--floor-ok);
  border: 1px solid rgba(16, 185, 129, 0.35);
  display: grid;
  place-items: center;
}
/* small conference table so the card reads as a room, not a swatch */
.floor-card::before {
  content: "";
  width: 54%;
  height: 26%;
  border-radius: 7px;
  background: #bd8a50;
  border: 1px solid #8c6136;
  margin-bottom: 4px;
}
.fc-name {
  position: absolute;
  left: 50%;
  top: 6px;
  transform: translateX(-50%);
  max-width: calc(100% - 8px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.58rem;
  font-weight: 700;
  color: var(--ink-2);
  line-height: 1.4;
}
.fc-status {
  position: absolute;
  left: 50%;
  bottom: 6px;
  transform: translateX(-50%);
  white-space: nowrap;
  font-size: 0.62rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--good-ink);
  line-height: 1.4;
}

/* --- the live room: one card walks 良好 → 注意 → 要注意 on the shared clock,
   so the card demonstrates "state changes while you watch the list". The tint,
   the border and the label all switch on the same beats. --- */
.fc-live { animation: fcRoom var(--feat-loop) var(--ease) infinite; }
@keyframes fcRoom {
  0%, 24% { background: var(--floor-ok); border-color: rgba(16, 185, 129, 0.35); }
  34%, 52% { background: var(--floor-caution); border-color: rgba(245, 158, 11, 0.55); }
  62%, 90% { background: var(--floor-warn); border-color: rgba(239, 68, 68, 0.55); }
  100% { background: var(--floor-ok); border-color: rgba(16, 185, 129, 0.35); }
}
/* the three labels occupy one slot and cross-cut, so the pill never reflows */
.fc-stack {
  display: grid;
  min-width: 4.6em;
  text-align: center;
  animation: fcPill var(--feat-loop) var(--ease) infinite;
}
.fc-stack i { grid-area: 1 / 1; font-style: normal; opacity: 0; }
.fc-stack i:first-child { opacity: 1; }
.fc-stack i:nth-child(1) { animation: fcLabel1 var(--feat-loop) steps(1) infinite; }
.fc-stack i:nth-child(2) { animation: fcLabel2 var(--feat-loop) steps(1) infinite; }
.fc-stack i:nth-child(3) { animation: fcLabel3 var(--feat-loop) steps(1) infinite; }
@keyframes fcLabel1 { 0%, 29% { opacity: 1; } 29.01%, 95% { opacity: 0; } 95.01%, 100% { opacity: 1; } }
@keyframes fcLabel2 { 0%, 29% { opacity: 0; } 29.01%, 57% { opacity: 1; } 57.01%, 100% { opacity: 0; } }
@keyframes fcLabel3 { 0%, 57% { opacity: 0; } 57.01%, 95% { opacity: 1; } 95.01%, 100% { opacity: 0; } }
/* pill colour follows the same beats as the labels */
@keyframes fcPill {
  0%, 29% { background: rgba(255, 255, 255, 0.92); color: var(--good-ink); }
  29.01%, 57% { background: var(--caution); color: #fff; }
  57.01%, 95% { background: var(--alert); color: #fff; }
  95.01%, 100% { background: rgba(255, 255, 255, 0.92); color: var(--good-ink); }
}

/* =========================================================================
   FEATURES ④ — the delivery beat. Everything below runs on the shared
   --feat-loop clock so this card breathes with its four neighbours:
     0–9%    the composer lands, the caret blinks (the manager is typing)
     20%     the send button is pressed
     22–37%  the message drops onto the rep's screen as a full toast
     40–47%  the ✓ confirms it was delivered
     37–88%  hold on the received state (readable, quiet)
     95–100% clear, ready to replay
   Without JS (or before the scene is revealed) the received state is simply
   visible and static — the feature still explains itself with zero motion.
   ========================================================================= */
.send-check {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: var(--good);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 0.6rem;
  font-weight: 900;
}
.js .scene .send-check { opacity: 0; }
.js .scene.is-in .send-check { animation: supCheck var(--feat-loop) var(--spring) infinite; }
.js .scene.is-in .send-btn { animation: supPress var(--feat-loop) var(--spring) infinite; }
.js .scene.is-in .sup-caret { animation: supCaret var(--feat-loop) steps(1) infinite; }
@keyframes supCheck {
  0%, 36% { opacity: 0; transform: scale(0); }
  42% { opacity: 1; transform: scale(1.3); }
  47%, 88% { opacity: 1; transform: scale(1); }
  95%, 100% { opacity: 0; transform: scale(0.9); }
}

/* =========================================================================
   FEATURES — transcription speaker chips carry a mini pixel avatar
   ========================================================================= */
.stt-who { display: inline-flex; align-items: center; gap: 5px; }
/* 16x20px = one CSS px per sprite cell on the 16-col grid (crisp) */
.stt-mini { width: 16px; height: 20px; }
.stt-mini .ra-avatar,
.stt-mini.ra-avatar { width: 16px; height: 20px; }

/* =========================================================================
   JOURNEY — each step is a tinted mini meeting-room scene (red→blue→green),
   revealed with the existing stagger; a state label overlays the scene.
   ========================================================================= */
.j-screen { min-height: 0; padding: 0; overflow: hidden; }
.j-screen .room-scene { display: block; width: 100%; height: auto; }
.j-overlay {
  position: absolute; inset: 0; display: grid; place-items: center; gap: 10px;
  align-content: center; padding: 12px; pointer-events: none;
}
/* Keep the 要注意 pill in the mid-band (matching 改善傾向 in step 3) so it never
   covers the monitor tiles' 先方 labels above. */
.j-alert .j-overlay { align-content: center; justify-items: center; }

/* Step 2: pair the suggestion bubble with the send button on one row, so the
   paper-plane reads as "send this coaching" instead of floating over the table.
   Both sit in the same mid-band as the step 1/3 pills for a consistent layout. */
.j-send .j-overlay {
  grid-auto-flow: column;
  align-content: center;
  justify-content: center;
  align-items: center;
  gap: 9px;
  padding-inline: 16px;
}
.j-send .j-bubble { max-width: 168px; font-size: 0.78rem; }

/* =========================================================================
   Reduced motion — freeze the hero on the ⑤ "improved" frame; stop the rest
   ========================================================================= */
@media (prefers-reduced-motion: reduce) {
  .stage-scene .room-scene__floor { fill: var(--floor-ok) !important; }
  .stage-monitor { opacity: 1 !important; }
  .stage-warn-ring { opacity: 0 !important; }
  .stage-scene .room-scene__tile { stroke: rgba(245, 158, 11, 0.35) !important; stroke-width: 1.25 !important; }
  .stage-avatar { transform: none !important; opacity: 1 !important; }
  .stage-avatar-glow { opacity: 1 !important; transform: scale(1) !important; }
  .stage-bubble--cp, .stage-bubble--own,
  .stage-silence, .stage-badge, .stage-badge-ping, .stage-toast { opacity: 0 !important; }
  /* keep act ⑤'s spoken recovery visible — the frozen frame should still read
     as "the rep ran the advice and the customer leaned back in" */
  .stage-bubble--cp2, .stage-bubble--own2 { opacity: 1 !important; transform: scale(1) !important; }
  /* In motion these three appear in sequence and never share the screen for
     long; frozen they all coexist, so park the pill in the empty left-middle
     of the floor instead of the centre, where it would sit on the rep's line. */
  .stage-pill {
    opacity: 1 !important;
    left: 24% !important;
    top: 62% !important;
    transform: translate(-50%, -50%) scale(1) !important;
  }
  .fr-hot { background: var(--floor-ok) !important; border-color: var(--line) !important; }
  .stage-rec i { opacity: 0.5 !important; }
  /* ---------------------------------------------------------------------
     FEATURES — each card freezes on its *finished* frame, i.e. the state the
     loop was travelling toward, so the demo still explains the feature with
     zero motion. ① 要注意 room ② alert delivered ③ 78:22 / 18秒
     ④ message sent + ✓ ⑤ full transcript.
     --------------------------------------------------------------------- */
  /* ① the live room has already turned 要注意 */
  .fc-live {
    animation: none !important;
    background: var(--floor-warn) !important;
    border-color: rgba(239, 68, 68, 0.55) !important;
  }
  .fc-stack { animation: none !important; background: var(--alert) !important; color: #fff !important; }
  .fc-stack i { opacity: 0 !important; }
  .fc-stack i:nth-child(3) { opacity: 1 !important; }
  /* ② the 要注意 toast has landed */
  .toast-live { opacity: 1 !important; transform: none !important; }
  /* ③ the metrics rest on the degraded end values */
  .mm-num i { opacity: 0 !important; }
  .mm-num i:nth-child(3) { opacity: 1 !important; }
  .mm-rep { width: 78% !important; }
  /* ④ frozen on "delivered": composer + full message on the rep's screen + ✓,
     with the typing caret gone since nothing is being typed any more */
  .sup-caret { opacity: 0 !important; }
  .send-btn { transform: none !important; }
  .send-check { opacity: 1 !important; transform: none !important; }
  /* ⑤ every transcript line present */
  .stt-line { opacity: 1 !important; transform: none !important; }
}
