/* ============================================================
   Cook Done Right — shared core styles
   Used by all protein pages. Per-protein style.css overrides
   the --accent and --accent-* variables for theming.
   ============================================================ */

:root {
  /* Neutrals */
  --char: #0e0c0b;
  --coal: #1a1612;
  --coal-2: #221b15;
  --cream: #f4ebd9;
  --cream-soft: #d8cdb9;
  --smoke: #b8aa98;
  --ash: #3a2f24;
  --ash-2: #4a3d2f;

  /* Accent (overridden per protein) */
  --accent: #d44a0d;
  --accent-soft: #ee8a16;
  --accent-bright: #f5c842;
  --accent-glow: rgba(212, 74, 13, 0.35);
  --accent-tint: rgba(212, 74, 13, 0.1);

  /* Safety */
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-top: env(safe-area-inset-top, 0px);
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
/* NOTE: html/body height:100% intentionally absent. That pattern constrains body's
   CSS box to viewport height, which causes position:sticky to stop working once the
   user scrolls past body's bottom edge (~viewport_height px into a long page).
   body { min-height:100vh } below is sufficient — fills viewport on short pages,
   grows naturally on long ones, and lets sticky work across the full scroll range. */

body {
  background: var(--char);
  color: var(--cream);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-weight: 400;
  font-size: 15px;
  line-height: 1.5;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  padding-bottom: calc(80px + var(--safe-bottom));
}
/* overflow-x: clip removed v13 — was breaking sticky header in setup mode on Android Chrome.
   Viewport meta tag (width=device-width) prevents horizontal scroll on mobile. */

a { color: var(--accent-soft); text-decoration: none; }
a:hover { color: var(--accent-bright); }

/* ============================================================
   HEADER — three-zone layout: brand | live time | controls
   Stays sticky throughout entire setup scroll.
   ============================================================ */
header {
  display: grid;
  /* Fixed proportions: brand 42%, time 28%, controls auto.
     Prevents tagline length from shifting time block. */
  grid-template-columns: 42% 28% auto;
  align-items: center;
  padding: 8px 10px;
  border-bottom: 1px solid var(--ash);
  position: sticky;
  top: 0;
  background: var(--char);
  z-index: 100;
  gap: 6px;
  min-height: 78px;
}
/* header.unstuck removed v13 — smart-unstick logic retired */

/* T6: Thickness coin-tip collapsible */
.coin-hint-toggle {
  background: none;
  border: none;
  color: var(--smoke, #b8aa98);
  cursor: pointer;
  font-size: 12px;
  padding: 0 0 0 5px;
  vertical-align: middle;
  opacity: 0.7;
  line-height: 1;
}
.coin-hint-toggle:hover { opacity: 1; }
.coin-tip { display: none; }
.coin-tip.show { display: block; }

.brand-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  overflow: hidden;
}

.home-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--ash);
  color: var(--cream-soft);
  flex-shrink: 0;
  transition: all 0.2s;
  font-size: 13px;
  border: 1px solid var(--ash-2);
}
.home-link:hover { color: var(--accent-soft); border-color: var(--accent); }

.brand { min-width: 0; flex: 1 1 auto; overflow: hidden; }
.logo {
  font-size: 14px;
  font-weight: 800;
  letter-spacing: -0.3px;
  line-height: 1.1;
  white-space: normal;
  word-wrap: break-word;
  overflow-wrap: anywhere;
}
.tagline {
  font-size: 9px;
  letter-spacing: 0.5px;
  font-weight: 500;
  color: var(--smoke);
  text-transform: uppercase;
  margin-top: 3px;
  white-space: normal;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

/* Centre zone: live time estimate */
.head-time {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.head-time-label {
  font-size: 8px;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--smoke);
  font-weight: 600;
  margin-bottom: 3px;
}
.head-time-val {
  font-size: 18px;
  font-weight: 700;
  color: var(--cream);
  letter-spacing: -0.3px;
  font-variant-numeric: tabular-nums;
  line-height: 1.05;
  display: inline-block;
}
.head-time-val .approx { color: var(--smoke); margin-right: 1px; }
.head-time-val.flash {
  animation: timeFlash 0.4s ease-out 2;
}
@keyframes timeFlash {
  0%   { color: var(--cream); }
  40%  { color: var(--accent-bright); }
  100% { color: var(--cream); }
}
.head-time-sub {
  font-size: 8px;
  color: var(--smoke);
  letter-spacing: 0.4px;
  margin-top: 2px;
  opacity: 0.85;
}

/* In cook mode the centre shows the pull temp instead */
body.mode-cook .head-time-label { color: var(--accent-soft); }
body.mode-cook .head-time-val { color: var(--accent-bright); }

/* Right: controls stacked vertically */
.head-controls {
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: stretch;
  flex-shrink: 0;
}

.unit-btn, .wake-btn {
  background: var(--ash);
  border: 1px solid var(--ash-2);
  border-radius: 14px;
  padding: 4px 9px;
  color: var(--cream-soft);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.4px;
  cursor: pointer;
  transition: all 0.18s;
  white-space: nowrap;
  font-family: inherit;
  line-height: 1.2;
  min-height: 22px;
}
.unit-btn { padding: 4px 7px; text-align: center; }
.unit-active { color: var(--accent-soft); font-weight: 700; }
.unit-inactive { opacity: 0.4; }
.unit-sep { opacity: 0.3; margin: 0 1px; }

.wake-btn { display: flex; align-items: center; justify-content: center; gap: 5px; }
.wake-btn.active {
  background: var(--accent-tint);
  border-color: var(--accent);
  color: var(--accent-soft);
}
.wake-dot {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--smoke);
  flex-shrink: 0;
  transition: all 0.2s;
}
.wake-btn.active .wake-dot {
  background: var(--accent);
  box-shadow: 0 0 6px var(--accent);
}

.ios-hint {
  display: none;
  background: var(--accent-tint);
  border: 1px solid var(--accent-glow);
  border-radius: 7px;
  padding: 10px 13px;
  font-size: 12.5px;
  color: var(--cream-soft);
  margin: 10px 12px 0;
  line-height: 1.45;
}
.ios-hint.show { display: block; }
.ios-hint strong { color: var(--accent-soft); }

/* ============================================================
   SECTIONS / DIVIDERS
   Strip headers — use centered hairline dividers as quiet anchors
   ============================================================ */
section.block { padding: 16px 14px 14px; }

.divider-line {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 14px 14px 4px;
  color: var(--smoke);
  font-size: 9px;
  letter-spacing: 3px;
  text-transform: uppercase;
  font-weight: 600;
  text-align: center;
  justify-content: center;
}
.divider-line::before,
.divider-line::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--ash);
  max-width: 80px;
}

hr.hairline {
  border: none;
  border-top: 1px solid var(--ash);
  margin: 0 14px;
}

/* ============================================================
   PILLS / VARIABLE GROUPS
   ============================================================ */
.var-group { margin-top: 16px; }
.var-group:first-child { margin-top: 0; }
.var-group.sub {
  margin-top: 12px;
  padding: 12px;
  background: rgba(255,255,255,0.025);
  border: 1px solid var(--ash);
  border-radius: 8px;
}
.var-label {
  font-size: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--smoke);
  margin-bottom: 8px;
  font-weight: 600;
  text-align: center;
}

/* Pill tap pulse animation */
@keyframes pillTap {
  0% { transform: scale(1); }
  40% { transform: scale(0.96); }
  100% { transform: scale(1); }
}
.pill.tap-pulse { animation: pillTap 0.18s ease-out; }

.pill-grid { display: grid; gap: 6px; }
.pill-grid.pg-2 { grid-template-columns: repeat(2, 1fr); }
.pill-grid.pg-3 { grid-template-columns: repeat(3, 1fr); }
.pill-grid.pg-4 { grid-template-columns: repeat(4, 1fr); }
.pill-row {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 5px;
}

.pill {
  background: var(--coal);
  border: 1px solid var(--ash);
  border-radius: 7px;
  padding: 9px 8px;
  font-size: 13px;
  color: var(--cream-soft);
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
  text-align: center;
  line-height: 1.25;
  font-weight: 500;
}
.pill:hover { border-color: var(--smoke); color: var(--cream); }
.pill.selected {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  font-weight: 600;
}
.pill[disabled], .pill.disabled {
  opacity: 0.35;
  cursor: not-allowed;
  pointer-events: none;
}
.pill-sub {
  display: inline-block;
  font-size: 10px;
  font-weight: 400;
  opacity: 0.75;
  letter-spacing: 0.2px;
}

/* ============================================================
   CHART (doneness for steak, cuts for chicken)
   ============================================================ */
.chart { display: grid; gap: 6px; padding: 0 14px; }
/* ============================================================
   COLLAPSIBLE OPTION CARDS (v11.1b)
   Used for: doneness, steak cut/type, chicken cut, cook method
   ============================================================ */
.opt-cards { display: grid; gap: 5px; }
.opt-cards.two-col { grid-template-columns: 1fr 1fr; }
/* v12: collapse to single column once confirmed — declutters and saves row height */
.opt-cards.two-col.confirmed { grid-template-columns: 1fr; }

.opt-card {
  display: block;
  background: var(--coal);
  border: 1px solid var(--ash);
  border-radius: 8px;
  padding: 9px 12px 9px 18px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, padding 0.15s;
  position: relative;
  overflow: hidden;
  text-align: left;
  font-family: inherit;
  color: inherit;
  width: 100%;
}
.opt-card::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 5px;
  border-radius: 8px 0 0 8px;
  background: var(--accent);
  opacity: 0.4;
  transition: width 0.15s, opacity 0.15s;
}
.opt-card:hover { border-color: var(--smoke); }

.opt-card.selected {
  border-color: var(--accent);
  background: linear-gradient(90deg, var(--accent-tint) 0%, var(--coal-2) 100%);
  box-shadow: 0 0 0 1px var(--accent-glow);
  padding: 11px 12px 12px 18px;
}
.opt-card.selected::before { width: 7px; opacity: 1; }

/* Doneness color band: red (rare) → gray (well done) */
#chart .opt-card.rare::before          { background: #b32540; }
#chart .opt-card.medium-rare::before   { background: #cc3434; }
#chart .opt-card.medium::before        { background: #e07235; }
#chart .opt-card.medium-well::before   { background: #c88040; }
#chart .opt-card.well::before          { background: #8b6850; }

/* Top row: name on left, meta (PULL/SERVE temps) on right when present */
.opt-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
}
.opt-card-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--cream);
  line-height: 1.2;
  letter-spacing: -0.2px;
  flex: 1;
  min-width: 0;
}

/* Meta (PULL/SERVE temps) — only shown when card is selected */
.opt-card-meta {
  display: none;
  flex-direction: row;
  align-items: flex-start;
  gap: 12px;
  flex-shrink: 0;
}
.opt-card.selected .opt-card-meta { display: flex; }
.opt-card-meta-block { display: flex; flex-direction: column; align-items: flex-end; gap: 1px; }
.opt-card-meta .meta-lbl {
  font-size: 9px;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--smoke);
  font-weight: 600;
  line-height: 1;
}
.opt-card-meta .meta-val {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.3px;
  color: var(--accent-bright);
}
.opt-card-meta .meta-val.serve { color: var(--cream); }

/* Description: hidden by default, full width when selected */
.opt-card-desc {
  font-size: 12px;
  color: var(--cream-soft);
  line-height: 1.35;
  margin-top: 6px;
  display: none;
}
.opt-card.selected .opt-card-desc { display: block; }

/* Tick + Confirm row at bottom-left of expanded card */
.opt-card-tick-wrap {
  display: none;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
}
.opt-card.selected .opt-card-tick-wrap { display: flex; }

.opt-card-confirm-lbl {
  font-size: 11px;
  font-weight: 600;
  color: rgba(255,255,255,0.7);
  letter-spacing: 0.3px;
  white-space: nowrap;
  text-transform: uppercase;
}

.opt-card-tick {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: transparent;
  border: 2px solid rgba(255,255,255,0.88);
  color: transparent;
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  cursor: pointer;
  padding: 0;
  line-height: 1;
}
.opt-card-tick:hover { border-color: #fff; }

.opt-cards.confirmed .opt-card.selected .opt-card-tick {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* Summary row shown when group is confirmed */
.opt-summary {
  padding: 9px 14px;
  font-size: 12px;
  color: var(--smoke);
  opacity: 0.45;
  text-align: center;
  cursor: pointer;
  border: 1px dashed var(--ash);
  border-radius: 8px;
  background: transparent;
  font-family: inherit;
  letter-spacing: 0.3px;
  width: 100%;
  transition: opacity 0.15s;
  grid-column: 1 / -1;
}
.opt-summary:hover { opacity: 0.78; }

/* ============================================================
   MINI TIPS + ALERT BOXES
   ============================================================ */
.mini-tip {
  background: var(--accent-tint);
  border: 1px solid var(--accent-glow);
  border-radius: 6px;
  padding: 9px 12px;
  font-size: 12.5px;
  color: var(--cream-soft);
  line-height: 1.45;
  margin: 10px 14px 0;
}
.mini-tip strong { color: var(--accent-soft); font-weight: 600; }

.alert-box {
  display: none;
  margin-top: 11px;
  border-radius: 7px;
  padding: 10px 13px;
  font-size: 13px;
  line-height: 1.45;
  text-align: left;
}
.alert-box.show { display: block; }
.alert-flip {
  background: var(--accent-tint);
  border: 1px solid var(--accent-glow);
  color: var(--cream);
}
.alert-pull {
  background: rgba(245, 200, 66, 0.09);
  border: 1px solid rgba(245, 200, 66, 0.28);
  color: var(--cream);
}
.alert-pull strong, .alert-flip strong { color: var(--accent-bright); }

/* ============================================================
   BRINE EXPANDABLE
   ============================================================ */
.brine-expand {
  margin-top: 8px;
  background: var(--coal);
  border: 1px solid var(--ash);
  border-radius: 7px;
  overflow: hidden;
  display: none;
}
.brine-expand.show { display: block; }
.brine-expand summary {
  list-style: none;
  cursor: pointer;
  padding: 11px 14px;
  font-size: 13px;
  color: var(--cream-soft);
  display: flex;
  align-items: center;
  justify-content: space-between;
  user-select: none;
}
.brine-expand summary::-webkit-details-marker { display: none; }
.brine-expand summary::after {
  content: '▾';
  color: var(--accent-soft);
  transition: transform 0.2s;
}
.brine-expand[open] summary::after { transform: rotate(180deg); }
.brine-content {
  padding: 0 14px 14px;
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--cream-soft);
}
.brine-content h4 {
  color: var(--accent-soft);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-top: 10px;
  margin-bottom: 4px;
}
.brine-content h4:first-child { margin-top: 0; }
.brine-content ul { padding-left: 18px; margin-top: 4px; }
.brine-content li { margin-bottom: 3px; }

/* ============================================================
   ALARM SETTINGS
   ============================================================ */
.alarm-row { display: flex; gap: 8px; margin-top: 8px; }
.alarm-row[hidden] { display: none; }
.alarm-select {
  flex: 1;
  background: var(--coal);
  border: 1px solid var(--ash);
  border-radius: 7px;
  padding: 9px 11px;
  font-size: 13px;
  color: var(--cream);
  cursor: pointer;
  font-family: inherit;
  font-weight: 500;
}
.btn-test {
  background: var(--ash);
  border: 1px solid var(--ash-2);
  color: var(--cream-soft);
  padding: 9px 14px;
  border-radius: 7px;
  font-size: 12px;
  font-family: inherit;
  font-weight: 600;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: all 0.15s;
}
.btn-test:hover {
  background: var(--coal-2);
  color: var(--accent-soft);
  border-color: var(--accent);
}
/* Triplet notification toggles: Sound · Flash · Vibrate */
.notify-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr auto;
  gap: 6px;
  margin-top: 0;
}
.notify-pill {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 9px 6px;
  background: var(--coal);
  border: 1px solid var(--ash);
  border-radius: 7px;
  color: var(--smoke);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.4px;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s;
}
.notify-pill .icon { font-size: 14px; opacity: 0.55; transition: opacity 0.15s; }
.notify-pill .state { font-size: 9.5px; opacity: 0.6; letter-spacing: 0.8px; }
.notify-pill.on {
  border-color: var(--accent);
  color: var(--cream);
  background: linear-gradient(180deg, var(--accent-tint) 0%, var(--coal) 100%);
}
.notify-pill.on .icon { opacity: 1; }
.notify-pill.on .state { color: var(--accent-bright); opacity: 1; }
.notify-pill:active { transform: scale(0.96); }

/* ============================================================
   START COOKING BUTTON (prominent in setup mode)
   ============================================================ */
/* ── START COOKING BAR ────────────────────────────────────────────────────── */
.start-cooking-bar {
  margin: 8px 14px 0;
  padding: 0;
}

/* v12.2: Start button — setup mode only */
.btn-start-cooking {
  width: 100%;
  background: linear-gradient(150deg, #e85900 0%, #f09300 100%);
  color: #fff;
  border: 1.5px solid rgba(255, 210, 70, 0.45);
  border-radius: 11px;
  padding: 16px 24px 14px;
  font-size: 16px;
  font-family: inherit;
  font-weight: 700;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 4px 24px rgba(220, 80, 10, 0.55), 0 0 0 1px rgba(255, 200, 60, 0.15);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  margin-bottom: 0;
}
.btn-start-cooking:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 32px rgba(220, 80, 10, 0.7), 0 0 0 1px rgba(255, 210, 80, 0.35);
}
.btn-start-cooking:active { transform: translateY(0); }
/* Cook mode: button becomes transparent shell — only hosts the phase strip */
body.mode-cook .btn-start-cooking {
  background: none !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0;
  pointer-events: none;
  cursor: default;
}
body.mode-cook .btn-start-cooking:hover { transform: none; }
.btn-start-label {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding-bottom: 9px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}
.btn-start-cooking .start-icon {
  display: inline-block;
  margin-right: 8px;
  font-size: 18px;
}
.btn-start-cooking .start-time {
  display: inline-block;
  margin-left: 8px;
  font-weight: 600;
  opacity: 0.92;
  font-variant-numeric: tabular-nums;
}

/* Phase strip — inside button (setup) and standalone (cook mode) */
.btn-phase-strip {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 3px;
  padding: 8px 4px 0;
  width: 100%;
  min-height: 28px;
}
/* Cook mode: strip gets a subtle background to float above timer cards */
body.mode-cook .btn-phase-strip {
  background: var(--coal);
  border: 1px solid var(--ash);
  border-radius: 9px;
  padding: 7px 8px;
  margin-top: 8px;
}
.btn-phase-pill {
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.22);
  border-radius: 12px;
  padding: 3px 9px;
  font-size: 10.5px;
  font-weight: 600;
  color: rgba(255,255,255,0.82);
  letter-spacing: 0.2px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  transition: background 0.2s, border-color 0.2s, color 0.2s, opacity 0.2s;
}
/* Setup mode pills sit on orange button — use dark-transparent treatment */
body.mode-setup .btn-phase-pill {
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.28);
  color: rgba(255, 255, 255, 0.92);
}
/* 4+ phases: shrink text so all fit on one line */
.btn-phase-strip.phases-4 .btn-phase-pill,
.btn-phase-strip.phases-5 .btn-phase-pill { font-size: 9.5px; padding: 3px 7px; }
/* Active phase during cook: fully lit */
.btn-phase-pill.active {
  background: var(--accent-tint);
  border-color: var(--accent);
  color: var(--accent-bright);
}
/* Completed phases: dim */
.btn-phase-pill.done { opacity: 0.38; }
/* Upcoming phases: slightly dim */
.btn-phase-pill.upcoming { opacity: 0.65; }
.btn-phase-arrow {
  color: rgba(255,255,255,0.32);
  font-size: 10px;
  font-weight: 700;
}
body.mode-setup .btn-phase-arrow {
  color: rgba(255, 255, 255, 0.5);
  opacity: 1;
}
.thermometer-note {
  text-align: center;
  font-size: 11px;
  color: var(--smoke);
  margin: 8px 0 16px;
  letter-spacing: 0.3px;
}
.thermometer-note strong { color: var(--cream-soft); }

/* ============================================================
   TIMER CARDS (cook mode focus)
   ============================================================ */
.timer-card {
  margin: 16px 14px 0;
  background: var(--coal);
  border: 1px solid var(--ash);
  border-radius: 11px;
  padding: 22px 18px;
  text-align: center;
  display: none;
}
.timer-card.show { display: block; }

.t-instr {
  font-size: 13px;
  color: var(--cream-soft);
  margin-bottom: 6px;
  line-height: 1.4;
}
.t-instr strong { color: var(--accent-soft); }
.t-head {
  font-size: 22px;
  font-weight: 700;
  color: var(--cream);
  line-height: 1.15;
  letter-spacing: -0.4px;
  margin-bottom: 6px;
}
.t-head span { color: var(--accent-soft); }
.t-sublabel {
  font-size: 10px;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 6px;
}

.progress-wrap {
  background: var(--ash);
  border-radius: 3px;
  height: 4px;
  margin: 12px 0;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-bright));
  border-radius: 3px;
  transition: width 0.5s linear;
  width: 0%;
}

.t-clock {
  font-size: clamp(64px, 22vw, 110px);
  font-weight: 600;
  color: var(--accent-bright);
  letter-spacing: -3px;
  line-height: 1;
  margin: 8px 0 18px;
  text-shadow: 0 0 32px rgba(245, 200, 66, 0.28);
  transition: color 0.3s, font-size 0.3s;
  font-variant-numeric: tabular-nums;
}
.t-clock.resting { color: var(--accent-soft); }
.t-clock.done {
  /* v10: one-time fade-in, then static (Q10b). Replaces v9 infinite glowpulse. */
  animation: doneFadeIn 0.6s ease-out;
  color: var(--accent);
  text-shadow: 0 0 32px var(--accent-glow);
  /* Larger icon than text-clock numerals */
  font-size: clamp(72px, 24vw, 120px);
}
@keyframes doneFadeIn {
  from { opacity: 0; transform: scale(0.6); text-shadow: 0 0 0 var(--accent-glow); }
  to   { opacity: 1; transform: scale(1);   text-shadow: 0 0 32px var(--accent-glow); }
}

.btn-row { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.btn {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 12px 26px;
  border-radius: 7px;
  border: none;
  cursor: pointer;
  transition: all 0.15s;
  min-width: 96px;
  font-family: inherit;
}
.btn-p { background: var(--accent); color: #fff; }
.btn-p:hover { background: var(--accent-soft); }
.btn-s {
  background: transparent;
  color: var(--cream-soft);
  border: 1px solid var(--ash);
}
.btn-s:hover { color: var(--cream); border-color: var(--smoke); }
.btn-p:disabled { opacity: 0.55; cursor: default; }
/* Back button — secondary, muted, symmetric with Next → */
.btn-back {
  background: transparent;
  color: var(--smoke);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 12px 18px;
  border-radius: 7px;
  border: 1px solid var(--ash);
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
}
.btn-back:hover { color: var(--cream-soft); border-color: var(--smoke); }
/* Next stage button — same visual weight as btn-back */
.btn-next-stage {
  background: transparent;
  color: var(--accent-soft);
  border: 1px solid var(--accent-glow);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 12px 18px;
  border-radius: 7px;
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
}
.btn-next-stage:hover { color: var(--accent-bright); border-color: var(--accent); }

/* ============================================================
   COOK MODE — set on body when timer is running
   Hides setup, makes timer the centerpiece
   ============================================================ */
body.mode-cook .setup-only { display: none !important; }
body.mode-cook .cook-only  { display: block; }
body.mode-setup .cook-only { display: none; }

/* When in cook mode, timer card is focused & spacious */
body.mode-cook .timer-card.show {
  margin-top: 8px;
  padding: 28px 20px;
  border-color: var(--accent-glow);
  background: linear-gradient(180deg, var(--coal-2) 0%, var(--coal) 100%);
}
body.mode-cook .t-clock {
  font-size: clamp(76px, 28vw, 130px);
}

/* Cook mode summary bar — more prominent edit link, shows pull temp */
.cook-summary {
  display: none;
  background: var(--coal);
  border-bottom: 1px solid var(--ash);
  padding: 10px 14px;
  font-size: 12px;
  color: var(--cream-soft);
  display: flex;
  align-items: center;
  gap: 10px;
}
body.mode-setup .cook-summary { display: none; }
body.mode-cook .cook-summary { display: flex; }

.cook-summary .edit-link {
  background: var(--accent-tint);
  border: 1px solid var(--accent);
  color: var(--accent-soft);
  padding: 7px 13px;
  border-radius: 16px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.6px;
  cursor: pointer;
  font-family: inherit;
  flex-shrink: 0;
  transition: all 0.15s;
  text-transform: uppercase;
}
.cook-summary .edit-link:hover {
  background: var(--accent);
  color: #fff;
}
.cook-summary .summary-text {
  flex: 1;
  font-weight: 500;
  color: var(--cream);
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: center;
}
.cook-summary .pull-pill {
  flex-shrink: 0;
  background: rgba(245, 200, 66, 0.12);
  border: 1px solid rgba(245, 200, 66, 0.4);
  color: var(--accent-bright);
  padding: 6px 10px;
  border-radius: 14px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.4px;
  font-variant-numeric: tabular-nums;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Stage info inside timer card — shows current/total */
.stage-info {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 14px;
  margin: 8px 0 4px;
  font-size: 11px;
  color: var(--smoke);
  letter-spacing: 0.5px;
}
.stage-info .now {
  color: var(--accent-soft);
  font-weight: 700;
  text-transform: uppercase;
}
.stage-info .next {
  color: var(--cream-soft);
}
.stage-info .sep {
  width: 14px; height: 1px;
  background: var(--ash-2);
}

/* Pull-now button (mid-cook temp check) */
.pull-now-card {
  display: none;
  margin-top: 12px;
  padding: 12px 14px;
  background: var(--accent-tint);
  border: 1px solid var(--accent);
  border-radius: 8px;
  text-align: left;
}
.pull-now-card.show { display: block; animation: slideIn 0.3s ease; }
@keyframes slideIn {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}
.pull-now-card.pulse { animation: pulseAccent 1.2s ease-in-out infinite; }
@keyframes pulseAccent {
  0%, 100% { background: var(--accent-tint); }
  50% { background: rgba(245, 200, 66, 0.18); }
}
.pull-now-text {
  font-size: 13px;
  color: var(--cream);
  margin-bottom: 10px;
  line-height: 1.4;
}
.pull-now-text strong { color: var(--accent-bright); font-weight: 700; }
.pull-now-text .at-temp { font-size: 14px; }
.pull-now-actions {
  display: flex;
  gap: 8px;
}
.btn-pulled, .btn-keep-going {
  flex: 1;
  border: none;
  border-radius: 7px;
  padding: 10px 12px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s;
}
.btn-pulled {
  background: var(--accent);
  color: #fff;
}
.btn-pulled:hover { background: var(--accent-soft); }
.btn-keep-going {
  background: transparent;
  border: 1px solid var(--ash-2);
  color: var(--cream-soft);
}
.btn-keep-going:hover { color: var(--cream); border-color: var(--smoke); }

/* Done card recap */
.done-recap {
  background: var(--coal);
  border: 1px solid var(--ash);
  border-radius: 8px;
  padding: 14px;
  margin: 14px 0;
  text-align: left;
  font-size: 13px;
  line-height: 1.55;
  color: var(--cream-soft);
}
.done-recap dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; }
.done-recap dt { color: var(--smoke); font-size: 11px; letter-spacing: 0.5px; text-transform: uppercase; align-self: center; }
.done-recap dd { color: var(--cream); font-weight: 600; align-self: center; }

/* ============================================================
   AD SLOTS — empty until AdSense fills them
   ============================================================ */
.ad-slot {
  margin: 0 14px;
  min-height: 0;
  position: relative;
}
.ad-slot:not(:empty) {
  margin: 16px 14px;
  min-height: 100px;
  padding: 8px 0 4px;
}
.ad-slot:not(:empty)::before {
  content: 'Advertisement';
  display: block;
  font-size: 9px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--smoke);
  margin-bottom: 6px;
  text-align: center;
  opacity: 0.5;
}

/* ============================================================
   TIPS
   ============================================================ */
.notes { display: grid; gap: 7px; padding: 0 14px; }
.tip-box {
  background: rgba(238, 138, 22, 0.07);
  border: 1px solid rgba(238, 138, 22, 0.2);
  border-radius: 7px;
  padding: 11px 13px;
  font-size: 13px;
  color: var(--cream-soft);
  line-height: 1.5;
}
.tip-box strong { color: var(--accent-soft); font-weight: 600; }
.tip-box.warn {
  background: var(--accent-tint);
  border-color: var(--accent-glow);
}
.tip-box.warn strong { color: var(--accent); }
.tip-box .cta {
  display: inline-block;
  margin-top: 6px;
  font-size: 12px;
  color: var(--accent-soft);
  border-bottom: 1px dashed var(--accent-glow);
}
.tip-box .cta:hover { color: var(--accent-bright); }

/* ============================================================
   FOOTER
   ============================================================ */
footer {
  text-align: center;
  padding: 16px 14px 10px;
  color: var(--smoke);
  font-size: 11px;
  border-top: 1px solid var(--ash);
  margin-top: 22px;
  line-height: 1.7;
}
footer a { color: var(--smoke); margin: 0 6px; }
footer a:hover { color: var(--accent-soft); }

/* ============================================================
   STICKY MINI TIMER
   ============================================================ */
.sticky-timer {
  position: fixed;
  left: 0; right: 0;
  bottom: 0;
  background: rgba(14, 12, 11, 0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--ash);
  padding-bottom: var(--safe-bottom);
  z-index: 200;
  box-shadow: 0 -8px 24px rgba(0,0,0,0.4);
  animation: slideUp 0.25s ease;
}
@keyframes slideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}
.sticky-progress { height: 2px; background: var(--ash); overflow: hidden; }
.sticky-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-bright));
  width: 0%;
  transition: width 0.5s linear;
}
.sticky-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 14px;
  cursor: pointer;
  gap: 12px;
}
.sticky-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--accent);
  flex-shrink: 0;
}
.sticky-clock {
  font-size: 22px;
  font-weight: 700;
  color: var(--accent-bright);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.5px;
  flex: 1;
  text-align: center;
}
.sticky-btn {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  font-size: 14px;
  cursor: pointer;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
  font-weight: 700;
}
.sticky-btn:hover { background: var(--accent-soft); }

/* ============================================================
   FLASH OVERLAY (alarm visual)
   ============================================================ */
.flash-overlay {
  position: fixed;
  inset: 0;
  background: var(--accent);
  pointer-events: none;
  opacity: 0;
  z-index: 9999;
  transition: opacity 0.1s;
}
.flash-overlay.flashing { animation: flashStrobe 0.35s 3 alternate; }
@keyframes flashStrobe {
  from { opacity: 0; }
  to   { opacity: 0.7; }
}

/* ============================================================
   COOKIE BANNER
   ============================================================ */
.cookie-banner {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: rgba(14, 12, 11, 0.97);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--ash);
  padding: 12px 14px calc(12px + var(--safe-bottom));
  z-index: 300;
  display: none;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  color: var(--cream-soft);
}
.cookie-banner.show { display: flex; }
.cookie-banner span { flex: 1; line-height: 1.4; }
.cookie-banner a { color: var(--accent-soft); }
.cookie-banner button {
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  flex-shrink: 0;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 380px) {
  .pill { font-size: 12px; padding: 8px 6px; }
  .pill-row { gap: 4px; }
  .logo { font-size: 16px; }
  .tagline { font-size: 10px; }
  .home-link { width: 28px; height: 28px; font-size: 13px; }
}
@media (min-width: 600px) {
  body { font-size: 16px; }
  .timer-card { padding: 26px 22px; }
  section.block, .chart, .notes, .mini-tip, .ad-slot, .timer-card,
  .start-cooking-bar, .divider-line, .thermometer-note { max-width: 720px; margin-left: auto; margin-right: auto; }
  hr.hairline { max-width: 720px; margin: 0 auto; }
}

/* Two-column tips on wider screens (mobile keeps single column for readability) */
@media (min-width: 720px) {
  .notes { grid-template-columns: 1fr 1fr; gap: 8px; }
  .notes .tip-box { margin: 0; }
}

/* ============================================================
   INTERNAL TEMPERATURE CHART (cook mode)
   ============================================================ */
.temp-chart-card {
  background: var(--coal);
  border-top: 1px solid var(--ash);
  border-bottom: 1px solid var(--ash);
  padding: 14px 12px 10px;
  margin: 14px 0 0;
  display: none;
}
body.mode-cook .temp-chart-card { display: block; }
.temp-chart-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 8px;
  padding: 0 2px;
}
.temp-chart-title {
  font-size: 11px;
  letter-spacing: 1px;
  color: var(--smoke);
  font-weight: 700;
  text-transform: uppercase;
}
.temp-chart-sub {
  font-size: 10px;
  color: var(--smoke);
  letter-spacing: 0.3px;
  opacity: 0.85;
}
.temp-chart-svg {
  width: 100%;
  max-width: 480px;
  aspect-ratio: 360 / 180;
  display: block;
  overflow: visible;
}
.temp-chart-svg .band {
  fill: var(--accent);
  opacity: 0.10;
}
.temp-chart-svg .curve {
  fill: none;
  stroke: var(--accent-bright);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.temp-chart-svg .pull-line,
.temp-chart-svg .serve-line {
  stroke: var(--accent-soft);
  stroke-width: 1;
  stroke-dasharray: 3 3;
  fill: none;
  opacity: 0.7;
}
.temp-chart-svg .serve-line { stroke: var(--cream-soft); opacity: 0.45; }
.temp-chart-svg .rest-marker {
  stroke: var(--cream-soft);
  stroke-width: 1;
  stroke-dasharray: 2 4;
  opacity: 0.45;
}
.temp-chart-svg .axis-label {
  fill: var(--smoke);
  font-size: 9px;
  font-family: inherit;
  letter-spacing: 0.3px;
}
.temp-chart-svg .temp-label {
  fill: var(--accent-soft);
  font-size: 9.5px;
  font-family: inherit;
  font-weight: 600;
}

/* Pause/Resume button styling — same as primary but tonally different when paused */
.btn-p.paused {
  background: var(--ash) !important;
  color: var(--accent-bright) !important;
  border-color: var(--accent) !important;
}

/* ──────────────────────────────────────────────────────
   v10 additions
   ────────────────────────────────────────────────────── */

/* Resume banner (Q3c) — top of page when stale cook state detected */
.resume-banner {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  background: linear-gradient(180deg, var(--accent), var(--accent-bright));
  color: #1a0e08;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 4px 14px rgba(0,0,0,0.4);
  animation: bannerSlideIn 0.4s ease-out;
}
.resume-banner-text { flex: 1; }
.resume-banner-text strong { font-weight: 800; }
.resume-banner .rb-meta { display: block; font-size: 11px; opacity: 0.75; font-weight: 500; margin-top: 2px; }
.resume-banner-actions { display: flex; gap: 6px; flex-shrink: 0; }
.resume-banner button {
  border: none;
  background: rgba(0,0,0,0.18);
  color: #1a0e08;
  font-weight: 700;
  padding: 8px 14px;
  border-radius: 6px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  cursor: pointer;
  font-family: inherit;
}
.resume-banner button.rb-primary {
  background: rgba(0,0,0,0.6);
  color: var(--accent-bright);
}
.resume-banner button:hover { background: rgba(0,0,0,0.32); }
.resume-banner button.rb-primary:hover { background: rgba(0,0,0,0.78); }
@keyframes bannerSlideIn {
  from { transform: translateY(-100%); }
  to   { transform: translateY(0); }
}

/* +/- minute buttons during active cook (Q8a) */
.time-adjust-row {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: -6px 0 14px;
}
.btn-time-adj {
  background: var(--char);
  color: var(--accent-bright);
  border: 1px solid rgba(245, 200, 66, 0.32);
  border-radius: 6px;
  padding: 7px 16px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.4px;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s;
  min-width: 70px;
}
.btn-time-adj:hover {
  background: rgba(245, 200, 66, 0.12);
  border-color: var(--accent);
}
.btn-time-adj:active { transform: scale(0.96); }
.btn-time-adj:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

/* Confirm dialog (Q6a — Reset confirm; Q7b — Next confirm during pause) */
.confirm-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.72);
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: overlayFade 0.2s ease-out;
}
@keyframes overlayFade { from { opacity: 0; } to { opacity: 1; } }
.confirm-box {
  background: var(--char);
  border: 1px solid var(--accent);
  border-radius: 12px;
  padding: 22px 24px;
  max-width: 360px;
  width: 100%;
  box-shadow: 0 12px 40px rgba(0,0,0,0.6);
  animation: boxIn 0.25s ease-out;
}
@keyframes boxIn { from { transform: scale(0.92); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.confirm-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--cream);
  margin-bottom: 8px;
}
.confirm-msg {
  font-size: 13px;
  color: var(--smoke);
  line-height: 1.5;
  margin-bottom: 18px;
}
.confirm-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}
.confirm-actions button {
  padding: 10px 18px;
  border-radius: 6px;
  border: none;
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  cursor: pointer;
  transition: all 0.15s;
}
.confirm-cancel {
  background: transparent;
  color: var(--smoke);
  border: 1px solid var(--ash) !important;
}
.confirm-cancel:hover { color: var(--cream); border-color: var(--smoke) !important; }
.confirm-ok {
  background: var(--accent);
  color: #1a0e08;
}
.confirm-ok:hover { background: var(--accent-bright); }
.confirm-ok.danger { background: #c44; color: #fff; }
.confirm-ok.danger:hover { background: #d55; }
