:root {
  --bg: #0b0f14;
  --bg-elev: #10161e;
  --card: #141a22;
  --card-hover: #18212c;
  --ink: #e8eef6;
  --muted: #8b9bb0;
  --task: #6ea8ff;
  --task-soft: rgba(110, 168, 255, 0.14);
  --live: #3ecf8e;
  --live-soft: rgba(62, 207, 142, 0.12);
  --alert: #e8b86d;
  --alert-soft: rgba(232, 184, 109, 0.14);
  --accent: var(--task);
  --accent-ink: #0b0f14;
  --line: #243041;
  --line-strong: #334155;
  --danger: #f07178;
  --danger-soft: rgba(240, 113, 120, 0.12);
  --ok-soft: var(--live-soft);
  --shadow: 0 1px 0 rgba(255, 255, 255, 0.03) inset, 0 8px 24px rgba(0, 0, 0, 0.28);
  --radius: 12px;
  --radius-sm: 8px;
  --font: "Noto Sans JP", "Source Sans 3", "Hiragino Sans", sans-serif;
  --focus: 0 0 0 3px rgba(110, 168, 255, 0.28);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  font-family: var(--font);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.5;
  min-height: 100%;
  background-color: var(--bg);
  background-image:
    radial-gradient(1200px 600px at 10% -10%, rgba(110, 168, 255, 0.08), transparent 55%),
    radial-gradient(900px 500px at 100% 0%, rgba(62, 207, 142, 0.05), transparent 50%),
    linear-gradient(180deg, #0d1219 0%, var(--bg) 45%, #0a0e13 100%);
  background-attachment: fixed;
}

a { color: var(--task); }
a:hover { color: #93c5ff; }

.wrap {
  max-width: 480px;
  margin: 0 auto;
  padding: 14px 16px 100px;
}

body.wide .wrap { max-width: 960px; }
body.theme-live { --accent: var(--live); --accent-ink: #062016; }
body.theme-alert { --accent: var(--alert); --accent-ink: #1a1206; }

.door-grid { display: grid; gap: 12px; }

/* —— Top bar —— */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 16px;
  flex-wrap: wrap;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.brand {
  font-weight: 800;
  font-size: 1.2rem;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-decoration: none;
}
.brand span { color: var(--task); }

.top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.top-link {
  font-weight: 650;
  font-size: 0.84rem;
  text-decoration: none;
  color: var(--muted);
}
.top-link:hover { color: var(--ink); }

/* —— HQ nav (segmented, not candy pills) —— */
.hq-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 0 0 16px;
  padding: 4px;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.hq-nav a {
  text-decoration: none;
  font-weight: 650;
  font-size: 0.84rem;
  color: var(--muted);
  padding: 9px 13px;
  border-radius: var(--radius-sm);
  background: transparent;
  transition: background .15s, color .15s;
}
.hq-nav a:hover {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.04);
}
.hq-nav a.on {
  background: var(--task);
  color: var(--accent-ink);
}

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

.lang-switch {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--bg-elev);
}
.lang-switch a {
  padding: 6px 11px;
  font-size: 0.76rem;
  font-weight: 750;
  text-decoration: none;
  color: var(--muted);
}
.lang-switch a.on {
  background: var(--task-soft);
  color: var(--task);
}

/* —— Hero —— */
.hero-banner {
  position: relative;
  margin: 0 0 16px;
  padding: 20px 18px 18px 20px;
  color: var(--ink);
  background: linear-gradient(135deg, #172030 0%, #121a24 100%);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.hero-banner::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--accent);
}
body.theme-live .hero-banner {
  background: linear-gradient(135deg, #12241c 0%, #121a22 100%);
}
body.theme-alert .hero-banner {
  background: linear-gradient(135deg, #241c12 0%, #1a1612 100%);
}
.hero-banner h1 {
  margin: 0;
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.25;
}
.hero-banner p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}
.store-chip {
  display: inline-block;
  margin-bottom: 10px;
  padding: 4px 10px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 0.02em;
}

/* —— Cards —— */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
  margin-bottom: 12px;
  box-shadow: var(--shadow);
}
.card h2, .card h1 {
  margin: 0 0 8px;
  font-size: 1.08rem;
  font-weight: 750;
  line-height: 1.3;
  letter-spacing: -0.01em;
}
.card.alert {
  background: var(--alert-soft);
  border-color: rgba(232, 184, 109, 0.35);
}
.card.ok-soft {
  background: var(--live-soft);
  border-color: rgba(62, 207, 142, 0.3);
}

.muted { color: var(--muted); font-size: 0.92rem; }
.break { word-break: break-all; font-size: 0.9rem; }

.tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 12px; }
.tag {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 6px;
  background: var(--task-soft);
  color: #b7d4ff;
  font-size: 0.76rem;
  font-weight: 700;
}
body.theme-live .tag {
  background: var(--live-soft);
  color: #9aefc4;
}

.task-row {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
}
.task-row .copy { min-width: 0; }
.btn-inline {
  width: 100%;
  padding: 12px 16px;
  min-height: 44px;
}

/* —— Buttons —— */
.btn {
  display: block;
  width: 100%;
  border: 0;
  border-radius: var(--radius-sm);
  padding: 13px 16px;
  font-size: 0.98rem;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  min-height: 46px;
  transition: filter .12s, background .12s, border-color .12s;
}
.btn-primary {
  background: var(--accent);
  color: var(--accent-ink);
}
.btn-primary:hover { filter: brightness(1.08); }
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line-strong);
  margin-top: 8px;
}
.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--muted);
}
.btn-danger {
  background: var(--danger-soft);
  color: var(--danger);
  border: 1px solid rgba(240, 113, 120, 0.35);
  margin-top: 8px;
}
.btn-danger:hover { background: rgba(240, 113, 120, 0.2); }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; }
.btn-sm {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  min-width: 0;
  min-height: 36px;
  padding: 8px 12px;
  font-size: 0.84rem;
  margin-top: 0;
}

.stack { display: grid; gap: 8px; }

/* —— Forms —— */
label {
  display: block;
  font-weight: 650;
  margin: 12px 0 6px;
  color: #c5d0de;
  font-size: 0.9rem;
}
input, textarea, select {
  width: 100%;
  font: inherit;
  padding: 12px 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #0f141c;
  color: var(--ink);
}
input::placeholder, textarea::placeholder { color: #5f7088; }
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--task);
  box-shadow: var(--focus);
}
select option { background: #141a22; color: var(--ink); }
textarea { min-height: 100px; resize: vertical; }

.mt6 { margin-top: 6px; }
.mt10 { margin-top: 10px; }
.mt14 { margin-top: 14px; }

/* —— Store bottom nav —— */
.nav {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  background: rgba(16, 22, 30, 0.94);
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  padding: 6px 8px calc(8px + env(safe-area-inset-bottom));
  backdrop-filter: blur(12px);
  z-index: 20;
}
.nav a {
  text-align: center;
  text-decoration: none;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
  padding: 12px 4px;
  min-height: 48px;
}
.nav a.active { color: var(--task); }
body.theme-live .nav a.active { color: var(--live); }

.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 6px;
  background: var(--task-soft);
  color: #b7d4ff;
  font-size: 0.76rem;
  font-weight: 700;
}

.flash {
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
  font-weight: 600;
  font-size: 0.92rem;
  border: 1px solid transparent;
}
.flash.ok {
  background: var(--live-soft);
  color: #9aefc4;
  border-color: rgba(62, 207, 142, 0.3);
}
.flash.err {
  background: var(--danger-soft);
  color: #ffb4b8;
  border-color: rgba(240, 113, 120, 0.35);
}
.flash.info {
  background: var(--task-soft);
  color: #b7d4ff;
  border-color: rgba(110, 168, 255, 0.3);
}

.score-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.score-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
}
.score-card .num {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--live);
  line-height: 1.1;
  letter-spacing: -0.02em;
}
.score-card .lbl {
  font-size: 0.8rem;
  color: var(--muted);
  font-weight: 700;
  margin-top: 4px;
}

/* —— HQ —— */
.hq-metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 14px;
}
.hq-metric {
  display: block;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  text-decoration: none;
  color: inherit;
  transition: border-color .15s, background .15s;
}
.hq-metric:hover {
  border-color: var(--line-strong);
  background: var(--card-hover);
  color: inherit;
}
.hq-metric.hot {
  border-color: rgba(232, 184, 109, 0.45);
  background: var(--alert-soft);
}
.hq-metric .n {
  font-size: 1.65rem;
  font-weight: 800;
  color: var(--task);
  letter-spacing: -0.03em;
  line-height: 1.1;
}
.hq-metric.hot .n { color: var(--alert); }
.hq-metric .l {
  font-size: 0.76rem;
  color: var(--muted);
  font-weight: 700;
  margin-top: 4px;
}

.hq-actions { list-style: none; margin: 0; padding: 0; }
.hq-actions li { border-bottom: 1px solid var(--line); }
.hq-actions li:last-child { border-bottom: 0; }
.hq-actions a {
  display: block;
  padding: 13px 2px;
  font-weight: 700;
  text-decoration: none;
  color: var(--task);
}
.hq-actions a:hover { color: #93c5ff; }

.store-link { text-decoration: none; color: inherit; }
.store-link:hover { color: var(--task); }
.hq-row-link { cursor: pointer; }
.hq-row-link:hover { background: rgba(255, 255, 255, 0.03); }

.queue-item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.9rem;
}
.queue-item:last-child { border-bottom: 0; }
.queue-main { flex: 1; min-width: 160px; }
.queue-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.queue-actions form { margin: 0; }

.hq-layout {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 14px;
  align-items: start;
}

.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.hq-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  min-width: 480px;
}
.hq-table th, .hq-table td {
  text-align: left;
  padding: 12px 10px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.hq-table th {
  color: var(--muted);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 750;
}
.hq-table .bad { color: var(--danger); font-weight: 700; }

.links-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 10px;
}
.links-row a { font-weight: 700; }

.file-form { display: grid; gap: 10px; margin-top: 8px; }
.file-btn {
  display: block;
  border: 1px dashed var(--line-strong);
  background: rgba(110, 168, 255, 0.06);
  border-radius: var(--radius);
  padding: 18px;
  text-align: center;
  cursor: pointer;
  color: var(--task);
  font-weight: 700;
  margin: 0;
  transition: border-color .15s, background .15s;
}
.file-btn:hover {
  border-color: var(--task);
  background: var(--task-soft);
}
.file-btn input { display: none; }

.note-box {
  background: var(--alert-soft);
  border: 1px solid rgba(232, 184, 109, 0.35);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-size: 0.9rem;
  margin-bottom: 12px;
  color: #f0d6a8;
}

/* —— Login doors —— */
.door-card {
  display: block;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 18px;
  margin-bottom: 12px;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow);
  border-left: 3px solid var(--task);
  transition: border-color .15s, background .15s, transform .12s;
}
.door-card.door-store { border-left-color: var(--live); }
.door-card:hover {
  background: var(--card-hover);
  border-color: var(--line-strong);
  color: inherit;
  transform: translateY(-1px);
}
.door-label {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--task);
  margin-bottom: 8px;
}
.door-store .door-label { color: var(--live); }
.door-title {
  display: block;
  font-size: 1.22rem;
  font-weight: 800;
  margin-bottom: 8px;
  letter-spacing: -0.02em;
}
.door-body {
  display: block;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.45;
}
.center-note {
  text-align: center;
  margin-top: 10px;
  font-size: 0.88rem;
}
.check-list {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 14px;
}
.check-list li {
  font-size: 0.88rem;
  color: var(--muted);
  display: flex;
  gap: 8px;
  align-items: baseline;
}
.check-list li.ok { color: var(--live); }
.check-list li.miss { color: var(--muted); }
.check-list .mark {
  font-weight: 800;
  width: 1rem;
  flex: 0 0 auto;
}
.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  filter: none;
}
@media (max-width: 720px) {
  .check-list { grid-template-columns: 1fr; }
}

/* —— Desktop —— */
@media (min-width: 768px) {
  .wrap {
    max-width: 760px;
    padding: 28px 32px 48px;
  }
  body.wide .wrap {
    max-width: 1180px;
    padding: 28px 40px 48px;
  }
  .topbar { margin-bottom: 20px; padding-bottom: 14px; }
  .brand { font-size: 1.35rem; }
  .hero-banner {
    margin: 0 0 20px;
    padding: 28px 28px 24px 30px;
  }
  .hero-banner h1 { font-size: 1.75rem; }
  .door-grid {
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 8px;
  }
  .door-card {
    margin-bottom: 0;
    min-height: 170px;
    padding: 26px 22px;
  }
  .door-title { font-size: 1.35rem; }
  .card { padding: 20px 22px; margin-bottom: 14px; }
  .task-row {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
  }
  .task-row .copy { flex: 1; }
  .btn-inline {
    width: auto;
    min-width: 128px;
    flex: 0 0 auto;
  }
  .btn { max-width: 420px; }
  .btn-ghost, .btn-danger { max-width: 420px; }
  body.wide .btn,
  body.wide .btn-ghost,
  body.wide .btn-danger { max-width: none; }
  .score-grid { gap: 16px; }
  .score-card .num { font-size: 2.1rem; }
  .hq-metrics { gap: 14px; margin-bottom: 20px; }
  .hq-metric { padding: 18px; }
  .hq-metric .n { font-size: 1.9rem; }
  .hq-layout { gap: 18px; }
  .hq-nav { margin-bottom: 18px; padding: 5px; }
  .hq-nav a { font-size: 0.88rem; padding: 10px 16px; }

  body:has(> .nav) {
    display: flex;
    flex-direction: column;
  }
  body:has(> .nav) > .nav {
    order: -1;
    position: sticky;
    top: 0;
    left: auto;
    right: auto;
    bottom: auto;
    width: 100%;
    max-width: 760px;
    margin: 16px auto 0;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(16, 22, 30, 0.96);
    box-shadow: var(--shadow);
    z-index: 30;
  }
  body:has(> .nav) > .wrap {
    order: 1;
    padding-bottom: 40px;
  }
}

@media (min-width: 1100px) {
  body.wide .wrap { max-width: 1280px; }
}

@media (max-width: 720px) {
  .hq-metrics { grid-template-columns: repeat(2, 1fr); }
  .hq-layout { grid-template-columns: 1fr; }
}

@media (max-width: 420px) {
  .top-link { font-size: 0.8rem; }
  body { font-size: 15px; }
  .hq-nav a { padding: 8px 10px; font-size: 0.8rem; }
}

@media (prefers-reduced-motion: reduce) {
  .door-card, .hq-metric, .btn, .hq-nav a { transition: none; }
  .door-card:hover { transform: none; }
}

/* —— AI helper pill + chat —— */
.canly-helper {
  position: fixed;
  right: max(16px, env(safe-area-inset-right));
  bottom: max(18px, env(safe-area-inset-bottom));
  z-index: 80;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  pointer-events: none;
}
.canly-helper > * { pointer-events: auto; }

.helper-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line-strong);
  background: linear-gradient(180deg, #1a2430 0%, #141b24 100%);
  color: var(--ink);
  font: inherit;
  font-weight: 700;
  font-size: 0.92rem;
  letter-spacing: 0.01em;
  padding: 11px 16px 11px 13px;
  border-radius: 999px;
  box-shadow: var(--shadow);
  cursor: pointer;
}
.helper-pill:hover {
  border-color: rgba(110, 168, 255, 0.45);
  background: linear-gradient(180deg, #1e2a38 0%, #17212c 100%);
}
.helper-pill:focus-visible { outline: none; box-shadow: var(--focus), var(--shadow); }
.helper-pill-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--task);
  box-shadow: 0 0 0 3px rgba(110, 168, 255, 0.22);
}

.helper-panel {
  width: min(380px, calc(100vw - 28px));
  max-height: min(520px, calc(100vh - 100px));
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(16, 22, 30, 0.98);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.45);
  overflow: hidden;
}
.helper-panel[hidden] { display: none !important; }

.helper-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 14px 10px;
  border-bottom: 1px solid var(--line);
}
.helper-head strong {
  display: block;
  font-size: 0.98rem;
}
.helper-hint {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.35;
}
.helper-close {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 1.4rem;
  line-height: 1;
  padding: 2px 6px;
  cursor: pointer;
  border-radius: 6px;
}
.helper-close:hover { color: var(--ink); background: rgba(255,255,255,0.04); }

.helper-messages {
  flex: 1;
  overflow-y: auto;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 220px;
}
.helper-msg {
  max-width: 92%;
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 0.9rem;
  line-height: 1.45;
  white-space: normal;
  word-break: break-word;
}
.helper-msg-assistant {
  align-self: flex-start;
  background: rgba(110, 168, 255, 0.1);
  border: 1px solid rgba(110, 168, 255, 0.18);
  color: var(--ink);
}
.helper-msg-user {
  align-self: flex-end;
  background: rgba(62, 207, 142, 0.12);
  border: 1px solid rgba(62, 207, 142, 0.22);
  color: var(--ink);
}
.helper-thinking { opacity: 0.75; font-style: italic; }

.helper-form {
  display: flex;
  gap: 8px;
  padding: 12px;
  border-top: 1px solid var(--line);
  background: rgba(11, 15, 20, 0.55);
}
.helper-input {
  flex: 1;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg-elev);
  color: var(--ink);
  font: inherit;
  font-size: 0.9rem;
  padding: 10px 12px;
}
.helper-input:focus {
  outline: none;
  border-color: rgba(110, 168, 255, 0.5);
  box-shadow: var(--focus);
}
.helper-send {
  border: 0;
  border-radius: 10px;
  background: var(--task);
  color: var(--accent-ink);
  font: inherit;
  font-weight: 700;
  font-size: 0.88rem;
  padding: 10px 14px;
  cursor: pointer;
  white-space: nowrap;
}
.helper-send:hover { filter: brightness(1.06); }
.helper-send:disabled { opacity: 0.55; cursor: wait; }

body:has(> .nav) .canly-helper {
  bottom: max(78px, calc(env(safe-area-inset-bottom) + 64px));
}

@media (min-width: 900px) {
  body:has(> .nav) .canly-helper {
    bottom: max(18px, env(safe-area-inset-bottom));
  }
}

@media (prefers-reduced-motion: reduce) {
  .helper-pill { transition: none; }
}

/* Phase 2 UX — clear steps / status */
.flow-card .flow-step {
  margin: 0 0 10px;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--task);
}
.otp-input {
  font-size: 1.35rem !important;
  letter-spacing: 0.35em;
  font-weight: 700;
  text-align: center;
}
.status-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 10px;
}
.status-line { margin: 8px 0 0; }
.status-pill {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--muted);
  background: rgba(255,255,255,0.03);
  margin-right: 6px;
  vertical-align: middle;
}
.status-pill.status-open,
.status-pill.status-not_generated,
.status-pill.status-draft { color: var(--alert); border-color: rgba(232,184,109,0.35); background: var(--alert-soft); }
.status-pill.status-in_progress,
.status-pill.status-awaiting_hq { color: var(--task); border-color: rgba(110,168,255,0.35); background: var(--task-soft); }
.status-pill.status-done,
.status-pill.status-live { color: var(--live); border-color: rgba(62,207,142,0.35); background: var(--live-soft); }
.status-pill.status-update_required { color: var(--danger); border-color: rgba(240,113,120,0.35); background: var(--danger-soft); }
.tiny { font-size: 0.75rem; }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.btn-sm { padding: 8px 12px; font-size: 0.82rem; width: auto; }
details summary { cursor: pointer; }
