/*
  Al Dente
  Shared look and the Classic layout. Phones get a bottom tab bar; from 768px the
  tabs become a left sidebar, and from 1024px the library shows more columns.

  Four layouts, chosen from the burger menu or Settings → Layout, all use the
  palette at the top of this file: the Midfi Figma file's cream paper, tomato for
  actions, plum for dinners and mustard for highlights, in light and dark
  (Settings → Appearance, or the device). Classic is the earlier screen structure
  (Recipes, Cookbook, Community, Profile) styled by the component rules below;
  midfi.css adds the Midfi layout's screens and gives Midfi and Classic their
  finishing touches in Fraunces and DM Sans. Bistro has Classic's screens and the
  Bistro section at the end of this file: a French café menu in Baskerville and
  script, with a magazine-column Community. Cozy has Midfi's screens, restyled in
  cozy.css with plum, bold rounded type and round corners.
*/

:root {
  --mf-bg: #f8efdd;
  --mf-card: #fffaef;
  --mf-sand: #f0e3cc;
  --mf-photo: #ebddc4;
  --mf-photo-icon: #877a6d;
  --mf-line: #eadfc9;
  --mf-line-2: #ddcfb7;
  --mf-ink: #2a211e;
  --mf-soft: #6f6359;
  --mf-soft-2: #5f544a;
  --mf-chev: #b3a594;
  --mf-tomato: #c2442a;
  --mf-tomato-ink: #a83a22;
  --mf-tomato-tint: #fbede7;
  --mf-tomato-tint-2: #f6ddd6;
  --mf-plum: #733048;
  --mf-plum-ink: #733048;
  --mf-plum-tint: #f4e6eb;
  --mf-plum-tint-2: #eedce2;
  --mf-mustard: #e3aa4a;
  --mf-mustard-ink: #8a5a12;
  --mf-mustard-tint: #fbf1dd;
  --mf-mustard-tint-2: #f7e6c4;
  --mf-mustard-on-plum: #e8b55c;
  --mf-green: #516e36;
  --mf-on-green: #ffffff;
  /* The outline of anything you type in: 3:1 against the page and the field. */
  --mf-field: #8a7d70;
  --mf-green-tint: #e7eedf;
  --mf-on-color: #ffffff;
  --mf-sheet-shadow: 0 -4px 16px rgb(90 58 30 / 0.08);
  --mf-card-shadow: 0 3px 6px rgb(90 58 30 / 0.16);
  --mf-soft-shadow: 0 2px 8px rgb(90 58 30 / 0.07);
  --mf-serif: "Fraunces", ui-serif, Georgia, serif;
  --mf-sans: "DM Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mf-gutter: 24px;

  /* The component rules below read these. */
  --bg: var(--mf-bg);
  --surface: var(--mf-card);
  --surface-2: var(--mf-sand);
  --ink: var(--mf-ink);
  --ink-soft: var(--mf-soft);
  --line: var(--mf-line);
  --line-strong: var(--mf-line-2);
  --field-line: var(--mf-field);
  /* Text and small marks; Midfi buttons fill with the brighter --mf-tomato. */
  --accent: var(--mf-tomato-ink);
  --accent-ink: #fff;
  --accent-soft: var(--mf-tomato-tint);
  --herb: var(--mf-green);
  --herb-soft: var(--mf-green-tint);
  --brass: var(--mf-mustard-ink);
  --radius: 14px;
  --serif: var(--mf-serif);
  --sans: var(--mf-sans);
  --nav-h: 64px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --dock-gap: 0px;
  --scrim: rgb(42 33 30 / 0.4);
  --shadow: 0 3px 6px rgb(90 58 30 / 0.12);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --mf-bg: #231b15;
    --mf-card: #2d241d;
    --mf-sand: #3a2f26;
    --mf-photo: #43372d;
    --mf-photo-icon: #9a8b7a;
    --mf-line: #3e332a;
    --mf-line-2: #54473b;
    --mf-ink: #f7ecd8;
    --mf-soft: #cdbda4;
    --mf-soft-2: #bcad96;
    --mf-chev: #7d7064;
    --mf-tomato: #c84a2e;
    --mf-tomato-ink: #f08b70;
    --mf-tomato-tint: #3b2420;
    --mf-tomato-tint-2: #4a2a23;
    --mf-plum: #8e3d5b;
    --mf-plum-ink: #e3a0b9;
    --mf-plum-tint: #3a2430;
    --mf-plum-tint-2: #432a35;
    --mf-mustard-ink: #f0c47a;
    --mf-mustard-tint: #3d321e;
    --mf-mustard-tint-2: #4a3b20;
    --mf-mustard-on-plum: #f6d395;
    --mf-green: #95b574;
    --mf-green-tint: #2a3324;
    --mf-on-green: #1b1613;
    --mf-field: #ad9d86;
    /* Light coral reads on dark paper; what sits on it is dark. */
    --accent: var(--mf-tomato-ink);
    --accent-ink: #1b1613;
    --mf-sheet-shadow: 0 -4px 16px rgb(0 0 0 / 0.35);
    --mf-card-shadow: 0 3px 8px rgb(0 0 0 / 0.4);
    --mf-soft-shadow: 0 2px 8px rgb(0 0 0 / 0.3);
    --scrim: rgb(0 0 0 / 0.6);
    --shadow: 0 3px 8px rgb(0 0 0 / 0.4);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --mf-bg: #231b15;
  --mf-card: #2d241d;
  --mf-sand: #3a2f26;
  --mf-photo: #43372d;
  --mf-photo-icon: #9a8b7a;
  --mf-line: #3e332a;
  --mf-line-2: #54473b;
  --mf-ink: #f7ecd8;
  --mf-soft: #cdbda4;
  --mf-soft-2: #bcad96;
  --mf-chev: #7d7064;
  --mf-tomato: #c84a2e;
  --mf-tomato-ink: #f08b70;
  --mf-tomato-tint: #3b2420;
  --mf-tomato-tint-2: #4a2a23;
  --mf-plum: #8e3d5b;
  --mf-plum-ink: #e3a0b9;
  --mf-plum-tint: #3a2430;
  --mf-plum-tint-2: #432a35;
  --mf-mustard-ink: #f0c47a;
  --mf-mustard-tint: #3d321e;
  --mf-mustard-tint-2: #4a3b20;
  --mf-mustard-on-plum: #f6d395;
  --mf-green: #95b574;
  --mf-green-tint: #2a3324;
  --mf-on-green: #1b1613;
  --mf-field: #ad9d86;
  /* Light coral reads on dark paper; what sits on it is dark. */
  --accent: var(--mf-tomato-ink);
  --accent-ink: #1b1613;
  --mf-sheet-shadow: 0 -4px 16px rgb(0 0 0 / 0.35);
  --mf-card-shadow: 0 3px 8px rgb(0 0 0 / 0.4);
  --mf-soft-shadow: 0 2px 8px rgb(0 0 0 / 0.3);
    --scrim: rgb(0 0 0 / 0.6);
    --shadow: 0 3px 8px rgb(0 0 0 / 0.4);
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
/* The public view: visitors don't see controls that change things, and the editor
   doesn't see what's only for visitors (data-mode on <html>, set in core.js). */
:root[data-mode="view"] [data-edit],
:root:not([data-mode="view"]) [data-view-only] { display: none !important; }
::selection { background: var(--accent-soft); color: var(--ink); }

body {
  margin: 0;
  min-height: 100dvh;
  padding-bottom: calc(var(--nav-h) + var(--safe-b) + var(--dock-gap));
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.5 var(--sans);
  -webkit-font-smoothing: antialiased;
}
body.is-focus { padding-bottom: 0; }
body:has(.overlay) { overflow: hidden; }
h1, h2, h3, p, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
code { font-size: 0.9em; }

/* ---------- Text ---------- */

.page-title { font-family: var(--serif); font-size: 30px; font-weight: 700; line-height: 1.15; letter-spacing: -0.01em; }
.h1 { font-family: var(--serif); font-size: clamp(28px, 6vw, 44px); font-weight: 700; line-height: 1.12; letter-spacing: -0.015em; }
.h2 { font-family: var(--serif); font-size: 22px; font-weight: 700; line-height: 1.25; }
.h3 { font-size: 17px; font-weight: 700; line-height: 1.35; }
.lead { font-size: 17px; color: var(--ink-soft); }
.small { font-size: 14px; }
.muted { color: var(--ink-soft); }
.strong { font-weight: 700; }
.center { text-align: center; }
.danger { color: var(--accent); }
.u { padding: 0; border: 0; background: none; text-decoration: underline; text-underline-offset: 2px; }
.eyebrow { font-size: 13px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); }
.label { font-size: 14px; font-weight: 600; color: var(--ink-soft); }
.hint { font-size: 14px; color: var(--ink-soft); }
.big-emoji { width: 160px; height: 120px; border-radius: var(--radius); font-size: 0; }
.display { font-family: var(--serif); font-size: 44px; font-weight: 700; line-height: 1.05; letter-spacing: -0.02em; }
.quote { padding-left: 10px; border-left: 3px solid var(--line-strong); color: var(--ink-soft); font-size: 14px; white-space: pre-line; }

/* ---------- Layout helpers ---------- */

.row { display: flex; align-items: center; gap: 12px; }
.row-wrap { flex-wrap: wrap; gap: 8px; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.stack-sm { display: flex; flex-direction: column; gap: 8px; }
.section { display: flex; flex-direction: column; gap: 12px; }
.grow { flex: 1; min-width: 0; }
.spacer { flex: 1; }
.w-full { width: 100%; }
.self-start { align-self: flex-start; }
.center-items { align-items: center; }
.center-stack {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 32px 24px;
  text-align: center;
}
.center-stack > p { max-width: 340px; }
.center-stack > .stack,
.center-stack > .mini-card { max-width: 400px; }

/* ---------- Tab bar (sidebar on wide screens) ---------- */

.nav {
  position: fixed;
  z-index: 30;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  height: calc(var(--nav-h) + var(--safe-b));
  padding-bottom: var(--safe-b);
  border-top: 1px solid var(--line);
  background: var(--surface);
}
body.is-focus .nav { display: none; }
.nav-brand { display: none; }
.tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-soft);
}
.tab svg { width: 24px; height: 24px; flex: none; }
.tab.is-active { color: var(--accent); font-weight: 700; }

/* The burger that opens the layout picker (layout-menu.js). Midfi's sits in its
   header instead (midfi.css); both use these bars. */
.burger {
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  width: 56px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink-soft);
  font: inherit;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
}
.burger-bars { display: flex; flex-direction: column; justify-content: center; gap: 4px; width: 20px; height: 24px; }
.burger-bars span { height: 2px; border-radius: 1px; background: currentColor; transition: transform 0.2s, opacity 0.2s; }
.is-open .burger-bars span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.is-open .burger-bars span:nth-child(2) { opacity: 0; }
.is-open .burger-bars span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
.burger.is-open { color: var(--ink); }

/* The picker: one row per layout, with an "Aa" in that layout's type. */
.layout-menu {
  position: fixed;
  z-index: 45;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: min(360px, calc(100vw - 24px));
  /* Short phones scroll the menu instead of losing its top. */
  max-height: calc(100dvh - var(--nav-h) - var(--safe-b) - 32px);
  overflow-y: auto;
  padding: 14px;
  border: 1px solid var(--line-strong);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: 0 8px 28px rgb(42 33 30 / 0.18);
}
.layout-pick {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 10px;
  border: 1.5px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.layout-pick:hover { border-color: var(--ink-soft); }
.layout-pick.is-active { border-color: var(--accent); background: var(--accent-soft); }
.layout-pick .small { line-height: 1.35; }
.layout-menu .label:not(:first-child) { margin-top: 6px; }
.layout-menu .seg > * { padding-inline: 4px; white-space: nowrap; }
.layout-sample {
  flex: none;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: var(--bg);
  color: var(--ink);
  font-size: 24px;
}
.layout-sample-midfi { font-family: "Fraunces", ui-serif, Georgia, serif; }
.layout-sample-classic { font-family: "DM Sans", system-ui, sans-serif; font-weight: 600; }
.layout-sample-bistro { border: 1px solid var(--ink); border-radius: 2px; outline: 1px solid var(--accent); outline-offset: -5px; color: var(--accent); font-family: "Snell Roundhand", "Pinyon Script", "Apple Chancery", cursive; font-size: 26px; }

/* ---------- Screens and top bar ---------- */

.screen { display: flex; flex-direction: column; min-height: calc(100dvh - var(--nav-h) - var(--safe-b)); }
body.is-focus .screen { min-height: 100dvh; }
.pad { display: flex; flex-direction: column; gap: 16px; padding: 16px; }
.pad-fab { padding-bottom: 96px; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  flex: none;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 60px;
  padding: 8px 16px;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
}
.topbar-title {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  font-size: 17px;
  font-weight: 700;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.link { padding: 0; border: 0; background: none; color: var(--ink-soft); font-weight: 600; white-space: nowrap; }
.link.strong { color: var(--accent); font-weight: 700; }
.link:disabled { opacity: 0.45; }

/* The back arrow app.js adds to pages that don't have one. */
.topbar-back { display: grid; flex: none; place-items: center; width: 40px; height: 40px; margin-left: -8px; border-radius: 50%; color: var(--ink); }
.topbar-back svg { width: 22px; height: 22px; }
.topbar-back:hover { background: var(--surface-2); }

/* ---------- The opening page and signing up (start.js) ---------- */

.start { display: grid; place-items: center; min-height: 100dvh; padding: 48px 24px calc(48px + var(--safe-b)); }
.start-card { display: flex; flex-direction: column; align-items: center; width: min(380px, 100%); text-align: center; }
.start-logo { width: 156px; height: 70px; background: var(--ink); -webkit-mask: url(/midfi/logo.png) center / contain no-repeat; mask: url(/midfi/logo.png) center / contain no-repeat; }
.start-kicker { margin-top: 18px; color: var(--ink-soft); font-size: 12px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; }
.start-title { margin-top: 28px; color: var(--ink); font: 700 34px/1.15 var(--serif); letter-spacing: -0.01em; }
.start-lead { max-width: 30ch; margin-top: 12px; color: var(--ink-soft); font-size: 17px; line-height: 1.5; }
.start-actions { display: flex; flex-direction: column; gap: 12px; width: 100%; margin-top: 36px; text-align: left; }
.start-actions .btn { width: 100%; min-height: 52px; }
.start-actions .btn-text { min-height: 44px; }
.start-actions .field { display: flex; flex-direction: column; gap: 6px; }
.start-actions .small { text-align: center; }

/* A photo of what someone cooked, in a post. */
.post-photo { display: flex; flex-direction: column; gap: 8px; }
.post-photo img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 18px; background: var(--surface-2); }

/* A setting you switch on or off (Settings → Privacy and Notifications). */
.setting-row { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-top: 1px solid var(--line); cursor: pointer; }
.setting-row .row-sub { display: block; }

/* The footer under the main pages. */
.app-footer { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 28px 24px 36px; color: var(--ink-soft); font-size: 14px; text-align: center; }
body.is-focus .app-footer, body:has(.start) .app-footer { display: none; }
.app-footer-logo { width: 84px; height: 38px; background: currentColor; -webkit-mask: url(/midfi/logo.png) center / contain no-repeat; mask: url(/midfi/logo.png) center / contain no-repeat; }
.app-footer-tag { font-style: italic; }
.app-footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 18px; margin-top: 4px; }
.app-footer-links a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.app-footer-small { font-size: 12.5px; }

/* A photo in a comment, and the composer's photo button and preview. */
.comment-photo img { max-width: 260px; aspect-ratio: 4 / 3; margin-top: 6px; border-radius: 14px; }
.composer { flex-wrap: wrap; }
.comment-photo-pick { flex: none; min-width: 48px; padding: 0 12px; }
.comment-photo-preview { display: flex; align-items: center; gap: 10px; width: 100%; }
.comment-photo-preview[hidden] { display: none; }
.comment-photo-preview img { width: 64px; height: 48px; object-fit: cover; border-radius: 10px; }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 20px;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  background: var(--surface);
  font-weight: 600;
  text-align: center;
  white-space: nowrap;
  transition: transform 0.08s, background 0.15s, border-color 0.15s;
}
.btn:hover { background: var(--surface-2); }
.btn:active { transform: scale(0.98); }
.btn-primary { border-color: var(--accent); background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { border-color: var(--accent); filter: brightness(1.06); }
.btn-text { border-color: transparent; background: transparent; color: var(--ink-soft); }
.btn-text:hover { border-color: transparent; background: var(--surface-2); }
.btn-sm { min-height: 36px; padding: 0 14px; font-size: 14px; }
.btn.is-on { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.btn:disabled,
.btn.is-disabled { opacity: 0.45; pointer-events: none; }

/* ---------- Form fields ---------- */

.field { display: flex; flex-direction: column; gap: 6px; }
.input {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border: 1.5px solid var(--field-line);
  border-radius: 10px;
  background: var(--surface);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
textarea.input { padding: 12px 14px; line-height: 1.5; resize: vertical; }
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.input::placeholder { color: var(--ink-soft); }
.search { border-radius: 999px; }
.search-wrap { padding: 12px 16px 10px; }

input[type="checkbox"] { flex: none; width: 20px; height: 20px; margin: 0; accent-color: var(--herb); }
input[type="radio"] { flex: none; width: 20px; height: 20px; margin: 0; accent-color: var(--accent); }
.check-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  cursor: pointer;
}
.check-row:has(input:checked) { border-color: var(--herb); }

.dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 32px 20px;
  border: 2px dashed var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface);
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.dropzone.drag,
.dropzone:hover { border-color: var(--accent); background: var(--accent-soft); }
.uploads { display: flex; flex-wrap: wrap; gap: 10px; }
.upload {
  position: relative;
  display: grid;
  place-items: center;
  width: 92px;
  height: 92px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-2);
  font-size: 12px;
}
.upload img { width: 100%; height: 100%; object-fit: cover; }
.upload button { position: absolute; top: 4px; right: 4px; width: 22px; height: 22px; border: 0; border-radius: 50%; background: rgb(0 0 0 / 0.6); color: #fff; line-height: 1; }

/* ---------- Chips and pills ---------- */

.chips { display: flex; gap: 8px; padding: 0 16px; overflow-x: auto; scrollbar-width: none; }
.chips-top { padding-top: 12px; }
.chip {
  position: relative;
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 0 14px;
  border: 1.5px solid var(--line-strong);
  border-radius: 999px;
  background: var(--surface);
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
}
.chip.is-active,
.chip:has(input:checked) { border-color: var(--ink); background: var(--ink); color: var(--bg); }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.chip-dashed { border-style: dashed; background: transparent; }
.chip-sm { min-height: 32px; padding: 0 12px; }
.chip:disabled { opacity: 0.55; cursor: default; }
.pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--surface-2);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}
.stars { color: var(--brass); letter-spacing: 1px; }
.cat-tools { padding: 10px 16px 0; }

/* ---------- Recipe cards and thumbnails ---------- */

.cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 12px; }
.card { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.card:hover .thumb { filter: brightness(0.96); }
.card-title { font-family: var(--serif); font-size: 17px; font-weight: 600; line-height: 1.25; }
.card-meta { font-size: 13px; color: var(--ink-soft); }
.card-flag { align-self: flex-start; padding: 1px 8px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-size: 12px; font-weight: 600; }

/* Emoji shows until the photo loads, and stays if the photo fails. */
.thumb {
  position: relative;
  flex: none;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: var(--radius);
  font-size: 0;
}
/* Without a photo, a plate: a rim drawn inside the box, with the recipe's first letter on it. */
.thumb,
.big-emoji,
.hero-art {
  background-color: var(--surface-2);
  background-image: radial-gradient(closest-side, transparent calc(78% - 1px), var(--line-strong) calc(78% - 1px), var(--line-strong) 78%, transparent calc(78% + 1px));
}
.thumb::before {
  content: attr(data-initial);
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--accent);
  font-family: var(--serif);
  font-size: 44px;
  font-style: italic;
  line-height: 1;
}
.thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.thumb-card { width: 100%; aspect-ratio: 4 / 3; }
.thumb-hero { width: 100%; height: 200px; }
.thumb-hero:not(:has(img)) { height: 140px; }
.thumb-banner { width: 100%; height: 160px; }
.thumb-md { width: 64px; height: 64px; border-radius: 6px; }
.thumb-sm { width: 48px; height: 48px; border-radius: 6px; }
.thumb-square { width: 100%; aspect-ratio: 1; }
.thumb-card::before { font-size: 56px; }
.thumb-hero::before { font-size: 88px; }
.thumb-md::before { font-size: 30px; }
.thumb-sm::before { font-size: 24px; }

.fab {
  position: fixed;
  z-index: 25;
  right: 16px;
  bottom: calc(var(--nav-h) + var(--safe-b) + var(--dock-gap) + 16px);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 30px;
  line-height: 1;
}
.mini-card {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  text-align: left;
}
.box-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
  border: 1.5px solid var(--line-strong);
  border-radius: 16px;
  background: var(--surface);
}

/* ---------- Lists and sheets ---------- */

.list { display: flex; flex-direction: column; }
.list-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: none;
  text-align: left;
}
.row-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.row-title { font-weight: 700; }
.row-sub { font-size: 13px; color: var(--ink-soft); }
.chev { font-size: 22px; color: var(--ink-soft); }
.shape {
  flex: none;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--surface-2);
  font-size: 20px;
  font-weight: 700;
}
/* Icon squares stay plain gray; circles and dashed shapes keep their letter or +. */
.shape:not(.shape-circle):not(.shape-dashed) { font-size: 0; }
.shape-sm { width: 28px; height: 28px; border-radius: 8px; font-size: 14px; }
.shape-circle { border-radius: 50%; }
.shape-dashed { border: 2px dashed var(--line-strong); background: none; color: var(--ink-soft); }

.overlay {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overscroll-behavior: contain;
}
.scrim { position: absolute; inset: 0; border: 0; background: var(--scrim); }
.sheet {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 85dvh;
  overflow-y: auto;
  padding: 10px 16px calc(24px + var(--safe-b));
  border-radius: 20px 20px 0 0;
  background: var(--surface);
  animation: sheet-in 0.2s ease-out;
}
.sheet-handle { align-self: center; width: 40px; height: 5px; border-radius: 3px; background: var(--line-strong); }
@keyframes sheet-in { from { transform: translateY(24px); opacity: 0; } }

/* ---------- Importing ---------- */

.spinner {
  width: 56px;
  height: 56px;
  border: 5px solid var(--line);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.skel-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  max-width: 300px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.skel { height: 12px; border-radius: 6px; background: var(--surface-2); }
.skel-img { height: 120px; border-radius: 8px; }
.skel.w-80 { width: 80%; }
.skel.w-60 { width: 60%; }
.big-check {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--herb);
  color: var(--surface);
  font-size: 34px;
  font-weight: 700;
}
.banner {
  padding: 12px 14px;
  border-left: 4px solid var(--accent);
  border-radius: 6px;
  background: var(--accent-soft);
  font-size: 14px;
}

/* ---------- Recipe detail ---------- */

.source {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.desc { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; cursor: pointer; }
.desc.open { -webkit-line-clamp: unset; }
.stepper { display: flex; align-items: center; border: 1.5px solid var(--line-strong); border-radius: 999px; background: var(--surface); }
.stepper button { width: 40px; height: 36px; border: 0; background: none; font-size: 18px; font-weight: 700; }
.stepper button:disabled { opacity: 0.3; }
.stepper span { min-width: 96px; padding: 0 4px; font-size: 14px; text-align: center; }
.group-name { font-size: 13px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--herb); }
.ingredients label { display: flex; align-items: flex-start; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); cursor: pointer; }
.ingredients input { margin-top: 2px; }
.ingredients input:checked + span { color: var(--ink-soft); text-decoration: line-through; }
.qty { font-weight: 700; }
/* Amounts written into steps, so you don't have to look back at the list. */
.amt { padding: 0 3px; border-radius: 4px; background: var(--surface-2); font-weight: 700; white-space: nowrap; }
.eink .amt { padding: 0; background: none; font-weight: 800; }

/* From a video or post: the three places a recipe can be, and sorting its lines. */
.source-option { display: flex; flex-direction: column; gap: 8px; padding: 14px; border: 1.5px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.video-preview { width: 100%; max-height: 360px; border-radius: 8px; background: #000; }
.sort-list { display: flex; flex-direction: column; }
.sort-row { display: flex; flex-direction: column; gap: 8px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.sort-row.is-skip .sort-text { color: var(--ink-soft); text-decoration: line-through; }
.sort-row.is-ingredient .sort-text { font-weight: 600; }
.seg-sm { align-self: flex-start; }
.seg.seg-sm > * { min-height: 32px; padding: 0 12px; font-size: 12px; }

/* Steps | Ingredients tabs on phones; wider screens show both columns. */
.recipe-tabs { width: 100%; max-width: 420px; }
@media (max-width: 767px) {
  .detail-cols[data-pane="steps"] .pane-ingredients,
  .detail-cols[data-pane="ingredients"] .pane-steps { display: none; }
}
.steps { display: flex; flex-direction: column; gap: 6px; }
.steps li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px;
  border: 1.5px solid transparent;
  border-radius: var(--radius);
  font-size: 17px;
  line-height: 1.55;
  cursor: pointer;
  transition: background 0.15s, opacity 0.15s;
}
.steps li:hover { background: var(--surface); }
.steps li.current { border-color: var(--accent); background: var(--surface); box-shadow: var(--shadow); }
.steps li.done { opacity: 0.5; }
.step-num {
  flex: none;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-family: var(--serif);
  font-size: 15px;
  font-weight: 700;
}
.steps li.done .step-num { background: var(--herb-soft); color: var(--herb); font-size: 0; }
.steps li.done .step-num::after { content: "✓"; font-size: 15px; }
.notes { display: flex; flex-direction: column; gap: 8px; padding: 16px 18px; border-radius: var(--radius); background: var(--surface-2); }
.notes ul { padding-left: 18px; list-style: disc; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { padding: 3px 10px; border-radius: 999px; background: var(--herb-soft); color: var(--herb); font-size: 13px; }
.detail-cols { display: flex; flex-direction: column; gap: 28px; }
.detail-tools { padding-top: 8px; border-top: 1px solid var(--line); }
.actionbar {
  position: sticky;
  z-index: 15;
  bottom: calc(var(--nav-h) + var(--safe-b) + var(--dock-gap));
  display: flex;
  gap: 12px;
  margin-top: auto;
  padding: 12px 16px;
  border-top: 1px solid var(--line);
  background: var(--surface);
}
.actionbar .btn { flex: 1; padding: 0 12px; }

/* ---------- Cook mode ---------- */

.cook { background: var(--surface); }
.timerbar {
  flex: none;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  overflow-x: auto;
  background: var(--surface-2);
  scrollbar-width: none;
}
.timer {
  flex: none;
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 0 12px;
  border: 0;
  border-radius: 999px;
  background: var(--ink);
  color: var(--bg);
  font-size: 14px;
  white-space: nowrap;
}
.timer b { font-variant-numeric: tabular-nums; }
.timer.is-done { background: var(--accent); color: var(--accent-ink); animation: pulse 1s ease-in-out infinite alternate; }
@keyframes pulse { to { transform: scale(1.05); } }
.cook-steps { flex: 1; display: flex; flex-direction: column; gap: 12px; padding: 16px; }
.cook-step {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
  border: 1.5px solid var(--line-strong);
  border-radius: 16px;
  background: var(--bg);
}
.cook-step p { font-size: 20px; line-height: 1.5; }
.cook-step b { padding: 0 3px; border-radius: 4px; background: var(--accent-soft); }
.cook-foot {
  position: sticky;
  bottom: 0;
  flex: none;
  padding: 12px 16px calc(16px + var(--safe-b));
  border-top: 1px solid var(--line);
  background: var(--surface);
}

/* ---------- Community ---------- */

.posts { display: flex; flex-direction: column; gap: 20px; }
/* Visitors see how many likes a post has without a button to like it. */
.like-count { display: inline-flex; align-items: center; min-height: 36px; padding: 0 6px; color: var(--ink-soft); }
.post { display: flex; flex-direction: column; gap: 12px; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.caption { white-space: pre-line; }
/* Tappable author and recipe areas; the buttons beside them stay separate. */
.author { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; }
.byline { align-self: flex-start; display: inline-flex; align-items: center; gap: 8px; }
.mini-link { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; }
.thumb-link { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.author:hover .row-title,
.byline:hover b,
.mini-link:hover .row-title,
.thumb-link:hover .strong,
.comments a.strong:hover { text-decoration: underline; text-underline-offset: 2px; }
.avatar {
  flex: none;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--ink-soft);
  font-weight: 700;
}
.avatar.is-you { background: var(--accent-soft); color: var(--accent); }
.avatar { overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar-sm { width: 30px; height: 30px; font-size: 13px; }
.avatar-lg { width: 72px; height: 72px; font-size: 28px; }
.preview-list { display: flex; flex-direction: column; gap: 4px; font-size: 15px; }
.comments { display: flex; flex-direction: column; gap: 14px; }
.comments li { display: flex; align-items: flex-start; gap: 10px; }
.composer {
  position: sticky;
  z-index: 15;
  bottom: calc(var(--nav-h) + var(--safe-b) + var(--dock-gap));
  display: flex;
  gap: 8px;
  margin-top: auto;
  padding: 10px 16px;
  border-top: 1px solid var(--line);
  background: var(--surface);
}

/* ---------- Review: things the importer wasn't sure about ---------- */

.unsure {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 12px;
  border: 2px dashed var(--accent);
  border-radius: var(--radius);
  background: var(--accent-soft);
}
.tag-check {
  align-self: flex-start;
  padding: 1px 8px;
  border-radius: 4px;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 12px;
  font-weight: 700;
}
.transcript summary { cursor: pointer; }
.transcript .quote { margin-top: 8px; }

/* ---------- Ratings and collections ---------- */

.star-input { display: flex; gap: 2px; }
.star-input button { width: 40px; height: 40px; padding: 0; border: 0; background: none; color: var(--line-strong); font-size: 28px; line-height: 1; }
.star-input button.is-on { color: var(--brass); }
.star-input button:hover { transform: scale(1.1); }
.collection-row { padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }

/* ---------- Voice memo ---------- */

.recorder { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 20px 12px; border-radius: 16px; background: var(--surface-2); }
.record {
  display: grid;
  place-items: center;
  width: 76px;
  height: 76px;
  border: 0;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 6px var(--accent-soft);
}
.record span { width: 26px; height: 26px; border-radius: 50%; background: var(--accent-ink); transition: border-radius 0.15s; }
.record.is-recording { animation: pulse-ring 1.2s ease-in-out infinite; }
.record.is-recording span { border-radius: 4px; }
.record:disabled { opacity: 0.4; }
.recorder .h2 { font-variant-numeric: tabular-nums; }
@keyframes pulse-ring { 50% { box-shadow: 0 0 0 14px var(--accent-soft); } }

/* ---------- Cook-mode assistant ---------- */

.assistant { margin-top: 10px; }
.assistant summary { list-style: none; width: 100%; }
.assistant summary::-webkit-details-marker { display: none; }
.assistant-panel { display: flex; flex-direction: column; gap: 10px; padding-top: 12px; }
.bubbles { display: flex; flex-direction: column; gap: 8px; max-height: 40dvh; overflow-y: auto; }
.bubble { align-self: flex-start; max-width: 85%; padding: 10px 12px; border-radius: 14px; background: var(--surface-2); font-size: 15px; }
.bubble-me { align-self: flex-end; background: var(--accent-soft); }
.bubble.is-pending { color: var(--ink-soft); font-style: italic; }

/* ---------- First run ---------- */

.onb { flex: 1; display: flex; flex-direction: column; gap: 18px; width: 100%; max-width: 520px; margin: 0 auto; padding: 16px 24px 32px; }
.onb-foot { margin-top: auto; display: flex; flex-direction: column; gap: 12px; }
.hero-art {
  flex: 1;
  display: grid;
  place-items: center;
  min-height: 220px;
  border-radius: 24px;
  font-size: 0;
}
.progress { flex: 1; display: flex; gap: 6px; }
.progress span { flex: 1; height: 4px; border-radius: 2px; background: var(--line); }
.progress span.on { background: var(--accent); }
.signin { justify-content: center; }
.signin .display { color: var(--accent); }
#signin-error:empty { display: none; }

/* ---------- Profile and settings ---------- */

.stats { display: flex; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.stat { flex: 1; display: flex; flex-direction: column; align-items: center; padding: 12px 0; }
.stat + .stat { border-left: 1px solid var(--line); }
.stat b { font-family: var(--serif); font-size: 22px; }
.thumbs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.seg { display: flex; overflow: hidden; border: 1.5px solid var(--ink); border-radius: 999px; }
.seg > * { flex: 1; min-height: 40px; padding: 0 10px; border: 0; background: var(--surface); font-size: 14px; font-weight: 600; }
.seg > * + * { border-left: 1.5px solid var(--ink); }
.seg > .is-active { background: var(--ink); color: var(--bg); }

/* ---------- Cookbook ---------- */

.callout { display: flex; flex-direction: column; gap: 8px; padding: 14px; border: 2px dashed var(--line-strong); border-radius: var(--radius); }
.dot { display: inline-block; width: 8px; height: 8px; margin-right: 6px; border-radius: 50%; background: var(--herb); }
.device-thumb { flex: none; width: 40px; height: 52px; border: 5px solid #575757; border-bottom-width: 12px; border-radius: 6px; background: #e6e6e6; }
.device-thumb-sm { width: 30px; height: 40px; border-width: 4px; border-bottom-width: 9px; }

/* The simulated e-ink device keeps its own colors in light and dark mode, like real hardware. */
.device {
  flex: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: min(312px, 100%);
  padding: 16px 16px 12px;
  border-radius: 22px;
  background: #575757;
}
.device-screen { height: 372px; overflow: hidden; border: 2px solid #111; border-radius: 4px; }
.device-buttons { display: flex; justify-content: space-between; }
.dbtn { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 66px; padding: 0; border: 0; background: none; color: #ffffff; font-size: 11px; font-weight: 600; }
.dbtn-key { width: 44px; height: 14px; border: 2px solid #111; border-radius: 7px; background: #a6a6a6; transition: transform 0.06s; }
.dbtn:hover .dbtn-key { background: #ffffff; }
.dbtn:active .dbtn-key { transform: translateY(2px); }
.device-sm { width: 220px; padding: 12px 12px 10px; gap: 10px; border-radius: 16px; }
.device-sm .device-screen { height: 150px; }
.device-sm .dbtn { width: 46px; font-size: 9px; }
.device-sm .dbtn-key { width: 32px; height: 10px; }
.stage .device { width: min(350px, 100%); }
.stage .device-screen { height: 470px; }
.stage .eink-step { font-size: 15px; }

.eink {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
  background: #e6e6e6;
  color: #111111;
  font-size: 13px;
  line-height: 1.35;
}
.eink.refresh { animation: eink-flash 0.18s steps(2); }
@keyframes eink-flash { 0% { filter: invert(1); } }
.eink-head { display: flex; justify-content: space-between; gap: 8px; padding-bottom: 6px; border-bottom: 2px solid #111111; font-family: var(--sans); font-size: 10px; font-weight: 800; letter-spacing: 0.08em; }
.eink-title { font-size: 18px; font-weight: 700; line-height: 1.2; }
.eink-big { margin: auto 0; font-size: 16px; font-weight: 700; text-align: center; }
.eink-section { font-family: var(--sans); font-size: 10px; font-weight: 800; letter-spacing: 0.08em; }
.eink-ing { display: flex; flex-direction: column; gap: 3px; }
.eink-list { display: flex; flex-direction: column; }
.eink-row { display: flex; justify-content: space-between; gap: 8px; padding: 9px 8px; border-bottom: 1px solid #a6a6a6; }
.eink-row span:first-child { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.eink-row span:last-child { flex: none; }
.eink-row.is-selected { border-color: #111111; background: #111111; color: #e6e6e6; font-weight: 700; }
.eink-steps { display: flex; flex-direction: column; gap: 10px; }
.eink-step { display: flex; gap: 8px; font-size: 13px; }
.eink-step b { text-decoration: underline; }
.eink-num { flex: none; font-weight: 800; }
.eink-foot { display: flex; justify-content: space-between; margin-top: auto; padding-top: 6px; border-top: 2px solid #111111; font-family: var(--sans); font-size: 10px; font-weight: 700; }

/* ---------- Book view ---------- */

.book { display: flex; gap: 0; padding: 0 10px 10px 0; }
.page {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 560px;
  padding: 26px 22px 16px;
  border: 1px solid var(--line-strong);
  border-left: 6px solid var(--ink-soft);
  background: var(--surface);
  box-shadow: 4px 4px 0 -1px var(--surface), 4px 4px 0 0 var(--line-strong), 8px 8px 0 -1px var(--surface), 8px 8px 0 0 var(--line-strong);
}
.page + .page { border-left: 1px solid var(--line); }
.page-head { display: flex; justify-content: space-between; gap: 8px; color: var(--ink-soft); font-family: var(--sans); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; }
.page-sub { margin-top: 6px; font-family: var(--sans); font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--herb); }
.page-list { display: flex; flex-direction: column; gap: 5px; font-size: 15px; }
.page-steps { display: flex; flex-direction: column; gap: 12px; font-size: 15px; line-height: 1.5; }
.page-foot { margin-top: auto; color: var(--ink-soft); font-family: var(--sans); font-size: 12px; text-align: center; }

/* ---------- Dialogs and toast ---------- */

dialog {
  width: min(420px, calc(100vw - 32px));
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow);
}
dialog::backdrop { background: var(--scrim); }
dialog form { display: flex; flex-direction: column; gap: 14px; }
dialog .row { justify-content: flex-end; }

.toast {
  position: fixed;
  z-index: 50;
  left: 50%;
  bottom: calc(var(--nav-h) + var(--safe-b) + var(--dock-gap) + 16px);
  max-width: calc(100vw - 32px);
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--bg);
  font-weight: 500;
  text-align: center;
  opacity: 0;
  transform: translate(-50%, 20px);
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
}
body.is-focus .toast { bottom: calc(24px + var(--safe-b)); }
/* Sit above the bars pinned to the bottom of some screens. */
body:has(.actionbar, .composer) .toast { bottom: calc(var(--nav-h) + var(--safe-b) + var(--dock-gap) + 88px); }
body:has(.cook-foot) .toast { bottom: calc(96px + var(--safe-b)); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Show or hide by width ---------- */

.wide-only { display: none; }

/* ---------- Tablet: 768px and wider ---------- */

@media (min-width: 768px) {
  body { padding-bottom: 0; padding-left: 220px; }
  body.is-focus { padding-left: 0; }
  .nav {
    top: 0;
    right: auto;
    flex-direction: column;
    gap: 4px;
    width: 220px;
    height: auto;
    padding: 20px 12px;
    border-top: 0;
    border-right: 1px solid var(--line);
  }
  .nav-brand { display: flex; align-items: center; gap: 8px; padding: 4px 12px 20px; font-family: var(--serif); font-size: 24px; font-weight: 700; letter-spacing: -0.02em; }
  .tab { flex: none; flex-direction: row; justify-content: flex-start; gap: 12px; padding: 10px 12px; border-radius: 10px; font-size: 15px; }
  .tab:hover { background: var(--surface-2); }
  .tab.is-active { background: var(--accent-soft); }
  .nav-signin { margin-top: auto; }
  .burger { flex-direction: row; justify-content: flex-start; gap: 12px; width: auto; margin-top: auto; padding: 10px 12px; border-radius: 10px; font-size: 15px; }
  .burger-bars { width: 24px; padding: 0 2px; }
  .burger:hover { background: var(--surface-2); }
  /* Visitors also have Sign in at the bottom, which already pushes both down. */
  :root[data-mode="view"] .burger { margin-top: 0; }

  .screen,
  body.is-focus .screen { min-height: 100dvh; }
  .topbar { padding: 12px 32px; }
  .pad { padding: 24px 32px; }
  .search-wrap { padding: 16px 32px 12px; }
  .chips { padding: 0 32px; }
  .chips-top { padding-top: 16px; }
  .cat-tools { padding: 12px 32px 0; }
  .narrow { width: 100%; max-width: 600px; margin: 0 auto; }
  .detail { width: 100%; max-width: 1100px; margin: 0 auto; }

  .cards { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px 16px; }
  .thumb-hero { height: 320px; }
  .detail-cols { flex-direction: row; align-items: flex-start; gap: 40px; }
  .detail-cols > :first-child {
    position: sticky;
    top: 84px;
    flex: none;
    width: 38%;
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--surface);
    box-shadow: var(--shadow);
  }
  .detail-cols > :last-child { flex: 1; min-width: 0; }
  .actionbar,
  .composer { bottom: 0; padding: 12px 32px; }
  .actionbar { justify-content: flex-end; }
  /* Line the comment box up with the centered post column. */
  .composer { padding-inline: max(32px, calc((100% - 536px) / 2)); }
  .actionbar .btn { flex: none; min-width: 200px; }

  .overlay { align-items: center; justify-content: center; padding: 24px; }
  .sheet { width: 460px; padding: 20px; border-radius: 20px; }
  .sheet-handle { display: none; }

  .timerbar,
  .cook-foot { padding-left: 32px; padding-right: 32px; }
  .cook-steps { flex-direction: row; align-items: stretch; gap: 16px; padding: 24px 32px; }
  .cook-step { flex: 1; min-width: 0; }
  .cook-step p { font-size: 24px; }

  .toast,
  body.is-focus .toast { bottom: 24px; }
  body:has(.actionbar, .composer, .cook-foot) .toast { bottom: 96px; }
  .wide-only { display: flex; }
  .narrow-only { display: none; }
  .recipe-tabs { display: none; }
  .hero-art { min-height: 300px; }
}

/* ---------- Desktop: 1024px and wider ---------- */

@media (min-width: 1024px) {
  body { padding-left: 240px; }
  .nav { width: 240px; }
  .cards { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media print {
  .nav, .topbar, .actionbar, .stepper, .detail-tools, .fab, .toast, .ingredients input { display: none !important; }
  body { padding: 0; background: #fff; color: #000; }
  .detail-cols > :first-child { position: static; border: 0; box-shadow: none; }
  .steps li { border: 0; box-shadow: none; opacity: 1 !important; font-size: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  .spinner, .timer.is-done, .sheet, .record.is-recording, .eink.refresh { animation: none; }
}

/* ---------- Motion ----------
   Every animation is skipped when the device asks for reduced motion. */

/* The tab bar stays put while the screen behind it changes. */
.nav { view-transition-name: nav; }

/* Cards and posts arrive one after another when a screen opens. */
@media (prefers-reduced-motion: no-preference) {
  .entering :is(.card, .post, .cook-step, .stat):nth-child(2) { animation-delay: 50ms; }
  .entering :is(.card, .post, .cook-step, .stat):nth-child(3) { animation-delay: 100ms; }
  .entering :is(.card, .post, .cook-step, .stat):nth-child(4) { animation-delay: 150ms; }
  .entering :is(.card, .post, .cook-step, .stat):nth-child(5) { animation-delay: 200ms; }
  .entering :is(.card, .post, .cook-step, .stat):nth-child(n + 6) { animation-delay: 250ms; }
}
@keyframes fade-out { to { opacity: 0; } }

/* ---------- Bistro: a boutique French café, script menus and playful touches ----------
   The Bistro layout: Classic's screens as a café menu, in the shared palette. Cozy
   uses these rules for its Classic screens too, and cozy.css trims the flourishes.
   Every rule starts with :root:is(bistro, cozy) to outrank the component rules
   above; midfi.css leaves Bistro alone and skips Cozy's shared screens.
   Apple devices use their own Baskerville, Snell Roundhand and
   Chalkduster; everywhere else gets the close Google Fonts matches loaded in
   index.html (Libre Baskerville, Pinyon Script, Patrick Hand). A browser only
   downloads a web font when the fonts before it in the list are missing. */

:root:is([data-layout="bistro"], [data-layout="cozy"]) {
  --serif: "Baskerville", "Libre Baskerville", "Baskerville Old Face", ui-serif, Georgia, serif;
  --script: "Snell Roundhand", "Pinyon Script", "Apple Chancery", cursive;
  --chalk: "Chalkduster", "Patrick Hand", "Chalkboard SE", "Bradley Hand", cursive;
  --radius: 999px;
}
:root:is([data-layout="bistro"], [data-layout="cozy"]) :is(.page-title, .display, .nav-brand) { font-family: var(--script); font-weight: 400; letter-spacing: 0; }
:root:is([data-layout="bistro"], [data-layout="cozy"]) .page-title { font-size: 40px; line-height: 1.1; }
:root:is([data-layout="bistro"], [data-layout="cozy"]) .display { font-size: 72px; }
:root:is([data-layout="bistro"], [data-layout="cozy"]) .nav-brand { color: var(--accent); }
:root:is([data-layout="bistro"], [data-layout="cozy"]) :is(.h1, .h2, .card-title) { font-family: var(--serif); font-weight: 400; font-style: italic; }
:root:is([data-layout="bistro"], [data-layout="cozy"]) .h1 { font-size: clamp(34px, 8vw, 58px); line-height: 1.05; }
:root:is([data-layout="bistro"], [data-layout="cozy"]) .eyebrow { font-family: var(--script); font-size: 28px; font-weight: 400; letter-spacing: 0; text-transform: none; color: var(--accent); }
:root:is([data-layout="bistro"], [data-layout="cozy"]) :is(.label, .group-name, .card-meta) { font-family: var(--serif); font-size: 14px; font-variant: small-caps; letter-spacing: 0.12em; text-transform: lowercase; }
:root:is([data-layout="bistro"], [data-layout="cozy"]) .group-name { color: var(--herb); }

:root:is([data-layout="bistro"], [data-layout="cozy"]) .topbar { border-bottom: 1px solid var(--ink); backdrop-filter: none; background: var(--bg); }

:root:is([data-layout="bistro"], [data-layout="cozy"]) .btn { border-width: 1.5px; font-family: var(--serif); font-size: 17px; font-style: italic; font-weight: 600; transition: transform 0.15s, background 0.15s; }
:root:is([data-layout="bistro"], [data-layout="cozy"]) .btn-sm { font-size: 14px; }
:root:is([data-layout="bistro"], [data-layout="cozy"]) .btn:active { transform: scale(0.94); }
:root:is([data-layout="bistro"], [data-layout="cozy"]) .btn.is-on { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
:root:is([data-layout="bistro"], [data-layout="cozy"]) .chip { font-family: var(--serif); font-size: 15px; font-style: italic; }
:root:is([data-layout="bistro"], [data-layout="cozy"]) :is(.chip.is-active, .chip:has(input:checked)) { border-color: var(--accent); background: var(--accent); color: var(--accent-ink); }
:root:is([data-layout="bistro"], [data-layout="cozy"]) :is(.pill, .card-flag, .tag, .tag-check) { font-family: var(--serif); font-size: 13px; font-variant: small-caps; letter-spacing: 0.08em; text-transform: lowercase; }
:root:is([data-layout="bistro"], [data-layout="cozy"]) .input:focus { border-color: var(--accent); }
:root:is([data-layout="bistro"], [data-layout="cozy"]) .seg { border-color: var(--ink); }
:root:is([data-layout="bistro"], [data-layout="cozy"]) .seg > .is-active { background: var(--accent); color: var(--accent-ink); }

/* Recipe cards are framed like menu cards: an ink rule with a rouge one inside it. */
:root:is([data-layout="bistro"], [data-layout="cozy"]) .card { align-items: center; padding: 12px 12px 18px; border: 1px solid var(--ink); outline: 1px solid var(--accent); outline-offset: -6px; background: var(--surface); text-align: center; }
:root:is([data-layout="bistro"], [data-layout="cozy"]) .card-title { font-size: 19px; }
:root:is([data-layout="bistro"], [data-layout="cozy"]) .card-meta::before { content: "— "; }
:root:is([data-layout="bistro"], [data-layout="cozy"]) .card-meta::after { content: " —"; }
:root:is([data-layout="bistro"], [data-layout="cozy"]) .thumb::before { font-family: var(--script); font-style: normal; }
:root:is([data-layout="bistro"], [data-layout="cozy"]) :is(.box-card, .mini-card, .stats, .notes) { border-radius: 4px; border-color: var(--ink); }
:root:is([data-layout="bistro"], [data-layout="cozy"]) .notes { background: var(--herb-soft); }
:root:is([data-layout="bistro"], [data-layout="cozy"]) .banner { border: 3px double var(--accent); border-radius: 4px; background: var(--accent-soft); font-family: var(--serif); font-style: italic; }
:root:is([data-layout="bistro"], [data-layout="cozy"]) .post .author .row-title { font-family: var(--script); font-size: 24px; font-weight: 400; }
:root:is([data-layout="bistro"], [data-layout="cozy"]) .post .caption { font-family: var(--serif); font-size: 18px; font-style: italic; }
:root:is([data-layout="bistro"], [data-layout="cozy"]) .detail .section > .h2 { font-family: var(--script); font-size: 34px; font-style: normal; }
:root:is([data-layout="bistro"], [data-layout="cozy"]) .detail .section > .h2::before { content: "~ "; color: var(--accent); }
:root:is([data-layout="bistro"], [data-layout="cozy"]) .detail .section > .h2::after { content: " ~"; color: var(--accent); }

/* Steps numbered I, II, III, with a "fait!" stamp when done. */
:root:is([data-layout="bistro"], [data-layout="cozy"]) #steps { counter-reset: etape; }
:root:is([data-layout="bistro"], [data-layout="cozy"]) .steps li { position: relative; border-radius: 4px; counter-increment: etape; }
:root:is([data-layout="bistro"], [data-layout="cozy"]) .steps li .step-num { width: auto; min-width: 32px; background: none; color: var(--accent); font-size: 0; }
:root:is([data-layout="bistro"], [data-layout="cozy"]) .steps li .step-num::before { content: counter(etape, upper-roman) "."; font-family: var(--serif); font-size: 19px; font-style: italic; }
:root:is([data-layout="bistro"], [data-layout="cozy"]) .steps li.done .step-num::after { content: none; }
:root:is([data-layout="bistro"], [data-layout="cozy"]) .steps li.done { padding-right: 64px; }
:root:is([data-layout="bistro"], [data-layout="cozy"]) .steps li.done::after { content: "fait!"; position: absolute; top: 4px; right: 10px; color: var(--accent); font-family: var(--script); font-size: 24px; transform: rotate(-10deg); }
:root:is([data-layout="bistro"], [data-layout="cozy"]) .steps li.current { border-color: var(--accent); background: var(--surface); box-shadow: none; }
:root:is([data-layout="bistro"], [data-layout="cozy"]) .amt { border-bottom: 1px solid var(--accent); border-radius: 0; background: none; font-style: italic; }

/* The welcome screen and cook mode become a chalkboard, the day's menu, in the
   palette's dark colors whatever the theme. */
:root:is([data-layout="bistro"], [data-layout="cozy"]) :is(.cook, .screen:has(.hero-art)) {
  --bg: #1b1613;
  --surface: #25201b;
  --surface-2: #312923;
  --ink: #f3ebe0;
  --ink-soft: #b3a594;
  --line: #362e27;
  --line-strong: #7d7064;
  --accent: #f08b70;
  --accent-ink: #1b1613;
  --accent-soft: #3b2420;
  --herb: #6f8f4e;
  --herb-soft: #263022;
  --brass: #f0c47a;
  background: var(--bg);
  color: var(--ink);
}
:root:is([data-layout="bistro"], [data-layout="cozy"]) .cook .cook-step { border: 1.5px dashed var(--line-strong); border-radius: 6px; background: transparent; }
:root:is([data-layout="bistro"], [data-layout="cozy"]) .cook :is(.cook-step p, .step-num, .page-title, .display) { font-family: var(--chalk); }
:root:is([data-layout="bistro"], [data-layout="cozy"]) .cook .cook-step p { font-size: 22px; }
:root:is([data-layout="bistro"], [data-layout="cozy"]) .cook .step-num { border: 1.5px solid var(--accent); background: none; color: var(--accent); }
:root:is([data-layout="bistro"], [data-layout="cozy"]) .cook .cook-step b { background: none; color: var(--accent); }
:root:is([data-layout="bistro"], [data-layout="cozy"]) .screen:has(.hero-art) .display { font-family: var(--chalk); font-size: 56px; }

/* Everything reads in Baskerville, like a printed menu. Only the e-ink simulator keeps
   its own sans, because it stands in for real hardware. */
:root:is([data-layout="bistro"], [data-layout="cozy"]) body { font-family: var(--serif); font-size: 17px; }
/* Baskerville's small letters run short, so small text steps up a size to stay readable. */
:root:is([data-layout="bistro"], [data-layout="cozy"]) :is(.small, .hint) { font-size: 15px; }
:root:is([data-layout="bistro"], [data-layout="cozy"]) .row-sub { font-size: 14px; }
:root:is([data-layout="bistro"], [data-layout="cozy"]) .list-row { font-size: 16px; }
:root:is([data-layout="bistro"], [data-layout="cozy"]) .pad.narrow { gap: 24px; }
:root:is([data-layout="bistro"], [data-layout="cozy"]) .h3 { font-family: var(--serif); font-size: 21px; font-style: italic; font-weight: 400; }
:root:is([data-layout="bistro"], [data-layout="cozy"]) .topbar-title { font-size: 19px; font-style: italic; font-weight: 400; }
:root:is([data-layout="bistro"], [data-layout="cozy"]) .link { font-style: italic; }
:root:is([data-layout="bistro"], [data-layout="cozy"]) .input::placeholder { font-style: italic; }
:root:is([data-layout="bistro"], [data-layout="cozy"]) .toast { font-style: italic; }
:root:is([data-layout="bistro"], [data-layout="cozy"]) .stat > span { font-variant: small-caps; letter-spacing: 0.1em; text-transform: lowercase; }
:root:is([data-layout="bistro"], [data-layout="cozy"]) :is(.avatar, .shape-circle:not(.shape-dashed)) { background: var(--accent-soft); color: var(--accent); font-family: var(--serif); font-style: italic; font-weight: 400; }
:root:is([data-layout="bistro"], [data-layout="cozy"]) .avatar.is-you { background: var(--accent); color: var(--accent-ink); }

/* A menu needs no icons, so the plain squares standing in for emoji are left out. */
:root:is([data-layout="bistro"], [data-layout="cozy"]) .shape:not(.shape-circle, .shape-dashed) { display: none; }

/* Boxes holding a few lines of text get small corners; the pill shape is for buttons. */
:root:is([data-layout="bistro"], [data-layout="cozy"]) :is(.callout, .check-row, .dropzone, .source-option, .unsure) { border-radius: 6px; }
:root:is([data-layout="bistro"], [data-layout="cozy"]) .skel-card { border-radius: 0; }

/* Recipe pictures sit on oval plates. A recipe page without a photo gets one round plate. */
:root:is([data-layout="bistro"], [data-layout="cozy"]) :is(.thumb-card, .big-emoji) { border-radius: 50%; }
:root:is([data-layout="bistro"], [data-layout="cozy"]) .thumb-hero:not(:has(img)) { align-self: center; width: 168px; height: 168px; border-radius: 50%; }

/* A recipe opens like a menu: its title, times and description centered. Where it
   came from and its collection are ruled lines, not boxes. */
:root:is([data-layout="bistro"], [data-layout="cozy"]) .detail > .stack-sm { align-items: center; text-align: center; }
:root:is([data-layout="bistro"], [data-layout="cozy"]) .detail > .stack-sm > .row-wrap { justify-content: center; }
:root:is([data-layout="bistro"], [data-layout="cozy"]) .detail > .stack-sm > .lead { max-width: 60ch; font-size: 18px; font-style: italic; }
:root:is([data-layout="bistro"], [data-layout="cozy"]) :is(.source, .collection-row) { padding-inline: 0; border-width: 1px 0; border-color: var(--line-strong); border-radius: 0; background: none; }
:root:is([data-layout="bistro"], [data-layout="cozy"]) .source + .collection-row { border-top: 0; }

/* Tabs and the layout menu: italic serif, the current one in tomato. */
:root:is([data-layout="bistro"], [data-layout="cozy"]) :is(.tab, .burger) { position: relative; font-family: var(--serif); font-size: 13px; font-style: italic; }
:root:is([data-layout="bistro"], [data-layout="cozy"]) .tab.is-active { color: var(--accent); font-weight: 700; }
/* The layout picker: a small card with square corners. */
:root:is([data-layout="bistro"], [data-layout="cozy"]) .layout-menu { border-color: var(--ink); border-radius: 4px; box-shadow: none; }
:root:is([data-layout="bistro"], [data-layout="cozy"]) .layout-pick { border-radius: 4px; }
:root:is([data-layout="bistro"], [data-layout="cozy"]) .layout-pick .row-title { font-style: italic; }

@media (min-width: 768px) {
  :root:is([data-layout="bistro"], [data-layout="cozy"]) .nav-brand { font-size: 40px; }
  :root:is([data-layout="bistro"], [data-layout="cozy"]) :is(.tab, .burger) { font-size: 17px; }
  :root:is([data-layout="bistro"], [data-layout="cozy"]) :is(.tab, .burger):hover { background: none; color: var(--ink); }
  :root:is([data-layout="bistro"], [data-layout="cozy"]) .tab.is-active { background: none; color: var(--accent); }
  :root:is([data-layout="bistro"], [data-layout="cozy"]) .detail-cols > :first-child { border: 1px solid var(--ink); outline: 1px solid var(--accent); outline-offset: -6px; border-radius: 0; box-shadow: none; }
}

@media (prefers-reduced-motion: no-preference) {
  :root:is([data-layout="bistro"], [data-layout="cozy"]) :is(.btn, .card, .chip):hover { animation: wiggle 0.45s ease-in-out; }
  :root:is([data-layout="bistro"], [data-layout="cozy"]) .tab:hover svg { animation: wiggle 0.45s ease-in-out; }
  :root:is([data-layout="bistro"], [data-layout="cozy"]) .steps li.done::after { animation: stamp 0.35s cubic-bezier(0.3, 0.8, 0.3, 1.6) both; }
  :root:is([data-layout="bistro"], [data-layout="cozy"])::view-transition-old(root) { animation: fade-out 0.2s ease both; }
  :root:is([data-layout="bistro"], [data-layout="cozy"])::view-transition-new(root) { animation: menu-turn 0.5s cubic-bezier(0.25, 0.7, 0.25, 1) both; }
  :root:is([data-layout="bistro"], [data-layout="cozy"]) .entering :is(.card, .post, .cook-step, .stat) { animation: place-card 0.55s cubic-bezier(0.3, 0.8, 0.3, 1.2) both; }
}
@keyframes wiggle { 25% { transform: rotate(-1.6deg); } 50% { transform: rotate(1.3deg); } 75% { transform: rotate(-0.6deg); } }
@keyframes stamp { from { opacity: 0; transform: rotate(-30deg) scale(1.8); } }
@keyframes menu-turn { from { opacity: 0; transform: perspective(1200px) rotateY(-10deg) translateX(24px); transform-origin: left center; } }
@keyframes place-card { from { opacity: 0; transform: translateY(-14px) rotate(-3deg); } }

/* ---------- Bistro's Community: a lifestyle-magazine column ----------
   A centered title, filters as small capitals between hairlines, bylines in
   tracked small caps, captions with a rouge drop cap, questions as pull quotes,
   and recipes in plain square boxes. */

:root:is([data-layout="bistro"], [data-layout="cozy"]) .community .page-title { text-align: center; }
:root:is([data-layout="bistro"], [data-layout="cozy"]) .community .feed-note { font-family: var(--serif); font-style: italic; text-align: center; }

:root:is([data-layout="bistro"], [data-layout="cozy"]) .community .chips { gap: 0; }
:root:is([data-layout="bistro"], [data-layout="cozy"]) .community .chip { min-height: 30px; padding: 0 14px; border: 0; border-radius: 0; background: none; color: var(--ink-soft); font-size: 15px; font-style: normal; font-variant: small-caps; letter-spacing: 0.14em; text-transform: lowercase; }
:root:is([data-layout="bistro"], [data-layout="cozy"]) .community .chip + .chip { border-left: 1px solid var(--line-strong); }
:root:is([data-layout="bistro"], [data-layout="cozy"]) .community .chip.is-active { background: none; color: var(--accent); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 7px; }
:root:is([data-layout="bistro"], [data-layout="cozy"]) .community .chip:hover { color: var(--ink); }

:root:is([data-layout="bistro"], [data-layout="cozy"]) .community .posts { gap: 36px; }
:root:is([data-layout="bistro"], [data-layout="cozy"]) .community .post { gap: 16px; padding-bottom: 36px; border-bottom: 1px solid var(--ink); }
:root:is([data-layout="bistro"], [data-layout="cozy"]) .community .post:last-child { border-bottom: 0; }
:root:is([data-layout="bistro"], [data-layout="cozy"]) .community .author .row-title { font-family: var(--serif); font-size: 15px; font-weight: 700; font-variant: small-caps; letter-spacing: 0.16em; text-transform: lowercase; }

/* Captions read like the start of a story. */
:root:is([data-layout="bistro"], [data-layout="cozy"]) .community :is(.post, #post) > .caption { font-family: var(--serif); font-size: 21px; font-style: normal; line-height: 1.45; }
:root:is([data-layout="bistro"], [data-layout="cozy"]) .community :is(.post, #post) > .caption:not(.h3)::first-letter { float: left; margin: 7px 10px 0 0; color: var(--accent); font-size: 62px; line-height: 0.78; }
:root:is([data-layout="bistro"], [data-layout="cozy"]) .community :is(.post, #post) > .caption.h3 { font-size: 27px; font-style: italic; font-weight: 400; line-height: 1.3; text-align: center; }
:root:is([data-layout="bistro"], [data-layout="cozy"]) .community :is(.post, #post) > .caption.h3::before { content: "“"; display: block; height: 34px; color: var(--accent); font-size: 68px; line-height: 1; }

/* Photos as plain rectangles, recipes in square boxes with an italic title. */
:root:is([data-layout="bistro"], [data-layout="cozy"]) .community :is(.post, #post) > a > .thumb-card,
:root:is([data-layout="bistro"], [data-layout="cozy"]) .community #post > .thumb-card { border-radius: 2px; }
:root:is([data-layout="bistro"], [data-layout="cozy"]) .community :is(.mini-card, .box-card, .stats) { border: 1px solid var(--ink); border-radius: 0; background: var(--surface); }
:root:is([data-layout="bistro"], [data-layout="cozy"]) .community :is(.mini-card, .box-card) .row-title { font-family: var(--serif); font-size: 18px; font-style: italic; font-weight: 400; }
:root:is([data-layout="bistro"], [data-layout="cozy"]) .community :is(.mini-card, .box-card) .thumb { border-radius: 2px; }
:root:is([data-layout="bistro"], [data-layout="cozy"]) .community :is(.pill, .tag-check) { min-height: 0; padding: 2px 10px; border: 1px solid currentColor; border-radius: 999px; background: none; color: var(--ink); font-size: 12px; letter-spacing: 0.14em; }
:root:is([data-layout="bistro"], [data-layout="cozy"]) .community .tag-check { color: var(--accent); }
:root:is([data-layout="bistro"], [data-layout="cozy"]) .community .btn { border-width: 1px; }
:root:is([data-layout="bistro"], [data-layout="cozy"]) .community .btn:not(.btn-primary, .btn-text, .is-on):hover { background: var(--ink); color: var(--bg); }
:root:is([data-layout="bistro"], [data-layout="cozy"]) .community .comments .caption { font-family: var(--serif); }
:root:is([data-layout="bistro"], [data-layout="cozy"]) .community .comments a.strong { font-family: var(--serif); font-variant: small-caps; letter-spacing: 0.12em; text-transform: lowercase; }

/* A person's recipes as a small mosaic, the first one large. */
:root:is([data-layout="bistro"], [data-layout="cozy"]) .community .thumbs { gap: 12px; }
:root:is([data-layout="bistro"], [data-layout="cozy"]) .community .thumbs .thumb { border-radius: 2px; }
:root:is([data-layout="bistro"], [data-layout="cozy"]) .community .thumbs .thumb-link:first-child:not(:only-child) { grid-column: span 2; grid-row: span 2; }
:root:is([data-layout="bistro"], [data-layout="cozy"]) .community .thumbs .thumb-link .strong { font-family: var(--serif); font-style: italic; font-weight: 400; }
