:root {
  color-scheme: dark;
  --bg: #0b0b0c;
  --panel: #151517;
  --panel-2: #1f1f22;
  --line: rgba(255,255,255,.09);
  --text: #f5f2eb;
  --muted: #a7a29a;
  --accent: #d97745;
  --accent-2: #2d7cff;
  --accent-soft: rgba(217,119,69,.14);
  --bg-glow-1: rgba(217,119,69,.12);
  --bg-glow-2: rgba(45,124,255,.1);
  --sidebar-bg: rgba(12,12,13,.82);
  --topbar-bg: rgba(11,11,12,.62);
  --composer-bg: rgba(43,43,41,.96);
  --assistant-text: #fff;
  --green: #3ddc97;
  --shadow: 0 24px 80px rgba(0,0,0,.45);
  --ui-font: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --read-font: ui-serif, Georgia, Cambria, "Times New Roman", "Noto Serif TC", serif;
  --chat-content-max: 1210px;
  --composer-content-max: 900px;
  --sidebar-current-width: 246px;
  --composer-reserved: 236px;
  --ui-base-font-size: 13.4px;
  --message-font-size: 14.8px;
  --assistant-font-size: 15.2px;
  --composer-font-size: 14.6px;
  --greeting-font-size: 46px;
}

html[data-theme="graphite"] {
  --bg: #090a0c;
  --panel: #15171a;
  --panel-2: #22262b;
  --text: #f1f3f5;
  --muted: #a5adb7;
  --accent: #9aa6b2;
  --accent-2: #6aa8ff;
  --accent-soft: rgba(154,166,178,.16);
  --bg-glow-1: rgba(154,166,178,.09);
  --bg-glow-2: rgba(106,168,255,.1);
  --sidebar-bg: rgba(12,13,15,.84);
  --topbar-bg: rgba(9,10,12,.66);
  --composer-bg: rgba(35,38,41,.96);
  --assistant-text: #fff;
}

html[data-theme="ocean"] {
  --bg: #070d10;
  --panel: #11191d;
  --panel-2: #1c2b31;
  --text: #edf8f8;
  --muted: #a3b8ba;
  --accent: #49c7b8;
  --accent-2: #4d8dff;
  --accent-soft: rgba(73,199,184,.16);
  --bg-glow-1: rgba(73,199,184,.1);
  --bg-glow-2: rgba(77,141,255,.1);
  --sidebar-bg: rgba(8,14,17,.84);
  --topbar-bg: rgba(7,13,16,.66);
  --composer-bg: rgba(31,44,47,.96);
  --assistant-text: #fff;
}

html[data-theme="forest"] {
  --bg: #090d09;
  --panel: #121a13;
  --panel-2: #1e2a1f;
  --text: #f0f5ec;
  --muted: #a7b4a2;
  --accent: #8fc46b;
  --accent-2: #d4a24c;
  --accent-soft: rgba(143,196,107,.16);
  --bg-glow-1: rgba(143,196,107,.1);
  --bg-glow-2: rgba(212,162,76,.09);
  --sidebar-bg: rgba(9,14,10,.84);
  --topbar-bg: rgba(9,13,9,.66);
  --composer-bg: rgba(33,42,32,.96);
  --assistant-text: #fff;
}

html[data-theme="rose"] {
  --bg: #10090d;
  --panel: #1b1217;
  --panel-2: #2a1d24;
  --text: #f8eef2;
  --muted: #b9a5ad;
  --accent: #df7da2;
  --accent-2: #6ea7ff;
  --accent-soft: rgba(223,125,162,.16);
  --bg-glow-1: rgba(223,125,162,.11);
  --bg-glow-2: rgba(110,167,255,.09);
  --sidebar-bg: rgba(16,9,13,.84);
  --topbar-bg: rgba(16,9,13,.66);
  --composer-bg: rgba(43,34,38,.96);
  --assistant-text: #fff;
}

html[data-theme="aurora"] {
  --bg: #06100f;
  --panel: #111a22;
  --panel-2: #1a2632;
  --text: #f6fffb;
  --muted: #9dbab4;
  --accent: #28dcb0;
  --accent-2: #8a6cff;
  --accent-soft: rgba(40,220,176,.2);
  --bg-glow-1: rgba(40,220,176,.22);
  --bg-glow-2: rgba(255,102,179,.14);
  --sidebar-bg: rgba(7,17,18,.84);
  --topbar-bg: rgba(6,16,15,.66);
  --composer-bg: rgba(25,40,43,.95);
  --assistant-text: #fff;
}

html[data-theme="citrus"] {
  --bg: #120f05;
  --panel: #1f1a0d;
  --panel-2: #312813;
  --text: #fff8dd;
  --muted: #c8b98d;
  --accent: #ffd84d;
  --accent-2: #ff7a1a;
  --accent-soft: rgba(255,216,77,.2);
  --bg-glow-1: rgba(255,216,77,.18);
  --bg-glow-2: rgba(30,203,123,.12);
  --sidebar-bg: rgba(18,15,5,.84);
  --topbar-bg: rgba(18,15,5,.66);
  --composer-bg: rgba(45,36,18,.95);
  --assistant-text: #fff;
}

html[data-theme="violet"] {
  --bg: #0e0718;
  --panel: #171024;
  --panel-2: #241b38;
  --text: #fbf7ff;
  --muted: #b9a7d0;
  --accent: #9d7bff;
  --accent-2: #ff7ad9;
  --accent-soft: rgba(157,123,255,.2);
  --bg-glow-1: rgba(157,123,255,.2);
  --bg-glow-2: rgba(255,122,217,.12);
  --sidebar-bg: rgba(14,7,24,.84);
  --topbar-bg: rgba(14,7,24,.66);
  --composer-bg: rgba(36,28,55,.95);
  --assistant-text: #fff;
}

html[data-mode="light"] {
  color-scheme: light;
  --bg: #f7f4ef;
  --panel: #ffffff;
  --panel-2: #ece8df;
  --line: rgba(20,24,30,.13);
  --text: #171717;
  --muted: #68645d;
  --sidebar-bg: rgba(255,255,255,.8);
  --topbar-bg: rgba(255,255,255,.72);
  --composer-bg: rgba(255,255,255,.9);
  --assistant-text: #171717;
  --shadow: 0 24px 70px rgba(50,42,35,.18);
}

html[data-mode="light"][data-theme="graphite"] {
  --bg: #f4f6f8;
  --panel-2: #e7ebef;
  --accent: #5f6c7b;
  --accent-2: #2f7bff;
  --bg-glow-1: rgba(95,108,123,.14);
  --bg-glow-2: rgba(47,123,255,.1);
}

html[data-mode="light"][data-theme="ocean"] {
  --bg: #effbfb;
  --panel-2: #dff3f3;
  --accent: #0eb6a5;
  --accent-2: #2f7bff;
  --bg-glow-1: rgba(14,182,165,.18);
  --bg-glow-2: rgba(47,123,255,.12);
}

html[data-mode="light"][data-theme="forest"] {
  --bg: #f3faef;
  --panel-2: #e3f0dd;
  --accent: #4e9c31;
  --accent-2: #c57a11;
  --bg-glow-1: rgba(78,156,49,.18);
  --bg-glow-2: rgba(197,122,17,.12);
}

html[data-mode="light"][data-theme="rose"] {
  --bg: #fff2f7;
  --panel-2: #f7e3eb;
  --accent: #cf4e84;
  --accent-2: #387dff;
  --bg-glow-1: rgba(207,78,132,.18);
  --bg-glow-2: rgba(56,125,255,.12);
}

html[data-mode="light"][data-theme="aurora"] {
  --bg: #effdf8;
  --panel-2: #daf6ee;
  --accent: #06a984;
  --accent-2: #7658ff;
  --bg-glow-1: rgba(6,169,132,.22);
  --bg-glow-2: rgba(255,102,179,.14);
}

html[data-mode="light"][data-theme="citrus"] {
  --bg: #fff9e7;
  --panel-2: #f4e7bd;
  --accent: #c68b00;
  --accent-2: #f06418;
  --bg-glow-1: rgba(255,216,77,.28);
  --bg-glow-2: rgba(30,203,123,.12);
}

html[data-mode="light"][data-theme="violet"] {
  --bg: #f8f2ff;
  --panel-2: #eadfff;
  --accent: #7254dd;
  --accent-2: #d943b2;
  --bg-glow-1: rgba(114,84,221,.2);
  --bg-glow-2: rgba(217,67,178,.12);
}

html[data-ui-size="0"] {
  --ui-base-font-size: 11.8px;
  --message-font-size: 13.2px;
  --composer-font-size: 13.2px;
  --greeting-font-size: 32px;
}

html[data-ui-size="1"] {
  --ui-base-font-size: 12.2px;
  --message-font-size: 13.6px;
  --composer-font-size: 13.6px;
  --greeting-font-size: 35px;
}

html[data-ui-size="2"] {
  --ui-base-font-size: 12.7px;
  --message-font-size: 14.1px;
  --composer-font-size: 14px;
  --greeting-font-size: 38px;
}

html[data-ui-size="3"] {
  --ui-base-font-size: 13.4px;
  --message-font-size: 14.8px;
  --composer-font-size: 14.6px;
  --greeting-font-size: 42px;
}

html[data-ui-size="4"] {
  --ui-base-font-size: 14px;
  --message-font-size: 15.4px;
  --composer-font-size: 15.1px;
  --greeting-font-size: 46px;
}

html[data-ui-size="5"] {
  --ui-base-font-size: 14.6px;
  --message-font-size: 16.1px;
  --composer-font-size: 15.8px;
  --greeting-font-size: 50px;
}

html[data-ui-size="6"] {
  --ui-base-font-size: 15.3px;
  --message-font-size: 17px;
  --composer-font-size: 16.4px;
  --greeting-font-size: 54px;
}

html[data-ui-size="7"] {
  --ui-base-font-size: 15.9px;
  --message-font-size: 17.8px;
  --composer-font-size: 17.1px;
  --greeting-font-size: 58px;
}

html[data-ui-size="8"] {
  --ui-base-font-size: 16.4px;
  --message-font-size: 18.4px;
  --composer-font-size: 17.6px;
  --greeting-font-size: 61px;
}

html[data-ui-size="9"] {
  --ui-base-font-size: 17px;
  --message-font-size: 19.2px;
  --composer-font-size: 18.2px;
  --greeting-font-size: 64px;
}

html[data-ui-size="10"] {
  --ui-base-font-size: 17.6px;
  --message-font-size: 19.9px;
  --composer-font-size: 18.8px;
  --greeting-font-size: 67px;
}

html[data-reply-size="0"] { --assistant-font-size: 13.8px; }
html[data-reply-size="1"] { --assistant-font-size: 14.6px; }
html[data-reply-size="2"] { --assistant-font-size: 15.2px; }
html[data-reply-size="3"] { --assistant-font-size: 16.4px; }
html[data-reply-size="4"] { --assistant-font-size: 19.2px; }
html[data-reply-size="5"] { --assistant-font-size: 20.6px; }
html[data-reply-size="6"] { --assistant-font-size: 22px; }
html[data-reply-size="7"] { --assistant-font-size: 23.5px; }
html[data-reply-size="8"] { --assistant-font-size: 25px; }
html[data-reply-size="9"] { --assistant-font-size: 27px; }
html[data-reply-size="10"] { --assistant-font-size: 29px; }

* { box-sizing: border-box; }
html, body {
  height: 100%;
  overflow-x: hidden;
}
body {
  margin: 0;
  background:
    linear-gradient(150deg, var(--bg-glow-1) 0%, transparent 34%),
    linear-gradient(28deg, var(--bg-glow-2) 0%, transparent 38%),
    var(--bg);
  color: var(--text);
  font-family: var(--ui-font);
  font-size: var(--ui-base-font-size);
  overflow: hidden;
  overflow-x: hidden;
}

button, textarea, select, input { font: inherit; }
button { cursor: pointer; }

.material-symbols-rounded {
  font-family: "Material Symbols Rounded";
  font-weight: normal;
  font-style: normal;
  font-size: 20px;
  line-height: 1;
  letter-spacing: 0;
  text-transform: none;
  display: inline-block;
  white-space: nowrap;
  overflow-wrap: normal;
  direction: ltr;
  font-feature-settings: "liga";
  -webkit-font-feature-settings: "liga";
  -webkit-font-smoothing: antialiased;
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  white-space: nowrap !important;
}

.app-shell {
  height: 100vh;
  display: grid;
  --sidebar-width: 268px;
  grid-template-columns: var(--sidebar-width) 1fr;
  --sidebar-current-width: var(--sidebar-width);
  --empty-composer-top: min(clamp(560px, 55vh, 640px), calc(100dvh - 214px));
  position: relative;
  transition: grid-template-columns .28s ease;
}

.app-shell[data-sidebar="closed"] {
  grid-template-columns: 58px 1fr;
  --sidebar-current-width: 58px;
}

body.is-resizing-sidebar,
body.is-resizing-sidebar * {
  cursor: col-resize !important;
  user-select: none !important;
}

body.is-resizing-sidebar .app-shell {
  transition: none;
}

.app-shell[data-sidebar="closed"] .sidebar {
  padding-left: 10px;
  padding-right: 10px;
}

.app-shell[data-sidebar="closed"] .brand span:last-child,
.app-shell[data-sidebar="closed"] .new-chat,
.app-shell[data-sidebar="closed"] .sidebar-action,
.app-shell[data-sidebar="closed"] .search-wrap,
.app-shell[data-sidebar="closed"] .session-list,
.app-shell[data-sidebar="closed"] .account-copy {
  opacity: 0;
  pointer-events: none;
  transform: translateX(-8px);
}

.app-shell[data-sidebar="closed"] .new-chat,
.app-shell[data-sidebar="closed"] .sidebar-action,
.app-shell[data-sidebar="closed"] .search-wrap,
.app-shell[data-sidebar="closed"] .session-list,
.app-shell[data-sidebar="closed"] .account-copy {
  display: none;
}

.app-shell[data-sidebar="closed"] .brand {
  justify-content: center;
}

.app-shell[data-sidebar="closed"] .brand-logo {
  display: none;
}

.app-shell[data-sidebar="closed"] .brand-mark {
  display: block;
  width: 40px;
  height: 40px;
  border-radius: 0;
}

.app-shell[data-sidebar="closed"] #collapse-sidebar {
  display: none;
}

.app-shell[data-sidebar="closed"] .rail-open {
  display: inline-grid;
}

.app-shell[data-sidebar="closed"] .sidebar-rail {
  display: flex;
}

.app-shell[data-sidebar="closed"] .sidebar-foot {
  justify-content: center;
}

.sidebar {
  min-width: 0;
  height: 100vh;
  min-height: 0;
  padding: 14px;
  border-right: 1px solid var(--line);
  background: var(--sidebar-bg);
  backdrop-filter: blur(24px);
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: transform .26s ease, width .26s ease;
}

.sidebar-resizer {
  position: absolute;
  top: 0;
  bottom: 0;
  left: calc(var(--sidebar-current-width) - 5px);
  z-index: 25;
  width: 10px;
  cursor: col-resize;
  display: flex;
  align-items: stretch;
  justify-content: center;
  touch-action: none;
}

.sidebar-resizer::after {
  content: "";
  width: 1px;
  background: transparent;
  transition: background .16s ease, box-shadow .16s ease;
}

.sidebar-resizer:hover::after,
.sidebar-resizer:focus-visible::after,
body.is-resizing-sidebar .sidebar-resizer::after {
  background: rgba(255,255,255,.28);
  box-shadow: 0 0 0 3px rgba(255,255,255,.06);
}

.app-shell[data-sidebar="closed"] .sidebar-resizer {
  display: none;
}

.sidebar-head,
.chat-topbar,
.sidebar-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0;
  min-width: 0;
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
}

.brand-name {
  display: none;
}

.brand-logo {
  width: min(158px, calc(100vw - 118px));
  height: 38px;
  display: block;
  object-fit: contain;
  object-position: left center;
  filter: drop-shadow(0 10px 24px rgba(0,0,0,.2));
}

.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 0;
  display: none;
  object-fit: cover;
  background: transparent;
  box-shadow: none;
}

.icon-button,
.new-chat,
.sidebar-action,
.session-item,
.prompt-grid button,
.account-button,
.sidebar-foot button,
.sidebar-foot a {
  border: 1px solid var(--line);
  background: rgba(255,255,255,.06);
  color: var(--text);
  border-radius: 12px;
}

.icon-button {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  transition: transform .18s ease, background .18s ease, border-color .18s ease;
}

.icon-button:hover,
.new-chat:hover,
.sidebar-action:hover,
.session-item:hover,
.prompt-grid button:hover,
.account-button:hover,
.message-actions button:hover,
.composer-tool:hover {
  transform: translateY(-1px);
  border-color: rgba(255,255,255,.18);
  background: rgba(255,255,255,.1);
}

.new-chat {
  width: 100%;
  height: 44px;
  text-align: left;
  padding: 0 14px;
  font-weight: 650;
  background: rgba(255,255,255,.08);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.new-chat .material-symbols-rounded,
.sidebar-action .material-symbols-rounded {
  font-size: 20px;
}

.rail-open {
  display: none;
  width: 38px;
  height: 38px;
  margin: -4px auto 0;
}

.sidebar-rail {
  display: none;
  flex: 1;
  min-height: 0;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding-top: 8px;
}

.rail-action {
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: var(--muted);
  background: transparent;
  transition: background .18s ease, color .18s ease, transform .18s ease;
}

.rail-action:hover,
.rail-action:focus-visible {
  color: var(--text);
  background: rgba(255,255,255,.09);
  transform: translateY(-1px);
}

.rail-action .material-symbols-rounded {
  font-size: 21px;
}

.sidebar-action {
  width: 100%;
  min-height: 40px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-align: left;
  color: var(--muted);
  background: transparent;
}

.search-wrap input {
  width: 100%;
  height: 40px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.05);
  color: var(--text);
  padding: 0 12px;
  outline: none;
}

.session-list {
  flex: 1;
  min-height: 0;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 2px 0 12px;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: color-mix(in srgb, var(--text) 28%, transparent) transparent;
}

.session-list::-webkit-scrollbar {
  width: 10px;
}

.session-list::-webkit-scrollbar-thumb {
  border: 3px solid transparent;
  border-radius: 999px;
  background: color-mix(in srgb, var(--text) 34%, transparent);
  background-clip: padding-box;
}

.session-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  gap: 4px;
  text-align: left;
  padding: 10px 118px 10px 12px;
  position: relative;
  min-height: 62px;
  overflow: hidden;
  border-color: transparent;
  background: transparent;
  transition: background .16s ease, border-color .16s ease, transform .16s ease;
}

.session-main,
.session-rename-form {
  min-width: 0;
  border: 0;
  background: transparent;
  color: inherit;
  padding: 0;
  display: grid;
  gap: 4px;
  text-align: left;
  align-content: center;
}

.session-main > span,
.session-main small span,
.session-rename-form input {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.session-main small {
  color: var(--muted);
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  gap: 2px;
  min-width: 0;
}

.session-rename-form {
  padding: 3px 0;
}

.session-rename-form input {
  width: 100%;
  min-width: 0;
  height: 34px;
  border: 1px solid color-mix(in srgb, var(--accent-2) 54%, transparent);
  border-radius: 10px;
  outline: 0;
  background: rgba(255,255,255,.08);
  color: var(--text);
  padding: 0 10px;
}

.session-time {
  color: color-mix(in srgb, var(--muted) 84%, transparent);
  font-variant-numeric: tabular-nums;
  display: block;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: clamp(10px, calc(var(--ui-base-font-size) - 3px), 12px);
  line-height: 1.22;
  text-align: right;
}

.session-actions {
  display: inline-flex;
  align-items: center;
  gap: 0;
  max-width: 82px;
  overflow: hidden;
  opacity: 0;
  transform: translateY(-1px);
  pointer-events: none;
  transition: opacity .18s ease, transform .18s ease;
}

.session-tail {
  position: absolute;
  top: 8px;
  right: 12px;
  bottom: 8px;
  display: grid;
  justify-items: end;
  align-content: center;
  gap: 2px;
  width: 96px;
  max-width: calc(100% - 26px);
  overflow: hidden;
}

.session-tail-top {
  min-height: 30px;
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 3px;
  overflow: hidden;
}

.session-status {
  flex: 0 0 auto;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  opacity: .86;
}

.session-status.is-idle {
  opacity: 0;
}

.session-status.is-done {
  width: 9px;
  height: 9px;
  background: var(--green);
  box-shadow: 0 0 0 3px rgba(61,220,151,.12), 0 0 14px rgba(61,220,151,.52);
}

.session-status.is-pending {
  border: 2px solid rgba(255,255,255,.22);
  border-top-color: var(--accent);
  animation: spin .9s linear infinite;
}

.session-action {
  width: 26px;
  height: 26px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  display: inline-grid;
  place-items: center;
  transition: opacity .18s ease, background .18s ease, color .18s ease;
}

.session-item:hover .session-actions,
.session-item.is-active .session-actions,
.session-action:focus-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.session-item:hover .session-time,
.session-item.is-active .session-time {
  opacity: 0;
}

.session-list .session-item:hover {
  transform: none;
}

.session-action:hover {
  background: rgba(255,255,255,.1);
  color: var(--text);
}

.session-action .material-symbols-rounded {
  font-size: 16px;
}

.session-pin-dot {
  margin-right: 4px;
  font-size: 15px;
  vertical-align: -2px;
  color: var(--accent);
}

.session-item.is-pinned {
  border-color: rgba(255,255,255,.14);
}

.session-item.is-active {
  background: color-mix(in srgb, var(--accent) 18%, transparent);
  border-color: color-mix(in srgb, var(--accent) 34%, transparent);
}

.session-item.is-unread .session-main span {
  color: var(--text);
  font-weight: 760;
}

.sidebar-foot {
  border-top: 1px solid var(--line);
  padding-top: 12px;
  position: relative;
  z-index: 70;
  flex: 0 0 auto;
  background: linear-gradient(180deg, transparent, var(--sidebar-bg) 18%);
}

.sidebar-foot a,
.sidebar-foot button {
  min-height: 36px;
  padding: 0 10px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}

.account-button {
  width: 100%;
  min-height: 50px !important;
  padding: 8px !important;
  display: flex !important;
  align-items: center;
  gap: 10px;
  text-align: left;
  background: transparent;
}

.account-avatar {
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #eadbd0;
  color: #16110f;
  font-weight: 800;
}

.account-copy,
.account-menu-head span {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.account-copy strong,
.account-copy small,
.account-menu-head strong,
.account-menu-head small {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.account-copy small,
.account-menu-head small {
  color: var(--muted);
  font-size: 12px;
}

.account-menu[hidden] {
  display: none !important;
}

.account-menu [hidden],
#admin-link[hidden] {
  display: none !important;
}

.account-menu {
  position: fixed;
  left: 18px;
  bottom: 82px;
  width: min(360px, calc(100vw - 36px));
  max-height: min(860px, calc(100dvh - 118px));
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(31,31,34,.98);
  box-shadow: var(--shadow);
  padding: 12px;
  z-index: 160;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
  scrollbar-color: color-mix(in srgb, var(--text) 28%, transparent) transparent;
}

.account-menu::-webkit-scrollbar {
  width: 10px;
}

.account-menu::-webkit-scrollbar-thumb {
  border: 3px solid transparent;
  border-radius: 999px;
  background: color-mix(in srgb, var(--text) 32%, transparent);
  background-clip: padding-box;
}

.account-menu-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.account-menu label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
  min-width: 0;
}

.account-menu select {
  width: 100%;
  min-width: 0;
  height: 38px;
  border-radius: 11px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.07);
  color: var(--text);
  padding: 0 10px;
}

.text-scale-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(38px, auto);
  align-items: center;
  gap: 10px;
}

.text-scale-row output {
  min-width: 38px;
  color: var(--text);
  font-size: 12px;
  text-align: right;
}

.text-scale-row input[type="range"] {
  width: 100%;
  accent-color: var(--accent-2);
}

.text-scale-ticks {
  display: flex;
  justify-content: space-between;
  color: rgba(255,255,255,.36);
  font-size: 10px;
  line-height: 1;
  padding: 0 4px;
}

.appearance-panel {
  display: grid;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background:
    linear-gradient(135deg, var(--accent-soft), transparent 60%),
    rgba(255,255,255,.045);
}

.appearance-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}

.appearance-head > .material-symbols-rounded {
  flex: 0 0 auto;
  color: var(--accent);
  font-size: 24px;
}

.appearance-head > span:not(.material-symbols-rounded) {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.appearance-head strong {
  color: var(--text);
  font-size: 14px;
}

.appearance-head small {
  color: var(--muted);
  font-size: 12px;
}

.color-mode-button {
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 14px;
  display: inline-grid;
  place-items: center;
  color: var(--text);
  background:
    radial-gradient(circle at 36% 32%, color-mix(in srgb, var(--accent) 52%, transparent), transparent 42%),
    rgba(255,255,255,.07);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08);
  transition: transform .18s ease, background .18s ease, border-color .18s ease, color .18s ease;
}

.color-mode-button:hover,
.color-mode-button:focus-visible {
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--accent) 48%, rgba(255,255,255,.2));
  background:
    radial-gradient(circle at 42% 32%, color-mix(in srgb, var(--accent) 68%, transparent), transparent 46%),
    rgba(255,255,255,.1);
  outline: none;
}

.color-mode-button:active {
  transform: translateY(0) scale(.96);
}

.color-mode-button .material-symbols-rounded {
  font-size: 24px;
  transition: transform .22s ease;
}

.color-mode-button:hover .material-symbols-rounded {
  transform: rotate(-12deg) scale(1.05);
}

.color-mode-button[data-current-mode="dark"] {
  color: #ffd76c;
}

.color-mode-button[data-current-mode="light"] {
  color: #566cff;
}

.theme-swatches {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.theme-swatch {
  position: relative;
  aspect-ratio: 1.28;
  min-height: 42px;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 14px;
  background:
    linear-gradient(135deg, var(--swatch-a) 0%, var(--swatch-b) 52%, var(--swatch-c) 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.28), 0 12px 26px rgba(0,0,0,.18);
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}

.theme-swatch:hover,
.theme-swatch:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(255,255,255,.38);
}

.theme-swatch.is-active {
  border-color: rgba(255,255,255,.74);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.36), 0 0 0 2px var(--accent), 0 14px 30px rgba(0,0,0,.22);
}

.theme-swatch.is-active::after {
  content: "check";
  font-family: "Material Symbols Rounded";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 28px;
  text-shadow: 0 2px 8px rgba(0,0,0,.42);
}

.theme-swatch-custom {
  color: #fff;
}

.theme-swatch-custom .material-symbols-rounded {
  position: relative;
  z-index: 1;
  font-size: 18px;
  filter: drop-shadow(0 1px 5px rgba(0,0,0,.45));
}

.custom-theme-panel {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.custom-theme-panel[hidden] {
  display: none !important;
}

.custom-theme-panel label {
  gap: 6px !important;
}

.custom-theme-panel label span {
  font-size: 12px;
  color: var(--muted);
}

.custom-theme-panel input[type="color"] {
  width: 100%;
  height: 36px;
  padding: 2px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(255,255,255,.06);
}

.account-menu a,
.account-menu button {
  width: 100%;
  min-height: 38px;
  justify-content: center;
}

.account-menu .theme-swatch {
  display: block;
  padding: 0;
  background:
    linear-gradient(135deg, var(--swatch-a) 0%, var(--swatch-b) 52%, var(--swatch-c) 100%) !important;
  border-color: rgba(80,80,80,.18);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.5), inset 0 0 0 1px rgba(0,0,0,.08), 0 12px 24px rgba(0,0,0,.14);
}

.chat-main {
  min-width: 0;
  height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  overflow-x: hidden;
}

.chat-topbar {
  height: 66px;
  padding: 0 24px;
  border-bottom: 1px solid var(--line);
  background: var(--topbar-bg);
  backdrop-filter: blur(22px);
}

.chat-title {
  min-width: 0;
  max-width: min(48vw, 660px);
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: clamp(14px, calc(var(--ui-base-font-size) * .98), 21px);
  font-weight: 650;
  line-height: 1.25;
}

.chat-title.is-renaming {
  max-width: min(56vw, 760px);
  min-width: min(340px, 48vw);
  min-height: calc(var(--ui-base-font-size) + 18px);
  padding: 6px 10px;
  border: 1px solid color-mix(in srgb, var(--accent-2) 54%, transparent);
  border-radius: 10px;
  outline: 0;
  background: rgba(255,255,255,.08);
  white-space: nowrap;
}

.title-wrap {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.title-rename {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  opacity: .66;
}

.title-rename .material-symbols-rounded {
  font-size: 17px;
}

.title-wrap:hover .title-rename,
.title-rename:focus-visible {
  opacity: 1;
}

.mobile-title {
  display: none;
  font-size: 16px;
  line-height: 1;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.model-picker {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex-wrap: wrap;
}

.model-picker label {
  color: var(--muted);
  font-size: 13px;
}

.model-picker select {
  max-width: min(54vw, 360px);
  height: 38px;
  border-radius: 11px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.08);
  color: var(--text);
  padding: 0 12px;
  outline: none;
}

.model-status {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.quota-pill {
  margin-left: auto;
  border: 1px solid rgba(61,220,151,.25);
  color: #b8ffd9;
  background: rgba(61,220,151,.1);
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 750;
  white-space: nowrap;
}

.messages {
  overflow: auto;
  overflow-x: hidden;
  padding:
    34px
    max(22px, calc((100vw - var(--sidebar-current-width) - var(--composer-content-max)) / 2))
    var(--composer-reserved);
  scroll-behavior: smooth;
  overscroll-behavior-x: none;
}

.messages.has-chat {
  padding-top: 24px;
  padding-bottom: var(--composer-reserved);
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 calc(100% - 292px), rgba(0,0,0,.48) calc(100% - 224px), transparent calc(100% - 150px), transparent 100%);
  mask-image: linear-gradient(to bottom, #000 0%, #000 calc(100% - 292px), rgba(0,0,0,.48) calc(100% - 224px), transparent calc(100% - 150px), transparent 100%);
}

.message-minimap[hidden] {
  display: none !important;
}

.message-minimap {
  position: fixed;
  z-index: 28;
  left: calc(var(--sidebar-current-width) + 26px);
  top: 104px;
  bottom: calc(var(--composer-reserved) + 42px);
  width: 24px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  padding: 12px 0;
  pointer-events: auto;
  transition: left .28s ease, opacity .18s ease;
}

.minimap-mark {
  position: relative;
  width: var(--mark-width, 12px);
  height: 2px;
  min-height: 2px;
  margin-left: 4px;
  border: 0;
  border-radius: 999px;
  background: color-mix(in srgb, var(--text) 30%, transparent);
  transform-origin: left center;
  transition: width .16s ease, transform .16s ease, background .16s ease, opacity .16s ease;
  opacity: .42;
  padding: 0;
}

.minimap-mark.is-pending {
  animation: minimapPulse 1.1s ease-in-out infinite;
}

.minimap-mark.is-current {
  width: calc(var(--mark-width, 12px) + 7px);
  background: color-mix(in srgb, var(--text) 78%, transparent);
  opacity: .96;
}

.minimap-mark:hover,
.minimap-mark:focus-visible,
.message-minimap.is-dragging .minimap-mark.is-current {
  width: calc(var(--mark-width, 12px) + 12px);
  transform: scaleY(1.55) translateX(2px);
  opacity: 1;
  outline: none;
}

.minimap-mark:hover::after,
.minimap-mark:focus-visible::after {
  content: attr(data-preview);
  position: absolute;
  left: calc(100% + 12px);
  top: 50%;
  width: min(280px, 42vw);
  transform: translateY(-50%);
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--text);
  background: color-mix(in srgb, var(--panel) 88%, transparent);
  box-shadow: var(--shadow);
  font-family: var(--ui-font);
  font-size: 12px;
  line-height: 1.35;
  white-space: normal;
  pointer-events: none;
}

.messages:not(.has-chat) {
  overflow: hidden;
}

.empty-state[hidden] {
  display: none !important;
}

.empty-state {
  height: var(--empty-composer-top);
  min-height: 360px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(14px, 2vh, 22px);
  max-width: 760px;
  margin: 0 auto;
  padding: clamp(54px, 7vh, 96px) 0 clamp(34px, 5vh, 74px);
  transition: opacity .24s ease, transform .24s ease;
}

.empty-logo {
  width: clamp(54px, 5.6vw, 76px);
  height: clamp(54px, 5.6vw, 76px);
  object-fit: contain;
  filter: drop-shadow(0 14px 24px rgba(0,0,0,.28));
  user-select: none;
  opacity: 1;
  transform: translateY(0) scale(1);
  transform-origin: 50% 70%;
}

.typing-dots i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  display: block;
  box-shadow: 0 0 20px var(--accent-soft);
}

.eyebrow {
  margin: 0;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0;
  font-size: 13px;
  font-weight: 700;
}

.empty-state h1 {
  width: 100%;
  max-width: 760px;
  margin: 0;
  font-size: clamp(34px, var(--greeting-font-size), 66px);
  line-height: 1.05;
  letter-spacing: 0;
  font-family: var(--read-font);
  font-weight: 620;
  color: #fff;
  text-align: center;
  text-wrap: balance;
  white-space: pre-line;
  overflow-wrap: anywhere;
  text-shadow: 0 2px 28px rgba(0,0,0,.42);
  min-height: calc(var(--greeting-font-size) * 2.18);
}

.empty-state.is-appearing .empty-logo,
.empty-state.is-typing .empty-logo {
  animation: emptyLogoReveal .64s cubic-bezier(.18,.82,.22,1) both;
}

.empty-state.is-typing h1,
.empty-state.is-ready h1 {
  animation: greetingTextSettle .4s ease both;
}

.empty-state h1::after {
  content: "";
  display: inline-block;
  width: max(2px, .055em);
  height: .82em;
  margin-left: .09em;
  border-radius: 999px;
  vertical-align: -.08em;
  background: currentColor;
  box-shadow: 0 0 18px color-mix(in srgb, var(--accent) 58%, transparent);
  animation: greetingCaret 1s steps(2, start) infinite;
}

html[data-mode="light"] .empty-state h1 {
  color: rgba(17,24,39,.72);
  text-shadow: 0 2px 18px rgba(255,255,255,.9), 0 20px 54px rgba(67,93,58,.2);
}

.prompt-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  max-width: 720px;
}

.prompt-grid button {
  min-height: 64px;
  text-align: left;
  padding: 14px;
  background: rgba(255,255,255,.05);
  display: flex;
  align-items: center;
  gap: 12px;
  line-height: 1.2;
}

.prompt-grid .material-symbols-rounded {
  color: var(--muted);
  font-size: 22px;
}

.message {
  display: grid;
  gap: 8px;
  margin: 0 auto 22px;
  width: min(var(--composer-content-max), 100%);
  max-width: 100%;
  min-width: 0;
}

.message.user {
  justify-items: end;
}

.message-meta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-family: var(--ui-font);
  font-size: 12px;
}

.message.user .message-meta {
  opacity: 0;
  transform: translateY(-2px);
  pointer-events: none;
  transition: opacity .16s ease, transform .16s ease;
}

.message.user:hover .message-meta,
.message.user:focus-within .message-meta {
  opacity: .92;
  transform: translateY(0);
  pointer-events: auto;
}

.message-body {
  max-width: 100%;
  min-width: 0;
  white-space: pre-wrap;
  line-height: 1.68;
  font-size: var(--message-font-size);
  overflow-wrap: anywhere;
  word-break: break-word;
}

.message.user .message-body {
  max-width: min(760px, 90%);
  background: #163f8f;
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 20px;
  padding: 12px 16px;
  line-height: 1.5;
}

.message-edit {
  width: min(760px, 90%);
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255,255,255,.07);
}

.message-edit textarea {
  width: 100%;
  min-height: 80px;
  resize: vertical;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 12px;
  outline: 0;
  background: rgba(0,0,0,.16);
  color: var(--text);
  padding: 10px 12px;
  line-height: 1.5;
}

.message-edit-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.message-edit-actions button {
  width: auto;
  min-width: 74px;
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255,255,255,.08);
  color: var(--text);
  font-weight: 650;
}

.message-edit-actions button[type="submit"] {
  border-color: color-mix(in srgb, var(--accent-2) 42%, transparent);
  background: color-mix(in srgb, var(--accent-2) 26%, transparent);
}

.message.assistant .message-body {
  max-width: 100%;
  font-family: var(--read-font);
  font-size: var(--assistant-font-size);
  color: var(--assistant-text);
  background: transparent;
  border-left: 0;
  padding: 2px 0;
}

.message-body strong {
  font-weight: 800;
  color: var(--assistant-text);
}

.message-body em {
  font-style: italic;
}

.message-body code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .92em;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 6px;
  padding: 1px 5px;
}

.message-code-block {
  margin: 12px 0 6px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 14px;
  background: #090b10;
  box-shadow: 0 18px 44px rgba(0,0,0,.24);
}

.message-code-block figcaption {
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 10px 0 16px;
  border-bottom: 1px solid rgba(255,255,255,.1);
  background: rgba(255,255,255,.055);
  color: rgba(255,255,255,.82);
  font-family: var(--ui-font);
  font-size: 14.5px;
  font-weight: 750;
  text-transform: lowercase;
}

.message-code-block pre {
  margin: 0;
  padding: 0;
  overflow: auto;
  max-height: min(62vh, 720px);
  display: grid;
  grid-template-columns: auto minmax(0, max-content);
  color: #f8fafc;
  background:
    linear-gradient(90deg, rgba(255,255,255,.04) 0 1px, transparent 1px) 0 0 / 44px 100%,
    #07090d;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font-size: calc(var(--assistant-font-size) * .9);
  line-height: 1.62;
  white-space: pre;
  tab-size: 2;
}

.code-line-gutter {
  position: sticky;
  left: 0;
  z-index: 1;
  display: grid;
  align-content: start;
  gap: 0;
  padding: 16px 12px 16px 14px;
  border-right: 1px solid rgba(255,255,255,.08);
  background: rgba(7,9,13,.94);
  color: rgba(148,163,184,.58);
  font: inherit;
  line-height: inherit;
  text-align: right;
  user-select: none;
}

.code-line-gutter span {
  min-width: 2.4ch;
}

.message-code-block code {
  display: block;
  min-width: max-content;
  padding: 16px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: inherit;
  font: inherit;
}

.message-code-block .hljs {
  background: transparent;
  color: inherit;
}

html[data-mode="light"] .icon-button,
html[data-mode="light"] .new-chat,
html[data-mode="light"] .sidebar-action,
html[data-mode="light"] .session-item,
html[data-mode="light"] .prompt-grid button,
html[data-mode="light"] .account-button,
html[data-mode="light"] .sidebar-foot button,
html[data-mode="light"] .sidebar-foot a {
  background: rgba(20,24,30,.045);
}

html[data-mode="light"] .icon-button:hover,
html[data-mode="light"] .new-chat:hover,
html[data-mode="light"] .sidebar-action:hover,
html[data-mode="light"] .session-item:hover,
html[data-mode="light"] .prompt-grid button:hover,
html[data-mode="light"] .account-button:hover,
html[data-mode="light"] .message-actions button:hover,
html[data-mode="light"] .composer-tool:hover {
  background: rgba(20,24,30,.075);
}

html[data-mode="light"] .account-menu,
html[data-mode="light"] .settings-card {
  background: rgba(255,255,255,.96);
}

html[data-mode="light"] .account-menu select,
html[data-mode="light"] .project-form input,
html[data-mode="light"] .search-wrap input {
  background: rgba(20,24,30,.045);
}

html[data-mode="light"] .text-scale-ticks {
  color: rgba(20,24,30,.38);
}

html[data-mode="light"] .composer textarea::placeholder {
  color: rgba(20,24,30,.56);
}

html[data-mode="light"] .composer textarea,
html[data-mode="light"] .message-edit textarea,
html[data-mode="light"] .session-rename-form input,
html[data-mode="light"] .chat-title.is-renaming {
  color: #111827;
}

html[data-mode="light"] .message.user .message-body {
  color: #fff;
  background: #174ea6;
}

html[data-mode="light"] .composer-tool {
  background: rgba(20,24,30,.055) !important;
}

html[data-mode="light"] .appearance-panel {
  background: rgba(20,24,30,.045);
}

html[data-mode="light"] .color-mode-button {
  background:
    radial-gradient(circle at 36% 32%, color-mix(in srgb, var(--accent) 40%, transparent), transparent 42%),
    rgba(255,255,255,.76);
  box-shadow: 0 8px 20px rgba(15,23,42,.08), inset 0 1px 0 rgba(255,255,255,.76);
}

html[data-mode="light"] .quota-pill {
  color: #047857;
  border-color: rgba(4,120,87,.28);
  background: rgba(16,185,129,.18);
}

.code-copy-button {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  border: 0;
  display: inline-grid;
  place-items: center;
  background: rgba(255,255,255,.07);
  color: var(--text);
  transition: background .16s ease, transform .16s ease;
}

.code-copy-button:hover {
  background: rgba(255,255,255,.14);
  transform: translateY(-1px);
}

.code-copy-button .material-symbols-rounded {
  font-size: 17px;
}

.message-body h1,
.message-body h2,
.message-body h3,
.message-body h4,
.message-body h5,
.message-body h6 {
  margin: .95em 0 .42em;
  font-family: var(--read-font);
  line-height: 1.18;
  font-weight: 780;
  color: var(--text);
  white-space: normal;
}

.message-body h1:first-child,
.message-body h2:first-child,
.message-body h3:first-child,
.message-body h4:first-child,
.message-body h5:first-child,
.message-body h6:first-child {
  margin-top: .15em;
}

.message-body h1 { font-size: 1.66em; }
.message-body h2 { font-size: 1.46em; }
.message-body h3 { font-size: 1.28em; }
.message-body h4 { font-size: 1.14em; }
.message-body h5 { font-size: 1.04em; }
.message-body h6 {
  font-size: .98em;
  color: color-mix(in srgb, var(--text) 78%, var(--muted));
}

.message-body hr {
  border: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--line), transparent);
  margin: 1.25em 0;
}

.message.assistant .message-body.is-thinking {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-family: var(--ui-font);
}

.assistant-timing {
  justify-self: start;
  margin: 0 0 -2px;
  color: var(--muted);
  font-family: var(--ui-font);
  font-size: 13px;
}

.thinking-mark {
  position: relative;
  width: 40px;
  height: 40px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  perspective: 260px;
}

.thinking-mark::before {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: 50%;
  background:
    conic-gradient(from 0deg, transparent 0 8%, var(--accent) 20%, var(--accent-2) 48%, transparent 70% 100%);
  filter: blur(.4px);
  animation: spin 1.25s linear infinite;
}

.thinking-mark::after {
  content: "";
  position: absolute;
  inset: 7px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 38% 28%, color-mix(in srgb, var(--accent) 28%, transparent), transparent 44%),
    var(--panel);
  box-shadow: inset 0 0 18px rgba(255,255,255,.05);
}

.thinking-flow {
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 20% 50%, color-mix(in srgb, var(--accent) 80%, transparent) 0 4px, transparent 5px),
    radial-gradient(circle at 76% 54%, color-mix(in srgb, var(--accent-2) 84%, transparent) 0 5px, transparent 6px);
  opacity: .9;
  transform-style: preserve-3d;
  animation: thinkingFlow 1.7s cubic-bezier(.45,0,.2,1) infinite;
}

.thinking-flow::before,
.thinking-flow::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 48px;
  height: 12px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, var(--accent), var(--accent-2), transparent);
  box-shadow: 0 0 18px color-mix(in srgb, var(--accent) 42%, transparent);
  transform-origin: center;
  opacity: .78;
}

.thinking-flow::before {
  transform: translate(-50%, -50%) rotateX(62deg) rotateZ(18deg);
  animation: thinkingRibbonA 1.65s ease-in-out infinite;
}

.thinking-flow::after {
  transform: translate(-50%, -50%) rotateX(-58deg) rotateZ(146deg);
  animation: thinkingRibbonB 1.95s ease-in-out infinite;
}

.thinking-mark img {
  position: relative;
  z-index: 1;
  width: 25px;
  height: 25px;
  object-fit: contain;
  animation: thinkingLogo 1.55s ease-in-out infinite;
  filter: drop-shadow(0 6px 12px color-mix(in srgb, var(--accent) 34%, transparent));
}

.thinking-label {
  animation: thinkingTextPulse 1.55s ease-in-out infinite;
}

.typing-dots {
  display: inline-grid;
  grid-template-columns: repeat(3, 7px);
  gap: 6px;
  align-items: center;
}

.typing-dots i {
  width: 7px;
  height: 7px;
  animation: typingDot 1.05s ease-in-out infinite;
}

.typing-dots i:nth-child(2) {
  animation-delay: .13s;
}

.typing-dots i:nth-child(3) {
  animation-delay: .26s;
}

.message-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 2px 0 0 18px;
  opacity: .68;
  transition: opacity .18s ease;
}

.message.assistant:hover .message-actions {
  opacity: .96;
}

.message.user .message-actions {
  margin-left: 0;
  opacity: 1;
}

.message-actions button {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border-radius: 10px;
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 0;
  transition: background .16s ease, color .16s ease, transform .16s ease, box-shadow .16s ease;
}

.message-actions button:hover,
.message-actions button:focus-visible {
  color: var(--text);
  background: color-mix(in srgb, var(--accent) 18%, transparent);
  transform: translateY(-2px) scale(1.04);
  outline: none;
  box-shadow: 0 10px 24px color-mix(in srgb, var(--accent) 14%, transparent);
}

html[data-mode="light"] .message-actions button:hover,
html[data-mode="light"] .message-actions button:focus-visible {
  color: #0f172a;
  background: rgba(15,23,42,.1);
  box-shadow: 0 8px 22px rgba(15,23,42,.1);
}

.message-actions .material-symbols-rounded {
  font-size: 21px;
}

.message-actions button[data-state="done"] {
  color: var(--green);
}

.composer {
  position: fixed;
  z-index: 35;
  left: calc(var(--sidebar-current-width) + max(22px, (100vw - var(--sidebar-current-width) - var(--composer-content-max)) / 2));
  right: max(22px, calc((100vw - var(--sidebar-current-width) - var(--composer-content-max)) / 2));
  bottom: 16px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 9px;
  align-items: stretch;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--composer-bg);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  transition: left .28s ease, right .28s ease, bottom .28s ease, top .28s ease, transform .28s ease, background .18s ease, box-shadow .18s ease;
}

.composer.is-drag-over {
  border-color: color-mix(in srgb, var(--accent-2) 62%, var(--accent));
  box-shadow: var(--shadow), 0 0 0 4px color-mix(in srgb, var(--accent-2) 22%, transparent);
}

.composer.is-drag-over::after {
  content: attr(data-drop-label);
  position: absolute;
  inset: 10px;
  border: 1px dashed color-mix(in srgb, var(--accent-2) 62%, transparent);
  border-radius: 18px;
  display: grid;
  place-items: center;
  pointer-events: none;
  color: var(--text);
  font-weight: 700;
  background: color-mix(in srgb, var(--composer-bg) 78%, var(--accent-soft));
  backdrop-filter: blur(8px);
  z-index: 2;
}

.attachment-list[hidden] {
  display: none !important;
}

.attachment-list {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-height: 128px;
  overflow: auto;
  padding: 0 2px 2px;
}

.attachment-chip {
  min-width: 0;
  max-width: min(100%, 340px);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255,255,255,.055);
  color: var(--text);
  padding: 7px 9px;
  font-size: 13px;
}

.attachment-chip.has-preview {
  position: relative;
  width: 92px;
  height: 92px;
  max-width: none;
  display: block;
  padding: 4px;
  overflow: hidden;
  border-radius: 16px;
}

.attachment-thumb {
  width: 100%;
  height: 100%;
  display: block;
  border-radius: 12px;
  object-fit: cover;
  background: rgba(255,255,255,.06);
}

.attachment-chip.has-preview .attachment-name {
  position: absolute;
  left: 5px;
  right: 5px;
  bottom: 5px;
  padding: 8px 5px 4px;
  background: linear-gradient(180deg, transparent, rgba(0,0,0,.68));
  color: #fff;
  font-size: 10px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.attachment-chip.has-preview .attachment-remove {
  position: absolute;
  top: 4px;
  right: 4px;
  background: rgba(0,0,0,.62) !important;
  color: #fff !important;
}

.attachment-chip.is-uploading {
  color: var(--muted);
}

.attachment-chip.is-error {
  border-color: rgba(255,80,80,.38);
  color: #ffb4b4;
}

.attachment-chip span:not(.material-symbols-rounded) {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.attachment-chip small {
  color: var(--muted);
  white-space: nowrap;
}

.attachment-remove {
  width: 24px !important;
  height: 24px !important;
  background: transparent !important;
  color: var(--muted) !important;
  border-radius: 8px !important;
  font-size: 0 !important;
}

.attachment-remove .material-symbols-rounded {
  font-size: 18px;
}

.app-shell[data-empty="true"] .composer {
  top: var(--empty-composer-top);
  bottom: auto;
  transform: translateY(0);
}

.app-shell[data-empty="true"] .composer::before {
  content: "";
  position: absolute;
  left: 8%;
  right: 8%;
  bottom: -34px;
  height: 86px;
  z-index: -1;
  border-radius: 999px;
  background:
    radial-gradient(ellipse at 32% 50%, color-mix(in srgb, var(--accent) 42%, transparent), transparent 58%),
    radial-gradient(ellipse at 68% 50%, color-mix(in srgb, var(--accent-2) 38%, transparent), transparent 60%);
  filter: blur(22px);
  opacity: .82;
  pointer-events: none;
  animation: composerGlow 4.8s ease-in-out infinite;
}

.composer textarea {
  width: 100%;
  min-height: 52px;
  max-height: 198px;
  resize: none;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
  padding: 5px 9px;
  line-height: 1.42;
  font-size: var(--composer-font-size);
  overflow: auto;
}

.composer textarea::placeholder {
  color: rgba(255,255,255,.72);
}

.composer-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.composer-left,
.composer-right {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.composer button {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  color: white;
  background: var(--accent-2);
  font-size: 0;
}

.composer-tool {
  width: 32px !important;
  height: 32px !important;
  align-self: center;
  border: 1px solid var(--line) !important;
  background: rgba(255,255,255,.055) !important;
  color: var(--muted) !important;
  font-size: 0 !important;
}

.composer-select {
  min-width: 0;
  display: inline-flex;
}

.composer-select[hidden] {
  display: none !important;
}

.composer-select select {
  height: max(32px, calc(var(--ui-base-font-size) + 16px));
  width: var(--select-width, auto);
  min-width: 0;
  max-width: min(42vw, 560px);
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: var(--text);
  padding: 0 28px 0 9px;
  outline: none;
  line-height: 1.15;
}

.model-picker select {
  min-width: 0;
  max-width: min(44vw, 560px);
}

#send-button.is-stopping {
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.2);
  color: var(--text);
}

#send-button.is-stopping .material-symbols-rounded {
  font-size: 18px;
}

.effort-picker select {
  max-width: 176px;
  min-width: 0;
  color: var(--muted);
}

.composer button .material-symbols-rounded,
.composer-tool .material-symbols-rounded {
  font-size: 18px;
}

.settings-drawer[hidden] {
  display: none !important;
}

.settings-drawer {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(0,0,0,.46);
  display: grid;
  place-items: center;
  padding: 20px;
}

.settings-card {
  position: relative;
  width: min(440px, 100%);
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(20,20,23,.96);
  box-shadow: var(--shadow);
  padding: 24px;
  display: grid;
  gap: 18px;
}

.settings-card h2 {
  margin: 0;
  font-size: 22px;
}

.settings-card label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.settings-card select {
  height: 42px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.07);
  color: var(--text);
  padding: 0 12px;
}

.settings-close {
  position: absolute;
  top: 14px;
  right: 14px;
}

.project-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

.project-form input {
  min-width: 0;
  height: 42px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.07);
  color: var(--text);
  padding: 0 12px;
  outline: none;
}

.project-form button,
.project-row button {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255,255,255,.07);
  color: var(--text);
}

.project-list {
  display: grid;
  gap: 8px;
  max-height: 320px;
  overflow: auto;
}

.project-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 8px;
}

.project-main {
  text-align: left;
  display: grid;
  gap: 3px;
  padding: 10px 12px;
  min-width: 0;
}

.project-row.is-active .project-main {
  border-color: rgba(217,119,69,.42);
  background: rgba(217,119,69,.12);
}

.project-list small {
  color: var(--muted);
}

.project-actions {
  display: inline-flex;
  gap: 5px;
}

.project-actions button {
  width: 38px;
  padding: 0;
  display: inline-grid;
  place-items: center;
}

.project-actions .material-symbols-rounded {
  font-size: 19px;
}

.drawer-note {
  margin: -6px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.archive-card {
  width: min(620px, 100%);
}

.archive-list {
  display: grid;
  gap: 8px;
  max-height: min(58vh, 520px);
  overflow: auto;
}

.archive-empty {
  margin: 0;
  min-height: 92px;
  display: grid;
  place-items: center;
  color: var(--muted);
  border: 1px dashed rgba(255,255,255,.14);
  border-radius: 12px;
}

.archive-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255,255,255,.055);
}

.archive-item strong,
.archive-item small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.archive-item small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.archive-actions {
  display: inline-flex;
  gap: 6px;
}

.archive-actions button {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255,255,255,.07);
  color: var(--text);
  padding: 0 10px;
}

.archive-actions button.danger {
  border-color: rgba(255,86,86,.28);
  color: #ffb6b6;
}

.mobile-only { display: none; }

@keyframes pulse {
  0%, 100% { transform: scale(.7); opacity: .45; }
  50% { transform: scale(1); opacity: 1; }
}

@keyframes greetingWave {
  0%, 100% { transform: translateY(0) scale(.86); opacity: .45; }
  35% { transform: translateY(-6px) scale(1); opacity: 1; }
  70% { transform: translateY(3px) scale(.9); opacity: .68; }
}

@keyframes typingDot {
  0%, 100% { transform: translateY(0); opacity: .35; }
  38% { transform: translateY(-4px); opacity: 1; }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes thinkingLogo {
  0%, 100% { transform: scale(.9) rotateX(10deg) rotateZ(-5deg); opacity: .78; }
  42% { transform: scale(1.08) rotateX(-8deg) rotateZ(6deg) translateY(-1px); opacity: 1; }
}

@keyframes thinkingTextPulse {
  0%, 100% { opacity: .62; }
  45% { opacity: 1; }
}

@keyframes thinkingFlow {
  0% { transform: rotateZ(0deg) rotateY(0deg) translateX(-2px); opacity: .54; }
  46% { transform: rotateZ(168deg) rotateY(24deg) translateX(3px); opacity: 1; }
  100% { transform: rotateZ(360deg) rotateY(0deg) translateX(-2px); opacity: .54; }
}

@keyframes thinkingRibbonA {
  0%, 100% { transform: translate(-50%, -50%) rotateX(62deg) rotateZ(18deg) scaleX(.72); opacity: .44; }
  48% { transform: translate(-50%, -50%) rotateX(72deg) rotateZ(198deg) scaleX(1.08); opacity: .94; }
}

@keyframes thinkingRibbonB {
  0%, 100% { transform: translate(-50%, -50%) rotateX(-58deg) rotateZ(146deg) scaleX(.78); opacity: .4; }
  54% { transform: translate(-50%, -50%) rotateX(-70deg) rotateZ(326deg) scaleX(1.14); opacity: .9; }
}

@keyframes minimapPulse {
  0%, 100% { opacity: .42; transform: scaleX(.86); }
  50% { opacity: 1; transform: scaleX(1.24); }
}

@keyframes composerGlow {
  0%, 100% { transform: scaleX(.92); opacity: .56; }
  50% { transform: scaleX(1.08); opacity: .9; }
}

@keyframes emptyLogoReveal {
  0% { opacity: 0; transform: translateY(12px) scale(.82) rotate(-8deg); filter: drop-shadow(0 0 0 rgba(0,0,0,0)); }
  58% { opacity: 1; transform: translateY(-4px) scale(1.06) rotate(3deg); }
  100% { opacity: 1; transform: translateY(0) scale(1) rotate(0deg); filter: drop-shadow(0 14px 24px rgba(0,0,0,.28)); }
}

@keyframes greetingTextSettle {
  0% { opacity: .78; transform: translateY(5px); }
  100% { opacity: 1; transform: translateY(0); }
}

@keyframes greetingCaret {
  0%, 42% { opacity: 1; }
  43%, 100% { opacity: .14; }
}

@media (max-width: 760px) {
  html {
    --greeting-font-size: 32px;
  }

  html[data-ui-size="0"] { --greeting-font-size: 28px; }
  html[data-ui-size="1"] { --greeting-font-size: 29px; }
  html[data-ui-size="2"] { --greeting-font-size: 30px; }
  html[data-ui-size="3"] { --greeting-font-size: 32px; }
  html[data-ui-size="4"] { --greeting-font-size: 34px; }
  html[data-ui-size="5"] { --greeting-font-size: 36px; }
  html[data-ui-size="6"] { --greeting-font-size: 38px; }
  html[data-ui-size="7"] { --greeting-font-size: 40px; }
  html[data-ui-size="8"] { --greeting-font-size: 42px; }
  html[data-ui-size="9"] { --greeting-font-size: 44px; }
  html[data-ui-size="10"] { --greeting-font-size: 46px; }

  body {
    background:
      linear-gradient(180deg, var(--bg-glow-1) 0%, transparent 34%),
      var(--bg);
  }
  .app-shell,
  .app-shell[data-sidebar="closed"],
  .app-shell[data-sidebar="open"] {
    width: 100vw;
    grid-template-columns: minmax(0, 1fr);
    --sidebar-current-width: 0px;
    --empty-composer-top: clamp(360px, 56vh, 470px);
  }
  .sidebar-resizer {
    display: none;
  }
  .chat-main {
    width: 100vw;
    min-width: 0;
    grid-column: 1;
  }
  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 80;
    width: min(88vw, 340px);
    height: 100dvh;
    max-height: 100dvh;
    padding-bottom: max(14px, env(safe-area-inset-bottom));
    box-shadow: var(--shadow);
  }
  .session-list {
    padding-bottom: 14px;
  }
  .sidebar-foot {
    position: sticky;
    bottom: 0;
    z-index: 85;
    margin-top: auto;
    padding-bottom: max(10px, env(safe-area-inset-bottom));
    background: linear-gradient(180deg, transparent, var(--sidebar-bg) 20px, var(--sidebar-bg) 100%);
  }
  .account-menu {
    left: max(14px, env(safe-area-inset-left));
    right: max(14px, env(safe-area-inset-right));
    bottom: max(76px, calc(66px + env(safe-area-inset-bottom)));
    width: auto;
    max-height: calc(100dvh - 104px);
    border-radius: 18px;
    padding: 12px;
  }
  .theme-swatches {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .app-shell[data-sidebar="closed"] .sidebar {
    transform: translateX(-105%);
  }
  .mobile-only { display: inline-grid; }
  .mobile-title {
    display: inline-block;
    flex: 1 1 auto;
    max-width: calc(100vw - 128px);
    text-align: center;
    font-size: 14px;
    font-weight: 760;
    padding: 0 4px;
  }
  .chat-topbar {
    height: 52px;
    padding: 0 10px;
    gap: 8px;
    position: sticky;
    top: 0;
    z-index: 10;
    background: rgba(11,11,12,.84);
  }
  html[data-mode="light"] .chat-topbar {
    background: rgba(255,255,255,.88);
    color: var(--text);
  }
  html[data-mode="light"] .mobile-title,
  html[data-mode="light"] .chat-topbar .icon-button {
    color: var(--text);
  }
  .message-minimap {
    left: 10px;
    top: 78px;
    bottom: calc(var(--composer-reserved) - 34px);
    width: 18px;
    gap: 7px;
    opacity: .58;
  }
  .minimap-mark {
    height: 2px;
    min-height: 2px;
    margin-left: 0;
    width: min(var(--mark-width, 10px), 14px);
  }
  .minimap-mark:hover::after,
  .minimap-mark:focus-visible::after {
    display: none;
  }
  .quota-pill { display: none; }
  .chat-title { display: none; }
  .title-wrap { display: none; }
  .model-status { display: none; }
  .messages {
    width: 100%;
    min-width: 0;
    max-width: 100vw;
    overflow-x: hidden;
    padding: 20px 14px 200px;
  }
  .messages.has-chat {
    padding-bottom: 200px;
  }
  .empty-state {
    width: 100%;
    max-width: none;
    height: var(--empty-composer-top);
    min-height: 292px;
    justify-content: center;
    gap: 14px;
    padding: clamp(30px, 5.4vh, 58px) 0 clamp(24px, 4.6vh, 48px);
  }
  .empty-state h1 {
    width: 100%;
    max-width: 318px;
    font-size: var(--greeting-font-size);
    line-height: 1.08;
  }
  .prompt-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .prompt-grid button {
    min-height: 48px;
    border-radius: 14px;
    padding: 11px 13px;
  }
  .message {
    width: 100%;
    inline-size: 100%;
    max-width: 100%;
    min-width: 0;
    margin-bottom: 18px;
    justify-items: stretch;
  }
  .message-body {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    font-size: calc(var(--message-font-size) - 1px);
    overflow-wrap: anywhere;
    word-break: break-word;
  }
  .message.assistant .message-body {
    font-size: calc(var(--assistant-font-size) - 1px);
    max-width: 100%;
    min-width: 0;
    padding-left: 0;
    border-left: 0;
    background: transparent;
  }
  .message-code-block {
    max-width: 100%;
    border-radius: 12px;
  }
  .message-code-block pre {
    max-height: 58vh;
    font-size: .86em;
  }
  .message-code-block code {
    padding: 13px;
  }
  .code-line-gutter {
    padding: 13px 10px 13px 12px;
  }
  .message-actions {
    margin-left: 0;
    max-width: 100%;
    overflow: hidden;
  }
  .message.user .message-body {
    justify-self: end;
    width: fit-content;
    max-width: min(86vw, 620px);
  }
  .composer {
    left: max(12px, env(safe-area-inset-left));
    right: max(12px, env(safe-area-inset-right));
    bottom: max(12px, env(safe-area-inset-bottom));
    border-radius: 23px;
    padding: 10px;
    max-height: min(46vh, 290px);
  }
  .app-shell[data-empty="true"] .composer {
    top: var(--empty-composer-top);
    bottom: auto;
  }
  .app-shell[data-sidebar="closed"] .composer {
    left: max(12px, env(safe-area-inset-left));
  }
  .composer textarea {
    min-height: 50px;
    font-size: var(--composer-font-size);
  }
  .composer-bar {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 8px;
  }
  .composer-left {
    gap: 6px;
    min-width: max-content;
  }
  .composer-right {
    width: 100%;
    margin-left: 0;
    display: grid;
    grid-template-columns: minmax(88px, 1fr) minmax(44px, max-content) 38px;
    align-items: center;
    justify-content: end;
    gap: 5px;
    min-width: 0;
  }
  .composer-select {
    width: 100%;
    min-width: 0;
  }
  .composer-select select {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    height: max(34px, calc(var(--ui-base-font-size) + 17px));
    padding: 0 20px 0 8px;
    font-size: clamp(12px, calc(var(--composer-font-size) - 4px), 15px);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .model-picker select {
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }
  .model-picker {
    min-width: 0;
  }
  .effort-picker {
    width: auto;
    max-width: 82px;
  }
  .effort-picker select {
    width: auto;
    min-width: 54px;
    max-width: 82px;
    padding-left: 8px;
    padding-right: 20px;
  }
  .composer-tool,
  .composer button {
    width: 38px !important;
    height: 38px !important;
  }
  #send-button {
    width: 38px !important;
    height: 38px !important;
    justify-self: end;
    border-radius: 50%;
    margin-right: 0;
  }
  #send-button .material-symbols-rounded {
    font-size: 20px;
  }
  .archive-item {
    grid-template-columns: 1fr;
  }
  .archive-actions {
    justify-content: flex-end;
  }
}

@media (max-width: 430px) {
  .sidebar {
    width: min(90vw, 324px);
  }

  .composer {
    left: max(10px, env(safe-area-inset-left));
    right: max(10px, env(safe-area-inset-right));
    padding: 9px;
    border-radius: 22px;
  }

  .composer textarea {
    min-height: 48px;
  }

  .composer-bar {
    gap: 8px;
  }

  .composer-left {
    gap: 6px;
  }

  .composer-right {
    grid-template-columns: minmax(78px, 1fr) minmax(42px, 56px) 36px;
    gap: 5px;
  }

  .composer-select select {
    height: 38px;
    padding-left: 8px;
    padding-right: 20px;
    font-size: clamp(12px, calc(var(--composer-font-size) - 4px), 15px);
  }

  .effort-picker,
  .effort-picker select {
    max-width: 64px;
  }

  .composer-tool,
  .composer button {
    width: 36px !important;
    height: 36px !important;
  }

  #send-button {
    width: 36px !important;
    height: 36px !important;
  }
}
