:root {
  --bg: light-dark(#f4f6f2, #0b0d0c);
  --surface: light-dark(#fff, #111412);
  --surface-2: light-dark(#f0f3ee, #171b18);
  --surface-3: light-dark(#e6ebe4, #1d221e);
  --surface-inset: light-dark(#f8faf7, #101311);
  --surface-hover: light-dark(#e4e9e2, #202620);
  --chrome: light-dark(#f8faf7e8, #0e110fda);
  --line: light-dark(#d5dcd3, #2a302c);
  --line-soft: light-dark(#e4e8e2, #202521);
  --line-strong: light-dark(#c2cbc0, #3c463e);
  --ink: light-dark(#182019, #f1f3ee);
  --ink-soft: light-dark(#38433b, #dce3dd);
  --muted: light-dark(#566159, #9aa39d);
  --quiet: light-dark(#68736b, #8b958e);
  --accent: light-dark(#52751a, #c8f46a);
  --accent-hover: light-dark(#3e6412, #d3fa7e);
  --accent-ink: light-dark(#fff, #19220d);
  --mint: light-dark(#18704b, #74d8a9);
  --amber: light-dark(#965a00, #efb85a);
  --red: light-dark(#b4232a, #ef7a74);
  --feature: light-dark(#00699f, #72c9ff);
  --accent-surface: color-mix(in srgb, var(--accent) 10%, var(--surface));
  --accent-line: color-mix(in srgb, var(--accent) 42%, var(--line));
  --mint-surface: color-mix(in srgb, var(--mint) 10%, var(--surface));
  --red-surface: color-mix(in srgb, var(--red) 10%, var(--surface));
  --shadow: light-dark(#1f2d201f, #0005);
  --shadow-strong: light-dark(#1f2d2040, #000c);
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  color-scheme: light dark;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
:root[data-theme="light"] { color-scheme: light; }
:root[data-theme="dark"] { color-scheme: dark; }
:root[data-theme="system"] { color-scheme: light dark; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { background: var(--bg); margin: 0; min-height: 100%; }
body { color: var(--ink); font-size: 14px; line-height: 1.5; min-height: 100vh; min-height: 100dvh; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { color: inherit; font: inherit; }
button { -webkit-tap-highlight-color: transparent; }
button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.app-shell {
  background: radial-gradient(circle at 48% -20%, var(--accent-surface), transparent 31%), var(--bg);
  display: grid;
  grid-template-columns: 260px minmax(560px, 1fr) 390px;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
}
.app-shell:has(.task-inspector[hidden]) { grid-template-columns: 260px minmax(560px, 1fr) 0; }
.project-sidebar {
  backdrop-filter: blur(18px);
  background: var(--chrome);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow-y: auto;
  padding: calc(18px + var(--safe-top)) 12px calc(14px + var(--safe-bottom)) calc(12px + var(--safe-left));
}
.brand-row { align-items: center; display: flex; gap: 8px; padding: 2px 7px 25px; }
.brand { align-items: center; color: var(--ink); display: flex; font-size: 16px; font-weight: 780; gap: 10px; text-decoration: none; }
.brand-mark { align-items: flex-end; background: var(--accent); border-radius: 9px; display: inline-flex; flex: 0 0 32px; gap: 3px; height: 32px; justify-content: center; padding: 8px; transform: rotate(-2deg); }
.brand-mark i { background: var(--accent-ink); border-radius: 3px; display: block; width: 4px; }
.brand-mark i:nth-child(1) { height: 8px; }
.brand-mark i:nth-child(2) { height: 16px; }
.brand-mark i:nth-child(3) { height: 11px; }
.coordinator-chip { background: var(--accent-surface); border: 1px solid var(--accent-line); border-radius: 999px; color: var(--accent); font-size: 9px; font-weight: 800; letter-spacing: .08em; margin-left: auto; padding: 3px 6px; text-transform: uppercase; }
.sidebar-section { min-height: 0; }
.projects-section { flex: 1; }
.agents-section { border-top: 1px solid var(--line-soft); margin-top: 18px; padding-top: 18px; }
.sidebar-heading { align-items: center; color: var(--quiet); display: flex; font-size: 11px; font-weight: 760; justify-content: space-between; letter-spacing: .11em; padding: 0 8px 9px; text-transform: uppercase; }
.sidebar-heading small { background: var(--surface-3); border-radius: 99px; color: var(--muted); font-size: 10px; letter-spacing: 0; padding: 2px 6px; text-transform: none; }
.project-list, .agent-list { display: grid; gap: 3px; }
.project-button, .agent-row { align-items: center; background: transparent; border: 1px solid transparent; border-radius: 10px; display: grid; gap: 9px; grid-template-columns: 32px minmax(0, 1fr); padding: 8px; text-align: left; width: 100%; }
.project-button { cursor: pointer; }
.project-button:hover { background: var(--surface-2); }
.project-button.selected { background: var(--accent-surface); border-color: var(--accent-line); }
.project-avatar { align-items: center; background: var(--surface-3); border: 1px solid var(--line); border-radius: 8px; color: var(--ink-soft); display: flex; font-size: 11px; font-weight: 800; height: 32px; justify-content: center; text-transform: uppercase; width: 32px; }
.project-button.selected .project-avatar { border-color: var(--accent-line); color: var(--accent); }
.project-copy, .agent-copy { display: grid; min-width: 0; }
.project-copy strong, .agent-copy strong { font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.project-copy small, .agent-copy small { color: var(--quiet); font-size: 10px; }
.agent-indicator { align-items: center; background: var(--surface-3); border: 1px solid var(--line); border-radius: 8px; display: flex; height: 32px; justify-content: center; width: 32px; }
.agent-indicator::before { background: var(--quiet); border-radius: 50%; content: ""; height: 8px; width: 8px; }
.agent-row.online .agent-indicator::before { background: var(--mint); box-shadow: 0 0 10px color-mix(in srgb, var(--mint) 55%, transparent); }
.agent-row.online .agent-copy small { color: var(--mint); }
.sidebar-empty { color: var(--quiet); font-size: 11px; line-height: 1.55; padding: 8px; }
.sidebar-footer { align-items: center; border-top: 1px solid var(--line-soft); color: var(--quiet); display: flex; font-size: 11px; gap: 7px; margin-top: 18px; padding: 14px 7px 0; }
.connection-dot { background: var(--amber); border-radius: 50%; height: 7px; width: 7px; }
.connection-dot.online { background: var(--mint); box-shadow: 0 0 8px color-mix(in srgb, var(--mint) 45%, transparent); }
.connection-dot.error { background: var(--red); }
.theme-button { background: transparent; border: 0; color: var(--quiet); cursor: pointer; font-size: 17px; margin-left: auto; padding: 3px 5px; }

.workspace { display: flex; flex-direction: column; min-height: 0; min-width: 0; overflow: hidden; }
.workspace-header { align-items: center; border-bottom: 1px solid var(--line); display: flex; flex: none; justify-content: space-between; min-height: 112px; padding: calc(22px + var(--safe-top)) 26px 18px; }
.workspace-identity { min-width: 0; }
.workspace-kicker { color: var(--quiet); font-size: 10px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
.workspace-header h1 { font-size: 25px; letter-spacing: -.035em; margin: 4px 0 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.project-id { align-items: center; background: transparent; border: 0; color: var(--quiet); cursor: pointer; display: flex; gap: 7px; margin: 0; max-width: 58vw; padding: 2px 0; }
.project-id code { font-size: 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.project-id span { color: var(--accent); font-size: 9px; font-weight: 760; text-transform: uppercase; }
.repository-label { align-items: center; color: var(--quiet); display: flex; gap: 7px; margin-top: 2px; max-width: 58vw; }
.repository-label span { color: var(--mint); font-size: 9px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.repository-label code { font-size: 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.workspace-actions { align-items: center; display: flex; flex: none; gap: 8px; }
.button-primary, .button-secondary, .icon-button { align-items: center; border-radius: 9px; cursor: pointer; display: inline-flex; font-size: 12px; font-weight: 750; gap: 6px; justify-content: center; min-height: 36px; padding: 0 13px; }
.button-primary { background: var(--accent); border: 1px solid var(--accent); color: var(--accent-ink); }
.button-primary:hover:not(:disabled) { background: var(--accent-hover); border-color: var(--accent-hover); }
.button-secondary, .icon-button { background: var(--surface); border: 1px solid var(--line); color: var(--ink-soft); }
.button-secondary:hover:not(:disabled), .icon-button:hover:not(:disabled) { background: var(--surface-hover); border-color: var(--line-strong); }
.button-primary:disabled, .button-secondary:disabled { cursor: not-allowed; opacity: .48; }
.icon-button { font-size: 20px; height: 34px; min-height: 34px; padding: 0; width: 34px; }
.icon-button.compact { background: transparent; font-size: 17px; height: 25px; min-height: 25px; width: 25px; }
.button-primary.wide { width: 100%; }
.notice { background: var(--red-surface); border-bottom: 1px solid color-mix(in srgb, var(--red) 38%, var(--line)); color: var(--red); font-size: 12px; padding: 9px 26px; }

.workspace-empty { align-items: center; display: flex; flex: 1; flex-direction: column; justify-content: center; padding: 40px; text-align: center; }
.workspace-empty h2 { font-size: clamp(30px, 4vw, 50px); letter-spacing: -.055em; margin: 11px 0; }
.workspace-empty p { color: var(--muted); line-height: 1.65; margin: 0 0 23px; max-width: 460px; }
.empty-orbit { border: 1px solid var(--accent-line); border-radius: 50%; height: 64px; margin-bottom: 22px; position: relative; width: 64px; }
.empty-orbit::before { border: 1px solid var(--line); border-radius: 50%; content: ""; inset: 9px; position: absolute; }
.empty-orbit span { background: var(--accent); border-radius: 50%; box-shadow: 0 0 14px color-mix(in srgb, var(--accent) 55%, transparent); height: 10px; left: 4px; position: absolute; top: 14px; width: 10px; }

.board-wrap { display: flex; flex: 1; flex-direction: column; min-height: 0; }
.board-tabs { display: none; }
.task-board { display: grid; flex: 1; gap: 15px; grid-template-columns: repeat(3, minmax(220px, 1fr)); min-height: 0; overflow: auto; padding: 20px 22px 28px; }
.task-column { min-width: 0; }
.column-heading { align-items: flex-start; display: flex; justify-content: space-between; padding: 0 3px 12px; }
.column-heading > span { align-items: center; display: flex; font-size: 12px; font-weight: 800; gap: 7px; }
.column-heading b { background: var(--surface-3); border-radius: 99px; color: var(--muted); font-size: 10px; padding: 1px 6px; }
.column-heading small { color: var(--quiet); font-size: 10px; }
.column-dot { background: var(--feature); border-radius: 50%; height: 7px; width: 7px; }
.column-dot.running { background: var(--accent); box-shadow: 0 0 8px color-mix(in srgb, var(--accent) 45%, transparent); }
.column-dot.done { background: var(--mint); }
.column-cards { display: grid; gap: 9px; }
.column-empty { align-items: center; border: 1px dashed var(--line); border-radius: 11px; color: var(--quiet); display: flex; font-size: 11px; justify-content: center; min-height: 90px; padding: 15px; text-align: center; }
.task-card { background: var(--surface); border: 1px solid var(--line); border-radius: 11px; cursor: pointer; display: grid; gap: 9px; min-width: 0; padding: 12px; text-align: left; transition: background .15s ease, border-color .15s ease, transform .15s ease; width: 100%; }
.task-card:hover { background: var(--surface-2); border-color: var(--line-strong); transform: translateY(-1px); }
.task-card.selected { background: var(--accent-surface); border-color: var(--accent-line); box-shadow: 0 12px 36px var(--shadow); }
.task-card.failed, .task-card.orphaned { background: var(--red-surface); border-color: color-mix(in srgb, var(--red) 38%, var(--line)); }
.task-card-top, .task-card-footer { align-items: center; display: flex; justify-content: space-between; min-width: 0; }
.task-number { border: 1px solid var(--line); border-radius: 5px; color: var(--quiet); font-size: 9px; font-weight: 800; padding: 1px 5px; }
.task-card time { color: var(--quiet); font-size: 9px; }
.task-card strong { font-size: 13px; letter-spacing: -.012em; line-height: 1.35; }
.task-card-prompt { color: var(--muted); display: -webkit-box; font-size: 11px; line-height: 1.5; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.task-card-footer { border-top: 1px solid var(--line-soft); color: var(--quiet); font-size: 9px; padding-top: 8px; }
.status-chip { background: var(--surface-3); border: 1px solid var(--line); border-radius: 99px; color: var(--muted); display: inline-flex; font-size: 9px; font-weight: 800; letter-spacing: .05em; padding: 2px 7px; text-transform: uppercase; }
.status-chip.running, .status-chip.leased, .status-chip.queued { background: var(--accent-surface); border-color: var(--accent-line); color: var(--accent); }
.status-chip.completed { background: var(--mint-surface); border-color: color-mix(in srgb, var(--mint) 38%, var(--line)); color: var(--mint); }
.status-chip.failed, .status-chip.orphaned { background: var(--red-surface); border-color: color-mix(in srgb, var(--red) 38%, var(--line)); color: var(--red); }

.task-inspector { background: var(--surface); border-left: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; min-width: 0; overflow: hidden; }
.inspector-header { align-items: flex-start; border-bottom: 1px solid var(--line); display: flex; flex: none; justify-content: space-between; min-height: 112px; padding: calc(23px + var(--safe-top)) calc(19px + var(--safe-right)) 18px 20px; }
.inspector-header h2 { font-size: 18px; letter-spacing: -.025em; line-height: 1.25; margin: 5px 10px 0 0; }
.inspector-scroll { flex: 1; min-height: 0; overflow-y: auto; padding: 18px 20px; }
.status-line { align-items: center; display: flex; justify-content: space-between; }
.status-line time { color: var(--quiet); font-size: 10px; }
.inspector-section { border-top: 1px solid var(--line-soft); margin-top: 18px; padding-top: 18px; }
.inspector-section h3 { font-size: 10px; letter-spacing: .12em; margin: 0 0 9px; text-transform: uppercase; }
.inspector-section p { color: var(--muted); font-size: 12px; line-height: 1.65; margin: 0; }
.preserve-lines { overflow-wrap: anywhere; white-space: pre-wrap; }
.configuration-grid { display: grid; gap: 7px; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 18px; }
.configuration-grid > div { background: var(--surface-inset); border: 1px solid var(--line-soft); border-radius: 8px; display: grid; gap: 2px; padding: 8px; }
.configuration-grid span { color: var(--quiet); font-size: 9px; text-transform: uppercase; }
.configuration-grid strong { color: var(--ink-soft); font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.result-copy { background: var(--surface-inset); border: 1px solid var(--line-soft); border-radius: 9px; color: var(--ink-soft); font-size: 11px; line-height: 1.6; max-height: 320px; overflow: auto; padding: 11px; }
.section-heading-row { align-items: center; display: flex; justify-content: space-between; }
.section-heading-row small { color: var(--quiet); font-size: 9px; }
.event-list { display: grid; gap: 10px; list-style: none; margin: 0; padding: 0 0 0 8px; }
.event-list li { border-left: 1px solid var(--line); display: grid; gap: 3px; padding-left: 12px; position: relative; }
.event-list li::before { background: var(--accent); border: 2px solid var(--surface); border-radius: 50%; content: ""; height: 7px; left: -4px; position: absolute; top: 4px; width: 7px; }
.event-list strong { font-size: 10px; }
.event-list p { color: var(--muted); font-size: 10px; line-height: 1.5; margin: 0; white-space: pre-wrap; }
.event-list time { color: var(--quiet); font-size: 9px; }
.inspector-actions { border-top: 1px solid var(--line); display: grid; gap: 8px; grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 14px 20px calc(14px + var(--safe-bottom)); }
.inspector-actions > :only-child { grid-column: 1 / -1; }
.git-section .section-heading-row { margin-bottom: 10px; }
.git-summary { overflow-wrap: anywhere; }
.git-files { display: grid; gap: 5px; list-style: none; margin: 12px 0 0; padding: 0; }
.git-files li { align-items: baseline; background: var(--surface-inset); border: 1px solid var(--line-soft); border-radius: 7px; display: grid; font-size: 10px; gap: 8px; grid-template-columns: 25px minmax(0, 1fr); padding: 6px 8px; }
.git-files code { color: var(--amber); font-size: 9px; font-weight: 800; }
.git-files span { overflow-wrap: anywhere; }
.git-diff { background: var(--surface-inset); border: 1px solid var(--line-soft); border-radius: 8px; color: var(--ink-soft); font-size: 10px; line-height: 1.55; margin: 12px 0; max-height: 360px; overflow: auto; padding: 10px; white-space: pre; }
.git-section .button-primary { margin-top: 12px; }

.modal { background: var(--surface); border: 1px solid var(--line-strong); border-radius: 14px; box-shadow: 0 24px 80px var(--shadow-strong); color: var(--ink); max-height: calc(100dvh - 30px); padding: 0; width: min(450px, calc(100vw - 30px)); }
.modal.task-modal { width: min(620px, calc(100vw - 30px)); }
.modal::backdrop { backdrop-filter: blur(5px); background: color-mix(in srgb, var(--bg) 75%, transparent); }
.modal form { display: grid; gap: 15px; padding: 22px; }
.modal-heading { align-items: flex-start; display: flex; justify-content: space-between; }
.modal-heading h2 { font-size: 20px; letter-spacing: -.025em; margin: 3px 0 0; }
.modal-intro { color: var(--muted); font-size: 12px; line-height: 1.6; margin: -3px 0 1px; }
.field { display: grid; gap: 6px; }
.field > span { color: var(--ink-soft); font-size: 11px; font-weight: 700; }
.field input, .field textarea, .field select { background: var(--surface-inset); border: 1px solid var(--line); border-radius: 8px; min-width: 0; padding: 9px 10px; width: 100%; }
.field textarea { line-height: 1.55; resize: vertical; }
.field input:hover, .field textarea:hover, .field select:hover { border-color: var(--line-strong); }
.form-grid { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-error { background: var(--red-surface); border: 1px solid color-mix(in srgb, var(--red) 38%, var(--line)); border-radius: 8px; color: var(--red); font-size: 11px; margin: 0; padding: 8px 10px; }
.check-field { align-items: flex-start; background: var(--surface-inset); border: 1px solid var(--line-soft); border-radius: 8px; cursor: pointer; display: flex; font-size: 11px; gap: 8px; padding: 10px; }
.check-field input { accent-color: var(--accent); margin: 2px 0 0; }
.check-field code { color: var(--accent); font-size: 10px; }
.chat-history { background: var(--surface-inset); border: 1px solid var(--line-soft); border-radius: 10px; display: grid; gap: 14px; max-height: 38dvh; min-height: 120px; overflow-y: auto; padding: 12px; }
.chat-empty { align-items: center; color: var(--quiet); display: flex; font-size: 11px; justify-content: center; min-height: 94px; text-align: center; }
.chat-turn { display: grid; gap: 8px; }
.chat-question, .chat-answer { display: grid; gap: 3px; }
.chat-question span, .chat-answer span { color: var(--quiet); font-size: 9px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.chat-question p, .chat-answer p { border: 1px solid var(--line-soft); border-radius: 9px; font-size: 11px; line-height: 1.6; margin: 0; overflow-wrap: anywhere; padding: 9px 10px; white-space: pre-wrap; }
.chat-question p { background: var(--accent-surface); border-color: var(--accent-line); margin-left: 32px; }
.chat-answer p { background: var(--surface); margin-right: 32px; }
.chat-answer.error p { background: var(--red-surface); border-color: color-mix(in srgb, var(--red) 38%, var(--line)); color: var(--red); }
.chat-configuration { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.modal-actions { align-items: center; border-top: 1px solid var(--line-soft); display: flex; gap: 8px; justify-content: flex-end; margin: 3px -22px -22px; padding: 14px 22px; }
.toast { background: var(--ink); border: 1px solid var(--line-strong); border-radius: 9px; bottom: calc(18px + var(--safe-bottom)); box-shadow: 0 12px 36px var(--shadow-strong); color: var(--bg); font-size: 11px; font-weight: 700; left: 50%; max-width: calc(100vw - 30px); padding: 9px 13px; position: fixed; transform: translateX(-50%); z-index: 20; }

@media (max-width: 1120px) {
  .app-shell, .app-shell:has(.task-inspector[hidden]) { grid-template-columns: 230px minmax(0, 1fr); }
  .task-inspector { bottom: 0; box-shadow: -12px 0 50px var(--shadow-strong); position: fixed; right: 0; top: 0; width: min(390px, 100vw); z-index: 10; }
  .task-board { grid-template-columns: repeat(3, minmax(250px, 1fr)); overflow-x: auto; }
}
@media (max-width: 720px) {
  .app-shell, .app-shell:has(.task-inspector[hidden]) { display: block; height: auto; min-height: 100dvh; overflow: visible; }
  .project-sidebar { border-bottom: 1px solid var(--line); border-right: 0; max-height: none; overflow: visible; padding: calc(12px + var(--safe-top)) calc(12px + var(--safe-right)) 11px calc(12px + var(--safe-left)); }
  .brand-row { padding: 0 3px 11px; }
  .brand-mark { border-radius: 7px; flex-basis: 28px; height: 28px; padding: 7px; }
  .brand-mark i:nth-child(2) { height: 14px; }
  .projects-section { border-top: 1px solid var(--line-soft); padding-top: 10px; }
  .project-list { display: flex; margin-inline: -12px; overflow-x: auto; padding: 0 12px 2px; scrollbar-width: none; }
  .project-list::-webkit-scrollbar { display: none; }
  .project-button { flex: 0 0 164px; }
  .agents-section { display: none; }
  .sidebar-footer { border: 0; margin: 5px 0 0; padding: 5px 7px 0; }
  .workspace { min-height: 620px; overflow: visible; }
  .workspace-header { backdrop-filter: blur(18px); background: var(--chrome); min-height: 124px; padding: 15px calc(15px + var(--safe-right)) 13px calc(15px + var(--safe-left)); position: sticky; top: 0; z-index: 5; }
  .workspace-header h1 { font-size: 21px; }
  .workspace-actions .button-secondary span:last-child { display: none; }
  .workspace-actions .button-secondary { padding: 0; width: 36px; }
  .board-tabs { background: var(--chrome); border-bottom: 1px solid var(--line); display: grid; grid-template-columns: repeat(3, 1fr); padding: 0 12px; position: sticky; top: 124px; z-index: 4; }
  .board-tab { background: transparent; border: 0; border-bottom: 2px solid transparent; color: var(--quiet); font-size: 11px; font-weight: 750; padding: 11px 4px 9px; }
  .board-tab.active { border-color: var(--accent); color: var(--ink); }
  .board-tab b { background: var(--surface-3); border-radius: 99px; font-size: 9px; margin-left: 3px; padding: 1px 5px; }
  .task-board { display: flex; gap: 12px; min-height: 540px; overflow-x: auto; padding: 16px calc(15px + var(--safe-right)) calc(25px + var(--safe-bottom)) calc(15px + var(--safe-left)); scroll-snap-type: x mandatory; }
  .task-column { flex: 0 0 calc(100vw - 42px); scroll-snap-align: start; }
  .column-heading { padding-bottom: 10px; }
  .task-card { padding: 13px; }
  .task-card strong { font-size: 14px; }
  .workspace-empty { min-height: 520px; padding: 36px 22px; }
  .workspace-empty h2 { font-size: 33px; }
  .task-inspector { width: 100vw; }
  .inspector-header { min-height: 95px; padding-top: calc(17px + var(--safe-top)); }
  .modal { border-radius: 14px 14px 0 0; bottom: 0; max-height: calc(100dvh - var(--safe-top) - 10px); max-width: none; position: fixed; top: auto; width: 100vw; }
  .modal.task-modal { width: 100vw; }
  .modal form { max-height: calc(100dvh - var(--safe-top) - 10px); overflow-y: auto; padding-bottom: calc(22px + var(--safe-bottom)); }
  .form-grid { grid-template-columns: 1fr; }
  .chat-history { max-height: 34dvh; }
  .chat-question p { margin-left: 18px; }
  .chat-answer p { margin-right: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
