:root {
  color-scheme: light;
  --forest: #174c3c;
  --forest-dark: #113c30;
  --green: #267254;
  --mint: #edf3ed;
  --gold: #a88138;
  --gold-light: #f2e8cd;
  --ink: #263d34;
  --muted: #64705f;
  --line: #e6e8e1;
  --paper: #fcfbf8;
  font-family: "Segoe UI", Tahoma, Arial, sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--paper); }
button, textarea, select { font: inherit; }
button, a, select, textarea { -webkit-tap-highlight-color: transparent; }
button { color: inherit; cursor: pointer; }
button:disabled { cursor: default; }
button:focus-visible, a:focus-visible, select:focus-visible, summary:focus-visible { outline: 3px solid #b5934b; outline-offset: 4px; }
button, a { touch-action: manipulation; }
a { color: inherit; text-decoration: none; }
button { border: 0; background: none; }
svg { display: block; }
[hidden] { display: none !important; }
.icon { width: 21px; height: 21px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; z-index: 20; inset-block-start: -70px; inset-inline-start: 20px; padding: 12px 18px; background: var(--forest); color: white; border-radius: 10px; }
.skip-link:focus { inset-block-start: 14px; }
.app-shell { display: grid; grid-template-columns: 272px minmax(0, 1fr); height: 100vh; height: 100dvh; overflow: hidden; }
.sidebar { display: flex; flex-direction: column; min-height: 0; padding: 32px 24px 22px; background: #f2f3ec; border-inline-end: 1px solid var(--line); }
.brand { display: flex; justify-content: center; align-items: center; width: fit-content; margin: 0 auto 33px; }
.brand-logo { width: 173px; height: 52px; }
.new-chat { display: flex; align-items: center; justify-content: center; gap: 11px; width: 100%; min-height: 46px; border: 1px solid #cbd5c9; background: #ffffffb8; border-radius: 11px; font-size: 14px; font-weight: 600; transition: background .18s, border-color .18s; }
.new-chat:hover:not(:disabled) { background: white; border-color: #90aa93; }
.new-chat:disabled { opacity: .5; }
.new-chat .icon { width: 18px; height: 18px; }
.country-card { position: relative; overflow: hidden; padding: 24px 22px 26px; margin-block-start: 24px; border-radius: 16px; background: var(--forest); color: #fff; }
.country-card::before, .country-card::after { content: ""; position: absolute; width: 220px; height: 220px; border: 1px solid #ffffff0a; border-radius: 50%; inset-inline-end: -125px; inset-block-end: -65px; pointer-events: none; }
.country-card::after { width: 165px; height: 165px; inset-inline-end: -95px; inset-block-end: -45px; }
.country-card-top { display: flex; align-items: center; justify-content: space-between; margin-block-end: 27px; }
.country-flag { display: grid; place-items: center; width: 45px; height: 38px; background: #ffffff0f; border: 1px solid #ffffff16; border-radius: 9px; font-family: "Segoe UI Emoji", "Apple Color Emoji", sans-serif; font-size: 25px; line-height: 1; }
.country-code { color: #b4cdb8; font-size: 11px; font-weight: 500; letter-spacing: .15em; }
.eyebrow { margin: 0 0 5px; color: #d8ca9d; font-size: 11px; }
.country-card h2 { margin: 0 0 10px; font-size: 29px; line-height: 1.3; font-weight: 600; }
.country-description { position: relative; z-index: 1; margin: 0; max-width: 155px; color: #d0dfd3; font-size: 12px; line-height: 1.9; }
.country-line { display: block; width: 23px; height: 2px; margin-block: 22px 14px; background: #c4a05a; }
.country-english { color: #b0c5b4; font-size: 9px; letter-spacing: .27em; }
.topic-section { margin-block-start: 30px; }
.topic-section h2 { margin: 0 9px 10px; color: #65735a; font-size: 10px; font-weight: 500; }
.topic-button { display: flex; align-items: center; gap: 11px; width: 100%; padding: 12px 9px; text-align: start; border-radius: 9px; font-size: 12px; color: #5c6c5d; transition: background .15s, color .15s; }
.topic-button > .icon:first-child { width: 18px; height: 18px; color: #768976; }
.topic-button .topic-arrow { margin-inline-start: auto; width: 15px; height: 15px; opacity: 0; transition: opacity .15s; }
.topic-button:hover:not(:disabled) { color: var(--forest); background: #e6ebdf; }
.topic-button:hover:not(:disabled) .topic-arrow { opacity: 1; }
html[dir="rtl"] .topic-arrow, html[dir="rtl"] .suggestion-arrow { transform: rotate(180deg); }
.sidebar-bottom { margin-block-start: auto; padding-block-start: 26px; }
.scope-note { display: flex; align-items: flex-start; gap: 10px; padding: 17px 1px; border-block-start: 1px solid #dde2d5; }
.scope-note > .icon { width: 19px; height: 19px; color: #889878; margin-block-start: 2px; }
.scope-note strong { display: block; font-size: 11px; font-weight: 600; color: #5c6a51; }
.scope-note p { margin: 6px 0 0; color: #65735b; font-size: 10px; line-height: 1.85; }
.visit-guide { display: flex; align-items: center; justify-content: space-between; padding: 8px 2px 0; font-size: 10px; color: #5e6e52; }
.visit-guide .icon { width: 14px; height: 14px; }
.visit-guide:hover { color: var(--forest); }
.chat-main { display: flex; flex-direction: column; min-width: 0; min-height: 0; background: var(--paper); }
.topbar { display: flex; flex: 0 0 auto; align-items: center; justify-content: space-between; min-height: 85px; gap: 16px; padding: 17px 42px; border-block-end: 1px solid var(--line); background: #ffffffa1; }
.assistant-identity { display: flex; align-items: center; gap: 10px; }
.topbar-eyebrow { display: block; margin-block-end: 4px; font-size: 9px; color: #6a7761; }
.topbar-title { margin: 0; font-size: 15px; font-weight: 600; }
.topbar-controls { display: flex; align-items: center; gap: 25px; }
.availability { display: flex; align-items: center; gap: 7px; color: #617353; font-size: 10px; white-space: nowrap; }
.availability-dot { width: 6px; height: 6px; border-radius: 50%; background: #a3af9b; box-shadow: 0 0 0 3px #a3af9b12; }
.availability.is-ready .availability-dot { background: #5d9468; box-shadow: 0 0 0 3px #5d946812; }
.availability.is-preparing .availability-dot, .availability.is-offline .availability-dot { background: #bc9b55; box-shadow: 0 0 0 3px #bc9b5512; }
.language-control { display: flex; align-items: center; gap: 8px; padding-inline-start: 20px; border-inline-start: 1px solid var(--line); color: #6c7969; }
.language-control .icon { width: 16px; height: 16px; }
.language-control select { width: 90px; padding: 7px 0; background: transparent; color: #556650; border: 0; font-size: 12px; cursor: pointer; }
.mobile-mark, .mobile-new-chat { display: none; }
.icon-button { display: grid; place-items: center; width: 35px; height: 35px; border: 1px solid var(--line); border-radius: 9px; }
.service-notice { display: flex; flex: 0 0 auto; align-items: center; gap: 10px; padding: 10px 38px; background: #f8f1df; color: #806025; border-block-end: 1px solid #eee3c7; font-size: 11px; }
.service-notice > .icon { width: 17px; height: 17px; }
.service-notice p { margin: 0; line-height: 1.7; }
.service-notice button { flex: 0 0 auto; margin-inline-start: auto; padding: 5px 0; color: #7f622d; text-decoration: underline; text-underline-offset: 3px; font-size: 10px; }
.service-notice button:disabled { opacity: .5; }
.conversation { flex: 1 1 auto; min-height: 0; overflow-y: auto; overflow-x: hidden; scrollbar-width: thin; scrollbar-color: #d7ddd1 transparent; padding: 38px 38px 30px; scroll-padding-block: 24px; overscroll-behavior: contain; }
.welcome { width: min(100%, 760px); margin: 0 auto; padding-block: clamp(12px, 5vh, 64px) 15px; text-align: center; }
.welcome-symbol { position: relative; display: grid; place-items: center; width: 64px; height: 64px; margin: 0 auto 24px; background: #edf2e8; color: #789268; border-radius: 21px; }
.welcome-symbol > svg { width: 31px; height: 31px; fill: none; stroke: currentColor; stroke-width: 1.4; }
.symbol-dot { position: absolute; width: 10px; height: 10px; background: #ceb36b; border: 3px solid var(--paper); border-radius: 50%; inset-inline-end: -4px; inset-block-start: 7px; }
.welcome-eyebrow { margin: 0 0 16px; color: #856724; font-size: 11px; }
.welcome h2 { margin: 0 auto 18px; color: #234e3c; max-width: 680px; font-size: clamp(26px, 2.7vw, 38px); line-height: 1.55; font-weight: 600; }
html[dir="ltr"] .welcome h2 { font-family: Georgia, "Times New Roman", serif; font-weight: 400; font-size: clamp(32px, 3.2vw, 45px); line-height: 1.2; letter-spacing: -.035em; }
.welcome-description { max-width: 515px; margin: 0 auto; color: #64705f; font-size: 14px; line-height: 1.9; }
.suggestions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; width: min(100%, 650px); margin: 34px auto 25px; }
.suggestion-card { display: grid; grid-template-columns: 37px minmax(0, 1fr) 16px; grid-template-rows: auto auto; gap: 5px 13px; align-items: start; min-height: 102px; padding: 19px 18px; background: #fff; border: 1px solid #e4e8dd; border-radius: 13px; text-align: start; box-shadow: 0 2px 4px #203b2302; transition: border-color .18s, box-shadow .18s, transform .18s; }
.suggestion-card:hover:not(:disabled) { border-color: #aabd9e; box-shadow: 0 5px 17px #364e3510; transform: translateY(-2px); }
.suggestion-card:disabled { opacity: .65; }
.suggestion-icon { grid-row: 1 / 3; display: grid; place-items: center; width: 37px; height: 37px; background: #f1f5ed; color: #71876a; border-radius: 11px; }
.suggestion-icon .icon { width: 20px; height: 20px; }
.suggestion-card strong { font-size: 13px; line-height: 1.7; font-weight: 600; color: #53694b; }
.suggestion-card > span:not(.suggestion-icon) { grid-column: 2 / 4; color: #68765d; font-size: 12px; line-height: 1.8; }
.suggestion-arrow { grid-column: 3; grid-row: 1; width: 15px; height: 15px; color: #acb59f; margin-block-start: 3px; }
.welcome-footnote { display: flex; justify-content: center; align-items: center; gap: 7px; margin: 0; font-size: 9px; color: #6a785f; line-height: 1.7; }
.welcome-footnote .icon { width: 14px; height: 14px; color: #95a284; }
.messages { display: flex; flex-direction: column; gap: 34px; width: min(100%, 820px); margin: 0 auto; }
.turn { display: flex; flex-direction: column; gap: 26px; scroll-margin-block-start: 18px; }
.message { display: flex; align-items: flex-start; gap: 12px; min-width: 0; }
.message--user { margin-inline-start: auto; max-width: 84%; }
.message-avatar { display: grid; place-items: center; flex: 0 0 auto; width: 33px; height: 33px; border-radius: 11px; background: #e9f0e4; color: #68815d; margin-block-start: 2px; }
.message-avatar .icon { width: 19px; height: 19px; }
.message-content { min-width: 0; flex: 1; }
.message-speaker { display: block; margin-block-end: 8px; color: #65745a; font-size: 10px; }
.message--user .message-speaker { text-align: end; }
.message-bubble { overflow-wrap: anywhere; line-height: 2; font-size: 16px; }
.message--user .message-bubble { padding: 13px 19px; border-radius: 16px 16px 5px 16px; color: #fff; background: var(--forest); white-space: pre-wrap; box-shadow: 0 3px 8px #194b3510; }
html[dir="rtl"] .message--user .message-bubble { border-radius: 16px 16px 16px 5px; }
.message--assistant .message-bubble { color: #4e5e49; padding: 3px 0 2px; }
.streaming-draft { white-space: pre-wrap; }
.streaming-status { max-width: 62ch; line-height: 1.7; }
.streaming-draft:not([hidden]) + .pending-answer { margin-block-start: 8px; padding-inline-start: 10px; border-inline-start: 2px solid #c7d4bc; }
.answer-paragraph { margin: 0 0 12px; white-space: pre-wrap; }
.answer-paragraph:last-child { margin: 0; }
.message-bubble :last-child { margin-block-end: 0; }
.source-panel { margin-block-start: 17px; color: #5f7350; font-size: 11px; }
.source-panel > summary { display: flex; align-items: center; gap: 7px; width: fit-content; padding: 7px 10px; background: #edf2e8; border: 1px solid #e3eadb; border-radius: 8px; list-style: none; cursor: pointer; user-select: none; }
.source-panel > summary::-webkit-details-marker { display: none; }
.source-panel > summary > .icon { width: 14px; height: 14px; }
.source-count { display: grid; place-items: center; min-width: 17px; height: 17px; padding: 0 4px; color: #506a3e; background: #e0ead7; border-radius: 5px; font-size: 9px; }
.source-panel > summary .source-chevron { margin-inline-start: 4px; transition: transform .15s; }
.source-panel[open] > summary .source-chevron { transform: rotate(180deg); }
.source-list { display: grid; grid-template-columns: minmax(0, 1fr); gap: 9px; min-width: 0; max-width: min(100%, 620px); margin: 11px 0 0; padding: 0; list-style: none; }
.source-card { display: block; min-width: 0; max-width: 100%; padding: 15px 17px; border: 1px solid #e3e9dc; border-radius: 10px; background: #fff; overflow-wrap: anywhere; transition: border-color .15s; }
.source-card:hover { border-color: #a8bb9b; }
.source-title { display: flex; align-items: flex-start; gap: 10px; color: #526c47; font-size: 12px; font-weight: 600; line-height: 1.8; }
.source-title > span { min-width: 0; overflow-wrap: anywhere; }
.source-title > .icon { width: 13px; height: 13px; margin-inline-start: auto; margin-block-start: 4px; }
.source-meta { display: flex; flex-wrap: wrap; gap: 5px 8px; min-width: 0; margin-block-start: 8px; font-size: 9px; color: #637256; line-height: 1.8; overflow-wrap: anywhere; }
.source-meta > span { min-width: 0; max-width: 100%; }
.source-label { padding: 1px 6px; border-radius: 4px; background: #eff3e9; color: #5f734d; }
.source-label--warning { color: #806326; background: #faf0d8; }
.source-excerpt { margin: 11px 0 0; padding-inline-start: 10px; border-inline-start: 2px solid #e5eadf; color: #637457; font-size: 11px; line-height: 1.9; white-space: pre-wrap; overflow-wrap: anywhere; }
.pending-answer { display: flex; align-items: center; gap: 10px; padding-block: 5px; color: #637457; font-size: 12px; }
.typing-dots { display: flex; gap: 3px; padding: 0 2px; }
.typing-dots span { width: 4px; height: 4px; background: #8fa27e; border-radius: 50%; animation: dot-pulse 1.2s infinite ease-in-out; }
.typing-dots span:nth-child(2) { animation-delay: .16s; }.typing-dots span:nth-child(3) { animation-delay: .32s; }
@keyframes dot-pulse { 0%, 70%, 100% { opacity: .3; transform: translateY(0); } 35% { opacity: 1; transform: translateY(-3px); } }
.error-message { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 13px 16px; border: 1px solid #ecdfc4; border-radius: 10px; color: #806326; background: #faf5e8; font-size: 12px; line-height: 1.9; }
.error-message p { flex: 1; min-width: 150px; margin: 0; }
.retry-button { display: flex; align-items: center; gap: 6px; padding: 6px 8px; font-size: 11px; text-decoration: underline; text-underline-offset: 3px; }
.retry-button .icon { width: 14px; height: 14px; }
.retry-button:disabled { opacity: .5; }
.followups { width: min(100%, 775px); margin: 27px auto 0; padding-inline-start: 45px; }
.followups h2 { margin: 0 0 10px; color: #64735a; font-size: 10px; font-weight: 500; }
.followups > div { display: flex; flex-wrap: wrap; gap: 8px; }
.followup-button { min-width: 0; max-width: 100%; padding: 8px 12px; background: #f5f6f0; border: 1px solid #e2e8d8; border-radius: 8px; color: #5e7250; font-size: 11px; text-align: start; line-height: 1.7; overflow-wrap: anywhere; }
.followup-button:hover:not(:disabled) { border-color: #abbc9d; background: #eff3e8; }
.composer-zone { flex: 0 0 auto; width: min(100%, 1000px); align-self: center; padding: 16px 38px max(15px, env(safe-area-inset-bottom)); background: linear-gradient(180deg, #fcfbf800, var(--paper) 20%); }
.composer { border: 1px solid #d8dfce; border-radius: 16px; background: #fff; box-shadow: 0 4px 20px #3a4d2408; transition: border-color .2s, box-shadow .2s; }
.composer:focus-within { border-color: #9fb38e; box-shadow: 0 5px 25px #3a4d2410; }
.composer-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 13px 19px 0; }
.reply-language-control { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; color: #647359; font-size: 11px; }
.reply-language-control label { display: flex; align-items: center; gap: 6px; }
.reply-language-control .icon { width: 14px; height: 14px; }
.reply-language-control select { max-width: 150px; padding: 3px 5px; border: 0; border-radius: 5px; color: #5f7150; background: #f5f7f0; font-size: 11px; cursor: pointer; }
.scope-pill { display: flex; align-items: center; gap: 5px; flex: 0 0 auto; color: #657954; font-size: 9px; }
.scope-pill > span:first-child { width: 4px; height: 4px; border-radius: 50%; background: #9aaf85; }
.composer-input { display: flex; align-items: flex-end; gap: 14px; padding: 13px 16px 8px 19px; }
.composer textarea { flex: 1; resize: none; display: block; width: 100%; min-height: 33px; max-height: 150px; border: 0; outline: 0; padding: 5px 0; background: transparent; color: #425d36; line-height: 1.8; font-size: 14px; scrollbar-width: thin; }
.composer textarea::placeholder { color: #66775a; opacity: 1; }
.send-button { display: grid; place-items: center; flex: 0 0 auto; width: 37px; height: 37px; margin-block-end: 1px; border-radius: 10px; background: var(--forest); color: white; transition: background .15s, transform .15s; }
.send-button .icon { width: 20px; height: 20px; }
.send-button:disabled { color: #dbe3d3; background: #bac6ad; }
.send-button:hover:not(:disabled) { background: #267052; transform: translateY(-1px); }
.composer-meta { display: flex; justify-content: space-between; gap: 12px; padding: 2px 19px 12px; color: #69775d; font-size: 10px; line-height: 1.5; }
.composer-meta .is-over-limit { color: #b55c45; }
.noscript-notice { position: fixed; inset: auto 20px 20px; z-index: 30; padding: 16px; text-align: center; color: #fff; background: var(--forest); border-radius: 12px; }
@media (min-width: 1500px) {
  .sidebar { padding-inline: 28px; }
  .app-shell { grid-template-columns: 292px minmax(0, 1fr); }
  .topbar { padding-inline: 52px; }
  .welcome { padding-block-start: 8vh; }
}
@media (max-height: 820px) and (min-width: 901px) {
  .sidebar { padding-block-start: 23px; }
  .brand { margin-block-end: 24px; }
  .country-card { padding-block: 20px; margin-block-start: 20px; }
  .country-card-top { margin-block-end: 18px; }
  .country-line { margin-block: 15px 10px; }
  .topic-section { margin-block-start: 22px; }
  .topic-button { padding-block: 10px; }
  .sidebar-bottom { padding-block-start: 15px; }
  .welcome { padding-block-start: 12px; }
  .welcome-symbol { margin-block-end: 18px; width: 55px; height: 55px; }
  .welcome-eyebrow { margin-block-end: 11px; }
  .suggestions { margin-block: 24px 18px; }
  .suggestion-card { min-height: 90px; padding-block: 15px; }
}
@media (max-width: 1100px) {
  .app-shell { grid-template-columns: 235px minmax(0, 1fr); }
  .sidebar { padding-inline: 20px; }
  .topbar { padding-inline: 28px; }
  .conversation { padding-inline: 27px; }
  .composer-zone { padding-inline: 27px; }
  .topbar-controls { gap: 16px; }
  .availability { max-width: 115px; white-space: normal; line-height: 1.5; }
  .suggestion-card { grid-template-columns: 31px minmax(0, 1fr) 12px; gap: 4px 9px; padding-inline: 13px; }
  .suggestion-icon { width: 31px; height: 31px; border-radius: 8px; }
}
/* Keep the composer in the page layout while the conversation scrolls above it. */
@media (max-width: 900px) {
  .app-shell { position: relative; top: var(--app-offset-top, 0px); grid-template-columns: minmax(0, 1fr); height: var(--app-height, 100dvh); }
  .sidebar { display: none; }
  .chat-main { container-name: chat-viewport; container-type: size; }
  .mobile-mark { display: block; flex: 0 0 auto; }
  .mobile-new-chat { display: grid; }
  .topbar {
    min-height: 76px;
    padding: 12px 24px;
    padding-top: max(12px, env(safe-area-inset-top));
    padding-left: max(24px, env(safe-area-inset-left));
    padding-right: max(24px, env(safe-area-inset-right));
  }
  .assistant-identity, .assistant-identity > div { min-width: 0; }
  .topbar-title { font-size: 16px; line-height: 1.4; overflow-wrap: anywhere; }
  .topbar-eyebrow { font-size: 10px; line-height: 1.4; }
  .topbar-controls { flex: 0 0 auto; gap: 14px; }
  .language-control { gap: 7px; padding-inline-start: 0; border: 0; }
  .language-control select { width: 112px; padding: 8px 2px; font-size: 16px; }
  .mobile-new-chat, .send-button { width: 44px; height: 44px; min-width: 44px; }
  .language-control select, .reply-language-control select, .source-panel > summary,
  .retry-button, .followup-button, .service-notice button { min-height: 44px; }
  .welcome { padding-block-start: 30px; }
  .welcome h2 { font-size: 32px; }
  .conversation {
    padding: 28px 24px 24px;
    padding-left: max(24px, env(safe-area-inset-left));
    padding-right: max(24px, env(safe-area-inset-right));
    scroll-padding-block: 16px;
  }
  .composer-zone {
    max-width: 850px;
    padding: 12px 24px max(12px, env(safe-area-inset-bottom));
    padding-left: max(24px, env(safe-area-inset-left));
    padding-right: max(24px, env(safe-area-inset-right));
  }
  .composer-toolbar { gap: 10px; padding: 10px 16px 0; }
  .reply-language-control { flex: 1 1 auto; min-width: 0; flex-wrap: nowrap; gap: 7px; }
  .reply-language-control label { flex: 0 1 auto; min-width: 0; max-width: 125px; font-size: 12px; line-height: 1.4; }
  .reply-language-control label > span { min-width: 0; }
  .reply-language-control select { flex: 0 1 auto; min-width: 0; width: 190px; max-width: 190px; padding: 8px 5px; font-size: 16px; }
  .scope-pill { font-size: 10px; }
  .composer-input { gap: 12px; padding: 8px 16px 6px; }
  .composer textarea {
    min-height: 44px;
    max-height: var(--composer-max-height, clamp(44px, calc(var(--app-height, 100dvh) / 5), 120px));
    padding-block: 7px;
    font-size: 16px;
    line-height: 1.65;
  }
  .composer-meta { padding: 4px 16px 10px; font-size: 10px; }
  .service-notice {
    padding: 7px 24px;
    padding-left: max(24px, env(safe-area-inset-left));
    padding-right: max(24px, env(safe-area-inset-right));
    font-size: 12px;
  }
  .service-notice button { padding-inline: 4px; font-size: 11px; }
  .source-panel > summary { min-width: 110px; padding: 10px 12px; font-size: 12px; }
  .source-title { font-size: 14px; }
  .source-meta { font-size: 11px; }
  .source-excerpt { font-size: 12px; }
  .retry-button { padding: 8px 10px; font-size: 12px; }
  .followup-button { padding: 10px 12px; font-size: 12px; }
}
@media (max-width: 560px) {
  .topbar {
    min-height: 72px;
    gap: 10px;
    padding: 10px 16px;
    padding-top: max(10px, env(safe-area-inset-top));
    padding-left: max(16px, env(safe-area-inset-left));
    padding-right: max(16px, env(safe-area-inset-right));
  }
  .topbar-controls { gap: 8px; }
  .availability { display: none; }
  .language-control > .icon { display: none; }
  .language-control select { width: 104px; }
  .icon-button { border-radius: 10px; }
  .icon-button .icon { width: 20px; height: 20px; }
  .mobile-mark { width: 30px; height: 30px; }
  .assistant-identity { gap: 8px; }
  .topbar-title { font-size: 14px; }
  .topbar-eyebrow { display: none; }
  .conversation {
    padding: 22px 18px;
    padding-left: max(18px, env(safe-area-inset-left));
    padding-right: max(18px, env(safe-area-inset-right));
  }
  .welcome { padding-block: 12px 8px; }
  .welcome-symbol { width: 48px; height: 48px; border-radius: 16px; margin-block-end: 16px; }
  .welcome-symbol > svg { width: 25px; height: 25px; }
  .welcome-eyebrow { font-size: 11px; margin-block-end: 12px; }
  .welcome h2 { max-width: 340px; margin-block-end: 12px; font-size: 26px; line-height: 1.5; }
  html[dir="ltr"] .welcome h2 { font-size: 32px; }
  .welcome-description { max-width: 340px; font-size: 14px; line-height: 1.85; }
  .suggestions { gap: 10px; margin-block: 22px 18px; }
  .suggestion-card { display: flex; flex-direction: column; gap: 7px; min-height: 135px; padding: 14px 12px; border-radius: 11px; position: relative; }
  .suggestion-icon { width: 30px; height: 30px; margin-block-end: 2px; }
  .suggestion-icon .icon { width: 18px; height: 18px; }
  .suggestion-card strong { font-size: 13px; line-height: 1.65; }
  .suggestion-card > span:not(.suggestion-icon) { font-size: 12px; line-height: 1.75; }
  .suggestion-arrow { position: absolute; inset-inline-end: 13px; inset-block-start: 20px; width: 13px; height: 13px; }
  .welcome-footnote { font-size: 10px; align-items: flex-start; }
  .welcome-footnote .icon { width: 13px; height: 13px; margin-block-start: 2px; }
  .composer-zone {
    padding: 10px 14px max(12px, env(safe-area-inset-bottom));
    padding-left: max(14px, env(safe-area-inset-left));
    padding-right: max(14px, env(safe-area-inset-right));
  }
  .composer { border-radius: 14px; }
  .composer-toolbar { padding: 8px 12px 0; gap: 8px; }
  .reply-language-control { gap: 6px; }
  .reply-language-control label { max-width: 95px; font-size: 11px; }
  .reply-language-control .icon { width: 14px; height: 14px; }
  .reply-language-control select { flex: 1 1 145px; width: 145px; max-width: 190px; }
  .scope-pill { font-size: 10px; }
  .composer-input { padding: 6px 12px 5px; gap: 10px; }
  .composer textarea::placeholder { font-size: 16px; }
  .send-button { border-radius: 10px; }
  .composer-meta { padding: 4px 12px 9px; font-size: 10px; }
  .service-notice {
    padding: 5px 16px;
    padding-left: max(16px, env(safe-area-inset-left));
    padding-right: max(16px, env(safe-area-inset-right));
    gap: 8px;
    font-size: 12px;
  }
  .service-notice > .icon { width: 16px; height: 16px; }
  .service-notice button { font-size: 11px; }
  .messages { gap: 28px; }
  .turn { gap: 20px; }
  .message { gap: 8px; }
  .message-avatar { width: 28px; height: 28px; border-radius: 9px; }
  .message-avatar .icon { width: 17px; height: 17px; }
  .message-bubble { font-size: 16px; line-height: 1.9; }
  .message-speaker { font-size: 11px; margin-block-end: 6px; }
  .message--user { max-width: 94%; }
  .message--user .message-bubble { padding: 11px 14px; }
  .source-card { padding: 13px; }
  .source-title { font-size: 13px; }
  .followups { padding-inline-start: 36px; margin-block-start: 22px; }
}
@media (max-width: 380px) {
  .topbar {
    padding-inline: 12px;
    padding-left: max(12px, env(safe-area-inset-left));
    padding-right: max(12px, env(safe-area-inset-right));
  }
  .mobile-mark { display: none; }
  .topbar-title { font-size: 14px; }
  .conversation {
    padding-inline: 14px;
    padding-left: max(14px, env(safe-area-inset-left));
    padding-right: max(14px, env(safe-area-inset-right));
  }
  .welcome h2 { font-size: 24px; }
  .scope-pill { display: none; }
  .suggestions { grid-template-columns: minmax(0, 1fr); gap: 9px; }
  .suggestion-card {
    display: grid;
    grid-template-columns: 33px minmax(0, 1fr) 14px;
    grid-template-rows: auto auto;
    gap: 3px 10px;
    min-height: 82px;
    padding: 13px;
  }
  .suggestion-icon { grid-column: 1; grid-row: 1 / 3; margin: 0; }
  .suggestion-card strong { grid-column: 2; }
  .suggestion-card > span:not(.suggestion-icon) { grid-column: 2 / 4; }
  .suggestion-arrow { position: static; grid-column: 3; grid-row: 1; margin-block-start: 4px; }
}
/* A size container follows --app-height when an on-screen keyboard changes the visual viewport. */
@container chat-viewport (max-height: 540px) {
  .topbar { min-height: 56px; padding-block: 5px; padding-top: max(5px, env(safe-area-inset-top)); }
  .topbar-eyebrow, .availability, .welcome-symbol, .welcome-eyebrow, .welcome-footnote, #composer-hint { display: none; }
  .conversation { padding-block: 12px; }
  .welcome { padding-block: 0; }
  .welcome h2 { margin-block-end: 9px; font-size: 24px; }
  html[dir="ltr"] .welcome h2 { font-size: 28px; }
  .welcome-description { font-size: 13px; line-height: 1.7; }
  .suggestions { margin-block: 15px 0; }
  .suggestion-card { min-height: 80px; }
  .composer-zone { padding-top: 5px; padding-bottom: max(6px, env(safe-area-inset-bottom)); }
  .composer-toolbar { padding-top: 2px; }
  .composer-input { padding-block: 3px; }
  .composer-meta { justify-content: flex-end; padding-block: 0 5px; font-size: 9px; }
  .service-notice { padding-block: 0; }
  .service-notice > .icon { display: none; }
  .turn { gap: 15px; }
}
/* Fallback for older browsers that do not support container queries. */
@media (max-width: 900px) and (max-height: 540px) {
  .topbar { min-height: 56px; padding-block: 5px; padding-top: max(5px, env(safe-area-inset-top)); }
  .topbar-eyebrow, .availability, .welcome-symbol, .welcome-eyebrow, .welcome-footnote, #composer-hint { display: none; }
  .conversation { padding-block: 12px; }
  .welcome { padding-block: 0; }
  .welcome h2 { margin-block-end: 9px; font-size: 24px; }
  html[dir="ltr"] .welcome h2 { font-size: 28px; }
  .welcome-description { font-size: 13px; line-height: 1.7; }
  .suggestions { margin-block: 15px 0; }
  .suggestion-card { min-height: 80px; }
  .composer-zone { padding-top: 5px; padding-bottom: max(6px, env(safe-area-inset-bottom)); }
  .composer-toolbar { padding-top: 2px; }
  .composer-input { padding-block: 3px; }
  .composer-meta { justify-content: flex-end; padding-block: 0 5px; font-size: 9px; }
  .service-notice { padding-block: 0; }
  .service-notice > .icon { display: none; }
  .turn { gap: 15px; }
}
@media (hover: none) {
  .suggestion-card:hover:not(:disabled), .send-button:hover:not(:disabled) { transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; }
}
