/* ==========================================================================
   DVD Tracker (/tools/dvds/). Its own look, separate from main.css: a
   video store, circa 2003, that still answers "do I already own this?"
   fast enough to use one-handed in an aisle.

   - Yellow walls, a blue marquee sign with chasing bulbs, blue aisle
     signs over black wire racks, orange price-tag filters, confetti
     carpet on the floor (static/tools/dvds/carpet.svg).
   - Every title is a case on the rack: its poster when there is one
     (static/tools/dvds/posters/), otherwise a drawn cover with the
     format band across the top (black DVD, blue Blu-ray, gold 4K).
   - Answers are store stickers: In stock, Wrong format, Sold out, Wanted.
   - One typeface, Archivo (variable width and weight): signs use it
     wide and black, everything you read is normal width.
   - Dark mode is the store after hours.
   - No inline styles anywhere: the site's CSP blocks them.
   ========================================================================== */

@font-face {
  font-family: "Archivo";
  src: url("/fonts/archivo-2.001.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light;
  --wall:       #ffc928;
  --wall-hi:    #ffd95e;
  --wall-ink:   #0b1a4f;
  --wall-muted: #5a4500;
  --blue:       #123fae;
  --blue-deep:  #0a2671;
  --sign-ink:   #ffd21f;
  --tag:        #ff7a1a;
  --tag-ink:    #1f0d00;
  --rack:       #141419;
  --rack-wire:  rgba(255, 255, 255, 0.045);
  --rack-dim:   rgba(6, 9, 24, 0.88);
  --rack-ink:   #f3f3f6;
  --rack-muted: #a7a7b4;
  --lip-top:    #9a9aa6;
  --lip:        #4a4a54;
  --carpet:     #0d1a4a;
  --surface:    #ffffff;
  --sunken:     #eef1f8;
  --ink:        #0b1a4f;
  --muted:      #4b5677;
  --line:       #d5dae8;
  --focus:      #0f47d6;
  --own:        #0c7a3a;
  --warn:       #b04a00;
  --none:       #c4122f;
  --hunt:       #123fae;
  --mark-bg:    #ffd21f;
  --spine-dvd:    #18181d;
  --spine-bluray: #1f6fe5;
  --spine-4k:     #c4920b;
  --scrim:      rgba(8, 12, 30, 0.55);
  --lift:       0 18px 40px rgba(5, 10, 30, 0.35);
  --font: "Archivo", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  --bar-h: 76px;          /* height of the sticky search bar; dvds.js measures it */
}

/* Dark: an explicit choice (data-theme="dark", shared with the rest of
   the site) or, with no choice stored, the system setting. */
:root[data-theme="dark"] {
  color-scheme: dark;
  --wall:       #101d52;
  --wall-hi:    #172a6e;
  --wall-ink:   #fff6d6;
  --wall-muted: #b8c3ea;
  --blue:       #1d4fd8;
  --blue-deep:  #06123a;
  --sign-ink:   #ffd21f;
  --tag:        #ff8a2e;
  --tag-ink:    #1f0d00;
  --rack:       #09090c;
  --rack-wire:  rgba(255, 255, 255, 0.035);
  --rack-dim:   rgba(3, 5, 14, 0.9);
  --rack-ink:   #ededf2;
  --rack-muted: #9b9bab;
  --lip-top:    #6e6e79;
  --lip:        #2e2e36;
  --carpet:     #070d28;
  --surface:    #141d3f;
  --sunken:     #1b2650;
  --ink:        #eef1fb;
  --muted:      #a9b2d3;
  --line:       #2b3762;
  --focus:      #ffd21f;
  --own:        #5fe39c;
  --warn:       #ffb35c;
  --none:       #ff7d8f;
  --hunt:       #8fb0ff;
  --mark-bg:    #ffd21f;
  --spine-dvd:    #0c0c10;
  --spine-bluray: #3d85ff;
  --spine-4k:     #e2b23a;
  --scrim:      rgba(0, 0, 0, 0.65);
  --lift:       0 18px 40px rgba(0, 0, 0, 0.6);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --wall:       #101d52;
    --wall-hi:    #172a6e;
    --wall-ink:   #fff6d6;
    --wall-muted: #b8c3ea;
    --blue:       #1d4fd8;
    --blue-deep:  #06123a;
    --sign-ink:   #ffd21f;
    --tag:        #ff8a2e;
    --tag-ink:    #1f0d00;
    --rack:       #09090c;
    --rack-wire:  rgba(255, 255, 255, 0.035);
    --rack-dim:   rgba(3, 5, 14, 0.9);
    --rack-ink:   #ededf2;
    --rack-muted: #9b9bab;
    --lip-top:    #6e6e79;
    --lip:        #2e2e36;
    --carpet:     #070d28;
    --surface:    #141d3f;
    --sunken:     #1b2650;
    --ink:        #eef1fb;
    --muted:      #a9b2d3;
    --line:       #2b3762;
    --focus:      #ffd21f;
    --own:        #5fe39c;
    --warn:       #ffb35c;
    --none:       #ff7d8f;
    --hunt:       #8fb0ff;
    --mark-bg:    #ffd21f;
    --spine-dvd:    #0c0c10;
    --spine-bluray: #3d85ff;
    --spine-4k:     #e2b23a;
    --scrim:      rgba(0, 0, 0, 0.65);
    --lift:       0 18px 40px rgba(0, 0, 0, 0.6);
  }
}

/* ---- base ---------------------------------------------------------------- */

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

html {
  background: var(--carpet) url("/tools/dvds/carpet.svg") 0 0 / 240px 240px;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  color: var(--wall-ink);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
}

[hidden] { display: none !important; }

button, input, select, textarea {
  font: inherit;
  color: inherit;
  letter-spacing: inherit;
}

button { cursor: pointer; }

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

a { color: var(--blue); }

code {
  font-family: var(--mono);
  font-size: 0.88em;
  padding: 0.1em 0.35em;
  border-radius: 5px;
  background: rgba(0, 0, 0, 0.25);
}

mark {
  background: var(--mark-bg);
  color: #111;
  border-radius: 2px;
  padding: 0 1px;
  margin: 0 -1px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* The sign type: wide, black, capitals. */
.marquee h1, .group h2, .tab, .verdict h2, .sheet-head h2, .list-head {
  font-weight: 900;
  font-stretch: 112%;
  text-transform: uppercase;
}

/* ---- layout ---------------------------------------------------------------
   Phone: one column, the yellow wall on top and the rack below it.
   .side uses display: contents so its children sit directly in .app;
   that keeps the search bar sticky over the whole list (a sticky
   element can't outlive its parent box).
   Desktop (min-width 960px): the wall becomes a sticky left column and
   the rack stands on the carpet beside it. */

.app {
  display: flex;
  flex-direction: column;
  max-width: 44rem;
  min-height: 100vh;
  margin: 0 auto;
  padding: 0 max(16px, env(safe-area-inset-right)) 0 max(16px, env(safe-area-inset-left));
  background: linear-gradient(180deg, var(--wall-hi), var(--wall) 260px);
}

.side { display: contents; }

/* ---- top bar: the blue trim along the top of the wall --------------------- */

.top {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 52px;
  margin: 0 -16px;
  padding: env(safe-area-inset-top) 12px 0;
  background: var(--blue);
  border-bottom: 4px solid var(--sign-ink);
  color: #fff;
}

.back {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 8px 12px 8px 4px;
  border-radius: 10px;
  color: #fff;
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
}
.back svg { width: 22px; height: 22px; }
.back:hover { background: rgba(255, 255, 255, 0.14); }

.top-end {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}

.status {
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--tag);
  color: var(--tag-ink);
  font-size: 0.8rem;
  font-weight: 800;
}

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: inherit;
}
.icon-btn svg { width: 21px; height: 21px; }
.icon-btn:hover { background: rgba(127, 127, 127, 0.18); }

.text-btn {
  height: 34px;
  padding: 0 12px;
  border: 2px solid var(--sign-ink);
  border-radius: 8px;
  background: transparent;
  color: var(--sign-ink);
  font-size: 0.85rem;
  font-weight: 800;
  text-transform: uppercase;
}

/* The theme button shows the moon in light mode, the sun in dark. */
.theme-btn .sun { display: none; }
:root[data-theme="dark"] .theme-btn .sun { display: block; }
:root[data-theme="dark"] .theme-btn .moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-btn .sun { display: block; }
  :root:not([data-theme="light"]) .theme-btn .moon { display: none; }
}

/* ---- the marquee sign ------------------------------------------------------ */

.hero { padding: 16px 0 6px; }

.marquee {
  position: relative;
  padding: 20px 18px 18px;
  border: 4px solid var(--blue-deep);
  border-radius: 16px;
  background:
    radial-gradient(120% 90% at 50% 0%, rgba(255, 255, 255, 0.16), transparent 60%),
    var(--blue);
  box-shadow: 0 6px 0 var(--blue-deep), 0 12px 26px rgba(10, 20, 60, 0.32);
  color: #fff;
  text-align: center;
  cursor: pointer;
  user-select: none;
}

/* Bulbs along the top and bottom edges; they chase. */
.marquee::before {
  content: "";
  position: absolute;
  inset: 5px 8px;
  border-radius: 10px;
  background:
    radial-gradient(circle, #fff7cf 0 2px, #ffd21f 2.5px 3.3px, transparent 3.8px) 0 0 / 15px 9px space no-repeat,
    radial-gradient(circle, #fff7cf 0 2px, #ffd21f 2.5px 3.3px, transparent 3.8px) 0 100% / 15px 9px space no-repeat;
  pointer-events: none;
}

.store-name {
  margin: 2px 0 6px;
  color: #cfdcff;
  font-size: 0.74rem;
  font-weight: 800;
  font-stretch: 125%;
  letter-spacing: 0.42em;
  text-transform: uppercase;
}

.marquee h1 {
  margin: 0;
  color: var(--sign-ink);
  font-size: clamp(1.9rem, 9.4vw, 2.9rem);
  line-height: 0.95;
  letter-spacing: 0.01em;
  text-shadow: 0 3px 0 var(--blue-deep), 0 0 22px rgba(255, 210, 31, 0.35);
}

.store-tag {
  display: inline-block;
  margin: 10px 0 0;
  padding: 3px 10px;
  border-radius: 4px;
  background: var(--sign-ink);
  color: var(--blue-deep);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  transform: rotate(-2deg);
}

/* How many of each format: little round stickers under the sign. */
.totals {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 10px;
  margin: 16px 0 0;
  font-size: 0.95rem;
}
.total {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 13px 4px 8px;
  border: 3px solid var(--blue);
  border-radius: 999px;
  background: #fff;
  color: var(--blue-deep);
  font-weight: 800;
  box-shadow: 0 3px 0 var(--blue-deep);
}
.total::before {
  content: "";
  flex: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: radial-gradient(circle, #fff 0 2px, var(--spine-dvd) 2.5px);
}
.total-bluray::before { background: radial-gradient(circle, #fff 0 2px, var(--spine-bluray) 2.5px); }
.total-4k::before { background: radial-gradient(circle, #fff 0 2px, var(--spine-4k) 2.5px); }
.total b {
  font-size: 1.25rem;
  font-weight: 900;
  font-stretch: 112%;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

/* ---- tabs: Collection / Hunt list ---------------------------------------- */

.tabs {
  display: flex;
  gap: 8px;
  margin: 18px 0 4px;
}
/* Label over its count, so three fit on a phone. */
.tab {
  flex: 1;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-width: 0;
  height: 64px;
  padding: 0 12px;
  border: 3px solid var(--blue);
  border-radius: 10px;
  background: #fff;
  color: var(--blue);
  font-size: 0.8rem;
  font-stretch: 100%;               /* narrower than the other signs, so labels get room */
  letter-spacing: 0.02em;
  white-space: nowrap;
  box-shadow: 0 4px 0 var(--blue-deep);
}
.tab[aria-selected="true"] {
  background: var(--blue);
  color: var(--sign-ink);
}
.tab:active { transform: translateY(2px); box-shadow: 0 2px 0 var(--blue-deep); }
.tab .n {
  min-width: 1.6em;
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--tag);
  color: var(--tag-ink);
  font-size: 0.75rem;
  font-stretch: 100%;
  font-variant-numeric: tabular-nums;
}

/* ---- search: the kiosk ----------------------------------------------------- */

.searchbar {
  position: sticky;
  top: 0;
  z-index: 20;
  margin: 0 -16px;
  padding: 12px 16px 12px;
  background: var(--wall);
  transition: box-shadow 0.15s ease;
}
.searchbar.is-stuck { box-shadow: 0 4px 0 rgba(0, 0, 0, 0.14); }

.search { position: relative; margin: 0; }

.search input {
  display: block;
  width: 100%;
  height: 58px;
  margin: 0;
  padding: 0 54px 0 50px;
  border: 3px solid var(--blue);
  border-radius: 12px;
  background: var(--surface);
  color: var(--ink);
  font-size: 1.1875rem;      /* 19px: big to read, and over 16px so iOS doesn't zoom */
  font-weight: 600;
  box-shadow: 0 4px 0 var(--blue-deep);
  -webkit-appearance: none;
  appearance: none;
}
.search input::placeholder { color: var(--muted); opacity: 1; font-weight: 500; }
.search input:focus {
  outline: none;
  box-shadow: 0 4px 0 var(--blue-deep), 0 0 0 5px rgba(255, 255, 255, 0.55);
}
.search input::-webkit-search-cancel-button,
.search input::-webkit-search-decoration { -webkit-appearance: none; display: none; }

.search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  width: 22px;
  height: 22px;
  margin-top: -11px;
  color: var(--blue);
  pointer-events: none;
}

.clear {
  position: absolute;
  top: 7px;
  right: 7px;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
}
.clear svg { width: 20px; height: 20px; }
.clear:hover { background: var(--sunken); color: var(--ink); }

/* ---- the answer: a store sticker --------------------------------------------
   Four moods. The stamp in the corner says it the way a store would. */

.verdict {
  --hole: var(--surface);
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  column-gap: 16px;
  align-items: center;
  margin: 6px 0 16px;
  padding: 18px 18px 16px;
  border: 4px solid currentColor;
  border-radius: 14px;
  background: var(--surface);
  color: var(--own);
  box-shadow: 0 5px 0 currentColor;
}
.verdict.is-warn { color: var(--warn); }
.verdict.is-none { color: var(--none); }
.verdict.is-hunt, .verdict.is-pick { color: var(--hunt); }

.verdict::after {
  content: "In stock";
  position: absolute;
  top: -13px;
  right: 14px;
  padding: 2px 9px;
  border: 2px solid currentColor;
  border-radius: 5px;
  background: var(--surface);
  font-size: 0.7rem;
  font-weight: 900;
  font-stretch: 112%;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  transform: rotate(4deg);
}
.verdict.is-warn::after { content: "Check this"; }
.verdict.is-none::after { content: "Not on the shelf"; }
.verdict.is-hunt::after { content: "Wanted"; background: var(--tag); color: var(--tag-ink); border-color: var(--tag-ink); }
.verdict.is-pick::after { content: "\2605  Staff pick"; background: #d71920; color: #fff; border-color: #7a0a0e; }

.verdict-mark {
  position: relative;
  width: 60px;
  height: 60px;
}

.disc {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background:
    radial-gradient(circle, var(--hole) 0 15%, rgba(255, 255, 255, 0.92) 15.6% 23%, transparent 23.6%),
    conic-gradient(from 205deg, #cfd8ff, #f7c6e8, #ffe1b3, #cdf4db, #b9e2ff, #d9ccff, #cfd8ff);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.12), 0 2px 6px rgba(0, 0, 0, 0.15);
}
.is-warn .disc { filter: saturate(0.25); }
.is-none .disc, .is-hunt .disc, .is-pick .disc {
  background: none;
  box-shadow: none;
  border: 3px dashed currentColor;
  opacity: 0.6;
}

.verdict-badge {
  position: absolute;
  right: -5px;
  bottom: -5px;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 3px var(--hole);
}
.verdict-badge svg { width: 16px; height: 16px; color: var(--hole); }

.verdict-text { min-width: 0; }

.verdict h2 {
  margin: 0;
  font-size: 1.55rem;
  line-height: 1.02;
  overflow-wrap: anywhere;
}

.verdict p {
  margin: 5px 0 0;
  color: var(--ink);
  font-size: 0.98rem;
}

/* The disc spins in, once, when the answer flips to yes. */
@media (prefers-reduced-motion: no-preference) {
  .verdict.is-own.is-new .disc { animation: disc-in 0.7s cubic-bezier(0.2, 0.75, 0.2, 1); }
  .verdict.is-new { animation: sticker-on 0.32s cubic-bezier(0.3, 1.4, 0.5, 1); }
}
@keyframes disc-in {
  from { transform: rotate(-170deg) scale(0.82); }
  to   { transform: none; }
}
@keyframes sticker-on {
  from { transform: scale(0.94) rotate(-1deg); }
}

/* ---- browse controls: price-tag filters ------------------------------------ */

.controls { margin: 2px 0 12px; }

.chips {
  display: flex;
  gap: 8px;
  margin: 0 -16px;
  padding: 2px 16px 6px;
  overflow-x: auto;
  scrollbar-width: none;
}
.chips::-webkit-scrollbar { display: none; }

.chip-gap {
  flex: none;
  width: 2px;
  margin: 6px 2px;
  border-radius: 2px;
  background: rgba(0, 0, 0, 0.18);
}

/* A tag: pointed left end with a punched hole. */
.chip {
  position: relative;
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 38px;
  padding: 0 14px 0 24px;
  border: 0;
  background: #fff;
  color: var(--blue-deep);
  font-size: 0.92rem;
  font-weight: 800;
  clip-path: polygon(12px 0, 100% 0, 100% 100%, 12px 100%, 0 50%);
  border-radius: 0 6px 6px 0;
}
.chip::before {
  content: "";
  position: absolute;
  left: 11px;
  top: 50%;
  width: 7px;
  height: 7px;
  margin-top: -3.5px;
  border-radius: 50%;
  background: var(--wall);
  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.35);
}
.chip .n {
  color: var(--muted);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.chip[aria-pressed="true"] {
  background: var(--tag);
  color: var(--tag-ink);
}
.chip[aria-pressed="true"] .n { color: inherit; opacity: 0.75; }

.list-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 10px 0 0;
  color: var(--wall-muted);
  font-size: 0.92rem;
  font-weight: 700;
}

.sort {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
}
.select { position: relative; display: inline-block; }
.select select {
  height: 36px;
  padding: 0 32px 0 12px;
  border: 2px solid var(--blue);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  font-size: 0.95rem;
  font-weight: 700;
  -webkit-appearance: none;
  appearance: none;
}
.select svg {
  position: absolute;
  right: 10px;
  top: 50%;
  width: 14px;
  height: 14px;
  margin-top: -7px;
  color: var(--blue);
  pointer-events: none;
}

/* ---- the rack ---------------------------------------------------------------
   Black wire shelving. Each grid row of cases sits on a metal lip
   (every li draws its own stretch; with no column gap they join up). */

.main {
  --rack-pad: 12px;
  min-height: 50vh;
  margin: 0 -16px;
  padding: 2px var(--rack-pad) calc(40px + env(safe-area-inset-bottom));
  /* The store carpet, dimmed well down so the cases stand out. */
  background:
    linear-gradient(var(--rack-dim), var(--rack-dim)),
    var(--rack) url("/tools/dvds/carpet.svg") 0 0 / 240px 240px;
  color: var(--rack-ink);
  box-shadow: inset 0 10px 14px -10px rgba(0, 0, 0, 0.8);
}

/* Aisle signs: blue with yellow letters, stuck under the search bar. */
.group h2 {
  position: sticky;
  top: var(--bar-h);
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 18px calc(-1 * var(--rack-pad)) 0;
  padding: 10px 16px 9px;
  border-top: 3px solid var(--sign-ink);
  border-bottom: 3px solid var(--sign-ink);
  background: var(--blue);
  color: var(--sign-ink);
  font-size: 1.2rem;
  letter-spacing: 0.03em;
  line-height: 1;
  box-shadow: 0 4px 0 rgba(0, 0, 0, 0.45);
}
.group:first-child h2 { margin-top: 12px; }
.hunt-set h2 { font-size: 1rem; line-height: 1.1; }

.list-head {
  margin: 20px 0 0;
  color: var(--sign-ink);
  font-size: 1rem;
  letter-spacing: 0.04em;
}

.shelf {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
  margin: 0;
  padding: 0;
}
.shelf li {
  position: relative;
  padding: 16px 6px 22px;
}
.shelf li::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 8px;
  height: 7px;
  border-top: 2px solid var(--lip-top);
  background: linear-gradient(var(--lip), #15151a);
  pointer-events: none;
}

/* A case: cover on top, title and details under it. */
.row {
  display: flex;
  flex-direction: column;
  gap: 7px;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
}

.cover {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: 4px 4px 3px 3px;
  background: linear-gradient(160deg, #3a3f4c, #121419);
  box-shadow: 0 8px 14px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.06);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
/* The shine on the plastic sleeve. */
.cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, rgba(255, 255, 255, 0.3) 0 14%, rgba(255, 255, 255, 0.05) 24%, transparent 40% 72%, rgba(255, 255, 255, 0.1));
  pointer-events: none;
}
.row:hover .cover, .row:focus-visible .cover {
  transform: translateY(-5px) rotate(-1.2deg);
  box-shadow: 0 14px 20px rgba(0, 0, 0, 0.6), 0 0 0 2px var(--sign-ink);
}
.row:active .cover { transform: translateY(-2px); }

.poster {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Drawn covers: ten case colors, chosen by title. */
.c0 { background: radial-gradient(90% 60% at 80% 85%, rgba(255, 196, 0, 0.35), transparent 60%), linear-gradient(160deg, #d32f2f, #4a0b0b); }
.c1 { background: radial-gradient(90% 60% at 20% 85%, rgba(120, 220, 255, 0.35), transparent 60%), linear-gradient(160deg, #1e88e5, #0a2459); }
.c2 { background: radial-gradient(90% 60% at 80% 80%, rgba(200, 255, 120, 0.3), transparent 60%), linear-gradient(160deg, #2e7d32, #0a2b0f); }
.c3 { background: radial-gradient(90% 60% at 30% 80%, rgba(255, 120, 60, 0.4), transparent 60%), linear-gradient(160deg, #f9a825, #6b3500); }
.c4 { background: radial-gradient(90% 60% at 75% 85%, rgba(255, 110, 220, 0.35), transparent 60%), linear-gradient(160deg, #7b1fa2, #20052c); }
.c5 { background: radial-gradient(90% 60% at 25% 85%, rgba(120, 255, 230, 0.3), transparent 60%), linear-gradient(160deg, #00897b, #002a25); }
.c6 { background: radial-gradient(90% 60% at 70% 85%, rgba(255, 230, 100, 0.35), transparent 60%), linear-gradient(160deg, #ef6c00, #4a1c00); }
.c7 { background: radial-gradient(90% 60% at 30% 85%, rgba(160, 200, 255, 0.3), transparent 60%), linear-gradient(160deg, #455a64, #0b1216); }
.c8 { background: radial-gradient(90% 60% at 75% 85%, rgba(255, 150, 190, 0.35), transparent 60%), linear-gradient(160deg, #c2185b, #3a0419); }
.c9 { background: radial-gradient(90% 60% at 25% 85%, rgba(150, 170, 255, 0.35), transparent 60%), linear-gradient(160deg, #3949ab, #0d123d); }

/* The format strip across the top of the case. */
.cover-band {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  padding: 2px 0 1px;
  background: var(--spine-dvd);
  color: #fff;
  font-size: 0.6rem;
  font-weight: 900;
  font-stretch: 125%;
  letter-spacing: 0.16em;
  text-align: center;
  text-transform: uppercase;
}
.band-bluray .cover-band { background: var(--spine-bluray); }
.band-4k .cover-band { background: var(--spine-4k); color: #1d1500; }

.cover-title {
  position: absolute;
  left: 8px;
  right: 8px;
  top: 24%;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 5;
  overflow: hidden;
  color: #fff;
  font-size: 0.84rem;
  font-weight: 900;
  font-stretch: 78%;
  line-height: 1.04;
  text-transform: uppercase;
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.35);
  overflow-wrap: break-word;
  -webkit-hyphens: auto;
  hyphens: auto;
}

/* An empty slot on the rack: a film you still need. */
.cover-wanted {
  background:
    repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.05) 0 8px, transparent 8px 16px),
    #1e1e25;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.28);
  outline: 2px dashed rgba(255, 255, 255, 0.4);
  outline-offset: -6px;
}
.cover-wanted .cover-band { background: var(--tag); color: var(--tag-ink); }
.cover-wanted .cover-title { color: #d8d8e2; text-shadow: none; }
.cover-wanted.has-poster .poster { filter: grayscale(1) brightness(0.45); }
/* In the details sheet the cover is shown in full colour. */
.sheet-case .cover-wanted.has-poster .poster { filter: none; }

.row-main { display: block; min-width: 0; }

.row-title {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  font-size: 0.84rem;
  font-weight: 750;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.row-sub {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px 7px;
  margin-top: 3px;
  color: var(--rack-muted);
  font-size: 0.72rem;
}

/* Where it lives: a drive label (the disc is boxed) or the shelf. */
.loc {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-weight: 700;
}
.loc svg { flex: none; width: 13px; height: 13px; }

.verdict-loc { color: inherit; }
.verdict .verdict-loc { margin-top: 7px; color: var(--ink); }
.verdict-loc .loc { font-size: 0.95rem; }
.verdict-loc .loc svg { width: 15px; height: 15px; }
.verdict-loc .loc + .loc { margin-left: 14px; }
.facts .loc svg { width: 16px; height: 16px; }

.row-end {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-top: auto;
}

.row-year {
  color: var(--rack-muted);
  font-size: 0.72rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.fmts { display: flex; gap: 3px; }

.fmt {
  display: inline-block;
  padding: 1px 5px;
  border-radius: 3px;
  background: var(--spine-dvd);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
  color: #fff;
  font-size: 0.62rem;
  font-weight: 900;
  line-height: 1.35;
  letter-spacing: 0.04em;
  white-space: nowrap;
}
.fmt-bluray { background: var(--spine-bluray); box-shadow: none; }
.fmt-4k { background: var(--spine-4k); color: #1d1500; box-shadow: none; }

.is-missing { color: var(--rack-muted); }

/* Staff picks: a red "Staff pick" band, and the card links to IMDb. */
.cover-pick .cover-band { background: #d71920; }
a.row { text-decoration: none; }
.need.pick { color: #ff6b6b; }
.need.have { color: #4fd88f; }
.pick-why {
  margin: 10px 2px 0;
  color: var(--rack-muted);
  font-size: 0.85rem;
  font-style: italic;
}
.need {
  color: var(--tag);
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.empty {
  margin: 32px 0;
  color: var(--rack-muted);
  text-align: center;
}
.empty p { margin: 0 0 12px; }

.noscript {
  margin: 24px 0;
  padding: 16px;
  border-radius: 12px;
  background: var(--tag);
  color: var(--tag-ink);
  font-weight: 700;
}

/* ---- the Hunt list ----------------------------------------------------------- */

.hunt-intro {
  margin: 14px 2px 0;
  color: var(--rack-muted);
  font-size: 0.92rem;
}

.set-count {
  margin-left: auto;
  padding: 3px 9px 3px 14px;
  background: var(--tag);
  color: var(--tag-ink);
  font-size: 0.78rem;
  font-stretch: 100%;
  letter-spacing: 0.02em;
  white-space: nowrap;
  clip-path: polygon(8px 0, 100% 0, 100% 100%, 8px 100%, 0 50%);
}

.hunt-find { margin: 12px 0 2px; }
.hunt-find input { height: 50px; font-size: 1rem; }
.hunt-set[hidden], .done-set[hidden], .hunt-done[hidden] { display: none; }
.done-set {
  display: inline-block;
  margin: 0 8px 8px 0;
  padding: 2px 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  line-height: 1.6;
}

.hunt-done p {
  margin: 0;
  padding: 14px 4px 4px;
  color: var(--rack-ink);
  font-weight: 650;
  line-height: 1.7;
}

/* ---- buttons ------------------------------------------------------------- */

.btn-quiet {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 16px;
  border: 3px solid var(--blue);
  border-radius: 10px;
  background: var(--surface);
  color: var(--blue);
  font-size: 0.92rem;
  font-weight: 900;
  text-decoration: none;
  text-transform: uppercase;
  white-space: nowrap;
  box-shadow: 0 3px 0 var(--blue-deep);
}
.btn-quiet:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--blue-deep); }
:root[data-theme="dark"] .btn-quiet { color: var(--sign-ink); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .btn-quiet { color: var(--sign-ink); }
}
.empty .btn-quiet { color: var(--blue); background: #fff; }

/* ---- sheets (native <dialog>) ------------------------------------------- */

.sheet {
  width: 100%;
  max-width: 34rem;
  max-height: 90vh;
  max-height: 90dvh;
  margin: auto auto 0;
  padding: 0;
  border: 0;
  border-top: 6px solid var(--sign-ink);
  border-radius: 22px 22px 0 0;
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--lift);
  overflow-y: auto;
  overscroll-behavior: contain;
}
.sheet::backdrop { background: var(--scrim); }

.sheet-body {
  padding: 20px 20px calc(22px + env(safe-area-inset-bottom));
}

.sheet-case {
  width: 116px;
  margin: 0 auto 14px;
}

.sheet-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.sheet-head h2 {
  margin: 4px 0 0;
  font-size: 1.5rem;
  line-height: 1.05;
  overflow-wrap: anywhere;
}
.sheet-head .icon-btn { margin: -4px -8px 0 0; flex: none; color: var(--muted); }

.sheet p { margin: 12px 0 0; }

.facts {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px 18px;
  margin: 18px 0 0;
}
.facts dt { color: var(--muted); font-weight: 600; }
.facts dd { margin: 0; font-weight: 750; overflow-wrap: anywhere; }

.detail-fmts { display: flex; gap: 6px; margin: 12px 0 0; }
.copies { margin: 0; padding: 0; list-style: none; }
.copies li + li { margin-top: 6px; }
.copies .loc { margin-left: 4px; }
.sheet-status {
  display: inline-block;
  margin: 12px 0 0;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--tag);
  color: var(--tag-ink);
  font-size: 0.78rem;
  font-weight: 800;
}
.detail-fmts .fmt { font-size: 0.8rem; padding: 3px 9px; }

.sheet-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

@media (prefers-reduced-motion: no-preference) {
  .sheet[open] { animation: sheet-in 0.26s cubic-bezier(0.2, 0.8, 0.2, 1); }
  .sheet[open]::backdrop { animation: fade-in 0.2s ease; }
}
@keyframes sheet-in { from { transform: translateY(36px); opacity: 0; } }
@keyframes fade-in { from { opacity: 0; } }

/* ---- toast --------------------------------------------------------------- */

.toast {
  position: fixed;
  z-index: 60;
  left: 50%;
  bottom: calc(24px + env(safe-area-inset-bottom));
  display: flex;
  align-items: center;
  gap: 14px;
  width: max-content;
  max-width: calc(100% - 32px);
  padding: 12px 16px;
  border: 3px solid var(--sign-ink);
  border-radius: 12px;
  background: var(--blue);
  color: #fff;
  font-weight: 700;
  box-shadow: var(--lift);
  transform: translateX(-50%);
}
.toast button {
  flex: none;
  padding: 4px 6px;
  border: 0;
  background: none;
  color: var(--sign-ink);
  font-weight: 900;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ---- popcorn ------------------------------------------------------------- */

.popcorn {
  position: fixed;
  inset: 0;
  z-index: 100;
  overflow: hidden;
  pointer-events: none;
}
.kernel {
  position: absolute;
  left: 0;
  top: 0;
  width: 26px;
  height: 26px;
  will-change: transform;
}
.kernel svg, .pop-bucket svg { display: block; width: 100%; height: 100%; }
.kernel svg { filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.28)); }
.k-puff { fill: #fff8e4; stroke: #ead7a4; stroke-width: 1; }
.k-butter { fill: #ffd04d; opacity: 0.85; }
.k-shine { fill: #fff; }

.pop-bucket {
  position: absolute;
  left: 50%;
  bottom: -8px;
  width: 128px;
  height: 139px;
  transform: translate(-50%, 110%);
  filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.4));
}
.b-pop { fill: #fff8e4; stroke: #e6cf96; stroke-width: 1.5; }
.b-red { fill: #d71920; }
.b-white { fill: #fff; }
.b-label { fill: #ffd21f; stroke: #b0120f; stroke-width: 2; }
.b-text {
  fill: #b0120f;
  font-family: var(--font);
  font-size: 11px;
  font-weight: 900;
  font-stretch: 100%;
  letter-spacing: 0.5px;
}

/* ---- wide screens --------------------------------------------------------- */

@media (min-width: 560px) {
  .shelf { grid-template-columns: repeat(auto-fill, minmax(122px, 1fr)); }
  .main { --rack-pad: 16px; }
}

@media (min-width: 640px) {
  .sheet { margin: auto; border-radius: 22px; border: 6px solid var(--sign-ink); }
  .sheet-body { padding: 24px 28px 28px; }
}

@media (min-width: 960px) {
  .app {
    display: grid;
    grid-template-columns: 26rem minmax(0, 1fr);
    column-gap: 28px;
    align-items: start;
    max-width: 82rem;
    padding: 0 32px 0;
    background: none;
  }
  .side {
    position: sticky;
    top: 0;
    display: flex;
    flex-direction: column;
    max-height: 100vh;
    overflow-y: auto;
    padding: 0 22px 24px;
    border-radius: 0 0 18px 18px;
    background: linear-gradient(180deg, var(--wall-hi), var(--wall) 300px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
    scrollbar-width: thin;
  }
  .top { margin: 0 -22px; padding: 0 14px; }
  .searchbar {
    position: static;
    margin: 0;
    padding: 10px 0 14px;
    background: transparent;
  }
  .searchbar.is-stuck { box-shadow: none; }
  .chips {
    flex-wrap: wrap;
    margin: 0;
    padding: 2px 0 4px;
    overflow: visible;
  }
  .chip-gap { display: none; }
  .main {
    --rack-pad: 20px;
    margin: 28px 0 40px;
    padding: 2px var(--rack-pad) 36px;
    border: 8px solid #2c2c33;
    border-radius: 14px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.55), inset 0 10px 14px -10px rgba(0, 0, 0, 0.8);
  }
  .group h2 { top: 0; }
  .shelf { grid-template-columns: repeat(auto-fill, minmax(138px, 1fr)); }
  .row-title { font-size: 0.9rem; }
}

/* Aisles off-screen aren't drawn until they scroll near: the whole
   collection renders fast even on an old phone. */
.group {
  margin: 0 calc(-1 * var(--rack-pad));
  padding: 0 var(--rack-pad);       /* the full-width sign stays inside its section's box */
  content-visibility: auto;
  contain-intrinsic-size: auto 640px;
}

@media (max-width: 379px) {
  .tab { padding: 0 8px; font-size: 0.72rem; letter-spacing: 0; }
}

/* ==== store polish ======================================================== */

/* Marquee bulbs chase: odd bulbs and even bulbs take turns. */
.marquee::before, .marquee::after {
  content: "";
  position: absolute;
  inset: 5px 14px;
  border-radius: 10px;
  pointer-events: none;
  --bulb: radial-gradient(circle at var(--at) 50%, #fff7cf 0 2px, #ffd21f 2.5px 3.3px, transparent 3.8px);
  --at: 25%;
  /* "round" fits a whole number of 30px tiles; each tile holds two bulb slots. */
  background: var(--bulb) 0 0 / 30px 9px round no-repeat, var(--bulb) 0 100% / 30px 9px round no-repeat;
  filter: drop-shadow(0 0 3px rgba(255, 210, 31, 0.9));
}
.marquee::after { --at: 75%; }
@media (prefers-reduced-motion: no-preference) {
  .marquee::before { animation: bulb 0.9s steps(1) infinite; }
  .marquee::after { animation: bulb 0.9s steps(1) -0.45s infinite; }
}
@keyframes bulb { 50% { opacity: 0.35; filter: none; } }

/* The answer card clears the search bar, so its stamp isn't cut off. */
.verdict { margin-top: 18px; }

/* Aisle signs show how many cases are in the aisle. */
.group h2[data-count]::after {
  content: attr(data-count);
  margin-left: auto;
  padding: 3px 9px 3px 14px;
  background: var(--tag);
  color: var(--tag-ink);
  font-size: 0.78rem;
  font-stretch: 100%;
  letter-spacing: 0.02em;
  clip-path: polygon(8px 0, 100% 0, 100% 100%, 8px 100%, 0 50%);
}

/* New arrivals: a red sticker on the corner of the case. */
.shelf li.is-new::before {
  content: "New";
  position: absolute;
  top: 6px;
  right: -2px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: #d71920;
  color: #ffe45c;
  font-size: 0.62rem;
  font-weight: 900;
  font-stretch: 112%;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transform: rotate(12deg);
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.5);
  pointer-events: none;
}
.new-pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  background: #d71920;
  color: #ffe45c;
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* "Pick tonight's movie" */
.pick-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 48px;
  margin: 12px 0 0;
  padding: 0 16px;
  border: 3px solid var(--blue-deep);
  border-radius: 12px;
  background: var(--tag);
  color: var(--tag-ink);
  font: inherit;
  font-size: 0.95rem;
  font-weight: 900;
  font-stretch: 112%;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  box-shadow: 0 4px 0 var(--blue-deep);
  cursor: pointer;
}
.pick-btn svg { width: 22px; height: 22px; flex: none; }
.pick-btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--blue-deep); }
@media (prefers-reduced-motion: no-preference) {
  .pick-btn:hover svg { animation: roll 0.5s ease; }
}
@keyframes roll { 50% { transform: rotate(180deg) scale(1.15); } to { transform: rotate(360deg); } }

/* The details sheet: the case sits under the marquee lights. */
.sheet-body { --sheet-pad: 20px; }
.sheet-case {
  position: relative;
  width: auto;
  margin: -20px calc(-1 * var(--sheet-pad)) 16px;
  padding: 26px 0 0;
  background:
    radial-gradient(60% 120px at 50% 0, rgba(255, 255, 255, 0.22), transparent 70%),
    linear-gradient(var(--blue) 0 118px, transparent 118px);
}
.sheet-case::before {
  content: "";
  position: absolute;
  inset: 8px 16px auto;
  height: 9px;
  background: radial-gradient(circle, #fff7cf 0 2px, #ffd21f 2.5px 3.3px, transparent 3.8px) 0 0 / 15px 9px space no-repeat;
}
.sheet-case::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 118px;
  height: 4px;
  background: var(--sign-ink);
}
.sheet-case .cover {
  z-index: 1;
  width: 128px;
  margin: 0 auto;
  transform: rotate(-2deg);
  box-shadow: 0 12px 22px rgba(0, 0, 0, 0.45), 0 0 0 3px #fff;
}
.feature-tag {
  position: relative;
  z-index: 2;
  width: max-content;
  margin: 0 auto -8px !important;
  padding: 3px 12px;
  border-radius: 4px;
  background: var(--sign-ink);
  color: #0a2671;
  font-size: 0.72rem;
  font-weight: 900;
  font-stretch: 112%;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  transform: rotate(-3deg);
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.35);
}
/* Facts read like a rental slip. */
.facts { gap: 0 18px; }
.facts dt, .facts dd { padding: 8px 0; border-bottom: 2px dashed color-mix(in srgb, var(--muted) 35%, transparent); }
.facts dt:last-of-type, .facts dd:last-of-type { border-bottom: 0; }
.sheet-actions .btn-quiet svg { width: 20px; height: 20px; }
.btn-loud { background: var(--tag); border-color: var(--blue-deep); color: var(--tag-ink) !important; }
.sheet-fine {
  margin: 18px 0 0 !important;
  padding-top: 12px;
  border-top: 3px double color-mix(in srgb, var(--muted) 45%, transparent);
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-align: center;
  text-transform: uppercase;
}

/* The way out: the neon sign by the door. */
.exit {
  margin: 34px 0 6px;
  text-align: center;
  color: var(--rack-ink);
}
.exit p { margin: 0; }
.exit-open {
  display: inline-block;
  padding: 8px 18px 7px;
  border: 3px solid #ff4d6d;
  border-radius: 14px;
  color: #7ee8ff;
  font-size: 1.05rem;
  font-weight: 900;
  font-stretch: 112%;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-shadow: 0 0 6px #37d5ff, 0 0 16px #1aa7ff;
  box-shadow: 0 0 8px #ff4d6d, 0 0 22px rgba(255, 77, 109, 0.6), inset 0 0 8px rgba(255, 77, 109, 0.7);
  background: rgba(10, 6, 20, 0.6);
}
.exit-open span { color: #ffb3c1; text-shadow: 0 0 6px #ff4d6d, 0 0 18px #ff1f4b; }
@media (prefers-reduced-motion: no-preference) {
  .exit-open span { animation: neon 5s linear infinite; }
}
@keyframes neon { 0%, 91%, 94%, 97%, 100% { opacity: 1; } 92%, 96% { opacity: 0.35; } }
.exit-thanks {
  margin-top: 16px !important;
  color: var(--sign-ink);
  font-size: 1.15rem;
  font-weight: 900;
  font-stretch: 112%;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.exit-fine {
  margin-top: 6px !important;
  opacity: 0.7;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

@media (min-width: 640px) {
  .sheet-body { --sheet-pad: 28px; }
  .sheet-case { margin-top: -24px; }
}
@media (min-width: 960px) {
  .row:hover .cover, .row:focus-visible .cover { transform: translateY(-7px) rotate(-1.6deg) scale(1.03); }
}

/* Cory's and Shana's stars */
.ratings {
  margin: 18px 0 0;
  padding: 12px 14px 10px;
  border: 3px solid var(--blue-deep);
  border-radius: 14px;
  background: color-mix(in srgb, var(--sign-ink) 14%, transparent);
}
.ratings h3 {
  margin: 0 0 4px;
  font-size: 0.78rem;
  font-weight: 900;
  font-stretch: 112%;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.rate-row { display: flex; align-items: center; gap: 8px; min-height: 44px; }
.rate-name { flex: 0 0 3.6rem; font-weight: 800; }
.stars { display: inline-flex; }
.star {
  width: 38px;
  height: 44px;
  padding: 0;
  border: 0;
  background: none;
  color: color-mix(in srgb, var(--muted) 38%, transparent);
  font-size: 1.75rem;
  line-height: 1;
  cursor: pointer;
}
.star.is-on { color: #f59e0b; text-shadow: 0 1px 0 rgba(0, 0, 0, 0.25); }
.star:focus-visible { outline: 3px solid var(--blue); outline-offset: -3px; border-radius: 8px; }
@media (hover: hover) { .star:hover { transform: scale(1.18); } }
.rate-num { margin-left: auto; color: var(--muted); font-size: 0.82rem; font-weight: 800; white-space: nowrap; }
.rate-lock { margin: 8px 0 2px; }
.rate-lock label { display: block; margin-bottom: 6px; font-size: 0.85rem; font-weight: 800; }
.rate-lock-row { display: flex; gap: 8px; }
.rate-lock input {
  flex: 1;
  min-width: 0;
  height: 46px;
  padding: 0 12px;
  border: 3px solid var(--blue-deep);
  border-radius: 10px;
  background: var(--panel, #fff);
  color: inherit;
  font: inherit;
  font-size: 1rem;
}
.rate-msg { min-height: 1.2em; margin: 4px 0 0 !important; color: var(--muted); font-size: 0.82rem; font-weight: 700; }
.row-stars { margin-right: auto; padding-left: 8px; color: #ffcf33; font-size: 0.8rem; font-weight: 900; white-space: nowrap; }
