:root {
  color-scheme: light;
  --paper: #f6f1eb;
  --ink: #22201d;
  --muted: #706660;
  --burgundy: #6f3b46;
  --rose: #b97c86;
  --card: #fffdfc;
  --line: #e5ddd4;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  font-synthesis: none;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); font-size: 16px; line-height: 1.5; }
button, input, textarea { font: inherit; }
button, a, input, textarea { -webkit-tap-highlight-color: transparent; }
button, a { touch-action: manipulation; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; }
a { color: inherit; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, summary:focus-visible, [tabindex]:focus-visible { outline: 3px solid var(--burgundy); outline-offset: 5px; }
svg { fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.app-shell { width: min(1360px, 100%); min-height: 100svh; margin: 0 auto; padding: 0 44px; display: flex; flex-direction: column; }
.site-header { min-height: 80px; display: flex; align-items: center; border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; gap: 13px; text-decoration: none; font-weight: 600; font-size: 16px; }
.brand-mark { display: grid; place-items: center; width: 40px; height: 42px; padding-bottom: 4px; border-radius: 12px; background: var(--burgundy); color: var(--card); font: 31px Georgia, serif; letter-spacing: -2px; }
.brand-divider { margin: 0 9px; color: #b7aaa1; font-weight: 400; }
.brand-label { color: var(--muted); font-weight: 400; }
main { width: 100%; margin: 0 auto; flex: 1; display: grid; grid-template-columns: 272px minmax(0, 1fr); align-items: center; gap: 48px; padding: 30px 0 18px; }
.introduction { text-align: center; padding-bottom: 24px; }
h1 { margin: 0; font: 400 48px/1.1 Georgia, "Times New Roman", serif; letter-spacing: -1.8px; }
h1 span { display: block; color: var(--burgundy); margin-top: 4px; }
.intro-description { margin: 18px auto 0; max-width: 240px; color: var(--muted); font-size: 15px; line-height: 1.7; }
.voice-stage { position: relative; display: grid; place-items: center; width: 220px; height: 210px; margin: 16px auto 0; isolation: isolate; }
.orb-halo { position: absolute; border-radius: 50%; pointer-events: none; border: 1px solid #b97c862b; }
.halo-outer { width: 194px; height: 194px; }
.halo-inner { width: 176px; height: 176px; border-color: #b97c8621; }
.voice-orb { position: relative; display: grid; place-items: center; width: 156px; height: 156px; border-radius: 50%; border: 1px solid #77445080; padding: 0; color: #fff4f0; background: var(--burgundy); box-shadow: 0 13px 30px #6f3b461c, 0 3px 7px #6f3b4618; transition: box-shadow .25s ease; isolation: isolate; }
.orb-surface { position: absolute; inset: 0; overflow: hidden; border-radius: inherit; background: radial-gradient(ellipse at 28% 16%, #e6b9bc 0%, #b97c86 23%, #8d5262 50%, #6f3b46 74%, #472532 100%); box-shadow: inset 0 1px 2px #fff0e9a3, inset -6px -9px 20px #44232b40; z-index: -1; animation: breathe 5s ease-in-out infinite; }
.orb-surface::after { content: ""; position: absolute; width: 120%; height: 55%; left: -10%; bottom: -14%; background: #f1d0c421; border-radius: 50%; transform: rotate(-25deg); box-shadow: 0 -1px 1px #edbac31a; }
.voice-orb:not(:disabled):hover { box-shadow: 0 13px 34px #6f3b4636, 0 0 0 5px #b97c8610; }
.voice-orb:focus-visible { outline-offset: 9px; }
.orb-wave { width: 75px; height: 50px; stroke-width: 3; }
.orb-wave path { transform-box: fill-box; transform-origin: center; }
.orb-stop { display: none; width: 32px; height: 32px; fill: currentColor; stroke-width: 0; }
.voice-caption { min-height: 70px; padding: 0 8px; }
#orb-label { font-size: 16px; font-weight: 600; margin: 0; color: var(--burgundy); }
#voice-status { font-size: 13px; line-height: 1.6; color: var(--muted); margin: 6px 0 0; }
.voice-stage[data-state="starting"] .orb-surface,
.voice-stage[data-state="stopping"] .orb-surface,
.voice-stage[data-state="stopped"] .orb-surface,
.voice-stage[data-state="pending"] .orb-surface { animation: none; }
.voice-stage[data-state="thinking"] .orb-surface { animation: think 1.8s ease-in-out infinite; }
.voice-stage[data-state="listening"] .halo-outer { animation: listen-ring 2.4s ease-out infinite; border-color: #9c5e6d70; }
.voice-stage[data-state="listening"] .halo-inner { animation: listen-ring 2.4s .6s ease-out infinite; border-color: #9c5e6d70; }
.voice-stage[data-state="listening"] .orb-surface { animation: none; }
.voice-stage[data-state="listening"] .orb-wave,
.voice-stage[data-state="stopping"] .orb-wave { display: none; }
.voice-stage[data-state="listening"] .orb-stop,
.voice-stage[data-state="stopping"] .orb-stop { display: block; }
.voice-stage[data-state="speaking"] .orb-wave path { animation: speak-wave 1s ease-in-out infinite alternate; }
.voice-stage[data-state="speaking"] .orb-wave path:nth-child(2n) { animation-delay: -.3s; }
.voice-stage[data-state="speaking"] .orb-wave path:nth-child(3n) { animation-delay: -.65s; }
.voice-stage[data-state="error"] .orb-surface { animation: none; filter: saturate(.5); }
.voice-stage[data-state="error"] .halo-outer { border-color: #a76a5866; }
.voice-stage[data-state="unavailable"] .orb-surface { animation: none; filter: saturate(.25); }
.voice-stage[data-state="unavailable"] .orb-halo { border-style: dashed; }
.assistant-workspace { min-width: 0; }
.chat-card { border-radius: 22px; border: 1px solid var(--line); background: var(--card); box-shadow: 0 8px 40px #46293107; overflow: hidden; }
.chat-toolbar { min-height: 64px; margin: 0 26px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid #eee7e0; }
.conversation-heading { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.conversation-heading h2 { margin: 0; font-size: 15px; font-weight: 600; }
.mode-notice { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.mode-notice strong { font-weight: 400; }
.mode-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--rose); }
.reset-button, .replay-button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 44px; padding: 0 10px; border: 0; background: transparent; color: var(--muted); font-size: 13px; flex-shrink: 0; border-radius: 8px; }
.reset-button svg, .replay-button svg { width: 17px; height: 17px; }
.reset-button:hover, .replay-button:not(:disabled):hover { color: var(--burgundy); background: #f8eff0; }
.replay-button { color: var(--burgundy); }
.replay-button:disabled { opacity: .4; }
.messages { height: clamp(330px, 43svh, 510px); overflow-y: auto; overscroll-behavior: contain; padding: 28px 26px; display: flex; flex-direction: column; gap: 24px; scrollbar-width: thin; scrollbar-color: #d6c4c5 transparent; scroll-behavior: smooth; }
.message { display: flex; gap: 13px; flex-shrink: 0; }
.message-avatar { display: grid; place-items: center; background: #f2e6e7; color: var(--burgundy); width: 32px; height: 32px; min-width: 32px; padding-bottom: 3px; border-radius: 50%; font: 23px Georgia, serif; letter-spacing: -1px; margin-top: 3px; }
.bubble-wrap { max-width: 88%; min-width: 0; }
.message-author { display: block; font-size: 11px; font-weight: 600; color: var(--burgundy); margin-bottom: 7px; }
.bubble { font-size: 16px; line-height: 1.8; overflow-wrap: anywhere; white-space: pre-wrap; }
.bubble p { margin: 0; }
.message-meta { display: block; margin-top: 7px; font-size: 11px; color: var(--muted); }
.message.user { justify-content: flex-end; }
.user .message-author { text-align: right; color: var(--muted); }
.user .bubble { background: #f4e9e9; padding: 12px 16px; border-radius: 14px 4px 14px 14px; color: #5e3541; }
.suggestions { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 26px 18px; }
.suggestions button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 12px; background: transparent; border: 1px solid var(--line); border-radius: 9px; color: #625451; font-size: 12px; transition: background .2s, border-color .2s; }
.suggestions svg { width: 14px; height: 14px; color: #9d7480; }
.suggestions button:not(:disabled):hover { background: #f8eff0; border-color: #c6a7ae; }
.suggestions button:disabled { opacity: .5; }
.composer-area { padding: 0 22px 14px; }
.input-box { display: flex; align-items: flex-end; gap: 10px; padding: 8px; background: #fbf7f3; border: 1px solid #e6dcd5; border-radius: 14px; transition: border-color .2s, box-shadow .2s; }
.input-box:focus-within { border-color: #91626c; box-shadow: 0 0 0 3px #6f3b4610; }
textarea { flex: 1; min-width: 0; max-height: 160px; resize: none; border: 0; padding: 12px 8px; background: transparent; color: var(--ink); font-size: 16px; line-height: 1.7; }
textarea:focus-visible { outline: 0; }
textarea::placeholder { color: #82756f; opacity: 1; }
textarea:disabled { opacity: .65; }
.send-button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: 94px; min-height: 52px; padding: 0 15px; flex-shrink: 0; border: 0; border-radius: 10px; background: var(--burgundy); color: #fff8f4; font-size: 14px; font-weight: 600; transition: background .2s; }
.send-button svg { width: 19px; height: 19px; stroke-width: 1.8; }
.send-button:not(:disabled):hover { background: #552b38; }
.send-button:disabled { opacity: .45; }
.composer-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 12px; margin: 7px 0 0; }
.speech-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 13px; }
.speech-toggle { position: relative; display: inline-flex; align-items: center; gap: 9px; min-height: 44px; color: #6e5f5e; cursor: pointer; font-size: 12px; white-space: nowrap; flex-shrink: 0; }
.speech-toggle input { position: absolute; left: 0; top: 0; width: 100%; height: 44px; margin: 0; opacity: 0; cursor: pointer; }
.toggle-track { width: 29px; height: 17px; border-radius: 20px; background: #e8dfd9; border: 1px solid #b5a59d; position: relative; transition: background .2s; pointer-events: none; }
.toggle-track::after { content: ""; position: absolute; top: 2px; left: 2px; width: 11px; height: 11px; border-radius: 50%; background: #fffdfc; box-shadow: 0 1px 2px #22201d26; transition: transform .2s; }
.speech-toggle input:checked + .toggle-track { background: var(--burgundy); border-color: var(--burgundy); }
.speech-toggle input:checked + .toggle-track::after { transform: translateX(12px); }
.speech-toggle input:focus-visible + .toggle-track { outline: 3px solid var(--burgundy); outline-offset: 4px; }
.speech-toggle input:disabled ~ span { opacity: .55; cursor: not-allowed; }
.composer-hint { margin: 0; color: var(--muted); font-size: 11px; }
.composer-hint span { margin: 0 4px; }
.feedback { color: #854432; font-size: 13px; line-height: 1.6; margin: 0; overflow-wrap: anywhere; }
.feedback:not(:empty) { margin: 4px 2px 0; padding-top: 6px; }
.trust-note { display: flex; align-items: baseline; gap: 6px; margin: 12px 3px 0; font-size: 11px; color: var(--muted); }
.trust-note p { margin: 0; }
.info-symbol { display: inline-grid; place-items: center; font: 9px Georgia, serif; width: 12px; min-width: 12px; height: 12px; border: 1px solid #9b8981; border-radius: 50%; }
.privacy-note { margin: 0 3px; color: var(--muted); font-size: 12px; }
.privacy-note summary { display: list-item; width: fit-content; min-height: 44px; padding: 12px 0; cursor: pointer; }
.privacy-note summary:hover { color: var(--burgundy); }
.privacy-note p { max-width: 680px; margin: 5px 0 12px; line-height: 1.7; }
footer { padding: 14px 0 20px; text-align: center; color: var(--muted); font-size: 11px; }
.footer-dot { margin: 0 6px; color: #b69397; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
@keyframes breathe { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.025); } }
@keyframes think { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .8; transform: scale(.96); } }
@keyframes listen-ring { 0% { transform: scale(.83); opacity: .8; } 100% { transform: scale(1.15); opacity: 0; } }
@keyframes speak-wave { from { transform: scaleY(.55); } to { transform: scaleY(1); } }
@media (min-width: 901px) and (max-width: 1150px) {
  .app-shell { padding: 0 30px; }
  main { grid-template-columns: 230px minmax(0, 1fr); gap: 28px; }
  h1 { font-size: 44px; }
  .voice-stage { width: 200px; height: 196px; }
  .voice-orb { width: 148px; height: 148px; }
  .halo-outer { width: 184px; height: 184px; }
  .halo-inner { width: 166px; height: 166px; }
  .composer-hint { display: none; }
}
@media (max-width: 900px) {
  .app-shell { padding: 0 24px; }
  .site-header { min-height: 72px; }
  main { display: block; max-width: 720px; padding-top: 26px; }
  .introduction { padding-bottom: 18px; }
  h1 { font-size: 42px; }
  h1 span { display: inline; }
  .intro-description { margin-top: 11px; max-width: none; font-size: 14px; }
  .voice-stage { margin-top: 6px; height: 180px; }
  .voice-orb { width: 142px; height: 142px; }
  .halo-outer { width: 176px; height: 176px; }
  .halo-inner { width: 160px; height: 160px; }
  .voice-caption { min-height: 58px; }
  #orb-label { font-size: 15px; }
  #voice-status { font-size: 12px; }
  .messages { height: clamp(300px, 43svh, 450px); }
  footer { font-size: 11px; padding-bottom: 24px; }
}
@media (max-width: 540px) {
  .app-shell { padding: 0 16px; }
  .site-header { min-height: 68px; }
  .brand { font-size: 14px; }
  .brand-mark { width: 36px; height: 38px; font-size: 28px; }
  .brand-divider { margin: 0 6px; }
  main { padding-top: 22px; }
  .introduction { display: grid; grid-template-columns: minmax(0, 1fr) 148px; column-gap: 10px; align-items: center; text-align: left; }
  h1 { grid-column: 1; grid-row: 1; align-self: end; font-size: 32px; letter-spacing: -1.2px; }
  h1 span { display: block; }
  .intro-description { grid-column: 1; grid-row: 2; align-self: start; margin: 8px 0 0; font-size: 13px; }
  .voice-stage { grid-column: 2; grid-row: 1 / 3; width: 148px; height: 148px; margin: 0; }
  .voice-orb { width: 128px; height: 128px; }
  .halo-outer { width: 146px; height: 146px; }
  .halo-inner { width: 138px; height: 138px; }
  .voice-caption { grid-column: 1 / -1; text-align: center; padding-top: 8px; }
  .chat-toolbar { margin: 0 16px; min-height: 60px; }
  .conversation-heading { gap: 8px; }
  .conversation-heading h2 { font-size: 14px; }
  .mode-notice { font-size: 10px; }
  .reset-button { padding: 0 4px; font-size: 12px; }
  .messages { padding: 23px 16px; height: 300px; }
  .message { gap: 10px; }
  .bubble-wrap { max-width: 87%; }
  .bubble { font-size: 15px; }
  .message-avatar { min-width: 28px; width: 28px; height: 28px; font-size: 21px; }
  .suggestions { padding: 0 14px 14px; gap: 6px; }
  .suggestions button { flex: 1; font-size: 11px; padding: 0 7px; white-space: nowrap; }
  .suggestions svg { display: none; }
  .composer-area { padding: 0 12px 12px; }
  .input-box { gap: 4px; padding: 7px; }
  textarea { padding: 12px 5px; }
  .send-button { min-width: 76px; padding: 0 10px; }
  .send-button svg { display: none; }
  .composer-hint { display: none; }
  .speech-controls { width: 100%; justify-content: space-between; }
  .trust-note { font-size: 11px; line-height: 1.7; }
  .privacy-note { font-size: 11px; }
}
@media (max-width: 350px) {
  main { padding-top: 16px; }
  .introduction { grid-template-columns: minmax(0, 1fr) 132px; gap: 0 6px; }
  h1 { font-size: 28px; }
  .voice-stage { width: 132px; height: 140px; }
  .voice-orb { width: 124px; height: 124px; }
  .halo-outer { width: 132px; height: 132px; }
  .halo-inner { width: 128px; height: 128px; }
  .conversation-heading { display: block; }
  .conversation-heading h2 { font-size: 13px; }
  .mode-notice { margin-top: 2px; }
  .reset-button { font-size: 11px; }
  .suggestions button { font-size: 10px; padding: 0 5px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
