/* ---------- fonts (self-hosted so the app works offline) ---------- */
@font-face {
  font-family: "Inter"; src: url("fonts/inter-var.woff2") format("woff2");
  font-weight: 100 900; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Instrument Serif"; src: url("fonts/instrument-serif.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Instrument Serif"; src: url("fonts/instrument-serif-italic.woff2") format("woff2");
  font-weight: 400; font-style: italic; font-display: swap;
}

/* ---------- tokens ---------- */
:root {
  --bg: #0e0d0c;
  --bg-raised: #131210;
  --surface: #191715;
  --surface-2: #211f1c;
  --surface-3: #2b2825;
  --line: rgba(244, 239, 232, .07);
  --line-strong: rgba(244, 239, 232, .13);
  --text: #f4efe8;
  --text-2: #b4aba0;
  --text-3: #7c746b;
  --accent: #d6ad62;
  --accent-hover: #e2bd78;
  --accent-ink: #1b1509;
  --ok: #8fcfa9;
  --warn: #e8a185;
  --tile: #f3eee7;            /* backdrop for ingredient product shots */

  --serif: "Instrument Serif", "Iowan Old Style", Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --r-sm: 8px; --r: 12px; --r-lg: 18px; --r-xl: 22px;
  --shadow: 0 24px 64px -16px rgba(0, 0, 0, .7), 0 2px 8px rgba(0, 0, 0, .3);
  --ease: cubic-bezier(.2, .8, .2, 1);
  --gutter: 16px;
  color-scheme: dark;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 400 15px/1.5 var(--sans); letter-spacing: -.005em;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility;
  height: 100vh; height: 100dvh; display: flex; flex-direction: column; overflow: hidden;
}
h1, h2, h3 { margin: 0; font-weight: 400; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
::selection { background: rgba(214, 173, 98, .35); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.icon { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.muted { color: var(--text-2); }
.eyebrow {
  margin: 0; font: 600 11px/1.4 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--accent);
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 18px;
  border: 1px solid transparent; border-radius: var(--r); background: none; cursor: pointer;
  font-weight: 550; white-space: nowrap; transition: background-color .15s, border-color .15s, color .15s, opacity .15s;
}
.btn:disabled { opacity: .45; cursor: default; }
.btn-block { width: 100%; }
.btn-primary { background: var(--accent); color: var(--accent-ink); font-weight: 600; }
.btn-primary:not(:disabled):hover { background: var(--accent-hover); }
.btn-secondary { background: var(--surface-2); border-color: var(--line-strong); color: var(--text); }
.btn-secondary:not(:disabled):hover { background: var(--surface-3); }
.btn-quiet { height: 40px; padding: 0 14px; border-color: var(--line-strong); border-radius: 999px; color: var(--text); }
.btn-quiet:hover { background: var(--surface); }
.btn-text { height: 44px; padding: 0 6px; color: var(--text-2); font-weight: 500; font-size: 14px; }
.btn-text:not(:disabled):hover { color: var(--text); }
.icon-btn {
  display: grid; place-items: center; width: 40px; height: 40px; border: 0; border-radius: 999px;
  background: none; color: var(--text-2); cursor: pointer;
}
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.icon-btn .icon { width: 20px; height: 20px; }
.badge {
  display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px;
  background: var(--accent); color: var(--accent-ink); font: 650 12px/1 var(--sans); font-variant-numeric: tabular-nums;
}
.avatar {
  display: grid; place-items: center; width: 32px; height: 32px; border-radius: 999px;
  background: var(--accent); color: var(--accent-ink); font: 650 14px/1 var(--sans);
}

/* ---------- form fields ---------- */
.field { position: relative; display: flex; align-items: center; }
.field.search > .icon { position: absolute; left: 14px; color: var(--text-3); pointer-events: none; }
input[type=search], .input {
  width: 100%; height: 44px; padding: 0 14px; border: 1px solid var(--line-strong); border-radius: var(--r);
  background: var(--surface); color: var(--text); font: inherit; font-size: 15px;
  transition: border-color .15s, box-shadow .15s, background-color .15s;
}
input[type=search] { padding-left: 42px; -webkit-appearance: none; appearance: none; }
input[type=search]::-webkit-search-decoration { -webkit-appearance: none; }
input::placeholder { color: var(--text-3); }
input:hover { border-color: rgba(244, 239, 232, .2); }
input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(214, 173, 98, .18); }

/* ---------- top bar ---------- */
.topbar {
  flex: none; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: calc(env(safe-area-inset-top) + 10px) var(--gutter) 10px; background: var(--bg); border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; font: 400 1.6rem/1 var(--serif); letter-spacing: -.01em; white-space: nowrap; }
.brand-mark { width: 22px; height: 22px; fill: none; stroke: var(--accent); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.topbar-actions { display: flex; align-items: center; gap: 8px; }
.bar-btn { padding-left: 12px; padding-right: 8px; }
.bar-btn:has(.badge[hidden]) { padding-right: 14px; }
.account-btn.signed-in { padding: 0; width: 40px; border-color: transparent; }
.account-btn.signed-in:hover { background: none; }
.account-btn.signed-in:hover .avatar { background: var(--accent-hover); }

/* ---------- layout ---------- */
.layout { flex: 1; min-height: 0; display: flex; }
main {
  flex: 1; min-width: 0; overflow-y: auto; overscroll-behavior: contain;
  padding: 16px var(--gutter) calc(32px + env(safe-area-inset-bottom));
}
main > * { max-width: 1180px; margin-left: auto; margin-right: auto; }

.toolbar { display: flex; gap: 8px; }
.toolbar .search { flex: 1; min-width: 0; }
.filter-btn { height: 44px; border-radius: var(--r); padding: 0 12px 0 14px; }
.filter-btn:has(.badge[hidden]) { padding-right: 16px; }
.pill {
  flex: none; display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 14px;
  border: 1px solid var(--line-strong); border-radius: 999px; background: none; color: var(--text-2);
  font-size: 14px; font-weight: 500; white-space: nowrap; cursor: pointer; transition: all .15s;
}
.pill:hover { color: var(--text); border-color: rgba(244, 239, 232, .22); }
.pill.on { background: var(--text); border-color: var(--text); color: var(--bg); }
.pill-count { font-size: 12px; opacity: .55; font-variant-numeric: tabular-nums; }
.summary { margin: 10px 2px 16px; color: var(--text-3); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- grid of cocktails ---------- */
.group { margin-bottom: 40px; }
.group-title { display: flex; align-items: baseline; gap: 10px; margin: 12px 0 16px; font: 400 1.85rem/1.1 var(--serif); }
.count { color: var(--text-3); font: 500 13px var(--sans); font-variant-numeric: tabular-nums; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 16px; }
.card {
  position: relative; display: flex; flex-direction: column; padding: 0; overflow: hidden; text-align: left; cursor: pointer;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  content-visibility: auto; contain-intrinsic-size: auto 320px;
  transition: transform .25s var(--ease), border-color .2s, box-shadow .25s var(--ease);
}
.card:hover { transform: translateY(-2px); border-color: var(--line-strong); box-shadow: 0 12px 32px -12px rgba(0, 0, 0, .6); }
.card .photo, .card .ph { width: 100%; aspect-ratio: 4 / 5; flex: none; }
.card.ready::before {
  content: "Ready to make"; position: absolute; top: 10px; left: 10px; z-index: 1;
  padding: 4px 9px 4px 20px; border-radius: 999px; font: 600 11px/1.4 var(--sans); color: var(--ok);
  background: rgba(14, 13, 12, .72) radial-gradient(circle at 10px 50%, var(--ok) 3px, transparent 3.5px);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.card-body { padding: 12px 14px 14px; }
.card h3 { margin: 0 0 4px; font: 400 1.4rem/1.1 var(--serif); }
.card .status { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.status { margin: 0; font-size: 12.5px; color: var(--text-2); }
.status.ok, .status.warn { font-weight: 500; }
.status.ok { color: var(--ok); }
.status.warn { color: var(--warn); }
.status.ok::before, .status.warn::before {
  content: ""; display: inline-block; width: 6px; height: 6px; margin-right: 7px; vertical-align: .12em;
  border-radius: 50%; background: currentColor;
}
.empty { grid-column: 1 / -1; padding: 72px 16px; text-align: center; color: var(--text-2); }

/* cocktail photos: shown whole (contain) over a blurred, darkened copy that fills the frame */
.photo { position: relative; overflow: hidden; isolation: isolate; background: var(--surface-2); }
.photo > img { display: block; width: 100%; height: 100%; }
.photo > .main { position: relative; object-fit: contain; }
.photo > .backdrop {
  position: absolute; inset: -10%; width: 120%; height: 120%; object-fit: cover;
  filter: blur(28px) saturate(1.15) brightness(.5); transform: translateZ(0);
}
.photo > .backdrop.broken { display: none; }
.photo > .main.broken { content: url("icons/icon.svg"); padding: 30%; opacity: .5; }

/* drawn glass for drinks without a photo */
.ph {
  display: grid; place-items: center; color: rgba(244, 239, 232, .6);
  background: radial-gradient(circle at 50% 42%, #2e2925, #181614 72%);
}
.ph svg { width: 62%; height: 62%; }

/* ---------- one cocktail at a time ---------- */
main.feed-mode { display: flex; flex-direction: column; overflow: hidden; padding-bottom: 0; }
main.feed-mode > * { width: 100%; flex: none; }
.feed-mode .summary { margin-bottom: 12px; }
.feed-mode #results {
  flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain;
  scroll-snap-type: y mandatory; scrollbar-width: none;
}
.feed-mode #results::-webkit-scrollbar { display: none; }
.slide {
  height: 100%; display: flex; flex-direction: column; gap: 14px; content-visibility: auto;
  scroll-snap-align: start; scroll-snap-stop: always; padding-bottom: calc(16px + env(safe-area-inset-bottom));
}
.slide-photo {
  position: relative; flex: 1 1 0; min-height: 160px; overflow: hidden; cursor: pointer;
  border-radius: var(--r-xl); background: var(--surface-2); isolation: isolate;
}
.slide-photo > .photo, .slide-photo > .ph { position: absolute; inset: 0; width: 100%; height: 100%; }
.slide-photo > .ph svg { width: auto; height: 58%; }
.pos {
  position: absolute; z-index: 1; top: 14px; right: 14px; padding: 4px 10px; border-radius: 999px;
  background: rgba(14, 13, 12, .6); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  color: rgba(255, 255, 255, .85); font: 500 12px/1.4 var(--sans); font-variant-numeric: tabular-nums;
}
.slide-body { flex: none; max-height: 56%; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: none; }
.slide-title { margin: 0 2px 10px; }
.slide-title h2 { margin-top: 6px; font: 400 2.3rem/1 var(--serif); letter-spacing: -.01em; text-wrap: balance; }
.slide .status { margin: 0 2px 8px; font-size: 13px; }
.slide .ing-list { margin: 0 -6px; }
.recipe-btn { margin-top: 12px; }
.recipe-btn .icon { width: 16px; height: 16px; transition: transform .2s var(--ease); }
.recipe-btn:hover .icon { transform: translateX(3px); }

/* ---------- ingredient checklist (feed + recipe) ---------- */
.ing-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.ing-toggle {
  width: 100%; display: flex; align-items: center; gap: 12px; padding: 6px; text-align: left; cursor: pointer;
  background: none; border: 0; border-radius: var(--r); transition: background-color .15s;
}
.ing-toggle:hover { background: var(--surface); }
.ing-toggle .ing-img { width: 36px; height: 36px; }
.ing-toggle .ing-text { flex: 1; font-size: 14.5px; }
.ing-list .need .ing-text { color: var(--text-2); }
.ing-list em { font-style: normal; color: var(--text-3); font-size: 13px; }
.mark {
  display: grid; place-items: center; width: 26px; height: 26px; flex: none; border-radius: 999px;
  border: 1.5px solid var(--line-strong); color: var(--text-3); transition: all .15s;
}
.mark .icon { width: 14px; height: 14px; stroke-width: 2.25; }
.need .i-have, .have .i-add { display: none; }
.ing-toggle:hover .mark { border-color: rgba(244, 239, 232, .3); color: var(--text); }
.have .mark { background: var(--ok); border-color: var(--ok); color: #0d1f15; }
.have .ing-toggle:hover .mark { border-color: var(--ok); color: #0d1f15; }

/* ---------- dialogs (bottom sheet on phones, centred card on wider screens) ---------- */
dialog.sheet {
  width: min(600px, calc(100vw - 32px)); max-width: none; max-height: min(880px, 90vh); padding: 0; overflow: auto;
  border: 1px solid var(--line-strong); border-radius: var(--r-xl); background: var(--bg-raised); color: var(--text);
  box-shadow: var(--shadow); overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: var(--surface-3) transparent;
}
dialog.sheet-sm { width: min(440px, calc(100vw - 32px)); }
dialog.sheet[open] { animation: sheet-in .32s var(--ease); }
dialog::backdrop { background: rgba(5, 4, 3, .62); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); animation: fade-in .25s ease; }
@keyframes sheet-in { from { opacity: 0; transform: translateY(16px) scale(.985); } }
@keyframes fade-in { from { opacity: 0; } }
dialog > form:first-child { position: sticky; top: 0; z-index: 3; height: 0; }
.close {
  position: absolute; top: 12px; right: 12px; display: grid; place-items: center; width: 38px; height: 38px; cursor: pointer;
  border: 1px solid var(--line-strong); border-radius: 999px; color: #fff;
  background: rgba(14, 13, 12, .6); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.close:hover { background: rgba(14, 13, 12, .85); }

/* recipe */
.hero { width: 100%; height: min(56vh, 480px); }
.ph.hero svg { height: 70%; width: auto; }
.detail-content { position: relative; padding: 24px 28px 32px; }
.detail-content h2 { margin-top: 8px; font: 400 3rem/1 var(--serif); letter-spacing: -.015em; text-wrap: balance; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 30px 0 10px; }
.section-head h3 { font: 600 11px/1.4 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--text-3); }
.have-count { padding: 3px 10px; border-radius: 999px; background: var(--surface-2); color: var(--text-2); font-size: 12.5px; font-weight: 500; }
.have-count.ok { color: var(--ok); background: rgba(143, 207, 169, .1); }
.detail-content .ing-list { margin: 0 -6px; }
.steps { list-style: none; margin: 0; padding: 0; counter-reset: step; }
.steps li {
  counter-increment: step; display: grid; grid-template-columns: 34px 1fr; gap: 10px;
  padding: 12px 0; border-top: 1px solid var(--line); color: #ddd5cb; font-size: 15px; line-height: 1.6;
}
.steps li:first-child { border-top: 0; padding-top: 4px; }
.notes { margin: 0; padding: 0 0 0 18px; color: var(--text-2); font-size: 14px; line-height: 1.6; }
.notes li { margin-bottom: 6px; }
.notes li::marker { color: var(--accent); }
.steps li::before { content: counter(step, decimal-leading-zero); font: italic 400 1.3rem/1.25 var(--serif); color: var(--accent); }

/* filters */
.filters-body { padding: 28px 24px 8px; }
.filters-body h2 { font: 400 2.1rem/1.1 var(--serif); letter-spacing: -.01em; }
.filter-group { margin: 22px 0 0; padding: 0; border: 0; }
.filter-group legend {
  margin-bottom: 10px; padding: 0; font: 600 11px/1.4 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--text-3);
}
.options { display: flex; flex-wrap: wrap; gap: 8px; }
.filters-foot {
  position: sticky; bottom: 0; display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 16px 24px 20px; background: linear-gradient(to top, var(--bg-raised) 75%, transparent);
}
.filters-foot .btn-primary { flex: 1; max-width: 260px; }

/* account */
.account-body { padding: 36px 28px 28px; text-align: center; }
.account-icon {
  display: grid; place-items: center; width: 56px; height: 56px; margin: 0 auto 18px; border-radius: 999px;
  background: rgba(214, 173, 98, .1); border: 1px solid rgba(214, 173, 98, .25); color: var(--accent);
}
.account-icon .icon { width: 24px; height: 24px; }
.account-body h2 { font: 400 2.1rem/1.1 var(--serif); letter-spacing: -.01em; }
.account-body .muted { max-width: 34ch; margin: 10px auto 0; font-size: 14.5px; }
.auth-form { display: flex; flex-direction: column; gap: 12px; margin-top: 26px; text-align: left; }
.label { display: flex; flex-direction: column; gap: 6px; color: var(--text-2); font-size: 13px; font-weight: 500; }
.input { background: var(--bg); height: 46px; }
.auth-form .btn-primary { margin-top: 8px; height: 46px; }
.auth-form .btn-secondary { height: 46px; }
.form-error {
  margin: 0; padding: 10px 12px; border-radius: 10px; font-size: 13.5px;
  color: var(--warn); background: rgba(232, 161, 133, .1); border: 1px solid rgba(232, 161, 133, .2);
}
.avatar-lg { width: 64px; height: 64px; margin: 0 auto 18px; font: 400 2rem/1 var(--serif); }
.account-email { margin: 8px 0 0; color: var(--text-2); word-break: break-all; }
.sync-status { display: inline-flex; align-items: center; gap: 8px; margin: 18px 0 26px; font-size: 13px; color: var(--text-2); }
.sync-status:not(:empty)::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 3px rgba(143, 207, 169, .15); }

/* ---------- my bar (ingredients drawer) ---------- */
.scrim { position: fixed; inset: 0; z-index: 10; background: rgba(5, 4, 3, .62); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.no-scroll { overflow: hidden; }
.drawer {
  position: fixed; top: 0; bottom: 0; left: 0; z-index: 11; width: min(400px, 90vw);
  display: flex; flex-direction: column; padding: env(safe-area-inset-top) 16px 0; overflow-y: auto; overscroll-behavior: contain;
  background: var(--bg-raised); border-right: 1px solid var(--line); box-shadow: var(--shadow);
  transform: translateX(-100%); visibility: hidden; transition: transform .3s var(--ease), visibility .3s;
  scrollbar-width: thin; scrollbar-color: var(--surface-3) transparent;
}
.drawer.open { transform: none; visibility: visible; }
.drawer-top { position: sticky; top: 0; z-index: 1; margin: 0 -16px; padding: 0 16px 12px; background: var(--bg-raised); border-bottom: 1px solid var(--line); }
.drawer-head { display: flex; justify-content: space-between; align-items: flex-start; padding-top: 18px; }
.drawer-head h2 { font: 400 2rem/1 var(--serif); letter-spacing: -.01em; }
.drawer-sub { margin: 6px 0 0; color: var(--text-2); font-size: 13px; }
.drawer-head .icon-btn { margin: -6px -8px 0 0; }
.drawer-search { display: flex; gap: 6px; margin-top: 16px; }
.drawer-search .search { flex: 1; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; max-height: 92px; overflow-y: auto; scrollbar-width: none; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 8px 0 4px; cursor: pointer;
  border: 1px solid var(--line-strong); border-radius: 999px; background: var(--surface-2); font-size: 13px; font-weight: 500;
}
.chip .ing-img { width: 22px; height: 22px; border-radius: 999px; padding: 2px; }
.chip .icon { width: 14px; height: 14px; color: var(--text-3); }
.chip:hover { border-color: rgba(232, 161, 133, .4); }
.chip:hover .icon { color: var(--warn); }

.cat {
  display: flex; align-items: center; gap: 8px; margin: 24px 4px 8px;
  font: 600 11px/1.4 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--text-3);
}
.cat-count { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-size: 10.5px; letter-spacing: 0; }
.ing-column { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.ing-row {
  width: 100%; display: flex; align-items: center; gap: 12px; padding: 6px 10px 6px 6px; text-align: left; cursor: pointer;
  background: none; border: 1px solid transparent; border-radius: var(--r); transition: background-color .15s, border-color .15s;
}
.ing-row:hover { background: var(--surface); }
.ing-row.on { background: var(--surface-2); border-color: var(--line-strong); }
.ing-img { width: 40px; height: 40px; flex: none; padding: 3px; border-radius: 10px; object-fit: contain; background: var(--tile); }
.ing-fallback { display: grid; place-items: center; padding: 0; background: var(--surface-3); color: var(--text-2); font: 400 1.2rem/1 var(--serif); }
.ing-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ing-name { font-weight: 500; font-size: 14.5px; }
.ing-uses { font-size: 12px; color: var(--text-3); }
.tick {
  display: grid; place-items: center; width: 22px; height: 22px; flex: none; border-radius: 999px;
  border: 1.5px solid var(--line-strong); color: transparent; transition: all .15s;
}
.tick .icon { width: 13px; height: 13px; stroke-width: 2.5; }
.ing-row.on .tick { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.drawer-foot {
  position: sticky; z-index: 1; bottom: 0; margin: auto -16px 0; padding: 16px 16px calc(16px + env(safe-area-inset-bottom));
  background: linear-gradient(to top, var(--bg-raised) 70%, transparent);
}
.drawer-foot .btn { height: 48px; box-shadow: 0 8px 24px -8px rgba(214, 173, 98, .45); }

/* ---------- responsive ---------- */
@media (max-width: 640px) {
  dialog.sheet, dialog.sheet-sm {
    width: 100%; max-height: 92dvh; margin: auto 0 0; border-radius: var(--r-xl) var(--r-xl) 0 0; border-bottom: 0;
    padding-bottom: env(safe-area-inset-bottom);
  }
  @keyframes sheet-in { from { transform: translateY(100%); } }
  .hero { height: 46vh; }
  .detail-content { padding: 20px 20px 28px; }
  .detail-content h2 { font-size: 2.5rem; }
}
@media (max-width: 480px) {
  .brand { font-size: 1.45rem; gap: 8px; }
  .account-btn:not(.signed-in) { width: 40px; padding: 0; }
  .account-btn .btn-label { display: none; }
  .summary { margin: 8px 2px 12px; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .card h3 { font-size: 1.25rem; }
  .card-body { padding: 10px 12px 12px; }
  .group-title { font-size: 1.6rem; }
  .slide-title h2 { font-size: 2rem; }
}
@media (max-width: 360px) { .bar-btn .btn-label, .filter-btn .btn-label { display: none; } }

/* wide, landscape screens: photo on the left, the details beside it */
@media (min-width: 700px) and (min-aspect-ratio: 1/1) {
  .slide { flex-direction: row; gap: 32px; padding-bottom: 24px; }
  .slide-photo { flex: 1 1 56%; min-height: 0; }
  .slide-body { flex: 1 1 44%; max-width: 460px; max-height: 100%; align-self: center; }
  .slide-title { margin-bottom: 16px; }
  .slide-title h2 { margin-top: 8px; font-size: 3.4rem; letter-spacing: -.015em; }
}

/* desktop: the bar is always visible on the left */
@media (min-width: 900px) {
  :root { --gutter: 24px; }
  #menu-btn, #menu-close, .drawer-foot, .scrim { display: none !important; }
  .drawer {
    position: static; width: 340px; flex: none; padding: 0 16px 24px; transform: none; visibility: visible;
    z-index: auto; box-shadow: none; background: var(--bg);
  }
  .drawer-top { background: var(--bg); }
  main { padding-top: 20px; }
}

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