/* Ret god — design direction E (see the plan's Design section).
   Never write raw colors, radii or font sizes below :root — use the tokens. */

@font-face {
  font-family: 'Bricolage Grotesque';
  src: url('/fonts/bricolage-grotesque.woff2') format('woff2');
  font-weight: 200 800;
  font-display: swap;
}
@font-face {
  font-family: 'Hanken Grotesk';
  src: url('/fonts/hanken-grotesk.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Hanken Grotesk';
  src: url('/fonts/hanken-grotesk-italic.woff2') format('woff2');
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}

:root {
  --color-bg: #FAF7F1;
  --color-surface: #F0EADF;
  --color-border: #E8E0D1;
  --color-text: #2A2622;
  --color-text-muted: #6F665B;
  --color-accent: #F4C07A;        /* havtorn: primary buttons, "no photo" surfaces */
  --color-accent-text: #A15F12;   /* amounts and links */
  --color-accent-tint: #FBE3BE;   /* notes */

  --color-danger: #A2362A;
  --color-danger-bg: #F8E4E0;
  --color-surface-raised: #FFFFFF;
  --shadow-sheet: 0 -8px 32px rgb(42 38 34 / 0.18);
  --shadow-float: 0 10px 24px -10px rgb(42 38 34 / 0.45);
  --color-ok: #2F6B3A;
  --color-ok-bg: #E3F0E2;
  --radius-xl: 18px;
  --backdrop: rgb(42 38 34 / 0.45);
  --scrim: rgb(42 38 34 / 0.55);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-pill: 999px;

  /* Body text, ingredients and steps never below 17px (plan: readability). */
  --text-sm: 0.9375rem;   /* 15px — secondary text only */
  --text-base: 1.0625rem; /* 17px */
  --text-lg: 1.25rem;
  --text-xl: 1.625rem;
  --text-2xl: 2.125rem;
  --text-3xl: 2.625rem;
  --text-4xl: 2.875rem;

  --font-display: 'Bricolage Grotesque', system-ui, sans-serif;
  --font-body: 'Hanken Grotesk', system-ui, sans-serif;

  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-6: 24px;
  --tap-min: 44px;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.5;
}

[hidden] { display: none !important; }

h1, h2, h3 { font-family: var(--font-display); line-height: 1.15; margin: 0; }

a { color: var(--color-accent-text); }

:focus-visible { outline: 3px solid var(--color-accent-text); outline-offset: 2px; }

.muted { color: var(--color-text-muted); }
.hint { margin: 0; color: var(--color-text-muted); font-size: var(--text-sm); }

/* ─── Screens ─────────────────────────────────────────────────────────────── */

.screen {
  flex: 1;
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
  padding: max(var(--space-6), env(safe-area-inset-top)) max(var(--space-4), env(safe-area-inset-right)) var(--space-6)
    max(var(--space-4), env(safe-area-inset-left));
}
.screen-narrow { max-width: 440px; display: flex; flex-direction: column; gap: var(--space-4); }
.screen-center { display: flex; align-items: center; justify-content: center; }

.brand { font-size: var(--text-2xl); font-weight: 700; letter-spacing: -0.01em; }
.title { font-size: var(--text-xl); font-weight: 700; }
.section-title { font-size: var(--text-lg); font-weight: 700; margin-top: var(--space-6); margin-bottom: var(--space-2); }

.notice {
  margin: 0;
  padding: var(--space-3) var(--space-4);
  background: var(--color-accent-tint);
  border-radius: var(--radius-md);
}

/* ─── Forms ───────────────────────────────────────────────────────────────── */

.stack { display: flex; flex-direction: column; gap: var(--space-3); }
.row { display: flex; flex-wrap: wrap; gap: var(--space-2); }

.field { display: flex; flex-direction: column; gap: var(--space-1); }
.field-label { font-weight: 600; }

input[type='text'],
input[type='email'],
input[type='url'],
input[type='search'],
textarea {
  width: 100%;
  min-height: var(--tap-min);
  padding: var(--space-2) var(--space-3);
  font: inherit;
  color: inherit;
  background: var(--color-surface-raised);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
}
input:focus-visible { outline-offset: 0; }
input[readonly] { background: var(--color-surface); }
.input-code { font-size: var(--text-xl); letter-spacing: 0.4em; text-align: center; font-variant-numeric: tabular-nums; }

.form-error { margin: 0; min-height: 1.5em; color: var(--color-danger); font-weight: 600; }

/* ─── Buttons ─────────────────────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: var(--tap-min);
  padding: var(--space-2) var(--space-4);
  font: inherit;
  font-weight: 600;
  color: var(--color-text);
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  text-decoration: none;
  cursor: pointer;
}
.btn:disabled { opacity: 0.6; cursor: progress; }
.btn-primary { background: var(--color-accent); }
.btn-secondary { background: var(--color-surface-raised); border-color: var(--color-border); }
.btn-danger { background: var(--color-danger-bg); color: var(--color-danger); }
.btn-link { background: none; color: var(--color-accent-text); text-decoration: underline; padding-left: 0; padding-right: 0; border-radius: var(--radius-sm); }

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: var(--tap-min);
  min-height: var(--tap-min);
  padding: 0;
  color: inherit;
  background: none;
  border: 0;
  border-radius: var(--radius-pill);
  cursor: pointer;
}
.icon { display: inline-flex; flex: none; }

/* ─── App ─────────────────────────────────────────────────────────────────── */

#screen-app { padding-top: 0; }

.app-bar {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  padding: max(var(--space-3), env(safe-area-inset-top)) 0 var(--space-3);
  background: var(--color-bg);
}

.collection-switch {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  min-height: var(--tap-min);
  min-width: 0;
  padding: 0 var(--space-2) 0 0;
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 700;
  color: inherit;
  background: none;
  border: 0;
  border-radius: var(--radius-sm);
  cursor: pointer;
}
.collection-switch-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.app-main { padding-top: var(--space-4); }

.empty {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-6) var(--space-4);
  background: var(--color-accent-tint);
  border-radius: var(--radius-lg);
}
.empty p { margin: 0; }

.app-footer {
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
  padding: 0 max(var(--space-4), env(safe-area-inset-right)) max(var(--space-4), env(safe-area-inset-bottom))
    max(var(--space-4), env(safe-area-inset-left));
  color: var(--color-text-muted);
  font-size: var(--text-sm);
}
.app-footer p { margin: 0; }

/* ─── Lists ───────────────────────────────────────────────────────────────── */

.list { list-style: none; margin: 0 0 var(--space-4); padding: 0; }
.list > li + li { border-top: 1px solid var(--color-border); }

.list-button,
.list-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  width: 100%;
  min-height: 56px;
  padding: var(--space-2) 0;
  font: inherit;
  color: inherit;
  text-align: left;
  background: none;
  border: 0;
}
.list-button { cursor: pointer; border-radius: var(--radius-sm); }
.list-button[aria-current='true'] .list-title { color: var(--color-accent-text); }
.list-text { display: flex; flex-direction: column; min-width: 0; }
.list-title { font-weight: 600; overflow-wrap: anywhere; }
.list-meta { color: var(--color-text-muted); font-size: var(--text-sm); }

/* ─── Sheets (<dialog>) ───────────────────────────────────────────────────── */

dialog.sheet {
  width: 100%;
  max-width: 560px;
  max-height: 90dvh;
  margin: auto auto 0;
  padding: var(--space-4) var(--space-4) max(var(--space-6), env(safe-area-inset-bottom));
  color: var(--color-text);
  background: var(--color-bg);
  border: 0;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  box-shadow: var(--shadow-sheet);
  overflow-y: auto;
  overscroll-behavior: contain;
}
dialog.sheet::backdrop { background: var(--backdrop); }
dialog.sheet h2 { font-size: var(--text-xl); }
dialog.sheet > p { margin: var(--space-3) 0; }
dialog.sheet > .btn { width: 100%; margin-top: var(--space-4); }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); margin-bottom: var(--space-3); }

@media (min-width: 600px) {
  dialog.sheet { margin: auto; border-radius: var(--radius-lg); }
}

/* ─── Toast ───────────────────────────────────────────────────────────────── */

.toast {
  position: fixed;
  inset: auto auto auto 50%;
  margin: 0;
  border: 0;
  /* Above the prompt field and the "Ny opskrift" button. */
  bottom: calc(max(var(--space-4), env(safe-area-inset-bottom)) + 88px);
  z-index: 10;
  width: max-content;
  max-width: calc(100% - 2 * var(--space-4));
  padding: var(--space-3) var(--space-4);
  transform: translateX(-50%);
  color: var(--color-bg);
  background: var(--color-text);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sheet);
}
.toast-error { color: var(--color-danger); background: var(--color-danger-bg); }

@media (prefers-reduced-motion: no-preference) {
  dialog.sheet[open] { animation: sheet-in 180ms ease-out; }
}
@keyframes sheet-in {
  from { transform: translateY(24px); opacity: 0; }
}

/* ─── Shared bits ─────────────────────────────────────────────────────────── */

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
textarea { min-height: 12rem; resize: vertical; line-height: 1.5; }
.btn-small { min-height: 36px; padding: var(--space-1) var(--space-3); font-size: var(--text-sm); }
.btn-wide { width: 100%; min-height: 56px; }
.icon-btn-filled { background: var(--color-bg); color: var(--color-text); box-shadow: var(--shadow-float); cursor: pointer; }
.icon-btn-spacer { width: var(--tap-min); }
.badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 var(--space-3);
  font-size: var(--text-sm);
  font-weight: 600;
  background: var(--color-accent-tint);
  border-radius: var(--radius-pill);
}
.page-title { font-size: var(--text-3xl); font-weight: 800; line-height: 0.95; letter-spacing: -0.035em; }
.list-button-danger { color: var(--color-danger); font-weight: 600; }
.list-quote { font-style: italic; }

/* ─── App views ───────────────────────────────────────────────────────────── */

.screen-app { padding-top: 0; padding-bottom: 120px; }
.view { position: relative; }

.list-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-3);
  padding-top: max(var(--space-6), env(safe-area-inset-top));
}
.brand-big { font-size: var(--text-4xl); font-weight: 800; line-height: 0.9; letter-spacing: -0.035em; }
.list-header-actions { display: flex; align-items: center; gap: var(--space-1); min-width: 0; }
.pill {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  min-height: var(--tap-min);
  max-width: 55vw;
  padding: 0 var(--space-3) 0 var(--space-4);
  font: inherit;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-pill);
  cursor: pointer;
}
.pill-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.list-tools { display: flex; flex-direction: column; gap: var(--space-3); padding-top: var(--space-4); }
.search {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  min-height: 48px;
  padding: 0 var(--space-3);
  color: var(--color-text-muted);
  background: var(--color-surface);
  border-radius: var(--radius-md);
}
.search input { min-height: 46px; padding: 0; background: transparent; border: 0; color: var(--color-text); }
.search input:focus-visible { outline: none; }
.search:focus-within { outline: 3px solid var(--color-accent-text); outline-offset: 2px; }

.chips { display: flex; gap: var(--space-2); overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none;
  min-height: 40px;
  padding: 0 var(--space-4);
  font: inherit;
  font-size: var(--text-sm);
  color: var(--color-text);
  background: transparent;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-pill);
  cursor: pointer;
}
.chip[aria-pressed='true'] { color: var(--color-bg); background: var(--color-text); border-color: var(--color-text); font-weight: 600; }
.list-tools .btn-small { align-self: flex-start; }
.list-status { margin: var(--space-3) 0 0; min-height: 1.5em; }

.recipe-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-4) var(--space-3);
  padding-top: var(--space-2);
}
@media (min-width: 600px) { .recipe-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.grid-heading { grid-column: 1 / -1; font-size: var(--text-lg); margin-top: var(--space-2); }
.recipe-card { display: flex; flex-direction: column; gap: var(--space-2); color: inherit; text-decoration: none; min-width: 0; }
.recipe-card-wide { grid-column: 1 / -1; }
.recipe-card-media {
  position: relative;
  height: 150px;
  overflow: hidden;
  background: var(--color-surface);
  border-radius: var(--radius-xl);
}
.recipe-card-wide .recipe-card-media { height: 200px; }
.recipe-card-photo { width: 100%; height: 100%; object-fit: cover; display: block; }
.no-photo {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: var(--space-3);
  background: var(--color-accent);
}
.no-photo-label { display: inline-flex; align-items: center; gap: var(--space-2); font-size: var(--text-sm); font-weight: 600; }
.no-photo-title {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 800;
  line-height: 0.9;
  letter-spacing: -0.03em;
  overflow: hidden;
  text-overflow: ellipsis;
}
.recipe-card-text { display: flex; flex-direction: column; gap: 2px; }
.recipe-card-title { font-family: var(--font-display); font-weight: 700; font-size: var(--text-base); line-height: 1.15; overflow-wrap: anywhere; }
.recipe-card-wide .recipe-card-title { font-size: var(--text-xl); letter-spacing: -0.02em; }
.recipe-card-meta { font-size: var(--text-sm); color: var(--color-text-muted); }

.fab {
  position: fixed;
  right: max(var(--space-4), env(safe-area-inset-right));
  bottom: max(var(--space-6), env(safe-area-inset-bottom));
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  min-height: 56px;
  padding: 0 var(--space-6) 0 var(--space-4);
  font-weight: 600;
  color: var(--color-bg);
  background: var(--color-text);
  border-radius: var(--radius-pill);
  text-decoration: none;
  box-shadow: var(--shadow-float);
}
.empty .row { margin-top: var(--space-2); }

/* ─── New recipe ──────────────────────────────────────────────────────────── */

.add-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: max(var(--space-4), env(safe-area-inset-top)) 0 var(--space-4);
}
.add-header .icon-btn-filled { background: var(--color-surface); box-shadow: none; }
.segmented {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-1);
  padding: var(--space-1);
  background: var(--color-surface);
  border-radius: var(--radius-pill);
}
.segment {
  min-height: var(--tap-min);
  font: inherit;
  font-size: var(--text-sm);
  color: var(--color-text);
  background: transparent;
  border: 0;
  border-radius: var(--radius-pill);
  cursor: pointer;
}
.segment[aria-selected='true'] { color: var(--color-bg); background: var(--color-text); font-weight: 600; }
.segment:disabled { color: var(--color-text-muted); cursor: default; }
.import-text { min-height: 18rem; border: 1.5px solid var(--color-text); border-radius: var(--radius-xl); padding: var(--space-4); }
.reassure { display: flex; gap: var(--space-2); margin: 0; font-size: var(--text-sm); color: var(--color-text-muted); }
.reassure .icon { color: var(--color-accent-text); margin-top: 2px; }
.preview-card { padding: var(--space-4); background: var(--color-surface-raised); border: 1px solid var(--color-border); border-radius: var(--radius-xl); }
.notice ul { margin: var(--space-2) 0 0; padding-left: 1.2em; }

/* ─── One recipe ──────────────────────────────────────────────────────────── */

.view-recipe { margin: 0 calc(-1 * max(var(--space-4), env(safe-area-inset-left))); }
.hero { position: relative; height: 360px; background: var(--color-surface); }
.hero-track { display: flex; height: 100%; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.hero-track::-webkit-scrollbar { display: none; }
.hero-photo { flex: none; width: 100%; height: 100%; object-fit: cover; scroll-snap-align: start; }
.hero-empty {
  display: flex;
  align-items: flex-end;
  width: 100%;
  padding: var(--space-4);
  background: var(--color-accent);
}
.hero-actions {
  position: absolute;
  top: max(var(--space-4), env(safe-area-inset-top));
  left: var(--space-3);
  right: var(--space-3);
  display: flex;
  justify-content: space-between;
}
.hero-count {
  position: absolute;
  right: var(--space-3);
  bottom: var(--space-3);
  margin: 0;
  padding: 2px var(--space-2);
  font-size: var(--text-sm);
  color: var(--color-bg);
  background: var(--scrim);
  border-radius: var(--radius-pill);
}
.recipe-page { padding: var(--space-6) max(var(--space-4), env(safe-area-inset-right)) 0 max(var(--space-4), env(safe-area-inset-left)); }
.recipe-title { font-size: var(--text-3xl); font-weight: 800; line-height: 0.95; letter-spacing: -0.035em; overflow-wrap: anywhere; }
.recipe-meta { margin: var(--space-3) 0 0; }
.recipe-version { margin-top: var(--space-6); }

.recipe-body { display: flex; flex-direction: column; gap: var(--space-4); margin-top: var(--space-4); }
.recipe-body p { margin: 0; }
.facts { display: flex; flex-wrap: wrap; gap: var(--space-2); margin: 0; padding: 0; list-style: none; }
.facts li { padding: var(--space-2) var(--space-3); font-size: var(--text-sm); font-weight: 600; background: var(--color-surface); border-radius: var(--radius-md); }
.recipe-description { display: flex; flex-direction: column; gap: var(--space-2); }
.gaps { padding: var(--space-3) var(--space-4); border: 1.5px dashed var(--color-accent-text); border-radius: var(--radius-md); }
.gaps ul { margin: var(--space-1) 0 0; padding-left: 1.2em; }
.gaps-label, .note-label { margin: 0; font-size: var(--text-sm); font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--color-accent-text); }
.note-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  padding: var(--space-4);
  background: var(--color-accent-tint);
  border-radius: var(--radius-xl);
}
.note-card p:not(.note-label) { font-family: var(--font-display); font-weight: 500; font-size: var(--text-lg); line-height: 1.3; }
.recipe-section h2 { font-size: var(--text-xl); font-weight: 700; letter-spacing: -0.02em; margin: var(--space-4) 0 var(--space-3); }
.recipe-section h3 { font-size: var(--text-lg); margin: var(--space-4) 0 var(--space-2); }
.ingredients { list-style: none; margin: 0; padding: 0; }
.ingredients li {
  display: grid;
  grid-template-columns: 6.5rem 1fr;
  gap: var(--space-3);
  padding: var(--space-2) 0;
  border-top: 1px solid var(--color-border);
}
.ingredients li:last-child { border-bottom: 1px solid var(--color-border); }
.amount { font-weight: 600; color: var(--color-accent-text); }
.ingredient-note { color: var(--color-text-muted); }
.steps { list-style: none; margin: 0; padding: 0; counter-reset: step; display: flex; flex-direction: column; gap: var(--space-4); }
.steps li { position: relative; padding-left: 40px; counter-increment: step; line-height: 1.55; }
.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-bg);
  background: var(--color-text);
  border-radius: var(--radius-pill);
}
.step-meta { margin-top: var(--space-1) !important; font-size: var(--text-sm); color: var(--color-text-muted); }
.tips { margin: 0; }
.tips dt { font-weight: 700; }
.tips dd { margin: 0 0 var(--space-3); }
.equipment, .recipe-source { color: var(--color-text-muted); }

.answer-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  margin-top: var(--space-6);
  padding: var(--space-4);
  background: var(--color-surface-raised);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-float);
}
.answer-card p { margin: 0; }

.ask-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  display: flex;
  gap: var(--space-2);
  align-items: center;
  max-width: 640px;
  margin: 0 auto;
  padding: var(--space-3) max(var(--space-3), env(safe-area-inset-right)) max(var(--space-4), env(safe-area-inset-bottom)) max(var(--space-3), env(safe-area-inset-left));
  background: var(--color-bg);
  border-top: 1px solid var(--color-border);
}
.ask-field { flex: 1; }
.ask-field input { min-height: 52px; padding: 0 var(--space-4); background: var(--color-surface); border: 0; border-radius: var(--radius-pill); }
.ask-bar .btn { min-height: 52px; }

/* ─── Sheets for recipes ──────────────────────────────────────────────────── */

dialog.sheet-tall { min-height: 70dvh; }
.editor-text { min-height: 50dvh; font-size: var(--text-base); }
.diff {
  display: flex;
  flex-direction: column;
  max-height: 50dvh;
  overflow-y: auto;
  padding: var(--space-3);
  background: var(--color-surface-raised);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-4);
}
.diff-line { display: block; padding: 1px var(--space-2); white-space: pre-wrap; overflow-wrap: anywhere; text-decoration: none; }
.diff-same { color: var(--color-text-muted); }
.diff-added { color: var(--color-ok); background: var(--color-ok-bg); font-weight: 600; }
.diff-removed { color: var(--color-danger); background: var(--color-danger-bg); text-decoration: line-through; }
.photo-grid { list-style: none; margin: 0 0 var(--space-4); padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-3); }
.photo-tile { display: flex; flex-direction: column; gap: var(--space-2); }
.photo-tile img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius-md); background: var(--color-surface); }
.photo-actions { display: flex; flex-wrap: wrap; gap: var(--space-1); }
.source-text {
  margin: 0;
  padding: var(--space-3);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-family: var(--font-body);
  font-size: var(--text-base);
  background: var(--color-surface-raised);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
}

/* ─── Share page (/d/<token>) ─────────────────────────────────────────────── */

.share-page .hero { max-width: 640px; margin: 0 auto; }
.share-page .recipe-page { padding-bottom: var(--space-6); }
.share-footer { margin-top: var(--space-6); font-size: var(--text-sm); }

/* ─── Import from photos ──────────────────────────────────────────────────── */

.photo-tile .btn-small { align-self: flex-start; }
.transcript { padding: var(--space-3) var(--space-4); background: var(--color-surface); border-radius: var(--radius-md); }
.transcript summary { min-height: var(--tap-min); display: flex; align-items: center; font-weight: 600; cursor: pointer; }
.transcript .source-text { margin-top: var(--space-2); }
.source-images { display: flex; flex-direction: column; gap: var(--space-3); margin-bottom: var(--space-4); }
.source-images:empty { display: none; }
.source-image { width: 100%; height: auto; border-radius: var(--radius-md); background: var(--color-surface); }
