/* Casa - house grocery inventory. Personal app, not BTZ-branded.
   Look (2026-11-02 redesign): "labelled storage zones". A light sage page,
   white cards, one colour + icon per place in the house (pantry terracotta,
   fridge teal, freezer ice blue, garage slate, supplements plum), and a
   three-bar stock meter for Have / Low / Out. Bricolage Grotesque for titles
   and numbers, Figtree for text. Sentence-case labels, rounded rectangles
   (never pills), tap targets 44 px and up. Phones: bottom bar. Computers
   (960 px and up): side rail, centred content, centred sheets. */

:root {
  --bg: #EEF2EF;
  --card: #FFFFFF;
  --ink: #13261D;
  --muted: #64726B;
  --faint: #93A099;
  --hair: #E1E7E3;
  --hair-2: #D3DBD6;

  --forest: #17402F;
  --forest-2: #22573F;
  --forest-tint: #DCE9E1;

  --have: #2E7D4F;  --have-tint: #E2F1E7;
  --low: #B86E0E;   --low-tint: #FBEDD8;
  --out: #C0392B;   --out-tint: #F9E0DC;
  --off: #D5DCD8;   /* an empty meter bar */

  --z-pantry: #B4572E;      --zt-pantry: #F6E4DA;
  --z-fridge: #1D7A86;      --zt-fridge: #DAEFF1;
  --z-freezer: #3767A8;     --zt-freezer: #E0E9F6;
  --z-garage: #56606B;      --zt-garage: #E5E8EB;
  --z-supplements: #7B4A92; --zt-supplements: #EEE3F3;

  --r: 16px;
  --r-sm: 11px;
  --shadow: 0 1px 2px rgba(19, 38, 29, .05), 0 6px 20px -8px rgba(19, 38, 29, .14);
  --shadow-lift: 0 2px 4px rgba(19, 38, 29, .06), 0 14px 32px -12px rgba(19, 38, 29, .28);

  --nav-h: 68px;
  --rail: 236px;
  --font: 'Figtree', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --display: 'Bricolage Grotesque', 'Figtree', system-ui, sans-serif;
  --ease: cubic-bezier(.2, .8, .2, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; }
body {
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.45;
  color: var(--ink);
  background: var(--bg);
  min-height: 100vh;
  min-height: 100dvh;
  padding-bottom: calc(var(--nav-h) + env(safe-area-inset-bottom, 0px) + 12px);
  font-feature-settings: 'tnum' 0;
}
a { color: var(--forest-2); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--forest) 45%, transparent); outline-offset: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.num { font-family: var(--display); font-variant-numeric: tabular-nums; }

/* ---------- Header ---------- */
.top {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 10px;
  padding: calc(12px + env(safe-area-inset-top, 0px)) 16px 12px;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s;
}
.top.scrolled { border-bottom-color: var(--hair); }
.top h1 { flex: 1; font: 700 24px/1.1 var(--display); letter-spacing: -.02em; }
.top .sub { color: var(--muted); }
.top a, .top button {
  color: var(--ink); background: transparent; border: 0;
  min-width: 44px; min-height: 44px; border-radius: var(--r-sm);
  display: inline-flex; align-items: center; justify-content: center; text-decoration: none;
}
.top a:hover, .top button:hover { background: rgba(19, 38, 29, .06); }
.top .back { margin-left: -8px; }
.top .back svg { width: 24px; height: 24px; }
.top .count { font: 600 14px var(--font); color: var(--muted); min-width: 0; }

.wrap { padding: 4px 16px 16px; max-width: 680px; margin: 0 auto; }
.wrap + .wrap { padding-top: 0; }

h2.sec {
  display: flex; align-items: baseline; gap: 8px;
  font: 700 18px/1.2 var(--display); letter-spacing: -.01em; color: var(--ink);
  margin: 26px 2px 10px;
}
h2.sec:first-child { margin-top: 8px; }
h2.sec .n, h2.sec span { font: 600 14px var(--font); color: var(--faint); }
h2.sec a.more { margin-left: auto; font: 600 14px var(--font); color: var(--forest-2); text-decoration: none; }
.sub { color: var(--muted); font-size: 14px; }

/* ---------- Cards and groups ---------- */
.card { background: var(--card); border-radius: var(--r); box-shadow: var(--shadow); padding: 16px; }
.group { background: var(--card); border-radius: var(--r); box-shadow: var(--shadow); overflow: hidden; }
.group + .group { margin-top: 12px; }
.group-head {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px; font: 700 16px var(--display); letter-spacing: -.01em;
  color: var(--z, var(--ink)); background: var(--zt, transparent);
}
.group-head .ic { width: 30px; height: 30px; border-radius: 9px; background: var(--card); display: inline-flex; align-items: center; justify-content: center; color: var(--z, var(--forest)); }
.group-head .ic svg { width: 18px; height: 18px; }
.group-head .n { margin-left: auto; font: 600 14px var(--font); color: var(--z, var(--muted)); opacity: .8; }
.group-sub { padding: 10px 16px 2px; font: 700 13px var(--font); color: var(--muted); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 50px; padding: 0 20px;
  border: 0; border-radius: var(--r-sm);
  background: var(--forest); color: #fff;
  font-weight: 700; font-size: 16px; text-decoration: none;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .12) inset, 0 6px 14px -8px rgba(23, 64, 47, .7);
  transition: transform .12s var(--ease), background .15s;
}
.btn:hover { background: var(--forest-2); }
.btn:active { transform: scale(.98); }
.btn.ghost { background: var(--card); color: var(--forest); box-shadow: inset 0 0 0 1.5px var(--hair-2); }
.btn.ghost:hover { background: #F7FAF8; }
.btn.wide { width: 100%; }
.btn.danger { background: var(--out); }
.btn.danger.ghost { background: var(--card); color: var(--out); box-shadow: inset 0 0 0 1.5px #EFC6C0; }
.btn:disabled { opacity: .55; cursor: wait; }
.btn.small { min-height: 38px; padding: 0 12px; font-size: 14px; box-shadow: inset 0 0 0 1.5px var(--hair-2); }

/* ---------- Stock meter: three bars, used everywhere ---------- */
.lvl {
  --b1: var(--off); --b2: var(--off); --b3: var(--off);
  display: inline-flex; align-items: center; gap: 7px; flex: none;
  font: 700 13px var(--font); padding: 5px 9px 5px 8px; border-radius: 8px; white-space: nowrap;
}
.lvl::before, .meter {
  content: ""; display: inline-block; width: 16px; height: 12px; flex: none;
  background:
    linear-gradient(var(--b1), var(--b1)) 0 100% / 4px 5px no-repeat,
    linear-gradient(var(--b2), var(--b2)) 6px 100% / 4px 8.5px no-repeat,
    linear-gradient(var(--b3), var(--b3)) 12px 100% / 4px 12px no-repeat;
}
.lvl.have { color: var(--have); background: var(--have-tint); --b1: var(--have); --b2: var(--have); --b3: var(--have); }
.lvl.low  { color: var(--low);  background: var(--low-tint);  --b1: var(--low); }
.lvl.out  { color: var(--out);  background: var(--out-tint);  --b1: #EDB8B1; --b2: #EDB8B1; --b3: #EDB8B1; }

.lvl-btns { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.lvl-btns button {
  --b1: var(--off); --b2: var(--off); --b3: var(--off);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  min-height: 76px; border-radius: var(--r-sm); border: 0; background: #F4F7F5;
  box-shadow: inset 0 0 0 1.5px var(--hair); font-weight: 700; font-size: 15px; color: var(--muted);
  transition: background .15s, box-shadow .15s, color .15s, transform .12s var(--ease);
}
.lvl-btns button::before {
  content: ""; width: 24px; height: 18px;
  background:
    linear-gradient(var(--b1), var(--b1)) 0 100% / 6px 7px no-repeat,
    linear-gradient(var(--b2), var(--b2)) 9px 100% / 6px 12px no-repeat,
    linear-gradient(var(--b3), var(--b3)) 18px 100% / 6px 18px no-repeat;
}
.lvl-btns button:active { transform: scale(.97); }
.lvl-btns button.have { --b1: var(--have); --b2: var(--have); --b3: var(--have); }
.lvl-btns button.low { --b1: var(--low); }
.lvl-btns button.have.on { background: var(--have-tint); box-shadow: inset 0 0 0 2px var(--have); color: var(--have); }
.lvl-btns button.low.on  { background: var(--low-tint);  box-shadow: inset 0 0 0 2px var(--low);  color: var(--low); }
.lvl-btns button.out.on  { background: var(--out-tint);  box-shadow: inset 0 0 0 2px var(--out);  color: var(--out); }

/* ---------- Tiles (home) ---------- */
.tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.tile {
  position: relative; display: flex; flex-direction: column; gap: 2px;
  text-decoration: none; color: var(--ink); background: var(--card);
  padding: 14px 14px 14px; min-height: 112px; border-radius: var(--r);
  box-shadow: var(--shadow); overflow: hidden;
  transition: transform .15s var(--ease), box-shadow .15s;
}
.tile:hover { transform: translateY(-2px); box-shadow: var(--shadow-lift); }
.tile .ic { width: 34px; height: 34px; border-radius: 10px; background: var(--zt, var(--forest-tint)); color: var(--z, var(--forest)); display: inline-flex; align-items: center; justify-content: center; margin-bottom: 8px; }
.tile .ic svg { width: 20px; height: 20px; }
.tile .n { font: 700 30px/1 var(--display); letter-spacing: -.02em; }
.tile .t { font-weight: 700; font-size: 15px; margin-top: 4px; }
.tile .h { font-size: 13px; color: var(--muted); }
.tile .flag { position: absolute; top: 14px; right: 12px; font: 700 12px var(--font); color: var(--low); background: var(--low-tint); padding: 3px 7px; border-radius: 7px; }
.tile .flag.out { color: var(--out); background: var(--out-tint); }

/* ---------- Lists ---------- */
.row {
  display: flex; align-items: center; gap: 12px;
  padding: 13px 16px; min-height: 60px; width: 100%;
  text-decoration: none; color: inherit; text-align: left;
  background: transparent; border: 0; border-bottom: 1px solid var(--hair);
  transition: background .12s;
}
.row:last-child { border-bottom: 0; }
button.row:hover, a.row:hover { background: #F7FAF8; }
.row .name { flex: 1; min-width: 0; font-weight: 600; font-size: 16px; }
.row .meta { display: block; margin-top: 2px; color: var(--muted); font-size: 13px; font-weight: 400; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .price { font: 700 16px var(--display); font-variant-numeric: tabular-nums; color: var(--ink); white-space: nowrap; }
.row.dim { opacity: .6; }
.row .dot { width: 10px; height: 10px; border-radius: 3px; background: var(--z, var(--faint)); flex: none; }

.check {
  width: 28px; height: 28px; flex: none; border-radius: 9px;
  box-shadow: inset 0 0 0 2px var(--hair-2); background: var(--card);
  display: inline-flex; align-items: center; justify-content: center; color: #fff;
  transition: background .15s, box-shadow .15s, transform .15s var(--ease);
}
.check svg { width: 16px; height: 16px; opacity: 0; }
.check.on { background: var(--have); box-shadow: none; }
.check.on svg { opacity: 1; }
button.row:active .check { transform: scale(.9); }

/* ---------- Forms ---------- */
.field { margin-bottom: 14px; }
.field label { display: block; font: 600 14px var(--font); color: var(--muted); margin-bottom: 6px; }
.in, .field input, .field select, .field textarea {
  width: 100%; min-height: 50px; padding: 11px 14px;
  border: 0; border-radius: var(--r-sm); background: var(--card);
  box-shadow: inset 0 0 0 1.5px var(--hair-2); font-size: 16px;
  transition: box-shadow .15s;
}
.field select, select.in { -webkit-appearance: none; appearance: none; padding-right: 36px;
  background: var(--card) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%2364726B' stroke-width='2'/%3E%3C/svg%3E") no-repeat right 14px center; }
.field textarea { min-height: 200px; line-height: 1.55; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus, .in:focus { box-shadow: inset 0 0 0 2px var(--forest); outline: none; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.searchbox { position: relative; }
.searchbox svg { position: absolute; left: 14px; top: 50%; width: 20px; height: 20px; transform: translateY(-50%); color: var(--faint); pointer-events: none; }
.searchbox .in { padding-left: 44px; box-shadow: var(--shadow); }
.searchbox .in:focus { box-shadow: inset 0 0 0 2px var(--forest), var(--shadow); }

/* ---------- Filters ---------- */
.filters { display: flex; gap: 8px; overflow-x: auto; padding: 10px 2px; margin: 0 -2px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.filters::-webkit-scrollbar { display: none; }
.filters button {
  flex: none; display: inline-flex; align-items: center; gap: 7px;
  min-height: 40px; padding: 0 14px; border: 0; border-radius: var(--r-sm);
  background: var(--card); box-shadow: inset 0 0 0 1.5px var(--hair); color: var(--muted);
  font: 600 14px var(--font); transition: background .15s, color .15s, box-shadow .15s;
}
.filters button .dot { width: 9px; height: 9px; border-radius: 3px; background: var(--z, var(--faint)); }
.filters button.on { background: var(--z, var(--forest)); color: #fff; box-shadow: none; }
.filters button.on .dot { background: rgba(255, 255, 255, .8); }

.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; background: #E2E8E4; padding: 3px; border-radius: 12px; gap: 3px; }
.seg button { min-height: 36px; border: 0; border-radius: 9px; background: transparent; font: 600 14px var(--font); color: var(--muted); }
.seg button.on { background: var(--card); color: var(--ink); box-shadow: 0 1px 3px rgba(19, 38, 29, .12); }

/* ---------- Sheet (item detail, receipt detail) ---------- */
.sheet-bg { position: fixed; inset: 0; background: rgba(13, 30, 22, .42); z-index: 40; opacity: 0; pointer-events: none; transition: opacity .2s; }
.sheet-bg.open { opacity: 1; pointer-events: auto; }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
  background: var(--card); border-radius: 22px 22px 0 0;
  padding: 10px 18px calc(18px + env(safe-area-inset-bottom, 0px));
  max-height: 90vh; overflow-y: auto; transform: translateY(105%);
  transition: transform .28s var(--ease); box-shadow: 0 -10px 40px rgba(13, 30, 22, .18);
}
.sheet::before { content: ""; display: block; width: 40px; height: 5px; border-radius: 3px; background: var(--hair-2); margin: 0 auto 14px; }
.sheet.open { transform: none; }
.sheet h3 { font: 700 26px/1.15 var(--display); letter-spacing: -.02em; margin-bottom: 4px; }
.sheet .kv { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; margin: 16px 0; background: var(--hair); border-radius: var(--r-sm); overflow: hidden; }
.sheet .kv div { font-size: 15px; font-weight: 600; background: #F7FAF8; padding: 10px 12px; }
.sheet .kv b { display: block; font: 500 12px var(--font); color: var(--muted); margin-bottom: 2px; }
.sheet details { border-top: 1px solid var(--hair); }
.sheet details summary { list-style: none; display: flex; align-items: center; justify-content: space-between; cursor: pointer; font-weight: 700; padding: 14px 0; color: var(--ink); }
.sheet details summary::-webkit-details-marker { display: none; }
.sheet details summary::after { content: ""; width: 10px; height: 10px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg) translateY(-3px); transition: transform .2s; }
.sheet details[open] summary::after { transform: rotate(225deg) translateY(-3px); }
.sheet .zone { display: inline-flex; align-items: center; gap: 6px; font: 700 13px var(--font); color: var(--z); background: var(--zt); padding: 4px 9px; border-radius: 8px; margin-bottom: 10px; }
.sheet .zone svg { width: 15px; height: 15px; }

/* ---------- Messages ---------- */
.msg { padding: 12px 14px; border-radius: var(--r-sm); margin: 12px 0; font-size: 15px; display: none; }
.msg.show { display: block; }
.msg.err { background: var(--out-tint); color: #8E241A; }
.msg.ok { background: var(--have-tint); color: #1F5E39; }
.msg.info { background: var(--forest-tint); color: var(--ink); }
.msg.warn { background: var(--low-tint); color: #7A4A08; }
.empty { text-align: center; color: var(--muted); padding: 40px 20px; background: var(--card); border-radius: var(--r); box-shadow: var(--shadow); }
.empty b { display: block; color: var(--ink); font: 700 20px var(--display); margin-bottom: 6px; }

#toast {
  position: fixed; left: 50%; bottom: calc(var(--nav-h) + env(safe-area-inset-bottom, 0px) + 16px);
  transform: translate(-50%, 12px); opacity: 0; pointer-events: none;
  max-width: calc(100% - 32px); background: var(--ink); color: #fff;
  padding: 12px 18px; border-radius: 12px; z-index: 60; font-weight: 600; font-size: 15px;
  box-shadow: var(--shadow-lift); transition: opacity .2s, transform .25s var(--ease);
}
#toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Navigation: bottom bar on phones ---------- */
.nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  height: calc(var(--nav-h) + env(safe-area-inset-bottom, 0px));
  padding: 0 6px env(safe-area-inset-bottom, 0px);
  background: color-mix(in srgb, var(--card) 92%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(16px); backdrop-filter: saturate(1.4) blur(16px);
  border-top: 1px solid var(--hair);
  display: grid; grid-template-columns: repeat(5, 1fr);
}
.nav .brand, .nav .foot, .nav .rail { display: none; }
.nav a {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  text-decoration: none; color: var(--faint); font: 600 11.5px var(--font);
}
.nav a svg { width: 24px; height: 24px; }
.nav a.on { color: var(--forest); }
.nav a.on::before { content: ""; position: absolute; top: 0; width: 28px; height: 3px; border-radius: 0 0 3px 3px; background: var(--forest); }
.nav a.add .lbl { display: none; }
.nav a.add .ic {
  width: 50px; height: 50px; border-radius: 15px; background: var(--forest); color: #fff;
  display: flex; align-items: center; justify-content: center; margin-top: -18px;
  box-shadow: 0 8px 18px -6px rgba(23, 64, 47, .65); transition: transform .15s var(--ease);
}
.nav a.add:active .ic { transform: scale(.94); }
.nav a.add.on::before { display: none; }

/* ---------- Tables ---------- */
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { text-align: left; font: 600 13px var(--font); color: var(--muted); padding: 8px 6px; border-bottom: 1px solid var(--hair-2); }
.tbl td { padding: 10px 6px; border-bottom: 1px solid var(--hair); vertical-align: top; }
.tbl tr:last-child td { border-bottom: 0; }
.tag { display: inline-flex; align-items: center; font: 700 12px var(--font); padding: 3px 8px; border-radius: 7px; background: var(--forest-tint); color: var(--forest); }
.tag.new { background: var(--low-tint); color: var(--low); }
.tag.skip { background: #ECEFED; color: var(--muted); }

.money { font: 800 40px/1 var(--display); letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.bar { height: 8px; background: #E6ECE8; border-radius: 4px; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--forest); border-radius: 4px; transform-origin: left; animation: grow .7s var(--ease) both; }
@keyframes grow { from { transform: scaleX(0); } }

.thumbs { display: flex; gap: 8px; flex-wrap: wrap; margin: 10px 0; }
.thumbs img { width: 76px; height: 100px; object-fit: cover; border-radius: 10px; box-shadow: var(--shadow); }

/* Gentle page entrance: content rises in, staggered. */
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }
.rise > * { animation: rise .45s var(--ease) both; }
.rise > *:nth-child(2) { animation-delay: .04s; }
.rise > *:nth-child(3) { animation-delay: .08s; }
.rise > *:nth-child(4) { animation-delay: .12s; }
.rise > *:nth-child(5) { animation-delay: .16s; }
.rise > *:nth-child(n+6) { animation-delay: .2s; }

@media (min-width: 640px) {
  .tiles { grid-template-columns: repeat(3, 1fr); }
}

/* ---------- Computers: side rail ---------- */
@media (min-width: 960px) {
  body { padding-bottom: 0; padding-left: var(--rail); }
  .top { padding: 22px 32px 14px; }
  .top h1 { font-size: 30px; }
  .wrap { max-width: 760px; padding: 4px 32px 48px; margin: 0; }
  .nav {
    top: 0; bottom: 0; right: auto; width: var(--rail); height: auto;
    display: flex; flex-direction: column; gap: 4px; padding: 22px 14px;
    border-top: 0; border-right: 1px solid var(--hair); background: var(--card);
  }
  .nav .brand { display: flex; align-items: center; gap: 10px; padding: 2px 10px 22px; font: 800 22px var(--display); letter-spacing: -.02em; color: var(--ink); text-decoration: none; }
  .nav .brand .mk { width: 34px; height: 34px; border-radius: 10px; background: var(--forest); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 18px; }
  .nav a { flex-direction: row; justify-content: flex-start; gap: 12px; min-height: 46px; padding: 0 12px; border-radius: var(--r-sm); font-size: 15px; color: var(--muted); }
  .nav a:hover { background: #F3F6F4; color: var(--ink); }
  .nav a.on { background: var(--forest-tint); color: var(--forest); }
  .nav a.on::before { display: none; }
  .nav a svg { width: 22px; height: 22px; }
  .nav a.add { order: -1; margin-bottom: 10px; background: var(--forest); color: #fff; justify-content: center; }
  .nav a.add:hover { background: var(--forest-2); color: #fff; }
  .nav a.add .ic { width: auto; height: auto; margin: 0; background: transparent; box-shadow: none; }
  .nav a.add .lbl { display: inline; }
  .nav a.add.on { background: var(--forest-2); color: #fff; }
  .nav .rail { display: flex; }
  .nav .foot { display: flex; margin-top: auto; }
  .nav .brand { order: -2; }
  #toast { bottom: 28px; margin-left: calc(var(--rail) / 2); }
  .sheet { left: var(--rail); right: 0; width: min(600px, calc(100% - var(--rail) - 48px)); margin: 0 auto; bottom: 24px; border-radius: 22px; max-height: calc(100vh - 48px); transform: translateY(calc(100% + 40px)); }
  .sheet::before { display: none; }
  .tiles { grid-template-columns: repeat(3, 1fr); }
}

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