:root {
  color-scheme: light dark;
  --paper: #f7f2e9;
  --surface: #fffcf6;
  --ink: #322626;
  --muted: #6f5854;
  --line: #e2d4c8;
  --accent: #762f45;
  --on-accent: #fffaf3;
  --tint: #f1e4dc;
  --danger: #942f39;
  --radius: 15px;
  --serif: Georgia, 'Times New Roman', serif;
}
@media (prefers-color-scheme: dark) {
  :root { --paper: #201a1b; --surface: #2a2224; --ink: #f7e9de; --muted: #c5aba3; --line: #4b3b3d; --accent: #eab0c0; --on-accent: #2f1e23; --tint: #3d2c31; --danger: #f0a3ab; }
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 16px/1.5 system-ui, sans-serif; }
a { color: inherit; text-underline-offset: .17em; }
a:hover { color: var(--accent); }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
img { display: block; max-width: 100%; }
p, h1, h2, h3, ul, dl, dd { margin: 0; }
h1, h2, h3, .wordmark { font-family: var(--serif); font-weight: 400; line-height: 1.12; }
h1 { font-size: clamp(2.2rem, 5vw, 3.65rem); letter-spacing: -.037em; }
h2 { font-size: clamp(1.42rem, 3vw, 1.95rem); letter-spacing: -.018em; }
h3 { font-size: 1.35rem; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.quiet { color: var(--muted); font-size: .88rem; }
.caps { text-transform: uppercase; letter-spacing: .075em; font-size: .72rem; }
.shell { max-width: 1160px; padding-inline: clamp(16px, 4vw, 48px); margin-inline: auto; }
.top { border-bottom: 1px solid var(--line); background: var(--surface); }
.top-inner { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 16px; padding-block: 14px; }
.wordmark { text-decoration: none; font-size: clamp(1.1rem, 3vw, 1.6rem); color: var(--accent); width: fit-content; }
.main-nav, .actions, .tag-options, .filter-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.main-nav a, .segments a { color: var(--muted); padding: 8px 12px; text-decoration: none; border-radius: 8px; font-size: .9rem; }
.main-nav a:hover, .segments a:hover, .main-nav a[aria-current], .segments a[aria-current] { background: var(--tint); color: var(--ink); }
.account { justify-self: end; position: relative; min-width: 0; }
.account summary { cursor: pointer; color: var(--muted); overflow-wrap: anywhere; font-size: .88rem; }
.account-menu { display: grid; gap: 9px; position: absolute; z-index: 2; right: 0; top: calc(100% + 10px); min-width: 170px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 13px; box-shadow: 0 8px 22px #210e0e1a; }
.link { border: 0; background: transparent; padding: 0; color: var(--ink); text-decoration: underline; }
.main { padding-top: clamp(22px, 4.5vw, 55px); padding-bottom: 55px; }
.page-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 22px; }
.button { display: inline-flex; min-height: 41px; align-items: center; justify-content: center; gap: .35em; padding: 8px 14px; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 9px; text-decoration: none; font-size: .91rem; line-height: 1.3; }
.button:hover { color: var(--accent); border-color: var(--accent); }
.primary { color: var(--on-accent); background: var(--accent); border-color: var(--accent); }
.primary:hover { color: var(--on-accent); filter: brightness(.9); }
.tinted { background: var(--tint); }
.danger { color: var(--danger); }
.notice { background: var(--tint); padding: 12px 15px; border-radius: 9px; margin-bottom: 12px; overflow-wrap: anywhere; }
.notice.error, .errorlist { color: var(--danger); }
.errorlist { padding-inline-start: 1.15em; font-size: .88rem; }
input:not([type=hidden], [type=checkbox], [type=radio]), select, textarea {
  width: 100%; min-width: 0; padding: 9px 11px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--ink);
}
input::placeholder, textarea::placeholder { color: var(--muted); opacity: 1; }
textarea { resize: vertical; }
input[type=file] { min-width: 0; font-size: .86rem; }
input::file-selector-button { border: 1px solid var(--line); border-radius: 6px; background: var(--tint); color: var(--ink); margin-inline-end: 8px; padding: 5px 8px; }
.catalog-search, .scan-form { display: flex; flex-wrap: wrap; gap: 8px; }
.catalog-search input, .scan-form input { flex: 1 1 195px; }
.catalog-search { margin-bottom: 13px; }
.filter-row { justify-content: flex-start; margin-bottom: 20px; }
.segments { display: flex; flex-wrap: wrap; align-items: center; gap: 2px; padding: 3px; border: 1px solid var(--line); border-radius: 10px; width: fit-content; }
.segments a { padding-block: 6px; }
.filter-form select { padding-block: 7px; }
.drink-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); gap: 14px; }
.drink-tile { display: grid; align-content: start; min-width: 0; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; text-decoration: none; }
.drink-tile:hover { border-color: var(--accent); }
.drink-art { --light: #d7d2b9; --back: #9c937d; --glass: #565047; --label: #e9dbc0; min-height: 155px; aspect-ratio: 1.65; display: grid; place-items: center; background: radial-gradient(ellipse at 42% 28%, var(--light), var(--back)); color: #2a211c; overflow: hidden; }
.drink-art:has(img) { background: var(--tint); }
.drink-art img { width: 100%; height: 100%; min-height: 0; object-fit: cover; }
.drink-art.gin, .drink-art.vermouth { --light: #d7d6bc; --back: #818d73; --glass: #3d5945; --label: #e5e3cb; }
.drink-art.whisky, .drink-art.rum, .drink-art.brandy { --light: #e3c28e; --back: #b17c5c; --glass: #784b31; --label: #edcc9d; }
.drink-art.wine, .drink-art.liqueur { --light: #d9b2a7; --back: #a26d76; --glass: #5e3341; --label: #ebd0bc; }
.drink-art.vodka, .drink-art.agave { --light: #d4dfd9; --back: #8faca6; --glass: #426968; --label: #e4efdf; }
.bottle, .still-bottle { display: grid; align-items: end; position: relative; width: 69px; height: 92px; margin-top: 21px; border-radius: 20px 20px 8px 8px; background: linear-gradient(90deg, #0006, transparent 22%, #fff3 34%, transparent 53%, #0004), var(--glass); box-shadow: inset 0 0 0 1px #fff3, 5px 9px 16px #32221f45; }
.bottle::before, .still-bottle::before { content: ''; position: absolute; left: 32%; top: -22%; width: 36%; height: 27%; border-radius: 3px 3px 0 0; background: linear-gradient(#2c2424 0 38%, var(--glass) 38% 100%); }
.bottle span, .still-bottle i { display: block; margin-bottom: 14%; padding: 7px 2px; background: var(--label); color: #2a211c; font: 11px/1.25 var(--serif); text-align: center; }
.tile-copy { display: grid; gap: 5px; padding: 14px 16px 16px; overflow-wrap: anywhere; }
.tile-copy h2 { font-size: 1.45rem; }
.tile-status { align-self: start; color: var(--accent); font-size: .82rem; margin-top: 5px; }
.empty { max-width: 650px; padding: clamp(20px, 4vw, 46px); border: 1px dashed var(--line); border-radius: var(--radius); display: grid; gap: 10px; justify-items: start; }
.empty p { color: var(--muted); }
.empty .button { margin-top: 4px; }
.back { display: inline-block; margin-bottom: 14px; font-size: .88rem; color: var(--muted); }
.drink-detail { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: clamp(16px, 4vw, 42px); align-items: center; }
.drink-detail .drink-art { border-radius: var(--radius); }
.drink-figure { margin: 0; min-width: 0; }
.drink-figure figcaption { margin-top: 6px; }
.drink-detail .bottle { transform: scale(1.2); }
.drink-intro { display: grid; gap: 11px; overflow-wrap: anywhere; }
.package-list { list-style: none; padding: 0; display: grid; gap: 5px; font-size: .87rem; }
.package-list li { padding: 4px 8px; border-left: 2px solid var(--line); }
.package-list .selected { border-color: var(--accent); background: var(--tint); }
.barcode { font-variant-numeric: tabular-nums; }
.personal-note { padding: 12px 14px; margin-top: 17px; background: var(--tint); border-radius: 9px; }
.history { display: grid; gap: 10px; margin-top: 25px; }
.history > h2 { margin-bottom: 4px; }
.entry { display: flex; align-items: flex-start; gap: 12px; width: 100%; padding: clamp(12px, 2.4vw, 21px); border: 1px solid var(--line); background: var(--surface); border-radius: 12px; overflow-wrap: anywhere; }
.entry-copy { display: grid; gap: 5px; min-width: 0; }
.entry h3 a { text-decoration: none; }
.entry-image { flex: 0 0 clamp(58px, 12vw, 100px); }
.entry-image img, .gallery img { aspect-ratio: 1; object-fit: cover; border-radius: 8px; height: auto; }
.score { display: inline-block; vertical-align: middle; font: 600 .82rem/1.5 system-ui, sans-serif; color: var(--accent); background: var(--tint); border-radius: 6px; padding: 2px 6px; white-space: nowrap; }
.tags, .gallery { margin-block: 4px; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 5px; }
.tags a { display: block; background: var(--tint); padding: 3px 8px; border-radius: 999px; font-size: .77rem; text-decoration: none; overflow-wrap: anywhere; }
.gallery { gap: 9px; }
.gallery li { width: min(45%, 180px); }
.gallery.compact li { width: min(23%, 95px); }
.gallery img { width: 100%; }
.review-filters { margin-top: 14px; max-width: 700px; }
.review-filters .fold { padding: 8px 12px; }
.filter-options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; margin-block: 10px; }
.filter-options label { min-width: 0; display: grid; gap: 4px; font-size: .85rem; }
.filter-options .check { display: flex; align-items: center; align-self: end; padding-block: 9px; }
.price-filter { min-width: 0; border: 1px solid var(--line); border-radius: 8px; margin: 0 0 10px; padding: 0 10px; }
.price-filter legend { color: var(--muted); font-size: .88rem; padding-inline: 5px; }
.price-filter .filter-options { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.editor { display: grid; gap: 13px; max-width: 690px; padding: clamp(16px, 3.5vw, 34px); border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); overflow-wrap: anywhere; }
.editor h1 { font-size: clamp(1.95rem, 4vw, 3rem); }
.stack { display: grid; gap: 14px; }
.field { display: grid; align-content: start; gap: 5px; min-width: 0; }
.field label, .help { font-size: .87rem; }
.import-photo { display: flex; align-items: center; gap: 12px; border: 1px solid var(--line); border-radius: 9px; padding: 9px; }
.import-photo img { object-fit: contain; background: var(--tint); border-radius: 6px; flex: 0 0 84px; }
.import-check { display: flex; align-items: center; gap: 6px; margin-bottom: 4px; }
.help { color: var(--muted); }
.help ul { padding-inline-start: 1em; }
.field-pair, .field-triple { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.field-triple { grid-template-columns: minmax(0, 1.15fr) minmax(0, .65fr) minmax(0, 1.5fr); }
.fold { border: 1px solid var(--line); border-radius: 9px; padding: 10px 12px; }
.fold summary { color: var(--accent); cursor: pointer; font-size: .92rem; }
.fold > .stack { margin-top: 12px; }
.tag-options { gap: 5px; }
.tag-options button { min-height: 30px; padding: 4px 8px; font-size: .8rem; }
.serving-title { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.facts { display: grid; gap: 7px; }
.facts > div { display: flex; flex-wrap: wrap; gap: 7px; }
.facts dt { color: var(--muted); }
.note-text { white-space: pre-wrap; }
.pagination { display: flex; align-items: center; gap: 10px; margin-top: 14px; }
dialog { color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); width: min(520px, calc(100% - 24px)); padding: clamp(14px, 4vw, 25px); }
dialog::backdrop { background: #1d1117a6; }
.dialog-header { display: flex; align-items: center; justify-content: space-between; }
video { display: block; width: 100%; max-height: 45vh; border-radius: 8px; background: #170f11; }
.login-layout { display: grid; grid-template-columns: 1.08fr .92fr; overflow: hidden; margin: clamp(0px, 4vw, 40px) auto; max-width: 920px; border: 1px solid var(--line); border-radius: 22px; background: var(--surface); }
.login-art { position: relative; isolation: isolate; display: grid; align-content: space-between; gap: 25px; min-height: 395px; padding: clamp(22px, 4.5vw, 48px); background: radial-gradient(ellipse at 74% 69%, #94564c, #5c273b 59%, #3c192d); color: #fff0df; overflow: hidden; }
.login-wordmark { font: 400 clamp(2.75rem, 7vw, 5.2rem)/.87 var(--serif); letter-spacing: -.06em; z-index: 1; }
.login-art p { font-size: .88rem; z-index: 1; }
.login-still { position: absolute; right: 8%; bottom: 11%; width: 195px; height: 170px; pointer-events: none; }
.still-bottle { --glass: #633724; --label: #e6c19a; width: 100px; height: 137px; transform: rotate(-13deg); }
.still-bottle i { height: 35px; }
.still-glass { position: absolute; right: 3px; bottom: 1px; width: 93px; height: 72px; border: 2px solid #fff2d990; border-radius: 14px 14px 21px 21px; background: linear-gradient(transparent 35%, #c67d4aa1 36%, #814223e0); box-shadow: 5px 8px 17px #26141e50, inset 0 -7px #ffe5c744; transform: rotate(7deg); }
.login-form { display: grid; align-content: center; gap: 17px; padding: clamp(20px, 4.5vw, 45px); }
.login-form h1 { font-size: clamp(1.9rem, 3.5vw, 3rem); }
.login-form button { margin-top: 5px; }
@media (max-width: 650px) {
  .top-inner { grid-template-columns: 1fr auto; gap: 8px; }
  .main-nav { grid-row: 2; grid-column: 1 / -1; }
  .main-nav a { padding-inline: 8px; }
  .drink-detail, .login-layout { grid-template-columns: minmax(0, 1fr); }
  .drink-detail .drink-art { max-height: 250px; }
  .login-art { min-height: 230px; }
  .login-still { transform: scale(.75); transform-origin: bottom right; }
  .filter-options { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 410px) {
  .field-triple { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); }
  .field-triple > :last-child { grid-column: 1 / -1; }
  .page-heading h1 { font-size: 2rem; }
  .login-art { min-height: 200px; }
  .login-still { transform: scale(.63); }
}
@media (pointer: coarse) {
  .button, .main-nav a { min-height: 44px; }
}
