/* BlackFridaySale
   The look: the night before the doors open. A near-black page, one loud yellow (the shelf tag),
   red for the size of the cut, and tall poster type for prices and headings. Product photos sit on
   white tiles so they read the way they do on the stores' own sites. One theme, dark, on purpose. */

@font-face { font-family: 'Big Shoulders Display'; src: url('/fonts/bigshoulders.woff2') format('woff2'); font-weight: 100 900; font-display: swap; }
@font-face { font-family: 'Inter'; src: url('/fonts/inter.woff2') format('woff2'); font-weight: 100 900; font-display: swap; }

:root {
  --paper: #0c0c0b;
  --surface: #171716;
  --surface-2: #1f1f1d;
  --ink: #f4f1e8;
  --ink-2: #b9b5a7;
  --line: #2a2a27;
  --line-2: #3a3a36;
  --accent: #ffd60a;
  --accent-hi: #ffe566;
  --on-accent: #14130a;
  --red: #ff4a3d;
  --on-red: #1a0503;
  --logo-bg: #ffffff;
  --stage: #050505;
  --shadow: 0 1px 2px rgb(0 0 0 / 0.5), 0 10px 28px rgb(0 0 0 / 0.5);
  --display: 'Big Shoulders Display', Impact, 'Arial Narrow', sans-serif;
  --body: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --radius: 8px;
  --gutter: clamp(16px, 4vw, 32px);
  /* Names the ad viewer's rules were written with. */
  --green: var(--accent);
  --green-deep: var(--accent-hi);
  --green-wash: #2b2610;
  --on-green: var(--on-accent);
  --tag: var(--accent);
  --tag-ink: var(--on-accent);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; min-height: 100dvh; display: flex; flex-direction: column; background: var(--paper); color: var(--ink); font: 400 1rem/1.5 var(--body); }
main { flex: 1; }
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; }
img { max-width: 100%; display: block; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--accent-hi); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
[hidden] { display: none !important; }
.wrap { width: 100%; max-width: 1228px; margin-inline: auto; padding-inline: var(--gutter); }
.skip { position: absolute; left: 8px; top: -60px; z-index: 50; padding: 10px 14px; background: var(--accent); color: var(--on-accent); border-radius: 6px; font-weight: 700; }
.skip:focus { top: 8px; }
.icon { flex: none; }
.muted { color: var(--ink-2); }

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

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 20px; border: 1.5px solid var(--line-2); border-radius: 6px; background: transparent; color: var(--ink); font-weight: 700; text-decoration: none; }
.btn:hover { border-color: var(--ink-2); color: var(--ink); }
.btn--primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn--primary:hover { background: var(--accent-hi); border-color: var(--accent-hi); color: var(--on-accent); }
.btn--light { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.btn--light:hover { background: #fff; border-color: #fff; color: var(--paper); }
.btn--lg { min-height: 54px; padding: 0 28px; font-size: 1.08rem; }
.chip-btn { display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 13px; border: 1.5px solid var(--line-2); border-radius: 6px; background: var(--surface); color: var(--ink); text-decoration: none; font-weight: 600; font-size: 0.9rem; white-space: nowrap; }
.chip-btn:hover { border-color: var(--accent); color: var(--ink); }

/* ---------- Header ---------- */

.top { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--paper) 92%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.top__row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 26px; padding-block: 12px; }
.wordmark { display: inline-flex; align-items: center; gap: 9px; text-decoration: none; color: var(--ink); font: 900 1.5rem/1 var(--display); letter-spacing: 0.03em; text-transform: uppercase; white-space: nowrap; }
.wordmark:hover { color: var(--ink); }
/* The first half of the name is a shelf tag with a punched hole. */
.wordmark__a { display: inline-block; padding: 5px 11px 4px 25px; background: radial-gradient(circle at 12px 50%, var(--paper) 4px, var(--accent) 4.7px); color: var(--on-accent); border-radius: 4px; transform: rotate(-2deg); }
.search { position: relative; flex: 1 1 260px; display: flex; align-items: center; margin: 0; }
.search > .icon { position: absolute; left: 13px; color: var(--ink-2); pointer-events: none; }
.search input { width: 100%; height: 44px; padding: 0 14px 0 40px; border: 1.5px solid var(--line-2); border-radius: 6px; background: var(--surface); }
.search input::placeholder { color: var(--ink-2); }
.search input:focus { outline: none; border-color: var(--accent); }
.topnav { display: flex; flex-wrap: wrap; gap: 0 24px; font-weight: 700; }
.topnav a { padding: 11px 0; color: var(--ink); text-decoration: none; border-bottom: 3px solid transparent; }
.topnav a:hover, .topnav a.is-active { border-bottom-color: var(--accent); color: var(--ink); }

.cats { border-bottom: 1px solid var(--line); }
.cats__row { display: flex; gap: 8px; padding-block: 12px; overflow-x: auto; scrollbar-width: none; }
.cats__row::-webkit-scrollbar { display: none; }
.cats a { flex: none; display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border: 1px solid var(--line-2); border-radius: 6px; color: var(--ink); text-decoration: none; font-weight: 600; font-size: 0.9rem; white-space: nowrap; }
.cats a:hover { border-color: var(--accent); }
.cats a.is-active { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }

/* ---------- Hero ---------- */

.hero { position: relative; border-bottom: 1px solid var(--line); background: radial-gradient(circle, rgb(255 214 10 / 0.16) 1.2px, transparent 1.9px) 0 0 / 14px 14px; }
.hero__in { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 28px 56px; padding-block: clamp(34px, 6vw, 64px) clamp(30px, 5vw, 52px); }
.hero__text { flex: 999 1 520px; min-width: 0; }
.hero__side { flex: 1 1 300px; display: flex; flex-direction: column; align-items: flex-start; gap: 20px; }
.eyebrow { font-size: 0.8rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-2); }
.hero h1 { margin-top: 10px; font: 900 clamp(3.6rem, 11vw, 9.2rem) / 0.84 var(--display); letter-spacing: -0.01em; text-transform: uppercase; }
.hero h1 em { font-style: normal; color: var(--accent); }
.lede { margin-top: 22px; max-width: 54ch; font-size: 1.12rem; color: #cfcbbd; }
.tagclock { display: inline-flex; align-items: baseline; gap: 12px; padding: 14px 26px 10px 52px; background: radial-gradient(circle at 26px 50%, var(--paper) 8px, var(--accent) 8.8px); color: var(--on-accent); border-radius: 8px; transform: rotate(-3deg); box-shadow: 0 8px 24px rgb(0 0 0 / 0.5); }
.tagclock b { font: 900 clamp(3rem, 7vw, 4.5rem) / 1 var(--display); font-variant-numeric: tabular-nums; text-transform: uppercase; white-space: nowrap; }
.tagclock span { font: 900 clamp(1.2rem, 2.6vw, 1.6rem) / 1 var(--display); text-transform: uppercase; letter-spacing: 0.03em; white-space: nowrap; }
.tagclock--day { background: radial-gradient(circle at 26px 50%, var(--paper) 8px, var(--red) 8.8px); color: var(--on-red); }

/* A smaller page head for the inner pages. */
.pagehead { border-bottom: 1px solid var(--line); background: radial-gradient(circle, rgb(255 214 10 / 0.1) 1.2px, transparent 1.9px) 0 0 / 14px 14px; }
.pagehead__in { display: grid; gap: 12px; padding-block: clamp(26px, 4vw, 44px); }
.pagehead h1 { font: 900 clamp(2.5rem, 6.4vw, 4.6rem) / 0.9 var(--display); text-transform: uppercase; letter-spacing: 0; }
.pagehead h1 em { font-style: normal; color: var(--accent); }
.pagehead p { max-width: 70ch; color: #cfcbbd; }
.crumbs { display: flex; flex-wrap: wrap; gap: 6px; font-size: 0.85rem; color: var(--ink-2); }
.crumbs a { color: var(--ink-2); }
.storehead { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 22px; }
.storehead__text { flex: 1 1 320px; min-width: 0; display: grid; gap: 10px; }
.storehead__actions { display: flex; flex-wrap: wrap; gap: 10px; }

/* ---------- Sections ---------- */

.sec { padding-block: clamp(30px, 4.5vw, 46px) 6px; }
.sec:last-of-type { padding-bottom: clamp(36px, 5vw, 60px); }
.sec__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 20px; margin-bottom: 20px; }
.sec__head h2, .sec > h2 { font: 900 clamp(1.9rem, 4.4vw, 2.75rem) / 1 var(--display); text-transform: uppercase; letter-spacing: 0.01em; }
.sec > h2 { margin-bottom: 20px; }
.sec__head a { font-weight: 600; }
.sec__sub { margin: -12px 0 20px; color: #cfcbbd; max-width: 70ch; }
.empty { padding: 28px; border: 1px dashed var(--line-2); border-radius: var(--radius); color: var(--ink-2); display: grid; gap: 10px; justify-items: start; }

/* ---------- Deal cards ---------- */

.deals { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 248px), 1fr)); gap: 16px; }
.deal { position: relative; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.deal:hover { border-color: var(--line-2); }
.deal__badge { position: absolute; top: 12px; left: 12px; z-index: 1; padding: 3px 9px 2px; background: var(--red); color: var(--on-red); font: 900 1.4rem/1.1 var(--display); border-radius: 4px; transform: rotate(-4deg); }
/* Every card is the same height: the picture is scaled down inside a fixed tile, the title keeps
   two lines, and the saving and date lines hold their place even when empty. */
.deal__img { position: relative; display: grid; place-items: center; aspect-ratio: 4 / 3; background: var(--logo-bg); color: #8a8a86; }
.deal__img img { position: absolute; inset: 22px; width: calc(100% - 44px); height: calc(100% - 44px); object-fit: contain; }
.deal__body { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px 16px; flex: 1; }
.deal__store { font-size: 0.75rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-2); text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
a.deal__store:hover { color: var(--accent); }
.deal__title { font-size: 0.95rem; font-weight: 600; line-height: 1.3; min-height: 2.6em; }
.deal__title a { color: var(--ink); text-decoration: none; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.deal__title a:hover { color: var(--accent); }
.deal__prices { display: flex; align-items: baseline; gap: 10px; min-height: 2.9rem; margin-top: 6px; white-space: nowrap; overflow: hidden; }
.deal__now { font: 900 2.9rem/1 var(--display); color: var(--accent); font-variant-numeric: tabular-nums; }
.deal__now--text { font-size: 1.9rem; overflow: hidden; text-overflow: ellipsis; }
.deal__was { color: var(--ink-2); font-size: 0.88rem; }
.deal__save { min-height: 1.3em; font-size: 0.85rem; line-height: 1.3; font-weight: 700; color: var(--ink); }
.deal__meta { min-height: 1.3em; font-size: 0.8rem; line-height: 1.3; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.deal__when--upcoming, .deal__when--ending { color: var(--accent); font-weight: 700; }
.deal__cta { display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; margin-top: 6px; background: var(--accent); color: var(--on-accent); border-radius: 6px; font-weight: 700; text-decoration: none; }
.deal__cta:hover { background: var(--accent-hi); color: var(--on-accent); }
.deal__cta--quiet { background: transparent; border: 1.5px solid var(--line-2); color: var(--ink); }
.deal__cta--quiet:hover { background: transparent; border-color: var(--accent); color: var(--ink); }

/* ---------- Filters and paging ---------- */

.filterbar { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px 16px; margin-bottom: 22px; }
.filterbar label { display: grid; gap: 5px; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-2); }
.filterbar select { height: 46px; min-width: 170px; padding: 0 12px; border: 1.5px solid var(--line-2); border-radius: 6px; background: var(--surface); font-size: 0.95rem; text-transform: none; letter-spacing: 0; font-weight: 500; }
.filterbar__count { margin-left: auto; align-self: center; color: var(--ink-2); }
.pager { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 12px; margin-top: 28px; color: var(--ink-2); }

/* ---------- Ad scans ---------- */

.ads { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 178px), 1fr)); gap: 18px 16px; }
.ad a { display: grid; gap: 10px; color: var(--ink); text-decoration: none; }
.ad__cover { position: relative; display: block; aspect-ratio: 3 / 4; background: var(--surface); border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.ad__cover img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.ad a:hover .ad__cover { border-color: var(--accent); }
.ad__when { position: absolute; left: 8px; bottom: 8px; padding: 3px 8px; background: var(--accent); color: var(--on-accent); border-radius: 4px; font-size: 0.75rem; font-weight: 700; }
.ad__meta { display: flex; align-items: center; gap: 10px; min-width: 0; }
.ad__text { display: grid; min-width: 0; line-height: 1.25; }
.ad__store { font-weight: 700; }
.ad__title { font-size: 0.85rem; color: var(--ink-2); }

/* ---------- Stores ---------- */

.storegrid { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 210px), 1fr)); gap: 10px; }
.storetile a { display: flex; align-items: center; gap: 12px; min-height: 68px; padding: 10px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 6px; color: var(--ink); text-decoration: none; }
.storetile a:hover { border-color: var(--accent); }
.storetile__text { display: grid; min-width: 0; line-height: 1.2; }
.storetile__name { font: 700 1.3rem/1.05 var(--display); letter-spacing: 0.02em; text-transform: uppercase; overflow-wrap: anywhere; }
.storetile__n { font-size: 0.8rem; color: var(--ink-2); }

/* ---------- One deal ---------- */

.dealpage { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1fr); gap: clamp(20px, 4vw, 48px); align-items: start; padding-block: clamp(24px, 4vw, 44px); }
.dealpage__img { position: relative; display: grid; place-items: center; aspect-ratio: 1; padding: clamp(18px, 4vw, 40px); background: var(--logo-bg); border-radius: var(--radius); color: #8a8a86; }
.dealpage__img img { position: absolute; inset: clamp(18px, 4vw, 40px); width: calc(100% - 2 * clamp(18px, 4vw, 40px)); height: calc(100% - 2 * clamp(18px, 4vw, 40px)); object-fit: contain; }
.dealpage__img .deal__badge { font-size: 2rem; top: 16px; left: 16px; }
.dealpage__info { display: grid; gap: 14px; justify-items: start; }
.dealpage__info h1 { font-size: clamp(1.5rem, 3vw, 2.1rem); font-weight: 700; line-height: 1.15; }
.dealpage__prices { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; }
.dealpage__now { font: 900 clamp(4rem, 9vw, 6rem) / 0.86 var(--display); color: var(--accent); }
.dealpage__now--text { font-size: clamp(2.6rem, 6vw, 3.6rem); }
.dealpage__was { font-size: 1.1rem; color: var(--ink-2); }
.dealpage__save { font-weight: 700; font-size: 1.05rem; }
.dealpage__note { padding: 10px 14px; border: 1px solid var(--line-2); border-radius: 6px; }
.code { display: inline-flex; align-items: center; gap: 10px; padding: 8px 12px; border: 2px dashed var(--accent); border-radius: 6px; font-weight: 700; }
.code b { font: 900 1.4rem/1 var(--display); letter-spacing: 0.06em; }
.dealpage__desc { color: #cfcbbd; white-space: pre-line; max-width: 65ch; }
.dealpage__fine { font-size: 0.85rem; color: var(--ink-2); max-width: 60ch; }
.ended { padding: 12px 16px; background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 6px; font-weight: 600; }

/* ---------- Words: about, privacy, questions ---------- */

.prose { display: grid; gap: 14px; max-width: 72ch; padding-block: clamp(26px, 4vw, 44px); }
.prose h2 { margin-top: 12px; font: 900 1.9rem/1 var(--display); text-transform: uppercase; }
.prose ul { padding-left: 20px; display: grid; gap: 6px; }
.prose p, .prose li { color: #dedacb; }
.faq dl { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 18px 36px; }
.faq dt { font-weight: 700; margin-bottom: 4px; }
.faq dd { color: #cfcbbd; }

/* ---------- Footer ---------- */

.foot { margin-top: 20px; border-top: 1px solid var(--line); background: #080807; }
.foot__grid { display: flex; flex-wrap: wrap; gap: 26px 56px; padding-block: 32px 18px; }
.foot__brand { flex: 1 1 300px; display: grid; gap: 12px; align-content: start; justify-items: start; }
.foot__brand p { max-width: 46ch; font-size: 0.9rem; color: var(--ink-2); }
.foot nav h2 { margin-bottom: 8px; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-2); }
.foot nav ul { list-style: none; display: grid; gap: 2px; }
.foot nav a { display: inline-block; padding: 5px 0; color: var(--ink); text-decoration: none; }
.foot nav a:hover { color: var(--accent); text-decoration: underline; }
.foot__legal { padding-block: 14px 26px; border-top: 1px solid var(--line); font-size: 0.82rem; color: var(--ink-2); }

.tag { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 4px; font-size: 0.75rem; font-weight: 700; background: var(--surface-2); color: var(--ink); }
.tag--upcoming, .tag--ending { background: var(--accent); color: var(--on-accent); }
.tag--expired, .tag--draft { background: var(--line-2); color: var(--ink); }
.price { display: inline-block; font: 900 1.5rem/1 var(--display); color: var(--accent); }
.price--sm { font-size: 1.25rem; }
.price--lg { font-size: 3.4rem; }
.price:empty { display: none; }

@media (max-width: 760px) {
  .dealpage { grid-template-columns: 1fr; }
  .top__row { gap: 8px 16px; }
  .wordmark { font-size: 1.3rem; }
  .topnav { width: 100%; justify-content: space-between; gap: 0 14px; order: 3; }
  .topnav a { padding: 6px 0 8px; }
  .search { order: 2; flex-basis: 100%; }
  .deal__now { font-size: 2.5rem; }
  .deal__prices { min-height: 2.5rem; }
  .filterbar select { min-width: 0; width: 100%; }
  .filterbar label { flex: 1 1 140px; }
}

/* ---------- The ad viewer (carried over from SundaySaver's flip-through viewer) ---------- */

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.icon-btn { display: inline-grid; place-items: center; width: 38px; height: 38px; border: 1.5px solid transparent; border-radius: 8px; background: none; color: inherit; text-decoration: none; }
.icon-btn:hover { border-color: var(--line); background: var(--surface); color: inherit; }
.logo { flex: none; display: grid; place-items: center; width: var(--logo, 48px); height: var(--logo, 48px); border-radius: 22%; background: var(--logo-bg); border: 1px solid var(--line); overflow: hidden; }
.logo img { width: 100%; height: 100%; object-fit: contain; }
.logo--mono { background: hsl(var(--hue) 45% 34%); border-color: transparent; color: #fff; font: 800 calc(var(--logo, 48px) * 0.38) / 1 var(--display); font-stretch: 80%; letter-spacing: 0.01em; }
.filter { position: relative; display: flex; align-items: center; flex: 0 1 260px; }
.filter .icon { position: absolute; left: 11px; color: var(--ink-2); pointer-events: none; }
.filter input { width: 100%; height: 38px; padding: 0 12px 0 34px; border: 1.5px solid var(--line); border-radius: 8px; background: var(--surface); }
.filter input:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px var(--green-wash); }
.sheet { border: 0; padding: 0; width: min(680px, calc(100vw - 24px)); max-height: min(86dvh, 760px); background: var(--surface); color: var(--ink); border-radius: 14px; box-shadow: 0 20px 60px rgb(0 0 0 / 0.35); }
.sheet::backdrop { background: rgb(10 16 12 / 0.55); }
.sheet__body { padding: 20px; display: grid; gap: 14px; }
.sheet__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.sheet__head h2 { font-stretch: 80%; font-weight: 850; font-size: 1.6rem; }
.sheet__hint { color: var(--ink-2); }
body.is-bare { height: 100dvh; overflow: hidden; }
body.is-bare .top .wrap { max-width: none; }
body.is-bare main { min-height: 0; display: flex; }
.viewer { flex: 1; min-width: 0; display: flex; flex-direction: column; min-height: 0; }
.viewer__bar { display: flex; align-items: center; gap: 10px; padding: 8px var(--gutter); border-bottom: 1px solid var(--line); background: var(--surface); }
.viewer__title { min-width: 0; flex: 1; }
.viewer__title h1 { font-stretch: 84%; font-weight: 800; font-size: 1.1rem; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.viewer__title h1 span { font-weight: 500; color: var(--ink-2); }
.viewer__title p { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: 0.85rem; color: var(--ink-2); }
.viewer__tools { display: flex; align-items: center; gap: 6px; }
.viewer__count { font-variant-numeric: tabular-nums; font-size: 0.88rem; color: var(--ink-2); padding-inline: 6px; white-space: nowrap; }
.viewer__main { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) 320px; }
.viewer__main.no-items, .viewer.items-off .viewer__main { grid-template-columns: minmax(0, 1fr); }
.viewer.items-off .items { display: none; }
.stage { display: flex; gap: 14px; padding: 16px; overflow: auto; background: var(--stage); scroll-behavior: smooth; overscroll-behavior: contain; }
.stage:focus-visible { outline-offset: -3px; }
.stage::after { content: ''; flex: none; width: 2px; }
.page { position: relative; flex: none; margin: 0; height: calc(var(--stage-h, 70dvh) * var(--zoom, 1)); aspect-ratio: var(--ar); background: #fff; box-shadow: 0 4px 22px rgb(0 0 0 / 0.45); }
.page img { width: 100%; height: 100%; user-select: none; -webkit-user-drag: none; }
.stage__empty { color: #cfd8d1; margin: auto; }
.spot { position: absolute; padding: 0; border: 2px solid transparent; border-radius: 6px; background: transparent; }
.spot:hover, .spot:focus-visible, .spot.is-on { border-color: var(--tag); background: rgb(255 214 10 / 0.22); outline: none; box-shadow: 0 0 0 2px rgb(0 0 0 / 0.35); }
.spot.is-listed { border: 3px solid var(--tag); border-radius: 46% 54% 50% 50% / 55% 48% 52% 45%; box-shadow: 0 0 0 1.5px rgb(0 0 0 / 0.3); }
.items { display: flex; flex-direction: column; min-height: 0; border-left: 1px solid var(--line); background: var(--surface); }
.items__head { padding: 12px; display: grid; gap: 8px; border-bottom: 1px solid var(--line); }
.items__head h2 { font-stretch: 84%; font-weight: 800; font-size: 1.1rem; }
.items__head .filter { flex: none; }
.items__list { list-style: none; overflow-y: auto; flex: 1; }
.items__list button { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; align-items: center; gap: 10px; width: 100%; padding: 8px 12px; border: 0; border-bottom: 1px solid var(--line); background: none; text-align: left; }
.items__list button:hover, .items__list button.is-on { background: var(--green-wash); }
.items__img { position: relative; width: 52px; height: 52px; border-radius: 6px; background: var(--logo-bg); border: 1px solid var(--line); overflow: hidden; }
.items__img img { width: 100%; height: 100%; object-fit: contain; }
.items__text { display: grid; min-width: 0; line-height: 1.25; }
.items__name { font-weight: 600; font-size: 0.92rem; }
.items__story { font-size: 0.78rem; color: var(--ink-2); }
.sheet--item { width: min(760px, calc(100vw - 24px)); }
.item { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 20px; position: relative; }
.item__close { position: absolute; right: 10px; top: 10px; }
.item__img { display: grid; place-items: center; min-height: 220px; background: var(--logo-bg); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.item__img img { max-height: 360px; object-fit: contain; }
.item__info { display: grid; gap: 10px; align-content: start; justify-items: start; padding-right: 30px; }
.item__info h2 { font-stretch: 84%; font-weight: 800; font-size: 1.5rem; line-height: 1.15; }
.item__store, .item__fine { font-size: 0.85rem; color: var(--ink-2); }
.item__story { font-weight: 700; }
.item__desc { color: var(--ink-2); }
.item__story:empty, .item__desc:empty { display: none; }
.item__actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.toast { position: fixed; left: 50%; bottom: 22px; translate: -50% 0; z-index: 60; background: var(--ink); color: var(--paper); padding: 10px 16px; border-radius: 8px; font-weight: 600; box-shadow: var(--shadow); max-width: calc(100vw - 32px); }
.toast a { color: var(--tag); margin-left: 8px; }
@media (max-width: 860px) {
  body.is-bare { height: auto; overflow: visible; }
  body.is-bare main { display: block; }
  .viewer__bar { position: sticky; top: 0; z-index: 15; flex-wrap: wrap; padding-inline: 12px; }
  .viewer__tools { width: 100%; justify-content: flex-end; }
  .viewer__main { display: block; }
  .stage { flex-direction: column; padding: 8px; gap: 8px; overflow-x: auto; }
  .page { height: auto; width: calc(100% * var(--zoom, 1)); }
  .items { border-left: 0; border-top: 1px solid var(--line); }
  .items__list { max-height: none; overflow: visible; }
  .item { grid-template-columns: 1fr; }
  .item__img { min-height: 160px; }
  .item__img img { max-height: 240px; }
}
