/* Coming Next — BC soft (warm default) */
:root, [data-theme="light"] {
  --bg0: #E8F0E9;
  --bg1: #F7F3EB;
  --bg2: #FFFcf6;
  --line: rgba(61, 90, 74, 0.18);
  --text: #1E2A24;
  --muted: #5A6B62;
  --amber: #C4783A;
  --amber-dim: rgba(196, 120, 58, 0.14);
  --cedar: #3D5A4A;
  --fog: #B8C9C0;
  --danger: #C45C4A;
  --ok: #3D8F6E;
  --backdrop: rgba(40, 55, 48, 0.28);
  --shadow: 0 16px 48px rgba(45, 60, 50, 0.12);
  --radius: 18px;
  --radius-sm: 12px;
  --font: "SF Pro Display", "SF Pro Text", -apple-system, BlinkMacSystemFont, "Segoe UI",
    "PingFang SC", "Noto Sans SC", "Helvetica Neue", sans-serif;
  --mono: "SF Mono", ui-monospace, "Cascadia Mono", Menlo, monospace;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  --grad-a: rgba(255, 220, 170, 0.55);
  --grad-b: rgba(140, 180, 170, 0.35);
  --grad-c: rgba(100, 140, 120, 0.25);
}

[data-theme="dark"] {
  --bg0: #121A16;
  --bg1: #1A2420;
  --bg2: #232E28;
  --line: rgba(200, 170, 120, 0.16);
  --text: #EEF2EF;
  --muted: #8FA399;
  --amber: #E0A86A;
  --amber-dim: rgba(224, 168, 106, 0.14);
  --cedar: #7A9B88;
  --danger: #E07A6A;
  --ok: #5DCAA5;
  --backdrop: rgba(0, 0, 0, 0.5);
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
  --grad-a: rgba(224, 168, 106, 0.12);
  --grad-b: rgba(90, 130, 120, 0.12);
  --grad-c: rgba(50, 80, 70, 0.15);
}

*, *::before, *::after { box-sizing: border-box; }
html, body {
  margin: 0;
  min-height: 100%;
  background: var(--bg0);
  color: var(--text);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
body {
  /* BC soft: dawn over cedar + valley fog */
  background:
    radial-gradient(900px 480px at 50% -8%, var(--grad-a), transparent 58%),
    radial-gradient(700px 420px at 100% 30%, var(--grad-b), transparent 55%),
    radial-gradient(600px 380px at 0% 85%, var(--grad-c), transparent 50%),
    linear-gradient(165deg, #F0E6D4 0%, var(--bg0) 42%, #D5E5DC 100%);
  background-attachment: fixed;
  transition: background-color 0.25s ease, color 0.25s ease;
}
[data-theme="dark"] body {
  background:
    radial-gradient(900px 480px at 50% -8%, var(--grad-a), transparent 58%),
    radial-gradient(700px 420px at 100% 30%, var(--grad-b), transparent 55%),
    radial-gradient(600px 380px at 0% 85%, var(--grad-c), transparent 50%),
    var(--bg0);
}
#app {
  max-width: 440px;
  margin: 0 auto;
  min-height: 100dvh;
  padding: calc(12px + var(--safe-t)) 16px calc(28px + var(--safe-b));
  position: relative;
}
.hidden { display: none !important; }
body.sheet-open { overflow: hidden; }

.now-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}
.now-with-back {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  min-width: 0;
  flex: 1;
}
.now-text { min-width: 0; flex: 1; }
.back-btn { margin-top: 4px; flex-shrink: 0; }
.pack-chip {
  display: inline-block;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--amber);
  font-weight: 650;
  margin-bottom: 2px;
}

/* Pack hub */
.view-hub {
  padding-bottom: 24px;
}
.hub-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 22px;
}
.hub-brand {
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--amber);
  font-weight: 700;
}
.hub-clock {
  font-variant-numeric: tabular-nums;
  font-size: clamp(2.2rem, 9vw, 2.8rem);
  font-weight: 560;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-top: 4px;
}
.hub-sub {
  color: var(--muted);
  font-size: 0.92rem;
  margin: 8px 0 0;
  line-height: 1.4;
  max-width: 16rem;
}
.hub-block {
  margin-bottom: 22px;
}
.hub-block .section-label {
  margin-bottom: 4px;
}
.hub-timer-block {
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}
[data-theme="light"] .hub-timer-block {
  border-top-color: rgba(0, 0, 0, 0.08);
}

/* 10 deadline tiles */
.deadline-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-top: 12px;
}
@media (min-width: 400px) {
  .deadline-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
.deadline-tile {
  appearance: none;
  border: 1px solid rgba(232, 184, 74, 0.2);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent 45%),
    var(--bg2);
  color: var(--text);
  border-radius: 18px;
  min-height: 96px;
  padding: 12px 12px 10px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  text-align: left;
  font: inherit;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
  transition: transform 0.12s ease, border-color 0.15s ease;
}
.deadline-tile:active { transform: scale(0.97); }
.deadline-tile.has-date {
  border-color: rgba(232, 184, 74, 0.4);
  background: linear-gradient(165deg, var(--amber-dim), var(--bg2) 60%);
}
.deadline-tile.critical {
  border-color: rgba(255, 107, 107, 0.5);
  background: linear-gradient(165deg, rgba(255, 107, 107, 0.16), var(--bg2) 60%);
}
.deadline-tile.soon {
  border-color: rgba(232, 184, 74, 0.5);
}
.deadline-tile.past {
  opacity: 0.55;
}
.tile-emoji {
  font-size: 1.15rem;
  line-height: 1;
  margin-bottom: 4px;
}
.tile-name {
  font-size: 0.95rem;
  font-weight: 650;
  letter-spacing: -0.01em;
  color: var(--cedar, var(--text));
}
[data-theme="dark"] .tile-name { color: var(--text); }
.tile-count {
  font-size: 1.05rem;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  color: var(--amber);
  margin-top: 6px;
  line-height: 1.25;
}
.coming-tile .tile-count {
  font-size: 0.98rem;
  font-weight: 600;
}
.coming-big {
  font-size: 1.75rem;
  font-weight: 650;
  color: var(--amber);
  margin: 8px 0 0;
  line-height: 1.25;
  font-variant-numeric: tabular-nums;
}
.coming-sub { margin-top: 8px; line-height: 1.4; }
.deadline-tile.near {
  border-color: rgba(196, 120, 58, 0.45);
  background: linear-gradient(165deg, rgba(255, 230, 200, 0.65), var(--bg2) 70%);
}
.deadline-grid-live {
  grid-template-columns: 1fr 1fr;
}
.tile-count.critical { color: var(--danger); }
.tile-count.past { color: var(--muted); }
.tile-add {
  font-size: 1.6rem;
  font-weight: 500;
  color: var(--amber);
  line-height: 1;
  margin-top: 4px;
}
.tile-meta {
  font-size: 0.72rem;
  color: var(--muted);
  margin-top: 6px;
  width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hub-active {
  margin: 10px 0 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.hub-active-row {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg1);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 10px 12px;
  font-size: 0.9rem;
}
.hub-active-row span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hub-active-row strong {
  font-variant-numeric: tabular-nums;
  color: var(--amber);
  font-size: 1.1rem;
}
.hub-active-row strong.urgent { color: var(--danger); }

.hub-fine { margin-top: 8px; }

/* ⋯ menu */
.more-backdrop {
  position: fixed;
  inset: 0;
  z-index: 35;
  background: transparent;
}
.more-menu {
  position: fixed;
  z-index: 36;
  top: calc(12px + var(--safe-t) + 52px);
  left: 50%;
  transform: translateX(calc(-50% + 140px));
  width: min(220px, calc(100vw - 32px));
  background: var(--bg1);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
  padding: 6px;
  display: flex;
  flex-direction: column;
}
@media (max-width: 480px) {
  .more-menu {
    left: auto;
    right: 16px;
    transform: none;
  }
}
.more-menu button {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--text);
  text-align: left;
  padding: 12px 14px;
  border-radius: 10px;
  font: inherit;
  font-size: 0.95rem;
  cursor: pointer;
}
.more-menu button:hover,
.more-menu button:active {
  background: var(--amber-dim);
  color: var(--amber);
}
[data-theme="dark"] .icon-moon { display: none !important; }
[data-theme="dark"] .icon-sun { display: block; }
[data-theme="light"] .icon-sun { display: none !important; }
[data-theme="light"] .icon-moon { display: block; }

/* —— Now —— */
.now {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 18px;
}
.clock {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
  font-size: clamp(2.6rem, 11vw, 3.25rem);
  font-weight: 560;
  letter-spacing: -0.03em;
  line-height: 1.05;
}
.date-line {
  color: var(--muted);
  font-size: 0.92rem;
  margin-top: 4px;
}
.day-progress {
  margin-top: 10px;
  height: 3px;
  background: rgba(255,255,255,0.06);
  border-radius: 99px;
  overflow: hidden;
  max-width: 200px;
}
.day-progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, transparent, var(--amber));
  border-radius: 99px;
  transition: width 1s linear;
}
.icon-btn {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--bg1);
  color: var(--muted);
  display: grid;
  place-items: center;
  cursor: pointer;
}
.icon-btn:active { transform: scale(0.96); color: var(--amber); }

/* —— Sections —— */
.section-label {
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
}
.section-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.text-btn {
  border: 0;
  background: transparent;
  color: var(--amber);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  padding: 6px 4px;
}
.list-zone, .start-zone, .active-zone { margin-bottom: 22px; }

/* —— Active cards —— */
.active-card {
  background: linear-gradient(165deg, rgba(232,184,74,0.12), var(--bg1));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 14px 12px;
  margin-bottom: 10px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.25);
}
.active-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
}
.active-label {
  font-size: 0.95rem;
  color: var(--text);
  opacity: 0.92;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.active-time {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-size: 1.75rem;
  font-weight: 600;
  color: var(--amber);
  letter-spacing: -0.02em;
}
.active-time.urgent { animation: pulse 1s ease-in-out infinite; }
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.55; }
}
.active-bar {
  margin-top: 10px;
  height: 4px;
  background: rgba(255,255,255,0.06);
  border-radius: 99px;
  overflow: hidden;
}
.active-bar > i {
  display: block;
  height: 100%;
  background: var(--amber);
  border-radius: 99px;
  transition: width 0.25s linear;
}
.active-head { margin-bottom: 8px; }
.active-head-actions { display: flex; gap: 12px; align-items: center; }
.active-summary {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  background: linear-gradient(165deg, var(--amber-dim), var(--bg1));
  color: var(--text);
  border-radius: var(--radius);
  padding: 12px 14px;
  cursor: pointer;
  font: inherit;
  margin-bottom: 4px;
  text-align: left;
}
.active-summary-next {
  color: var(--amber);
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  font-size: 0.95rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 55%;
}
.active-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
  justify-content: flex-end;
}
/* Compact symbol controls (preferred over long text labels) */
.icon-act {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--bg2);
  color: var(--text);
  font-size: 0.85rem;
  font-weight: 650;
  cursor: pointer;
  display: grid;
  place-items: center;
  line-height: 1;
  padding: 0;
  flex-shrink: 0;
}
.icon-act:active { transform: scale(0.94); }
.icon-act.danger {
  color: #fff;
  background: var(--danger);
  border-color: transparent;
}
.mini-btn {
  border: 1px solid var(--line);
  background: var(--bg2);
  color: var(--text);
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  min-height: 34px;
}
.mini-btn:active { transform: scale(0.97); }
.mini-btn.danger {
  color: #fff;
  background: var(--danger);
  border-color: transparent;
}

/* —— Preset keycaps —— */
.preset-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.keycap {
  appearance: none;
  border: 1px solid rgba(232, 184, 74, 0.22);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.05), transparent 40%),
    var(--bg2);
  color: var(--text);
  border-radius: 20px;
  min-height: 78px;
  padding: 12px 8px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  box-shadow:
    0 1px 0 rgba(255,255,255,0.06) inset,
    0 10px 24px rgba(0,0,0,0.28);
  transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease;
  position: relative;
}
.keycap:active { transform: scale(0.96); }
.keycap.running {
  border-color: var(--amber);
  background: var(--amber-dim);
}
.keycap.running::after {
  content: "";
  position: absolute;
  top: 10px;
  right: 12px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 8px var(--amber);
  animation: pulse 1.4s ease-in-out infinite;
}
.key-num {
  font-size: 1.55rem;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.03em;
  line-height: 1;
}
.key-unit {
  font-size: 0.68rem;
  color: var(--muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.key-label {
  font-size: 0.72rem;
  color: var(--amber);
  margin-top: 4px;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 0 4px;
}
.start-extra { margin-top: 12px; }
.chip-ghost, .chip {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 0.85rem;
  cursor: pointer;
}
.chip {
  background: var(--bg1);
  color: var(--text);
  margin: 0 8px 8px 0;
}
.chip:active, .chip-ghost:active { transform: scale(0.97); border-color: var(--amber); color: var(--amber); }
.sub-presets {
  display: flex;
  flex-wrap: wrap;
  margin-top: 12px;
  min-height: 0;
}

/* —— Rows —— */
.rows { display: flex; flex-direction: column; gap: 8px; }
.row {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg1);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: var(--radius-sm);
  padding: 12px 12px;
  cursor: pointer;
}
.row:active { border-color: var(--line); }
.row.off { opacity: 0.42; }
.row-time {
  font-variant-numeric: tabular-nums;
  font-size: 1.25rem;
  font-weight: 600;
  min-width: 4.2rem;
}
.row-days {
  font-variant-numeric: tabular-nums;
  font-size: 1.1rem;
  font-weight: 650;
  color: var(--amber);
  min-width: 4.8rem;
  text-align: right;
}
.row-days.soon { color: var(--danger); }
.row-body { flex: 1; min-width: 0; }
.row-title {
  font-size: 0.95rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.row-sub {
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 2px;
}
.switch {
  width: 44px;
  height: 26px;
  border-radius: 99px;
  border: 0;
  background: #2a343c;
  position: relative;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.2s;
}
.switch.on { background: var(--amber); }
.switch i {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.2s;
}
.switch.on i { transform: translateX(18px); }
.empty {
  color: var(--muted);
  font-size: 0.88rem;
  margin: 4px 0 0;
  line-height: 1.4;
}
.empty.hidden { display: none; }

/* —— Trace —— */
.trace {
  margin-top: 8px;
  padding: 14px 4px 0;
  border-top: 1px solid rgba(255,255,255,0.06);
  color: var(--muted);
  font-size: 0.82rem;
  text-align: center;
}

/* —— Buttons —— */
.btn-primary, .btn-secondary {
  border: 0;
  border-radius: 14px;
  padding: 14px 16px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  width: 100%;
}
.btn-primary {
  background: linear-gradient(180deg, #f0c65c, var(--amber));
  color: #1a1406;
  box-shadow: 0 8px 24px rgba(232, 184, 74, 0.28);
}
.btn-primary:active { transform: scale(0.98); }
.btn-secondary {
  background: var(--bg2);
  color: var(--text);
  border: 1px solid var(--line);
}
.btn-row { display: flex; gap: 10px; margin-top: 12px; }
.btn-row > * { flex: 1; }

/* —— Sheet: centered card over app, not lost at viewport bottom —— */
.sheet {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  padding-bottom: calc(16px + var(--safe-b));
}
.sheet-backdrop {
  position: absolute;
  inset: 0;
  background: var(--backdrop);
  backdrop-filter: blur(6px);
  cursor: pointer;
}
.sheet-panel {
  position: relative;
  width: min(400px, 100%);
  max-height: min(86dvh, 640px);
  overflow: auto;
  background: var(--bg1);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 20px 18px 18px;
  box-shadow: var(--shadow);
  animation: sheet-in 0.22s ease-out;
  z-index: 1;
}
@keyframes sheet-in {
  from { transform: translateY(12px) scale(0.98); opacity: 0; }
  to { transform: translateY(0) scale(1); opacity: 1; }
}
.sheet-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--muted);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  z-index: 2;
}
.sheet-close:hover { color: var(--text); background: var(--amber-dim); }
.sheet-title {
  font-size: 1.15rem;
  font-weight: 650;
  margin: 0 36px 14px 0;
}
.field-label {
  display: block;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 12px 0 6px;
}
.field-input, .field-select {
  width: 100%;
  background: var(--bg0);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  color: var(--text);
  padding: 12px 14px;
  font-size: 1rem;
  font-family: inherit;
  outline: none;
}
.field-input:focus, .field-select:focus { border-color: var(--amber); }
.seg {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.seg-btn {
  flex: 1;
  min-width: 70px;
  border: 1px solid rgba(255,255,255,0.08);
  background: var(--bg0);
  color: var(--muted);
  border-radius: 12px;
  padding: 10px;
  cursor: pointer;
  font-size: 0.9rem;
}
.seg-btn.active {
  border-color: var(--amber);
  color: var(--amber);
  background: var(--amber-dim);
}

/* —— Onboarding —— */
.sheet-screen {
  position: fixed;
  inset: 0;
  z-index: 50;
  background:
    radial-gradient(900px 500px at 50% 0%, rgba(232,184,74,0.12), transparent 55%),
    var(--bg0);
  overflow: auto;
  padding: calc(28px + var(--safe-t)) 20px calc(28px + var(--safe-b));
}
.onboard-inner {
  max-width: 400px;
  margin: 0 auto;
}
.brand-mark {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  margin-bottom: 16px;
  background:
    linear-gradient(145deg, rgba(232,184,74,0.9), rgba(232,184,74,0.2)),
    var(--bg2);
  position: relative;
  box-shadow: 0 12px 32px rgba(232,184,74,0.2);
}
.brand-mark::after {
  content: "";
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 14px;
  height: 2px;
  background: rgba(7,10,12,0.55);
  border-radius: 2px;
}
.brand-mark::before {
  content: "";
  position: absolute;
  left: 12px;
  right: 18px;
  bottom: 18px;
  height: 10px;
  border: 2px solid rgba(7,10,12,0.55);
  border-bottom: 0;
  border-radius: 12px 12px 0 0;
}
.onboard-title {
  font-size: 2rem;
  margin: 0 0 6px;
  letter-spacing: -0.03em;
}
.onboard-sub {
  color: var(--muted);
  margin: 0 0 22px;
  line-height: 1.45;
}
.pack-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 20px;
}
.pack-card {
  text-align: left;
  border: 1px solid rgba(255,255,255,0.08);
  background: var(--bg1);
  border-radius: 16px;
  padding: 14px;
  color: var(--text);
  cursor: pointer;
}
.pack-card.active {
  border-color: var(--amber);
  background: var(--amber-dim);
}
.pack-card strong { display: block; margin-bottom: 4px; font-size: 0.95rem; }
.pack-card span { font-size: 0.75rem; color: var(--muted); line-height: 1.3; display: block; }
.fine-print {
  text-align: center;
  color: var(--muted);
  font-size: 0.78rem;
  margin-top: 14px;
}
#ob-start { margin-top: 8px; }

/* —— Extreme Ring —— */
.ring {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(10px);
}
body.ringing {
  overflow: hidden;
}
.ring-flash {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at 50% 40%, rgba(232, 184, 74, 0.35), transparent 55%);
  animation: ring-flash 0.9s ease-in-out infinite;
}
@keyframes ring-flash {
  0%, 100% { opacity: 0.35; }
  50% { opacity: 1; }
}
.ring-card {
  position: relative;
  width: min(380px, 100%);
  background: var(--bg1);
  border: 2px solid var(--amber);
  border-radius: 24px;
  padding: 32px 22px 22px;
  text-align: center;
  box-shadow: 0 0 0 1px rgba(232, 184, 74, 0.2), 0 24px 80px rgba(0, 0, 0, 0.65);
  animation: ring-pulse 1.1s ease-in-out infinite;
}
@keyframes ring-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.02); }
}
.ring-kicker {
  color: var(--amber);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-size: 0.78rem;
  font-weight: 700;
  margin: 0 0 10px;
}
.ring-title {
  margin: 0 0 10px;
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.15;
}
.ring-hint {
  margin: 0 0 22px;
  color: var(--muted);
  font-size: 0.88rem;
}
.ring-actions {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
}
.ring-actions .btn-primary,
.ring-actions .btn-secondary { padding: 14px 8px; font-size: 0.85rem; }
.ring-actions .btn-primary { font-size: 0.9rem; }

/* Deadline dashboard */
.days-hero {
  margin-bottom: 26px;
}
.hero-sub {
  margin: 4px 0 0;
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.3;
}
.day-spotlight {
  margin: 12px 0 14px;
}
.day-spot-btn {
  width: 100%;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 18px 16px;
  background: linear-gradient(160deg, var(--amber-dim), var(--bg1) 55%);
  color: var(--text);
  cursor: pointer;
  font: inherit;
}
.day-spotlight.critical .day-spot-btn {
  border-color: rgba(255, 107, 107, 0.55);
  background: linear-gradient(160deg, rgba(255, 107, 107, 0.18), var(--bg1) 60%);
}
.day-spotlight.soon .day-spot-btn {
  border-color: rgba(232, 184, 74, 0.45);
}
.day-spot-kicker {
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 650;
}
.day-spot-title {
  font-size: 1.25rem;
  font-weight: 650;
  margin-top: 6px;
}
.day-spot-count {
  font-size: 2.4rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--amber);
  letter-spacing: -0.03em;
  margin-top: 8px;
  line-height: 1;
}
.day-spot-count.critical { color: var(--danger); }
.day-spot-count.past { color: var(--muted); }
.day-spot-meta {
  margin-top: 8px;
  font-size: 0.85rem;
  color: var(--muted);
}
.day-cards {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.day-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg1);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 14px;
  padding: 14px 14px;
  cursor: pointer;
}
.day-card:active { border-color: var(--line); }
.day-card.critical { border-color: rgba(255, 107, 107, 0.35); }
.day-card.soon { border-color: rgba(232, 184, 74, 0.28); }
.day-card-main { flex: 1; min-width: 0; }
.day-card-count {
  font-variant-numeric: tabular-nums;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--amber);
  white-space: nowrap;
}
.day-card-count.critical { color: var(--danger); }
.day-card-count.past { color: var(--muted); }
.list-zone-muted {
  opacity: 0.92;
  margin-top: 8px;
}
.start-extra {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

/* Checklist progress on deadline cards */
.check-progress {
  margin-top: 10px;
}
.check-progress-top {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--muted);
  margin-bottom: 4px;
  font-variant-numeric: tabular-nums;
}
.check-progress-bar {
  height: 6px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}
[data-theme="light"] .check-progress-bar {
  background: rgba(0, 0, 0, 0.08);
}
.check-progress-bar > i {
  display: block;
  height: 100%;
  background: var(--amber);
  border-radius: 99px;
}
.day-spotlight.critical .check-progress-bar > i {
  background: var(--danger);
}
.day-quick {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
.day-quick-chip {
  border-color: var(--line);
  color: var(--amber);
  background: var(--amber-dim);
}
.day-quick.hidden {
  display: none !important;
}
.day-spot-btn .check-progress {
  margin-top: 14px;
}

/* settings list */
.settings-list { display: flex; flex-direction: column; gap: 8px; }
.settings-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  font-size: 0.95rem;
}
.settings-item:last-child { border-bottom: 0; }
.muted { color: var(--muted); font-size: 0.85rem; }
.checklist { margin: 8px 0 0; padding: 0; list-style: none; }
.checklist li {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 6px 0;
  font-size: 0.88rem;
  color: var(--muted);
}
.checklist input { accent-color: var(--amber); }

.plus-banner {
  margin-top: 16px;
  padding: 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--amber-dim);
  font-size: 0.88rem;
  line-height: 1.4;
}
.plus-banner strong { color: var(--amber); }

@media (min-width: 480px) {
  #app { padding-top: 28px; }
}
