:root {
  color-scheme: light;
  --ink: #111318;
  --muted: #505b6a;
  --subtle: #646d7a;
  --accent: #c8102e;
  --accent-hover: #ae0e28;
  --accent-soft: #fff0f2;
  --accent-line: #f1c9d0;
  --paper: #fff;
  --surface: #faf9f6;
  --chat: #f5f4f1;
  --line: #e8e7e4;
  --control: #d4d7dc;
  --good: #176345;
  --good-bg: #eaf7ef;
  --warning: #744b12;
  --warning-bg: #fff4dc;
  --radius: 9px;
  --sidebar-width: 188px;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  font-synthesis: none;
  background: var(--surface);
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 0; overflow: hidden; }
button, input, textarea, select { font: inherit; color: inherit; }
a { color: var(--accent); }
button { cursor: pointer; }
button:disabled { cursor: default; }
button, a, input, textarea, select { outline-offset: 3px; }
:focus-visible { outline: 2px solid var(--accent); }
button, a { transition: background-color .15s, border-color .15s, color .15s, transform .15s; }
button:active:not(:disabled) { transform: translateY(1px); }
[hidden] { display: none !important; }
h1, h2, h3, p { margin: 0; }

.skip {
  position: fixed;
  z-index: 9;
  top: 8px;
  left: 12px;
  padding: 10px 14px;
  background: var(--paper);
  transform: translateY(-150%);
}
.skip:focus { transform: none; }

.app-shell {
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  height: 100vh;
  height: 100dvh;
  width: 100%;
}
.sidebar {
  display: flex;
  min-height: 0;
  flex-direction: column;
  padding: 20px 12px 16px;
  border-right: 1px solid var(--line);
  background: #fcfbf9;
}
.brand {
  display: grid;
  justify-items: start;
  gap: 3px;
  padding: 2px 8px 21px;
  border: 0;
  background: transparent;
  text-align: left;
}
.brand-wordmark, .brand-symbol { height: auto; mix-blend-mode: multiply; }
.brand-wordmark { display: block; width: 141px; max-width: 100%; }
.brand-symbol { display: none; width: 36px; }
.brand-fallback { font-size: 22px; font-weight: 780; letter-spacing: -.5px; }
.brand-caption { padding-left: 2px; color: var(--muted); font-size: 13px; font-weight: 650; }
.nav { display: grid; gap: 5px; }
.nav-item {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  min-height: 44px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  padding: 0 12px;
  text-align: left;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  font-weight: 650;
  white-space: nowrap;
}
.nav-item:hover { background: #f1eeeb; color: var(--ink); }
.nav-item.active, .nav-item.active:hover { color: #fff; border-color: var(--accent); background: var(--accent); }
.nav-icon, .search svg { flex: 0 0 auto; width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.nav-label-short { display: none; }
.app-location { margin-top: auto; padding: 12px 8px 1px; color: var(--muted); font-size: 12px; }

.app-content { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 72px;
  padding: 12px 20px;
  flex: 0 0 auto;
  background: var(--surface);
}
.topbar h1 { font-size: 26px; line-height: 1.12; font-weight: 760; letter-spacing: -.75px; }
.toolbar { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 7px; }
.toolbar.secondary-view [data-action="automation"],
.toolbar.secondary-view [data-action="paste"] { display: none; }
.connection-button { white-space: nowrap; }
.connection-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; flex: 0 0 auto; background: #9a6830; }
.connection-dot.on { background: #289353; }
.screen-icon {
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
  background:
    linear-gradient(currentColor,currentColor) top left / 5px 1.5px,
    linear-gradient(currentColor,currentColor) top left / 1.5px 5px,
    linear-gradient(currentColor,currentColor) top right / 5px 1.5px,
    linear-gradient(currentColor,currentColor) top right / 1.5px 5px,
    linear-gradient(currentColor,currentColor) bottom left / 5px 1.5px,
    linear-gradient(currentColor,currentColor) bottom left / 1.5px 5px,
    linear-gradient(currentColor,currentColor) bottom right / 5px 1.5px,
    linear-gradient(currentColor,currentColor) bottom right / 1.5px 5px;
  background-repeat: no-repeat;
}

.button, .icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 36px;
  padding: 7px 11px;
  border: 1px solid var(--control);
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--ink);
  font-size: 13px;
  font-weight: 665;
  text-decoration: none;
  line-height: 1.2;
  text-align: center;
}
.button:hover:not(:disabled), .icon-button:hover { background: #f4f3f1; border-color: #bfc2c8; }
.button.primary { background: var(--accent); border-color: var(--accent); color: white; }
.button.primary:hover:not(:disabled) { background: var(--accent-hover); border-color: var(--accent-hover); }
.button:disabled, .button.primary:disabled { color: var(--subtle); background: #f3f3f2; border-color: var(--line); }
.link-button:disabled { color: var(--subtle); }
.button.muted-button { background: transparent; border-color: transparent; }
.button.muted-button:hover { border-color: var(--control); }
.icon-button { min-width: 36px; padding: 4px; font-size: 18px; }
.link-button {
  padding: 0;
  border: 0;
  background: none;
  color: var(--accent);
  font-size: 12px;
  line-height: 1.45;
  font-weight: 660;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
button.link-button { text-decoration: none; }
.link-button:hover { text-decoration: underline; color: var(--accent-hover); }

.main { width: 100%; min-width: 0; min-height: 0; flex: 1 1 auto; padding: 0 16px 16px; }
.workspace {
  display: grid;
  grid-template-columns: clamp(249px, 20vw, 334px) minmax(0, 1fr) clamp(311px, 28vw, 467px);
  width: 100%;
  height: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  background: var(--paper);
}
.compact-tabs { display: none; }
.queue-panel, .conversation-panel, .review-panel {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
}
.queue-panel, .conversation-panel { border-right: 1px solid var(--line); }
.queue-head { display: grid; gap: 10px; padding: 14px 14px 12px; flex: 0 0 auto; }
.queue-title { display: flex; justify-content: space-between; align-items: center; gap: 6px; }
.queue-title h2, .panel-heading h2 { font-size: 17px; font-weight: 750; letter-spacing: -.3px; line-height: 1.2; }
.queue-title h2 span { color: var(--muted); margin-left: 5px; font-size: 11px; font-weight: 610; white-space: nowrap; }
.queue-tabs {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 3px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f5f4f2;
}
.queue-tabs button {
  min-height: 32px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  font-size: 12px;
  font-weight: 670;
  color: var(--muted);
}
.queue-tabs .selected { color: var(--ink); background: white; box-shadow: 0 1px 3px #15100a15; }
.queue-controls { display: grid; grid-template-columns: minmax(0,.87fr) minmax(0,1.13fr); gap: 7px; }
.queue-controls .field select { min-width: 0; padding-inline: 6px; font-size: 12px; }
.inbox-totals:not(:empty) {
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  gap: 0;
  padding: 8px 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--muted);
  font-size: 11px;
}
.inbox-totals > span { display: grid; align-content: start; gap: 3px; padding: 0 7px; line-height: 1.15; }
.inbox-totals > span + span { border-left: 1px solid var(--line); }
.inbox-totals strong { color: var(--ink); font-size: 17px; font-weight: 730; font-variant-numeric: tabular-nums; }
.search {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  padding: 0 9px;
  border: 1px solid var(--control);
  border-radius: var(--radius);
  color: var(--muted);
}
.search svg { width: 17px; height: 17px; }
.search input { width: 100%; min-width: 0; border: 0; background: none; outline: 0; font-size: 13px; }
.search:focus-within { border-color: var(--accent); }
.search input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 3px; }

.queue-list, .message-list, .review-body, .library { min-height: 0; overflow: auto; scrollbar-width: thin; }
.queue-list { flex: 1 1 auto; }
.queue-item {
  display: grid;
  grid-template-columns: 34px minmax(0,1fr);
  align-items: start;
  gap: 10px;
  width: 100%;
  min-height: 64px;
  padding: 11px 13px 11px 11px;
  border: 0;
  border-top: 1px solid #eef0f4;
  border-inline-start: 3px solid transparent;
  background: var(--paper);
  text-align: left;
}
.queue-item:hover { background: var(--surface); }
.queue-item.current { border-inline-start-color: var(--accent); background: var(--accent-soft); }
.avatar {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #e9edf4;
  color: #344761;
  font-size: 11px;
  font-weight: 755;
}
.avatar.alt { background: #f6e9df; color: #704b32; }
.queue-item-name { display: flex; align-items: center; justify-content: space-between; gap: 5px; }
.queue-item-name strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.queue-item-name time, .row-account { font-size: 11px; color: var(--muted); }
.queue-item-name time { white-space: nowrap; }
.row-account { display: block; margin: 2px 0; }
.snippet {
  display: block;
  margin-top: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  color: var(--muted);
}
.queue-footer, .thread-tools {
  flex: 0 0 auto;
  border-top: 1px solid var(--line);
  background: var(--paper);
  color: var(--muted);
}
.queue-footer { padding: 10px 13px; font-size: 11px; line-height: 1.4; }
.empty { padding: 22px; font-size: 14px; line-height: 1.5; color: var(--muted); }
.state-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--good); margin-right: 4px; }
.row-badges { display: flex; flex-wrap: wrap; gap: 4px; }
.queue-item .row-badges { margin-top: 5px; }
.chat-badge {
  padding: 2px 6px;
  border-radius: 5px;
  background: #e8ecf2;
  color: #475368;
  font-size: 10px;
  line-height: 1.45;
  font-weight: 670;
}
.chat-badge.waiting { background: var(--good-bg); color: var(--good); }
.chat-badge.attention { background: var(--warning-bg); color: var(--warning); }
.load-page { display: flex; margin: 6px auto; }

.conversation-panel { background: var(--chat); }
.panel-heading {
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 13px 17px;
  flex: 0 0 auto;
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}
.conversation-panel .panel-heading { flex-wrap: wrap; }
.identity { display: flex; align-items: center; gap: 11px; min-width: 0; }
.identity .avatar { width: 38px; height: 38px; font-size: 12px; }
.identity h2 { overflow-wrap: anywhere; }
.subline, .small { color: var(--muted); line-height: 1.4; }
.subline { font-size: 12px; margin-top: 3px; }
.small { font-size: 12px; }
.panel-state { border: 1px solid var(--line); border-radius: 5px; padding: 4px 6px; color: var(--muted); font-size: 11px; }
.message-list {
  flex: 1 1 auto;
  padding: 14px clamp(13px,2vw,26px) 19px;
}
.thread-flow {
  display: flex;
  flex-direction: column;
  gap: 13px;
  max-width: 750px;
  margin-inline: auto;
}
.thread-date {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-block: 3px;
  font-size: 11px;
  font-weight: 650;
  color: var(--muted);
}
.thread-date::before, .thread-date::after { content: ""; height: 1px; flex: 1; background: #e2e0db; }
.message { align-self: flex-start; max-width: min(90%,570px); }
.message.team { align-self: flex-end; }
.message-name { display: block; margin: 0 4px 5px; color: var(--muted); font-size: 11px; }
.message-name strong { margin-right: 4px; font-weight: 690; }
.team .message-name { text-align: right; }
.bubble {
  padding: 9px 12px;
  border-radius: 4px 12px 12px 12px;
  border: 1px solid var(--line);
  background: var(--paper);
  font-size: 14px;
  line-height: 1.58;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.team .bubble { border-radius: 12px 4px 12px 12px; border-color: #f0d9df; background: #fff3f5; }
.media-label { display: block; padding-bottom: 4px; font-size: 11px; color: var(--muted); }
.improve-reply { display: block; margin: 5px 0 0 auto; color: var(--muted); }
.thread-tools { display: flex; align-items: center; flex-wrap: wrap; gap: 7px 10px; padding: 9px 15px; }
.thread-hint { flex: 1 1 180px; font-size: 11px; line-height: 1.35; }

.review-title { display: flex; align-items: center; flex-wrap: wrap; gap: 5px 8px; }
.engine { padding: 3px 6px; border-radius: 5px; background: #eeedf4; color: #494760; font-size: 10px; font-weight: 675; }
.review-body {
  display: grid;
  align-content: start;
  flex: 1 1 auto;
  gap: 14px;
  padding: 17px;
}
.review-footer {
  display: grid;
  flex: 0 0 auto;
  gap: 8px;
  padding: 12px 17px;
  border-top: 1px solid var(--line);
  background: var(--paper);
}
.review-footer .small, .asset-card strong { overflow-wrap: anywhere; }
.review-footer .button { min-height: 38px; }
.draft-actions { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
.composer-field { display: grid; gap: 8px; }
#draft-text { min-height: clamp(125px,17vh,180px); }
.draft-button { min-height: 34px; }
.field { display: grid; min-width: 0; gap: 5px; font-weight: 660; font-size: 12px; }
.field input, .field textarea, .field select {
  width: 100%;
  min-width: 0;
  min-height: 36px;
  padding: 8px 9px;
  border: 1px solid var(--control);
  border-radius: var(--radius);
  background: var(--paper);
  font-size: 13px;
  font-weight: 400;
  line-height: 1.44;
}
.field textarea { min-height: 104px; resize: vertical; }
.field .feedback { min-height: 61px; }
.field-row { display: flex; justify-content: space-between; align-items: center; gap: 7px; }
.field-row label { font-size: 12px; font-weight: 690; }
.tip {
  padding: 8px 9px;
  border-inline-start: 3px solid #8796bb;
  border-radius: 0 5px 5px 0;
  background: #edf0f7;
  color: #384862;
  font-size: 12px;
  line-height: 1.45;
}
.tip.warning { color: var(--warning); background: var(--warning-bg); border-color: #be9139; }
.takeover-tip { align-self: center; width: calc(100% - 26px); max-width: 750px; margin: 11px 13px 0; }

.asset-card {
  display: grid;
  grid-template-columns: 66px minmax(0,1fr);
  align-items: center;
  gap: 10px;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.asset-art { display: grid; place-items: center; width: 66px; height: 53px; overflow: hidden; border-radius: 5px; background: #eceff4; }
.asset-art img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.asset-art.video-art { background: #282f40; color: #fff; font-size: 14px; }
.asset-art.video-art span { display: grid; width: 27px; height: 27px; place-items: center; border: 1px solid #a6adc0; border-radius: 50%; padding-left: 2px; }
.asset-card strong { display: block; font-size: 13px; margin-bottom: 2px; }
.asset-card .link-button { margin-top: 3px; }
.asset-options, .connection-block, .connection-block details { display: grid; gap: 6px; }
.inline-original { display: block; width: 100%; max-height: 260px; object-fit: contain; margin-top: 6px; border-radius: var(--radius); background: var(--surface); }
.status-line { color: var(--good); font-size: 12px; font-weight: 680; }
.handoff {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.handoff h3 { font-size: 14px; }
.handoff-actions, .dialog-buttons { display: flex; align-items: center; flex-wrap: wrap; gap: 7px 10px; }

.library {
  width: 100%;
  height: 100%;
  padding: 22px clamp(13px,2vw,30px) 30px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--paper);
}
.library-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: end;
  gap: 8px 12px;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}
.library-head h2 { font-size: 20px; font-weight: 750; letter-spacing: -.4px; }
.library-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%, 285px),1fr)); gap: 12px; }
.library-grid .asset-card { min-height: 72px; }
.guide-record {
  display: grid;
  align-content: start;
  gap: 8px;
  min-width: 0;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
}
.guide-record h3 { font-size: 16px; line-height: 1.3; letter-spacing: -.2px; }
.guide-record .asset-card { padding: 0; background: none; border: 0; }
.guide-record .button { justify-self: start; }
.library-empty {
  display: grid;
  gap: 10px;
  justify-items: start;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  line-height: 1.5;
}
.library-empty p { font-size: 13px; color: var(--muted); }
.audit-summary, .audit-account-list { display: flex; flex-wrap: wrap; gap: 8px 17px; }
.audit-summary p { font-size: 13px; }
.audit-summary strong { display: block; color: var(--ink); font-size: 22px; font-variant-numeric: tabular-nums; }
.audit-note { margin-top: 7px; }
.audit-account-list { margin: 8px 0 14px; color: var(--muted); font-size: 12px; }
.audit-filter { display: flex; flex-wrap: wrap; align-items: end; gap: 8px; margin-bottom: 13px; }
.audit-filter select { font-size: 12px; }
.audit-filter > .small { padding-bottom: 7px; }
.audit-onboarding { margin-bottom: 12px; }
.audit-evidence { font-size: 13px; }
.audit-evidence summary { cursor: pointer; }
.audit-evidence p { margin-top: 6px; overflow-wrap: anywhere; }
.audit-more { margin-top: 14px; }
.audit-sources { margin-top: 15px; }
.audit-source-groups:not(:empty) { display: grid; gap: 8px; margin-bottom: 14px; }
.audit-source-groups > .audit-sources { margin-top: 0; }
.audit-sources ul { padding: 6px 0 0 18px; }
.audit-sources li + li { margin-top: 10px; }
.audit-sources li p { font-size: 13px; }

.dialog {
  width: min(540px,calc(100vw - 24px));
  max-height: 91dvh;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0;
  color: var(--ink);
  background: var(--paper);
  box-shadow: 0 16px 70px #1b213341;
}
.dialog::backdrop { background: #2226378f; }
.dialog-inner { display: grid; gap: 12px; padding: 16px; }
.dialog-heading { display: flex; align-items: center; justify-content: space-between; gap: 9px; }
.dialog-heading h2 { font-size: 20px; letter-spacing: -.35px; }
.member-row { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 6px 12px; padding-top: 8px; overflow-wrap: anywhere; }
.dialog .field textarea { min-height: 130px; }
.dialog-image, .dialog-video { width: 100%; max-width: 100%; max-height: 65dvh; height: auto; object-fit: contain; border-radius: var(--radius); background: #202533; }
.connection-block { padding-top: 10px; border-top: 1px solid var(--line); }
.connection-block details > * { margin-top: 6px; }
.connection-block summary, .audit-sources summary { cursor: pointer; font-size: 13px; }
.check { display: flex; align-items: flex-start; gap: 7px; font-size: 13px; line-height: 1.43; }
.check input { margin-top: 3px; accent-color: var(--accent); }
.review-text {
  min-width: 0;
  max-height: 210px;
  padding: 10px;
  overflow: auto;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f7f8fb;
  font-size: 13px;
  line-height: 1.5;
}
.toast {
  position: fixed;
  z-index: 6;
  right: 13px;
  top: 68px;
  max-width: min(380px,calc(100vw - 26px));
  padding: 11px 13px;
  border-radius: var(--radius);
  background: #272c39;
  color: white;
  font-size: 13px;
  box-shadow: 0 6px 19px #20253830;
  pointer-events: none;
}

@keyframes enter { from { opacity: .85; transform: translateY(2px); } to { opacity: 1; transform: none; } }
.topbar[data-enter] { animation: enter .2s ease-out; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

@media (min-width: 981px) and (max-width: 1120px) {
  :root { --sidebar-width: 66px; }
  .sidebar { padding-inline: 9px; }
  .brand { justify-items: center; padding-inline: 0; }
  .brand-wordmark, .brand-caption, .nav-label, .app-location { display: none; }
  .brand-symbol { display: block; }
  .brand-fallback { font-size: 12px; }
  .nav-item { justify-content: center; padding-inline: 0; }
}
@media (min-width: 981px) and (max-width: 1160px) {
  .main { padding: 0 11px 11px; }
  .queue-controls { grid-template-columns: minmax(0,1fr); }
  .queue-controls .field { grid-template-columns: 49px minmax(0,1fr); align-items: center; }
}
@media (max-width: 980px) {
  :root { --compact-gutter: 14px; }
  .app-shell { grid-template-columns: minmax(0,1fr); grid-template-rows: auto minmax(0,1fr); }
  .sidebar { padding: 6px var(--compact-gutter) 0; border-right: 0; border-bottom: 1px solid var(--line); }
  .brand { display: flex; align-items: center; align-self: flex-start; width: fit-content; min-height: 43px; padding: 0; gap: 8px; }
  .brand-wordmark { width: 115px; }
  .nav { grid-template-columns: repeat(4,minmax(0,1fr)); padding-bottom: 4px; }
  .nav-item { justify-content: center; padding: 0 4px; gap: 4px; white-space: normal; font-size: 12px; text-align: center; }
  .nav-icon { display: none; }
  .app-location { display: none; }
  .topbar { min-height: 53px; padding: 8px var(--compact-gutter); }
  .topbar h1 { font-size: 19px; }
  .main { padding: 0; }
  .workspace { grid-template-columns: minmax(0,1fr); grid-template-rows: auto minmax(0,1fr); border-inline: 0; border-radius: 0; }
  .library { border-inline: 0; border-radius: 0; }
  .compact-tabs {
    display: grid;
    grid-template-columns: repeat(3,minmax(0,1fr));
    padding: 0 var(--compact-gutter);
    border-bottom: 1px solid var(--line);
    background: var(--paper);
  }
  .pane-tab {
    min-height: 44px;
    padding: 4px;
    border: 0;
    border-bottom: 2px solid transparent;
    background: transparent;
    color: var(--muted);
    font-size: 12px;
    font-weight: 680;
  }
  .pane-tab.active { color: var(--accent); border-bottom-color: var(--accent); }
  .queue-panel, .conversation-panel, .review-panel { display: none; border-right: 0; }
  .workspace[data-compact-pane="inbox"] .queue-panel,
  .workspace[data-compact-pane="chat"] .conversation-panel,
  .workspace[data-compact-pane="reply"] .review-panel { display: flex; }
  .panel-heading, .review-body, .review-footer { padding-inline: var(--compact-gutter); }
  .library-grid { grid-template-columns: repeat(auto-fit,minmax(min(100%, 265px),1fr)); }
  .field input, .field textarea, .field select, .search input { font-size: 16px; }
  .queue-controls .field select { font-size: 13px; }
  .queue-tabs button, .guide-record .button, .review-footer .button { min-height: 44px; }
}
@media (max-width: 495px) {
  .topbar { flex-wrap: wrap; gap: 6px; }
  .topbar:has(.toolbar:not(.secondary-view)) h1 { width: 100%; }
  .toolbar { justify-content: flex-start; gap: 5px; }
  .toolbar .button { min-height: 44px; padding-inline: 8px; font-size: 11px; }
  .toolbar .screen-button { min-width: 44px; }
  .screen-button #screen-label { display: none; }
  .topbar h1 { font-size: 18px; }
  .nav-item { font-size: 11px; }
  .nav-label-wide { display: none; }
  .nav-label-short { display: inline; }
  .review-body { padding-block: 12px; }
  .review-footer { padding-block: 9px; }
  .queue-controls, .field-row { gap: 5px; }
}
