/* app.css — Lost Archives, "Film Archive" (D61). Tokens from Plans/01 Design System §2 as amended 2026-10-11. One file. */
@font-face { font-family: "Special Elite"; src: url("/fonts/special-elite.woff2") format("woff2"); font-display: swap; }
:root {
  color-scheme: dark;
  --bg: #0c0b0a; --surface: #161513; --raised: #201e1b;
  --line: #2a2825; --line-strong: #77726a;
  --text: #ece6da; --muted: #b9b2a6;
  --paper: #e9e3d6; --paper-dim: #d3ccbe; --ink: #1a1815; --ink-muted: #57524a;
  --ok: #8fd6a0; --warn: #f0b860; --danger: #f28b82; --sold-bg: #3a3835;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --display: "Special Elite", ui-monospace, "Courier New", monospace;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --fs-xs: .8125rem; --fs-sm: .9375rem; --fs-md: 1rem; --fs-lg: 1.125rem; --fs-xl: 1.375rem; --fs-2xl: 1.75rem;
  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 24px; --s-6: 32px; --s-7: 48px; --s-8: 64px;
  --r: 2px; --tap: 44px; --dur: 200ms; --ease: ease-out;
  --container: 1280px; --gutter: 16px;
}
@media (min-width: 768px) { :root { --gutter: 24px; } }
@media (min-width: 1024px) { :root { --gutter: 40px; } }

/* reset / base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 var(--fs-md)/1.5 var(--font); min-height: 100dvh; overflow-x: clip; }
/* film grain: the one texture on the page. Plain low opacity, no blend mode, so scrolling stays cheap on phones. */
body::before { content: ""; position: fixed; inset: 0; z-index: 30; pointer-events: none; opacity: .06; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)'/%3E%3C/svg%3E"); }
img { display: block; max-width: 100%; height: auto; }
a { color: var(--text); text-underline-offset: 3px; }
a, button, input, select, textarea, summary { touch-action: manipulation; }
h1, h2 { font-family: var(--display); font-weight: 400; text-transform: uppercase; overflow-wrap: anywhere; }
h1 { font-size: clamp(1.5rem, 4.4vw, 2.3rem); letter-spacing: .03em; line-height: 1.15; margin: var(--s-5) 0 var(--s-4); text-wrap: balance; }
h2 { font-size: var(--fs-lg); letter-spacing: .04em; line-height: 1.25; margin: var(--s-6) 0 var(--s-3); }
p { margin: 0 0 var(--s-3); max-width: 65ch; overflow-wrap: anywhere; }
code { font-family: var(--mono); font-size: var(--fs-sm); color: var(--muted); }
:focus-visible { outline: 2px solid var(--text); outline-offset: 3px; }
main:focus { outline: none; }
.skip { position: absolute; left: var(--s-4); top: -100px; display: inline-flex; align-items: center; min-height: var(--tap); background: var(--paper); color: var(--ink); padding: 0 var(--s-4); border-radius: var(--r); z-index: 40; }
.skip:focus { top: var(--s-4); }

/* layout */
.container { max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }

/* header / footer */
.site-header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s-2) var(--s-4); padding: var(--s-2) var(--gutter); max-width: var(--container); margin-inline: auto; }
.brand { display: inline-flex; align-items: center; min-height: var(--tap); min-width: var(--tap); }
.brand img { width: 52px; height: 52px; mix-blend-mode: lighten; }
.brand .brand__wide { width: 84px; height: auto; margin-inline-start: var(--s-2); }
.site-header__tag { font-size: var(--fs-xs); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.tiers__label, .details dt { font-size: var(--fs-sm); color: var(--muted); }
.site-header nav:not(.dock) { display: flex; gap: var(--s-4); align-items: center; margin-inline-start: auto; }
@media (max-width: 479px) { .site-header__tag { display: none; } }
.site-header nav:not(.dock) a:not(.btn) { color: var(--muted); text-decoration: none; min-height: var(--tap); display: inline-flex; align-items: center; transition: color var(--dur) var(--ease); }
.site-header nav:not(.dock) a:not(.btn):hover { color: var(--text); }
.site-footer { margin-top: var(--s-8); padding: var(--s-5) var(--gutter) var(--s-7); border-top: 1px solid var(--line); color: var(--muted); font-size: var(--fs-sm); display: flex; flex-wrap: wrap; align-items: center; gap: 0 var(--s-5); max-width: var(--container); margin-inline: auto; }
.site-footer a { color: var(--muted); min-height: var(--tap); display: inline-flex; align-items: center; }
.site-footer a:hover { color: var(--text); }
.site-footer p { margin: 0; flex: 1 1 100%; }
@media (min-width: 768px) { .site-footer p { order: -1; flex: 1; } }

/* dock: the floating bar on a phone. The catalog shows it below 768px; the admin below 1024px (admin.css). */
.dock { position: fixed; left: var(--s-3); right: var(--s-3); bottom: calc(var(--s-3) + env(safe-area-inset-bottom)); z-index: 20; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: var(--s-1); max-width: 520px; margin-inline: auto; padding: var(--s-1); background: rgb(22 21 19 / .88); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border: 1px solid var(--line-strong); border-radius: 18px; box-shadow: 0 12px 32px -8px #000; }
.dock > a, .dock > button { position: relative; display: grid; justify-items: center; align-content: center; gap: 2px; min-height: 56px; padding: 0 2px; border: 0; border-radius: 14px; background: none; color: var(--muted); font: 500 var(--fs-xs)/1.2 var(--font); text-decoration: none; cursor: pointer; transition: color var(--dur) var(--ease), background-color var(--dur) var(--ease); }
.dock > a:hover, .dock > button:hover { color: var(--text); }
.dock [aria-current="page"] { background: var(--raised); color: var(--text); }
@media (max-width: 767px) {
  .site-header nav:not(.dock) { display: none; }
  .site-footer { padding-bottom: calc(104px + env(safe-area-inset-bottom)); }
}
@media (min-width: 768px) { .site-header .dock { display: none; } }

/* hero: the logo is the picture, one typed line under it */
.hero { position: relative; display: grid; justify-items: center; text-align: center; padding-bottom: var(--s-4); }
.hero::before { content: ""; position: absolute; inset: 0 0 auto; margin-inline: auto; max-width: 900px; aspect-ratio: 1.5; background: radial-gradient(closest-side, rgba(255, 200, 140, .07), transparent); pointer-events: none; }
.hero__logos { position: relative; display: flex; align-items: center; justify-content: center; gap: var(--s-4); width: min(92vw, 720px); }
.hero__logo { flex: 1; min-width: 0; max-width: 340px; mix-blend-mode: lighten; }
.hero h1 { position: relative; margin: 0; font-size: clamp(1.7rem, 5vw, 2.9rem); letter-spacing: .05em; }
.hero__sub { position: relative; margin: var(--s-3) 0 0; color: var(--muted); }
/* drop teaser: a typed slip under the hero line, one a seller (P10) */
.teasers { position: relative; list-style: none; margin: var(--s-4) 0 0; padding: 0; display: grid; gap: var(--s-2); width: min(100%, 480px); }
.teaser { display: grid; gap: 2px; padding: var(--s-3) var(--s-4); background: var(--surface); border: 1px dashed var(--line-strong); border-radius: var(--r); color: var(--text); text-align: left; text-decoration: none; overflow-wrap: anywhere; transition: border-color var(--dur) var(--ease); }
a.teaser:hover { border-color: var(--text); }
.teaser__go { font-size: var(--fs-sm); text-decoration: underline; }
.teaser__kind { font-family: var(--display); font-size: var(--fs-sm); letter-spacing: .08em; text-transform: uppercase; color: var(--warn); }
.teaser__when { font-size: var(--fs-sm); color: var(--muted); }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2); min-height: var(--tap); padding: var(--s-2) var(--s-5); border-radius: var(--r); border: 1px solid transparent; font: 600 var(--fs-md)/1.25 var(--font); text-align: center; text-decoration: none; cursor: pointer; transition: background-color var(--dur) var(--ease), border-color var(--dur) var(--ease), color var(--dur) var(--ease), opacity var(--dur) var(--ease); }
.btn--primary { background: var(--paper); color: var(--ink); }
.btn--primary:hover { background: #fff; }
.btn--secondary { background: transparent; color: var(--text); border-color: var(--line-strong); }
.btn--secondary:hover { border-color: var(--text); }
.btn--ghost { background: transparent; color: var(--muted); text-decoration: underline; }
.btn--ghost:hover { color: var(--text); }
.btn--danger { background: transparent; color: var(--danger); border-color: var(--danger); }
.btn--danger:hover { background: var(--raised); }
.btn--block { width: 100%; }
a:active, .btn:active { opacity: .85; }
.btn[disabled], .btn[aria-busy="true"] { opacity: .5; cursor: not-allowed; }

/* badges: stamped, the word carries the status */
.badge { display: inline-flex; align-items: center; min-height: 24px; padding: 0 var(--s-2); border-radius: var(--r); border: 1px solid var(--line-strong); font: 600 var(--fs-xs)/1 var(--font); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.badge--available { border-color: var(--ok); color: var(--ok); }
.badge--reserved { border-color: var(--warn); color: var(--warn); }
.badge--sold { background: var(--sold-bg); border-color: var(--sold-bg); color: var(--text); }
.badge-slot { display: inline-flex; min-width: 6.5em; }

/* notices: the words carry the status, the colour only echoes it */
.notice { padding: var(--s-3) var(--s-4); border-left: 3px solid var(--muted); background: var(--surface); border-radius: var(--r); margin: var(--s-4) 0; color: var(--muted); overflow-wrap: anywhere; }
.notice--ok { border-color: var(--ok); color: var(--ok); }
.notice--error { border-color: var(--danger); color: var(--danger); }
.notice--info { border-color: var(--muted); }
.notice a { color: inherit; }
.notice h2 { margin: 0 0 var(--s-1); font-size: var(--fs-md); }
.notice h2, .issue h2, .bids h2 { font-family: var(--font); font-weight: 600; letter-spacing: .06em; }
.notice ul { margin: 0; padding-inline-start: 1.2em; }

/* forms */
.stack { display: grid; gap: var(--s-4); }
.stack > p:empty { position: absolute; }
.field { display: grid; align-content: start; gap: var(--s-1); }
.field label, .field legend { font-weight: 500; }
.input, .select, .textarea { min-height: var(--tap); width: 100%; padding: 0 var(--s-3); background: var(--surface); color: var(--text); border: 1px solid var(--line-strong); border-radius: var(--r); font: inherit; transition: border-color var(--dur) var(--ease); }
.input:focus, .select:focus, .textarea:focus { border-color: var(--text); }
.input[type="search"] { -webkit-appearance: none; appearance: none; }
.input::placeholder { color: var(--muted); opacity: 1; }
.textarea { padding: var(--s-3); line-height: 1.5; }
.field--unread .input, .field--unread .textarea { border-color: var(--warn); }
.field--error .input, .field--error .textarea, .field--error .select { border-color: var(--danger); }
.hint { color: var(--muted); font-size: var(--fs-sm); margin: 0; }
.hint--unread { color: var(--warn); }
.error { color: var(--danger); font-size: var(--fs-sm); margin: 0; }
.pair, .grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-3); }
.grid-2 .input { padding-left: 28px; background-repeat: no-repeat; background-position: 8px center; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20'%3E%3Ctext x='3' y='15' font-size='15' font-family='sans-serif' fill='%23b9b2a6'%3E%E2%82%B1%3C/text%3E%3C/svg%3E"); }
fieldset { border: 1px solid var(--line); border-radius: var(--r); padding: var(--s-3) var(--s-4) var(--s-4); margin: 0; min-width: 0; }
fieldset > .hint { margin-top: var(--s-3); }
.actions { display: grid; gap: var(--s-2); }
details.field summary { cursor: pointer; color: var(--text); text-decoration: underline; text-underline-offset: 3px; min-height: var(--tap); display: flex; align-items: center; }

/* public filters: every option is a link, one tap applies it */
.filters { display: grid; gap: var(--s-2); margin: var(--s-3) 0 var(--s-4); }
.filters__row { display: grid; gap: var(--s-2); }
@media (min-width: 900px) { .filters__row { grid-template-columns: minmax(0, 1fr) minmax(260px, 340px); align-items: start; gap: var(--s-5); } }
.facets, .facets nav { display: flex; flex-wrap: wrap; gap: 0 var(--s-5); }
.facets a { min-height: var(--tap); display: inline-flex; align-items: center; color: var(--muted); text-decoration: none; transition: color var(--dur) var(--ease); }
.facets a:hover, .facets a[aria-current] { color: var(--text); }
.facets a[aria-current] { text-decoration: underline; text-underline-offset: 6px; }
.filters__search { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.filters__search .input { flex: 1 1 160px; width: auto; }
.filters__search .btn { padding-inline: var(--s-4); }
.summary { margin: 0 0 var(--s-2); color: var(--muted); font-size: var(--fs-sm); }

/* cards and grid: every piece is a print from the archive */
.grid { list-style: none; margin: var(--s-4) 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 12px; }
.grid > li { display: flex; min-width: 0; }
@media (min-width: 768px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px 18px; } }
@media (min-width: 1024px) { .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
/* D93: the photo is the print and keeps the tilt; the words under it sit straight on the page. */
.card { flex: 1; min-width: 0; display: flex; flex-direction: column; color: var(--text); text-decoration: none; }
.grid > li:nth-child(3n+1) .card__media { rotate: -1.2deg; }
.grid > li:nth-child(3n+2) .card__media { rotate: .8deg; }
.grid > li:nth-child(3n) .card__media { rotate: -.4deg; }
.grid .card:hover .card__media, .grid .card:focus-visible .card__media { rotate: 0deg; }
.card__media { position: relative; aspect-ratio: 4 / 5; background: var(--paper-dim); overflow: hidden; border: 6px solid var(--paper); border-radius: var(--r); box-shadow: 0 10px 24px -10px #000; transition: rotate 250ms var(--ease); }
.card__size { position: absolute; left: 0; bottom: 0; max-width: 100%; padding: 2px var(--s-2); background: var(--paper); color: var(--ink); font-size: var(--fs-xs); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card__media img { width: 100%; height: 100%; object-fit: cover; }
.card__placeholder { width: 100%; height: 100%; display: grid; place-items: center; color: var(--ink-muted); }
.card__badge { position: absolute; top: var(--s-2); left: var(--s-2); }
.card .badge--sold { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.card__body { flex: 1; min-width: 0; overflow-wrap: anywhere; padding: var(--s-3) 2px 0; display: grid; align-content: start; gap: 2px; }
.card__title { font: 600 var(--fs-md)/1.3 var(--font); letter-spacing: 0; text-transform: none; margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card__specs { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); margin: var(--s-1) 0; border-block: 1px solid var(--line); }
.card__specs div { min-width: 0; padding: var(--s-1) 0 var(--s-1) var(--s-2); }
.card__specs div:first-child { padding-left: 0; }
.card__specs div + div { border-left: 1px solid var(--line); }
.card__specs dt { font-size: var(--fs-xs); color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card__specs dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; }
.card__price { font-size: var(--fs-lg); font-weight: 600; font-variant-numeric: tabular-nums; margin: 0; }
.card .code { font-size: var(--fs-xs); margin: 0; }
.pagination { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); margin: var(--s-6) 0 var(--s-5); }

/* item page */
.back { margin: 0; }
.back a { color: var(--muted); text-decoration: none; min-height: var(--tap); display: inline-flex; align-items: center; }
.back a:hover { color: var(--text); }
.item__media { min-width: 0; }
@media (min-width: 940px) {
  .item { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(340px, .9fr); align-items: start; column-gap: var(--s-7); }
  .back { grid-column: 1 / -1; }
  .item__media { position: sticky; top: var(--s-4); }
  .item__info > h1:first-child { margin-top: 0; }
}
.gallery { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: var(--s-2); margin: var(--s-2) 0 0; scrollbar-width: none; scroll-behavior: smooth; }
.gallery::-webkit-scrollbar { display: none; }
.gallery:focus-visible { outline-offset: -2px; }
.gallery__slide { position: relative; flex: 0 0 100%; min-width: 0; margin: 0; scroll-snap-align: start; }
.gallery__count { position: absolute; top: var(--s-4); right: var(--s-4); padding: 2px var(--s-2); background: rgb(12 11 10 / .82); color: var(--text); font-size: var(--fs-xs); font-weight: 600; border-radius: var(--r); }
.gallery img { display: block; width: 100%; height: auto; max-height: 82dvh; object-fit: contain; background: var(--paper); border: 8px solid var(--paper); border-bottom-width: 32px; border-radius: var(--r); }
/* on a phone the next photo shows at the edge, so there is something to swipe to */
@media (max-width: 767px) { .gallery img { max-height: 58dvh; } .gallery__slide:not(:only-child) { flex-basis: 90%; } }
.gallery--empty { aspect-ratio: 4 / 5; display: grid; place-items: center; background: var(--surface); border-radius: var(--r); max-height: 70vh; }
.gallery__hint { font-size: var(--fs-sm); margin: var(--s-2) 0 0; }
.thumbs { display: none; }
@media (min-width: 768px) {
  .gallery__hint, .gallery__swipe { display: none; }
  .thumbs { display: flex; flex-wrap: wrap; gap: var(--s-2); margin-top: var(--s-2); }
  .thumbs a { width: 64px; opacity: .55; transition: opacity var(--dur) var(--ease); }
  .thumbs a:hover, .thumbs a:focus-visible { opacity: 1; }
  .thumbs img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: var(--r); }
}
.item__code { display: flex; gap: var(--s-3); align-items: center; }
.price--single { font-size: var(--fs-2xl); font-weight: 700; font-variant-numeric: tabular-nums; }
.tiers { list-style: none; padding: 0; margin: var(--s-4) 0; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); border-block: 1px solid var(--line); }
.tiers li { padding: var(--s-3) 0 var(--s-3) var(--s-3); display: grid; align-content: start; gap: var(--s-1); min-width: 0; }
.tiers li:first-child { padding-left: 0; }
.tiers li + li { border-left: 1px solid var(--line); }
.tiers__price { font-size: clamp(1.05rem, 4.6vw, 1.45rem); font-weight: 600; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.tiers__note { font-size: var(--fs-xs); color: var(--muted); }
.details { display: grid; grid-template-columns: max-content minmax(0, 1fr); margin: var(--s-4) 0; }
.details dt, .details dd { margin: 0; padding: var(--s-3) 0; border-bottom: 1px solid var(--line); }
.details dt { padding-right: var(--s-6); display: flex; align-items: center; }
.details dd { overflow-wrap: anywhere; }
.issue { border-left: 3px solid var(--line-strong); padding: var(--s-3) var(--s-4); background: var(--surface); border-radius: var(--r); margin: var(--s-4) 0; }
.issue h2 { margin: 0 0 var(--s-1); font-size: var(--fs-sm); color: var(--muted); }
.issue p { margin: 0; white-space: pre-line; }
.description { white-space: pre-line; }
.seller a, .howto-link a, .cta__minor { min-height: var(--tap); display: inline-flex; align-items: center; }
.cta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2); margin: var(--s-5) 0; }
.cta .btn { flex: 1 1 140px; width: auto; padding-inline: var(--s-3); white-space: nowrap; }
.cta .btn--primary { flex: 2 1 180px; }
.cta .hint, .cta__minor { flex: 1 0 100%; }
.cta__minor { color: var(--muted); font-size: var(--fs-sm); }
@media (max-width: 767px) {
  .cta { position: fixed; left: var(--s-3); right: var(--s-3); bottom: calc(var(--s-3) + env(safe-area-inset-bottom)); z-index: 10; margin: 0; padding: var(--s-3); background: rgb(22 21 19 / .92); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border: 1px solid var(--line-strong); border-radius: 18px; box-shadow: 0 12px 32px -8px #000; }
  body:has(.cta) .dock { display: none; }
  .item ~ .site-footer { padding-bottom: calc(160px + env(safe-area-inset-bottom)); }
  html:has(.cta) { scroll-padding-bottom: calc(160px + env(safe-area-inset-bottom)); }
}
/* landscape phones: the bar goes inline so it cannot eat the viewport */
@media (max-width: 767px) and (orientation: landscape) {
  .cta { position: static; padding: 0; margin: var(--s-5) 0; border: 0; background: none; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
  body:has(.cta) .dock { display: grid; }
  .item ~ .site-footer { padding-bottom: var(--s-7); }
  html:has(.cta) { scroll-padding-bottom: 0; }
}

/* tables */
.table { border-collapse: collapse; width: 100%; }
.table td, .table th { text-align: left; padding: var(--s-2) var(--s-3); border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.table th { background: var(--raised); font-weight: 600; }
.item .table { max-width: 480px; }
.item .table td { padding-inline: 0; }
.item .table td:last-child { text-align: right; }

/* how to buy */
#browse { scroll-margin-top: var(--s-3); }
.linkbtn { font: inherit; background: none; border: 0; padding: 0; color: var(--muted); min-height: var(--tap); cursor: pointer; transition: color var(--dur) var(--ease); }
.linkbtn:hover { color: var(--text); }
.howto-link .linkbtn, .bid__steps .linkbtn { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
.popup { width: min(560px, calc(100% - 2 * var(--gutter))); max-height: 85dvh; overflow-y: auto; padding: var(--s-5); background: var(--surface); color: var(--text); border: 1px solid var(--line-strong); border-radius: var(--r); }
.popup::backdrop { background: rgb(0 0 0 / .72); }
.popup__head { display: flex; align-items: center; justify-content: space-between; gap: var(--s-4); margin-bottom: var(--s-3); }
.popup h2 { margin: 0; }
.popup .howto { margin-bottom: 0; }
/* no popover (browsers before 2024): the panel shows as a plain block under the footer, its buttons are hidden */
@supports not selector(:popover-open) { [popovertarget] { display: none; } }
.howto { max-width: 65ch; padding-inline-start: 1.4em; }
.howto li { margin-bottom: var(--s-3); }

/* login */
.login { max-width: 400px; padding-top: var(--s-7); display: grid; gap: var(--s-4); }
.login h1 { margin: 0; }
.login__logo { width: 120px; height: 120px; mix-blend-mode: lighten; }
.login .field { position: relative; }
.login .field > .btn--ghost { position: absolute; right: 0; top: 28px; padding-inline: var(--s-3); }
#secret { padding-right: 72px; }

/* empty states */
.empty { box-sizing: content-box; display: grid; justify-items: center; text-align: center; gap: var(--s-3); padding-block: var(--s-7); max-width: 32ch; margin-inline: auto; }
.empty h1, .empty h2, .empty p { margin: 0; }
.empty p { color: var(--muted); text-wrap: balance; }
.empty svg { color: var(--muted); }
.empty .btn { justify-self: stretch; }

/* bidding (P11) */
.card__bid { margin: 0; font-size: var(--fs-sm); color: var(--warn); }
.bid { margin: var(--s-5) 0; display: grid; gap: var(--s-3); scroll-margin-top: var(--s-3); }
.bid .notice, .bid__state, .bid__mine, .bid .hint { margin: 0; }
.bid__state { overflow-wrap: anywhere; }
.bid__mine { color: var(--ok); }
.bid__clock { margin: 0; font-size: var(--fs-lg); font-weight: 600; color: var(--warn); }
.bid__clock span { display: block; font-size: var(--fs-sm); font-weight: 400; color: var(--muted); }
.bid__steps { padding: var(--s-3) var(--s-4); background: var(--surface); border-left: 3px solid var(--warn); border-radius: var(--r); }
.bid__steps ol { margin: 0; padding-inline-start: 1.3em; display: grid; gap: var(--s-1); }
.ladder { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.ladder__row { display: grid; grid-template-columns: 4.5em minmax(0, 1fr) auto; align-items: center; gap: var(--s-3); min-height: 60px; padding: var(--s-2) 0; border-bottom: 1px solid var(--line); color: inherit; text-decoration: none; }
.ladder__word { font-weight: 600; }
.ladder__price { font-size: var(--fs-lg); font-weight: 600; font-variant-numeric: tabular-nums; }
.ladder__price small { display: block; font-size: var(--fs-xs); font-weight: 400; color: var(--muted); }
.ladder__row--taken > :not(.ladder__who) { opacity: .5; }
.ladder__who { color: var(--muted); font-size: var(--fs-sm); text-align: end; overflow-wrap: anywhere; }
.ladder .btn { min-width: 88px; }
.bid__words { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.bid__words .btn { flex: 1 1 140px; padding-inline: var(--s-3); white-space: nowrap; font-variant-numeric: tabular-nums; }
.bids h2 { margin: 0 0 var(--s-1); font-size: var(--fs-sm); color: var(--muted); }
.bids ol { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.bids li { display: flex; flex-wrap: wrap; gap: var(--s-1) var(--s-3); padding: var(--s-2) 0; border-bottom: 1px solid var(--line); font-size: var(--fs-sm); overflow-wrap: anywhere; }
.bids__what { font-variant-numeric: tabular-nums; }
.my-bids { max-width: 640px; }
.my-bids__forget { font-size: var(--fs-sm); }
.my-bids__forget p { margin: 0; }
.my-bids__forget .btn { padding-inline: 0; height: auto; white-space: normal; text-align: start; }
.my-bids ul { list-style: none; margin: var(--s-4) 0 0; padding: 0; border-top: 1px solid var(--line); }
.my-bids li a { display: flex; align-items: center; gap: var(--s-3); padding: var(--s-3) 0; border-bottom: 1px solid var(--line); color: inherit; text-decoration: none; }
.my-bids img, .my-bids__blank { flex: none; width: 56px; height: 70px; object-fit: cover; background: var(--raised); }
.my-bids__body { flex: 1; min-width: 0; display: grid; gap: 2px; font-size: var(--fs-sm); overflow-wrap: anywhere; }
.my-bids__title { font-size: var(--fs-md); }
.my-bids__what { font-variant-numeric: tabular-nums; }
.my-bids__won { color: var(--ok); }
.bid-page { max-width: 560px; }
.bid-page__item { margin: 0 0 var(--s-4); color: var(--muted); overflow-wrap: anywhere; }
.bid-page__terms { margin: 0; padding-inline-start: 1.2em; color: var(--muted); font-size: var(--fs-sm); display: grid; gap: var(--s-1); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* utilities */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.muted { color: var(--muted); }
.code { font-family: var(--mono); font-size: var(--fs-sm); letter-spacing: .04em; color: var(--muted); }

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