:root {
  --flow-ink: #f3f8fc;
  --flow-muted: #7f94a8;
  --flow-accent: #70edf1;
}

html,
body {
  width: 100%;
  height: 100%;
  overflow: hidden;
}

body[data-theme="light"] {
  color-scheme: light;
  --bg: #eef6f7;
  --panel: #ffffff;
  --panel-soft: #e3eef0;
  --ink: #10212b;
  --muted: #58717e;
  --cyan: #087f8b;
  --violet: #7256b5;
  --lime: #4f7d20;
  --line: rgba(16, 33, 43, .17);
  --flow-ink: #10212b;
  --flow-muted: #58717e;
  --flow-accent: #087f8b;
  background:
    radial-gradient(circle at 48% 105%, rgba(15, 158, 170, .18), transparent 38%),
    radial-gradient(circle at 92% 0%, rgba(123, 92, 205, .11), transparent 34%),
    #eef6f7;
  color: #10212b;
}

body[data-theme="light"] .scene {
  background:
    radial-gradient(ellipse at 8% 54%, rgba(15, 158, 170, .12), transparent 42%),
    radial-gradient(ellipse at 92% 10%, rgba(123, 92, 205, .1), transparent 38%),
    #eef6f7;
}

body[data-theme="light"] .scene-grid {
  opacity: .7;
  filter: none;
  background-image:
    linear-gradient(rgba(31, 83, 94, .07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(31, 83, 94, .07) 1px, transparent 1px);
}

body[data-theme="light"] .brand { color: #10212b; }
body[data-theme="light"] .brand-icon { color: #087f8b; border-color: rgba(8, 127, 139, .5); }
body[data-theme="light"] .scene::after { opacity: .15; }
body[data-theme="light"] .bubble {
  border-color: rgba(16, 33, 43, .82);
  background: rgba(255, 255, 255, .76);
  box-shadow: 9px 9px 0 rgba(8, 127, 139, .14), 0 24px 70px rgba(29, 66, 77, .14);
}
body[data-theme="light"] .bubble::before {
  background: linear-gradient(45deg, transparent 47%, rgba(16, 33, 43, .82) 48% 52%, rgba(255, 255, 255, .96) 53%);
}
body[data-theme="light"] .choices button { color: #10212b; border-color: rgba(16, 33, 43, .2); }
body[data-theme="light"] .choices button:hover,
body[data-theme="light"] .choices button:focus-visible { color: #087f8b; border-color: #087f8b; }
body[data-theme="light"] .voice-button,
body[data-theme="light"] .reset-button { color: #087f8b; border-color: rgba(8, 127, 139, .45); }
body[data-theme="light"] .footer { color: #49636e; }

.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .48rem .7rem;
  border: 1px solid rgba(127, 148, 168, .32);
  border-radius: 999px;
  background: rgba(255, 255, 255, .06);
  color: var(--flow-ink);
  font-size: .66rem;
  letter-spacing: .06em;
}

.theme-toggle:hover { border-color: var(--flow-accent); color: var(--flow-accent); }
body[data-theme="light"] .theme-toggle { background: rgba(255, 255, 255, .72); }

body {
  background:
    radial-gradient(circle at 50% 105%, rgba(78, 224, 231, .18), transparent 38%),
    radial-gradient(circle at 92% 0%, rgba(110, 80, 220, .14), transparent 34%),
    #070b13;
}

.scene {
  min-height: 100%;
  display: grid;
  grid-template-rows: auto 1fr auto;
  isolation: isolate;
}

.scene::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(to bottom, transparent 49%, rgba(112, 237, 241, .035) 50%, transparent 51%);
  background-size: 100% 8px;
  opacity: .4;
  z-index: -1;
}

.topbar {
  height: 72px;
  border: 0;
  padding: 0 clamp(1.2rem, 4vw, 4rem);
  background: transparent;
}

.preview-status,
.old-view,
.intro-panel,
.console-header,
.console-kicker,
.intro-foot {
  display: none !important;
}

.shell {
  display: grid;
  grid-template-columns: 1fr;
  place-items: center;
  width: min(1040px, 100%);
  min-height: 0;
  margin: 0 auto;
  padding: 1rem clamp(1.2rem, 6vw, 5rem) 2rem;
}

.console {
  width: 100%;
  max-width: 900px;
  min-height: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  overflow: visible;
}

.console-body {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: min(640px, calc(100vh - 190px));
  padding: 0;
}

.conversation-history {
  display: grid;
  gap: 1.2rem;
  margin: 0 0 auto;
  padding-top: 1rem;
  mask-image: linear-gradient(to bottom, transparent, #000 35%);
}

.history-step {
  display: grid;
  gap: .25rem;
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .45s ease, transform .55s cubic-bezier(.2,.8,.2,1);
}

.history-step.visible { opacity: .34; transform: translateY(0); }
.history-step span { color: var(--flow-muted); font-size: clamp(.72rem, 1.2vw, .9rem); }
.history-step strong { color: var(--flow-ink); font-size: clamp(.9rem, 1.6vw, 1.15rem); font-weight: 550; }

.bubble {
  position: relative;
  min-width: 0;
  min-height: 0;
  padding: clamp(1.15rem, 2.4vw, 2rem);
  border: 2px solid rgba(235, 250, 255, .9);
  border-radius: 28px 28px 28px 8px;
  background: rgba(8, 15, 27, .76);
  box-shadow: 9px 9px 0 rgba(112, 237, 241, .13), 0 24px 80px rgba(0, 0, 0, .28);
  backdrop-filter: blur(16px);
}

.bubble::before {
  content: "";
  position: absolute;
  left: -20px;
  bottom: 34px;
  width: 34px;
  height: 28px;
  background: linear-gradient(45deg, transparent 47%, rgba(235, 250, 255, .9) 48% 52%, rgba(8, 15, 27, .96) 53%);
  transform: skewY(-16deg);
}

.bubble-speaker {
  display: inline-block;
  margin-bottom: .7rem;
  color: var(--flow-accent);
  font-size: .58rem;
  font-weight: 900;
  letter-spacing: .18em;
}

.dialogue-stage {
  display: grid;
  grid-template-columns: clamp(150px, 22vw, 240px) minmax(0, 1fr);
  align-items: end;
  gap: clamp(1rem, 3vw, 2.2rem);
}

.guide-character {
  position: relative;
  align-self: end;
  margin-bottom: clamp(1.6rem, 4vw, 3.4rem);
  padding: clamp(.55rem, 1vw, .8rem);
  filter:
    drop-shadow(0 0 1px rgba(235, 250, 255, .95))
    drop-shadow(0 0 10px rgba(112, 237, 241, .34))
    drop-shadow(0 22px 34px rgba(0, 0, 0, .5));
  transform-origin: 52% 78%;
  animation: guide-float 5.8s ease-in-out infinite;
}

.guide-character::before {
  content: "";
  position: absolute;
  inset: 6% 2% 3%;
  border: 1px solid rgba(112, 237, 241, .28);
  border-radius: 42% 58% 48% 52% / 52% 42% 58% 48%;
  background:
    radial-gradient(circle at 68% 24%, rgba(132, 91, 255, .16), transparent 32%),
    radial-gradient(circle at 35% 72%, rgba(112, 237, 241, .14), transparent 38%);
  box-shadow:
    inset 0 0 22px rgba(112, 237, 241, .06),
    0 0 28px rgba(112, 237, 241, .08);
  transform: rotate(-7deg);
  animation: cpu-frame 7s ease-in-out infinite;
}

.guide-character::after {
  content: "";
  position: absolute;
  left: 48%;
  bottom: 4%;
  width: 34%;
  aspect-ratio: 1;
  border: 1px solid rgba(112, 237, 241, .45);
  border-radius: 50%;
  transform: translateX(-50%) scale(.45);
  opacity: 0;
  animation: cpu-signal 3.2s ease-out infinite;
}

.guide-character img {
  position: relative;
  display: block;
  width: 100%;
  height: auto;
  z-index: 1;
  transform-origin: 50% 65%;
  animation: cpu-breathe 4.4s ease-in-out infinite;
}

.character-glow {
  position: absolute;
  inset: 24% 10% 5%;
  border-radius: 50%;
  background: rgba(80, 225, 235, .18);
  filter: blur(25px);
  animation: cpu-glow 2.8s ease-in-out infinite;
}

@keyframes guide-float {
  0%, 100% { transform: translate3d(0, 0, 0) rotate(-1deg); }
  28% { transform: translate3d(2px, -5px, 0) rotate(.2deg); }
  58% { transform: translate3d(-1px, -10px, 0) rotate(1deg); }
  78% { transform: translate3d(1px, -4px, 0) rotate(0); }
}

@keyframes cpu-breathe {
  0%, 100% { transform: scale(1); filter: brightness(1) saturate(1); }
  48% { transform: scale(1.012); filter: brightness(1.08) saturate(1.08); }
  55% { transform: scale(1.008); filter: brightness(1.04) saturate(1.04); }
}

@keyframes cpu-glow {
  0%, 100% { opacity: .55; transform: scale(.92); }
  50% { opacity: .95; transform: scale(1.08); }
}

@keyframes cpu-signal {
  0%, 62% { opacity: 0; transform: translateX(-50%) scale(.4); }
  70% { opacity: .55; }
  100% { opacity: 0; transform: translateX(-50%) scale(1.5); }
}

@keyframes cpu-frame {
  0%, 100% { transform: rotate(-7deg) scale(.98); border-color: rgba(112, 237, 241, .24); }
  50% { transform: rotate(-3deg) scale(1.025); border-color: rgba(145, 111, 255, .34); }
}

.scene[data-voice-state="listening"] .guide-character {
  animation-duration: 3.6s;
}

.scene[data-voice-state="listening"] .character-glow {
  animation-duration: 1.15s;
}

.scene[data-voice-state="speaking"] .guide-character img {
  animation-duration: 1.8s;
}

@media (prefers-reduced-motion: reduce) {
  .guide-character,
  .guide-character::before,
  .guide-character::after,
  .guide-character img,
  .character-glow { animation: none !important; }
}

#guide-message {
  max-width: 780px;
  margin: 0 0 1rem;
  color: var(--flow-ink);
  font-size: clamp(1.7rem, 3.6vw, 3.8rem);
  line-height: 1.02;
  letter-spacing: -.055em;
  font-weight: 720;
  text-wrap: balance;
}

#guide-message[data-size="medium"] {
  font-size: clamp(1.5rem, 3vw, 3rem);
  line-height: 1.02;
}

#guide-message[data-size="long"] {
  font-size: clamp(1.25rem, 2.25vw, 2.2rem);
  line-height: 1.06;
  max-width: 850px;
}

.result {
  max-width: 720px;
  margin: 0 0 1.6rem;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--flow-muted);
  font-size: clamp(.85rem, 1.4vw, 1rem);
  line-height: 1.65;
}

.result a { color: var(--flow-accent); text-underline-offset: .25em; }

.choose-label {
  margin: 0 0 .55rem;
  color: var(--flow-muted);
  font-size: .62rem;
  letter-spacing: .18em;
}

.choices {
  display: flex;
  flex-wrap: wrap;
  gap: .25rem clamp(1rem, 3vw, 2.4rem);
  margin: 0;
}

.choices button {
  display: inline-flex;
  width: auto;
  min-height: 0;
  padding: .65rem 0;
  border: 0;
  border-bottom: 1px solid rgba(145, 171, 191, .25);
  border-radius: 0;
  background: transparent;
  color: var(--flow-ink);
  font-size: clamp(.88rem, 1.55vw, 1.08rem);
  font-weight: 580;
  text-align: left;
  transition: color .2s ease, border-color .2s ease, transform .2s ease;
}

.choices button:hover,
.choices button:focus-visible {
  border-color: var(--flow-accent);
  color: var(--flow-accent);
  transform: translateY(-2px);
}

.choices button > span:first-child {
  width: auto;
  height: auto;
  border: 0;
  margin-right: .45rem;
  color: var(--flow-accent);
}

.console-footer {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 1.6rem;
  padding: 0;
  border: 0;
  background: transparent;
}

.voice-button,
.reset-button {
  padding: .55rem 0;
  border: 0;
  border-radius: 0;
  border-bottom: 1px solid rgba(112, 237, 241, .4);
  background: transparent;
  color: var(--flow-accent);
}

.voice-button:hover,
.reset-button:hover { background: transparent; color: #fff; }
.mic-icon { border: 0; width: auto; height: auto; }
.voice-arrow { display: none; }
#voice-status { margin-left: auto; color: var(--flow-muted); font-size: .7rem; }

.footer {
  min-height: 46px;
  padding: 0 clamp(1.2rem, 4vw, 4rem);
  border: 0;
  opacity: .55;
}

.footer .privacy { max-width: 520px; text-align: center; }

@media (max-width: 700px) {
  .topbar { height: 58px; }
  .shell { align-items: end; padding-bottom: .8rem; }
  .console-body { min-height: calc(100vh - 185px); }
  .conversation-history { gap: .65rem; }
  .dialogue-stage { grid-template-columns: 82px minmax(0, 1fr); gap: .65rem; }
  .guide-character { margin-bottom: 1.3rem; padding: .25rem; }
  .bubble { padding: 1rem; border-radius: 20px 20px 20px 6px; }
  .bubble::before { left: -14px; bottom: 24px; width: 24px; height: 20px; }
  #guide-message { font-size: clamp(1.45rem, 7.5vw, 2.3rem); }
  #guide-message[data-size="medium"] { font-size: clamp(1.25rem, 6vw, 1.9rem); }
  #guide-message[data-size="long"] { font-size: clamp(1.05rem, 4.7vw, 1.5rem); }
  .choices { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }
  .choices button { width: 100%; }
  .console-footer { margin-top: 1rem; }
  .footer > span:first-child,
  .footer > span:last-child { display: none; }
  .footer { justify-content: center; padding: .4rem 1rem; }
  .footer .privacy { font-size: .55rem; }
}

/* Responsive geometry fixes */
html,
body {
  max-width: 100%;
  overflow-x: hidden;
}

.scene,
.shell,
.console,
.console-body,
.dialogue-stage,
.bubble,
.choices {
  min-width: 0;
  max-width: 100%;
}

.shell {
  place-items: start center;
  align-content: start;
  padding-top: clamp(.8rem, 2.2vh, 1.6rem);
}

.console-body {
  justify-content: flex-start;
  min-height: 0;
}

.conversation-history:empty {
  display: none;
}

#guide-message,
.result,
.choices button span {
  overflow-wrap: anywhere;
}

@media (max-width: 700px) {
  html,
  body {
    height: auto;
    min-height: 100%;
    overflow-y: auto;
  }

  .scene {
    min-height: 100svh;
    overflow-x: hidden;
    overflow-y: visible;
    grid-template-rows: max-content max-content 1fr;
    align-content: start;
  }

  .topbar {
    width: 100%;
    height: 54px;
    min-height: 54px;
    padding: .55rem .85rem;
    margin: 0;
    margin-inline: auto;
  }

  .brand {
    gap: .45rem;
    font-size: .76rem;
  }

  .brand-icon {
    width: 30px;
    height: 30px;
    font-size: 1.1rem;
  }

  .theme-toggle {
    padding: .4rem .58rem;
    font-size: .6rem;
  }

  .shell {
    width: 100%;
    min-height: 0;
    margin: 0;
    padding: .45rem .85rem .65rem;
    place-items: start stretch;
  }

  .console,
  .console-body {
    width: 100%;
    min-height: 0;
    max-height: none;
  }

  .conversation-history {
    display: none;
  }

  .dialogue-stage {
    width: 100%;
    grid-template-columns: 82px minmax(0, 1fr);
    align-items: center;
    gap: .55rem;
  }

  .guide-character {
    width: 90px;
    max-width: 100%;
    margin: 0 0 .35rem -.25rem;
    padding: .15rem;
  }

  .bubble {
    width: 100%;
    padding: .9rem .9rem 1rem;
    border-radius: 20px 20px 20px 6px;
    box-shadow: 5px 6px 0 rgba(34, 144, 149, .14), 0 15px 35px rgba(9, 38, 53, .1);
  }

  .bubble::before {
    left: -11px;
    bottom: 20px;
    width: 19px;
    height: 16px;
  }

  .bubble-speaker {
    margin-bottom: .4rem;
    font-size: .48rem;
  }

  #guide-message,
  #guide-message[data-size="medium"],
  #guide-message[data-size="long"] {
    max-width: 100%;
    margin-bottom: .35rem;
    font-size: clamp(1.06rem, 5.7vw, 1.55rem);
    line-height: 1.08;
    letter-spacing: -.035em;
  }

  .result {
    max-width: 100%;
    margin: .35rem 0 0;
    font-size: .72rem;
    line-height: 1.45;
  }

  .choose-label {
    margin: .75rem 0 .2rem;
    font-size: .49rem;
    letter-spacing: .13em;
  }

  .choices {
    width: 100%;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: .75rem;
    row-gap: 0;
  }

  .choices button,
  body[data-theme="light"] .choices button,
  body[data-theme="dark"] .choices button {
    width: 100%;
    min-width: 0;
    padding: .56rem 0;
    font-size: .76rem;
    line-height: 1.25;
    white-space: normal;
  }

  .choices button > span:first-child {
    flex: 0 0 auto;
    margin-right: .3rem;
  }

  .console-footer {
    width: 100%;
    margin-top: .65rem;
    gap: .55rem;
  }

  .voice-button,
  .reset-button {
    font-size: .67rem;
  }

  #voice-status {
    min-width: 0;
    margin-left: auto;
    font-size: .58rem;
    text-align: right;
  }

  .footer {
    width: 100%;
    min-height: 0;
    padding: .25rem .85rem .55rem;
    align-self: end;
  }

  .footer .privacy {
    max-width: 100%;
    font-size: .48rem;
    line-height: 1.3;
  }
}

@media (max-width: 390px) {
  .dialogue-stage {
    grid-template-columns: 74px minmax(0, 1fr);
  }

  .guide-character {
    width: 82px;
  }

  .choices {
    column-gap: .55rem;
  }

  .choices button {
    font-size: .7rem;
  }
}

@media (max-height: 680px) {
  .conversation-history { display: none; }
  .console-body { min-height: calc(100vh - 150px); }
  #guide-message { font-size: clamp(1.8rem, 8vh, 4rem); }
  .result { margin-bottom: .8rem; }
}

/* Palette system: e2e8e2 · 657b7c · 75a8ac · 4a8d7f · 092635 · e64609 · 229095 */
body[data-theme="light"] {
  --flow-ink: #092635;
  --flow-muted: #657b7c;
  --flow-accent: #229095;
  --bg: #e2e8e2;
  --ink: #092635;
  --muted: #657b7c;
  --cyan: #229095;
  --violet: #4a8d7f;
  --lime: #e64609;
  --line: rgba(9, 38, 53, .16);
  background: #e2e8e2;
}

body[data-theme="dark"] {
  --flow-ink: #e2e8e2;
  --flow-muted: #75a8ac;
  --flow-accent: #75a8ac;
  --bg: #092635;
  --ink: #e2e8e2;
  --muted: #75a8ac;
  --cyan: #75a8ac;
  --violet: #4a8d7f;
  --lime: #e64609;
  --line: rgba(226, 232, 226, .14);
}

body[data-theme="light"] .scene {
  background:
    radial-gradient(circle at 15% 77%, rgba(34, 144, 149, .16), transparent 24%),
    radial-gradient(circle at 82% 16%, rgba(117, 168, 172, .18), transparent 28%),
    linear-gradient(135deg, #eef2ee 0%, #e2e8e2 48%, #d8e4e2 100%);
}

body[data-theme="dark"] .scene {
  background:
    radial-gradient(circle at 14% 76%, rgba(34, 144, 149, .2), transparent 25%),
    radial-gradient(circle at 84% 13%, rgba(74, 141, 127, .14), transparent 30%),
    linear-gradient(145deg, #061c27 0%, #092635 58%, #0a303d 100%);
}

body[data-theme="light"] .scene-grid,
body[data-theme="dark"] .scene-grid {
  opacity: 1;
  filter: none;
  background-size: 56px 56px;
}

body[data-theme="light"] .scene-grid {
  background-image:
    linear-gradient(rgba(9, 38, 53, .045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(9, 38, 53, .045) 1px, transparent 1px);
}

body[data-theme="dark"] .scene-grid {
  background-image:
    linear-gradient(rgba(226, 232, 226, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(226, 232, 226, .035) 1px, transparent 1px);
}

.topbar {
  min-height: 84px;
}

.brand {
  letter-spacing: .16em;
  font-size: .98rem;
}

.brand-icon {
  border-radius: 50%;
  border-color: #229095;
  background: rgba(34, 144, 149, .1);
  color: #229095;
}

.theme-toggle {
  border-color: rgba(9, 38, 53, .18);
  background: rgba(226, 232, 226, .65);
  box-shadow: 0 8px 24px rgba(9, 38, 53, .06);
  backdrop-filter: blur(14px);
}

body[data-theme="dark"] .theme-toggle {
  border-color: rgba(226, 232, 226, .16);
  background: rgba(226, 232, 226, .06);
}

.shell {
  width: min(1140px, 100%);
}

.dialogue-stage {
  grid-template-columns: clamp(180px, 23vw, 270px) minmax(0, 1fr);
  gap: clamp(1.2rem, 3.5vw, 3rem);
}

.guide-character {
  margin-bottom: clamp(1.2rem, 3vw, 2.6rem);
}

.guide-character::before {
  border-color: rgba(34, 144, 149, .34);
  background:
    radial-gradient(circle at 62% 25%, rgba(230, 70, 9, .13), transparent 27%),
    radial-gradient(circle at 36% 72%, rgba(34, 144, 149, .2), transparent 42%);
  box-shadow: inset 0 0 24px rgba(34, 144, 149, .08), 0 0 34px rgba(34, 144, 149, .1);
}

.character-glow {
  background: rgba(34, 144, 149, .2);
}

.bubble {
  padding: clamp(1.5rem, 3vw, 2.5rem);
  border: 1px solid rgba(9, 38, 53, .24);
  border-radius: 36px 36px 36px 10px;
  background: rgba(245, 248, 245, .82);
  box-shadow:
    10px 10px 0 rgba(34, 144, 149, .16),
    0 30px 80px rgba(9, 38, 53, .12),
    inset 0 1px rgba(255, 255, 255, .9);
}

body[data-theme="dark"] .bubble {
  border-color: rgba(226, 232, 226, .2);
  background: rgba(7, 30, 41, .82);
  box-shadow:
    10px 10px 0 rgba(34, 144, 149, .22),
    0 30px 80px rgba(0, 0, 0, .28),
    inset 0 1px rgba(226, 232, 226, .06);
}

.bubble::before,
body[data-theme="light"] .bubble::before {
  background: linear-gradient(45deg, transparent 47%, rgba(9, 38, 53, .3) 48% 51%, #f2f6f2 52%);
}

body[data-theme="dark"] .bubble::before {
  background: linear-gradient(45deg, transparent 47%, rgba(226, 232, 226, .22) 48% 51%, #071e29 52%);
}

.bubble-speaker {
  position: relative;
  padding-left: 1.15rem;
  color: #4a8d7f;
}

.bubble-speaker::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: .5rem;
  height: .5rem;
  border-radius: 50%;
  background: #e64609;
  box-shadow: 0 0 0 4px rgba(230, 70, 9, .12);
  transform: translateY(-50%);
}

#guide-message {
  color: var(--flow-ink);
  letter-spacing: -.048em;
}

.result {
  color: var(--flow-muted);
}

.result a {
  color: #e64609;
  text-decoration-thickness: 1px;
}

.choose-label {
  margin-top: 1.4rem;
  color: #4a8d7f;
}

.choose-label span {
  color: #657b7c;
}

.choices {
  gap: .25rem clamp(1.3rem, 3.2vw, 2.8rem);
}

.choices button,
body[data-theme="light"] .choices button {
  position: relative;
  padding: .78rem .1rem;
  border-color: rgba(9, 38, 53, .2);
  color: #092635;
}

body[data-theme="dark"] .choices button {
  border-color: rgba(226, 232, 226, .18);
  color: #e2e8e2;
}

.choices button::after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: -1px;
  height: 2px;
  background: #e64609;
  transition: right .28s ease;
}

.choices button:hover::after,
.choices button:focus-visible::after {
  right: 0;
}

.choices button:hover,
.choices button:focus-visible,
body[data-theme="light"] .choices button:hover,
body[data-theme="light"] .choices button:focus-visible {
  color: #e64609;
  border-color: rgba(230, 70, 9, .24);
}

.choices button > span:first-child {
  color: #229095;
}

.voice-button,
.reset-button,
body[data-theme="light"] .voice-button,
body[data-theme="light"] .reset-button {
  color: #092635;
  border-color: #229095;
}

body[data-theme="dark"] .voice-button,
body[data-theme="dark"] .reset-button {
  color: #e2e8e2;
}

.voice-button[aria-pressed="true"] {
  color: #e64609;
  border-color: #e64609;
}

.footer {
  color: #657b7c;
}

@media (max-width: 700px) {
  .topbar { min-height: 64px; }
  .dialogue-stage { grid-template-columns: 92px minmax(0, 1fr); }
  .bubble { padding: 1.15rem; border-radius: 24px 24px 24px 7px; }
  .choose-label { margin-top: .85rem; }
}
/* Live guide question input */
.ask-form {
  display: flex;
  width: 100%;
  margin-top: clamp(.65rem, 1.4vh, 1rem);
  border-bottom: 1px solid color-mix(in srgb, var(--ink, #092635) 28%, transparent);
  transition: border-color .2s ease;
}

.ask-form:focus-within {
  border-color: var(--accent, #e64609);
}

.ask-form input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  padding: .75rem .15rem;
  color: inherit;
  background: transparent;
  font: inherit;
}

.ask-form select {
  align-self: center;
  max-width: 6.4rem;
  border: 0;
  border-right: 1px solid color-mix(in srgb, var(--ink, #092635) 18%, transparent);
  outline: 0;
  padding: .45rem .7rem .45rem 0;
  color: inherit;
  background: transparent;
  font: inherit;
  font-size: .72rem;
  font-weight: 700;
  cursor: pointer;
}

.ask-form button {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  border: 0;
  padding: .55rem .15rem .55rem 1rem;
  color: var(--accent, #e64609);
  background: transparent;
  font: inherit;
  font-size: .76rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: .08em;
  text-transform: uppercase;
  cursor: pointer;
}

.ask-form button:disabled,
.ask-form input:disabled {
  cursor: wait;
  opacity: .55;
}

@media (max-width: 520px) {
  .ask-form select { max-width: 5.4rem; }
  .ask-form input { font-size: 16px; }
}

/* Keep conversational answers compact as they grow. */
#guide-message {
  font-size: clamp(1.25rem, 2.4vw, 2.35rem);
  line-height: 1.12;
  letter-spacing: -.035em;
}

#guide-message[data-size="medium"] {
  font-size: clamp(1.12rem, 2vw, 1.85rem);
  line-height: 1.16;
}

#guide-message[data-size="long"] {
  font-size: clamp(1rem, 1.55vw, 1.35rem);
  line-height: 1.28;
  text-wrap: pretty;
}

@media (max-width: 700px) {
  #guide-message { font-size: clamp(1rem, 4.8vw, 1.28rem); }
  #guide-message[data-size="medium"] { font-size: clamp(.95rem, 4.3vw, 1.15rem); }
  #guide-message[data-size="long"] { font-size: clamp(.9rem, 3.8vw, 1.04rem); line-height: 1.3; }
}
