/* =========================================================
   THE MONOLITH — Account Creation (CH.II / S.America)
   World-canon reskin: 廃墟の素朴さ × モノリスの発光テック
   ========================================================= */

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  color-scheme: dark;

  /* Official Color System (from world_setting.html) */
  --c-bg: #0a0b10;
  --c-bg-soft: #12141c;
  --c-bg-mid: #1a1d28;
  --c-bg-edge: #20232f;

  --c-text: #e6e8ee;
  --c-text-dim: #9ca3af;
  --c-text-mute: #5a6068;

  --c-accent: #5EEAD4; /* ターコイズ */
  --c-accent-dim: #3acbb0;
  --c-accent-deep: #1a7a68;
  --c-accent-soft: rgba(94, 234, 212, 0.12);

  --c-ruin: #c49d83;
  --c-ruin-dim: #8a6f5a;
  --c-ruin-deep: #5a4a3a;

  --c-sunset: #e8a3c0;
  --c-invade: #5a7a3a;
  --c-danger: #e94560;
  --c-danger-dim: #8a1d30;

  --chapter-accent: var(--c-accent);
  --chapter-glow: rgba(94, 234, 212, 0.18);
  --chapter-tint: rgba(94, 234, 212, 0.06);
  --safe-area-bottom: env(safe-area-inset-bottom, 0px);
  --viewport-offset-bottom: 0px;
  --visual-viewport-height: 100vh;

  /* Sizing & motion */
  --radius: 6px;
  --radius-sm: 3px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 18px;
  --transition: 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);

  --shadow-card: 0 24px 60px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(94, 234, 212, 0.06) inset;
  --shadow-glow: 0 0 24px rgba(94, 234, 212, 0.18);

  /* Fonts */
  --font-display: 'Gill Sans', 'Gill Sans Nova', 'Gill Sans MT', 'Seravek',
    'Zen Kaku Gothic New', 'Noto Sans JP', sans-serif;
  --font-body: 'Gill Sans', 'Gill Sans Nova', 'Gill Sans MT', 'Seravek',
    'Zen Kaku Gothic New', 'Noto Sans JP', -apple-system, BlinkMacSystemFont,
    sans-serif;
  --font-tech: 'Orbitron', 'Gill Sans', 'Seravek', 'Zen Kaku Gothic New',
    sans-serif;
  --font-heading-en: 'Gill Sans', 'Gill Sans Nova', 'Gill Sans MT', 'Seravek',
    sans-serif;
  --font-heading-ja: 'Zen Kaku Gothic New', 'Noto Sans JP', -apple-system,
    BlinkMacSystemFont, 'Hiragino Sans', sans-serif;
}

html,
body {
  margin: 0;
  min-height: 100%;
  height: 100%;
}

html {
  background-color: var(--c-bg);
}

body {
  font-family: var(--font-body);
  color: var(--c-text);
  background: transparent;
  -webkit-font-smoothing: antialiased;
  position: relative;
  overflow-x: hidden;
}

/* =========================================================
   Background Layers
   ========================================================= */

.bg-image {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  z-index: -4;
  background-color: var(--c-bg);
  pointer-events: none;
  user-select: none;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-color: var(--c-bg);
  z-index: -5;
}

.overlay-dark {
  position: fixed;
  inset: 0;
  background:
    linear-gradient(
      180deg,
      rgba(10, 11, 16, 0.6) 0%,
      rgba(10, 11, 16, 0.7) 40%,
      rgba(10, 11, 16, 0.82) 75%,
      rgba(10, 11, 16, 0.92) 100%
    ),
    radial-gradient(
      ellipse 80% 60% at center,
      rgba(10, 11, 16, 0) 0%,
      rgba(10, 11, 16, 0.3) 100%
    );
  pointer-events: none;
  z-index: -3;
}

body::after {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' seed='7'/><feColorMatrix values='0 0 0 0 0.78  0 0 0 0 0.62  0 0 0 0 0.51  0 0 0 0.22 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  background-size: 240px;
  opacity: 0.12;
  mix-blend-mode: overlay;
  pointer-events: none;
  z-index: -2;
}

.grid-layer {
  position: fixed;
  inset: 0;
  background-image: linear-gradient(
      to right,
      rgba(94, 234, 212, 0.025) 1px,
      transparent 1px
    ),
    linear-gradient(to bottom, rgba(94, 234, 212, 0.025) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
  z-index: -1;
  opacity: 0.5;
}

.pulse-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
}

.pulse-layer::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(
    ellipse 65% 45% at 50% 35%,
    rgba(94, 234, 212, 0.18) 0%,
    rgba(94, 234, 212, 0.06) 40%,
    rgba(94, 234, 212, 0) 72%
  );
  mix-blend-mode: screen;
  animation: pulseCore 6s ease-in-out infinite;
  will-change: opacity, transform;
}

.pulse-layer::after {
  content: '';
  position: absolute;
  inset: 0;
  box-shadow: inset 0 0 180px 40px rgba(94, 234, 212, 0.1);
  mix-blend-mode: screen;
  animation: pulseEdge 6s ease-in-out infinite;
  animation-delay: -1.2s;
  will-change: opacity;
}

@keyframes pulseCore {
  0%,
  100% {
    opacity: 0.5;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.08);
  }
}

@keyframes pulseEdge {
  0%,
  100% {
    opacity: 0.4;
  }
  50% {
    opacity: 1;
  }
}

/* Particles */
.particle-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  overflow: hidden;
}

.particle {
  position: absolute;
  width: 2px;
  height: 2px;
  background: var(--c-accent);
  border-radius: 50%;
  opacity: 0;
  box-shadow: 0 0 8px rgba(94, 234, 212, 0.7);
  animation: particleRise 14s linear infinite;
}

.particle:nth-child(1) { left: 6%;  animation-delay: 0s;    animation-duration: 16s; }
.particle:nth-child(2) { left: 18%; animation-delay: 2s;    animation-duration: 12s; }
.particle:nth-child(3) { left: 32%; animation-delay: 4s;    animation-duration: 18s; }
.particle:nth-child(4) { left: 46%; animation-delay: 1s;    animation-duration: 13s; }
.particle:nth-child(5) { left: 58%; animation-delay: 3s;    animation-duration: 17s; }
.particle:nth-child(6) { left: 72%; animation-delay: 5s;    animation-duration: 14s; }
.particle:nth-child(7) { left: 84%; animation-delay: 0.5s;  animation-duration: 19s; }
.particle:nth-child(8) { left: 94%; animation-delay: 2.5s;  animation-duration: 15s; }

@keyframes particleRise {
  0% {
    transform: translateY(110vh) scale(0.6);
    opacity: 0;
  }
  10% {
    opacity: 0.8;
  }
  90% {
    opacity: 0.6;
  }
  100% {
    transform: translateY(-10vh) scale(1);
    opacity: 0;
  }
}

/* =========================================================
   App shell + brand
   ========================================================= */

button,
input,
textarea {
  font: inherit;
  color: inherit;
}

button {
  border: none;
  background: transparent;
  cursor: pointer;
}

a {
  color: var(--c-accent);
}

.app-shell {
  position: relative;
  width: min(100%, 760px);
  margin: 0 auto;
  padding: 24px 16px max(56px, calc(56px + var(--safe-area-bottom)));
  z-index: 1;
}

.app-frame[data-step='chat'] {
  gap: 14px;
}

body.is-chat-step:not(.is-handheld-layout) .app-shell {
  min-height: var(--visual-viewport-height);
  max-height: var(--visual-viewport-height);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  padding-bottom: 24px;
  overflow: hidden;
}

body.is-chat-step:not(.is-handheld-layout) .app-frame[data-step='chat'] {
  min-height: 0;
  grid-template-rows: auto minmax(0, 1fr);
}

body.is-chat-step:not(.is-handheld-layout) .app-frame[data-step='chat'] .chat-panel {
  min-height: 0;
  height: 100%;
}

.app-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  margin-bottom: 18px;
  border: 1px solid rgba(94, 234, 212, 0.18);
  border-radius: var(--radius-lg);
  background: linear-gradient(
    180deg,
    rgba(18, 20, 28, 0.78) 0%,
    rgba(10, 11, 16, 0.85) 100%
  );
  box-shadow: 0 0 0 1px rgba(94, 234, 212, 0.04) inset,
    0 12px 40px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(10px);
}

.brand-icon {
  width: 32px;
  height: 44px;
  color: var(--c-accent);
  filter: drop-shadow(0 0 6px rgba(94, 234, 212, 0.45));
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.brand-title {
  font-family: var(--font-heading-en);
  font-weight: 600;
  letter-spacing: 0.18em;
  font-size: 16px;
  color: var(--c-text);
}

.brand-sub {
  font-family: var(--font-tech);
  font-size: 10px;
  letter-spacing: 0.24em;
  color: var(--c-accent);
  text-transform: uppercase;
}

/* =========================================================
   Typography
   ========================================================= */

h1,
h2,
h3,
p {
  margin: 0;
}

h1,
h2 {
  font-family: var(--font-heading-ja);
  letter-spacing: 0.02em;
  color: var(--c-text);
  text-shadow: 0 0 18px rgba(94, 234, 212, 0.1);
}

h1 {
  font-size: clamp(20px, 4.6vw, 28px);
  line-height: 1.35;
  font-weight: 700;
}

h2 {
  font-size: clamp(17px, 3.8vw, 22px);
  line-height: 1.4;
  font-weight: 700;
}

h3 {
  font-family: var(--font-heading-ja);
  font-size: clamp(14px, 3vw, 16px);
  line-height: 1.5;
  font-weight: 600;
  color: var(--c-text);
  letter-spacing: 0.02em;
}

.subtitle,
.meta-text,
.help,
.details-copy,
.bubble-note,
.receipt,
.complete-lead {
  color: var(--c-text-dim);
  line-height: 1.8;
  font-size: 13px;
}

.complete-lead {
  color: var(--c-text);
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--c-accent);
  font-family: var(--font-tech);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

/* =========================================================
   Frame & panels
   ========================================================= */

.app-frame {
  display: grid;
  gap: 18px;
}

.panel {
  position: relative;
  background: linear-gradient(
    180deg,
    rgba(18, 20, 28, 0.78) 0%,
    rgba(10, 11, 16, 0.88) 100%
  );
  border: 1px solid rgba(94, 234, 212, 0.14);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(14px);
  overflow: hidden;
}

.panel::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(
    180deg,
    rgba(94, 234, 212, 0.06) 0%,
    transparent 30%
  );
}

.hero-panel,
.content-panel,
.loading-panel,
.chat-panel {
  padding: 22px 22px 24px;
}

.hero-panel {
  display: grid;
  gap: 18px;
}

.hero-copy {
  display: grid;
  gap: 10px;
}

.hero-actions,
.button-row,
.composer-actions,
.chat-meta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

/* =========================================================
   Pills, badges
   ========================================================= */

.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 36px;
  padding: 7px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(94, 234, 212, 0.18);
  color: var(--c-text-dim);
  font-family: var(--font-tech);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.pill.active {
  background: var(--c-accent-soft);
  border-color: rgba(94, 234, 212, 0.55);
  color: var(--c-accent);
  box-shadow: 0 0 12px rgba(94, 234, 212, 0.18);
}

/* =========================================================
   Status banners
   ========================================================= */

.status-banner {
  border-radius: var(--radius-md);
  padding: 12px 14px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.status-banner.success {
  background: rgba(94, 234, 212, 0.08);
  border: 1px solid rgba(94, 234, 212, 0.4);
  color: var(--c-accent);
}

.status-banner.error {
  background: rgba(233, 69, 96, 0.08);
  border: 1px solid rgba(233, 69, 96, 0.4);
  color: #ff8aa0;
}

/* =========================================================
   Loader (intro loading)
   ========================================================= */

.loading-panel {
  min-height: 56vh;
  display: grid;
  place-items: center;
  text-align: center;
  gap: 18px;
}

.loader-box {
  display: grid;
  gap: 16px;
  justify-items: center;
  width: 100%;
}

.loader-track {
  width: min(100%, 640px);
  padding: 18px 16px;
  border-radius: var(--radius-md);
  background: rgba(10, 11, 16, 0.6);
  border: 1px solid rgba(94, 234, 212, 0.28);
  box-shadow: 0 0 0 1px rgba(94, 234, 212, 0.08) inset,
    0 0 24px rgba(94, 234, 212, 0.08);
}

.loader-step-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 6px;
}

.loader-step-box {
  aspect-ratio: 1;
  min-height: 22px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(94, 234, 212, 0.18);
  transition: transform 0.18s ease, background 0.18s ease,
    box-shadow 0.18s ease, border-color 0.18s ease;
}

.loader-step-box.filled {
  background: var(--c-accent);
  border-color: var(--c-accent);
  box-shadow: 0 0 10px rgba(94, 234, 212, 0.6);
}

.loader-step-box.current {
  background: var(--c-accent-dim);
  border-color: var(--c-accent);
  box-shadow: 0 0 14px rgba(94, 234, 212, 0.7);
  animation: loader-step-tap 0.6s ease-in-out infinite alternate;
}

.loader-progress {
  font-family: var(--font-tech);
  font-size: 30px;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: var(--c-accent);
  text-shadow: 0 0 16px rgba(94, 234, 212, 0.5);
}

@keyframes loader-step-tap {
  0% {
    transform: translateY(0);
  }
  100% {
    transform: translateY(-2px);
  }
}

/* =========================================================
   Section heading
   ========================================================= */

.section-head {
  display: grid;
  gap: 10px;
  margin-bottom: 18px;
}

/* =========================================================
   Video panel
   ========================================================= */

.video-panel {
  display: grid;
  gap: 20px;
}

.video-purpose-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
}

.info-card {
  display: grid;
  gap: 10px;
  padding: 18px;
  border: 1px solid rgba(94, 234, 212, 0.16);
  border-radius: var(--radius-lg);
  background: rgba(10, 11, 16, 0.5);
}

.info-card p,
.step-list {
  color: var(--c-text-dim);
  line-height: 1.8;
  font-size: 13px;
}

.note-text {
  color: var(--c-text-mute);
  font-size: 12px;
}

.info-card-label,
.progress-kicker {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--c-accent-soft);
  border: 1px solid rgba(94, 234, 212, 0.4);
  color: var(--c-accent);
  font-family: var(--font-tech);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.step-list {
  margin: 0;
  padding-left: 20px;
}

.step-list li {
  margin-bottom: 4px;
}

.step-list li::marker {
  color: var(--c-accent);
}

.video-frame {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #000;
  border: 1px solid rgba(94, 234, 212, 0.2);
  box-shadow: 0 0 24px rgba(94, 234, 212, 0.08),
    0 0 0 1px rgba(94, 234, 212, 0.05) inset;
}

.video-frame iframe,
.video-frame video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: #000;
}

.video-frame--pending {
  display: grid;
  place-items: center;
  color: var(--c-text-mute);
  background:
    radial-gradient(ellipse 60% 50% at 50% 50%, rgba(94, 234, 212, 0.05), transparent 70%),
    #05070a;
}

.video-pending-message {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 8px;
  padding: 20px;
  text-align: center;
}

.video-pending-message strong {
  color: var(--c-text);
}

.video-guide-notice {
  display: grid;
  gap: 8px;
}

.video-action-row {
  justify-content: center;
}

.video-next-button {
  min-width: min(100%, 340px);
}

.inline-link {
  color: var(--c-accent);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px dashed rgba(94, 234, 212, 0.4);
}

.inline-link:hover {
  border-bottom-color: var(--c-accent);
  text-shadow: 0 0 12px rgba(94, 234, 212, 0.4);
}

/* =========================================================
   Chat panel
   ========================================================= */

.chat-panel {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  min-height: 72vh;
  padding: 0;
  overflow: hidden;
  isolation: isolate;
}

.chat-panel.single-column {
  grid-template-columns: minmax(0, 1fr);
}

.chat-head {
  padding: 20px 22px 14px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  border-bottom: 1px solid rgba(94, 234, 212, 0.12);
  background: linear-gradient(
    180deg,
    rgba(94, 234, 212, 0.05),
    rgba(94, 234, 212, 0)
  );
}

.chat-guide-panel {
  padding: 16px 22px 0;
}

.question-guide {
  display: grid;
  gap: 12px;
}

.question-guide-head {
  display: grid;
  gap: 6px;
}

.question-guide-head strong {
  font-size: 13px;
  letter-spacing: 0.08em;
  color: var(--c-text);
}

.question-guide-list {
  display: grid;
  gap: 10px;
}

.question-item {
  padding: 0;
  overflow: hidden;
  transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
}

.question-item.answered {
  border-color: rgba(94, 234, 212, 0.22);
  background: rgba(94, 234, 212, 0.02);
}

.question-item.active {
  border-color: rgba(94, 234, 212, 0.42);
  box-shadow: 0 0 0 1px rgba(94, 234, 212, 0.08) inset,
    0 0 18px rgba(94, 234, 212, 0.08);
}

.question-item summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
}

.question-item summary:hover {
  background: rgba(94, 234, 212, 0.035);
}

.question-item summary::-webkit-details-marker {
  display: none;
}

.question-item summary::after {
  content: '+';
  flex: 0 0 auto;
  font-family: var(--font-tech);
  font-size: 16px;
  color: var(--c-accent);
  transition: transform var(--transition);
}

.question-item[open] summary::after {
  transform: rotate(45deg);
}

.question-item-summary-copy {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.question-item-index {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(94, 234, 212, 0.08);
  border: 1px solid rgba(94, 234, 212, 0.28);
  color: var(--c-accent);
  font-family: var(--font-tech);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.question-item-label {
  color: var(--c-text);
  font-weight: 600;
  line-height: 1.6;
}

.question-item-state {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  font-family: var(--font-tech);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--c-text-mute);
  white-space: nowrap;
}

.question-item-state.current {
  border-color: rgba(94, 234, 212, 0.4);
  background: rgba(94, 234, 212, 0.08);
  color: var(--c-accent);
}

.question-item-state.done {
  border-color: rgba(94, 234, 212, 0.2);
  color: rgba(94, 234, 212, 0.82);
}

.question-item-body {
  display: grid;
  gap: 12px;
  padding: 0 16px 16px;
  color: var(--c-text-dim);
  font-size: 13px;
  line-height: 1.85;
}

.question-example {
  display: grid;
  gap: 8px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  background: rgba(94, 234, 212, 0.06);
  border: 1px solid rgba(94, 234, 212, 0.16);
}

.question-example strong {
  color: var(--c-text);
  font-size: 12px;
  letter-spacing: 0.04em;
}

.question-example p {
  color: var(--c-text-dim);
  line-height: 1.85;
}

.chat-scroll {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 0;
  padding: 20px 22px 18px;
  overflow: auto;
  overflow-anchor: none;
  overscroll-behavior-y: contain;
  scroll-behavior: auto;
  scroll-padding-bottom: 18px;
  scrollbar-width: thin;
  scrollbar-color: rgba(94, 234, 212, 0.35) transparent;
}

.chat-scroll::before {
  content: '';
  margin-top: auto;
}

.chat-scroll::-webkit-scrollbar {
  width: 6px;
}
.chat-scroll::-webkit-scrollbar-thumb {
  background: rgba(94, 234, 212, 0.3);
  border-radius: 3px;
}

.chat-progress-panel {
  display: grid;
  gap: 12px;
  padding: 16px 22px;
  border-bottom: 1px solid rgba(94, 234, 212, 0.12);
  background: linear-gradient(
    180deg,
    rgba(94, 234, 212, 0.06),
    rgba(94, 234, 212, 0)
  );
}

.chat-progress-copy {
  display: grid;
  gap: 8px;
}

.chat-progress-copy strong {
  font-family: var(--font-heading-ja);
  font-size: 14px;
  font-weight: 700;
  color: var(--c-text);
  letter-spacing: 0.02em;
}

.chat-progress-bar {
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  overflow: hidden;
  border: 1px solid rgba(94, 234, 212, 0.18);
}

.chat-progress-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(
    90deg,
    var(--c-accent-deep) 0%,
    var(--c-accent) 100%
  );
  box-shadow: 0 0 12px rgba(94, 234, 212, 0.45);
  transition: width 0.18s ease;
}

/* =========================================================
   Bubble (chat messages)
   ========================================================= */

.bubble-row {
  display: flex;
}

.bubble-row.is-chat-flipping {
  transition: transform 260ms cubic-bezier(0.18, 0.88, 0.24, 1);
  will-change: transform;
}

.bubble-row.is-chat-inserting {
  animation: chatInsertRise 280ms cubic-bezier(0.18, 0.9, 0.2, 1) both;
  animation-delay: var(--insert-delay, 0ms);
  will-change: transform, opacity, filter;
}

.bubble-row.is-chat-inserting.motion-monolith-glow {
  animation-name: chatInsertMonolithGlow;
  animation-duration: 320ms;
  animation-timing-function: cubic-bezier(0.16, 0.86, 0.24, 1);
}

.bubble-row.is-chat-inserting.motion-monolith-glow .bubble {
  animation: chatInsertMonolithAccent 320ms cubic-bezier(0.16, 0.86, 0.24, 1) both;
  animation-delay: var(--insert-delay, 0ms);
}

@keyframes chatInsertRise {
  0% {
    opacity: 0;
    filter: blur(2px);
    transform: translate3d(0, 24px, 0) scale(0.985);
  }
  58% {
    opacity: 1;
  }
  100% {
    opacity: 1;
    filter: blur(0);
    transform: translate3d(0, 0, 0) scale(1);
  }
}

@keyframes chatInsertMonolithGlow {
  0% {
    opacity: 0.76;
    filter: drop-shadow(0 0 0 rgba(94, 234, 212, 0));
    transform: translate3d(0, 22px, 0);
  }
  62% {
    opacity: 1;
    filter: drop-shadow(0 0 10px rgba(94, 234, 212, 0.24));
  }
  100% {
    opacity: 1;
    filter: drop-shadow(0 0 0 rgba(94, 234, 212, 0));
    transform: translate3d(0, 0, 0);
  }
}

@keyframes chatInsertMonolithAccent {
  0% {
    border-color: rgba(94, 234, 212, 0.28);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35),
      0 0 0 1px rgba(94, 234, 212, 0.08) inset;
  }
  58% {
    border-color: rgba(94, 234, 212, 0.48);
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.36),
      0 0 0 1px rgba(94, 234, 212, 0.18) inset,
      0 0 14px rgba(94, 234, 212, 0.18);
  }
  100% {
    border-color: inherit;
    box-shadow: inherit;
  }
}

.bubble-row.assistant {
  justify-content: flex-start;
}

.bubble-row.user {
  justify-content: flex-end;
}

.bubble {
  width: min(100%, 540px);
  padding: 14px 16px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(94, 234, 212, 0.16);
  background: rgba(10, 11, 16, 0.7);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  color: var(--c-text);
}

.bubble.assistant {
  border-top-left-radius: 4px;
  background: linear-gradient(
    180deg,
    rgba(26, 29, 40, 0.85) 0%,
    rgba(10, 11, 16, 0.85) 100%
  );
  border-color: rgba(94, 234, 212, 0.28);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35),
    0 0 0 1px rgba(94, 234, 212, 0.06) inset;
}

.bubble.user {
  border-top-right-radius: 4px;
  background: linear-gradient(
    180deg,
    rgba(196, 157, 131, 0.16) 0%,
    rgba(90, 74, 58, 0.18) 100%
  );
  border-color: rgba(196, 157, 131, 0.4);
}

.bubble-author {
  margin-bottom: 6px;
  font-family: var(--font-tech);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--c-text-dim);
}

.bubble.assistant .bubble-author {
  color: var(--c-accent);
}

.bubble.user .bubble-author {
  color: var(--c-ruin);
}

.bubble p {
  line-height: 1.85;
  white-space: pre-wrap;
  font-size: 13.5px;
  color: var(--c-text);
}

.bubble-note {
  margin-top: 10px;
  padding: 10px 12px;
  border: 1px dashed rgba(94, 234, 212, 0.2);
  border-radius: var(--radius-md);
  background: rgba(94, 234, 212, 0.04);
  font-size: 12px;
  color: var(--c-text-dim);
}

.bubble-note summary {
  cursor: pointer;
  color: var(--c-accent);
  font-weight: 600;
  list-style: none;
}

.bubble-note summary::-webkit-details-marker {
  display: none;
}

.bubble-note summary::after {
  content: '＋';
  float: right;
  color: var(--c-accent);
}

.bubble-note[open] summary::after {
  content: '−';
}

.bubble-note p {
  margin-top: 10px;
  line-height: 1.85;
  color: var(--c-text-dim);
}

/* =========================================================
   Composer
   ========================================================= */

.composer {
  position: static;
  z-index: 3;
  margin: 0;
  border: 0;
  border-top: 1px solid rgba(94, 234, 212, 0.12);
  border-radius: 0;
  background: linear-gradient(
    180deg,
    rgba(10, 11, 16, 0.18) 0%,
    rgba(10, 11, 16, 0.88) 34%,
    rgba(10, 11, 16, 0.94) 100%
  );
  box-shadow: none;
  backdrop-filter: blur(18px);
  padding: 16px 18px 18px;
}

.composer-form {
  display: grid;
  gap: 12px;
}

.composer-static {
  display: grid;
  gap: 14px;
}

.composer-box {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid rgba(94, 234, 212, 0.22);
  border-radius: var(--radius-lg);
  background: rgba(10, 11, 16, 0.7);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.composer-box:focus-within {
  border-color: var(--c-accent);
  box-shadow: 0 0 0 3px rgba(94, 234, 212, 0.18),
    0 0 24px rgba(94, 234, 212, 0.18);
}

.composer-actions {
  justify-content: space-between;
  align-items: flex-end;
}

.composer-actions .note-text {
  flex: 1 1 220px;
}

.composer-actions .button,
.button-row .button {
  max-width: 100%;
}

textarea,
input[type='text'] {
  width: 100%;
  border: 1px solid rgba(94, 234, 212, 0.22);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  background: rgba(10, 11, 16, 0.7);
  color: var(--c-text);
  transition: border-color var(--transition), box-shadow var(--transition);
}

textarea::placeholder,
input[type='text']::placeholder {
  color: var(--c-text-mute);
}

textarea {
  min-height: 100px;
  resize: vertical;
  line-height: 1.7;
}

textarea.composer-input {
  min-height: 118px;
  border: none;
  padding: 0;
  resize: none;
  background: transparent;
  max-height: 220px;
}

textarea:focus,
input[type='text']:focus {
  outline: none;
  border-color: var(--c-accent);
  box-shadow: 0 0 0 3px rgba(94, 234, 212, 0.2);
}

textarea.composer-input:focus {
  box-shadow: none;
}

body.is-handheld-layout {
  min-height: var(--visual-viewport-height);
}

body.is-handheld-layout .chat-panel {
  min-height: auto;
  overflow: visible;
}

body.is-handheld-layout .chat-scroll {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior-y: contain;
  scroll-padding-bottom: 0;
}

body.is-handheld-layout .composer {
  position: static;
  margin: 0 14px 14px;
  border: 1px solid rgba(94, 234, 212, 0.14);
  border-radius: calc(var(--radius-xl) - 2px);
  background: linear-gradient(
    180deg,
    rgba(10, 11, 16, 0.78) 0%,
    rgba(10, 11, 16, 0.94) 100%
  );
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.32),
    0 0 0 1px rgba(94, 234, 212, 0.06) inset;
  padding: 16px 18px calc(18px + var(--safe-area-bottom));
}

@media (min-width: 981px) {
  .app-shell {
    width: min(100%, 760px);
    padding: 28px 24px 64px;
  }

  .app-frame[data-step='chat'] .hero-panel {
    padding: 20px 24px;
  }

  .chat-panel {
    min-height: clamp(640px, calc(var(--visual-viewport-height) - 250px), 900px);
  }

  .chat-head {
    padding: 24px 24px 18px;
  }

  .chat-progress-panel {
    padding: 18px 24px 20px;
  }

  .chat-scroll {
    gap: 18px;
    padding: 28px 30px 20px;
    scroll-padding-bottom: 20px;
  }

  .bubble-row.assistant {
    padding-right: 12%;
  }

  .bubble-row.user {
    padding-left: 20%;
  }

  .bubble {
    width: min(100%, 720px);
    padding: 16px 18px;
  }

  .bubble p {
    font-size: 14px;
  }

  .composer-box {
    gap: 10px;
    padding: 14px 16px;
    border-color: rgba(94, 234, 212, 0.16);
    background: rgba(10, 11, 16, 0.54);
  }

  .composer {
    padding: 16px 24px 24px;
  }

  textarea.composer-input {
    min-height: 76px;
    max-height: 180px;
  }

  .composer-actions {
    align-items: center;
  }
}

/* =========================================================
   Buttons
   ========================================================= */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 12px 22px;
  border-radius: 999px;
  font-family: var(--font-body);
  font-weight: 600;
  letter-spacing: 0.06em;
  line-height: 1.45;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  border: 1px solid transparent;
  position: relative;
  white-space: normal;
}

.button.primary {
  background: linear-gradient(
    180deg,
    rgba(94, 234, 212, 0.18) 0%,
    rgba(94, 234, 212, 0.06) 100%
  );
  color: var(--c-accent);
  border-color: var(--c-accent);
  box-shadow: 0 0 0 1px rgba(94, 234, 212, 0.18) inset,
    0 0 18px rgba(94, 234, 212, 0.18);
  text-shadow: 0 0 10px rgba(94, 234, 212, 0.4);
}

.button.primary:hover {
  background: linear-gradient(
    180deg,
    rgba(94, 234, 212, 0.32) 0%,
    rgba(94, 234, 212, 0.12) 100%
  );
  box-shadow: 0 0 0 1px rgba(94, 234, 212, 0.4) inset,
    0 0 24px rgba(94, 234, 212, 0.4);
  transform: translateY(-1px);
}

.button.secondary {
  background: rgba(94, 234, 212, 0.08);
  color: var(--c-accent);
  border-color: rgba(94, 234, 212, 0.3);
}

.button.secondary:hover {
  background: rgba(94, 234, 212, 0.16);
  border-color: var(--c-accent);
}

.button.ghost {
  background: transparent;
  color: var(--c-text-dim);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.button.ghost:hover {
  border-color: rgba(94, 234, 212, 0.3);
  color: var(--c-text);
}

.button.compact {
  min-height: 36px;
  padding: 8px 14px;
  font-size: 13px;
}

.button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* =========================================================
   Notice / details / consent
   ========================================================= */

.notice {
  display: grid;
  gap: 8px;
  border: 1px solid rgba(94, 234, 212, 0.2);
  border-radius: var(--radius-lg);
  background: rgba(10, 11, 16, 0.55);
  padding: 14px 16px;
  color: var(--c-text-dim);
  font-size: 12.5px;
  line-height: 1.75;
}

.notice strong,
.label {
  display: inline-block;
  margin-bottom: 6px;
  font-weight: 600;
  color: var(--c-text);
  letter-spacing: 0.04em;
}

.notice.warning {
  background: rgba(196, 157, 131, 0.1);
  border-color: rgba(196, 157, 131, 0.4);
  color: #e8d4c0;
}

.composer-static .button-row,
.review-panel .button-row,
.complete-panel .button-row,
.video-action-row {
  margin-top: 4px;
}

.notice.warning strong {
  color: var(--c-ruin);
}

.final-review-notice,
.consent-guide-notice {
  background: linear-gradient(
    180deg,
    rgba(94, 234, 212, 0.07),
    rgba(94, 234, 212, 0.02)
  );
  border-color: rgba(94, 234, 212, 0.32);
}

.review-panel,
.complete-panel {
  display: grid;
  gap: 18px;
}

.review-grid {
  display: grid;
  gap: 14px;
}

.review-field {
  display: grid;
  gap: 8px;
}

.review-field textarea {
  min-height: 92px;
}

.review-field .label {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.required {
  color: #ff8aa0;
  font-family: var(--font-tech);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.optional {
  color: var(--c-text-mute);
  font-family: var(--font-tech);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.consent-stack {
  display: grid;
  gap: 12px;
}

.inline-checkbox {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 14px 16px;
  border: 1px solid rgba(94, 234, 212, 0.18);
  border-radius: var(--radius-md);
  background: rgba(10, 11, 16, 0.55);
  color: var(--c-text);
  font-size: 12.5px;
  line-height: 1.7;
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition);
}

.inline-checkbox:hover {
  border-color: rgba(94, 234, 212, 0.35);
  background: rgba(10, 11, 16, 0.7);
}

.inline-checkbox input {
  margin-top: 4px;
  accent-color: var(--c-accent);
  width: 16px;
  height: 16px;
}

details {
  border: 1px solid rgba(94, 234, 212, 0.18);
  border-radius: var(--radius-md);
  background: rgba(10, 11, 16, 0.55);
  padding: 12px 14px;
  color: var(--c-text-dim);
}

details[open] {
  border-color: rgba(94, 234, 212, 0.32);
}

summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--c-text);
  letter-spacing: 0.04em;
}

summary::marker {
  color: var(--c-accent);
}

pre {
  margin: 10px 0 0;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13px;
  line-height: 1.7;
  color: var(--c-text-dim);
  background: rgba(10, 11, 16, 0.55);
  border: 1px solid rgba(94, 234, 212, 0.12);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
}

.center {
  justify-content: center;
}

.hero-actions {
  align-items: flex-start;
}

.receipt {
  font-family: var(--font-tech);
  font-weight: 600;
  letter-spacing: 0.16em;
  font-size: 12px;
  color: var(--c-accent);
  text-transform: uppercase;
}

/* =========================================================
   Selection / focus visible
   ========================================================= */

::selection {
  background: rgba(94, 234, 212, 0.3);
  color: var(--c-bg);
}

button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--c-accent);
  outline-offset: 2px;
}

/* =========================================================
   Mobile
   ========================================================= */

@media (max-width: 640px) {
  .app-shell {
    padding: 16px 12px max(32px, calc(32px + var(--safe-area-bottom)));
  }

  .app-brand {
    padding: 12px 14px;
    gap: 12px;
  }

  .brand-icon {
    width: 26px;
    height: 36px;
  }

  .brand-title {
    font-size: 14px;
  }

  .brand-sub {
    font-size: 9px;
  }

  .hero-panel,
  .content-panel,
  .loading-panel {
    padding: 18px 16px;
  }

  .chat-head,
  .chat-progress-panel,
  .chat-guide-panel,
  .chat-scroll {
    padding-left: 16px;
    padding-right: 16px;
  }

  .composer {
    margin: 0 10px 10px;
    padding: 14px 14px calc(16px + var(--safe-area-bottom));
  }

  .video-purpose-grid {
    grid-template-columns: 1fr;
  }

  .hero-actions,
  .button-row,
  .composer-actions,
  .chat-head,
  .question-item-summary-copy {
    flex-direction: column;
    align-items: stretch;
  }

  .composer-actions .note-text {
    flex-basis: auto;
  }

  .button {
    width: 100%;
  }

  .loader-track {
    padding: 16px 12px;
  }

  .loader-step-grid {
    gap: 4px;
  }

  .loader-step-box {
    min-height: 18px;
  }

  .chat-progress-copy strong {
    font-size: 13px;
  }

  h1 {
    font-size: clamp(18px, 4.4vw, 22px);
  }

  h2 {
    font-size: clamp(16px, 3.8vw, 19px);
  }

  h3 {
    font-size: clamp(13px, 3vw, 15px);
  }

  .bubble p {
    font-size: 13px;
  }
}

/* =========================================================
   Reduced motion
   ========================================================= */

@media (prefers-reduced-motion: reduce) {
  .pulse-layer::before,
  .pulse-layer::after,
  .particle,
  .loader-step-box,
  .chat-progress-bar span,
  .bubble-row,
  .bubble-row.is-chat-flipping,
  .bubble-row.is-chat-inserting,
  .bubble-row.is-chat-inserting .bubble,
  .button,
  .inline-link {
    animation: none !important;
    transition: none !important;
  }

  .loader-step-box.current {
    transform: none !important;
  }

  .bubble-row,
  .bubble-row.is-chat-flipping,
  .bubble-row.is-chat-inserting {
    filter: none !important;
    transform: none !important;
  }
}

/* =========================================================
   Layout Prototype A — compact current structure
   2026-05-07: 独立質問カード + 既存単一カラム圧縮案
   ========================================================= */

body.is-chat-step:not(.is-handheld-layout) .app-shell {
  width: min(100%, 880px);
  padding-top: 12px;
  padding-left: 16px;
  padding-right: 16px;
  padding-bottom: 14px;
}

body.is-chat-step:not(.is-handheld-layout) .app-brand {
  min-height: 48px;
  margin-bottom: 10px;
  padding: 8px 12px;
  gap: 10px;
}

body.is-chat-step:not(.is-handheld-layout) .brand-icon {
  width: 24px;
  height: 34px;
}

body.is-chat-step:not(.is-handheld-layout) .brand-title {
  font-size: 13px;
  letter-spacing: 0.16em;
}

body.is-chat-step:not(.is-handheld-layout) .brand-sub {
  font-size: 8px;
  letter-spacing: 0.18em;
}

body.is-chat-step:not(.is-handheld-layout) .app-frame[data-step='chat'] {
  gap: 0;
}

.chat-panel.layout-a {
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  min-height: 0;
  height: 100%;
}

.layout-a .chat-head {
  padding: 12px 16px 8px;
  align-items: center;
}

.layout-a .chat-head h2 {
  font-size: clamp(16px, 2vw, 20px);
  margin-bottom: 2px;
}

.layout-a .chat-head .meta-text {
  font-size: 12px;
  line-height: 1.45;
}

.layout-a .chat-meta .pill {
  min-height: 28px;
  padding: 5px 10px;
  font-size: 10px;
}

.layout-a .chat-progress-panel {
  grid-template-columns: minmax(190px, 0.48fr) minmax(180px, 1fr);
  align-items: center;
  gap: 12px;
  padding: 9px 16px;
}

.layout-a .chat-progress-copy {
  gap: 3px;
}

.layout-a .chat-progress-copy strong {
  font-size: 13px;
}

.layout-a .chat-progress-copy .meta-text {
  display: none;
}

.layout-a .chat-progress-bar {
  height: 6px;
}

.active-question-card {
  display: grid;
  gap: 8px;
  margin: 12px 16px 0;
  padding: 14px 16px;
  border: 1px solid rgba(94, 234, 212, 0.3);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(135deg, rgba(94, 234, 212, 0.12), rgba(10, 11, 16, 0.72) 52%),
    rgba(10, 11, 16, 0.82);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.22),
    0 0 18px rgba(94, 234, 212, 0.08) inset;
}

.active-question-card.compact {
  margin-top: 10px;
}

.active-question-kicker {
  font-family: var(--font-tech);
  font-size: 10px;
  letter-spacing: 0.18em;
  color: var(--c-accent);
  text-transform: uppercase;
}

.active-question-card h3 {
  margin: 0;
  color: var(--c-text);
  font-size: clamp(15px, 1.8vw, 18px);
  letter-spacing: 0.03em;
}

.active-question-card p {
  color: var(--c-text);
  line-height: 1.75;
  font-size: 14px;
}

.active-question-example {
  margin-top: 2px;
  padding: 9px 11px;
  background: rgba(10, 11, 16, 0.45);
}

.active-question-example p {
  color: var(--c-text-dim);
  font-size: 12.5px;
}

.layout-a .chat-scroll {
  gap: 10px;
  padding: 12px 16px 12px;
}

.layout-a .bubble {
  padding: 12px 14px;
}

.layout-a .bubble p {
  line-height: 1.65;
}

.layout-a .composer {
  padding: 12px 16px 14px;
}

.layout-a .composer-box {
  gap: 10px;
  padding: 13px 14px;
}

.layout-a textarea.composer-input {
  min-height: 96px;
  max-height: 180px;
}

@media (max-width: 640px) {
  .chat-panel.layout-a {
    min-height: 78vh;
  }

  .layout-a .chat-head,
  .layout-a .chat-progress-panel,
  .layout-a .chat-scroll {
    padding-left: 12px;
    padding-right: 12px;
  }

  .layout-a .chat-progress-panel {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .layout-a .chat-progress-copy .meta-text {
    display: block;
  }

  .active-question-card {
    margin-left: 12px;
    margin-right: 12px;
    padding: 12px 13px;
  }

  .layout-a textarea.composer-input {
    min-height: 88px;
  }
}

/* 2026-05-07 YUE quality pass: mobile comparison view tuning */
body.is-chat-step.is-handheld-layout .app-shell {
  padding: 8px 10px calc(12px + var(--safe-area-bottom));
}

body.is-chat-step.is-handheld-layout .app-brand {
  display: none;
}

body.is-chat-step.is-handheld-layout .app-frame[data-step='chat'] {
  gap: 8px;
}

body.is-chat-step.is-handheld-layout .app-frame[data-step='chat'] .hero-panel {
  padding: 8px 10px;
  gap: 6px;
  border-radius: var(--radius-md);
}

body.is-chat-step.is-handheld-layout .app-frame[data-step='chat'] .hero-panel .eyebrow,
body.is-chat-step.is-handheld-layout .app-frame[data-step='chat'] .hero-panel .subtitle {
  display: none;
}

body.is-chat-step.is-handheld-layout .app-frame[data-step='chat'] .hero-panel h1 {
  font-size: 14px;
  line-height: 1.35;
}

body.is-chat-step.is-handheld-layout .app-frame[data-step='chat'] .hero-actions {
  gap: 6px;
}

body.is-chat-step.is-handheld-layout .app-frame[data-step='chat'] .hero-actions .pill {
  min-height: 24px;
  padding: 4px 8px;
  font-size: 9px;
  letter-spacing: 0.08em;
}

body.is-chat-step.is-handheld-layout .app-frame[data-step='chat'] .hero-actions .button {
  min-height: 26px;
  padding: 5px 8px;
  font-size: 10px;
}

body.is-chat-step.is-handheld-layout .chat-panel.layout-a {
  min-height: auto;
}

body.is-chat-step.is-handheld-layout .layout-a .chat-head {
  padding: 9px 12px 7px;
}

body.is-chat-step.is-handheld-layout .layout-a .chat-head h2 {
  font-size: 15px;
}

body.is-chat-step.is-handheld-layout .layout-a .chat-head .meta-text {
  display: none;
}

body.is-chat-step.is-handheld-layout .layout-a .chat-progress-panel {
  padding: 7px 12px;
}

body.is-chat-step.is-handheld-layout .layout-a .chat-progress-copy .meta-text {
  display: none;
}

body.is-chat-step.is-handheld-layout .layout-a .active-question-card {
  gap: 6px;
  margin-top: 8px;
  padding: 10px 12px;
}

body.is-chat-step.is-handheld-layout .layout-a .active-question-card h3 {
  font-size: 16px;
}

body.is-chat-step.is-handheld-layout .layout-a .active-question-card p {
  font-size: 13px;
  line-height: 1.55;
}

body.is-chat-step.is-handheld-layout .layout-a .active-question-example {
  padding: 7px 9px;
}

body.is-chat-step.is-handheld-layout .layout-a .chat-scroll {
  max-height: 260px;
  overflow-y: auto;
  padding-top: 8px;
  padding-bottom: 8px;
}

body.is-chat-step.is-handheld-layout .layout-a .bubble {
  padding: 8px 10px;
}

body.is-chat-step.is-handheld-layout .layout-a .bubble p,
body.is-chat-step.is-handheld-layout .layout-a .bubble summary {
  font-size: 12px;
  line-height: 1.5;
}

body.is-chat-step.is-handheld-layout .layout-a .composer {
  margin: 0 12px 12px;
  padding: 10px 12px calc(12px + var(--safe-area-bottom));
}

body.is-chat-step.is-handheld-layout .layout-a .composer-box {
  padding: 10px 11px;
}

body.is-chat-step.is-handheld-layout .layout-a textarea.composer-input {
  min-height: 76px;
}

/* ============================================================
   PR-N-2 A3: Profile Setup「登録の儀」（.ds-rite スコープ・追記のみ）
   ------------------------------------------------------------
   制約: app.js は不変。app.js が生成する既存 class にスタイルのみ当てる
   （class 名の変更・削除は不可）。色・字体は design-system.css のトークン参照。
   ============================================================ */
.ds-rite {
  background:
    radial-gradient(ellipse 60% 45% at 50% 0%, rgba(74,144,226,.08), transparent 60%),
    linear-gradient(180deg, #070B0D 0%, var(--color-surface-0, #0A0D0F) 55%, var(--color-void, #050708) 100%);
  color: var(--color-text, #C6CFCB);
}
/* --- SYS ラベル / 見出し --- */
.ds-rite .app-brand, .ds-rite .section-head {
  font-family: var(--font-mono); letter-spacing: var(--tracking-hud, .28em);
  color: var(--cold-label, rgba(94,234,212,.65)); text-transform: uppercase;
}
.ds-rite h1, .ds-rite h2 {
  font-family: var(--font-jp); font-weight: 500; letter-spacing: .26em;
  color: var(--color-text-hi, #EAF2EF);
}
.ds-rite h3 { font-family: var(--font-jp); font-weight: 500; letter-spacing: .08em; }
.ds-rite .subtitle, .ds-rite .meta-text {
  color: var(--color-text-low, #6B7570); letter-spacing: .03em; line-height: 1.9;
}

/* --- cold ブラケットカード --- */
.ds-rite .panel, .ds-rite .content-panel, .ds-rite .video-panel {
  position: relative; background: rgba(8, 12, 11, .7);
  border: 1px solid var(--cold-border, rgba(74,144,226,.30));
  border-radius: var(--radius-cold, 2px);
}
.ds-rite .panel::before, .ds-rite .panel::after,
.ds-rite .content-panel::before, .ds-rite .content-panel::after {
  content: ""; position: absolute; width: 13px; height: 13px; pointer-events: none;
}
.ds-rite .panel::before, .ds-rite .content-panel::before {
  top: -1px; left: -1px; border-top: 1.5px solid var(--cold-bracket, rgba(94,234,212,.9)); border-left: 1.5px solid var(--cold-bracket, rgba(94,234,212,.9));
}
.ds-rite .panel::after, .ds-rite .content-panel::after {
  bottom: -1px; right: -1px; border-bottom: 1.5px solid var(--cold-bracket, rgba(94,234,212,.9)); border-right: 1.5px solid var(--cold-bracket, rgba(94,234,212,.9));
}

/* --- ステップティック（app.js の loader-step-grid / loader-step-box に対応） --- */
.ds-rite .loader-step-grid { display: flex; gap: 6px; }
.ds-rite .loader-step-box {
  flex: 1; height: 3px; border-radius: 99px; background: rgba(255,255,255,.10); transition: all var(--duration-normal, .25s) var(--easing-standard, ease);
}
.ds-rite .loader-step-box.filled { background: rgba(94,234,212,.6); }
.ds-rite .loader-step-box.current { background: var(--color-monolith-mint, #5EEAD4); box-shadow: 0 0 10px rgba(94,234,212,.6); }
.ds-rite .loader-progress { font-family: var(--font-mono); font-size: 10px; letter-spacing: .2em; color: var(--color-monolith-mint, #5EEAD4); }

/* --- WHY の warm カード化（金縁・物語層） --- */
.ds-rite .info-card {
  border: 1px solid var(--warm-border, rgba(212,165,116,.28));
  border-radius: var(--radius-warm, 10px);
  background: linear-gradient(180deg, rgba(58,44,28,.42), rgba(24,18,12,.6));
  padding: 20px 22px; transition: all var(--duration-normal, .25s) var(--easing-standard, ease);
}
.ds-rite .info-card:hover { border-color: rgba(212,165,116,.5); }
.ds-rite .info-card-label {
  display: inline-block; font-family: var(--font-mono); font-size: 10px; letter-spacing: .24em;
  color: var(--warm-label, #D4A574); margin-bottom: 8px;
}
.ds-rite .info-card h3 { color: var(--warm-text, #F2E8D5); font-size: 15px; margin-bottom: 6px; }
.ds-rite .info-card p { color: var(--warm-text-sub, #A78F6E); font-size: 12.5px; line-height: 1.9; }

/* --- HUD 入力 --- */
.ds-rite .label {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: .18em;
  color: var(--color-text-low, #6B7570); text-transform: uppercase;
}
.ds-rite input[type="text"], .ds-rite input[type="email"], .ds-rite input[type="tel"],
.ds-rite input[type="number"], .ds-rite input[type="date"], .ds-rite select, .ds-rite textarea {
  background: rgba(255,255,255,.03);
  border: 1px solid var(--color-line-strong, rgba(255,255,255,.16));
  border-radius: var(--radius-cold, 2px);
  color: var(--color-text-hi, #EAF2EF); font-family: var(--font-jp);
  min-height: 44px; transition: .25s;
}
.ds-rite textarea { min-height: 88px; }
.ds-rite input:focus, .ds-rite select:focus, .ds-rite textarea:focus {
  outline: none; border-color: rgba(94,234,212,.7); background: rgba(94,234,212,.04);
  box-shadow: 0 0 0 1px rgba(94,234,212,.2), var(--glow-hover, 0 0 12px rgba(94,234,212,.18));
}

/* --- ボタン --- */
.ds-rite .button {
  min-height: 44px; border-radius: var(--radius-cold, 2px);
  font-family: var(--font-en); letter-spacing: .22em; transition: .25s; cursor: pointer;
}
.ds-rite .button.primary {
  background: rgba(94,234,212,.08); border: 1px solid rgba(94,234,212,.5); color: var(--color-mint-text);
}
.ds-rite .button.primary:hover { border-color: rgba(94,234,212,.85); box-shadow: var(--glow-hover, 0 0 12px rgba(94,234,212,.18)); }
.ds-rite .button.ghost {
  background: transparent; border: 1px solid var(--color-line-strong, rgba(255,255,255,.16));
  color: var(--color-text-low, #6B7570);
}
.ds-rite .button.ghost:hover { border-color: rgba(94,234,212,.5); color: var(--color-monolith-mint, #5EEAD4); }
.ds-rite .pill {
  border-radius: var(--radius-pill, 9999px); border: 1px solid var(--color-line-strong, rgba(255,255,255,.16));
  font-family: var(--font-mono); font-size: 10px; letter-spacing: .14em; min-height: 44px;
}
.ds-rite .pill.active {
  border-color: var(--color-monolith-mint, #5EEAD4); color: var(--color-monolith-mint, #5EEAD4);
  background: rgba(94,234,212,.07); box-shadow: 0 0 10px rgba(94,234,212,.2);
}
.ds-rite .notice {
  border: 1px solid rgba(74,144,226,.25); border-radius: var(--radius-cold, 2px);
  background: rgba(74,144,226,.05); color: var(--color-text, #C6CFCB);
}
.ds-rite .notice.warning { border-color: rgba(228,168,83,.35); background: rgba(228,168,83,.06); color: var(--color-warning, #E4A853); }
/* デフォルト青リンク根絶 */
.ds-rite a { color: var(--color-monolith-mint, #5EEAD4); }
.ds-rite a:visited { color: var(--color-monolith-mint, #5EEAD4); }

/* ============================================================
   記録映像フレーム（ds-skin.js が生成。生 YouTube 埋込の即時読込を廃し
   クリック時に初めて iframe を生成する = 遅延読込）
   ============================================================ */
.ds-rite .video-frame { position: relative; }
.ds-rite .ds-record {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 14px; aspect-ratio: 16 / 9; width: 100%;
  border: 1px solid var(--cold-border, rgba(74,144,226,.30)); border-radius: var(--radius-cold, 2px);
  background:
    radial-gradient(ellipse 60% 50% at 50% 50%, rgba(94,234,212,.06), transparent 70%),
    linear-gradient(180deg, #0b1013, #05070a);
}
.ds-rite .ds-record__lbl {
  position: absolute; top: 12px; left: 14px;
  font-family: var(--font-mono); font-size: 9.5px; letter-spacing: .24em;
  color: var(--cold-label, rgba(94,234,212,.65)); text-transform: uppercase;
}
.ds-rite .ds-record__play {
  width: 66px; height: 66px; display: flex; align-items: center; justify-content: center;
  border: 1.5px solid rgba(94,234,212,.7); border-radius: 50%;
  background: rgba(10,22,20,.7); color: var(--color-monolith-mint, #5EEAD4); cursor: pointer;
  animation: ds-record-pulse 2.6s cubic-bezier(.16,1,.3,1) infinite; transition: .25s;
}
.ds-rite .ds-record__play:hover { transform: scale(1.06); background: rgba(20,44,40,.8); }
.ds-rite .ds-record__ico { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.6; margin-left: 3px; }
@keyframes ds-record-pulse {
  0%, 100% { box-shadow: 0 0 14px rgba(94,234,212,.28); }
  50% { box-shadow: 0 0 38px rgba(94,234,212,.6), 0 0 70px rgba(94,234,212,.18); }
}
.ds-rite .ds-record__cap {
  position: absolute; bottom: 12px; left: 0; right: 0; text-align: center;
  font-family: var(--font-mono); font-size: 9px; letter-spacing: .14em; color: var(--color-text-low, #6B7570);
}
.ds-rite .video-frame iframe,
.ds-rite .video-frame video { width: 100%; aspect-ratio: 16 / 9; border: 0; display: block; }

@media (prefers-reduced-motion: reduce) {
  .ds-rite .ds-record__play { animation: none; }
}
@media (max-width: 420px) {
  .ds-rite .ds-record__play { width: 56px; height: 56px; }
}
