/* ==========================================================================
   styles-polish.css — the design layer.

   Loaded last, on top of styles.css and styles-pages.css. It changes how the
   site LOOKS and nothing about how it works: no markup depends on it, no
   script reads it, and deleting the one <link> in index.html puts the old
   appearance back exactly.

   Why a layer rather than edits in place: styles-pages.css is 2,800 lines
   grown a panel at a time, and a pass through it would touch everything at
   once. This file states the refinements as a small set of rules, so the
   design decisions are all in one readable place and are trivial to revert.

   WHAT IT DOES
     · keeps the existing identity — matte, desaturated, flesh-tone accent,
       film grain — and gives it depth, rhythm and consistency
     · a spacing and elevation scale, so panels and rows stop each inventing
       their own padding
     · fixes the layout bug that squeezed the mint radar into 400px: a hidden
       detail panel no longer reserves its column
     · makes the footer legible where it crosses the graveyard artwork
     · themes the scrollbars, focus rings and selection, which were browser
       default and bright white against a near-black page
   ========================================================================== */

:root{
  /* spacing — one scale, used everywhere below */
  --s1: 4px;  --s2: 8px;  --s3: 12px; --s4: 16px; --s5: 24px; --s6: 36px;

  /* radii */
  --r-sm: 3px; --r-md: 8px; --r-lg: 12px;

  /* elevation. Near-black backgrounds swallow ordinary shadows, so each
     level pairs a drop shadow with a 1px light line along the top edge —
     the panel reads as lit from above rather than glowing. */
  --e1: 0 1px 2px rgba(0,0,0,.4), 0 1px 0 rgba(255,255,255,.028) inset;
  --e2: 0 2px 10px -2px rgba(0,0,0,.55), 0 1px 0 rgba(255,255,255,.035) inset;
  --e3: 0 10px 30px -8px rgba(0,0,0,.7), 0 1px 0 rgba(255,255,255,.045) inset;

  /* a panel is a hair lighter at the top, like everything else in the room */
  --panel-grad: linear-gradient(180deg, rgba(255,255,255,.022), rgba(255,255,255,0) 60px);

  --ring: 0 0 0 2px rgba(194,163,168,.35);
  --ease: cubic-bezier(.2,.6,.3,1);
}

/* ------------------------------- global -------------------------------- */

/* The default scrollbar is a bright slab on a near-black page. */
*{scrollbar-width:thin;scrollbar-color:var(--line) transparent}
::-webkit-scrollbar{width:9px;height:9px}
::-webkit-scrollbar-track{background:transparent}
::-webkit-scrollbar-thumb{background:var(--line);border-radius:999px;border:2px solid transparent;background-clip:padding-box}
::-webkit-scrollbar-thumb:hover{background:var(--ash);background-clip:padding-box}

::selection{background:rgba(194,163,168,.26);color:var(--text-hi)}

/* Keyboard focus was invisible in most places. */
:where(a,button,input,select,textarea,[tabindex]):focus-visible{
  outline:none;box-shadow:var(--ring);border-radius:var(--r-sm);
}

/* Transitions on the things that actually change state, not on everything. */
:where(.btn,.chip,.tab,.rd-chip,.rd-win,.pg,.sw-mode,.rd-liverow,.rd-row,.tk-row,.vault-chip,.sw-presets button,.rd-mintq button,.sw-slip button){
  transition:background-color .16s var(--ease), border-color .16s var(--ease),
             color .16s var(--ease), transform .16s var(--ease), box-shadow .16s var(--ease);
}
@media (prefers-reduced-motion: reduce){
  *,*::before,*::after{transition-duration:.01ms !important;animation-duration:.01ms !important;animation-iteration-count:1 !important}
}

/* -------------------------------- topbar ------------------------------- */

.topbar{
  padding:10px 18px;
  background:color-mix(in srgb, var(--bg-2) 86%, transparent);
  backdrop-filter:saturate(1.1) blur(10px);
  -webkit-backdrop-filter:saturate(1.1) blur(10px);
  border-bottom:1px solid var(--line);
  box-shadow:0 1px 0 rgba(255,255,255,.02) inset, 0 6px 18px -12px rgba(0,0,0,.9);
}
.tab,.chip{border-radius:var(--r-sm)}
.tab:hover{color:var(--text-hi)}

/* ------------------------------- surfaces ------------------------------ */
/* Every panel on the site, however it was named as it was built. */
:where(.panel,.rd-panel,.tk-panel,.sc-block,.card,.lore-card,.hgate,.rd-livewrap,.sw,.rd-mint,.vault-earn){
  border-radius:var(--r-md);
  background-image:var(--panel-grad);
  box-shadow:var(--e1);
}
:where(.panel,.rd-panel){box-shadow:var(--e2)}

/* the detail panels that float over a list read one step closer */
:where(.tk-panel,#rdPanel){box-shadow:var(--e3)}

/* Panel headers: a quieter rule, a touch more air. */
:where(.rd-ph,.panel-head){
  padding-bottom:var(--s2);
  border-bottom:1px solid var(--line-soft);
  margin-bottom:var(--s3);
}
:where(.rd-ph h2,.panel-head h2){letter-spacing:.06em}

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

.btn{border-radius:var(--r-sm)}
.btn:hover:not(:disabled){transform:translateY(-1px)}
.btn:active:not(:disabled){transform:translateY(0)}
.btn-primary{box-shadow:var(--e1)}
.btn-primary:hover:not(:disabled){box-shadow:var(--e2)}

/* chip / tab groups read as one control rather than loose boxes */
:where(.rd-chips,.rd-wins){
  display:inline-flex;gap:2px;padding:2px;
  background:var(--bg);border:1px solid var(--line-soft);border-radius:var(--r-md);
}
:where(.rd-chip,.rd-win){border:1px solid transparent;border-radius:var(--r-sm);background:none}
:where(.rd-chip:hover,.rd-win:hover){background:var(--panel-2);color:var(--text-hi)}
:where(.rd-chip.is-on,.rd-win.is-on){background:var(--panel);border-color:var(--line);color:var(--text-hi);box-shadow:var(--e1)}

/* -------------------------------- inputs ------------------------------- */

:where(.scan-input,.sw-in,input[type=text],input[type=search],input[type=number]){
  border-radius:var(--r-sm);
  transition:border-color .16s var(--ease), box-shadow .16s var(--ease);
}
:where(.scan-input,.sw-in):focus{border-color:var(--accent-dk);box-shadow:var(--ring)}
::placeholder{color:var(--dimmer);opacity:1}

/* ------------------------- the dev notice banner ----------------------- */
/* It is a note to the owner, not an error for the reader. */
.preview-warn{
  margin:0 0 var(--s4);padding:var(--s2) var(--s3);
  border:1px solid var(--line);border-left:2px solid var(--accent-dk);
  border-radius:var(--r-sm);
  background:var(--panel);
  font-size:11px;line-height:1.6;color:var(--dim);
  box-shadow:none;
}
.preview-warn strong{color:var(--text)}
.preview-warn code{color:var(--accent);font-size:10.5px}

/* --------------------------- the mint radar ---------------------------- */

/* THE LAYOUT FIX. The grid reserved 380px for the detail panel even when the
   panel was hidden, so the list ran in a 400px gutter with half the window
   empty. A hidden panel now gives its column back. */
.rd-grid-2:has(> #rdPanel[hidden]){grid-template-columns:1fr}
.rd-grid-2{gap:var(--s4)}

.rd-list-tall{max-height:min(74vh,900px)}

/* rows: a little more air, a clearer hover, and the rank quieter */
.rd-row{padding:10px var(--s3);border-bottom:1px solid var(--line-soft)}
.rd-row:last-child{border-bottom:0}
.rd-row:hover{background:var(--panel-2)}
.rd-row.is-open{background:var(--panel-2);box-shadow:inset 2px 0 0 var(--accent-dk)}
.rd-rank{opacity:.5;font-size:9.5px}
.rd-n{font-size:14px;letter-spacing:-.01em}

/* status pills: the ones that matter carry colour, "unchecked" recedes */
.rd-st{border-radius:999px;padding:3px 7px;letter-spacing:.1em}
.rd-st.st-dim{opacity:.45;background:transparent;border:1px solid var(--line)}
.rd-kind{border-radius:999px;opacity:.7}

/* the live strip */
.rd-livewrap{padding:var(--s2) var(--s3);border-left-width:2px}
.rd-liverow{border-radius:999px;padding:4px 10px 4px 5px}
.rd-liverow:hover{transform:translateY(-1px);box-shadow:var(--e1)}

/* the little sparkline gets a baseline so it doesn't float */
.rd-spark{border-bottom:1px solid var(--line-soft);padding-bottom:2px}
.rd-spark i{border-radius:1px}

/* thumbnails: a soft inner edge keeps bright art from clashing with the page */
.rd-thumb{border-radius:var(--r-sm);box-shadow:0 0 0 1px rgba(0,0,0,.4) inset}

/* ------------------------- memecoin radar / rows ----------------------- */

.tk-row{padding:9px var(--s3)}
.tk-row:hover{background:var(--panel-2)}
.tk-row.is-open{box-shadow:inset 2px 0 0 var(--accent-dk)}
.tk-logo{border-radius:var(--r-sm);box-shadow:0 0 0 1px rgba(0,0,0,.4) inset}
.tk-grade{border-radius:var(--r-sm)}

/* ------------------------------ scanner -------------------------------- */

.sc-head{border-radius:var(--r-md);box-shadow:var(--e2)}
.sc-block{padding:var(--s3) var(--s4)}
.sc-facts{gap:var(--s3)}
.sc-fact{padding:var(--s2) 0}

/* the audit tiers: a left rule in the tier's own colour, easier to scan */
.au-row{border-left:2px solid transparent;border-radius:var(--r-sm)}
.au-row.au-critical{border-left-color:#ff3c50}
.au-row.au-high{border-left-color:#ff8c28}
.au-row.au-medium{border-left-color:#f2d24d}
.au-row.au-low{border-left-color:#9fd0ff}
.au-row.au-info{border-left-color:var(--line)}

/* -------------------------------- footer ------------------------------- */
/* The footer sits over the graveyard artwork, which made its small grey type
   unreadable. It gets its own ground and a little more contrast. */
.foot{
  position:relative;z-index:2;
  background:linear-gradient(180deg, color-mix(in srgb, var(--bg) 82%, transparent), var(--bg) 40px);
  backdrop-filter:blur(6px);-webkit-backdrop-filter:blur(6px);
  padding:var(--s5) var(--s4) var(--s6);
  color:var(--dim);
}
.foot .prov{color:var(--dimmer)}
.foot a{color:var(--ash);text-underline-offset:2px}

/* ----------------------------- empty states ---------------------------- */

:where(.rd-empty,.tk-empty,.elig-empty,.sc-none,.rd-livenone){
  color:var(--dimmer);
}
:where(.rd-empty,.tk-empty){padding:var(--s5) var(--s3)}

/* ------------------------------ fine print ----------------------------- */

.fineprint{line-height:1.7;max-width:92ch}

/* ------------------------------ responsive ----------------------------- */

@media (max-width:860px){
  .rd-grid-2{gap:var(--s3)}
  .rd-list-tall{max-height:none}
}

/* --------------------- long text over the artwork ---------------------- */
/* The graveyard illustration is fixed behind the page. Small grey type laid
   straight over it was unreadable (worst on the scanner and radar footnotes),
   so the closing note on each tool now sits on its own faint ground. It reads
   as a deliberate footnote block rather than text that fell off the panel. */
.fineprint{
  position:relative;
  margin-top:var(--s5);
  padding:var(--s3) var(--s4);
  border:1px solid var(--line-soft);
  border-left:2px solid var(--line);
  border-radius:var(--r-sm);
  background:color-mix(in srgb, var(--panel) 72%, transparent);
  backdrop-filter:blur(4px);-webkit-backdrop-filter:blur(4px);
  color:var(--dim);
}
.fineprint code{color:var(--accent)}
.fineprint strong,.fineprint b{color:var(--text)}
/* the ones already inside a panel keep the panel's own ground */
:where(.panel,.rd-panel,.sc-block,.tk-panel) .fineprint{
  background:none;backdrop-filter:none;-webkit-backdrop-filter:none;
  border:0;border-top:1px solid var(--line-soft);border-radius:0;
  padding:var(--s3) 0 0;margin-top:var(--s3);
}

/* ----------------------------- tool headers ---------------------------- */
/* Tool pages opened straight into a control bar with no title. The gate
   headings that already exist get the hero's treatment so each tool starts
   with a name instead of a toolbar. */
.hgate-title{letter-spacing:-.02em}
.kicker{letter-spacing:.18em;color:var(--accent-dk)}

/* ------------------------------ home page ------------------------------ */

.hero-cta .btn{padding-inline:var(--s4)}
:where(.lore-card,.card){padding:var(--s4)}
:where(.lore-card,.card):hover{border-color:var(--line);box-shadow:var(--e2)}

/* the horde strip: a soft edge instead of a hard crop */
.horde-strip{position:relative}
.horde-strip::after{
  content:"";position:absolute;inset:0;pointer-events:none;
  background:linear-gradient(90deg, var(--bg), transparent 12%, transparent 88%, var(--bg));
}

/* ======================================================================= */
/*                                 MOBILE                                  */
/* ======================================================================= */
/* The site was built at desktop width and merely survived on a phone: the
   top bar spent three rows before any content, the nav clipped mid-word with
   nothing to say it scrolled, controls were below the 44px Apple and Android
   both ask for, and every input was small enough that iOS Safari zoomed the
   page the moment you tapped one. These rules fix those, in that order of
   how much they hurt. */

@media (max-width: 760px){

  /* ---- the top bar: one compact row of brand + actions, nav beneath ---- */
  .topbar{
    padding:8px 10px;gap:8px;
    display:grid;grid-template-columns:auto 1fr;grid-template-areas:"brand actions" "nav nav";
    align-items:center;
  }
  .brand{grid-area:brand;gap:7px}
  .mark{width:20px;height:20px}
  .brand-name{font-size:13px;letter-spacing:.14em}
  /* the tagline is decoration; the screen is 375px wide */
  .brand-sub,.brand-text small{display:none}
  .topbar-right{grid-area:actions;justify-self:end;gap:6px;flex-wrap:nowrap}
  /* They are .chip, not .btn. OpenSea and X are in the footer's social row
     on every page, so the bar keeps only the button that does something you
     cannot do elsewhere. */
  .topbar-right .chip:not(.chip-cta){display:none}
  .topbar-right .chip-cta{white-space:nowrap}
  .tabs{grid-area:nav}

  /* ---- scrolling rows get an edge that says so ---- */
  /* A row that simply clips mid-word reads as broken. These fade out at the
     right while there is more to reach, and snap to each item. */
  :where(.tabs,.rd-live,.rd-views,.tk-allbar){
    display:flex;flex-wrap:nowrap;overflow-x:auto;overflow-y:hidden;
    scroll-snap-type:x proximity;-webkit-overflow-scrolling:touch;
    scrollbar-width:none;
    -webkit-mask-image:linear-gradient(90deg,#000 calc(100% - 28px),transparent);
            mask-image:linear-gradient(90deg,#000 calc(100% - 28px),transparent);
  }
  :where(.tabs,.rd-live,.rd-views,.tk-allbar)::-webkit-scrollbar{display:none}
  :where(.tabs,.rd-live) > *{scroll-snap-align:start;flex:0 0 auto}

  /* ---- touch targets ---- */
  /* 44px is the figure both platforms publish; these were nearer 26. */
  :where(.tab,.btn,.rd-chip,.rd-win,.chip,.pg,.sw-mode,.rd-mintq button,.sw-presets button,.tk-copy,.btn-sm){
    min-height:40px;display:inline-flex;align-items:center;justify-content:center;
  }
  :where(.btn,.rd-chip,.rd-win){padding-inline:14px}
  .tab{padding:0 10px}
  /* checkboxes and radios are the smallest things on the page */
  input[type=checkbox],input[type=radio]{width:18px;height:18px;accent-color:var(--accent-dk)}
  label:has(> input[type=checkbox]){min-height:40px;display:inline-flex;align-items:center;gap:8px}

  /* ---- iOS zoom ---- */
  /* Safari zooms the whole page when a focused input is under 16px. Every
     input on this site was 12-13px, so every tap on the scanner, the search
     or the mint quantity threw the layout sideways. */
  /* :where() carries no specificity, so the old class rules won and the
     zoom stayed. These match the real selectors instead. */
  input[type=text],input[type=search],input[type=number],input[type=email],
  input[type=url],input:not([type]),select,textarea,
  .scan-input,.sw-in,.tk-allq,.market-search,.market-sort,#rdAlertN,#lnQ,
  .rd-watch-form .scan-input,.tk-allbar .tk-allq{font-size:16px}
  .scan-input{padding:12px 13px}

  /* ---- layout ---- */
  :where(.radar,.tokens,.scanner,.news,.stake-grid){padding-left:10px;padding-right:10px}
  .rd-grid,.rd-grid-2,.tk-grid,.sc-cols,.vault-cols,.rd-views{grid-template-columns:1fr}
  .rd-bar,.tk-bar{flex-wrap:wrap;gap:10px}
  .rd-views{align-items:stretch}

  /* rows: drop the ornament, keep the numbers */
  .rd-rank{display:none}
  .rd-prog,.rd-prog + small{display:none}
  .rd-row,.tk-row{gap:10px;padding:10px}
  .rd-id b,.tk-id b{font-size:13px}
  .rd-thumb{width:30px;height:30px}
  .rd-thumb.is-lg{width:52px;height:52px}

  /* stat grids: two across is the most that stays readable at this width */
  :where(.tk-facts,.sc-facts,.vault-stats,.net-grid,.d-grid){grid-template-columns:1fr 1fr !important;gap:10px}

  /* the detail panel is a full-width card below the list, not a sidebar */
  :where(#rdPanel,.tk-panel){position:static;width:auto;max-height:none}

  /* ---- the floating music button must not sit on top of a control ---- */
  .player-btn{bottom:calc(10px + env(safe-area-inset-bottom,0px));right:10px;z-index:40}
  :where(.radar,.tokens,.scanner,.news,.collection,.stake-grid,.foot){
    padding-bottom:calc(72px + env(safe-area-inset-bottom,0px));
  }
  .player{left:8px;right:8px;width:auto;max-width:none;bottom:66px}

  /* ---- type ---- */
  .hgate-title,.soon-title{font-size:clamp(26px,8vw,38px);line-height:1.1}
  .hero h1,.hero-title{font-size:clamp(44px,16vw,86px);line-height:.95;letter-spacing:-.03em}
  .hero-lede,.hgate-lede{font-size:14px}
  .fineprint{font-size:10.5px;padding:12px}

  /* tables that cannot usefully reflow scroll inside their own card */
  :where(.sc-hits,.sc-why,.tk-flow,.tk-holders,.sp-buyers){overflow-x:auto}
}

/* very narrow phones */
@media (max-width: 400px){
  .brand-name{font-size:12px}
  :where(.tk-facts,.sc-facts,.vault-stats){grid-template-columns:1fr !important}
}

/* landscape phones and small tablets keep the sidebar but tighten it */
@media (min-width:761px) and (max-width:1024px){
  .rd-grid-2{grid-template-columns:1fr 320px}
  :where(.radar,.tokens,.scanner){padding-left:14px;padding-right:14px}
}

/* pointer-coarse devices: no hover lift, it only causes sticky states */
@media (hover: none){
  :where(.btn,.rd-liverow,.rd-row,.tk-row):hover{transform:none;box-shadow:none}
  :where(.rd-row,.tk-row):active{background:var(--panel-2)}
}

/* ---------------- full-bleed sections on a narrow screen --------------- */
/* .claypit and .seasonal pull themselves 18px past their own padding with a
   negative margin so their sky reaches the window edge. Their parent
   (main.page) has no padding, so on a phone that is simply 36px of content
   wider than the window — measured 411px inside 375px, an 18px sideways
   scroll on the Clay Pit, Christmas and Halloween pages. The bleed has
   nothing to bleed into here, so it goes. */
/* Plain class selectors, not :where() — the originals are .claypit and
   .seasonal at (0,1,0) and a zero-specificity rule loses to them. */
@media (max-width: 760px){
  .claypit,.seasonal{
    margin-left:0;margin-right:0;
    padding-left:14px;padding-right:14px;
    border-radius:0;
  }
}

/* And a guard, so the next full-bleed idea cannot do it again. overflow-x:
   clip rather than hidden: it stops the sideways scroll without turning the
   page into a scroll container, which would break the sticky top bar. */
main.page{overflow-x:clip}

/* ------------------------------ the pager ------------------------------ */
/* Sits under each video shelf: what you are looking at, the pages, and how
   many to show. Reuses the .pg button the collection pager already uses. */
.pgbar{
  display:flex;align-items:center;gap:var(--s3);flex-wrap:wrap;
  margin-top:var(--s4);padding-top:var(--s3);
  border-top:1px solid var(--line-soft);
}
.pgbar-count{font:400 10.5px/1 var(--mono);color:var(--dimmer);white-space:nowrap}
.pgbar-pages{display:flex;align-items:center;gap:4px;flex-wrap:wrap;margin-inline:auto}
.pgbar-per{
  display:flex;align-items:center;gap:4px;margin-left:auto;
  font:600 8.5px/1 var(--sans);letter-spacing:.12em;text-transform:uppercase;color:var(--dimmer);
}
.pgbar-per .pg{min-width:30px;padding:7px 8px}

/* the rooms with their own palette keep it */
.claypit .pgbar{border-top-color:rgba(157,84,51,.24)}
.claypit .pgbar-count,.claypit .pgbar-per{color:#8a6549}
.claypit .pg{background:rgba(255,255,255,.5);border-color:rgba(157,84,51,.3);color:var(--clay-dk)}
.claypit .pg.is-on{background:var(--clay-dk);border-color:var(--clay-dk);color:var(--clay-cream)}
.seasonal .pgbar{border-top-color:rgba(255,255,255,.12)}

@media (max-width:760px){
  .pgbar{gap:var(--s2);justify-content:center}
  .pgbar-count{width:100%;text-align:center;order:-1}
  .pgbar-pages,.pgbar-per{margin:0}
  .pgbar-per{width:100%;justify-content:center}
}

/* ======================================================================= */
/*          PORTED FROM THE LOVABLE REDESIGN ("Devoid Display")            */
/* ======================================================================= */
/* Lovable built the seven screens as a React reference. That app cannot
   replace this site — all the chain logic lives in plain JS it cannot take
   in — so what comes across is the design, transcribed by hand into the
   classes this site already uses. Project:
   https://lovable.dev/projects/f5ea77b0-7ac9-4c3a-a87d-b31eb4309e34

   These are the decisions worth keeping. Everything else it did we already
   had, or it fought the palette. */

/* 1. PANEL EDGE. It lit the top edge by lightening the border itself rather
   than laying a highlight inside it — one property, no inset, and it keeps
   working on panels that clip their content. */
:where(.panel,.rd-panel,.tk-panel,.sc-block,.sc-head,.card,.lore-card,.rd-livewrap,.sw,.rd-mint,.vault-earn){
  border-top-color:color-mix(in srgb, var(--text) 13%, var(--line));
}

/* 2. HAIRLINE STAT GRIDS. Instead of a border on every tile, the grid sits
   on the border colour and lets a 1px gap show through, so the rules between
   stats are exactly 1px and never double up at the joins. */
:where(.sc-facts,.tk-facts,.vault-stats){
  gap:1px;background:var(--line);
  border:1px solid var(--line);border-radius:var(--r-md);overflow:hidden;
}
:where(.sc-facts,.tk-facts,.vault-stats) > div{
  background:var(--panel);padding:13px 14px;margin:0;
}
.claypit :where(.sc-facts,.tk-facts,.vault-stats){background:rgba(157,84,51,.24);border-color:rgba(157,84,51,.24)}
.claypit :where(.sc-facts,.tk-facts,.vault-stats) > div{background:var(--clay-cream)}

/* 3. NAV. An underline on the active tab instead of a filled pill: the bar
   reads as one strip rather than a row of separate buttons, and the accent
   is spent on a 2px rule instead of a whole background. */
.tab{
  border:0;border-bottom:2px solid transparent;border-radius:0;
  padding:9px 11px 7px;text-transform:uppercase;font-size:10px;letter-spacing:.08em;
}
.tab:hover{background:none;color:var(--text-hi)}
.tab.is-on{background:none;border-bottom-color:var(--accent);color:var(--text-hi)}

/* 4. STATUS PILLS. Smaller, heavier, wider-tracked — they stop competing
   with the collection name beside them. */
:where(.rd-st,.tk-tag,.au-pill,.rd-kind){font-size:9px;font-weight:700;letter-spacing:.05em}

/* 5. SCRIM. Its hero laid two gradients over the art — one across, one up —
   so display type stays readable wherever the picture is busy. The same
   problem as our graveyard background behind the tool pages. */
.hero::after,.soon-hero::after{
  content:"";position:absolute;inset:0;z-index:0;pointer-events:none;
  background:
    linear-gradient(90deg, var(--bg) 0%, color-mix(in srgb, var(--bg) 94%, transparent) 16%,
                    color-mix(in srgb, var(--bg) 54%, transparent) 48%, transparent 85%),
    linear-gradient(0deg, var(--bg), transparent 23%);
}
.hero > *,.soon-hero > *{position:relative;z-index:1}

/* 6. DISPLAY TYPE. Tighter tracking on the big sizes; it had the hero at
   -.065em and page titles at -.035em, which is what stops large grotesque
   type looking gappy. */
.hero h1,.hero-title{letter-spacing:-.055em}
:where(.hgate-title,.soon-title,.page-title){letter-spacing:-.035em}

/* 7. THE SCANNER GRADE as the biggest thing on the result — mono, 76px. */
.sc-grade{font-size:clamp(44px,7vw,72px);line-height:.95;letter-spacing:-.04em}

/* the pager above the shelf: the total first, controls second */
.pgbar-top{margin-top:0;margin-bottom:var(--s3);padding-top:0;padding-bottom:var(--s2);border-top:0;border-bottom:1px solid var(--line-soft)}
.pgbar-top .pgbar-count{color:var(--text);font-size:11px}

/* ==========================================================================
   SHELF BOXES — one box everywhere

   The Reanimator and Documentaries shelves use a flat card: hairline border,
   5px corner, no drop shadow, small square badges, a 2px lift on hover. The
   Clay Pit was a 16px sticker on a chunky double shadow and the seasonal
   rooms a 12px rounded panel, so the same library looked like three sites.

   This gives .cl-card and .sn-card the Reanimator GEOMETRY and leaves their
   COLOUR alone — the pit stays warm, Halloween stays orange, Christmas stays
   gold. Only the shape of the box is unified.
   ========================================================================== */

/* grid: same column width and gutter as .re-shelf */
.cl-shelf,
.sn-shelf{gap:12px;grid-template-columns:repeat(auto-fill,minmax(230px,1fr))}

/* the box */
.cl-card,
.sn-card{
  border-radius:5px;
  box-shadow:none;
  transition:border-color .16s ease, transform .16s ease;
}
.cl-card{
  background:#fff8ef;
  border:1px solid rgba(157,84,51,.28);
}
.sn-card{
  border-radius:5px;
}
.cl-card:hover,
.sn-card:hover{transform:translateY(-2px);box-shadow:none}
.cl-card:hover{border-color:var(--clay)}

/* selected: a ring rather than a thick cut-in outline */
.cl-card.is-on{outline:0;border-color:var(--clay);box-shadow:0 0 0 1px var(--clay)}
.is-christmas .sn-card.is-on{outline:0;border-color:var(--xm-red);box-shadow:0 0 0 1px var(--xm-red)}
.is-halloween .sn-card.is-on{outline:0;border-color:var(--hw-orange);box-shadow:0 0 0 1px var(--hw-orange)}

/* badges: the Reanimator's small square chip, not a pill */
.cl-len,.cl-kid,
.sn-len,.sn-cc{
  bottom:7px;padding:3px 6px;border-radius:2px;
  font:700 9px/1 var(--mono);letter-spacing:.04em;
}
.cl-len,.sn-len{right:7px}
.cl-kid,.sn-cc{left:7px}

/* body: the Reanimator's spacing and type scale */
.cl-body,
.sn-body{gap:0;padding:11px 12px 13px}
.cl-body b,
.sn-body b{margin-bottom:5px}
.cl-body em,
.sn-body em{font:400 9.5px/1 var(--mono);font-style:normal}
.cl-body em{color:#8a6549}
.sn-body em{opacity:.6}

/* ==========================================================================
   THE LEDGER — now a channel

   It plays on arrival and rolls into the next lesson, like every other room,
   so it needs the ON AIR pill the Reanimator has. Terminal green rather than
   goo green, because the Ledger is built out of chart lines, not graveyard.
   ========================================================================== */
.ln-now{display:flex;align-items:center;gap:9px;flex-wrap:wrap}
.ln-onair{
  background:var(--term,#7fd6a3);color:#04130b;border-radius:2px;padding:3px 7px;
  font:800 8.5px/1 var(--sans);letter-spacing:.14em;
  box-shadow:0 0 14px rgba(127,214,163,.4);
}
.ln-actions{display:flex;gap:6px;margin-left:auto;flex-wrap:wrap}

/* ==========================================================================
   STAGES — the player stops stretching

   Every room's stage was plain `width:100%`. On a wide monitor that makes a
   16:9 player as wide as the browser and therefore taller than the viewport,
   so the thing playing does not fit on screen and the page below it is pushed
   out of sight entirely.

   Cap it on the HEIGHT instead: the widest the stage may be is whatever keeps
   16:9 inside the viewport, with a floor so it never shrinks on a short
   laptop window and never exceeds the column on a narrow one. Centred, so
   the extra room on an ultrawide falls either side rather than all on one.

   The category nav now sits UNDER the stage in these rooms (see index.html) —
   the room is already playing when you walk in, so what is on is the first
   thing to read and the filter is what you reach for second.
   ========================================================================== */
.ln-stage,
.sn-stage,
.cl-stage,
.re-stage,
.ar-stage{
  max-width:min(100%, max(760px, calc((100svh - 230px) * 16 / 9)));
  margin-inline:auto;
}

/* the nav is a toolbar for the player above it: tucked under the stage,
   with the breathing room kept below it where the shelf starts */
.ln-nav,
.sn-nav,
.ar-nav{margin-top:0}
.ln-stage,
.sn-stage,
.ar-stage{margin-bottom:12px}

/* a narrow window has no height to spare — let the player use the column */
@media (max-width:760px){
  .ln-stage,
  .sn-stage,
  .cl-stage,
  .re-stage,
  .ar-stage{max-width:100%}
}
