/* Pinch UI system. Tokens first; components only use tokens. See DESIGN.md.
   Toss-inspired: grey canvas, flat white cards, big numbers, one filled action per screen. */

/* ---------- Tokens ---------- */
:root {
  color-scheme: light; /* light only: form controls and scrollbars stay light even when the phone is in dark mode */

  /* Color (contrast-checked, see DESIGN.md) */
  --bg: #F2F4F6;          /* canvas */
  --surface: #FFFFFF;     /* cards, sheets, tab bar */
  --fill: #EEF0F3;        /* inputs, secondary buttons, pressed rows */
  --text: #191F28;
  --text-2: #4E5968;
  --text-3: #5F6A77;
  --line: #E5E8EB;
  --accent: #0B7A50;      /* the one accent */
  --accent-ink: #FFFFFF;
  --accent-weak: #E6F4EC;
  --danger: #C62A38;
  --danger-weak: #FDECEE;
  --warn: #A5580C;
  --warn-weak: #FEF3E2;
  --scrim: rgb(0 0 0 / .4);

  /* Type (system UI font: SF Pro on iPhone, Roboto on Android; works offline) */
  --font: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Pretendard", "Segoe UI", Roboto, "Noto Sans KR", sans-serif;
  --t-display: 700 34px/1.15 var(--font);   /* key numbers */
  --t-title: 700 26px/1.3 var(--font);      /* tab page titles */
  --t-h2: 700 18px/1.4 var(--font);         /* card titles */
  --t-body: 400 16px/1.5 var(--font);
  --t-row: 600 16px/1.4 var(--font);        /* list row titles */
  --t-sub: 400 14px/1.45 var(--font);       /* secondary lines */
  --t-cap: 500 12.5px/1.4 var(--font);      /* captions, tab labels (never smaller) */

  /* Space: 4 / 8 rhythm */
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 20px; --s6: 24px; --s8: 32px;
  --gutter: 20px;

  /* Shape lock: cards 20, controls 14, pills round */
  --r-card: 20px;
  --r-control: 14px;
  --r-pill: 999px;

  /* Controls */
  --h-lg: 56px;   /* bottom CTA */
  --h-md: 52px;   /* inputs, standard buttons */
  --h-sm: 44px;   /* compact buttons: still a full touch target */

  /* Motion */
  --ease: cubic-bezier(.2, .8, .2, 1);
  --dur-press: 110ms;
  --dur-enter: 220ms;

  --tabbar-h: 60px;
}

/* ---------- Base ---------- */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: var(--t-body);
  font-feature-settings: "tnum" 1;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + var(--s4));
}
body.sub { padding-bottom: env(safe-area-inset-bottom); }
a { color: var(--accent); }
h2 { font: var(--t-h2); margin: 0 0 var(--s3); letter-spacing: -.01em; }
p { margin: 0 0 var(--s3); }
small, .muted { color: var(--text-3); font: var(--t-sub); }
.muted small { font-size: inherit; }
.center { text-align: center; }
.warn { color: var(--warn); font: var(--t-sub); margin: var(--s2) 0 0; }
.warn-text { color: var(--warn); }
.alert-text { color: var(--danger); }
.ok-text { color: var(--accent); font-weight: 600; }
.big { font: 700 24px/1.2 var(--font); letter-spacing: -.02em; }
.method { white-space: pre-wrap; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }

/* ---------- Page shell ---------- */
main { padding: 0 var(--gutter) var(--s6); max-width: 640px; margin: 0 auto; }
@media (prefers-reduced-motion: no-preference) {
  main { animation: enter var(--dur-enter) var(--ease); }
  @keyframes enter { from { opacity: 0; transform: translateY(6px); } }
}

header.top {
  position: sticky; top: 0; z-index: 5;
  display: flex; align-items: center; gap: var(--s2);
  min-height: 56px; padding: env(safe-area-inset-top) var(--s3) 0;
  background: var(--bg);
  max-width: 640px; margin: 0 auto;
}
header.top.root { position: static; padding: calc(env(safe-area-inset-top) + var(--s5)) var(--gutter) var(--s4); }
.page-title { flex: 1; margin: 0; font: var(--t-title); letter-spacing: -.02em; }
.bar-title { flex: 1; margin: 0; font: 600 17px/1.3 var(--font); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-action { display: flex; gap: var(--s2); }
.bar-action:empty { display: none; }

.icon-btn {
  display: inline-grid; place-items: center; flex: none;
  width: 44px; height: 44px; border-radius: var(--r-pill);
  color: var(--text); text-decoration: none;
}
.icon-btn:active { background: var(--fill); }
svg[aria-hidden] { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* Tab bar: 5 destinations, hidden in sub flows. Settings joins them only in the laptop side menu */
nav a.side-only { display: none; }
nav {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 10;
  display: flex; height: calc(var(--tabbar-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  -webkit-backdrop-filter: saturate(180%) blur(16px); backdrop-filter: saturate(180%) blur(16px);
  border-top: 1px solid var(--line);
}
body.sub nav { display: none; }
nav a {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  font: var(--t-cap); color: var(--text-3); text-decoration: none;
}
nav a svg { width: 24px; height: 24px; stroke-width: 1.8; }
nav a.on { color: var(--text); font-weight: 700; }
nav a.on svg { stroke-width: 2.2; color: var(--accent); }

.demo-bar { background: var(--accent); color: var(--accent-ink); text-align: center; font: var(--t-cap); padding: calc(6px + env(safe-area-inset-top)) var(--s3) 6px; }
.demo-bar a { color: inherit; font-weight: 700; }

/* ---------- Cards ---------- */
.card {
  background: var(--surface); border-radius: var(--r-card);
  padding: var(--s5); margin: 0 0 var(--s3);
}
.card > :last-child { margin-bottom: 0; }
details.card summary { cursor: pointer; font: var(--t-h2); list-style: none; display: flex; justify-content: space-between; align-items: center; min-height: 24px; }
details.card summary::-webkit-details-marker { display: none; }
details.card summary::after { content: "Edit"; font: 600 15px/1 var(--font); color: var(--accent); }
details.card[open] summary::after { content: "Done"; }
details.card[open] summary { margin-bottom: var(--s4); }

/* Key number: the one thing a screen is about */
.stat-card { padding-top: var(--s6); padding-bottom: var(--s6); }
.stat-label { font: 600 15px/1.3 var(--font); color: var(--text-2); margin-bottom: var(--s1); }
.stat { font: var(--t-display); letter-spacing: -.03em; margin-bottom: var(--s2); }
.stat-sub { font: var(--t-sub); color: var(--text-2); margin: 0; }
.stat-sub b { color: var(--text); }

.hero { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--r-card); margin-bottom: var(--s3); background: var(--fill); }

/* Key/value rows */
.kv { display: grid; grid-template-columns: 1fr auto; gap: var(--s3) var(--s4); align-items: baseline; margin: 0 0 var(--s4); }
.kv dt { color: var(--text-2); font: var(--t-sub); font-size: 15px; }
.kv dd { margin: 0; text-align: right; font-weight: 600; }

/* ---------- Lists: one grouped card, rows with a trailing value ---------- */
.list { list-style: none; margin: 0 0 var(--s3); padding: var(--s2) 0; background: var(--surface); border-radius: var(--r-card); }
.list li a {
  display: flex; align-items: center; gap: var(--s3);
  min-height: 64px; padding: var(--s3) var(--s5);
  color: inherit; text-decoration: none;
  transition: background var(--dur-press) var(--ease);
}
.list li a:active { background: var(--fill); }
.list b { display: block; font: var(--t-row); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list small { display: block; margin-top: 2px; }
.list .grow, .list li a > div { flex: 1; min-width: 0; }
.list img, .ph { width: 48px; height: 48px; flex: none; border-radius: var(--r-control); object-fit: cover; background: var(--fill); }
.trail { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; text-align: right; font: 600 16px/1.3 var(--font); }
.trail small { margin: 0; font: var(--t-cap); color: var(--text-3); }
h2.day { font: 600 14px/1.4 var(--font); color: var(--text-3); margin: var(--s6) var(--s1) var(--s2); }

.links { display: flex; flex-wrap: wrap; gap: var(--s2); margin: 0 0 var(--s3); }
.links a, .pill-link {
  display: inline-flex; align-items: center; min-height: var(--h-sm); padding: 0 var(--s4);
  border-radius: var(--r-pill); background: var(--surface); color: var(--text); font: 600 15px/1 var(--font); text-decoration: none;
}
.links a:active { background: var(--fill); }

.empty { text-align: center; color: var(--text-3); padding: var(--s8) var(--s4); }

/* ---------- Buttons ---------- */
.btn, button {
  appearance: none; border: 0; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: var(--h-md); padding: 0 var(--s5);
  border-radius: var(--r-control);
  font: 600 16px/1 var(--font); text-decoration: none; white-space: nowrap;
  background: var(--accent); color: var(--accent-ink);
  transition: transform var(--dur-press) var(--ease), filter var(--dur-press) var(--ease), background var(--dur-press) var(--ease);
}
.btn:active, button:active { transform: scale(.97); filter: brightness(.95); }
button:disabled { opacity: .45; transform: none; cursor: default; }
.btn svg, button svg { width: 20px; height: 20px; stroke-width: 2.4; }
.btn.ghost, button.ghost { background: var(--fill); color: var(--text); }
.btn.tint, button.tint { background: var(--accent-weak); color: var(--accent); }
button.danger, .btn.danger { background: var(--danger-weak); color: var(--danger); }
.btn.sm, button.sm { min-height: 36px; padding: 0 var(--s3); font-size: 15px; border-radius: var(--r-pill); position: relative; }
.btn.sm::before { content: ""; position: absolute; inset: -4px; } /* 44px touch target around a 36px pill */
.btn.wide { display: flex; width: 100%; margin-top: var(--s4); }
button.x { background: transparent; color: var(--text-3); width: 44px; min-height: 44px; padding: 0; font-size: 22px; }
button.link { background: none; color: var(--accent); min-height: 44px; padding: 0; font: 600 15px/1 var(--font); }

.actions { display: flex; flex-wrap: wrap; gap: var(--s2); margin-top: var(--s4); }
.actions > button[type=submit] { flex: 1; }

/* One primary action per sub screen: the form's submit sticks to the bottom */
body.sub form .actions:has(> button[type=submit]) {
  position: sticky; bottom: 0; z-index: 4; flex-wrap: nowrap;
  margin: var(--s6) calc(var(--gutter) * -1) 0;
  padding: var(--s3) var(--gutter) calc(var(--s3) + env(safe-area-inset-bottom));
  background: linear-gradient(to bottom, transparent, var(--bg) 28%);
}
body.sub form .actions > button[type=submit] { min-height: var(--h-lg); font-size: 17px; border-radius: 16px; }
body.sub form .actions > button.danger { min-height: var(--h-lg); border-radius: 16px; padding: 0 var(--s4); }

/* ---------- Forms ---------- */
label { display: block; margin: 0 0 var(--s4); font: 600 14px/1.4 var(--font); color: var(--text-2); }
label > input, label > select, label > textarea { margin-top: var(--s2); }
input, select, textarea {
  width: 100%; min-height: var(--h-md); padding: 0 var(--s4);
  font: 400 17px/1.4 var(--font); color: var(--text);
  background: var(--fill); border: 1.5px solid transparent; border-radius: var(--r-control);
  transition: border-color var(--dur-press) var(--ease), background var(--dur-press) var(--ease);
}
textarea { padding: var(--s3) var(--s4); min-height: 120px; resize: vertical; }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--text-3) 50%), linear-gradient(135deg, var(--text-3) 50%, transparent 50%);
  background-position: right 18px center, right 13px center; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 36px; }
input::placeholder, textarea::placeholder { color: var(--text-3); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); background: var(--surface); }
input[type=file] { padding: var(--s3); min-height: 0; font-size: 15px; }
input:is([type=checkbox], [type=radio]) { width: 22px; height: 22px; min-height: 0; accent-color: var(--accent); margin: 0; flex: none; }
input[type=search] { padding-left: 44px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235F6A77' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10 10m-7 0a7 7 0 1 0 14 0a7 7 0 1 0 -14 0'/%3E%3Cpath d='M21 21l-6 -6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: 14px center; background-size: 20px; }
label.inline { display: flex; align-items: center; gap: var(--s3); color: var(--text); font-weight: 500; }
label.inline input[type=number] { width: 96px; margin: 0; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s3); }
.bar { display: flex; gap: var(--s2); margin-bottom: var(--s3); }
.bar input { background-color: var(--surface); }
.bar select { width: auto; background-color: var(--surface); }

/* Toggle chips for multi-select (allergens) */
.checks { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s2); }
.checks label { display: flex; align-items: center; gap: var(--s2); margin: 0; min-height: var(--h-sm); padding: 0 var(--s3);
  border-radius: var(--r-control); background: var(--fill); color: var(--text); font-weight: 500; font-size: 15px; cursor: pointer; }
.checks label:has(input:checked) { background: var(--accent-weak); color: var(--accent); font-weight: 700; }

fieldset.reading { border: 0; border-radius: var(--r-control); background: var(--surface); padding: var(--s4) var(--s4) 0; margin: 0 0 var(--s3); }
fieldset.reading legend { float: left; width: 100%; font: 700 16px/1.3 var(--font); margin-bottom: var(--s3); }
fieldset.reading legend small { font-weight: 500; }
#status { min-height: 28px; display: flex; align-items: center; gap: var(--s2); font: var(--t-sub); }

/* Recipe ingredient rows */
.item { display: grid; grid-template-columns: 1fr 72px 92px 44px; gap: var(--s2); margin-bottom: var(--s2); align-items: center; }
.item input, .item select { padding: 0 var(--s3); font-size: 16px; }
.item.is-new [name=ing] { border-color: var(--accent); }
.item.uncertain [name=qty] { border-color: var(--warn); background: var(--warn-weak); }
.paste textarea, #csvText { min-height: 150px; font: 400 15px/1.5 ui-monospace, Menlo, monospace; }
.plan-row { display: grid; grid-template-columns: 1fr 104px 44px; gap: var(--s2); margin-bottom: var(--s2); align-items: center; }

/* ---------- Chips, badges, progress ---------- */
.chips { display: flex; flex-wrap: wrap; gap: var(--s2); margin-bottom: var(--s3); }
.chip { display: inline-flex; align-items: center; min-height: 32px; padding: 0 var(--s3); border-radius: var(--r-pill); background: var(--fill); color: var(--text); font: 600 14px/1 var(--font); text-decoration: none; }
a.chip { min-height: 40px; }
.chip.alert { background: var(--danger-weak); color: var(--danger); }
.badge { flex: none; display: inline-flex; align-items: center; min-height: 24px; padding: 0 var(--s2); border-radius: var(--r-pill); font: 700 12px/1 var(--font); letter-spacing: .02em; }
.badge.pass { background: var(--accent-weak); color: var(--accent); }
.badge.fail { background: var(--danger-weak); color: var(--danger); }
.badge.pending { background: var(--warn-weak); color: var(--warn); }
.progress { height: 8px; margin-top: var(--s2); background: var(--fill); border-radius: var(--r-pill); overflow: hidden; }
.progress i { display: block; height: 100%; background: var(--accent); border-radius: inherit; }

/* ---------- Tables ---------- */
table { width: 100%; border-collapse: collapse; font-size: 15px; }
th, td { padding: var(--s3) var(--s1); text-align: left; vertical-align: top; }
thead th { font: 600 13px/1.3 var(--font); color: var(--text-3); padding-top: 0; }
tbody tr + tr td, tbody tr + tr th { border-top: 1px solid var(--line); }
tfoot th, tfoot td { border-top: 1px solid var(--line); font-weight: 700; }
td.n, th.n { text-align: right; white-space: nowrap; }

.matrix { overflow-x: auto; }
.matrix th.v { writing-mode: vertical-rl; transform: rotate(180deg); font: 500 12.5px/1 var(--font); padding: var(--s2) 2px; white-space: nowrap; color: var(--text-2); }
.matrix td.c { text-align: center; color: var(--danger); }
.matrix th:first-child, .matrix td:first-child { position: sticky; left: 0; background: var(--surface); min-width: 140px; }

.welcome .steps { margin: 0 0 var(--s2); padding-left: var(--s5); }
.welcome .steps li { margin-bottom: var(--s3); }

/* ---------- Recipe card & portfolio sheets (paper, same in both themes; print to A4) ---------- */
.sheet-wrap { overflow-x: auto; margin-top: var(--s3); }
.sheet { min-width: 560px; background: #fff; color: #191F28; border-radius: var(--r-card); padding: 28px; font-size: 13px; }
.sheet h1 { margin: 0 0 4px; font: 700 22px/1.25 var(--font); }
.sheet h2 { margin: 16px 0 6px; font: 700 14px/1.3 var(--font); }
.sheet .muted, .sheet small { color: #5F6A77; font-size: inherit; }
.sheet .eyebrow { margin: 0 0 2px; font: 700 11px/1.3 var(--font); letter-spacing: .08em; text-transform: uppercase; color: #0B7A50; }
.sheet .alert-text, .sheet .warn { color: #C62A38; }
.sheet-head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; border-bottom: 2px solid #191F28; padding-bottom: 10px; margin-bottom: 10px; }
.sheet-head img { width: 120px; height: 90px; object-fit: cover; border-radius: 6px; }
.sheet table { font-size: 13px; }
.sheet th, .sheet td { padding: 5px 4px; border-top: 0; border-bottom: 1px solid #E5E8EB; }
.sheet thead th { color: #191F28; border-bottom: 1.5px solid #191F28; font-size: 11px; text-transform: uppercase; letter-spacing: .04em; }
.sheet tfoot th, .sheet tfoot td { border-bottom: 0; border-top: 1.5px solid #191F28; }
.sheet-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 12px; }
.sheet .kv { gap: 6px 12px; }
.sheet .kv dt { color: #5F6A77; font-size: 13px; }
.sheet .kv dd { font-weight: 400; }
.sheet-foot { margin-top: 20px; font-size: 10px; color: #5F6A77; }
.sheet .bio { white-space: pre-wrap; margin: 10px 0; }
.sheet .stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 14px 0; }
.sheet .stats div { background: #F2F4F6; border-radius: 10px; padding: 10px 12px; }
.sheet .stats b { display: block; font-size: 20px; }
.sheet .exp { list-style: none; margin: 0; padding: 0; }
.sheet .exp li { padding: 6px 0; border-bottom: 1px solid #E5E8EB; break-inside: avoid; }
.sheet .dishes { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.sheet .dish { margin: 0; break-inside: avoid; }
.sheet .dish img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 8px; }
.sheet .dish figcaption { padding-top: 6px; }
.sheet .dish small { display: block; }

@media print {
  @page { size: A4; margin: 14mm; }
  header, nav, .no-print, .demo-bar { display: none !important; }
  body { background: #fff; padding: 0; }
  main { padding: 0; max-width: none; animation: none; }
  .card { background: none; padding: 0; border-radius: 0; }
  .sheet-wrap { overflow: visible; }
  .sheet { min-width: 0; padding: 0; border-radius: 0; font-size: 11pt; zoom: 1 !important; }
  .sheet tr, .sheet-grid { break-inside: avoid; }
  .sheet h2 { break-after: avoid; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .btn:active, button:active { transform: none; }
}

/* ---------- Refinements after first review ---------- */
/* Forms sitting straight on the grey canvas use white fields (grey-on-grey disappears) */
form:not(.card) :is(input, select, textarea):focus { background-color: var(--surface); }
/* Recipe ingredient rows: name on its own line, amount below */
.item { grid-template-columns: 1fr 104px 44px; padding-bottom: var(--s3); margin-bottom: var(--s3); border-bottom: 1px solid var(--line); }
.item [name=ing] { grid-column: 1 / -1; }
/* Order list rows */
form:not(.card) .checks label:not(:has(input:checked)) { background: var(--surface); }

/* Recipe editor: quick capture */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
#paste textarea { min-height: 180px; font: 400 17px/1.6 var(--font); }
details.more { background: var(--surface); border-radius: var(--r-card); padding: var(--s4) var(--s5); margin-top: var(--s4); }
details.more summary { cursor: pointer; list-style: none; min-height: 28px; display: flex; align-items: baseline; gap: var(--s2); font: 600 16px/1.4 var(--font); }
details.more summary::-webkit-details-marker { display: none; }
details.more summary::after { content: "+"; margin-left: auto; font-size: 20px; color: var(--text-3); }
details.more[open] summary::after { content: "−"; }
details.more[open] summary { margin-bottom: var(--s4); }
details.more :is(input, select) { background-color: var(--fill); }

/* ---------- Cooking mode ---------- */
.cta-bar { position: sticky; bottom: 0; z-index: 4; margin: var(--s6) calc(var(--gutter) * -1) 0;
  padding: var(--s3) var(--gutter) calc(var(--s3) + env(safe-area-inset-bottom)); background: linear-gradient(to bottom, transparent, var(--bg) 28%); }
.cta-bar .btn { display: flex; width: 100%; min-height: var(--h-lg); font-size: 17px; border-radius: 16px; }
.tip { background: var(--accent-weak); border-radius: var(--r-control); padding: var(--s3) var(--s4); }
.tip small { color: var(--text-2); }

.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; padding: 4px; margin-bottom: var(--s4); background: var(--fill); border-radius: var(--r-control); }
.seg button { min-height: 40px; background: transparent; color: var(--text-2); font-size: 15px; border-radius: 10px; }
.seg button[aria-selected=true] { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgb(0 0 0 / .08); }

.step-count { font: 600 15px/1.3 var(--font); color: var(--accent); margin-bottom: var(--s3); }
.step-timers { display: flex; flex-wrap: wrap; gap: var(--s2); }
.step-timers button { min-height: var(--h-md); }
.cook-nav { position: sticky; bottom: 0; display: grid; grid-template-columns: 1fr 2fr; gap: var(--s2); margin: var(--s4) calc(var(--gutter) * -1) 0;
  padding: var(--s3) var(--gutter) calc(var(--s3) + env(safe-area-inset-bottom)); background: linear-gradient(to bottom, transparent, var(--bg) 28%); }
.cook-nav button { min-height: var(--h-lg); font-size: 17px; border-radius: 16px; }

#cookTimers { display: grid; gap: var(--s2); margin-bottom: var(--s3); }
#cookTimers:empty { display: none; }
.timer { display: flex; align-items: center; gap: var(--s3); padding: var(--s2) var(--s2) var(--s2) var(--s4); border-radius: var(--r-control); background: var(--surface); }
.timer span { flex: 1; font: var(--t-sub); color: var(--text-2); }
.timer b { font: 700 22px/1 var(--font); }
.timer.done { background: var(--warn-weak); }
.timer.done b { color: var(--warn); }
@media (prefers-reduced-motion: no-preference) { .timer.done { animation: pulse 1s var(--ease) infinite alternate; } @keyframes pulse { to { filter: brightness(.94); } } }

.timer-pill { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + var(--s3)); z-index: 11;
  display: inline-flex; align-items: center; min-height: var(--h-sm); padding: 0 var(--s5); border-radius: var(--r-pill);
  background: var(--text); color: var(--surface); font: 700 15px/1 var(--font); text-decoration: none; box-shadow: 0 6px 20px rgb(0 0 0 / .18); white-space: nowrap; }
body.sub .timer-pill { bottom: calc(env(safe-area-inset-bottom) + 88px); }
.timer-pill.done { background: var(--warn); }

.checklist { list-style: none; margin: var(--s3) 0 0; padding: 0; }
.checklist li + li { border-top: 1px solid var(--line); }
.checklist label { display: flex; align-items: center; gap: var(--s3); margin: 0; min-height: 56px; color: var(--text); font: 500 17px/1.4 var(--font); cursor: pointer; }
.checklist label b { font-weight: 700; white-space: nowrap; }
.checklist label.got span, .checklist label.got b { color: var(--text-3); text-decoration: line-through; }
.import-card .bar { margin-bottom: var(--s2); }
.import-card .bar input { background-color: var(--fill); }
.import-card .bar button { flex: none; }
.import-card p { margin: 0; }

/* Quick log & yield test */
.quick-log { display: flex; align-items: center; gap: var(--s3); color: inherit; text-decoration: none; background: var(--accent-weak); }
.quick-log b { display: block; font: var(--t-row); }
.quick-log small { display: block; margin-top: 2px; color: var(--text-2); }
.quick-log:active { filter: brightness(.97); }
.trim-row { display: grid; grid-template-columns: 1fr 1fr 44px; gap: var(--s2); padding-bottom: var(--s3); margin-bottom: var(--s3); border-bottom: 1px solid var(--line); align-items: center; }
.trim-row [name=tname] { grid-column: 1 / -1; }
.trim-row input { padding: 0 var(--s3); font-size: 16px; }
h2 small { font-weight: 400; }

/* ---------- Layout rules (see DESIGN.md "Sizing and alignment") ---------- */
/* 1. One control height. Grid/flex children may shrink; nothing pushes past the screen edge. */
input, select, textarea { min-width: 0; }
input[type=date], input[type=datetime-local], input[type=time] { display: block; min-height: var(--h-md); -webkit-appearance: none; appearance: none; text-align: left; }
input::-webkit-date-and-time-value { text-align: left; }
fieldset { min-width: 0; }
.checks label { min-height: var(--h-md); }
input[type=file]::file-selector-button { border: 0; border-radius: 10px; margin-right: var(--s3); padding: var(--s2) var(--s3); background: var(--surface); color: var(--text); font: 600 15px/1 var(--font); }

/* 2. Side-by-side fields line up on their inputs, even when one label wraps */
.row2 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: end; }
.row2 > * { min-width: 0; }
.row2.tt { grid-template-columns: minmax(0, 1fr) 112px; }   /* time + °C */

/* Fields in white panels (cards, details, reading groups) are grey; on the grey canvas they are white */
form:not(.card) :is(input, select, textarea):not([type=checkbox], [type=radio]):not([type=file]):not(.card *, details *, fieldset *) { background-color: var(--surface); }
fieldset.reading :is(input, select) { background-color: var(--fill); }

/* 3. A button on its own spans the width; buttons in a row share it */
:is(.card, form, #result, #out) > :is(button, .btn):not(.x):not(.sm):not(.link),
.card > form > button, #paste > button { display: flex; width: 100%; }
.actions > :is(button, .btn, label.btn) { flex: 1 1 auto; }
body.sub form .actions > button.danger { flex: 0 0 auto; }
#fbMsg, #saved, #inviteMsg, #pasteMsg, #impMsg { display: block; margin-top: var(--s2); }

/* 4. Button labels never wrap */
button, .btn { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
fieldset.reading .row2 { clear: both; }              /* the floated legend must not squeeze the fields beside it */
.cta-bar :is(.btn, button) { display: flex; width: 100%; min-height: var(--h-lg); font-size: 17px; border-radius: 16px; }
/* Temperature readings: °C first (it's what you're recording), full-width time below so it never truncates */
.row2.tt { grid-template-columns: minmax(0, 1fr); }
.row2.tt > label:last-child { order: -1; }
/* Order plan rows: recipe name on its own line, portions below (like ingredient rows) */
.plan-row { grid-template-columns: minmax(0, 1fr) 44px; padding-bottom: var(--s3); margin-bottom: var(--s3); border-bottom: 1px solid var(--line); }
.plan-row select { grid-column: 1 / -1; }
.quick-log .btn { flex: none; }

/* ---------- Equal-width rules (v8) ---------- */
/* Buttons sharing a row are equal width. With an odd count the first takes a full row. */
.actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s2); }
.actions > :only-child, .actions > :first-child:nth-last-child(2n + 3) { grid-column: 1 / -1; }
.actions > :is(button, .btn, label.btn) { width: 100%; min-width: 0; }
/* Primary + secondary pair (Save + Delete, Next + Back): fixed 2:1, secondary on the left */
body.sub form .actions:has(> button[type=submit]) { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); }
body.sub form .actions:has(> button[type=submit]):not(:has(> .danger)) { grid-template-columns: minmax(0, 1fr); }
body.sub form .actions > button.danger { order: -1; grid-column: auto; }
body.sub form .actions > button[type=submit] { grid-column: auto; }
/* Full-width stack of actions */
.stack { display: grid; gap: var(--s2); margin-top: var(--s4); }
.stack > * { width: 100%; }
/* Shortcuts: one white card of equal rows with a chevron, instead of content-width pills */
.links { display: block; padding: var(--s1) 0; margin: 0 0 var(--s3); background: var(--surface); border-radius: var(--r-card); }
.links a {
  display: flex; align-items: center; justify-content: space-between; min-height: 52px; padding: 0 var(--s5);
  font: 600 16px/1.3 var(--font); color: var(--text); background: none; border-radius: 0; text-decoration: none;
}
.links a + a { border-top: 1px solid var(--line); }
.links a::after { content: ""; width: 8px; height: 8px; border: solid var(--text-3); border-width: 2px 2px 0 0; transform: rotate(45deg); margin-right: 4px; }
.links a:active { background: var(--fill); }
.checks { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.checks label { min-width: 0; overflow-wrap: anywhere; }
label.btn { margin: 0; color: var(--text); font: 600 16px/1 var(--font); }   /* a label styled as a button carries no field spacing */
.actions { align-items: stretch; }
#cups .seg { margin-bottom: var(--s4); }
#cupOut { margin: var(--s2) 0 var(--s1); }
#scStat:empty { display: none; }

/* Practice attempts */
.stars { display: inline-flex; gap: 2px; vertical-align: middle; }
.stars svg { width: 16px; height: 16px; stroke: var(--line); stroke-width: 1.5; fill: var(--line); }
.stars svg.on { stroke: var(--accent); fill: var(--accent); }
.practice-sum { display: flex; align-items: center; gap: var(--s2); }
.card .list { background: none; padding: 0; margin: var(--s2) 0 0; }
.card .list li a { padding-left: 0; padding-right: 0; }
.card .list li + li a { border-top: 1px solid var(--line); }
fieldset.rating { border: 0; padding: 0; margin: 0 0 var(--s4); display: flex; gap: var(--s1); }
fieldset.rating legend { font: 600 14px/1.4 var(--font); color: var(--text-2); margin-bottom: var(--s2); padding: 0; }
fieldset.rating label { margin: 0; display: grid; place-items: center; width: 52px; height: 52px; border-radius: var(--r-control); cursor: pointer; }
fieldset.rating input { position: absolute; opacity: 0; width: 1px; height: 1px; }
fieldset.rating svg { width: 36px; height: 36px; fill: var(--surface); stroke: var(--text-3); stroke-width: 1.5; transition: fill var(--dur-press) var(--ease); }
fieldset.rating label:has(input:focus-visible) { outline: 2px solid var(--accent); }
fieldset.rating:has(input[value="1"]:checked) label:nth-of-type(-n+1) svg,
fieldset.rating:has(input[value="2"]:checked) label:nth-of-type(-n+2) svg,
fieldset.rating:has(input[value="3"]:checked) label:nth-of-type(-n+3) svg,
fieldset.rating:has(input[value="4"]:checked) label:nth-of-type(-n+4) svg,
fieldset.rating:has(input[value="5"]:checked) label:nth-of-type(-n+5) svg { fill: var(--accent); stroke: var(--accent); }
.preset-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s2); }
.preset-grid button { width: 100%; }

/* Study */
.links .count { margin-left: auto; margin-right: var(--s3); font: 500 14px/1 var(--font); color: var(--text-3); white-space: nowrap; flex-shrink: 0; }
dl.ref { margin: 0; }
dl.ref dt { font: var(--t-row); margin-top: var(--s4); }
dl.ref dt:first-child { margin-top: 0; }
dl.ref dd { margin: var(--s1) 0 0; color: var(--text-2); }
.flash { display: flex; flex-direction: column; justify-content: center; gap: var(--s3); width: 100%; min-height: calc(100dvh - 300px); padding: var(--s6);
  border-radius: var(--r-card); background: var(--surface); color: var(--text); text-align: left; white-space: normal; transform: none; filter: none; }
.flash:active { transform: none; filter: none; }
.flash:disabled { opacity: 1; cursor: default; }
.flash-deck { font: 600 14px/1.3 var(--font); color: var(--accent); }
.flash-front { font: 700 30px/1.25 var(--font); letter-spacing: -.02em; }
.flash-back { font: 500 20px/1.45 var(--font); color: var(--text-2); }
.flash-hint { font: var(--t-sub); color: var(--text-3); }
.cook-nav.single { grid-template-columns: 1fr; }
.cook-nav a.btn { display: flex; min-height: var(--h-lg); font-size: 17px; border-radius: 16px; }

/* Prep list */
.task h2 { display: flex; align-items: center; gap: var(--s2); }
.task-n { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: var(--r-pill); background: var(--accent-weak); color: var(--accent); font: 700 14px/1 var(--font); flex: none; }
.task h3 { font: 600 14px/1.3 var(--font); color: var(--text-3); margin: var(--s4) 0 0; }
.checklist.steps label { align-items: flex-start; padding: var(--s3) 0; font-weight: 400; font-size: 16px; line-height: 1.45; }
.checklist.steps input { margin-top: 2px; }
.checklist .btn.sm, .checklist button.sm { flex: none; }
@media print { .task { break-inside: avoid; } .task-n { background: none; border: 1px solid #191F28; color: #191F28; } }
.checklist button.sm { min-height: var(--h-sm); }

/* Menus */
.dish-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 44px; gap: var(--s2); font: 600 13px/1.3 var(--font); color: var(--text-3); margin-bottom: var(--s2); }
.dish-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 44px; gap: var(--s2); padding-bottom: var(--s3); margin-bottom: var(--s3); border-bottom: 1px solid var(--line); align-items: end; }
.dish-row label { margin: 0; min-width: 0; }
.dish-row select { grid-column: 1 / -1; }
.dish-head { margin-top: var(--s1); }
.dish-head::before { content: ""; display: none; }
.matrix4 { display: grid; grid-template-columns: 16px minmax(0, 1fr) minmax(0, 1fr); grid-template-rows: auto auto auto; gap: var(--s2); align-items: stretch; }
.matrix4 .mx { border-radius: var(--r-control); padding: var(--s3); min-height: 84px; display: flex; flex-direction: column; gap: var(--s1); font: var(--t-sub); }
.matrix4 .mx b { font: 700 15px/1.2 var(--font); }
.matrix4 .mx:nth-of-type(1) { grid-column: 2; grid-row: 1; }
.matrix4 .mx:nth-of-type(2) { grid-column: 3; grid-row: 1; }
.matrix4 .mx:nth-of-type(3) { grid-column: 2; grid-row: 2; }
.matrix4 .mx:nth-of-type(4) { grid-column: 3; grid-row: 2; }
.matrix4 .ax { font: 600 12.5px/1 var(--font); color: var(--text-3); }
.matrix4 .ax-y { grid-column: 1; grid-row: 1 / 3; writing-mode: vertical-rl; transform: rotate(180deg); text-align: center; }
.matrix4 .ax-x { grid-column: 2 / 4; grid-row: 3; text-align: center; }
.mx.star, .badge.star { background: var(--accent-weak); color: var(--accent); }
.mx.plowhorse, .badge.plowhorse { background: var(--warn-weak); color: var(--warn); }
.mx.puzzle, .badge.puzzle { background: var(--fill); color: var(--text); }
.mx.dog, .badge.dog { background: var(--danger-weak); color: var(--danger); }
.mx span { color: var(--text-2); }
.today .links { margin-bottom: var(--s4); }
.today h2.day { margin-top: 0; }

/* Korean: break between words, not inside them */
:lang(ko) body { word-break: keep-all; overflow-wrap: anywhere; }

/* Narrow phones: less side padding so two-up button labels fit without an ellipsis */
@media (max-width: 380px) { .btn:not(.sm), button:not(.sm, .x, .link) { padding-inline: var(--s3); } }

/* ---- v22: Home, tool tiles, recipe quick actions, portion stepper ---- */
.home-date { margin: calc(var(--s2) * -1) 0 var(--s4); }
.all-done { display: flex; flex-direction: column; gap: 2px; }
.all-done small { color: var(--text-3); font: var(--t-sub); }
.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s1); padding: var(--s3) var(--s2); margin: 0 0 var(--s4); background: var(--surface); border-radius: var(--r-card); }
.tiles a, .quick a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; min-height: 84px; padding: var(--s2) 2px;
  border-radius: var(--r-control); color: var(--text); text-decoration: none; font: 500 13px/1.25 var(--font); text-align: center; transition: background var(--dur-press) var(--ease); }
.tiles a:active, .quick a:active { background: var(--fill); }
.tile-ic { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 16px; background: var(--accent-weak); color: var(--accent); }
.tile-ic svg { width: 26px; height: 26px; stroke-width: 1.8; }
.quick { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s2); margin: 0 0 var(--s3); }
.quick a { background: var(--surface); border-radius: var(--r-card); font: 600 14px/1.25 var(--font); }
.quick svg { width: 26px; height: 26px; color: var(--accent); stroke-width: 1.8; }
.stat-chips { margin: var(--s4) 0 0; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); margin-bottom: var(--s2); }
.card-head h2 { margin: 0; }
.stepper { display: flex; align-items: center; gap: var(--s1); }
.stepper button { width: 44px; min-height: 44px; padding: 0; border-radius: var(--r-pill); font: 500 22px/1 var(--font); }
.stepper input { width: 56px; min-height: 44px; margin: 0; padding: 0; text-align: center; font-weight: 700; -moz-appearance: textfield; }
.stepper input::-webkit-inner-spin-button, .stepper input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.stat-card + details.more { margin: 0 0 var(--s3); }
/* Secondary buttons straight on the grey canvas are white, like cards, so they don't vanish */
main > .btn.ghost, main > .actions > :is(button, .btn).ghost { background: var(--surface); }
/* Forms inside a card (sign-in on Settings) keep their buttons in place, side by side */
body.sub .card form .actions:has(> button[type=submit]) { position: static; margin: var(--s4) 0 0; padding: 0; background: none; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
body.sub .card form .actions > button[type=submit] { min-height: var(--h-md); font-size: 16px; border-radius: var(--r-control); }

/* ---- v23: checklists ---- */
.list li .row-static { display: flex; align-items: center; gap: var(--s3); min-height: 56px; padding: var(--s2) var(--s5); }
.card > .checklist:first-child { margin-top: calc(var(--s2) * -1); margin-bottom: calc(var(--s2) * -1); }

/* ---- v25: share, favourites ---- */
.quick { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.quick a { font-size: 13px; }
.icon-btn.fav { background: none; border: 0; padding: 0; min-height: 44px; color: var(--text-3); }
.icon-btn.fav svg { stroke-width: 1.8; }
.icon-btn.fav[aria-pressed="true"] { color: var(--accent); }
.icon-btn.fav[aria-pressed="true"] svg { fill: currentColor; }
.shared-name { font: var(--t-title); margin: var(--s1) 0 var(--s2); }
.tip-card .actions { margin-top: var(--s3); }

/* ---- v26: read a recipe photo ---- */
.photo-read { margin-top: var(--s2); }
.photo-read.busy { opacity: .55; pointer-events: none; }

/* ---- Laptop and desktop: a side menu instead of the tab bar, a wider column, hover feedback ---- */
@media screen and (min-width: 960px) {
  :root { --side: 232px; --col: 760px; }
  body, body.sub { padding: 0 0 var(--s8) var(--side); }
  nav, body.sub nav {
    display: flex; flex-direction: column; gap: var(--s1);
    top: 0; bottom: 0; right: auto; width: var(--side); height: auto;
    padding: var(--s6) var(--s3); border-top: 0; border-right: 1px solid var(--line); background: var(--surface);
  }
  nav::before { content: "Pinch"; padding: 0 var(--s3) var(--s5); font: 800 24px/1 var(--font); letter-spacing: -.03em; color: var(--accent); }
  nav a { flex: none; flex-direction: row; justify-content: flex-start; gap: var(--s3); min-height: 48px; padding: 0 var(--s3);
    border-radius: var(--r-control); font: 600 16px/1 var(--font); color: var(--text-2); }
  nav a.on { background: var(--accent-weak); color: var(--accent); }
  nav a.side-only { display: flex; margin-top: auto; }
  main, header.top { max-width: var(--col); }
  header.top.root { padding-top: var(--s8); }
  .hero { max-height: 340px; }
  .tiles { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .timer-pill, body.sub .timer-pill { bottom: var(--s5); left: calc(50% + var(--side) / 2); }
}
@media (hover: hover) {
  .list li a:hover, .links a:hover, .tiles a:hover, .quick a:hover, nav a:hover, .icon-btn:hover { background: var(--fill); }
  nav a.on:hover { background: var(--accent-weak); }
  :is(.btn, button):not(:disabled):hover { filter: brightness(.96); }
}
.stat-card .progress + .stat-sub { margin-top: var(--s3); }

/* ---- v32: dishes from the recipe book in the class log ---- */
.cooked-card { margin-top: var(--s3); }
.cooked-card h3 { margin: 0 0 var(--s3); }
.cooked-row + .cooked-row { border-top: 1px solid var(--line); padding-top: var(--s3); margin-top: var(--s3); }
.cooked-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); }
.cooked-head b { font: var(--t-row); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cooked-head input { flex: none; width: 104px; margin: 0; text-align: center; }
.cooked-row fieldset.rating { margin: var(--s2) 0 0; }
#allDishes { margin-top: var(--s2); }

/* ---- v34: card diagrams and your own cards ---- */
svg.card-art { display: block; width: 100%; height: auto; margin-top: var(--s2); fill: #4E5968; stroke: none; stroke-width: 1; } /* not the 24 px icon rule */
.card-photo { display: block; width: 100%; max-height: 260px; object-fit: cover; border-radius: var(--r-control); margin-top: var(--s2); }
.ref-item + .ref-item { border-top: 1px solid var(--line); margin-top: var(--s4); padding-top: var(--s4); }
.ref-item b { font: var(--t-row); }
.ref-item p { margin: var(--s1) 0 0; color: var(--text-2); }
.flash .card-art, .flash .card-photo { margin-top: 0; }

/* ---- v36: cooking mode shows every step ---- */
.cook-ings { margin: 0 0 var(--s4); }
.cook-ings .checklist { margin-top: var(--s2); }
.cook-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s2); }
.cook-steps li { background: var(--surface); border-radius: var(--r-card); padding: var(--s3) var(--s4); border: 2px solid transparent; scroll-margin: 96px; }
.cook-step { display: flex; align-items: flex-start; justify-content: flex-start; gap: var(--s3); width: 100%; min-height: 44px; padding: 0;
  background: none; color: var(--text); border-radius: 0; text-align: left; white-space: normal; overflow: visible; font: 500 17px/1.5 var(--font); }
.cook-step:active { transform: none; filter: none; }
.step-n { flex: none; display: grid; place-items: center; width: 28px; height: 28px; margin-top: 1px; border-radius: var(--r-pill); background: var(--fill); color: var(--text-2); font: 700 14px/1 var(--font); }
.cook-steps li.now { border-color: var(--accent); }
.cook-steps li.now .cook-step { font: 600 21px/1.45 var(--font); }
.cook-steps li.now .step-n { background: var(--accent); color: #fff; }
.cook-steps li.done .cook-step { color: var(--text-3); }
.cook-steps li.done .step-n { background: var(--accent-weak); color: var(--accent); }
.cook-steps .step-timers { margin: var(--s2) 0 0 40px; }
.cook-steps .cook-step { padding: 0; } /* not the narrow-phone button padding */

/* ---- v38: cooking mode timers sit with Back / Next, always on screen ---- */
.cook-dock { position: sticky; bottom: 0; z-index: 4; margin: var(--s4) calc(var(--gutter) * -1) 0;
  padding: var(--s3) var(--gutter) calc(var(--s3) + env(safe-area-inset-bottom)); background: linear-gradient(to bottom, transparent, var(--bg) 24px); }
.cook-dock .cook-nav { position: static; margin: 0; padding: 0; background: none; }
.cook-dock #cookTimers { margin-bottom: var(--s2); }
.cook-dock .timer { box-shadow: 0 2px 12px rgb(0 0 0 / .1); }
button.running { background: var(--accent); color: #fff; font-variant-numeric: tabular-nums; }

/* ---- v39: share choices and the Instagram caption ---- */
.share-opts svg { color: var(--accent); }
.hooks { display: grid; gap: var(--s2); margin: 0 0 var(--s4); }
.hooks label { display: flex; align-items: flex-start; gap: var(--s3); margin: 0; padding: var(--s3) var(--s4); border-radius: var(--r-control); background: var(--surface); font: 500 15px/1.45 var(--font); color: var(--text); cursor: pointer; }
.hooks label:has(input:checked) { background: var(--accent-weak); box-shadow: inset 0 0 0 2px var(--accent); }
.hooks input { margin-top: 3px; }
.ig-preview { margin-top: var(--s4); }
.ig-fold { white-space: normal; font: 400 15px/1.45 var(--font); margin: 0 0 var(--s3); }
.ig-lint { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; font: var(--t-sub); }
