:root {
  color-scheme: light;
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-alt: #f7f9fc;
  --line: #d8dee9;
  --text: #1f2937;
  --muted: #64748b;
  --primary: #0031d8;
  --primary-dark: #001a75;
  --danger: #c2410c;
  --warning: #a16207;
  --success: #047857;
  --shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
  font-family: "Inter", "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body,
#app {
  min-height: 100%;
  margin: 0;
}

body {
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
}

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

button {
  border: 0;
  cursor: pointer;
}

.login {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 24px;
}

.login-panel {
  width: min(480px, 100%);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 28px;
}

.app-shell {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: auto;
  background: #ffffff;
  border-right: 1px solid var(--line);
  padding: 28px 22px;
}

.sidebar-head {
  display: block;
}

.sidebar-close,
.sidebar-backdrop,
.mobile-menu-button {
  display: none;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-bottom: 24px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--line);
}

.brand-logo {
  display: block;
  width: 48px;
  height: 48px;
  object-fit: contain;
  flex: 0 0 48px;
}

.brand-name {
  color: var(--primary);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.product-name {
  font-size: 22px;
  line-height: 1.1;
  font-weight: 800;
}

.login-brand {
  border-bottom: 0;
  padding-bottom: 0;
}

.google-button {
  display: flex;
  justify-content: center;
  min-height: 44px;
  margin-top: 20px;
}

.login-form {
  margin-top: 20px;
}

.login-submit {
  width: 100%;
  margin-top: 4px;
}

.notice {
  margin-top: 18px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-alt);
  color: var(--muted);
  font-size: 14px;
}

.notice.error {
  border-color: #f4b4b4;
  background: #fff5f5;
  color: #9f1239;
}

.notice.warn {
  border-color: #f5d08a;
  background: #fffaf0;
  color: #713f12;
}

.notice.warn p {
  margin: 8px 0 0;
}

.nav {
  display: grid;
  gap: 4px;
}

.nav button {
  width: 100%;
  padding: 10px 12px;
  border-left: 4px solid transparent;
  border-radius: 0;
  background: transparent;
  color: var(--text);
  text-align: left;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav button.active,
.nav button:hover {
  background: #eef3ff;
  border-left-color: var(--primary);
  color: var(--primary-dark);
}

.badge {
  display: inline-grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  padding: 0 7px;
  border-radius: 999px;
  background: #e6ecf6;
  color: #334155;
  font-size: 12px;
  font-weight: 700;
}

.badge.alert {
  background: #fee2e2;
  color: #991b1b;
}

.sidebar-footer {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
}

.main {
  min-width: 0;
  padding: 28px 36px 36px;
  background: var(--surface-alt);
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  margin: -28px -36px 24px;
  padding: 28px 36px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.topbar.compact {
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 16px;
  padding: 16px 36px;
}

.task-error {
  margin: 0;
  flex: 1 1 260px;
}

.dashboard-status-notice {
  margin: 0 0 14px;
}

.live-status {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f8fafc;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.live-status.connected {
  border-color: #b7e4cc;
  background: #f6fbf8;
  color: #166534;
}

.live-status.pending {
  border-color: #f5d08a;
  background: #fffaf0;
  color: #92400e;
}

.live-status.disconnected {
  border-color: #f3a6ad;
  background: #fff1f2;
  color: #991b1b;
}

.eyebrow {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  margin: 0 0 6px;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 8px;
  font-size: clamp(1.7rem, 2vw, 2.2rem);
  line-height: 1.2;
}

h2 {
  margin-bottom: 14px;
  font-size: 20px;
}

h3 {
  margin-bottom: 8px;
  font-size: 15px;
}

.lead {
  color: var(--muted);
  line-height: 1.6;
  margin: 0;
}

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

.button {
  min-height: 40px;
  border-radius: 6px;
  padding: 0 14px;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
}

.button.secondary {
  background: #e7ecf5;
  color: #1e293b;
}

.button.warning {
  background: var(--primary);
}

.button.danger {
  background: #b91c1c;
}

.button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}

.metric {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  box-shadow: var(--shadow);
}

.metric-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.metric-value {
  margin-top: 4px;
  font-size: 26px;
  font-weight: 800;
}

.section {
  display: none;
}

.section.active {
  display: block;
}

.board {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(300px, 1fr);
  gap: 16px;
  overflow-x: auto;
  padding-bottom: 12px;
}

.owner-review-band {
  margin-bottom: 14px;
  padding: 12px;
  background: #fff7f7;
  border: 1px solid #f3a6ad;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.owner-review-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.owner-review-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 10px;
}

.lane {
  min-height: 520px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  box-shadow: var(--shadow);
}

.lane-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
  min-height: 54px;
  padding: 4px 2px 10px;
}

.lane-title {
  display: flex;
  align-items: center;
  min-height: 40px;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.35;
}

.cards {
  display: grid;
  gap: 10px;
}

.card {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  text-align: left;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.card:hover {
  border-color: var(--primary);
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.08);
}

.card.tone-new {
  background: #f3f5f8;
  border-color: #cbd5e1;
}

.card.tone-human {
  background: #fff1f2;
  border-color: #f3a6ad;
}

.card.tone-assigned {
  background: #eef4ff;
  border-color: #adc4ff;
}

.card.tone-scheduled,
.card.scheduled {
  background: #fff7ed;
  border-color: #fdba74;
}

.card.tone-review,
.card.review {
  background: #f4f0ff;
  border-color: #c4b5fd;
}

.card.tone-done,
.card.done {
  background: #edf8f1;
  border-color: #9bd9b8;
  opacity: 0.78;
}

.card.tone-working,
.card.running {
  background: #e8f6ee;
  border-color: #75c69a;
}

.card-title {
  display: block;
  font-weight: 800;
  line-height: 1.45;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 12px;
}

.card-submeta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: #eef3ff;
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}

.status-pill,
.assignee-pill {
  min-height: 28px;
}

.status-blocked,
.pill.warn {
  background: #eef3ff;
  color: var(--primary-dark);
}

.status-ready,
.status-todo,
.status-triage {
  background: #eef2f7;
  color: #475569;
}

.status-scheduled {
  background: #ffedd5;
  color: #9a3412;
}

.status-running {
  background: #dcfce7;
  color: #166534;
}

.status-review {
  background: #ede9fe;
  color: #5b21b6;
}

.status-done,
.pill.ok {
  background: #d1fae5;
  color: #065f46;
}

.role-intake {
  background: #f1f5f9;
  color: #475569;
}

.role-owner {
  background: #fee2e2;
  color: #991b1b;
}

.role-engineering {
  background: #e0f2fe;
  color: #075985;
}

.role-content {
  background: #f5e8ff;
  color: #6b21a8;
}

.role-business {
  background: #fef3c7;
  color: #92400e;
}

.role-operations {
  background: #dcfce7;
  color: #166534;
}

.role-default {
  background: #e2e8f0;
  color: #334155;
}

.panel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
}

.page-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  align-items: start;
}

.info-grid.two-column {
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
}

.security-grid {
  grid-auto-rows: 1fr;
  align-items: stretch;
  margin-bottom: 16px;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
}

button.panel {
  width: 100%;
  color: inherit;
  text-align: left;
}

button.panel:hover {
  border-color: var(--primary);
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.08);
}

.list {
  display: grid;
  gap: 10px;
}

.status-card {
  display: grid;
  align-content: center;
  gap: 12px;
  min-height: 58px;
  height: 100%;
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: inherit;
  text-align: left;
}

.status-card.ok {
  border-color: #b7e4cc;
  background: #f6fbf8;
}

.status-card.warn {
  border-color: #f5d08a;
  background: #fffaf0;
}

.status-card.danger {
  border-color: #f3a6ad;
  background: #fff1f2;
}

.status-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
}

.status-card h3 {
  margin: 0;
  font-size: 16px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.status-card p {
  display: none;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.status-card.warn p,
.status-card.danger p {
  display: block;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.25;
  text-align: center;
  white-space: normal;
  max-width: 180px;
}

.status-ok-chip {
  background: #dcfce7;
  color: #166534;
}

.status-warn-chip {
  background: #fef3c7;
  color: #92400e;
}

.status-danger-chip {
  background: #fee2e2;
  color: #991b1b;
}

.status-info-chip {
  background: #eef3ff;
  color: var(--primary-dark);
}

.policy-panel {
  margin-top: 16px;
}

.clean-list {
  display: grid;
  gap: 8px;
  margin: 10px 0 0;
  padding-left: 1.2em;
}

.clean-list.compact-list {
  gap: 4px;
  margin-top: 8px;
}

.definition-list {
  display: grid;
  gap: 0;
  margin: 16px 0 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.definition-list div {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.definition-list div:nth-child(odd) {
  background: #f8fafc;
}

.definition-list div:last-child {
  border-bottom: 0;
}

.definition-list dt,
.definition-list dd {
  margin: 0;
}

.definition-list dt {
  color: var(--muted);
  font-weight: 800;
}

.definition-list dd {
  word-break: break-word;
}

.status-panel {
  display: grid;
  gap: 12px;
}

.service-note {
  margin-top: 4px;
}

.history-list {
  display: grid;
}

.history-row {
  display: grid;
  grid-template-columns: 180px 84px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.history-row:last-child {
  border-bottom: 0;
}

.history-time {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.history-row code,
.definition-list code,
.clean-list code {
  font: 12px/1.5 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  color: #334155;
  background: #eef2f7;
  border-radius: 5px;
  padding: 2px 5px;
  word-break: break-all;
}

.log-summary-card {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.log-summary-main {
  font-weight: 800;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.log-summary-time {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.row {
  display: grid;
  gap: 4px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.row:last-child {
  border-bottom: 0;
}

.alert-row {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.alert-row strong {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.alert-row.ok {
  border-color: #b7e4cc;
  background: #f6fbf8;
}

.alert-row.warn {
  border-color: #f5d08a;
  background: #fffaf0;
}

.alert-row.danger {
  border-color: #f3a6ad;
  background: #fff1f2;
}

.empty.success {
  border-color: #b7e4cc;
  background: #f6fbf8;
  color: #166534;
}

.agent-row {
  display: grid;
  grid-template-columns: 12px 1fr auto;
  align-items: center;
  gap: 10px;
}

.agent-card {
  cursor: pointer;
}

.clickable-card {
  width: 100%;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.clickable-card:hover {
  border-color: #93c5fd;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.08);
}

.lamp {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #cbd5e1;
}

.lamp.on {
  background: #16a34a;
  box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.16);
}

.drawer {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 20;
}

.drawer.open {
  display: block;
}

.drawer-backdrop {
  position: absolute;
  inset: 0 auto 0 0;
  width: calc(100% - min(680px, 100vw));
  height: 100%;
  padding: 0;
  border: 0;
  background: rgba(15, 23, 42, 0.45);
}

.drawer-panel {
  position: absolute;
  top: 0;
  right: 0;
  width: min(680px, 100vw);
  height: 100%;
  overflow: auto;
  background: var(--surface);
  padding: 24px;
  box-shadow: var(--shadow);
}

.drawer-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.task-drawer-header {
  position: sticky;
  top: -24px;
  z-index: 2;
  margin: -24px -24px 20px;
  padding: 20px 24px 14px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(10px);
}

.task-drawer-header h2 {
  margin: 0;
  font-size: 22px;
  line-height: 1.35;
}

.task-current-state {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 0 0 20px;
}

.detail-grid.compact {
  margin-bottom: 14px;
}

.detail-grid.compact .detail-item {
  min-height: 58px;
}

.skill-card {
  display: grid;
  gap: 10px;
  min-height: 128px;
  align-content: start;
}

.automation-card {
  display: grid;
  gap: 12px;
}

.automation-list {
  display: grid;
  gap: 10px;
}

.automation-summary-card {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto;
  align-items: center;
  gap: 16px;
  min-height: 72px;
  padding: 12px 16px;
}

.automation-summary-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.automation-summary-name {
  font-size: 15px;
  font-weight: 800;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.automation-summary-description {
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.automation-summary-meta {
  display: inline-flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}

.automation-type-pill {
  background: #f1f5f9;
  color: #475569;
}

.skill-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.internal-name {
  font-size: 12px;
  word-break: break-word;
}

.skill-summary-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.skill-usecase {
  min-height: 84px;
}

.detail-item {
  display: grid;
  gap: 3px;
  min-height: 76px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.detail-item span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.detail-item strong {
  font-size: 14px;
  line-height: 1.35;
}

.detail-item small {
  color: var(--muted);
  font-size: 12px;
  word-break: break-word;
}

.close {
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  border-radius: 6px;
  background: #eef2f7;
  color: var(--text);
  font-size: 22px;
}

.pre {
  white-space: pre-wrap;
  word-break: break-word;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  color: #334155;
  line-height: 1.55;
}

.prompt-panel {
  margin-top: 20px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.prompt-panel h3 {
  margin-top: 0;
}

.prompt-source {
  margin-top: 8px;
  font-size: 12px;
  word-break: break-word;
}

.prompt-code {
  max-height: 520px;
  overflow: auto;
  margin: 14px 0 0;
  padding: 18px;
  border: 1px solid #1e293b;
  border-radius: 8px;
  background: #0f172a;
  color: #e5e7eb;
  font: 13px/1.7 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  white-space: pre-wrap;
  word-break: break-word;
}

.prompt-code code {
  color: inherit;
}

.approval-box {
  display: grid;
  gap: 12px;
  margin: 20px 0;
  padding: 16px;
  border: 1px solid #f3a6ad;
  border-radius: 8px;
  background: #fff7f8;
}

.approval-box .pre {
  background: #fff;
}

.approval-box.ai-handling {
  border-color: #cbd5e1;
  background: #f8fafc;
}

.task-section-title {
  margin: 24px 0 10px;
}

.task-timeline {
  margin: 24px 0;
}

.section-heading,
.timeline-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.section-heading {
  margin-bottom: 10px;
}

.section-heading h3 {
  margin: 0;
}

.section-heading .lead,
.timeline-head time,
.timeline-item small {
  color: var(--muted);
  font-size: 12px;
}

.timeline-list {
  display: grid;
  gap: 10px;
}

.timeline-item {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-left: 4px solid #94a3b8;
  border-radius: 8px;
  background: #fff;
}

.timeline-instruction {
  border-left-color: #2563eb;
  background: #eff6ff;
}

.timeline-result {
  border-left-color: #16a34a;
  background: #f0fdf4;
}

.timeline-work,
.timeline-report {
  border-left-color: #7c3aed;
}

.timeline-text {
  margin-top: 6px;
  color: #334155;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
}

.approval-actions {
  justify-content: flex-start;
}

.fab {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 15;
  border-radius: 999px;
  min-height: 52px;
  padding: 0 20px;
  background: var(--primary);
  color: #fff;
  box-shadow: var(--shadow);
  font-weight: 800;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: none;
  place-items: center;
  padding: 20px;
}

.modal.open {
  display: grid;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
}

.modal-panel {
  position: relative;
  width: min(620px, 100%);
  background: var(--surface);
  border-radius: 8px;
  padding: 22px;
  box-shadow: var(--shadow);
}

.form {
  display: grid;
  gap: 12px;
}

.field {
  display: grid;
  gap: 6px;
}

.field label {
  font-weight: 700;
  font-size: 13px;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  border: 1px solid #b7c1d1;
  border-radius: 6px;
  padding: 10px 12px;
  background: #fff;
}

.field textarea {
  min-height: 140px;
  resize: vertical;
}

.empty {
  padding: 18px;
  text-align: center;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.6);
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
}

@media (max-width: 900px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .drawer-panel {
    width: calc(100vw - 32px);
    padding: 16px;
  }

  .drawer-backdrop {
    width: 32px;
  }

  .task-drawer-header {
    top: -16px;
    margin: -16px -16px 16px;
    padding: 14px 16px 12px;
  }

  .task-drawer-header h2 {
    font-size: 18px;
  }

  .mobile-menu-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
  }

  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 60;
    width: min(320px, 86vw);
    height: 100vh;
    height: 100dvh;
    max-height: 100vh;
    max-height: 100dvh;
    padding: 22px 18px;
    border-right: 1px solid var(--line);
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.22);
    transform: translateX(-105%);
    transition: transform 180ms ease;
    will-change: transform;
  }

  .app-shell.nav-open .sidebar {
    transform: translateX(0);
  }

  .sidebar-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
  }

  .sidebar-head .brand {
    flex: 1;
    min-width: 0;
  }

  .sidebar-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 40px;
    width: 40px;
    height: 40px;
    border-radius: 6px;
    background: #e7ecf5;
    color: #1e293b;
    font-size: 24px;
    line-height: 1;
  }

  .sidebar-backdrop {
    position: fixed;
    inset: 0;
    z-index: 50;
    display: none;
    width: 100%;
    height: 100%;
    padding: 0;
    background: rgba(15, 23, 42, 0.32);
  }

  .app-shell.nav-open .sidebar-backdrop {
    display: block;
  }

  [data-region="metrics"] {
    display: none;
  }

  .board {
    grid-auto-flow: row;
    grid-auto-columns: initial;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    overflow-x: visible;
    padding-bottom: 0;
  }

  .owner-review-band {
    margin-bottom: 10px;
    padding: 10px;
  }

  .owner-review-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-height: 30vh;
    overflow-y: auto;
  }

  .lane {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    min-height: 0;
    height: min(38vh, 290px);
    padding: 10px;
  }

  .lane-header {
    min-height: 0;
    padding: 2px 0 8px;
    align-items: center;
  }

  .lane-title {
    min-height: 0;
    font-size: 13px;
  }

  .lane .badge {
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    font-size: 11px;
  }

  .cards {
    align-content: start;
    gap: 8px;
    min-height: 0;
    overflow-y: auto;
    padding-right: 2px;
  }

  .card {
    padding: 10px;
  }

  .card-title {
    font-size: 13px;
    line-height: 1.35;
  }

  .card-meta {
    gap: 5px;
    margin-top: 8px;
    font-size: 11px;
  }

  .card-submeta {
    display: none;
  }

  .card .pill {
    min-height: 24px;
    padding: 0 8px;
    font-size: 11px;
  }

  .card .assignee-pill {
    display: none;
  }

  .topbar {
    display: grid;
  }

  .page-heading {
    display: grid;
  }

  .info-grid.two-column {
    grid-template-columns: 1fr;
  }

  .definition-list div,
  .history-row {
    grid-template-columns: 1fr;
  }

  .status-card,
  .status-card-head,
  .log-summary-card {
    display: grid;
    grid-template-columns: 1fr;
    align-items: flex-start;
  }

  .automation-summary-card {
    grid-template-columns: 1fr;
    align-items: flex-start;
  }

  .automation-summary-meta {
    justify-content: flex-start;
  }

  .actions {
    justify-content: flex-start;
  }
}
