/* ==========================================================================
   DETECTIVE BOARD — materials
   One warm lamp above the board, light from top-left. Every shadow agrees.
   ========================================================================== */
:root {
  --ink: #231c15;
  --ink-soft: #4a3e30;
  --red-ink: #a3302a;
  --marker: #b3261e;
  --blue-ink: #24324a;
  --thread: #9e1f22;
  --tex: url("../assets/textures/paper-fibre.jpg");      /* real paper fibre (ambientCG Paper003, CC0) */
  --crumple: url("../assets/textures/paper-soft.jpg");   /* soft handling creases, overlay */
  --crinkle: url("../assets/textures/crinkle.jpg");      /* kraft crinkle (Paper005), multiply */
  --shadow-contact: 0 1px 1.5px rgba(28, 14, 4, .5);
  --shadow-soft: 3px 12px 18px -3px rgba(28, 14, 4, .36);
  --ease-out: cubic-bezier(.22, 1, .36, 1);
  /* JS replaces these with true spring curves (see spring.js) */
  --ease-hover: var(--ease-out); --dur-hover: 320ms;
  --ease-marker: var(--ease-out); --dur-marker: 500ms;
  --ease-pendulum: var(--ease-out); --dur-pendulum: 900ms;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #120b07; color: var(--ink); -webkit-font-smoothing: antialiased; }
body { overscroll-behavior: none; touch-action: none; }
/* paper is not a web page: no grey flash under a finger, no text caret dragged across the board, no "save image" sheet on a long press.
   The letter keeps its text selectable, so an address can be copied. */
html { -webkit-tap-highlight-color: transparent; }
#stage, #tabs, #exhibit, #cursor { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
img, video { -webkit-user-drag: none; -webkit-touch-callout: none; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; }
:focus-visible { outline: 2px dashed var(--marker); outline-offset: 6px; border-radius: 4px; }

/* ---------------------------------------------------------------- stage */
#stage { position: fixed; inset: 0; overflow: hidden; }
#wall {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 80% 70% at 50% 30%, #3a291c 0%, #1d130c 60%, #0f0905 100%);
}
#wall::after { content: ""; position: absolute; inset: 0; background: url("../assets/textures/grain.webp"); opacity: .25; mix-blend-mode: overlay; }
#world { position: absolute; left: 0; top: 0; width: 4320px; height: 2700px; transform-origin: 0 0; will-change: transform; }
.layer { position: absolute; inset: 0; pointer-events: none; }
.layer > * { pointer-events: auto; }
.layer-threads { overflow: visible; }
.layer-threads > * { pointer-events: none; }
.thread-hit { fill: none; stroke: transparent; stroke-width: 14; pointer-events: stroke; }
.is-dragging .thread-hit, .has-exhibit .thread-hit { pointer-events: none; }
.layer-pins, .layer-dust { pointer-events: none; }
.layer-pins > * { pointer-events: none; }
.layer-dust { background: url("../assets/textures/dust.webp") 0 0 / 1024px; opacity: .55; }

/* ---------------------------------------------------------------- wood frame (mitred) */
.frame { position: absolute; inset: 0; border-radius: 3px; box-shadow: 0 40px 90px rgba(0, 0, 0, .75), 0 8px 20px rgba(0, 0, 0, .5); }
.frame-side { position: absolute; display: block; background: url("../assets/textures/wood-photo.webp") 0 0 / 1024px 256px; }
.frame-side::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(255, 220, 170, .22), rgba(255, 220, 170, 0) 30%, rgba(0, 0, 0, 0) 60%, rgba(0, 0, 0, .35)); }
.frame-top, .frame-bottom { left: 0; width: 4320px; height: 56px; }
.frame-top { top: 0; clip-path: polygon(0 0, 100% 0, calc(100% - 56px) 100%, 56px 100%); }
.frame-bottom { bottom: 0; transform: rotate(180deg); clip-path: polygon(0 0, 100% 0, calc(100% - 56px) 100%, 56px 100%); }
.frame-left, .frame-right { top: 0; width: 2700px; height: 56px; clip-path: polygon(0 0, 100% 0, calc(100% - 56px) 100%, 56px 100%); transform-origin: 0 0; }
.frame-left { left: 0; top: 2700px; transform: rotate(-90deg); }
.frame-right { left: 4320px; top: 0; transform: rotate(90deg); }

/* ---------------------------------------------------------------- cork */
.cork { position: absolute; left: 56px; top: 56px; right: 56px; bottom: 56px; overflow: hidden;
  box-shadow: inset 0 12px 26px rgba(20, 10, 3, .62), inset 0 0 3px rgba(20, 10, 3, .7), inset 0 -4px 10px rgba(20, 10, 3, .3); }
.cork-tex { position: absolute; inset: -120px; background-color: #6e5136;
  background-image:
    radial-gradient(ellipse 900px 600px at 20% 30%, rgba(255, 226, 180, .08), transparent 70%),
    radial-gradient(ellipse 1100px 700px at 75% 70%, rgba(20, 12, 6, .22), transparent 70%),
    radial-gradient(ellipse 800px 900px at 60% 15%, rgba(255, 230, 190, .06), transparent 70%),
    radial-gradient(ellipse 1300px 800px at 10% 85%, rgba(18, 12, 8, .26), transparent 70%),
    url("../assets/textures/cork-photo.webp");  /* real cork scan (ambientCG Cork004, CC0) */
  background-size: auto, auto, auto, auto, 1024px; } /* no will-change: its own layer forced ~100 board-sized overlap layers (phones ran out of memory) */
.cork-wear { position: absolute; inset: 0; background-repeat: no-repeat; pointer-events: none; } /* 1,800 marks: decoration only, never a hit target */
.cork::after { /* frame casts a soft shade onto the cork top edge */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(20, 10, 3, .28), transparent 90px), linear-gradient(90deg, rgba(20, 10, 3, .16), transparent 70px); }

/* ---------------------------------------------------------------- items */
.item { position: absolute; transform: translate(-50%, -50%) rotate(var(--rot, 0deg)); transform-origin: 50% 50%; }
.paper-item, .tag-item, .folder-item, .film-item, .label-item { filter: drop-shadow(var(--shadow-contact)) drop-shadow(2px 10px 13px rgba(28, 14, 4, .32)); }

/* paper stock */
.sheet { position: absolute; inset: 0; overflow: hidden; --paper: #efe7d3;
  background-color: var(--paper);
  background-image:
    linear-gradient(168deg, rgba(255, 252, 244, .45), rgba(255, 255, 255, 0) 32%, rgba(80, 52, 18, 0) 70%, rgba(80, 52, 18, .12)),
    radial-gradient(ellipse 115% 105% at 46% 42%, transparent 58%, rgba(140, 92, 30, .2)),
    var(--crumple),
    var(--tex);
  background-size: 100% 100%, 100% 100%, 620px, 360px;
  background-position: 0 0, 0 0, var(--cx, 0) var(--cy, 0), 0 0;
  background-blend-mode: normal, multiply, overlay, multiply; }
.paper-item:nth-child(3n+1) .sheet { --cx: -230px; --cy: -140px; }
.paper-item:nth-child(3n+2) .sheet { --cx: -410px; --cy: -330px; }
.paper--white { --paper: #f2ecdf; }
.paper--cream { --paper: #ebe1c9; }
.paper--news { --paper: #e2d9c1; }
.paper--map { --paper: #e5d8ba; }
.paper--aged { --paper: #e0c999; }
.paper--aged::before { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse at 30% 80%, rgba(120, 70, 20, .18), transparent 40%), radial-gradient(ellipse at 85% 15%, rgba(120, 70, 20, .14), transparent 35%), radial-gradient(circle at 70% 60%, rgba(120, 70, 20, .1), transparent 12%); mix-blend-mode: multiply; }
.paper--creased::after, .manila::after { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: url("../assets/textures/paper-crumple.jpg") center / 700px; mix-blend-mode: overlay; opacity: .5; }

/* ink */
.type { font-family: "Special Elite", "Courier New", monospace; color: var(--ink); mix-blend-mode: multiply; margin: 0; }
.type--red, .mono--red { color: var(--red-ink); }
.mono { font-family: "Courier Prime", "Courier New", monospace; font-weight: 700; margin: 0; mix-blend-mode: multiply; }
.hand { font-family: "Caveat", cursive; font-weight: 700; color: var(--ink); margin: 0; mix-blend-mode: multiply; }
.hand--red { color: var(--marker); }
.hand--blue { color: var(--blue-ink); }
.marker { font-family: "Permanent Marker", cursive; color: #1d1712; opacity: .93; mix-blend-mode: multiply; letter-spacing: .01em; }
.scrawl { font-family: "Reenie Beanie", cursive; font-size: 31px; line-height: .95; color: #24180e; opacity: .78; margin: 0; white-space: nowrap; mix-blend-mode: multiply; }
.rule { display: block; height: 1.5px; background: var(--ink); opacity: .75; mix-blend-mode: multiply; }

/* rubber stamps — worn ink */
.stamp { display: inline-block; font: 700 30px/1 "Stardos Stencil", serif; letter-spacing: .08em; color: var(--red-ink); padding: 9px 14px 7px;
  border: 3px solid currentColor; border-radius: 5px; opacity: .8; mix-blend-mode: multiply;
  -webkit-mask: url("../assets/textures/stamp.webp") 0 0 / 300px; mask: url("../assets/textures/stamp.webp") 0 0 / 300px; }
.stamp--sm { font-size: 19px; padding: 7px 10px 5px; border-width: 2.5px; }
.stamp--big { font-size: 50px; padding: 14px 22px 10px; border-width: 4px; opacity: .7; }

/* ---------------------------------------------------------------- motion without layers
   Board animations move registered custom properties, never transform/opacity/filter directly.
   A transform or opacity animation lifts its element into a GPU layer of its own, and every
   paper painted above it is lifted too (overlap): a flutter or a hover built ~70 layers, some
   board-sized, mid-glide. That blinked on desktops and ran phones out of memory. Animating a
   custom property just repaints the one item inside the board's single layer. */
@property --lx { syntax: "<length>"; inherits: false; initial-value: 0px; }
@property --ly { syntax: "<length>"; inherits: false; initial-value: 0px; }
@property --ls { syntax: "<number>"; inherits: false; initial-value: 1; }
@property --lr { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
@property --lk { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
@property --lo { syntax: "<number>"; inherits: false; initial-value: 1; }
@property --lb { syntax: "<length>"; inherits: false; initial-value: 0px; }
@property --sheen { syntax: "<length-percentage>"; inherits: true; initial-value: -18%; }
@property --mx { syntax: "<length>"; inherits: true; initial-value: 96px; }
@property --my { syntax: "<length>"; inherits: true; initial-value: 74px; }

/* ---------------------------------------------------------------- polaroids */
.polaroid-item { width: 260px; height: 312px; display: block; }
.polaroid-item::before { /* ambient shadow lives under the body so it can grow on hover */
  content: ""; position: absolute; inset: 6px 4px 0; border-radius: 3px; background: rgba(28, 14, 4, .5);
  --lx: 4px; --ly: 10px; --lb: 12px; --lo: .75;
  transform: translate(var(--lx, 4px), var(--ly, 10px)) scale(var(--ls, 1)); filter: blur(var(--lb, 12px)); opacity: var(--lo, .75);
  transition: --lx var(--dur-hover) var(--ease-hover), --ly var(--dur-hover) var(--ease-hover), --ls var(--dur-hover) var(--ease-hover), --lo .18s, --lb .18s; }
.polaroid-body { position: absolute; inset: 0; border-radius: 2px; transform-origin: 130px 10px;
  background-color: #f3efe5;
  background-image: linear-gradient(176deg, rgba(255, 255, 255, .55), rgba(255, 255, 255, 0) 30%, rgba(90, 70, 40, 0) 75%, rgba(90, 70, 40, .1)), var(--tex);
  background-size: 100% 100%, 300px; background-blend-mode: normal, multiply;
  box-shadow: var(--shadow-contact), inset 0 0 0 .5px rgba(70, 50, 25, .2), inset 0 -1px 0 rgba(0, 0, 0, .06);
  transform: translateY(var(--ly, 0px)) scale(var(--ls, 1)) rotate(var(--lr, 0deg));
  transition: --ly var(--dur-hover) var(--ease-hover), --ls var(--dur-hover) var(--ease-hover), --lr var(--dur-hover) var(--ease-hover); }
.polaroid-item:hover::before, .polaroid-item:focus-visible::before { --lx: 6px; --ly: 24px; --ls: 1.03; --lb: 18px; --lo: .85; }
.polaroid-item:hover .polaroid-body, .polaroid-item:focus-visible .polaroid-body { --ly: -6px; --ls: 1.02; --lr: calc(var(--rot) * -.4); }
.polaroid-item:active .polaroid-body { --ly: -2px; --ls: .985; --lr: calc(var(--rot) * -.4); transition-duration: 90ms; }
.polaroid-item.is-lifted { visibility: hidden; }

.photo { position: absolute; left: 14px; top: 14px; width: var(--pw, 232px); height: var(--ph, 232px); overflow: hidden; background: #1d1712;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .3); }
.photo::after { /* print edge + slight chemical vignette */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  box-shadow: inset 0 0 18px rgba(0, 0, 0, .5), inset 0 0 2px rgba(0, 0, 0, .6); }
.photo img { width: 100%; height: 100%; object-fit: cover; display: block; filter: sepia(.14) saturate(.9) contrast(1.03); }
.photo--empty { background:
  radial-gradient(circle at var(--lx, 40%) 32%, rgba(214, 186, 146, .32), transparent 58%),
  linear-gradient(168deg, var(--ta), var(--tb)); }
.photo--empty::before { content: ""; position: absolute; inset: 0; background: url("../assets/textures/grain.webp"); opacity: .5; mix-blend-mode: overlay; }
.sheen { position: absolute; inset: -20%; pointer-events: none; mix-blend-mode: screen;
  background: linear-gradient(112deg, transparent 38%, rgba(255, 250, 235, .16) 47%, rgba(255, 250, 235, .05) 52%, transparent 60%);
  transform: translateX(var(--sheen, -18%)); transition: --sheen .5s var(--ease-out); }
.polaroid-item:hover .sheen { --sheen: 14%; }
.play-mark { position: absolute; left: calc(var(--pw, 232px) / 2 - 18px); top: calc(var(--ph, 232px) / 2 - 18px); width: 64px; height: 64px; fill: none; stroke: #f1e6cf; stroke-width: 3.2; stroke-linecap: round; stroke-linejoin: round; opacity: .82; filter: url(#rough); }
.play-mark .ghost { stroke-opacity: .35; stroke-width: 1.6; }
.pol-caption { position: absolute; left: 14px; right: 14px; top: calc(var(--ph, 232px) + 19px); text-align: center; font-size: 29px; line-height: 1; white-space: nowrap; }
.pol-ex { position: absolute; right: 15px; bottom: 9px; font-size: 9.5px; font-weight: 400; letter-spacing: .1em; color: #6b5a45; opacity: .75; }
.pol-reel { position: absolute; left: 17px; bottom: 9px; font-size: 9.5px; letter-spacing: .12em; color: var(--red-ink); }

/* portrait */
.is-portrait { width: 330px; height: 404px; }
.polaroid--portrait { transform-origin: 165px 11px; }
.photo--portrait { left: 15px; top: 15px; width: 300px; height: 320px;
  background: radial-gradient(circle at 50% 18%, rgba(160, 130, 98, .45), transparent 55%), linear-gradient(170deg, #5b4636, #241b15); }
.photo--portrait::before { content: ""; position: absolute; inset: 0; background: url("../assets/textures/grain.webp"); opacity: .45; mix-blend-mode: overlay; z-index: 1; }
.silhouette { position: absolute; inset: 0; background:
  radial-gradient(ellipse 56px 68px at 50% 42%, rgba(18, 13, 10, .55) 96%, transparent 100%),
  radial-gradient(ellipse 125px 100px at 50% 104%, rgba(18, 13, 10, .55) 96%, transparent 100%); }
.plate { position: absolute; left: 75px; top: 268px; width: 150px; height: 38px; display: grid; place-items: center; z-index: 2;
  background: #17110d; color: #ede3cd; font: 700 13px "Courier Prime", monospace; letter-spacing: .14em; border-radius: 2px; box-shadow: 0 2px 4px rgba(0, 0, 0, .5); }
.is-portrait .pol-caption { top: 347px; left: 15px; right: 15px; font-size: 28px; }

/* ---------------------------------------------------------------- sticky notes */
.sticky-item { width: 210px; height: 200px; }
.sticky-item::before { /* lifted bottom edge throws a curved shadow */
  content: ""; position: absolute; left: 10px; right: 10px; bottom: 4px; height: 40px; border-radius: 0 0 50% 50% / 0 0 30% 30%;
  box-shadow: 0 14px 14px rgba(28, 14, 4, .42); transform: translateY(var(--ly, 0px)); transition: box-shadow .18s var(--ease-out), --ly .2s var(--ease-out); }
.sticky-body { position: absolute; inset: 0; transform-origin: 105px 16px;
  background-image:
    linear-gradient(180deg, rgba(0, 0, 0, .05) 0 34px, rgba(0, 0, 0, 0) 34px),
    linear-gradient(0deg, rgba(255, 255, 255, .2), rgba(255, 255, 255, 0) 36px),
    radial-gradient(ellipse 60% 40% at 100% 100%, rgba(80, 55, 10, .14), transparent 70%),
    linear-gradient(180deg, var(--s1), var(--s2)),
    var(--tex);
  background-size: 100% 100%, 100% 100%, 100% 100%, 100% 100%, 280px;
  background-blend-mode: normal, normal, multiply, normal, multiply;
  box-shadow: 0 1px 1px rgba(28, 14, 4, .3);
  transform: skewY(var(--lk, 0deg)) translateY(var(--ly, 0px)) scaleY(var(--ls, 1));
  transition: --lk var(--dur-hover) var(--ease-hover), --ly var(--dur-hover) var(--ease-hover); }
.sticky-item:hover::before { box-shadow: 0 22px 18px rgba(28, 14, 4, .48); --ly: 2px; }
.sticky-item:hover .sticky-body { --lk: -1.2deg; --ly: -2px; }
.sticky--yellow { --s1: #f4df86; --s2: #e8ca5c; }
.sticky--pink { --s1: #f0c3b2; --s2: #e3a690; }
.sticky--mint { --s1: #d2e1c2; --s2: #b5cba2; }
.sticky--blue { --s1: #cadbe1; --s2: #aec5ce; }
.sticky-text { position: absolute; left: 20px; right: 16px; top: 46px; font-size: 31px; line-height: 1.05; }
.sticky-link { pointer-events: auto; border-bottom: 2px solid rgba(35, 28, 21, .35); }
.sticky-link:hover { border-bottom-color: var(--marker); }

/* ---------------------------------------------------------------- height chart */
.hc-line { position: absolute; left: 14px; width: 320px; height: 1px; background: #3a2e22; opacity: .35; mix-blend-mode: multiply; }
.hc-line.is-major { width: 372px; height: 1.6px; opacity: .7; }
.hc-num { position: absolute; left: 348px; font: 700 12px "Courier Prime", monospace; color: #3a2e22; opacity: .8; mix-blend-mode: multiply; }
.hc-case { position: absolute; left: 16px; bottom: 18px; font: 700 12px "Courier Prime", monospace; letter-spacing: .12em; color: var(--red-ink); mix-blend-mode: multiply; }

/* ---------------------------------------------------------------- subject profile */
.paper-item .sheet:has(.pr-title) { padding: 26px 28px; }
.pr-head { font-size: 12px; letter-spacing: .06em; }
.pr-title { font-size: 30px; line-height: 1.2; margin: 4px 0 6px; }
.pr-rows { display: grid; grid-template-columns: 82px 1fr; column-gap: 0; row-gap: 9px; margin: 12px 0 18px; }
.pr-rows dt { font-size: 12.5px; letter-spacing: .08em; color: var(--ink-soft); padding-top: 2px; }
.pr-rows dd { margin: 0; font-size: 15px; line-height: 1.25; }
.is-status { position: relative; justify-self: start; }
.marker-circle { position: absolute; left: -12px; top: -9px; width: calc(100% + 26px); height: calc(100% + 18px); fill: none; stroke: var(--marker); stroke-width: 2.4; stroke-linecap: round; opacity: .9; filter: url(#rough); overflow: visible; mix-blend-mode: multiply; }
.pr-label { font-size: 12.5px; letter-spacing: .08em; color: var(--ink-soft); }
.pr-notes { font-size: 14px; line-height: 1.5; margin-top: 6px; }
.pr-ann { position: absolute; right: 16px; bottom: 32px; font-size: 22px; line-height: .95; transform: rotate(-6deg); text-align: left; }
.pr-stamp { position: absolute; left: 74px; bottom: 26px; transform: rotate(-7deg); font-size: 21px; padding: 7px 11px 5px; border-width: 2.5px; }

/* ---------------------------------------------------------------- name strip */
.ns-label { position: absolute; left: 26px; top: 12px; font-size: 11px; letter-spacing: .14em; color: var(--ink-soft); }
.ns-name { position: absolute; left: 24px; top: 18px; font-size: 52px; line-height: 1.1; white-space: nowrap; }

/* ---------------------------------------------------------------- newspaper */
.paper--news { padding: 12px 16px; }
.news-kick { margin: 0; font: italic 8px "Libre Baskerville", serif; letter-spacing: .04em; color: #3a3128; mix-blend-mode: multiply; }
.news-rule { display: block; height: 1px; background: #3a3128; opacity: .7; margin: 5px 0 6px; }
.news-head { margin: 0; font: 700 25px/1 "Old Standard TT", serif; color: #1e1913; mix-blend-mode: multiply; }
.news-cols { display: flex; gap: 10px; margin-top: 12px; }
.news-body { margin: 0; font: 8.5px/12px "Libre Baskerville", serif; color: #2e271f; mix-blend-mode: multiply; column-count: 2; column-gap: 10px; }
.news-cols.has-img .news-body { column-count: 1; flex: 1; }
.news-img { flex: 0 0 106px; height: 84px; mix-blend-mode: multiply;
  background: radial-gradient(circle, #2e2822 38%, transparent 41%) 0 0 / 3.6px 3.6px, linear-gradient(160deg, #b6aa94, #5a5144);
  background-blend-mode: multiply; opacity: .85; }

/* ---------------------------------------------------------------- index cards */
.index-card { background-color: #f5f0e3;
  background-image: linear-gradient(transparent 33px, rgba(197, 83, 77, .7) 33px 34.5px, transparent 34.5px),
    repeating-linear-gradient(transparent 0 59px, rgba(127, 163, 184, .42) 59px 60px, transparent 60px 84px),
    var(--tex);
  background-size: 100% 100%, 100% 24px, 300px; background-position: 0 0, 0 0, 0 0; background-blend-mode: normal, normal, multiply; padding: 12px 14px; }
.index-card { background-image: linear-gradient(transparent 33px, rgba(197, 83, 77, .7) 33px 34.5px, transparent 34.5px),
    repeating-linear-gradient(180deg, transparent 0 23px, rgba(127, 163, 184, .42) 23px 24px), var(--tex);
  background-size: 100% 100%, 100% 24px, 300px; background-position: 0 0, 0 12px, 0 0; }
.ic-head { font-size: 11px; letter-spacing: .1em; color: var(--ink); }
.ic-text { margin-top: 12px; font-size: 22px; line-height: 24px; }
.index-card--tall { padding: 20px 16px 10px; background-position: 0 0, 0 20px, 0 0; }
.tl-year { font-size: 24px; line-height: 1; }
.tl-role { margin-top: 14px; font-size: 13px; }
.tl-co { font-weight: 400; font-size: 13px; margin-top: 8px; }
.tl-note { font-size: 22px; line-height: 24px; margin-top: 6px; }

/* ---------------------------------------------------------------- mini-map */
.mm-title { position: absolute; left: 14px; top: 4px; font-size: 22px; }
.mm-cell { position: absolute; width: 54px; height: 30px; border: 1.4px solid rgba(42, 35, 28, .75); font: 500 16px/26px "Caveat", cursive; padding-left: 5px; color: var(--ink); font-style: normal; mix-blend-mode: multiply; filter: url(#rough); }
.mm-cell.is-faint { border-style: dashed; opacity: .35; }
.mm-x { position: absolute; left: 0; top: 0; font-size: 28px; line-height: 1; color: var(--marker); transform: translate(var(--mx, 96px), var(--my, 74px));
  transition: --mx var(--dur-marker) var(--ease-marker), --my var(--dur-marker) var(--ease-marker); }

/* ---------------------------------------------------------------- case tags + dymo */
.tag-item { width: max-content; height: 104px; }
.tag-link { display: block; height: 100%; pointer-events: auto; }
.manila { position: relative; --paper: #dcbd84; background-color: var(--paper);
  background-image: linear-gradient(170deg, rgba(255, 245, 220, .4), rgba(255, 255, 255, 0) 35%, rgba(90, 60, 15, 0) 70%, rgba(90, 60, 15, .16)), var(--crinkle);
  background-size: 100% 100%, 420px; background-blend-mode: normal, multiply; overflow: hidden; }
.tag-shape { height: 104px; padding: 17px 26px 0 52px; clip-path: polygon(26px 0, 100% 0, 100% 100%, 26px 100%, 0 78px, 0 26px);
  transform: rotate(var(--lr, 0deg)); transition: --lr var(--dur-pendulum) var(--ease-pendulum); transform-origin: 24px 52px; }
.tag-link:hover .tag-shape { --lr: -3deg; }
.tag-ring { position: absolute; left: 12px; top: 40px; width: 24px; height: 24px; border-radius: 50%; background: #f1e3c4; box-shadow: inset 0 0 0 1px rgba(120, 90, 40, .25), 0 1px 1px rgba(0, 0, 0, .15); }
.tag-hole { position: absolute; left: 19px; top: 47px; width: 10px; height: 10px; border-radius: 50%; background: #6a4524; box-shadow: inset 0 1px 2px rgba(0, 0, 0, .6); }
.tag-file { display: block; font-size: 11px; letter-spacing: .16em; color: #7a2a22; margin-bottom: 9px; }
.dymo { display: inline-block; position: relative; padding: 7px 14px 6px; border-radius: 3px; transform: rotate(-.6deg);
  font: 700 25px/1 "Courier Prime", monospace; letter-spacing: .14em; color: #ebe7dc; white-space: nowrap;
  background: #1b1a1c linear-gradient(180deg, rgba(255, 255, 255, .12), rgba(255, 255, 255, 0) 45%, rgba(0, 0, 0, .25));
  text-shadow: 0 1px 0 rgba(0, 0, 0, .9), 0 -1px 0 rgba(255, 255, 255, .25), 0 0 1px rgba(255, 255, 255, .4);
  box-shadow: 0 1.5px 2px rgba(0, 0, 0, .5), inset 0 1px 0 rgba(255, 255, 255, .1); }
.dymo::after { content: ""; position: absolute; inset: 0; border-radius: inherit; background: url("../assets/textures/grain.webp"); opacity: .18; mix-blend-mode: overlay; }

.arrow { width: 96px; height: 44px; pointer-events: none !important; }
.arrow svg { width: 100%; height: 100%; fill: none; stroke: var(--marker); stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; opacity: .85; filter: url(#rough); mix-blend-mode: multiply; }

/* ---------------------------------------------------------------- case folders */
.folder-item { width: 430px; height: 240px; }
.folder { position: absolute; inset: 0; padding: 0; }
.folder-no { position: absolute; left: 66px; top: 10px; font-size: 11px; letter-spacing: .16em; color: #7a2a22; }
.folder-title { position: absolute; left: 26px; top: 46px; right: 20px; margin: 0; font-weight: 400; font-size: 50px; line-height: 1.05; }
.folder-title.is-long { font-size: 40px; }
.folder-blurb { position: absolute; left: 28px; top: 116px; width: 300px; font-size: 14px; line-height: 19px; color: #3a2e22; }
.folder-count { position: absolute; left: 28px; bottom: 16px; font-size: 11px; letter-spacing: .14em; color: #3a2e22; opacity: .75; }
.folder-stamp { position: absolute; right: 18px; bottom: 14px; transform: rotate(-12deg); }

/* ---------------------------------------------------------------- film, storyboard, graph, chips */
.film-item { width: 540px; height: 94px; }
.film { position: absolute; inset: 0; overflow: hidden; background: linear-gradient(180deg, #2b231d, #120e0b);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08); }
.film::after { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 20%, rgba(255, 240, 210, .1) 35%, transparent 45%, transparent 70%, rgba(255, 240, 210, .06) 80%, transparent 88%); }
.film i { position: absolute; width: 8px; height: 8px; border-radius: 1.5px; background: #b38652; box-shadow: inset 0 1px 2px rgba(0, 0, 0, .6); }
.film b { position: absolute; top: 19px; width: 118px; height: 56px; background: radial-gradient(circle at 40% 35%, rgba(224, 201, 160, .35), transparent 60%), linear-gradient(170deg, var(--ta), var(--tb)); opacity: .9; }
.film-edge { position: absolute; left: 150px; top: -1px; font: 700 7px "Courier Prime", monospace; letter-spacing: .2em; color: #e9a24a; opacity: .8; }

.sb-title { position: absolute; left: 14px; top: 12px; font-size: 10px; letter-spacing: .1em; }
.sb-panel { position: absolute; width: 86px; height: 52px; border: 1.2px solid rgba(42, 35, 28, .7); mix-blend-mode: multiply; }
.sb-panel svg { width: 80px; height: 48px; margin: 1px 2px; fill: none; stroke: #4a4038; stroke-width: 1.4; stroke-linecap: round; opacity: .75; filter: url(#rough); }
.sb-n { position: absolute; font-size: 15px; font-weight: 500; opacity: .8; }

.graph-paper { background-color: #edefe3;
  background-image:
    linear-gradient(90deg, rgba(95, 143, 168, .3) 1px, transparent 1px), linear-gradient(rgba(95, 143, 168, .3) 1px, transparent 1px),
    linear-gradient(90deg, rgba(95, 143, 168, .16) .6px, transparent .6px), linear-gradient(rgba(95, 143, 168, .16) .6px, transparent .6px),
    var(--tex);
  background-size: 60px 60px, 60px 60px, 12px 12px, 12px 12px, 300px; background-blend-mode: normal, normal, normal, normal, multiply; }
.pencil { position: absolute; inset: 0; width: 100%; height: 100%; fill: none; stroke: #33302c; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; opacity: .82; filter: url(#rough); mix-blend-mode: multiply; }
.pencil .red { stroke: var(--marker); stroke-width: 1.8; }
.pencil .dash { stroke-dasharray: 3 3; stroke-width: 1.2; }
.pencil .thin { stroke-width: .8; opacity: .6; }
.pencil .bold { stroke-width: 2.2; }
.graph-note { position: absolute; font-size: 17px; white-space: nowrap; }

.chip-card { background-color: #f6f2e8; background-image: var(--tex); background-size: 260px; background-blend-mode: multiply; }
.chip-head { position: absolute; left: 8px; top: 7px; font-size: 7px; letter-spacing: .1em; color: #7a2a22; }
.chip { position: absolute; left: 8px; width: 80px; height: 46px; box-shadow: inset 0 0 0 .5px rgba(0, 0, 0, .2); }
.chip::after { content: ""; position: absolute; inset: 0; background: url("../assets/textures/grain.webp"); opacity: .25; mix-blend-mode: overlay; }
.chip-n { position: absolute; left: 8px; font-size: 7px; letter-spacing: .08em; }

/* ---------------------------------------------------------------- map */
.map-svg { position: absolute; inset: 0; width: 100%; height: 100%; fill: none; mix-blend-mode: multiply; }
.map-svg .river { stroke: #8fa7ae; stroke-width: 34; stroke-linecap: round; opacity: .55; }
.map-svg .river-edge { stroke: #6e8c95; stroke-width: 1.2; opacity: .6; }
.map-svg .park { fill: #a9b98f; opacity: .5; }
.map-svg .roads { stroke: #7a6a55; opacity: .5; }
.map-svg .marks { stroke: var(--marker); stroke-width: 2.6; stroke-linecap: round; filter: url(#rough); }
.map-svg .route { stroke: var(--marker); stroke-width: 1.6; stroke-dasharray: 6 5; stroke-linecap: round; }
.map-svg .ink { stroke: #2a231c; stroke-width: 1.5; }
.map-title { position: absolute; left: 26px; top: 16px; margin: 0; font: 700 22px "Old Standard TT", serif; letter-spacing: .06em; color: #2a231c; mix-blend-mode: multiply; }
.map-sub { position: absolute; left: 28px; top: 46px; font-weight: 400; font-size: 9px; letter-spacing: .12em; color: #4a3e30; }
.map-n { position: absolute; left: 614px; top: 18px; font: 700 14px "Old Standard TT", serif; mix-blend-mode: multiply; }
.map-scale { position: absolute; left: 582px; top: 428px; font-weight: 400; font-size: 9px; }
.map-place { position: absolute; font-size: 22px; white-space: nowrap; }

/* ---------------------------------------------------------------- labels, statements, stamps, wanted */
.label-item { width: max-content; height: 62px; }
.label-sheet { position: relative; height: 62px; padding: 9px 22px 0; clip-path: polygon(0 3px, 4% 0, 30% 2px, 62% 0, 100% 2px, 98% 50%, 100% 100%, 70% 98%, 33% 100%, 2% 98%, 0 52%); }
.label-sheet .marker { font-size: 30px; white-space: nowrap; }
.paper-item .sheet:has(.st-quote) { padding: 16px 22px; }
.st-no { font-size: 10px; letter-spacing: .12em; }
.st-quote { font-size: 16px; line-height: 22px; margin-top: 8px; }
.st-who { font-size: 22px; margin-top: 10px; }
.stamp-item { width: max-content; }
.paper-item .sheet:has(.wanted-big) { text-align: center; padding-top: 14px; }
.wanted-big { margin: 0; font: 900 86px/1 "Playfair Display", serif; letter-spacing: .02em; color: #2a1e14; mix-blend-mode: multiply; }
.wanted-for { margin: 8px 20px 0; font: 700 15px "Old Standard TT", serif; letter-spacing: .08em; color: #2a1e14; mix-blend-mode: multiply; }
.wanted-photo { position: relative; width: 220px; height: 220px; margin: 14px auto 0; overflow: hidden; border: 2px solid rgba(42, 30, 20, .8);
  background: linear-gradient(170deg, #6b5640, #3a2c20); mix-blend-mode: multiply; filter: sepia(.6); }
.wanted-photo img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) contrast(1.2); }
.wanted-name { margin: 12px 0 0; font: 700 28px "Old Standard TT", serif; color: #2a1e14; mix-blend-mode: multiply; }
.wanted-alias { margin: 4px 0 0; font: 400 13px "Old Standard TT", serif; letter-spacing: .08em; color: #2a1e14; mix-blend-mode: multiply; }
.wanted-reward { margin: 6px 0 0; font: 900 30px "Playfair Display", serif; letter-spacing: .04em; color: #2a1e14; mix-blend-mode: multiply; }
.wanted-brief { margin: 4px 0 0; font: 700 14px "Old Standard TT", serif; letter-spacing: .14em; color: #7a2a22; mix-blend-mode: multiply; }

.coffee { background: url("../assets/textures/coffee.webp") center / contain no-repeat; mix-blend-mode: multiply; opacity: .75; pointer-events: none !important; }
.scribble { pointer-events: none !important; }

/* bell */
.bell-item { text-align: center; }
.bell { display: block; width: 58px; height: 58px; margin: 0 auto; filter: drop-shadow(2px 6px 5px rgba(28, 14, 4, .5)); transform-origin: 50% 10%; transform: rotate(var(--lr, 0deg)); transition: --lr .3s; }
.bell svg { width: 100%; height: 100%; }
.bell:hover { animation: ring .6s; }
.bell-label { font-size: 26px; margin-top: 2px; }
@keyframes ring { 0%, 100% { --lr: 0deg; } 20% { --lr: 14deg; } 40% { --lr: -11deg; } 60% { --lr: 7deg; } 80% { --lr: -3deg; } }

/* ---------------------------------------------------------------- pins */
.pin { position: absolute; width: 0; height: 0; }
.pin i { position: absolute; display: block; }
.pin-shadow { left: -5px; top: -1px; width: 22px; height: 12px; border-radius: 50%; background: rgba(22, 10, 2, .55); filter: blur(3px); transform: translate(5px, 7px) rotate(28deg); }
.pin-needle { left: 1px; top: 2px; width: 1.6px; height: 9px; background: linear-gradient(#e6e1d8, #8b857c); transform: rotate(-38deg); transform-origin: top; opacity: .9; }
.pin-head { left: -10px; top: -11px; width: 20px; height: 20px; border-radius: 50%;
  background: radial-gradient(circle at 34% 30%, var(--l) 0, var(--m) 48%, var(--d) 100%);
  box-shadow: inset -2px -3px 4px rgba(0, 0, 0, .3), inset 1px 1px 2px rgba(255, 255, 255, .35), 0 1px 1.5px rgba(0, 0, 0, .45);
  transform: translateX(var(--lx, 0px)) rotate(var(--lr, 0deg)) scale(var(--ls, 1)); }
.pin-head::after { content: ""; position: absolute; left: 5px; top: 4px; width: 6px; height: 4px; border-radius: 50%; background: rgba(255, 255, 255, .85); filter: blur(.6px); transform: rotate(-25deg); }
.pin--red { --l: #ff8f80; --m: #c0261c; --d: #4e0b07; }
.pin--brass { --l: #fff0b8; --m: #c49a3a; --d: #4e360b; }
.pin--ivory { --l: #fffef8; --m: #e0d4b8; --d: #7a6c4f; }
.pin.is-wiggle .pin-head { animation: wiggle 360ms ease-in-out; }
.pin.is-press .pin-head { animation: press 220ms var(--ease-out); }
.pin { opacity: var(--lo, 1); translate: var(--lx, 0px) var(--ly, 0px); scale: var(--ls, 1);
  transition: --lo .25s var(--ease-out), --lx .35s var(--ease-out), --ly .35s var(--ease-out), --ls .35s var(--ease-out); }
.pin.is-popped { --lo: 0; --lx: 6px; --ly: -22px; --ls: 1.35; }
@keyframes wiggle { 25% { --lx: -1.2px; --lr: -6deg; } 75% { --lx: 1.2px; --lr: 6deg; } }
@keyframes press { 0% { --ls: 1.3; } 100% { --ls: 1; } }

/* ---------------------------------------------------------------- tape */
.tape { position: absolute; width: 124px; height: 34px; transform: translate(-50%, -50%) rotate(var(--rot)); background-blend-mode: multiply; }
.tape--kraft { background-color: rgba(206, 180, 132, .86); background-image: linear-gradient(100deg, transparent 18%, rgba(255, 255, 255, .22) 21%, transparent 26%, transparent 58%, rgba(0, 0, 0, .07) 61%, transparent 65%), var(--crinkle); background-size: 100% 100%, 260px; }
.tape--masking { background-color: rgba(234, 226, 204, .84); background-image: linear-gradient(96deg, transparent 30%, rgba(255, 255, 255, .3) 34%, transparent 40%, transparent 70%, rgba(0, 0, 0, .06) 74%, transparent 78%), var(--tex); background-size: 100% 100%, 200px; }
.tape--washi { background-color: rgba(150, 172, 144, .74); background-image: repeating-linear-gradient(90deg, transparent 0 13px, rgba(244, 239, 227, .35) 13px 19px), linear-gradient(98deg, transparent 30%, rgba(255, 255, 255, .25) 35%, transparent 42%), var(--tex); background-size: auto, 100% 100%, 200px; }

/* ---------------------------------------------------------------- threads */
.thread-shadow { fill: none; stroke: rgba(20, 8, 2, .42); stroke-width: 2.6; stroke-linecap: round; }
.thread-core { fill: none; stroke: var(--thread); stroke-width: 2.3; stroke-linecap: round; transition: stroke .25s; }
.thread-twist { fill: none; stroke: #e0605a; stroke-width: .9; stroke-dasharray: 2.4 3.6; stroke-linecap: round; opacity: .55; }
.thread-dark { fill: none; stroke: #4e0c0f; stroke-width: .8; stroke-dasharray: 1.6 4.4; stroke-dashoffset: 2.6; opacity: .55; }
.threads-core.has-hot .thread-core:not(.is-hot) { stroke: #7e2224; }
.thread-core.is-hot { stroke: #c8352f; }
.is-loading .thread-core, .is-loading .thread-twist, .is-loading .thread-dark, .is-loading .thread-shadow { stroke-dashoffset: var(--len); }

/* ---------------------------------------------------------------- lamp, vignette, grain */
#lamp { position: fixed; inset: 0; pointer-events: none; z-index: 5; }
#lamp::before { content: ""; position: absolute; inset: 0; mix-blend-mode: soft-light;
  background: radial-gradient(ellipse 65% 55% at 50% 22%, rgba(255, 214, 150, .55), rgba(255, 214, 150, 0) 70%); }
#lamp::after { content: ""; position: absolute; inset: 0; mix-blend-mode: multiply;
  background: radial-gradient(ellipse 85% 85% at 50% 42%, rgba(255, 255, 255, 0) 48%, rgba(60, 34, 14, .38) 78%, rgba(18, 9, 3, .75) 100%); }
#grain { position: fixed; inset: -50%; pointer-events: none; z-index: 6; background: url("../assets/textures/grain.webp"); opacity: .075; mix-blend-mode: overlay; animation: grain 1.1s steps(6) infinite; }
@keyframes grain { 0% { transform: translate(0, 0); } 20% { transform: translate(-3%, 2%); } 40% { transform: translate(2%, -4%); } 60% { transform: translate(-4%, -1%); } 80% { transform: translate(3%, 3%); } 100% { transform: translate(0, 0); } }

/* ---------------------------------------------------------------- reveal */
.is-loading #world { opacity: 0; }
#world { transition: opacity .5s var(--ease-out); }
.reveal-item { --lo: 0; --ly: -34px; --ls: 1.04; --lr: 6deg;
  opacity: var(--lo, 1); translate: 0 var(--ly, 0px); scale: var(--ls, 1); rotate: var(--lr, 0deg); }
.reveal-item.is-in { --lo: 1; --ly: 0px; --ls: 1; --lr: 0deg;
  transition: --lo .35s var(--ease-out), --ly var(--dur-hover) var(--ease-hover), --ls var(--dur-hover) var(--ease-hover), --lr var(--dur-marker) var(--ease-marker); }
.tag-item.reveal-item.is-in { transition: --lo .3s, --ly var(--dur-hover) var(--ease-hover), --ls var(--dur-hover) var(--ease-hover), --lr var(--dur-pendulum) var(--ease-pendulum); }
.reveal-pin { --lo: 0; opacity: var(--lo, 1); } /* pins and tape */
.reveal-pin.is-in { --lo: 1; transition: --lo .12s; }
.pin.reveal-pin.is-in .pin-head { animation: press 260ms var(--ease-out); }

/* ---------------------------------------------------------------- cursor */
/* the pointer itself is a native cursor image (cursor.js) — the OS draws it, so it never lags */
.has-cursor body * { cursor: inherit; }
/* The cursor state lives on #stage (cursor.js) and is inherited. Every SVG gets a fixed cursor so a
   state change stops at its root instead of restyling ~2,000 SVG nodes. */
.has-cursor body { cursor: var(--cur-mag, default); }
.has-cursor body svg { cursor: var(--cur-mag, default); }
.has-cursor body :is(a, button, .mm-cell, .thread-hit, .ex-plate, .ex-track, .ex-media),
.has-cursor body :is(a, button, .mm-cell, .thread-hit, .ex-plate, .ex-track, .ex-media) * { cursor: var(--cur-plus, pointer); }
/* the destination name beside the edge arrow */
#cursor { position: fixed; left: 0; top: 0; z-index: 100; pointer-events: none; opacity: 0; transition: opacity .15s; white-space: nowrap; }
#cursor.is-edge { opacity: 1; }
html:not(.has-cursor) #cursor { display: none; }
.cur-label { display: block; font: 700 30px/1 "Caveat", cursive; color: #d23a2f; text-shadow: 0 1px 0 rgba(255, 240, 220, .2), 1px 2px 3px rgba(0, 0, 0, .55); }

/* ---------------------------------------------------------------- reduced motion */
@media (prefers-reduced-motion: reduce) {
  #grain { animation: none; }
  .polaroid-body, .sticky-body, .tag-shape, .sheen { transition: none !important; }
  .reveal-item, .reveal-item.is-in { transition: opacity .2s !important; translate: none !important; rotate: none !important; scale: none !important; }
}

/* ---------------- phones: index tabs at the screen's edges ----------------
   The touch version of the edge cursor: each names the case file that lies past that edge. */
#tabs { display: none; }
@media (pointer: coarse), (max-width: 759px) { #tabs { display: block; } }
#tabs .tab { position: fixed; z-index: 9; display: flex; align-items: center; gap: 7px; padding: 9px 11px 8px;
  color: #2a2119; text-decoration: none; font: 700 10px/1 "Courier Prime", "Courier New", monospace; letter-spacing: .16em;
  background: linear-gradient(180deg, #d9c38f, #c9ad72); box-shadow: 0 0 0 1px rgba(90, 64, 24, .35) inset, 0 4px 12px rgba(0, 0, 0, .6);
  opacity: .9; -webkit-tap-highlight-color: transparent; touch-action: manipulation;
  transition: opacity .2s, transform var(--dur-hover, .18s) var(--ease-hover, ease-out); }
#tabs .tab[hidden] { display: none; }
#tabs .tab:active { opacity: 1; }
#tabs .tab-arrow { display: inline-block; color: var(--marker, #b3171b); font-size: 13px; writing-mode: horizontal-tb; }
#tabs .tab--up { top: 0; left: 50%; transform: translateX(-50%); border-radius: 0 0 3px 3px; padding-top: calc(10px + env(safe-area-inset-top)); }
#tabs .tab--down { bottom: 0; left: 50%; transform: translateX(-50%); border-radius: 3px 3px 0 0; padding-bottom: calc(10px + env(safe-area-inset-bottom)); }
#tabs .tab--left, #tabs .tab--right { top: 50%; writing-mode: vertical-rl; padding: 12px 8px; }
#tabs .tab--left { left: 0; transform: translateY(-50%); border-radius: 0 3px 3px 0; }
#tabs .tab--right { right: 0; transform: translateY(-50%); border-radius: 3px 0 0 3px; }
#tabs .tab--up:active { transform: translateX(-50%) translateY(2px); } #tabs .tab--down:active { transform: translateX(-50%) translateY(-2px); }
#tabs .tab--left:active { transform: translateY(-50%) translateX(2px); } #tabs .tab--right:active { transform: translateY(-50%) translateX(-2px); }
.is-loading #tabs { opacity: 0; }
#tabs { transition: opacity .6s .4s; }
/* an open exhibit or letter has the screen: the tabs step aside (they sat over its header) */
.has-exhibit #tabs, #letter.is-active ~ #tabs { opacity: 0; pointer-events: none; transition: opacity .2s; }

/* "Open to new cases" on the profile is also a way in: it opens the letter */
.status-link { color: inherit; text-decoration: none; }
.has-cursor .status-link { cursor: pointer; }
.is-status .marker-circle { pointer-events: none; }
