/* ───────────────────────────────────────────────────────────────
   SimplyPie design system (Phase 1 refinement, 2026-11-06)
   Ink, flour cream, oven ember, baker's gold. Flat, warm, precise.
   One dark theme, one light theme. Numerals in JetBrains Mono.
   ─────────────────────────────────────────────────────────────── */

:root {
  /* Surfaces */
  --ink: #151311;
  --ink-deep: #0f0e0c;
  --ash: #221e1a;
  --stone: #332d27;
  --card-bg: #1f1b17;
  --raise: rgba(255, 255, 255, 0.06);
  --well: rgba(0, 0, 0, 0.25);
  --topbar: rgba(21, 19, 17, 0.96);
  --island: rgba(18, 16, 15, 0.94);

  /* Text */
  --cream: #f5f0e8;
  --flour: #e0d8c8;
  --title: #ffffff;
  --muted: #a39a8b;

  /* Lines */
  --border: #38322c;
  --border-strong: #4a423a;

  /* Oven ember accent (true terracotta flame) */
  --orange: #e8520a;
  --orange-hover: #f26a24;
  --orange-text: #f26a24;   /* small ember text on dark or ember-tinted surfaces */
  --orange-glow: rgba(232, 82, 10, 0.35);
  --orange-soft: rgba(232, 82, 10, 0.12);
  --orange-line: rgba(232, 82, 10, 0.45);
  --on-accent: #16100b;

  /* Secondary */
  --gold: #c9952a;
  --gold-glow: rgba(201, 149, 42, 0.25);
  --gold-soft: rgba(201, 149, 42, 0.12);
  --gold-line: rgba(201, 149, 42, 0.32);
  --green: #7aaa52;
  --green-soft: rgba(122, 170, 82, 0.12);
  --danger: #ff6b7a;
  --danger-soft: rgba(220, 53, 69, 0.14);
  --danger-line: rgba(220, 53, 69, 0.4);

  /* Type */
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'SF Pro Text', sans-serif;
  --font-display: 'Outfit', 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'SF Pro Display', sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', Menlo, Consolas, monospace;

  /* Shape */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-pill: 999px;

  /* Depth: always offset, always soft */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.28);
  --shadow-md: 0 6px 20px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 14px 36px rgba(0, 0, 0, 0.55);

  /* Motion */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --transition-fast: 0.15s var(--ease-out);
  --transition-normal: 0.25s var(--ease-out);
}

[data-theme="light"] {
  --ink: #f7f4ee;
  --ink-deep: #efebe3;
  --ash: #ffffff;
  --stone: #f0ebe3;
  --card-bg: #ffffff;
  --raise: rgba(0, 0, 0, 0.05);
  --well: rgba(0, 0, 0, 0.04);
  --topbar: rgba(247, 244, 238, 0.96);
  --island: rgba(255, 255, 255, 0.96);

  --cream: #1a1512;
  --flour: #3d352e;
  --title: #1a1512;
  --muted: #6a6053;

  --border: #e4ddd2;
  --border-strong: #cfc6b8;

  --orange: #bf3d09;
  --orange-hover: #a93407;
  --orange-text: #bf3d09;
  --orange-glow: rgba(191, 61, 9, 0.22);
  --orange-soft: rgba(191, 61, 9, 0.09);
  --orange-line: rgba(191, 61, 9, 0.4);
  --on-accent: #ffffff;

  --gold: #8a6314;
  --gold-glow: rgba(138, 99, 20, 0.18);
  --gold-soft: rgba(138, 99, 20, 0.1);
  --gold-line: rgba(138, 99, 20, 0.3);
  --green: #4a7529;
  --green-soft: rgba(74, 117, 41, 0.1);
  --danger: #b42332;
  --danger-soft: rgba(180, 35, 50, 0.08);
  --danger-line: rgba(180, 35, 50, 0.3);

  --shadow-sm: 0 2px 8px rgba(40, 30, 20, 0.06);
  --shadow-md: 0 6px 20px rgba(40, 30, 20, 0.1);
  --shadow-lg: 0 14px 36px rgba(40, 30, 20, 0.16);
}

/* ==========================================================================
   BASE
   ========================================================================== */

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

html {
  background: var(--ink);
  color: var(--cream);
  font-family: var(--font-sans);
  font-size: 15px;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  caret-color: var(--orange);
  accent-color: var(--orange);
  scrollbar-width: thin;
  scrollbar-color: var(--border-strong) transparent;
}

body {
  max-width: 768px;
  margin: 0 auto;
  padding: 0 1rem 6.5rem;
  min-height: 100vh;
  position: relative;
  background: var(--ink);
}

::selection {
  background: var(--orange);
  color: var(--on-accent);
}

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 999px; }
::-webkit-scrollbar-track { background: transparent; }

a { color: var(--orange); text-underline-offset: 0.18em; }

button {
  font-family: inherit;
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 2px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ==========================================================================
   TOPBAR
   ========================================================================== */

.app-topbar {
  padding-top: calc(env(safe-area-inset-top, 0px) + 0.75rem);
  padding-bottom: 0.75rem;
  padding-left: calc(env(safe-area-inset-left, 0px) + 1rem);
  padding-right: calc(env(safe-area-inset-right, 0px) + 1rem);
  margin: 0 -1rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  position: sticky;
  top: 0;
  background: var(--topbar);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  z-index: 100;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.brand-wordmark {
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--title);
  display: inline-flex;
  align-items: center;
  user-select: none;
  cursor: pointer;
}

.brand-wordmark em,
.drawer-title em {
  color: var(--orange-text);
  font-style: normal;
  font-weight: 800;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

/* Badges: flat, ember on ember-soft */
.pro-badge,
.brand-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 9px;
  border-radius: var(--radius-pill);
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
  line-height: 1.2;
  background: var(--orange-soft);
  color: var(--orange-text);
  border: 1px solid var(--orange-line);
}

.pro-badge svg,
.brand-badge svg {
  width: 11px;
  height: 11px;
  flex-shrink: 0;
  color: var(--orange-text);
}

/* ==========================================================================
   DYNAMIC ISLAND (live timer capsule)
   ========================================================================== */

.dynamic-island-container {
  position: sticky;
  top: calc(60px + env(safe-area-inset-top, 0px));
  z-index: 95;
  padding: 8px 0;
  display: flex;
  justify-content: center;
  pointer-events: none;
  animation: diSlideDown 0.35s var(--ease-out);
}

@keyframes diSlideDown {
  0% { transform: translateY(-16px); opacity: 0; }
  100% { transform: translateY(0); opacity: 1; }
}

.dynamic-island-bar {
  pointer-events: auto;
  width: 100%;
  max-width: 440px;
  background: var(--island);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--orange-line);
  box-shadow: var(--shadow-md);
  border-radius: 999px;
  padding: 9px 10px 11px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.di-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.di-pulse-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--orange);
  flex-shrink: 0;
}

.di-label-wrap {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.di-title {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  color: var(--title);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
}

.di-ends {
  font-size: 11px;
  color: var(--gold);
  white-space: nowrap;
}

.di-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.di-time {
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 700;
  color: var(--orange-text);
  letter-spacing: 0.02em;
}

.di-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  background: var(--raise);
  color: var(--title);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  transition: background var(--transition-fast), color var(--transition-fast);
}

.di-btn::before { content: ''; position: absolute; inset: -6px; }

.di-btn:hover {
  background: var(--orange);
  color: var(--on-accent);
  border-color: var(--orange);
}

.di-progress-track {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--raise);
}

.di-progress-fill {
  height: 100%;
  background: var(--orange);
  transition: width 0.5s linear;
}

/* ==========================================================================
   BUTTONS
   ========================================================================== */

.btn {
  height: 44px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--ash);
  color: var(--cream);
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  transition: background var(--transition-fast), border-color var(--transition-fast), transform 0.12s var(--ease-out), box-shadow var(--transition-fast);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  user-select: none;
  position: relative;
  white-space: nowrap;
}

.btn svg {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
}

.btn:hover {
  border-color: var(--border-strong);
  background: var(--stone);
}

.btn:active,
.style-tile:active,
.pan-compact-tile:active,
.dough-source-btn:active,
.main-nav-tab:active,
.jcard.interactive-card:active,
.instruction-card:active,
.star-btn:active,
.cat-pill:active,
.timer-chip-btn:active,
.theme-choice-chip:active,
.path-choice-card:active,
.technique-tile:active,
.leaven-card:active,
.card-header-bar:active,
.luxury-pizza-card:active,
.dgc-tab:active,
.drawer-nav-item:active {
  transform: scale(0.97);
  transition-duration: 0.08s;
}

.btn.btn-pri,
.btn.btn-primary {
  background: var(--orange);
  border-color: var(--orange);
  color: var(--on-accent);
  box-shadow: var(--shadow-sm);
}

.btn.btn-pri:hover,
.btn.btn-primary:hover {
  background: var(--orange-hover);
  border-color: var(--orange-hover);
}

.btn.btn-gold {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--on-accent);
  box-shadow: var(--shadow-sm);
}

[data-theme="light"] .btn.btn-gold { color: #ffffff; }

.btn-icon {
  width: 44px;
  padding: 0;
}

.btn-sm {
  height: 36px;
  padding: 0 12px;
  font-size: 12px;
}

.btn-sm::before,
.cat-pill::before,
.timer-chip-btn::before,
.drawer-close-btn::before,
#clearCatalogSearchBtn::before,
.workflow-checkbox::before,
.icon-btn::before {
  content: '';
  position: absolute;
  inset: -4px;
}

.btn-sm svg { width: 14px; height: 14px; }

.btn-danger {
  background: var(--danger-soft);
  border-color: var(--danger-line);
  color: var(--danger);
}

.btn-danger:hover {
  background: var(--danger-soft);
  border-color: var(--danger);
}

/* Icon fills inside buttons follow the button text */
.btn svg [fill="#f3f2f2"] { fill: currentColor; }
.btn svg [stroke="#f3f2f2"] { stroke: currentColor; }
.btn.btn-pri svg [fill="#ec3013"],
.btn.btn-primary svg [fill="#ec3013"],
.btn.btn-gold svg [fill="#ec3013"] { fill: currentColor; }

/* ==========================================================================
   NAVIGATION: TABS AND DRAWER
   ========================================================================== */

.main-nav-bar {
  display: flex;
  gap: 4px;
  padding: 0.65rem 0;
  overflow-x: auto;
  scrollbar-width: none;
  border-bottom: 1px solid var(--border);
  margin-bottom: 1.25rem;
}

.main-nav-bar::-webkit-scrollbar { display: none; }

.main-nav-tab {
  height: 40px;
  padding: 0 14px;
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: background var(--transition-fast), color var(--transition-fast);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  position: relative;
  flex-shrink: 0;
}

.main-nav-tab::before { content: ''; position: absolute; inset: -2px 0; }

.main-nav-tab svg { width: 16px; height: 16px; }

.main-nav-tab:hover {
  color: var(--cream);
  background: var(--raise);
}

.main-nav-tab.active {
  background: var(--orange);
  color: var(--on-accent);
  border-color: var(--orange);
}

.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 100;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s var(--ease-out), visibility 0.3s;
}

.drawer-backdrop.open {
  opacity: 1;
  visibility: visible;
}

.side-drawer {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 290px;
  max-width: 82vw;
  background: var(--ash);
  border-right: 1px solid var(--border);
  z-index: 101;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
  transform: translateX(-100%);
  transition: transform 0.35s var(--ease-out);
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

.side-drawer.open { transform: translateX(0); }

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.25rem 1rem;
  border-bottom: 1px solid var(--border);
}

.drawer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.drawer-logo-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--orange);
  color: var(--on-accent);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 14px;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
}

.drawer-title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 800;
  color: var(--title);
  line-height: 1.1;
}

.drawer-ver {
  font-size: 11px;
  color: var(--gold);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: 2px;
}

.drawer-close-btn {
  background: var(--stone);
  border: 1px solid var(--border);
  color: var(--muted);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  transition: color var(--transition-fast), border-color var(--transition-fast);
}

.drawer-close-btn:hover {
  color: var(--cream);
  border-color: var(--border-strong);
}

.drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 1rem 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.drawer-section-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  padding: 6px 10px 6px;
}

.drawer-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: transparent;
  border: none;
  color: var(--flour);
  font-family: var(--font-sans);
  font-size: 13.5px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: background var(--transition-fast), color var(--transition-fast);
  width: 100%;
}

.drawer-nav-item svg {
  color: var(--muted);
  flex-shrink: 0;
  transition: color var(--transition-fast);
}

.drawer-nav-item:hover {
  background: var(--stone);
  color: var(--cream);
}

.drawer-nav-item:hover svg { color: var(--orange-text); }

.drawer-nav-item.active {
  background: var(--orange);
  color: var(--on-accent);
  font-weight: 700;
}

.drawer-nav-item.active svg { color: var(--on-accent); }

.drawer-footer {
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--border);
  background: var(--ink);
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
}

.drawer-footer strong { color: var(--gold); font-weight: 600; }

/* ==========================================================================
   SECTIONS, WIZARD TRACK, STEP HEADERS
   ========================================================================== */

.app-section {
  display: none;
  animation: sectionFadeIn 0.35s var(--ease-out) forwards;
}

.app-section.active { display: block; }

.step-content {
  animation: sectionFadeIn 0.35s var(--ease-out) forwards;
}

@keyframes sectionFadeIn {
  0% { opacity: 0; transform: translateY(10px); }
  100% { opacity: 1; transform: translateY(0); }
}

.prog-track-wrap {
  margin-bottom: 1.5rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
}

.prog-track {
  display: flex;
  gap: 0;
  overflow-x: auto;
  scrollbar-width: none;
  align-items: center;
}

.prog-track::-webkit-scrollbar { display: none; }

.prog-step {
  flex: 1;
  min-width: 78px;
  min-height: 48px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  position: relative;
  padding: 2px 2px;
}

.prog-step::after {
  content: '';
  position: absolute;
  top: 15px;
  left: calc(50% + 15px);
  right: calc(-50% + 15px);
  height: 2px;
  background: var(--border);
  z-index: 0;
}

.prog-step:last-child::after { display: none; }
.prog-step.done::after { background: var(--border-strong); }

.prog-dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid var(--border);
  background: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  z-index: 1;
  transition: background var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast);
}

.prog-step.done .prog-dot {
  background: var(--stone);
  border-color: var(--stone);
  color: var(--cream);
}

.prog-step.active .prog-dot {
  background: var(--orange);
  border-color: var(--orange);
  color: var(--on-accent);
}

.prog-lbl {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: center;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 4px;
}

.step-svg-icon { width: 12px; height: 12px; }
.prog-step.active .prog-lbl { color: var(--cream); }

.step-header { margin-bottom: 1.25rem; }

.step-head-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.step-title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  color: var(--title);
  letter-spacing: -0.02em;
  line-height: 1.15;
  text-wrap: balance;
}

.step-count {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
  flex-shrink: 0;
}

.step-count em {
  font-style: normal;
  color: var(--orange-text);
}

.step-sub {
  font-size: 13.5px;
  color: var(--muted);
  margin-top: 6px;
  line-height: 1.5;
  max-width: 60ch;
}

/* ==========================================================================
   CARDS (flat, one rhythm)
   ========================================================================== */

.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.15rem;
  margin-bottom: 1rem;
  box-shadow: var(--shadow-sm);
  transition: border-color var(--transition-normal);
}

.card-title {
  font-family: var(--font-display);
  font-size: 15.5px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--title);
  margin-bottom: 0.9rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-title svg {
  color: var(--orange-text);
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.collapsible-card { overflow: hidden; }

.card-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 60px;
  padding: 12px 14px;
  margin: -1.15rem -1.15rem 1rem -1.15rem;
  border-bottom: 1px solid var(--border);
  background: var(--raise);
  cursor: pointer;
  user-select: none;
  transition: background var(--transition-fast), transform 0.12s var(--ease-out);
}

.card-header-bar:hover { background: var(--stone); }

.collapsible-card.collapsed .card-header-bar {
  margin-bottom: -1.15rem;
  border-bottom-color: transparent;
}

.card-header-main {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
}

.card-header-icon-box {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--orange-soft);
  color: var(--orange-text);
  border: 1px solid var(--orange-line);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.card-header-title {
  font-family: var(--font-display);
  font-size: 15.5px;
  font-weight: 700;
  color: var(--title);
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.card-header-subtitle {
  font-family: var(--font-sans);
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
  margin-top: 2px;
  line-height: 1.35;
}

.card-header-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.card-collapse-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--raise);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  transition: color 0.2s, background 0.2s;
}

.card-header-bar:hover .card-collapse-icon {
  color: var(--cream);
  background: var(--stone);
}

.card-collapse-icon svg {
  transform: rotate(0deg);
  transition: transform 0.35s var(--ease-out);
}

.collapsible-card.collapsed .card-collapse-icon svg { transform: rotate(-90deg); }

.card-collapsible-content {
  transition: max-height 0.35s var(--ease-out), opacity 0.25s ease;
  max-height: 4000px;
  opacity: 1;
  overflow: visible;
}

.collapsible-card.collapsed .card-collapsible-content {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  pointer-events: none;
  margin: 0;
  padding: 0;
}

/* Inset well inside a card or sheet (never a nested card) */
.sheet-block {
  background: var(--stone);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  margin-bottom: 12px;
}

.sheet-block .card-title { margin-bottom: 8px; font-size: 13.5px; }

/* GRIDS */
.g2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.g3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
.g4 { display: grid; grid-template-columns: 1fr 1fr 1fr 1fr; gap: 12px; }

@media (max-width: 540px) {
  .g4 { grid-template-columns: 1fr 1fr; }
  .g3 { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  .g2-cards { grid-template-columns: 1fr; }
}

/* ==========================================================================
   FORMS
   ========================================================================== */

/* No flex gap here on purpose: calculator.js may set display:block on a .field */
.field { display: flex; flex-direction: column; position: relative; }

.field label,
.field-label {
  font-size: 11.5px;
  color: var(--muted);
  letter-spacing: 0.03em;
  display: flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 5px;
}

.hyd-inner {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.field input,
.field select,
.field textarea {
  min-height: 44px;
  padding: 0 12px;
  background: var(--ash);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--cream);
  font-family: var(--font-mono);
  font-size: 14px;
  width: 100%;
  transition: border-color var(--transition-fast), background var(--transition-fast), box-shadow var(--transition-fast);
  -webkit-appearance: none;
  appearance: none;
}

.field textarea {
  padding: 10px 12px;
  line-height: 1.5;
  resize: vertical;
}

.field input[type="file"] {
  padding: 9px 12px;
  font-family: var(--font-sans);
  font-size: 12.5px;
  color: var(--muted);
}

.field input[type="file"]::file-selector-button {
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 600;
  color: var(--cream);
  background: var(--stone);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 6px 10px;
  margin-right: 10px;
  cursor: pointer;
}

.field input::placeholder,
.field textarea::placeholder { color: var(--muted); opacity: 0.8; }

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--orange);
  background: var(--stone);
  box-shadow: 0 0 0 3px var(--orange-soft);
}

.field input:focus-visible,
.field select:focus-visible,
.field textarea:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 1px;
}

.field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23a39a8b'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
}

.field-hint {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}

.flour-blend-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.flour-blend-row:last-child { border-bottom: none; }

.flour-blend-input {
  width: 100%;
  min-height: 40px;
  padding: 0 8px;
  background: var(--ash);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--cream);
  font-family: var(--font-mono);
  font-size: 14px;
  text-align: center;
  -webkit-appearance: none;
  appearance: none;
}

.flour-blend-input:focus {
  outline: none;
  border-color: var(--orange);
  box-shadow: 0 0 0 3px var(--orange-soft);
}

/* ==========================================================================
   PATH BANNER, PATH CHOICE, DOUGH SOURCE TOGGLE
   ========================================================================== */

.dough-path-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 10px 12px 10px 14px;
  margin-bottom: 1.25rem;
  gap: 10px;
}

.dough-path-banner .path-meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.path-sub {
  font-size: 12px;
  color: var(--muted);
}

.path-options-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 4px;
}

.path-choice-card {
  background: var(--ash);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.1rem 1.15rem;
  text-align: left;
  cursor: pointer;
  transition: border-color var(--transition-fast), background var(--transition-fast), transform 0.12s var(--ease-out);
}

.path-choice-card:hover {
  border-color: var(--orange);
  background: var(--stone);
}

.pcc-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px 8px;
  margin-bottom: 8px;
}

.pcc-head-left {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

/* The name never breaks mid-phrase; a badge that does not fit drops to its own line instead */
.pcc-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--title);
  white-space: nowrap;
}

.pcc-sub {
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.5;
}

.brand-badge.badge-gold {
  background: var(--gold-soft);
  color: var(--gold);
  border-color: var(--gold-line);
}

.dough-source-toggle {
  display: flex;
  background: var(--well);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 4px;
  margin-bottom: 1.25rem;
  gap: 4px;
}

.dough-source-btn {
  flex: 1;
  height: 44px;
  border: none;
  background: transparent;
  color: var(--muted);
  font-family: var(--font-sans);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  border-radius: var(--radius-pill);
  transition: background var(--transition-fast), color var(--transition-fast), transform 0.12s var(--ease-out);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.dough-source-btn:hover {
  color: var(--cream);
  background: var(--raise);
}

.dough-source-btn.active {
  background: var(--orange);
  color: var(--on-accent);
  font-weight: 700;
}

.dough-source-btn svg { flex-shrink: 0; }

/* ==========================================================================
   DETROIT MASTERCLASS GUIDE
   ========================================================================== */

.detroit-guide-card { margin-bottom: 1rem; }

.dgc-state-toggle {
  display: flex;
  background: var(--well);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 4px;
  margin-bottom: 1.25rem;
  gap: 4px;
}

.dgc-tab {
  flex: 1;
  min-height: 46px;
  padding: 5px 6px;
  border: none;
  border-radius: 11px;
  background: transparent;
  color: var(--muted);
  font-family: var(--font-sans);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition-fast), color var(--transition-fast), transform 0.12s var(--ease-out);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  line-height: 1.1;
}

.dgc-tab-s {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  opacity: 0.85;
}

.dgc-tab:hover {
  color: var(--cream);
  background: var(--raise);
}

.dgc-tab.active {
  background: var(--orange);
  color: var(--on-accent);
  font-weight: 700;
}

.dgc-tab.active .dgc-tab-s { opacity: 0.9; }

.dgc-timeline {
  position: relative;
  padding-left: 32px;
  margin-bottom: 1.25rem;
}

.dgc-timeline::before {
  content: '';
  position: absolute;
  left: 11px;
  top: 18px;
  bottom: 24px;
  width: 2px;
  background: var(--orange-line);
  border-radius: 2px;
}

.dgc-step-card {
  position: relative;
  background: var(--ash);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 13px 15px;
  margin-bottom: 12px;
  transition: border-color var(--transition-fast);
}

.dgc-step-card:hover { border-color: var(--border-strong); }

.dgc-node-pin {
  position: absolute;
  left: -32px;
  top: 14px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--ink);
  border: 2px solid var(--orange);
  color: var(--orange-text);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}

.dgc-step-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 6px 10px;
  margin-bottom: 6px;
}

.dgc-step-stage {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--gold);
  margin-bottom: 2px;
}

.dgc-step-title {
  font-family: var(--font-display);
  font-size: 14.5px;
  font-weight: 700;
  color: var(--title);
  letter-spacing: -0.01em;
  line-height: 1.25;
}

.dgc-time-pill {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--gold);
  background: var(--gold-soft);
  border: 1px solid var(--gold-line);
  padding: 4px 8px;
  border-radius: var(--radius-pill);
  white-space: nowrap;
  flex-shrink: 0;
}

.dgc-step-desc {
  font-size: 12.5px;
  color: var(--flour);
  line-height: 1.55;
}

.dgc-step-tip {
  margin-top: 9px;
  padding: 8px 11px;
  border-radius: 6px;
  background: var(--orange-soft);
  font-size: 12px;
  color: var(--cream);
  line-height: 1.45;
}

.dgc-step-tip strong { color: var(--orange-text); }

.dgc-pro-box {
  background: var(--gold-soft);
  border: 1px solid var(--gold-line);
  border-radius: 12px;
  padding: 14px 16px;
}

.dgc-pro-box ul {
  font-size: 12px;
  color: var(--flour);
  line-height: 1.6;
  margin-left: 16px;
}

/* ==========================================================================
   STYLE TILES, PAN TILES, LEAVEN CARDS, TECHNIQUE TILES
   ========================================================================== */

.style-tiles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 10px;
  margin-bottom: 1.25rem;
}

.style-tile {
  padding: 12px 14px;
  min-height: 44px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--card-bg);
  color: var(--muted);
  cursor: pointer;
  transition: border-color var(--transition-fast), background var(--transition-fast), transform 0.12s var(--ease-out);
  text-align: left;
  font-family: var(--font-sans);
}

.style-tile:hover { border-color: var(--border-strong); color: var(--cream); }

.style-tile.on {
  border-color: var(--orange);
  background: var(--orange-soft);
  color: var(--cream);
}

.st-header { display: flex; align-items: center; gap: 6px; margin-bottom: 4px; }
.st-icon { color: var(--orange-text); display: flex; align-items: center; }
.st-icon svg { width: 16px; height: 16px; }
.st-name { font-size: 13.5px; font-weight: 700; color: var(--title); }
.st-note { font-size: 12px; color: var(--muted); line-height: 1.4; }

.pan-catalog-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 0.5rem;
}

.pan-compact-tile {
  background: var(--ash);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
  min-height: 44px;
  cursor: pointer;
  transition: border-color var(--transition-fast), background var(--transition-fast), transform 0.12s var(--ease-out);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 6px;
  position: relative;
}

.pan-compact-tile:hover {
  border-color: var(--border-strong);
  background: var(--stone);
}

.pan-compact-tile.selected {
  border-color: var(--orange);
  background: var(--orange-soft);
}

.pct-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 20px;
}

.pct-badge {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--gold);
  letter-spacing: 0.07em;
}

.pct-check {
  display: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--orange);
  color: var(--on-accent);
  align-items: center;
  justify-content: center;
}

.pct-check svg { width: 12px; height: 12px; }
.pct-check svg [stroke="#ec3013"] { stroke: currentColor; }

.pan-compact-tile.selected .pct-check { display: flex; }

.pct-name {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  color: var(--title);
  letter-spacing: -0.01em;
  line-height: 1.25;
}

.pct-meta {
  font-family: var(--font-sans);
  font-size: 12.5px;
  color: var(--muted);
  font-weight: 500;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 5px;
  margin-top: 2px;
}

.pct-meta strong {
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 600;
  color: var(--flour);
  background: var(--raise);
  padding: 2px 6px;
  border-radius: 4px;
}

.leaven-list-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 4px;
}

.leaven-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 13px 15px;
  border-radius: var(--radius-md);
  background: var(--ash);
  border: 1.5px solid var(--border);
  cursor: pointer;
  transition: border-color var(--transition-fast), background var(--transition-fast), transform 0.12s var(--ease-out);
  position: relative;
}

.leaven-card:hover {
  border-color: var(--border-strong);
  background: var(--stone);
}

.leaven-card.active {
  border-color: var(--orange);
  background: var(--orange-soft);
}

.leaven-card-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
}

.leaven-icon-box {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--raise);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
  transition: background 0.2s, border-color 0.2s;
}

.leaven-card.active .leaven-icon-box {
  background: var(--orange-soft);
  border-color: var(--orange-line);
}

.leaven-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1;
  min-width: 0;
}

.leaven-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.leaven-title {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  color: var(--title);
  letter-spacing: -0.01em;
}

.leaven-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--gold-soft);
  color: var(--gold);
  border: 1px solid var(--gold-line);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.leaven-card.active .leaven-badge {
  background: var(--orange);
  color: var(--on-accent);
  border-color: var(--orange);
}

.leaven-desc {
  font-size: 12.5px;
  color: var(--flour);
  line-height: 1.45;
}

.leaven-radio-indicator {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid var(--border-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: border-color 0.2s;
}

.leaven-card.active .leaven-radio-indicator { border-color: var(--orange); }

.leaven-radio-inner {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: transparent;
  transform: scale(0.4);
  transition: transform 0.2s var(--ease-out), background 0.2s;
}

.leaven-card.active .leaven-radio-inner {
  background: var(--orange);
  transform: scale(1);
}

.technique-tile {
  position: relative;
  background: var(--ash);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 13px 14px;
  cursor: pointer;
  transition: border-color var(--transition-fast), background var(--transition-fast), transform 0.12s var(--ease-out);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.technique-tile:hover {
  border-color: var(--orange-line);
  background: var(--stone);
}

.tt-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.tt-step {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--orange-text);
}

.tt-action {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  background: var(--raise);
  padding: 3px 7px;
  border-radius: 4px;
}

.technique-tile:hover .tt-action {
  color: var(--orange-text);
  background: var(--raise);
}

.tt-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  color: var(--title);
}

.tt-desc {
  font-size: 12.5px;
  color: var(--flour);
  line-height: 1.45;
  flex: 1;
}

.tt-desc strong { color: var(--cream); }

.tt-pill {
  align-self: flex-start;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--gold);
  background: var(--gold-soft);
  border: 1px solid var(--gold-line);
  padding: 3px 8px;
  border-radius: var(--radius-pill);
  margin-top: 4px;
}

/* ==========================================================================
   HYDRATION GAUGE, HERO NUMBERS, TABLES, DDT
   ========================================================================== */

.hyd-card {
  display: block;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.1rem 1.25rem;
  margin-bottom: 1rem;
}

.hyd-ring-wrap { position: relative; width: 88px; height: 88px; flex-shrink: 0; }
.hyd-ring-wrap svg { transform: rotate(-90deg); width: 88px; height: 88px; }
#hydCircle { transition: stroke-dashoffset 0.8s var(--ease-out); }
.hyd-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.hyd-pct { font-family: var(--font-mono); font-size: 20px; font-weight: 700; color: var(--title); line-height: 1; }
.hyd-sub { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; margin-top: 3px; }
.hyd-info { flex: 1; min-width: 0; }
.hyd-title { font-family: var(--font-display); font-size: 14px; font-weight: 700; color: var(--title); margin-bottom: 4px; }
.hyd-desc { font-size: 12.5px; color: var(--muted); line-height: 1.5; margin-bottom: 8px; }
.hyd-bars { display: flex; gap: 14px; flex-wrap: wrap; }
.bar-row { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); }
.bar-row strong { font-family: var(--font-mono); font-weight: 600; color: var(--cream); }

/* One hero number per card: the .hi cell */
.hero-cells-grid {
  display: grid;
  grid-template-columns: 1fr 1.35fr 1fr;
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 1rem;
}

.hcell {
  background: var(--card-bg);
  padding: 0.9rem 0.5rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
}

.hcell-lbl {
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  line-height: 1.2;
}

.hcell-val {
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 600;
  color: var(--cream);
  line-height: 1.15;
  min-height: 1.15em;
}

.hcell.hi { background: var(--ash); }

.hcell.hi .hcell-val {
  font-size: 26px;
  font-weight: 700;
  color: var(--orange-text);
}

.hcell.hi .hcell-lbl { color: var(--flour); }

.data-tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.data-tbl thead tr { border-bottom: 1px solid var(--border); }

.data-tbl th {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 8px;
  text-align: left;
  white-space: nowrap;
}

.data-tbl th:last-child, .data-tbl td:last-child { text-align: right; }

.data-tbl td {
  font-family: var(--font-mono);
  font-size: 13px;
  padding: 9px 8px;
  border-bottom: 1px solid var(--border);
  color: var(--cream);
  vertical-align: middle;
}

.data-tbl td.ing-n { color: var(--flour); font-family: var(--font-sans); font-weight: 500; }
.data-tbl td.pct { color: var(--muted); font-size: 12px; }
.data-tbl tr.tot-row td { border-bottom: none; padding-top: 10px; font-weight: 700; color: var(--gold); }
.data-tbl tbody tr:last-child td { border-bottom: none; }

.ddt-result-box {
  background: var(--stone);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  margin-top: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.ddt-result-lbl {
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.ddt-result-val {
  font-family: var(--font-mono);
  font-size: 28px;
  font-weight: 700;
  color: var(--orange-text);
  line-height: 1.1;
  margin-top: 2px;
  min-height: 1.1em;
}

.ddt-advice {
  font-size: 12px;
  color: var(--flour);
  text-align: right;
  line-height: 1.4;
}

.start-badge-row {
  margin-top: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--stone);
  padding: 12px 14px;
  border-radius: var(--radius-sm);
}

.start-badge-val {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--orange-text);
  font-weight: 700;
  margin-top: 2px;
  min-height: 1.2em;
}

/* ==========================================================================
   TIMERS
   ========================================================================== */

.timers-grid { display: block; }

.timer-chips-scroll {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 2px 8px;
  margin-bottom: 10px;
  scrollbar-width: none;
}

.timer-chips-scroll::-webkit-scrollbar { display: none; }

.timer-chip-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--ash);
  border: 1px solid var(--border);
  color: var(--cream);
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  position: relative;
  transition: border-color var(--transition-fast), background var(--transition-fast), transform 0.12s var(--ease-out);
  flex-shrink: 0;
}

.timer-chip-btn strong {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  color: var(--muted);
}

.timer-chip-btn:hover {
  border-color: var(--orange-line);
  background: var(--orange-soft);
}

.timer-chip-btn.active-running {
  background: var(--orange);
  border-color: var(--orange);
  color: var(--on-accent);
}

.timer-chip-btn.active-running strong { color: var(--on-accent); opacity: 0.8; }

.timer-cards-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.timer-card {
  background: var(--ash);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: border-color var(--transition-fast), background var(--transition-fast);
}

.timer-card.running {
  border-color: var(--orange);
  background: var(--orange-soft);
}

.timer-card.done {
  border-color: var(--gold);
  animation: timerDone 0.9s var(--ease-out);
}

@keyframes timerDone {
  0% { background: var(--orange); }
  40% { background: var(--orange-soft); }
  100% { background: var(--ash); }
}

.timer-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.timer-head { display: flex; align-items: center; gap: 8px; min-width: 0; }

.timer-title {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  color: var(--title);
}

.timer-ends-label {
  font-size: 12px;
  color: var(--gold);
  margin-top: 2px;
}

.timer-clock {
  font-family: var(--font-mono);
  font-size: 22px;
  font-weight: 700;
  color: var(--title);
  letter-spacing: 0.01em;
  flex-shrink: 0;
}

.timer-card.running .timer-clock { color: var(--orange-text); }
.timer-card.done .timer-clock { color: var(--gold); }

.timer-progress-track {
  height: 5px;
  background: var(--raise);
  border-radius: 999px;
  overflow: hidden;
  margin: 6px 0;
}

.timer-progress-fill {
  height: 100%;
  background: var(--orange);
  border-radius: 999px;
  transition: width 0.3s linear;
}

.timer-card.done .timer-progress-fill { background: var(--gold); }

.timer-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.timer-controls-left,
.timer-controls-right {
  display: flex;
  gap: 6px;
}

.timer-quick-add { padding: 0 10px; font-family: var(--font-mono); }

/* ==========================================================================
   FERMENTATION WORKFLOW TIMELINE
   ========================================================================== */

.workflow-timeline-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 6px;
}

.workflow-step-node {
  display: flex;
  align-items: stretch;
  gap: 0;
  position: relative;
  background: var(--ash);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: border-color var(--transition-fast), background var(--transition-fast);
}

.workflow-step-node:hover { border-color: var(--border-strong); }

.workflow-step-node.is-target {
  border-color: var(--gold-line);
  background: var(--gold-soft);
}

.workflow-node-left {
  display: flex;
  align-items: center;
  padding: 0 0 0 12px;
  flex-shrink: 0;
}

.workflow-checkbox {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid var(--border-strong);
  background: var(--ash);
  color: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  z-index: 2;
  transition: border-color var(--transition-fast), background var(--transition-fast), transform 0.12s var(--ease-out);
}

.workflow-checkbox::before { inset: -8px; }

.workflow-checkbox:hover {
  border-color: var(--orange);
  transform: scale(1.06);
}

.workflow-step-node.completed .workflow-checkbox {
  background: var(--orange);
  border-color: var(--orange);
  color: var(--on-accent);
}

.workflow-node-content {
  flex: 1;
  min-width: 0;
  padding: 12px 10px 12px 12px;
}

.workflow-step-node.completed .workflow-node-content { opacity: 0.6; }

.workflow-header-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.workflow-timestamp {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--orange-text);
  letter-spacing: 0.01em;
}

.workflow-step-title {
  font-family: var(--font-display);
  font-size: 13.5px;
  font-weight: 700;
  color: var(--title);
  margin-top: 3px;
  line-height: 1.25;
}

.workflow-step-node.completed .workflow-step-title { text-decoration: line-through; }

.workflow-dur-pill {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--gold-soft);
  color: var(--gold);
  border: 1px solid var(--gold-line);
  white-space: nowrap;
  flex-shrink: 0;
}

.workflow-details {
  font-size: 12px;
  color: var(--flour);
  line-height: 1.5;
}

.workflow-chevron {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  color: var(--muted);
  border-left: 1px solid var(--border);
  transition: color var(--transition-fast);
}

.workflow-step-node:hover .workflow-chevron { color: var(--orange-text); }

/* Node details modal (markup comes from ferment.js) */
.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.modal-header h3 { margin-bottom: 0; }

.icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--raise);
  color: var(--cream);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  flex-shrink: 0;
  transition: background var(--transition-fast), border-color var(--transition-fast);
}

.icon-btn:hover { background: var(--stone); border-color: var(--border-strong); }

.node-meta {
  display: flex;
  gap: 10px;
  margin-bottom: 1rem;
  align-items: center;
  flex-wrap: wrap;
}

.node-details-text {
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--flour);
}

.node-details-text strong { color: var(--cream); font-family: var(--font-mono); font-weight: 600; }

/* ==========================================================================
   WORLD PIZZA CATALOG
   ========================================================================== */

.catalog-controls {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 1.25rem;
}

.catalog-search-wrap {
  position: relative;
  display: flex;
  align-items: center;
  background: var(--ash);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0 8px 0 14px;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast);
}

.catalog-search-wrap:focus-within {
  border-color: var(--orange);
  box-shadow: 0 0 0 3px var(--orange-soft);
  background: var(--stone);
}

.catalog-search-wrap > svg {
  color: var(--muted);
  flex-shrink: 0;
  margin-right: 10px;
}

.catalog-search-wrap input {
  flex: 1;
  height: 46px;
  min-width: 0;
  background: transparent;
  border: none;
  color: var(--cream);
  font-family: var(--font-sans);
  font-size: 13.5px;
  outline: none;
}

.catalog-search-wrap input::placeholder { color: var(--muted); }

#clearCatalogSearchBtn {
  width: 36px;
  height: 36px;
  background: transparent;
  border: none;
  color: var(--muted);
  font-size: 16px;
  cursor: pointer;
  border-radius: 50%;
  position: relative;
  transition: color var(--transition-fast), background var(--transition-fast);
}

#clearCatalogSearchBtn:hover {
  color: var(--cream);
  background: var(--stone);
}

.catalog-filter-pills {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 2px 2px 4px;
}

.catalog-filter-pills::-webkit-scrollbar { display: none; }

.cat-pill {
  flex-shrink: 0;
  height: 38px;
  padding: 0 14px;
  background: var(--ash);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted);
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  position: relative;
  transition: border-color var(--transition-fast), color var(--transition-fast), background var(--transition-fast), transform 0.12s var(--ease-out);
  display: flex;
  align-items: center;
  gap: 4px;
}

.cat-pill:hover {
  border-color: var(--border-strong);
  color: var(--cream);
}

.cat-pill.active {
  background: var(--orange);
  border-color: var(--orange);
  color: var(--on-accent);
}

/* The count sits in its own small chip; before, the flex gap split "All (" from "13" from ")" */
.cat-count {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
  padding: 3px 6px;
  border-radius: 999px;
  background: var(--well);
  color: inherit;
  margin-left: 2px;
}

/* On the ember pill the chip lifts rather than darkens: ink over ember+16% ink was 3.9:1 at 11px;
   ink over ember+28% white is about 7:1. Light theme runs white text on a deeper ember, so it darkens. */
.cat-pill.active .cat-count { background: rgba(255, 255, 255, 0.28); }
[data-theme="light"] .cat-pill.active .cat-count { background: rgba(0, 0, 0, 0.18); }

.combos-grid {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.luxury-pizza-card {
  position: relative;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.25rem;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: border-color var(--transition-fast), transform 0.12s var(--ease-out);
}

.luxury-pizza-card:hover { border-color: var(--border-strong); }

.lpc-glow-bar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--orange);
}

.luxury-pizza-card.accent-gold .lpc-glow-bar { background: var(--gold); }
.luxury-pizza-card.accent-green .lpc-glow-bar { background: var(--green); }
.luxury-pizza-card.accent-orange .lpc-glow-bar { background: var(--orange); }

.lpc-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.lpc-flag-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--gold);
}

.lpc-cat-badge {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--raise);
  color: var(--muted);
  border: 1px solid var(--border);
  white-space: nowrap;
}

.lpc-cat-badge.classic { color: var(--orange-text); border-color: var(--orange-line); background: var(--orange-soft); }
.lpc-cat-badge.world { color: var(--gold); border-color: var(--gold-line); background: var(--gold-soft); }
.lpc-cat-badge.keto { color: var(--green); border-color: rgba(122, 170, 82, 0.3); background: var(--green-soft); }

.lpc-title-row { margin-bottom: 8px; }

.lpc-title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  color: var(--title);
  line-height: 1.25;
  letter-spacing: -0.01em;
  margin: 0;
}

.lpc-desc {
  font-size: 12.5px;
  color: var(--flour);
  line-height: 1.55;
  margin-bottom: 12px;
}

.lpc-tags-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 14px;
}

.lpc-tag {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  background: var(--well);
  border: 1px solid var(--border);
  padding: 3px 8px;
  border-radius: 6px;
}

.lpc-actions-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

/* ==========================================================================
   EMPTY, LOADING AND ERROR STATES
   ========================================================================== */

.empty-state,
.empty-catalog-box {
  background: var(--card-bg);
  border: 1px dashed var(--border-strong);
  border-radius: 14px;
  padding: 2.25rem 1.25rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.empty-glyph {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--orange-soft);
  color: var(--orange-text);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 6px;
}

.empty-glyph svg { width: 22px; height: 22px; }

.empty-title {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  color: var(--title);
}

.empty-sub {
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.5;
  max-width: 34ch;
}

.empty-state .btn { margin-top: 10px; }

/* Skeletons show only while the app boots */
[data-state="loading"] .skel {
  color: transparent !important;
  background: var(--raise);
  border-radius: 6px;
  animation: skelPulse 1.4s ease-in-out infinite;
  min-width: 3ch;
}

.skel-block {
  height: 64px;
  border-radius: 12px;
  background: var(--raise);
  animation: skelPulse 1.4s ease-in-out infinite;
  margin-bottom: 10px;
}

.skel-block.sm { height: 40px; }

[data-state="ready"] .skel-block,
[data-state="error"] .skel-block { display: none; }

@keyframes skelPulse {
  0%, 100% { opacity: 0.55; }
  50% { opacity: 1; }
}

.boot-error {
  display: none;
  margin: 1rem 0;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  background: var(--danger-soft);
  border: 1px solid var(--danger-line);
  color: var(--cream);
  font-size: 13px;
  line-height: 1.5;
}

[data-state="error"] .boot-error { display: block; }

.boot-error strong { color: var(--danger); }

/* ==========================================================================
   SAVED BAKE JOURNAL
   ========================================================================== */

.jcard {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.1rem;
  margin-bottom: 12px;
  transition: border-color var(--transition-fast), background var(--transition-fast), transform 0.12s var(--ease-out);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
}

.jcard.interactive-card:hover {
  border-color: var(--orange-line);
  background: var(--ash);
}

.jc-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 4px;
}

.jc-name {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  color: var(--title);
  letter-spacing: -0.01em;
}

.jc-date {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--gold);
  white-space: nowrap;
}

.jc-meta {
  font-size: 12.5px;
  color: var(--muted);
  margin-bottom: 10px;
}

.jc-meta .jc-stars { color: var(--gold); letter-spacing: 0.05em; }
.jc-meta .jc-dough { font-family: var(--font-mono); color: var(--flour); }

.jc-notes {
  font-size: 12.5px;
  color: var(--flour);
  line-height: 1.5;
  background: var(--well);
  padding: 9px 11px;
  border-radius: var(--radius-sm);
  margin-bottom: 10px;
}

.jc-photo {
  width: 100%;
  height: 160px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  margin-bottom: 10px;
}

.jc-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

.jc-tag {
  font-size: 11px;
  font-weight: 600;
  text-transform: capitalize;
  color: var(--muted);
  background: var(--raise);
  border: 1px solid var(--border);
  padding: 3px 8px;
  border-radius: 6px;
}

.jc-view-btn {
  font-size: 12px;
  font-weight: 700;
  color: var(--orange-text);
}

/* ==========================================================================
   MIXING INSTRUCTION CAROUSEL
   ========================================================================== */

.instruction-carousel-wrap {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.instruction-carousel-track {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 2px;
}

.instruction-carousel-track::-webkit-scrollbar { display: none; }

.instruction-card {
  flex: 0 0 100%;
  min-width: 100%;
  scroll-snap-align: center;
  background: var(--ash);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.35rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 180px;
  position: relative;
  transition: border-color var(--transition-fast);
}

.instruction-card:hover { border-color: var(--border-strong); }

.ic-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.ic-badge {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--orange-text);
  background: var(--orange-soft);
  padding: 4px 8px;
  border-radius: 4px;
}

.ic-num {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 700;
  color: var(--border-strong);
}

.ic-title {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
  color: var(--title);
  margin-bottom: 0.5rem;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.ic-desc {
  font-size: 13px;
  color: var(--flour);
  line-height: 1.6;
}

.ic-nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 4px;
}

.ic-dots-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ic-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--border-strong);
  cursor: pointer;
  position: relative;
  transition: width var(--transition-fast), background var(--transition-fast);
}

.ic-dot::before { content: ''; position: absolute; inset: -17px -8px; }

.ic-dot.active {
  width: 24px;
  border-radius: 5px;
  background: var(--orange);
}

.nav-row {
  display: flex;
  gap: 10px;
  justify-content: space-between;
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.star-row { display: flex; gap: 6px; }

.star-btn {
  width: 44px;
  height: 44px;
  font-size: 20px;
  color: var(--border-strong);
  transition: color var(--transition-fast), transform 0.12s var(--ease-out);
}

.star-btn.on { color: var(--gold); border-color: var(--gold-line); background: var(--gold-soft); }

/* ==========================================================================
   MODALS AND TOAST (single definition)
   ========================================================================== */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  animation: modalFadeIn 0.2s ease-out;
}

.modal-overlay.active { display: flex; }

@keyframes modalFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-sheet,
.modal-content {
  background: var(--ash);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  width: 100%;
  max-width: 460px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  position: relative;
  animation: sheetPop 0.3s var(--ease-out) forwards;
}

@keyframes sheetPop {
  0% { opacity: 0; transform: translateY(24px); }
  100% { opacity: 1; transform: translateY(0); }
}

.modal-sheet h3,
.modal-content h3 {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 700;
  color: var(--title);
  letter-spacing: -0.01em;
  line-height: 1.25;
  margin-bottom: 0.75rem;
}

.modal-sheet h4 {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  color: var(--title);
  margin: 12px 0 6px;
}

.modal-sheet p { margin-bottom: 6px; }
.modal-sheet code { font-family: var(--font-mono); font-size: 12px; color: var(--gold); }
.modal-sheet hr { border: none; border-top: 1px solid var(--border); margin: 12px 0; }

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

.modal-sheet-header h3 { margin-bottom: 0; }

.modal-lead {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
  margin-bottom: 16px;
}

.modal-body-text {
  font-size: 12.5px;
  color: var(--flour);
  line-height: 1.6;
  margin-top: 10px;
}

.modal-stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.modal-glyph {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--orange-soft);
  color: var(--orange-text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
}

/* Recipe card reveal: the share moment */
.card-canvas {
  width: 100%;
  max-width: 320px;
  border-radius: 8px;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border);
  display: block;
  margin: 0 auto;
}

.card-canvas.reveal { animation: cardReveal 0.55s var(--ease-out); }

@keyframes cardReveal {
  0% { opacity: 0; transform: translateY(14px) scale(0.96) rotate(-1deg); }
  100% { opacity: 1; transform: translateY(0) scale(1) rotate(0); }
}

.btn.is-saved {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--on-accent);
}

[data-theme="light"] .btn.is-saved { color: #ffffff; }

.toast {
  position: fixed;
  bottom: calc(1.5rem + env(safe-area-inset-bottom, 0px));
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--cream);
  color: var(--ink);
  padding: 12px 20px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 700;
  box-shadow: var(--shadow-lg);
  z-index: 10000;
  opacity: 0;
  pointer-events: none;
  max-width: calc(100vw - 2rem);
  text-align: center;
  transition: opacity 0.3s var(--ease-out), transform 0.35s var(--ease-out);
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ==========================================================================
   SETTINGS
   ========================================================================== */

.theme-choice-chip {
  background: var(--stone);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px;
  min-height: 44px;
  text-align: center;
  cursor: pointer;
  font-family: var(--font-sans);
  color: var(--cream);
  transition: border-color var(--transition-fast), background var(--transition-fast), transform 0.12s var(--ease-out);
}

.theme-choice-chip:hover { border-color: var(--border-strong); }

.theme-choice-chip.active {
  border-color: var(--orange);
  background: var(--orange-soft);
}

.theme-swatch {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  margin: 0 auto 8px;
  border: 1px solid var(--border-strong);
  background: linear-gradient(135deg, #151311 50%, #e8520a 50%);
}

.theme-swatch.light { background: linear-gradient(135deg, #f7f4ee 50%, #bf3d09 50%); }

.theme-name { font-weight: 700; font-size: 13px; color: var(--title); }
.theme-desc { font-size: 11px; color: var(--muted); margin-top: 2px; }

.setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  background: var(--stone);
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  min-height: 56px;
}

.setting-row + .setting-row,
.setting-row + .setting-note { margin-top: 12px; }

.setting-title { font-weight: 700; font-size: 13.5px; color: var(--title); }
.setting-desc { font-size: 12px; color: var(--muted); margin-top: 2px; line-height: 1.4; }

.setting-note {
  font-size: 12.5px;
  color: var(--flour);
  line-height: 1.5;
}

.setting-note strong { color: var(--cream); }

.privacy-note {
  background: var(--stone);
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  margin: 12px 0 14px;
}

.privacy-note-head {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--green);
  margin-bottom: 4px;
}

.privacy-note-body {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.45;
}

.danger-zone {
  border-top: 1px solid var(--border);
  padding-top: 12px;
}

.app-icon-preview {
  width: 54px;
  height: 54px;
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  flex-shrink: 0;
}

.toggle-switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 30px;
  flex-shrink: 0;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: var(--ink);
  border: 1px solid var(--border-strong);
  transition: background-color 0.25s, border-color 0.25s;
  border-radius: 34px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 22px;
  width: 22px;
  left: 3px;
  bottom: 3px;
  background-color: var(--muted);
  transition: transform 0.25s var(--ease-out), background-color 0.25s;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: var(--orange);
  border-color: var(--orange);
}

input:checked + .slider:before {
  transform: translateX(20px);
  background-color: var(--on-accent);
}

.toggle-switch input:focus-visible + .slider {
  outline: 2px solid var(--orange);
  outline-offset: 2px;
}

/* ==========================================================================
   DUOTONE ICON SYSTEM OVERRIDES
   ========================================================================== */

svg [fill="#f3f2f2"] { fill: var(--flour); }
svg [stroke="#f3f2f2"] { stroke: var(--flour); }
svg [fill="#ec3013"] { fill: var(--orange); }
svg [stroke="#ec3013"] { stroke: var(--orange); }
svg [fill="#201e1d"] { fill: var(--ink); }
svg [stroke="#201e1d"] { stroke: var(--ink); }

.active svg [fill="#f3f2f2"],
.selected svg [fill="#f3f2f2"],
.on svg [fill="#f3f2f2"] { fill: var(--cream); }

.active svg [stroke="#f3f2f2"],
.selected svg [stroke="#f3f2f2"],
.on svg [stroke="#f3f2f2"] { stroke: var(--cream); }

.drawer-nav-item.active svg [fill="#f3f2f2"],
.drawer-nav-item.active svg [fill="#ec3013"] { fill: var(--on-accent); }

.prog-step.active .prog-lbl svg [fill="#f3f2f2"] { fill: var(--cream); }
.prog-step.active .prog-lbl svg [fill="#ec3013"] { fill: var(--orange); }

/* ==========================================================================
   SCRATCH / STORE PATH VISIBILITY (toggled by calculator.js inline style)
   ========================================================================== */

.store-only-block { display: none; }

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */

@media (max-width: 480px) {
  .card-header-right .pro-badge { display: none; }
  .hero-cells-grid { grid-template-columns: 1fr 1.3fr 1fr; }
  .hcell.hi .hcell-val { font-size: 23px; }
  .ddt-result-box { flex-direction: column; align-items: flex-start; }
  .ddt-advice { text-align: left; }
  .start-badge-row { flex-direction: column; align-items: stretch; }
  .start-badge-row .btn { width: 100%; }
}

@media (max-width: 400px) {
  .topbar-actions .btn-sm span { display: none; }
  .topbar-actions .btn-sm { width: 44px; padding: 0; }
}

/* ==========================================================================
   REDUCED MOTION: keep state changes, drop travel
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .app-section,
  .step-content,
  .dynamic-island-container,
  .modal-sheet,
  .modal-content,
  .modal-overlay,
  .card-canvas.reveal { animation: none; }
  .timer-card.done { animation: none; background: var(--gold-soft); }
  [data-state="loading"] .skel,
  .skel-block { animation: none; opacity: 0.7; }
  .btn, .toast, .side-drawer, .drawer-backdrop, .card-collapsible-content, .card-collapse-icon svg {
    transition-duration: 0.01ms;
  }
  .btn:active,
  .card-header-bar:active { transform: none; }
}

/* ==========================================================================
   PHASE 2: PWA SURFACES (2026-11-06)
   Self-hosted fonts, the update toast, the install sheet. Tokens above are untouched.
   ========================================================================== */

/* Fonts: latin subsets served from assets/fonts (variable files), preloaded in index.html. */
@font-face {
  font-family: 'Outfit';
  font-style: normal;
  font-weight: 500 800;
  font-display: swap;
  src: url('../assets/fonts/outfit-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('../assets/fonts/plus-jakarta-sans-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('../assets/fonts/plus-jakarta-sans-italic-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('../assets/fonts/jetbrains-mono-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Update toast: the base .toast look, with an ember dot and a Refresh button that stays until tapped. */
.toast.toast-action {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 8px 8px 16px;
  pointer-events: auto;
  background: var(--ash);
  color: var(--cream);
  border: 1px solid var(--border-strong);
  text-align: left;
}

.toast-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--orange);
  box-shadow: 0 0 0 4px var(--orange-soft);
  flex-shrink: 0;
}

.toast-text {
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.toast-btn {
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 800;
  letter-spacing: 0.01em;
  color: var(--on-accent);
  background: var(--orange);
  border: 1px solid var(--orange);
  border-radius: var(--radius-pill);
  padding: 0 16px;
  min-height: 36px;
  cursor: pointer;
  transition: background var(--transition-fast), transform var(--transition-fast);
}

.toast-btn:hover { background: var(--orange-hover); border-color: var(--orange-hover); }
.toast-btn:active { transform: scale(0.97); }
.toast-btn:disabled { opacity: 0.7; cursor: default; }
.toast-btn:focus-visible { outline: 2px solid var(--cream); outline-offset: 2px; }

/* While the update toast is up, a passing status toast sits above it instead of on top of it. */
#appToast:has(~ #updateToast.show) {
  bottom: calc(5.25rem + env(safe-area-inset-bottom, 0px));
}

/* Install sheet: the modal sheet, docked to the bottom edge on phones. */
.modal-overlay.sheet-bottom {
  align-items: flex-end;
  padding: 0;
}

.modal-overlay.sheet-bottom .modal-sheet {
  max-width: 560px;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  border-bottom: none;
  padding: 10px 20px calc(20px + env(safe-area-inset-bottom, 0px));
  animation: sheetRise 0.36s var(--ease-out) forwards;
}

@keyframes sheetRise {
  from { opacity: 0; transform: translateY(40px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (min-width: 640px) {
  .modal-overlay.sheet-bottom { align-items: center; padding: 1rem; }
  .modal-overlay.sheet-bottom .modal-sheet {
    border-radius: var(--radius-lg);
    border-bottom: 1px solid var(--border);
    padding: 1.5rem;
  }
  .modal-overlay.sheet-bottom .install-grip { display: none; }
}

.install-grip {
  width: 40px;
  height: 4px;
  border-radius: 2px;
  background: var(--border-strong);
  margin: 0 auto 16px;
}

.install-head {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 18px;
}

.install-icon {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  flex-shrink: 0;
  box-shadow: var(--shadow-md);
}

.install-head h3 { margin-bottom: 4px; }
.install-head .modal-lead { margin-bottom: 0; }

/* Only the body that matches the resolved mode is shown. */
.install-sheet [data-install-mode] { display: none; }
#installSheet[data-mode="prompt"] [data-install-mode="prompt"],
#installSheet[data-mode="ios"] [data-install-mode="ios"],
#installSheet[data-mode="manual"] [data-install-mode="manual"],
#installSheet[data-mode="installed"] [data-install-mode="installed"] { display: block; }

.install-steps {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0 0 14px;
  padding: 0;
}

.install-steps li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: var(--stone);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--flour);
}

.install-steps strong { color: var(--cream); }

.install-step-num {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--orange);
  color: var(--on-accent);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}

.install-share-glyph {
  display: inline-block;
  vertical-align: -3px;
  margin: 0 2px;
  color: var(--orange-text);
}

.install-cta { width: 100%; min-height: 48px; font-size: 14px; }
.install-secondary { width: 100%; min-height: 44px; }
.install-dismiss { width: 100%; min-height: 44px; margin-top: 10px; }
.install-body .modal-body-text { margin: 0 0 4px; }

/* Entry points vanish once the app runs from the home screen. */
.setting-row[hidden],
.drawer-nav-item[hidden] { display: none; }

/* Card header badges wrap to two lines on phones instead of crushing the title (flour blend header). */
@media (max-width: 480px) {
  .card-header-right .brand-badge {
    white-space: normal;
    max-width: 124px;
    text-align: center;
    line-height: 1.2;
  }
}

/* ==========================================================================
   PHASE 3: SELL ARCHITECTURE (2026-11-06)
   PRO lock markers, gated card overlays, the paywall sheet, the Settings PRO card.
   A gate blurs and freezes a card in place; nothing is removed, so the engines keep rendering.
   Tokens above are untouched; gold is the PRO colour, ember stays the action colour.
   ========================================================================== */

/* Lock marker: a small gold padlock on tabs, tiles, pills and buttons */
.pro-lock {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--gold-soft);
  color: var(--gold);
  flex-shrink: 0;
}

.pro-lock svg { width: 10px; height: 10px; }

.main-nav-tab .pro-lock { margin-left: 2px; }
.drawer-nav-item .pro-lock { margin-left: auto; }

/* On the active ember tab the gold glyph is lost; use the on-accent ink there */
.main-nav-tab.active .pro-lock,
.drawer-nav-item.active .pro-lock {
  background: rgba(22, 16, 11, 0.16);
  color: var(--on-accent);
}
.st-header .pro-lock { margin-left: auto; }
.cat-pill .pro-lock { margin-left: 6px; vertical-align: -3px; }

.style-tile[data-pro-locked] { border-style: dashed; }
.style-tile[data-pro-locked] .st-icon { color: var(--gold); }

.btn[data-pro-locked] > .pro-lock {
  position: absolute;
  top: -5px;
  right: -5px;
  width: 18px;
  height: 18px;
  background: var(--ash);
  border: 1px solid var(--gold-line);
}

/* Header badge on a gated collapsible card: visible even when the card is folded */
.pro-lock.pro-lock-badge {
  width: auto;
  height: 24px;
  gap: 5px;
  padding: 0 9px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--gold-line);
  font-family: var(--font-sans);
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.pro-lock.pro-lock-badge svg { width: 11px; height: 11px; }

/* Gated region: content stays, blurred and inert, under one Unlock button */
[data-pro-gate] { position: relative; }

[data-pro-gate] > :not(.pro-gate):not(.card-title):not(.lpc-glow-bar):not(.lpc-top-row):not(.lpc-title-row) {
  filter: blur(5px);
  opacity: 0.55;
  user-select: none;
  pointer-events: none;
  transition: filter 0.4s var(--ease-out), opacity 0.4s var(--ease-out);
}

/* Room for the gate box; scoped to open cards so a folded card still folds to zero */
.collapsible-card:not(.collapsed) > .card-collapsible-content[data-pro-gate],
.card[data-pro-gate],
.g2-cards[data-pro-gate] { min-height: 196px; }

.luxury-pizza-card[data-pro-gate] { min-height: 236px; }

/* The box sits near the top of the region so it is in view under the card header, even when the
   blurred content underneath runs for several screens (timers, cost + nutrition). */
.pro-gate {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 28px 16px 16px;
  transition: opacity 0.35s var(--ease-out);
}

/* Catalog cards keep their title visible, so the box centres below it */
.luxury-pizza-card > .pro-gate { align-items: center; padding-top: 48px; }

/* A plain card keeps its .card-title readable too, so the box starts below the title line */
.card[data-pro-gate] > .pro-gate { padding-top: 56px; }

.pro-gate.is-dissolving { opacity: 0; pointer-events: none; }

.pro-gate-box {
  background: var(--ash);
  border: 1px solid var(--gold-line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  padding: 16px 18px 18px;
  width: min(100%, 272px);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.pro-gate-lock {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--gold-soft);
  color: var(--gold);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 6px;
}

.pro-gate-lock svg { width: 16px; height: 16px; }

.pro-gate-title {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--title);
  line-height: 1.25;
}

.pro-gate-sub { font-size: 12px; color: var(--muted); }

.pro-gate-btn { margin-top: 10px; min-height: 44px; padding: 0 20px; }

/* Journal cap note under the save button */
.pro-cap-note {
  font-size: 12px;
  color: var(--muted);
  text-align: center;
  line-height: 1.45;
  margin: 10px 0 0;
}

/* Paywall sheet: the install sheet's frame, with the price as the hero number.
   The header is pinned; .paywall-body scrolls inside the sheet; "Not now" is pinned below it,
   so the way out is always on screen (Phase 4). */
.modal-overlay.sheet-bottom .paywall-sheet {
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 24px);
  max-height: calc(100dvh - 24px);
  overflow: hidden;
  padding-top: 10px;
  padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
}

.paywall-sheet .install-grip,
.paywall-sheet .paywall-head,
.paywall-sheet .install-dismiss { flex-shrink: 0; }

.paywall-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  margin: 0 -20px;
  padding: 0 20px 2px;
}

.paywall-sheet .install-dismiss { margin-top: 8px; }

@media (min-width: 640px) {
  .modal-overlay.sheet-bottom .paywall-sheet { max-height: 90vh; padding-bottom: 1.5rem; }
  .paywall-body { margin: 0 -1.5rem; padding: 0 1.5rem 2px; }
}

.paywall-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 14px;
}

.paywall-head-text { flex: 1; min-width: 0; }

.paywall-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 8px;
}

.paywall-head h3 { font-size: 21px; margin-bottom: 4px; }
.paywall-head .modal-lead { margin-bottom: 0; }
.paywall-head { margin-bottom: 10px; }

.paywall-close { width: 44px; height: 44px; }

.paywall-context {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--orange-text);
  margin: 0 0 10px;
}

.paywall-context[hidden] { display: none; }

.paywall-price {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 10px 14px;
  background: var(--stone);
  border-radius: var(--radius-md);
  margin-bottom: 10px;
}

/* The price is set in the display face, not the mono: a monospaced "$9.99" puts a full cell around
   the point and reads as four separate glyphs. Outfit with lining tabular figures reads as one number. */
.paywall-price-num {
  font-family: var(--font-display);
  font-variant-numeric: lining-nums tabular-nums;
  font-size: 38px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.035em;
  color: var(--title);
}

.paywall-price-note { font-size: 12.5px; font-weight: 600; color: var(--muted); }

.paywall-list {
  list-style: none;
  margin: 0 0 12px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.paywall-list li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 6px 10px;
  background: var(--stone);
  border-radius: var(--radius-sm);
  font-size: 12.5px;
  line-height: 1.38;
  color: var(--flour);
}

.paywall-ic {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: var(--orange-soft);
}

.paywall-ic svg { width: 16px; height: 16px; }

.paywall-buy { width: 100%; min-height: 48px; font-size: 14px; }

/* Disabled stays stone under the pointer too: .btn-pri:hover must not light a dead button */
.paywall-buy:disabled,
.paywall-buy:disabled:hover,
.paywall-buy[aria-disabled="true"],
.paywall-buy[aria-disabled="true"]:hover {
  background: var(--stone);
  border-color: var(--border-strong);
  color: var(--muted);
  cursor: default;
  transform: none;
  box-shadow: none;
}

.paywall-note {
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.45;
  text-align: center;
  margin: 8px 0 0;
}

.paywall-note[hidden] { display: none; }

.paywall-key {
  margin-top: 8px;
  border-top: 1px solid var(--border);
  padding-top: 0;
}

.paywall-key summary {
  list-style: none;
  cursor: pointer;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--cream);
  border-radius: var(--radius-sm);
}

.paywall-key summary::-webkit-details-marker { display: none; }

.paywall-key summary::after {
  content: '';
  width: 8px;
  height: 8px;
  margin-right: 6px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(45deg);
  transition: transform 0.2s var(--ease-out);
}

.paywall-key[open] summary::after { transform: rotate(-135deg); }

.paywall-key-row { display: flex; gap: 8px; margin-top: 4px; }

.paywall-key-input {
  flex: 1;
  min-width: 0;
  min-height: 44px;
  padding: 0 12px;
  background: var(--ash);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--cream);
  font-family: var(--font-mono);
  font-size: 16px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.paywall-key-input::placeholder { color: var(--muted); opacity: 0.7; letter-spacing: 0.08em; }
.paywall-key-input:focus { outline: none; border-color: var(--orange); box-shadow: 0 0 0 3px var(--orange-soft); }
.paywall-key-input[aria-invalid="true"] { border-color: var(--danger); box-shadow: 0 0 0 3px var(--danger-soft); }

.paywall-key-row .btn { min-height: 44px; }

.paywall-key-msg {
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--muted);
  min-height: 1.45em;
  margin: 8px 0 4px;
}

.paywall-key-msg.is-error { color: var(--danger); }
.paywall-key-msg.is-ok { color: var(--green); }

/* Settings PRO card */
.pro-settings-card .card-title { display: flex; align-items: center; gap: 8px; }

.pro-status-chip {
  margin-left: auto;
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  background: var(--raise);
  border: 1px solid var(--border);
  color: var(--muted);
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.pro-settings-card[data-pro-state="unlocked"] .pro-status-chip {
  background: var(--gold-soft);
  border-color: var(--gold-line);
  color: var(--gold);
}

.pro-key-masked {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.06em;
  color: var(--cream);
}

/* .btn sets display: inline-flex, which would beat the hidden attribute once PRO is unlocked */
.pro-settings-card .btn[hidden],
.setting-row[hidden] { display: none; }

@media (prefers-reduced-motion: reduce) {
  .pro-gate,
  [data-pro-gate] > *,
  .paywall-key summary::after { transition: none; }
}

/* ==========================================================================
   TIMER ICONS (app fixes, 2026-11-06)
   The kitchen timers use the duotone icon set (js/icons.js) instead of emoji. The global attribute
   rules above already map flour / ember / ink to theme tokens; these only size the glyph and recolor
   it with the card state: ember while running, gold when done, on-accent inside a running chip.
   ========================================================================== */

.timer-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  line-height: 0;
}

.timer-icon svg { width: 22px; height: 22px; display: block; }
.timer-chip-btn .timer-icon svg { width: 16px; height: 16px; }

.di-title { display: inline-flex; align-items: center; gap: 6px; }
.di-title .timer-icon svg { width: 15px; height: 15px; }

.timer-card.running .timer-icon svg [fill="#f3f2f2"] { fill: var(--orange-text); }
.timer-card.running .timer-icon svg [stroke="#f3f2f2"] { stroke: var(--orange-text); }

.timer-card.done .timer-icon svg [fill="#f3f2f2"],
.timer-card.done .timer-icon svg [fill="#ec3013"] { fill: var(--gold); }
.timer-card.done .timer-icon svg [stroke="#f3f2f2"] { stroke: var(--gold); }

.timer-chip-btn.active-running .timer-icon svg [fill="#f3f2f2"],
.timer-chip-btn.active-running .timer-icon svg [fill="#ec3013"] { fill: var(--on-accent); }
.timer-chip-btn.active-running .timer-icon svg [stroke="#f3f2f2"] { stroke: var(--on-accent); }
