@font-face { font-family: Melo System; src: local("Aptos"), local("Segoe UI"); font-display: swap; }
:root {
  color-scheme: light; --ink: #2d4035; --muted: #5f6e60; --accent: #49654e;
  --accent-hover: #39543e; --canvas: #faf8f2; --line: #e1e5d9; --soft: #e9ede3;
  font-family: "Melo System", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none; color: var(--ink); background: #e9ece3;
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 280px; background: radial-gradient(ellipse at 15% 12%, #f4e5d6 0, transparent 48%), radial-gradient(ellipse at 89% 80%, #d6e0d0 0, transparent 48%), #e9ece3; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; border: 0; color: inherit; }
button:disabled { cursor: default; opacity: .55; }
button, a { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
button, textarea { outline: none; }
:where(button,a,textarea,input,select):focus-visible { outline: 3px solid #82996d; outline-offset: 4px; }
a { color: inherit; }
svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
[hidden] { display: none !important; }
.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; }
.skip-link { position: fixed; left: 16px; top: -100px; background: var(--ink); color: white; padding: 14px; z-index: 20; }
.skip-link:focus { top: 16px; }
.app-shell { width: min(480px,100%); height: calc(100dvh - 40px); max-height: 960px; margin: 20px auto; border: 1px solid #ffffffbc; border-radius: 34px; overflow: hidden; box-shadow: 0 24px 90px #34492f17, 0 2px 8px #34492f0a; background: var(--canvas); }
.main-panel { height: 100%; display: flex; flex-direction: column; min-height: 0; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 76px; padding: 12px 25px 8px; flex-shrink: 0; }
.brand { display: flex; align-items: center; gap: 7px; padding: 0; min-height: 44px; background: none; font-size: 32px; font-weight: 650; letter-spacing: -1.8px; }
.brand svg { width: 31px; height: 34px; color: #718b65; stroke-width: 2.3; }
.brand-period { color: #91a581; }
.topbar-actions { display: flex; gap: 5px; }
.header-button { display: grid; place-items: center; width: 44px; height: 44px; background: transparent; border-radius: 50%; color: #65765f; }
.header-button:hover { background: var(--soft); }
#menu-button { border: 1px solid var(--line); }
.app-content { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: #cad3c2 transparent; display: flex; flex-direction: column; }
.voice-stage { padding: 15px 30px 16px; text-align: center; display: flex; align-items: center; flex-direction: column; flex-shrink: 0; position: relative; }
.voice-eyebrow { margin: 0 0 12px; font-size: 10px; line-height: 1.4; font-weight: 600; letter-spacing: 2.2px; color: var(--muted); }
.voice-stage h1 { white-space: pre-line; font-family: Georgia, "Times New Roman", serif; font-size: 45px; font-weight: 400; line-height: 1.05; letter-spacing: -1.8px; margin: 0; }
.voice-orbit { width: 198px; height: 180px; display: grid; place-items: center; position: relative; margin: 13px 0 10px; isolation: isolate; }
.voice-orbit::before { content: ""; position: absolute; inset: 10px -28px -4px; border-radius: 50%; background: radial-gradient(ellipse,#dbe4ce80,transparent 70%); filter: blur(12px); z-index: -2; }
.voice-orb { position: relative; height: 141px; width: 148px; display: grid; place-items: center; border-radius: 46% 54% 52% 48% / 50% 44% 56% 50%; background: radial-gradient(circle at 29% 20%, #f5f1ce 0%, #dce7bd 26%, #b1c69e 55%, #8caa87 83%, #789677 100%); box-shadow: inset 1px 3px 8px #ffffed9e, inset -8px -12px 22px #61785535, 0 18px 30px #81916d18; animation: float 7s ease-in-out infinite; }
.voice-orb > svg { width: 60px; height: 60px; stroke-width: 2.8; color: #fcfff5; filter: drop-shadow(0 1px 1px #5c705b38); }
.orb-smile { stroke-width: 2.2; }
.orbit-line { position: absolute; width: 180px; height: 165px; border: 1px solid #b7c5a357; border-radius: 46% 54% 48% 52%; transform: rotate(-18deg); }
.orbit-two { width: 205px; height: 175px; border-color: #c8ceb72b; transform: rotate(20deg); }
.orb-petal { position: absolute; border-radius: 50%; z-index: -1; filter: blur(7px); }
.petal-one { width: 85px; height: 78px; top: 8px; right: 9px; background: #e8c9ae67; }
.petal-two { width: 95px; height: 75px; bottom: 1px; left: 6px; background: #bbcba66b; }
.orb-speck { position: absolute; height: 5px; width: 5px; border-radius: 50%; background: #c7b994; }
.speck-one { top: 17px; left: 22px; }
.speck-two { bottom: 22px; right: 7px; width: 3px; height: 3px; background: #a8b793; }
.voice-status { font-size: 14px; line-height: 1.6; margin: 0 0 19px; color: var(--muted); max-width: 340px; }
.voice-caption { margin: 0 0 16px; line-height: 1.6; font-size: 15px; max-height: 100px; overflow-y: auto; width: 100%; overflow-wrap: anywhere; }
.voice-caption:empty { display: none; }
.start-call { display: flex; align-items: center; justify-content: center; gap: 12px; width: 100%; max-width: 340px; min-height: 54px; padding: 14px 21px; border-radius: 19px; background: var(--accent); color: #fffef7; font-size: 16px; font-weight: 550; box-shadow: 0 5px 14px #3e59331a; transition: transform .2s, background .2s; }
.start-call:hover { background: var(--accent-hover); transform: translateY(-1px); }
.start-call:active { transform: scale(.98); }
.start-call .call-arrow { width: 18px; margin-left: auto; }
.start-call > span { margin-right: auto; }
.voice-error, .chat-error { font-size: 13px; line-height: 1.6; color: #834a35; border: 1px solid #e4c6b8; background: #faf0e9; border-radius: 14px; padding: 12px 14px; margin: 14px 0 0; width: 100%; overflow-wrap: anywhere; }
.voice-toolbar { margin: 5px 26px 0; padding: 18px 0 4px; border-top: 1px solid var(--line); flex-shrink: 0; }
.intent-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 13px; margin-bottom: 11px; }
.optional-label { font-size: 8px; letter-spacing: 1.2px; color: var(--muted); }
.intent-options { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
.intent-options button { display: flex; align-items: center; gap: 10px; min-height: 44px; font-size: 13px; background: #f0f0e7; border: 1px solid transparent; border-radius: 13px; padding: 10px 12px; text-align: left; color: #596954; transition: background .15s,border-color .15s; }
.intent-options button svg { width: 18px; height: 18px; }
.intent-options button:hover { background: #e8eddf; }
.intent-options button[aria-pressed=true] { background: #e4ebd9; color: #354d36; border-color: #adbe9e; }
.intent-options button[data-intent=vent]:not([aria-pressed=true]) { background: #f4eae2; color: #785746; }
.intent-options button[data-intent=perspective]:not([aria-pressed=true]) { background: #edebe4; }
.intent-hint { margin: 11px 0 0; text-align: center; font-size: 11px; line-height: 1.6; color: var(--muted); min-height: 18px; }
.voice-footnote { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 2px 16px 5px; margin-top: auto; color: var(--muted); font-size: 11px; flex-shrink: 0; }
.voice-footnote button { background: none; font-size: 11px; padding: 8px 0; min-height: 44px; min-width: 44px; text-decoration: underline; text-decoration-color: #bec7b4; text-underline-offset: 3px; }
.app-nav { display: flex; justify-content: space-around; align-items: center; min-height: 76px; padding: 9px 25px max(10px,env(safe-area-inset-bottom)); border-top: 1px solid #e2e5d8; background: #f9f8f1; flex-shrink: 0; }
.nav-item { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 54px; min-width: 84px; padding: 7px 17px; gap: 4px; color: var(--muted); background: none; border-radius: 17px; font-size: 11px; }
.nav-item svg { width: 22px; height: 22px; }
.nav-item[aria-pressed=true], .nav-item[aria-expanded=true] { color: #3c593d; background: #e7eddc; }
.nav-item:hover { background: #edf0e5; }
.call-controls { display: flex; gap: 23px; justify-content: center; }
.call-control { display: flex; align-items: center; flex-direction: column; gap: 8px; min-width: 64px; min-height: 75px; padding: 3px; font-size: 12px; background: transparent; border-radius: 16px; }
.call-control svg { width: 50px; height: 50px; padding: 14px; border-radius: 50%; background: #e6ebdc; color: #49634a; }
.call-control[aria-pressed=true] svg { background: #536b52; color: white; }
.call-control.end-call svg { background: #f0e0d5; color: #985943; }
.voice-bars { display: none; gap: 5px; align-items: center; height: 42px; }
.voice-bars i { width: 4px; height: 18px; border-radius: 4px; background: #fffef3; animation: voice-wave 1.2s ease-in-out infinite; }
.voice-bars i:nth-child(2) { height: 28px; animation-delay: .15s; }
.voice-bars i:nth-child(3) { height: 38px; animation-delay: .3s; }
.voice-bars i:nth-child(4) { height: 26px; animation-delay: .45s; }
.voice-bars i:nth-child(5) { height: 16px; animation-delay: .6s; }
.voice-stage[data-state=speaking] .voice-orb > svg { display: none; }
.voice-stage[data-state=speaking] .voice-bars { display: flex; }
.voice-stage:is([data-state=thinking],[data-state=connecting]) .orbit-one { border-top-color: #7d9567; animation: voice-rotate 3s linear infinite; }
.voice-stage[data-state=listening] .voice-orb { animation: voice-breathe 4s ease-in-out infinite; }
.voice-stage[data-state=muted] .voice-orb { filter: saturate(.3); animation: none; }
.voice-stage:not([data-state=idle]):not([data-state=error]) { flex: 1; justify-content: center; min-height: 400px; }
.main-panel:has(.voice-stage:not([data-state=idle]):not([data-state=error])) .voice-toolbar { display: none; }
.voice-primary:not(.transcript-open) .conversation-scroll, .voice-primary:not(.transcript-open) .composer-area { display: none; }
.conversation-scroll { flex: 1; min-height: 120px; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.transcript-open .app-content { overflow: hidden; }
.transcript-open .voice-toolbar, .transcript-open .voice-footnote { display: none; }
.transcript-open .voice-stage { display: none; }
.transcript-open .voice-stage:not([data-state=idle]):not([data-state=error]) { display: flex; flex: none; min-height: 0; flex-direction: row; flex-wrap: wrap; gap: 8px; padding: 12px 22px; border-bottom: 1px solid var(--line); }
.transcript-open .voice-stage h1, .transcript-open .voice-eyebrow, .transcript-open .voice-orbit, .transcript-open .voice-caption { display: none; }
.transcript-open .voice-status { width: 100%; max-width: none; text-align: center; margin: 0; font-size: 12px; }
.transcript-open .call-controls { gap: 26px; }
.transcript-open .call-control { min-height: 64px; min-width: 52px; font-size: 10px; gap: 3px; }
.transcript-open .call-control svg { height: 44px; width: 44px; padding: 12px; }
.transcript-open .voice-error { margin: 0; }
.transcript-open .voice-stage[data-state=error] { display: flex; padding: 0 22px 12px; }
.transcript-open .voice-stage[data-state=error] .voice-status, .transcript-open .voice-stage[data-state=error] .start-call { display: none; }
.welcome { text-align: center; padding: 24px 25px; margin: auto; max-width: 440px; min-height: 100%; display: flex; flex-direction: column; justify-content: center; align-items: center; }
.welcome-symbol { display: grid; place-items: center; width: 64px; height: 64px; color: #6d865f; background: #e9eddc; border-radius: 23px; margin-bottom: 23px; transform: rotate(-6deg); }
.welcome-symbol svg { height: 30px; width: 30px; transform: rotate(6deg); }
.welcome-kicker { font-size: 9px; letter-spacing: 1.6px; margin: 0 0 14px; color: var(--muted); }
.welcome h1 { font-family: Georgia,serif; font-size: 38px; font-weight: 400; line-height: 1.1; letter-spacing: -1px; margin: 0 0 15px; }
.welcome-description { font-size: 14px; color: var(--muted); line-height: 1.7; margin: 0; }
.starters { display: flex; flex-direction: column; gap: 9px; width: 100%; margin-top: 25px; }
.starter { display: flex; gap: 10px; align-items: center; min-height: 48px; border: 1px solid var(--line); border-radius: 14px; background: #f4f4eb; padding: 12px 14px; font-size: 12px; text-align: left; }
.starter > span:last-child { margin-left: auto; }
.starter svg { width: 18px; height: 18px; color: #738468; }
.composer-area { flex-shrink: 0; padding: 10px 20px 2px; }
.composer { background: #fffef9; border: 1px solid #dce2d2; border-radius: 21px; padding: 15px 16px 10px; box-shadow: 0 3px 12px #465b2f04; }
.composer:focus-within { border-color: #829674; box-shadow: 0 0 0 2px #91a77a1f; }
.composer textarea { display: block; width: 100%; min-height: 48px; max-height: 120px; resize: none; border: 0; padding: 0; background: none; font-size: 16px; line-height: 1.55; color: var(--ink); outline: none; }
.composer textarea::placeholder { color: #717a6b; }
.composer-actions { display: flex; align-items: center; gap: 8px; }
.composer-gentle, .character-count { font-size: 11px; color: var(--muted); }
.send-button, .stop-button { margin-left: auto; height: 44px; width: 44px; border-radius: 15px; background: var(--accent); color: white; display: grid; place-items: center; }
.send-button:disabled { background: var(--soft); color: #6c7a63; opacity: 1; }
.composer-footnote { display: flex; align-items: center; justify-content: center; gap: 10px; font-size: 10px; color: var(--muted); }
.composer-footnote button { background: none; min-height: 44px; padding: 7px 0; font-size: 10px; text-decoration: underline; text-underline-offset: 3px; }
.thread { padding: 22px 23px 8px; }
.message { font-size: 16px; line-height: 1.7; margin-bottom: 25px; animation: appear .25s ease-out; }
.message.user { width: fit-content; max-width: 90%; margin-left: auto; padding: 12px 16px; background: #e9eddc; border-radius: 19px 19px 5px 19px; }
.message-content { white-space: pre-wrap; overflow-wrap: anywhere; }
.message-author { display: flex; align-items: center; gap: 7px; font-size: 12px; color: #637c5c; margin-bottom: 8px; }
.message-author svg { width: 22px; height: 22px; }
.message-tools { display: flex; align-items: center; gap: 17px; margin-top: 3px; flex-wrap: wrap; }
.copy-button, .feedback-button { background: transparent; color: var(--muted); padding: 9px 0; font-size: 11px; min-height: 44px; }
.feedback-button[aria-pressed=true] { color: var(--accent); text-decoration: underline; }
.feedback-reasons { display: flex; flex-wrap: wrap; gap: 5px; }
.feedback-reasons button { min-height: 44px; background: var(--soft); padding: 8px 11px; border-radius: 12px; font-size: 11px; }
.feedback-note { font-size: 11px; color: var(--muted); }
.pending-message { opacity: .6; }
.typing { display: flex; align-items: center; gap: 5px; font-size: 12px; color: var(--muted); padding: 5px 0 20px; }
.typing span { width: 5px; height: 5px; border-radius: 50%; background: #8a9e77; animation: pulse 1.3s ease-in-out infinite; }
.typing span:nth-child(2) { animation-delay: .15s; }.typing span:nth-child(3) { animation-delay: .3s; }
.typing em { font-style: normal; margin-left: 8px; }
.session-notice { font-size: 12px; text-align: center; color: var(--muted); }
.setup-banner, .safety-support { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 5px 20px 10px; background: #f1eddf; border: 1px solid #dfd8c4; border-radius: 13px; padding: 10px 12px; font-size: 12px; line-height: 1.5; flex-shrink: 0; }
.setup-banner button, .safety-support button, .chat-error button { min-height: 44px; padding: 6px; flex-shrink: 0; max-width: 45%; background: none; color: inherit; font-size: 12px; text-decoration: underline; text-underline-offset: 3px; }
.chat-error { display: flex; align-items: center; gap: 10px; margin: 0 0 10px; }
dialog { border: 1px solid #e4e7da; border-radius: 28px; padding: 25px; width: min(460px,calc(100% - 32px)); max-height: calc(100dvh - 48px); overflow-y: auto; color: var(--ink); background: var(--canvas); box-shadow: 0 20px 80px #263c352b; }
dialog::backdrop { background: #283a324b; backdrop-filter: blur(5px); }
.dialog-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 13px; }
.eyebrow { color: var(--muted); font-size: 10px; font-weight: 600; letter-spacing: 1.5px; line-height: 1.5; margin: 0; }
.icon-button { display: grid; place-items: center; width: 44px; height: 44px; flex-shrink: 0; border-radius: 50%; background: var(--soft); font-size: 27px; font-weight: 300; }
dialog h2 { font-family: Georgia,serif; font-size: 31px; font-weight: 400; letter-spacing: -1px; line-height: 1.15; margin: 0 0 14px; }
.dialog-description, .privacy-copy { font-size: 14px; line-height: 1.7; color: var(--muted); margin: 0 0 22px; }
.privacy-copy p { margin: 0 0 15px; }
.primary-button, .secondary-button { min-height: 48px; border-radius: 14px; padding: 13px 16px; font-size: 14px; }
.primary-button { display: block; width: 100%; background: var(--accent); color: white; text-align: center; }
.primary-button:hover { background: var(--accent-hover); }
.secondary-button { background: var(--soft); }
.dialog-button-row { display: flex; gap: 10px; }
.dialog-button-row > * { flex: 1; }
.link-button { text-decoration: none; display: flex; justify-content: center; align-items: center; gap: 12px; }
.tone-options { padding: 0; margin: 0 0 20px; border: 0; display: flex; flex-direction: column; gap: 9px; }
.tone-option { display: flex; align-items: center; gap: 12px; border: 1px solid var(--line); padding: 15px; border-radius: 15px; cursor: pointer; }
.tone-option:has(input:checked) { background: #eaf0e0; border-color: #a6b795; }
.tone-option:has(input:focus-visible) { outline: 3px solid #82996d; outline-offset: 3px; }
.tone-option input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.tone-option strong { display: block; font-size: 14px; margin-bottom: 5px; }
.tone-option > span > span { display: block; color: var(--muted); font-size: 12px; line-height: 1.6; }
.radio-mark { height: 18px; width: 18px; flex-shrink: 0; border: 1px solid #b5c2a7; border-radius: 50%; margin-left: auto; }
.tone-option:has(input:checked) .radio-mark { border: 5px solid var(--accent); background: white; }
.settings-connection { display: block; margin: 12px auto 0; min-height: 44px; background: transparent; color: var(--muted); font-size: 12px; text-decoration: underline; }
.settings-list { border-top: 1px solid var(--line); }
.settings-row { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 75px; padding: 14px 0; text-align: left; border-bottom: 1px solid var(--line); background: none; }
.settings-row > span:nth-last-child(2) { flex: 1; min-width: 0; font-size: 14px; }
.settings-row > span:last-child { font-size: 23px; color: #718068; }
.settings-row small { display: block; font-size: 12px; color: var(--muted); padding-top: 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.settings-row:hover { background: #f0f2e7; }
.connection-indicator { width: 9px; height: 9px; margin: 0 6px; border-radius: 50%; background: #baa783; }
.connected .connection-indicator { background: #6b895c; }
.settings-note { font-size: 12px; line-height: 1.7; color: var(--muted); margin: 22px 0 0; }
.sheet-handle { display: none; }
.setup-steps { font-size: 14px; line-height: 1.7; padding-left: 22px; color: var(--muted); }
.setup-steps li { padding-left: 3px; margin: 12px 0; }
code { font-size: 12px; padding: 2px 4px; border-radius: 4px; background: var(--soft); overflow-wrap: anywhere; }
.small-note, .connection-result { font-size: 12px; line-height: 1.7; color: var(--muted); }
.text-link { display: inline-block; font-size: 13px; color: var(--accent); text-underline-offset: 3px; margin: 4px 0 16px; min-height: 36px; padding: 8px 0; }
.voice-key-link { display: block; }
.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: 96px; z-index: 10; width: max-content; max-width: calc(100% - 40px); border-radius: 14px; padding: 13px 18px; background: var(--ink); color: white; font-size: 13px; box-shadow: 0 5px 20px #2138241a; }
@keyframes float { 0%,100% { transform: translateY(2px) rotate(-3deg); } 50% { transform: translateY(-5px) rotate(2deg); } }
@keyframes voice-breathe { 0%,100% { transform: scale(1); } 50% { transform: scale(1.04); } }
@keyframes voice-wave { 0%,100% { transform: scaleY(.6); } 50% { transform: scaleY(1); } }
@keyframes voice-rotate { to { transform: rotate(342deg); } }
@keyframes pulse { 0%,70%,100% { opacity: .4; transform: translateY(0); } 35% { opacity: 1; transform: translateY(-3px); } }
@keyframes appear { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }
@media (max-width: 600px) {
  body { background: var(--canvas); }
  .app-shell { height: 100dvh; max-height: none; margin: 0; width: 100%; border: 0; border-radius: 0; box-shadow: none; }
  .topbar { padding: max(12px,env(safe-area-inset-top)) 22px 8px; min-height: 72px; }
  .voice-stage { padding: 12px 27px 15px; }
  .voice-stage h1 { font-size: 43px; }
  .voice-orbit { height: 169px; margin: 12px 0 8px; }
  .voice-toolbar { margin-right: 24px; margin-left: 24px; padding-top: 15px; }
  .app-nav { padding-left: 19px; padding-right: 19px; }
  dialog, .profile-dialog { margin: auto auto 0; width: 100%; max-width: 100%; max-height: calc(100dvh - max(20px,env(safe-area-inset-top))); border-radius: 27px 27px 0 0; padding: 23px 23px max(24px,env(safe-area-inset-bottom)); border-bottom: 0; }
  .sheet-handle { display: block; margin: -8px auto 13px; width: 36px; height: 4px; border-radius: 3px; background: #cad2be; }
}
@media (max-height: 760px) {
  .voice-stage { padding-top: 6px; padding-bottom: 12px; }
  .voice-stage h1 { font-size: 38px; }
  .voice-eyebrow { margin-bottom: 9px; }
  .voice-orbit { height: 136px; margin: 5px 0 4px; transform: scale(.85); }
  .voice-status { font-size: 13px; margin-bottom: 14px; }
  .voice-toolbar { padding-top: 13px; }
  .voice-footnote { padding-bottom: 0; }
  .welcome { padding: 20px 24px; justify-content: flex-start; }
  .welcome-symbol { margin-bottom: 17px; }
  .welcome h1 { font-size: 32px; }
  .starters { margin-top: 19px; }
}
@media (max-width: 350px) {
  .voice-stage { padding-left: 21px; padding-right: 21px; }
  .voice-toolbar { margin-left: 19px; margin-right: 19px; }
  .voice-stage h1 { font-size: 38px; }
  .intent-options button { gap: 6px; padding: 10px 8px; font-size: 12px; }
  .optional-label { display: none; }
  .voice-footnote { gap: 9px; font-size: 9px; }
  .nav-item { min-width: 74px; }
}
/* The visual viewport excludes the software keyboard on iPhone. Keep this
   adjustment scoped to writing so voice and desktop layouts stay stable. */
.melo-keyboard-open .app-shell {
  position: fixed;
  top: var(--melo-viewport-top, 0px);
  left: 50%;
  transform: translateX(-50%);
  height: var(--melo-viewport-height);
  max-height: none;
  margin-top: 0;
  margin-bottom: 0;
  border-radius: 0;
}
.melo-keyboard-open .topbar { min-height: 56px; padding-top: max(6px,env(safe-area-inset-top)); padding-bottom: 6px; }
.melo-keyboard-open .conversation-scroll { min-height: 0; overflow-anchor: none; }
.melo-keyboard-open .composer-area { padding-top: 6px; padding-bottom: 10px; }
.melo-keyboard-open .composer { padding-top: 12px; padding-bottom: 8px; }
.melo-keyboard-open .composer textarea { max-height: max(48px,min(120px,calc(var(--melo-viewport-height) * .23))); }
.melo-keyboard-open .composer-footnote, .melo-keyboard-open .app-nav { display: none; }
.melo-keyboard-open .chat-error { max-height: 80px; overflow-y: auto; margin-bottom: 6px; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
