/* FLOGVIT.eventphotos — tokens copied from portal/design/tokens.css (STYLE.md),
   accent magenta. Chrome rules follow portal/SETTINGS.md: no px floors on chrome
   elements, min-width: 0 on rows, nowrap only on the wordmark itself. */

:root {
  --paper: #faf9f6;
  --surface: #ffffff;
  --ink: #1b1b18;
  --ink-2: #67665f;
  --line: #dcdacf;
  --bad: #c03b2e;
  --accent: #9c2f92;
  --accent-dark: #e79ae0;
  --radius: 10px;
  --radius-pill: 999px;
  --maxw: 1120px;
  --font-ui: 'Schibsted Grotesk', system-ui, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, monospace;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-fv-theme="light"]) {
    --paper: #161614; --surface: #1e1e1b; --ink: #edece6; --ink-2: #99978d; --line: #2e2d29; --bad: #e0604f;
    --accent: var(--accent-dark);
  }
}
:root[data-fv-theme="dark"] {
  --paper: #161614; --surface: #1e1e1b; --ink: #edece6; --ink-2: #99978d; --line: #2e2d29; --bad: #e0604f;
  --accent: var(--accent-dark);
}
:root[data-fv-theme="light"] {
  --paper: #faf9f6; --surface: #ffffff; --ink: #1b1b18; --ink-2: #67665f; --line: #dcdacf; --bad: #c03b2e;
  --accent: #9c2f92;
}

*, *::before, *::after { box-sizing: border-box; min-width: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--font-ui); font-size: 16px; line-height: 1.5;
  display: flex; flex-direction: column; min-height: 100vh;
}
a { color: var(--accent); }
h1, h2, h3 { line-height: 1.15; letter-spacing: -0.01em; margin: 0 0 0.4em; overflow-wrap: anywhere; }
h1 { font-size: clamp(1.7em, 5vw, 2.4em); font-weight: 800; }
h2 { font-size: 1.25em; font-weight: 700; }
p { margin: 0 0 1em; overflow-wrap: anywhere; }
fieldset { min-width: 0; }
img, svg { max-width: 100%; }

.skip-link { position: absolute; left: -999px; top: 0; padding: 8px 12px; background: var(--surface); color: var(--ink); }
.skip-link:focus { left: 8px; z-index: 100; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  padding: calc(10px + env(safe-area-inset-top)) 0 10px;
  background: color-mix(in oklab, var(--paper) 88%, transparent);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.hdr-row {
  max-width: var(--maxw); margin: 0 auto;
  padding: 0 max(12px, env(safe-area-inset-left)) 0 max(12px, env(safe-area-inset-right));
  display: flex; align-items: center; gap: 0.75em; flex-wrap: wrap; min-width: 0;
}
.hdr-nav { display: flex; gap: 0.1em; flex-wrap: wrap; min-width: 0; }
.hdr-nav a {
  padding: 0.4em 0.7em; border-radius: var(--radius-pill);
  font-size: 0.9em; font-weight: 500; color: var(--ink-2); text-decoration: none;
}
.hdr-nav a.active, .hdr-nav a:hover { color: var(--ink); background: color-mix(in oklab, var(--ink) 6%, transparent); }
.hdr-controls { margin-left: auto; display: flex; align-items: center; gap: 0.5em; min-width: 0; }

/* Wordmark (STYLE.md): nowrap on the mark itself, never on the row. */
.wordmark { display: inline-flex; align-items: baseline; font-size: 1.05em; color: var(--ink); min-width: 0; }
.wordmark a { color: var(--ink); text-decoration: none; }
.wordmark a:focus-visible, .fv-summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 2px; }
.wm-product { font-family: var(--font-mono); font-weight: 500; font-size: 0.95em; white-space: nowrap; }
.wm-product-dot { color: var(--accent); font-family: var(--font-ui); font-weight: 800; }

.fv-menu { position: relative; display: inline-block; }
.fv-summary {
  list-style: none; cursor: pointer; display: inline-flex; align-items: baseline; gap: 0.3em;
  font-weight: 800; letter-spacing: -0.02em; white-space: nowrap;
}
.fv-summary::-webkit-details-marker { display: none; }
.fv-caret { color: var(--ink-2); transition: transform 0.15s ease-out; }
.fv-menu[open] .fv-caret { transform: rotate(180deg); }
/* `left: 0`, as in books — never a negative offset in `em`. The panel is
   absolutely positioned, so a pull to the left is measured against the header's
   12 px gutter, and an `em` grows with the text: -0.6em is 10 px at 100 % text
   and 15 px at 150 %, which puts the panel 3 px off the left edge of the screen
   in all eight languages. See test/chrome-meny.test.ts. */
.fv-menu-panel {
  position: absolute; left: 0; top: calc(100% + 0.6em); z-index: 80;
  display: flex; flex-direction: column;
  min-width: min(14em, calc(100vw - 24px)); max-width: calc(100vw - 24px);
  padding: 0.35em; white-space: normal;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
}
.fv-item {
  display: flex; align-items: baseline; justify-content: space-between; gap: 0.8em; flex-wrap: wrap;
  min-width: 0; padding: 0.5em 0.75em; border-radius: 6px;
  font-size: 0.95em; font-weight: 400; letter-spacing: 0; text-decoration: none; color: var(--ink);
}
.fv-item[aria-current] { background: color-mix(in oklab, var(--ink) 6%, var(--surface)); }
.fv-wm { display: inline-flex; align-items: baseline; white-space: nowrap; }
.fv-brand-b { font-weight: 800; letter-spacing: -0.02em; }
.fv-dot { font-weight: 800; color: var(--ink); }
.fv-prod { font-family: var(--font-mono); font-weight: 500; font-size: 0.95em; }
.fv-soon .fv-wm { opacity: 0.5; }
.fv-chip { font-family: var(--font-mono); font-size: 0.7em; color: var(--ink-2); }
.fv-kontoitem { font-size: 0.85em; border-top: 1px solid var(--line); margin-top: 0.25em; padding-top: 0.6em; }
.fv-dot-puzzles { color: #2b5bb7; } .fv-dot-lab { color: #6743b8; } .fv-dot-image { color: #0f6e77; }
.fv-dot-books { color: #2f7d43; } .fv-dot-photo { color: #b0355f; } .fv-dot-photosuite { color: #8a5d0b; }
.fv-dot-bible { color: #7a4a21; } .fv-dot-hides { color: #8a4b22; } .fv-dot-eventphotos { color: #9c2f92; }
@media (prefers-color-scheme: dark) {
  :root:not([data-fv-theme="light"]) .fv-dot-puzzles { color: #7ea6ec; }
  :root:not([data-fv-theme="light"]) .fv-dot-lab { color: #b39df0; }
  :root:not([data-fv-theme="light"]) .fv-dot-image { color: #6fc7cd; }
  :root:not([data-fv-theme="light"]) .fv-dot-books { color: #85c795; }
  :root:not([data-fv-theme="light"]) .fv-dot-photo { color: #ef8fb1; }
  :root:not([data-fv-theme="light"]) .fv-dot-photosuite { color: #e0aa4f; }
  :root:not([data-fv-theme="light"]) .fv-dot-bible { color: #d9a06b; }
  :root:not([data-fv-theme="light"]) .fv-dot-hides { color: #e0996a; }
  :root:not([data-fv-theme="light"]) .fv-dot-eventphotos { color: #e79ae0; }
}
:root[data-fv-theme="dark"] .fv-dot-puzzles { color: #7ea6ec; }
:root[data-fv-theme="dark"] .fv-dot-lab { color: #b39df0; }
:root[data-fv-theme="dark"] .fv-dot-image { color: #6fc7cd; }
:root[data-fv-theme="dark"] .fv-dot-books { color: #85c795; }
:root[data-fv-theme="dark"] .fv-dot-photo { color: #ef8fb1; }
:root[data-fv-theme="dark"] .fv-dot-photosuite { color: #e0aa4f; }
:root[data-fv-theme="dark"] .fv-dot-bible { color: #d9a06b; }
:root[data-fv-theme="dark"] .fv-dot-hides { color: #e0996a; }
:root[data-fv-theme="dark"] .fv-dot-eventphotos { color: #e79ae0; }

.account-chip {
  display: inline-flex; align-items: center; gap: 0.4em; min-height: 2.4em; max-width: 12em; padding: 0 0.8em;
  border: 1px solid var(--line); border-radius: var(--radius-pill); background: var(--surface); color: var(--ink);
  font-size: 0.85em; font-weight: 600; text-decoration: none;
}
.account-chip:hover { border-color: var(--ink-2); }
.account-chip-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-chip-plus {
  flex: none; padding: 0.1em 0.5em; border-radius: var(--radius-pill); background: var(--accent); color: var(--paper);
  font-family: var(--font-mono); font-size: 0.7em; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase;
}
.settings-gear {
  display: inline-flex; align-items: center; justify-content: center; width: 2.4em; height: 2.4em;
  border-radius: 50%; color: var(--ink-2); text-decoration: none; font-size: 1em;
}
.settings-gear.active, .settings-gear:hover { color: var(--ink); background: color-mix(in oklab, var(--ink) 6%, transparent); }

/* ---------- page ---------- */
.page {
  flex: 1; width: 100%; max-width: var(--maxw); margin: 0 auto;
  padding: 1.5em max(12px, env(safe-area-inset-right)) 3em max(12px, env(safe-area-inset-left));
}
.hero { padding: 1em 0 1.5em; }
.hero--center { text-align: center; padding-top: 3em; }
.lead { font-size: 1.1em; color: var(--ink-2); max-width: 40em; }
.hero--center .lead { margin-inline: auto; }
.eyebrow { font-family: var(--font-mono); font-size: 0.85em; color: var(--accent); margin: 0; }
.empty { color: var(--ink-2); }

.event-list { list-style: none; margin: 0 0 2em; padding: 0; display: grid; gap: 0.6em; grid-template-columns: repeat(auto-fill, minmax(min(18em, 100%), 1fr)); }
.event-card {
  display: flex; flex-direction: column; gap: 0.2em; padding: 0.9em 1em;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  color: var(--ink); text-decoration: none;
}
.event-card:hover { border-color: var(--accent); }
.event-card-title { font-weight: 700; }
.event-card-meta { font-size: 0.9em; color: var(--ink-2); }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.2em; margin: 0 0 1em; }
.card--accent { border-color: color-mix(in oklab, var(--accent) 40%, var(--line)); }
.card p:last-child { margin-bottom: 0; }

.btn {
  display: inline-block; padding: 0.6em 1.1em; border-radius: var(--radius-pill); border: 1px solid var(--accent);
  background: var(--accent); color: var(--paper); font-weight: 600; text-decoration: none; cursor: pointer; font: inherit; font-weight: 600;
}
.btn--outline { background: transparent; color: var(--accent); }
.chips { display: flex; flex-wrap: wrap; gap: 0.5em; }
.chip {
  padding: 0.4em 0.9em; border-radius: var(--radius-pill); border: 1px solid var(--line);
  background: var(--surface); color: var(--ink); font: inherit; cursor: pointer;
}
.chip--on { border-color: var(--accent); color: var(--accent); font-weight: 600; }

/* ---------- forms ---------- */
.form { max-width: 40em; }
.field { margin: 0 0 1em; }
.field label, .field legend { display: block; font-weight: 600; margin-bottom: 0.3em; }
.field input[type="text"], .field input[type="date"], .field input[type="number"], .field input[type="password"], .field input[type="email"], .field textarea {
  width: 100%; padding: 0.55em 0.7em; font: inherit; color: var(--ink);
  background: var(--surface); border: 1px solid var(--line); border-radius: 8px;
}
.field input:focus-visible, .field textarea:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.field--bad input, .field--bad textarea { border-color: var(--bad); }
.field-error { color: var(--bad); font-size: 0.9em; margin: 0.3em 0 0; }
.field-help { color: var(--ink-2); font-size: 0.9em; margin: 0.3em 0 0; }
.field-row { display: grid; gap: 0 1em; grid-template-columns: repeat(auto-fit, minmax(min(14em, 100%), 1fr)); }
.field-prefix { display: flex; align-items: stretch; min-width: 0; }
.field-prefix-text { padding: 0.55em 0.5em; border: 1px solid var(--line); border-right: 0; border-radius: 8px 0 0 8px; background: color-mix(in oklab, var(--ink) 4%, var(--surface)); color: var(--ink-2); font-family: var(--font-mono); font-size: 0.85em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 55%; }
.field-prefix input[type="text"] { border-radius: 0 8px 8px 0; min-width: 0; }
.radio--off { color: var(--ink-2); }
.checkbox, .radio { display: flex; gap: 0.5em; align-items: flex-start; font-weight: 400 !important; }
.checkbox input, .radio input { margin-top: 0.3em; flex: none; }
/* The browser's own default is min-width: min-content — a fieldset overflows at
   150 % text without a single rule of ours. */
fieldset.field { border: 0; padding: 0; margin-inline: 0; min-width: 0; }
.flash { color: var(--accent); font-weight: 600; }
code.url { font-family: var(--font-mono); font-size: 0.9em; overflow-wrap: anywhere; }
.event-description { white-space: pre-line; max-width: 40em; }
.event-photographers { color: var(--ink-2); }

/* ---------- the gallery ---------- */
.hero--event { padding-bottom: 0.5em; }
.search { margin: 0 0 1em; }
.search-label { display: block; font-weight: 700; margin-bottom: 0.3em; }
.search-row { display: flex; gap: 0.5em; min-width: 0; }
.search-row input { flex: 1; min-width: 0; padding: 0.6em 0.8em; font: inherit; font-size: 1.05em; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-pill); }
.search-row input:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.search-dates { display: flex; flex-wrap: wrap; align-items: end; gap: 0.5em 1em; margin-top: 0.6em; }
.search-dates label { display: flex; flex-direction: column; gap: 0.2em; font-size: 0.85em; color: var(--ink-2); min-width: 0; }
.search-dates input { padding: 0.4em 0.6em; font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 8px; max-width: 100%; }
.filters { display: flex; flex-direction: column; gap: 0.6em; margin: 0 0 1em; }
.filter { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.4em 0.8em; min-width: 0; }
.filter-label { font-size: 0.85em; color: var(--ink-2); }
.chip--off { opacity: 0.45; }
.gallery-count { color: var(--ink-2); font-size: 0.9em; margin: 0 0 0.6em; }
.grid { list-style: none; margin: 0 calc(-1 * max(12px, env(safe-area-inset-left))) 1.5em; padding: 0; display: grid; gap: 3px; grid-template-columns: repeat(auto-fill, minmax(min(9em, 100%), 1fr)); }
@media (min-width: 40em) { .grid { margin-inline: 0; gap: 6px; grid-template-columns: repeat(auto-fill, minmax(min(12em, 100%), 1fr)); } }
.grid-cell { min-width: 0; background: color-mix(in oklab, var(--ink) 6%, var(--surface)); }
.grid-cell a { display: block; width: 100%; height: 100%; }
.grid-cell img { display: block; width: 100%; height: 100%; object-fit: cover; }
.pager { display: flex; align-items: center; gap: 0.8em; flex-wrap: wrap; margin: 0 0 2em; }
.pager-info { color: var(--ink-2); font-size: 0.9em; }
.photo-nav { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 0.5em; margin: 0 0 0.8em; }
.photo-nav-steps { display: flex; gap: 0.4em; }
.photo { margin: 0 calc(-1 * max(12px, env(safe-area-inset-left))) 1em; }
@media (min-width: 40em) { .photo { margin-inline: 0; } }
.photo img { display: block; width: 100%; height: auto; background: color-mix(in oklab, var(--ink) 6%, var(--surface)); }
.photo-caption { display: flex; flex-wrap: wrap; gap: 0.3em 1.2em; padding: 0.5em max(12px, env(safe-area-inset-left)) 0; color: var(--ink-2); font-size: 0.9em; }
@media (min-width: 40em) { .photo-caption { padding-inline: 0; } }
.photo-tags { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0.4em 1em; margin: 0 0 1em; }
.photo-tags dt { color: var(--ink-2); font-size: 0.9em; }
.photo-tags dd { margin: 0; display: flex; flex-wrap: wrap; gap: 0.4em; }
.photo-price { font-weight: 700; font-size: 1.1em; margin: 0 0 0.3em; }

/* ---------- tagging ---------- */
.tag-rows { list-style: none; margin: 0 calc(-1 * max(12px, env(safe-area-inset-left))); padding: 0; display: grid; gap: 0.6em; }
@media (min-width: 40em) { .tag-rows { margin-inline: 0; } }
.tag-row { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0.5em; padding: 0.5em; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); min-width: 0; }
@media (min-width: 40em) { .tag-row { grid-template-columns: minmax(14em, 26em) minmax(0, 1fr); gap: 0.8em; padding: 0.6em; } }
.tag-row:focus-within { border-color: var(--accent); }
.tag-row--hidden img { opacity: 0.35; }
.tag-row-image { display: block; min-width: 0; padding: 0; border: 0; background: none; cursor: zoom-in; width: 100%; text-align: left; }
.lightbox { border: 0; padding: 0; background: transparent; max-width: 100vw; max-height: 100vh; cursor: zoom-out; }
.lightbox::backdrop { background: rgba(0, 0, 0, 0.85); }
.lightbox img { display: block; max-width: 96vw; max-height: 96vh; width: auto; height: auto; margin: 2vh auto; border-radius: 6px; }
.tag-row-image img { display: block; width: 100%; height: auto; max-height: 60vh; object-fit: contain; border-radius: 6px; background: color-mix(in oklab, var(--ink) 6%, var(--surface)); }
.tag-row-body { display: flex; flex-direction: column; gap: 0.5em; min-width: 0; }
.tag-meta { display: flex; justify-content: space-between; align-items: center; gap: 0.5em; font-size: 0.85em; color: var(--ink-2); }
.tag-toggle { border: 0; background: none; color: var(--ink-2); font: inherit; font-size: 1em; cursor: pointer; padding: 0.2em 0; text-decoration: underline; }
.tag-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5em 1em; margin: 0 0 0.8em; }
.tag-progress { font-weight: 600; }
.tag-meta-actions { display: flex; gap: 1em; }
.tag-fields { display: grid; gap: 0.6em; grid-template-columns: minmax(0, 1fr); max-width: 22em; }
.tag-fields label { display: flex; flex-direction: column; gap: 0.2em; }
.tag-fields label span { font-size: 0.8em; color: var(--ink-2); }
.tag-form { display: flex; min-width: 0; }
.tag-remove { display: inline; }
.tag-input { flex: 1; min-width: 0; padding: 0.6em 0.8em; font-size: 1.05em; font: inherit; color: var(--ink); background: var(--paper); border: 1px solid var(--line); border-radius: 8px; }
.tag-input[data-kind="number"] { font-family: var(--font-mono); }
.tag-input:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.tag-hidden { color: var(--bad); font-weight: 600; }
.tag-list { display: flex; flex-wrap: wrap; gap: 0.3em; }
.tag { padding: 0.15em 0.55em; border-radius: var(--radius-pill); border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; font-size: 0.8em; cursor: pointer; }
.tag--number { font-family: var(--font-mono); font-weight: 600; border-color: color-mix(in oklab, var(--accent) 50%, var(--line)); }
code.token { display: inline-block; padding: 0.4em 0.6em; background: color-mix(in oklab, var(--ink) 6%, var(--surface)); border-radius: 6px; user-select: all; }

/* ---------- takedown ---------- */
.takedown summary { cursor: pointer; font-weight: 600; }
.takedown .form { margin-top: 0.8em; }
.takedown-list { list-style: none; margin: 0.8em 0 0; padding: 0; display: grid; gap: 1em; }
.takedown-row { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0.6em; min-width: 0; padding-top: 1em; border-top: 1px solid var(--line); }
.takedown-row:first-child { padding-top: 0; border-top: 0; }
@media (min-width: 28em) { .takedown-row { grid-template-columns: min(8em, 30%) minmax(0, 1fr); } }
.takedown-thumb img { display: block; width: 100%; height: auto; border-radius: 6px; background: color-mix(in oklab, var(--ink) 6%, var(--surface)); }
.takedown-body { min-width: 0; display: flex; flex-direction: column; gap: 0.3em; }
.takedown-meta { color: var(--ink-2); font-size: 0.9em; margin: 0; }
.takedown-from { margin: 0; overflow-wrap: anywhere; }
.takedown-reason { margin: 0; white-space: pre-line; overflow-wrap: anywhere; }
.takedown-actions { display: flex; flex-wrap: wrap; gap: 0.5em; margin-top: 0.3em; }

/* ---------- downloads ---------- */
.download-all { margin: 0 0 1em; }
.download-list { list-style: none; margin: 0 0 2em; padding: 0; display: grid; gap: 0.5em; }
.download-row { display: flex; align-items: center; justify-content: space-between; gap: 0.8em; flex-wrap: wrap; padding: 0.7em 0.9em; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); min-width: 0; }
.download-name { font-family: var(--font-mono); font-size: 0.85em; overflow-wrap: anywhere; }

/* ---------- sales ---------- */
.sales-summary { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.3em 1.2em; margin: 0 0 1em; min-width: 0; }
.sales-sum { font-size: 1.3em; font-weight: 700; }
.sales-note { color: var(--ink-2); font-size: 0.9em; }
.sales-list { list-style: none; margin: 0 0 2em; padding: 0; display: grid; gap: 0.5em; }
/* Date and amount on one line, the rest wrapping under it: at 150 % text the
   row grows downwards, never sideways. */
.sales-row {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0.2em 0.8em; min-width: 0;
  padding: 0.7em 0.9em; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
}
.sales-when { color: var(--ink-2); font-size: 0.9em; min-width: 0; }
.sales-amount { font-weight: 700; text-align: right; min-width: 0; }
.sales-meta { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 0.2em 0.8em; min-width: 0; color: var(--ink-2); font-size: 0.85em; }
.sales-ref { font-family: var(--font-mono); overflow-wrap: anywhere; min-width: 0; }
.sales-status--refunded { color: var(--bad); }

/* ---------- the cart ---------- */
.cart-bar, .cart-add-all { margin: 0 0 1em; }
.cart-group { display: grid; gap: 0.9em; min-width: 0; }
.cart-lines { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.5em; }
.cart-line { display: flex; align-items: center; gap: 0.6em; flex-wrap: wrap; min-width: 0; }
.cart-thumb { flex: none; width: 72px; height: 54px; object-fit: cover; border-radius: 6px; background: color-mix(in oklab, var(--ink) 6%, var(--surface)); }
.cart-line-name { flex: 1 1 8em; min-width: 0; overflow-wrap: anywhere; }
.cart-line-price { font-weight: 600; }
.cart-remove { flex: none; padding: 0.1em 0.6em; line-height: 1.4; }
.cart-total { font-weight: 700; font-size: 1.1em; margin: 0; }
.cart-choice { display: grid; gap: 0.5em; margin: 0; min-width: 0; }
.cart-saving { color: var(--accent); font-size: 0.9em; }
.cart-pay { display: flex; flex-wrap: wrap; gap: 0.6em; }
.cart-group .btn { justify-self: start; }
.cart-group .field { margin: 0; }

/* ---------- the uploader ---------- */
.upload { border: 2px dashed var(--line); border-radius: var(--radius); padding: 1em; margin: 0 0 2em; }
.upload--over { border-color: var(--accent); background: color-mix(in oklab, var(--accent) 6%, var(--surface)); }
.upload-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6em 1.2em; margin-bottom: 1em; }
.upload-choose { position: relative; overflow: hidden; cursor: pointer; }
.upload-input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.upload-meta { color: var(--ink-2); font-size: 0.9em; }
.upload-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.5em; }
.upload-row { display: grid; grid-template-columns: 4em minmax(0, 1fr) auto auto; gap: 0.6em; align-items: center; min-width: 0; }
.upload-row img { width: 4em; height: 3em; object-fit: cover; border-radius: 6px; background: color-mix(in oklab, var(--ink) 8%, var(--surface)); }
.upload-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.9em; }
.upload-status { font-size: 0.85em; color: var(--ink-2); white-space: nowrap; }
.upload-status[data-status="done"] { color: var(--accent); }
.upload-status[data-status="failed"], .upload-status[data-status="quota"], .upload-status[data-status="unreadable"] { color: var(--bad); }
@media (max-width: 30em) {
  .upload-row { grid-template-columns: 3.5em minmax(0, 1fr) auto; }
  .upload-row .upload-delete { grid-column: 2 / -1; justify-self: start; }
}

/* ---------- the QR poster ---------- */
.poster {
  background: #fff; color: #000; border: 1px solid var(--line); border-radius: var(--radius);
  margin: 0 auto 2em; padding: 6% 6% 5%; text-align: center; max-width: 40em;
  display: flex; flex-direction: column; align-items: center; gap: 0.4em;
}
.poster-brand { align-self: flex-start; }
.poster-wm { font-weight: 800; letter-spacing: -0.02em; font-size: 1em; white-space: nowrap; }
.poster-wm .poster-dot { color: #9c2f92; }
.poster-title { font-size: clamp(1.4em, 4vw, 2.2em); font-weight: 800; margin: 0.4em 0 0; }
.poster-meta { color: #444; margin: 0; }
.poster-find { font-size: clamp(1.3em, 3.5vw, 1.8em); font-weight: 700; margin: 0.6em 0 0.2em; }
.poster-qr { width: min(70%, 22em); }
.poster-qr svg { display: block; width: 100%; height: auto; }
.poster-scan { margin: 0.6em 0 0; color: #444; }
.poster-url { font-family: var(--font-mono); font-weight: 600; font-size: clamp(1em, 3vw, 1.4em); margin: 0; overflow-wrap: anywhere; }
@media print {
  .site-header, .site-footer, .no-print, .skip-link { display: none !important; }
  html, body { background: #fff; }
  .page { padding: 0; max-width: none; }
  .poster { border: 0; border-radius: 0; margin: 0; padding: 10mm; max-width: none; min-height: 100vh; justify-content: center; gap: 2mm; }
  .poster-title { font-size: 28pt; }
  .poster-find { font-size: 22pt; }
  .poster-qr { width: 110mm; }
  .poster--a5 .poster-qr { width: 80mm; }
  .poster--a5 .poster-title { font-size: 20pt; }
  .poster--a5 .poster-find { font-size: 16pt; }
  .poster-url { font-size: 14pt; }
}
@page { margin: 0; }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--line); }
.footer-row {
  max-width: var(--maxw); margin: 0 auto; padding: 1.5em max(12px, env(safe-area-inset-right)) 1.5em max(12px, env(safe-area-inset-left));
  display: flex; align-items: baseline; flex-wrap: wrap; gap: 0.6em 1.2em; font-size: 0.85em; color: var(--ink-2); min-width: 0;
}
.footer-row a { color: var(--ink-2); text-decoration: none; }
.footer-row a:hover { color: var(--accent); }
.footer-wm { display: inline-flex; align-items: baseline; white-space: nowrap; color: var(--ink); }
.footer-wm-brand { font-weight: 800; letter-spacing: -0.02em; color: var(--ink) !important; }
.footer-wm-prod { font-family: var(--font-mono); font-weight: 500; font-size: 0.95em; color: var(--ink) !important; }
.footer-wm-dot { color: var(--accent); font-family: var(--font-ui); font-weight: 800; }
.footer-copy { margin-left: auto; }

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