/* Alaska Prep — dark expedition instrument panel.
   Always dark, on purpose: this lives in a dim rental kitchen at 6pm. */

:root {
  color-scheme: dark;

  --ink:        #0b0b0c;
  --ink-2:      #121214;
  --ink-3:      #17171a;
  --line:       #26262b;
  --line-soft:  #1c1c20;

  --paper:      #f2ece3;          /* warm off-white */
  --paper-dim:  #b7b0a6;
  --paper-mute: #7e786f;

  --pellet:     #e2703a;
  --blackstone: #6f9ec9;
  --fryer:      #d8a63a;
  --oven:       #b8563f;
  --stove:      #47a99a;
  --prep:       #7bab5c;
  --serve:      #f2ece3;

  --accent:     var(--pellet);
  --ok:         #7bab5c;
  --warn:       #d8a63a;
  --bad:        #c9503f;

  --r:    14px;
  --r-lg: 20px;
  --tap:  56px;

  --sat: env(safe-area-inset-top);
  --sab: env(safe-area-inset-bottom);
  --sal: env(safe-area-inset-left);
  --sar: env(safe-area-inset-right);

  --font: system-ui, -apple-system, "SF Pro Text", "Segoe UI", sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, monospace;

  --ease: cubic-bezier(.2,.7,.2,1);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
html, body { margin: 0; padding: 0; }
html { background: var(--ink); overflow-x: clip; }

body {
  font: 400 17px/1.45 var(--font);
  color: var(--paper);
  background:
    radial-gradient(120% 60% at 50% -10%, #1a1512 0%, rgba(26,21,18,0) 60%),
    radial-gradient(90% 50% at 100% 100%, #0f1418 0%, rgba(15,20,24,0) 70%),
    var(--ink);
  background-attachment: fixed;
  min-height: 100svh;
  overscroll-behavior-y: none;
  overflow-x: clip;
  -webkit-text-size-adjust: 100%;
}

/* Fine vertical rule texture — chart paper, not noise. */
.grain {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image: repeating-linear-gradient(90deg, rgba(242,236,227,.022) 0 1px, transparent 1px 46px);
  -webkit-mask-image: linear-gradient(180deg, rgba(0,0,0,.8), rgba(0,0,0,.15) 40%, rgba(0,0,0,0));
  mask-image: linear-gradient(180deg, rgba(0,0,0,.8), rgba(0,0,0,.15) 40%, rgba(0,0,0,0));
}

button, input, select { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.num  { font-variant-numeric: tabular-nums; font-feature-settings: "tnum" 1; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }

.kicker {
  font-size: 11px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase;
  color: var(--paper-mute);
}

/* ───────────────────────── top bar ───────────────────────── */

.topbar {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: calc(var(--sat) + 10px) calc(var(--sar) + 16px) 10px calc(var(--sal) + 16px);
  background: linear-gradient(180deg, rgba(11,11,12,.94) 60%, rgba(11,11,12,0));
  backdrop-filter: saturate(1.3) blur(14px);
  -webkit-backdrop-filter: saturate(1.3) blur(14px);
}
.brand { display: flex; align-items: center; gap: 10px; min-height: 40px; }
.brand-mark {
  width: 10px; height: 26px; border-radius: 2px;
  background: linear-gradient(180deg, var(--pellet), var(--oven));
  box-shadow: 0 0 18px rgba(226,112,58,.45);
}
.brand-txt { display: grid; line-height: 1.1; }
.brand-txt b { font-size: 13px; font-weight: 800; letter-spacing: .22em; }
.brand-txt i {
  font-style: normal; font-size: 10.5px; letter-spacing: .14em;
  text-transform: uppercase; color: var(--paper-mute);
}
.topbar-right { display: flex; align-items: center; gap: 8px; }

.syncdot {
  display: flex; align-items: center; gap: 7px;
  height: 34px; padding: 0 11px 0 9px;
  border: 1px solid var(--line); border-radius: 999px;
  background: rgba(255,255,255,.02);
}
.syncdot-led {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--paper-mute); box-shadow: 0 0 0 0 currentColor;
}
.syncdot-txt { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--paper-dim); }
.syncdot[data-state="synced"]  .syncdot-led { background: var(--ok);   box-shadow: 0 0 10px rgba(123,171,92,.7); }
.syncdot[data-state="pending"] .syncdot-led { background: var(--warn); animation: pulse 1.4s var(--ease) infinite; }
.syncdot[data-state="error"]   .syncdot-led { background: var(--bad); }
@keyframes pulse { 50% { opacity: .3; transform: scale(.75); } }

.me-btn {
  width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center;
  border: 1px solid var(--line); background: rgba(255,255,255,.03);
  font-size: 15px; font-weight: 700; letter-spacing: .04em;
}

/* ───────────────────────── layout ───────────────────────── */

.app {
  position: relative; z-index: 1; overflow-x: clip;
  padding: 4px calc(var(--sar) + 16px) calc(var(--sab) + 120px) calc(var(--sal) + 16px);
  max-width: 720px; margin: 0 auto;
}
.app:focus { outline: none; }

section + section { margin-top: 26px; }

/* day strip */
.daystrip {
  display: flex; gap: 8px; overflow-x: auto; scroll-snap-type: x mandatory;
  padding: 6px 0 10px; margin: 0 calc(var(--sal) * -1 - 16px) 0 calc(var(--sal) * -1 - 16px);
  padding-left: calc(var(--sal) + 16px); padding-right: calc(var(--sar) + 16px);
  scrollbar-width: none;
}
.daystrip::-webkit-scrollbar { display: none; }
.day {
  flex: 0 0 auto; scroll-snap-align: center;
  min-width: 62px; min-height: var(--tap);
  display: grid; align-content: center; justify-items: center; gap: 2px;
  padding: 8px 12px; border-radius: var(--r);
  border: 1px solid var(--line-soft); background: rgba(255,255,255,.02);
  transition: transform .18s var(--ease), border-color .18s var(--ease), background .18s var(--ease);
}
.day b { font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--paper-dim); }
.day span { font-size: 19px; font-weight: 300; }
.day[data-today="1"] b::after {
  content: ""; display: inline-block; width: 4px; height: 4px; border-radius: 50%;
  background: var(--accent); margin-left: 4px; vertical-align: middle;
}
.day[aria-current="true"] {
  background: linear-gradient(180deg, rgba(226,112,58,.16), rgba(226,112,58,.05));
  border-color: rgba(226,112,58,.5);
}
.day[aria-current="true"] b { color: var(--pellet); }
.day:active { transform: scale(.95); }

/* tabs */
.tabs { display: flex; gap: 4px; padding: 4px; border: 1px solid var(--line-soft); border-radius: 999px; background: rgba(255,255,255,.02); }
.tabs button {
  flex: 1; min-height: 44px; border-radius: 999px;
  font-size: 13px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase;
  color: var(--paper-mute);
}
.tabs button[aria-selected="true"] { background: rgba(242,236,227,.09); color: var(--paper); }

/* ───────────────────────── hero ───────────────────────── */

.hero { margin-top: 18px; }
.hero-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.hero-time {
  display: flex; align-items: baseline; gap: 10px;
  margin: 2px 0 6px; line-height: .9;
}
.hero-time b {
  font-size: clamp(64px, 22vw, 96px); font-weight: 200; letter-spacing: -.045em;
  font-variant-numeric: tabular-nums;
  background: linear-gradient(175deg, #fffaf2, #cbbfae);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-time i { font-style: normal; font-size: 15px; letter-spacing: .18em; color: var(--paper-mute); text-transform: uppercase; }
.hero h1 { margin: 0; font-size: 26px; font-weight: 500; letter-spacing: -.02em; }
.hero .sub { margin: 2px 0 0; color: var(--paper-mute); font-size: 14px; }
.shifted { color: var(--warn); font-size: 13px; letter-spacing: .06em; }

.menu { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 14px; }
.menu li {
  list-style: none; padding: 7px 12px; border-radius: 999px;
  border: 1px solid var(--line); background: rgba(255,255,255,.025);
  font-size: 14px; color: var(--paper-dim);
}
.menu { padding: 0; }

.notes { margin: 16px 0 0; padding: 0; display: grid; gap: 8px; }
.notes li {
  list-style: none; position: relative; padding-left: 18px;
  font-size: 14.5px; color: var(--paper-dim); line-height: 1.5;
}
.notes li::before {
  content: ""; position: absolute; left: 2px; top: .62em;
  width: 7px; height: 1px; background: var(--paper-mute);
}

/* ───────────────────────── variables ───────────────────────── */

.vars {
  margin-top: 18px; display: grid; gap: 10px;
  border: 1px solid var(--line-soft); border-radius: var(--r-lg);
  background: linear-gradient(180deg, rgba(255,255,255,.035), rgba(255,255,255,.012));
  padding: 14px;
}
.var-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 48px; }
.var-row > label, .var-row > span.lbl { font-size: 14px; color: var(--paper-dim); }
input[type="time"] {
  appearance: none; -webkit-appearance: none;
  background: rgba(0,0,0,.35); border: 1px solid var(--line); border-radius: 10px;
  padding: 10px 12px; min-height: 48px; font-size: 20px; font-weight: 500;
  font-variant-numeric: tabular-nums; color: var(--paper);
}
.toggle {
  position: relative; width: 60px; height: 34px; border-radius: 999px; flex: 0 0 auto;
  border: 1px solid var(--line); background: rgba(0,0,0,.35);
  transition: background .2s var(--ease), border-color .2s var(--ease);
}
.toggle::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 26px; height: 26px; border-radius: 50%;
  background: var(--paper-mute); transition: transform .22s var(--ease), background .22s var(--ease);
}
.toggle[aria-pressed="true"] { background: rgba(226,112,58,.25); border-color: rgba(226,112,58,.6); }
.toggle[aria-pressed="true"]::after { transform: translateX(26px); background: var(--pellet); }

.btn {
  min-height: var(--tap); padding: 0 20px; border-radius: var(--r);
  border: 1px solid var(--line); background: rgba(255,255,255,.04);
  font-size: 16px; font-weight: 600; letter-spacing: .01em;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  transition: transform .14s var(--ease), background .18s var(--ease);
}
.btn:active { transform: scale(.98); }
.btn-primary {
  border-color: transparent; color: #150c07;
  background: linear-gradient(180deg, #f0904f, var(--pellet));
  box-shadow: 0 10px 30px -14px rgba(226,112,58,.9);
}
.btn-ghost { background: none; color: var(--paper-dim); }
.btn-danger { color: #ffb9ae; border-color: rgba(201,80,63,.4); background: rgba(201,80,63,.12); }
.btn-wide { width: 100%; }
.btn-sm { min-height: 44px; padding: 0 14px; font-size: 14px; }

.cook-cta { margin-top: 16px; }
.cook-cta .btn { font-size: 18px; letter-spacing: .04em; }

/* ───────────────────────── timeline ───────────────────────── */

.tl { margin-top: 26px; position: relative; padding-left: 74px; }
.tl::before {
  content: ""; position: absolute; left: 62px; top: 10px; bottom: 10px; width: 1px;
  background: linear-gradient(180deg, transparent, var(--line) 8%, var(--line) 92%, transparent);
}
.tl-item {
  position: relative; display: block; width: 100%; text-align: left;
  padding: 14px 14px 14px 16px; margin-bottom: 8px; min-height: var(--tap);
  border: 1px solid var(--line-soft); border-radius: var(--r);
  background: linear-gradient(180deg, rgba(255,255,255,.033), rgba(255,255,255,.008));
  transition: transform .14s var(--ease), border-color .2s var(--ease), opacity .2s var(--ease);
}
.tl-item:active { transform: scale(.985); }
.tl-item::before {                     /* node on the rail */
  content: ""; position: absolute; left: -17px; top: 22px;
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--ink); border: 2px solid var(--st, var(--paper-mute));
}
.tl-item::after {                      /* station edge */
  content: ""; position: absolute; left: 0; top: 12px; bottom: 12px; width: 3px;
  border-radius: 3px; background: var(--st, var(--paper-mute)); opacity: .85;
}
.tl-time {
  position: absolute; left: -74px; top: 15px; width: 56px; text-align: right;
  font-size: 17px; font-weight: 500; font-variant-numeric: tabular-nums; color: var(--paper-dim);
}
.tl-time small { display: block; font-size: 10.5px; letter-spacing: .1em; color: var(--paper-mute); font-weight: 600; }
.tl-title { font-size: 17px; font-weight: 550; line-height: 1.3; }
.tl-dish {
  display: block; margin-bottom: 3px;
  font-size: 10.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: var(--st, var(--paper-mute)); opacity: .9;
}
.cook-dish { margin: 0 0 6px; font-size: 13px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--st, var(--paper-dim)); }
.cook-banner {
  display: flex; align-items: center; gap: 10px; margin: 12px 0 0;
  padding: 12px 14px; min-height: var(--tap);
  border: 1px solid var(--line); border-radius: var(--r);
  background: rgba(255,255,255,.04); color: var(--paper); text-decoration: none; font-size: 15px;
}
.cook-banner .led { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 10px rgba(123,171,92,.7); flex: 0 0 auto; }
.cook-banner .arrow { margin-left: auto; color: var(--paper-dim); }
.tl-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; margin-top: 8px; }

.chip {
  font-size: 10.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  padding: 4px 8px; border-radius: 6px;
  color: var(--st, var(--paper)); background: color-mix(in srgb, var(--st, #888) 16%, transparent);
  border: 1px solid color-mix(in srgb, var(--st, #888) 34%, transparent);
}
.chip-plain {
  color: var(--paper-mute); background: rgba(255,255,255,.05); border-color: var(--line);
}
.chip-claim { color: var(--paper); background: rgba(242,236,227,.1); border-color: rgba(242,236,227,.22); letter-spacing: .06em; }

.tl-item[data-done="1"] { opacity: .42; }
.tl-item[data-done="1"] .tl-title { text-decoration: line-through; text-decoration-color: var(--paper-mute); }
.tl-item[data-now="1"] {
  border-color: color-mix(in srgb, var(--st, #888) 55%, transparent);
  background: linear-gradient(180deg, color-mix(in srgb, var(--st,#888) 13%, transparent), rgba(255,255,255,.01));
}
.tick { color: var(--ok); font-size: 15px; }

.tl-group { margin: 22px 0 10px; }

/* checklists */
.check {
  display: flex; align-items: flex-start; gap: 13px; width: 100%; text-align: left;
  min-height: var(--tap); padding: 13px 14px; margin-bottom: 6px;
  border: 1px solid var(--line-soft); border-radius: var(--r);
  background: rgba(255,255,255,.02);
}
.check-box {
  flex: 0 0 auto; width: 24px; height: 24px; margin-top: 1px; border-radius: 7px;
  border: 1.5px solid var(--line); display: grid; place-items: center;
  font-size: 14px; color: transparent; transition: all .18s var(--ease);
}
.check[data-done="1"] .check-box { background: var(--ok); border-color: var(--ok); color: #0b0b0c; }
.check[data-done="1"] .check-txt { opacity: .45; text-decoration: line-through; }
.check-txt { font-size: 16px; line-height: 1.4; }
.check-by { display: block; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--paper-mute); margin-top: 4px; }

h2.sec {
  margin: 0 0 12px; font-size: 12px; font-weight: 700;
  letter-spacing: .2em; text-transform: uppercase; color: var(--paper-mute);
  display: flex; align-items: center; gap: 12px;
}
h2.sec::after { content: ""; flex: 1; height: 1px; background: var(--line-soft); }

/* ───────────────────────── by dish: cards (phase 3) ───────────────────────── */

.cards { margin-top: 22px; display: grid; gap: 18px; }
.card {
  border: 1px solid var(--line-soft); border-radius: 20px;
  padding: 16px 16px 14px;
  background: linear-gradient(180deg, rgba(255,255,255,.035), rgba(255,255,255,.01));
}
.card[data-done="1"] { opacity: .55; }
.card-head { display: flex; align-items: baseline; gap: 12px; }
.card-name { margin: 0; font-size: 21px; font-weight: 600; letter-spacing: -.015em; line-height: 1.2; color: var(--paper); }
.card-name::first-letter { text-transform: uppercase; }
.card-name .chip-edit { font-size: 11px; vertical-align: middle; }
.card-count {
  margin-left: auto; flex: 0 0 auto; font-size: 15px; font-weight: 500;
  font-variant-numeric: tabular-nums; color: var(--paper-dim);
}
.card-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.card-own { margin-top: 12px; width: 100%; }
.card-own[aria-pressed="true"] { border-color: rgba(242,236,227,.35); background: rgba(242,236,227,.1); }
.card-sec {
  margin: 18px 0 8px; font-size: 11px; font-weight: 700;
  letter-spacing: .2em; text-transform: uppercase; color: var(--paper-mute);
  display: flex; align-items: center; gap: 10px;
}
.card-sec::after { content: ""; flex: 1; height: 1px; background: var(--line-soft); }
.card-sec .num { letter-spacing: 0; font-weight: 500; color: var(--paper-dim); }
.ing { display: grid; }
.check-sm { min-height: 48px; padding: 8px 4px; }
.check-sm .check-txt { font-size: 15.5px; }
.method { margin: 0; padding-left: 26px; display: grid; gap: 8px; color: var(--paper-dim); font-size: 15.5px; line-height: 1.5; }
.method li::marker { color: var(--paper-mute); font-variant-numeric: tabular-nums; }
.when { display: grid; gap: 6px; }
.when-step {
  position: relative; display: flex; align-items: center; gap: 12px; width: 100%; text-align: left;
  min-height: 52px; padding: 8px 12px 8px 16px; border-radius: 12px;
  border: 1px solid var(--line-soft); background: rgba(255,255,255,.025);
  transition: transform .14s var(--ease), opacity .2s var(--ease);
}
.when-step:active { transform: scale(.985); }
.when-step::after {
  content: ""; position: absolute; left: 0; top: 9px; bottom: 9px; width: 3px;
  border-radius: 3px; background: var(--st, var(--paper-mute)); opacity: .85;
}
.when-step[data-done="1"] { opacity: .42; }
.when-step[data-done="1"] .when-title { text-decoration: line-through; text-decoration-color: var(--paper-mute); }
.when-t { flex: 0 0 64px; font-size: 15px; font-weight: 600; color: var(--st, var(--paper)); line-height: 1.15; }
.when-t small { display: block; font-size: 11px; font-weight: 500; color: var(--paper-mute); letter-spacing: .04em; }
.when-title { flex: 1; font-size: 15.5px; font-weight: 500; line-height: 1.3; }
.when-title small { display: block; font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--paper-mute); font-weight: 600; margin-top: 2px; }
.when-step .tick { color: var(--ok); }
.card .btn-edit { margin-top: 14px; }

/* ───────────────────────── sheet ───────────────────────── */

.sheet-layer { position: fixed; inset: 0; z-index: 60; display: flex; align-items: flex-end; }
.sheet-scrim { position: absolute; inset: 0; background: rgba(0,0,0,.6); backdrop-filter: blur(3px); animation: fade .2s var(--ease); }
.sheet {
  position: relative; width: 100%; max-width: 720px; margin: 0 auto;
  max-height: 88svh; overflow-y: auto; -webkit-overflow-scrolling: touch;
  background: linear-gradient(180deg, #1a1a1e, var(--ink-2) 40%);
  border: 1px solid var(--line); border-bottom: 0;
  border-radius: 26px 26px 0 0;
  padding: 8px calc(var(--sar) + 18px) calc(var(--sab) + 20px) calc(var(--sal) + 18px);
  box-shadow: 0 -30px 70px -20px rgba(0,0,0,.9);
  animation: rise .3s var(--ease);
}
@keyframes rise { from { transform: translateY(14%); opacity: .4; } }
@keyframes fade { from { opacity: 0; } }
.sheet-grip { display: block; width: 44px; height: 5px; border-radius: 3px; background: var(--line); margin: 8px auto 14px; }
.sheet h3 { margin: 6px 0 4px; font-size: 25px; font-weight: 550; letter-spacing: -.02em; line-height: 1.2; }
.sheet .detail { color: var(--paper-dim); font-size: 16.5px; line-height: 1.55; margin: 12px 0 0; }
.sheet-actions { display: grid; gap: 9px; margin-top: 20px; }
.sheet-row { display: flex; gap: 9px; }
.sheet-row .btn { flex: 1; }
.sheet-stats { display: flex; gap: 18px; margin-top: 14px; flex-wrap: wrap; }
.stat b { display: block; font-size: 21px; font-weight: 500; font-variant-numeric: tabular-nums; }

.radio-list { display: grid; gap: 8px; }
.radio {
  display: flex; align-items: center; justify-content: space-between;
  min-height: var(--tap); padding: 0 16px; border-radius: var(--r);
  border: 1px solid var(--line-soft); background: rgba(255,255,255,.02); font-size: 17px;
}
.radio[aria-pressed="true"] { border-color: var(--accent); background: rgba(226,112,58,.12); }
.presence { display: grid; gap: 8px; margin-top: 6px; }
.presence li { list-style: none; display: flex; align-items: center; gap: 10px; font-size: 15px; color: var(--paper-dim); }
.presence .led { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 8px rgba(123,171,92,.8); }
.fineprint { color: var(--paper-mute); font-size: 13.5px; line-height: 1.55; }

/* ───────────────────────── cook mode ───────────────────────── */

.cook {
  position: fixed; inset: 0; z-index: 80;
  display: grid; grid-template-rows: auto 1fr auto;
  background:
    radial-gradient(100% 55% at 50% 0%, color-mix(in srgb, var(--st, #e2703a) 13%, transparent), transparent 70%),
    #060607;
  padding: calc(var(--sat) + 12px) calc(var(--sar) + 18px) calc(var(--sab) + 14px) calc(var(--sal) + 18px);
}
body.cooking { overflow: hidden; }
body.cooking .topbar { display: none; }

.cook-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.cook-top .kicker b { color: var(--paper); font-weight: 600; }
.cook-x { min-width: 48px; min-height: 48px; display: grid; place-items: center; font-size: 22px; color: var(--paper-mute); }
.cook-prog { display: flex; gap: 3px; margin-top: 12px; }
.cook-prog i { flex: 1; height: 3px; border-radius: 2px; background: rgba(242,236,227,.14); }
.cook-prog i.on { background: var(--st, var(--pellet)); }
.cook-prog i.at { background: var(--paper); }

.cook-body { display: flex; flex-direction: column; justify-content: center; gap: 14px; overflow-y: auto; padding: 12px 0; }
.cook-title {
  font-size: clamp(40px, 10.5vw, 60px); font-weight: 350; letter-spacing: -.035em; line-height: 1.02;
  margin: 0; text-wrap: balance;
}
.cook-detail { font-size: 19px; line-height: 1.5; color: var(--paper-dim); margin: 0; max-width: 34ch; }
.cook-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.temp { font-size: 15px; font-weight: 700; letter-spacing: .1em; color: var(--fryer); }

.count {
  font-size: clamp(76px, 26vw, 132px); font-weight: 200; letter-spacing: -.05em; line-height: .92;
  font-variant-numeric: tabular-nums; margin: 4px 0 0;
  color: var(--st, var(--paper));
}
.count[data-over="1"] { color: var(--bad); animation: throb 1s var(--ease) infinite; }
@keyframes throb { 50% { opacity: .45; } }
.ends { font-size: 16px; color: var(--paper-dim); }
.ends b { color: var(--paper); font-weight: 600; font-variant-numeric: tabular-nums; }
.honest { font-size: 13px; color: var(--paper-mute); line-height: 1.5; max-width: 36ch; margin: 6px 0 0; }

.cook-next { display: grid; gap: 7px; margin-top: 8px; }
.cook-next div {
  display: flex; gap: 10px; align-items: baseline; font-size: 14.5px; color: var(--paper-mute);
  padding-top: 7px; border-top: 1px solid var(--line-soft);
}
.cook-next b { font-weight: 500; font-variant-numeric: tabular-nums; color: var(--paper-dim); min-width: 52px; }

.cook-foot { display: grid; gap: 10px; }
.cook-foot .btn-primary { min-height: 72px; font-size: 21px; font-weight: 650; letter-spacing: .02em; }
.cook-foot .row { display: flex; gap: 10px; }
.cook-foot .row .btn { flex: 1; min-height: 52px; font-size: 15px; }

.flash {
  position: fixed; inset: 0; z-index: 200; pointer-events: none;
  background: var(--paper); opacity: 0;
}
.flash.go { animation: blink .45s steps(1) 3; }
@keyframes blink { 0%,49% { opacity: .82; } 50%,100% { opacity: 0; } }

/* ───────────────────────── misc ───────────────────────── */

.toast {
  position: fixed; left: 50%; bottom: calc(var(--sab) + 24px); transform: translateX(-50%);
  z-index: 120; padding: 12px 18px; border-radius: 999px;
  background: rgba(28,28,32,.96); border: 1px solid var(--line);
  font-size: 14px; box-shadow: 0 20px 40px -20px #000; animation: rise .25s var(--ease);
}
.update-pill {
  position: fixed; left: 0; right: 0; bottom: calc(var(--sab) + 14px); z-index: 130;
  display: flex; justify-content: center; padding: 0 16px;
}
.update-pill button {
  min-height: 50px; padding: 0 22px; border-radius: 999px;
  background: var(--paper); color: #0b0b0c; font-size: 15px; font-weight: 650;
  box-shadow: 0 18px 40px -16px rgba(0,0,0,.9);
}
.empty { color: var(--paper-mute); font-size: 15px; padding: 30px 0; text-align: center; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

/* ── recipe editing (phase 2) ─────────────────────────────── */
.chip-edit { color: #f2d5a0; background: rgba(230,170,80,.14); border-color: rgba(230,170,80,.4); letter-spacing: .06em; margin-left: 8px; }
.dish-name .chip-edit { font-size: 11px; vertical-align: middle; }
.btn-edit { margin-top: 8px; width: 100%; }
.fineprint.warn { color: #f2d5a0; margin-top: 8px; }
.rs { display: grid; gap: 12px; margin: 16px 0 12px; }
.rs-step { border: 1px solid var(--line); border-left: 4px solid var(--st); border-radius: 14px; padding: 12px 12px 10px; background: rgba(255,255,255,.025); }
.rs-head { display: flex; align-items: center; gap: 10px; }
.rs-n { color: var(--paper-mute); font-size: 13px; min-width: 18px; }
.rs-title { flex: 1; min-height: 48px; font: inherit; font-size: 17px; font-weight: 550; color: var(--paper); background: rgba(255,255,255,.05); border: 1px solid var(--line); border-radius: 10px; padding: 0 12px; }
.rs-title:focus { outline: none; border-color: var(--accent); }
.rs-x { min-width: 48px; min-height: 48px; border-radius: 10px; border: 1px solid transparent; background: none; color: var(--paper-mute); font: inherit; font-size: 18px; }
.rs-x:active { background: rgba(201,80,63,.18); color: #ffb9ae; }
.rs-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 10px; min-height: 56px; flex-wrap: wrap; }
.rs-lbl { font-size: 14px; color: var(--paper-dim); min-width: 48px; }
.stepper { display: inline-flex; align-items: center; gap: 4px; }
.stepper button { min-width: 56px; min-height: 56px; border-radius: 12px; border: 1px solid var(--line); background: rgba(255,255,255,.06); color: var(--paper); font: inherit; font-size: 17px; font-variant-numeric: tabular-nums; }
.stepper button:active { background: rgba(255,255,255,.14); transform: scale(.97); }
.stepper b { min-width: 64px; text-align: center; font-size: 22px; font-weight: 500; font-variant-numeric: tabular-nums; }
.stepper b small { font-size: 11px; color: var(--paper-mute); margin-left: 3px; font-weight: 400; }
.stepper-sm button { min-width: 50px; }
.rs-anchor { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.rs-kind { min-height: 56px; padding: 0 16px; border-radius: 12px; border: 1px solid var(--line); background: rgba(255,255,255,.06); color: var(--paper); font: inherit; font-size: 15px; }
.rs-kind[aria-pressed="true"] { border-color: rgba(226,112,58,.6); background: rgba(226,112,58,.16); }
.rs-kind:disabled { opacity: .55; }
.rs-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 10px; }
.rs-station { min-height: 40px; padding: 0 12px; font: inherit; font-size: 12px; }
.rs-when { font-size: 14px; color: var(--paper-dim); flex: 1; text-align: center; }
.rs-move { display: inline-flex; gap: 4px; }
.rs-move button { min-width: 48px; min-height: 48px; border-radius: 10px; border: 1px solid var(--line); background: rgba(255,255,255,.06); color: var(--paper); font: inherit; font-size: 18px; }
.rs-move button:disabled { opacity: .3; }

/* ── kitchen board (phase 4) ──────────────────────────────────
   Wall iPad, landscape, read from across the room: 22px floor, dinner time
   ~100px, a column per dish, the live step glowing in its station color. */
.bd {
  position: fixed; inset: 0; z-index: 80;
  display: grid; grid-template-rows: auto 1fr auto; gap: 18px;
  background: radial-gradient(90% 40% at 50% 0%, #1a1512 0%, rgba(26,21,18,0) 70%), #060607;
  padding: calc(var(--sat) + 18px) calc(var(--sar) + 24px) calc(var(--sab) + 12px) calc(var(--sal) + 24px);
  font-size: 22px; line-height: 1.3;
}
body.board { overflow: hidden; }
body.board .topbar, body.board .grain { display: none; }

.bd-hero { display: grid; grid-template-columns: auto 1fr auto; align-items: end; gap: 32px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.bd-hero .kicker { font-size: 15px; }
.bd-hero-l, .bd-hero-r { display: flex; flex-direction: column; gap: 2px; }
.bd-hero-r { align-items: flex-end; position: relative; padding-right: 60px; }
.bd-dinner { font-size: clamp(88px, 9vw, 128px); font-weight: 200; letter-spacing: -.05em; line-height: .92; color: var(--paper); }
.bd-until { font-size: 22px; color: var(--paper-dim); margin-top: 6px; min-height: 1.3em; }
.bd-clock { font-size: clamp(48px, 5vw, 72px); font-weight: 250; letter-spacing: -.04em; line-height: 1; color: var(--paper-dim); }
.bd-hero-c { align-self: end; padding-bottom: 6px; }
.bd-title { margin: 0; font-size: clamp(30px, 3.2vw, 44px); font-weight: 350; letter-spacing: -.03em; line-height: 1.05; text-wrap: balance; }
.bd-sub { margin: 6px 0 0; color: var(--paper-mute); font-size: 19px; }
.bd-x { position: absolute; right: 0; top: 0; min-width: 52px; min-height: 52px; display: grid; place-items: center; font-size: 22px; color: var(--paper-mute); border-radius: 12px; }

.bd-cols {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(270px, 1fr);
  gap: 18px; min-height: 0; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x proximity; padding-bottom: 4px;
}
.bd-col {
  display: flex; flex-direction: column; min-height: 0; min-width: 0; overflow: hidden; scroll-snap-align: start;
  border: 1px solid var(--line-soft); border-top: 3px solid var(--st); border-radius: var(--r-lg);
  background: rgba(255,255,255,.025); padding: 14px 14px 12px;
}
.bd-col[data-alldone="1"] { opacity: .6; }
.bd-col-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.bd-col-head h2 { margin: 0; font-size: 26px; font-weight: 600; letter-spacing: -.02em; line-height: 1.1; }
.bd-count { color: var(--paper-mute); font-size: 19px; }
.bd-live { display: grid; gap: 10px; align-content: start; overflow-y: auto; min-height: 0; flex: 1 1 auto; }
.bd-done { display: grid; gap: 6px; align-content: start; margin-top: 12px; padding-top: 10px; border-top: 1px dashed var(--line); flex: 0 1 auto; min-height: 0; max-height: 45%; overflow-y: auto; }
.bd-col[data-alldone="1"] .bd-live { flex: 0 0 auto; }
.bd-col[data-alldone="1"] .bd-done { flex: 1 1 auto; max-height: none; }
.bd-alldone { color: var(--ok); font-size: 24px; font-weight: 600; margin: 24px 0; text-align: center; }

.bd-step {
  position: relative; display: grid; gap: 6px; padding: 12px 14px; border-radius: var(--r);
  border: 1px solid var(--line-soft); border-left: 4px solid var(--st); background: rgba(255,255,255,.02);
  transition: transform .5s var(--ease), opacity .5s var(--ease), background .5s var(--ease);
  transform-style: preserve-3d;
}
.bd-step-top { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.bd-t { font-size: 20px; font-weight: 600; color: var(--st); }
.bd-t small { font-weight: 400; color: var(--paper-mute); font-size: 17px; margin-left: 8px; }
.bd-station { font-size: 14px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--paper-mute); }
.bd-who { margin-left: auto; font-size: 16px; font-weight: 600; color: var(--paper); padding: 2px 12px; border-radius: 999px; background: rgba(242,236,227,.12); }
.bd-step-title { margin: 0; font-size: 26px; font-weight: 500; letter-spacing: -.02em; line-height: 1.15; }
.bd-dur, .bd-inprog { margin: 0; font-size: 18px; color: var(--paper-mute); }
.bd-inprog { color: var(--st); font-weight: 600; }
.bd-count-down { margin: 2px 0 0; font-size: 64px; font-weight: 200; letter-spacing: -.05em; line-height: .95; color: var(--st); }
.bd-count-down small { display: block; font-size: 17px; letter-spacing: 0; font-weight: 400; color: var(--paper-dim); margin-top: 6px; }
.bd-count-down[data-over="1"] { color: var(--bad); animation: throb 1s var(--ease) infinite; }
.bd-do { min-height: 64px; font-size: 22px; margin-top: 6px; }

/* phases */
.bd-step[data-phase="todo"] { opacity: .78; }
.bd-step[data-phase="next"] { border-color: color-mix(in srgb, var(--st) 45%, transparent); background: color-mix(in srgb, var(--st) 7%, transparent); }
.bd-step[data-phase="active"] {
  border-color: var(--st); background: color-mix(in srgb, var(--st) 14%, transparent);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--st) 40%, transparent), 0 0 46px -8px color-mix(in srgb, var(--st) 70%, transparent);
  animation: bd-glow 2.4s var(--ease) infinite;
}
@keyframes bd-glow { 50% { box-shadow: 0 0 0 1px color-mix(in srgb, var(--st) 60%, transparent), 0 0 70px -6px color-mix(in srgb, var(--st) 95%, transparent); } }
.bd-step[data-phase="done"] { opacity: .5; padding: 8px 12px; gap: 2px; border-left-color: var(--ok); }
.bd-step[data-phase="done"] .bd-step-title { font-size: 19px; font-weight: 400; text-decoration: line-through; color: var(--paper-dim); }
.bd-step[data-phase="done"] .bd-t { font-size: 16px; color: var(--paper-mute); }
.bd-step[data-phase="done"] .bd-t small, .bd-step[data-phase="done"] .bd-station { display: none; }
.bd-step[data-phase="done"] .bd-who { font-size: 14px; padding: 0 9px; }

/* completion: card flips green, check draws itself */
.bd-check { position: absolute; right: 12px; top: 10px; width: 46px; height: 46px; opacity: 0; pointer-events: none; }
.bd-check circle, .bd-check path { fill: none; stroke: var(--ok); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.bd-step.fresh { opacity: 1; animation: bd-flip 1.2s var(--ease) both; background: color-mix(in srgb, var(--ok) 26%, transparent); border-color: var(--ok); }
.bd-step.fresh .bd-check { opacity: 1; }
.bd-step.fresh .bd-check circle { stroke-dasharray: 151; stroke-dashoffset: 151; animation: bd-draw .55s .25s var(--ease) forwards; }
.bd-step.fresh .bd-check path { stroke-dasharray: 36; stroke-dashoffset: 36; animation: bd-draw .4s .7s var(--ease) forwards; }
@keyframes bd-flip { 0% { transform: perspective(900px) rotateX(-90deg); opacity: .2; } 45% { transform: perspective(900px) rotateX(12deg); opacity: 1; } 100% { transform: none; } }
@keyframes bd-draw { to { stroke-dashoffset: 0; } }

.bd-foot { display: flex; justify-content: space-between; gap: 20px; color: var(--paper-mute); font-size: 16px; padding-top: 6px; }
.bd-foot b { color: var(--paper-dim); }

@media (max-width: 900px) {
  .bd { padding-left: calc(var(--sal) + 14px); padding-right: calc(var(--sar) + 14px); gap: 12px; }
  .bd-hero { grid-template-columns: auto 1fr; gap: 16px; }
  .bd-hero-r { grid-column: 1 / -1; flex-direction: row; align-items: baseline; gap: 12px; justify-content: flex-start; padding-right: 60px; }
  .bd-hero-r .kicker { display: none; }
  .bd-clock { font-size: 32px; }
  .bd-cols { grid-auto-columns: minmax(280px, 82vw); scroll-snap-type: x mandatory; }
}

.lnk { color: var(--paper); text-decoration: underline; text-underline-offset: 3px; }
