:root {
  color-scheme: light;
  --bg: #faf7f2;
  --paper: #ffffff;
  --ink: #1a1a1a;
  --ink-2: #555;
  --ink-3: #999;
  --line: #ebe6de;
  --accent: #c8401c;
  --radius: 10px;
  --serif: 'Playfair Display', Georgia, serif;
  --sans: 'Outfit', system-ui, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body { font-family: var(--sans); background: var(--bg); color: var(--ink); line-height: 1.45; font-size: 15px; }
.wrap { width: min(1200px, 100% - 32px); margin-inline: auto; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 0 10px; }
.brand { font-family: var(--serif); font-weight: 900; font-size: clamp(24px, 4vw, 34px); line-height: 1; white-space: nowrap; }
.brand span { font-style: italic; color: var(--accent); }
.tools { display: flex; gap: 8px; align-items: center; flex: 1; justify-content: flex-end; }
.search { position: relative; flex: 0 1 320px; min-width: 0; }
.search svg { position: absolute; left: 12px; top: 50%; width: 18px; height: 18px; transform: translateY(-50%); fill: none; stroke: var(--ink-3); stroke-width: 2; stroke-linecap: round; }
.search input {
  width: 100%; font: inherit; padding: 10px 14px 10px 38px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--paper); color: var(--ink);
}
.search input:focus { outline: 2px solid color-mix(in srgb, var(--accent) 40%, transparent); border-color: var(--accent); }
.pdf-btn {
  flex: none; height: 42px; padding: 0 14px 0 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--paper);
  display: inline-flex; align-items: center; gap: 6px; color: var(--ink-2); text-decoration: none; font-weight: 500; font-size: 14px;
}
.pdf-btn:hover { color: var(--ink); border-color: var(--ink-3); }
.pdf-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; }

.chips { display: flex; gap: 6px; overflow-x: auto; padding: 4px 0 12px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; font: inherit; font-size: 14px; font-weight: 500; padding: 6px 14px; border-radius: 999px; cursor: pointer;
  border: 1px solid color-mix(in srgb, var(--c) 35%, transparent); background: var(--paper); color: var(--c);
}
.chip[aria-pressed='true'] { background: var(--c); color: #fff; border-color: var(--c); }

/* ---------- categories ---------- */
main { padding: 24px 0 8px; }
.category { margin-bottom: 40px; scroll-margin-top: 130px; }
.cat-header { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; padding-bottom: 8px; margin-bottom: 16px; border-bottom: 2px solid var(--c); }
.cat-header h2 { font-family: var(--serif); font-size: 26px; color: var(--c); }
.cat-header .sub { font-size: 13px; font-style: italic; color: var(--ink-3); }
.cat-header .count { margin-left: auto; font-size: 13px; color: var(--ink-3); }

.grid { display: flex; gap: 14px; align-items: flex-start; }
.grid-col { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 14px; }

/* ---------- card ---------- */
.card {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  display: flex; flex-direction: column; transition: box-shadow 0.15s, transform 0.15s;
}
.card:hover { box-shadow: 0 6px 20px rgb(0 0 0 / 0.06); transform: translateY(-1px); }
.illo { height: 96px; display: grid; place-items: center; background: color-mix(in srgb, var(--c) 6%, #fff); border-bottom: 1px solid var(--line); }
.illo img { height: 80px; width: auto; max-width: 90%; object-fit: contain; }
.card-head { padding: 12px 16px 8px; }
.card-head h3 { font-family: var(--serif); font-size: 19px; line-height: 1.15; }
.glass { font-size: 12.5px; color: var(--ink-3); margin-top: 2px; }
.ingredients { list-style: none; padding: 0 16px; }
.ingredients li { display: flex; justify-content: space-between; gap: 12px; padding: 5px 0; border-bottom: 1px dotted var(--line); font-size: 14px; }
.ingredients li:last-child { border-bottom: 0; }
.amt { font-weight: 600; text-align: right; white-space: nowrap; }
.prep { margin: 8px 16px 0; border-top: 1px solid var(--line); }
.prep summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 9px 0 2px; font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--c);
  user-select: none;
}
.prep summary::-webkit-details-marker { display: none; }
.prep summary::after {
  content: ''; flex: none; width: 7px; height: 7px; margin-right: 3px;
  border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor;
  transform: translateY(-2px) rotate(45deg); transition: transform 0.15s;
}
.prep[open] summary::after { transform: translateY(1px) rotate(-135deg); }
.prep summary:hover { opacity: 0.75; }
.prep summary:focus-visible { outline: 2px solid var(--c); outline-offset: 2px; border-radius: 3px; }
.prep p { font-size: 13.5px; color: var(--ink-2); margin-top: 4px; }
.prep .note { margin: 8px 0 0; }
.note {
  margin: 10px 16px 0; padding: 7px 10px; font-size: 13px; line-height: 1.35; color: #2a5fa0;
  background: #eef6ff; border-left: 3px solid #5b9fe8; border-radius: 0 6px 6px 0;
}
.card > :last-child { margin-bottom: 16px; }
.empty { text-align: center; color: var(--ink-3); padding: 60px 0; }

/* ---------- footer ---------- */
.jiggers { padding: 16px 20px; margin-bottom: 32px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); font-size: 14px; color: var(--ink-2); display: flex; gap: 12px; flex-wrap: wrap; align-items: baseline; }
.jiggers h2 { font-family: var(--serif); font-size: 17px; color: var(--ink); }
.site-footer { border-top: 1px solid var(--line); padding: 24px 0 32px; font-size: 13px; color: var(--ink-3); }
.site-footer .wrap { display: flex; justify-content: space-between; gap: 16px; align-items: baseline; flex-wrap: wrap; }
.admin-link { color: var(--ink-3); opacity: 0.45; text-decoration: none; font-size: 12px; }
.admin-link:hover { opacity: 1; text-decoration: underline; }

@media (max-width: 560px) {
  .header-inner { flex-wrap: wrap; }
  .tools { flex-basis: 100%; }
  .search { flex: 1; }
}

/* ---------- print: compact 3-column A4 like the original paper card ---------- */
@media print {
  @page { size: A4 portrait; margin: 10mm 12mm; }
  body { background: #fff; font-size: 7.8pt; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .wrap { width: 100%; }
  .site-header { position: static; border: 0; backdrop-filter: none; background: none; }
  .header-inner { padding: 0 0 3mm; border-bottom: 2px solid var(--ink); margin-bottom: 4mm; }
  .tools, .chips, .admin-link { display: none; }
  main { padding: 0; }
  .category { margin-bottom: 4mm; }
  .cat-header { margin-bottom: 2mm; padding-bottom: 1mm; border-bottom-width: 1.5px; break-after: avoid; }
  .cat-header h2 { font-size: 11pt; }
  .cat-header .sub, .cat-header .count { font-size: 6.5pt; }
  .grid, .grid-col { gap: 2mm; }
  .card { break-inside: avoid; border-radius: 4px; box-shadow: none !important; transform: none !important; }
  .illo { height: 13mm; }
  .illo img { height: 11mm; }
  .card-head { padding: 1.2mm 2.2mm 0.8mm; }
  .card-head h3 { font-size: 8.5pt; }
  .glass { font-size: 5.8pt; }
  .ingredients { padding: 0 2.2mm; }
  .ingredients li { font-size: 6.8pt; padding: 0.4mm 0; }
  .prep { margin: 1mm 2.2mm 0; padding-top: 1mm; }
  .prep h4 { font-size: 5.2pt; margin-bottom: 0.5mm; }
  .prep p { font-size: 6.3pt; }
  .note { margin: 1mm 2.2mm 0; padding: 0.8mm 1.5mm; font-size: 5.9pt; }
  .card > :last-child { margin-bottom: 1.5mm; }
  .jiggers { break-inside: avoid; margin: 0 0 2mm; padding: 2mm 3mm; font-size: 7pt; }
  .jiggers h2 { font-size: 8pt; }
  .site-footer { padding: 0; border: 0; font-size: 6.5pt; }
}
