:root {
  color-scheme: dark;
  --bg: #121313;
  --sidebar: #101111;
  --raised: #1e2020;
  --control: #282b29;
  --line: #2c302d;
  --text: #edf0e9;
  --muted: #a1aaa2;
  --quiet: #7e8880;
  --green: #8ac5a1;
  --purple: #ab8bfd;
  --ivory: #e4e9db;
  font:
    14px/1.55 Inter,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  background: var(--bg);
  color: var(--text);
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
textarea,
select {
  font: inherit;
  color: inherit;
}
button,
a,
input,
textarea,
select {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
  border: 0;
  background: none;
  text-align: left;
}
button:disabled {
  cursor: default;
  opacity: 0.45;
}
a {
  color: inherit;
  text-decoration: none;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--purple);
  outline-offset: 3px;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1 {
  font-size: 16px;
  font-weight: 550;
}
h2 {
  font-size: 26px;
  font-weight: 550;
  letter-spacing: -0.7px;
}
h3 {
  font-size: 16px;
  font-weight: 550;
}
strong {
  font-weight: 600;
}
svg {
  width: 19px;
  height: 19px;
  flex-shrink: 0;
  vertical-align: middle;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
[hidden] {
  display: none !important;
}
.muted {
  color: var(--muted);
  font-size: 13px;
}
.footnote {
  color: var(--quiet);
  font-size: 12px;
  line-height: 1.8;
  margin-top: 25px;
  overflow-wrap: anywhere;
}
.app {
  display: grid;
  grid-template-columns: 256px minmax(0, 1fr);
  height: 100dvh;
  overflow: hidden;
}
.sidebar {
  background: var(--sidebar);
  border-right: 1px solid var(--line);
  padding: 23px 17px 12px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-height: 0;
  overflow: hidden;
}
.sidebar-scroll {
  display: flex;
  flex-direction: column;
  gap: 5px;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior-y: contain;
}
.sidebar-scroll > * {
  flex-shrink: 0;
}
.brand-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 22px;
  flex-shrink: 0;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.8px;
}
.brand-mark {
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.brand-mark img,
.mark.mascot img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.icon-button {
  width: 39px;
  height: 39px;
  border-radius: 50%;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  color: var(--muted);
  flex-shrink: 0;
  position: relative;
}
.icon-button:hover {
  background: var(--control);
  color: var(--text);
}
.small-button {
  padding: 5px;
  display: inline-flex;
  color: var(--quiet);
  border-radius: 8px;
}
.small-button svg {
  width: 15px;
  height: 15px;
}
.search {
  display: flex;
  align-items: center;
  gap: 9px;
  background: var(--raised);
  border-radius: 12px;
  padding: 9px 12px;
  color: var(--muted);
  min-width: 0;
}
.search input {
  background: transparent;
  border: 0;
  outline-offset: 4px;
  min-width: 0;
  width: 100%;
  font-size: 12px;
  padding: 3px 0;
}
.search svg {
  width: 16px;
  height: 16px;
}
input::placeholder,
textarea::placeholder {
  color: #8f9991;
  opacity: 1;
}
.main-nav {
  display: grid;
  gap: 4px;
  margin: 17px 0;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  border-radius: 11px;
  padding: 10px 12px;
  color: var(--muted);
  width: 100%;
  font-size: 13px;
}
.nav-item:hover,
.nav-item.selected {
  background: var(--raised);
  color: var(--text);
}
.group-label {
  font-size: 11px;
  color: var(--quiet);
  padding: 0 10px;
  margin: 6px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.assistant-row {
  display: flex;
  gap: 11px;
  align-items: center;
  padding: 10px;
  border-radius: 12px;
  width: 100%;
  min-width: 0;
}
.assistant-row:hover {
  background: var(--raised);
}
.assistant-row strong {
  display: block;
  font-size: 13px;
}
.assistant-row small {
  display: block;
  color: var(--quiet);
  font-size: 11px;
  margin-top: 2px;
}
.mark {
  display: inline-flex;
  width: 34px;
  height: 34px;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  flex-shrink: 0;
  color: #1c211c;
}
.mark.ivory {
  background: var(--ivory);
}
.mark.lavender {
  background: var(--purple);
}
.mark.coral {
  background: #ed938b;
}
.mark svg {
  width: 18px;
  height: 18px;
}
.history-label {
  margin-top: 24px;
}
.conversation-list {
  min-height: 80px;
  flex: 1 0 auto;
}
.conversation-item {
  display: block;
  width: 100%;
  padding: 10px 11px;
  border-radius: 11px;
  margin: 2px 0;
  font-size: 12px;
  min-width: 0;
}
.conversation-item:hover,
.conversation-item.selected {
  background: var(--raised);
}
.conversation-item strong {
  display: block;
  font-weight: 400;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.conversation-item small {
  display: block;
  color: var(--quiet);
  font-size: 10px;
  margin-top: 3px;
}
.sidebar-footer {
  padding-top: 20px;
  flex-shrink: 0;
  background: var(--sidebar);
}
.account {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  padding: 17px 7px 3px;
  margin-top: 15px;
  border-top: 1px solid var(--line);
}
.account > span:nth-child(2) {
  flex: 1;
}
.account strong,
.account small {
  display: block;
}
.account strong {
  font-size: 13px;
}
.account small {
  font-size: 11px;
  color: var(--quiet);
}
.account > svg {
  width: 17px;
  color: var(--muted);
}
.owner-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #333a34;
  color: #c5cdc5;
}
.main {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
}
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  padding: 20px 28px;
  min-height: 85px;
}
.topbar-left {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
}
.header-copy {
  min-width: 0;
}
.header-copy h1 {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.header-copy p {
  font-size: 11px;
  color: var(--muted);
  margin-top: 1px;
}
.topbar-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}
.attention-dot {
  width: 7px;
  height: 7px;
  background: #e9b579;
  border-radius: 50%;
  position: absolute;
  right: 5px;
  top: 7px;
}
.chat-view {
  display: flex;
  flex-direction: column;
  min-height: 0;
  flex: 1;
}
.chat-scroll {
  flex: 1;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  padding: 28px max(28px, calc((100% - 760px) / 2));
  scrollbar-width: thin;
  scrollbar-color: #424942 transparent;
}
.messages {
  display: flex;
  flex-direction: column;
  gap: 28px;
}
.message {
  min-width: 0;
  overflow-wrap: anywhere;
}
.message.user {
  align-self: flex-end;
  max-width: 85%;
}
.message.user .message-body {
  background: var(--control);
  border-radius: 23px 23px 6px 23px;
  padding: 13px 19px;
  white-space: pre-wrap;
  font-size: 14px;
  line-height: 1.75;
}
.message.assistant {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  width: 100%;
}
.message.assistant > .mark {
  width: 26px;
  height: 26px;
  border-radius: 9px;
  margin-top: 2px;
}
.message.assistant > .mark svg {
  width: 15px;
  height: 15px;
}
.assistant-content {
  flex: 1;
  min-width: 0;
}
.message-meta {
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 9px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.message-meta time {
  color: var(--quiet);
  font-size: 10px;
}
.message.assistant .message-body {
  background: var(--raised);
  padding: 18px 22px;
  border-radius: 6px 23px 23px 23px;
  font-size: 14px;
  line-height: 1.8;
}
.markdown > :first-child {
  margin-top: 0;
}
.markdown > :last-child {
  margin-bottom: 0;
}
.markdown p {
  margin: 0 0 14px;
}
.markdown h1,
.markdown h2,
.markdown h3 {
  margin: 23px 0 10px;
  line-height: 1.5;
  letter-spacing: 0;
}
.markdown h1 {
  font-size: 23px;
}
.markdown h2 {
  font-size: 20px;
}
.markdown h3 {
  font-size: 16px;
}
.markdown ul,
.markdown ol {
  padding-left: 23px;
  margin: 12px 0;
}
.markdown li + li {
  margin-top: 6px;
}
.markdown blockquote {
  border-left: 2px solid #7d8b7e;
  margin: 15px 0;
  padding-left: 17px;
  color: #b2bcb3;
}
.markdown a {
  color: #bbcfa7;
  text-decoration: underline;
  text-underline-offset: 3px;
  overflow-wrap: anywhere;
}
.markdown pre {
  white-space: pre;
  overflow: auto;
  max-width: 100%;
  background: #101311;
  padding: 14px;
  border-radius: 10px;
  font-size: 12px;
  line-height: 1.7;
}
.markdown code {
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 0.9em;
  overflow-wrap: anywhere;
}
.markdown table {
  display: block;
  max-width: 100%;
  overflow: auto;
  border-collapse: collapse;
  font-size: 12px;
  margin: 18px 0;
}
.markdown th,
.markdown td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid #3b453d;
  min-width: 90px;
}
.markdown th {
  font-weight: 600;
}
.markdown img {
  max-width: 100%;
  height: auto;
}
.markdown hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 22px 0;
}
.markdown input {
  pointer-events: none;
}
.message-actions {
  display: flex;
  gap: 8px;
  margin: 8px 0 0;
  color: var(--quiet);
}
.message-actions button {
  color: inherit;
  padding: 6px;
  font-size: 11px;
  display: flex;
  align-items: center;
  gap: 5px;
}
.message-actions svg {
  width: 14px;
  height: 14px;
}
.older {
  display: block;
  margin: 0 auto 20px;
}
.empty {
  min-height: 280px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 15px;
  padding: 30px 10px;
}
.empty .brand-mark {
  width: 96px;
  height: 96px;
}
.empty h2 {
  font-size: 28px;
}
.empty p {
  color: var(--muted);
  font-size: 13px;
  max-width: 360px;
}
.composer-wrap {
  padding: 15px 28px 16px;
  max-width: 820px;
  margin: 0 auto;
  width: 100%;
}
.composer {
  background: #242825;
  border: 1px solid #363e36;
  border-radius: 25px;
  padding: 14px 14px 11px;
}
.composer textarea {
  display: block;
  width: 100%;
  background: transparent;
  border: 0;
  resize: none;
  min-height: 39px;
  max-height: 180px;
  padding: 2px 5px 10px;
  line-height: 1.7;
  font-size: 14px;
}
.composer-tools {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.composer-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.composer select {
  background: transparent;
  border: 0;
  color: #c0cac0;
  font-size: 11px;
  max-width: 140px;
}
.composer select option {
  background: var(--raised);
}
.model-label {
  font-size: 11px;
  color: var(--quiet);
}
.send-button {
  background: var(--ivory);
  color: #1b211b;
  display: flex;
  width: 35px;
  height: 35px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  flex-shrink: 0;
}
.send-button:hover {
  background: #fff;
}
.composer-note {
  text-align: center;
  font-size: 10px;
  color: var(--quiet);
  margin-top: 9px;
}
.accepted {
  font-size: 12px;
  color: var(--green);
  padding: 0 8px 10px;
  overflow-wrap: anywhere;
}
.connection-state {
  padding: 10px 22px;
  background: #342b22;
  color: #e5cba2;
  font-size: 12px;
}
.run-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 23px 0 0 36px;
  font-size: 12px;
  color: var(--muted);
}
.run-banner span {
  overflow-wrap: anywhere;
}
.run-banner.error {
  color: #e8b0a8;
}
.run-banner button {
  flex-shrink: 0;
}
.running-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  background: var(--green);
  border-radius: 50%;
  margin-right: 8px;
}
.page-view {
  padding: 32px;
  overflow: auto;
  min-height: 0;
  flex: 1;
  max-width: 1060px;
  width: 100%;
  margin: 0 auto;
}
.page-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 28px;
}
.page-heading p,
.page-view > p.muted {
  margin-top: 7px;
}
.library-controls {
  display: flex;
  gap: 12px;
  margin: 22px 0 12px;
}
.library-controls .search {
  flex: 1;
}
.library-controls select,
.project-controls select {
  background: var(--raised);
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 10px;
  color: var(--muted);
  max-width: 100%;
  min-width: 0;
  font-size: 12px;
}
.project-controls {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 22px;
}
.project-controls select {
  margin-left: 8px;
  max-width: 220px;
}
.file-row {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 17px 4px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}
.file-row > span:nth-child(2) {
  flex: 1;
  min-width: 0;
}
.file-row strong {
  font-size: 13px;
  overflow-wrap: anywhere;
  display: block;
}
.file-row small {
  font-size: 11px;
  color: var(--quiet);
  display: block;
  margin-top: 3px;
}
.file-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #303831;
  color: #cbd6c4;
  width: 36px;
  height: 41px;
  border-radius: 11px;
  flex-shrink: 0;
}
.file-card {
  border: 1px solid var(--line);
  background: var(--raised);
  border-radius: 17px;
  padding: 16px;
  max-width: 380px;
  margin-top: 10px;
}
.file-card:hover,
.file-row:hover {
  background: var(--raised);
}
.status-label {
  font-size: 10px;
  color: var(--muted);
  border-radius: 30px;
  background: var(--control);
  padding: 4px 8px;
}
.status-label.warning {
  color: #e5c59a;
  background: #3a3226;
}
.settings-box {
  background: var(--raised);
  border-radius: 23px;
  padding: 3px 20px;
  margin-top: 25px;
}
.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
  width: 100%;
  font-size: 13px;
}
.settings-row:last-child {
  border: 0;
}
.settings-row > span:first-child {
  min-width: 0;
}
.settings-row strong,
.settings-row small {
  display: block;
}
.settings-row small {
  color: var(--muted);
  font-size: 12px;
  margin-top: 4px;
}
.settings-row > svg {
  width: 16px;
  color: var(--quiet);
}
.settings-row > .muted {
  max-width: 50%;
  text-align: right;
  overflow-wrap: anywhere;
}
.usage-overview {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 22px 0;
}
.usage-stat {
  padding: 21px;
  background: var(--raised);
  border-radius: 20px;
}
.usage-stat p {
  color: var(--muted);
  font-size: 12px;
}
.usage-stat strong {
  display: block;
  font-size: 25px;
  letter-spacing: -0.5px;
  margin-top: 7px;
}
.usage-stat small {
  color: var(--quiet);
  font-size: 11px;
}
.usage-note {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.8;
  margin: 18px 0;
}
.service-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 17px 0;
  border-bottom: 1px solid var(--line);
}
.service-row strong {
  font-size: 13px;
}
.service-row small {
  display: block;
  color: var(--quiet);
  font-size: 11px;
  margin-top: 4px;
}
.quiet-button {
  background: var(--control);
  color: var(--text);
  padding: 8px 13px;
  border-radius: 18px;
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.quiet-button:hover {
  background: #394139;
}
.primary-button {
  background: var(--ivory);
  color: #1c251c;
  padding: 10px 16px;
  border-radius: 22px;
  font-size: 13px;
}
.danger-button {
  color: #f0b2a8;
}
.detail-panel {
  background: #191d19;
  border-left: 1px solid var(--line);
  padding: 22px 24px;
  overflow: auto;
  min-width: 0;
  min-height: 0;
}
.app.with-panel {
  grid-template-columns: 226px minmax(0, 1fr) minmax(300px, 35%);
}
.with-panel .chat-scroll {
  padding: 24px;
}
.with-panel .composer-wrap {
  padding: 15px 22px;
}
.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 20px;
}
.panel-header h2 {
  font-size: 18px;
  letter-spacing: -0.2px;
  overflow-wrap: anywhere;
  min-width: 0;
}
.detail-panel .markdown {
  font-size: 13px;
  line-height: 1.85;
  overflow-wrap: anywhere;
}
.detail-panel .markdown h1 {
  font-size: 23px;
}
.detail-panel .markdown h2 {
  font-size: 18px;
}
.report-tools {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 25px;
}
.report-tools a,
.report-tools button {
  font-size: 11px;
}
.plain-preview {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font:
    12px/1.8 ui-monospace,
    SFMono-Regular,
    monospace;
}
.activity-heading {
  font-size: 11px;
  color: var(--quiet);
  margin: 24px 0 12px;
}
.activity-item {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.activity-item > svg {
  width: 16px;
  height: 16px;
  color: var(--green);
  margin-top: 3px;
}
.activity-item strong {
  font-size: 12px;
  display: block;
}
.activity-item small {
  color: var(--quiet);
  font-size: 11px;
  display: block;
}
.approval-card {
  background: #2a2e25;
  border: 1px solid #4e5641;
  padding: 17px;
  border-radius: 18px;
  margin-bottom: 17px;
}
.approval-card h3 {
  font-size: 14px;
}
.approval-card p {
  font-size: 12px;
  color: #c2cbb6;
  line-height: 1.7;
  margin: 10px 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.approval-actions {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
}
.approval-actions button {
  font-size: 11px;
  padding: 8px 10px;
}
.approval-card small {
  font-size: 10px;
  color: var(--quiet);
}
.queue-item {
  font-size: 12px;
  color: var(--muted);
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  overflow-wrap: anywhere;
}
.toast {
  position: fixed;
  bottom: max(22px, env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  padding: 12px 18px;
  background: var(--ivory);
  color: #1b241b;
  max-width: calc(100% - 32px);
  border-radius: 16px;
  z-index: 50;
  font-size: 12px;
  box-shadow: 0 8px 30px #0005;
  text-align: center;
}
.mobile-only {
  display: none;
}
.nav-scrim {
  position: fixed;
  inset: 0;
  background: #0008;
  z-index: 19;
}
dialog {
  background: #1c211d;
  border: 1px solid #394039;
  border-radius: 23px;
  color: var(--text);
  padding: 24px;
  max-width: 440px;
  width: calc(100% - 32px);
}
dialog::backdrop {
  background: #0008;
  backdrop-filter: blur(6px);
}
dialog label {
  display: block;
  font-size: 13px;
}
dialog input {
  display: block;
  width: 100%;
  margin: 8px 0 15px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--raised);
  padding: 11px 13px;
}
dialog p {
  font-size: 12px;
}
.dialog-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 20px;
}
.login-page {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 30px;
}
.login-card {
  max-width: 420px;
  width: 100%;
}
.login-card > .brand-mark {
  width: 96px;
  height: 96px;
  margin-bottom: 24px;
}
.login-card h1 {
  font-size: 32px;
  letter-spacing: -1px;
  line-height: 1.3;
}
.login-card p {
  color: var(--muted);
  margin: 14px 0 25px;
  font-size: 15px;
}
.login-instruction {
  background: var(--raised);
  padding: 22px;
  border-radius: 20px;
  line-height: 1.8;
}
.login-instruction code {
  background: var(--control);
  padding: 4px 7px;
  border-radius: 7px;
}
.login-card details {
  font-size: 12px;
  color: var(--muted);
  margin-top: 25px;
}
.login-card summary {
  cursor: pointer;
}
.login-card label {
  display: block;
  margin-top: 20px;
}
.login-card input {
  display: block;
  background: var(--raised);
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 12px;
  margin: 8px 0 15px;
  width: 100%;
}
.login-card > small {
  display: block;
  color: var(--quiet);
  margin-top: 26px;
  font-size: 11px;
}
@media (max-width: 1150px) and (min-width: 781px) {
  .app.with-panel {
    grid-template-columns: 226px minmax(0, 1fr);
  }
  .with-panel .main {
    display: none;
  }
  .with-panel .detail-panel {
    border: 0;
    padding: 25px 40px;
  }
  .with-panel .detail-panel .markdown {
    font-size: 14px;
  }
}
@media (max-width: 780px) {
  .app,
  .app.with-panel {
    display: flex;
    flex-direction: column;
  }
  .main {
    flex: 1;
  }
  .sidebar {
    display: none;
    position: fixed;
    inset: 0 auto auto 0;
    height: 100dvh;
    width: min(330px, calc(100% - 34px));
    z-index: 20;
    padding-top: max(23px, env(safe-area-inset-top));
    padding-bottom: max(12px, env(safe-area-inset-bottom));
  }
  .app.nav-open .sidebar {
    display: flex;
  }
  .mobile-only {
    display: inline-flex;
  }
  .topbar {
    padding: 15px 15px;
    min-height: 77px;
    gap: 8px;
  }
  .topbar-left {
    gap: 9px;
  }
  .topbar-left > .mark {
    display: none;
  }
  .topbar-actions {
    gap: 0;
  }
  .header-copy h1 {
    font-size: 15px;
  }
  .header-copy p {
    font-size: 10px;
  }
  .chat-scroll,
  .with-panel .chat-scroll {
    padding: 23px 17px;
  }
  .message.assistant > .mark {
    display: none;
  }
  .message.assistant .message-body {
    font-size: 15px;
    padding: 17px 19px;
  }
  .message.user {
    max-width: 91%;
  }
  .message.user .message-body {
    font-size: 15px;
    padding: 13px 17px;
  }
  .message-meta {
    margin-left: 5px;
  }
  .composer-wrap,
  .with-panel .composer-wrap {
    padding: 10px 14px max(12px, env(safe-area-inset-bottom));
  }
  .composer textarea {
    font-size: 16px;
  }
  .composer-note {
    font-size: 10px;
    padding: 0 5px;
  }
  .model-label {
    font-size: 10px;
  }
  .composer-left {
    gap: 6px;
  }
  .run-banner {
    margin-left: 5px;
  }
  .page-view {
    padding: 25px 20px;
  }
  .page-heading {
    align-items: flex-start;
    flex-wrap: wrap;
  }
  .page-heading h2 {
    font-size: 25px;
  }
  .library-controls {
    flex-direction: column;
  }
  .library-controls input {
    font-size: 16px;
  }
  .project-controls label {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
  }
  .project-controls select {
    margin-left: 0;
  }
  .settings-box {
    padding: 3px 16px;
  }
  .settings-row {
    font-size: 13px;
  }
  .settings-row small {
    font-size: 11px;
  }
  .with-panel .main {
    display: none;
  }
  .detail-panel {
    border: 0;
    padding: 20px;
    flex: 1;
  }
  .detail-panel .markdown {
    font-size: 14px;
  }
  .detail-panel .markdown table {
    font-size: 12px;
  }
  .usage-overview {
    gap: 10px;
  }
  .usage-stat {
    padding: 18px 14px;
  }
  .usage-stat strong {
    font-size: 23px;
  }
  .history-label {
    margin-top: 20px;
  }
  .assistant-row {
    padding: 11px 10px;
  }
  .conversation-item {
    padding: 12px;
  }
  .connection-state {
    padding: 9px 18px;
  }
  dialog input {
    font-size: 16px;
  }
  .login-page {
    padding: 28px;
  }
}
@media (pointer: coarse) {
  .icon-button {
    width: 44px;
    height: 44px;
  }
  .send-button {
    width: 42px;
    height: 42px;
  }
  .quiet-button,
  .primary-button,
  .small-button {
    min-height: 44px;
  }
  .message-actions button {
    min-height: 44px;
    padding: 10px;
  }
  .composer select {
    min-height: 40px;
  }
  .composer-left {
    gap: 5px;
  }
}
@media (prefers-reduced-motion: no-preference) {
  button,
  a {
    transition: background 0.14s ease;
  }
  .running-dot {
    animation: pulse 1.6s ease infinite;
  }
  @keyframes pulse {
    50% {
      opacity: 0.3;
    }
  }
}
