:root {
  /* Surface — near-black with subtle warm tint */
  --bg: #0a0a0a;
  --bg-elev: #111111;
  --bg-elev-2: #161616;
  --border: #1f1f1f;
  --border-strong: #2a2a2a;

  /* Text */
  --fg: #ededed;
  --fg-dim: #a1a1a1;
  --fg-mute: #666666;
  --fg-subtle: #404040;

  /* Accent — single bold color */
  --accent: #00dc82;
  --accent-dim: #00dc8233;
  --accent-glow: #00dc8215;

  /* Semantic */
  --danger: #ff4d4d;
  --warn: #f5a524;
  --info: #0070f3;

  /* Motion */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  background: var(--bg);
  color: var(--fg);
  font-family: 'Geist', -apple-system, system-ui, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
}

body { position: relative; }
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse 90% 65% at 50% 30%, transparent 0%, rgba(0,0,0,0.4) 45%, #000 80%);
  mask-image: radial-gradient(ellipse 90% 65% at 50% 30%, transparent 0%, rgba(0,0,0,0.4) 45%, #000 80%);
  pointer-events: none;
  z-index: 0;
}
body::after {
  content: '';
  position: fixed;
  top: -200px;
  left: 50%;
  width: 640px;
  height: 320px;
  transform: translateX(-50%);
  background: radial-gradient(ellipse at center, rgba(0, 220, 130, 0.10) 0%, transparent 70%);
  filter: blur(40px);
  pointer-events: none;
  z-index: 0;
}

.mono {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-variant-numeric: tabular-nums;
}

button {
  font-family: inherit;
  font-size: inherit;
  background: none;
  border: none;
  color: inherit;
  cursor: pointer;
}

/* ======== Layout ======== */
.shell {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 32px;
  position: relative;
  z-index: 1;
}

/* ======== Top bar ======== */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 48px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -0.01em;
  color: inherit;
  text-decoration: none;
}
.brand-mark {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: linear-gradient(135deg, var(--accent) 0%, #00a86a 100%);
  display: grid;
  place-items: center;
  color: #000;
  font-weight: 700;
  font-size: 12px;
}
.topbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
}
.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--fg-subtle);
  transition: all 0.3s var(--ease);
}
.status-dot.live {
  background: var(--accent);
  box-shadow: 0 0 0 0 var(--accent);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 var(--accent-dim); }
  70%  { box-shadow: 0 0 0 8px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}
.status-text {
  color: var(--fg-dim);
  font-size: 13px;
}
.icon-btn {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: var(--fg-dim);
  transition: all 0.15s var(--ease);
}
.icon-btn:hover { background: var(--bg-elev); color: var(--fg); }

.state-pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--bg-elev);
  border: 1px solid var(--border-strong);
  font-size: 11px;
  font-weight: 500;
  text-transform: capitalize;
  letter-spacing: 0.02em;
  color: var(--fg-dim);
  margin-left: 4px;
  transition: color 0.15s var(--ease), border-color 0.15s var(--ease);
}
.state-pill[hidden] { display: none; }
.state-pill.state-summary { color: var(--accent); border-color: var(--accent-dim); }
.state-pill.state-playing { color: var(--info); border-color: rgba(0, 112, 243, 0.35); }
.state-pill.state-loading { color: var(--warn); border-color: rgba(245, 165, 36, 0.35); }
.state-pill.state-lobby   { color: var(--fg-dim); }

/* ======== Hero / primary action ======== */
.hero {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 32px;
  align-items: end;
  margin-bottom: 40px;
}
.hero-intro h1 {
  font-size: 36px;
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 1.05;
  margin-bottom: 10px;
}
.hero-intro .highlight { color: var(--fg); }
.hero-actions { display: flex; gap: 8px; }

.cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  border-radius: 10px;
  background: var(--fg);
  color: var(--bg);
  font-weight: 500;
  font-size: 14px;
  transition: all 0.15s var(--ease);
  white-space: nowrap;
}
.cta:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 8px 24px -8px rgba(255,255,255,0.2); }
.cta:disabled { opacity: 0.4; cursor: not-allowed; }
.cta.ghost {
  background: transparent;
  color: var(--fg);
  border: 1px solid var(--border-strong);
}
.cta.ghost:hover:not(:disabled) { border-color: var(--fg-mute); box-shadow: none; transform: none; }
.cta.danger { background: var(--danger); color: #fff; }

/* ======== Stat bar ======== */
.statbar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  margin-bottom: 40px;
}
.statbar .cell {
  background: var(--bg-elev);
  padding: 20px 22px;
  transition: background 0.2s var(--ease);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.statbar .cell:hover { background: var(--bg-elev-2); }
.statbar .label {
  font-size: 10px;
  color: var(--fg-mute);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 500;
}
.statbar .value {
  font-size: 32px;
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1;
}
.statbar .value .dim { color: var(--fg-subtle); font-weight: 400; }
.statbar .value .accent { color: var(--accent); font-weight: 500; }

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; align-items: start; }
  .statbar { grid-template-columns: repeat(2, 1fr); }
  .hero-intro h1 { font-size: 32px; }
}

/* ======== Section headers ======== */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 16px;
}
.section-title {
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.01em;
}
.section-meta {
  font-size: 12px;
  color: var(--fg-mute);
}

/* ======== Match list ======== */
.match-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.match-card {
  position: relative;
  display: flex;
  align-items: stretch;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  transition: background 0.18s var(--ease), border-color 0.18s var(--ease), transform 0.18s var(--ease), box-shadow 0.18s var(--ease);
}
.match-card:hover {
  background: var(--bg-elev-2);
  border-color: var(--border-strong);
  transform: translateY(-1px);
  box-shadow: 0 8px 24px -16px rgba(0, 0, 0, 0.6);
}
.match-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 3px;
  background: var(--fg-subtle);
  transition: background 0.18s var(--ease);
}
.match-card.outcome-win::before { background: var(--accent); }
.match-card.outcome-loss::before { background: var(--danger); }

.match-card-link {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 16px 14px 16px 22px;
  color: inherit;
  text-decoration: none;
}

.match-card-stat {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex-shrink: 0;
  min-width: 0;
  line-height: 1;
}
.match-card-stat-val {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-variant-numeric: tabular-nums;
  font-size: 15px;
  font-weight: 500;
  color: var(--fg);
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.match-card-stat.empty .match-card-stat-val { color: var(--fg-subtle); }
.match-card-stat-lab {
  font-size: 10px;
  color: var(--fg-mute);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 500;
}

.match-card-stat-primary .match-card-stat-val {
  font-size: 22px;
  letter-spacing: -0.02em;
}

.match-card-stat-text .match-card-stat-val {
  font-family: 'Geist', -apple-system, system-ui, sans-serif;
  font-variant-numeric: normal;
  font-size: 14px;
  max-width: 200px;
}
.match-card-stat-text { flex-shrink: 1; }

.match-card-when {
  margin-left: auto;
  font-size: 12px;
  color: var(--fg-mute);
  white-space: nowrap;
  flex-shrink: 0;
}

.match-card-chevron {
  color: var(--fg-subtle);
  display: grid;
  place-items: center;
  transition: color 0.15s var(--ease), transform 0.15s var(--ease);
}
.match-card:hover .match-card-chevron {
  color: var(--fg-dim);
  transform: translateX(2px);
}

.match-card-delete {
  flex-shrink: 0;
  align-self: stretch;
  display: grid;
  place-items: center;
  width: 44px;
  border: none;
  border-left: 1px solid transparent;
  background: transparent;
  color: var(--fg-mute);
  opacity: 0.4;
  transition: opacity 0.15s var(--ease), color 0.15s var(--ease), background 0.15s var(--ease), border-color 0.15s var(--ease);
}
.match-card:hover .match-card-delete {
  opacity: 0.85;
  border-left-color: var(--border);
}
.match-card-delete:hover,
.match-card-delete:focus-visible {
  outline: none;
  opacity: 1;
  color: var(--danger);
  background: rgba(255, 77, 77, 0.08);
  border-left-color: rgba(255, 77, 77, 0.25);
}

@media (max-width: 820px) {
  .match-card-link { gap: 20px; }
  .match-card-stat:not(.match-card-stat-primary):not(.match-card-stat-text) { display: none; }
  .match-card-chevron { display: none; }
}
@media (max-width: 560px) {
  .match-card-link { gap: 16px; padding-right: 8px; }
  .match-card-stat-text { display: none; }
}

.stat-card {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
}
.stat-card .lab {
  font-size: 10px;
  color: var(--fg-mute);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 8px;
}
.stat-card .val {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-variant-numeric: tabular-nums;
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--fg);
}
.stat-card .val.empty { color: var(--fg-subtle); }

/* ======== Match detail page ======== */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--fg-dim);
  text-decoration: none;
  font-size: 13px;
  margin-bottom: 24px;
  transition: color 0.15s var(--ease);
}
.back-link:hover { color: var(--fg); }

.detail-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 32px;
}
.detail-meta {
  color: var(--fg-mute);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 12px;
}
.detail-headline {
  display: flex;
  align-items: baseline;
  gap: 12px;
  line-height: 1;
}
.detail-headline-val {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-variant-numeric: tabular-nums;
  font-size: 56px;
  font-weight: 500;
  letter-spacing: -0.04em;
}
.detail-headline-val.empty { color: var(--fg-subtle); }
.detail-headline-lab {
  font-size: 14px;
  color: var(--fg-dim);
  font-weight: 400;
}
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
}
@media (max-width: 700px) {
  .detail-header { flex-direction: column; }
}

.detail-section {
  margin-bottom: 16px;
}
.detail-section:last-child { margin-bottom: 0; }
.detail-section-title {
  font-size: 11px;
  color: var(--fg-mute);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 500;
  margin-bottom: 10px;
  padding-left: 2px;
}

.status-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 20px 16px 23px;
  margin-bottom: 20px;
  overflow: hidden;
}
.status-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 3px;
}
.status-card.status-ok::before { background: var(--accent); }
.status-card.status-bad::before { background: var(--danger); }
.status-card.status-neutral::before { background: var(--fg-mute); }
.status-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.status-ok .status-icon { background: var(--accent-glow); color: var(--accent); }
.status-bad .status-icon { background: rgba(255, 77, 77, 0.12); color: var(--danger); }
.status-neutral .status-icon { background: var(--bg-elev-2); color: var(--fg-mute); }
.status-label {
  font-size: 16px;
  font-weight: 500;
  letter-spacing: -0.01em;
}
.status-ok .status-label { color: var(--accent); }
.status-bad .status-label { color: var(--danger); }
.status-sub {
  font-size: 12px;
  color: var(--fg-dim);
  margin-top: 4px;
}
.status-sub .status-killer {
  color: var(--fg);
  font-weight: 500;
}

/* ======== Empty state ======== */
.empty-state {
  background: var(--bg-elev);
  border: 1px dashed var(--border-strong);
  border-radius: 12px;
  padding: 48px 32px;
  text-align: center;
}
.empty-state .icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 16px;
  border-radius: 12px;
  background: var(--bg-elev-2);
  display: grid;
  place-items: center;
  color: var(--fg-mute);
}
.empty-state h3 {
  font-size: 16px;
  font-weight: 500;
  margin-bottom: 6px;
  letter-spacing: -0.01em;
}
.empty-state p {
  color: var(--fg-dim);
  font-size: 13px;
  max-width: 360px;
  margin: 0 auto;
}

.calib-single {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  background: var(--bg-elev-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-bottom: 10px;
}
.calib-single-status {
  font-size: 13px;
  color: var(--fg-dim);
}
.calib-single-status.is-done { color: var(--accent); }

.drawer-hint {
  font-size: 12px;
  color: var(--fg-mute);
  margin-bottom: 12px;
  line-height: 1.5;
}

.calib-review {
  margin-top: 14px;
  border-top: 1px dashed var(--border-strong);
  padding-top: 12px;
}
.calib-review summary {
  cursor: pointer;
  font-size: 12px;
  color: var(--fg-dim);
  list-style: none;
  padding: 4px 0;
  transition: color 0.15s var(--ease);
}
.calib-review summary::-webkit-details-marker { display: none; }
.calib-review summary::before {
  content: '▸';
  display: inline-block;
  margin-right: 6px;
  font-size: 10px;
  transition: transform 0.15s var(--ease);
}
.calib-review[open] summary::before { transform: rotate(90deg); }
.calib-review summary:hover { color: var(--fg); }

.calib-thumbs {
  display: grid;
  grid-template-columns: minmax(0, 240px);
  gap: 8px;
  margin-top: 10px;
}
.calib-thumb {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.calib-thumb-label {
  font-size: 10px;
  color: var(--fg-mute);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  text-align: center;
}
.calib-thumb img,
.calib-thumb-empty {
  width: 100%;
  aspect-ratio: 160 / 90;
  border-radius: 6px;
  border: 1px solid var(--border);
  object-fit: cover;
  background: var(--bg);
  display: grid;
  place-items: center;
  font-size: 10px;
  color: var(--fg-subtle);
}
select, input[type=range] {
  background: var(--bg);
  color: var(--fg);
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  padding: 8px 10px;
  font: inherit;
  font-size: 13px;
  width: 100%;
}
select:focus, input:focus { outline: none; border-color: var(--fg-mute); }
.mini-btn {
  padding: 8px 12px;
  background: var(--bg);
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  font-size: 13px;
  transition: all 0.15s var(--ease);
}
.mini-btn:hover:not(:disabled) { border-color: var(--fg-mute); background: var(--bg-elev-2); }
.mini-btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* ======== Live session card ======== */
.live-session {
  position: relative;
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 20px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 40px;
  overflow: hidden;
}
.live-session::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, var(--accent) 0%, transparent 100%);
}
.live-session[hidden] { display: none; }

.live-preview {
  background: #000;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}
.live-preview video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
}

.live-meta {
  display: flex;
  flex-direction: column;
  padding: 4px 4px 4px 0;
}
.live-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}
.live-eyebrow {
  font-size: 11px;
  color: var(--fg-mute);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 500;
}
.live-timer {
  font-size: 36px;
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1;
  margin-bottom: auto;
  padding: 8px 0 16px;
}
.live-actions {
  display: flex;
  gap: 8px;
  margin-top: auto;
}
.live-actions .mini-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 14px;
}

@media (max-width: 720px) {
  .live-session { grid-template-columns: 1fr; }
}

.mini-btn.danger-ghost {
  color: var(--fg-dim);
  border-color: var(--border-strong);
}
.mini-btn.danger-ghost:hover:not(:disabled) {
  color: var(--danger);
  border-color: var(--danger);
  background: rgba(255, 77, 77, 0.05);
}
.mini-btn.accent {
  color: var(--accent);
  border-color: var(--accent-dim);
}
.mini-btn.accent:hover:not(:disabled) {
  border-color: var(--accent);
  background: var(--accent-glow);
}

/* ======== Settings drawer ======== */
.drawer-scrim {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(4px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s var(--ease);
  z-index: 50;
}
.drawer-scrim.open { opacity: 1; pointer-events: auto; }
.drawer {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: 420px;
  max-width: 90vw;
  background: var(--bg-elev);
  border-left: 1px solid var(--border);
  padding: 24px;
  overflow-y: auto;
  transform: translateX(100%);
  transition: transform 0.3s var(--ease);
  z-index: 51;
}
.drawer.open { transform: translateX(0); }
.drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}
.drawer-header h2 {
  font-size: 18px;
  font-weight: 500;
  letter-spacing: -0.01em;
}
.drawer-section {
  padding: 18px 0;
  border-bottom: 1px solid var(--border);
}
.drawer-section:last-child { border-bottom: none; }
.drawer-section h3 {
  font-size: 12px;
  color: var(--fg-mute);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 12px;
  font-weight: 500;
}
/* ======== Toast ======== */
.toast-stack {
  position: fixed;
  bottom: 20px;
  right: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 40;
  pointer-events: none;
}
.toast {
  background: var(--bg-elev);
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 13px;
  min-width: 260px;
  box-shadow: 0 10px 30px -10px rgba(0,0,0,0.6);
  animation: toastIn 0.3s var(--ease);
  pointer-events: auto;
}
.toast.success { border-color: var(--accent); }
.toast.warn { border-color: var(--warn); }
.toast.danger { border-color: var(--danger); }
.toast .toast-title { font-weight: 500; margin-bottom: 2px; }
.toast .toast-body { color: var(--fg-dim); font-size: 12px; }
@keyframes toastIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ======== Small icons (inline svg helpers) ======== */
.i { display: inline-flex; width: 16px; height: 16px; }

/* ======== View transitions ======== */
@keyframes viewFadeUp {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.view-enter {
  animation: viewFadeUp 0.28s var(--ease);
}

/* ======== Setup view ======== */
.setup {
  max-width: 640px;
  margin: 0 auto;
  padding-top: 8px;
}
.setup h1 {
  font-size: 32px;
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 1.05;
  margin-bottom: 10px;
}
.setup > p {
  color: var(--fg-dim);
  font-size: 14px;
  margin-bottom: 28px;
}
.setup-steps {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.setup-step {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 16px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px 22px;
  align-items: flex-start;
}
.step-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--bg-elev-2);
  border: 1px solid var(--border-strong);
  color: var(--fg-dim);
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 13px;
  font-weight: 500;
}
.step-body h3 {
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.01em;
  margin-bottom: 4px;
}
.step-body > p {
  color: var(--fg-dim);
  font-size: 13px;
  margin-bottom: 14px;
  line-height: 1.5;
}
.step-action {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.step-status {
  font-size: 12px;
  color: var(--fg-mute);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.step-status.is-done { color: var(--accent); }

/* ======== Match day groups ======== */
.day-group + .day-group { margin-top: 18px; }
.day-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 0 4px 8px;
  margin-bottom: 6px;
  border-bottom: 1px dashed var(--border-strong);
}
.day-date {
  font-size: 12px;
  color: var(--fg-dim);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 500;
}
.day-totals {
  display: flex;
  gap: 8px;
  align-items: baseline;
  font-size: 12px;
  color: var(--fg-mute);
}
.day-num {
  color: var(--fg);
  font-weight: 500;
}
.day-sep { color: var(--fg-subtle); }
.day-rows {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* ======== Drawer actions ======== */
.drawer-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* ======== Confirmation modal ======== */
.modal-scrim {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s var(--ease);
  z-index: 100;
}
.modal-scrim.open { opacity: 1; pointer-events: auto; }
.modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, calc(-50% + 8px));
  background: var(--bg-elev);
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  padding: 22px 22px 18px;
  min-width: 320px;
  max-width: 420px;
  width: calc(100% - 40px);
  box-shadow: 0 24px 60px -12px rgba(0, 0, 0, 0.65);
  opacity: 0;
  transition: opacity 0.2s var(--ease), transform 0.2s var(--ease);
  z-index: 101;
}
.modal.open {
  opacity: 1;
  transform: translate(-50%, -50%);
}
.modal-title {
  font-size: 16px;
  font-weight: 500;
  letter-spacing: -0.01em;
  margin-bottom: 8px;
}
.modal-message {
  color: var(--fg-dim);
  font-size: 13px;
  margin-bottom: 18px;
  line-height: 1.5;
}
.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}
.mini-btn.danger {
  color: var(--danger);
  border-color: rgba(255, 77, 77, 0.35);
}
.mini-btn.danger:hover:not(:disabled) {
  background: rgba(255, 77, 77, 0.08);
  border-color: var(--danger);
}
