/* bidcheck: the one stylesheet for every page ("graded slab").
   Tokens, then base and components (slab, buttons, nav), then each page: landing, setup, plans, account, history, app.
   Red only for the brand mark, primary buttons, the MAX BID number and the recommended plan. The foil gradient is
   only on the hero card. One shadow: the hero phone. */
:root {
  --bg: #f5f7fa;
  --surface: #ffffff;
  --ink: #1b2230;
  --muted: #5b6475;
  --line: #dce1e8;
  --line-strong: #c3cad5;
  --tint: #eceff4;
  --red: #c8102e;
  --red-dark: #a50d26;
  --ok: #1e6b45;

  --font: "Schibsted Grotesk", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --t-xs: 13px;
  --t-sm: 14.5px;
  --t-md: 16.5px;
  --t-lg: 19px;
  --t-xl: clamp(23px, 4.6vw, 28px);
  --t-2xl: clamp(29px, 6vw, 40px);
  --t-hero: clamp(38px, 10.4vw, 60px);

  --r-slab: 14px;
  --r-label: 6px;
  --r-btn: 10px;
  --r-pill: 999px;

  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px; --s8: 72px; --s9: 104px;
  --content: 1120px;
  color-scheme: light;
}

/* ---- base ---- */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 var(--t-md)/1.55 var(--font); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
p, h1, h2, h3, ol, ul, dl, dd, figure { margin: 0; }
h1, h2, h3 { font-weight: 700; letter-spacing: -0.02em; text-wrap: balance; }
h1 { font-size: var(--t-2xl); line-height: 1.1; }
h2 { font-size: var(--t-2xl); line-height: 1.12; }
h3 { font-size: var(--t-lg); line-height: 1.3; letter-spacing: -0.01em; }
a { color: inherit; }
b, strong { font-weight: 700; }
code { font: inherit; font-weight: 500; }
img { max-width: 100%; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; border-radius: 4px; }
/* tabular figures only on whole-number counters (the live bid, checks used): in Schibsted Grotesk the tabular set
   also widens "." ":" "/" and ",", so "$9.99" would read "$9 . 99". Prices keep the default figures */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.wrap { width: 100%; max-width: calc(var(--content) + 2 * var(--s5)); margin: 0 auto; padding: 0 var(--s4); }
@media (min-width: 720px) { .wrap { padding: 0 var(--s5); } }

.lede { font-size: var(--t-lg); line-height: 1.5; color: var(--muted); max-width: 52ch; }
.fine { font-size: var(--t-sm); line-height: 1.55; color: var(--muted); }
.note { font-size: var(--t-sm); color: var(--muted); }
.note.ok { color: var(--ok); }
.note.bad { color: var(--red); }
.link { color: var(--ink); font-weight: 500; text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 3px; text-decoration-thickness: 1.5px; }
.link:hover { text-decoration-color: var(--ink); }

/* ---- buttons ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s2);
  min-height: 48px; padding: 12px 20px; border-radius: var(--r-btn); border: 1px solid transparent;
  font: 500 var(--t-md)/1.2 var(--font); text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}
.btn-primary { background: var(--red); color: #fff; }
.btn-primary:hover { background: var(--red-dark); }
.btn-secondary { background: var(--surface); color: var(--ink); border-color: var(--line-strong); }
.btn-secondary:hover { border-color: var(--ink); }
.btn-ink { background: var(--ink); color: #fff; }
.btn-ink:hover { background: #2c3546; }
.btn-small { min-height: 44px; padding: 10px 16px; font-size: var(--t-sm); }
.btn:disabled { opacity: 0.55; cursor: default; }

/* ---- nav + footer ---- */
.nav { display: flex; align-items: center; justify-content: space-between; gap: var(--s4); padding-top: max(var(--s3), env(safe-area-inset-top)); padding-bottom: var(--s3); }
.logo { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; text-decoration: none; font-weight: 700; font-size: 19px; letter-spacing: -0.02em; }
.logo-mark { width: 26px; height: 26px; border-radius: 7px; background: var(--red); position: relative; flex: none; }
/* the mark: a slab, a white label strip over a red case */
.logo-mark::before { content: ""; position: absolute; left: 5px; right: 5px; top: 5px; height: 5px; border-radius: 2px; background: #fff; }
.logo-mark::after { content: ""; position: absolute; left: 5px; right: 5px; top: 12px; bottom: 5px; border-radius: 2px; border: 2px solid #fff; }
.nav-links { display: flex; align-items: center; gap: var(--s1); }
.nav-link { display: inline-flex; align-items: center; min-height: 44px; padding: 0 10px; color: var(--muted); font-weight: 500; text-decoration: none; }
.nav-link:hover { color: var(--ink); }
.nav-cta { display: none; }
@media (min-width: 720px) { .nav-cta { display: inline-flex; margin-left: var(--s2); } }

.footer { border-top: 1px solid var(--line); margin-top: var(--s8); padding-top: var(--s5); padding-bottom: max(var(--s6), env(safe-area-inset-bottom)); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s3) var(--s5); color: var(--muted); font-size: var(--t-sm); }
.footer nav { display: flex; flex-wrap: wrap; gap: 0 var(--s2); margin-left: -10px; }
.footer nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 10px; color: var(--muted); text-decoration: none; }
.footer nav a:hover { color: var(--ink); }

/* ---- slab: the outer case, an inner label strip, the body ---- */
.slab { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-slab); padding: var(--s2); }
.slab-label { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s3); padding: 9px 12px; border-radius: var(--r-label); background: var(--ink); color: #fff; font-size: var(--t-sm); font-weight: 500; line-height: 1.3; }
.slab-label b { font-weight: 700; font-size: var(--t-md); }
.slab-label span { color: #c9d0db; text-align: right; }
.slab-label.is-red { background: var(--red); }
.slab-label.is-red span { color: #ffe3e7; }
.slab-label.is-light { background: var(--tint); color: var(--ink); }
.slab-label.is-light span { color: var(--muted); }
.slab-body { padding: var(--s4) var(--s3) var(--s2); }

/* ---- sections ---- */
.section { padding-top: var(--s8); }
@media (min-width: 900px) { .section { padding-top: var(--s9); } }
.section-head { display: grid; gap: var(--s3); margin-bottom: var(--s6); }
.page { padding-top: var(--s6); }
.page-head { display: grid; gap: var(--s3); margin-bottom: var(--s6); }

/* =================== landing =================== */
.hero { display: grid; gap: var(--s6); padding-top: var(--s5); align-items: center; }
.hero h1 { font-size: var(--t-hero); line-height: 1.04; letter-spacing: -0.03em; max-width: 13ch; }
.hero-copy { display: grid; gap: var(--s4); }
.hero .lede { max-width: 40ch; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2) var(--s5); margin-top: var(--s2); }
.hero-actions .link { display: inline-flex; align-items: center; min-height: 44px; }
@media (min-width: 900px) {
  .hero { grid-template-columns: minmax(0, 1fr) auto; gap: var(--s7); padding-top: var(--s7); }
}

/* the phone: one soft shadow, the only one on the site */
.phone { justify-self: center; width: min(296px, 80vw); aspect-ratio: 296 / 600; padding: 9px; border-radius: 44px; background: #11161f; box-shadow: 0 30px 60px -24px rgba(27, 34, 48, 0.45); position: relative; }
@media (max-width: 899px) { .phone { width: min(276px, 74vw); } }
.screen { position: relative; height: 100%; border-radius: 36px; overflow: hidden; background: #2a2f38; color: #fff; isolation: isolate; }
/* the seller's table under the stream */
.stream { position: absolute; inset: 0; background: radial-gradient(120% 70% at 50% 42%, #59606c 0%, #343a45 55%, #1d2129 100%); }
.stream-top { position: absolute; top: 46px; left: 14px; right: 14px; display: flex; align-items: center; gap: var(--s2); font-size: 12px; font-weight: 500; }
.live-pill { padding: 3px 8px; border-radius: var(--r-pill); background: var(--red); font-weight: 700; }
.viewers { color: #e6e9ef; }
.seller { margin-left: auto; color: #e6e9ef; }

/* the slab on the table, with the foil card */
.table-slab { position: absolute; left: 50%; top: 26%; width: 56%; transform: translateX(-50%) rotate(-2deg); padding: 6px; border-radius: 10px; background: rgba(236, 241, 247, 0.92); }
.table-slab .slab-label { padding: 5px 7px; font-size: 9px; border-radius: 4px; background: var(--red); }
.table-slab .slab-label b { font-size: 10px; }
.table-slab .slab-label span { color: #ffe3e7; }
.foil-card { margin-top: 5px; aspect-ratio: 63 / 88; border-radius: 6px; padding: 7%; background:
  linear-gradient(115deg, rgba(255, 255, 255, 0) 30%, rgba(255, 255, 255, 0.55) 46%, rgba(255, 255, 255, 0) 60%),
  linear-gradient(135deg, #f7d77a 0%, #f2b8d0 30%, #b9d3f7 55%, #bff0dc 78%, #f7d77a 100%);
  background-size: 250% 250%, 100% 100%; animation: foil 4s ease-in-out infinite alternate; }
@keyframes foil { from { background-position: 100% 0, 0 0; } to { background-position: 0 100%, 0 0; } }
.foil-art { height: 58%; border-radius: 3px; background: radial-gradient(circle at 50% 55%, #fff4 0 22%, transparent 23%), linear-gradient(160deg, #e6a24c, #c8578a); }
.foil-lines { margin-top: 9%; display: grid; gap: 5px; }
.foil-lines i { display: block; height: 4px; border-radius: 2px; background: rgba(27, 34, 48, 0.35); }
.foil-lines i:nth-child(2) { width: 70%; }
.foil-lines i:nth-child(3) { width: 45%; }

/* the auction bar, Whatnot-style */
.auction { position: absolute; left: 10px; right: 10px; bottom: 14px; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 14px; background: rgba(17, 22, 31, 0.86); }
.timer { min-width: 2.6em; font-size: 15px; font-weight: 700; }
.bid-now { display: grid; line-height: 1.15; }
.bid-now small { font-size: 10.5px; color: #b8c0cc; }
.bid-amount { font-size: 19px; font-weight: 700; font-variant-numeric: tabular-nums; transition: color 0.2s; }
.bid-btn { padding: 8px 14px; border-radius: var(--r-pill); background: #fff; color: var(--ink); font-size: 13px; font-weight: 700; }
.past { position: absolute; left: 10px; bottom: 76px; padding: 5px 10px; border-radius: var(--r-pill); background: var(--red); color: #fff; font-size: 12px; font-weight: 700; opacity: 0; transform: translateY(6px); transition: opacity 0.25s, transform 0.25s; }

/* AssistiveTouch-style floating button */
.float-btn { position: absolute; right: 12px; top: 58%; width: 46px; height: 46px; border-radius: 13px; background: rgba(60, 64, 72, 0.72); display: grid; place-items: center; }
.float-btn::before { content: ""; width: 26px; height: 26px; border-radius: 50%; background: rgba(255, 255, 255, 0.82); box-shadow: 0 0 0 5px rgba(255, 255, 255, 0.22); }
.float-btn::after { content: ""; position: absolute; inset: -6px; border-radius: 18px; border: 2px solid #fff; opacity: 0; }

/* the notification: a label strip over the result line */
.notif { position: absolute; top: 10px; left: 8px; right: 8px; padding: 6px; border-radius: 16px; background: #fafbfd; color: var(--ink); transform: translateY(-130%); transition: transform 0.45s cubic-bezier(0.2, 0.9, 0.25, 1.1); z-index: 2; }
.notif .slab-label { padding: 5px 9px; font-size: 11px; border-radius: 10px; background: var(--tint); color: var(--ink); align-items: center; }
.notif .slab-label span { color: var(--muted); }
.notif-app { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; }
.notif-app .logo-mark { width: 16px; height: 16px; border-radius: 5px; }
.notif-app .logo-mark::before { left: 3px; right: 3px; top: 3px; height: 3px; }
.notif-app .logo-mark::after { left: 3px; right: 3px; top: 7.5px; bottom: 3px; border-width: 1.5px; }
.notif p { padding: 7px 8px 5px; font-size: 12.5px; line-height: 1.4; font-weight: 500; }
.notif strong { color: var(--red); white-space: nowrap; }

/* steps of the loop (set by the script; the reduced-motion page shows the final one) */
.phone[data-step="tap"] .float-btn::after, .phone[data-step="notif"] .float-btn::after { animation: tap 0.6s ease-out; }
@keyframes tap { 0% { opacity: 0.9; transform: scale(0.85); } 100% { opacity: 0; transform: scale(1.35); } }
.phone[data-step="tap"] .float-btn { transform: scale(0.92); transition: transform 0.15s; }
.phone[data-step="notif"] .notif, .phone[data-step="past"] .notif, .phone[data-step="hold"] .notif { transform: translateY(0); }
.phone[data-step="past"] .bid-amount, .phone[data-step="hold"] .bid-amount { color: #ff6b80; }
.phone[data-step="past"] .past, .phone[data-step="hold"] .past { opacity: 1; transform: translateY(0); }
.phone[data-step="reset"] .screen > * { opacity: 0.35; transition: opacity 0.4s; }
@media (prefers-reduced-motion: reduce) {
  .foil-card { animation: none; }
  .notif, .past, .bid-amount { transition: none; }
}

/* how it works */
.steps-row { list-style: none; padding: 0; display: grid; gap: 0; border-top: 1px solid var(--line); counter-reset: step; }
.steps-row li { display: grid; grid-template-columns: 44px 1fr; gap: var(--s1) var(--s3); padding: var(--s5) 0; border-bottom: 1px solid var(--line); }
.steps-row .step-n { grid-row: span 2; font-size: var(--t-xl); font-weight: 700; line-height: 1.1; color: var(--muted); }
.steps-row p { color: var(--muted); max-width: 42ch; }
@media (min-width: 900px) {
  .steps-row { grid-template-columns: repeat(3, 1fr); border-bottom: 1px solid var(--line); }
  .steps-row li { grid-template-columns: 1fr; padding: var(--s5) var(--s5) var(--s6) 0; border-bottom: 0; }
  .steps-row li + li { padding-left: var(--s5); border-left: 1px solid var(--line); }
  .steps-row .step-n { grid-row: auto; margin-bottom: var(--s3); }
}

/* what the notification means */
.meanings { display: grid; gap: var(--s4); }
.meaning { display: grid; gap: var(--s3); }
.meaning .slab { padding: 6px; }
.meaning .slab-label { font-size: var(--t-xs); }
.meaning-line { padding: var(--s3) 10px var(--s2); font-size: var(--t-md); font-weight: 500; line-height: 1.45; overflow-wrap: anywhere; }
.meaning-line strong { color: var(--red); white-space: nowrap; }
.meaning-line .nobid { font-weight: 700; }
.meaning p.explain { color: var(--muted); max-width: 46ch; }
@media (min-width: 900px) {
  .meaning { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: var(--s6); align-items: center; padding: var(--s3) 0; }
}
.trust { margin-top: var(--s5); font-weight: 500; max-width: 60ch; }

/* plans */
.plans { display: grid; gap: var(--s4); align-items: start; }
@media (min-width: 900px) { .plans { grid-template-columns: 1fr 1.18fr 1fr; gap: var(--s5); } }
.plan .slab-body { display: grid; gap: var(--s3); padding: var(--s5) var(--s4) var(--s4); }
.plan-price { font-size: clamp(34px, 8vw, 44px); font-weight: 700; line-height: 1; letter-spacing: -0.03em; }
.plan-price .per { font-size: var(--t-md); font-weight: 500; color: var(--muted); letter-spacing: 0; margin-left: 2px; }
.plan-sub { color: var(--muted); font-size: var(--t-sm); min-height: 1.55em; }
.plan-rows { display: grid; border-top: 1px solid var(--line); margin-top: var(--s1); }
.plan-rows div { display: flex; justify-content: space-between; gap: var(--s3); padding: 10px 0; border-bottom: 1px solid var(--line); font-size: var(--t-sm); }
.plan-rows dt { color: var(--muted); }
.plan-rows dd { font-weight: 500; text-align: right; }
.plan .btn { width: 100%; margin-top: var(--s2); }
.plan.is-picked { border-color: var(--line-strong); }
.plans-note { margin-top: var(--s5); max-width: 72ch; }

.interval { display: inline-flex; padding: 4px; gap: 4px; border-radius: 12px; background: var(--tint); margin-bottom: var(--s5); }
.interval button { min-height: 44px; padding: 8px 16px; border: 0; border-radius: 9px; background: transparent; color: var(--muted); font: 500 var(--t-sm)/1.2 var(--font); cursor: pointer; }
.interval button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
.interval .save { margin-left: 6px; padding: 2px 8px; border-radius: var(--r-pill); background: var(--surface); color: var(--muted); font-size: var(--t-xs); font-weight: 500; }
.interval button[aria-pressed="true"] .save { background: var(--tint); }

/* faq */
.faq { border-top: 1px solid var(--line); max-width: 800px; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { display: flex; align-items: center; justify-content: space-between; gap: var(--s4); min-height: 60px; padding: var(--s3) 0; cursor: pointer; font-weight: 500; font-size: var(--t-lg); list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; flex: none; width: 10px; height: 10px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg) translate(-2px, -2px); transition: transform 0.15s; }
.faq details[open] summary::after { transform: rotate(-135deg) translate(-2px, -2px); }
.faq details p { padding: 0 0 var(--s5); color: var(--muted); max-width: 64ch; }

.closing { display: grid; gap: var(--s4); justify-items: start; }

/* =================== setup (/shortcut) =================== */
.guide { padding-top: var(--s7); display: grid; gap: var(--s4); max-width: 760px; }
.guide h2 { font-size: var(--t-xl); }
.guide-card { display: grid; gap: var(--s4); justify-items: start; padding: var(--s5); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-slab); }
.guide-card p, .guide-steps p { color: var(--muted); }
.guide-card b, .guide-steps b, .diy b { color: var(--ink); font-weight: 500; }
.guide-steps { list-style: none; padding: 0; display: grid; gap: var(--s5); }
.guide-steps > li { display: grid; grid-template-columns: 32px 1fr; gap: var(--s3); align-items: start; }
.guide-steps > li > div { display: grid; gap: var(--s2); min-width: 0; }
.guide-steps h3 { font-size: var(--t-md); }
.step-dot { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--line-strong); background: var(--surface); font-size: var(--t-sm); font-weight: 700; }
.sample { max-width: 460px; }
.sample .slab-label { align-items: center; }
.sample p { padding: var(--s3) 10px var(--s2); font-weight: 500; }
.sample strong { color: var(--red); white-space: nowrap; }
.know { display: grid; gap: var(--s3); }
.know ul { padding-left: 1.1em; display: grid; gap: var(--s2); color: var(--muted); }
.know b { color: var(--ink); font-weight: 500; }

.diy { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-slab); }
.diy summary { display: flex; align-items: center; justify-content: space-between; min-height: 56px; padding: var(--s3) var(--s5); cursor: pointer; font-weight: 500; list-style: none; }
.diy summary::-webkit-details-marker { display: none; }
.diy summary::after { content: ""; width: 9px; height: 9px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); }
.diy[open] summary::after { transform: rotate(-135deg); }
.diy-body { display: grid; gap: var(--s5); padding: 0 var(--s5) var(--s5); }
.diy code { padding: 1px 6px; border-radius: var(--r-label); background: var(--tint); }
.url-box { display: flex; align-items: center; gap: var(--s2); padding: 6px 6px 6px 12px; border: 1px solid var(--line); border-radius: var(--r-btn); background: var(--bg); }
.url-box code { flex: 1; min-width: 0; overflow-wrap: anywhere; background: none; padding: 0; }
.kv { list-style: none; padding: 0; display: grid; border-top: 1px solid var(--line); }
.kv li { display: grid; grid-template-columns: 7.5em 1fr; gap: var(--s3); padding: 8px 0; border-bottom: 1px solid var(--line); font-size: var(--t-sm); }
.kv span { color: var(--muted); }
.flow { display: grid; gap: 6px; counter-reset: flow; }
.flow span { display: flex; gap: var(--s3); padding: 9px 12px; border-radius: var(--r-label); background: var(--tint); font-size: var(--t-sm); counter-increment: flow; }
.flow span::before { content: counter(flow); color: var(--muted); font-weight: 700; }

/* =================== account =================== */
.form { display: grid; gap: var(--s3); max-width: 420px; }
.form label { font-weight: 500; font-size: var(--t-sm); }
.input { width: 100%; min-height: 48px; padding: 12px 14px; border: 1px solid var(--line-strong); border-radius: var(--r-btn); background: var(--surface); color: var(--ink); font: 400 var(--t-md) var(--font); }
.input:focus-visible { outline: 3px solid var(--ink); outline-offset: 1px; }
.account { max-width: 640px; }
.account .slab-body { display: grid; gap: 0; padding: var(--s2) var(--s3); }
.field { display: grid; gap: var(--s2); padding: var(--s4) 0; border-bottom: 1px solid var(--line); }
.field:last-of-type { border-bottom: 0; }
.field-name { font-size: var(--t-sm); font-weight: 500; color: var(--muted); }
.count { font-size: var(--t-xl); font-weight: 700; font-variant-numeric: tabular-nums; }
.count small { font-variant-numeric: normal; font-size: var(--t-md); font-weight: 500; color: var(--muted); }
.meter { height: 8px; border-radius: var(--r-pill); background: var(--tint); overflow: hidden; }
.meter span { display: block; height: 100%; width: 0; background: var(--ink); border-radius: inherit; }
.meter.full span { background: var(--red); }
.key-row { display: flex; align-items: center; gap: var(--s2); flex-wrap: wrap; }
.key-row code { flex: 1 1 220px; min-width: 0; padding: 11px 12px; border-radius: var(--r-btn); background: var(--bg); border: 1px solid var(--line); overflow-wrap: anywhere; }
.actions { display: flex; flex-wrap: wrap; gap: var(--s2); padding-top: var(--s4); }
.actions form { margin: 0; }

/* sign-in page from /auth/verify */
.auth-page { display: grid; gap: var(--s4); justify-items: start; padding-top: var(--s7); }
.auth-page form { margin: 0; }

/* =================== check history =================== */
.history { list-style: none; padding: 0; display: grid; gap: var(--s2); max-width: 780px; }
.history-item { display: flex; align-items: center; gap: var(--s3); min-height: 72px; padding: var(--s2) var(--s4) var(--s2) var(--s2); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-slab); text-decoration: none; }
.history-item:hover { border-color: var(--line-strong); }
.thumb { flex: none; width: 48px; height: 64px; border-radius: var(--r-label); background: var(--tint); overflow: hidden; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.history-text { flex: 1; min-width: 0; display: grid; gap: 2px; }
.history-line { font-size: var(--t-sm); font-weight: 500; line-height: 1.4; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.history-meta { font-size: var(--t-xs); color: var(--muted); }
.history-bid { flex: none; font-weight: 700; color: var(--red); }
.back-link { display: inline-flex; align-items: center; min-height: 44px; margin-bottom: var(--s2); }
.detail-time { color: var(--muted); font-size: var(--t-sm); }
.detail-line { font-size: var(--t-xl); line-height: 1.3; margin: var(--s2) 0 var(--s5); overflow-wrap: anywhere; }
.detail-grid { display: grid; gap: var(--s5); align-items: start; }
@media (min-width: 900px) { .detail-grid { grid-template-columns: minmax(0, 320px) minmax(0, 1fr); } }
.detail-image img { display: block; width: 100%; border-radius: var(--r-slab); border: 1px solid var(--line); }
.rows { display: grid; }
.rows div { display: grid; grid-template-columns: 9em 1fr; gap: var(--s3); padding: 9px 0; border-bottom: 1px solid var(--line); font-size: var(--t-sm); }
.rows dt { color: var(--muted); }
.rows dd { overflow-wrap: anywhere; font-weight: 500; }
.raw { margin-top: var(--s3); font-size: var(--t-sm); color: var(--muted); }
.raw summary { display: flex; align-items: center; min-height: 44px; cursor: pointer; }
.raw pre { overflow-x: auto; padding: var(--s3); border-radius: var(--r-btn); background: var(--bg); border: 1px solid var(--line); font: 12px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--ink); }

/* =================== web app (/app): its ids and classes are driven by app.js =================== */
.app-main { max-width: 560px; margin: 0 auto; padding: 0 var(--s4) max(var(--s6), env(safe-area-inset-bottom)); display: grid; gap: var(--s4); }
.app-head { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--s4); padding-top: max(var(--s3), env(safe-area-inset-top)); }
.margin-ctl { display: grid; gap: 2px; min-width: 150px; font-size: var(--t-sm); color: var(--muted); }
.margin-ctl b { color: var(--ink); }
.margin-ctl input { width: 100%; height: 44px; margin: 0; accent-color: var(--ink); }
.app-main .btn-check { width: 100%; min-height: 60px; font-size: var(--t-lg); border-radius: 12px; }
.hint { margin-bottom: var(--s3); color: var(--muted); }
.app-intro { color: var(--muted); font-size: var(--t-sm); text-align: center; }
.crop-wrap { display: flex; justify-content: center; }
#cropCanvas { max-width: 100%; border-radius: var(--r-btn); touch-action: none; }
.app-row { display: flex; gap: var(--s2); margin-top: var(--s3); }
.app-row .btn { flex: 1; }
#status { overflow-wrap: anywhere; padding: var(--s4); border-radius: var(--r-slab); background: var(--surface); border: 1px solid var(--line); color: var(--muted); }
#status.error { color: var(--red); }
#result { display: grid; gap: var(--s4); }
.bid-slab .slab-body { text-align: center; padding: var(--s5) var(--s3) var(--s4); }
.huge { font-size: clamp(56px, 17vw, 84px); font-weight: 700; line-height: 1; letter-spacing: -0.03em; color: var(--red); }
.huge.zero { color: var(--muted); }
.bid-slab.safe .huge { color: var(--ink); }
.assume { display: inline-block; margin-top: var(--s3); padding: 4px 12px; border-radius: var(--r-pill); background: var(--tint); font-size: var(--t-sm); font-weight: 500; }
.sub { margin-top: var(--s3); font-size: var(--t-sm); color: var(--muted); text-align: left; }
.card-slab .slab-body { display: grid; grid-template-columns: 40% 1fr; gap: var(--s3); padding: var(--s3) var(--s2) var(--s2); }
.card-slab img { width: 100%; border-radius: var(--r-label); }
.meta { display: grid; gap: 6px; align-content: start; min-width: 0; }
.wide { grid-column: 1 / -1; display: grid; gap: 10px; min-width: 0; }
.name { font-size: var(--t-lg); font-weight: 700; letter-spacing: -0.01em; }
.dim { color: var(--muted); font-size: var(--t-sm); }
a.dim { display: inline-flex; align-items: center; min-height: 44px; color: var(--ink); text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
.warn { padding: 10px 12px; border-radius: var(--r-btn); background: var(--tint); font-size: var(--t-sm); }
.prices { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.prices div { padding: 8px 10px; border-radius: var(--r-label); background: var(--bg); border: 1px solid var(--line); min-width: 0; }
.prices dt { font-size: var(--t-xs); color: var(--muted); }
.prices dd { font-size: var(--t-md); font-weight: 500; }
.prices.regular-only dd { color: var(--muted); font-weight: 400; }
.prices.regular-only::before { content: "Regular print only"; grid-column: 1 / -1; font-size: var(--t-xs); font-weight: 500; color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { min-height: 44px; padding: 8px 14px; border-radius: var(--r-pill); border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); font: 500 var(--t-sm) var(--font); cursor: pointer; }
.chip.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.cands { display: grid; gap: var(--s2); }
.cand { display: flex; gap: var(--s3); align-items: center; min-height: 64px; padding: var(--s2); text-align: left; border: 1px solid var(--line); border-radius: var(--r-slab); background: var(--surface); color: var(--ink); font: 400 var(--t-md) var(--font); cursor: pointer; }
.cand img { width: 56px; border-radius: var(--r-label); }
.cand div { display: grid; gap: 2px; }
.cand b { font-weight: 700; }
.cand span { color: var(--muted); font-size: var(--t-sm); }
.cand .cprice { color: var(--ink); font-weight: 500; }
.cand.on { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.app-raw { font-size: var(--t-sm); color: var(--muted); }
.app-raw summary { display: flex; align-items: center; min-height: 44px; cursor: pointer; }
.app-raw pre { overflow-x: auto; padding: var(--s3); border-radius: var(--r-btn); background: var(--surface); border: 1px solid var(--line); font: 12px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--ink); }
