/* Forma — the recipe tin & the fridge
   Every workshop is an index card. The tin holds them all; the fridge holds your shortlist. */

:root {
  --ink: #2a2320;
  --ink-soft: #5a4d45;
  --paper: #fffcf2;
  --rule: #b9d3e6;
  --margin: #e98b86;
  --table: #f6e7c4;
  --gingham: rgba(204, 64, 52, .13);
  --tin: #8fae97;
  --tin-dark: #5f8169;
  --tin-rim: #c9dccd;
  --enamel: #eef3ec;
  --chrome: #c7ccd0;
  --focus: #1b5fd6;

  /* deep enough for white label text (AA) */
  --baking: #95600c;
  --ceramics: #3f6688;
  --floristry: #b0500a;
  --painting: #a62c61;

  --slab: "Rockwell", "Rockwell Nova", "Roboto Slab", "Clarendon", "Iowan Old Style", Georgia, serif;
  --type: "American Typewriter", "Courier Prime", "Courier New", ui-monospace, monospace;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --hand: "Bradley Hand", "Segoe Print", "Marker Felt", "Comic Sans MS", cursive;
  --round: "Arial Rounded MT Bold", "Helvetica Rounded", "Nunito", "Trebuchet MS", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  color: var(--ink);
  font: 17px/1.5 var(--serif);
  background-color: var(--table);
  /* oilcloth gingham */
  background-image:
    repeating-linear-gradient(0deg, var(--gingham) 0 22px, transparent 22px 44px),
    repeating-linear-gradient(90deg, var(--gingham) 0 22px, transparent 22px 44px);
  min-height: 100vh;
}
img { display: block; max-width: 100%; height: auto; }
button, input, select { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }

.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip {
  position: absolute; left: 12px; top: -60px; z-index: 10;
  background: var(--ink); color: var(--paper); padding: 10px 14px; border-radius: 8px;
}
.skip:focus { top: 12px; }

/* ---------- header: fridge-magnet letters ---------- */
.kitchen-top {
  max-width: 1380px; margin: 0 auto; padding: 28px 32px 8px;
  display: flex; align-items: flex-end; gap: 36px; flex-wrap: wrap;
}
.magnets { margin: 0; line-height: 1; }
.magnet-word { display: inline-flex; gap: 4px; }
.mag {
  display: inline-block;
  font: 900 clamp(56px, 8vw, 104px)/1 var(--round);
  letter-spacing: -.02em;
  transform: rotate(var(--r, 0deg)) translateY(var(--y, 0));
  text-shadow: 0 2px 0 rgba(0,0,0,.18), 0 6px 0 rgba(0,0,0,.12), 0 10px 14px rgba(0,0,0,.18);
  transition: transform .25s cubic-bezier(.3,1.6,.5,1);
}
.mag::selection { background: transparent; }
.m1 { color: var(--painting);  --r: -6deg; }
.m2 { color: var(--ceramics);  --r: 5deg;  --y: 6px; }
.m3 { color: var(--baking);    --r: -3deg; --y: -2px; }
.m4 { color: #3e8a5a;          --r: 7deg;  --y: 4px; }
.m5 { color: var(--floristry); --r: -8deg; }
.magnets:hover .mag { --r: 0deg; --y: -4px; }

.tagline {
  margin: 0 0 12px; max-width: 520px;
  font: 700 clamp(20px, 2.1vw, 26px)/1.2 var(--slab);
}
.tagline-note {
  display: block; margin-top: 6px;
  font: 400 16px/1.45 var(--serif); color: var(--ink-soft);
}

/* ---------- layout ---------- */
.kitchen {
  max-width: 1380px; margin: 0 auto; padding: 16px 32px 40px;
  display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 36px; align-items: start;
}

/* ---------- the tin ---------- */
.tin-wrap { min-width: 0; }
.tin-lid {
  display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  margin-bottom: 10px;
}
.tin-title { margin: 0; font: 700 30px/1.1 var(--slab); }
.tin-count { margin: 0; font: 15px var(--type); color: var(--ink-soft); }

.tin-controls {
  display: grid; grid-template-columns: minmax(200px, 1.6fr) 1fr 1fr auto; gap: 12px 14px; align-items: end;
  background: var(--paper);
  border: 2px solid var(--ink);
  border-radius: 14px;
  padding: 14px 16px;
  box-shadow: 4px 4px 0 var(--ink);
  margin-bottom: 26px;
}
.field { display: grid; gap: 4px; min-width: 0; }
.field label, .field-label {
  font: 700 13px/1.2 var(--type); text-transform: uppercase; letter-spacing: .06em; color: var(--ink-soft);
}
.field input, .field select {
  width: 100%; min-height: 44px; padding: 8px 12px;
  border: 2px solid var(--ink); border-radius: 10px;
  background: #fff; font-size: 16px;
}
.field select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%), linear-gradient(135deg, var(--ink) 50%, transparent 50%);
  background-position: calc(100% - 18px) 55%, calc(100% - 12px) 55%;
  background-size: 6px 6px; background-repeat: no-repeat; padding-right: 30px;
}
.field input::placeholder { color: #8a7d73; font-style: italic; }

.fridge-toggle {
  display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 6px 14px 6px 8px;
  border: 2px solid var(--ink); border-radius: 999px; background: var(--enamel); cursor: pointer;
  font: 700 15px/1.2 var(--slab); white-space: nowrap;
}
.toggle-magnet {
  width: 28px; height: 28px; border-radius: 50%; flex: none;
  background: radial-gradient(circle at 35% 30%, #fff 0 12%, #9aa3a8 13% 60%, #6c757a 61%);
  box-shadow: inset 0 -2px 0 rgba(0,0,0,.2);
  transition: transform .2s, background .2s;
}
.fridge-toggle[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.fridge-toggle[aria-pressed="true"] .toggle-magnet {
  background: radial-gradient(circle at 35% 30%, #fff 0 12%, #f05a4a 13% 60%, #b52e22 61%);
  transform: rotate(-20deg) scale(1.08);
}

/* divider tabs sticking up out of the tin */
.dividers {
  display: flex; gap: 6px; padding: 6px 22px 0; position: relative; z-index: 2; margin-bottom: -2px;
  overflow-x: auto; overflow-y: hidden; scrollbar-width: none;
}
.divider-tab:focus-visible { outline-offset: -6px; }
.divider-tab {
  flex: none; cursor: pointer;
  padding: 8px 18px 14px; min-height: 44px;
  border: 2px solid var(--ink); border-bottom: 0; border-radius: 12px 12px 0 0;
  background: var(--paper); font: 700 14px var(--type); letter-spacing: .04em;
  transform: translateY(10px); transition: transform .18s ease;
}
.divider-tab[data-cat="Baking"]    { background: #f6dfac; }
.divider-tab[data-cat="Ceramics"]  { background: #cfdeeb; }
.divider-tab[data-cat="Floristry"] { background: #fbd2ad; }
.divider-tab[data-cat="Painting"]  { background: #f3c4d8; }
.divider-tab:hover { transform: translateY(4px); }
.divider-tab[aria-pressed="true"] { transform: translateY(0); box-shadow: 0 -3px 0 var(--ink) inset; }

.tin {
  position: relative;
  background:
    radial-gradient(ellipse at 20% 0%, rgba(255,255,255,.35), transparent 55%),
    linear-gradient(180deg, var(--tin) 0%, var(--tin-dark) 100%);
  border: 2px solid var(--ink);
  border-radius: 18px;
  padding: 34px 26px 38px;
  box-shadow: inset 0 0 0 8px var(--tin-rim), inset 0 14px 30px rgba(0,0,0,.25), 6px 8px 0 var(--ink);
  min-height: 360px;
}
/* stencilled label on the tin */
.tin::after {
  content: "FORMA · RECIPES · OCT 2026";
  position: absolute; right: 26px; bottom: 10px;
  font: 700 12px var(--type); letter-spacing: .3em; color: rgba(255,255,255,.55);
}

.cards {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 30px 26px;
}

/* ---------- index card ---------- */
.card {
  --tone: var(--baking);
  position: relative;
  background:
    linear-gradient(90deg, transparent 0 34px, var(--margin) 34px 36px, transparent 36px),
    repeating-linear-gradient(180deg, transparent 0 27px, var(--rule) 27px 28px),
    var(--paper);
  background-position: 0 0, 0 12px, 0 0;
  border-radius: 4px;
  box-shadow: 0 1px 0 rgba(0,0,0,.08), 0 10px 22px rgba(30,20,10,.28);
  transform: rotate(var(--tilt));
  transition: transform .3s cubic-bezier(.3,1.4,.5,1), box-shadow .3s;
  cursor: pointer;
}
.cards.shuffle .card {
  animation: file-in .5s cubic-bezier(.2,1.2,.4,1) backwards;
  animation-delay: calc(var(--i) * 45ms);
}
.card:hover, .card:focus-within {
  transform: rotate(0deg) translateY(-12px);
  box-shadow: 0 1px 0 rgba(0,0,0,.08), 0 22px 34px rgba(30,20,10,.32);
  z-index: 1;
}
@keyframes file-in { from { opacity: 0; transform: translateY(40px) rotate(var(--tilt)); } }

.tone-baking    { --tone: var(--baking); }
.tone-ceramics  { --tone: var(--ceramics); }
.tone-floristry { --tone: var(--floristry); }
.tone-painting  { --tone: var(--painting); }

.card-tab {
  position: absolute; top: -14px; left: 48px;
  background: var(--tone); color: #fff;
  font: 700 12px/1 var(--type); letter-spacing: .08em; text-transform: uppercase;
  padding: 6px 12px 8px; border-radius: 8px 8px 0 0;
}
.card-magnet {
  position: absolute; top: -12px; right: 16px; z-index: 2;
  width: 34px; height: 34px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff 0 12%, #f05a4a 13% 60%, #b52e22 61%);
  box-shadow: 0 4px 6px rgba(0,0,0,.3);
}
.card-photo {
  margin: 0; padding: 12px 12px 0 46px;
}
.card-photo img {
  width: 100%; aspect-ratio: 16 / 9; object-fit: cover;
  border: 5px solid #fff; box-shadow: 0 2px 6px rgba(0,0,0,.2);
  filter: saturate(.92) contrast(1.02);
}
.card-body { padding: 8px 16px 16px 46px; }
.card-no { margin: 4px 0 0; font: 12px var(--type); color: var(--ink-soft); letter-spacing: .08em; }
.card-title { margin: 2px 0 4px; font: 700 24px/1.12 var(--slab); }
.open {
  all: unset; cursor: pointer;
  background-image: linear-gradient(var(--tone), var(--tone));
  background-size: 0 3px; background-repeat: no-repeat; background-position: 0 100%;
  transition: background-size .25s;
}
.open::after { content: ""; position: absolute; inset: 0; border-radius: 4px; }
.card:hover .open { background-size: 100% 3px; }
.open:focus-visible { outline: none; }
.open:focus-visible::after { outline: 3px solid var(--focus); outline-offset: 4px; }
.card-summary {
  margin: 0 0 10px; font-size: 15.5px; line-height: 28px; color: var(--ink-soft);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.card-facts {
  margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 6px 12px;
  font: 14px/1.3 var(--type);
}
.card-facts dt { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-soft); }
.card-facts dd { margin: 0; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.card-facts .price { font: 700 20px var(--slab); }
.past {
  font: 700 10px var(--type); text-transform: uppercase; letter-spacing: .06em;
  color: #9b2b20; border: 1.5px solid currentColor; padding: 1px 4px; border-radius: 3px; transform: rotate(-3deg);
}
.card-pull {
  position: absolute; right: 14px; bottom: 6px; margin: 0;
  font: 15px var(--hand); color: var(--tone); opacity: 0; transition: opacity .2s;
}
.card:hover .card-pull, .card:focus-within .card-pull { opacity: 1; }

/* kitchen timer dial */
.timer {
  display: inline-grid; place-items: center; flex: none; border-radius: 50%;
  background: conic-gradient(var(--tone) 0 var(--pct), #e8e1d2 var(--pct) 100%);
  border: 2px solid var(--ink); position: relative;
}
.timer-s { width: 20px; height: 20px; }
.timer-m { width: 30px; height: 30px; vertical-align: middle; margin-left: 4px; }
.timer-face { width: 40%; height: 40%; border-radius: 50%; background: var(--paper); border: 1.5px solid var(--ink); }

/* empty tin */
.empty {
  max-width: 520px; margin: 20px auto; text-align: center; padding: 34px 24px 28px;
  background: var(--paper); color: var(--ink);
  border: 2px dashed var(--ink); border-radius: 6px; transform: rotate(-1.2deg);
  box-shadow: 0 12px 24px rgba(0,0,0,.25);
}
.empty[hidden] { display: none; }
.empty-big { margin: 0 0 6px; font: 700 28px/1.2 var(--slab); }
.empty-why { margin: 0 auto 18px; max-width: 460px; font: 15px/1.5 var(--type); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 8px 18px; cursor: pointer;
  border: 2px solid var(--ink); border-radius: 999px;
  font: 700 15px/1.2 var(--slab);
  box-shadow: 3px 3px 0 var(--ink);
  transition: transform .12s, box-shadow .12s;
}
.btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
.btn-ink { background: var(--paper); color: var(--ink); }

/* ---------- the fridge (shortlist) ---------- */
.fridge-wrap { position: sticky; top: 20px; }
.fridge {
  position: relative;
  min-height: 560px;
  padding: 26px 22px 24px 22px;
  background:
    linear-gradient(100deg, rgba(255,255,255,.75) 0 8%, transparent 22%),
    linear-gradient(180deg, #f5f8f3, var(--enamel) 60%, #dfe7dd);
  border: 2px solid var(--ink);
  border-radius: 34px 34px 18px 18px;
  box-shadow: 6px 8px 0 var(--ink), inset 0 -10px 0 rgba(0,0,0,.05);
}
/* freezer door seam */
.fridge::before {
  content: ""; position: absolute; left: 0; right: 0; top: 118px;
  border-top: 2px solid var(--ink); box-shadow: 0 2px 0 rgba(255,255,255,.8);
}
.fridge-handle {
  position: absolute; left: 12px; top: 136px; width: 12px; height: 120px; border-radius: 8px;
  background: linear-gradient(90deg, #8d959a, #f3f5f6 40%, var(--chrome));
  border: 2px solid var(--ink);
}
.fridge-title {
  margin: 0 0 54px; font: 700 26px/1.05 var(--slab);
}
.fridge-sub { display: block; font: 18px var(--hand); color: var(--ink-soft); font-weight: 400; transform: rotate(-2deg); }
.fridge-notes {
  list-style: none; margin: 0; padding: 0 0 0 18px;
  display: grid; grid-template-columns: 1fr 1fr; gap: 22px 12px;
}
.note {
  --tone: var(--baking);
  position: relative; transform: rotate(var(--tilt));
}
.note.bump { animation: clack .5s cubic-bezier(.3,1.8,.5,1); }
@keyframes clack {
  0% { transform: translateY(-40px) rotate(14deg) scale(1.1); opacity: 0; }
  70% { transform: translateY(2px) rotate(calc(var(--tilt) - 3deg)); opacity: 1; }
}
.note-magnet {
  position: absolute; top: -10px; left: 50%; margin-left: -12px; z-index: 1;
  width: 24px; height: 24px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff 0 12%, var(--tone) 13% 62%, rgba(0,0,0,.35) 63%), var(--tone);
  box-shadow: 0 3px 4px rgba(0,0,0,.35);
}
.note-btn {
  all: unset; box-sizing: border-box; cursor: pointer; display: grid; gap: 2px; width: 100%;
  padding: 18px 10px 10px; min-height: 108px;
  background: var(--paper); border-top: 6px solid var(--tone);
  box-shadow: 0 6px 12px rgba(0,0,0,.18);
  transition: transform .2s;
}
.note-btn:hover { transform: translateY(-3px) rotate(-1deg); }
.note-btn:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.note-date { font: 12px var(--type); text-transform: uppercase; letter-spacing: .06em; color: var(--ink-soft); }
.note-date b { font: 700 22px/1 var(--slab); color: var(--ink); margin-right: 4px; }
.note-title { font: 700 16px/1.15 var(--slab); }
.note-meta { font: 12.5px var(--type); color: var(--ink-soft); }
.fridge-empty {
  margin: 0 0 0 18px; padding: 16px; font: 17px/1.4 var(--hand); color: var(--ink-soft);
  border: 2px dashed #aab8ad; border-radius: 12px; transform: rotate(-1deg);
}
.fridge-empty[hidden] { display: none; }
.fridge-tally:empty { display: none; }
.fridge-tally {
  margin: 28px 0 0 18px; padding: 12px 14px 10px;
  background:
    repeating-linear-gradient(180deg, transparent 0 21px, #e9dcc0 21px 22px), #fffaf0;
  border: 1.5px solid #d9c9a6;
  font: 14px/22px var(--type);
  transform: rotate(.8deg);
  box-shadow: 0 4px 8px rgba(0,0,0,.12);
}
.tally-line { margin: 0; display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.tally-sum { margin: 4px 0 0; }
.tally-sum b { font: 700 20px var(--slab); }
.tally-sum span { display: block; font-size: 12px; color: var(--ink-soft); }

/* ---------- pulled card (detail dialog) ---------- */
.recipe {
  --tone: var(--baking);
  border: 0; padding: 0; background: transparent; color: var(--ink);
  width: min(960px, calc(100vw - 24px));
  max-width: none; max-height: calc(100dvh - 24px);
  overflow: visible;
}
.recipe::backdrop {
  background: rgba(42, 35, 32, .6);
  backdrop-filter: blur(3px);
}
.recipe-card {
  position: relative;
  max-height: calc(100dvh - 24px); overflow: auto;
  background:
    linear-gradient(90deg, transparent 0 54px, var(--margin) 54px 56px, transparent 56px),
    repeating-linear-gradient(180deg, transparent 0 31px, var(--rule) 31px 32px),
    var(--paper);
  background-attachment: local;
  border-radius: 6px;
  border-top: 14px solid var(--tone);
  box-shadow: 0 30px 60px rgba(0,0,0,.45);
  padding: 18px 28px 26px 74px;
}
.recipe[open] .recipe-card { animation: pull-out .45s cubic-bezier(.2,1.2,.4,1); }
@keyframes pull-out {
  from { transform: translateY(70px) rotate(-3deg) scale(.96); opacity: 0; }
}
.recipe-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.recipe-tab {
  font: 700 13px var(--type); letter-spacing: .1em; text-transform: uppercase;
  background: var(--tone); color: #fff; padding: 6px 12px; border-radius: 6px;
}
.btn-close { background: #fff; color: var(--ink); }
.recipe-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 32px; align-items: start; }
.recipe-photo {
  position: relative; margin: 8px 0 0; padding: 10px 10px 34px; background: #fff;
  box-shadow: 0 8px 18px rgba(0,0,0,.22); transform: rotate(-2.5deg);
}
.recipe-photo img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.recipe-photo figcaption {
  position: absolute; left: 12px; bottom: 8px; font: 15px var(--hand); color: var(--ink-soft);
}
.tape {
  position: absolute; width: 90px; height: 26px; background: rgba(240, 225, 170, .78);
  box-shadow: 0 1px 2px rgba(0,0,0,.15);
}
.tape-a { top: -12px; left: -18px; transform: rotate(-28deg); }
.tape-b { top: -10px; right: -16px; transform: rotate(24deg); }
.recipe-from { margin: 0; font: 18px var(--hand); color: var(--ink-soft); }
.recipe-from b { color: var(--ink); }
.recipe-title { margin: 0 0 6px; font: 700 clamp(34px, 4.4vw, 52px)/1.02 var(--slab); }
.stamp {
  display: inline-block; margin: 4px 0 6px; padding: 4px 10px;
  font: 700 13px var(--type); text-transform: uppercase; letter-spacing: .12em;
  color: #9b2b20; border: 2.5px solid currentColor; border-radius: 4px; transform: rotate(-4deg);
}
.recipe-h {
  margin: 18px 0 2px; font: 700 13px/32px var(--type); text-transform: uppercase; letter-spacing: .14em; color: var(--tone);
}
.ingredients { list-style: none; margin: 0; padding: 0; font-size: 17px; line-height: 32px; }
.ingredients li { display: flex; align-items: center; flex-wrap: wrap; gap: 0 8px; }
.qty { font: 700 17px var(--type); min-width: 3.4em; }
.seats { display: inline-flex; flex-wrap: wrap; gap: 3px; max-width: 120px; }
.seat { width: 8px; height: 8px; border-radius: 50%; background: var(--tone); }
.seat:first-child { background: var(--ink); box-shadow: 0 0 0 2px #fff, 0 0 0 3.5px var(--ink); }
.method { margin: 0; font-size: 19px; line-height: 32px; }
.serve { margin: 0; font: 16px/32px var(--type); }
.recipe-foot {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  margin-top: 26px; padding-top: 18px; border-top: 2px dashed #c9bfae;
}
.btn-magnet { background: #fff; color: var(--ink); font-size: 16px; padding: 10px 20px 10px 10px; }
.btn-magnet-dot {
  width: 30px; height: 30px; border-radius: 50%; flex: none;
  background: radial-gradient(circle at 35% 30%, #fff 0 12%, #9aa3a8 13% 60%, #6c757a 61%);
  transition: transform .25s;
}
.btn-magnet[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.btn-magnet[aria-pressed="true"] .btn-magnet-dot {
  background: radial-gradient(circle at 35% 30%, #fff 0 12%, #f05a4a 13% 60%, #b52e22 61%);
}
.btn-magnet.clack .btn-magnet-dot { animation: dot-clack .45s cubic-bezier(.3,1.8,.5,1); }
@keyframes dot-clack { 0% { transform: scale(1.6) rotate(-40deg); } }
.save-status { margin: 0; font: 17px var(--hand); color: var(--ink-soft); }

/* ---------- footer ---------- */
.kitchen-floor {
  max-width: 1380px; margin: 0 auto; padding: 0 32px 36px;
  font: 13px/1.5 var(--type); color: var(--ink-soft);
}
.kitchen-floor p {
  margin: 0; display: inline-block; background: rgba(255,252,242,.85); padding: 8px 12px; border-radius: 8px;
}

/* ---------- smaller screens ---------- */
@media (max-width: 1100px) {
  .tin-controls { grid-template-columns: 1fr 1fr; }
  .field-search { grid-column: 1 / -1; }
}
@media (max-width: 900px) {
  .kitchen { grid-template-columns: 1fr; gap: 26px; }
  /* the fridge becomes a strip of magnets above the tin */
  .fridge-wrap { position: static; order: -1; }
  .fridge { min-height: 0; padding: 16px 16px 16px 34px; border-radius: 22px; }
  .fridge::before { display: none; }
  .fridge-handle { top: 18px; left: 10px; height: calc(100% - 36px); width: 10px; }
  .fridge-title { margin: 0 0 18px; font-size: 22px; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
  .fridge-sub { display: inline; }
  .fridge-notes {
    display: flex; overflow-x: auto; gap: 14px; padding: 12px 4px 10px; margin: 0 -4px;
    scroll-snap-type: x proximity;
  }
  .note { flex: 0 0 150px; scroll-snap-align: start; }
  .fridge-empty, .fridge-tally { margin-left: 0; }
  .fridge-tally { margin-top: 12px; }
}
@media (max-width: 600px) {
  body { font-size: 16px; }
  .kitchen-top { padding: 18px 16px 4px; gap: 6px; }
  .mag { font-size: 64px; }
  .tagline { font-size: 20px; }
  .kitchen { padding: 12px 14px 30px; }
  .kitchen-floor { padding: 0 14px 28px; }
  .tin-title { font-size: 26px; }
  .tin-controls { grid-template-columns: 1fr 1fr; padding: 12px; gap: 10px; box-shadow: 3px 3px 0 var(--ink); }
  .field-toggle { grid-column: 1 / -1; }
  .fridge-toggle { width: 100%; justify-content: flex-start; white-space: normal; }
  .dividers { padding: 0 10px; }
  .divider-tab { padding: 8px 12px 14px; font-size: 13px; }
  .tin { padding: 26px 12px 34px; border-radius: 14px; box-shadow: inset 0 0 0 6px var(--tin-rim), inset 0 14px 30px rgba(0,0,0,.25), 4px 5px 0 var(--ink); }
  .tin::after { right: 14px; letter-spacing: .18em; font-size: 10px; }
  .cards { grid-template-columns: 1fr; gap: 28px; }
  .card { --tilt: 0deg !important; }
  .card:nth-child(odd) { transform: rotate(-1deg); }
  .card:nth-child(even) { transform: rotate(1deg); }
  .card:hover, .card:focus-within { transform: translateY(-6px); }
  .card-title { font-size: 22px; }

  .recipe { width: 100vw; max-height: 100dvh; margin: auto 0 0; }
  .recipe-card {
    max-height: 92dvh; border-radius: 16px 16px 0 0; padding: 14px 16px 22px 44px;
    background:
      linear-gradient(90deg, transparent 0 28px, var(--margin) 28px 30px, transparent 30px),
      repeating-linear-gradient(180deg, transparent 0 31px, var(--rule) 31px 32px),
      var(--paper);
    background-attachment: local;
  }
  .recipe-grid { grid-template-columns: 1fr; gap: 14px; }
  .recipe-photo { max-width: 260px; padding-bottom: 30px; }
  .recipe-photo img { aspect-ratio: 3 / 2; }
  .recipe-title { font-size: 34px; }
  .btn-close { padding: 6px 12px; font-size: 14px; }
  .btn-magnet { width: 100%; justify-content: flex-start; text-align: left; }
  .method { font-size: 17px; }
}

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