:root {
  color-scheme: light;
  --ink: #192d32;
  --muted: #748185;
  --teal: #145e61;
  --teal-dark: #104d50;
  --aqua: #dcebe5;
  --paper: #f6f4ee;
  --card: #fffefa;
  --line: #e6e4dc;
  --orange: #dd9a4e;
  font-family: "Manrope", "Segoe UI", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* { box-sizing: border-box; }
html, body { width: 100%; min-width: 320px; min-height: 100%; margin: 0; }
body { min-height: 100svh; background: radial-gradient(ellipse at 50% 5%, #fffefa 0, #f7f6f0 42%, #edf2ed 100%); color: var(--ink); }
button, input { font: inherit; }
button { color: inherit; }
.app-shell { width: min(100%, 1360px); height: 100svh; min-height: 100svh; margin-inline: auto; padding: 0 clamp(24px, 5.2vw, 72px); display: grid; grid-template-rows: minmax(0, 1fr) auto; }
.stage-topbar { grid-column: 1 / -1; grid-row: 1; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.stage-topbar .brand { color: #fffdf6; }
.stage-topbar .brand-icon { filter: drop-shadow(0 3px 5px rgba(0,0,0,.2)); }
.stage-topbar .brand-tagline { color: rgba(239,246,239,.68); }
.stage-topbar .icon-button { width: 44px; height: 44px; background: transparent; border: 0; box-shadow: none; }
.stage-topbar .icon-button:hover { background: rgba(255,255,255,.12); }
.stage-topbar :focus-visible { outline: 2px solid #efc67e; outline-offset: 2px; }
.stage-topbar .icon-button svg { stroke: #f4ead4; }
.header-actions { display: flex; align-items: center; padding: 2px; border: 1px solid rgba(224,245,234,.22); border-radius: 999px; background: rgba(7,43,45,.32); }
.brand { display: inline-flex; gap: 9px; align-items: center; text-decoration: none; color: var(--ink); }
.brand-icon { display: block; width: 31px; height: 43px; object-fit: contain; filter: drop-shadow(0 3px 4px rgba(20,70,74,.12)); }
.brand-copy { display: flex; flex-direction: column; gap: 1px; }
.brand-name { font-size: 20px; font-weight: 800; letter-spacing: .045em; line-height: 1.1; }
.brand-dot { color: var(--orange); }
.brand-tagline { color: #6c7b7c; font-size: 11px; font-weight: 600; letter-spacing: .005em; white-space: nowrap; }
.brand-expansion { display: none; }
.icon-button { width: 42px; height: 42px; display: grid; place-items: center; border: 1px solid rgba(25,45,50,.1); border-radius: 50%; background: rgba(255,254,250,.86); box-shadow: 0 4px 12px rgba(30,52,50,.04); cursor: pointer; transition: transform .2s ease, box-shadow .2s ease; }
.icon-button:hover { transform: translateY(-1px); box-shadow: 0 8px 18px rgba(30,52,50,.1); }
.icon-button svg { width: 19px; fill: none; stroke: var(--teal); stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; }
.sound-toggle.is-muted svg path:last-child { display: none; }
.assistant-stage { min-height: 0; display: grid; grid-template-columns: .8fr 1.2fr; grid-template-rows: auto minmax(0, 1fr); align-items: center; position: relative; margin: 24px 0 18px; padding: 22px 38px 0; overflow: hidden; isolation: isolate; border: 1px solid rgba(255,255,255,.42); border-radius: 34px; background: radial-gradient(circle at 78% 45%, rgba(67,146,132,.46), transparent 35%), linear-gradient(128deg, #103f43 0%, #14585b 54%, #1b6968 100%); box-shadow: 0 24px 55px rgba(21,64,62,.17), inset 0 1px 0 rgba(255,255,255,.12); }
.assistant-stage::before, .assistant-stage::after { content: ""; position: absolute; z-index: -1; pointer-events: none; border: 1px solid rgba(235,203,147,.11); border-radius: 50%; }
.assistant-stage::before { width: 510px; height: 510px; right: -50px; top: -245px; }
.assistant-stage::after { width: 430px; height: 430px; right: -10px; top: -205px; }
.stage-copy { grid-column: 1; grid-row: 2; z-index: 2; padding: 0 0 0 3%; }
.stage-copy h1, .stage-copy .subtitle { transition: opacity .7s ease, transform .7s ease, max-height .7s ease, margin .7s ease; }
.intro-dismissed .stage-copy h1, .intro-dismissed .stage-copy .subtitle { max-height: 0; margin-block: 0; overflow: hidden; opacity: 0; transform: translateY(-8px); pointer-events: none; }
.eyebrow { display: flex; align-items: center; gap: 10px; margin: 0 0 22px; color: #d6e9db; font-size: 13px; font-weight: 700; letter-spacing: .025em; }
.presence-dot { width: 8px; height: 8px; background: #a6d6a6; border-radius: 50%; box-shadow: 0 0 0 4px rgba(166,214,166,.16); }
h1 { margin: 0; font-size: clamp(48px, 6vw, 76px); line-height: 1.03; letter-spacing: -.065em; font-weight: 700; }
h1 { color: #fffdf6; }
h1 span { color: #efc67e; }
.subtitle { margin: 20px 0 0; color: rgba(239,246,239,.78); font-size: 17px; line-height: 1.65; }
.mobile-break { display: none; }
.mascot-wrap { grid-column: 2; grid-row: 2; align-self: stretch; min-height: 0; position: relative; display: grid; place-items: end center; isolation: isolate; }
.mascot-wrap img { position: relative; z-index: 2; display: block; height: 100%; width: min(100%, 430px); object-fit: contain; object-position: center bottom; filter: drop-shadow(0 20px 18px rgba(5,30,30,.24)); transition: opacity .22s ease, transform .4s ease; }
.mascot-glow { position: absolute; z-index: -1; width: 82%; aspect-ratio: 1; top: 7%; left: 9%; border-radius: 50%; background: radial-gradient(circle, rgba(201,232,212,.3), rgba(201,232,212,.12) 49%, transparent 72%); }
.mascot-orbit { position: absolute; border: 1px solid rgba(239,198,126,.24); border-radius: 50%; z-index: 0; }
.orbit-one { width: 96%; height: 76%; transform: rotate(-17deg); }
.orbit-two { width: 88%; height: 68%; transform: rotate(17deg); border-style: dashed; border-color: rgba(239,246,239,.14); }
.conversation { min-height: 168px; padding: 18px 22px 12px; display: flex; flex-direction: column; justify-content: flex-end; border: 1px solid rgba(25,45,50,.07); border-radius: 26px; background: rgba(255,254,250,.72); box-shadow: 0 12px 36px rgba(26,51,53,.065); }
.messages { display: flex; flex-direction: column; gap: 11px; max-height: 200px; overflow: auto; padding: 0 4px 14px; scrollbar-width: thin; }
.message { display: flex; align-items: flex-end; gap: 9px; max-width: min(84%, 620px); animation: rise .3s ease both; }
.user-message { align-self: flex-end; }
.assistant-message { align-self: flex-start; }
.message-avatar { width: 100px; height: 100px; display: block; flex: 0 0 100px; border: 0; border-radius: 0; background: transparent; object-fit: contain; filter: drop-shadow(0 4px 7px rgba(18,77,77,.15)); }
.bubble { padding: 13px 17px; border: 1px solid rgba(24,69,69,.06); border-radius: 18px 18px 18px 5px; background: #fff; color: #33484c; font-size: 14px; line-height: 1.6; box-shadow: 0 5px 20px rgba(28,57,57,.055); overflow-wrap: anywhere; }
.user-message .bubble { border: 0; border-radius: 18px 18px 5px 18px; background: linear-gradient(135deg, #176c68, #14565a); color: white; box-shadow: 0 6px 18px rgba(20,94,97,.14); }
.reply-replay { display: block; min-height: 32px; margin-top: 4px; padding: 0 8px; border: 0; border-radius: 8px; background: #eaf3ef; color: var(--teal-dark); font-size: 12px; font-weight: 700; cursor: pointer; }
.typing { display: flex; gap: 4px; align-items: center; min-width: 56px; }
.typing i { width: 5px; height: 5px; background: #8aa4a2; border-radius: 50%; animation: blink 1s infinite; }
.typing i:nth-child(2) { animation-delay: .15s; }.typing i:nth-child(3) { animation-delay: .3s; }
.composer-wrap { border-top: 1px solid rgba(25,45,50,.08); padding-top: 15px; }
.composer { width: 100%; height: 60px; display: flex; align-items: center; gap: 10px; padding: 6px 7px 6px 8px; border: 1px solid rgba(28,68,67,.1); border-radius: 20px; background: #fff; box-shadow: 0 8px 25px rgba(26,51,53,.065); }
.composer input { width: auto; min-width: 0; flex: 1; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 14px; }
.composer input::placeholder { color: #9aa4a3; }
.send-button { width: 42px; height: 42px; flex: 0 0 42px; display: grid; place-items: center; border: 0; border-radius: 13px; color: white; background: var(--teal); cursor: pointer; transition: .18s ease; }
.send-button:hover { background: var(--teal-dark); transform: scale(1.03); }
.send-button svg { width: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.composer-footer { min-height: 32px; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 7px 4px 0; }
.mic-button { width: 46px; height: 46px; flex: 0 0 46px; position: relative; display: grid; place-items: center; border: 0; border-radius: 15px; color: white; background: linear-gradient(145deg, #1b7772, #104f53); box-shadow: 0 5px 13px rgba(20,94,97,.2), inset 0 1px 0 rgba(255,255,255,.18); cursor: pointer; transition: transform .2s ease, background .2s ease; }
.mic-button:hover { transform: translateY(-2px); background: var(--teal-dark); }
.mic-button svg { width: 23px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.mic-rings { display: none; }
.mic-caption { margin: 0; color: #83908f; font-size: 11px; }
.privacy-note { justify-self: end; display: flex; align-items: center; gap: 6px; color: #8a9694; font-size: 11px; }
.privacy-note svg { width: 15px; height: 15px; fill: none; stroke: #71918a; stroke-width: 1.2; stroke-linecap: round; stroke-linejoin: round; }
.mic-button.is-listening { background: #c96c51; animation: pulse 1.6s ease-out infinite; }
.mic-button.is-listening .mic-rings { border-color: rgba(201,108,81,.4); }
.mic-button.is-busy { background: #6e9290; cursor: wait; }
.toast { position: fixed; left: 50%; bottom: 24px; z-index: 10; max-width: calc(100vw - 32px); padding: 11px 16px; border-radius: 12px; background: #243a3d; color: white; font-size: 13px; line-height: 1.45; opacity: 0; pointer-events: none; transform: translate(-50%, 9px); transition: .2s ease; }
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }
.voice-dialog { width: min(440px, calc(100vw - 32px)); max-width: none; max-height: min(90svh, 640px); padding: 26px; overflow: auto; border: 1px solid rgba(25,45,50,.1); border-radius: 24px; background: var(--card); color: var(--ink); box-shadow: 0 24px 80px rgba(20,45,45,.2); }
.voice-dialog::backdrop { background: rgba(19,38,40,.36); backdrop-filter: blur(4px); }
.dialog-heading { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 25px; }
.dialog-kicker { margin: 0 0 5px; color: var(--teal); font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.dialog-heading h2 { margin: 0; font-size: 25px; letter-spacing: -.045em; }
.dialog-close { border: 0; font-size: 25px; line-height: 1; color: var(--muted); background: #f0f1eb; }
.setting-field { display: block; margin: 0 0 23px; }
.setting-title { color: #354c4d; font-size: 13px; font-weight: 700; }
.setting-field select { display: block; width: 100%; height: 46px; margin-top: 9px; padding: 0 13px; border: 1px solid var(--line); border-radius: 12px; outline-color: var(--teal); background: white; color: var(--ink); font-size: 13px; }
.setting-help { display: block; margin-top: 7px; color: #899391; font-size: 11px; line-height: 1.45; }
.setting-row { display: flex; justify-content: space-between; align-items: center; }
.setting-row output { min-width: 42px; padding: 5px 9px; border-radius: 8px; background: #edf3ef; color: var(--teal); font-size: 12px; font-weight: 700; text-align: center; }
.setting-range { width: 100%; height: 22px; margin: 12px 0 0; accent-color: var(--teal); cursor: pointer; }
.range-ends { display: flex; justify-content: space-between; margin-top: 3px; color: #9aa3a1; font-size: 10px; }
.settings-note { margin: 1px 0 18px; color: #85918e; font-size: 11px; line-height: 1.5; }
.settings-done { width: 100%; height: 46px; border: 0; border-radius: 13px; color: white; background: var(--teal); font-weight: 700; cursor: pointer; }
.settings-done:hover { background: var(--teal-dark); }
.voice-preview { width: 100%; min-height: 44px; margin-bottom: 8px; border: 1px solid var(--line); border-radius: 13px; background: var(--card); color: var(--teal); font-weight: 700; cursor: pointer; }
.voice-preview:disabled { opacity: .5; cursor: default; }
#voice-status:empty { display: none; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(201,108,81,.35); } 100% { box-shadow: 0 0 0 16px rgba(201,108,81,0); } }
@keyframes blink { 0%, 60%, 100% { opacity: .35; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-3px); } }
@keyframes rise { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: translateY(0); } }

@media (min-width: 1100px) {
  .assistant-stage { max-width: 1120px; width: 100%; margin-inline: auto; }
  .conversation { max-width: 1120px; width: 100%; justify-self: center; }
}
@media (max-width: 700px) {
  .app-shell { min-height: 100svh; height: 100svh; padding: 0 14px; grid-template-rows: minmax(0, 1fr) auto; overflow: hidden; }
  .stage-topbar { padding-bottom: 12px; }
  .brand-icon { width: 27px; height: 37px; }
  .brand-name { font-size: 18px; }
  .brand-tagline { display: none; }
  .icon-button { width: 37px; height: 37px; }
  .assistant-stage { min-height: 0; height: auto; max-height: none; grid-template-columns: 1fr; grid-template-rows: auto auto minmax(0, 1fr); align-content: stretch; gap: 0; margin: 10px 0 8px; padding: 12px 13px 0; border-radius: 26px; }
  .assistant-stage::before { width: 330px; height: 330px; right: -130px; top: -150px; }
  .assistant-stage::after { width: 280px; height: 280px; right: -105px; top: -125px; }
  .stage-copy { grid-column: 1; grid-row: 2; padding: 12px 0 0; text-align: center; }
  .eyebrow { justify-content: center; margin-bottom: 9px; font-size: 12px; }
  h1 { font-size: clamp(35px, 10vw, 48px); line-height: 1.05; }
  h1 br { display: none; }
  .brand-expansion { display: block; width: min(100%, 270px); margin: 7px auto 0; color: rgba(239,246,239,.62); font-size: 10px; font-weight: 600; line-height: 1.35; letter-spacing: .01em; text-align: center; overflow-wrap: anywhere; }
  .subtitle { margin-top: 9px; font-size: 13px; line-height: 1.45; }
  .mobile-break { display: initial; }
  .mascot-wrap { width: 100%; height: 100%; min-height: 0; max-height: none; grid-column: 1; grid-row: 3; }
  .mascot-wrap img { width: 100%; height: 100%; max-width: none; object-position: center bottom; }
  .mascot-glow { width: min(90%, 340px); left: 50%; transform: translateX(-50%); top: 11%; }
  .orbit-one { width: 95%; height: 66%; }
  .orbit-two { width: 86%; height: 60%; }
  .conversation { min-height: 24svh; max-height: 31svh; margin-bottom: max(8px, env(safe-area-inset-bottom)); padding: 10px 12px 7px; border-radius: 21px; }
  .messages { max-height: 18svh; padding: 0 0 8px; }
  .message { max-width: 92%; }
  .bubble { padding: 11px 13px; font-size: 13px; }
  .composer-wrap { padding-top: 10px; }
  .composer { height: 58px; gap: 8px; padding-left: 7px; border-radius: 17px; }
  .composer input { font-size: 13px; }
  .send-button { width: 40px; height: 40px; flex-basis: 40px; }
  .mic-button { width: 42px; height: 42px; flex-basis: 42px; border-radius: 13px; }
  .composer-footer { min-height: 28px; padding: 7px 3px 0; }
  .mic-caption { font-size: 10px; }
  .privacy-note { font-size: 9px; gap: 4px; }
  .privacy-note svg { width: 13px; height: 13px; }
  .toast { bottom: max(16px, env(safe-area-inset-bottom)); font-size: 12px; }
  .voice-dialog { padding: 23px 20px; border-radius: 21px; }
}
@media (max-height: 700px) and (max-width: 700px) {
  .assistant-stage { padding-top: 10px; padding-bottom: 0; }
  .conversation { min-height: 25svh; max-height: 32svh; margin-bottom: max(6px, env(safe-area-inset-bottom)); padding-bottom: 5px; }
  .messages { max-height: 17svh; }
  .composer-footer { min-height: 27px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; transition-duration: .01ms !important; } }
