/* CellarPeaks: the chalk of a cellar wall, the green of bottle glass and the gold of a capsule. Bricolage Grotesque
   (narrowed) for titles and numbers, Figtree for the rest; both served from the app itself. */
@font-face { font-family: "Bricolage Grotesque"; src: url("/fonts/bricolage-grotesque.woff2") format("woff2");
  font-weight: 200 800; font-stretch: 75% 100%; font-display: swap; }
@font-face { font-family: "Figtree"; src: url("/fonts/figtree.woff2") format("woff2"); font-weight: 300 900; font-display: swap; }

:root {
  color-scheme: light dark;
  accent-color: var(--accent);
  --accent: #1e3b30; /* bottle glass: buttons, links, the tab bar */
  --accent-soft: rgb(30 59 48 / 0.08);
  --on-accent: #f8f9f5;
  --chart-line: #8e2a45; /* validated: lightness band + 3:1 on the card */
  --bg: #eceee8;
  --card: #f8f9f5;
  --text: #1e3b30;
  --muted: #56665e;
  --line: rgb(30 59 48 / 0.13);
  --field: rgb(30 59 48 / 0.07);
  --segment-on: var(--text); /* the line under the chosen tab */
  --green: #2f7d4a;
  --orange: #b15c00;
  --blue: #2c64a8;
  --red: #b4233f;
  --on-red: #ffffff;
  --gold: #7a5608; /* text on --gold-soft: ~5:1 */
  --gold-soft: #f3e6c8;
  --gold-ring: #a87a1f;
  --foil: #a87a1f; /* the capsule: stars, the peak, the chosen tab */
  --link: #8e2a45; /* a link to another site in running text: the red of wine, ~7:1 on the card */
  --tabbar: #1e3b30;
  --tab-off: #c3cec7;
  --tab-on: #e8c26a;
  --radius: 20px;
  --tabbar-h: 66px;
  --display: "Bricolage Grotesque", "Figtree", system-ui, sans-serif;
  /* Room at the top: the status bar on an iPhone; on a Mac, the toolbar of a web app that lies over the page (below). */
  --safe-top: env(safe-area-inset-top);
  /* Side margins that stay clear of the notch or Dynamic Island when the iPhone lies sideways. */
  --gutter-left: max(16px, env(safe-area-inset-left));
  --gutter-right: max(16px, env(safe-area-inset-right));
  font-family: "Figtree", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  -webkit-text-size-adjust: 100%;
}

@media (prefers-color-scheme: dark) {
  :root {
    --accent: #e8c26a; /* in the dark the capsule's gold leads: buttons and links */
    --accent-soft: rgb(232 194 106 / 0.14);
    --chart-line: #e08aa0; /* validated: lightness band + 3:1 on the dark card */
    --on-accent: #1f1a08;
    --bg: #0e1512;
    --card: #18221d;
    --text: #e4eae5;
    --muted: #9aaba2;
    --line: rgb(190 210 198 / 0.16);
    --field: rgb(190 210 198 / 0.09);
    --segment-on: var(--text);
    --green: #5ccb7f;
    --orange: #f2a650;
    --blue: #7fb2f0;
    --red: #ff6f86;
    --on-red: #2a0610;
    --gold: #f0cf7e;
    --gold-soft: rgb(232 194 106 / 0.16);
    --gold-ring: #d9ad4c;
    --foil: #e2b65a;
    --link: #f0b8c6;
    --tabbar: #1e3b30;
  }
}

/* As a web app in the Dock, macOS 26 lets the page run under its toolbar (the window buttons, back and share) without
   saying so in safe-area-inset-top; app.js sets .mac-toolbar then, and the bars start below it. */
html.mac-toolbar { --safe-top: 52px; }

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body { min-height: 100dvh; overscroll-behavior-y: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
/* Touch feedback as on iOS: a button dims while pressed and a list row turns grey, instead of Safari's grey tap box;
   a long press doesn't select a button's text or open a menu on it. (iOS only applies :active with a touch listener,
   see app.js.) */
html { -webkit-tap-highlight-color: transparent; }
:where(button, a, label, input, select, textarea, summary) { touch-action: manipulation; }
/* The top bars reach past the side margins to the screen's edges (style below): never a sideways scroll for that. */
body { overflow-x: clip; }
button, .row-button, .tabbar, .btn-primary { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
:where(button, label.btn-primary, label.row-button):active:not(:disabled) { opacity: 0.55; }
:where(.wine-row, button.row, .row > .row-button, .log-open, .best-now):active:not(:disabled) { opacity: 1; background: var(--field); }
img { display: block; max-width: 100%; }
a { color: var(--accent); }

/* Layout ---------------------------------------------------------------- */

.screen {
  padding: calc(var(--safe-top) + 12px) var(--gutter-right) calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 24px) var(--gutter-left);
  max-width: 720px;
  margin: 0 auto;
}
.screen.with-nav { padding-top: 0; } /* the navigation bar holds the space under the status bar */
.page {
  position: fixed; inset: 0; z-index: 20; overflow-y: auto; overflow-x: hidden; background: var(--bg);
  padding: 0 var(--gutter-right) calc(env(safe-area-inset-bottom) + 32px) var(--gutter-left);
}
.page.enter { animation: slide-in 0.22s ease-out; }
.page > .inner { max-width: 720px; margin: 0 auto; }
/* Swiping back from the left edge (app.js): the page casts a shadow on the one below, which sits underneath. */
.page.swiping { box-shadow: -6px 0 24px rgb(0 0 0 / 0.18); }
.page.under { z-index: 19; overflow: hidden; }
@keyframes slide-in { from { transform: translateX(100%); } }
@media (prefers-reduced-motion: reduce) { .page.enter, dialog.sheet[open] { animation: none; } }

/* Between pages (navigate() in app.js): forward, the new page slides in over the old one, which moves a little to the
   left; back, the page slides out to the right and the one below comes back. */
::view-transition-group(root) { animation-duration: 0.3s; animation-timing-function: cubic-bezier(0.2, 0.8, 0.2, 1); }
html:active-view-transition-type(forward)::view-transition-old(root) { animation-name: page-out-left; }
html:active-view-transition-type(forward)::view-transition-new(root) { animation-name: slide-in; }
html:active-view-transition-type(backward)::view-transition-old(root) { animation-name: page-out-right; z-index: 1; }
html:active-view-transition-type(backward)::view-transition-new(root) { animation-name: page-in-left; }
@keyframes page-out-left { to { transform: translateX(-30%); } }
@keyframes page-out-right { to { transform: translateX(100%); } }
@keyframes page-in-left { from { transform: translateX(-30%); } }
@media (prefers-reduced-motion: reduce) { ::view-transition-group(root) { animation: none !important; } }

/* Bars at the top, as in iOS: see-through over the top of a screen, page or sheet; a blurred bar with a hairline once
   something scrolls under it (.scrolled, .nav-under); and the title small in the middle once the large one has
   scrolled away (.titled, .nav-titled). app.js (updateBars) sets those classes while scrolling. */
.topbar, .navbar { position: sticky; top: 0; z-index: 5; isolation: isolate; }
.topbar { display: flex; align-items: center; gap: 8px; padding: calc(var(--safe-top) + 8px) 0 8px; }
.topbar::before, .navbar::before {
  content: ""; position: absolute; z-index: -1; inset: 0 calc(-1 * var(--gutter-right)) 0 calc(-1 * var(--gutter-left));
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  -webkit-backdrop-filter: blur(20px) saturate(180%); backdrop-filter: blur(20px) saturate(180%);
  box-shadow: 0 0.5px 0 var(--line); opacity: 0; transition: opacity 0.2s;
}
/* On a page or tab screen the bar spans the whole width, also beside the centred column of a wide screen. */
.page .topbar::before, .navbar::before { inset: 0 auto 0 50%; width: 100vw; translate: -50% 0; }
.page.scrolled .topbar::before, dialog.sheet.scrolled .topbar::before, html.nav-under .navbar::before { opacity: 1; }
.topbar .title { flex: 1; text-align: center; font-weight: 600; font-size: 1.0625rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar .title.fade, .nav-title { transition: opacity 0.2s; }
.page:not(.titled) .topbar .title.fade { opacity: 0; }
.topbar .spacer { width: 72px; }
.navbar {
  display: grid; grid-template-columns: 1fr minmax(0, auto) 1fr; align-items: center; gap: 8px;
  min-height: calc(var(--safe-top) + 60px); padding: calc(var(--safe-top) + 8px) 0 8px;
}
.navbar > .end { justify-self: end; }
/* A tab without buttons: the bar lies over the large title instead of above it, and lets taps through. */
.navbar.bare { margin-bottom: -48px; pointer-events: none; }
.nav-title { font-weight: 600; font-size: 1.0625rem; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; opacity: 0; }
html.nav-titled .nav-title { opacity: 1; }
@media (prefers-reduced-motion: reduce) { .topbar::before, .navbar::before, .topbar .title.fade, .nav-title { transition: none; } }

h1.large { font-family: var(--display); font-size: 2.75rem; line-height: 1; font-weight: 700; font-stretch: 82%; margin: 8px 0 14px; letter-spacing: -0.02em; }
.subtitle { margin: -6px 2px 16px; color: var(--muted); }
/* Headings spread over even lines; longer text without a lone word on its last line. */
h1, h2 { text-wrap: balance; }
p, .footnote, .notice, .empty { text-wrap: pretty; }
.section-title { font-family: var(--display); font-size: 1.3125rem; font-weight: 650; font-stretch: 88%; color: var(--text); margin: 26px 4px 8px; line-height: 1.2; }
.footnote { font-size: 0.8125rem; color: var(--muted); margin: 6px 4px 0; line-height: 1.35; }
/* A year in Gedronken: the whole heading is the button that folds it open or shut (big enough to tap). */
.year-toggle { display: flex; width: 100%; min-height: 44px; align-items: center; justify-content: space-between; gap: 8px;
  padding: 0; border: 0; background: none; font: inherit; font-family: var(--display); color: var(--text); font-size: 1.875rem; font-weight: 700; font-stretch: 85%;
  text-transform: none; letter-spacing: 0; cursor: pointer; text-align: left; }
.year-toggle:disabled { cursor: default; color: var(--text); }
.section-title.year-title { margin: 6px 4px 2px; }
.card + .year-title { margin-top: 14px; }
.year-count { color: var(--muted); font-weight: 400; font-family: "Figtree", system-ui, sans-serif; font-size: 0.9375rem; font-stretch: 100%; }
/* A month under an open year in Gedronken. */
.month-title { font-family: var(--display); font-size: 1.1875rem; font-weight: 500; font-stretch: 90%; color: var(--text); margin: 16px 4px 8px; }
.month-title .year-count { font-weight: 400; }
.section-title + .month-title { margin-top: 4px; }
/* A drunk bottle in the list: its date on the right of the name, a dot for its type, one line of where or note. */
.log-head { display: flex; align-items: baseline; gap: 8px; }
.log-head .name { flex: 1; min-width: 0; }
.log-date { flex: none; color: var(--muted); font-size: 0.8125rem; font-variant-numeric: tabular-nums; }
.type-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--c); margin-right: 6px; vertical-align: 1px; }
.one-line { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* "Jouw fles" and "Over de wijn" on a drunk bottle's page: a heading above its own section headings. */
.group-title { font-family: var(--display); font-size: 1.625rem; font-weight: 700; font-stretch: 85%; margin: 30px 4px 0; }
.group-title + .section-title { margin-top: 8px; }
.group-title + .footnote, .group-title + .card { margin-top: 10px; }
.card { background: var(--card); border-radius: var(--radius); overflow: hidden; }
.card.pad { padding: 14px 16px; }
.row { display: flex; align-items: center; gap: 12px; padding: 12px 16px; min-height: 48px; }
.row + .row { border-top: 0.5px solid var(--line); }
.row .grow { flex: 1; min-width: 0; }
.muted { color: var(--muted); }
.small { font-size: 0.8125rem; }
.error { color: var(--red); }

/* Buttons --------------------------------------------------------------- */

.btn-plain { background: none; border: 0; color: var(--accent); padding: 8px 4px; font-size: 1.0625rem; }
.btn-pill {
  background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 8px 16px;
  font-size: 1rem; min-width: 44px; min-height: 44px;
}
/* The main action of a bar (＋): filled with the accent. */
.btn-pill.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn-pill.icon { width: 44px; padding: 0; font-size: 1.375rem; line-height: 1; }
.btn-pill.strong { font-weight: 600; }
.btn-primary {
  width: 100%; border: 0; border-radius: 999px; background: var(--accent); color: var(--on-accent); font-weight: 600;
  font-size: 1.0625rem; padding: 14px; display: flex; gap: 8px; align-items: center; justify-content: center;
}
.btn-primary:disabled { opacity: 0.5; }
.row-button { width: 100%; text-align: left; background: none; border: 0; color: var(--accent); font-size: 1.0625rem; }
.row-button.danger { color: var(--red); }
/* A button in a list row takes the whole row's height (and its left padding), so a tap anywhere on the row works,
   not only on the text: at least 44 pt, as Apple asks for touch targets. */
.row > .row-button { align-self: stretch; margin-block: -12px; padding-block: 12px; }
.row > .row-button:first-child { margin-inline-start: -16px; padding-inline-start: 16px; }
/* Small icon buttons (✕, ♥, Delen) keep their look but get a 44 pt target. */
.btn-plain.small, .btn-plain.again-heart { min-width: 44px; min-height: 44px; }
button:disabled { opacity: 0.45; cursor: default; }

/* Search, segmented ----------------------------------------------------- */

.search {
  display: flex; align-items: center; gap: 10px; background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  padding: 11px 14px; margin-bottom: 12px;
}
.search input { flex: 1; border: 0; background: none; outline: none; font-size: 1.0625rem; min-width: 0; }
/* Tabs on a line: the chosen one bold, with a thick line under it. */
.segmented { display: flex; gap: 24px; border-bottom: 1px solid var(--line); margin-bottom: 16px; overflow-x: auto; scrollbar-width: none; }
.segmented button {
  flex: none; border: 0; border-bottom: 3px solid transparent; margin-bottom: -1px; background: none; padding: 6px 0 10px;
  font-size: 0.9375rem; font-weight: 500; color: var(--muted); white-space: nowrap; min-height: 44px;
}
.segmented button[aria-pressed="true"] { color: var(--text); font-weight: 600; border-bottom-color: var(--segment-on); }
.segmented .n { font-weight: 400; color: var(--muted); }

.cellar-pills { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.cellar-pills button {
  border: 1px solid var(--line); background: var(--card); border-radius: 999px; padding: 7px 14px;
  font-size: 0.9375rem; line-height: 1.2; max-width: 100%; overflow-wrap: anywhere; text-align: center;
}
.cellar-pills button[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); font-weight: 600; }

/* Summary --------------------------------------------------------------- */

.summary-head { display: flex; align-items: baseline; gap: 8px; margin-bottom: 12px; }
.summary-head .big { font-family: var(--display); font-size: 2.25rem; font-weight: 700; font-stretch: 85%; }
.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.tile {
  border: 0; border-radius: 10px; padding: 8px 2px; text-align: center; background: color-mix(in srgb, currentColor 12%, transparent);
}
.tile b { display: block; font-size: 1.125rem; }
.tile span { display: block; font-size: 0.6875rem; line-height: 1.2; text-wrap: balance; }

/* Wine rows ------------------------------------------------------------- */

.wine-row { display: flex; gap: 12px; align-items: center; padding: 12px 16px; background: none; border: 0; width: 100%; text-align: left; }
.wine-row + .wine-row, .pick + .pick { border-top: 0.5px solid var(--line); }
.thumb {
  width: 52px; height: 66px; border-radius: 12px; object-fit: cover; flex: none; display: grid; place-items: center;
  font-size: 1.375rem; background: color-mix(in srgb, var(--wine) 18%, transparent);
}
.thumb.lg { width: 112px; height: 150px; font-size: 2.75rem; border-radius: 20px; }
img.thumb { background: var(--field); }
.wine-row .name { font-weight: 600; font-size: 1.0625rem; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.wine-row .sub { color: var(--muted); font-size: 0.875rem; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.meta { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; font-size: 0.75rem; color: var(--muted); margin-top: 4px; }
.meta > * { white-space: nowrap; }
.qty { font-family: var(--display); font-size: 1.25rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.status { font-weight: 600; }
/* Past its peak stands out: a solid badge, a red bar beside the row, an outlined tile. */
.status.past { color: var(--on-red); background: var(--red); padding: 1px 7px; border-radius: 999px; }
.wine-row.past { box-shadow: inset 4px 0 0 var(--red); }
/* The kind of wine in the colour of its type (gold for sparkling); vintage and origin stay muted. */
.wine-row .sub .kind { color: color-mix(in srgb, var(--c) 65%, #000); font-weight: 600; }
@media (prefers-color-scheme: dark) { .wine-row .sub .kind { color: color-mix(in srgb, var(--c) 65%, #fff); } }
/* A magnum or bigger stands out: a golden badge and a golden frame around the photo. */
/* A magnum or bigger stands out: a solid gold badge, a gold frame around the photo and a touch of gold behind the row. */
.big-bottle { color: #2a1d02; background: linear-gradient(135deg, #f0cf7e, #c8961c); font-weight: 700; padding: 1px 8px; border-radius: 999px; }
.wine-row.big { background: color-mix(in srgb, var(--foil) 7%, transparent); }
.wine-row.big .thumb { box-shadow: 0 0 0 2px var(--card), 0 0 0 5px var(--foil); }
.tile.alert { box-shadow: inset 0 0 0 1.5px var(--red); }
.status.tooYoung { color: var(--blue); }
.status.ready { color: var(--green); }
.status.peakEnding { color: var(--orange); }
.status.unknown { color: var(--muted); }

.empty { text-align: center; padding: 64px 24px; color: var(--muted); }
.empty .icon { display: inline-grid; place-items: center; width: 88px; height: 88px; border-radius: 50%; background: var(--field); color: var(--accent); }
.empty .icon .ic { width: 44px; height: 44px; stroke-width: 1.5; }
.btn-plain.with-ic { display: inline-flex; gap: 8px; }
/* The action of an empty screen: a full button, as wide as its text. */
.btn-primary.empty-action { width: fit-content; max-width: 100%; margin: 20px auto 0; padding: 12px 22px; text-align: left; }
.btn-primary .row-ic { color: inherit; }
.empty h2 { color: var(--text); font-size: 1.25rem; margin: 12px 0 4px; }

/* Chips ----------------------------------------------------------------- */

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
/* A chip's text is its colour mixed towards the text colour, so a light colour (white wine, gold) stays readable. */
.chip { font-size: 0.8125rem; font-weight: 500; padding: 5px 10px; border-radius: 999px; background: color-mix(in srgb, var(--c, var(--accent)) 14%, transparent); color: color-mix(in srgb, var(--c, var(--accent)) 65%, var(--text)); }
.suggest { display: flex; flex-wrap: wrap; gap: 8px; padding: 14px 16px; }
.suggest button {
  border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent); background: var(--accent-soft); color: var(--accent);
  border-radius: 999px; padding: 8px 12px; font-size: 0.9375rem; font-weight: 500;
}
.suggest button[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }

/* Detail ---------------------------------------------------------------- */

.detail-head { display: flex; gap: 20px; align-items: flex-end; margin: 8px 0 16px; }
.detail-head .producer { font-size: 0.875rem; color: var(--muted); }
.detail-head h1 { margin: 2px 0 6px; font-family: var(--display); font-size: 2.125rem; line-height: 1; font-weight: 700; font-stretch: 82%; letter-spacing: -0.02em; }
.ratings { display: flex; gap: 10px; }
.rating { flex: 1; text-align: center; background: var(--card); border-radius: 12px; padding: 10px 4px; }
.rating b { font-size: 1.5rem; }
.window-bar { position: relative; height: 12px; border-radius: 6px; background: var(--field); margin: 10px 0 4px; }
.window-bar .fill { position: absolute; top: 0; bottom: 0; border-radius: 6px; background: var(--wine, var(--accent)); opacity: 0.55; }
.window-bar .now { position: absolute; top: -2px; width: 16px; height: 16px; margin-left: -8px; border-radius: 50%; background: var(--foil); border: 3px solid var(--card); }
.window-labels { display: flex; justify-content: space-between; font-size: 0.75rem; color: var(--muted); }
.structure .dots { color: var(--accent); letter-spacing: 2px; font-size: 0.9375rem; }
.structure .word { min-width: 84px; text-align: right; }
.facts .row { min-height: 0; padding: 10px 16px; font-size: 0.9375rem; }
.facts .row .v { text-align: right; flex: 1; }
.stepper { display: flex; border-radius: 10px; background: var(--field); }
.stepper button { border: 0; background: none; width: 44px; height: 44px; font-size: 1.25rem; }
.stars { display: flex; }
.stars button { border: 0; background: none; font-size: 1.625rem; color: var(--foil); padding: 0; line-height: 1; min-width: 44px; min-height: 44px; }

/* Forms ----------------------------------------------------------------- */

.field { display: flex; flex-direction: column; gap: 2px; padding: 10px 16px; }
.field + .field, .field + .row, .row + .field { border-top: 0.5px solid var(--line); }
.field label { font-size: 0.75rem; color: var(--muted); }
.field input, .field textarea, .field select { border: 0; background: none; outline: none; font-size: 1.0625rem; padding: 2px 0; width: 100%; }
.field textarea { resize: vertical; min-height: 44px; }
@supports (field-sizing: content) { #pair-q { field-sizing: content; max-block-size: 6lh; } } /* the question, and its long example, wrap */
@supports (field-sizing: content) { .field textarea { field-sizing: content; max-block-size: 12lh; resize: none; } } /* grows with the note */
.field.split { flex-direction: row; gap: 12px; }
.row > input[type="checkbox"] { flex: none; margin: 0; }
/* A checkbox where the browser has no switch (app.js sets .has-switch): big enough to see and tap. */
html:not(.has-switch) .row > input[type="checkbox"] { width: 24px; height: 24px; }
.field.split > div { flex: 1; display: flex; flex-direction: column; gap: 2px; }

.analyzing { text-align: center; padding: 24px 8px; }
.analyzing img { max-height: 320px; margin: 0 auto 24px; border-radius: 16px; box-shadow: 0 8px 24px rgb(0 0 0 / 0.18); }
.spinner { width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--field); border-top-color: var(--accent); margin: 0 auto 16px; animation: spin 0.8s linear infinite; }
.spinner.sm { width: 18px; height: 18px; border-width: 2px; margin: 0; }
@keyframes spin { to { transform: rotate(360deg); } }
.notice { background: color-mix(in srgb, var(--orange) 14%, transparent); color: var(--orange); border-radius: 12px; padding: 12px 14px; font-size: 0.875rem; margin-top: 12px; }
.notice.err { background: color-mix(in srgb, var(--red) 12%, transparent); color: var(--red); }

/* Tab bar --------------------------------------------------------------- */

.tabbar {
  position: fixed; left: max(16px, env(safe-area-inset-left)); right: max(16px, env(safe-area-inset-right));
  bottom: calc(env(safe-area-inset-bottom) + 10px); z-index: 10;
  display: flex; max-width: 520px; margin: 0 auto; height: var(--tabbar-h); border-radius: 33px;
  background: var(--tabbar); color: var(--tab-off); box-shadow: 0 10px 30px rgb(30 59 48 / 0.28); padding: 6px;
}
.tabbar button { flex: 1; border: 0; background: none; color: inherit; border-radius: 26px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 0.6875rem; font-weight: 500; }
.tabbar button .ic { display: block; width: 24px; height: 24px; }
.tabbar button[aria-current="page"] { color: var(--tab-on); font-weight: 600; }
.tabbar button { position: relative; white-space: nowrap; letter-spacing: -0.01em; min-width: 0; }
.tabbar :focus-visible { outline-color: var(--tab-on); }
.tab-badge { position: absolute; top: 2px; left: calc(50% + 6px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px;
  background: var(--red); color: var(--on-red); font-size: 0.6875rem; font-weight: 700; line-height: 18px; text-align: center; }

/* Dialog (bottom sheet) ------------------------------------------------- */

dialog.sheet {
  border: 0; padding: 0; width: 100%; max-width: 560px; margin: auto auto 0; border-radius: 20px 20px 0 0;
  background: var(--bg); color: var(--text); max-height: 90dvh;
}
dialog.sheet::backdrop { background: rgb(0 0 0 / 0.35); }
dialog.sheet .inner { padding: 0 var(--gutter-right) calc(env(safe-area-inset-bottom) + 20px) var(--gutter-left); }
dialog.sheet .topbar { padding-top: 18px; }
dialog.sheet .topbar::after {
  content: ""; position: absolute; top: 6px; left: 50%; translate: -50% 0; width: 36px; height: 5px; border-radius: 3px;
  background: var(--muted); opacity: 0.4;
}
dialog.sheet[open] { animation: sheet-up 0.22s ease-out; }
@keyframes sheet-up { from { transform: translateY(100%); } }

/* Full-screen photo ---------------------------------------------------- */

.photo-open { border: 0; padding: 0; background: none; cursor: zoom-in; }
dialog.viewer {
  border: 0; padding: 0; margin: 0; width: 100vw; height: 100dvh; max-width: none; max-height: none;
  background: rgb(0 0 0 / 0.92); display: none; align-items: center; justify-content: center;
}
dialog.viewer[open] { display: flex; }
dialog.viewer::backdrop { background: transparent; }
dialog.viewer img { max-width: 100%; max-height: 100%; object-fit: contain; }
dialog.viewer .close {
  position: absolute; top: calc(var(--safe-top) + 12px); right: var(--gutter-right); width: 44px; height: 44px; border-radius: 50%;
  border: 0; background: rgb(255 255 255 / 0.2); color: #fff; font-size: 1.25rem; cursor: pointer;
}

.best-now {
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px; width: 100%; margin: 4px 0 8px; padding: 14px 16px;
  border: 0; border-radius: 14px; background: var(--card); color: var(--text); font-size: 1.0625rem; font-weight: 600; text-align: left;
}
.best-now:has(.tile-ic) { flex-direction: row; align-items: center; gap: 14px; }
.best-now .bn-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.best-now .bn-text > span { font-size: 0.8125rem; font-weight: 400; color: var(--muted); }
.best-now .tile-ic { background: var(--field); }
.best-now[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); }
.best-now[aria-pressed="true"] .bn-text > span { color: inherit; opacity: 0.85; }
.best-now[aria-pressed="true"] .tile-ic { background: rgb(255 255 255 / 0.16); color: inherit; }

/* Pull to refresh (app.js): an arrow that turns when far enough, then spins while loading. */
#pull {
  position: fixed; left: 50%; top: calc(var(--safe-top) + 8px); z-index: 15; width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center; background: var(--card); color: var(--accent); box-shadow: 0 2px 8px rgb(0 0 0 / 0.15);
  transform: translate(-50%, -40px); opacity: 0; pointer-events: none;
}
#pull .arrow { font-size: 1.125rem; font-weight: 600; transition: transform 0.2s; }
#pull.ready .arrow { transform: rotate(180deg); }
#pull.busy .arrow { animation: spin 0.8s linear infinite; }
@media (prefers-reduced-motion: reduce) { #pull.busy .arrow { animation: none; } }
.toast {
  position: fixed; left: 50%; bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 24px); transform: translateX(-50%);
  background: var(--text); color: var(--bg); padding: 10px 16px; border-radius: 18px; font-size: 0.875rem; z-index: 50;
  width: max-content; max-width: min(90vw, 480px); text-align: center; line-height: 1.35;
  animation: toast-in 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
}
@keyframes toast-in { from { opacity: 0; translate: 0 12px; } }
/* "De app wordt bijgewerkt": at the top, above sheets, while the server restarts. */
.toast.updating { bottom: auto; top: calc(var(--safe-top) + 12px); z-index: 100; display: flex; align-items: center; gap: 8px; }
@media (prefers-reduced-motion: reduce) { .toast { animation: none; } }
/* Hidden visually, still read by screen readers (visible again when focused). */
.visually-hidden:where(:not(:focus-within, :active)) {
  position: absolute !important; clip-path: inset(50%) !important; overflow: hidden !important;
  width: 1px !important; height: 1px !important; margin: -1px !important; padding: 0 !important;
  border: 0 !important; white-space: nowrap !important;
}
/* File inputs live inside a styled <label>; the label shows the keyboard focus. */
.file-input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
label:has(> .file-input:focus-visible) { outline: 3px solid var(--accent); outline-offset: 3px; }

:where(a:any-link, button, input, select, textarea, summary):focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
dialog:focus { outline: none; } /* the sheet itself holds the focus when it opens (app.js) */

@media (prefers-reduced-motion: reduce) {
  .spinner { animation: none; opacity: 0.5; }
}

/* Value tracking ----------------------------------------------------------- */

.value-chart { width: 100%; height: auto; display: block; touch-action: pan-y; }
.value-chart .grid { stroke: var(--line); stroke-width: 1; }
.value-chart .ref { stroke: var(--muted); stroke-width: 1; opacity: 0.7; }
.value-chart .line { fill: none; stroke: var(--chart-line); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.value-chart .dot { fill: var(--chart-line); stroke: var(--card); stroke-width: 2; }
.value-chart .dot.active { r: 6; }
.value-chart .hit { fill: transparent; cursor: pointer; }
.value-chart text { fill: var(--muted); font-size: 11px; font-family: inherit; }
.value-chart text.end { fill: var(--text); font-weight: 600; font-size: 12px; }
.readout { font-size: 0.875rem; color: var(--muted); margin-top: 6px; min-height: 1.3em; }
.readout b { color: var(--text); }
.spark { width: 72px; height: 24px; flex: none; }
.spark polyline { fill: none; stroke: var(--muted); stroke-width: 1.5; stroke-linejoin: round; stroke-linecap: round; }
.spark circle { fill: var(--chart-line); }
.stat .label { font-size: 0.8125rem; color: var(--muted); }
.stat .value { font-family: var(--display); font-size: 2.25rem; font-weight: 700; font-stretch: 85%; }
.delta { font-size: 0.875rem; font-weight: 600; }
.delta.up { color: var(--green); }
.delta.down { color: var(--red); }
.delta.flat { color: var(--muted); }
.estimate { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 8px; margin-top: 12px; padding: 0 2px; }
.estimate b { font-size: 1.125rem; margin-left: auto; font-variant-numeric: tabular-nums; }
.estimate b + span { flex-basis: 100%; text-align: right; }
.value-tile { width: 100%; margin-top: 12px; display: flex; align-items: center; gap: 10px; border: 0; border-radius: 14px;
  padding: 12px 14px; background: var(--field); text-align: left; }

/* Photo search results: tap one to use it. */
.row.photo-picks { display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 8px; }
.photo-picks button { border: 0; padding: 0; background: var(--field); border-radius: 10px; overflow: hidden; cursor: pointer; }
.photo-picks img { display: block; width: 100%; aspect-ratio: 3 / 4; object-fit: contain; }

/* "Wil ik opnieuw drinken" heart */
.again-heart { color: var(--muted, #8e8e93); font-size: 1.375rem; line-height: 1; }
.again-heart.on { color: var(--red); }
.gone-tag { font-weight: 600; color: var(--muted); }
/* The shops to buy a wine again: links in the link colour, underlined. */
.shop-links { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin-top: 6px; color: var(--muted); }
.shop-links > .ii { margin-right: 0; }
.shop-links a { color: var(--link); font-weight: 500; text-decoration: underline; text-underline-offset: 2px; white-space: nowrap; }
/* A second action next to a main one: a soft pill in the accent colour. */
.btn-soft { display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; min-height: 40px; padding: 0 16px; border: 0; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent); font-size: 0.9375rem; font-weight: 600; }

/* Login and first-run screen */
.auth { max-width: 420px; margin: 0 auto; padding-top: max(4vh, 12px); }
.auth > .muted { margin: 16px 4px 0; }
.auth-hero { position: relative; overflow: hidden; border-radius: 28px; background: var(--tabbar); color: #eceee8;
  padding: 32px 24px 64px; text-align: center; }
.auth-icon { display: block; margin: 0 auto 16px; border-radius: 18px; box-shadow: 0 0 0 1px rgb(236 238 232 / 0.18); }
.auth-hero h1 { margin: 0; font-family: var(--display); font-size: 2.75rem; line-height: 1; font-weight: 700; font-stretch: 82%; letter-spacing: -0.02em; }
.auth-hero p { margin: 8px 0 0; color: #c3cec7; }
.auth-ridge { position: absolute; left: 0; right: 0; bottom: -1px; width: 100%; height: 48px; }
.auth-ridge path { fill: var(--bg); }
.auth-ridge .crest { fill: none; stroke: var(--foil); stroke-width: 2.5; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.auth .card { margin-top: 16px; }
.auth-submit { padding: 12px 16px 16px; border-top: 0.5px solid var(--line); }
.auth-submit .spinner { border-color: rgb(255 255 255 / 0.3); border-top-color: currentColor; }
.tabbar[hidden] { display: none; }
.reactions { padding: 12px 14px; }
.reactions .again-heart { font-size: 1.125rem; }
.reactions button[aria-pressed="true"] .again-heart { color: inherit; }
.log-open { display: flex; gap: 12px; align-items: flex-start; flex: 1; min-width: 0; padding: 0; background: none; border: 0; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.toast button { margin-left: 12px; padding: 0; border: 0; background: none; color: inherit; font: inherit; font-weight: 700; text-decoration: underline; cursor: pointer; }

/* Overview page ---------------------------------------------------------- */

/* Wine list: the pages taken, and how much a wine costs over its shop price. */
.list-photos { gap: 8px; flex-wrap: wrap; }
.list-photo { position: relative; }
.list-photo img { width: 64px; height: 84px; object-fit: cover; border-radius: 8px; display: block; }
.list-photo button { position: absolute; top: -10px; right: -10px; min-width: 32px; min-height: 32px; padding: 0; font-size: 0.875rem; }
.list-rank { background: var(--accent-soft); color: var(--accent); font-weight: 700; }
.markup { font-weight: 600; padding: 1px 7px; border-radius: 999px; }
.markup.ok { color: color-mix(in srgb, var(--green) 70%, var(--text)); background: color-mix(in srgb, var(--green) 14%, transparent); }
.markup.mid { color: var(--text); background: var(--field); }
.markup.high { color: color-mix(in srgb, var(--red) 70%, var(--text)); background: color-mix(in srgb, var(--red) 14%, transparent); }
.year-hero { text-align: center; padding: 20px 16px 24px; }
.year-hero b { display: block; font-family: var(--display); font-size: 4.5rem; font-weight: 800; font-stretch: 80%; line-height: 1.05; letter-spacing: -1px; color: var(--accent); }
.stat-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.stat-tile { background: var(--card); border-radius: var(--radius); padding: 14px 16px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.stat-tile b { font-family: var(--display); font-size: 1.875rem; font-weight: 700; font-stretch: 85%; }
.bar-list { padding: 6px 0; }
/* Name and number on one line, the bar under it over the full width: a long name ("Orin Swift Mercury Head 2019")
   stays readable and may take two lines instead of being cut off. */
.bar-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "label value" "track track";
  align-items: baseline; gap: 4px 12px; padding: 8px 16px; }
.bar-label { grid-area: label; overflow-wrap: anywhere; }
.bar-value { grid-area: value; }
.bar-track { grid-area: track; height: 8px; }
.bar { display: block; height: 100%; background: var(--chart-line); border-radius: 0 4px 4px 0; } /* rounded at the data end */
.bar-value { color: var(--muted); font-size: 0.875rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.month-chart .col { fill: var(--chart-line); }
.month-chart .col.active { stroke: var(--text); stroke-width: 1.5; }
.month-chart text.on { fill: var(--text); font-weight: 600; }
.welcome { margin-bottom: 12px; }
.welcome a { color: var(--accent); }
.howto { padding: 4px 16px 12px; }
.howto summary { padding: 10px 0; color: var(--accent); cursor: pointer; font-weight: 500; }
.howto ol { margin: 4px 0 8px; padding-left: 20px; }
.howto li { margin: 8px 0; line-height: 1.4; }
.howto a { color: var(--accent); }
.howto code { font-size: 0.8125rem; }
.model-family { font-size: 0.8125rem; font-weight: 600; color: var(--muted); padding-top: 14px; padding-bottom: 4px; }

/* Kelder: the cellar picker in the title, the ridge of drink windows, the status chips ------------------------------ */

.title-picker { display: inline-flex; align-items: center; gap: 6px; padding: 0; border: 0; background: none; color: inherit;
  font: inherit; letter-spacing: inherit; text-align: left; }
.title-picker .ic { width: 0.55em; height: 0.55em; flex: none; margin-top: 0.12em; }
.cellar-pick { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; margin-bottom: 12px; padding: 0 14px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--card); font-size: 0.9375rem; font-weight: 500; }
.cellar-pick .ic { width: 16px; height: 16px; }
.cellar-pick .pick-ic { display: grid; color: var(--accent); }
.cellar-pick .pick-ic .ic { width: 18px; height: 18px; }
.peaks { margin: 4px 2px 18px; }
.peaks-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.peaks-head h2 { margin: 0; font-size: 0.9375rem; font-weight: 600; }
/* The ridge stretches over the whole width at a fixed height; its words stay their own size (HTML over the SVG). */
.peaks-plot { position: relative; margin-top: 10px; padding-top: 26px; }
.peaks-plot svg { display: block; width: 100%; height: clamp(110px, 18vw, 170px); overflow: visible; }
.peaks .ridge { fill: var(--text); }
.peaks .crest { fill: none; stroke: var(--foil); stroke-width: 3; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.peaks .flag { stroke: var(--foil); stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.peaks .base { stroke: var(--text); stroke-width: 1; vector-effect: non-scaling-stroke; }
.peak-label { position: absolute; top: 0; margin-left: 8px; font-size: 13px; font-weight: 600; white-space: nowrap; }
.peak-label.right { transform: translateX(-100%); margin-left: -8px; }
.peaks-ticks { position: relative; height: 20px; margin-top: 4px; font-size: 12px; color: var(--muted); }
.peaks-ticks span { position: absolute; top: 0; white-space: nowrap; }
.peaks-ticks .middle { transform: translateX(-50%); }
.peaks-ticks .end { transform: translateX(-100%); }
.status-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.status-chip { min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--card);
  font-size: 0.875rem; font-weight: 500; font-variant-numeric: tabular-nums; }
.status-chip.peakEnding { border: 1.5px solid var(--foil); background: var(--gold-soft); color: var(--gold); font-weight: 600; }
.status-chip.past.alert { border-color: color-mix(in srgb, var(--red) 40%, transparent); background: color-mix(in srgb, var(--red) 9%, transparent); color: var(--red); }
.tiles-card { margin-bottom: 4px; }
.tile-ic { width: 36px; height: 36px; flex: none; display: grid; place-items: center; border-radius: 50%; background: var(--card); color: var(--accent); }
.tile-ic .ic { width: 20px; height: 20px; }
.tiles-card > .value-tile:first-child { margin-top: 0; }
/* A wine's drink window in its row: a thin bar in its colour and a gold dot for now. */
.window-mini { margin-top: 8px; max-width: 220px; }
.window-mini .track { position: relative; height: 6px; border-radius: 3px; background: var(--field); }
.window-mini .fill { position: absolute; top: 0; bottom: 0; border-radius: 3px; background: var(--wine); opacity: 0.55; }
.window-mini .now { position: absolute; top: -3px; width: 12px; height: 12px; margin-left: -6px; border-radius: 50%; background: var(--foil); border: 2px solid var(--card); }
.window-mini .years { display: flex; justify-content: space-between; font-size: 0.75rem; color: var(--muted); margin-top: 3px; font-variant-numeric: tabular-nums; }

/* Gedronken: a card per day; an evening of three or more bottles with their photos side by side --------------------- */

.day-card { margin-bottom: 12px; }
.day-head { display: flex; align-items: center; gap: 14px; padding: 14px 16px 12px; }
.day-date { width: 46px; flex: none; text-align: center; }
.day-date b { display: block; font-family: var(--display); font-size: 1.875rem; line-height: 1; font-weight: 650; font-variant-numeric: tabular-nums; }
.day-date span { font-size: 0.75rem; color: var(--muted); }
.day-title { font-family: var(--display); font-size: 1.1875rem; font-weight: 600; font-stretch: 92%; line-height: 1.2; overflow-wrap: anywhere; }
/* "met Pieter" under an evening shared with another account, and the quiet Delen to share one. */
.day-with { color: var(--accent); margin-top: 2px; }
/* A shared evening to accept, in Meldingen. */
.share-actions { display: flex; gap: 8px; align-items: center; padding: 12px 16px; }
.share-actions .btn-soft { flex: 1; margin-top: 0; justify-content: center; }
/* Avond delen, Tip sturen: whom you shared with lately, one tap each. */
.people-recent { display: flex; flex-wrap: wrap; gap: 8px; }
.people-chip { display: inline-flex; align-items: center; gap: 8px; padding: 0 14px 0 5px; color: var(--text); }
.people-initial { width: 30px; height: 30px; flex: none; display: grid; place-items: center; border-radius: 50%;
  background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent); font-weight: 600; font-size: 0.8125rem; }
.day-share { flex: none; align-self: flex-start; display: inline-flex; align-items: center; font-size: 0.875rem; padding: 6px 12px; min-height: 36px; color: var(--accent); }
/* All the evening's photos in a row that scrolls sideways; each opens its bottle. */
.day-strip { display: flex; gap: 8px; padding: 0 16px 14px; overflow-x: auto; scrollbar-width: none; scroll-snap-type: x proximity; }
.day-strip::-webkit-scrollbar { display: none; }
.day-strip button { flex: none; padding: 0; border: 0; background: var(--field); border-radius: 12px; overflow: hidden; scroll-snap-align: start; }
.day-strip img { width: 72px; height: 92px; object-fit: cover; }
.day-card .wine-row { border-top: 0.5px solid var(--line); padding-right: 4px; }
.log-row { align-items: center; }
.log-row .log-open { align-items: center; }
.log-row.compact { padding-block: 8px; }
.log-row.compact .type-dot { flex: none; margin: 0 4px 0 2px; }
.log-row.compact .name { font-size: 0.9375rem; -webkit-line-clamp: 1; }
.log-stars { color: var(--foil); letter-spacing: 1px; }
/* Vintage (and cellar) give way first; the stars and reactions always show. */
.log-row .sub { display: flex; align-items: center; gap: 6px; }
.log-row .sub .type-dot { margin-right: 0; flex: none; }
.log-row .sub .txt { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.log-row .sub > :not(.txt) { flex: none; }

/* A drunk bottle's page: "Jouw fles", then the wine and its drink window as a hill ------------------------------------ */

.my-bottle { padding: 20px 20px 0; margin-top: 8px; }
.my-bottle .group-title { margin: 0; }
.my-score { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-top: 14px; }
.big-stars { font-size: 1.875rem; letter-spacing: 3px; color: var(--foil); line-height: 1; }
.big-stars .off { color: var(--field); }
.chip.quiet { --c: var(--text); }
.chip.again { --c: var(--red); font-weight: 600; }
.my-note { margin: 16px 0 0; font-family: var(--display); font-size: 1.25rem; line-height: 1.3; font-stretch: 95%; overflow-wrap: anywhere; }
.add-note { display: block; width: 100%; margin-top: 16px; padding: 14px 16px; border: 1.5px dashed var(--line); border-radius: 16px;
  background: none; color: var(--muted); text-align: left; font-size: 0.9375rem; }
.my-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 16px 0; }
.my-facts > div { display: flex; flex-direction: column; min-width: 0; overflow-wrap: anywhere; }
.my-bottle > .row { margin: 0 -20px; padding-inline: 20px; border-top: 0.5px solid var(--line); }
.my-bottle > .row > .row-button:first-child { margin-inline-start: -20px; padding-inline-start: 20px; }
.buy-again { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.window-curve { margin: 14px 2px 4px; --best: var(--gold-soft); }
.window-curve svg { display: block; width: 100%; max-width: 520px; height: auto; overflow: visible; }
.window-curve .best { fill: var(--best); }
.window-curve .hill-fill { fill: var(--wine); opacity: 0.18; }
.window-curve .hill { fill: none; stroke: var(--wine); stroke-width: 2.5; }
.window-curve .base { stroke: var(--text); stroke-width: 1; }
.window-curve .mark-line { stroke: var(--text); stroke-width: 1.5; stroke-dasharray: 3 3; }
.window-curve .mark { fill: var(--foil); stroke: var(--bg); stroke-width: 2.5; }
.window-curve text { fill: var(--muted); font-size: 12px; font-family: inherit; }
.window-curve .mark-label { fill: var(--text); font-size: 13px; font-weight: 600; }
.window-curve .best-label { fill: var(--gold); }
@media (prefers-color-scheme: dark) { .window-curve .hill-fill { opacity: 0.32; } .peaks .ridge { fill: #2c4a3d; } .peaks .base { stroke: var(--muted); } }

/* An invoice to check: a line per wine, its numbers side by side, what it adds to ----------------------------------- */

.invoice-line { display: flex; gap: 12px; align-items: flex-start; padding: 12px 16px; }
.invoice-line + .invoice-line { border-top: 0.5px solid var(--line); }
.invoice-line > input[type="checkbox"] { flex: none; width: 22px; height: 22px; margin: 4px 0 0; }
.invoice-line.off .grow { opacity: 0.5; }
.invoice-line input:not([type="checkbox"]), .invoice-line select { width: 100%; border: 0; background: none; outline: none; padding: 2px 0; }
.invoice-line .inv-producer { font-size: 0.875rem; color: var(--muted); }
.invoice-line .inv-name { font-size: 1.0625rem; font-weight: 600; }
.inv-numbers { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 8px; }
.inv-numbers label { display: flex; flex-direction: column; font-size: 0.75rem; color: var(--muted); background: var(--field); border-radius: 10px; padding: 6px 10px; }
.inv-numbers input { font-size: 1rem; color: var(--text); font-variant-numeric: tabular-nums; }
.inv-target { display: block; margin-top: 8px; }
.inv-target select { font-size: 0.875rem; color: var(--accent); font-weight: 500; }
.row-link { justify-content: space-between; color: var(--accent); text-decoration: none; }

/* Instellingen > Accounts: a long e-mail address as username breaks off instead of running under the buttons. */
.account-row { align-items: flex-start; }
.account-name { overflow-wrap: anywhere; }
.account-reset { display: block; padding: 0; min-height: 36px; text-align: left; font-size: 0.9375rem; }

/* A line icon in front of a row's text, in the accent colour (Instellingen). */
.row-ic { display: grid; place-items: center; flex: none; width: 24px; color: var(--accent); }
.row-ic .ic { width: 22px; height: 22px; }
.with-ic { display: flex; align-items: center; gap: 12px; }
a.row-button { text-decoration: none; }
.section-title.with-ic .row-ic .ic { width: 24px; height: 24px; }

/* Line icons in text and on buttons (ii), the size of the text; emoji only stay in the reactions and Wat drinken?. */
.ii { display: inline-flex; vertical-align: -0.16em; margin-right: 0.4em; }
.ii .ic { width: 1.15em; height: 1.15em; }
.row-button .ii, .btn-plain .ii, .search .ii { color: var(--accent); }
.btn-primary .ii, .status .ii, .notice .ii, .gone-tag .ii, .big-bottle .ii { color: inherit; }
.search .ii { margin-right: 0; }
.hero-ic { display: grid; place-items: center; width: 88px; height: 88px; margin: 0 auto 12px; border-radius: 50%; background: var(--field); color: var(--accent); }
.hero-ic .ic { width: 44px; height: 44px; stroke-width: 1.5; }
.thumb .ic { width: 26px; height: 26px; color: color-mix(in srgb, var(--wine, var(--accent)) 70%, var(--text)); }
.thumb.lg .ic { width: 48px; height: 48px; stroke-width: 1.5; }
.welcome-tick { width: 22px; height: 22px; flex: none; border-radius: 50%; border: 1.5px solid var(--line); display: grid; place-items: center; }
.welcome-tick.done { border: 0; color: var(--green); }
.welcome-tick .ic { width: 22px; height: 22px; }
.rating-ic { display: flex; justify-content: center; margin-bottom: 2px; }
.order-btn { font-size: 1.125rem; }
.order-btn:disabled { opacity: 0.3; }

/* "Waar" with a button that looks up the places around you, and the places found to pick from. */
.place-input { display: flex; align-items: center; gap: 8px; }
.place-input input { flex: 1; min-width: 0; }
.place-here { display: inline-flex; align-items: center; min-height: 36px; padding: 4px 12px; font-size: 0.875rem; font-weight: 600; color: var(--accent); }
.place-here .ii { color: inherit; }
.place-here .spinner { margin-right: 6px; }
.row.place-picks { flex-wrap: wrap; gap: 8px; }
.place-picks button { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; padding: 8px 12px; border: 1px solid var(--line);
  border-radius: 14px; background: var(--card); text-align: left; max-width: 100%; }
.place-picks b { font-weight: 600; overflow-wrap: anywhere; }

/* A wine on the wishlist: its buttons under it, over the whole width of the card. */
.wish-row + .wish-row { border-top: 0.5px solid var(--line); }
.wish-row .wine-row { padding-bottom: 4px; }
.wish-actions { padding: 0 16px 14px; }
.wish-actions .btn-soft { margin-top: 4px; }

/* The reactions in small groups under a heading (Moment, Bij het eten, Prijs, Smaak). */
.reactions .reaction-group + .reaction-group { margin-top: 12px; }
.reactions .reaction-group .suggest { padding: 0; }
.reaction-title { font-size: 0.8125rem; font-weight: 600; color: var(--muted); margin: 0 2px 6px; }
/* What the last bottle of a wine said about the moment: on its page and in the list. */
.notice.moment { display: block; color: var(--text); background: var(--field); }
.notice.moment.jong .ii { color: var(--blue); }
.notice.moment.best .ii { color: var(--green); }
.notice.moment.over { background: color-mix(in srgb, var(--orange) 12%, transparent); }
.notice.moment.over .ii { color: var(--orange); }
.notice.moment .btn-soft { display: flex; margin-top: 10px; }
.moment-line { margin-top: 4px; color: var(--muted); }
.moment-line.over { color: var(--orange); }
/* A magnum or bigger in Gedronken: the same gold as in the cellar, also on an evening's photos and the bottle's page. */
.day-strip button.big { box-shadow: 0 0 0 2px var(--card), 0 0 0 5px var(--foil); margin: 5px; }
.detail-head.big .thumb { box-shadow: 0 0 0 3px var(--bg), 0 0 0 6px var(--foil); }
.log-big { margin-top: 3px; }
.log-row .big-bottle { font-size: 0.75rem; }
