[hidden] { display: none !important; }
body { margin: 0; }
img { max-width: 100%; }
/* Layout: phone-first app shell — sticky header, one scrolling view, fixed bottom tab bar. */
:root {
  /* Opa's Table: cream paper, dark-brown serif type, forest green, gold leaf accents. Single light look by design. */
  --bg: #FAF3E6; --surface: #FFFDF8; --ink: #2E2219; --muted: #6F6152; --line: #E7DCC7;
  --accent: #2F4B2C; --accent-ink: #FFFFFF; --accent-soft: #E6ECDD;
  --spice: #A2491C; --spice-soft: #F7E4D5;
  --berry: #7A5B17; --berry-soft: #F4E8C9;
  --gold: #B98A2E; --sage: #7E8C68; --flame: #C8602A;
  --danger: #A33A22; --danger-soft: #F8E1DA;
  --shadow: 0 1px 2px rgba(60,40,20,.06), 0 6px 18px rgba(60,40,20,.07);
  --wordmark: "Libre Caslon Display", "Libre Caslon Text", Georgia, serif;
  --display: "Libre Caslon Text", Georgia, "Times New Roman", serif;
  --body: "Source Sans 3", -apple-system, "Segoe UI", system-ui, sans-serif;
  --navh: 64px;
  color-scheme: light;
}
* { box-sizing: border-box; }
body { background: var(--bg); color: var(--ink); font: 16px/1.5 var(--body); -webkit-tap-highlight-color: transparent; }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 30; background: var(--bg); }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
html { -webkit-text-size-adjust: 100%; }
h1, h2, h3 { font-family: var(--display); text-wrap: balance; margin: 0; letter-spacing: -0.01em; }

.wrap { max-width: 760px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
header.top { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; background: var(--bg); border-bottom: 1px solid var(--line); }
header.top .wrap { display: flex; align-items: center; gap: 12px; padding-block: 12px; }
.brand { font-family: var(--display); font-weight: 800; font-size: 22px; display: flex; align-items: center; gap: 10px; }
.brand svg { flex: none; }
.top .spacer { flex: 1; }
.status { font-size: 13px; color: var(--muted); }
main { padding-block: 16px calc(var(--navh) + 32px + env(safe-area-inset-bottom, 0px)); }

nav.tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; background: var(--surface); border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom, 0px); padding-left: env(safe-area-inset-left, 0px); padding-right: env(safe-area-inset-right, 0px); }
nav.tabs .inner { max-width: 760px; margin: 0 auto; display: grid; grid-template-columns: repeat(3, 1fr); height: var(--navh); }
nav.tabs a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; text-decoration: none; color: var(--muted); font-size: 12px; font-weight: 600; position: relative; }
nav.tabs a[aria-current="page"] { color: var(--accent); }
nav.tabs svg { width: 24px; height: 24px; }
.badge { position: absolute; top: 6px; left: calc(50% + 6px); background: var(--accent); color: var(--accent-ink); font-size: 11px; font-weight: 700; min-width: 18px; height: 18px; border-radius: 9px; padding: 0 5px; display: grid; place-items: center; font-variant-numeric: tabular-nums; }

/* search + filters */
.search { position: relative; }
.search input { width: 100%; padding: 12px 14px 12px 42px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); font-size: 17px; }
.search svg { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.filters { display: grid; gap: 10px; margin-top: 14px; }
.frow { display: grid; grid-template-columns: 92px minmax(0, 1fr); align-items: center; gap: 8px; }
.flabel { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.chips { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-block: 2px; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; border: 1px solid transparent; border-radius: 999px; padding: 6px 12px; font-size: 14px; font-weight: 600; white-space: nowrap; background: var(--surface); border-color: var(--line); color: var(--ink); }
.chip.ingredient[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.chip.method[aria-pressed="true"] { background: var(--spice); color: var(--surface); border-color: var(--spice); }
.chip.style[aria-pressed="true"] { background: var(--berry); color: var(--surface); border-color: var(--berry); }
.chip .n { font-weight: 500; opacity: .65; margin-left: 4px; font-variant-numeric: tabular-nums; }
.resultbar { display: flex; align-items: center; justify-content: space-between; margin: 18px 0 10px; font-size: 14px; color: var(--muted); }
.link { background: none; border: 0; color: var(--accent); font-weight: 600; padding: 4px 0; }

/* cards */
.list { display: grid; gap: 10px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 12px; align-items: start; box-shadow: var(--shadow); }
.card a.title { color: var(--ink); text-decoration: none; font-family: var(--display); font-weight: 600; font-size: 18px; line-height: 1.25; }
.card a.title::after { content: ""; position: absolute; inset: 0; }
.card { position: relative; }
.card .sub { grid-column: 1; font-size: 13px; color: var(--muted); }
.card .tags { grid-column: 1 / -1; }
.addbtn { position: relative; z-index: 1; border: 1px solid var(--line); background: var(--bg); border-radius: 10px; padding: 6px 10px; font-size: 13px; font-weight: 700; color: var(--accent); white-space: nowrap; }
.addbtn[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.tags { display: flex; flex-wrap: wrap; gap: 4px; }
.tag { font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 6px; }
.tag.ingredient { background: var(--accent-soft); color: var(--accent); }
.tag.method { background: var(--spice-soft); color: var(--spice); }
.tag.style { background: var(--berry-soft); color: var(--berry); }
.warn { display: inline-block; font-size: 12px; font-weight: 700; color: var(--danger); background: var(--danger-soft); padding: 2px 8px; border-radius: 6px; }

.empty { text-align: center; padding: 40px 16px; color: var(--muted); }
.empty h2 { color: var(--ink); font-size: 20px; margin-bottom: 6px; }
.btn { border: 1px solid var(--line); background: var(--surface); border-radius: 12px; padding: 10px 16px; font-weight: 700; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.danger { color: var(--danger); }
.btn.danger.solid { background: var(--danger); border-color: var(--danger); color: var(--surface); }
.btn:disabled { opacity: .5; cursor: default; }

/* detail */
.back { display: inline-flex; align-items: center; gap: 4px; color: var(--accent); text-decoration: none; font-weight: 600; margin-bottom: 10px; }
.dhead h1 { font-size: clamp(26px, 6vw, 34px); line-height: 1.1; font-weight: 800; }
.source { color: var(--muted); font-size: 14px; margin-top: 6px; }
.meta { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 12px 0; font-size: 14px; }
.meta span b { font-weight: 700; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 6px; }
.section { margin-top: 26px; }
.section > h2 { font-size: 20px; margin-bottom: 8px; display: flex; align-items: baseline; gap: 8px; }
.section > h2 small { font-family: var(--body); font-size: 13px; color: var(--muted); font-weight: 500; }
.group h3 { font-family: var(--body); font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 16px 0 4px; }
ul.ing { list-style: none; padding: 0; margin: 0; }
ul.ing li { padding: 9px 0; border-bottom: 1px solid var(--line); }
ol.steps { list-style: none; padding: 0; margin: 0; counter-reset: s; display: grid; gap: 4px; }
ol.steps li { counter-increment: s; display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 10px; padding: 10px 8px 10px 0; border-radius: 10px; cursor: pointer; }
ol.steps li::before { content: counter(s); width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); font-weight: 700; font-size: 14px; font-variant-numeric: tabular-nums; }
ol.steps li.done { opacity: .45; }
ol.steps li.done::before { content: "✓"; background: var(--accent); color: var(--accent-ink); }
ol.steps b { display: block; }
.notes { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 4px 16px; }
.notes ul { padding-left: 18px; }
.confirm { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; background: var(--danger-soft); border-radius: 12px; padding: 10px 12px; margin-top: 8px; }

/* shopping */
.shophead { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.shophead h1 { font-size: 28px; font-weight: 800; }
.progress { font-size: 14px; color: var(--muted); font-variant-numeric: tabular-nums; }
.bar { height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; margin: 10px 0 14px; }
.bar i { display: block; height: 100%; background: var(--accent); transition: width .25s; }
.cooking { display: flex; flex-wrap: wrap; gap: 6px; }
.rchip { display: inline-flex; align-items: center; gap: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 4px 4px 4px 12px; font-size: 13px; font-weight: 600; max-width: 100%; }
.rchip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rchip button { border: 0; background: var(--bg); width: 24px; height: 24px; border-radius: 50%; flex: none; color: var(--muted); }
.addrow { display: flex; gap: 8px; margin: 14px 0; }
.addrow input { flex: 1; min-width: 0; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); }
.toolbar { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; font-size: 14px; }
.toolbar label { display: inline-flex; gap: 6px; align-items: center; }
.aisle { margin-top: 20px; }
.aisle h2 { font-family: var(--body); font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; display: flex; justify-content: space-between; }
.aisle h2 span { font-variant-numeric: tabular-nums; letter-spacing: 0; }
.checklist { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.item { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 12px; align-items: start; width: 100%; text-align: left; background: none; border: 0; border-bottom: 1px solid var(--line); padding: 12px 14px; min-height: 52px; }
.item:last-child { border-bottom: 0; }
.box { width: 26px; height: 26px; border-radius: 8px; border: 2px solid var(--line); display: grid; place-items: center; transition: background .15s, border-color .15s; }
.box svg { opacity: 0; }
.item[aria-checked="true"] .box { background: var(--accent); border-color: var(--accent); }
.item[aria-checked="true"] .box svg { opacity: 1; }
.item .name { font-weight: 600; font-size: 17px; line-height: 1.3; }
.item .opt { font-size: 11px; font-weight: 700; color: var(--muted); border: 1px solid var(--line); border-radius: 5px; padding: 0 5px; margin-left: 6px; vertical-align: 2px; }
.item .uses { font-size: 13px; color: var(--muted); margin-top: 2px; display: grid; gap: 1px; }
.item .uses div { overflow-wrap: anywhere; }
.item[aria-checked="true"] .name { text-decoration: line-through; color: var(--muted); }
.item[aria-checked="true"] .uses { display: none; }

/* form */
form.edit { display: grid; gap: 18px; }
.field { display: grid; gap: 6px; }
.field label, .field .lbl { font-weight: 700; font-size: 14px; }
.field .hint { font-size: 13px; color: var(--muted); }
.field input[type=text], .field textarea { width: 100%; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); font-size: 16px; }
.field textarea { min-height: 140px; resize: vertical; line-height: 1.45; }
.tagedit { display: grid; gap: 8px; }
.tagedit .chips { flex-wrap: wrap; overflow: visible; }
.tagedit input { padding: 6px 12px; border-radius: 999px; border: 1px dashed var(--line); background: transparent; font-size: 14px; width: 160px; }
details.paste { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
details.paste summary { font-weight: 700; cursor: pointer; }
details.paste[open] summary { margin-bottom: 10px; }
.formbar { display: flex; gap: 8px; flex-wrap: wrap; }
.err { color: var(--danger); font-weight: 600; font-size: 14px; }
.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--navh) + 16px + env(safe-area-inset-bottom, 0px)); background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 10px; font-weight: 600; font-size: 14px; z-index: 40; max-width: calc(100% - 32px); }
.notice { background: var(--spice-soft); color: var(--ink); border-radius: 12px; padding: 12px 14px; font-size: 14px; margin-bottom: 14px; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* website additions */
:root { padding-top: 0; }
header.top { padding-top: env(safe-area-inset-top, 0px); top: 0; }
body::before { display: none; }
.who { display: flex; align-items: center; gap: 8px; }
.who .btn { padding: 6px 12px; font-size: 14px; }
.signedin { font-size: 13px; color: var(--accent); font-weight: 700; }
.importbox { background: var(--accent-soft); border-radius: 14px; padding: 14px; display: grid; gap: 8px; }
.importbox .row { display: flex; gap: 8px; }
.importbox input { flex: 1; min-width: 0; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); font-size: 16px; }
.importbox .lbl { font-weight: 700; }
.hero-img { width: 100%; max-height: 300px; object-fit: cover; border-radius: 14px; margin: 6px 0 4px; background: var(--line); }
.source a { color: var(--accent); }
.signin { max-width: 420px; margin: 24px auto; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 20px; display: grid; gap: 14px; box-shadow: var(--shadow); }
.signin h1 { font-size: 26px; font-weight: 800; }
.signin input { width: 100%; padding: 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); font-size: 17px; }
.spinner { display: inline-block; width: 14px; height: 14px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; vertical-align: -2px; margin-right: 6px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* favorites */
.chip.fav[aria-pressed="true"] { background: var(--gold); color: #FFFFFF; border-color: var(--gold); }
.cardbtns { position: relative; z-index: 1; display: flex; gap: 6px; align-items: center; }
.favbtn { border: 1px solid var(--line); background: var(--bg); border-radius: 10px; width: 36px; height: 32px; font-size: 18px; line-height: 1; color: var(--danger); }
.favbtn[aria-pressed="true"] { background: var(--danger-soft); border-color: var(--danger-soft); }
.opabadge { display: inline-block; font-size: 12px; font-weight: 800; color: #8A5A10; background: #FBEFD5; padding: 2px 8px; border-radius: 6px; }
.opabadge.big { font-size: 13px; margin-bottom: 8px; }
.btn.opatoggle[aria-pressed="true"] { background: #FBEFD5; border-color: #EBCB8B; color: #8A5A10; }
.btn.favtoggle[aria-pressed="true"] { background: var(--danger-soft); border-color: var(--danger-soft); color: var(--danger); }
.desc { font-size: 17px; line-height: 1.55; margin: 10px 0 4px; max-width: 65ch; }
.opacheck { display: flex; gap: 10px; align-items: center; font-weight: 700; }
.opacheck input { width: 20px; height: 20px; }
.people { display: flex; flex-wrap: wrap; gap: 8px; }
.people .chip { font-size: 16px; padding: 8px 16px; }
.people .chip.on { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
a.signedin { text-decoration: none; }

/* speak a recipe */
.speakbtn { display: flex; gap: 12px; align-items: center; text-decoration: none; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.speakbtn .mic { font-size: 26px; }
.speakbtn small { color: var(--muted); font-size: 13px; }
.voice { display: grid; gap: 14px; }
.voice h1 { font-size: 28px; font-weight: 800; }
.vsteps { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.vdot { flex: none; border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 5px 12px; font-size: 13px; font-weight: 600; color: var(--muted); }
.vdot.done { color: var(--accent); border-color: var(--accent); }
.vdot.on { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.vhint { margin: 0; font-size: 16px; }
.vex { color: var(--muted); font-style: italic; }
.micbtn { position: relative; justify-self: center; display: grid; justify-items: center; gap: 8px; border: 0; background: none; color: var(--accent); font-weight: 700; padding: 8px; }
.micbtn svg { width: 84px; height: 84px; padding: 22px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); box-sizing: border-box; }
.micbtn[aria-pressed="true"] svg { background: var(--danger); }
.micbtn[aria-pressed="true"] .ring { position: absolute; top: 8px; width: 84px; height: 84px; border-radius: 50%; border: 3px solid var(--danger); animation: pulse 1.4s ease-out infinite; }
@keyframes pulse { from { transform: scale(1); opacity: .8; } to { transform: scale(1.45); opacity: 0; } }
#vinterim { font-style: italic; min-height: 1.2em; }

/* ===== Opa's Table design ===== */
body { font-size: 17px; }
h1, h2, h3 { font-weight: 700; letter-spacing: 0; }
.wrap { max-width: 1120px; }

/* header */
header.top { background: rgba(250,243,230,.96); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); border-bottom: 1px solid var(--line); }
header.top .wrap { padding-block: 10px; gap: 16px; }
.brand { gap: 10px; font-family: var(--wordmark); font-weight: 400; font-size: 27px; letter-spacing: -.01em; color: var(--ink); line-height: 1; }
.brand img { width: 46px; height: auto; display: block; }
.brand .wm { display: grid; gap: 3px; }
.brand .wm small { display: block; height: 8px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 140 8'%3E%3Cpath d='M0 4h58M82 4h58' stroke='%23B98A2E' stroke-width='1'/%3E%3Ccircle cx='70' cy='4' r='2.2' fill='%23B98A2E'/%3E%3Cpath d='M62 4c2-3 4-3 5 0M78 4c-2-3-4-3-5 0' stroke='%237E8C68' stroke-width='1.2' fill='none'/%3E%3C/svg%3E") center / contain no-repeat; }
.topnav { display: none; gap: 26px; margin-left: 18px; }
.topnav a { text-decoration: none; color: var(--ink); font-size: 13px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; padding: 6px 0; border-bottom: 2px solid transparent; }
.topnav a[aria-current="page"] { border-bottom-color: var(--gold); }
.who .btn { background: transparent; }
.signedin { color: var(--accent); }
@media (min-width: 900px) {
  .topnav { display: flex; }
  nav.tabs { display: none; }
  main { padding-bottom: 48px; }
  .toast { bottom: 24px; }
}
@media (max-width: 520px) { .brand { font-size: 23px; } .brand img { width: 38px; } .who .signedin { display: none; } }

/* buttons */
.btn { border-radius: 8px; font-weight: 700; border-color: var(--line); background: var(--surface); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: 0 2px 6px rgba(47,75,44,.25); }
.btn.big { padding: 14px 26px; font-size: 15px; letter-spacing: .1em; text-transform: uppercase; display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.btn.ghost { background: transparent; border: 1px solid var(--accent); color: var(--accent); }

/* ornament headings */
.orn { display: flex; align-items: center; justify-content: center; gap: 12px; font-family: var(--body); font-size: 14px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--ink); margin: 0 0 16px; }
.orn::before, .orn::after { content: ""; width: 70px; height: 10px; flex: none; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 70 10'%3E%3Cpath d='M0 5h44' stroke='%232E2219' stroke-width='1'/%3E%3Cpath d='M47 5c3-4 7-5 10-4-1 3-6 5-10 4z' fill='%232F4B2C'/%3E%3Cpath d='M47 5c3 4 7 5 10 4-1-3-6-5-10-4z' fill='%232F4B2C'/%3E%3Cpath d='M57 5c3-4 7-5 10-4-1 3-6 5-10 4z' fill='%232F4B2C'/%3E%3Cpath d='M57 5c3 4 7 5 10 4-1-3-6-5-10-4z' fill='%232F4B2C'/%3E%3C/svg%3E") center / contain no-repeat; }
.orn::after { transform: scaleX(-1); }
.orn.left { justify-content: flex-start; }
.orn.left::before { display: none; }
.divider { display: block; width: 180px; height: 12px; margin: 10px auto 0; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 180 12'%3E%3Cpath d='M0 6h74M106 6h74' stroke='%232F4B2C' stroke-width='1'/%3E%3Ccircle cx='90' cy='6' r='3' fill='%232F4B2C'/%3E%3C/svg%3E") center / contain no-repeat; }

/* hero */
.hero { display: grid; gap: 18px; align-items: center; margin: 4px 0 30px; }
.hero .copy { display: grid; gap: 14px; justify-items: start; }
.hero .sprig { width: 120px; height: 14px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 14'%3E%3Cpath d='M0 7h120' stroke='%232F4B2C' stroke-width='1'/%3E%3Cpath d='M8 7c4-5 9-6 13-5-1 4-8 6-13 5z' fill='%232F4B2C'/%3E%3Cpath d='M8 7c4 5 9 6 13 5-1-4-8-6-13-5z' fill='%232F4B2C'/%3E%3Cpath d='M21 7c4-5 9-6 13-5-1 4-8 6-13 5z' fill='%232F4B2C'/%3E%3Cpath d='M21 7c4 5 9 6 13 5-1-4-8-6-13-5z' fill='%232F4B2C'/%3E%3C/svg%3E") left / contain no-repeat; }
.hero h1 { font-family: var(--wordmark); font-weight: 400; font-size: clamp(46px, 9vw, 84px); line-height: .98; color: #2B3D24; }
.hero .tagline { font-family: var(--display); font-size: clamp(19px, 3vw, 26px); color: #5A3E22; margin: 0; }
.hero .ctas { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px; }
.hero .photo { position: relative; border-radius: 14px; overflow: hidden; aspect-ratio: 704 / 316; max-width: 100%; }
.hero .photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
@media (min-width: 900px) {
  .hero { grid-template-columns: 0.9fr 1.1fr; gap: 0; margin-top: 12px; }
  .hero .copy { padding-right: 10px; position: relative; z-index: 1; }
  .hero .photo { border-radius: 0 14px 14px 0; aspect-ratio: 704 / 380; }
  .hero .photo::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, var(--bg) 0%, rgba(250,243,230,0) 22%); z-index: 1; }
}

/* categories */
.cats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 34px; }
@media (min-width: 900px) { .cats { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 14px; } }
.cat { border: 1px solid var(--line); border-radius: 10px; background: var(--surface); padding: 0; overflow: hidden; text-align: left; display: grid; box-shadow: var(--shadow); transition: transform .15s, box-shadow .15s; }
.cat:hover { transform: translateY(-2px); }
.cat[aria-pressed="true"] { outline: 3px solid var(--gold); outline-offset: 1px; }
.cat img { width: 100%; aspect-ratio: 1 / 0.95; object-fit: cover; display: block; }
.cat span { display: flex; align-items: baseline; justify-content: space-between; gap: 4px; padding: 9px 10px; font-family: var(--display); font-size: 14px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink); }
.cat span i { font-family: var(--body); font-style: normal; font-weight: 600; font-size: 12px; color: var(--muted); letter-spacing: 0; }

/* browse section */
.browse { scroll-margin-top: 80px; }
.search input { border-radius: 10px; background: var(--surface); }
.flabel { color: var(--accent); }
.chip { background: var(--surface); }
.chip.ingredient[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); }
.chip.method[aria-pressed="true"] { background: var(--spice); border-color: var(--spice); color: #fff; }
.chip.style[aria-pressed="true"] { background: var(--berry); border-color: var(--berry); color: #fff; }
.catpill { display: inline-flex; align-items: center; gap: 6px; background: var(--gold); color: #fff; border: 0; border-radius: 999px; padding: 4px 6px 4px 12px; font-weight: 700; font-size: 14px; }
.catpill b { background: rgba(255,255,255,.25); border-radius: 50%; width: 20px; height: 20px; display: grid; place-items: center; font-size: 12px; }

/* recipe cards */
.list { grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 14px; }
.card { border-radius: 12px; padding: 0; overflow: hidden; grid-template-columns: 1fr; gap: 0; align-content: start; }
.card .thumb { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; background: var(--line); }
.card .body { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 10px; padding: 14px 16px 16px; }
.card a.title { font-family: var(--display); font-weight: 700; font-size: 19px; line-height: 1.25; color: var(--ink); }
.card .sub { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; font-size: 14px; }
.card .sub .ic { display: inline-flex; align-items: center; gap: 4px; }
.card .sub svg { color: var(--accent); }
.tag { border-radius: 5px; }
.addbtn { border-radius: 8px; background: var(--surface); }
.opabadge { background: var(--berry-soft); color: var(--berry); }
.btn.opatoggle[aria-pressed="true"] { background: var(--berry-soft); border-color: #E5CF97; color: var(--berry); }

/* recipe page */
.rp { display: grid; gap: 18px; }
.rp-head { text-align: center; display: grid; justify-items: center; gap: 6px; }
.rp-head h1 { font-family: var(--display); font-size: clamp(30px, 6vw, 46px); line-height: 1.12; max-width: 22ch; color: #3A2616; }
.rp-photo { width: 100%; max-height: 440px; object-fit: cover; border-radius: 14px; display: block; box-shadow: var(--shadow); }
.rp .desc { text-align: center; margin: 0 auto; color: #4A3A2C; }
.stats { display: flex; flex-wrap: wrap; justify-content: center; border-top: 1px solid var(--accent); border-bottom: 1px solid var(--accent); padding-block: 12px; gap: 10px 0; }
.stat { display: flex; align-items: center; gap: 10px; padding: 2px 22px; border-right: 1px solid var(--line); }
.stat:last-child { border-right: 0; }
.stat svg { width: 30px; height: 30px; color: var(--accent); flex: none; }
.stat div { display: grid; line-height: 1.2; }
.stat small { font-size: 14px; color: var(--muted); }
.stat b { font-size: 16px; }
@media (max-width: 520px) { .stat { padding: 2px 12px; } .stat svg { width: 24px; height: 24px; } }
.rp .tags, .rp .actions { justify-content: center; }
.rp .actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; }
.cols { display: grid; gap: 28px; margin-top: 6px; }
@media (min-width: 860px) { .cols { grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.25fr); gap: 0; } .cols > section:first-child { padding-right: 32px; border-right: 1px solid var(--line); } .cols > section:last-child { padding-left: 32px; } }
.cols h2, .sides h2 { display: flex; align-items: center; gap: 10px; font-family: var(--display); font-size: 21px; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); padding-bottom: 8px; border-bottom: 1px solid var(--accent); margin-bottom: 8px; }
.cols h2 small { font-family: var(--body); text-transform: none; letter-spacing: 0; font-size: 13px; color: var(--muted); font-weight: 500; margin-left: auto; }
ul.ing li { border-bottom: 0; padding: 6px 0 6px 18px; position: relative; }
ul.ing li::before { content: ""; position: absolute; left: 2px; top: 15px; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.group h3 { color: var(--accent); }
ol.steps li::before { background: var(--accent); color: #fff; font-family: var(--body); }
ol.steps li.done::before { background: var(--gold); }
ol.steps b { display: inline; margin-right: 4px; }
ol.steps b::after { content: ":"; }
.tip { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 14px; align-items: start; background: var(--surface); border: 1px solid var(--accent); border-radius: 12px; padding: 16px; margin-top: 10px; }
.tip .ico { width: 52px; height: 52px; border-radius: 50%; background: var(--accent); display: grid; place-items: center; color: #fff; }
.tip h2 { font-family: var(--display); font-size: 19px; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); margin-bottom: 4px; }
.tip p { margin: 4px 0 0; }
.sides { margin-top: 8px; }
.sides .list { grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); }
.sides .card .body { grid-template-columns: 1fr; }
.sides .card a.title { font-size: 17px; }
.sides .viewlink { color: var(--accent); font-weight: 700; font-size: 14px; }

@media (max-width: 600px) {
  .hero { margin-bottom: 24px; gap: 14px; }
  .hero .copy { gap: 10px; }
  .hero h1 { font-size: 48px; }
  .hero .tagline { font-size: 19px; }
  .btn.big { padding: 11px 14px; font-size: 13px; letter-spacing: .08em; gap: 6px; }
  .hero .ctas { flex-wrap: nowrap; }
  .orn { font-size: 13px; letter-spacing: .12em; }
  .orn::before, .orn::after { width: 50px; }
  .cat span { font-size: 12px; padding: 7px 8px; letter-spacing: .03em; }
}
