/* Artifact Shelf ─ one stylesheet, no build step.
   Concept: objects standing on real shelves, each with a paper tag clipped
   to the shelf edge. Daylight shop by default, after-hours under-lighting in dark. */

@font-face {
  font-family: "Bricolage Grotesque";
  src: url("fonts/bricolage-grotesque-latin.woff2") format("woff2");
  font-weight: 200 800;
  font-stretch: 75% 100%;
  font-display: swap;
}
@font-face {
  font-family: "DM Mono";
  src: url("fonts/dm-mono-400-latin.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "DM Mono";
  src: url("fonts/dm-mono-500-latin.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}

/* ───────────── tokens ───────────── */

:root {
  --display: "Bricolage Grotesque", ui-sans-serif, system-ui, sans-serif;
  --body: "Bricolage Grotesque", ui-sans-serif, system-ui, sans-serif;
  --mono: "DM Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --gutter: clamp(16px, 4vw, 48px);
  --maxw: 1360px;
  --card-w: clamp(232px, 23vw, 318px);
  --poster-h: calc(var(--card-w) * 0.625);
  --lift: 22px;
  --ledge-top-h: 9px;
  --ledge-face-h: 15px;
  --ledge-h: calc(var(--ledge-top-h) + var(--ledge-face-h));
  --ease-out: cubic-bezier(0.2, 0.8, 0.2, 1);
  --ease-spring: cubic-bezier(0.3, 1.35, 0.5, 1);

  /* daylight */
  --wall: #ece6da;
  --wall-2: #e3dccd;
  --wall-3: #d9d0be;
  --ink: #1c1a16;
  --ink-2: #4c473e;
  --ink-3: #665f52;
  --line: rgba(28, 26, 22, 0.13);
  --line-strong: rgba(28, 26, 22, 0.32);
  --paper: #fbf8f1;
  --paper-ink: #1c1a16;
  --paper-ink-2: #5a5448;
  --paper-ink-3: #736b5e;
  --accent: #d1461b;
  --accent-ink: #fff8f2;
  --clip: #3a352d;
  --ledge-top-1: #efe2c8;
  --ledge-top-2: #dfcaa5;
  --ledge-face-1: #c7aa7c;
  --ledge-face-2: #b4966a;
  --ledge-shadow: rgba(72, 46, 10, 0.34);
  --ledge-glow: transparent;
  --box-bg: #d8d1c2;
  --box-edge: rgba(28, 26, 22, 0.16);
  --case-frame: #f6f2ea;
  --row-hover: rgba(255, 255, 255, 0.45);
  --noise: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .07 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  color-scheme: light;
}

:root[data-theme="dark"] {
  --wall: #141518;
  --wall-2: #1b1c20;
  --wall-3: #25262b;
  --ink: #ede8dd;
  --ink-2: #b9b2a5;
  --ink-3: #8f877a;
  --line: rgba(237, 232, 221, 0.11);
  --line-strong: rgba(237, 232, 221, 0.3);
  --paper: #e4dccb;
  --paper-ink: #1c1a16;
  --paper-ink-2: #4f493e;
  --paper-ink-3: #625b4f;
  --accent: #ff6a3a;
  --accent-ink: #1a0d07;
  --clip: #0c0c0e;
  --ledge-top-1: #57463a;
  --ledge-top-2: #3f3229;
  --ledge-face-1: #2f251e;
  --ledge-face-2: #241c16;
  --ledge-shadow: rgba(0, 0, 0, 0.7);
  --ledge-glow: rgba(255, 186, 120, 0.11);
  --box-bg: #222328;
  --box-edge: rgba(255, 255, 255, 0.1);
  --case-frame: #22232a;
  --row-hover: rgba(255, 255, 255, 0.035);
  --noise: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .035 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root[data-theme="auto"] {
    --wall: #141518;
    --wall-2: #1b1c20;
    --wall-3: #25262b;
    --ink: #ede8dd;
    --ink-2: #b9b2a5;
    --ink-3: #8f877a;
    --line: rgba(237, 232, 221, 0.11);
    --line-strong: rgba(237, 232, 221, 0.3);
    --paper: #e4dccb;
    --paper-ink: #1c1a16;
    --paper-ink-2: #4f493e;
    --paper-ink-3: #625b4f;
    --accent: #ff6a3a;
    --accent-ink: #1a0d07;
    --clip: #0c0c0e;
    --ledge-top-1: #57463a;
    --ledge-top-2: #3f3229;
    --ledge-face-1: #2f251e;
    --ledge-face-2: #241c16;
    --ledge-shadow: rgba(0, 0, 0, 0.7);
    --ledge-glow: rgba(255, 186, 120, 0.11);
    --box-bg: #222328;
    --box-edge: rgba(255, 255, 255, 0.1);
    --case-frame: #22232a;
    --row-hover: rgba(255, 255, 255, 0.035);
    --noise: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .035 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    color-scheme: dark;
  }
}

/* ───────────── base ───────────── */

*, *::before, *::after { box-sizing: border-box; }
html {
  background: var(--wall) var(--noise);
  color: var(--ink);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 24px;
}
body {
  margin: 0;
  min-height: 100vh;
  font: 400 17px/1.55 var(--body);
  font-optical-sizing: auto;
  background: transparent;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img, svg, iframe { display: block; max-width: 100%; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2.5px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
::selection { background: var(--accent); color: var(--accent-ink); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--ink-3); }
.skip {
  position: absolute; left: 12px; top: -60px; z-index: 50;
  background: var(--ink); color: var(--wall); padding: 10px 14px; border-radius: 6px; text-decoration: none;
}
.skip:focus { top: 12px; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 9px; margin: 0;
  font: 500 12px/1.2 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3);
}
.eyebrow .dot {
  width: 8px; height: 8px; border-radius: 2px; flex: none;
  background: hsl(var(--hue, 14) 70% 48%);
}
.lede { font-size: clamp(18px, 1.6vw, 21px); line-height: 1.5; color: var(--ink-2); max-width: 56ch; margin: 18px 0 0; }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 18px; border-radius: 999px;
  border: 1.5px solid var(--line-strong); background: transparent;
  font: 600 15px/1 var(--body); text-decoration: none; color: var(--ink);
  transition: background 0.2s, border-color 0.2s, transform 0.2s var(--ease-out);
}
.btn:hover { background: var(--wall-2); border-color: var(--ink); }
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--ink); color: var(--wall); border-color: var(--ink); }
.btn--primary:hover { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }

/* ───────────── ledges (shared) ───────────── */

.ledge, .item-ledge, .display-ledge, .case-base, .foot-ledge {
  background:
    linear-gradient(to bottom, rgba(255, 255, 255, 0.35), transparent 2px) top / 100% var(--ledge-top-h) no-repeat,
    linear-gradient(to bottom, var(--ledge-top-1), var(--ledge-top-2)) top / 100% var(--ledge-top-h) no-repeat,
    linear-gradient(to bottom, rgba(255, 255, 255, 0.18), transparent 1.5px) 0 var(--ledge-top-h) / 100% 100% no-repeat,
    linear-gradient(to bottom, var(--ledge-face-1), var(--ledge-face-2)) bottom / 100% var(--ledge-face-h) no-repeat;
  box-shadow: 0 22px 26px -18px var(--ledge-shadow), 0 3px 2px -1px rgba(0, 0, 0, 0.12);
  height: var(--ledge-h);
}

/* ───────────── header ───────────── */

.site-head {
  max-width: var(--maxw); margin: 0 auto; padding: 18px var(--gutter);
  display: flex; align-items: center; gap: 28px;
}
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-mark { width: 34px; height: 34px; }
.bm-a { fill: var(--accent); }
.bm-b { fill: var(--ink); }
.bm-c { fill: hsl(150 40% 38%); }
.bm-top { fill: var(--ledge-top-2); }
.bm-face { fill: var(--ledge-face-2); }
.brand-name { font: 760 21px/1 var(--display); font-stretch: 78%; letter-spacing: -0.01em; }
.brand:hover .bm-a { transform: translateY(-2px); }
.brand-mark rect, .brand-mark circle, .brand-mark path { transition: transform 0.35s var(--ease-spring); }
.brand:hover .bm-b { transform: translateY(-3px); transition-delay: 40ms; }
.brand:hover .bm-c { transform: translateY(-2px); transition-delay: 80ms; }
.site-nav { display: flex; gap: 22px; }
.site-nav a { text-decoration: none; font-weight: 550; color: var(--ink-2); padding: 6px 0; border-bottom: 1.5px solid transparent; }
.site-nav a:hover { color: var(--ink); border-color: var(--ink); }
.site-tools { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.tool {
  display: inline-flex; align-items: center; gap: 7px; height: 38px; min-width: 38px; justify-content: center;
  padding: 0 10px; border-radius: 999px; border: 0; background: transparent; color: var(--ink-2); text-decoration: none;
  font: 550 14px/1 var(--body);
}
.tool:hover { background: var(--wall-2); color: var(--ink); }
.tool--dice:hover .icon { animation: roll 0.6s var(--ease-spring); }
[data-theme-toggle] .icon:nth-of-type(1) { display: none; }
:root[data-theme="dark"] [data-theme-toggle] .icon:nth-of-type(1) { display: block; }
:root[data-theme="dark"] [data-theme-toggle] .icon:nth-of-type(2) { display: none; }
@media (prefers-color-scheme: dark) {
  :root[data-theme="auto"] [data-theme-toggle] .icon:nth-of-type(1) { display: block; }
  :root[data-theme="auto"] [data-theme-toggle] .icon:nth-of-type(2) { display: none; }
}

/* ───────────── home: the display window ───────────── */

.window {
  max-width: var(--maxw); margin: 0 auto;
  padding: clamp(24px, 5vw, 64px) var(--gutter) clamp(40px, 6vw, 88px);
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(32px, 5vw, 80px); align-items: center;
}
.display {
  margin: 22px 0 0; position: relative; z-index: 1;
  font: 800 clamp(60px, 8.4vw, 132px)/0.84 var(--display);
  font-stretch: 75%; letter-spacing: -0.03em; word-spacing: 0.06em;
}
.display .drop { display: inline-block; }
.display-ledge { margin-top: calc(-0.16 * clamp(60px, 8.4vw, 132px)); border-radius: 2px; position: relative; z-index: 0; }
.window-stats {
  display: grid; grid-template-columns: repeat(4, auto); justify-content: start; gap: 4px 28px;
  margin: 34px 0 0; padding: 16px 0 0; border-top: 1px solid var(--line);
}
.window-stats div { display: flex; flex-direction: column-reverse; gap: 2px; }
.window-stats dt { font: 500 10.5px var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); }
.window-stats dd { margin: 0; font: 700 26px/1 var(--display); font-stretch: 80%; }

.window-cases { position: relative; }
.case { margin: 0; position: relative; }
.case[hidden] { display: none; }
.case-glass {
  position: relative; aspect-ratio: 16 / 10; border-radius: 6px; overflow: hidden;
  background: #0d0d10;
  box-shadow:
    0 0 0 1px var(--box-edge),
    0 0 0 12px var(--case-frame),
    0 0 0 13px var(--box-edge),
    0 40px 70px -40px rgba(0, 0, 0, 0.6);
  margin: 13px 13px 0;
}
.case-poster { width: 100%; height: 100%; object-fit: cover; transition: opacity 0.6s; }
.case-glass iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #fff; opacity: 0; transition: opacity 0.7s; }
.case-glass.is-live iframe { opacity: 1; }
.case-glass.is-live .case-poster { opacity: 0; }
.case-sheen {
  position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(118deg, rgba(255, 255, 255, 0.22) 0%, rgba(255, 255, 255, 0.04) 30%, transparent 31%, transparent 62%, rgba(255, 255, 255, 0.07) 63%, transparent 80%);
  mix-blend-mode: screen; transition: opacity 0.6s;
}
.case-glass.is-live .case-sheen { opacity: 0.12; }
.case-run {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  display: inline-flex; align-items: center; gap: 9px; padding: 13px 20px 13px 17px; border-radius: 999px;
  border: 0; background: rgba(251, 248, 241, 0.94); color: #1c1a16; font: 650 15px/1 var(--body);
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.6); transition: transform 0.25s var(--ease-spring), background 0.2s;
}
.case-run:hover { transform: translate(-50%, -50%) scale(1.05); background: #fff; }
.case-glass.is-live .case-run { display: none; }
.case-base { margin: 13px 0 0; border-radius: 2px; }
.case-label {
  display: grid; grid-template-columns: minmax(180px, 250px) 1fr; gap: 6px 22px; align-items: start;
  margin-top: 0; padding: 0 12px;
}
.case-label > a { text-decoration: none; grid-row: span 2; }
.case-label .tag { margin-top: calc(-1 * var(--ledge-face-h) + 4px); }
.case-sum { color: var(--ink-2); font-size: 15px; line-height: 1.45; padding-top: 14px; }
.case-open { font-weight: 650; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; color: var(--accent); }
.case-open:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ───────────── shelves ───────────── */

.shelves { padding-bottom: 24px; }
.shelf { margin: 0 0 26px; }
.shelf-head {
  max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter);
  display: grid; grid-template-columns: auto auto 1fr auto; align-items: baseline; gap: 0 14px;
}
.shelf-head h2 { margin: 0; font: 780 clamp(30px, 3.2vw, 42px)/1 var(--display); font-stretch: 78%; letter-spacing: -0.02em; }
.shelf-head h2 a { text-decoration: none; }
.shelf-head h2 a:hover { color: hsl(var(--hue) 60% 42%); }
.shelf-count { font: 500 13px var(--mono); color: var(--ink-3); }
.shelf-blurb { margin: 0; color: var(--ink-2); font-size: 15.5px; }
.shelf-nav { display: flex; align-items: center; gap: 6px; }
.shelf-all { font: 600 14px var(--body); text-decoration: none; display: inline-flex; align-items: center; gap: 5px; margin-right: 8px; color: var(--ink-2); }
.shelf-all:hover { color: var(--ink); }
.nudge {
  width: 34px; height: 34px; border-radius: 999px; border: 1.5px solid var(--line-strong); background: transparent;
  display: inline-grid; place-items: center; color: var(--ink-2);
}
.nudge:hover { border-color: var(--ink); color: var(--ink); }
.nudge:disabled { opacity: 0.3; cursor: default; }
.nudge[hidden] { display: none; }

.shelf-unit { position: relative; }
.shelf-row .item::before {
  /* a pool of warm light on the wall behind each piece (dark theme only) */
  content: ""; position: absolute; left: -18%; right: -18%; top: -18%; height: calc(var(--poster-h) * 1.25);
  background: radial-gradient(ellipse 50% 55% at 50% 55%, var(--ledge-glow), transparent 70%);
  pointer-events: none; z-index: 0;
}
.shelf-row {
  position: relative; z-index: 1;
  display: flex; gap: clamp(22px, 2.6vw, 36px); margin: 0; list-style: none;
  --edge: max(var(--gutter), calc((100% - var(--maxw)) / 2 + var(--gutter)));
  padding: var(--lift) var(--edge) 34px;
  overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x proximity; scroll-padding-inline: var(--edge);
  scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent;
}
.shelf-row::-webkit-scrollbar { height: 6px; }
.shelf-row::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 3px; }
.shelf-unit > .ledge { position: absolute; left: 0; right: 0; top: calc(var(--lift) + var(--poster-h)); z-index: 0; }
.shelf-row .item { flex: 0 0 var(--card-w); scroll-snap-align: start; }
.shelf-row .item-ledge { display: none; }
.shelf-row .tag { margin-top: calc(var(--ledge-top-h) + 3px); }

/* the item: a box standing on the ledge, a tag clipped under it */

.item { position: relative; list-style: none; }
.item-link { position: relative; display: block; text-decoration: none; color: inherit; }
.item-box {
  position: relative; display: block; aspect-ratio: 16 / 10; overflow: hidden; border-radius: 6px;
  background: var(--box-bg);
  box-shadow: 0 0 0 1px var(--box-edge), 0 12px 16px -12px rgba(0, 0, 0, 0.5);
  transform-origin: 50% 100%;
  transition: transform 0.5s var(--ease-spring), box-shadow 0.5s var(--ease-out);
  z-index: 2;
}
.item-box .poster { width: 100%; height: 100%; object-fit: cover; transition: opacity 0.5s, transform 0.8s var(--ease-out); }
.item-box iframe {
  position: absolute; left: 0; top: 0; width: 1280px; height: 800px; max-width: none; border: 0;
  transform-origin: 0 0; transform: scale(var(--s, 0.25)); background: #fff;
  opacity: 0; transition: opacity 0.45s; pointer-events: none;
}
.item-box.is-live iframe { opacity: 1; }
.item-live {
  position: absolute; left: 8px; top: 8px; z-index: 2;
  display: inline-flex; align-items: center; gap: 5px; padding: 4px 7px 4px 6px; border-radius: 4px;
  background: rgba(14, 14, 16, 0.78); color: #fff; font: 500 10px/1 var(--mono); letter-spacing: 0.1em; text-transform: uppercase;
  opacity: 0; transform: translateY(-4px); transition: opacity 0.3s, transform 0.3s;
}
.item-live::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #ff5a36; animation: pulse 1.2s infinite; }
.item-box.is-live .item-live { opacity: 1; transform: none; }
.item-shadow {
  position: absolute; left: 7%; right: 7%; top: calc(var(--card-w) * 0.625 - 7px); height: 14px; z-index: 1;
  background: radial-gradient(closest-side, rgba(0, 0, 0, 0.42), transparent); border-radius: 50%;
  transition: transform 0.5s var(--ease-spring), opacity 0.5s;
}
.shelf-grid .item-shadow { display: none; }
.item-link:hover .item-box,
.item-link:focus-visible .item-box {
  transform: translateY(-14px) rotate(-0.6deg);
  box-shadow: 0 0 0 1px var(--box-edge), 0 26px 30px -18px rgba(0, 0, 0, 0.55);
}
.item-link:hover .item-shadow,
.item-link:focus-visible .item-shadow { transform: scaleX(0.82); opacity: 0.45; }
.item-link:focus-visible { outline: none; }
.item-link:focus-visible .item-box { outline: 2.5px solid var(--accent); outline-offset: 4px; }

.tag {
  position: relative; z-index: 3; display: block; margin: 0 10px; padding: 10px 12px 11px;
  background: var(--paper); color: var(--paper-ink); border-radius: 2px 2px 5px 5px;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.04), 0 8px 16px -10px rgba(0, 0, 0, 0.42);
  font: 400 12px/1.3 var(--mono);
  transform-origin: 50% -4px;
}
.tag::before {
  content: ""; position: absolute; top: -6px; left: 50%; width: 30px; height: 8px; margin-left: -15px;
  background: var(--clip); border-radius: 2px 2px 1px 1px; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}
.item-link:hover .tag { animation: swing 1.1s var(--ease-out); }
.tag-meta { display: flex; justify-content: space-between; gap: 8px; font-size: 10.5px; letter-spacing: 0.07em; text-transform: uppercase; color: var(--paper-ink-3); }
.tag-shelf { display: inline-flex; align-items: center; gap: 5px; }
.tag-shelf::before { content: ""; width: 7px; height: 7px; border-radius: 1.5px; background: hsl(var(--hue) 62% 46%); }
.tag-title { display: block; margin: 6px 0 5px; font: 720 18px/1.12 var(--display); font-stretch: 84%; letter-spacing: -0.01em; color: var(--paper-ink); }
.tag-medium { display: block; color: var(--paper-ink-2); font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ───────────── grid shelves (shelf + tag pages) ───────────── */

.shelf-grid {
  max-width: var(--maxw); margin: 0 auto; list-style: none;
  padding: 26px var(--gutter) 40px;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 270px), 1fr));
  column-gap: 34px; row-gap: 52px;
}
.shelf-grid .item-ledge { display: block; margin: 0 -17px; position: relative; z-index: 1; }
.shelf-grid .tag { margin-top: calc(-1 * var(--ledge-face-h) + 3px); }

/* ───────────── index ───────────── */

.index, .tagwall { max-width: var(--maxw); margin: 0 auto; padding: 56px var(--gutter) 24px; }
.index-head { display: grid; grid-template-columns: auto 1fr; gap: 6px 22px; align-items: baseline; }
.index-head h2, .tagwall h2, .more h2 { margin: 0; font: 780 clamp(30px, 3.2vw, 42px)/1 var(--display); font-stretch: 78%; letter-spacing: -0.02em; }
.index-head p { margin: 0; color: var(--ink-2); }
.index-controls { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 18px 0 10px; }
.search {
  display: flex; align-items: center; gap: 8px; flex: 1 1 280px; max-width: 420px;
  padding: 0 10px 0 14px; height: 44px; border-radius: 999px; border: 1.5px solid var(--line-strong); background: var(--paper);
  color: var(--paper-ink-3);
}
.search:focus-within { border-color: var(--ink); }
.search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--paper-ink); font: 450 15px var(--body); }
.search input::placeholder { color: var(--paper-ink-3); }
.search kbd { font: 500 11px var(--mono); border: 1px solid rgba(0, 0, 0, 0.18); border-radius: 4px; padding: 2px 6px; color: var(--paper-ink-3); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 999px;
  border: 1.5px solid var(--line); background: transparent; font: 550 13.5px/1 var(--body); color: var(--ink-2);
}
.chip[data-shelf]:not([data-shelf=""])::before { content: ""; width: 7px; height: 7px; border-radius: 1.5px; background: hsl(var(--hue) 62% 46%); }
.chip:hover { border-color: var(--line-strong); color: var(--ink); }
.chip.is-on { background: var(--ink); border-color: var(--ink); color: var(--wall); }
.sort select {
  height: 38px; border-radius: 999px; border: 1.5px solid var(--line); background: transparent; padding: 0 30px 0 14px;
  font: 550 13.5px var(--body); color: var(--ink-2); appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: calc(100% - 16px) 16px, calc(100% - 11px) 16px; background-size: 5px 5px; background-repeat: no-repeat;
}
.sort option { color: #1c1a16; }
.index-scroll { overflow-x: auto; }
.index-table { width: 100%; border-collapse: collapse; }
.index-table th {
  text-align: left; font: 500 10.5px var(--mono); letter-spacing: 0.09em; text-transform: uppercase; color: var(--ink-3);
  padding: 10px 12px; border-bottom: 1.5px solid var(--ink);
}
.index-table td { padding: 15px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.index-table tr { transition: background 0.15s; }
.index-table tbody tr:hover { background: var(--row-hover); }
.index-table .num { text-align: right; white-space: nowrap; }
.index-table td.no { font: 500 13px var(--mono); color: var(--ink-3); width: 1%; padding-top: 18px; }
.index-table td.ttl a { font: 700 19px/1.15 var(--display); font-stretch: 84%; text-decoration: none; letter-spacing: -0.01em; }
.index-table td.ttl a:hover { color: var(--accent); }
.index-table td.ttl a::after { content: ""; position: absolute; inset: 0; }
.index-table tr { position: relative; }
.index-table .sum { display: block; max-width: 62ch; margin-top: 4px; color: var(--ink-2); font-size: 14.5px; line-height: 1.45; }
.index-table td.shf, .index-table td.med, .index-table td.num { font: 400 12.5px/1.4 var(--mono); color: var(--ink-2); padding-top: 19px; }
.index-table td.shf { white-space: nowrap; }
.hue-dot { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 7px; background: hsl(var(--hue) 62% 46%); vertical-align: 0; }
.index-empty { padding: 30px 0; color: var(--ink-2); font-size: 17px; }
.peek {
  position: fixed; left: 0; top: 0; z-index: 40; width: 260px; aspect-ratio: 16 / 10; object-fit: cover;
  border-radius: 6px; box-shadow: 0 0 0 1px var(--box-edge), 0 24px 40px -18px rgba(0, 0, 0, 0.55);
  pointer-events: none; opacity: 0; transition: opacity 0.18s; background: var(--box-bg);
}
.peek.is-on { opacity: 1; }

.tagwall { padding-bottom: 72px; }
.tagwall-list { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 20px 0 0; }
.tagwall-list a {
  display: inline-flex; align-items: center; gap: 8px; padding: 7px 8px 7px 12px; border-radius: 4px;
  background: var(--paper); color: var(--paper-ink); text-decoration: none; font: 500 13px var(--mono);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.05), 0 4px 10px -8px rgba(0, 0, 0, 0.4);
  transition: transform 0.2s var(--ease-spring);
}
.tagwall-list a:hover { transform: translateY(-2px) rotate(-1deg); }
.tagwall-more { margin-top: 14px; }
.tagwall-more summary { cursor: pointer; font: 500 12.5px var(--mono); color: var(--ink-3); letter-spacing: 0.04em; width: max-content; }
.tagwall-more summary:hover { color: var(--ink); }
.tagwall-more .tagwall-list { margin-top: 12px; opacity: 0.85; }
.tagwall-list span { font-size: 11px; color: var(--paper-ink-3); background: rgba(0, 0, 0, 0.06); padding: 2px 6px; border-radius: 3px; }

/* ───────────── item page ───────────── */

.crumbs {
  max-width: var(--maxw); margin: 0 auto; padding: 10px var(--gutter) 0;
  display: flex; flex-wrap: wrap; gap: 8px; font: 500 12.5px var(--mono); color: var(--ink-3);
}
.crumbs a { text-decoration: none; color: var(--ink-2); }
.crumbs a:hover { color: var(--ink); text-decoration: underline; }
.item-head, .list-head { max-width: var(--maxw); margin: 0 auto; padding: clamp(24px, 4vw, 48px) var(--gutter) 26px; }
.item-title, .list-title {
  margin: 14px 0 0; font: 800 clamp(48px, 7.4vw, 112px)/0.88 var(--display);
  font-stretch: 76%; letter-spacing: -0.02em; word-spacing: 0.06em; max-width: 16ch; text-wrap: balance;
}
.stage { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }
.stage-frame {
  position: relative; width: 100%; aspect-ratio: 16 / 10; max-height: 84vh; min-height: 360px;
  border-radius: 6px; overflow: hidden; background: #0d0d10;
  box-shadow: 0 0 0 1px var(--box-edge), 0 0 0 12px var(--case-frame), 0 0 0 13px var(--box-edge), 0 50px 80px -50px rgba(0, 0, 0, 0.6);
  margin: 13px 13px 0;
  width: calc(100% - 26px);
  view-transition-name: stage;
}
.stage--tall .stage-frame { aspect-ratio: auto; height: min(88vh, 1040px); max-height: none; }
.stage-iframe, .stage-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #fff; }
.stage-poster { width: 100%; height: 100%; object-fit: cover; filter: saturate(0.9) brightness(0.92); }
.stage-run {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  display: inline-flex; align-items: center; gap: 10px; padding: 16px 24px 16px 20px; border-radius: 999px; border: 0;
  background: var(--accent); color: var(--accent-ink); font: 700 17px/1 var(--body);
  box-shadow: 0 14px 40px -12px rgba(0, 0, 0, 0.65); transition: transform 0.25s var(--ease-spring);
}
.stage-run:hover { transform: translate(-50%, -50%) scale(1.05); }
.stage-bar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin: 0; padding: 22px 0 0;
  position: relative;
}
.stage-bar::before { content: ""; position: absolute; left: 0; right: 0; top: -2px; height: 1px; }
.sbar-gap { flex: 1; }
.sbtn {
  display: inline-flex; align-items: center; gap: 7px; padding: 8px 12px; border-radius: 999px; border: 0; background: transparent;
  font: 550 14px/1 var(--body); color: var(--ink-2); text-decoration: none; white-space: nowrap;
}
.sbtn:hover { background: var(--wall-2); color: var(--ink); }
.sbtn.is-done { color: var(--accent); }
.stage > .case-base { margin-top: 13px; }
/* Shown only when the browser can't give the piece its GPU context: a paper label clipped to the ledge. */
.gl-note {
  position: relative; z-index: 2; display: block; max-width: 430px; margin: -4px 0 -6px 30px; padding: 12px 14px 13px;
  background: var(--paper); color: var(--paper-ink); border-radius: 2px 2px 5px 5px;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.04), 0 8px 16px -10px rgba(0, 0, 0, 0.42);
  font: 400 12.5px/1.45 var(--mono); transform: rotate(-0.6deg); transform-origin: 40px -4px;
}
.gl-note[hidden] { display: none; }
.gl-note::before {
  content: ""; position: absolute; top: -6px; left: 26px; width: 30px; height: 8px;
  background: var(--clip); border-radius: 2px 2px 1px 1px; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}
.gl-note-meta { display: flex; align-items: center; gap: 6px; font-size: 10.5px; letter-spacing: 0.07em; text-transform: uppercase; color: var(--paper-ink-3); }
.gl-note-meta::before { content: ""; width: 7px; height: 7px; border-radius: 1.5px; background: var(--accent); }
.gl-note-text { display: block; margin-top: 6px; color: var(--paper-ink-2); }

.item-body {
  max-width: var(--maxw); margin: 0 auto; padding: 40px var(--gutter) 30px;
  display: grid; grid-template-columns: minmax(0, 70ch) minmax(250px, 330px); justify-content: space-between; gap: 40px clamp(32px, 6vw, 96px);
}
.prose { font-size: 18px; line-height: 1.66; }
.prose > :first-child { margin-top: 0; }
.prose > p:first-child { font-size: clamp(19px, 1.7vw, 22px); line-height: 1.5; color: var(--ink); }
.prose p, .prose ul, .prose ol { margin: 0 0 1.05em; }
.prose h2 { font: 760 30px/1.1 var(--display); font-stretch: 82%; letter-spacing: -0.015em; margin: 2em 0 0.55em; }
.prose h3 { font: 700 21px/1.2 var(--display); font-stretch: 88%; margin: 1.6em 0 0.4em; }
.prose a { color: var(--ink); text-decoration-color: var(--accent); text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
.prose a:hover { color: var(--accent); }
.prose ul { list-style: none; padding-left: 0; }
.prose ul > li { position: relative; padding-left: 24px; margin: 0.35em 0; }
.prose ul > li::before { content: ""; position: absolute; left: 3px; top: 0.66em; width: 8px; height: 8px; border-radius: 2px; background: hsl(var(--hue, 14) 62% 48%); }
.prose ol { padding-left: 1.3em; }
.prose ol > li::marker { font: 500 0.85em var(--mono); color: var(--ink-3); }
.prose code { font: 0.86em var(--mono); background: var(--wall-2); padding: 0.12em 0.4em; border-radius: 4px; }
.prose pre { background: var(--wall-2); padding: 16px 18px; border-radius: 6px; overflow-x: auto; font-size: 14px; line-height: 1.5; }
.prose pre code { background: none; padding: 0; }
.prose blockquote { margin: 1.4em 0; padding: 4px 0 4px 20px; border-left: 3px solid hsl(var(--hue, 14) 62% 48%); color: var(--ink-2); }
.prose strong { font-weight: 700; }
.prose img { border-radius: 6px; margin: 1.2em 0; }
.prose hr { border: 0; height: 1px; background: var(--line); margin: 2em 0; }
.table-wrap { overflow-x: auto; margin: 1.2em 0; }
.prose table { border-collapse: collapse; font-size: 15px; width: 100%; }
.prose th, .prose td { border-bottom: 1px solid var(--line); padding: 8px 10px; text-align: left; }
.prose th { font: 500 11px var(--mono); text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-3); }

.label-card { position: sticky; top: 24px; align-self: start; padding-top: 10px; }
.label {
  position: relative; background: var(--paper); color: var(--paper-ink); padding: 26px 22px 20px; border-radius: 3px 3px 8px 8px;
  font: 400 13px/1.45 var(--mono);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.05), 0 18px 30px -18px rgba(0, 0, 0, 0.45);
  transform: rotate(0.8deg);
}
.label::before {
  content: ""; position: absolute; top: -8px; left: 50%; width: 46px; height: 11px; margin-left: -23px; border-radius: 2px; background: var(--clip);
}
.label-top { display: flex; justify-content: space-between; font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--paper-ink-3); }
.label-top a { color: inherit; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.label-top a::before { content: ""; width: 8px; height: 8px; border-radius: 2px; background: hsl(var(--hue) 62% 46%); }
.label-top a:hover { color: var(--paper-ink); }
.label-title { margin: 10px 0 14px; font: 780 30px/1 var(--display); font-stretch: 78%; letter-spacing: -0.02em; }
.label-dl { margin: 0; border-top: 1px dashed rgba(0, 0, 0, 0.2); }
.label-dl div { display: grid; grid-template-columns: 84px 1fr; gap: 10px; padding: 8px 0; border-bottom: 1px dashed rgba(0, 0, 0, 0.2); }
.label-dl dt { font-size: 10.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--paper-ink-3); padding-top: 2px; }
.label-dl dd { margin: 0; color: var(--paper-ink); }
.label-dl .muted { color: var(--paper-ink-3); }
.label-tags { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; padding: 0; margin: 14px 0 0; }
.label-tags a { display: inline-block; padding: 4px 7px; border-radius: 3px; background: rgba(0, 0, 0, 0.06); color: var(--paper-ink-2); text-decoration: none; font-size: 12px; }
.label-tags a:hover { background: var(--paper-ink); color: var(--paper); }
.label-made { margin: 16px 0 0; font-size: 11.5px; color: var(--paper-ink-3); }

.more { padding: 30px 0 0; }
.more h2 { max-width: var(--maxw); margin: 0 auto 4px; padding: 0 var(--gutter); }
.pager {
  max-width: var(--maxw); margin: 0 auto; padding: 18px var(--gutter) 70px;
  display: flex; justify-content: space-between; gap: 16px;
}
.pager a {
  display: inline-flex; align-items: center; gap: 12px; text-decoration: none; padding: 12px 16px; border-radius: 10px;
  border: 1.5px solid var(--line); max-width: 48%;
}
.pager a:hover { border-color: var(--ink); }
.pager small { display: block; font: 500 11px var(--mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 3px; }
.pager span { font: 700 18px/1.15 var(--display); font-stretch: 85%; }
.pager-next { margin-left: auto; text-align: right; }

.embed-dialog {
  border: 0; padding: 0; border-radius: 10px; max-width: min(560px, calc(100vw - 32px)); width: 100%;
  background: var(--paper); color: var(--paper-ink); box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.6);
}
.embed-dialog::backdrop { background: rgba(10, 10, 12, 0.55); backdrop-filter: blur(3px); }
.embed-dialog form { padding: 24px; }
.embed-dialog h2 { margin: 0 0 6px; font: 760 26px/1.1 var(--display); font-stretch: 82%; }
.embed-dialog p { margin: 0 0 14px; color: var(--paper-ink-2); }
.embed-dialog textarea {
  width: 100%; font: 12.5px/1.5 var(--mono); padding: 12px; border-radius: 6px; resize: vertical;
  border: 1px solid rgba(0, 0, 0, 0.18); background: #fff; color: #1c1a16;
}
.embed-dialog .btn { color: var(--paper-ink); border-color: rgba(0, 0, 0, 0.25); }
.embed-dialog .btn--primary { background: #1c1a16; color: #fbf8f1; }
.dialog-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 14px; }

/* ───────────── listing pages ───────────── */

.other-shelves {
  max-width: var(--maxw); margin: 0 auto; padding: 10px var(--gutter) 80px;
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px;
}
.other-shelves > span { font: 500 11px var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); margin-right: 6px; }
.other-shelves a { display: inline-flex; align-items: center; padding: 8px 12px; border: 1.5px solid var(--line); border-radius: 999px; text-decoration: none; font-weight: 600; font-size: 15px; }
.other-shelves a:hover { border-color: var(--ink); }
.other-shelves small { margin-left: 6px; font: 500 11px var(--mono); color: var(--ink-3); }
.plain-list { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter) 60px; }
.prose--about { max-width: 70ch; margin: 0 auto; padding: 10px var(--gutter) 80px; box-sizing: content-box; }
.about-page .list-head { max-width: calc(70ch + 2 * var(--gutter)); box-sizing: border-box; }
.notfound .shelf-unit { margin-bottom: 60px; }

/* ───────────── footer ───────────── */

.site-foot { margin-top: 20px; }
.foot-ledge { border-radius: 0; }
.foot-inner {
  max-width: var(--maxw); margin: 0 auto; padding: 34px var(--gutter) 44px;
  display: grid; grid-template-columns: auto 1fr; gap: 6px 30px; align-items: center;
  border-top: 1px solid var(--line);
}
.brand--foot { grid-row: span 3; align-self: start; }
.foot-stats, .foot-made { margin: 0; color: var(--ink-2); font-size: 15px; }
.foot-stats { font: 500 12.5px var(--mono); color: var(--ink-3); letter-spacing: 0.02em; }
.foot-links { display: flex; flex-wrap: wrap; gap: 4px 18px; margin-top: 8px; }
.foot-links a { display: inline-flex; align-items: center; gap: 5px; text-decoration: none; font-weight: 550; color: var(--ink-2); font-size: 15px; }
.foot-links a:hover { color: var(--ink); text-decoration: underline; }


/* ───────────── bigger projects + project links ───────────── */

.projects { max-width: var(--maxw); margin: 0 auto; padding: 40px var(--gutter) 8px; }
.projects-head { display: grid; grid-template-columns: auto 1fr; gap: 6px 22px; align-items: baseline; }
.projects-head h2 { margin: 0; font: 780 clamp(30px, 3.2vw, 42px)/1 var(--display); font-stretch: 78%; letter-spacing: -0.02em; }
.projects-head p { margin: 0; color: var(--ink-2); }
.project-list { list-style: none; padding: 0; margin: 22px 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 18px; }
.project {
  position: relative; background: var(--paper); color: var(--paper-ink); padding: 20px 20px 18px; border-radius: 3px 3px 7px 7px;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.05), 0 14px 24px -16px rgba(0, 0, 0, 0.45);
  transition: transform 0.35s var(--ease-spring);
}
.project::before { content: ""; position: absolute; top: -6px; left: 22px; width: 30px; height: 8px; border-radius: 2px; background: var(--clip); }
.project:hover { transform: translateY(-3px) rotate(-0.4deg); }
.project { display: grid; grid-template-columns: minmax(0, 1fr); align-content: start; }
.project-poster { width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 4px; margin: 0 0 14px; box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.12); }
.project:only-child { grid-column: 1 / -1; max-width: 900px; grid-template-columns: 300px minmax(0, 1fr); grid-auto-rows: min-content; column-gap: 26px; padding: 18px; }
.project:only-child > .project-poster { grid-row: 1 / span 5; margin: 0; align-self: start; }
.project:only-child > :not(.project-poster) { grid-column: 2; }
.project:only-child::before { left: 50%; margin-left: -15px; }
@media (max-width: 760px) {
  .project:only-child { grid-template-columns: minmax(0, 1fr); }
  .project:only-child > .project-poster { grid-row: auto; margin-bottom: 14px; }
  .project:only-child > :not(.project-poster) { grid-column: 1; }
}
.project-meta { display: flex; align-items: center; gap: 7px; margin: 0; font: 500 11.5px var(--mono); color: var(--paper-ink-3); }
.project-name { margin: 10px 0 8px; font: 780 26px/1 var(--display); font-stretch: 80%; letter-spacing: -0.015em; }
.project-name a { text-decoration: none; }
.project-name a::after { content: ""; position: absolute; inset: 0; }
.project-blurb { margin: 0; font-size: 15px; line-height: 1.45; color: var(--paper-ink-2); }
.project-onshelf { position: relative; z-index: 1; margin: 12px 0 0; padding-top: 10px; border-top: 1px dashed rgba(0, 0, 0, 0.2); font: 500 12px/1.5 var(--mono); color: var(--paper-ink-3); }
.project-onshelf a { color: var(--paper-ink); }
.project-links { position: relative; z-index: 1; display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 14px 0 0; }
.project-links a { display: inline-flex; align-items: center; gap: 5px; font: 600 13.5px var(--body); color: var(--paper-ink); text-decoration: underline; text-decoration-color: rgba(0, 0, 0, 0.25); text-underline-offset: 3px; }
.project-links a:hover { text-decoration-color: var(--accent); }
.about-page .projects { max-width: calc(70ch + 2 * var(--gutter)); padding-bottom: 80px; }

.item-project { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin: 22px 0 0; }
.item-project a {
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px;
  border: 1.5px solid var(--line-strong); text-decoration: none; font: 550 14.5px/1 var(--body); color: var(--ink-2);
}
.item-project a:hover { border-color: var(--ink); color: var(--ink); }
.item-project-main { background: var(--paper); color: var(--paper-ink) !important; border-color: transparent !important; box-shadow: 0 6px 14px -10px rgba(0, 0, 0, 0.45); }
.item-project-main strong { font-weight: 750; }
.label-dl dd a { color: inherit; }
@media (max-width: 760px) { .projects-head { grid-template-columns: 1fr; } }

/* ───────────── motion ───────────── */

@keyframes drop {
  0% { transform: translateY(-0.55em) rotate(-4deg); opacity: 0; }
  55% { transform: translateY(0.05em) rotate(0.6deg); opacity: 1; }
  78% { transform: translateY(-0.02em) rotate(-0.2deg); }
  100% { transform: none; opacity: 1; }
}
@keyframes settle {
  0% { transform: translateY(-26px); opacity: 0; }
  60% { transform: translateY(2px); opacity: 1; }
  100% { transform: none; opacity: 1; }
}
@keyframes swing {
  0% { transform: rotate(0); }
  18% { transform: rotate(3deg); }
  40% { transform: rotate(-2deg); }
  62% { transform: rotate(1deg); }
  82% { transform: rotate(-0.4deg); }
  100% { transform: rotate(0); }
}
@keyframes pulse { 50% { opacity: 0.25; } }
@keyframes roll { 0% { transform: rotate(0); } 100% { transform: rotate(180deg); } }

.js-anim .display .drop { animation: drop 0.95s var(--ease-out) both; animation-delay: calc(var(--i) * 110ms + 80ms); }
.js-anim .shelf-unit:not(.is-in) .item,
.js-anim .shelf-grid:not(.is-in) .item { opacity: 0; }
.js-anim .is-in .item { animation: settle 0.75s var(--ease-out) both; animation-delay: calc(var(--k, 0) * 70ms); }

@view-transition { navigation: auto; }
::view-transition-group(stage) { animation-duration: 0.5s; animation-timing-function: var(--ease-out); }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: 0.28s; }

@media (prefers-reduced-motion: reduce) {
  @view-transition { navigation: none; }
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition-duration: 0.01ms !important; }
  .js-anim .shelf-unit:not(.is-in) .item, .js-anim .shelf-grid:not(.is-in) .item { opacity: 1; }
}

/* ───────────── responsive ───────────── */

@media (max-width: 1080px) {
  .window { grid-template-columns: 1fr; }
  .item-body { grid-template-columns: 1fr; }
  .label-card { position: static; max-width: 420px; }
  .index-table th:nth-child(4), .index-table td.med { display: none; }
}
@media (max-width: 760px) {
  :root { --card-w: min(72vw, 280px); --lift: 18px; }
  body { font-size: 16px; }
  .site-head { gap: 12px; padding-top: 14px; padding-bottom: 14px; flex-wrap: wrap; }
  .site-nav { order: 3; width: 100%; gap: 18px; border-top: 1px solid var(--line); padding-top: 8px; }
  .tool--dice span { display: none; }
  .brand-name { font-size: 19px; }
  .window-stats { grid-template-columns: repeat(2, auto); gap: 14px 34px; }
  .case-label { grid-template-columns: 1fr; padding: 0 4px; }
  .case-label > a { grid-row: auto; }
  .case-sum { padding-top: 6px; }
  .case-glass, .stage-frame { margin: 9px 9px 0; box-shadow: 0 0 0 1px var(--box-edge), 0 0 0 8px var(--case-frame), 0 0 0 9px var(--box-edge), 0 30px 50px -30px rgba(0, 0, 0, 0.6); }
  .stage-frame { width: calc(100% - 18px); aspect-ratio: 4 / 5; max-height: 76vh; }
  .stage--tall .stage-frame { height: 78vh; }
  .shelf-head { grid-template-columns: auto auto 1fr; }
  .shelf-blurb { grid-column: 1 / -1; grid-row: 2; margin-top: 6px; }
  .nudge { display: none; }
  .shelf-nav { justify-self: end; }
  .index-head { grid-template-columns: 1fr; }
  .index-table th:nth-child(3), .index-table td.shf,
  .index-table th:nth-child(5), .index-table td:nth-child(5) { display: none; }
  .index-table td.ttl a { font-size: 18px; }
  .index-table .sum { font-size: 14px; }
  .sbtn span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .sbtn { padding: 10px; }
  .sbtn[data-act="fullscreen"] span, .sbtn[href$="/play/"] span { position: static; width: auto; height: auto; overflow: visible; clip-path: none; }
  .pager { flex-direction: column; }
  .pager a { max-width: 100%; }
  .foot-inner { grid-template-columns: 1fr; }
  .brand--foot { grid-row: auto; }
  .peek { display: none; }
}
@media (hover: none) {
  .peek { display: none; }
}
@media print {
  .site-head, .site-foot, .stage, .shelf-unit, .pager, .more { display: none; }
  html { background: #fff; }
}
