/* JL Brief v2.2 — paged nav, collapsible rows, 3 themes. */

:root, html[data-theme="default"] {
  --bg: #07090c;
  --bg-elev: #0e1218;
  --bg-card: #11161e;
  --bg-card-2: #161c26;
  --border: #1c2330;
  --border-strong: #2a3344;
  --text: #e8ecf4;
  --text-dim: #9aa3b2;
  --text-mute: #6b7280;
  --accent: #ff9a3c;
  --accent-dim: #c83a16;
  --accent-glow: rgba(255,154,60,0.12);
  --success: #4ade80;
  --warn: #fbbf24;
  --danger: #f87171;
  --info: #60a5fa;
  --radius: 14px;
  --radius-sm: 10px;
  --tap: 44px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  overscroll-behavior-y: contain;
}

a { color: var(--accent); text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
code { background: var(--bg-elev); padding: 2px 6px; border-radius: 6px; font-size: 0.9em; }

.hidden { display: none !important; }
.muted, .muted-row { color: var(--text-mute); font-size: 13px; padding: 8px 0; }

/* ============ LOCKED ============ */
.locked {
  position: fixed; inset: 0;
  display: grid; place-items: center;
  padding: 24px;
  background: radial-gradient(circle at 50% 30%, #1a1f2a 0%, #07090c 70%);
  z-index: 100;
}
.lock-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 28px;
  text-align: center;
  max-width: 320px; width: 100%;
}
.lock-icon { font-size: 40px; margin-bottom: 12px; }
.lock-title { font-size: 18px; font-weight: 600; margin-bottom: 8px; }
.lock-sub { color: var(--text-dim); font-size: 14px; }

/* ============ APP / VIEWS ============ */
#app {
  max-width: 600px;
  margin: 0 auto;
  padding: 0 14px env(safe-area-inset-bottom);
}
.view { display: none; }
.view.view-active { display: block; }

/* ============ TOPBAR (home only) ============ */
.topbar {
  position: sticky; top: 0; z-index: 10;
  background: linear-gradient(180deg, var(--bg) 70%, rgba(7,9,12,0.95) 100%);
  padding: env(safe-area-inset-top, 8px) 0 10px;
  display: flex; justify-content: space-between; align-items: center;
  border-bottom: 1px solid var(--border);
}
.top-l { display: flex; align-items: baseline; gap: 10px; }
.brand {
  font-weight: 700; letter-spacing: 0.06em; font-size: 15px;
  background: linear-gradient(135deg, #ffe29a 0%, #ff9a3c 60%, #c83a16 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.date { color: var(--text-dim); font-size: 13px; font-variant-numeric: tabular-nums; }
.top-r { display: flex; align-items: center; gap: 10px; }
.time { font-size: 16px; font-variant-numeric: tabular-nums; }
.icon-btn {
  width: var(--tap); height: var(--tap);
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  background: var(--bg-card);
  color: var(--text);
  font-size: 17px;
  transition: transform 0.3s ease;
}
.icon-btn:active { transform: scale(0.92); }
.icon-btn.spinning { animation: spin 0.8s linear; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ============ NAVBAR (section views) ============ */
.navbar {
  position: sticky; top: 0; z-index: 10;
  background: linear-gradient(180deg, var(--bg) 70%, rgba(7,9,12,0.95) 100%);
  padding: env(safe-area-inset-top, 8px) 0 10px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid var(--border);
}
.nav-back, .nav-next {
  background: transparent;
  color: var(--accent);
  border: none;
  font-size: 15px;
  padding: 8px 4px;
  min-height: var(--tap);
}
.nav-back { justify-self: start; }
.nav-next { justify-self: end; }
.nav-back:active, .nav-next:active { opacity: 0.5; }
.nav-title {
  font-weight: 600;
  font-size: 16px;
  text-align: center;
  letter-spacing: 0.02em;
}

.page-stat {
  font-size: 12px;
  color: var(--text-mute);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 12px 2px 6px;
}

/* ============ WEATHER CHIP ============ */
.card-flat {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
  margin: 10px 0;
}
.weather-chip {
  display: flex; align-items: center; gap: 12px;
  margin-top: 12px;
}
.weather-chip .w-temp { font-size: 24px; font-weight: 600; font-variant-numeric: tabular-nums; }
.weather-chip .w-desc { font-size: 14px; color: var(--text); flex: 1; }
.weather-chip .w-loc { font-size: 12px; color: var(--text-mute); }

.brief-note {
  margin: 8px 4px;
  padding: 6px 10px;
  font-size: 13px;
  color: var(--accent);
  border-left: 2px solid var(--accent);
  background: var(--accent-glow);
  border-radius: 0 6px 6px 0;
}
.brief-note:empty { display: none; }

/* ============ TOP 3 STRIP ============ */
.prio-strip {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
  margin: 10px 0;
}
.strip-h {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-mute);
  margin-bottom: 8px;
}
.prio-inline {
  list-style: none;
  margin: 0; padding: 0;
  counter-reset: prio;
}
.prio-inline li {
  counter-increment: prio;
  padding: 6px 0 6px 28px;
  position: relative;
  font-size: 14px;
  line-height: 1.35;
}
.prio-inline li::before {
  content: counter(prio);
  position: absolute; left: 0; top: 6px;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--accent-dim);
  color: var(--accent);
  font-weight: 700; font-size: 11px;
  display: grid; place-items: center;
}

/* ============ TILE GRID ============ */
.tile-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 10px 0;
}
.tile {
  display: flex; align-items: center; gap: 10px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 12px;
  text-align: left;
  color: var(--text);
  min-height: 76px;
  transition: background 0.15s, border-color 0.15s, transform 0.1s;
}
.tile:active { transform: scale(0.98); background: var(--bg-card-2); border-color: var(--border-strong); }
.tile-icon { font-size: 22px; }
.tile-body { flex: 1; min-width: 0; }
.tile-h {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text);
  margin-bottom: 2px;
}
.tile-stat {
  font-size: 12px;
  color: var(--text-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tile-arrow {
  color: var(--text-mute);
  font-size: 20px;
  line-height: 1;
}

/* ============ ROW LIST (collapsible) ============ */
.row-list {
  list-style: none;
  margin: 8px 0;
  padding: 0;
}
.row {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin: 6px 0;
  overflow: hidden;
  transition: border-color 0.15s;
}
.row.open { border-color: var(--border-strong); }
.row-summary {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 12px 12px;
  min-height: var(--tap);
  cursor: pointer;
  user-select: none;
}
.row-summary:active { background: var(--bg-card-2); }
.row-time {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  color: var(--accent);
  font-size: 13px;
  min-width: 56px;
}
.row-main {
  min-width: 0;
}
.row-title {
  font-weight: 600;
  font-size: 14px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.row-sub {
  font-size: 12px;
  color: var(--text-dim);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  margin-top: 2px;
}
.row-chev {
  color: var(--text-mute);
  font-size: 14px;
  transition: transform 0.2s;
}
.row.open .row-chev { transform: rotate(90deg); color: var(--accent); }

.row-detail {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.25s ease;
}
.row.open .row-detail { max-height: 800px; }
.row-detail-inner {
  padding: 0 12px 12px;
  border-top: 1px solid var(--border);
  margin-top: 0;
}
.detail-meta {
  font-size: 13px;
  color: var(--text-dim);
  padding: 8px 0 4px;
  white-space: pre-wrap;
}
.detail-notes {
  margin-top: 6px;
  padding: 8px 10px;
  font-size: 13px;
  color: var(--text-dim);
  background: var(--bg-elev);
  border-radius: var(--radius-sm);
  white-space: pre-wrap;
}
.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}
.action-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  background: var(--bg-elev);
  border: 1px solid var(--border-strong);
  color: var(--text);
  font-size: 13px;
  min-height: 36px;
  text-decoration: none;
}
.action-btn:active { background: var(--border); }
.action-btn.primary {
  background: var(--accent-dim);
  border-color: var(--accent);
  color: var(--accent);
}

/* Drive-time chip between job rows */
.drive-chip {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  margin: 2px 14px;
  padding: 4px 0;
  font-size: 11px;
  color: var(--text-mute);
  letter-spacing: 0.04em;
}
.drive-chip::before, .drive-chip::after {
  content: ""; flex: 1; height: 1px;
  background: var(--border);
}
.drive-chip.warn { color: var(--warn); }

/* Status pill */
.status-pill {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: var(--bg-elev);
  color: var(--text-dim);
}
.status-pill.scheduled { background: rgba(96,165,250,0.15); color: #93c5fd; }
.status-pill.in_progress { background: rgba(74,222,128,0.15); color: #4ade80; }
.status-pill.completed { background: rgba(156,163,175,0.15); color: #d1d5db; }
.row-pill {
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 4px;
  background: var(--bg-elev);
  color: var(--text-mute);
}
.row-pill.pos { color: var(--success); }
.row-pill.warn { color: var(--warn); }

/* ============ HEADS-UP CARDS (no collapse, full wrap) ============ */
.heads-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px;
  margin: 8px 0;
  list-style: none;
}
.heads-num {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--accent-dim);
  color: var(--accent);
  font-weight: 700;
  font-size: 13px;
  display: grid;
  place-items: center;
  margin-top: 1px;
}
.heads-text {
  flex: 1;
  font-size: 15px;
  line-height: 1.5;
  color: var(--text);
  word-wrap: break-word;
  overflow-wrap: anywhere;
}

/* Wire theme override for heads-card */
html[data-theme="wire"] .heads-card { background: #000; border-color: #fff; }
html[data-theme="wire"] .heads-num { background: #fff; color: #000; }

/* Garage theme override for heads-card */
html[data-theme="garage"] .heads-card {
  background:
    linear-gradient(180deg, rgba(255,255,255,0.05) 0%, transparent 12%),
    linear-gradient(180deg, #1f242d 0%, #181c24 100%);
  border: 1px solid rgba(255,255,255,0.06);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08), 0 2px 6px rgba(0,0,0,0.4);
}
html[data-theme="garage"] .heads-num {
  background: linear-gradient(180deg, #e7c89a 0%, #b8884a 60%, #6e4f24 100%);
  color: #1a1004;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.4), 0 1px 2px rgba(0,0,0,0.5);
}

/* ============ MONEY VIEW SECTIONS ============ */
.money-section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
  margin: 10px 0;
}
.ms-h {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-mute);
  margin-bottom: 8px;
}
.ms-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 6px 0;
  font-size: 14px;
  border-top: 1px solid var(--border);
}
.ms-row:first-of-type { border-top: none; }
.ms-row.total {
  font-weight: 600;
  margin-top: 4px;
  padding-top: 10px;
  border-top: 1px solid var(--border-strong);
}
.ms-label { color: var(--text-dim); }
.ms-val { font-variant-numeric: tabular-nums; font-weight: 600; }
.ms-val.pos { color: var(--success); }
.ms-val.neg { color: var(--danger); }
.ms-val.pending { color: var(--warn); }

/* Card breakdown row inside Money OUT */
.card-row { padding-left: 10px; }
.card-row .row-title { font-size: 14px; }
.card-row .row-sub { font-size: 11px; }
.card-row .row-time {
  font-size: 11px;
  min-width: 56px;
  text-align: right;
  color: var(--text-mute);
  font-weight: 500;
}
.card-row[data-type="business"] .row-time { color: var(--info); }
.card-row[data-type="personal"] .row-time { color: var(--accent); }

.link-row {
  display: flex;
  align-items: center;
  padding: 10px 0;
  font-size: 14px;
  color: var(--accent);
  text-decoration: none;
}
.link-row:active { opacity: 0.5; }

/* ============ FOOTER + TOAST ============ */
.bottombar {
  padding: 14px 4px 24px;
  font-size: 12px;
  color: var(--text-mute);
  display: flex; justify-content: center; gap: 8px;
}
.bottombar .sep { opacity: 0.5; }

.toast {
  position: fixed;
  bottom: 24px; left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  color: var(--text);
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  opacity: 0; pointer-events: none;
  transition: all 0.25s ease;
  z-index: 50;
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

@media (min-width: 720px) {
  #app { max-width: 720px; padding: 0 20px 24px; }
  .tile-grid { grid-template-columns: 1fr 1fr 1fr 1fr; }
}

/* ==================================================================
   THEME 2 — WIRE
   Black background, pure-white wireframe borders, sharp corners,
   monochrome. Engineering-blueprint vibe.
   ================================================================== */
html[data-theme="wire"] {
  --bg: #000000;
  --bg-elev: #0a0a0a;
  --bg-card: #050505;
  --bg-card-2: #141414;
  --border: #ffffff;
  --border-strong: #ffffff;
  --text: #ffffff;
  --text-dim: #c4c4c4;
  --text-mute: #707070;
  --accent: #ffffff;
  --accent-dim: #000000;
  --accent-glow: rgba(255,255,255,0.06);
  --success: #ffffff;
  --warn: #ffffff;
  --danger: #ffffff;
  --info: #ffffff;
  --radius: 4px;
  --radius-sm: 2px;
}
html[data-theme="wire"] body {
  background: #000;
  font-weight: 400;
  letter-spacing: 0.01em;
}
html[data-theme="wire"] .topbar,
html[data-theme="wire"] .navbar {
  background: #000;
  border-bottom: 1px solid #fff;
}
html[data-theme="wire"] .brand {
  background: none;
  -webkit-text-fill-color: #fff;
  color: #fff;
  letter-spacing: 0.1em;
}
html[data-theme="wire"] .icon-btn {
  background: #000;
  border-color: #fff;
}
html[data-theme="wire"] .card,
html[data-theme="wire"] .card-flat,
html[data-theme="wire"] .prio-strip,
html[data-theme="wire"] .money-section,
html[data-theme="wire"] .row,
html[data-theme="wire"] .tile {
  background: #000;
  border: 1px solid #fff;
  box-shadow: none;
}
html[data-theme="wire"] .tile:active,
html[data-theme="wire"] .row-summary:active {
  background: #1a1a1a;
}
html[data-theme="wire"] .prio-inline li::before,
html[data-theme="wire"] .prio-list li::before {
  background: #fff;
  color: #000;
  font-weight: 700;
}
html[data-theme="wire"] .brief-note {
  color: #fff;
  border-left: 2px solid #fff;
  background: rgba(255,255,255,0.04);
}
html[data-theme="wire"] .row-pill,
html[data-theme="wire"] .row-pill.pos,
html[data-theme="wire"] .row-pill.warn {
  background: transparent;
  border: 1px solid #fff;
  color: #fff;
}
html[data-theme="wire"] .status-pill,
html[data-theme="wire"] .status-pill.scheduled,
html[data-theme="wire"] .status-pill.in_progress,
html[data-theme="wire"] .status-pill.completed {
  background: transparent;
  border: 1px solid #fff;
  color: #fff;
}
html[data-theme="wire"] .action-btn,
html[data-theme="wire"] .action-btn.primary {
  background: #000;
  border: 1px solid #fff;
  color: #fff;
}
html[data-theme="wire"] .action-btn:active { background: #fff; color: #000; }
html[data-theme="wire"] .row-time { color: #fff; }
html[data-theme="wire"] .row.open .row-chev { color: #fff; }
html[data-theme="wire"] .nav-back,
html[data-theme="wire"] .nav-next { color: #fff; }
html[data-theme="wire"] .ms-val.pos,
html[data-theme="wire"] .ms-val.neg,
html[data-theme="wire"] .ms-val.pending { color: #fff; }
html[data-theme="wire"] .card-row[data-type="business"] .row-time,
html[data-theme="wire"] .card-row[data-type="personal"] .row-time { color: #fff; }
html[data-theme="wire"] .drive-chip { color: #fff; }
html[data-theme="wire"] .drive-chip::before,
html[data-theme="wire"] .drive-chip::after { background: #fff; }
html[data-theme="wire"] .link-row { color: #fff; text-decoration: underline; }

/* ==================================================================
   THEME 3 — GARAGE (v2 · glass showroom)
   Frosted-glass display cases, polished-brass medallions, multiple
   overhead-light pools, deep specular depth. Apple Vision Pro meets
   high-end car showroom at midnight.
   ================================================================== */
html[data-theme="garage"] {
  --bg: #06080c;
  --bg-elev: #0e131b;
  --bg-card: rgba(28,34,44,0.55);              /* translucent for glass */
  --bg-card-2: rgba(38,46,58,0.65);
  --border: rgba(255,255,255,0.08);
  --border-strong: rgba(255,255,255,0.16);
  --text: #f0f3f9;
  --text-dim: #9aa4b4;
  --text-mute: #67707d;
  --accent: #e2bb7a;                            /* richer champagne */
  --accent-dim: #5a4528;
  --accent-glow: rgba(226,187,122,0.14);
  --success: #7fd99a;
  --warn: #ffd17a;
  --danger: #ff8a7a;
  --info: #93cdec;
  --radius: 16px;
  --radius-sm: 10px;
}

/* Body: multi-light overhead pools + epoxy-floor reflection band */
html[data-theme="garage"] body {
  background:
    /* primary overhead light pool */
    radial-gradient(ellipse 80% 50% at 50% -5%, rgba(255,240,210,0.10) 0%, transparent 50%),
    /* side accent lights */
    radial-gradient(ellipse 50% 30% at 0% 40%, rgba(140,170,210,0.04) 0%, transparent 60%),
    radial-gradient(ellipse 50% 30% at 100% 70%, rgba(226,187,122,0.05) 0%, transparent 60%),
    /* floor reflection sheen at bottom */
    radial-gradient(ellipse 100% 30% at 50% 95%, rgba(226,187,122,0.06) 0%, transparent 70%),
    /* base deep gradient */
    radial-gradient(ellipse 120% 90% at 50% 40%, #14191f 0%, #0a0d13 55%, #04060a 100%);
  background-attachment: fixed;
}

/* Ambient drifting overhead-light pools — slowly shift to simulate
   light moving across a showroom floor at night. ~22s loop. */
html[data-theme="garage"] body::before {
  content: "";
  position: fixed;
  inset: -10%;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(ellipse 55% 32% at 28% 18%, rgba(255,240,210,0.09) 0%, transparent 55%),
    radial-gradient(ellipse 42% 26% at 76% 42%, rgba(140,170,210,0.06) 0%, transparent 60%),
    radial-gradient(ellipse 38% 22% at 50% 78%, rgba(226,187,122,0.05) 0%, transparent 65%);
  animation: garage-drift 22s ease-in-out infinite;
  will-change: transform;
}
@keyframes garage-drift {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  33%      { transform: translate3d(2vw, -1.5vh, 0) scale(1.04); }
  66%      { transform: translate3d(-1.5vw, 2vh, 0) scale(0.97); }
}

/* Subtle horizontal sheen — fixed overlay on top of everything for that
   "looking-through-glass" depth */
html[data-theme="garage"] body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.018) 0%, transparent 35%, transparent 65%, rgba(255,255,255,0.012) 100%);
}

/* Cards boot in: blur→crisp + fade-up. Staggered by section so the page
   "assembles" rather than slamming in. */
@keyframes garage-boot {
  from { opacity: 0; transform: translateY(10px); filter: blur(8px); }
  to   { opacity: 1; transform: translateY(0);    filter: blur(0); }
}
html[data-theme="garage"] .weather-chip,
html[data-theme="garage"] .brief-note,
html[data-theme="garage"] .prio-strip,
html[data-theme="garage"] .tile,
html[data-theme="garage"] .heads-card,
html[data-theme="garage"] .card,
html[data-theme="garage"] .money-section {
  animation: garage-boot 0.65s cubic-bezier(0.16, 1, 0.3, 1) backwards;
}
html[data-theme="garage"] .weather-chip { animation-delay: 0.00s; }
html[data-theme="garage"] .brief-note   { animation-delay: 0.05s; }
html[data-theme="garage"] .prio-strip   { animation-delay: 0.10s; }
html[data-theme="garage"] .tile-grid .tile:nth-child(1) { animation-delay: 0.20s; }
html[data-theme="garage"] .tile-grid .tile:nth-child(2) { animation-delay: 0.25s; }
html[data-theme="garage"] .tile-grid .tile:nth-child(3) { animation-delay: 0.30s; }
html[data-theme="garage"] .tile-grid .tile:nth-child(4) { animation-delay: 0.35s; }
html[data-theme="garage"] .heads-card:nth-child(1) { animation-delay: 0.10s; }
html[data-theme="garage"] .heads-card:nth-child(2) { animation-delay: 0.18s; }
html[data-theme="garage"] .heads-card:nth-child(3) { animation-delay: 0.26s; }
html[data-theme="garage"] .heads-card:nth-child(4) { animation-delay: 0.34s; }

/* Brand: subtle warm pulse (the "JL BRIEF" gently glows like a sign on
   a slow voltage cycle). */
@keyframes garage-brand-pulse {
  0%, 100% {
    filter:
      drop-shadow(0 1px 0 rgba(0,0,0,0.6))
      drop-shadow(0 0 8px rgba(226,187,122,0.18));
  }
  50% {
    filter:
      drop-shadow(0 1px 0 rgba(0,0,0,0.6))
      drop-shadow(0 0 18px rgba(226,187,122,0.4));
  }
}
html[data-theme="garage"] .brand {
  animation: garage-brand-pulse 5s ease-in-out infinite;
}

/* Number medallions: subtle shimmer rotation — the specular dot drifts
   like light catching a polished surface. */
@keyframes garage-medallion-shimmer {
  0%, 100% { background-position: 35% 25%, 0% 0%; }
  50%      { background-position: 55% 35%, 0% 0%; }
}
html[data-theme="garage"] .prio-inline li::before,
html[data-theme="garage"] .prio-list li::before,
html[data-theme="garage"] .heads-num {
  background-size: 200% 200%, 100% 100%;
  animation: garage-medallion-shimmer 7s ease-in-out infinite;
}

/* Tile tap ripple — radial pulse from center */
@keyframes garage-tap-ripple {
  from { box-shadow: inset 0 0 0 0 rgba(226,187,122,0.4), inset 0 1px 0 rgba(255,255,255,0.14); }
  to   { box-shadow: inset 0 0 0 80px rgba(226,187,122,0), inset 0 1px 0 rgba(255,255,255,0.14); }
}
html[data-theme="garage"] .tile:active {
  animation: garage-tap-ripple 0.5s ease-out;
}

/* Accessibility: respect reduced-motion preference (kills all garage anims). */
@media (prefers-reduced-motion: reduce) {
  html[data-theme="garage"] body::before,
  html[data-theme="garage"] .brand,
  html[data-theme="garage"] .prio-inline li::before,
  html[data-theme="garage"] .prio-list li::before,
  html[data-theme="garage"] .heads-num,
  html[data-theme="garage"] .tile,
  html[data-theme="garage"] .heads-card,
  html[data-theme="garage"] .card,
  html[data-theme="garage"] .weather-chip,
  html[data-theme="garage"] .prio-strip,
  html[data-theme="garage"] .money-section,
  html[data-theme="garage"] .brief-note {
    animation: none !important;
  }
}

/* Topbar / navbar: glass with downlight gradient */
html[data-theme="garage"] .topbar,
html[data-theme="garage"] .navbar {
  background:
    linear-gradient(180deg, rgba(255,240,210,0.05) 0%, transparent 35%),
    rgba(6,8,12,0.75);
  -webkit-backdrop-filter: blur(24px) saturate(160%);
  backdrop-filter: blur(24px) saturate(160%);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  box-shadow:
    0 1px 0 rgba(255,255,255,0.04),
    0 8px 24px rgba(0,0,0,0.4);
}

/* Brand: rich champagne-to-bronze with embossed feel */
html[data-theme="garage"] .brand {
  background: linear-gradient(135deg,
    #fff2d3 0%,
    #e2bb7a 35%,
    #b8884a 60%,
    #6e4f24 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter:
    drop-shadow(0 1px 0 rgba(0,0,0,0.6))
    drop-shadow(0 0 8px rgba(226,187,122,0.15));
  letter-spacing: 0.08em;
}

/* Glass cards — backdrop blur + edge-lit border + multi-layer specular */
html[data-theme="garage"] .card,
html[data-theme="garage"] .card-flat,
html[data-theme="garage"] .prio-strip,
html[data-theme="garage"] .money-section,
html[data-theme="garage"] .row,
html[data-theme="garage"] .tile,
html[data-theme="garage"] .heads-card {
  background:
    /* top specular highlight */
    linear-gradient(180deg, rgba(255,255,255,0.08) 0%, transparent 25%),
    /* glass base */
    linear-gradient(180deg, rgba(34,40,52,0.55) 0%, rgba(22,28,38,0.65) 100%);
  border: 1px solid rgba(255,255,255,0.10);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  backdrop-filter: blur(20px) saturate(140%);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.14),     /* top inner highlight */
    inset 0 -1px 0 rgba(255,255,255,0.04),    /* bottom inner glow */
    inset 1px 0 0 rgba(255,255,255,0.04),     /* left edge */
    inset -1px 0 0 rgba(255,255,255,0.04),    /* right edge */
    0 4px 12px rgba(0,0,0,0.5),               /* depth shadow */
    0 1px 0 rgba(255,255,255,0.04);           /* lift */
  position: relative;
}

/* Tap interaction — subtle press */
html[data-theme="garage"] .tile:active,
html[data-theme="garage"] .row-summary:active {
  background:
    linear-gradient(180deg, rgba(255,255,255,0.05) 0%, transparent 20%),
    linear-gradient(180deg, rgba(44,52,66,0.7) 0%, rgba(28,34,46,0.75) 100%);
  transform: scale(0.985);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.18),
    0 2px 6px rgba(0,0,0,0.5);
}

/* Icon button — polished brass shell */
html[data-theme="garage"] .icon-btn {
  background:
    linear-gradient(180deg, rgba(255,255,255,0.12) 0%, transparent 50%),
    linear-gradient(180deg, #2a313e 0%, #161b25 100%);
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.18),
    inset 0 -1px 0 rgba(0,0,0,0.4),
    0 2px 4px rgba(0,0,0,0.5);
  color: #e2bb7a;
  filter: drop-shadow(0 0 4px rgba(226,187,122,0.15));
}

/* Polished-brass medallion priority badges */
html[data-theme="garage"] .prio-inline li::before,
html[data-theme="garage"] .prio-list li::before,
html[data-theme="garage"] .heads-num {
  background:
    /* top specular dot */
    radial-gradient(circle at 35% 25%, rgba(255,255,255,0.9) 0%, transparent 30%),
    /* main brass gradient */
    linear-gradient(135deg, #fff2d3 0%, #e2bb7a 35%, #b8884a 60%, #6e4f24 100%);
  color: #2a1a08;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.7),       /* top rim light */
    inset 0 -1px 0 rgba(0,0,0,0.5),            /* bottom shadow */
    0 1px 2px rgba(0,0,0,0.6),                 /* drop */
    0 0 6px rgba(226,187,122,0.4);             /* warm glow */
  font-weight: 800;
  text-shadow: 0 1px 0 rgba(255,255,255,0.3);
}

/* Brief-note: subtle gold ribbon */
html[data-theme="garage"] .brief-note {
  color: #fff2d3;
  border-left: 2px solid #e2bb7a;
  background:
    linear-gradient(90deg, rgba(226,187,122,0.12) 0%, rgba(226,187,122,0.02) 60%, transparent 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
}

/* Pills — frosted */
html[data-theme="garage"] .row-pill.pos {
  color: #9be0b3;
  background: rgba(127,217,154,0.10);
  border: 1px solid rgba(127,217,154,0.2);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06);
}
html[data-theme="garage"] .row-pill.warn {
  color: #ffd17a;
  background: rgba(255,209,122,0.10);
  border: 1px solid rgba(255,209,122,0.2);
}
html[data-theme="garage"] .status-pill.scheduled {
  background: rgba(147,205,236,0.15);
  color: #93cdec;
  border: 1px solid rgba(147,205,236,0.2);
}
html[data-theme="garage"] .status-pill.in_progress {
  background: rgba(127,217,154,0.15);
  color: #7fd99a;
  border: 1px solid rgba(127,217,154,0.2);
}

/* Action buttons — primary glows brass, secondary glass */
html[data-theme="garage"] .action-btn {
  background:
    linear-gradient(180deg, rgba(255,255,255,0.08) 0%, transparent 30%),
    linear-gradient(180deg, rgba(40,48,62,0.7) 0%, rgba(22,28,38,0.75) 100%);
  border: 1px solid rgba(255,255,255,0.12);
  color: var(--text);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.10),
    0 1px 2px rgba(0,0,0,0.4);
}
html[data-theme="garage"] .action-btn.primary {
  background:
    linear-gradient(180deg, rgba(255,255,255,0.15) 0%, transparent 40%),
    linear-gradient(180deg, #8a6a3f 0%, #4a3418 100%);
  border-color: #d4a86b;
  color: #fff2d3;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.3),
    inset 0 -1px 0 rgba(0,0,0,0.5),
    0 2px 4px rgba(0,0,0,0.5),
    0 0 12px rgba(226,187,122,0.2);
  text-shadow: 0 1px 0 rgba(0,0,0,0.4);
}

/* Accent texts */
html[data-theme="garage"] .row-time { color: #e2bb7a; text-shadow: 0 0 4px rgba(226,187,122,0.3); }
html[data-theme="garage"] .row.open .row-chev { color: #e2bb7a; }
html[data-theme="garage"] .row.open {
  border-color: rgba(226,187,122,0.4);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.14),
    0 4px 16px rgba(0,0,0,0.5),
    0 0 20px rgba(226,187,122,0.08);
}
html[data-theme="garage"] .nav-back,
html[data-theme="garage"] .nav-next {
  color: #e2bb7a;
  text-shadow: 0 0 8px rgba(226,187,122,0.2);
}
html[data-theme="garage"] .ms-val.pos { color: #9be0b3; }
html[data-theme="garage"] .ms-val.neg { color: #ff8a7a; }
html[data-theme="garage"] .ms-val.pending { color: #ffd17a; }
html[data-theme="garage"] .card-row[data-type="business"] .row-time { color: #93cdec; }
html[data-theme="garage"] .card-row[data-type="personal"] .row-time { color: #e2bb7a; }
html[data-theme="garage"] .drive-chip { color: #9aa4b4; }
html[data-theme="garage"] .drive-chip.warn { color: #ffd17a; }
html[data-theme="garage"] .link-row { color: #e2bb7a; text-shadow: 0 0 6px rgba(226,187,122,0.25); }

/* Tile arrow & chev get warm tone */
html[data-theme="garage"] .tile-arrow { color: rgba(226,187,122,0.5); }
html[data-theme="garage"] .tile-h { color: #fff2d3; letter-spacing: 0.06em; }

/* Toast — frosted */
html[data-theme="garage"] .toast {
  background: rgba(28,34,44,0.85);
  border: 1px solid rgba(255,255,255,0.14);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  backdrop-filter: blur(20px) saturate(140%);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.12),
    0 8px 24px rgba(0,0,0,0.6);
  color: #fff2d3;
}

/* Theme indicator on the cycle button */
html[data-theme="default"] #themeBtn::after { content: ""; }
html[data-theme="wire"] #themeBtn { color: #fff; }
html[data-theme="garage"] #themeBtn { color: #d4a86b; }

