/* ---------- Tokens ---------- */
:root {
  --bg: #ffffff;
  --wall: #f1f0ec;
  --card: #ffffff;
  --ink: #0a0a0a;
  --ink-2: #4a4a48;
  --ink-3: #6b6b67;
  --rule: #e2e1dc;
  --accent: #1f3a5f;          /* overridden per work */
  --ok: #1d7a46;
  --bad: #b3261e;
  --viewer-bg: #0b0b0b;

  --sans: "Libre Franklin", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --serif: "Newsreader", Georgia, "Times New Roman", serif;

  --gutter: clamp(16px, 4vw, 56px);
  --max: 1440px;
  --measure: 40rem;
  --head-h: 64px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0d0d0c; --wall: #171715; --card: #141413;
    --ink: #f3f2ee; --ink-2: #b9b8b2; --ink-3: #8f8e89; --rule: #2a2a27;
    --ok: #4fbf7f; --bad: #ef6b5f;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0d0d0c; --wall: #171715; --card: #141413;
  --ink: #f3f2ee; --ink-2: #b9b8b2; --ink-3: #8f8e89; --rule: #2a2a27;
  --ok: #4fbf7f; --bad: #ef6b5f;
  color-scheme: dark;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  transition: background-color .5s ease, color .5s ease;
}
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
button { font: inherit; color: inherit; }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

.kicker {
  font-size: 12px; font-weight: 600;
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--ink-3);
  margin: 0;
}

.pill {
  display: inline-flex; align-items: center; gap: 8px;
  background: none;
  border: 1px solid var(--rule);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 13px; font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: border-color .2s ease, background-color .2s ease, color .2s ease;
}
.pill:hover { border-color: var(--ink); }
.pill svg { width: 14px; height: 14px; }
.pill-count {
  font-variant-numeric: tabular-nums;
  background: var(--ink); color: var(--bg);
  border-radius: 999px; padding: 0 7px; font-size: 11px; line-height: 18px; font-weight: 600;
}
.pill-dot { width: 8px; height: 8px; border-radius: 50%; border: 1.5px solid currentColor; transition: background-color .2s ease; }
.pill[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.pill[aria-pressed="true"] .pill-dot { background: currentColor; }

/* ---------- Masthead ---------- */
.masthead {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20;
  height: var(--head-h);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  padding: 0 var(--gutter);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--rule);
  transition: background-color .5s ease, border-color .5s ease;
}
.wordmark {
  font-weight: 800; font-size: 22px;
  letter-spacing: -.035em;
  text-decoration: none; text-transform: uppercase;
  line-height: 1;
}
.masthead-meta {
  font-size: 13px; font-weight: 500;
  color: var(--ink-2);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.masthead-meta .sep { margin: 0 .6em; color: var(--ink-3); }
.masthead-actions { justify-self: end; display: flex; gap: 8px; }
.theme-toggle-dot {
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--ink);
  box-shadow: inset -4px 0 0 var(--bg);
}

.archive-banner {
  display: flex; justify-content: center; gap: 16px; flex-wrap: wrap;
  padding: 10px var(--gutter);
  background: var(--ink); color: var(--bg);
  font-size: 13px; font-weight: 500;
}

/* ---------- Stage (hero image) ---------- */
.stage {
  background: var(--wall);
  transition: background-color .5s ease;
  padding: clamp(16px, 3vw, 40px) var(--gutter) 0;
}
.plate {
  margin: 0 auto;
  height: calc(100svh - var(--head-h) - 96px);
  min-height: 320px;
  display: flex; align-items: center; justify-content: center;
}
.plate-frame {
  position: relative;
  display: inline-block;
  max-width: 100%;
  max-height: 100%;
  line-height: 0;
}
.plate-img {
  max-width: min(100%, var(--max));
  max-height: calc(100svh - var(--head-h) - 96px);
  width: auto; height: auto;
  cursor: zoom-in;
  box-shadow: 0 1px 2px rgba(0,0,0,.06), 0 30px 70px -30px rgba(0,0,0,.4);
  opacity: 0;
  transform: scale(.985);
  transition: opacity 1.2s ease, transform 1.4s cubic-bezier(.2,.7,.2,1);
}
.plate-img.is-loaded { opacity: 1; transform: none; }

.stage-bar {
  max-width: var(--max);
  margin: 0 auto;
  min-height: 96px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.stage-caption { display: flex; flex-direction: column; min-width: 0; }
.stage-artist { font-weight: 700; font-size: 16px; letter-spacing: -.01em; }
.stage-title { font-family: var(--serif); font-style: italic; font-size: 17px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stage-actions { display: flex; gap: 8px; flex-shrink: 0; }

/* Hotspot markers (shared by plate and viewer) */
.marker {
  position: absolute;
  width: 30px; height: 30px;
  margin: -15px 0 0 -15px;
  border-radius: 50%;
  border: 1.5px solid #fff;
  background: rgba(10,10,10,.72);
  color: #fff;
  font-size: 12px; font-weight: 700; line-height: 1;
  display: grid; place-items: center;
  cursor: pointer;
  padding: 0;
  box-shadow: 0 2px 10px rgba(0,0,0,.35);
  opacity: 0; transform: scale(.6);
  pointer-events: none;
  transition: opacity .35s ease, transform .35s cubic-bezier(.2,.9,.3,1.4), background-color .2s ease;
}
.marker::after {
  content: ""; position: absolute; inset: -6px;
  border-radius: 50%; border: 1.5px solid rgba(255,255,255,.7);
  animation: ping 2.4s ease-out infinite;
}
@keyframes ping { 0% { transform: scale(.8); opacity: .9; } 80%, 100% { transform: scale(1.5); opacity: 0; } }
.show-details .marker { opacity: 1; transform: none; pointer-events: auto; }
.show-details .marker:nth-child(2) { transition-delay: .05s; }
.show-details .marker:nth-child(3) { transition-delay: .1s; }
.show-details .marker:nth-child(4) { transition-delay: .15s; }
.show-details .marker:nth-child(5) { transition-delay: .2s; }
.show-details .marker:nth-child(6) { transition-delay: .25s; }
.marker:hover, .marker.is-active { background: var(--accent); }
.marker.is-active::after { animation: none; opacity: 0; }

/* Placeholder for works whose images can't be reproduced */
.plate-placeholder {
  width: min(100%, 720px);
  aspect-ratio: var(--ratio, 4 / 3);
  max-height: 100%;
  border: 1px solid var(--rule);
  background: var(--bg);
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: clamp(20px, 4vw, 40px);
  gap: 10px;
  line-height: 1.5;
}
.plate-placeholder .ph-kicker { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); font-weight: 600; }
.plate-placeholder .ph-title { font-size: clamp(22px, 3vw, 34px); font-weight: 700; letter-spacing: -.02em; line-height: 1.1; margin: 0; }
.plate-placeholder .ph-note { color: var(--ink-2); font-size: 15px; margin: 0; max-width: 34rem; }
.plate-placeholder a.ph-link {
  align-self: flex-start; margin-top: 8px;
  font-weight: 600; font-size: 14px;
  border: 1px solid var(--ink); padding: 10px 16px; text-decoration: none;
}
.plate-placeholder a.ph-link:hover { background: var(--ink); color: var(--bg); }

/* ---------- Quiz ---------- */
.quiz {
  max-width: 52rem;
  margin: 0 auto;
  padding: clamp(56px, 8vw, 104px) var(--gutter) 0;
}
.quiz-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.pips { display: flex; gap: 6px; list-style: none; margin: 0; padding: 0; }
.pips li {
  width: 22px; height: 6px;
  background: var(--rule);
  transition: background-color .3s ease;
}
.pips li.is-current { background: var(--ink-3); }
.pips li.is-right { background: var(--ok); }
.pips li.is-wrong { background: var(--bad); }

.quiz-card {
  border-top: 1px solid var(--ink);
  padding-top: 28px;
}
.q-count { font-size: 13px; color: var(--ink-3); font-weight: 500; margin: 0 0 12px; font-variant-numeric: tabular-nums; }
.q-text {
  font-size: clamp(24px, 3vw, 36px);
  font-weight: 700;
  letter-spacing: -.025em;
  line-height: 1.15;
  margin: 0 0 28px;
  text-wrap: balance;
}
.q-options { display: grid; gap: 10px; list-style: none; margin: 0; padding: 0; }
.q-option {
  width: 100%;
  display: flex; align-items: center; gap: 16px;
  text-align: left;
  padding: 16px 18px;
  background: var(--card);
  border: 1px solid var(--rule);
  font-size: 17px; line-height: 1.35;
  cursor: pointer;
  transition: border-color .15s ease, transform .15s ease, background-color .3s ease, opacity .3s ease;
}
.q-option:hover:not(:disabled) { border-color: var(--ink); }
.q-option:active:not(:disabled) { transform: scale(.99); }
.q-option:disabled { cursor: default; }
.q-letter {
  flex-shrink: 0;
  width: 28px; height: 28px;
  display: grid; place-items: center;
  border: 1px solid var(--rule);
  font-size: 12px; font-weight: 700;
  transition: all .3s ease;
}
.q-option.is-right { border-color: var(--ok); }
.q-option.is-right .q-letter { background: var(--ok); border-color: var(--ok); color: #fff; }
.q-option.is-wrong { border-color: var(--bad); }
.q-option.is-wrong .q-letter { background: var(--bad); border-color: var(--bad); color: #fff; }
.q-option.is-dim { opacity: .45; }
.q-option.shake { animation: shake .4s ease; }
@keyframes shake { 20%, 60% { transform: translateX(-5px); } 40%, 80% { transform: translateX(5px); } }

.q-feedback {
  margin-top: 24px;
  padding: 20px 22px;
  background: var(--wall);
  animation: rise .4s cubic-bezier(.2,.7,.2,1);
}
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.q-verdict { font-weight: 700; margin: 0 0 6px; font-size: 15px; }
.q-verdict.is-right { color: var(--ok); }
.q-verdict.is-wrong { color: var(--bad); }
.q-explain { margin: 0; font-family: var(--serif); font-size: 18px; line-height: 1.55; }
.q-next {
  margin-top: 20px;
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--ink); color: var(--bg);
  border: 0; padding: 14px 22px;
  font-size: 15px; font-weight: 600;
  cursor: pointer;
}
.q-next:hover { opacity: .88; }
.q-enter { animation: rise .45s cubic-bezier(.2,.7,.2,1); }

/* Result */
.result { text-align: left; }
.result-score {
  font-size: clamp(72px, 12vw, 136px);
  font-weight: 800; letter-spacing: -.05em; line-height: .9;
  margin: 0;
  font-variant-numeric: tabular-nums;
}
.result-score span { color: var(--ink-3); }
.result-score .score-num { font-weight: inherit; }
.result-quip {
  margin: 18px 0 28px;
  max-width: 36rem;
  font-size: clamp(20px, 2.2vw, 26px);
  font-weight: 600;
  letter-spacing: -.02em;
  line-height: 1.25;
  text-wrap: balance;
}
.result-pips { display: flex; gap: 6px; margin: 24px 0 28px; }
.result-pips span { width: 36px; height: 10px; }
.result-pips .r { background: var(--ok); }
.result-pips .w { background: var(--bad); }
.result-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 22px;
  font-size: 15px; font-weight: 600;
  border: 1px solid var(--ink);
  background: none; cursor: pointer;
  text-decoration: none;
}
.btn-primary { background: var(--ink); color: var(--bg); }
.btn:hover { opacity: .85; }
/* Tidbits: the five facts to take away */
.tidbits {
  margin: 0 0 28px;
  padding: 24px 24px 8px;
  background: var(--wall);
}
.tidbits-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.tidbits-title { margin: 0; font-size: 20px; font-weight: 700; letter-spacing: -.02em; }
.tidbit-copy-all, .tidbit-copy {
  background: none; border: 1px solid var(--ink); color: var(--ink);
  font-size: 13px; font-weight: 600; cursor: pointer;
  padding: 6px 12px; white-space: nowrap;
  transition: background-color .15s ease, color .15s ease;
}
.tidbit-copy-all:hover, .tidbit-copy:hover { background: var(--ink); color: var(--bg); }
.tidbit-copy { border-color: var(--rule); color: var(--ink-2); font-weight: 500; padding: 4px 10px; font-size: 12px; }
.tidbit-list { list-style: none; margin: 16px 0 0; padding: 0; counter-reset: tb; }
.tidbit-list li {
  counter-increment: tb;
  display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; gap: 12px; align-items: start;
  padding: 14px 0;
  border-top: 1px solid var(--rule);
}
.tidbit-list li::before {
  content: counter(tb);
  font-size: 20px; font-weight: 800; letter-spacing: -.03em; line-height: 1.2;
  color: var(--accent);
}
:root[data-theme="dark"] .tidbit-list li::before { color: var(--ink); }
.tidbit-list li.is-right::before,
:root[data-theme="dark"] .tidbit-list li.is-right::before { color: var(--ok); }
.tidbit-list li.is-wrong::before,
:root[data-theme="dark"] .tidbit-list li.is-wrong::before { color: var(--bad); }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.tidbit-list p { margin: 0; font-family: var(--serif); font-size: 17px; line-height: 1.45; }

.collection-tidbits { margin-top: 72px; }
.collection-sub { margin: 0; font-size: clamp(24px, 3vw, 36px); font-weight: 800; letter-spacing: -.03em; }
.collection-sub span { color: var(--ink-3); font-weight: 600; }
.collection-sub-note { margin: 6px 0 24px; color: var(--ink-2); }
.tidbit-group { padding: 20px 0 8px; border-top: 1px solid var(--ink); }
.tidbit-work { margin: 0; font-size: 16px; }
.tidbit-work em { font-family: var(--serif); color: var(--ink-2); }

.review { margin-top: 28px; border-top: 1px solid var(--rule); }
.review summary {
  cursor: pointer;
  padding: 16px 0;
  font-size: 15px; font-weight: 600;
  list-style: none;
  display: flex; align-items: center; gap: 10px;
}
.review summary::-webkit-details-marker { display: none; }
.review summary::before {
  content: "+"; width: 20px; text-align: center;
  font-size: 18px; font-weight: 500; color: var(--ink-3);
}
.review[open] summary::before { content: "\2212"; }
.review-list { list-style: none; margin: 0 0 8px; padding: 0; counter-reset: rq; }
.review-list li {
  counter-increment: rq;
  padding: 18px 0 18px 30px;
  border-top: 1px solid var(--rule);
  position: relative;
}
.review-list li::before {
  content: counter(rq);
  position: absolute; left: 0; top: 18px;
  width: 20px; height: 20px; display: grid; place-items: center;
  font-size: 11px; font-weight: 700; color: #fff;
}
.review-list li.is-right::before { background: var(--ok); }
.review-list li.is-wrong::before { background: var(--bad); }
.review-q { margin: 0 0 8px; font-weight: 600; font-size: 16px; line-height: 1.35; }
.review-a { margin: 0 0 4px; font-size: 15px; color: var(--ink-2); }
.review-mark {
  display: inline-block; min-width: 92px;
  font-size: 11px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase;
  color: var(--ink-3);
}
.is-right .review-mark, .review-mark-right { color: var(--ok); }
.review-mark-wrong { color: var(--bad); }
.review-explain { margin: 8px 0 0; font-family: var(--serif); font-size: 16px; line-height: 1.5; color: var(--ink-2); }

.stats {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 36px 0 0; border-top: 1px solid var(--rule);
}
.stats > div { padding: 16px 12px 0 0; }
.stats dt { font-size: 11px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); }
.stats dd { margin: 6px 0 0; font-size: 28px; font-weight: 800; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }

/* ---------- Locked teaser ---------- */
.locked {
  max-width: 52rem;
  margin: 0 auto;
  padding: clamp(56px, 7vw, 88px) var(--gutter) 0;
}
.locked-inner {
  border: 1px dashed var(--rule);
  padding: 32px;
  display: grid; justify-items: start; gap: 12px;
  color: var(--ink-3);
}
.lock-icon { width: 24px; height: 24px; }
.locked-title { margin: 0; font-weight: 600; color: var(--ink-2); font-size: 17px; }
.locked-list { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.locked-list li {
  font-size: 13px; padding: 4px 10px;
  background: var(--wall);
  filter: blur(.3px);
}

.unlocked { animation: rise .8s cubic-bezier(.2,.7,.2,1); }

/* ---------- Wall label ---------- */
.label {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(72px, 9vw, 128px) var(--gutter) 0;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: clamp(32px, 6vw, 96px);
  align-items: start;
}
.label-artist {
  font-size: clamp(30px, 4.6vw, 64px);
  font-weight: 800; letter-spacing: -.035em; line-height: .98;
  margin: 0;
}
.label-artist-meta { margin: 14px 0 0; font-size: 16px; color: var(--ink-2); }
.label-title {
  font-family: var(--serif); font-style: italic; font-weight: 400;
  font-size: clamp(24px, 2.8vw, 38px);
  line-height: 1.15; letter-spacing: -.01em;
  margin: clamp(24px, 3vw, 40px) 0 0;
}
.label-title .label-date { font-style: normal; color: var(--ink-2); }
.label-original { margin: 10px 0 0; color: var(--ink-3); font-size: 15px; }
.label-original:empty { display: none; }

.label-facts { margin: 6px 0 0; border-top: 1px solid var(--ink); }
.label-facts > div {
  display: grid;
  grid-template-columns: 7.5rem minmax(0, 1fr);
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--rule);
}
.label-facts dt { font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); padding-top: 3px; }
.label-facts dd { margin: 0; font-size: 15px; line-height: 1.45; }
.label-facts dd .sub { display: block; color: var(--ink-2); font-size: 14px; }

/* ---------- Lede ---------- */
.lede-wrap { max-width: var(--max); margin: 0 auto; padding: clamp(56px, 8vw, 120px) var(--gutter) 0; }
.lede {
  margin: 0; max-width: 62rem;
  font-size: clamp(22px, 2.5vw, 34px);
  font-weight: 500; letter-spacing: -.02em; line-height: 1.28;
}

/* ---------- Essay ---------- */
.essay {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(56px, 8vw, 112px) var(--gutter) 0;
  display: grid;
  grid-template-columns: 14rem minmax(0, 1fr);
  gap: clamp(32px, 6vw, 96px);
}
.toc { position: relative; }
.toc ol {
  position: sticky; top: calc(var(--head-h) + 32px);
  list-style: none; margin: 0; padding: 0;
  border-top: 1px solid var(--ink);
  counter-reset: toc;
}
.toc li { counter-increment: toc; border-bottom: 1px solid var(--rule); }
.toc a {
  display: flex; gap: 12px; padding: 12px 0;
  font-size: 14px; font-weight: 500;
  text-decoration: none; color: var(--ink-3);
  transition: color .2s ease;
}
.toc a::before { content: counter(toc, decimal-leading-zero); font-variant-numeric: tabular-nums; }
.toc a:hover, .toc a.is-active { color: var(--ink); }

.essay-body { max-width: var(--measure); }
.essay-section { scroll-margin-top: calc(var(--head-h) + 32px); }
.essay-section + .essay-section { margin-top: clamp(56px, 7vw, 96px); }
.essay-section h2 {
  font-size: clamp(24px, 2.4vw, 32px);
  font-weight: 700; letter-spacing: -.025em; line-height: 1.1;
  margin: 0 0 24px;
}
.essay-section h2 .num {
  display: block;
  font-size: 12px; font-weight: 600; letter-spacing: .14em;
  color: var(--accent);
  margin-bottom: 10px;
}
:root[data-theme="dark"] .essay-section h2 .num { color: var(--ink-3); }
.essay-section p {
  font-family: var(--serif);
  font-size: clamp(18px, 1.35vw, 20px);
  line-height: 1.68;
  margin: 0 0 1.1em;
  text-wrap: pretty;
}
.essay-section p:last-child { margin-bottom: 0; }

/* ---------- Look closer / sources ---------- */
.notice, .sources { max-width: var(--max); margin: 0 auto; padding: clamp(72px, 9vw, 128px) var(--gutter) 0; }
.notice .kicker, .sources .kicker { margin-bottom: 24px; }
.notice-list {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  border-top: 1px solid var(--ink);
  counter-reset: n;
}
.notice-list li {
  counter-increment: n;
  padding: 24px 24px 28px 0;
  border-bottom: 1px solid var(--rule);
  font-size: 16px; line-height: 1.5;
}
.notice-list li::before {
  content: counter(n); display: block;
  font-size: 40px; font-weight: 800; letter-spacing: -.04em; line-height: 1;
  margin-bottom: 14px; color: var(--accent);
}
:root[data-theme="dark"] .notice-list li::before { color: var(--ink); }
.sources-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
.sources-list li { padding: 12px 0; border-bottom: 1px solid var(--rule); font-size: 15px; color: var(--ink-2); }
.image-credit { margin: 24px 0 0; font-size: 13px; color: var(--ink-3); max-width: 48rem; }

/* ---------- Footer ---------- */
.footer {
  max-width: var(--max);
  margin: clamp(88px, 10vw, 160px) auto 0;
  padding: 40px var(--gutter) 56px;
  border-top: 1px solid var(--ink);
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px 40px;
}
.countdown { margin: 0; font-size: clamp(18px, 2vw, 24px); font-weight: 600; letter-spacing: -.02em; }
.countdown span { font-variant-numeric: tabular-nums; }
.footer-note { margin: 0; color: var(--ink-3); font-size: 14px; max-width: 26rem; }
.footer-links { margin: 0; flex-basis: 100%; font-size: 14px; }
.footer-links a { color: var(--ink-2); text-underline-offset: 3px; text-decoration-thickness: 1px; }
.footer-links a:hover { color: var(--ink); }

/* ---------- Viewer ---------- */
.viewer {
  position: fixed; inset: 0; z-index: 100;
  background: var(--viewer-bg); color: #f3f2ee;
  display: flex; flex-direction: column;
  animation: fade-in .35s ease;
}
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
.viewer-stage { flex: 1; position: relative; overflow: hidden; touch-action: none; cursor: grab; }
.viewer-stage.is-dragging { cursor: grabbing; }
.viewer-stage img {
  position: absolute; top: 0; left: 0;
  max-width: none;
  transform-origin: 0 0;
  user-select: none; -webkit-user-select: none;
  will-change: transform;
}
.viewer-markers { position: absolute; inset: 0; pointer-events: none; }
.viewer-markers .marker { pointer-events: none; }
.viewer.show-details .viewer-markers .marker { pointer-events: auto; }
.viewer-loading {
  position: absolute; top: 20px; left: 50%; transform: translateX(-50%);
  font-size: 12px; letter-spacing: .12em; text-transform: uppercase;
  color: rgba(255,255,255,.6);
  transition: opacity .4s ease;
  pointer-events: none;
}
.viewer-loading.is-done { opacity: 0; }

.viewer-note {
  position: absolute; left: var(--gutter); bottom: 84px;
  width: min(380px, calc(100% - 2 * var(--gutter)));
  background: rgba(18,18,17,.92);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,.12);
  padding: 20px 22px 16px;
  animation: rise .4s cubic-bezier(.2,.7,.2,1);
}
.viewer-note-kicker { margin: 0 0 6px; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: rgba(255,255,255,.55); font-weight: 600; }
.viewer-note-title { margin: 0 0 8px; font-size: 19px; font-weight: 700; letter-spacing: -.015em; }
.viewer-note-text { margin: 0; font-family: var(--serif); font-size: 16px; line-height: 1.5; color: rgba(255,255,255,.85); }
.viewer-note-nav { display: flex; gap: 6px; margin-top: 16px; }
.viewer-note-nav button, .viewer-controls button {
  background: none; color: #f3f2ee;
  border: 1px solid rgba(255,255,255,.25);
  min-width: 36px; height: 36px; padding: 0 12px;
  font-size: 14px; font-weight: 500;
  cursor: pointer;
}
.viewer-note-nav button:hover, .viewer-controls button:hover { border-color: #fff; }
.viewer-note-nav .note-close { margin-left: auto; font-size: 13px; }
.viewer-controls button[aria-pressed="true"] { background: #f3f2ee; color: #0b0b0b; border-color: #f3f2ee; }

.viewer-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px var(--gutter);
  border-top: 1px solid rgba(255,255,255,.12);
  font-size: 13px;
}
.viewer-caption { color: rgba(255,255,255,.7); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.viewer-controls { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.viewer-scale { min-width: 52px; text-align: center; font-variant-numeric: tabular-nums; color: rgba(255,255,255,.7); }

/* ---------- Collection ---------- */
.collection {
  position: fixed; inset: 0; z-index: 90;
  background: var(--bg);
  overflow-y: auto;
  animation: fade-in .3s ease;
}
.collection-inner { max-width: var(--max); margin: 0 auto; padding: 32px var(--gutter) 80px; }
.collection-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.collection-head h2 { margin: 0; font-size: clamp(32px, 5vw, 64px); font-weight: 800; letter-spacing: -.04em; }
.collection-grid {
  margin-top: 48px;
  display: grid; gap: 40px 24px;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}
.c-card { text-decoration: none; display: block; }
.c-thumb {
  aspect-ratio: 4 / 3;
  background: var(--wall);
  display: grid; place-items: center;
  padding: 16px;
  overflow: hidden;
}
.c-thumb img { max-height: 100%; width: auto; box-shadow: 0 10px 24px -12px rgba(0,0,0,.4); transition: transform .5s cubic-bezier(.2,.7,.2,1); }
.c-card:hover .c-thumb img { transform: scale(1.03); }
.c-thumb .c-ph { font-size: 12px; color: var(--ink-3); letter-spacing: .1em; text-transform: uppercase; text-align: center; }
.c-meta { margin-top: 14px; display: grid; gap: 2px; }
.c-no { font-size: 12px; color: var(--ink-3); font-weight: 600; letter-spacing: .08em; }
.c-artist { font-weight: 700; }
.c-title { font-family: var(--serif); font-style: italic; color: var(--ink-2); }
.c-score { display: flex; gap: 3px; margin-top: 8px; align-items: center; }
.c-score span { width: 14px; height: 5px; }
.c-score .r { background: var(--ok); }
.c-score .w { background: var(--bad); }
.c-score b { margin-left: 8px; font-size: 13px; font-weight: 600; }
.c-empty { color: var(--ink-2); font-size: 17px; max-width: 32rem; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 28px; z-index: 200;
  transform: translate(-50%, 20px);
  background: var(--ink); color: var(--bg);
  padding: 12px 18px; font-size: 14px; font-weight: 500;
  opacity: 0; pointer-events: none;
  transition: opacity .25s ease, transform .25s ease;
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .label { grid-template-columns: 1fr; }
  .essay { grid-template-columns: 1fr; }
  .toc { display: none; }
  .essay-body { max-width: none; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 8px; }
}
@media (max-width: 640px) {
  :root { --head-h: 96px; }
  .masthead { grid-template-columns: 1fr auto; grid-template-rows: 1fr auto; row-gap: 0; padding-top: 12px; padding-bottom: 10px; }
  .masthead-meta { grid-column: 1 / -1; grid-row: 2; font-size: 12px; }
  .theme-toggle-label { display: none; }
  .theme-toggle { padding: 9px; }
  .plate { height: auto; min-height: 0; padding-top: 8px; }
  .plate-img { max-height: 70svh; }
  .stage-bar { flex-direction: column; align-items: stretch; padding: 18px 0 22px; }
  .stage-actions .pill { flex: 1; justify-content: center; }
  .label-facts > div { grid-template-columns: 1fr; gap: 4px; }
  .viewer-caption, .viewer-scale { display: none; }
  .viewer-controls { width: 100%; justify-content: space-between; }
  .viewer-note { bottom: 76px; }
  .q-option { font-size: 16px; padding: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .plate-img { opacity: 1; transform: none; }
}
