/* ReturnMe – styles taken from the wireframes (DM Sans, pink accents). */
@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('/fonts/dm-sans-latin.woff2') format('woff2');
}

:root {
  --bg: #fceff3;
  --surface: #ffffff;
  --surface-soft: #fff8fa;
  --ink: #16131f;
  --ink-2: #3a3644;
  --muted: #5c5766;
  --placeholder: #6f6a78;
  --line: #ead9e0;
  --line-strong: #958e9c;
  --pink: #e0528a;
  --accent: #f8a5c2;
  --chip: #fad7e2;
  --image: #f3cbd8;
  --ok-bg: #ddf3e4;
  --ok: #1d5b33;
  --warn-bg: #fff1d6;
  --warn: #7a4b00;
  --radius: 16px;
  --radius-lg: 24px;
}

*,
*::before,
*::after { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.45 'DM Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

a { color: var(--ink-2); }
a:hover { color: var(--ink); }
img { max-width: 100%; display: block; }
:focus-visible { outline: 3px solid var(--pink); outline-offset: 2px; }
::placeholder { color: var(--placeholder); opacity: 1; }

/* ---------- Layout ---------- */
.page {
  max-width: 440px;
  min-height: 100dvh;
  margin: 0 auto;
  padding: 20px 24px 28px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.page > .bottom { margin-top: auto; display: flex; flex-direction: column; gap: 4px; }

.topbar { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; min-height: 44px; }
.topbar .right { justify-self: end; }
.topbar.split { display: flex; justify-content: space-between; }
.back {
  display: inline-flex; align-items: center; gap: 4px; min-height: 44px;
  font-size: 14px; font-weight: 500; color: var(--ink); text-decoration: none;
}
.navlink { display: inline-flex; align-items: center; min-height: 44px; font-size: 14px; font-weight: 500; }

.logo {
  display: inline-flex; align-items: flex-start; font-size: 24px; font-weight: 700;
  letter-spacing: -0.02em; line-height: 1.2; color: var(--ink); text-decoration: none;
}
.logo .me { color: var(--pink); }
.logo svg { margin: -2px 0 0 1px; }
.logo.lg { font-size: 28px; }
.center { display: flex; justify-content: center; }

/* ---------- Type ---------- */
h1 { margin: 0; font-size: 32px; line-height: 1.15; letter-spacing: -0.02em; font-weight: 700; }
h1.xl { font-size: 44px; line-height: 1.08; }
h1 .pink, .pink { color: var(--pink); }
h2 { margin: 0; font-size: 18px; font-weight: 700; }
.lead { margin: 0; font-size: 17px; color: var(--ink-2); }
.intro { display: flex; flex-direction: column; gap: 8px; }
.small { font-size: 14px; }
.muted { color: var(--muted); }
.mono { letter-spacing: 0.08em; font-variant-numeric: tabular-nums; }

/* ---------- Pieces ---------- */
.chip {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px;
  background: var(--chip); font-size: 13px; font-weight: 600; letter-spacing: 0.06em; width: fit-content;
}
.badge {
  display: inline-block; padding: 5px 12px; border-radius: 999px; font-size: 13px; font-weight: 700; white-space: nowrap;
  background: var(--chip); color: var(--ink);
}
.badge.ok { background: var(--ok-bg); color: var(--ok); }
.badge.dark { background: var(--ink); color: #fff; }
.badge.muted { background: #ece8ee; color: var(--ink-2); }
.badge.warn { background: var(--warn-bg); color: var(--warn); }

.note {
  display: flex; align-items: flex-start; gap: 10px; padding: 14px 16px; border-radius: var(--radius);
  background: var(--chip); font-size: 14px;
}
.note p { margin: 0; }
.note svg { flex-shrink: 0; margin-top: 1px; }
.note.warn { background: var(--warn-bg); color: var(--warn); }
.error { background: #fde2e2; color: #8a1c1c; }

.card { display: flex; flex-direction: column; gap: 16px; padding: 20px; border-radius: var(--radius-lg); background: var(--surface-soft); }
.facts { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 12px; margin: 0; }
.facts dt { color: var(--ink-2); }
.facts dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.photo { border-radius: var(--radius); overflow: hidden; background: var(--image); }
.photo img { width: 100%; height: auto; }

.progress { display: flex; align-items: center; gap: 12px; }
.progress .bars { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 6px; flex-grow: 1; }
.progress .bars span { height: 8px; border-radius: 4px; background: #fff; border: 1px solid #d9cfd6; }
.progress .bars span.on { background: var(--accent); border-color: var(--accent); }
.progress .label { font-size: 13px; font-weight: 500; color: var(--ink-2); white-space: nowrap; }

.steps { display: flex; align-items: flex-start; justify-content: space-between; margin: 0; padding: 0 8px; list-style: none; font-size: 15px; font-weight: 500; }
.steps li { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.steps .dot { display: flex; align-items: center; justify-content: center; width: 60px; height: 60px; border-radius: 30px; background: var(--chip); }
.steps .arrow { height: 60px; display: flex; align-items: center; }

/* ---------- Buttons ---------- */
.btn {
  display: flex; align-items: center; justify-content: center; gap: 12px; width: 100%;
  min-height: 56px; padding: 0 24px; border: 0; border-radius: 999px;
  background: var(--accent); color: var(--ink); font: inherit; font-size: 18px; font-weight: 600;
  text-decoration: none; cursor: pointer;
}
.btn.big { min-height: 64px; font-size: 19px; }
.btn.outline { background: none; border: 1.5px solid var(--ink); font-size: 16px; }
.btn.small { min-height: 48px; font-size: 15px; width: auto; }
.btn.danger { background: none; border: 1.5px solid #8a1c1c; color: #8a1c1c; font-size: 16px; }
.btn:hover { filter: brightness(0.97); }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }
.linkbtn {
  display: flex; align-items: center; justify-content: center; min-height: 44px; font-size: 15px; font-weight: 500;
  background: none; border: 0; font-family: inherit; color: var(--ink-2); text-decoration: underline; cursor: pointer; width: 100%;
}
.row2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }

/* ---------- Forms ---------- */
form { display: flex; flex-direction: column; gap: 18px; margin: 0; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field > label, .field > .label, legend { font-size: 15px; font-weight: 700; padding: 0; }
.field .hint { font-size: 14px; color: var(--muted); margin: 0; }
.req { color: var(--pink); }
input[type='text'], input[type='email'], input[type='tel'], input[type='search'], input[type='number'], input[type='date'], textarea, select {
  width: 100%; min-height: 52px; padding: 0 16px; border: 1.5px solid var(--line-strong); border-radius: 12px;
  background: #fff; color: var(--ink); font: inherit; font-size: 16px;
}
textarea { padding: 14px 16px; min-height: 96px; resize: vertical; }
input.code {
  text-align: center; font-size: 28px; letter-spacing: 0.4em; font-weight: 600; text-transform: uppercase; padding-left: calc(16px + 0.4em);
}
fieldset { border: 0; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }

.choices { display: flex; flex-wrap: wrap; gap: 8px; }
.choices label {
  position: relative; display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px;
  border: 1.5px solid var(--line-strong); border-radius: 999px; background: #fff; font-weight: 500; cursor: pointer;
}
.choices input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.choices label:has(input:checked) { background: var(--ink); color: #fff; border-color: var(--ink); }
.choices label:has(input:focus-visible) { outline: 3px solid var(--pink); outline-offset: 2px; }

.upload {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  min-height: 110px; padding: 16px; border: 1.5px dashed var(--pink); border-radius: var(--radius);
  background: var(--surface-soft); font-size: 15px; font-weight: 500; text-align: center; cursor: pointer;
}
.upload input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.upload img { max-height: 180px; border-radius: 12px; }

.checklist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.checklist label {
  display: flex; align-items: center; gap: 14px; padding: 14px 16px; border: 1.5px solid var(--line); border-radius: var(--radius);
  background: #fff; cursor: pointer; font-size: 20px; font-weight: 700;
}
.checklist label:has(input:checked) { border-color: var(--ink); }
.checklist input { width: 24px; height: 24px; accent-color: var(--pink); flex-shrink: 0; }
.check { display: flex; align-items: flex-start; gap: 12px; font-size: 15px; }
.check input { width: 24px; height: 24px; margin: 0; accent-color: var(--pink); flex-shrink: 0; }

/* ---------- Lists ---------- */
.tags { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.tagrow {
  display: flex; align-items: center; gap: 14px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius);
  background: #fff; color: var(--ink); text-decoration: none;
}
.tagrow.found { border: 1.5px solid var(--ink); }
.tagrow .icon { display: flex; align-items: center; justify-content: center; flex-shrink: 0; width: 44px; height: 44px; border-radius: 22px; background: var(--chip); }
.tagrow .text { display: flex; flex-direction: column; gap: 2px; flex-grow: 1; min-width: 0; }
.tagrow .name { font-size: 17px; font-weight: 700; }
.tagrow .name.empty { font-weight: 500; color: var(--muted); }
.tagrow .code { font-size: 13px; letter-spacing: 0.08em; color: var(--ink-2); }

.checks { list-style: none; margin: 0; padding: 20px; display: flex; flex-direction: column; gap: 14px; border-radius: var(--radius); background: var(--surface-soft); }
.checks li { display: flex; align-items: center; gap: 12px; }
.checks .tick { width: 28px; height: 28px; border-radius: 14px; background: var(--pink); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }

.success-mark { display: flex; justify-content: center; margin-top: 12px; }

details.disclosure summary { cursor: pointer; font-weight: 600; min-height: 44px; display: flex; align-items: center; }

/* ---------- Home (desktop) ---------- */
/* Full-bleed hero: the photo fills the section edge to edge; a warm scrim keeps the copy legible. */
.home-hero {
  position: relative; isolation: isolate; overflow: hidden;
  min-height: min(92svh, 860px); display: flex; background: #2a1f1f; color: #fff;
}
.home-hero a { color: #fff; }
.hero-bg { position: absolute; inset: 0; z-index: -2; }
.hero-bg img { width: 100%; height: 100%; object-fit: cover; object-position: 60% 55%; }
.home-hero::before {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(180deg, rgba(28,18,18,0.6) 0%, rgba(28,18,18,0) 22%),
    linear-gradient(90deg, rgba(28,18,18,0.88) 0%, rgba(28,18,18,0.72) 42%, rgba(28,18,18,0.22) 62%, rgba(28,18,18,0) 76%);
}
.home-hero .wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding: 24px 24px 64px; display: flex; flex-direction: column; }
.home-nav { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; }
.home-nav nav { display: flex; gap: 28px; flex-wrap: wrap; }
.home-nav nav a { text-decoration: none; font-weight: 500; text-shadow: 0 1px 8px rgba(0,0,0,0.35); }
.home-nav nav a:hover { text-decoration: underline; text-underline-offset: 4px; }
.home-login {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px; border-radius: 999px;
  border: 1.5px solid rgba(255,255,255,0.7); font-weight: 600; text-decoration: none;
  background: rgba(28,18,18,0.25); backdrop-filter: blur(6px);
}
.home-login:hover { background: rgba(28,18,18,0.45); }
.home-hero .logo { color: #fff; }
.home-copy { margin: auto 0; padding-top: 48px; max-width: 580px; }
.kicker { color: var(--accent); font-size: 14px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; }
.home-hero h1 { font-size: clamp(40px, 5.4vw, 68px); line-height: 1.04; margin-top: 16px; text-wrap: balance; }
.home-hero p { font-size: 19px; color: #f3ecec; max-width: 34em; }
.home-shop { margin-top: 16px; font-weight: 600; }
.found-box {
  display: flex; flex-direction: column; gap: 10px; max-width: 480px; padding: 18px; border-radius: 20px;
  background: rgba(28,18,18,0.45); border: 1px solid rgba(255,255,255,0.14); backdrop-filter: blur(10px);
}
.found-box label { font-weight: 700; }
.found-box .inline { display: flex; gap: 8px; }
.found-box input { min-height: 56px; text-transform: uppercase; letter-spacing: 0.2em; font-weight: 600; }
.found-box .btn { width: auto; white-space: nowrap; }
.usp { max-width: 1200px; margin: 0 auto; padding: 32px 24px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; font-size: 17px; }
.home-foot { max-width: 1200px; margin: 0 auto; padding: 24px; display: flex; gap: 20px; flex-wrap: wrap; font-size: 14px; }
@media (max-width: 800px) {
  .home-hero { min-height: 100svh; }
  .hero-bg img { object-position: 72% 40%; }
  .home-hero::before {
    background: linear-gradient(180deg, rgba(28,18,18,0.65) 0%, rgba(28,18,18,0.15) 24%, rgba(28,18,18,0.55) 48%, rgba(28,18,18,0.92) 72%);
  }
  .home-hero .wrap { padding-bottom: 32px; }
  .home-copy { margin: auto 0 0; }
  .home-nav nav { display: none; }
  .usp { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
  .found-box .inline { flex-direction: column; }
  .found-box .btn { width: 100%; }
}

/* ---------- Static pages ---------- */
.prose { max-width: 680px; margin: 0 auto; padding: 24px; }
.prose h1 { margin: 24px 0 12px; }
.prose h2 { margin: 28px 0 8px; }
.prose p, .prose li { font-size: 17px; color: var(--ink-2); }

/* ---------- Admin ---------- */
.admin { min-height: 100dvh; display: flex; flex-direction: column; }
.admin-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 32px;
  background: #fff; border-bottom: 1px solid var(--line);
}
.admin-bar .left { display: flex; align-items: center; gap: 14px; }
.admin-bar nav { display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center; font-size: 15px; font-weight: 600; }
.admin-bar nav a { text-decoration: none; display: inline-flex; align-items: center; gap: 6px; min-height: 36px; }
.admin-bar nav a.on { box-shadow: inset 0 -2px 0 var(--pink); }
.admin-bar nav .count, .tabs .count { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--pink); color: #fff; font-size: 12px; }
.admin-bar nav a.btn { color: var(--ink); }
.flash { max-width: 1440px; width: 100%; margin: 0 auto; padding: 16px 32px 0; }
.admin-tag { padding: 4px 12px; border-radius: 999px; background: var(--ink); color: #fff; font-size: 12px; font-weight: 700; letter-spacing: 0.08em; }
.admin main { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 24px; max-width: 1440px; width: 100%; margin: 0 auto; padding: 32px; }
.admin .col-main { flex: 3 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.admin .col-side { flex: 2 1 380px; min-width: 0; }
.admin .panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 24px; display: flex; flex-direction: column; gap: 18px; }
.admin h1 { font-size: 32px; }
.titlebar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.tablewrap { overflow-x: auto; border-radius: var(--radius-lg); background: #fff; border: 1px solid var(--line); }
table.list { width: 100%; min-width: 520px; border-collapse: collapse; font-size: 15px; }
table.list th { text-align: left; color: var(--ink-2); font-size: 13px; letter-spacing: 0.06em; text-transform: uppercase; padding: 16px 12px; border-bottom: 1px solid var(--line); }
table.list td { padding: 14px 12px; border-bottom: 1px solid var(--line); }
table.list th:first-child, table.list td:first-child { padding-left: 20px; }
table.list tr:last-child td { border-bottom: 0; }
table.list tr.sel { background: var(--chip); }
table.list a { font-weight: 700; }
.inline-form { display: flex; flex-direction: row; flex-wrap: wrap; gap: 8px; align-items: end; }
.inline-form .field { gap: 4px; }
.inline-form .check { min-height: 48px; align-items: center; }
.inline-form input, .inline-form select { min-height: 48px; width: auto; }
.qrbox { display: flex; gap: 16px; align-items: center; }
.qrbox svg { border-radius: 8px; border: 1px solid var(--line); flex-shrink: 0; }
.taglist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.taglist li { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 16px; border-radius: 12px; background: var(--bg); font-weight: 700; letter-spacing: 0.06em; }
.taglist form { flex-direction: row; gap: 6px; }
.btnrow { display: flex; gap: 10px; flex-wrap: wrap; }
.btnrow .btn { width: auto; flex: 1 1 auto; }

/* On/off switch: a form button with role="switch", so it works without JavaScript. */
.switch-row { margin: 16px 0 0; }
.switch {
  display: inline-flex; align-items: center; gap: 12px; min-height: 44px; padding: 6px 4px;
  background: none; border: 0; font: inherit; color: var(--ink); cursor: pointer; text-align: left;
}
.switch-track {
  position: relative; flex: none; width: 52px; height: 30px; border-radius: 999px;
  background: var(--line-strong); transition: background-color .15s ease;
}
.switch-knob {
  position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%;
  background: var(--surface); box-shadow: 0 1px 3px rgba(22, 19, 31, .3); transition: transform .15s ease;
}
.switch[aria-checked="true"] .switch-track { background: var(--pink); }
.switch[aria-checked="true"] .switch-knob { transform: translateX(22px); }
.switch-label { font-weight: 600; }
.switch-state {
  min-width: 2.5em; padding: 2px 10px; border-radius: 999px; font-size: .85em; font-weight: 600; text-align: center;
  background: var(--chip); color: var(--muted);
}
.switch[aria-checked="true"] .switch-state { background: var(--pink); color: #fff; }
@media (prefers-reduced-motion: reduce) { .switch-track, .switch-knob { transition: none; } }
.btn.tiny { min-height: 36px; padding: 0 14px; font-size: 13px; width: auto; }
/* Admin modules */
.badge.info { background: #e3ecff; color: #24407a; }
.label-caps { font-size: 13px; font-weight: 700; letter-spacing: 0.06em; margin: 0 0 8px; }
.tabs a { text-decoration: none; font-weight: 500; padding: 6px 2px; }
.tabs a.on { font-weight: 700; box-shadow: inset 0 -2px 0 var(--pink); }
table.list td.clip { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
table.num td, .num { font-variant-numeric: tabular-nums; }
.stats { display: flex; flex-wrap: wrap; gap: 12px; }
.stat { flex: 1 1 180px; display: flex; flex-direction: column; gap: 2px; padding: 14px 18px; border-radius: var(--radius); background: #fff; border: 1px solid var(--line); }
.stat strong { font-size: 30px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.runs { display: flex; flex-direction: column; gap: 10px; }
.run { display: grid; grid-template-columns: minmax(260px, 1fr) auto; gap: 10px 16px; align-items: center; padding: 16px 18px; border-radius: var(--radius); background: #fff; border: 1px solid var(--line); }
.run .head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.run .head strong { font-size: 17px; }
.run .acts { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; align-items: center; }
.run .acts form { gap: 6px; }
.run .acts input { min-height: 36px; width: 200px; }
.run .acts input[type='date'] { width: 170px; }
.bar { grid-column: 1 / -1; display: flex; height: 8px; border-radius: 4px; overflow: hidden; background: #ece8ee; }
.bar i { display: block; height: 100%; }
.bar i.ok { background: #2f9a5a; }
.bar i.info { background: #5b7fd6; }
.bar i.dark { background: var(--ink); }
.testsheet { display: flex; flex-direction: column; gap: 10px; padding: 14px; border-radius: var(--radius); border: 1.5px dashed var(--pink); }
.testsheet .btnrow form { flex-direction: row; }
.chain { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; font-size: 12px; font-weight: 600; }
.chain li { padding: 3px 9px; border-radius: 8px; border: 1.5px dashed var(--line-strong); color: var(--muted); }
.chain li.done { border-style: solid; border-color: var(--ok); color: var(--ok); background: var(--ok-bg); }
.chain li.done::after { content: ' ✓'; }
.queue { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.queue li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 8px; padding: 10px 12px; border-radius: 12px; border: 1.5px solid var(--line); background: #fff; }
.queue li.on { border-color: var(--ink); }
.queue a { text-decoration: none; }
.lines { display: flex; flex-direction: column; gap: 8px; }
.line { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 12px; align-items: center; padding: 12px 14px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--surface-soft); }
.line.done { border-color: var(--ok); background: var(--ok-bg); }
.pips { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px; }
.pip { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: 8px; border: 1.5px dashed var(--line-strong); background: #fff; font-size: 13px; color: var(--muted); }
.pip.ok { border-style: solid; border-color: var(--ok); color: var(--ok); font-weight: 700; letter-spacing: 0.04em; }
.pip form { display: inline-flex; gap: 0; }
.pip .linkbtn { min-height: 0; width: auto; padding: 0 2px; text-decoration: none; font-size: 16px; color: var(--ok); }
.actions { display: flex; flex-direction: column; gap: 12px; }
.actions form { gap: 6px; }
.actions .inline-form input { flex: 1 1 220px; }
.timeline { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.timeline li { position: relative; display: flex; flex-direction: column; gap: 2px; padding: 0 0 14px 26px; }
.timeline li::before { content: ''; position: absolute; left: 0; top: 4px; width: 14px; height: 14px; border-radius: 50%; border: 2px dashed var(--line-strong); background: #fff; }
.timeline li.done::before { border: 3px solid var(--chip); background: var(--pink); }
.timeline li:not(:last-child)::after { content: ''; position: absolute; left: 7px; top: 22px; bottom: 2px; width: 2px; background: var(--line); }
.scanner { display: flex; flex-direction: column; gap: 10px; }
.scanform { gap: 6px; }
.scanform .inline { display: flex; gap: 8px; }
.scanform input { text-transform: uppercase; letter-spacing: 0.06em; }
.scanform input::placeholder { text-transform: none; letter-spacing: 0; }
.scanform .btn { width: auto; }
.scanner video { width: 100%; max-height: 320px; object-fit: cover; border-radius: var(--radius); background: var(--ink); }
.scanlog { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.scanlog li { padding: 8px 12px; border-radius: 10px; background: var(--ok-bg); color: var(--ok); }
.scanlog li.err { background: #fde2e2; color: #8a1c1c; }
.scanlog li a { color: inherit; font-weight: 700; }
@media (max-width: 700px) {
  .flash { padding: 12px 16px 0; }
  .run { grid-template-columns: 1fr; }
  /* One scrollable row, so a scan's actions stay near the top on a phone. */
  .admin-bar nav { flex-wrap: nowrap; overflow-x: auto; width: 100%; font-size: 14px; gap: 14px; padding-bottom: 2px; }
  .admin-bar nav a { white-space: nowrap; flex-shrink: 0; }
  .admin-bar nav > span.small { display: none; }
  .run .acts { justify-content: flex-start; }
  .admin main { padding: 16px; }
  .admin-bar { padding: 12px 16px; flex-wrap: wrap; }
}

/* ---------- Shop ---------- */
.shop-head { max-width: 1100px; margin: 0 auto; padding: 16px 24px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.shop-head nav { display: flex; gap: 20px; align-items: center; font-weight: 600; }
.shop-head nav a { text-decoration: none; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; }
.cartlink .count { display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: var(--pink); color: #fff; font-size: 13px; }
.shop { max-width: 1100px; margin: 0 auto; padding: 8px 24px 40px; display: flex; flex-direction: column; gap: 20px; }
.shop.narrow { max-width: 560px; }
.products { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
.product { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; display: flex; flex-direction: column; }
.product .sheet-img { display: block; background: var(--surface-soft); padding: 20px 20px 0; }
.product .sheet-img img { width: 100%; height: auto; box-shadow: 0 2px 10px rgba(22, 19, 31, 0.12); border-radius: 2px; }
.product-body { padding: 20px; display: flex; flex-direction: column; gap: 10px; flex-grow: 1; }
.product-body h2 { font-size: 22px; }
.price { margin: auto 0 0; font-size: 22px; font-weight: 700; }
.addform { flex-direction: row; gap: 8px; }
.addform select { width: 84px; min-height: 48px; }
.addform .btn { flex-grow: 1; }
.cartlines { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.cartlines li { display: flex; gap: 14px; align-items: flex-start; padding: 14px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.cartlines img { border: 1px solid var(--line); border-radius: 2px; flex-shrink: 0; }
.cartlines .grow { display: flex; flex-direction: column; gap: 4px; flex-grow: 1; min-width: 0; }
.lineforms { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.lineforms form { flex-direction: row; gap: 6px; align-items: center; }
.lineforms select { width: 72px; min-height: 36px; padding: 0 8px; }
.sum { display: grid; grid-template-columns: 1fr auto; gap: 8px 16px; margin: 0; padding: 16px 20px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.sum dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
.sum .total { font-weight: 700; font-size: 18px; padding-top: 8px; border-top: 1px solid var(--line); }
.pay { background: #fff; border: 1px solid var(--line); }
.swishqr { display: flex; justify-content: center; }
.swishqr svg { border: 1px solid var(--line); border-radius: 12px; }
.center-text { text-align: center; }
.facts dt { overflow-wrap: anywhere; }
.hint.error { padding: 6px 10px; border-radius: 8px; }
/* ---------- Test-mode banner ---------- */
.testbar {
  background: #16131f; color: #fff; font-size: 13px; padding: 6px 16px; display: flex; gap: 14px; justify-content: center; white-space: nowrap;
}
.testbar span { color: #f8a5c2; font-weight: 700; }
.testbar a { color: var(--accent); font-weight: 600; }

@media print {
  .testbar { display: none !important; }
  body { background: #fff; }
}
