:root {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: #293d35; background: #f5f6f2; font-size: 16px; font-synthesis: none;
  --accent: #527060; --muted: #6f7c74; --line: #e2e8e1; --surface: #ffffffc9;
}
* { box-sizing: border-box; }
body { margin: 0; background: radial-gradient(ellipse at 10% 85%, #e8eee6 0, transparent 48%), #f5f6f2; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; -webkit-tap-highlight-color: transparent; }
button:disabled { opacity: .5; cursor: wait; }
button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 3px solid #8da997; outline-offset: 4px; }
[hidden] { display: none !important; }
.app { position: relative; isolation: isolate; max-width: 600px; margin: auto; padding: 38px 28px 16px; min-height: 100dvh; }
.app::before { content: ""; position: absolute; z-index: -1; pointer-events: none; inset: 0; border-radius: inherit; background: url('/brand/quiet-garden.svg') right top / 365px auto no-repeat; opacity: .8; }
.top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.eyebrow { font-size: .79rem; color: var(--muted); margin: 0 0 10px; letter-spacing: .035em; }
h1 { font-size: 1.8rem; font-weight: 650; letter-spacing: -.055em; margin: 0; line-height: 1.25; }
.icon-button { border: 1px solid #ffffffce; border-radius: 50%; width: 42px; height: 42px; background: #ffffffa6; color: #5e7266; display: grid; place-items: center; flex-shrink: 0; backdrop-filter: blur(12px); }
.icon-button svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; }
.mode { font-size: .73rem; color: #788378; line-height: 1.65; margin: -4px 0 18px; }
.mode:empty { display: none; }
.next-card { border: 1px solid #ffffffdd; background: #ffffffb3; border-radius: 21px; padding: 17px 18px; display: flex; gap: 13px; align-items: center; min-height: 80px; box-shadow: 0 4px 22px #334e3c04; backdrop-filter: blur(18px); }
.next-icon { width: 38px; height: 38px; border-radius: 12px; background: #edf2eb; color: var(--accent); display: grid; place-items: center; flex-shrink: 0; }
.next-icon svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.next-card p { font-size: .76rem; color: var(--muted); margin: 0 0 6px; }
.next-card strong { font-size: .92rem; font-weight: 550; line-height: 1.55; display: block; }
.intro { text-align: center; padding: 53px 0 8px; }
.intro h2 { font-size: 1.65rem; letter-spacing: -.055em; font-weight: 500; margin: 0 0 12px; }
.intro p { font-size: .84rem; color: var(--muted); margin: 0; line-height: 1.8; }
.conversation { display: flex; flex-direction: column; gap: 13px; overflow-wrap: anywhere; max-height: 265px; overflow: auto; scrollbar-width: thin; padding: 24px 0 4px; }
.conversation:empty { display: none; }
.bubble { max-width: 91%; padding: 13px 17px; font-size: .91rem; line-height: 1.8; border-radius: 20px; background: #ffffffd9; border: 1px solid #ffffffec; }
.bubble.user { align-self: flex-end; background: #e7eee6; border-color: transparent; border-bottom-right-radius: 6px; }
.bubble.assistant { align-self: flex-start; border-bottom-left-radius: 6px; }
.bubble.error { border-color: #e7d8c6; background: #fffaf3; }
.recent { margin-top: 20px; }
.recent:empty { display: none; }
.section-title { font-size: 1.3rem; font-weight: 600; letter-spacing: -.03em; margin: 32px 0 18px; }
.item { background: var(--surface); border: 1px solid #ffffffed; border-radius: 19px; padding: 17px 18px; margin: 11px 0; }
.item h3 { margin: 0 0 8px; font-size: .95rem; font-weight: 550; line-height: 1.6; }
.item p { margin: 7px 0; font-size: .81rem; color: var(--muted); line-height: 1.8; }
.pill { font-size: .71rem; display: inline-block; border-radius: 6px; padding: 4px 8px; color: #516e5b; background: #eaf0e7; }
.pill.warning { color: #866745; background: #f6efdf; }
.pill.failed { color: #9f6161; background: #f9eded; }
.item a { font-size: .8rem; color: var(--accent); text-underline-offset: 3px; }
.composer { text-align: center; margin: 29px 0 12px; padding: 9px 0 0; }
.status { font-size: .8rem; color: var(--muted); min-height: 21px; line-height: 1.7; margin: 0 0 12px; }
.status.error { color: #9d6657; }
.voice-row { display: flex; justify-content: center; align-items: center; gap: 10px; }
.mic { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; width: 190px; min-height: 170px; padding: 0; border: 0; border-radius: 40px; background: transparent; color: #465e51; transition: transform .22s ease; }
.mic:hover { transform: translateY(-2px); }
.mic:active { transform: scale(.96); }
#mic-label { font-size: .9rem; font-weight: 500; letter-spacing: .015em; }
.submit { background: #e2ebdf; border: 1px solid #d6e1d3; border-radius: 16px; color: #45634d; min-height: 48px; padding: 0 18px; }
.text-toggle { background: none; border: 0; color: var(--muted); font-size: .75rem; min-height: 44px; padding: 12px 18px; }
.transcript { font-size: .88rem; color: #546c5c; line-height: 1.8; margin: 8px 0; }
.transcript:empty { display: none; }
#text-composer { text-align: right; padding: 4px 0 8px; }
textarea { width: 100%; border: 1px solid var(--line); border-radius: 17px; resize: vertical; padding: 14px; color: #344b3f; background: #fffffff0; min-height: 90px; font-size: .9rem; line-height: 1.7; }
textarea::placeholder, input::placeholder { color: #89948c; }
.small-button { background: var(--accent); color: white; border: 0; border-radius: 13px; padding: 11px 21px; margin-top: 10px; min-height: 44px; font-size: .88rem; }
.bottom-nav { display: flex; justify-content: center; gap: 56px; padding: 17px 0 10px; margin-top: 20px; border-top: 1px solid #dfe6dcbb; }
.bottom-nav button { background: none; border: 0; color: #89958a; font-size: .68rem; min-width: 48px; min-height: 48px; padding: 0; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.bottom-nav button.active { color: #3e5e49; }
.bottom-nav svg { width: 23px; height: 23px; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; fill: none; }
footer { display: flex; align-items: center; justify-content: center; gap: 10px; color: #7d8b7f; font-size: .65rem; padding: 16px 0 5px; }
footer img { width: 69px; height: 31px; object-fit: contain; }
.empty { color: var(--muted); padding: 35px 0; text-align: center; line-height: 1.9; font-size: .9rem; white-space: pre-line; }
.wave { height: 22px; display: flex; align-items: center; gap: 4px; justify-content: center; margin: 0 0 4px; }
.wave i { display: block; width: 3px; height: 6px; border-radius: 2px; background: #77937b; animation: wave 1s ease-in-out infinite; }
.wave i:nth-child(2n) { animation-delay: .2s; }
.wave i:nth-child(3n) { animation-delay: .4s; }
.dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.dialog-head h2 { font-size: 1.19rem; font-weight: 600; letter-spacing: -.025em; margin: 0; }
dialog { border: 1px solid #ffffff; border-radius: 28px; padding: 25px; max-width: 520px; width: calc(100% - 28px); max-height: 85dvh; color: #33493c; background: #f7f9f4; box-shadow: 0 30px 100px #273d3529; }
dialog::backdrop { background: #27392e44; backdrop-filter: blur(8px); }
.dialog-head .icon-button { font-size: 1.5rem; width: 34px; height: 34px; }
dialog p { font-size: .83rem; line-height: 1.85; color: var(--muted); }
dialog label { display: flex; align-items: center; justify-content: space-between; font-size: .9rem; padding: 17px 0; border-bottom: 1px solid var(--line); gap: 10px; }
input[type=checkbox] { appearance: none; width: 43px; height: 26px; border-radius: 20px; background: #dce2da; position: relative; transition: background .2s ease; cursor: pointer; flex-shrink: 0; }
input[type=checkbox]::before { content: ""; position: absolute; width: 22px; height: 22px; left: 2px; top: 2px; background: white; border-radius: 50%; box-shadow: 0 1px 3px #34453426; transition: transform .2s ease; }
input[type=checkbox]:checked { background: #7e9d7f; }
input[type=checkbox]:checked::before { transform: translateX(17px); }
input[type=search], select { border: 1px solid var(--line); background: white; border-radius: 13px; padding: 12px; max-width: 100%; color: #48604e; font-size: .88rem; }
input[type=search] { width: 100%; margin: 8px 0 12px; }
.quote-search-row { display: flex; align-items: center; gap: 8px; }
.quote-search-row input { min-width: 0; }
#quote-mic { width: 44px; height: 44px; border: 1px solid var(--line); }
#quote-mic.listening { background: #e2ebdf; color: #36573e; }
.quote-status { min-height: 21px; margin: 0 0 10px; }
.quote-status:empty { display: none; }
#quotes .item { width: 100%; text-align: left; color: inherit; margin: 6px 0; transition: border-color .2s ease; }
#quotes .item:hover { border-color: #9db099; }
.quote-index { font-size: .7rem; color: #81907e; margin-bottom: 7px; display: block; }
.capability { border-radius: 17px; background: #edf1e8; padding: 16px; margin: 22px 0 15px; font-size: .9rem; }
.capability p { margin: 7px 0; }
.poster-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; border-bottom: 1px solid var(--line); padding: 15px 0; font-size: .84rem; }
.poster-row button { border: 0; background: #e8eee2; border-radius: 10px; padding: 10px 13px; min-height: 44px; color: #4a634b; }
.poster-row small { color: var(--muted); display: block; margin-top: 6px; font-size: .72rem; }
.muted { color: var(--muted); }
@keyframes wave { 50% { height: 21px; } }
@media(min-width: 800px) {
  body { min-height: 100dvh; padding: 30px 0; }
  .app { padding: 35px 38px 18px; min-height: calc(100dvh - 60px); background: #fafbf7; border: 1px solid #fff; border-radius: 32px; box-shadow: 0 24px 90px #46573d0d; }
  .intro { padding-top: 60px; }
}
@media(max-width: 420px) {
  .app { padding: max(28px, env(safe-area-inset-top)) 23px max(14px, env(safe-area-inset-bottom)); }
  .app::before { background-size: 315px auto; background-position: calc(100% + 33px) -5px; }
  h1 { font-size: 1.65rem; }
  .top { margin-bottom: 18px; }
  .intro { padding-top: 42px; }
  .intro h2 { font-size: 1.5rem; }
  .composer { margin-top: 25px; }
  .bottom-nav { gap: 48px; margin-top: 14px; }
}
@media(prefers-reduced-motion: reduce) { *, *::before { animation: none !important; transition: none !important; } }

/* A transparent botanical object; dispatch is expressed with drifting seeds. */
.wordmark { font-size: .56rem; letter-spacing: .18em; color: #7a8a7b; margin: 9px 0 0; font-weight: 500; }
.intro .intro-kicker { font-size: .57rem; letter-spacing: .25em; color: #8a9988; margin-bottom: 12px; }
body { overflow-x: hidden; }
.voice-row { position: relative; }
.mic { isolation: isolate; min-height: 286px; width: 270px; gap: 0; border-radius: 36px; }
.mic:hover { transform: none; }
.mic:active { transform: scale(.985); }
.dandelion-scene { display: block; position: relative; width: 260px; height: 260px; pointer-events: none; }
.dandelion-stem, .dandelion-crown { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 4px 5px #78836b0d); }
.dandelion-stem { clip-path: inset(48.7% 0 0); z-index: 1; }
.dandelion-crown { clip-path: inset(0 0 51.3%); z-index: 2; transform-origin: 50% 30%; }
.dandelion-aura { position: absolute; inset: -3% 6% 34%; border-radius: 50%; background: radial-gradient(ellipse, #e1e6d13d, #f8f6e824 45%, transparent 72%); animation: quiet-light 9s ease-in-out infinite; }
.dandelion-core-stem { position: absolute; left: 49.2%; top: 29%; width: 1.4%; height: 22%; background: linear-gradient(90deg, #adb878, #bcca86, #9daa6b); z-index: 0; }
.dandelion-core { position: absolute; left: 46.9%; top: 26.4%; width: 6%; aspect-ratio: 1; background: radial-gradient(circle at 35% 30%, #c7b793, #a18b67); border-radius: 50%; z-index: 1; }
.dandelion-seeds { position: absolute; inset: 0; z-index: 5; overflow: visible; }
.dandelion-seed { position: absolute; display: block; width: 25px; height: 29px; opacity: 0; will-change: transform, opacity; }
.dandelion-seed svg { width: 100%; height: 100%; overflow: visible; }
.seed-fiber { fill: none; stroke: #a4ac93; stroke-width: .65; stroke-linecap: round; }
.seed-stalk { fill: none; stroke: #b6a37a; stroke-width: .85; stroke-linecap: round; }
.seed-grain { fill: #b29a70; }
.dandelion-ground { position: absolute; width: 61px; height: 9px; top: 95%; left: 38%; border-radius: 50%; background: radial-gradient(ellipse, #b4bea62a, transparent 70%); }
#mic-label { z-index: 1; margin: 4px 0 0; font-size: .86rem; }
.mic.listening .dandelion-crown { animation: listening-breath 2.8s ease-in-out infinite; }
.mic.listening #mic-label { color: #36573e; }
.dandelion-scene[data-phase=blowing] .dandelion-crown { animation: none; }
.intro { padding-top: 30px; padding-bottom: 0; }
.composer { margin-top: 19px; }
.status { margin-bottom: 0; }
.bottom-nav { margin-top: 12px; }
@keyframes quiet-light { 0%, 100% { opacity: .35; } 50% { opacity: .95; } }
@keyframes listening-breath { 50% { transform: scale(1.02); } }
@media (max-width: 420px) {
  .app { padding-top: max(23px, env(safe-area-inset-top)); }
  .top { margin-bottom: 16px; }
  .mode { margin-bottom: 14px; }
  .intro { padding-top: 25px; }
  .composer { margin-top: 16px; }
  .text-toggle { padding-top: 10px; padding-bottom: 10px; }
  footer { padding-top: 8px; }
}
@media (max-height: 740px) and (max-width: 600px) {
  .intro { padding-top: 20px; }
  .intro .intro-kicker { display: none; }
  .mic { min-height: 246px; }
  .dandelion-scene { width: 220px; height: 220px; }
  .composer { margin-top: 12px; }
  .bottom-nav { margin-top: 4px; padding-top: 12px; }
}
@media (prefers-reduced-motion: reduce) { .dandelion-aura, .mic.listening .dandelion-crown { animation: none !important; } .dandelion-seeds { display: none; } }

.dandelion-stem, .dandelion-crown { filter: saturate(.85) contrast(1.08); }
.draft-send { display: block; min-height: 40px; margin-top: 12px; padding: 8px 16px; border: 0; border-radius: 12px; color: #4a6651; background: #e8eee1; font-size: .82rem; }
.reminder-dialog { text-align: center; }
.reminder-dialog .dialog-head { margin-bottom: 0; }
.reminder-kicker { font-size: .58rem; letter-spacing: .16em; margin: 0; }
.reminder-flower { display: block; width: 126px; height: 126px; object-fit: contain; margin: 0 auto 9px; filter: saturate(.85) contrast(1.08); }
.reminder-dialog h2 { margin: 10px 0; font-size: 1.3rem; font-weight: 550; }
.reminder-dialog textarea { min-height: 98px; text-align: left; }
.reminder-dialog textarea[readonly] { text-align: center; border: 0; background: transparent; resize: none; min-height: 60px; }
.reminder-dialog .reminder-note { font-size: .69rem; line-height: 1.75; margin-bottom: 0; }
.reminder-buttons { display: flex; justify-content: center; gap: 12px; margin-top: 18px; }
.reminder-buttons .small-button { margin: 0; }
.quiet-button { min-height: 44px; border: 1px solid var(--line); background: #ffffffa6; border-radius: 13px; padding: 10px 15px; color: #657461; font-size: .85rem; }
#recipient-picker { text-align: left; margin-top: 12px; }
#recipient-picker label { font-size: .8rem; border: 0; padding: 8px 0; }
#recipient-query { margin: 6px 0; width: 100%; }
.contact-choice { width: 100%; text-align: left; background: #fff; padding: 14px; border: 1px solid var(--line); border-radius: 13px; margin: 4px 0; color: #3e5746; min-height: 44px; }
.contact-choice.selected { border-color: #9fb394; background: #e8eee1; }
#reminder-error { color: #9e6554; font-size: .8rem; }
#reminder-error:empty { display: none; }
.alarm-active .reminder-flower, .mic.alarming .dandelion-scene { animation: alarm-sway .18s ease-in-out infinite alternate; transform-origin: 50% 92%; }
@keyframes alarm-sway { from { transform: rotate(-6deg); } to { transform: rotate(6deg); } }
@media (prefers-reduced-motion: reduce) { .alarm-active .reminder-flower, .mic.alarming .dandelion-scene { animation: none !important; } }

/* Keep recording controls within a narrow phone viewport. */
.voice-row .submit { position: absolute; right: 0; bottom: -3px; min-height: 44px; padding: 0 12px; border-radius: 13px; font-size: .82rem; }
.reminder-dialog { overflow-y: auto; overscroll-behavior: contain; }
#recipient-results { max-height: 165px; overflow-y: auto; }

/* Viewport layer lets the seeds leave the flower without clipping in the composer. */
.dandelion-flight { position: fixed; inset: 0; z-index: 1000; pointer-events: none; overflow: hidden; contain: strict; }
.dandelion-flight .dandelion-seed { width: 38px; height: 44px; filter: drop-shadow(0 1px 2px #ffffffcc); }
.dandelion-flight .seed-fiber { stroke: #929b83; stroke-width: .42; }
.dandelion-flight .seed-stalk { stroke: #b39366; stroke-width: .7; }
.dandelion-flight .seed-grain { fill: #c09255; }
@media (prefers-reduced-motion: reduce) { .dandelion-flight { display: none; } }
