/*
  "Please Don't Lick the Art" — site styles (v2, "Sweet Specimens").
  Layout: one continuous candy field (a fixed backdrop) — pop-art title → pinned "DO NOT LICK" sticker →
  the nine works pinned below it like specimens (3 columns) → Process (three small pinned contact sheets) → About.
  No hard colour bands: the backdrop fades to a new tone as each area reaches the middle of the screen.
  Entrance: title letters pop → sticker is slapped on → works are pinned one by one as they come into view.
  Click a work: full-screen detail (photo left; title, label, text and process strip right).
  Type: Rubik italic (title, via pop-title.css), Bagel Fat One (headings, work names), Figtree (text),
  Courier Prime (only the typed sticker labels). One committed light look.
*/
:root {
  --ink: #34407A;      /* "blueberry" ink, chosen by the artist (was #24104F, then grey #5E596E) */
  --ink-soft: #6F78A8; /* was #5B4A86 */
  --cherry: #E8173F;
  --lemon: #FFE500;
  --paper: #FBF8FF;
  --label: #FFFDF7;
  --white: #FFFFFF;
  --shade: rgba(36, 16, 79, .38);

  --display: "Bagel Fat One", "Arial Rounded MT Bold", ui-rounded, sans-serif;
  --body: "Figtree", "Helvetica Neue", Arial, sans-serif;
  --type: "Courier Prime", "Courier New", monospace;

  --pop: cubic-bezier(.34, 1.56, .64, 1);
  --out: cubic-bezier(0, 0, .2, 1);
  --gutter: clamp(16px, 4vw, 56px);
  --max: 1180px;
  color-scheme: light;
}
html { scroll-behavior: smooth; scroll-padding-top: 84px; background: var(--paper); }
html.no-scroll { overflow: hidden; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--body); font-size: 1rem; line-height: 1.6; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img { max-width: 100%; }
[hidden] { display: none !important; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.backdrop { position: fixed; inset: 0; z-index: 0; background: var(--tone, #FFF7CF); transition: background-color 1s var(--out); }
main, .foot { position: relative; z-index: 1; }
main { overflow-x: clip; } /* tilted prints never cause sideways scrolling on phones */
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; border-radius: 6px; }
.skip { position: fixed; left: 16px; top: calc(env(safe-area-inset-top, 0px) + 12px); z-index: 200; background: var(--lemon); color: var(--ink); padding: .5rem .9rem; border-radius: 99px; font-weight: 800; text-decoration: none; transform: translateY(-200%); }
.skip:focus { transform: none; }

/* ---------- nav ---------- */
.nav {
  position: fixed; z-index: 50; top: calc(env(safe-area-inset-top, 0px) + 14px); left: 50%; transform: translateX(-50%);
  width: min(calc(100% - 32px), var(--max)); box-sizing: border-box;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 7px 7px 7px 18px; background: var(--white); border-radius: 99px;
  box-shadow: 0 10px 26px -14px var(--shade);
}
.nav-name { font-family: var(--display); color: var(--cherry); font-size: 1.15rem; line-height: 1; text-decoration: none; white-space: nowrap; }
.nav nav { display: flex; gap: 2px; }
.nav nav a { color: var(--ink); text-decoration: none; font-weight: 800; font-size: .92rem; padding: 7px 13px; border-radius: 99px; transition: background-color .2s var(--out); }
.nav nav a:hover, .nav nav a[aria-current="true"] { background: var(--lemon); }

/* ---------- hero ---------- */
.hero {
  padding: calc(env(safe-area-inset-top, 0px) + clamp(100px, 11vw, 132px)) var(--gutter) 0;
  text-align: center;
}
.hero .pt { font-size: clamp(32px, 7.2vw, 98px); max-width: 980px; margin: 0 auto; }
.hero .pt-C { font-size: clamp(38px, 8.4vw, 112px); }
.hero-sticker { position: relative; max-width: 340px; margin: clamp(26px, 3.6vw, 40px) auto 0; text-align: left; transform: rotate(-3deg); }
.hero-sticker .spec { font-size: .9rem; padding: 26px 20px 18px; }
.hero-sticker .pin { --ph: 24px; }
.hero-sticker h3 { margin: 0 0 6px; font-family: var(--display); font-weight: 400; font-size: 1.5rem; line-height: 1.05; }
.hero-sticker .quote { margin-top: 10px; }
.hero-sticker .from { color: var(--ink-soft); }
.stamp { display: inline-block; margin-top: 12px; margin-left: auto; transform: rotate(-11deg); border: 2px solid var(--cherry); color: var(--cherry); border-radius: 5px; padding: 1px 7px; font-family: var(--type); font-weight: 700; font-size: .75rem; letter-spacing: .08em; opacity: .92; }
.stamp-row { display: flex; justify-content: flex-end; }
/* hand-drawn arrow from the sticker down to the works (wide screens only) */
.cue { position: absolute; left: calc(100% + 26px); top: 26%; width: 150px; display: grid; justify-items: start; gap: 2px; color: var(--ink); text-decoration: none; transform: rotate(5deg); }
.cue span { font-family: var(--display); font-size: 1.12rem; line-height: 1; white-space: nowrap; }
.cue svg { width: 112px; height: auto; margin-left: 10px; fill: none; stroke: var(--cherry); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; overflow: visible; }
.cue:hover svg { transform: translateY(3px); transition: transform .3s var(--pop); }
@media (max-width: 900px) { .cue { display: none; } }

/* ---------- section heads ---------- */
.section-head { max-width: var(--max); margin: 0 auto; display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 10px 24px; }
.h2 { margin: 0; font-family: var(--display); font-weight: 400; font-size: clamp(2rem, 4.2vw, 3.1rem); line-height: 1; color: var(--on-bg, var(--ink)); }
.section-head.center { flex-direction: column; align-items: center; text-align: center; gap: 10px; }
.lede { margin: 0; max-width: 54ch; font-size: 1rem; line-height: 1.55; color: var(--ink-soft); font-weight: 500; }

/* ---------- pins & labels ---------- */
.pin {
  --pc: var(--cherry); --ph: 20px;
  position: absolute; z-index: 4; width: var(--ph); height: var(--ph); border-radius: 50%;
  background: radial-gradient(circle at 33% 28%, #fff 0 7%, color-mix(in oklab, var(--pc) 55%, #fff) 13%, var(--pc) 45%, color-mix(in oklab, var(--pc) 55%, #000) 100%);
  transform: translate(-50%, -50%);
}
.pin::before { content: ""; position: absolute; left: 55%; top: 70%; width: 140%; height: 46%; border-radius: 50%; background: radial-gradient(closest-side, rgba(36,16,79,.38), transparent); transform: rotate(28deg); z-index: -1; filter: blur(1px); }
.pin::after { content: ""; position: absolute; left: 62%; top: 72%; width: 2px; height: 46%; background: linear-gradient(#F2F4F8, #8E97A8); transform: rotate(-38deg); transform-origin: top; z-index: -1; border-radius: 1px; }
.spec { position: relative; box-sizing: border-box; background: var(--label); color: var(--ink); font-family: var(--type); font-size: .82rem; line-height: 1.45; padding: 20px 16px 13px; border-radius: 2px; box-shadow: 0 1px 0 rgba(36,16,79,.08), 0 10px 18px -10px var(--shade); }
.spec > .pin { left: 50%; top: 4px; }
.spec p { margin: 0; }
.spec .k { color: var(--ink-soft); }
.print { display: block; border-radius: 3px; box-shadow: 0 18px 30px -16px var(--shade), 0 2px 5px rgba(36,16,79,.12); }

/* ---------- works board ---------- */
.works { padding: 0 var(--gutter) clamp(88px, 11vw, 140px); }
.board { list-style: none; margin: clamp(30px, 4vw, 46px) auto 0; padding: 0; max-width: 1060px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(30px, 5vw, 64px) clamp(16px, 4vw, 52px); }
.board li { min-width: 0; }
.specimen { all: unset; display: block; position: relative; cursor: pointer; padding-top: 6px; transform: rotate(var(--rot)); transform-origin: 18px 14px; transition: transform .55s var(--pop), opacity .35s var(--out), filter .35s var(--out); }
.specimen:hover, .specimen:focus-visible { transform: rotate(calc(var(--rot) * -1)); }
.specimen:focus-visible { outline: 3px solid var(--ink); outline-offset: 8px; }
.specimen .pin { left: 18px; top: 16px; } /* top-left corner, off the middle of the photo */
.specimen img { width: 100%; height: auto; transition: box-shadow .4s var(--out); }
.specimen .cap { display: block; margin-top: 12px; text-align: center; font-family: var(--display); font-size: clamp(.95rem, 1.5vw, 1.12rem); line-height: 1.15; letter-spacing: .01em; color: var(--on-bg, var(--ink)); text-wrap: balance; }
/* spotlight: the work under the pointer stays bright, the others step back */
@media (hover: hover) {
  .board:has(.specimen:hover) .specimen:not(:hover) { opacity: .72; filter: saturate(.55) brightness(1.04); }
  .specimen:hover .print { box-shadow: 0 30px 44px -20px var(--shade), 0 3px 8px rgba(36,16,79,.14); }
}

/* ---------- entrance ---------- */
@media (prefers-reduced-motion: no-preference) {
  .hero-sticker .spec { animation: slap .7s var(--pop) .8s both; }
  .hero-sticker .spec > .pin { animation: pin-stab .45s var(--pop) 1.25s both; }
  .cue { animation: fade-in .4s var(--out) 1.9s both; }
  .cue path { stroke-dasharray: 320; animation: draw .9s var(--out) 2s both; }
  .cue path + path { animation-delay: 2.7s; animation-duration: .3s; }
  .board.pre li:not(.in) { opacity: 0; }
  .board li.in { animation: pin-drop .75s var(--pop) var(--dl, 0ms) both; }
  .board li.in .pin { animation: pin-stab .45s var(--pop) calc(var(--dl, 0ms) + 340ms) both; }
}
@keyframes slap { 0% { opacity: 0; transform: translateY(-70px) rotate(-16deg) scale(1.2); } 55% { opacity: 1; } 100% { opacity: 1; transform: none; } }
@keyframes pin-drop { 0% { opacity: 0; transform: translateY(-46px) rotate(-8deg) scale(1.06); } 50% { opacity: 1; } 100% { opacity: 1; transform: none; } }
@keyframes pin-stab { 0% { opacity: 0; transform: translate(-50%, -50%) translate(14px, -22px) scale(2.2); } 100% { opacity: 1; transform: translate(-50%, -50%); } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes draw { from { stroke-dashoffset: 320; } to { stroke-dashoffset: 0; } }

/* ---------- detail ---------- */
.detail { position: fixed; inset: 0; z-index: 80; overflow-y: auto; overscroll-behavior: contain; background: color-mix(in oklab, var(--flavor, #F7C6D6) 46%, var(--white)); animation: detail-in .28s var(--out); }
.detail[hidden] { display: none; }
@keyframes detail-in { from { opacity: 0; transform: scale(.985); } to { opacity: 1; transform: none; } }
.detail-bar { position: sticky; top: 0; z-index: 2; display: flex; justify-content: flex-end; gap: 8px; padding: calc(env(safe-area-inset-top, 0px) + 14px) 16px 0; pointer-events: none; }
.detail-bar .candy { pointer-events: auto; }
.detail-inner { max-width: var(--max); margin: 0 auto; box-sizing: border-box; padding: 4px var(--gutter) 64px; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: clamp(24px, 5vw, 64px); align-items: start; }
.detail-img { position: sticky; top: 70px; display: flex; justify-content: center; }
.detail-img img { max-height: calc(100vh - 110px); width: auto; max-width: 100%; height: auto; cursor: zoom-in; }
.detail-text { min-width: 0; display: grid; gap: 16px; align-content: start; padding-top: 6px; }
.detail-no { margin: 0; font-family: var(--type); font-size: .85rem; color: var(--ink-soft); }
.detail-title { margin: 0; font-family: var(--display); font-weight: 400; font-size: clamp(2.2rem, 4.4vw, 3.6rem); line-height: .98; text-wrap: balance; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.chips li { background: rgba(255,255,255,.72); border-radius: 99px; padding: 2px 11px; font-size: .85rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.detail-text .spec { max-width: 360px; transform: rotate(-1.2deg); }
.desc { margin: 0; max-width: 62ch; font-size: 1.02rem; line-height: 1.72; font-weight: 500; }
.desc p { margin: 0 0 .95em; }
.desc strong, .about-body strong { font-weight: 700; background: linear-gradient(transparent 60%, color-mix(in oklab, var(--mark, #FFE14D) 75%, transparent) 60%); padding: 0 .08em; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
/* reading font for the artist's texts — data.js → textFont */
:root { --read: var(--body); }
:root[data-textfont="fraunces"] { --read: "Fraunces", Georgia, serif; }
:root[data-textfont="literata"] { --read: "Literata", Georgia, serif; }
:root[data-textfont="nunito"] { --read: "Nunito", var(--body); }
.desc, .about-body { font-family: var(--read); font-optical-sizing: auto; }
:root[data-textfont="fraunces"] .desc, :root[data-textfont="literata"] .desc, :root[data-textfont="fraunces"] .about-body, :root[data-textfont="literata"] .about-body { font-weight: 400; font-size: 1.08rem; line-height: 1.68; }
.desc p:last-child { margin-bottom: 0; }
.strip-h { margin: 6px 0 0; font-family: var(--type); font-weight: 700; font-size: .85rem; }
.strip { display: flex; flex-wrap: wrap; gap: 10px; }
.strip button { all: unset; cursor: zoom-in; border-radius: 6px; }
.strip button:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
.strip img { display: block; height: 84px; width: auto; border-radius: 6px; box-shadow: 0 6px 12px -6px var(--shade); transition: transform .3s var(--pop); }
.strip button:hover img { transform: translateY(-3px) rotate(-1.5deg); }
.detail-next { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 8px; }
.link { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; font-size: .95rem; color: var(--ink); text-decoration: none; background: none; border: 0; padding: 0; cursor: pointer; }
.link svg { width: 30px; height: 12px; fill: none; stroke: var(--cherry); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.link:hover svg path { animation: squiggle .6s var(--out); }
.link svg path { stroke-dasharray: 60; }
@keyframes squiggle { from { stroke-dashoffset: 60; } to { stroke-dashoffset: 0; } }

/* ---------- process: small pinned contact sheets, clearly smaller than the works ---------- */
.process { padding: clamp(40px, 6vw, 72px) var(--gutter) clamp(88px, 11vw, 140px); }
.sheets { max-width: 1060px; margin: clamp(34px, 5vw, 54px) auto 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(24px, 4vw, 48px); align-items: start; }
.sheet { position: relative; background: var(--label); padding: 14px 12px 14px; border-radius: 3px; transform: rotate(var(--rot)); transform-origin: 50% 8px; transition: transform .5s var(--pop); box-shadow: 0 1px 0 rgba(36,16,79,.06), 0 16px 28px -18px var(--shade); }
.sheet:hover { transform: rotate(0deg); }
.sheet > .pin { left: 50%; top: 4px; }
.sheet-grid { display: grid; grid-template-columns: repeat(var(--cols, 4), minmax(0, 1fr)); gap: 3px; background: var(--label); }
.sheet-grid button { all: unset; display: block; position: relative; cursor: zoom-in; aspect-ratio: 1; }
.sheet-grid img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 1px; transition: transform .3s var(--pop), box-shadow .3s var(--out); }
.sheet-grid button:hover img, .sheet-grid button:focus-visible img { position: relative; z-index: 2; transform: scale(1.35); box-shadow: 0 10px 18px -8px rgba(36,16,79,.5); border-radius: 2px; }
.sheet-grid button:hover, .sheet-grid button:focus-visible { z-index: 2; }
.sheet-grid button:focus-visible { outline: none; }
.sheet-grid button:focus-visible img { outline: 3px solid var(--ink); outline-offset: 1px; }
.sheet-cap { padding: 12px 4px 0; }
.sheet-cap h3 { margin: 0; display: flex; align-items: center; gap: 8px; font-family: var(--display); font-weight: 400; font-size: 1.22rem; line-height: 1.1; }
.sheet-cap small { font-family: var(--body); font-weight: 800; font-size: .72rem; line-height: 1; background: var(--lemon); border-radius: 99px; padding: 3px 7px; }
.sheet-cap p { margin: 6px 0 0; font-size: .84rem; line-height: 1.45; color: var(--ink-soft); }

.group-intro { max-width: var(--max); margin: 18px auto 0; font-size: 1rem; color: var(--on-bg, var(--ink)); opacity: .82; }
.group-intro span { display: block; max-width: 60ch; }
.masonry { max-width: var(--max); margin: 28px auto 0; columns: 4 200px; column-gap: clamp(12px, 2vw, 20px); }
.masonry figure { break-inside: avoid; margin: 0 0 clamp(12px, 2vw, 20px); }
.masonry button { all: unset; display: block; cursor: zoom-in; border-radius: 4px; }
.masonry button:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
.masonry img { display: block; width: 100%; height: auto; border-radius: 4px; box-shadow: 0 12px 22px -14px var(--shade); }
.masonry figcaption { margin-top: 7px; font-size: .8rem; font-weight: 600; line-height: 1.35; display: flex; flex-wrap: wrap; gap: 4px 10px; color: var(--on-bg, var(--ink)); }
.masonry figcaption a { color: inherit; font-weight: 800; text-decoration: none; border-bottom: 1.5px solid var(--cherry); }

/* ---------- extra sections: Plans = a row of taped sketchbook pages ---------- */
.extra { padding: clamp(40px, 6vw, 72px) var(--gutter) clamp(88px, 11vw, 140px); }
.extra .group-intro { margin-top: 14px; }
.extra-strip { padding-inline: 0; }
.extra-strip .section-head { padding-inline: var(--gutter); }
.pages-wrap { position: relative; margin-top: clamp(26px, 4vw, 44px); }
.pages {
  list-style: none; margin: 0; display: flex; gap: clamp(18px, 2.6vw, 30px); overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory; scroll-padding-inline: var(--gutter); padding: 22px max(var(--gutter), calc((100vw - 1060px) / 2)) 26px;
  scrollbar-width: thin; scrollbar-color: rgba(36,16,79,.25) transparent;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 var(--gutter), #000 calc(100% - var(--gutter)), transparent);
          mask-image: linear-gradient(90deg, transparent, #000 var(--gutter), #000 calc(100% - var(--gutter)), transparent);
}
.pages:focus-visible { outline: 3px solid var(--ink); outline-offset: -3px; }
.page { position: relative; flex: 0 0 clamp(220px, 24vw, 280px); scroll-snap-align: start; background: var(--label); padding: 9px 9px 14px; border-radius: 3px; transform: rotate(var(--rot)); transition: transform .5s var(--pop); box-shadow: 0 1px 0 rgba(36,16,79,.06), 0 14px 26px -18px var(--shade); }
.page:hover { transform: rotate(0deg) translateY(-3px); }
.page::before { content: ""; position: absolute; left: 50%; top: -11px; width: 74px; height: 22px; transform: translateX(-50%) rotate(-3deg); background: color-mix(in oklab, var(--tape) 72%, transparent); box-shadow: 0 1px 2px rgba(36,16,79,.12); border-radius: 2px; }
.page button { all: unset; display: block; cursor: zoom-in; border-radius: 2px; }
.page button:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
.page img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; border-radius: 2px; box-shadow: inset 0 0 0 1px rgba(36,16,79,.08); }
.page h3 { margin: 11px 2px 0; font-family: var(--display); font-weight: 400; font-size: 1.05rem; line-height: 1.15; }
.page p { margin: 4px 2px 0; font-size: .8rem; line-height: 1.45; color: var(--ink-soft); }
.page .rel { display: flex; flex-wrap: wrap; gap: 2px 10px; margin-top: 7px; }
.page .rel a { color: var(--ink); font-weight: 800; font-size: .78rem; text-decoration: none; border-bottom: 1.5px solid var(--cherry); }
.pages-ctrl { display: flex; justify-content: center; gap: 10px; margin-top: 4px; }
@media (hover: none) { .pages-ctrl { display: none; } }

/* ---------- about ---------- */
.about { padding: clamp(40px, 6vw, 72px) var(--gutter) clamp(72px, 10vw, 120px); }
.about-inner { max-width: var(--max); margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: clamp(20px, 5vw, 64px); align-items: start; }
.about-body { max-width: 60ch; font-size: 1.05rem; line-height: 1.7; font-weight: 500; color: var(--on-bg, var(--ink)); }
.about-body p { margin: 0 0 1rem; }
.contact { font-family: var(--type); font-size: .95rem; }
.contact a { color: inherit; font-weight: 700; word-break: break-all; }
.draft-note { margin: 0 0 1rem; padding: .7rem .95rem; border-radius: 12px; border: 2px dashed currentColor; opacity: .75; font-size: .88rem; line-height: 1.5; }

.foot { color: var(--on-bg, var(--ink)); padding: 0 var(--gutter) calc(32px + env(safe-area-inset-bottom, 0px)); }
.foot p { max-width: var(--max); margin: 0 auto; padding-top: 18px; border-top: 2px dashed currentColor; font-family: var(--type); font-size: .85rem; opacity: .8; }

/* ---------- buttons & lightbox ---------- */
.candy { width: 42px; height: 42px; border-radius: 50%; border: 0; padding: 0; display: grid; place-items: center; cursor: pointer; background: var(--white); color: var(--ink); box-shadow: 0 3px 0 rgba(36,16,79,.22); transition: transform .25s var(--pop); flex: none; }
.candy:hover { transform: translateY(-2px) scale(1.06); }
.candy:active { transform: translateY(2px); }
.candy svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.lightbox { --flavor: #FBF8FF; width: 100vw; height: 100vh; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: color-mix(in oklab, var(--flavor) 40%, var(--white)); color: var(--ink); }
.lightbox[open] { display: grid; grid-template-rows: minmax(0, 1fr) auto; }
.lightbox::backdrop { background: rgba(36, 16, 79, .5); }
.lb-stage { display: flex; overflow: auto; min-height: 0; box-sizing: border-box; padding: calc(env(safe-area-inset-top, 0px) + 64px) 16px 10px; overscroll-behavior: contain; }
.lb-stage img { margin: auto; display: block; max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 3px; cursor: zoom-in; box-shadow: 0 2rem 4rem -1.5rem var(--shade); }
.lb-stage.zoomed img { max-width: none; max-height: none; cursor: zoom-out; }
/* process photos open smaller than the works, on a paper mount, so they never compete with the finished pieces */
.lightbox.is-small .lb-stage img { max-width: min(100%, 720px); max-height: min(100%, 540px); border: 10px solid var(--label); border-radius: 2px; box-shadow: 0 1.4rem 2.6rem -1.2rem var(--shade); }
.lightbox.is-small .lb-stage.zoomed img { max-width: none; max-height: none; }
.lb-bar { display: flex; align-items: center; justify-content: center; gap: 14px; padding: 10px 16px calc(16px + env(safe-area-inset-bottom, 0px)); }
.lb-cap { min-width: 0; display: grid; justify-items: center; gap: 2px; text-align: center; }
.lb-title { margin: 0; font-weight: 700; font-size: .92rem; }
.lb-rels { font-size: .9rem; font-weight: 600; }
.lb-rels .lb-rel { margin-left: 4px; }
.lb-rel { color: var(--ink); font-weight: 800; font-size: .9rem; text-decoration: none; border-bottom: 2px solid var(--cherry); }
.lb-rel:hover { color: var(--cherry); }
.lb-close { position: fixed; top: calc(env(safe-area-inset-top, 0px) + 14px); right: 16px; }
.noscript { padding: 2rem var(--gutter); font-weight: 700; }

/* ---------- responsive ---------- */
@media (max-width: 860px) {
  .sheets { grid-template-columns: minmax(0, 1fr); max-width: 340px; gap: 36px; }
  .detail-inner { grid-template-columns: minmax(0, 1fr); }
  .detail-img { position: static; }
  .detail-img img { max-height: 70vh; }
  .about-inner { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 560px) {
  .board { gap: 26px 12px; }
  .specimen .cap { font-size: .74rem; margin-top: 9px; }
  .specimen .pin { --ph: 15px; left: 12px; top: 13px; }
  .nav { padding-left: 14px; }
  .nav-name { font-size: 1rem; }
  .nav nav a { padding: 6px 9px; font-size: .85rem; }
  .masonry { columns: 2 140px; }
  .sheet { padding: 12px 10px; }
  .strip img { height: 64px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- research: taped pages that open as readable sheets (no stock or AI images) ---------- */
:root { --grid: rgba(52, 64, 122, .075); }
.research-pages .page { flex-basis: clamp(250px, 28vw, 330px); }
.rpage-card > button { all: unset; display: block; width: 100%; cursor: pointer; border-radius: 2px; }
.rpage-card > button:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
.rpage-card .read { all: unset; cursor: pointer; color: var(--ink); font-weight: 800; font-size: .78rem; border-bottom: 1.5px solid var(--cherry); }
.rpage-card .read:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
.rcover {
  container-type: inline-size; display: flex; flex-direction: column; aspect-ratio: 4 / 3; box-sizing: border-box; overflow: hidden;
  padding: 16px 17px 12px; border-radius: 2px; color: var(--ink);
  background-color: #FFFDF7; background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px); background-size: 18px 18px;
  width: 100%; box-shadow: inset 0 0 0 1px rgba(52, 64, 122, .08); transition: transform .4s var(--pop);
}
.rpage-card > button:hover .rcover { transform: scale(1.015); }
.rcover .k { font-family: var(--type); font-weight: 700; font-size: 3.4cqw; letter-spacing: .07em; text-transform: uppercase; color: var(--ink-soft); }
.rcover .t { margin-top: 1.4cqw; font-family: var(--display); font-size: 7.4cqw; line-height: 1.02; }
.rcover .st { font-family: var(--read); font-style: italic; font-size: 5cqw; line-height: 1.1; color: var(--ink-soft); }
.rcover .cv { position: relative; flex: 1; min-height: 0; margin-top: 3cqw; display: flex; align-items: center; justify-content: center; }
.rcover .cv .r-flavor { height: 100%; width: auto; }
.r-before { display: grid; grid-template-columns: 1.25fr 1fr; gap: 3cqw; align-items: center; width: 100%; }
.r-before .sw3 { display: flex; justify-content: center; }
.r-before .sw3 .r-disc { width: 13cqw; margin-left: -2.4cqw; border-radius: 22%; }
.r-cw { position: absolute; right: 2cqw; bottom: 0; width: 34cqw; transform: rotate(3deg); }
.r-cw img { display: block; width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 1.2cqw; box-shadow: 0 2cqw 3cqw -1.6cqw rgba(52, 64, 122, .5); }
.r-cw .pin { left: 50%; top: 2.4cqw; }

/* shared pieces of the drawings */
.r-disc { display: block; width: 15cqw; aspect-ratio: 1; border-radius: 50%; overflow: hidden; background: #fff; box-shadow: 0 0 0 .55cqw #fff, 0 1.2cqw 2.2cqw -1cqw rgba(52, 64, 122, .5); }
.r-disc img { display: block; width: 100%; height: 100%; object-fit: cover; transform: scale(var(--z, 1.6)); }
.r-flavor { container-type: inline-size; position: relative; width: 100%; aspect-ratio: 4 / 3; color: var(--ink); }
.r-flavor svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.r-flavor .arc { fill: none; stroke: var(--ink-soft); stroke-width: .45; stroke-dasharray: 1.3 1.5; stroke-linecap: round; }
.r-flavor .ar { fill: none; stroke: var(--ink); stroke-width: .55; marker-start: url(#rf-a); marker-end: url(#rf-a); }
.r-flavor marker path { fill: var(--ink); }
.r-flavor .core, .r-flavor .bub, .r-flavor .route { position: absolute; left: calc(var(--x, 50) * 1%); top: calc(var(--y, 50) * 1%); transform: translate(-50%, -50%); }
.r-flavor .core { width: 20cqw; aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center; font-family: var(--display); font-size: 4.4cqw; background: radial-gradient(circle at 34% 28%, #fff 0 7%, #FFEB85 22%, #FFD233 78%); box-shadow: 0 1.4cqw 2.6cqw -1.2cqw rgba(52, 64, 122, .45); }
.r-flavor .bub { width: 13cqw; aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center; text-align: center; background: #fff; font-size: 2.5cqw; font-weight: 800; line-height: 1.05; hyphens: manual; box-shadow: 0 0 0 .35cqw rgba(52, 64, 122, .14); }
.r-flavor .route { display: flex; flex-direction: column; align-items: center; gap: .9cqw; }
.r-flavor .route[style*="--y:81"] { flex-direction: column-reverse; }
.r-flavor .route i { font-style: normal; font-family: var(--type); font-weight: 700; font-size: 2.5cqw; letter-spacing: .04em; }
.r-flavor .r-disc { width: 15cqw; }
.r-candy { container-type: inline-size; display: grid; gap: 5cqw; width: 100%; color: var(--ink); }
.r-candy .row { display: grid; grid-template-columns: 9cqw auto 1fr; align-items: center; gap: 2cqw 2.5cqw; }
.r-candy .n { font-family: var(--type); font-weight: 700; font-size: 4cqw; color: var(--ink-soft); }
.r-candy .lab { font-family: var(--type); font-weight: 700; font-size: 4cqw; letter-spacing: .04em; text-transform: uppercase; }
.r-candy .gums, .r-candy .dots { grid-column: 2 / -1; display: flex; align-items: center; }
.r-candy .gums i { width: 17cqw; aspect-ratio: 1 / 1.12; margin-right: -2.5cqw; border-radius: 46% 46% 40% 40%; opacity: .92;
  background: radial-gradient(circle at 32% 26%, rgba(255,255,255,.95) 0 6%, transparent 15%), radial-gradient(circle at 50% 62%, color-mix(in oklab, var(--c) 50%, #fff), var(--c) 82%);
  box-shadow: inset 0 -1.6cqw 2.6cqw color-mix(in oklab, var(--c) 70%, #000), 0 2cqw 3cqw -2cqw color-mix(in oklab, var(--c) 80%, #000); }
.r-candy .lolly { grid-column: 2; position: relative; display: block; width: 19cqw; height: 27cqw; }
.r-candy .lolly b { position: absolute; top: 0; left: 0; width: 19cqw; aspect-ratio: 1; border-radius: 50%; z-index: 1;
  background: radial-gradient(circle at 34% 28%, rgba(255,255,255,.85) 0 6%, transparent 14%), repeating-radial-gradient(circle at 50% 50%, #F2385E 0 1.6cqw, #FF8A2A 1.6cqw 3.2cqw, #FFD233 3.2cqw 4.8cqw, #6CC94B 4.8cqw 6.4cqw);
  box-shadow: 0 1.6cqw 2.6cqw -1.4cqw rgba(52, 64, 122, .5); }
.r-candy .lolly s { position: absolute; left: 8.6cqw; top: 15cqw; width: 1.8cqw; height: 12cqw; border-radius: 1cqw; background: linear-gradient(90deg, #fff, #E4E1F0); box-shadow: 0 .4cqw .8cqw rgba(52, 64, 122, .2); }
.r-candy .row:last-child .dots { grid-column: 3; flex-direction: column; align-items: flex-start; gap: 1.6cqw; }
.r-candy .dots i { width: 6cqw; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle at 34% 30%, rgba(255,255,255,.8) 0 10%, var(--c) 40%); }
.r-tex { container-type: inline-size; display: grid; gap: 6cqw; width: 100%; color: var(--ink); }
.r-tex .sw { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4cqw; }
.r-tex .sw span { display: grid; justify-items: center; gap: 2.4cqw; text-align: center; }
.r-tex .r-disc { width: 100%; border-radius: 22%; }
.r-tex i, .r-flavor i { font-style: normal; }
.r-tex .sw i { font-family: var(--type); font-weight: 700; font-size: 3.4cqw; line-height: 1.25; }
.r-tex .wave { display: grid; gap: 1.8cqw; }
.r-tex .wave svg { width: 100%; height: 12cqw; }
.r-tex .wave path { fill: none; stroke: var(--ink); stroke-width: 1.2; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.r-tex .wave i { font-family: var(--read); font-style: italic; font-size: 3.8cqw; color: var(--ink-soft); }
.r-works { container-type: inline-size; display: flex; justify-content: center; gap: 6cqw; padding: 3cqw 0 1cqw; }
.r-print { position: relative; flex: 0 1 46cqw; display: grid; gap: 2.4cqw; text-decoration: none; color: var(--ink); transform: rotate(var(--rot)); transition: transform .5s var(--pop); }
.r-print:hover { transform: rotate(0deg); }
.r-print img { display: block; width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 3px; box-shadow: 0 18px 30px -16px var(--shade); }
.r-print .pin { left: 14%; top: 3%; }
.r-print span { font-weight: 800; font-size: max(.82rem, 3.4cqw); justify-self: center; border-bottom: 1.5px solid var(--cherry); }
.r-works:has(.r-print:only-child) .r-print { flex-basis: 62cqw; }

/* the page viewer */
.rdlg { width: min(1040px, calc(100vw - 32px)); max-width: none; max-height: calc(100dvh - 32px); padding: 0; border: 0; border-radius: 4px; color: var(--ink); overflow: auto; overscroll-behavior: contain;
  background-color: #FFFDF7; background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px); background-size: 26px 26px;
  box-shadow: 0 40px 90px -30px rgba(52, 64, 122, .55); }
.rdlg[open] { animation: detail-in .28s var(--out); }
.rdlg::backdrop { background: rgba(52, 64, 122, .32); backdrop-filter: blur(3px); }
.rdlg-bar { position: sticky; top: 0; z-index: 3; display: flex; justify-content: flex-end; gap: 8px; padding: 14px 14px 0; pointer-events: none; }
.rdlg-bar .candy { pointer-events: auto; }
.rpage { display: block; padding: 0 clamp(20px, 5.5vw, 68px) clamp(30px, 5vw, 56px); margin-top: -30px; }
.rp-head .k { margin: 0; display: flex; gap: 14px; font-family: var(--type); font-weight: 700; font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-soft); }
.rp-head .k span { opacity: .7; }
.rp-head h2 { margin: 10px 0 0; max-width: 17ch; font-family: var(--display); font-weight: 400; font-size: clamp(2rem, 4.6vw, 3.5rem); line-height: 1; text-wrap: balance; }
.rp-head .st { margin: 6px 0 0; font-family: var(--read); font-style: italic; font-size: clamp(1.25rem, 2.4vw, 1.6rem); color: var(--ink-soft); }
.rp-head .ref { margin: 12px 0 0; font-family: var(--type); font-size: .92rem; }
.rp-group { margin-top: clamp(24px, 4vw, 42px); }
.rp-group + .rp-group { border-top: 2px dashed rgba(52, 64, 122, .18); padding-top: clamp(22px, 3.5vw, 36px); }
.rp-gh { margin: 0 0 16px; font-family: var(--display); font-weight: 400; font-size: clamp(1.3rem, 2.4vw, 1.7rem); line-height: 1.1; }
.rp-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: clamp(22px, 4.5vw, 56px); align-items: center; }
.rp-b + .rp-b { margin-top: 18px; }
.rp-b .lab, .rp-foot .lab { margin: 0 0 4px; font-family: var(--type); font-weight: 700; font-size: .78rem; letter-spacing: .07em; text-transform: uppercase; color: var(--ink-soft); }
.rp-b p:last-child { margin: 0; font-family: var(--read); font-size: 1.12rem; line-height: 1.55; }
.rp-vis { margin: 0; }
.rp-foot { margin-top: clamp(28px, 4vw, 44px); padding-top: 18px; border-top: 2px dashed rgba(52, 64, 122, .18); display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 18px 36px; }
.rp-foot ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 7px; }
.rp-foot a { color: var(--ink); font-weight: 700; font-size: .9rem; line-height: 1.4; text-decoration: none; border-bottom: 1.5px solid var(--cherry); }
.rp-foot a:hover { color: var(--cherry); }
.rp-foot .rel { margin: 0; display: flex; flex-wrap: wrap; gap: 6px 16px; }
@media (max-width: 760px) {
  .rdlg { width: 100vw; max-height: 100dvh; height: 100dvh; border-radius: 0; }
  .rp-grid, .rp-foot { grid-template-columns: minmax(0, 1fr); }
  .rp-vis { order: -1; }
  .rpage { margin-top: 0; }
  .rp-head .k { padding-right: 150px; flex-wrap: wrap; row-gap: 2px; }
}

/* narrow phones: five nav links + the name don't fit — the name becomes a pin (still read out by screen readers) */
@media (max-width: 480px) {
  .nav { padding: 6px 6px 6px 12px; gap: 6px; }
  .nav-name { font-size: 0; width: 22px; height: 22px; flex: none; border-radius: 50%; background: radial-gradient(circle at 33% 28%, #fff 0 7%, #F7A3B4 14%, var(--cherry) 48%, #8E0E27 100%); box-shadow: 0 2px 4px rgba(52, 64, 122, .25); }
  .nav nav { gap: 0; }
  .nav nav a { padding: 6px 7px; font-size: .8rem; }
}
