/* ── Tokens (same palette as the live page: Bier-Gold by day, Nacht-Bar by night) ── */
:root {
  --bg-1: #fdfbf7;
  --bg-2: #f0e4c8;
  --text: #3d2c05;
  --text-muted: #6b5836;
  --surface: rgba(255, 255, 255, 0.55);
  --line: rgba(61, 44, 5, 0.14);
  --accent: #e6b32e;
  --accent-ink: #3d2c05;
  --ledge: rgba(61, 44, 5, 0.18);
  --glow-strength: 38%;

  --abv-none: #1f8a70;
  --abv-light: #b98a0b;
  --abv-medium: #d9701c;
  --abv-strong: #b3261e;
  --abv-unknown: #7a7a7a;

  --font: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --radius: 14px;
}

body.dark-mode {
  --bg-1: #1a1816;
  --bg-2: #070706;
  --text: #f1ece2;
  --text-muted: #b0a794;
  --surface: rgba(30, 27, 23, 0.7);
  --line: rgba(255, 255, 255, 0.1);
  --accent: #ffc107;
  --accent-ink: #1a1304;
  --ledge: rgba(255, 255, 255, 0.16);
  --glow-strength: 20%;

  --abv-none: #4cc2a2;
  --abv-light: #e3b53a;
  --abv-medium: #f0903f;
  --abv-strong: #ef6a5f;
  --abv-unknown: #9a9a9a;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--font);
  color: var(--text);
  line-height: 1.5;
  background: radial-gradient(circle at top left, var(--bg-1), var(--bg-2));
  background-attachment: fixed;
}

a { color: inherit; }

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

.rz-skip {
  position: absolute;
  left: 12px;
  top: -60px;
  background: var(--accent);
  color: var(--accent-ink);
  padding: 8px 14px;
  border-radius: 8px;
  z-index: 10;
}
.rz-skip:focus { top: 12px; }

/* ── Header / footer ── */
.rz-header {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 14px max(16px, calc((100vw - 1180px) / 2));
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
  background: var(--surface);
  position: sticky;
  top: 0;
  z-index: 5;
}
.rz-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 800;
  letter-spacing: -0.01em;
}
.rz-nav { display: flex; gap: 6px; margin-left: auto; }
.rz-nav a {
  text-decoration: none;
  padding: 6px 12px;
  border-radius: 999px;
  color: var(--text-muted);
  font-weight: 600;
}
.rz-nav a:hover { color: var(--text); }
.rz-nav a.is-current { background: var(--accent); color: var(--accent-ink); }
.rz-theme {
  border: 1px solid var(--line);
  background: transparent;
  border-radius: 999px;
  width: 38px;
  height: 38px;
  font-size: 1.05rem;
  cursor: pointer;
  color: inherit;
}

.rz-main {
  flex: 1;
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 28px 16px 56px;
}

.rz-footer {
  text-align: center;
  padding: 1.5rem;
  font-size: 0.8rem;
  opacity: 0.7;
  margin-top: auto;
}
.rz-footer p { margin: 0; }
.rz-footer a { color: inherit; text-decoration: none; }

/* ── Headings ── */
.rz-hero { max-width: 62ch; margin-bottom: 22px; }
.rz-main h1 {
  margin: 0 0 8px;
  font-size: clamp(2rem, 5.5vw, 3.4rem);
  line-height: 1.05;
  font-weight: 800;
  letter-spacing: -0.03em;
}
.rz-main h2 { font-size: 1.25rem; letter-spacing: -0.01em; margin: 28px 0 6px; }
.rz-lead { font-size: 1.1rem; color: var(--text-muted); margin: 0 0 8px; max-width: 60ch; }
.rz-note { color: var(--text-muted); margin: 4px 0 12px; max-width: 62ch; }

/* ── Controls ── */
.rz-controls {
  display: grid;
  grid-template-columns: minmax(200px, 340px) 1fr auto;
  gap: 12px 18px;
  align-items: center;
  margin: 0 0 14px;
}
.rz-controls[hidden] { display: none; }
.rz-search,
.rz-sort select {
  font: inherit;
  color: inherit;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  width: 100%;
}
.rz-sort { display: flex; align-items: center; gap: 8px; color: var(--text-muted); font-size: 0.9rem; }
.rz-sort select { width: auto; }
.rz-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.rz-chip {
  font: inherit;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  color: var(--text);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 14px;
}
.rz-chip:hover { border-color: var(--text-muted); }
.rz-chip.is-active { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.rz-count { color: var(--text-muted); margin: 0 0 12px; font-size: 0.9rem; }
.rz-empty { text-align: center; color: var(--text-muted); padding: 40px 0; }

/* ── Gallery ── */
.rz-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 16px;
}
.rz-grid-compact { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
.rz-card[hidden] { display: none; }

.rz-card-link {
  display: flex;
  flex-direction: column;
  height: 100%;
  text-decoration: none;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
  transition: transform 0.18s ease, border-color 0.18s ease;
}
.rz-card-link:hover { transform: translateY(-3px); border-color: var(--glow, var(--accent)); }

/* The glass stands on a lit ledge and glows in the colour of its biggest layer. */
.rz-card-glass,
.rz-stage {
  position: relative;
  display: grid;
  place-items: end center;
  background:
    radial-gradient(ellipse 70% 62% at 50% 62%, color-mix(in srgb, var(--glow, var(--accent)) var(--glow-strength), transparent), transparent 72%);
}
.rz-card-glass { padding: 18px 0 0; height: 220px; }
.rz-card-glass::after,
.rz-stage::after {
  content: "";
  position: absolute;
  left: 8%;
  right: 8%;
  bottom: 14px;
  height: 2px;
  border-radius: 2px;
  background: var(--ledge);
}
.rz-card-glass svg { height: 100%; width: auto; max-width: 100%; margin-bottom: 11px; position: relative; z-index: 1; }

.rz-card-body { padding: 12px 14px 16px; }
.rz-card-body h3 { margin: 0 0 2px; font-size: 1.1rem; letter-spacing: -0.01em; }
.rz-card-ingredients {
  margin: 0 0 10px;
  color: var(--text-muted);
  font-size: 0.88rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.rz-card-compact .rz-card-glass { height: 170px; }

/* ── Badges ── */
.rz-badges { display: flex; flex-wrap: wrap; gap: 6px; }
.rz-badge {
  font-size: 0.8rem;
  font-weight: 600;
  padding: 2px 9px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--text-muted);
  white-space: nowrap;
}
.rz-badge.rz-abv { color: var(--abv-c, var(--text)); border-color: currentColor; }
.rz-abv-none { --abv-c: var(--abv-none); }
.rz-abv-light { --abv-c: var(--abv-light); }
.rz-abv-medium { --abv-c: var(--abv-medium); }
.rz-abv-strong { --abv-c: var(--abv-strong); }
.rz-abv-unknown { --abv-c: var(--abv-unknown); }

/* ── Detail ── */
.rz-crumbs { font-size: 0.88rem; color: var(--text-muted); margin-bottom: 18px; }
.rz-crumbs a { text-decoration: none; }
.rz-crumbs a:hover { text-decoration: underline; }

.rz-detail {
  display: grid;
  grid-template-columns: minmax(240px, 380px) 1fr;
  gap: 36px;
  align-items: start;
}
.rz-stage {
  position: sticky;
  top: 84px;
  height: 480px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background-color: var(--surface);
  padding-top: 26px;
  overflow: hidden;
}
.rz-stage::after { bottom: 34px; }
.rz-stage svg { height: 100%; width: auto; max-width: 100%; margin-bottom: 31px; position: relative; z-index: 1; }

.rz-author { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; color: var(--text-muted); }
.rz-author img { border-radius: 50%; }

.rz-stats { display: flex; flex-wrap: wrap; gap: 28px; margin: 18px 0 8px; }
.rz-stat { display: flex; flex-direction: column; }
.rz-stat-value { font-size: 2.2rem; font-weight: 800; letter-spacing: -0.03em; line-height: 1; font-variant-numeric: tabular-nums; }
.rz-stat.rz-abv-none .rz-stat-value,
.rz-stat.rz-abv-light .rz-stat-value,
.rz-stat.rz-abv-medium .rz-stat-value,
.rz-stat.rz-abv-strong .rz-stat-value,
.rz-stat.rz-abv-unknown .rz-stat-value { color: var(--abv-c); }
.rz-stat-label { color: var(--text-muted); font-size: 0.9rem; margin-top: 4px; }

.rz-steps { list-style: none; margin: 14px 0 0; padding: 0; max-width: 560px; }
.rz-step {
  display: grid;
  grid-template-columns: 26px 18px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}
.rz-step:last-child { border-bottom: 1px solid var(--line); }
.rz-step-no { color: var(--text-muted); font-variant-numeric: tabular-nums; font-weight: 700; }
.rz-swatch { width: 18px; height: 18px; border-radius: 50%; border: 1px solid var(--line); }
.rz-step-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.rz-step-abv { color: var(--text-muted); font-size: 0.85rem; }
.rz-bar { height: 5px; border-radius: 3px; background: var(--line); overflow: hidden; margin-top: 4px; }
.rz-bar span { display: block; height: 100%; border-radius: 3px; }
.rz-step-ml { font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }

.rz-actions { margin-top: 24px; }
.rz-btn {
  display: inline-block;
  text-decoration: none;
  font-weight: 700;
  padding: 10px 18px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--surface);
}
.rz-btn:hover { border-color: var(--accent); }
.rz-related { margin-top: 40px; }

/* ── Motion: the glass fills when the detail page opens, bubbles rise slowly ── */
@media (prefers-reduced-motion: no-preference) {
  .rz-detail .rz-stage .glass-liquid { animation: rz-pour 1.2s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
  .rz-stage .glass-bubble { animation: rz-rise 5s ease-in infinite; }
  .rz-stage .glass-bubble.b1 { animation-delay: -1.3s; animation-duration: 6.2s; }
  .rz-stage .glass-bubble.b2 { animation-delay: -2.6s; animation-duration: 4.4s; }
  .rz-stage .glass-bubble.b3 { animation-delay: -3.9s; animation-duration: 5.6s; }
}
@keyframes rz-pour {
  from { transform: translateY(140px); }
  to { transform: translateY(0); }
}
@keyframes rz-rise {
  0% { transform: translateY(0); opacity: 0.55; }
  100% { transform: translateY(-34px); opacity: 0; }
}

/* ── Small screens ── */
@media (max-width: 820px) {
  .rz-detail { grid-template-columns: 1fr; gap: 20px; }
  .rz-stage { position: relative; top: 0; height: 360px; }
  .rz-controls { grid-template-columns: 1fr; }
  .rz-brand span { display: none; }
}
@media (max-width: 520px) {
  .rz-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .rz-card-glass { height: 180px; }
  .rz-card-body { padding: 10px 10px 12px; }
}

@media print {
  .rz-header, .rz-controls, .rz-footer, .rz-actions { display: none; }
  body { background: #fff; color: #000; }
}

/* ── Buttons & hero actions ── */
.rz-hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 16px 0 0; }
button.rz-btn,
label.rz-btn { font: inherit; font-weight: 700; color: inherit; cursor: pointer; }
.rz-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.rz-btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.rz-btn-primary:hover { filter: brightness(1.06); }

/* ── Editor ── */
.rz-editor { display: grid; grid-template-columns: minmax(0, 1fr) minmax(240px, 360px); gap: 36px; align-items: start; }
.rz-editor > * { min-width: 0; }
.rz-form { max-width: 640px; }
.rz-field { display: flex; flex-direction: column; gap: 6px; margin: 18px 0; border: 0; padding: 0; min-width: 0; }
.rz-field > label,
.rz-field > legend { font-weight: 700; padding: 0; }
.rz-optional { font-weight: 400; color: var(--text-muted); }
.rz-form input[type="text"],
.rz-form input[type="number"],
.rz-form textarea,
.rz-form select {
  font: inherit;
  color: inherit;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  width: 100%;
  min-width: 0;
}
.rz-form textarea { resize: vertical; }
.rz-check { display: flex; align-items: center; gap: 10px; margin: 6px 0 4px; font-weight: 600; }
.rz-check input { width: 20px; height: 20px; accent-color: var(--accent); }

.rz-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 96px auto;
  gap: 8px;
  align-items: center;
  margin-bottom: 10px;
}
.rz-row-controls { display: flex; gap: 4px; }
.rz-icon-btn {
  font: inherit;
  width: 36px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: transparent;
  color: inherit;
  cursor: pointer;
}
.rz-icon-btn:hover:not(:disabled) { border-color: var(--accent); }
.rz-icon-btn:disabled { opacity: 0.35; cursor: not-allowed; }
.rz-newdrink {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  padding: 12px;
  border: 1px dashed var(--line);
  border-radius: 10px;
}
.rz-newdrink label { display: flex; flex-direction: column; gap: 4px; font-size: 0.88rem; font-weight: 600; }
.rz-newdrink .rz-note { grid-column: 1 / -1; margin: 0; font-weight: 400; }

.rz-errors {
  border: 1px solid var(--abv-strong);
  border-left-width: 5px;
  border-radius: 10px;
  padding: 10px 14px;
  margin: 14px 0;
  background: var(--surface);
}
.rz-errors p { margin: 2px 0; }

.rz-preview { position: sticky; top: 84px; }
.rz-preview .rz-stage { position: relative; top: 0; height: 420px; }
.rz-preview-empty { align-self: center; padding: 0 24px; text-align: center; color: var(--text-muted); }
.rz-preview .rz-stats { margin-top: 14px; }

/* ── Own recipes ── */
.rz-own-list { display: grid; gap: 16px; }
.rz-own {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 14px;
}
.rz-own-glass {
  display: grid;
  place-items: end center;
  height: 190px;
  background: radial-gradient(ellipse 70% 62% at 50% 62%, color-mix(in srgb, var(--glow, var(--accent)) var(--glow-strength), transparent), transparent 72%);
}
.rz-own-glass svg { height: 100%; width: auto; }
.rz-own-body h3 { margin: 0 0 2px; font-size: 1.15rem; }
.rz-own-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.rz-own-actions .rz-btn { padding: 7px 14px; font-size: 0.92rem; }
.rz-file-btn input { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
.rz-file-btn:focus-within { outline: 3px solid var(--accent); outline-offset: 3px; }
.rz-delete[data-armed] { border-color: var(--abv-strong); color: var(--abv-strong); }
.rz-own-msg { min-height: 1.2em; margin: 6px 0 0; color: var(--text-muted); font-size: 0.9rem; }
.rz-photo-state { margin: 6px 0 0; font-size: 0.9rem; }
.rz-reject { margin: 8px 0 0; color: var(--abv-strong); }
.rz-status { font-size: 0.8rem; font-weight: 700; padding: 2px 10px; border-radius: 999px; border: 1px solid currentColor; }
.rz-status-pending { color: var(--abv-light); }
.rz-status-approved { color: var(--abv-none); }
.rz-status-rejected { color: var(--abv-strong); }

@media (max-width: 820px) {
  .rz-editor { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .rz-preview { position: static; order: -1; }
  .rz-preview .rz-stage { height: 300px; }
}
@media (max-width: 520px) {
  .rz-row { grid-template-columns: 1fr 84px; }
  .rz-row-controls { grid-column: 1 / -1; justify-content: flex-end; }
  .rz-own { grid-template-columns: 1fr; }
  .rz-own-glass { height: 160px; }
}

/* ── User photo (responsive variants from R2) ── */
.rz-photo { margin: 24px 0 0; max-width: 640px; }
.rz-photo img { display: block; width: 100%; height: auto; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); }
.rz-photo figcaption { margin-top: 6px; color: var(--text-muted); font-size: 0.88rem; }

/* ── Header: language switch + account (same idea as the live page) ── */
.rz-controls-bar { display: flex; align-items: center; gap: 10px; }
.rz-lang { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.rz-lang button {
  font: inherit;
  font-weight: 700;
  font-size: 0.82rem;
  padding: 7px 11px;
  border: 0;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
}
.rz-lang button:hover { color: var(--text); }
.rz-lang button.is-active { background: var(--accent); color: var(--accent-ink); }

.rz-login,
.rz-account-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font: inherit;
  font-weight: 700;
  font-size: 0.9rem;
  padding: 6px 14px 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
  cursor: pointer;
}
.rz-login:hover,
.rz-account-btn:hover { border-color: var(--accent); }
.rz-account-btn img { border-radius: 50%; }
.rz-account-name { max-width: 14ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rz-account-menu { position: relative; }
.rz-account-dropdown {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  min-width: 210px;
  display: grid;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg-1);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.28);
  z-index: 20;
}
.rz-account-dropdown[hidden] { display: none; }
.rz-account-dropdown a { padding: 9px 12px; border-radius: 8px; text-decoration: none; font-weight: 600; }
.rz-account-dropdown a:hover { background: var(--surface); color: var(--accent); }

/* ── Editable glass in the editor ── */
.rz-glass-host { position: relative; z-index: 1; width: 100%; height: 100%; display: grid; place-items: end center; }
.rz-preview-empty { position: absolute; inset: 0 24px 56px; display: grid; place-items: center; pointer-events: none; z-index: 2; }
.rz-preview-empty[hidden] { display: none; }
.rz-preview-hint { margin: 10px 0 0; }
/* The host fills the stage; the glass fills the host. (Overrides the margin used for the server-rendered glass.) */
.rz-glass-host { padding-bottom: 14px; box-sizing: border-box; }
.rz-glass-host svg { height: 100%; margin-bottom: 0; }
.rz-edit-glass { overflow: visible; touch-action: none; }
.rz-edit-glass .glass-layer,
.rz-edit-glass .rz-layer-label,
.rz-edit-glass .rz-handle {
  transition: transform 0.5s cubic-bezier(0.2, 0.9, 0.25, 1), fill 0.3s ease, opacity 0.25s ease;
}
.rz-edit-glass .glass-ice,
.rz-edit-glass .rz-bubbles { transition: opacity 0.35s ease; }
.rz-edit-glass.is-dragging .glass-layer,
.rz-edit-glass.is-dragging .rz-layer-label,
.rz-edit-glass.is-dragging .rz-handle { transition: none; }
.rz-layer-label { pointer-events: none; user-select: none; }
.rz-handle { cursor: ns-resize; outline: none; touch-action: none; }
.rz-handle-dot { fill: var(--accent); stroke: #fff; stroke-width: 1.2; filter: drop-shadow(0 1px 1.5px rgba(0, 0, 0, 0.45)); transition: r 0.15s ease; }
.rz-handle-arrows { stroke: var(--accent-ink); }
.rz-handle:hover .rz-handle-dot,
.rz-handle:focus-visible .rz-handle-dot { r: 5.6; }
.rz-handle:focus-visible .rz-handle-dot { stroke: var(--text); stroke-width: 1.8; }
.rz-edit-glass .glass-liquid { transform-origin: 60px 158px; }
.rz-edit-glass .glass-liquid.rz-slosh { animation: rz-slosh 1s ease-out; }
@keyframes rz-slosh {
  0% { transform: rotate(0); }
  18% { transform: rotate(1.7deg); }
  40% { transform: rotate(-1.1deg); }
  62% { transform: rotate(0.6deg); }
  82% { transform: rotate(-0.25deg); }
  100% { transform: rotate(0); }
}
@media (prefers-reduced-motion: reduce) {
  .rz-edit-glass * { transition: none !important; }
  .rz-edit-glass .glass-liquid.rz-slosh { animation: none; }
}

/* ── Photo field in the editor ── */
.rz-label { font-weight: 700; }
.rz-file-btn { position: relative; }
.rz-photo-row { display: flex; flex-wrap: wrap; gap: 8px; }
.rz-photo-preview { display: block; max-width: 260px; width: 100%; height: auto; border-radius: 10px; border: 1px solid var(--line); margin-top: 10px; }
.rz-photo-preview[hidden] { display: none; }

/* ── Header on small screens ── */
@media (max-width: 760px) {
  .rz-header { flex-wrap: wrap; gap: 10px 12px; }
  .rz-nav { display: none; }
  .rz-controls-bar { margin-left: auto; }
}
@media (max-width: 520px) {
  .rz-login span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
  .rz-login { padding: 8px 10px; }
  .rz-account-name { display: none; }
}

/* Editor stage: the glass host is sized by the stage itself, so the whole glass (base included) is always visible. */
.rz-preview .rz-stage { display: block; }
.rz-preview .rz-glass-host { position: absolute; inset: 22px 0 0; width: auto; height: auto; padding-bottom: 14px; display: block; }
.rz-preview .rz-glass-host svg { width: 100%; height: 100%; margin: 0; }

/* ── Second header row (gallery actions + search/sort docked while scrolling) ── */
.rz-slot { display: flow-root; }
/* Overlay under the sticky header (not part of its layout), so docking does not push the page content down. */
.rz-subbar {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  padding: 10px max(16px, calc((100vw - 1180px) / 2));
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
  background: color-mix(in srgb, var(--bg-1) 94%, transparent);
}
.rz-subbar[hidden] { display: none; }
.rz-subbar .rz-hero-actions { margin: 0; gap: 8px; }
.rz-subbar .rz-btn { padding: 7px 14px; font-size: 0.92rem; }
.rz-subbar .rz-search { flex: 1 1 200px; width: auto; max-width: 380px; padding: 8px 12px; }
.rz-subbar .rz-sort { margin-left: auto; }
@media (max-width: 520px) {
  .rz-subbar { gap: 8px; padding-top: 8px; padding-bottom: 8px; }
  .rz-subbar .rz-hero-actions { flex: 1 0 100%; flex-wrap: nowrap; gap: 6px; overflow-x: auto; scrollbar-width: none; }
  .rz-subbar .rz-hero-actions::-webkit-scrollbar { display: none; }
  .rz-subbar .rz-btn { white-space: nowrap; padding: 5px 10px; font-size: 0.78rem; }
  .rz-subbar .rz-search { flex: 1 1 0; min-width: 0; }
  .rz-subbar .rz-sort { margin-left: 0; font-size: 0; gap: 0; }
  .rz-subbar .rz-sort select { font-size: 0.9rem; padding: 8px; }
}
.rz-shop-more { margin-top: 12px; width: 100%; justify-content: center; text-align: center; }
.rz-shop-more[hidden] { display: none; }

/* ── Shopping list ── */
.rz-shop { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 28px; align-items: start; }
.rz-shop h2 { margin-top: 0; }
.rz-shop-pick .rz-search { width: 100%; margin-bottom: 10px; }
.rz-shop-list, .rz-shop-drinks, .rz-shop-ingredients { list-style: none; margin: 0; padding: 0; }
.rz-shop-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-top-color: var(--line);
}
.rz-shop-row[hidden] { display: none; }
.rz-shop-row.is-picked { background: var(--surface); border-color: var(--accent); border-radius: var(--radius); }
.rz-shop-name { display: flex; flex-direction: column; min-width: 0; }
.rz-shop-name span { color: var(--text-muted); font-size: 0.85rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rz-stepper { display: inline-flex; align-items: center; gap: 4px; flex: none; }
.rz-stepper button {
  width: 38px;
  height: 38px;
  font: inherit;
  font-size: 1.2rem;
  font-weight: 700;
  color: inherit;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  cursor: pointer;
}
.rz-stepper button:hover { border-color: var(--accent); }
.rz-stepper input {
  width: 52px;
  height: 38px;
  font: inherit;
  font-weight: 700;
  text-align: center;
  color: inherit;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 10px;
  -moz-appearance: textfield;
}
.rz-stepper input::-webkit-outer-spin-button,
.rz-stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.rz-shop-summary {
  position: sticky;
  /* below the sticky page header (its height is kept in --header-h by recipes.ts) */
  top: calc(var(--header-h, 70px) + 16px);
  padding: 18px 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.rz-shop-summary h3 { margin: 18px 0 6px; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); }
.rz-shop-ingredients li {
  display: grid;
  grid-template-columns: 18px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 8px 0;
  border-top: 1px solid var(--line);
}
.rz-shop-ingredients strong { font-variant-numeric: tabular-nums; text-align: right; }
.rz-shop-total { display: flex; justify-content: space-between; gap: 12px; margin: 10px 0 4px; padding-top: 10px; border-top: 2px solid var(--line); }
.rz-shop-total strong { font-variant-numeric: tabular-nums; }
.rz-shop-drinks li span { font-weight: 800; font-variant-numeric: tabular-nums; }
.rz-shop-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.rz-shop-actions[hidden], .rz-shop-actions .rz-btn[hidden] { display: none; }

@media (max-width: 820px) {
  .rz-shop { grid-template-columns: minmax(0, 1fr); }
  .rz-shop-summary { position: static; order: -1; }
}
@media print {
  .rz-shop { display: block; }
  .rz-shop-pick, .rz-shop-actions, .rz-hero .rz-lead { display: none; }
  .rz-shop-summary { position: static; background: none; border: none; padding: 0; }
}

/* ── Seasonal themes (same SEASONAL_THEME as the live page; colours mirror body.theme-* in style.css) ──
   Light variants are scoped with :not(.dark-mode), so the dark-mode tokens above keep their surfaces and lines. */
body.theme-christmas:not(.dark-mode) { --accent: #c0392b; --accent-ink: #fff; --bg-1: #e8f5e9; --bg-2: #c8e6c9; --text: #1b5e20; --text-muted: #2e7d32; --line: rgba(27, 94, 32, 0.2); }
body.theme-christmas.dark-mode { --accent: #c0392b; --accent-ink: #fff; --bg-1: #0a1f0a; --bg-2: #061206; --text: #c8e6c9; --text-muted: #81c784; }

body.theme-oktoberfest:not(.dark-mode) { --accent: #0057a8; --accent-ink: #fff; --bg-1: #e3f0ff; --bg-2: #fff; --text: #002244; --text-muted: #0057a8; --line: rgba(0, 87, 168, 0.2); }
body.theme-oktoberfest.dark-mode { --accent: #4a90e2; --accent-ink: #001133; --bg-1: #001133; --bg-2: #000820; --text: #c8e0ff; --text-muted: #80aaee; --surface: rgba(0, 30, 80, 0.5); }
body.theme-oktoberfest {
  background-image:
    repeating-linear-gradient(0deg, transparent, transparent 40px, rgba(0, 87, 168, 0.06) 40px, rgba(0, 87, 168, 0.06) 80px),
    repeating-linear-gradient(90deg, transparent, transparent 40px, rgba(0, 87, 168, 0.06) 40px, rgba(0, 87, 168, 0.06) 80px),
    radial-gradient(circle at top left, var(--bg-1), var(--bg-2));
}

body.theme-easter:not(.dark-mode) { --accent: #9c27b0; --accent-ink: #fff; --bg-1: #fff8e1; --bg-2: #fce4ec; --text: #4a148c; --text-muted: #7b1fa2; --line: rgba(156, 39, 176, 0.2); }
body.theme-easter.dark-mode { --accent: #ba68c8; --accent-ink: #1a0026; --bg-1: #1a0026; --bg-2: #0d0019; --text: #e1bee7; --text-muted: #ce93d8; --surface: rgba(74, 20, 140, 0.25); }

body.theme-carnival:not(.dark-mode) { --accent: #e91e63; --accent-ink: #fff; --bg-1: #fffde7; --bg-2: #e8eaf6; --text: #1a237e; --text-muted: #3949ab; --line: rgba(233, 30, 99, 0.25); }
body.theme-carnival.dark-mode { --accent: #f06292; --accent-ink: #0d0020; --bg-1: #0d0020; --bg-2: #100030; --text: #e8eaf6; --text-muted: #9fa8da; --surface: rgba(30, 0, 60, 0.4); }
body.theme-carnival .rz-header { background-image: linear-gradient(90deg, rgba(233, 30, 99, 0.1), rgba(33, 150, 243, 0.1), rgba(76, 175, 80, 0.1)); }

/* Halloween and New Year are dark themes in light and dark mode alike. */
body.theme-halloween {
  --accent: #e65c00; --accent-ink: #1a0a00; --bg-1: #1a0030; --bg-2: #0a0010; --text: #f5c842; --text-muted: #bb86fc;
  --surface: rgba(60, 0, 80, 0.45); --line: rgba(230, 92, 0, 0.3); --ledge: rgba(245, 200, 66, 0.25); --glow-strength: 22%;
  --abv-none: #4cc2a2; --abv-light: #e3b53a; --abv-medium: #f0903f; --abv-strong: #ef6a5f; --abv-unknown: #9a9a9a;
}
body.theme-new_year {
  --accent: #ffd700; --accent-ink: #1a1304; --bg-1: #0d0d0d; --bg-2: #1a1100; --text: #ffe082; --text-muted: #bfaa50;
  --surface: rgba(30, 25, 0, 0.55); --line: rgba(255, 215, 0, 0.25); --ledge: rgba(255, 215, 0, 0.25); --glow-strength: 22%;
  --abv-none: #4cc2a2; --abv-light: #e3b53a; --abv-medium: #f0903f; --abv-strong: #ef6a5f; --abv-unknown: #9a9a9a;
}

/* Particles started by the shared seasonal-theme module (copied from style.css; keep both in sync). */
#seasonal-particles { position: fixed; inset: 0; pointer-events: none; z-index: 9000; overflow: hidden; }
.snow-flake { position: absolute; top: -20px; border-radius: 50%; background: rgba(255, 255, 255, 0.9); animation: snow-fall linear infinite; }
@keyframes snow-fall {
  0% { transform: translateY(0) translateX(0) rotate(0deg); opacity: 1; }
  80% { opacity: 1; }
  100% { transform: translateY(105vh) translateX(var(--drift, 30px)) rotate(360deg); opacity: 0; }
}
.bat-particle { position: absolute; font-size: 1.4rem; animation: bat-fly linear infinite; opacity: 0.8; }
@keyframes bat-fly {
  0% { transform: translateX(0) translateY(0) scaleX(1); }
  25% { transform: translateX(25vw) translateY(-8vh) scaleX(1); }
  50% { transform: translateX(50vw) translateY(4vh) scaleX(-1); }
  75% { transform: translateX(75vw) translateY(-6vh) scaleX(-1); }
  100% { transform: translateX(105vw) translateY(2vh) scaleX(-1); }
}
.pretzel-particle { position: absolute; font-size: 1.6rem; animation: pretzel-float ease-in-out infinite; opacity: 0.7; }
@keyframes pretzel-float {
  0%, 100% { transform: translateY(0) rotate(0deg); opacity: 0.7; }
  50% { transform: translateY(-18px) rotate(15deg); opacity: 1; }
}
.easter-egg-particle { position: absolute; font-size: 1.5rem; animation: egg-float ease-in-out infinite; }
@keyframes egg-float {
  0% { transform: translateY(105vh) rotate(-10deg); opacity: 0; }
  10%, 90% { opacity: 1; }
  100% { transform: translateY(-10vh) rotate(10deg); opacity: 0; }
}
.confetti-piece { position: absolute; top: -12px; width: 8px; height: 12px; border-radius: 2px; animation: confetti-fall linear infinite; }
@keyframes confetti-fall {
  0% { transform: translateY(0) rotate(0deg) translateX(0); opacity: 1; }
  80% { opacity: 1; }
  100% { transform: translateY(105vh) rotate(720deg) translateX(var(--drift, 50px)); opacity: 0; }
}
.firework-spark { position: absolute; border-radius: 50%; animation: spark-burst linear forwards; opacity: 1; }
@keyframes spark-burst {
  0% { transform: translate(0, 0) scale(1); opacity: 1; }
  100% { transform: translate(var(--fx, 0), var(--fy, 0)) scale(0); opacity: 0; }
}

/* Drinks overview (/recipes/drinks) */
.rz-drinks { width: 100%; border-collapse: collapse; margin: 0 0 24px; }
.rz-drinks th, .rz-drinks td { text-align: left; padding: 7px 10px; border-bottom: 1px solid var(--line); }
.rz-drinks th { font-size: 0.8rem; color: var(--text-muted); font-weight: 600; }
.rz-swatch { display: inline-block; width: 0.8em; height: 0.8em; border-radius: 50%; margin-right: 8px; border: 1px solid var(--line); }
.rz-attrib { color: var(--text-muted); font-size: 0.85rem; }
.rz-drinks-block { margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--line); }
.rz-drinks-block h2:first-child { margin-top: 0; }

/* ── Polish: depth, rhythm and touch targets ── */
:root { color-scheme: light; --shadow-card: 0 1px 2px rgba(61, 44, 5, 0.06), 0 8px 24px -12px rgba(61, 44, 5, 0.18); }
body.dark-mode { color-scheme: dark; --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.4), 0 10px 28px -14px rgba(0, 0, 0, 0.7); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
::selection { background: color-mix(in srgb, var(--accent) 55%, transparent); }

.rz-main h1, .rz-main h2, .rz-card-body h3 { text-wrap: balance; }
.rz-lead, .rz-note { text-wrap: pretty; }
.rz-main h2 { margin-top: 36px; }

.rz-header { box-shadow: 0 1px 0 var(--line), 0 6px 20px -16px rgba(0, 0, 0, 0.35); }
.rz-nav a, .rz-btn, .rz-chip, .rz-lang button, .rz-theme { transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.15s ease, filter 0.15s ease; }
.rz-nav a:hover:not(.is-current) { background: var(--surface); }
.rz-btn:active, .rz-chip:active { transform: translateY(1px); }
.rz-btn, .rz-chip { min-height: 40px; display: inline-flex; align-items: center; justify-content: center; }
.rz-theme:hover { border-color: var(--accent); }

.rz-grid { gap: 20px; }
.rz-card-link { box-shadow: var(--shadow-card); transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease; }
.rz-card-link:hover { transform: translateY(-4px); box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08), 0 16px 32px -14px color-mix(in srgb, var(--glow, var(--accent)) 55%, transparent); }
.rz-card-link:focus-visible { outline-offset: 2px; border-radius: var(--radius); }
.rz-card-glass svg { transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1); }
.rz-card-link:hover .rz-card-glass svg { transform: translateY(-3px) scale(1.03); }
.rz-card-body { padding: 14px 16px 18px; }
.rz-card-body h3 { font-size: 1.12rem; line-height: 1.25; }
/* Long grids render lazily; the intrinsic size keeps the scrollbar stable. */
.rz-card { content-visibility: auto; contain-intrinsic-size: auto 340px; }

.rz-badge { background: color-mix(in srgb, var(--surface) 70%, transparent); line-height: 1.5; }

.rz-stage { box-shadow: var(--shadow-card); }
.rz-detail { gap: 44px; }
.rz-detail-main > h1 { margin-bottom: 10px; }
.rz-stats { gap: 36px; padding: 16px 0 6px; }
.rz-stat-value { font-size: 2.5rem; }
.rz-stat-label { text-transform: uppercase; letter-spacing: 0.06em; font-size: 0.74rem; font-weight: 600; }
.rz-step { padding: 14px 0; transition: background-color 0.15s ease; }
.rz-step-no { text-align: center; }
.rz-bar { height: 6px; }
.rz-photo img { box-shadow: var(--shadow-card); }
.rz-crumbs { margin-bottom: 22px; }
.rz-related { margin-top: 56px; padding-top: 8px; border-top: 1px solid var(--line); }

.rz-search:focus, .rz-sort select:focus, .rz-form input:focus, .rz-form textarea:focus, .rz-form select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 30%, transparent);
}
.rz-drinks tbody tr:hover { background: var(--surface); }
.rz-footer { padding: 2rem 1.5rem; }

@media (max-width: 820px) {
  .rz-detail { gap: 24px; }
  .rz-stat-value { font-size: 2.1rem; }
}
@media (max-width: 520px) {
  .rz-main { padding: 20px 14px 44px; }
  .rz-grid { gap: 12px; }
  .rz-card-body { padding: 10px 12px 14px; }
  .rz-card-body h3 { font-size: 1rem; }
  .rz-stats { gap: 24px; }
  .rz-icon-btn { width: 40px; height: 44px; }
}
@media (hover: none) {
  .rz-card-link:hover { transform: none; }
  .rz-card-link:hover .rz-card-glass svg { transform: none; }
}
@media print { .rz-card-link, .rz-stage, .rz-photo img { box-shadow: none; } }
