@font-face {
  font-family: Manrope;
  src: url('/assets/fonts/manrope-variable.ttf') format('truetype');
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: Nunito;
  src: url('/assets/fonts/nunito-variable.ttf') format('truetype');
  font-weight: 200 1000;
  font-style: normal;
  font-display: swap;
}

:root {
  --canvas: #f7faf8;
  --paper: #fff;
  --mint-soft: #e4f4eb;
  --mint: #bce9d2;
  --ink: #173f35;
  --green: #28674f;
  --muted: #576f65;
  --line: #dfe8e2;
  --sidebar: 232px;
  --header-height: 68px;
  --app-height: 100dvh;
  --warning: #934c3e;
  font-family: Manrope, 'Segoe UI', sans-serif;
  color: var(--ink);
  background: var(--canvas);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

* { box-sizing: border-box; }
body { margin: 0; font-size: 14px; line-height: 1.65; }
button, input, textarea, select { font: inherit; }
button, a, input, textarea, select { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; color: inherit; }
button, input, textarea, select { border-radius: 0; }
button { border: 0; background: none; }
a { color: inherit; text-decoration: none; }
button:disabled { cursor: not-allowed; opacity: .5; }
button:not(:disabled):hover, a:hover { color: var(--green); }
button, a { touch-action: manipulation; }
button:focus-visible, a:focus-visible, select:focus-visible, input:focus-visible, textarea:focus-visible, [tabindex]:focus-visible { outline: 3px solid #398262; outline-offset: 4px; }
::selection { color: var(--ink); background: var(--mint); }
[hidden] { display: none !important; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { font-weight: 700; }
h1 { letter-spacing: -.055em; }
h2 { letter-spacing: -.025em; }
img { max-width: 100%; }
svg.icon { width: 21px; height: 21px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; vertical-align: middle; }
.icon-definitions { position: absolute; width: 0; height: 0; overflow: hidden; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; top: -100px; left: 20px; z-index: 100; background: var(--ink); color: white; padding: 12px 20px; border-radius: 10px; }
.skip-link:focus { top: 12px; }

.sidebar { position: fixed; z-index: 20; inset: 0 auto 0 0; width: var(--sidebar); padding: 28px 16px 18px; background: #f0f5f1; border-right: 1px solid var(--line); display: flex; flex-direction: column; overflow-y: auto; }
.brand { display: flex; align-items: center; gap: 10px; width: fit-content; margin-left: 13px; font-family: Nunito, Manrope, sans-serif; font-size: 36px; font-weight: 750; line-height: 1; letter-spacing: -.035em; }
.brand img { object-fit: contain; }
.brand-dot { color: #4d9d77; }
.brand-wordmark { display: flex; flex-direction: column; gap: 5px; }
.brand-tagline { color: var(--muted); font-family: Manrope, 'Segoe UI', sans-serif; font-size: 12px; font-weight: 500; line-height: 1.25; letter-spacing: 0; }
.new-chat { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 46px; width: 100%; margin: 28px 0 20px; border: 1px solid #c8d8ce; border-radius: 10px; font-size: 13px; font-weight: 600; background: #f7faf8; }
.new-chat:hover { background: white; border-color: #90b69f; }
.main-nav { display: grid; gap: 7px; }
.nav-link { display: flex; align-items: center; gap: 12px; min-height: 49px; padding: 12px 14px; font-size: 14px; line-height: 1.45; color: #587065; border-radius: 10px; }
.nav-link .icon { width: 20px; height: 20px; }
.nav-link.active { color: var(--ink); background: #dbece1; font-weight: 700; }
.nav-link:hover { background: #e5efe8; }
.nav-detail { font-size: 12px; font-weight: 400; display: block; margin-top: 4px; }
.nav-active-dot { width: 6px; height: 6px; border-radius: 50%; background: #438164; margin-left: auto; }
.nav-link:not(.active) .nav-active-dot { visibility: hidden; }
.sidebar-bottom { margin-top: auto; padding-top: 28px; }
.sidebar-note { position: relative; margin: 0 8px 26px; padding: 0 6px 24px; border-bottom: 1px solid #d9e4dc; }
.sidebar-note > .icon { color: #44745c; width: 26px; height: 26px; margin-bottom: 12px; transform: rotate(-12deg); }
.sidebar-note p { color: #466655; font-size: 15px; font-weight: 500; line-height: 1.65; letter-spacing: -.02em; }
.sidebar-note > span { display: block; margin-top: 12px; color: #587065; font-size: 12px; }
.quiet-link { display: flex; align-items: center; gap: 11px; min-height: 44px; font-size: 12px; color: #556f61; padding: 6px 13px; }
.quiet-link > .icon { width: 17px; height: 17px; }
.sidebar-signoff { color: #576f64; font-size: 12px; padding: 20px 13px 0; }

.workspace { margin-left: var(--sidebar); min-height: 100svh; }
.topbar { min-height: var(--header-height); flex-shrink: 0; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 10px 32px; background: rgba(247, 250, 248, .96); }
.topbar-start, .topbar-actions { display: flex; align-items: center; gap: 22px; }
#view-title { font-size: 13px; font-weight: 600; }
.connection { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 12px; }
.status-dot { width: 6px; height: 6px; border-radius: 50%; display: inline-block; background: #508764; flex-shrink: 0; }
.status-dot.offline { background: #b48960; }
.help-button { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 13px; border: 1px solid #e3d8cf; border-radius: 8px; color: #875d4e; font-size: 12px; background: #fbf7f2; }
.help-button .icon { width: 17px; height: 17px; }
.help-button:hover { background: #f2e8df; color: #784b3c !important; }
.icon-button { width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; border-radius: 8px; }
.icon-button:hover { background: #e4eee7; }
.exit-button { color: #567064; }
#menu-toggle, #menu-close { display: none; }
#main:focus { outline: none; }
.view { min-width: 0; }
body[data-view="chat"] { overflow: hidden; }
body[data-view="chat"] .workspace { height: var(--app-height); min-height: 0; display: flex; flex-direction: column; }
body[data-view="chat"] #main { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.chat-view { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.chat-content { width: min(900px, calc(100% - 72px)); margin: 0 auto; padding: 0 0 max(10px, env(safe-area-inset-bottom)); flex: 1; min-height: 0; display: flex; flex-direction: column; }
.chat-scroll { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 32px 7px 8px 3px; scroll-padding: 16px; scrollbar-width: thin; scrollbar-color: #bacfc1 transparent; }
.chat-scroll:focus-visible { outline-offset: -3px; border-radius: 8px; }
.chat-dock { position: relative; flex-shrink: 0; padding-top: 12px; }
.latest-button { position: absolute; z-index: 2; left: 50%; bottom: calc(100% + 4px); transform: translateX(-50%); min-height: 44px; padding: 9px 16px; border: 1px solid #c5dace; border-radius: 24px; background: white; box-shadow: 0 3px 12px #173f3512; font-size: 12px; white-space: nowrap; }
.latest-button:hover { background: var(--mint-soft); }
.welcome { display: grid; grid-template-columns: minmax(0, 1fr) 110px; gap: 32px; align-items: center; max-width: 680px; }
.welcome-copy { position: relative; z-index: 1; }
.welcome-greeting { display: flex; align-items: center; gap: 9px; color: #537161; font-size: 13px; font-weight: 500; margin-bottom: 14px; }
.welcome h1 { font-size: 44px; font-weight: 600; line-height: 1.16; }
.welcome-description { margin-top: 18px; color: #5a6f61; font-size: 15px; line-height: 1.65; max-width: 440px; }
.swan-scene { position: relative; width: 100%; max-width: 380px; aspect-ratio: 1 / 1; margin: 0 auto; }
.swan-pond { position: absolute; inset: 11% 3% 10% 5%; border-radius: 53% 47% 43% 57% / 51% 57% 43% 49%; background: #e0f0e5; transform: rotate(-15deg); }
.pond-lines { position: absolute; inset: 1% -3% 0; width: 106%; height: 100%; stroke: #afcfb8; stroke-width: 1; }
.pond-lines path { fill: #aac9ae; stroke: none; }
.welcome-swan { width: 110px; height: auto; object-fit: contain; }

.starter-section { margin: 28px 0 18px; }
.starter-section h2 { font-size: 13px; font-weight: 600; letter-spacing: -.01em; margin-bottom: 12px; }
.starter-prompts { display: flex; flex-wrap: wrap; gap: 9px; }
.starter-prompts button { display: flex; align-items: center; gap: 8px; border: 1px solid #dce7de; border-radius: 9px; padding: 10px 14px; min-height: 44px; font-size: 12px; color: #55705f; background: #fcfdfb; }
.starter-prompts button:hover { border-color: #a4c4b0; background: var(--mint-soft); }
.starter-prompts .icon { width: 16px; height: 16px; color: #52705b; }
.starter-prompts button > span { color: #52705b; font-size: 19px; line-height: 1; }
.composer { border: 1px solid #d1e0d5; background: white; border-radius: 17px; padding: 15px 18px 10px; }
.composer:focus-within { border-color: #6d9d80; box-shadow: 0 0 0 3px #ddecdf; }
.composer textarea { display: block; border: 0; background: transparent; width: 100%; min-height: 48px; max-height: 120px; resize: none; padding: 0; font-size: 15px; line-height: 1.7; color: var(--ink); outline: none; }
.composer textarea::placeholder { color: #576f61; }
.composer textarea:focus-visible { outline: none; }
.composer-bottom { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 6px; }
.profile-button { display: inline-flex; align-items: center; gap: 7px; min-height: 44px; max-width: 55%; padding: 0; color: #597060; font-size: 12px; }
#profile-caption { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile-avatar { width: 25px; height: 25px; border-radius: 50%; background: #f2f6ef; display: grid; place-items: center; }
.profile-avatar .icon { width: 14px; height: 14px; }
.profile-button .profile-chevron { width: 11px; height: 11px; color: #536f63; }
.send-group { display: flex; align-items: center; gap: 12px; }
.keyboard-hint { font-size: 12px; color: #586f61; }
.send-button { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; width: 44px; height: 44px; border-radius: 12px; background: var(--green); color: white; }
.send-button:not(:disabled):hover { background: #1b513b; color: white; }
.send-button:disabled { opacity: 1; background: #dbeadd; color: #4b735d; }
.stop-button { min-height: 44px; padding: 10px 12px; border-radius: 9px; background: var(--mint-soft); font-size: 12px; }
.stop-button span { font-size: 12px; margin-left: 6px; }
.under-composer { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 3px 2px 0; color: #597060; font-size: 12px; }
.under-composer p { line-height: 1.7; }
.breathing-button { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; white-space: nowrap; padding: 4px 0 4px 8px; font-size: 12px; color: #4f715f; }
.breathing-button .icon { width: 16px; height: 16px; }
.inline-link { font-size: inherit; padding: 0; color: #4e725b; text-decoration: underline; text-underline-offset: 3px; }

.messages { display: flex; flex-direction: column; gap: 22px; min-width: 0; }
.messages:not(:empty) { margin: 0 0 28px; }
.message { min-width: 0; max-width: 88%; font-size: 14px; line-height: 1.7; }
.message-user { align-self: flex-end; padding: 15px 22px; border-radius: 19px 19px 4px 19px; background: #e4f0e7; color: #2d4b39; }
.message-assistant { align-self: flex-start; padding: 12px 0; width: 100%; }
.message-heading { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; color: #50715f; margin-bottom: 7px; }
.assistant-mark, .swan-mark { flex-shrink: 0; width: 19px; height: 22px; object-fit: contain; }
.message-heading .assistant-mark { margin-right: 6px; }
.message-body { white-space: pre-wrap; overflow-wrap: anywhere; }
.message-assistant .message-body { margin-left: 33px; }
.message.is-pending .message-body:empty::after { content: 'Подбираю слова…'; color: #547062; font-size: 12px; animation: pending-pulse 1.4s ease-in-out infinite; }
@keyframes pending-pulse { 50% { opacity: .45; } }
.message .contacts-list { margin: 16px 0 0 33px; }
.message .contact-card { background: white; }
.suggestions { display: flex; flex-wrap: wrap; gap: 8px; }
.suggestions:not(:empty) { margin-bottom: 20px; }
.suggestion { border: 1px solid #cdded2; border-radius: 18px; min-height: 44px; padding: 9px 13px; font-size: 12px; background: #fbfdfb; }
.suggestion:hover { background: var(--mint-soft); }
.service-notice { flex-shrink: 0; margin: 12px auto 0; width: min(900px, calc(100% - 72px)); padding: 10px 16px; border: 1px solid #e6dbc1; border-radius: 10px; background: #faf5e9; color: #7b6543; font-size: 12px; }
.service-notice .text-button { font-size: 12px; margin-left: 8px; color: #765d34; text-decoration: underline; }
.error-notice { padding: 13px 16px; margin: 14px 0; border-radius: 10px; background: #fcf0eb; border: 1px solid #edd8ce; color: var(--warning); font-size: 12px; }
.error-notice button { display: inline-block; font-weight: 700; text-decoration: underline; padding: 3px 0; margin-left: 8px; color: inherit; }
.safety-notice { margin: 20px 0; padding: 20px; background: #fbf3e7; border: 1px solid #e5d4b5; border-radius: 12px; color: #71583d; }
.safety-notice p { margin: 5px 0 14px; font-size: 13px; }
.breathing-panel { display: flex; align-items: center; gap: 24px; padding: 16px 22px; margin-bottom: 12px; border-radius: 14px; background: var(--mint-soft); min-height: 84px; }
.breathing-panel p { font-size: 12px; color: var(--muted); margin-top: 4px; }
.breathing-panel .icon-button { margin-left: auto; }
.breathing-orb { width: 40px; height: 40px; border-radius: 50%; background: #a0d4b6; border: 6px solid #d4eadb; outline: 1px solid #b4d5c0; flex-shrink: 0; transform: scale(1); transition: transform 4s ease-in-out; }
.breathing-orb.inhale { transform: scale(1.35); }

.inner-view { width: min(1000px, calc(100% - 72px)); margin: 0 auto; padding: 28px 0 40px; }
.section-intro { display: grid; grid-template-columns: 40px minmax(0, 1fr); align-items: center; gap: 10px 14px; margin: 0 0 24px; }
.section-icon { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; background: #e0eee3; border-radius: 12px; color: #477456; }
.section-icon .icon { width: 22px; height: 22px; }
.section-intro h1 { font-size: 34px; line-height: 1.25; font-weight: 600; }
.section-intro p { grid-column: 2; max-width: 620px; color: var(--muted); line-height: 1.65; font-size: 14px; }
.form-surface { padding: 24px; border: 1px solid var(--line); background: white; border-radius: 17px; }
.form-surface h2, .result-surface h2 { font-size: 20px; }
fieldset { border: 0; margin: 0 0 25px; padding: 0; min-width: 0; }
legend { font-size: 14px; font-weight: 700; margin-bottom: 12px; }
.choice-row { display: flex; flex-wrap: wrap; gap: 9px; }
.choice { position: relative; display: inline-flex; cursor: pointer; }
.choice input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.choice > span { border: 1px solid var(--line); padding: 10px 13px; border-radius: 8px; font-size: 12px; color: var(--muted); background: #fcfdfb; }
.choice input:checked + span { background: #e0f0e5; border-color: #9bbba8; color: var(--ink); font-weight: 600; }
.choice input:focus-visible + span { outline: 3px solid #398262; outline-offset: 3px; }
.form-divider { border-top: 1px solid var(--line); margin: 25px 0; }
.form-heading { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.situation-label { font-size: 20px; font-weight: 700; letter-spacing: -.025em; }
.text-button { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; font-size: 12px; font-weight: 600; color: var(--green); padding: 7px 0; }
.text-button .icon { width: 16px; height: 16px; }
.text-button:hover { text-decoration: underline; text-underline-offset: 3px; }
.field-hint { font-size: 12px; color: var(--muted); margin: 6px 0 14px; line-height: 1.75; }
.field { display: flex; flex-direction: column; gap: 7px; margin: 18px 0; min-width: 0; }
.field label { font-weight: 600; font-size: 13px; }
.field label span, .optional-label { font-size: 12px; font-weight: 400; color: var(--muted); margin-left: 6px; }
.field input, .field textarea, .field select { border: 1px solid #d6e2d9; background: #fcfdfb; padding: 10px 12px; border-radius: 9px; width: 100%; min-width: 0; min-height: 44px; color: var(--ink); font-size: 14px; }
.field textarea { resize: vertical; min-height: 85px; max-height: 400px; }
.field input::placeholder, .field textarea::placeholder { color: #597061; font-size: 13px; }
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.concern-fieldset { border-top: 1px solid var(--line); margin: 0; padding-top: 16px; }
.concern-fieldset legend { float: left; width: 100%; font-size: 13px; font-weight: 600; margin-bottom: 10px; }
.concern-list { clear: both; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
.concern-list label { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fcfdfb; font-size: 13px; line-height: 1.4; color: #596f60; cursor: pointer; transition: background .15s, border-color .15s; }
.concern-list label:hover { border-color: #b9cfc0; background: #f3f8f4; }
.concern-list label:has(input:checked) { background: #e0f0e5; border-color: #9bbba8; color: var(--ink); font-weight: 600; }
.concern-list label:has(input:focus-visible) { outline: 3px solid #398262; outline-offset: 2px; }
.concern-list input { accent-color: var(--green); width: 18px; height: 18px; margin: 0; flex-shrink: 0; }
.primary-button, .secondary-button { min-height: 44px; padding: 11px 18px; border-radius: 9px; display: inline-flex; align-items: center; justify-content: center; gap: 12px; font-size: 13px; font-weight: 600; }
.primary-button { background: var(--green); color: white; }
.primary-button:not(:disabled):hover { background: #1c503a; color: white; }
.primary-button .icon { width: 17px; height: 17px; }
.secondary-button { background: white; border: 1px solid #cddbd0; color: #526f5b; }
.secondary-button:not(:disabled):hover { background: #edf5ee; }
.form-details { border-top: 1px solid var(--line); }
.form-details summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 48px; padding-block: 10px; font-size: 13px; font-weight: 600; list-style: none; cursor: pointer; }
.form-details summary::-webkit-details-marker { display: none; }
.form-details summary > .icon { width: 18px; height: 18px; color: var(--green); }
.form-details[open] summary > .icon { transform: rotate(45deg); }
.form-details summary:focus-visible { outline: 3px solid #398262; outline-offset: 3px; border-radius: 4px; }
.form-details .field { margin-top: 6px; }
.prepare-layout { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 20px 28px; }
.prepare-main { min-width: 0; }
.prepare-main > .field { margin-top: 14px; }
.prepare-settings { border-left: 1px solid var(--line); padding-left: 26px; }
.prepare-settings > .field:first-child { margin-top: 0; }
.summary-extra { border-top: 1px solid var(--line); padding-top: 4px; margin-bottom: 16px; }
.summary-extra .field { margin: 12px 0 0; }
.settings-group { margin: 0 0 22px; }
.settings-group legend { font-size: 13px; font-weight: 600; margin-bottom: 10px; }
.prepare-settings .choice-row { flex-direction: column; gap: 8px; }
.prepare-settings .choice { display: flex; }
.prepare-settings .choice > span { flex: 1; display: flex; align-items: center; min-height: 44px; font-size: 13px; transition: background .15s, border-color .15s; }
.prepare-settings .choice:hover > span { border-color: #b9cfc0; background: #f3f8f4; }
.prepare-settings .choice input:checked + span { background: #e0f0e5; }
.prepare-settings #person-field { margin: -10px 0 22px; }
.prepare-submitbar { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; border-top: 1px solid var(--line); padding-top: 18px; }
.prepare-submitbar .field-hint { flex: 1; margin: 0; }
.prepare-submitbar .error-notice { width: 100%; margin: 0 0 6px; }
.result-surface { border: 1px solid #c9e0cf; border-radius: 17px; background: #eaf5ed; padding: 28px 30px; margin-top: 26px; }
.plan-part { margin: 22px 0; }
.plan-part h3 { font-size: 14px; margin-bottom: 9px; }
.plan-part ul { margin: 0; padding-left: 19px; }
.plan-part li { font-size: 13px; padding-left: 3px; margin: 7px 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.plan-part p { padding: 18px; background: white; border-radius: 9px; font-size: 13px; white-space: pre-wrap; overflow-wrap: anywhere; }
.rehearsal-surface .field-grid .field { margin-top: 0; }
.rehearsal-note { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.rehearsal-note .icon { width: 14px; height: 14px; }
.rehearsal-empty { text-align: center; padding: 24px 20px; }
.rehearsal-empty > .icon { width: 28px; height: 28px; color: #4b725f; margin-bottom: 10px; }
.rehearsal-empty h2 { font-size: 20px; font-weight: 600; }
.rehearsal-empty p { margin: 10px auto 0; max-width: 330px; color: var(--muted); font-size: 12px; }
.rehearsal-surface .messages:not(:empty) { margin-top: 25px; }
.rehearse-composer { display: flex; align-items: flex-end; gap: 12px; padding: 13px; border: 1px solid #d6e2d9; border-radius: 12px; background: #fafcf9; }
.rehearse-composer textarea { border: 0; background: transparent; width: 100%; resize: vertical; min-height: 48px; max-height: 160px; font-size: 14px; color: var(--ink); padding: 4px; }
.rehearse-composer textarea::placeholder { color: #557064; }
.rehearsal-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; margin-top: 17px; }
.feedback-text { white-space: pre-wrap; font-size: 13px; }
.contacts-form .field { margin-top: 0; }
.contacts-form .field-hint { margin-bottom: 0; }
.contacts-search-row { display: flex; align-items: flex-end; gap: 18px; margin-bottom: 14px; }
.contacts-search-row > .field { flex: 1; margin: 0; }
.contacts-search-row > .primary-button { flex-shrink: 0; }
.contacts-empty { display: flex; align-items: center; gap: 16px; padding: 26px 4px; color: var(--muted); }
.contacts-empty .icon { width: 26px; height: 26px; color: #4b725e; }
.contacts-empty p { font-size: 14px; line-height: 1.65; }
.contacts-empty strong { color: var(--ink); font-weight: 600; }
.contacts-result { margin-top: 26px; }
.contacts-result > h2 { margin-bottom: 16px; font-size: 18px; }
.contact-group-title { font-size: 13px; margin: 23px 0 12px; color: var(--muted); }
.contacts-list { display: grid; gap: 13px; }
.contact-card { border: 1px solid var(--line); border-radius: 12px; background: white; padding: 20px; overflow-wrap: anywhere; }
.contact-card h3 { font-size: 15px; line-height: 1.6; }
.contact-category { display: block; font-size: 12px; color: #587063; margin: 5px 0 12px; }
.contact-phone { display: inline-flex; align-items: center; gap: 9px; font-size: 16px; font-weight: 700; color: var(--green); text-decoration: underline; text-underline-offset: 4px; }
.contact-phone .icon { width: 16px; height: 16px; }
.contact-meta { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 8px; margin-top: 14px; font-size: 12px; color: #5a705d; }
.contact-meta a { text-decoration: underline; text-underline-offset: 3px; }
.emergency-strip { padding: 12px 16px; border: 1px solid #e5ddce; border-radius: 10px; background: #faf7f0; display: flex; align-items: center; gap: 13px; color: #7c614a; font-size: 13px; margin-top: 18px; }
.emergency-strip > .icon { width: 19px; height: 19px; }
.emergency-strip p { flex: 1; }
.emergency-strip .text-button { flex-shrink: 0; color: inherit; }
.emergency-strip a { font-weight: 700; text-decoration: underline; }

dialog { width: min(500px, calc(100% - 32px)); max-height: calc(100svh - 48px); border: 1px solid #d8e4d9; border-radius: 20px; background: #fcfefb; color: var(--ink); padding: 32px; box-shadow: 0 20px 100px #143d2b25; overflow-y: auto; }
dialog::backdrop { background: #163d3259; backdrop-filter: blur(4px); }
dialog h2 { font-size: 26px; line-height: 1.3; letter-spacing: -.045em; padding-right: 14px; margin-bottom: 17px; }
dialog h3 { font-size: 14px; margin: 23px 0 8px; }
dialog > p { color: var(--muted); font-size: 13px; line-height: 1.65; margin: 13px 0; }
dialog > .primary-button { margin-top: 14px; }
.dialog-close { position: absolute; right: 12px; top: 12px; color: #527060; }
.dialog-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.dialog-swan { object-fit: contain; margin-bottom: 17px; }
.emergency-call { display: flex; align-items: center; justify-content: space-between; padding: 17px 21px; border-radius: 12px; background: #f5ebdf; color: #815538; margin: 20px 0; }
.emergency-call strong { display: block; font-size: 32px; line-height: 1.4; }
.emergency-call span span { display: block; font-size: 12px; }

/* The home page introduces the service; the workspace starts after a chosen action. */
.home-page { background: var(--canvas); }
.home-container { width: min(1160px, calc(100% - 96px)); margin-left: auto; margin-right: auto; }
.home-header { display: flex; align-items: center; justify-content: space-between; gap: 28px; min-height: 80px; border-bottom: 1px solid var(--line); }
.home-header .brand, .home-footer .brand { margin-left: 0; }
.home-nav { display: flex; align-items: center; gap: 26px; }
.home-nav button { font-size: 13px; padding: 12px 0; color: #597061; }
.home-nav button:hover { text-decoration: underline; text-underline-offset: 6px; }
.home-header-cta { min-height: 44px; font-size: 12px; }
#home-main:focus { outline: none; }
.home-hero { display: grid; grid-template-columns: 1.25fr 1fr; align-items: center; gap: 32px; padding-block: 40px; }
.home-welcome { display: flex; align-items: center; gap: 9px; color: #527160; font-size: 13px; margin-bottom: 20px; }
.home-hero h1 { font-size: 60px; font-weight: 600; line-height: 1.14; letter-spacing: -.06em; }
.home-hero-description { font-size: 16px; line-height: 1.7; color: #587061; max-width: 445px; margin-top: 22px; }
.home-hero-actions { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; margin-top: 24px; }
.home-hero-actions .primary-button { padding: 13px 22px; font-size: 14px; border-radius: 11px; }
.home-learn-link { color: #496951; font-size: 13px; padding: 12px 0; text-decoration: underline; text-decoration-color: #adc6b3; text-underline-offset: 5px; }
.home-assurances { display: flex; align-items: center; flex-wrap: wrap; gap: 23px; margin-top: 19px; color: #547160; font-size: 12px; }
.home-assurances span { display: inline-flex; align-items: center; gap: 6px; }
.home-assurances .icon { width: 15px; height: 15px; }
.home-illustration { position: relative; }
.home-illustration-note { position: absolute; left: 0; bottom: 13px; display: flex; align-items: center; gap: 13px; background: white; border: 1px solid #dde7de; padding: 17px 22px; border-radius: 17px 17px 17px 4px; box-shadow: 0 7px 16px #325e3906; transform: rotate(-4deg); font-size: 12px; color: #51725b; line-height: 1.7; }
.home-illustration-note .icon { width: 23px; height: 23px; color: #497260; }
.home-illustration .swan-scene { position: relative; width: 100%; max-width: 360px; aspect-ratio: 1; }
.home-illustration .swan-pond { background: #dcefe1; }
.home-swan { position: absolute; width: 60%; height: auto; left: 22%; top: 8%; transform: rotate(-6deg); }
.home-topics { padding-block: 22px 26px; border-top: 1px solid var(--line); }
.home-topics h2 { font-size: 14px; font-weight: 600; letter-spacing: -.01em; }
.home-topic-list { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.home-topic-list button { font-size: 12px; min-height: 44px; padding: 10px 17px; border: 1px solid #d5e3d8; border-radius: 25px; background: #fdfefc; color: #54705c; }
.home-topic-list button:hover { background: #e3f1e6; border-color: #a5c4ae; }
.home-topics > p { color: #597061; font-size: 12px; margin-top: 12px; }
.home-support { padding-block: 42px 52px; scroll-margin-top: 24px; }
.home-section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 40px; margin-bottom: 28px; }
.home-section-heading h2, .home-privacy h2, .home-faq h2, .home-closing h2 { font-size: 36px; line-height: 1.25; letter-spacing: -.045em; font-weight: 600; }
.home-section-heading > p { max-width: 370px; color: #546f60; line-height: 1.65; font-size: 14px; }
.support-layout { display: grid; grid-template-columns: 1.07fr 1fr; gap: 40px; }
.support-conversation { padding: 28px 30px; border-radius: 22px; background: #e4f1e7; }
.support-icon { width: 41px; height: 41px; display: inline-grid; place-items: center; border-radius: 12px; color: #437356; background: #d3e6d9; }
.support-conversation h3 { margin-top: 17px; font-size: 28px; line-height: 1.3; letter-spacing: -.035em; font-weight: 600; }
.support-conversation > p { font-size: 13px; color: #54715e; line-height: 1.65; max-width: 380px; margin-top: 16px; }
.conversation-example { margin-top: 27px; font-size: 12px; }
.example-label { display: block; font-size: 12px; color: #52715c; margin-bottom: 12px; }
.example-message { padding: 14px 18px; border-radius: 15px 15px 3px 15px; background: #fafffb; width: fit-content; margin-left: auto; color: #4b6e55; }
.example-answer { display: flex; align-items: flex-start; gap: 9px; padding: 14px 0 6px; color: #45694e; line-height: 1.6; }
.example-answer > .swan-mark { margin-top: 1px; }
.home-action-link { display: inline-flex; align-items: center; gap: 10px; text-align: left; color: #356747; font-size: 12px; font-weight: 600; padding: 10px 0; }
.home-action-link .icon { width: 14px; height: 14px; }
.home-action-link:hover { text-decoration: underline; text-underline-offset: 5px; }
.support-conversation > .home-action-link { margin-top: 15px; }
.support-next-steps { padding-top: 8px; }
.support-step { display: flex; align-items: flex-start; gap: 20px; padding: 20px 0 24px; }
.support-step + .support-step { border-top: 1px solid #d9e5dc; padding-top: 24px; }
.support-step .support-icon { flex-shrink: 0; background: #eaf1e8; }
.support-step h3 { font-size: 21px; font-weight: 600; letter-spacing: -.03em; line-height: 1.5; margin: 3px 0 10px; }
.support-step p { max-width: 340px; font-size: 13px; line-height: 1.65; color: #55705f; }
.support-step .home-action-link { margin-top: 13px; }
.home-privacy { background: #dceee2; padding: 40px 0; scroll-margin-top: 0; }
.privacy-layout { display: grid; grid-template-columns: 1fr 1.07fr; gap: 80px; align-items: center; }
.privacy-leaf.icon { width: 34px; height: 34px; margin-bottom: 17px; color: #477359; }
.privacy-copy p { color: #516d59; font-size: 14px; line-height: 1.7; }
.privacy-copy p + p { margin-top: 17px; font-size: 12px; }
.privacy-copy .home-action-link { margin-top: 14px; }
.home-faq { display: grid; grid-template-columns: 1fr 1.2fr; gap: 60px; padding-block: 48px; }
.home-faq h2 { font-size: 34px; }
.home-faq > div > p { font-size: 13px; color: #597061; margin-top: 17px; }
.faq-list details { padding: 20px 0; border-bottom: 1px solid var(--line); }
.faq-list details:first-child { padding-top: 0; }
.faq-list summary { display: flex; justify-content: space-between; align-items: center; gap: 20px; min-height: 44px; list-style: none; font-size: 14px; font-weight: 600; cursor: pointer; }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary > .icon { width: 18px; height: 18px; color: #50715d; }
.faq-list details[open] summary > .icon { transform: rotate(45deg); }
.faq-list details > p { font-size: 12px; color: #597062; line-height: 1.7; margin-top: 16px; padding-right: 20px; }
.faq-list details a { text-decoration: underline; }
.faq-list summary:focus-visible { outline: 3px solid #398262; outline-offset: 5px; }
.home-closing { display: flex; align-items: center; justify-content: space-between; gap: 28px; padding: 28px 32px; border-radius: 20px; background: #eaf3e9; }
.home-closing h2 { font-size: 31px; }
.home-closing p { margin-top: 10px; font-size: 14px; color: #55715e; }
.home-closing .primary-button { padding: 13px 22px; font-size: 13px; flex-shrink: 0; }
.closing-openers { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 15px; }
.closing-openers button { min-height: 44px; padding: 10px 14px; border: 1px solid #cddfd2; border-radius: 14px 14px 4px 14px; background: #fafffb; color: #365e46; font-size: 12px; line-height: 1.6; text-align: left; }
.closing-openers button:hover { background: #dcefe3; border-color: #8db79d; }
.home-footer { display: flex; align-items: center; justify-content: space-between; gap: 30px; padding-block: 28px; }
.home-footer .brand { font-size: 28px; gap: 7px; }
.home-footer > div > p { font-size: 12px; margin: 9px 0 0 37px; color: #56705f; }
.home-footer-note { font-size: 12px; line-height: 1.6; color: #56705f; }
.home-footer-links { display: flex; align-items: center; gap: 26px; }
.home-footer-links button { font-size: 12px; padding: 10px 0; color: #557160; }

/* Layout changes follow available width; short screens also get a smaller hero. */
@media (min-width: 1600px) {
  .home-container { width: min(1240px, calc(100% - 112px)); }
  .home-hero h1 { font-size: 64px; }
}
@media (max-width: 1200px) {
  :root { --sidebar: 216px; }
  .sidebar { padding-inline: 14px; }
  .brand { font-size: 31px; }
  .nav-link { padding-inline: 12px; font-size: 13px; gap: 10px; }
  .nav-detail { font-size: 12px; }
  .topbar { padding-inline: 28px; }
  .chat-content, .inner-view { width: calc(100% - 56px); }
  .home-container { width: calc(100% - 80px); }
  .home-hero h1 { font-size: 54px; }
  .home-illustration .swan-scene { max-width: 310px; }
  .home-illustration-note { padding: 12px 16px; gap: 9px; }
  .support-layout { gap: 28px; }
  .support-step { gap: 16px; }
}
@media (max-width: 1000px) {
  :root { --sidebar: 200px; }
  .connection { display: none; }
  .topbar-start, .topbar-actions { gap: 12px; }
  .home-nav { gap: 20px; }
  .home-nav button { font-size: 12px; }
  .home-header-cta { padding-inline: 15px; }
  .home-hero { grid-template-columns: 1.45fr 1fr; }
  .home-hero h1 { font-size: 47px; }
  .home-hero-description { font-size: 15px; }
  .home-hero-actions { gap: 20px; }
  .home-section-heading h2, .home-privacy h2 { font-size: 34px; }
  .home-section-heading > p { max-width: 320px; }
  .support-conversation { padding: 26px; }
  .support-step h3 { font-size: 20px; }
  .privacy-layout, .home-faq { gap: 40px; }
  .home-faq h2 { font-size: 31px; }
  .prepare-layout { grid-template-columns: minmax(0, 1fr) 210px; gap: 20px; }
  .prepare-main .form-heading { align-items: flex-start; flex-direction: column; gap: 2px; }
  .prepare-main .field-grid { grid-template-columns: 1fr; gap: 0; }
  .welcome h1 { font-size: 38px; }
}
@media (max-width: 760px), (max-width: 1000px) and (max-height: 500px) {
  :root { --header-height: 64px; }
  .sidebar { width: min(290px, calc(100% - 40px)); transform: translateX(-110%); visibility: hidden; transition: transform .18s ease, visibility 0s linear .18s; padding: 24px 18px 16px; }
  .sidebar.is-open { transform: translateX(0); visibility: visible; box-shadow: 15px 0 45px #254a2720; transition: transform .18s ease; }
  .sidebar .brand { font-size: 31px; }
  #menu-close { display: inline-flex; position: absolute; right: 12px; top: 20px; }
  .menu-backdrop { position: fixed; inset: 0; z-index: 19; background: #143a3259; }
  .workspace { margin-left: 0; }
  #menu-toggle { display: inline-flex; margin-left: -8px; }
  .topbar { padding: 8px 18px; gap: 8px; }
  .topbar-start { gap: 6px; min-width: 0; }
  .topbar-actions { gap: 4px; }
  #view-title { font-size: 13px; line-height: 1.35; }
  .help-button { padding: 9px 11px; font-size: 13px; gap: 6px; }
  .help-button .icon { width: 16px; height: 16px; }
  .exit-button { width: 40px; }
  .chat-content { width: calc(100% - 36px); max-width: 620px; padding-bottom: max(8px, env(safe-area-inset-bottom)); }
  .chat-scroll { padding-top: 22px; }
  .welcome { grid-template-columns: minmax(0, 1fr) 80px; gap: 18px; }
  .welcome h1 { font-size: 37px; }
  .welcome-swan { width: 76px; }
  .welcome-description { font-size: 15px; }
  .welcome-greeting { font-size: 13px; }
  .starter-section { margin: 23px 0 16px; }
  .starter-prompts { display: grid; grid-template-columns: 1fr 1fr; }
  .starter-prompts button { padding: 10px 12px; font-size: 13px; }
  .composer { padding: 13px 14px 10px; }
  .composer textarea { font-size: 16px; }
  .composer textarea::placeholder { font-size: 15px; }
  .keyboard-hint { display: none; }
  .under-composer { font-size: 13px; gap: 12px; }
  .breathing-button { font-size: 13px; }
  .breathing-panel { gap: 18px; padding: 15px 18px; }
  .breathing-panel p { font-size: 13px; }
  .breathing-orb { width: 37px; height: 37px; border-width: 6px; }
  .inner-view { width: calc(100% - 36px); padding-block: 24px 32px; }
  .section-intro h1 { font-size: 30px; }
  .section-intro p { font-size: 15px; }
  .form-surface, .result-surface { padding: 22px; }
  .prepare-layout { grid-template-columns: minmax(0, 1fr) 220px; gap: 20px; }
  .prepare-settings { padding-left: 20px; }
  .service-notice { width: calc(100% - 36px); margin-top: 10px; padding: 10px 12px; }
  .message { max-width: 95%; }
  .field input, .field textarea, .field select, .rehearse-composer textarea { font-size: 16px; }
  .home-container { width: calc(100% - 48px); }
  .home-header { gap: 20px; }
  .home-nav { gap: 16px; }
  .home-nav button:last-child { display: none; }
  .home-header .brand { font-size: 30px; }
  .home-header-cta { font-size: 13px; padding-inline: 12px; }
  .home-header-cta .icon { display: none; }
  .home-hero h1 { font-size: 41px; }
  .home-hero-actions .primary-button { font-size: 14px; padding-inline: 16px; }
  .home-learn-link { font-size: 13px; }
  .home-section-heading { align-items: flex-start; gap: 25px; }
  .home-section-heading h2 { font-size: 30px; }
  .home-section-heading > p { max-width: 270px; font-size: 14px; }
  .support-layout { grid-template-columns: 1fr; gap: 20px; }
  .support-conversation { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 25px; }
  .support-conversation .support-icon, .support-conversation h3, .support-conversation > p { grid-column: 1; margin-top: 0; }
  .support-conversation .conversation-example { grid-column: 2; grid-row: 2 / 4; align-self: center; margin: 0; }
  .support-conversation > .home-action-link { grid-column: 1 / -1; margin-top: 0; }
  .support-next-steps { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; padding-top: 0; }
  .support-step { flex-direction: column; padding-block: 14px 0; gap: 10px; }
  .support-step + .support-step { border: 0; padding-top: 14px; }
  .privacy-layout { gap: 32px; }
  .home-faq { grid-template-columns: 1fr 1.4fr; gap: 25px; }
  .home-faq h2 { font-size: 28px; }
  .home-closing h2 { font-size: 29px; }
  .home-footer { flex-wrap: wrap; gap: 24px; }
}
@media (max-width: 600px) {
  .home-container { width: calc(100% - 40px); }
  .home-header { min-height: 68px; }
  .home-nav { display: none; }
  .home-header .brand { font-size: 30px; gap: 7px; }
  .home-header .brand img { width: 31px; height: 36px; }
  .home-hero { display: grid; grid-template-columns: minmax(0, 1fr) 54px; gap: 16px 10px; padding-block: 22px 25px; }
  .home-hero-copy { display: contents; }
  .home-welcome { grid-column: 1; grid-row: 1; margin: 0; font-size: 13px; gap: 7px; align-self: center; }
  .home-illustration { grid-column: 2; grid-row: 1; width: 54px; padding: 0; height: 38px; align-self: center; }
  .home-illustration .swan-scene { width: 54px; height: 54px; margin-top: -8px; }
  .home-illustration .swan-pond, .home-illustration .pond-lines { display: none; }
  .home-illustration-note { display: none; }
  .home-swan { width: 44px; top: 0; left: 5px; transform: none; }
  .home-hero h1 { grid-column: 1 / -1; font-size: clamp(36px, 9.5vw, 48px); line-height: 1.12; }
  .home-hero-description { grid-column: 1 / -1; margin: 0; font-size: 15px; line-height: 1.7; max-width: 460px; }
  .home-hero-actions { grid-column: 1 / -1; margin: 2px 0 0; gap: 20px; }
  .home-hero-actions .primary-button { font-size: 14px; padding: 12px 18px; min-height: 46px; }
  .home-learn-link { font-size: 13px; }
  .home-assurances { grid-column: 1 / -1; margin: 0; gap: 20px; font-size: 13px; }
  .home-topics { padding-block: 18px 22px; }
  .home-topics h2 { font-size: 15px; }
  .home-topic-list { gap: 8px; margin-top: 12px; }
  .home-topic-list button { font-size: 13px; padding: 10px 13px; min-height: 42px; }
  .home-topics > p { margin-top: 10px; font-size: 13px; }
  .home-support { padding-block: 30px 38px; }
  .home-section-heading { flex-direction: column; gap: 12px; margin-bottom: 22px; }
  .home-section-heading h2 { font-size: 30px; }
  .home-section-heading > p { max-width: 460px; font-size: 15px; }
  .support-conversation { display: block; padding: 23px; }
  .support-conversation h3 { font-size: 25px; margin-top: 13px; }
  .support-conversation > p { margin-top: 13px; font-size: 15px; }
  .support-conversation .conversation-example { margin-top: 20px; font-size: 13px; }
  .example-message { padding: 11px 14px; }
  .support-conversation > .home-action-link { margin-top: 12px; }
  .support-next-steps { grid-template-columns: 1fr; gap: 0; }
  .support-step { flex-direction: column; gap: 13px; padding: 14px 0 23px; }
  .support-step + .support-step { border-top: 1px solid var(--line); padding: 23px 0 0; }
  .support-step h3 { margin-top: 0; }
  .support-step h3 { font-size: 20px; }
  .support-step p { font-size: 15px; }
  .home-action-link { font-size: 14px; min-height: 44px; }
  .home-privacy { padding-block: 30px; }
  .privacy-layout { grid-template-columns: 1fr; gap: 18px; }
  .privacy-leaf.icon { float: right; width: 30px; height: 30px; }
  .home-privacy h2 { font-size: 30px; }
  .privacy-copy p { font-size: 15px; }
  .privacy-copy p + p { font-size: 14px; }
  .home-faq { grid-template-columns: 1fr; gap: 25px; padding-block: 34px; }
  .home-faq h2 { font-size: 29px; }
  .home-faq > div > p { margin-top: 10px; }
  .faq-list summary { min-height: 36px; font-size: 15px; }
  .faq-list details > p { font-size: 14px; padding-right: 0; }
  .home-closing { flex-direction: column; align-items: flex-start; gap: 20px; padding: 24px; border-radius: 18px; }
  .home-closing h2 { font-size: 27px; }
  .home-closing p { margin-top: 10px; font-size: 14px; }
  .home-footer { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; padding-block: 27px; }
  .home-footer .brand { font-size: 26px; }
  .home-footer-note { font-size: 13px; }
  .home-footer-links { grid-column: 1 / -1; justify-content: space-between; gap: 18px; border-top: 1px solid var(--line); padding-top: 10px; }
  .home-footer-links button { font-size: 13px; min-height: 44px; }
  .prepare-layout { display: flex; flex-direction: column; gap: 18px; }
  .prepare-settings { padding: 16px 0 0; border-left: 0; border-top: 1px solid var(--line); }
  .prepare-settings .choice-row { display: grid; grid-template-columns: 1fr 1fr; }
  .prepare-submitbar { order: 3; padding-top: 14px; flex-direction: column; align-items: stretch; gap: 8px; bottom: 0; }
  .prepare-submitbar .field-hint { text-align: center; }
  .field-grid { grid-template-columns: 1fr; gap: 0; }
  .section-intro { grid-template-columns: 34px minmax(0, 1fr); gap: 9px 12px; margin-bottom: 20px; }
  .section-intro .section-icon { width: 34px; height: 34px; border-radius: 10px; }
  .section-intro h1 { font-size: 27px; }
  .section-intro p { grid-column: 1 / -1; font-size: 14px; line-height: 1.75; }
  .form-surface, .result-surface { padding: 18px; }
  .form-heading { flex-wrap: wrap; gap: 4px 12px; }
  .form-surface h2, .result-surface h2, .situation-label { font-size: 18px; }
  .contacts-search-row { flex-wrap: wrap; gap: 12px; }
  .contacts-search-row > .field { flex-basis: 100%; }
  .contacts-search-row > .primary-button { width: 100%; }
  .emergency-strip { flex-wrap: wrap; column-gap: 10px; row-gap: 0; }
  .emergency-strip p { flex: 1; }
  .emergency-strip .text-button { flex-basis: calc(100% - 29px); margin-left: 29px; justify-content: flex-start; }
  .rehearsal-surface .field-grid { grid-template-columns: 1fr; gap: 12px; margin-bottom: 16px; }
  .rehearsal-surface .field-grid .field { display: grid; grid-template-columns: 84px minmax(0, 1fr); align-items: center; gap: 12px; margin: 0; }
  .rehearsal-surface select { font-size: 16px; padding: 10px 7px; }
  .rehearsal-empty { padding: 18px 0; }
  .rehearsal-empty > .icon { display: none; }
  .rehearsal-empty h2 { font-size: 18px; }
  .rehearsal-note { font-size: 13px; line-height: 1.6; align-items: flex-start; }
  .rehearsal-actions { gap: 4px 12px; margin-top: 10px; }
  .rehearsal-actions .secondary-button { font-size: 13px; padding-inline: 12px; }
  .message-assistant .message-body, .message .contacts-list { margin-left: 0; }
  dialog { width: calc(100% - 24px); max-height: calc(100dvh - 24px); padding: 28px 22px; }
  dialog h2 { font-size: 24px; }
  .dialog-close { top: 7px; right: 7px; }
}
@media (max-width: 420px) {
  .topbar { padding-inline: 14px; }
  #view-title { font-size: 13px; max-width: 98px; }
  .help-button { font-size: 13px; padding-inline: 8px; }
  .help-button .icon { display: none; }
  .welcome { grid-template-columns: minmax(0, 1fr) 54px; gap: 12px; }
  .welcome h1 { font-size: 32px; }
  .welcome-swan { width: 54px; }
  .welcome-greeting { font-size: 13px; }
  .welcome-description { font-size: 14px; }
  .starter-prompts { gap: 8px; }
  .starter-prompts button { font-size: 13px; gap: 6px; padding: 9px 10px; }
  .under-composer p { max-width: 190px; font-size: 13px; line-height: 1.6; }
  .breathing-button { font-size: 13px; gap: 5px; }
  .home-hero h1 { font-size: 37px; }
  .home-container { width: calc(100% - 32px); }
  .home-header .brand { font-size: 28px; }
  .home-hero-actions { gap: 16px; }
  .home-hero-actions .primary-button { font-size: 13px; padding-inline: 15px; }
  .home-learn-link { font-size: 13px; }
  .home-hero-description { font-size: 15px; }
  .home-topic-list button { font-size: 13px; }
}
@media (max-width: 350px) {
  .home-hero h1 { font-size: 33px; }
  .home-header-cta { font-size: 13px; padding-inline: 10px; }
  .home-assurances { font-size: 13px; gap: 16px; }
  .home-hero-actions { gap: 12px; }
  .home-hero-actions .primary-button .icon { display: none; }
  .home-welcome { font-size: 13px; }
  .chat-content { width: calc(100% - 28px); }
  .welcome h1 { font-size: 29px; }
  .welcome-greeting { gap: 5px; font-size: 13px; }
  .starter-prompts button { font-size: 13px; padding-inline: 8px; }
  .under-composer p { max-width: 145px; }
}
@media (max-height: 820px) and (min-width: 761px) {
  .sidebar { padding-top: 23px; }
  .new-chat { margin-block: 23px 16px; }
  .main-nav { gap: 3px; }
  .sidebar-note { display: none; }
  .sidebar-bottom { padding-top: 20px; }
  .sidebar-signoff { padding-top: 10px; }
  .home-header { min-height: 72px; }
  .home-hero { padding-block: 28px; }
  .home-hero h1 { font-size: clamp(42px, 4.2vw, 60px); }
  .home-illustration .swan-scene { max-width: min(320px, 40dvh); }
  .home-welcome { margin-bottom: 16px; }
  .home-hero-description { margin-top: 18px; line-height: 1.7; }
  .home-hero-actions { margin-top: 22px; }
  .home-assurances { margin-top: 17px; }
  .home-topics { padding-block: 20px; }
  .chat-scroll { padding-top: 22px; }
  .welcome h1 { font-size: 38px; }
  .welcome-description { margin-top: 14px; }
  .starter-section { margin-top: 22px; }
}
@media (max-height: 600px) {
  .chat-scroll { padding-top: 16px; }
  .welcome h1 { font-size: 29px; }
  .welcome-greeting { margin-bottom: 10px; }
  .welcome-description { margin-top: 12px; }
  .starter-section { margin-top: 20px; }
  .composer textarea { min-height: 38px; max-height: 80px; }
  .composer { padding-top: 10px; }
  .composer-bottom { margin-top: 4px; }
  .chat-dock { padding-top: 8px; }
  .breathing-panel { min-height: 74px; padding-block: 10px; }
  .sidebar-note, .sidebar-signoff { display: none; }
  .sidebar { padding-top: 16px; }
  .sidebar .brand { font-size: 27px; }
  .sidebar .brand img { width: 28px; height: 33px; }
  .new-chat { margin-block: 14px 10px; }
  .main-nav { gap: 2px; }
  .nav-link { min-height: 44px; padding-block: 8px; }
  .sidebar-bottom { padding-top: 14px; }
}
@media (max-height: 500px) and (min-width: 601px) {
  :root { --header-height: 56px; }
  .chat-scroll { padding-top: 8px; }
  .welcome { grid-template-columns: minmax(0, 1fr) 44px; gap: 16px; }
  .welcome h1 { font-size: 24px; }
  .welcome-swan { width: 44px; }
  .welcome-greeting, .welcome-description, .starter-section h2 { display: none; }
  .starter-section { margin-block: 8px; }
  .starter-prompts { display: flex; gap: 8px; }
  .starter-prompts button { flex: 1; justify-content: center; padding-inline: 8px; font-size: 12px; }
  .home-header { min-height: 60px; }
  .home-hero { padding-block: 17px; }
  .home-welcome { margin-bottom: 10px; }
  .home-hero h1 { font-size: 38px; }
  .home-hero-description { font-size: 13px; line-height: 1.7; margin-top: 12px; }
  .home-hero-actions { margin-top: 15px; }
  .home-assurances { margin-top: 12px; }
  .home-illustration .swan-scene { max-width: 220px; }
}
/* Читаемость на телефоне: базовый текст крупнее, главные кнопки выше и заметнее. */
@media (max-width: 760px) {
  body { font-size: 15px; }
  .message { font-size: 15px; }
  .primary-button { min-height: 50px; font-size: 15px; }
  .home-hero-actions .primary-button { min-height: 50px; font-size: 15px; padding-inline: 20px; }
  .secondary-button { min-height: 48px; font-size: 14px; }
  .nav-link { min-height: 48px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
