/* ═══════════════════════════════════════════════════════════════════
   TACTIC: Work, layout B, the bookcase
   Shelf rows of books standing upright. Closed, a piece is a vertical
   spine: a sliver of its own footage, its type running bottom to top.
   Roll across the shelf and one book opens laterally into the film at
   its own 16:9 ratio, captioned in a clear band beneath the frame.
   Row height never changes, so nothing on the page ever jumps.

   Loaded by work-b.html only, after styles.css / styles-v3.css.
   Tokens come from styles.css (:root).
   ═══════════════════════════════════════════════════════════════════ */

.case-section { padding: clamp(36px, 4.5vw, 64px) 0 clamp(80px, 10vw, 140px); }

/* ───────── the bar: count · categories · tools ───────── */
.case-bar {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: clamp(16px, 3vw, 48px);
  flex-wrap: wrap;
  padding-bottom: 16px;
  margin-bottom: clamp(26px, 3.2vw, 46px);
  border-bottom: 1px solid var(--c-line);
}
.case-index {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px 18px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.case-index__count {
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--c-muted);
  margin-right: 6px;
}
.case-index__btn {
  appearance: none;
  border: 0;
  background: none;
  padding: 4px 0;
  color: var(--c-muted);
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  position: relative;
  transition: color 220ms var(--ease);
}
.case-index__btn i {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--cat, var(--c-bone));
  flex: none;
  transition: box-shadow 220ms var(--ease);
}
.case-index__btn b { font-weight: 400; opacity: 0.5; }
.case-index__btn::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1px;
  background: var(--cat, var(--c-bone));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 300ms var(--ease);
}
.case-index__btn:hover { color: var(--c-bone); }
.case-index__btn.is-on { color: var(--c-bone); }
.case-index__btn.is-on::after { transform: scaleX(1); }
.case-index__btn.is-on i { box-shadow: 0 0 0 3px rgba(236,233,225,0.08); }
.case-index__btn:focus-visible { outline: 1px solid var(--c-cream); outline-offset: 4px; }

.case-tools { display: flex; align-items: center; gap: clamp(14px, 2vw, 26px); flex-wrap: wrap; }
.case-hint {
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--c-muted);
  opacity: 0;
  transition: opacity 320ms var(--ease);
}
.case-hint.is-on { opacity: 1; }
.case-dial {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--c-muted);
  cursor: pointer;
}
.case-dial input[type="range"] {
  -webkit-appearance: none; appearance: none;
  width: 78px; height: 16px; background: transparent; margin: 0; cursor: pointer;
}
.case-dial input[type="range"]::-webkit-slider-runnable-track { height: 1px; background: var(--c-line-2); }
.case-dial input[type="range"]::-moz-range-track { height: 1px; background: var(--c-line-2); }
.case-dial input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 9px; height: 9px; border-radius: 50%;
  background: var(--c-bone); border: 0; margin-top: -4px;
  transition: transform 200ms var(--ease), background 200ms var(--ease);
}
.case-dial input[type="range"]::-moz-range-thumb { width: 9px; height: 9px; border-radius: 50%; background: var(--c-bone); border: 0; }
.case-dial:hover input[type="range"]::-webkit-slider-thumb { background: var(--c-cream); transform: scale(1.25); }
.case-dial input[type="range"]:focus-visible { outline: 1px solid var(--c-cream); outline-offset: 4px; }

.case-sound {
  appearance: none;
  display: inline-flex; align-items: center; gap: 9px;
  padding: 8px 13px;
  border-radius: 999px;
  border: 1px solid var(--c-line-2);
  background: transparent;
  color: var(--c-bone-2);
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  cursor: pointer;
  transition: color 200ms var(--ease), border-color 200ms var(--ease), background 200ms var(--ease);
}
.case-sound svg { width: 13px; height: 13px; display: block; }
.case-sound .i-on { display: none; }
.case-sound:hover { color: var(--c-bone); border-color: var(--c-bone-2); }
.case-sound[aria-pressed="true"] { color: var(--c-ink); background: var(--c-cream); border-color: var(--c-cream); }
.case-sound[aria-pressed="true"] .i-off { display: none; }
.case-sound[aria-pressed="true"] .i-on { display: block; }
.case-sound:focus-visible { outline: 1px solid var(--c-cream); outline-offset: 3px; }

/* REVIEW ONLY: the A/B link. Strip before launch. */
.case-ab {
  font-family: var(--f-mono); font-size: 10px; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--c-muted); text-decoration: none;
  border-bottom: 1px solid var(--c-line-2); padding-bottom: 2px;
}
.case-ab:hover { color: var(--c-rust); border-color: var(--c-rust); }

/* ───────── the bookcase ─────────
   --row-h        shelf height = the open frame's height
   --frame-r      open frame ratio, width / height (0.8 = Instagram 4:5)
   --spine-target the spine width the dial aims for; sets books per row
   --spine-min    the thinnest a spine may ever get
   --gap          the hairline between two books
   JS sets --open (px) on the case and --spine (px) per row. */
.bookcase {
  --row-h: clamp(392px, 52vh, 620px);
  --frame-r: 0.8;
  --spine-target: 152px;
  --spine-min: 62px;
  --spine-h: 62px;      /* the flat spine height when the case turns to face you */
  --gap: 5px;
  --row-gap: clamp(26px, 3.2vw, 52px);
  --open-dur: 620ms;
  --spine-dim: 0.66;
  display: flex;
  flex-direction: column;
  gap: var(--row-gap);
  min-height: 320px;
}
.bookcase[data-scale="0"] { --row-h: clamp(320px, 42vh, 486px); }
.bookcase[data-scale="2"] { --row-h: clamp(452px, 64vh, 760px); }

.bookcase__row {
  position: relative;
  display: flex;
  justify-content: flex-start;
  gap: var(--gap);
  height: var(--row-h);
}
/* the shelf board the books stand on */
.bookcase__row::after {
  content: "";
  position: absolute;
  left: 0; right: 0;
  bottom: calc(var(--row-gap) / -2);
  height: 1px;
  background: linear-gradient(to right, transparent, var(--c-line) 6%, var(--c-line) 94%, transparent);
}

/* a book: closed it is a spine, open it is a 4:5 frame */
.book {
  position: relative;
  flex: 0 0 var(--spine, 140px);
  width: var(--spine, 140px);
  height: 100%;
  overflow: hidden;
  border-radius: 3px;
  background: var(--c-ink-2);
  cursor: pointer;
  isolation: isolate;
  outline: none;
  box-shadow: inset 1px 0 0 rgba(236,233,225,0.07);
  transition: flex-basis var(--open-dur) var(--ease), width var(--open-dur) var(--ease),
              box-shadow 400ms var(--ease);
  will-change: flex-basis;
}
.book.is-open {
  flex-basis: var(--open);
  width: var(--open);
  box-shadow: 0 24px 60px rgba(0,0,0,0.55), inset 0 0 0 1px rgba(236,233,225,0.08);
}
.book:focus-visible::after {
  content: "";
  position: absolute; inset: 0;
  border: 1px solid var(--c-cream);
  border-radius: inherit;
  pointer-events: none;
  z-index: 8;
}
.book.is-away { background: var(--c-ink-3); }

/* the frame: poster + lazy video. This exact node flies into the preview. */
.book__media { position: absolute; inset: 0; z-index: 0; }
.frame { position: absolute; inset: 0; overflow: hidden; background: #000; }
.frame__poster, .frame__video {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: var(--focus, 50% 50%);
  display: block;
  pointer-events: none;
  transform: scale(1.07);
  transition: filter var(--open-dur) var(--ease), transform var(--open-dur) var(--ease), opacity 450ms var(--ease);
}
.frame__video { opacity: 0; }
.frame.is-live .frame__video { opacity: 1; }
.book:not(.is-open) .frame__poster,
.book:not(.is-open) .frame__video { filter: saturate(0.55) brightness(var(--spine-dim)) contrast(1.06); }
.book:not(.is-open):hover .frame__poster,
.book:not(.is-open):hover .frame__video { filter: saturate(0.95) brightness(0.84) contrast(1.02); }
.book.is-open .frame__poster,
.book.is-open .frame__video { filter: saturate(1) contrast(1.04); transform: scale(1); }
/* the ghost left standing in the row while the frame is away in the preview */
.book__ghost {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: var(--focus, 50% 50%);
  filter: saturate(0.35) brightness(0.32);
  z-index: 0;
}
/* closed veil: the spine reads as an object, not a video still */
.book__veil {
  position: absolute; inset: 0;
  z-index: 1;
  background: linear-gradient(to top, rgba(8,8,8,0.90) 0%, rgba(8,8,8,0.52) 34%, rgba(8,8,8,0.18) 100%);
  opacity: 1;
  transition: opacity 420ms var(--ease);
}
.book:not(.is-open):hover .book__veil { opacity: 0.72; }
.book.is-open .book__veil { opacity: 0; }

/* ───────── closed: the spine ───────── */
.book__spine {
  position: absolute; inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 16px 8px 20px;
  pointer-events: none;
  opacity: 1;
  transition: opacity 260ms var(--ease);
}
.book.is-open .book__spine { opacity: 0; transition-duration: 160ms; }
.book__num {
  font-family: var(--f-mono);
  font-size: 9px;
  letter-spacing: 0.22em;
  color: var(--c-cream);
  flex: none;
}
.book__vert {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  display: flex;
  align-items: center;
  gap: 16px;
  max-height: 100%;
  overflow: hidden;
  padding: 4px 0;
}
.book__client {
  font-family: var(--f-mono);
  font-size: 9.5px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--c-cream);
  white-space: nowrap;
  flex: 0 0 auto;
}
.book__title {
  font-family: var(--f-display);
  font-weight: 500;
  font-size: 15px;
  letter-spacing: 0.004em;
  color: var(--c-bone);
  white-space: nowrap;
  /* the client always survives; a long title gives way to an ellipsis */
  flex: 0 1 auto;
  min-height: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
.book__year {
  font-family: var(--f-mono);
  font-size: 9px;
  letter-spacing: 0.18em;
  color: var(--c-muted);
  flex: none;
}
/* the category band: retired 2026-11-01 (a colored bar under every spine read as paint) */
.book__band {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 3px;
  background: var(--cat, var(--c-bone));
  z-index: 4;
  transition: height 400ms var(--ease), opacity 400ms var(--ease);
}
.book.is-open .book__band { height: 2px; opacity: 0.85; }

/* ───────── open: the frame's own meta ───────── */
.book__open {
  position: absolute; inset: 0;
  z-index: 3;
  pointer-events: none;
  opacity: 0;
  transition: opacity 300ms var(--ease) 150ms;
}
.book.is-open .book__open { opacity: 1; }
.book__cat {
  position: absolute;
  top: 16px; left: 16px;
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--f-mono);
  font-size: 9px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--c-bone);
  background: rgba(8,8,8,0.5);
  -webkit-backdrop-filter: blur(5px);
  backdrop-filter: blur(5px);
  padding: 6px 10px;
  border-radius: 2px;
}
.book__cat i { width: 6px; height: 6px; border-radius: 50%; background: var(--cat, var(--c-bone)); }
.book__palette { position: absolute; top: 20px; right: 16px; display: flex; gap: 4px; }
.book__palette i, .preview__palette i {
  width: 9px; height: 9px;
  border-radius: 50%;
  border: 1px solid rgba(236,233,225,0.35);
  box-shadow: 0 1px 4px rgba(0,0,0,0.5);
  display: block;
}
.book__foot {
  position: absolute;
  inset: auto 0 0 0;
  padding: clamp(18px, 2vw, 26px) clamp(18px, 2vw, 24px) clamp(20px, 2.2vw, 26px);
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  background: linear-gradient(to top, rgba(8,8,8,0.9) 0%, rgba(8,8,8,0.45) 55%, transparent 100%);
}
.book__foot-client {
  display: block;
  font-family: var(--f-mono);
  font-size: 9.5px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--c-cream);
  margin-bottom: 6px;
}
.book__foot-title {
  display: block;
  font-family: var(--f-display);
  font-weight: 500;
  font-size: clamp(18px, 1.5vw, 24px);
  letter-spacing: -0.012em;
  line-height: 1.14;
  color: var(--c-bone);
}
.book__foot-title small { font-size: 0.7em; color: var(--c-bone-2); margin-left: 7px; letter-spacing: 0; }
.book__watch {
  flex: none;
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--f-mono);
  font-size: 9px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--c-bone);
  border: 1px solid rgba(236,233,225,0.34);
  padding: 9px 13px;
  border-radius: 999px;
  transition: background 220ms var(--ease), border-color 220ms var(--ease);
}
.book__watch svg { width: 8px; height: 8px; display: block; }
.book.is-open:hover .book__watch { background: var(--c-bone); border-color: var(--c-bone); color: var(--c-ink); }
.book__ear {
  position: absolute;
  top: 18px; right: 16px;
  z-index: 5;
  display: none;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--c-cream);
  animation: case-ear 1.7s ease-in-out infinite;
}
.book.is-live-audio .book__ear { display: block; }
.book.is-open.is-live-audio .book__ear { top: 22px; right: 62px; }
@keyframes case-ear {
  0%, 100% { box-shadow: 0 0 0 3px rgba(201,184,148,0.24); }
  50% { box-shadow: 0 0 0 7px rgba(201,184,148,0.06); }
}
.bookcase.is-previewing .book { pointer-events: none; }

/* ───────── preview: the frame lifts off the shelf ───────── */
.preview { position: fixed; inset: 0; z-index: 9100; display: none; align-items: center; justify-content: center; padding: clamp(16px, 3vw, 40px); }
.preview.is-open { display: flex; }
.preview__backdrop {
  position: absolute; inset: 0;
  background: rgba(5,5,5,0.92);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  opacity: 0;
  transition: opacity 380ms var(--ease);
  cursor: pointer;
}
.preview.is-in .preview__backdrop { opacity: 1; }
.preview__inner {
  position: relative; z-index: 1;
  display: flex; align-items: stretch;
  width: 100%; max-width: 1600px;
  max-height: calc(100vh - clamp(32px, 6vw, 80px));
  pointer-events: none;
}
.preview__stagewrap { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; justify-content: center; pointer-events: none; }
.preview__stage {
  position: relative;
  width: 100%;
  max-width: calc((100vh - clamp(120px, 14vw, 180px)) * var(--stage-r, 1.7778));
  aspect-ratio: var(--stage-r, 16 / 9);
  background: #000;
  border-radius: 4px;
  pointer-events: auto;
  box-shadow: 0 36px 100px rgba(0,0,0,0.72);
  opacity: 0;
  transition: opacity 200ms var(--ease);
}
.preview.is-in .preview__stage { opacity: 1; }
.preview__stage .frame { border-radius: 4px; }
.preview__stage .frame__poster, .preview__stage .frame__video { filter: none; transform: none; }

/* controls */
.pc {
  position: absolute; left: 0; right: 0; bottom: 0;
  z-index: 5;
  display: flex; align-items: center; gap: 10px;
  padding: 28px 14px 12px;
  background: linear-gradient(to top, rgba(8,8,8,0.86), transparent);
  color: var(--c-bone);
  opacity: 0;
  transition: opacity 260ms var(--ease);
  border-radius: 0 0 4px 4px;
}
.preview.is-ready .pc { opacity: 1; }
.preview.is-ready.is-idle .pc { opacity: 0; }
.preview__stage:hover .pc, .pc:focus-within { opacity: 1 !important; }
.pc__btn {
  appearance: none; border: 0; background: transparent; color: var(--c-bone);
  width: 34px; height: 34px; border-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer; flex: none;
  transition: background 200ms var(--ease);
}
.pc__btn svg { width: 14px; height: 14px; display: block; }
.pc__btn:hover { background: rgba(236,233,225,0.12); }
.pc__btn:focus-visible { outline: 1px solid var(--c-cream); outline-offset: 2px; }
.pc__btn .i-alt { display: none; }
.pc__btn.is-alt .i-main { display: none; }
.pc__btn.is-alt .i-alt { display: block; }
.pc__scrub { position: relative; flex: 1 1 auto; height: 22px; cursor: pointer; display: flex; align-items: center; }
.pc__scrub::before { content: ""; position: absolute; left: 0; right: 0; height: 2px; background: rgba(236,233,225,0.22); }
.pc__buffered, .pc__played { position: absolute; left: 0; height: 2px; width: 0; }
.pc__buffered { background: rgba(236,233,225,0.35); }
.pc__played { background: var(--c-cream); }
.pc__played::after {
  content: ""; position: absolute; right: -5px; top: 50%;
  width: 10px; height: 10px; border-radius: 50%; background: var(--c-bone);
  transform: translateY(-50%) scale(0);
  transition: transform 200ms var(--ease);
}
.pc__scrub:hover .pc__played::after { transform: translateY(-50%) scale(1); }
.pc__time {
  font-family: var(--f-mono); font-size: 10px; letter-spacing: 0.14em;
  color: var(--c-bone-2); flex: none; min-width: 82px; text-align: right;
  font-variant-numeric: tabular-nums;
}

/* the notes beside the frame */
.preview__side {
  flex: 0 0 300px; width: 300px;
  padding: 8px 8px 8px 34px;
  display: flex; flex-direction: column; gap: 15px;
  color: var(--c-bone);
  pointer-events: auto;
  opacity: 0;
  transform: translateX(12px);
  transition: opacity 380ms var(--ease), transform 500ms var(--ease);
  align-self: center;
  max-height: 100%;
  overflow-y: auto;
}
.preview.is-ready .preview__side { opacity: 1; transform: none; }
.preview__count { margin: 0; font-family: var(--f-mono); font-size: 10px; letter-spacing: 0.22em; color: var(--c-muted); }
.preview__cat {
  display: inline-flex; align-items: center; gap: 8px; margin: 0;
  font-family: var(--f-mono); font-size: 10px; letter-spacing: 0.22em;
  text-transform: uppercase; color: var(--c-bone-2);
}
.preview__cat i { width: 7px; height: 7px; border-radius: 50%; background: var(--cat, var(--c-bone)); }
.preview__client { margin: 0; font-family: var(--f-mono); font-size: 10px; letter-spacing: 0.24em; text-transform: uppercase; color: var(--c-cream); }
.preview__title {
  margin: -6px 0 0;
  font-family: var(--f-display); font-weight: 500;
  font-size: clamp(24px, 2.2vw, 34px);
  line-height: 1.08; letter-spacing: -0.02em; color: var(--c-bone);
}
.preview__meta {
  margin: 0; font-family: var(--f-mono); font-size: 10px; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--c-muted);
  display: flex; flex-wrap: wrap; gap: 6px 14px;
}
.preview__palette { display: flex; gap: 5px; }
.preview__note { margin: 0; font-size: 14px; line-height: 1.62; color: var(--c-bone-2); }
.preview__note:empty { display: none; }
.preview__nav { display: flex; gap: 8px; margin-top: 6px; }
.preview__navbtn {
  appearance: none; flex: 1 1 0;
  border: 1px solid var(--c-line-2); background: transparent; color: var(--c-bone);
  font-family: var(--f-mono); font-size: 10px; letter-spacing: 0.2em; text-transform: uppercase;
  padding: 11px 12px; border-radius: 999px; cursor: pointer;
  transition: border-color 200ms var(--ease), color 200ms var(--ease);
}
.preview__navbtn:hover { border-color: var(--c-cream); color: var(--c-cream); }
.preview__navbtn:focus-visible { outline: 1px solid var(--c-cream); outline-offset: 3px; }
.preview__side .btn { align-self: flex-start; margin-top: 2px; }
.preview__close {
  position: fixed; top: 18px; right: 18px; z-index: 3;
  width: 42px; height: 42px; border-radius: 999px;
  border: 1px solid rgba(236,233,225,0.3);
  background: rgba(8,8,8,0.6);
  color: var(--c-bone);
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer; pointer-events: auto; opacity: 0;
  transition: background 200ms var(--ease), border-color 200ms var(--ease), transform 200ms var(--ease), opacity 260ms var(--ease);
}
.preview.is-in .preview__close { opacity: 1; }
.preview__close:hover { background: var(--c-rust); border-color: var(--c-rust); transform: rotate(90deg); }
.preview__close:focus-visible { outline: 1px solid var(--c-cream); outline-offset: 3px; }

/* ───────── tuning panel (?tune=1) ───────── */
.case-tune {
  position: fixed; right: 16px; bottom: 16px; z-index: 9200;
  width: 250px; padding: 14px 14px 10px;
  background: rgba(14,14,14,0.94);
  border: 1px solid var(--c-line-2); border-radius: 6px;
  color: var(--c-bone); font-family: var(--f-mono); font-size: 10px;
  letter-spacing: 0.12em; text-transform: uppercase;
  display: grid; gap: 9px;
}
.case-tune label { display: grid; grid-template-columns: 1fr auto; gap: 4px 8px; align-items: center; }
.case-tune label span:last-child { color: var(--c-cream); }
.case-tune input[type="range"] { grid-column: 1 / -1; width: 100%; accent-color: #c9b894; }
.case-tune select { grid-column: 1 / -1; background: #111; color: var(--c-bone); border: 1px solid var(--c-line-2); font: inherit; padding: 5px; }
.case-tune__title { color: var(--c-cream); letter-spacing: 0.24em; }

/* ───────── narrow: the shelf turns to face you ───────── */
@media (max-width: 1100px) {
  .preview__side { flex-basis: 262px; width: 262px; padding-left: 26px; }
}
@media (max-width: 860px) {
  .bookcase { --row-gap: 6px; }
  .bookcase__row { flex-direction: column; height: auto; justify-content: flex-start; gap: 6px; }
  .bookcase__row::after { display: none; }
  .book {
    flex: 0 0 var(--spine-h, 62px);
    width: 100%;
    height: var(--spine-h, 62px);
    box-shadow: inset 0 1px 0 rgba(236,233,225,0.07);
    transition: flex-basis var(--open-dur) var(--ease), height var(--open-dur) var(--ease);
  }
  .book.is-open { flex-basis: var(--open-h); height: var(--open-h); width: 100%; }
  .book__veil { background: linear-gradient(to right, rgba(8,8,8,0.92) 0%, rgba(8,8,8,0.6) 55%, rgba(8,8,8,0.3) 100%); }
  .book__spine { flex-direction: row; align-items: center; justify-content: flex-start; gap: 12px; padding: 0 16px 0 18px; }
  .book__vert { writing-mode: horizontal-tb; transform: none; flex: 1 1 auto; min-width: 0; gap: 10px; align-items: baseline; }
  .book__client { font-size: 9px; letter-spacing: 0.16em; }
  .book__title { font-size: 14px; flex: 1 1 auto; min-width: 0; min-height: 0; }
  .book__year { opacity: 0.7; }
  .book__band { top: 0; bottom: 0; left: 0; right: auto; width: 3px; height: auto; }
  .book.is-open .book__band { width: 3px; height: auto; }
  .book__num { order: -1; }

  .preview { padding: 0; align-items: center; }
  .preview__inner { flex-direction: column; justify-content: center; max-height: 100vh; max-height: 100dvh; width: 100%; overflow-y: auto; padding: 72px 0 0; }
  .preview__stagewrap { flex: none; width: 100%; }
  .preview__stage { max-width: 100%; border-radius: 0; box-shadow: none; }
  .preview__side {
    flex: none; width: 100%;
    padding: 22px var(--gutter) calc(28px + env(safe-area-inset-bottom, 0px));
    transform: translateY(10px); max-height: none; overflow: visible;
  }
  .preview__title { font-size: 26px; }
  .preview__close { top: 14px; right: 14px; }
  .pc { padding: 22px 8px 8px; }
  .pc__time { min-width: 0; }
}
@media (max-width: 640px) {
  .case-bar { gap: 14px; }
  .case-tools { width: 100%; justify-content: flex-end; }
  .case-dial { display: none; }
  .book__foot-title { font-size: 17px; }
}
@media (hover: none) {
  .book:not(.is-open):hover .frame__poster,
  .book:not(.is-open):hover .frame__video { filter: saturate(0.55) brightness(var(--spine-dim)) contrast(1.06); }
  .pc, .preview.is-ready.is-idle .pc { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .book, .book__spine, .book__open, .book__veil, .frame__poster, .frame__video,
  .preview__backdrop, .preview__stage, .preview__side, .preview__close { transition-duration: 1ms !important; }
  .book__ear { animation: none; }
}

/* Home (2026-10-26): Selected Work runs the same shelf, sound only in the bar */
.case-bar--home { justify-content: flex-end; margin-top: clamp(24px, 3vw, 40px); }
.selected-work .bookcase { margin-bottom: clamp(28px, 3vw, 44px); }

/* ═══════ Finish, design pass 2026-11-01 (fix pass applied) ═══════
   The film opens at its own 16:9 ratio, never a 4:5 crop, so titles
   baked into a film read whole. Its caption sits in a clear band under
   the frame instead of over the picture. Spines carry legible type and
   no ornament: no index numbers, no foot bands, no palette swatches, no
   shelf board line, no category dots (category is named in words).
   Labels use the shared mono spec; the caption title is a --d3 subhead.
   Selectors carry .bookcase / .case-index so they hold over finish.css. */
.bookcase {
  --frame-r: 1.7778;
  --cap-h: 88px;
  --open-max: 0.62;
  --spine-target: 150px;
  --row-gap: clamp(36px, 3.6vw, 56px);
}
.bookcase .bookcase__row { height: var(--row-live, var(--row-h)); }
.bookcase .bookcase__row::after { content: none; display: none; }

.bookcase .book { border-radius: 2px; box-shadow: none; }
.bookcase .book.is-open { background: transparent; box-shadow: none; }
.bookcase .book__media {
  bottom: 0; overflow: hidden; border-radius: 2px;
  transition: bottom var(--open-dur) var(--ease);
}
/* every book shares the frame's top and bottom edge; the band below
   the shelf belongs to the open piece's caption */
.bookcase .book { background: transparent; }
.bookcase .book__media, .bookcase .book__veil, .bookcase .book__spine { bottom: var(--cap-h); }
.bookcase .book__media { background: var(--c-ink-2); }
.bookcase .book__veil { border-radius: 2px; }
.bookcase .book__band, .bookcase .book__num, .bookcase .book__palette, .preview__palette { display: none !important; }
/* category dots: gone everywhere (filters, captions, viewer) */
.case-index__btn i, .book__cat i, .preview__cat i { display: none !important; }

/* the focus ring traces the frame, not the caption band */
.bookcase .book:focus-visible::after { bottom: var(--cap-h); border-radius: 2px; }

/* closed: the spine. Shared type for every treatment. */
.bookcase .book__client { font-size: var(--label-size, 12px); line-height: 16px; letter-spacing: var(--label-track, .06em); color: var(--label-color, rgba(236,233,225,.64)); }
.bookcase .book__title { font-size: 15px; line-height: 1.2; letter-spacing: -0.005em; white-space: normal; overflow: visible; text-overflow: clip; }
.bookcase .book__year { font-size: var(--label-size, 12px); letter-spacing: var(--label-track, .06em); color: var(--label-color, rgba(236,233,225,.64)); }

/* desktop: labels lie flat at the spine's foot, inset 16px, client over
   title, on a soft ink fade. work-shelf-b.js picks one treatment for the
   case (lbl-full, lbl-client, lbl-vert) from the narrowest spine, so no
   word is ever cut. The open film is capped at 62% of the case width so
   spines stay wide enough to carry a title. The year lives in the open caption. */
@media (min-width: 861px) {
  .bookcase .book__veil { background: linear-gradient(to top, rgba(8,8,8,0.55) 0%, rgba(8,8,8,0.22) 40%, rgba(8,8,8,0.12) 100%); }
  .bookcase .book__spine { justify-content: flex-end; align-items: stretch; gap: 0; padding: 0; }
  .bookcase .book__year { display: none; }
  .bookcase .book__vert {
    writing-mode: horizontal-tb; transform: none;
    flex-direction: column; align-items: flex-start; gap: 6px;
    width: 100%; max-height: none; overflow: visible;
    padding: 64px 16px 16px;
    background: linear-gradient(to top, rgba(10,10,10,0.86) 0%, rgba(10,10,10,0.6) 45%, rgba(10,10,10,0) 100%);
  }
  .bookcase .book__client { white-space: normal; }
  .bookcase.lbl-client .book__title { display: none; }
  /* very narrow spines: client and title turned upright */
  .bookcase.lbl-vert .book__spine { align-items: center; padding: 20px 8px 18px; }
  .bookcase.lbl-vert .book__vert {
    writing-mode: vertical-rl; transform: rotate(180deg);
    width: auto; max-height: 100%; overflow: hidden; padding: 4px 0; background: none;
  }
  .bookcase.lbl-vert .book__client, .bookcase.lbl-vert .book__title { white-space: nowrap; }
}

/* open: the caption band under the frame */
.bookcase .book__foot {
  position: absolute; inset: auto 0 0 0;
  height: var(--cap-h); min-height: 0;
  display: grid; grid-template-columns: minmax(0, 1fr) auto;
  align-content: start; column-gap: 24px; row-gap: 6px;
  padding: 14px 0 0; background: none; border: 0;
}
.bookcase .book__foot-client {
  grid-column: 1; grid-row: 1; margin: 0;
  font-size: var(--label-size, 12px); letter-spacing: var(--label-track, .06em); line-height: 16px; color: var(--label-color, rgba(236,233,225,.64));
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.bookcase .book__cat {
  position: static; grid-column: 2; grid-row: 1; justify-self: end;
  gap: 0; padding: 0; border-radius: 0; background: none;
  -webkit-backdrop-filter: none; backdrop-filter: none;
  font-size: var(--label-size, 12px); letter-spacing: var(--label-track, .06em); line-height: 16px; color: var(--label-color, rgba(236,233,225,.64));
}
.bookcase .book__foot-title {
  grid-column: 1; grid-row: 2;
  font-size: var(--d3, clamp(24px, 2vw, 32px)); font-weight: 500; line-height: 1.15; letter-spacing: -0.01em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.bookcase .book__foot-title small { margin-left: 10px; font-family: var(--f-mono); font-size: var(--label-size, 12px); letter-spacing: var(--label-track, .06em); color: var(--label-color, rgba(236,233,225,.64)); }
.bookcase .book__watch {
  grid-column: 2; grid-row: 2; justify-self: end; align-self: center;
  padding: 9px 14px; font-size: var(--label-size, 12px); letter-spacing: var(--label-track, .06em);
  transition: background 200ms var(--ease), border-color 200ms var(--ease), color 200ms var(--ease);
}
.bookcase .book.is-open:hover .book__watch { background: var(--c-bone); border-color: var(--c-bone); color: var(--c-ink); }

/* the key: categories named in words; the active one carries the rust underline */
.case-index { gap: 0 28px; }
.case-index .case-index__btn {
  min-height: 44px; padding: 0; gap: 10px;
  font-size: var(--label-size, 12px); letter-spacing: var(--label-track, .06em); color: var(--label-color, rgba(236,233,225,.64));
}
.case-index .case-index__btn b { opacity: 1; color: var(--label-color, rgba(236,233,225,.64)); }
.case-index .case-index__btn:hover, .case-index .case-index__btn.is-on { color: var(--c-bone); }
.case-index .case-index__btn::after { bottom: 8px; background: var(--c-rust); }
.case-hint { font-size: var(--label-size, 12px); letter-spacing: var(--label-track, .06em); color: var(--label-color, rgba(236,233,225,.64)); }
.case-sound[aria-pressed="true"] { color: var(--c-ink); background: var(--c-bone); border-color: var(--c-bone); }

/* the viewer: the dotted category line repeated the meta line below it
   (declared removal); labels on the shared spec, the title a --d3 subhead */
.preview__cat { display: none !important; }
.preview__count, .preview__client, .preview__meta, .preview__navbtn, .pc__time {
  font-size: var(--label-size, 12px); letter-spacing: var(--label-track, .06em);
}
.preview__count, .preview__client, .preview__meta { color: var(--label-color, rgba(236,233,225,.64)); }
.preview__title { font-size: var(--d3, clamp(24px, 2vw, 32px)) !important; line-height: 1.15; letter-spacing: -0.01em; }

@media (max-width: 860px) {
  /* the case turns to face you and runs edge to edge */
  .bookcase { --cap-h: 104px; --spine-h: 64px; margin-inline: calc(var(--gutter) * -1); }
  .bookcase .bookcase__row { height: auto; }
  .bookcase .book, .bookcase .book__media, .bookcase .book__veil { border-radius: 0; }
  .bookcase .book__media, .bookcase .book__veil, .bookcase .book__spine, .bookcase .book:focus-visible::after { bottom: 0; }
  .bookcase .book.is-open:focus-visible::after { bottom: var(--cap-h); }
  .bookcase .book.is-open .book__media { bottom: var(--cap-h); }
  .bookcase .book__spine { justify-content: flex-start; padding: 0 var(--gutter); gap: 16px; }
  .bookcase .book__vert { flex-direction: column; align-items: flex-start; gap: 4px; }
  .bookcase .book__title { font-size: 16px; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .bookcase .book__year { margin-left: auto; opacity: 1; }
  .bookcase .book__foot { padding: 14px var(--gutter) 0; row-gap: 6px; column-gap: 16px; }
  .bookcase .book__foot-title { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
  .bookcase .book__watch { align-self: start; }
}
