/* TrackMyLoaf — warm bakery, modern, calm.
 * Read one-handed, at arm's length, at 3am. Light by default; the night
 * theme is the same layout dimmed, never a different app. */

/* ================================================================ tokens */
:root {
  --canvas: #EFE1DA;         /* blush behind the page */
  --bg: #F7F1E8;             /* page */
  --surface: #FBF6EE;        /* card */
  --surface-2: #EFE4DB;      /* pressed / inset */
  --ink: #221E1B;
  --muted: rgba(34, 30, 27, .62);
  --muted-2: rgba(34, 30, 27, .48);
  --line: rgba(34, 30, 27, .12);
  --line-soft: rgba(34, 30, 27, .08);
  --grid: rgba(34, 30, 27, .05);

  --accent: #C1543A;         /* terracotta — once per screen, at most */
  --accent-deep: #8F3A26;
  --accent-wash: #F6E4DC;
  --on-accent: #FBF6EE;

  /* A hue always means the same thing, on every screen. */
  --peri: #C6C7EF;   --peri-ink: #221E1B;   /* progress, full bake, temp-driven */
  --butter: #F0DB8E; --butter-ink: #221E1B; /* targets, sub-steps */
  --sage: #C6D9C9;   --sage-ink: #1F2A21;   /* ready, expected, fridge */
  --pink: #EFD6CE;   --pink-ink: #221E1B;   /* dough temp, key press */
  --blue: #CBDFEC;   --blue-ink: #1D2A33;
  --temp-line: #6E93AE;      /* context on the chart, never competition */   /* in progress, timed stages */

  --night-row: #F1E7DE;      /* re-pointed in the night theme */
  --night-row-ink: rgba(34, 30, 27, .78);
  --moon: #6E7A98;
  --danger: #B4402F;

  --r-chip: 14px;  --r-row: 20px;  --r-card: 26px;  --r-sheet: 32px;
  --tap: 60px;
  --ease: cubic-bezier(.22, 1, .36, 1);

  --sans: Outfit, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, system-ui, sans-serif;
  --mono: "Space Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --serif: "Instrument Serif", Georgia, "Times New Roman", serif;
  color-scheme: light;
}

/* Night: same grid, same type sizes, chroma pulled right down. */
html.night {
  --canvas: #141110;
  --bg: #191614;
  --surface: #221E1B;
  --surface-2: #2B2622;
  --ink: #E8DFD5;
  --muted: rgba(232, 223, 213, .62);
  --muted-2: rgba(232, 223, 213, .42);
  --line: rgba(232, 223, 213, .13);
  --line-soft: rgba(232, 223, 213, .08);
  --grid: rgba(232, 223, 213, .045);

  --accent: #A9563F;
  --accent-deep: #C98C6E;
  --accent-wash: #33221C;
  --on-accent: #F0E5DA;

  --peri: #3A3A52;   --peri-ink: #D6D6E4;
  --butter: #4A4330; --butter-ink: #E5D9AE;
  --sage: #2F3E33;   --sage-ink: #C6D9C9;
  --pink: #4A3730;   --pink-ink: #E8D3C9;
  --blue: #2B3B47;   --blue-ink: #CBDFEC;
  --temp-line: #79A7C4;

  --night-row: #2A2A3A;
  --night-row-ink: #D6D6E4;
  --moon: #9AA6C4;
  --danger: #D9705F;
  color-scheme: dark;
}

/* ------------------------------------------------------- line art (mask)
 * One weight, no fills, ink inherited from whatever card it sits on — so a
 * single path set works on butter, sage, terracotta and the night ground. */
:root {
  --ill-banneton: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' fill='none' stroke='%23000' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cellipse cx='50' cy='36' rx='34' ry='9'/%3E%3Cpath d='M16 36l7 33a12 12 0 0 0 12 9h30a12 12 0 0 0 12-9l7-33'/%3E%3Cellipse cx='50' cy='36' rx='23' ry='6'/%3E%3Cellipse cx='50' cy='36' rx='12' ry='3'/%3E%3C/svg%3E");
  --ill-levain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' fill='none' stroke='%23000' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M16 48h68'/%3E%3Cpath d='M16 48a34 34 0 0 0 68 0'/%3E%3Ccircle cx='36' cy='41' r='5'/%3E%3Ccircle cx='52' cy='43' r='7'/%3E%3Ccircle cx='66' cy='40' r='3.4'/%3E%3Cpath d='M26 43c2-3 5-3 7 0'/%3E%3C/svg%3E");
}

/* ================================================================= base */
* { box-sizing: border-box; }
html, body {
  margin: 0; padding: 0;
  background: var(--bg); color: var(--ink);
  font: 300 16px/1.45 var(--sans);
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: contain;
  transition: background-color 1.2s linear, color 1.2s linear;
}
body { padding: 0 0 env(safe-area-inset-bottom); }
#app {
  max-width: 480px; margin: 0 auto;
  padding: 0 24px 132px;
  /* the bakery tile grid, felt rather than seen */
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 56px 56px;
  min-height: 100vh;
}
h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -.02em; }
p { margin: 0 0 10px; }
button { font: inherit; color: inherit; background: none; border: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Two taps in quick succession on the same button is how you type 44 on the
 * keypad. Safari reads it as double-tap-to-zoom and leaves the whole app at
 * 2×, mid-reading. `manipulation` drops the 300ms double-tap gesture on
 * anything you are meant to press, which also kills the tap delay. */
button, .switch, [data-act], [data-key], label.field, input, textarea, select {
  touch-action: manipulation;
}
/* A double-tap that lands between two keys selects the text under it instead,
 * which looks just as broken. Controls are for pressing, not for selecting —
 * the fields you actually type into are left alone. */
button, .switch, [data-key], .navpill, .keypad {
  -webkit-user-select: none; user-select: none;
  -webkit-tap-highlight-color: transparent;
}
/* Safari zooms the page to reach any field whose text is under 16px. Every
 * input here is at least that, and this is the floor that keeps it true. */
input, textarea, select { font-size: max(16px, 1em); }

/* Numbers are the content. */
.hero .time, .stat .v, .reading .when, #numval {
  font-variant-numeric: tabular-nums;
}

/* ============================================================== topbar */
/* Icon row first, then the headline block underneath it — the editorial
 * eyebrow sits above the name because .sub is flipped by column-reverse. */
.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap;
  padding: max(18px, env(safe-area-inset-top)) 0 6px;
}
.topbar h1 {
  order: 2; flex: 1 0 100%; min-width: 0;
  display: block;
  font: 200 30px/1.12 var(--sans); letter-spacing: -.02em;
  padding: 12px 0 10px;
}
.topbar h1 b { font-weight: 600; }
.topbar h1 .sub {
  display: block; margin-bottom: 8px;
  font: 400 12px/1.3 var(--serif);
  letter-spacing: .2em; text-transform: uppercase; color: var(--muted);
}
.iconbtn {
  order: 1; min-width: 44px; height: 44px; border-radius: 22px;
  border: 1px solid var(--line); background: transparent;
  display: grid; place-items: center; padding: 0 15px;
  font: 400 13px/1 var(--sans); color: var(--muted);
  transition: transform .16s var(--ease), background-color .16s;
}
.iconbtn:active { transform: scale(.97); background: var(--surface-2); }

/* ================================================================= hero */
.hero {
  position: relative; overflow: hidden;
  background: var(--surface); border-radius: 28px;
  padding: 22px 24px 24px; margin-bottom: 14px;
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 44px 44px;
}
.hero .label {
  font: 400 12px/1 var(--serif);
  letter-spacing: .2em; text-transform: uppercase; color: var(--muted);
}
.hero .time {
  font: 600 clamp(52px, 17vw, 68px)/.92 var(--sans);
  letter-spacing: -.035em; margin: 14px 0 0;
}
.hero .time.small { font: 200 clamp(26px, 8vw, 32px)/1.15 var(--sans); letter-spacing: -.02em; margin-top: 12px; }
.hero .remain { font: 300 17px/1.3 var(--sans); color: var(--muted); margin-top: 10px; }
.hero .remain strong { color: var(--ink); font-weight: 600; }
.hero::after {
  content: ''; position: absolute; right: -10px; bottom: -14px;
  width: 126px; height: 126px; background: currentColor; opacity: .26;
  -webkit-mask: var(--ill-levain) no-repeat center / contain;
  mask: var(--ill-levain) no-repeat center / contain;
  pointer-events: none;
}
/* The hero on the way into a bake carries two lines of prose where the running
 * one carries a big number, so the line art moves out of the text's way. */
.hero.setup .remain { max-width: 82%; }
.hero.setup::after { right: -34px; bottom: -32px; opacity: .14; }

/* Arrival, not alarm. */
.hero.ready {
  background-color: var(--sage); color: var(--sage-ink);
}
.hero.ready .label { color: inherit; opacity: .65; }
.hero.ready .time { font-size: clamp(34px, 11vw, 46px); line-height: 1.02; }
.hero.ready .remain { color: inherit; opacity: .75; }
.hero.ready::after {
  -webkit-mask-image: var(--ill-banneton); mask-image: var(--ill-banneton);
  opacity: .36;
}

/* ================================================================ stats */
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 14px; }
.stat {
  border-radius: 22px; padding: 16px 18px 18px; min-height: 104px;
  background: var(--surface-2);
}
.stats .stat:nth-child(1) { background: var(--peri); color: var(--peri-ink); }
.stats .stat:nth-child(2) { background: var(--pink); color: var(--pink-ink); }
.stats .stat:nth-child(3) { background: var(--butter); color: var(--butter-ink); }
.stats .stat:nth-child(4) { background: var(--sage); color: var(--sage-ink); }
.stat .k {
  font: 700 10px/1.4 var(--mono); letter-spacing: .12em;
  text-transform: uppercase; opacity: .65;
}
.stat .v { font: 600 40px/1 var(--sans); letter-spacing: -.03em; margin-top: 14px; }
.stat .v small { font-size: 20px; font-weight: 400; }
.stat.wide {
  grid-column: 1 / -1; min-height: 0; display: flex; align-items: center; gap: 12px;
  background: var(--surface); border: 1px solid var(--line-soft);
  color: var(--ink); padding: 14px 16px;
}
.stat.wide .v { font: 300 14.5px/1.4 var(--sans); margin: 0; flex: 1; letter-spacing: 0; }
.flag {
  display: inline-block; font: 700 9px/1 var(--mono); letter-spacing: .1em;
  text-transform: uppercase; border-radius: 5px; padding: 5px 7px;
  background: rgba(34, 30, 27, .12); margin-top: 8px;
}
.progressbar { height: 6px; border-radius: 3px; background: rgba(34, 30, 27, .16); overflow: hidden; margin-top: 14px; }
html.night .progressbar { background: rgba(232, 223, 213, .14); }
.progressbar i {
  display: block; height: 100%; border-radius: 3px; background: currentColor;
}

/* ================================================================ chart */
.chartwrap {
  background: var(--surface); border: 1px solid var(--line-soft);
  border-radius: 24px; padding: 16px 14px 10px; margin-bottom: 14px;
}
.chartwrap svg { display: block; width: 100%; height: auto; overflow: visible; }
.legend {
  display: flex; flex-wrap: wrap; gap: 12px; padding: 8px 4px 2px;
  font: 400 9.5px/1.4 var(--mono); letter-spacing: .06em;
  text-transform: uppercase; color: var(--muted-2);
}
.legend i { display: inline-block; width: 14px; height: 0; border-top-width: 2px; border-top-style: solid; vertical-align: 4px; margin-right: 5px; }
.chart-empty {
  padding: 34px 10px; text-align: center; color: var(--muted-2);
  font: 400 11px/1.5 var(--mono); letter-spacing: .08em; text-transform: uppercase;
}
/* Chart ink is themed here so the SVG carries no colour of its own. */
.c-grid { stroke: var(--line-soft); }
.c-vgrid { stroke: var(--line-soft); }
.c-axis { fill: var(--muted-2); font-family: var(--mono); }
.c-band { fill: var(--accent); opacity: .1; }
.c-target { stroke: var(--accent); opacity: .7; }
.c-target-text { fill: var(--accent); font-family: var(--mono); }
.c-temp { stroke: var(--temp-line); opacity: .85; }
.c-temp-mark { fill: var(--temp-line); }
.c-temp-axis { fill: var(--muted-2); font-family: var(--mono); }
.c-rise { stroke: var(--ink); }
.c-proj { stroke: var(--muted-2); }
.c-jar { fill: var(--surface); stroke: var(--accent); }
.c-now { stroke: var(--muted-2); opacity: .6; }
.c-now-text { fill: var(--muted-2); font-family: var(--mono); }
.c-end { stroke: var(--accent); opacity: .5; }
.c-end-dot { fill: var(--accent); }
.c-end-text { fill: var(--accent); font-family: var(--mono); font-weight: 700; }

/* ============================================================== buttons */
.actions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 18px; }
.btn {
  min-height: 64px; border-radius: var(--r-row);
  border: 1.5px solid var(--line); background: transparent;
  font: 500 16px/1.2 var(--sans); color: var(--ink);
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 18px; width: 100%; text-align: center;
  transition: transform .16s var(--ease), background-color .16s, opacity .16s;
}
.btn:active { transform: scale(.985); }
.btn.primary {
  min-height: 68px; background: var(--accent); border-color: var(--accent);
  color: var(--on-accent); font-weight: 500; font-size: 17px;
}
.btn.ghost { border-color: transparent; background: var(--surface-2); color: var(--muted); }
.btn.danger { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 40%, transparent); }
.btn.small { min-height: 48px; border-radius: var(--r-chip); font-size: 14.5px; padding: 0 16px; }
.btn[disabled] { opacity: .4; }

/* ============================================================== nav pill */
.navpill {
  position: fixed; left: 50%; transform: translateX(-50%);
  bottom: calc(24px + env(safe-area-inset-bottom));
  height: 62px; padding: 0 10px; border-radius: 31px;
  background: var(--ink); display: flex; align-items: center; gap: 6px;
  box-shadow: 0 10px 24px rgba(34, 30, 27, .28); z-index: 30;
}
html.night .navpill { background: var(--surface-2); border: 1px solid var(--line); box-shadow: none; }
.navpill button {
  width: 56px; height: 46px; border-radius: 23px;
  display: grid; place-items: center;
  transition: background-color .16s, transform .16s var(--ease);
}
.navpill button:active { transform: scale(.96); }
.navpill button i {
  display: block; width: 19px; height: 19px;
  background: var(--bg); opacity: .62;
  -webkit-mask: no-repeat center / contain; mask: no-repeat center / contain;
}
.navpill button[aria-current="true"] { background: var(--bg); }
.navpill button[aria-current="true"] i { background: var(--ink); opacity: 1; }
.navpill .n-home i {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.7' stroke-linecap='round'%3E%3Cpath d='M4 11l8-6 8 6v8a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.7' stroke-linecap='round'%3E%3Cpath d='M4 11l8-6 8 6v8a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1z'/%3E%3C/svg%3E");
}
.navpill .n-hist i {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.7' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='8'/%3E%3Cpath d='M12 8v4l3 2'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.7' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='8'/%3E%3Cpath d='M12 8v4l3 2'/%3E%3C/svg%3E");
}

/* ======================================================== section titles */
.section-title {
  font: 700 10px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase;
  color: var(--muted); margin: 26px 0 12px;
}

/* ============================================================= readings */
.readings { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.reading {
  display: flex; align-items: center; gap: 14px;
  min-height: var(--tap); padding: 8px 18px;
  background: var(--surface); border-radius: 18px;
}
.reading .when { width: 52px; flex: 0 0 auto; font: 400 14px/1.3 var(--mono); color: var(--muted); }
.reading .what { flex: 1; min-width: 0; font: 500 16px/1.2 var(--sans); }
.reading .what b { font-weight: 500; }
.reading .what em {
  display: block; font-style: normal; font: 400 11px/1.4 var(--mono);
  letter-spacing: .04em; color: var(--muted-2); margin-top: 4px;
}
.reading .edit {
  flex: 0 0 auto; min-width: 48px; min-height: 48px; border-radius: 14px;
  font: 400 10px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase;
  color: var(--accent);
}
.pill {
  display: inline-block; font: 700 9px/1 var(--mono); letter-spacing: .1em;
  text-transform: uppercase; border-radius: 5px; padding: 4px 7px;
  background: var(--blue); color: var(--blue-ink); vertical-align: 2px;
}

/* ============================================================= dough cues
 * Instructions, not a checklist — the app never asks you to tick these,
 * it just wants them in front of you when you decide. */
.cues {
  background: var(--surface); border-radius: 24px;
  padding: 18px 20px; margin: 16px 0 18px; color: var(--muted);
}
.cues .lede {
  font: 700 10px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 10px;
}
.cues ul { margin: 0; padding: 0; list-style: none; }
.cues li {
  font: 300 13px/1.6 var(--sans); color: var(--muted);
  padding-left: 14px; position: relative;
}
.cues li::before {
  content: ''; position: absolute; left: 0; top: 9px;
  width: 4px; height: 4px; border-radius: 50%; background: currentColor; opacity: .5;
}

/* ================================================================ sheets */
.backdrop {
  position: fixed; inset: 0; background: rgba(34, 30, 27, .28); z-index: 40;
  display: flex; align-items: flex-end; justify-content: center;
  animation: fade .18s ease both;
}
.sheet {
  width: 100%; max-width: 480px; background: var(--bg);
  border-radius: var(--r-sheet) var(--r-sheet) 0 0;
  padding: 16px 22px calc(26px + env(safe-area-inset-bottom));
  max-height: 92vh; overflow-y: auto;
  box-shadow: 0 -12px 40px rgba(34, 30, 27, .18);
  animation: sheet .32s var(--ease) both;
}
.sheet::before {
  content: ''; display: block; width: 44px; height: 5px; border-radius: 3px;
  background: var(--line); margin: 0 auto 18px;
}
.sheet h2 { font: 200 26px/1.15 var(--sans); letter-spacing: -.02em; margin-bottom: 8px; }
.sheet .hint { font: 300 14px/1.45 var(--sans); color: var(--muted); margin-bottom: 16px; }
.sheet .row { display: flex; gap: 10px; margin-top: 14px; }
.sheet .row > * { flex: 1; }

/* the number pad — the most-used control in the app */
.numrow { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin: 4px 0 0; }
.numrow .unit { font: 400 11px/1.4 var(--mono); color: var(--muted-2); text-transform: uppercase; letter-spacing: .08em; padding-bottom: 12px; }
#numval {
  flex: 1; min-width: 0; border: 0; background: transparent; color: var(--ink);
  font: 600 60px/1 var(--sans); letter-spacing: -.04em; padding: 0;
  -moz-appearance: textfield;
}
#numval::-webkit-outer-spin-button, #numval::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.keypad {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px;
  margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line);
}
.keypad button {
  height: 70px; border-radius: 18px; background: var(--surface);
  font: 400 30px/1 var(--sans);
  transition: transform .09s var(--ease), background-color .16s;
}
.keypad button:active { transform: scale(.98); background: var(--pink); }
.keypad .del { background: var(--surface-2); font-size: 22px; }

label.field { display: block; margin-top: 14px; font: 700 10px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
label.field input, label.field textarea, label.field select {
  display: block; width: 100%; margin-top: 8px; padding: 16px 18px;
  background: var(--surface); color: var(--ink);
  border: 1px solid var(--line-soft); border-radius: var(--r-row);
  font: 400 17px/1.3 var(--sans); min-height: 66px;
}
/* 16px, not 15: below that Safari zooms the page to focus the field. */
label.field textarea { min-height: 92px; resize: vertical; font-size: 16px; }
.choices { display: grid; gap: 10px; margin: 12px 0 4px; }
.choices.three { grid-template-columns: repeat(3, 1fr); }
.btn[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.err { color: var(--danger); font: 400 14px/1.4 var(--sans); margin-top: 12px; min-height: 1px; }
.hint { font: 300 13.5px/1.5 var(--sans); color: var(--muted); margin-top: 8px; }

.toggle {
  display: flex; align-items: center; gap: 14px; min-height: 66px;
  background: var(--surface); border-radius: var(--r-row);
  padding: 14px 18px; margin-top: 12px;
}
.toggle .t { flex: 1; font: 400 15px/1.3 var(--sans); }
.toggle .t em { display: block; font-style: normal; font: 300 12.5px/1.4 var(--sans); color: var(--muted-2); margin-top: 4px; }
/* A toggle row whose control is a button rather than a switch — same row,
 * same tap target, so the two settings on the way into a bake line up. */
.toggle .btn { width: auto; flex: 0 0 auto; }
.switch {
  width: 52px; height: 30px; border-radius: 15px; flex: 0 0 auto; position: relative;
  background: var(--line); transition: background-color .2s;
}
.switch i { position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: var(--surface); transition: left .2s var(--ease); }
.switch[aria-checked="true"] { background: var(--accent); }
.switch[aria-checked="true"] i { left: 25px; background: var(--on-accent); }

/* ============================================================== history */
.bake {
  position: relative; overflow: hidden;
  background: var(--surface); border: 1px solid var(--line-soft);
  border-radius: 24px; padding: 20px 22px; margin-bottom: 12px;
}
.bake h3 { font: 400 19px/1.2 var(--sans); letter-spacing: -.01em; margin-top: 4px; }
.bake .meta { font: 400 11px/1.5 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted-2); margin: 8px 0 14px; }
.bake .kv { display: flex; flex-wrap: wrap; gap: 16px 26px; margin-bottom: 12px; }
.bake .kv span { font: 700 9.5px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted-2); }
.bake .kv b { display: block; font: 600 24px/1 var(--sans); letter-spacing: -.02em; color: var(--ink); margin-top: 6px; }
.empty {
  text-align: center; color: var(--muted-2); padding: 48px 20px;
  font: 300 15px/1.5 var(--sans);
}

/* The one thing allowed to shout. Terracotta is this screen's single accent
 * when it is showing, so nothing else on the live view competes with it. */
.alarmbar {
  display: block; width: 100%; text-align: left;
  background: var(--accent); color: var(--on-accent);
  border-radius: var(--r-row); padding: 16px 18px; margin-bottom: 14px;
  font: 400 14.5px/1.4 var(--sans);
}

/* =============================================================== toast */
#toast {
  position: fixed; left: 50%; bottom: calc(100px + env(safe-area-inset-bottom));
  transform: translateX(-50%) translateY(16px);
  background: var(--ink); color: var(--bg);
  padding: 14px 20px; border-radius: 16px;
  font: 400 14.5px/1.35 var(--sans); max-width: 86vw; text-align: center;
  opacity: 0; pointer-events: none; transition: opacity .18s, transform .18s var(--ease); z-index: 60;
}
#toast.on { opacity: 1; transform: translateX(-50%) translateY(0); }

.note { font: 300 12.5px/1.55 var(--sans); color: var(--muted-2); margin-top: 12px; }
.center { text-align: center; }
.spacer { height: 12px; }

/* ============================================================== motion
 * Nothing loops, nothing pulses, nothing arrives without a user action or a
 * value change. */
/* Entrance motion runs when you arrive at a view, never on the per-second
 * re-render — every number on screen is rebuilt from timestamps each tick, so
 * an unguarded entrance animation would restart once a second. That is the
 * blinking this app is not allowed to do. */
#app.enter .hero { animation: fade .5s ease both; }
#app.enter .hero.ready { animation: fade .7s ease-in-out both; }
#app.enter .progressbar i { animation: rise .9s var(--ease) both; }
#app.enter .c-rise { stroke-dasharray: 900; animation: draw 1.4s var(--ease) both; }

@keyframes draw { from { stroke-dashoffset: 900; } to { stroke-dashoffset: 0; } }
@keyframes rise { from { width: 0; } }
@keyframes sheet { from { transform: translateY(28px); opacity: .4; } to { transform: translateY(0); opacity: 1; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

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