/* Layout and controls. Palette and response content live in separate files. */
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.6 system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, input, textarea, select { font: inherit; color: inherit; }
button, a, select, label.pill { -webkit-tap-highlight-color: transparent; }
button {
  cursor: pointer;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 4px;
  min-height: 44px;
  padding: 9px 15px;
  transition: background .18s, border-color .18s, transform .18s, box-shadow .18s;
}
button:hover:not(:disabled) { background: color-mix(in srgb, var(--text) 6%, var(--panel)); }
button:active:not(:disabled) { transform: translateY(1px); }
button:disabled { opacity: .45; cursor: default; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
[hidden] { display: none !important; }
a { color: var(--accent); }
.workspace { display: grid; grid-template-columns: 256px minmax(0, 1fr); height: 100%; height: 100dvh; overflow: hidden; }
#sidebar { display: flex; flex-direction: column; padding: 18px 14px 20px; background: var(--panel); border-right: 1px solid color-mix(in srgb, var(--border) 50%, transparent); min-width: 0; min-height: 0; }
.sidebar-top { display: flex; align-items: center; justify-content: space-between; }
.brand { display: flex; align-items: center; gap: 8px; color: var(--text); font-weight: 550; font-size: 13px; text-decoration: none; letter-spacing: -.4px; }
.brand svg { width: 34px; height: 34px; }
.brand-wordmark { font-size: 18px; font-weight: 850; letter-spacing: -.8px; line-height: 1.1; }
.brand-wordmark > span { display: block; font: 8px/2 ui-monospace, monospace; letter-spacing: 1.5px; color: var(--muted); }
.brand b { font-weight: 450; color: var(--muted); }
.new-chat {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 24px 0 30px;
  padding: 10px 12px;
  background: transparent;
  border-color: var(--accent);
  border-radius: 2px 12px 2px 2px;
  box-shadow: 3px 3px 0 color-mix(in srgb, var(--accent) 15%, transparent);
  font-size: 13px;
  font-weight: 500;
}
.new-chat:hover:not(:disabled) { border-color: var(--muted); background: color-mix(in srgb, var(--text) 7%, transparent); }
.new-chat .ui-icon { width: 17px; height: 17px; color: var(--muted); }
.section-label { display: flex; justify-content: space-between; color: var(--muted); font-size: 9px; font-weight: 500; letter-spacing: 1px; padding: 0 10px 16px; }
.section-label span { font-size: 9px; border: 1px solid var(--border); border-radius: 4px; padding: 0 4px; }
#history-list { flex: 1; overflow-y: auto; min-height: 0; }
.history-empty { color: var(--muted); font-size: 13px; padding: 0 10px; }
.history-row { display: flex; align-items: center; border-radius: 0; margin-bottom: 4px; border: 1px solid transparent; }
.history-row:has([aria-current="true"]) { background: color-mix(in srgb, var(--accent) 7%, transparent); border-color: transparent; border-left-color: var(--accent); }
.history-item { min-width: 0; flex: 1; text-align: left; background: transparent; border: 0; padding: 10px; }
.history-title { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; font-weight: 550; }
.history-item small { color: var(--muted); font-size: 11px; }
.delete-chat { flex: none; width: 40px; padding: 0; border: 0; background: transparent; color: var(--muted); font-size: 20px; }
.sidebar-bottom { border-top: 1px solid var(--border); padding: 20px 10px 0; margin-top: 20px; font-size: 12px; }
.privacy-icon { color: var(--muted); margin-bottom: 10px; }
.sidebar-bottom strong { font-weight: 500; }
.sidebar-bottom p { color: var(--muted); margin: 6px 0 18px; }
.sidebar-bottom a { display: flex; justify-content: space-between; color: var(--muted); text-decoration: none; }
.chat-panel { display: flex; flex-direction: column; min-width: 0; min-height: 0; background: var(--bg); }
header { display: flex; align-items: center; gap: 12px; padding: 16px 24px; min-height: 76px; border-bottom: 1px solid var(--border); }
.heading { display: grid; min-width: 0; }
.eyebrow { font: 9px/1.8 ui-monospace, monospace; letter-spacing: 1px; color: var(--muted); }
.heading strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 260px; font-size: 13px; font-weight: 500; }
.spacer { flex: 1; }
.model-chip { display: flex; align-items: center; gap: 8px; min-width: 0; margin-left: auto; padding: 6px 10px; border: 1px solid transparent; border-radius: 8px; background: transparent; color: var(--muted); }
#model { min-width: 0; max-width: 250px; background: transparent; border: 0; font-size: 12px; text-overflow: ellipsis; padding: 3px 0; }
#model option { background: var(--panel); color: var(--text); }
.dot { height: 7px; width: 7px; flex: none; border-radius: 50%; background: var(--muted); }
.dot.ok { background: var(--accent); }
.dot.bad { background: var(--danger); }
.icon-btn { width: 44px; height: 44px; flex: none; padding: 0; display: grid; place-items: center; background: transparent; border-color: transparent; font-size: 22px; color: var(--muted); border-radius: 8px; }
.icon-btn:hover:not(:disabled) { color: var(--text); background: color-mix(in srgb, var(--text) 5%, transparent); }
.icon-btn svg { width: 18px; height: 18px; }
.about { color: var(--muted); font-size: 12px; text-decoration: none; }
main { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
#thread { max-width: 1100px; margin: 0 auto; padding: 42px 36px 40px; }
/* A poster-like opening: typography and cub artwork share the stage. */
#thread:has(.msg) { max-width: 940px; }
.empty {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
  align-items: center;
  column-gap: 20px;
  margin: 20px 0;
}
.welcome-intro { position: relative; z-index: 1; padding: 24px 0 36px; }
.welcome-label { display: block; color: var(--muted); font: 9px/1.5 ui-monospace, monospace; letter-spacing: 1.7px; margin-bottom: 30px; }
.empty h1 { margin: 0 0 28px; font-size: clamp(70px, 7.7vw, 116px); line-height: .86; font-weight: 900; letter-spacing: -.075em; }
.empty h1 > span { display: block; }
.empty h1 > span:first-child { color: transparent; -webkit-text-stroke: 1px var(--muted); }
.empty h1 .title-accent { color: var(--accent); margin-top: 5px; }
.welcome-tagline { font-size: 22px; font-weight: 500; letter-spacing: -.7px; margin: 0 0 12px; }
.welcome-description { font-size: 13px; color: var(--muted); max-width: 330px; margin: 0; line-height: 1.8; }
.cub-stage { position: relative; isolation: isolate; display: grid; place-items: center; min-height: 360px; align-self: stretch; }
.cub-stage::before { content: ""; position: absolute; inset: 12px 0 45px; background-image: radial-gradient(var(--border) 1px, transparent 1px); background-size: 14px 14px; z-index: -3; mask-image: radial-gradient(ellipse, black 35%, transparent 75%); }
.cub-orbit { position: absolute; width: min(88%, 320px); aspect-ratio: 1; border: 1px solid var(--border); border-radius: 50%; z-index: -2; }
.cub-orbit::before { content: ""; position: absolute; inset: 13px; border: 1px dashed color-mix(in srgb, var(--accent) 25%, transparent); border-radius: 50%; }
.cub-orbit::after { content: "+"; position: absolute; right: -6px; top: 50%; color: var(--accent); font: 20px ui-monospace, monospace; line-height: 0; }
.cub-stripe { position: absolute; inset: 28% 4% 24%; transform: rotate(-25deg); background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--accent) 13%, transparent), transparent); border-top: 1px solid color-mix(in srgb, var(--accent) 20%, transparent); border-bottom: 1px solid color-mix(in srgb, var(--accent) 20%, transparent); z-index: -1; }
.cub-stage > svg { width: min(115%, 370px); height: auto; transform: rotate(-7deg); filter: drop-shadow(0 18px 24px #0003); }
.art-label { position: absolute; top: 22px; right: 3px; color: var(--accent); font: 9px ui-monospace, monospace; letter-spacing: 1.5px; border-top: 2px solid var(--accent); padding-top: 8px; }
.art-caption { position: absolute; bottom: 18px; right: 0; color: var(--muted); font: 9px ui-monospace, monospace; letter-spacing: .3px; }
.welcome-caption { grid-column: 1 / -1; display: flex; justify-content: space-between; gap: 12px; padding: 20px 0 12px; border-top: 1px solid var(--border); margin-top: 16px; font: 9px/1.5 ui-monospace, monospace; letter-spacing: 1px; color: var(--muted); }
.chips { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.chips button { display: flex; align-items: flex-start; gap: 12px; text-align: left; border: 0; border-right: 1px solid var(--border); border-radius: 0; background: transparent; padding: 18px 18px 18px 0; }
.chips button + button { padding-left: 18px; }
.chips button:last-child { border-right: 0; }
.chips button:hover { background: color-mix(in srgb, var(--accent) 5%, transparent); }
.chips .prompt-number { font: 10px/1.8 ui-monospace, monospace; color: var(--accent); }
.prompt-label { flex: 1; }
.chips b { display: block; font-size: 13px; font-weight: 550; margin-bottom: 5px; }
.prompt-detail { display: block; font-size: 10px; color: var(--muted); }
.prompt-arrow { color: var(--muted); font-size: 16px; }
.hero { display: grid; place-items: center; }

footer { padding: 12px 32px max(14px, env(safe-area-inset-bottom)); }
.composer { max-width: 1028px; margin: 0 auto; background: var(--panel); border: 1px solid var(--border); border-top: 2px solid var(--accent); border-radius: 0 16px 0 0; padding: 14px 20px 16px; box-shadow: 5px 5px 0 color-mix(in srgb, var(--border) 35%, transparent); }
.composer:focus-within { border-color: color-mix(in srgb, var(--muted) 50%, var(--border)); box-shadow: 5px 5px 0 color-mix(in srgb, var(--accent) 12%, transparent); }
.composer-heading { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 12px; font: 8px/1.5 ui-monospace, monospace; letter-spacing: 1.5px; color: var(--muted); }
.composer-heading label { color: var(--accent); }
#input { display: block; width: 100%; border: 0; background: transparent; outline: 0; resize: none; min-height: calc(1.65em + 8px); max-height: min(28dvh, 240px); overflow-y: auto; padding: 3px 4px 5px; line-height: 1.65; font-size: 16px; }
#input::placeholder { color: var(--muted); }
.composer-toolbar { display: flex; gap: 10px; align-items: center; }
.composer.dropping { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent); }

/* Files: chips in the composer and in sent messages. */
.attachments { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 10px; }
.attachment { display: flex; align-items: center; gap: 9px; max-width: min(100%, 280px); padding: 4px 4px 4px 4px; border: 1px solid var(--border);
              border-radius: 8px; background: var(--bg); font-size: 12px; white-space: normal; }
.attachment .thumb { flex: none; width: 40px; height: 40px; border-radius: 5px; object-fit: cover; display: grid; place-items: center;
                     background: var(--user); color: var(--accent); font: 600 10px ui-monospace, monospace; letter-spacing: .5px; }
.attachment .label { display: grid; min-width: 0; line-height: 1.35; padding-right: 4px; }
.attachment .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); }
.attachment .detail { color: var(--muted); font-size: 11px; }
.attachment.reading { opacity: .7; }
.attachment.reading .thumb { animation: pulse 1.2s ease-in-out infinite; }
.attachment.failed { border-color: var(--danger); }
.attachment.failed .detail { color: var(--danger); }
.attachment .remove { flex: none; min-height: 0; width: 28px; height: 28px; padding: 0; border: 0; background: transparent; color: var(--muted); font-size: 18px; line-height: 1; }
.attachment .remove:hover { color: var(--text); }
@keyframes pulse { 50% { opacity: .45; } }
.attach-note { margin: -4px 0 8px; font-size: 12px; color: var(--danger); }
#attach.pill { background: transparent; }

.viewer { max-width: min(96vw, 1200px); padding: 12px; }
.viewer img { display: block; max-width: 100%; max-height: 78dvh; margin: 0 auto; border-radius: 6px; }
.viewer .row { align-items: center; margin-top: 12px; }
.viewer-name { flex: 1; min-width: 0; color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.tools { display: flex; gap: 7px; }
.pill { display: flex; align-items: center; gap: 6px; position: relative; min-height: 38px; padding: 6px 10px; border: 1px solid transparent; border-radius: 2px; color: var(--muted); cursor: pointer; font-size: 12px; font-weight: 450; }
.pill input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.pill:has(input:checked) { color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, var(--panel)); border-color: transparent; }
.pill:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 3px; }
.pill svg { width: 15px; height: 15px; }
#keyboard-hint { margin-left: auto; font-size: 10px; color: var(--muted); }
#send, .primary { background: var(--accent); border-color: var(--accent); color: var(--accent-text); font-weight: 600; }
#send { display: flex; align-items: center; justify-content: space-between; gap: 18px; flex: none; margin-left: auto; min-width: 100px; height: 44px; padding: 0 14px; border-radius: 2px 10px 2px 2px; font: 12px ui-monospace, monospace; }
#send .ui-icon { width: 18px; height: 18px; stroke-width: 1.8; transform: rotate(45deg); }
#send.busy .ui-icon { transform: none; }
#send:hover, .primary:hover { background: color-mix(in srgb, var(--accent) 85%, var(--text)); }
#send.busy { background: var(--user); color: var(--text); border-color: var(--border); }
.hint { text-align: center; font-size: 11px; color: var(--muted); margin: 10px auto 0; }
.hint button { border: 0; border-radius: 4px; min-height: 24px; background: transparent; padding: 0 2px; color: var(--muted); font-size: inherit; text-decoration: underline; text-underline-offset: 3px; }
#storage-status { max-width: 800px; margin: 0 auto 10px; color: var(--danger); font-size: 12px; }
dialog { width: min(520px, calc(100vw - 32px)); max-height: calc(100dvh - 40px); overflow-y: auto; background: var(--panel); color: var(--text); border: 1px solid var(--border); border-radius: 16px; padding: 28px; box-shadow: 0 24px 90px #0003; }
dialog::backdrop { background: #080c1870; backdrop-filter: blur(5px); }
dialog h2 { font-size: 23px; line-height: 1.3; letter-spacing: -.6px; margin: 0 0 20px; }
dialog p { color: var(--muted); font-size: 14px; margin: 0 0 18px; }
dialog label { display: block; margin: 20px 0 7px; color: var(--muted); font-size: 12px; }
dialog input, dialog select, dialog textarea { width: 100%; border: 1px solid var(--border); border-radius: 10px; background: var(--bg); padding: 10px 12px; font-size: 16px; }
dialog textarea { min-height: 100px; resize: vertical; }
.row { display: flex; justify-content: flex-end; gap: 10px; margin-top: 26px; }
.danger { color: var(--danger); }
.gate { max-width: 460px; margin: 2vh auto; text-align: center; }
.gate .hero svg { width: 240px; height: 251px; }
.gate h1 { font-size: 26px; line-height: 1.3; letter-spacing: -.7px; }
.gate p, .gate small { color: var(--muted); }
.gate form { display: flex; gap: 8px; margin: 16px 0 10px; }
.gate input { width: 100%; min-width: 0; background: var(--panel); border: 1px solid var(--border); border-radius: 10px; padding: 10px; font-size: 16px; }
.gate .register { display: grid; grid-template-columns: 1fr 1fr; }
.gate .register button { grid-column: 1 / -1; }
.gate .step { font-size: 13px; margin: 24px 0 0; }
.gate .dm { display: inline-flex; gap: 12px; }
.gate .outcome { display: block; }
.ui-icon { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.sidebar-collapsed .workspace { grid-template-columns: minmax(0, 1fr); }
.sidebar-collapsed #sidebar { display: none; }
.sidebar-collapsed .heading { display: grid; }
.theme-trigger { display: flex; align-items: center; justify-content: center; gap: 8px; flex: none; background: transparent; border-color: transparent; padding: 8px 10px; color: var(--muted); font-size: 12px; }
.theme-trigger .ui-icon { width: 18px; height: 18px; }
.theme-trigger:hover { color: var(--text); }
.theme-dialog { width: min(660px, calc(100vw - 24px)); padding: 28px; }
.dialog-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.dialog-heading .eyebrow { font-size: 9px; letter-spacing: 1.6px; }
.dialog-heading h2 { margin: 8px 0 12px; font-size: 25px; font-weight: 500; }
.theme-dialog > p { font-size: 12px; margin-bottom: 22px; }
.theme-filters { display: flex; gap: 4px; margin: 0 0 20px; padding: 4px; background: var(--bg); border-radius: 10px; width: fit-content; }
.theme-filters button { min-height: 36px; padding: 6px 14px; border: 0; background: transparent; color: var(--muted); font-size: 12px; border-radius: 7px; }
.theme-filters button[aria-pressed="true"] { background: var(--panel); color: var(--text); box-shadow: 0 1px 4px #0002; }
.theme-filters span { margin-left: 6px; opacity: .6; font-size: 10px; }
.theme-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.theme-choice { position: relative; text-align: left; padding: 7px; background: transparent; border: 1px solid var(--border); border-radius: 10px; }
.theme-choice[aria-pressed="true"] { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 6%, var(--panel)); }
.theme-preview { display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: 6px; background: var(--preview-bg); border-radius: 5px; height: 56px; padding: 12px; border: 1px solid #ffffff0c; }
.theme-preview i { display: block; border-radius: 3px; width: 70%; height: 3px; background: var(--preview-accent); opacity: .4; }
.theme-preview i:first-child { width: 35%; opacity: 1; }
.theme-preview i:last-child { width: 50%; }
.theme-name { display: block; font-size: 10px; padding: 8px 2px 2px; line-height: 1.4; }
.theme-check { display: none; position: absolute; top: 12px; right: 13px; color: var(--preview-accent); font-size: 12px; }
.theme-choice[aria-pressed="true"] .theme-check { display: block; }
.theme-status { margin-top: 20px; font-size: 11px; color: var(--muted); }
@media (hover: hover) { .delete-chat { opacity: 0; } .history-row:hover .delete-chat, .history-row:focus-within .delete-chat { opacity: 1; } }

@media (max-width: 1200px) {
  header { padding: 18px 24px; gap: 8px; }
  .heading { display: none; }
  .model-chip { margin-left: 0; }
  #keyboard-hint { display: none; }
}
@media (max-width: 900px) {
  .workspace { grid-template-columns: minmax(0, 1fr); }
  #sidebar { position: fixed; inset: 0 auto 0 0; width: min(310px, 86vw); z-index: 30; transform: translateX(-100%); visibility: hidden; transition: transform .2s, visibility .2s; padding-top: max(20px, env(safe-area-inset-top)); padding-bottom: max(20px, env(safe-area-inset-bottom)); }
  .history-open #sidebar { transform: translateX(0); visibility: visible; }
  #history-backdrop { position: fixed; inset: 0; z-index: 25; background: #080c1870; border: 0; border-radius: 0; backdrop-filter: blur(3px); }
  header { min-height: 72px; padding: max(12px, env(safe-area-inset-top)) 16px 12px; }
  .model-chip { max-width: min(50vw, 300px); }
}
@media (max-width: 560px) {
  header { padding-left: 8px; padding-right: 8px; gap: 2px; }
  #theme-label { display: none; }
  .theme-trigger { width: 44px; padding: 0; }
  .theme-dialog { padding: 20px; }
  .theme-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .theme-name { font-size: 9px; }
  .dialog-heading h2 { font-size: 22px; }
  .sidebar-collapsed .heading { display: none; }
  .model-chip { padding: 7px 8px; flex: 1; max-width: none; }
  #model { width: 100%; }
  header .spacer { display: none; }
  #thread { padding: 16px 18px 24px; }
  .empty { column-gap: 0; grid-template-columns: minmax(0, 1fr); margin-top: 0; }
  .welcome-intro { padding: 12px 0 20px; }
  .welcome-label { font-size: 7px; letter-spacing: .5px; margin-bottom: 20px; }
  .empty h1 { font-size: clamp(66px, 18vw, 90px); margin-bottom: 20px; }
  .welcome-tagline { font-size: 16px; letter-spacing: -.4px; }
  .welcome-description { font-size: 12px; max-width: 260px; }
  .cub-stage { min-height: 250px; grid-row: 1; margin: 0 0 14px; }
  .cub-stage > svg { width: 230px; max-width: 100%; transform: rotate(-7deg); }
  .cub-orbit { width: 230px; }
  .art-label { top: 5px; font-size: 7px; }
  .art-caption { display: none; }
  .welcome-caption { margin-top: 0; padding-top: 16px; font-size: 7px; letter-spacing: .3px; }
  .chips { grid-template-columns: 1fr; }
  .chips button, .chips button + button { padding: 13px 0; border-right: 0; border-bottom: 1px solid var(--border); align-items: center; }
  .chips button:last-child { border-bottom: 0; }
  .chips b { margin: 0; font-size: 12px; }
  .prompt-label { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
  .prompt-detail { font-size: 9px; }
  footer { padding: 8px 10px max(8px, env(safe-area-inset-bottom)); }
  .composer { padding: 12px; border-radius: 0 12px 0 0; }
  .composer-heading { font-size: 7px; margin-bottom: 8px; }
  #send { min-width: 80px; gap: 10px; padding: 0 10px; }
  .pill { min-height: 44px; }
  /* Narrow screens: Attach, Web and Think as icons, so Send keeps its place.
     Their words stay in the page for screen readers and in the tooltips. */
  .tools .pill { font-size: 0; gap: 0; padding: 6px 10px; }
  .tools .pill svg { width: 18px; height: 18px; }
  .hint { font-size: 10px; margin-top: 6px; }
  dialog { padding: 22px; }
  .gate .hero svg { width: 210px; height: 220px; }
  .gate .register { grid-template-columns: 1fr; }
}
/* Composer on touch screens and short windows (a tablet or phone with the keyboard
   up): one line to start, grows with the text, and keeps the conversation visible. */
@media (pointer: coarse) {
  #keyboard-hint { display: none; }
  footer:focus-within .hint { display: none; }
}
@media (max-height: 640px), (pointer: coarse) {
  header { min-height: 0; padding-top: max(8px, env(safe-area-inset-top)); padding-bottom: 8px; }
  footer { padding: 6px 16px max(6px, env(safe-area-inset-bottom)); }
  .composer { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; column-gap: 10px; padding: 8px 8px 8px 14px; border-radius: 0 12px 0 0; }
  .composer-heading, .hint { display: none; }
  .attachments, .attach-note { grid-column: 1 / -1; }
  #input { max-height: 30dvh; }
  .composer-toolbar { gap: 4px; }
  .pill { min-height: 40px; padding: 6px 8px; }
  #send { min-width: 0; height: 40px; gap: 10px; }
  .attachments { margin-bottom: 6px; }
}
@media (max-height: 640px) and (max-width: 560px), (pointer: coarse) and (max-width: 560px) {
  .composer { grid-template-columns: minmax(0, 1fr); padding: 6px 8px 6px 12px; }
  .composer-toolbar { margin-top: 2px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
