:root {
  color-scheme: light;
  --paper: #fff8ef;
  --surface: #fffdfa;
  --surface-soft: #f8f4ef;
  --ink: #24324e;
  --ink-soft: #5c6679;
  --ink-faint: #808898;
  --line: #e8dfd7;
  --line-strong: #d9cec4;
  --cobalt: #2f5fc2;
  --cobalt-dark: #244a9c;
  --cobalt-soft: #edf3ff;
  --coral: #e96f61;
  --coral-dark: #aa473e;
  --coral-soft: #fff0ec;
  --jade: #318d75;
  --jade-dark: #246b5b;
  --jade-soft: #edf8f3;
  --warm: #fff1df;
  --apricot: #f8c891;
  --butter: #fff4c9;
  --shadow-card: 0 30px 78px rgb(90 67 44 / 12%), 0 5px 18px rgb(72 57 40 / 6%);
  --shadow-control: 0 13px 28px rgb(47 95 194 / 22%), 0 3px 7px rgb(47 95 194 / 17%);
  --font-sans: "Avenir Next", "Hiragino Sans", "Yu Gothic UI", "Yu Gothic", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-friendly: ui-rounded, "Hiragino Maru Gothic ProN", "Avenir Next", "Hiragino Sans", system-ui, sans-serif;
}

* { box-sizing: border-box; }

html {
  min-width: 320px;
  scroll-behavior: smooth;
  background: var(--paper);
}

body {
  min-width: 320px;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 8% 9%, rgb(248 200 145 / 35%), transparent 25rem),
    radial-gradient(circle at 92% 21%, rgb(180 220 209 / 34%), transparent 27rem),
    linear-gradient(180deg, #fffaf4 0%, #fffdf9 58%, #fff8ef 100%);
  font-family: var(--font-sans);
  font-size: 18px;
  line-height: 1.58;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button, textarea, summary { font: inherit; }
button, summary, a { -webkit-tap-highlight-color: transparent; }
button, summary { cursor: pointer; }
button:disabled { cursor: default; }
svg { display: block; }
[hidden] { display: none !important; }

.shell {
  width: min(1160px, calc(100% - 64px));
  margin-inline: auto;
}

.site-header {
  border-bottom: 1px solid rgb(232 223 215 / 75%);
  background: rgb(255 250 244 / 82%);
  backdrop-filter: blur(18px);
}

.topbar {
  min-height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.wordmark {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  font-size: 1.38rem;
  font-family: var(--font-friendly);
  font-weight: 780;
  letter-spacing: -0.035em;
}

.wordmark-mark {
  width: 37px;
  height: 37px;
  fill: none;
  stroke: var(--cobalt);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.35;
}

.help-link {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 6px;
  color: var(--ink);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 680;
}

.help-link span {
  width: 25px;
  height: 25px;
  display: grid;
  place-items: center;
  border: 1.5px solid currentColor;
  border-radius: 50%;
  font-size: 0.82rem;
}

.app-shell { padding: 0 0 78px; }
.relay-section { position: relative; padding-top: 26px; overflow-x: clip; }
.relay-section::before,
.relay-section::after {
  position: absolute;
  z-index: -1;
  border-radius: 50%;
  filter: blur(1px);
  pointer-events: none;
  content: "";
}
.relay-section::before { top: 155px; left: -95px; width: 210px; height: 210px; background: rgb(255 226 198 / 54%); }
.relay-section::after { top: 390px; right: -82px; width: 180px; height: 180px; background: rgb(204 232 222 / 52%); }

.relay-intro {
  max-width: 900px;
  margin-inline: auto;
  text-align: center;
}

.connection-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 5px 13px;
  color: var(--ink-soft);
  border: 1px solid rgb(49 141 117 / 16%);
  border-radius: 999px;
  background: rgb(255 255 255 / 72%);
  font-size: 0.76rem;
  font-weight: 680;
}

.connection-status::before {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #9ca5b4;
  content: "";
}

.connection-status[data-connected="true"] { color: var(--jade-dark); }
.connection-status[data-connected="true"]::before {
  background: var(--jade);
  box-shadow: 0 0 0 5px rgb(38 153 121 / 10%);
}

.relay-intro h1 {
  margin: 9px auto 3px;
  font-size: clamp(2.25rem, 4vw, 3.5rem);
  font-family: var(--font-friendly);
  font-weight: 760;
  letter-spacing: -0.055em;
  line-height: 1.13;
  text-wrap: balance;
}

.relay-intro > p {
  max-width: 670px;
  margin: 7px auto 0;
  color: var(--ink-soft);
  font-size: 1rem;
}

.mobile-break { display: none; }

.journey-progress {
  width: min(820px, 100%);
  margin: 26px auto 18px;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  list-style: none;
}

.journey-progress li {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  min-height: 62px;
  padding: 9px 14px;
  color: #8a94a6;
  border: 1px solid transparent;
  border-radius: 18px;
  background: rgb(255 255 255 / 48%);
  font-size: 0.87rem;
  font-weight: 680;
}

.journey-progress li:not(:last-child)::after {
  display: none;
}

.journey-progress li > span {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  color: #fff;
  border-radius: 12px;
  background: #a8b0be;
  font-size: 0.95rem;
  font-weight: 760;
  transition: background-color 260ms ease, transform 260ms ease;
}

.journey-progress li[aria-current="step"] {
  color: var(--cobalt-dark);
  border-color: rgb(47 95 194 / 16%);
  background: rgb(255 255 255 / 88%);
  box-shadow: 0 10px 25px rgb(84 64 46 / 8%);
}
.journey-progress li[aria-current="step"]::before {
  position: absolute;
  top: -12px;
  right: 12px;
  padding: 2px 9px;
  color: #fff;
  border-radius: 999px;
  background: var(--coral);
  font-size: 0.59rem;
  font-weight: 760;
  letter-spacing: 0.03em;
}
html[lang="ja"] .journey-progress li[aria-current="step"]::before { content: "いまここ"; }
html[lang="en"] .journey-progress li[aria-current="step"]::before { content: "YOU ARE HERE"; }
.journey-progress li[aria-current="step"] > span {
  background: var(--cobalt);
  box-shadow: 0 0 0 7px rgb(20 84 216 / 9%);
  transform: scale(1.04);
}

.journey-progress li[data-complete="true"] { color: var(--cobalt); }
.journey-progress li[data-complete="true"] > span { background: var(--jade); }
.journey-progress li[data-complete="true"]::after { background: var(--jade); }

.relay-stage {
  width: min(880px, 100%);
  margin-inline: auto;
  scroll-margin-top: 22px;
}

#progress-title:focus,
#policy-title:focus,
#helper-title:focus,
#handoff-preview:focus {
  outline: 3px solid rgb(20 84 216 / 45%);
  outline-offset: 6px;
  border-radius: 9px;
}
#handoff-preview, #how-it-works { scroll-margin-top: 22px; }

.relay-primary {
  position: relative;
  min-height: 510px;
  overflow: hidden;
  border: 1px solid rgb(217 206 196 / 88%);
  border-radius: 32px;
  background: linear-gradient(160deg, rgb(255 255 255 / 96%), rgb(255 252 247 / 96%));
  box-shadow: var(--shadow-card);
}

.journey-screen {
  width: min(740px, calc(100% - 80px));
  margin-inline: auto;
  padding: 30px 0 24px;
}

.screen-progress,
.screen-result,
.screen-brief { display: none; }

.relay-stage[data-story-state="running"] .screen-ready,
.relay-stage[data-story-state="safe-result"] .screen-ready,
.relay-stage[data-story-state="brief-running"] .screen-ready,
.relay-stage[data-story-state="paused"] .screen-ready,
.relay-stage[data-story-state="complete"] .screen-ready,
.relay-stage[data-story-state="blocked"] .screen-ready { display: none; }

.relay-stage[data-story-state="running"] .screen-progress { display: grid; }
.relay-stage[data-story-state="safe-result"] .screen-result,
.relay-stage[data-story-state="blocked"] .screen-result { display: block; }
.relay-stage[data-story-state="brief-running"] .screen-brief,
.relay-stage[data-story-state="paused"] .screen-brief,
.relay-stage[data-story-state="complete"] .screen-brief { display: block; }

.screen-kicker {
  margin: 0;
  color: var(--cobalt);
  font-size: 0.73rem;
  font-weight: 760;
  letter-spacing: 0.055em;
}

.journey-screen h2 {
  margin: 4px 0 17px;
  color: var(--ink);
  font-size: clamp(1.45rem, 2.7vw, 2rem);
  font-family: var(--font-friendly);
  font-weight: 760;
  letter-spacing: -0.04em;
  line-height: 1.25;
}

.companion-cue {
  display: flex;
  align-items: center;
  gap: 15px;
  margin: 0 0 22px;
  padding: 14px 17px;
  border-radius: 20px;
  background: linear-gradient(110deg, #fff0df, #fff7eb 58%, #edf8f3);
  box-shadow: inset 0 0 0 1px rgb(224 148 95 / 12%);
}

.companion-mark {
  width: 50px;
  height: 50px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  color: var(--coral);
  border-radius: 17px;
  background: rgb(255 255 255 / 78%);
  box-shadow: 0 7px 18px rgb(135 85 50 / 10%);
}

.companion-mark svg { width: 32px; height: 32px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 2.35; }
.companion-cue > div { display: grid; gap: 2px; line-height: 1.4; }
.companion-cue strong { font-family: var(--font-friendly); font-size: 1rem; }
.companion-cue span:not(.companion-mark) { color: var(--ink-soft); font-size: 0.8rem; }

.message-card {
  overflow: hidden;
  border: 1px solid #e3d7cc;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 10px 28px rgb(85 61 42 / 8%);
}

.message-sender {
  min-height: 76px;
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 13px 20px;
  border-bottom: 1px solid #edf0f4;
}

.sender-avatar {
  width: 46px;
  height: 46px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  color: #9a7661;
  border-radius: 50%;
  background: #f5ebe3;
}

.sender-avatar svg { width: 29px; height: 29px; fill: currentColor; }
.message-sender > div { display: grid; line-height: 1.32; }
.message-sender strong { font-size: 0.97rem; }
.message-sender span { color: var(--ink-faint); font-size: 0.78rem; }

.message-body { padding: 18px 22px 17px; }
.message-body p { margin: 0 0 10px; font-size: 1.02rem; line-height: 1.55; }
.suspicious-link {
  display: block;
  overflow: hidden;
  color: var(--cobalt);
  font-size: 0.91rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.synthetic-note {
  min-height: 46px;
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0;
  padding: 10px 20px;
  color: var(--ink-soft);
  background: #fff7e7;
  font-size: 0.77rem;
  font-weight: 620;
}

.synthetic-note svg, .trust-promise svg {
  width: 21px;
  height: 21px;
  flex: 0 0 auto;
  fill: none;
  stroke: var(--cobalt);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.desktop-start, .mobile-start { margin-top: 10px; }
.mobile-start { display: none; }

.next-action-cue {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  margin: 19px 0 0;
  color: var(--cobalt-dark);
  font-family: var(--font-friendly);
  font-size: 0.91rem;
  font-weight: 760;
}

.next-action-cue > span {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  color: #fff;
  border-radius: 50%;
  background: var(--coral);
  box-shadow: 0 6px 14px rgb(233 111 97 / 24%);
  animation: gentleNudge 1.9s ease-in-out infinite;
}

.button {
  min-height: 54px;
  border: 0;
  border-radius: 18px;
  font-weight: 740;
  letter-spacing: -0.015em;
  transition: transform 160ms ease, box-shadow 160ms ease, background-color 160ms ease, opacity 160ms ease;
}

.button:focus-visible,
summary:focus-visible,
.wordmark:focus-visible,
.help-link:focus-visible,
textarea:focus-visible {
  outline: 4px solid rgb(20 84 216 / 26%);
  outline-offset: 4px;
}

.button-primary {
  width: 100%;
  min-height: 64px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 12px 24px;
  color: #fff;
  background: linear-gradient(135deg, #3d72db, var(--cobalt-dark));
  box-shadow: var(--shadow-control);
  font-size: 1.12rem;
}

.button-primary > svg {
  width: 27px;
  height: 27px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.button-primary:not(:disabled):hover { transform: translateY(-2px); box-shadow: 0 14px 30px rgb(20 84 216 / 24%); }
.button-primary:not(:disabled):active { transform: translateY(1px) scale(0.995); box-shadow: 0 5px 13px rgb(20 84 216 / 17%); }
.button-primary:disabled { opacity: 0.55; }

.trust-promise {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  margin: 14px 0 0;
  color: var(--jade-dark);
  font-size: 0.82rem;
  font-weight: 680;
}

.screen-progress {
  min-height: 440px;
  place-items: center;
  align-content: center;
  background: radial-gradient(circle at 50% 33%, rgb(255 240 215 / 62%), transparent 230px);
  text-align: center;
}

.progress-orb {
  position: relative;
  width: 92px;
  height: 92px;
  display: grid;
  place-items: center;
  margin-bottom: 17px;
  color: var(--cobalt);
  border-radius: 50%;
  background: linear-gradient(145deg, #fff4d9, #edf3ff);
  box-shadow: 0 13px 28px rgb(81 65 47 / 10%);
}

.progress-orb > span {
  position: absolute;
  inset: -8px;
  border: 2px solid rgb(20 84 216 / 10%);
  border-top-color: var(--cobalt);
  border-radius: 50%;
  animation: spin 2.4s linear infinite;
}

.progress-orb svg { width: 44px; height: 44px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
.progress-live { min-height: 116px; display: grid; place-items: center; align-content: center; }
.progress-counter { margin: 0 0 5px; color: var(--cobalt); font-size: 0.78rem; font-weight: 780; letter-spacing: 0.035em; }
.screen-progress h2 { max-width: 620px; margin: 0 auto 7px; }
.progress-live > p:last-child { max-width: 580px; margin: 0; color: var(--ink-soft); }
.stay-cue { margin: 21px 0 0; padding: 8px 14px; color: var(--jade-dark); border-radius: 999px; background: rgb(237 248 243 / 82%); font-size: 0.82rem; font-weight: 700; }

.calm-loader { display: flex; gap: 8px; margin-top: 26px; }
.calm-loader i { width: 9px; height: 9px; border-radius: 50%; background: var(--cobalt); animation: calmDot 1.6s ease-in-out infinite; }
.calm-loader i:nth-child(2) { animation-delay: 180ms; }
.calm-loader i:nth-child(3) { animation-delay: 360ms; }

.screen-result { padding-top: 30px; padding-bottom: 25px; }
.result-hero { display: flex; align-items: center; gap: 20px; margin-bottom: 18px; padding: 18px 20px; border-radius: 23px; background: linear-gradient(115deg, #fff0ec, #fff8ec); }
.result-stop {
  width: 72px;
  height: 72px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  color: var(--coral);
  border-radius: 50%;
  background: var(--coral-soft);
}
.result-stop svg { width: 41px; height: 41px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 2; }
.result-hero h2 { margin: 2px 0; color: var(--coral); font-size: clamp(1.65rem, 3vw, 2.35rem); }
.result-hero > div > p:last-child { margin: 0; color: var(--ink-soft); }

.result-reassurance {
  min-height: 76px;
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  align-items: center;
  gap: 13px;
  margin-top: 10px;
  padding: 12px 15px;
  border: 0;
  border-radius: 18px;
  background: #fff;
}

.result-reassurance:nth-of-type(2) { border-color: rgb(241 95 82 / 25%); background: var(--coral-soft); }
.result-reassurance:nth-of-type(3) { border-color: rgb(38 153 121 / 25%); background: var(--jade-soft); }
.result-icon { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%; color: #fff; }
.result-icon-coral { background: var(--coral); }
.result-icon-jade { background: var(--jade); }
.result-icon svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 2.3; }
.result-reassurance > div { display: grid; line-height: 1.34; }
.result-reassurance strong { font-size: 0.98rem; }
.result-reassurance > div span { margin-top: 3px; color: var(--ink-soft); font-size: 0.84rem; }
.step-state { min-width: 75px; padding: 5px 8px; border-radius: 999px; color: var(--ink-soft); background: rgb(255 255 255 / 72%); font-size: 0.68rem; font-weight: 760; text-align: center; }
.result-reassurance[data-state="active"] { box-shadow: 0 0 0 3px rgb(20 84 216 / 10%); }
.result-reassurance[data-state="blocked"] .step-state { color: var(--coral-dark); }
.result-reassurance[data-state="done"] .step-state { color: var(--jade-dark); }

.result-choice { margin-top: 18px; padding: 17px 18px 8px; border-radius: 22px; background: #f2f6ff; text-align: center; }
.result-choice > p { margin: 0 auto 13px; color: var(--ink-soft); font-size: 0.94rem; }
.result-choice .button-primary { width: min(520px, 100%); }
.choice-label { display: inline-block; margin-bottom: 4px; color: var(--cobalt-dark); font-size: 0.72rem; font-weight: 780; letter-spacing: 0.06em; }
.button-quiet { display: block; min-height: 46px; margin: 4px auto 0; padding: 6px 18px; color: var(--ink-soft); background: transparent; font-size: 0.82rem; }
.button-quiet:hover { color: var(--cobalt); }

.screen-brief { padding-top: 28px; }
.helper-heading { display: flex; align-items: center; gap: 16px; margin-bottom: 18px; }
.helper-icon { width: 58px; height: 58px; flex: 0 0 auto; display: grid; place-items: center; color: var(--cobalt); border-radius: 18px; background: linear-gradient(145deg, #fff1db, var(--cobalt-soft)); }
.helper-icon svg { width: 31px; height: 31px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
.helper-heading h2 { margin: 2px 0; }
.helper-heading > div > span { color: var(--jade-dark); font-size: 0.78rem; font-weight: 720; }

.brief-placeholder { min-height: 290px; display: grid; place-items: center; align-content: center; gap: 18px; padding: 30px; border-radius: 22px; background: linear-gradient(145deg, #fff6e8, #f1f6ff); text-align: center; }
.brief-placeholder p { margin: 0; color: var(--ink-soft); }
.progress-orb-small { width: 72px; height: 72px; margin: 0; }
.progress-orb-small svg { width: 34px; height: 34px; }

.handoff-preview { display: grid; grid-template-columns: minmax(190px, 0.34fr) minmax(0, 1fr); gap: 12px; }
.preview-heading { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 2px; }
.preview-heading p { margin: 0; font-weight: 740; }
.preview-heading strong { color: var(--jade-dark); font-size: 0.76rem; }
.preview-block { min-width: 0; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-soft); }
.preview-block h3 { margin: 0 0 5px; color: var(--cobalt-dark); font-size: 0.84rem; }
.preview-value { max-width: 100%; margin: 0; overflow-wrap: anywhere; white-space: pre-wrap; color: var(--ink); font-family: var(--font-sans); font-size: 0.94rem; line-height: 1.56; }
#handoff-payload { max-height: 170px; overflow: auto; padding-right: 5px; }
.raw-preview { grid-column: 1 / -1; }
.raw-preview > summary { min-height: 42px; display: flex; align-items: center; color: var(--ink-soft); font-size: 0.72rem; font-weight: 680; list-style: none; }
.raw-preview > summary::after { margin-left: 7px; color: var(--cobalt); content: "＋"; }
.raw-preview[open] > summary::after { content: "−"; }
.raw-preview .preview-value { max-height: 200px; overflow: auto; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: #fff; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.68rem; }
.button-confirm { grid-column: 1 / -1; min-height: 58px; display: inline-flex; align-items: center; justify-content: center; gap: 10px; color: #fff; background: var(--cobalt); box-shadow: var(--shadow-control); }
.button-confirm svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 2; }
.button-confirm:disabled { opacity: 0.5; }
.button-confirm:not(:disabled):hover { transform: translateY(-1px); }
.confirmation-note { grid-column: 1 / -1; margin: -3px 0 0; color: var(--ink-soft); font-size: 0.72rem; text-align: center; }

.safety-promise-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  padding: 16px 24px 18px;
  border-top: 1px solid rgb(232 223 215 / 76%);
  background: rgb(255 250 244 / 62%);
}

.safety-promise-grid > div {
  min-width: 0;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 1px 9px;
  align-content: center;
  min-height: 70px;
  padding: 10px 12px;
  border-radius: 16px;
  background: rgb(255 255 255 / 82%);
  box-shadow: inset 0 0 0 1px rgb(217 206 196 / 54%);
}

.safety-promise-grid > div > span {
  grid-row: 1 / 3;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  color: var(--jade-dark);
  border-radius: 12px;
  background: var(--jade-soft);
  font-size: 0.78rem;
  font-weight: 800;
}

.safety-promise-grid strong { align-self: end; font-family: var(--font-friendly); font-size: 0.82rem; line-height: 1.3; }
.safety-promise-grid small { align-self: start; color: var(--ink-soft); font-size: 0.65rem; line-height: 1.35; }

.status-dock {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  padding: 11px 28px;
  border-top: 1px solid rgb(49 141 117 / 14%);
  background: linear-gradient(100deg, #eaf7f1, #f6fbf8);
}

.status-dock-icon { width: 42px; height: 42px; flex: 0 0 auto; display: grid; place-items: center; color: var(--jade); border-radius: 15px; background: #fff; box-shadow: 0 7px 16px rgb(36 107 91 / 10%); }
.status-dock-icon svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
.status-dock-copy { display: grid; gap: 1px; }
.status-dock-copy > span { color: var(--jade-dark); font-size: 0.65rem; font-weight: 780; letter-spacing: 0.06em; }

.story-status { display: flex; align-items: center; justify-content: flex-start; gap: 9px; margin: 0; color: var(--ink); font-size: 0.83rem; font-weight: 720; text-align: left; }
.story-status::before { width: 9px; height: 9px; flex: 0 0 auto; border-radius: 50%; background: #9ca5b4; content: ""; }
.story-status[data-state="running"] { color: var(--cobalt-dark); }
.story-status[data-state="running"]::before { background: var(--cobalt); box-shadow: 0 0 0 5px rgb(20 84 216 / 10%); animation: statusPulse 1.5s ease-in-out infinite; }
.story-status[data-state="safe-result"], .story-status[data-state="paused"], .story-status[data-state="complete"] { color: var(--jade-dark); }
.story-status[data-state="safe-result"]::before, .story-status[data-state="paused"]::before, .story-status[data-state="complete"]::before { background: var(--jade); }
.story-status[data-state="blocked"] { color: var(--coral-dark); }
.story-status[data-state="blocked"]::before { background: var(--coral); }
.mobile-status { display: none; }

.tool-provenance, .decision-details, .other-concern {
  margin-top: 16px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgb(255 255 255 / 84%);
  box-shadow: 0 10px 26px rgb(84 64 46 / 5%);
}
.tool-provenance > summary { min-height: 86px; display: grid; grid-template-columns: minmax(230px, 1fr) auto 40px; align-items: center; gap: 18px; padding: 13px 18px 13px 24px; border-radius: 20px; list-style: none; }
.tool-provenance > summary:hover { background: rgb(255 247 237 / 72%); }
.tool-provenance > summary::-webkit-details-marker, .decision-details > summary::-webkit-details-marker, .other-concern > summary::-webkit-details-marker, .raw-preview > summary::-webkit-details-marker { display: none; }
.proof-copy { display: grid; line-height: 1.25; }
.proof-copy > span { color: var(--ink-soft); font-size: 0.72rem; font-weight: 680; }
.proof-copy > strong { margin-top: 3px; color: var(--ink); font-family: var(--font-friendly); font-size: 1rem; }
.progress-readout { display: flex; align-items: center; gap: 14px; }
.tool-progress-status { color: var(--ink-soft); font-size: 0.72rem; font-weight: 680; }
.progress-dots { display: flex; gap: 5px; }
.progress-dots i { width: 8px; height: 8px; border-radius: 50%; background: #d8dde5; }
.tool-provenance:has(.tool-route[data-progress="1"]) .progress-dots i:nth-child(-n + 1),
.tool-provenance:has(.tool-route[data-progress="2"]) .progress-dots i:nth-child(-n + 2),
.tool-provenance:has(.tool-route[data-progress="3"]) .progress-dots i:nth-child(-n + 3),
.tool-provenance:has(.tool-route[data-progress="4"]) .progress-dots i:nth-child(-n + 4),
.tool-provenance:has(.tool-route[data-progress="5"]) .progress-dots i:nth-child(-n + 5) { background: var(--cobalt); }
.summary-chevron { width: 30px; height: 30px; padding: 5px; fill: none; stroke: var(--cobalt); border-radius: 50%; background: var(--cobalt-soft); stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; transition: transform 180ms ease; }
.tool-provenance[open] .summary-chevron { transform: rotate(180deg); }
.tool-route { margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); border-top: 1px solid var(--line); list-style: none; }
.tool-route li { min-width: 0; min-height: 118px; display: grid; grid-template-columns: 28px 1fr; align-content: center; gap: 5px 8px; padding: 13px; border-right: 1px solid var(--line); }
.tool-route li:last-child { border-right: 0; }
.tool-index { width: 28px; height: 28px; display: grid; place-items: center; color: var(--ink-faint); border-radius: 50%; background: #eef1f5; font-size: 0.63rem; font-weight: 760; }
.tool-route code { min-width: 0; align-self: center; overflow-wrap: anywhere; color: var(--ink); font-size: 0.68rem; font-weight: 700; }
.tool-purpose { grid-column: 2; color: var(--ink-soft); font-size: 0.68rem; }
.tool-route .step-state { grid-column: 2; justify-self: start; padding: 4px 7px; font-size: 0.61rem; }
.tool-route li[data-state="active"] { background: var(--cobalt-soft); }
.tool-route li[data-state="active"] .tool-index { color: #fff; background: var(--cobalt); }
.tool-route li[data-state="done"] .tool-index { color: #fff; background: var(--jade); }
.tool-route li[data-state="blocked"] .tool-index { color: #fff; background: var(--coral); }

.decision-details { border: 0; border-radius: 18px; background: rgb(255 255 255 / 48%); box-shadow: none; }
.decision-details > summary, .other-concern > summary { min-height: 68px; display: flex; align-items: center; justify-content: center; color: var(--ink-soft); font-size: 0.77rem; font-weight: 680; list-style: none; }
.decision-details > summary > span { display: grid; gap: 1px; text-align: center; }
.decision-details > summary strong { color: var(--ink); font-size: 0.82rem; }
.decision-details > summary small { color: var(--ink-faint); font-size: 0.68rem; }
.decision-details > summary::after { margin-left: 12px; color: var(--cobalt); content: "＋"; }
.decision-details[open] > summary::after { content: "−"; }
.decision-details > p { margin: 0 0 8px; color: var(--ink-soft); font-size: 0.72rem; text-align: center; }
.event-log { max-height: 250px; overflow: auto; margin: 0; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: #0d1730; color: #dbe7ff; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.68rem; line-height: 1.55; white-space: pre-wrap; }

.other-concern { width: min(880px, 100%); margin: 46px auto 0; overflow: hidden; border-color: rgb(236 187 129 / 38%); background: linear-gradient(115deg, #fff1df, #fff9ed); }
.other-concern > summary { min-height: 92px; justify-content: flex-start; gap: 15px; padding: 12px 22px; font-size: 0.82rem; }
.other-concern > summary > span:last-child { display: grid; gap: 2px; }
.other-concern > summary strong { color: var(--ink); font-family: var(--font-friendly); font-size: 1rem; }
.other-concern > summary small { color: var(--ink-soft); font-size: 0.75rem; }
.other-concern-icon { width: 48px; height: 48px; flex: 0 0 auto; display: grid; place-items: center; color: #fff; border-radius: 16px; background: var(--coral); font-size: 1.35rem; font-weight: 500; box-shadow: 0 8px 18px rgb(233 111 97 / 20%); transition: transform 180ms ease; }
.other-concern[open] .other-concern-icon { transform: rotate(45deg); }
.rehearsal { padding: 0 24px 24px; }
.rehearsal h2 { margin: 0; font-size: 1.35rem; }
.rehearsal-copy p { margin: 3px 0 15px; color: var(--ink-soft); font-size: 0.85rem; }
.problem-form { display: grid; gap: 8px; }
.problem-form label { font-size: 0.78rem; font-weight: 720; }
.problem-form textarea { width: 100%; min-height: 100px; padding: 13px; resize: vertical; color: var(--ink); border: 1px solid var(--line-strong); border-radius: 12px; background: #fff; font-size: 0.93rem; line-height: 1.5; }
.button-secondary { min-height: 52px; color: var(--cobalt-dark); border: 1px solid rgb(20 84 216 / 30%); background: #fff; }
.human-status { margin-top: 10px; color: var(--ink-soft); font-size: 0.75rem; }

.site-footer { border-top: 1px solid rgb(232 223 215 / 72%); background: rgb(248 244 239 / 76%); }
.footer-inner { min-height: 100px; display: flex; align-items: center; justify-content: space-between; gap: 30px; padding-block: 20px; }
.footer-inner p { max-width: 620px; margin: 0; color: var(--ink-soft); font-size: 0.72rem; }
.footer-inner p:last-child { text-align: right; }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes calmDot { 0%, 60%, 100% { opacity: 0.28; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-4px); } }
@keyframes statusPulse { 0%, 100% { box-shadow: 0 0 0 4px rgb(20 84 216 / 7%); } 50% { box-shadow: 0 0 0 8px rgb(20 84 216 / 13%); } }
@keyframes gentleNudge { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(4px); } }

@media (max-width: 900px) {
  .shell { width: min(100% - 36px, 860px); }
  .journey-screen { width: min(720px, calc(100% - 48px)); }
  .tool-route { grid-template-columns: 1fr; }
  .tool-route li { min-height: 70px; grid-template-columns: 30px minmax(150px, 1fr) minmax(140px, 1fr) auto; align-items: center; border-right: 0; border-bottom: 1px solid var(--line); }
  .tool-route li:last-child { border-bottom: 0; }
  .tool-purpose, .tool-route .step-state { grid-column: auto; }
}

@media (min-width: 701px) and (max-height: 900px) {
  .relay-stage[data-story-state="ready"] .desktop-start {
    position: fixed;
    z-index: 30;
    right: 0;
    bottom: 0;
    left: 0;
    margin: 0;
    padding: 20px max(24px, calc((100vw - 760px) / 2)) 16px;
    background: linear-gradient(180deg, rgb(255 250 243 / 0%), rgb(255 250 243 / 94%) 30%, rgb(255 250 243 / 99%));
  }

  .relay-stage[data-story-state="ready"] .desktop-start .button {
    width: 100%;
    max-width: 760px;
    margin-inline: auto;
  }
}

@media (max-width: 700px) {
  body { font-size: 17px; }
  .shell { width: min(100% - 28px, 640px); }
  .topbar { min-height: 64px; }
  .wordmark { gap: 7px; font-size: 1.2rem; }
  .wordmark-mark { width: 32px; height: 32px; }
  .help-link { font-size: 0.76rem; }
  .help-link span { width: 22px; height: 22px; }
  .app-shell { padding-bottom: 48px; }
  .relay-section { padding-top: 18px; }
  .relay-section::before { left: -130px; }
  .relay-section::after { right: -120px; }
  .relay-intro h1 { max-width: 13ch; margin-top: 9px; font-size: clamp(1.95rem, 9.4vw, 2.55rem); line-height: 1.16; }
  .relay-intro > p { max-width: 33ch; margin-top: 8px; font-size: 0.9rem; line-height: 1.55; }
  .connection-status { min-height: 32px; font-size: 0.68rem; }
  .mobile-break { display: initial; }
  .journey-progress { gap: 6px; margin: 22px auto 13px; }
  .journey-progress li { min-height: 61px; flex-direction: column; justify-content: center; gap: 4px; padding: 7px 3px; border-radius: 14px; font-size: 0.68rem; line-height: 1.2; text-align: center; }
  .journey-progress li[aria-current="step"]::before { top: -10px; right: 50%; padding-inline: 7px; font-size: 0.52rem; transform: translateX(50%); white-space: nowrap; }
  .journey-progress li > span { width: 32px; height: 32px; }
  .journey-progress li:not(:last-child)::after { top: 16px; left: calc(50% + 26px); width: calc(100% - 52px); }
  .relay-primary { min-height: 0; border-radius: 24px; box-shadow: 0 18px 46px rgb(90 67 44 / 11%); }
  .journey-screen { width: calc(100% - 28px); padding: 20px 0 17px; }
  .journey-screen h2 { margin-bottom: 12px; font-size: 1.35rem; }
  .companion-cue { align-items: flex-start; gap: 11px; margin-bottom: 18px; padding: 12px; border-radius: 17px; }
  .companion-mark { width: 42px; height: 42px; border-radius: 14px; }
  .companion-mark svg { width: 27px; height: 27px; }
  .companion-cue strong { font-size: 0.9rem; line-height: 1.45; }
  .companion-cue span:not(.companion-mark) { margin-top: 2px; font-size: 0.73rem; }
  .message-sender { min-height: 64px; padding: 10px 13px; }
  .sender-avatar { width: 40px; height: 40px; }
  .message-body { padding: 13px 15px 12px; }
  .message-body p { margin-bottom: 7px; font-size: 0.93rem; }
  .suspicious-link { font-size: 0.78rem; }
  .synthetic-note { min-height: 42px; padding: 8px 13px; font-size: 0.69rem; }
  .desktop-start { display: none; }
  .next-action-cue { align-items: flex-start; margin-top: 16px; font-size: 0.8rem; line-height: 1.4; text-align: left; }
  .next-action-cue > span { width: 27px; height: 27px; flex: 0 0 auto; }
  .mobile-start { display: block; margin-top: 9px; }
  .relay-stage[data-story-state="ready"] .mobile-start {
    position: fixed;
    z-index: 30;
    right: 0;
    bottom: 0;
    left: 0;
    margin: 0;
    padding: 18px 14px max(14px, env(safe-area-inset-bottom));
    background: linear-gradient(180deg, rgb(255 250 243 / 0%), rgb(255 250 243 / 94%) 28%, rgb(255 250 243 / 98%));
  }
  .relay-stage[data-story-state="ready"] .mobile-start .button {
    width: min(100%, 420px);
    margin-inline: auto;
  }
  .button-primary { min-height: 61px; padding-inline: 16px; font-size: 1rem; }
  .button-primary > svg { width: 25px; height: 25px; }
  .trust-promise { margin-top: 11px; font-size: 0.72rem; }
  .trust-promise svg { width: 19px; height: 19px; }
  .screen-progress { min-height: 430px; }
  .progress-orb { width: 82px; height: 82px; }
  .progress-live { min-height: 142px; }
  .progress-counter { font-size: 0.72rem; }
  .progress-live > p:last-child { font-size: 0.87rem; }
  .stay-cue { max-width: 31ch; border-radius: 16px; font-size: 0.76rem; line-height: 1.45; }
  .result-hero { align-items: flex-start; gap: 13px; margin-bottom: 14px; }
  .result-stop { width: 54px; height: 54px; }
  .result-stop svg { width: 33px; height: 33px; }
  .result-hero h2 { font-size: 1.4rem; line-height: 1.35; }
  .result-hero > div > p:last-child { font-size: 0.88rem; }
  .result-reassurance { grid-template-columns: 40px minmax(0, 1fr); gap: 10px; min-height: 82px; padding: 10px; }
  .result-icon { width: 38px; height: 38px; }
  .result-reassurance .step-state { display: none; }
  .result-reassurance strong { font-size: 0.98rem; }
  .result-reassurance > div span { font-size: 0.84rem; }
  .result-choice { margin-top: 14px; padding: 14px 11px 7px; }
  .result-choice > p { font-size: 0.88rem; line-height: 1.55; }
  .screen-brief { padding-top: 19px; }
  .helper-heading { gap: 11px; margin-bottom: 13px; }
  .helper-icon { width: 48px; height: 48px; border-radius: 14px; }
  .helper-icon svg { width: 27px; height: 27px; }
  .helper-heading h2 { font-size: 1.2rem; }
  .handoff-preview { grid-template-columns: 1fr; }
  .preview-heading { align-items: flex-start; flex-direction: column; gap: 3px; }
  .preview-block, .raw-preview, .button-confirm, .confirmation-note { grid-column: 1; }
  #handoff-payload { max-height: 230px; }
  .safety-promise-grid { grid-template-columns: 1fr; gap: 7px; padding: 12px; }
  .safety-promise-grid > div { min-height: 62px; padding: 8px 10px; }
  .safety-promise-grid strong { font-size: 0.8rem; }
  .safety-promise-grid small { font-size: 0.66rem; }
  .status-dock { min-height: 74px; gap: 10px; padding: 10px 12px; }
  .status-dock-icon { width: 39px; height: 39px; border-radius: 13px; }
  .status-dock-copy > span { font-size: 0.6rem; }
  .desktop-status { display: none; }
  .mobile-status { display: flex; }
  .story-status { justify-content: flex-start; font-size: 0.73rem; line-height: 1.42; text-align: left; }
  .tool-provenance > summary { min-height: 82px; grid-template-columns: minmax(0, 1fr) 34px; gap: 10px; padding: 11px 12px 11px 15px; }
  .proof-copy > span { font-size: 0.66rem; }
  .proof-copy > strong { font-size: 0.88rem; }
  .progress-readout { grid-column: 1; grid-row: 2; justify-content: space-between; }
  .summary-chevron { grid-column: 2; grid-row: 1 / 3; }
  .tool-progress-status { font-size: 0.66rem; }
  .tool-route li { min-height: 82px; grid-template-columns: 30px minmax(0, 1fr) auto; gap: 4px 8px; padding: 10px; }
  .tool-purpose { grid-column: 2; }
  .tool-route .step-state { grid-column: 3; grid-row: 1 / 3; }
  .decision-details > summary { min-height: 72px; }
  .other-concern { margin-top: 36px; }
  .other-concern > summary { min-height: 88px; gap: 12px; padding-inline: 15px; }
  .other-concern-icon { width: 44px; height: 44px; border-radius: 14px; }
  .other-concern > summary strong { font-size: 0.9rem; }
  .other-concern > summary small { font-size: 0.69rem; }
  .rehearsal { padding-inline: 16px; }
  .footer-inner { min-height: 130px; align-items: flex-start; flex-direction: column; justify-content: center; gap: 8px; }
  .footer-inner p:last-child { text-align: left; }
}

@media (max-width: 360px) {
  .shell { width: min(100% - 20px, 340px); }
  .relay-intro h1 { font-size: 1.84rem; }
  .journey-progress li strong { font-size: 0.63rem; }
  .journey-screen { width: calc(100% - 22px); }
  .button-primary { font-size: 0.94rem; }
  .trust-promise { font-size: 0.67rem; }
  .result-reassurance { grid-template-columns: 36px minmax(0, 1fr); }
  .result-icon { width: 34px; height: 34px; }
  .preview-value { font-size: 0.77rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    scroll-behavior: auto !important;
    transform: none !important;
    transition-duration: 0.01ms !important;
    animation: none !important;
  }
}
