/* ==========================================================================
   ogme01.com — PLATE 01
   100% Unified Risograph / Woodblock Contour World
   - Every plate, stamp, cartouche & chop uses organic SVG #woodcut-edge contours
     matching the exact charcoal outline & cotton-rag tooth of the WebGL2 shader.
   - Zero straight rectangular CSS cards. Opening a project carves a real
     cotton-rag paper island inside PRESS_COMPOSITE_FS itself!
   ========================================================================== */

:root {
  --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --font-sans: 'Archivo', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  /* Mode 0: Daylight Risograph on Cotton Rag */
  --paper: #f3ead8;
  --paper-fill: #efe5d1;
  --ink: #1a1d22;
  --ink-soft: rgba(26, 29, 34, 0.78);
  --ink-muted: rgba(26, 29, 34, 0.58);
  --contour: #262a31;
  --contour-faint: rgba(38, 42, 49, 0.24);
  --signal: #cc3e22;
  --prussian: #1d4f73;
  --ochre: #dfa031;
  --moss: #407f50;
  --active-accent: #1d4f73;
  --active-tint: #9cc3e8;

  /* Halftone stipple dot pattern for Risograph plate fills */
  --halftone: radial-gradient(rgba(26, 29, 34, 0.065) 1px, transparent 1px);

  /* Punch-dot ramp */
  --led-0: rgba(26, 29, 34, 0.14);
  --led-1: rgba(29, 79, 115, 0.44);
  --led-2: rgba(29, 79, 115, 0.74);
  --led-3: rgba(204, 62, 34, 0.80);
  --led-4: #cc3e22;
}

html[data-mode='cyanotype'] {
  --paper: #0e223b;
  --paper-fill: #122a49;
  --ink: #eef5fc;
  --ink-soft: rgba(234, 245, 255, 0.86);
  --ink-muted: rgba(198, 226, 249, 0.74);
  --contour: #b8dbf4;
  --contour-faint: rgba(184, 219, 244, 0.28);
  --signal: #e5bb62;
  --prussian: #7cc9eb;
  --ochre: #e5bb62;
  --halftone: radial-gradient(rgba(220, 240, 255, 0.08) 1px, transparent 1px);
  --led-0: rgba(200, 228, 255, 0.14);
  --led-1: rgba(96, 174, 212, 0.48);
  --led-2: rgba(130, 206, 240, 0.78);
  --led-3: rgba(229, 187, 98, 0.88);
  --led-4: #f5d88e;
}

html[data-mode='safelight'] {
  --paper: #150a0b;
  --paper-fill: #200d0e;
  --ink: #f7d8ae;
  --ink-soft: rgba(247, 216, 174, 0.86);
  --ink-muted: rgba(240, 184, 136, 0.76);
  --contour: #e89b62;
  --contour-faint: rgba(232, 155, 98, 0.30);
  --signal: #eb7834;
  --prussian: #dc5e28;
  --ochre: #eb7834;
  --halftone: radial-gradient(rgba(247, 200, 150, 0.08) 1px, transparent 1px);
  --led-0: rgba(245, 178, 122, 0.14);
  --led-1: rgba(196, 68, 36, 0.50);
  --led-2: rgba(235, 120, 52, 0.78);
  --led-3: rgba(247, 192, 128, 0.88);
  --led-4: #ffe4be;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

.svg-defs {
  position: absolute;
  width: 0;
  height: 0;
  pointer-events: none;
}

html,
body {
  margin: 0;
  min-height: 100%;
  overflow-x: clip;
  background: #f4f1ea;
  color: var(--ink);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
}

html[data-stage='press'] body,
html[data-stage='exposing'] body {
  background: var(--paper);
}

body.is-lightbox-open { overflow: hidden; }
a { color: inherit; }
button { font: inherit; color: inherit; }

:focus-visible {
  outline: 2px dashed var(--signal);
  outline-offset: 3px;
}

/* Engraved crosshair cursor over open map */
html[data-stage='press'] {
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' viewBox='0 0 22 22'%3E%3Cpath d='M11 2v6M11 14v6M2 11h6M14 11h6' stroke='%231a1d22' stroke-width='1.5'/%3E%3Ccircle cx='11' cy='11' r='2.2' fill='none' stroke='%23cc3e22' stroke-width='1.5'/%3E%3C/svg%3E") 11 11, crosshair;
}
html[data-stage='press'][data-mode='cyanotype'] {
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' viewBox='0 0 22 22'%3E%3Cpath d='M11 2v6M11 14v6M2 11h6M14 11h6' stroke='%23eef5fc' stroke-width='1.5'/%3E%3Ccircle cx='11' cy='11' r='2.2' fill='none' stroke='%23e5bb62' stroke-width='1.5'/%3E%3C/svg%3E") 11 11, crosshair;
}
html[data-stage='press'][data-mode='safelight'] {
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' viewBox='0 0 22 22'%3E%3Cpath d='M11 2v6M11 14v6M2 11h6M14 11h6' stroke='%23f7d8ae' stroke-width='1.5'/%3E%3Ccircle cx='11' cy='11' r='2.2' fill='none' stroke='%23eb7834' stroke-width='1.5'/%3E%3C/svg%3E") 11 11, crosshair;
}

#press-canvas,
#overlay-canvas,
#sandbox-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.22s ease;
}
#press-canvas { z-index: 1; }
#overlay-canvas { z-index: 2; }
#sandbox-canvas { z-index: 3; }

html[data-stage='exposing'] #press-canvas,
html[data-stage='exposing'] #overlay-canvas,
html[data-stage='press'] #press-canvas,
html[data-stage='press'] #overlay-canvas {
  opacity: 1;
}

html[data-stage='press'] #sandbox-canvas.is-visible {
  opacity: 1;
}

/* Floating circular woodblock brush cursor when drawing in Sandbox mode */
.sandbox-brush {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 32;
  border-radius: 50%;
  border: 1.8px dashed var(--brush-accent, var(--signal));
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--paper) 65%, transparent);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.14s ease, width 0.14s ease, height 0.14s ease, border-color 0.14s ease;
}

.sandbox-brush.is-shown {
  opacity: 0.92;
}

.view-map.is-sandbox-open {
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}

.view-map.is-sandbox-drawing .map-station {
  pointer-events: none;
}

.pennant-mask {
  display: block;
  width: 100%;
  height: 100%;
  background: currentColor;
  -webkit-mask: url('/pennant.svg') center / contain no-repeat;
  mask: url('/pennant.svg') center / contain no-repeat;
}

/* ==========================================================================
   WOODBLOCK CONTOUR PLATE PRIMITIVE
   Applies SVG #woodcut-edge ONLY to the ::before background/contour plate so
   every UI surface has the exact wobbly hand-inked outline & cotton-rag stipple
   of the WebGL2 map islands — while text inside stays 100% Retina-crisp!
   ========================================================================== */

.woodcut-plate,
.woodcut-pill {
  position: relative;
  isolation: isolate;
}

.woodcut-plate::before,
.woodcut-pill::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background-color: var(--paper-fill);
  background-image: var(--halftone);
  background-size: 5px 5px;
  border: 2px solid var(--contour);
  border-radius: 10px 14px 12px 9px / 9px 12px 10px 13px;
  filter: url(#woodcut-edge);
  pointer-events: none;
}

.woodcut-pill::before {
  border-radius: 999px;
  border-width: 1.6px;
}

/* ==========================================================================
   ACT I — STARK, CLEAN, MINIMAL WHITE PERSONAL PAGE
   ========================================================================== */

.plain-sheet {
  position: relative;
  z-index: 5;
  min-height: 100svh;
  background: #ffffff;
  color: #111111;
  padding: clamp(3rem, 8vh, 5.5rem) 1.5rem 4rem;
  font-family: -apple-system, BlinkMacSystemFont, 'Inter', 'Helvetica Neue', sans-serif;
  transition: opacity 0.28s ease;
}

html[data-stage='exposing'] .plain-sheet,
html[data-stage='press'] .plain-sheet {
  opacity: 0;
  pointer-events: none;
  position: fixed;
  inset: 0;
  overflow: hidden;
  visibility: hidden;
}

.plain-col {
  width: min(620px, 100%);
  margin-inline: auto;
}

.plain-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.9rem 1.5rem;
}

.plain-brand-btn {
  display: inline-flex;
  align-items: center;
  padding: 0;
  border: 0;
  background: none;
  color: #111111;
  cursor: pointer;
  transition: opacity 0.18s ease;
}

.plain-brand-btn:hover { opacity: 0.65; }

.plain-handle {
  font-size: 0.96rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.plain-nav {
  display: flex;
  gap: 1.05rem;
  font-size: 0.82rem;
}
.plain-nav a {
  text-decoration: none;
  color: #737373;
  transition: color 0.15s ease;
}
.plain-nav a:hover { color: #111111; }

.plain-intro {
  margin: 2.35rem 0 2.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.plain-meta h1 {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.52;
  color: #111111;
}

.plain-meta p {
  margin: 0;
  font-size: 0.86rem;
  line-height: 1.52;
  color: #737373;
}

/* A drawn cursor rests on the stamp's corner and presses it every few seconds,
   in time with the stamp's own pulse, to show that the stamp is the way in.
   It steps aside once a real pointer is over the stamp. */
.plain-stamp {
  position: relative;
  flex: none;
}

.plain-stamp-cursor {
  position: absolute;
  left: 62%;
  top: 60%;
  z-index: 3;
  display: block;
  line-height: 0;
  pointer-events: none;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.22));
  transform: translate(10px, 10px);
  animation: cursor-tap 3.2s cubic-bezier(0.45, 0.05, 0.55, 0.95) infinite;
  transition: opacity 0.18s ease;
}

@keyframes cursor-tap {
  0%, 28%, 72%, 100% { transform: translate(10px, 10px) scale(1); }
  40% { transform: translate(0, 0) scale(1); }
  46%, 54% { transform: translate(0, 0) scale(0.88); }
  60% { transform: translate(0, 0) scale(1); }
}

@media (hover: hover) {
  .plain-stamp:hover .plain-stamp-cursor { opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .plain-stamp-cursor {
    animation: none;
    transform: none;
  }
}

/* Living-ink OGME postage stamp affixed in the top-right postcard position */
.plain-ink-tile {
  position: relative;
  isolation: isolate;
  flex: none;
  padding: 5px;
  border: 1px dashed #c8c8c8;
  background: #fafafa;
  border-radius: 4px;
  cursor: pointer;
  box-shadow: 0 10px 26px -12px rgba(0, 0, 0, 0.22);
  transform: rotate(2.6deg);
  animation: stamp-invite 3.2s cubic-bezier(0.45, 0.05, 0.55, 0.95) infinite;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.28s ease, border-color 0.22s ease;
}

/* Soft pulsing Risograph ink-bleed rings hinting it wants to be pressed */
.plain-ink-tile::before,
.plain-ink-tile::after {
  content: '';
  position: absolute;
  inset: -2px;
  z-index: -1;
  border-radius: 7px;
  border: 1.5px solid rgba(204, 62, 34, 0.52);
  pointer-events: none;
  animation: stamp-ripple 3.2s cubic-bezier(0.16, 1, 0.3, 1) infinite;
}

.plain-ink-tile::after {
  border-color: rgba(29, 79, 115, 0.42);
  animation-delay: 0.45s;
}

@keyframes stamp-invite {
  0%, 100% {
    transform: rotate(2.6deg) translateY(0) scale(1);
    box-shadow: 0 10px 26px -12px rgba(0, 0, 0, 0.2);
  }
  42% {
    transform: rotate(1.4deg) translateY(-2.5px) scale(1.045);
    box-shadow: 0 16px 32px -12px rgba(204, 62, 34, 0.28);
  }
  58% {
    transform: rotate(3.4deg) translateY(-1px) scale(1.02);
  }
}

@keyframes stamp-ripple {
  0% {
    opacity: 0.7;
    transform: scale(0.98);
  }
  65%, 100% {
    opacity: 0;
    transform: scale(1.36);
  }
}

.plain-ink-tile:hover,
.plain-ink-tile:focus-visible {
  animation: none;
  transform: rotate(0deg) translateY(-3px) scale(1.12);
  border-color: #111111;
  box-shadow: 0 20px 42px -14px rgba(204, 62, 34, 0.38);
}

.plain-ink-tile:hover::before,
.plain-ink-tile:hover::after {
  animation-duration: 1.6s;
}

.plain-ink-tile:active {
  animation: none;
  transform: scale(0.93);
}

.plain-ink-tile.is-gulping {
  animation: stamp-gulp 0.42s cubic-bezier(0.34, 1.56, 0.64, 1) 1;
}

@keyframes stamp-gulp {
  0% { transform: rotate(2.6deg) scale(1.16); }
  55% { transform: rotate(1.2deg) scale(0.94); }
  100% { transform: rotate(2.6deg) scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  .plain-ink-tile,
  .plain-ink-tile::before,
  .plain-ink-tile::after {
    animation: none;
  }
}

.plain-ink-tile canvas {
  display: block;
  width: 72px;
  height: 72px;
  border-radius: 2px;
}

.plain-works {
  border-top: 1px solid #ededed;
  padding-top: 1.15rem;
}

.plain-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.72rem;
}

.plain-list li {
  display: grid;
  grid-template-columns: 7.5rem minmax(0, 1fr);
  align-items: baseline;
  gap: 0.35rem 1.1rem;
  font-size: 0.88rem;
  line-height: 1.48;
}

.plain-list a {
  font-weight: 500;
  color: #111111;
  text-decoration: none;
}

.plain-list a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.plain-list span {
  color: #737373;
}

/* ==========================================================================
   ACT III — WOODBLOCK / RISOGRAPH PRESS SHELL
   ========================================================================== */

.press-app {
  position: relative;
  z-index: 4;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  padding: clamp(0.95rem, 2vh, 1.45rem) clamp(1.1rem, 2.6vw, 2.2rem);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.65s cubic-bezier(0.16, 1, 0.3, 1);
}

html[data-stage='press'] .press-app { opacity: 1; }

/* TOP BAR — Clean 2-part header (identity left, section ribbon right). Zero button clutter. */
.map-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.9rem;
  position: relative;
  z-index: 28;
  pointer-events: none;
}

html[data-section='scrapbook'] .map-header {
  position: sticky;
  top: clamp(0.85rem, 1.8vh, 1.25rem);
}

.map-header > * { pointer-events: auto; }

.header-left-group {
  display: inline-flex;
  align-items: center;
  gap: 0.52rem;
}

.scrub-btn {
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: transform 0.24s cubic-bezier(0.34, 1.56, 0.64, 1), color 0.16s ease;
}

.scrub-btn::before {
  border-radius: 11px 13px 10px 12px / 12px 10px 13px 11px;
  transition: border-color 0.16s ease, background-color 0.16s ease;
}

.scrub-btn:hover,
.scrub-btn:focus-visible {
  color: var(--signal);
  transform: scale(1.08);
}

.scrub-btn:hover::before,
.scrub-btn:focus-visible::before {
  border-color: var(--signal);
  background-color: var(--paper);
}

.scrub-btn:hover svg {
  animation: scrub-wiper 0.45s ease-in-out infinite alternate;
}

.scrub-btn:active {
  transform: scale(0.92);
}

@keyframes scrub-wiper {
  0% { transform: translateX(-1.8px) rotate(-10deg); }
  100% { transform: translateX(1.8px) rotate(10deg); }
}

.brand-cartouche {
  display: inline-flex;
  align-items: center;
  gap: 0.68rem;
  width: fit-content;
  padding: 0.42rem 0.92rem 0.42rem 0.62rem;
}

.brand-pennant {
  width: 2.25rem;
  height: 1.8rem;
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink);
  cursor: pointer;
  transition: transform 0.18s ease, color 0.18s ease;
}
.brand-pennant:hover { color: var(--signal); transform: rotate(-4deg) scale(1.06); }
.brand-pennant.is-gale { animation: pennant-gust 0.55s ease-in-out 2; }

@keyframes pennant-gust {
  0%, 100% { transform: rotate(0deg) scale(1); }
  25% { transform: rotate(-14deg) scale(1.14); }
  65% { transform: rotate(10deg) scale(1.08); }
}

.brand-copy { display: flex; flex-direction: column; line-height: 1.08; }
.brand-handle {
  font-family: var(--font-display);
  font-size: 1.24rem;
  font-weight: 700;
  letter-spacing: -0.025em;
}
.brand-sub {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: var(--ink-soft);
  margin-top: 2px;
}

.brand-links {
  margin: 0 0 0 0.35rem;
  padding: 0 0 0 0.65rem;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.72rem;
  border-left: 1.5px dashed var(--contour-faint);
  max-width: 0;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transition: max-width 0.3s ease, opacity 0.22s ease;
}

.brand-links[data-open='true'] {
  max-width: 240px;
  opacity: 1;
  pointer-events: auto;
}

.brand-links a {
  font-family: var(--font-display);
  font-size: 0.92rem;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
}
.brand-links a:hover { color: var(--signal); text-decoration: underline wavy var(--signal); }

/* Center Woodblock Ribbon Navigation */
.ink-nav {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.3rem 0.45rem;
}

.ink-tab {
  position: relative;
  border: 0;
  background: transparent;
  padding: 0.34rem 0.85rem;
  font-family: var(--font-display);
  font-size: 1.02rem;
  font-weight: 500;
  color: var(--ink-soft);
  cursor: pointer;
  white-space: nowrap;
  isolation: isolate;
  transition: color 0.16s ease;
}

.ink-tab:hover { color: var(--ink); }

/* Active tab stamped with an organic woodblock ink lozenge */
.ink-tab.is-active {
  color: var(--paper);
  font-weight: 700;
}

.ink-tab.is-active::before {
  content: '';
  position: absolute;
  inset: 1px 2px;
  z-index: -1;
  background: var(--ink);
  border-radius: 12px 8px 14px 9px / 9px 12px 8px 11px;
  filter: url(#woodcut-fine);
}

/* View Panels */
.view-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  pointer-events: none;
}
.view-panel[hidden] { display: none; }

/* ==========================================================================
   VIEW 01: TACTILE WOODBLOCK LANDMARKS WITH HOVER & CLICK STAMP ANIMATIONS
   ========================================================================== */

.view-map {
  position: relative;
  justify-content: space-between;
}

.station-field {
  position: relative;
  flex: 1;
  min-height: 460px;
  pointer-events: none;
  transition: opacity 0.28s ease;
}

.view-map.is-folio-open .station-field,
.view-map.is-sandbox-open .station-field {
  opacity: 0;
  pointer-events: none;
}

.view-map.is-folio-open .sandbox-dock {
  opacity: 0;
  pointer-events: none;
}

/* Each project landmark: clean compact woodblock tag + 2-plate Riso hover shift + stamp-press click */
.map-station {
  position: absolute;
  left: var(--sx);
  top: var(--sy);
  transform: translate(-18px, -50%) rotate(var(--srot, 0deg));
  display: inline-flex;
  align-items: center;
  gap: 0.56rem;
  padding: 0.34rem 0.85rem 0.34rem 0.38rem;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
  pointer-events: auto;
  isolation: isolate;
  transition: transform 0.36s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Primary cotton-rag woodblock contour plate */
.map-station::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background-color: var(--paper-fill);
  background-image: var(--halftone);
  background-size: 5px 5px;
  border: 2px solid var(--contour);
  border-radius: 14px 10px 15px 11px / 11px 14px 10px 13px;
  filter: url(#woodcut-edge);
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

/* Second Risograph spot-ink offset ghost plate — emerges playfully on hover! */
.map-station::after {
  content: '';
  position: absolute;
  inset: 1px;
  z-index: -2;
  background-color: var(--station-accent);
  border-radius: 14px 10px 15px 11px / 11px 14px 10px 13px;
  filter: url(#woodcut-edge);
  opacity: 0;
  transform: translate(0, 0) scale(0.96);
  transition: transform 0.34s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.22s ease;
}

html[data-dark='true'] .map-station::after {
  background-color: var(--station-tint);
}

/* HOVER ANIMATION: elastic spring lift, level out, 2-plate Riso offset shadow blooms */
.map-station:hover,
.map-station:focus-visible {
  transform: translate(-18px, calc(-50% - 4px)) scale(1.075) rotate(0deg);
  z-index: 8;
}

.map-station:hover::before,
.map-station:focus-visible::before {
  border-color: var(--signal);
  background-color: var(--paper);
}

.map-station:hover::after,
.map-station:focus-visible::after {
  opacity: 0.72;
  transform: translate(5px, 5px) scale(1);
}

/* CLICK / STAMP-PRESS ANIMATION: physical woodblock press down into the rag paper */
.map-station:active,
.map-station.is-pressing {
  transform: translate(-18px, calc(-50% + 2px)) scale(0.91) rotate(-1.5deg);
  transition: transform 0.11s cubic-bezier(0.2, 0.9, 0.3, 1);
  z-index: 12;
}

.map-station.is-pressing::after {
  opacity: 0.95;
  transform: translate(0, 0) scale(1.18);
  transition: transform 0.16s ease-out, opacity 0.16s ease-out;
}

.station-medallion {
  position: relative;
  width: 28px;
  height: 28px;
  flex: none;
  display: grid;
  place-items: center;
  color: var(--station-accent);
  isolation: isolate;
  transition: transform 0.34s cubic-bezier(0.34, 1.56, 0.64, 1);
}

html[data-dark='true'] .station-medallion {
  color: var(--station-tint);
}

.station-medallion::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: 50%;
  border: 1.8px solid currentColor;
  background: color-mix(in srgb, currentColor 14%, var(--paper));
  filter: url(#woodcut-fine);
  transition: background-color 0.2s ease, transform 0.28s ease;
}

.map-station:hover .station-medallion {
  transform: scale(1.15) rotate(-8deg);
}

.map-station:hover .station-medallion::before {
  background: color-mix(in srgb, currentColor 24%, var(--paper));
}

.map-station:hover .station-medallion svg {
  animation: sprite-woodcut-bob 0.42s steps(2, end) infinite alternate;
}

@keyframes sprite-woodcut-bob {
  0% { transform: translateY(0) rotate(0deg); }
  100% { transform: translateY(-1.8px) rotate(6deg); }
}

.sprite-cut { fill: var(--paper-fill); }

.station-label {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.station-name {
  position: relative;
  font-family: var(--font-display);
  font-size: 1.02rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
  white-space: nowrap;
}

.station-name::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 2px;
  background: var(--signal);
  transform-origin: left center;
  transform: scaleX(0);
  transition: transform 0.24s cubic-bezier(0.16, 1, 0.3, 1);
}

.map-station:hover .station-name::after,
.map-station:focus-visible .station-name::after {
  transform: scaleX(1);
}

/* ==========================================================================
   GPU-CARVED COTTON-RAG ISLAND FOLIO
   ZERO CSS background! ZERO CSS border! ZERO CSS shadow!
   The living WebGL2 shader ITSELF carves the wobbly contour-shored cotton
   rag island right beneath this typography & organic-edged Loupe canvas!
   ========================================================================== */

.island-sea-dismiss {
  position: fixed;
  inset: 0;
  z-index: 20;
  pointer-events: auto;
  cursor: pointer;
}
.island-sea-dismiss[hidden] { display: none; }

.island-folio {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 24;
  width: min(880px, calc(100vw - 5rem));
  max-height: calc(100svh - 9.5rem);
  padding: 0.4rem 0.6rem;
  /* COMPLETELY TRANSPARENT — sits directly on the WebGL2 GPU-carved paper island! */
  background: transparent;
  border: 0;
  box-shadow: none;
  display: flex;
  flex-direction: column;
  gap: 1.05rem;
  pointer-events: auto;
  animation: island-emerge 0.42s cubic-bezier(0.16, 1, 0.3, 1);
}

.island-folio[hidden] { display: none; }

@keyframes island-emerge {
  from {
    opacity: 0;
    transform: translate(calc(-50% + var(--from-x, 0px)), calc(-50% + var(--from-y, 14px))) scale(0.84);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

.island-folio .island-loupe-col {
  animation: plate-settle 0.38s cubic-bezier(0.16, 1, 0.3, 1) 0.04s both;
}

.island-folio .island-copy {
  animation: plate-settle 0.42s cubic-bezier(0.16, 1, 0.3, 1) 0.1s both;
}

.island-folio .sprite-dock {
  animation: plate-settle 0.42s cubic-bezier(0.16, 1, 0.3, 1) 0.16s both;
}

@keyframes plate-settle {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.island-top-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 1rem;
}

.island-controls {
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
}

/* Hand-carved woodblock arrow & close chops */
.chop-btn {
  position: relative;
  isolation: isolate;
  width: 34px;
  height: 34px;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: transform 0.15s ease, color 0.15s ease;
}

.chop-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: 50%;
  border: 1.8px solid var(--contour);
  background: var(--paper);
  filter: url(#woodcut-fine);
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.chop-btn:hover { transform: scale(1.1) rotate(-4deg); color: var(--paper); }
.chop-btn:hover::before { background: var(--ink); border-color: var(--ink); }
.chop-btn.is-close:hover::before { background: var(--signal); border-color: var(--signal); }

.island-spread {
  display: grid;
  grid-template-columns: minmax(0, 1.28fr) minmax(260px, 0.94fr);
  gap: clamp(1.2rem, 2.8vw, 2.2rem);
  align-items: center;
}

.island-loupe-col {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.5rem;
}

/* Transparent container — the GLSL LOUPE_FS draws its own organic rough-inked border! */
.loupe-organic-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  background: transparent;
  cursor: none;
}

#loupe-canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.island-tear-chop {
  position: relative;
  isolation: isolate;
  border: 0;
  background: transparent;
  padding: 0.24rem 0.68rem;
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 600;
  color: #1a1d22;
  cursor: pointer;
}
.island-tear-chop::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--ochre);
  border: 1.8px solid #1a1d22;
  border-radius: 6px;
  filter: url(#woodcut-fine);
}

/* Clean, airy woodblock copy directly on the GPU-carved cotton rag */
.island-copy {
  display: flex;
  flex-direction: column;
  gap: 1.05rem;
}

.island-heading {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.island-sprite-seal {
  position: relative;
  isolation: isolate;
  width: 48px;
  height: 48px;
  flex: none;
  display: grid;
  place-items: center;
  color: var(--active-accent);
}

html[data-dark='true'] .island-sprite-seal {
  color: var(--active-tint);
}

.island-sprite-seal::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: 50%;
  border: 2px solid currentColor;
  background: color-mix(in srgb, currentColor 13%, transparent);
  filter: url(#woodcut-fine);
}

.island-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2rem, 3.2vw, 2.65rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.02;
  color: var(--ink);
}

.island-title.is-shifting { animation: ink-stamp-in 0.26s ease; }

@keyframes ink-stamp-in {
  0% { opacity: 0.35; transform: scale(1.03) rotate(-0.6deg); }
  100% { opacity: 1; transform: scale(1) rotate(0deg); }
}

.island-blurb {
  margin: 0;
  font-size: 1rem;
  line-height: 1.64;
  color: var(--ink-soft);
}

.island-cta-wrap {
  padding-top: 0.15rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
}

.island-pour-chop {
  position: relative;
  isolation: isolate;
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
  padding: 0.56rem 0.95rem;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.18s cubic-bezier(0.34, 1.56, 0.64, 1), color 0.16s ease;
}

.island-pour-chop::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background-color: var(--paper-fill);
  background-image: var(--halftone);
  background-size: 5px 5px;
  border: 1.8px solid var(--contour);
  border-radius: 10px 13px 11px 12px / 11px 9px 12px 10px;
  filter: url(#woodcut-fine);
  transition: border-color 0.16s ease, background-color 0.16s ease;
}

.island-pour-chop:hover,
.island-pour-chop:focus-visible {
  color: var(--signal);
  transform: scale(1.04) rotate(0.8deg);
}

.island-pour-chop:hover::before,
.island-pour-chop:focus-visible::before {
  border-color: var(--signal);
  background-color: var(--paper);
}

.island-pour-chop:active {
  transform: scale(0.95);
}

/* Hand-Stamped Vermilion Printer's Chop CTA */
.printer-chop-cta {
  position: relative;
  isolation: isolate;
  display: inline-flex;
  align-items: baseline;
  gap: 0.62rem;
  padding: 0.62rem 1.25rem;
  text-decoration: none;
  color: #fffaf0;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  transition: transform 0.16s ease;
}

html[data-dark='true'] .printer-chop-cta {
  color: #15100c;
}

.printer-chop-cta::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--signal);
  border: 2px solid var(--contour);
  border-radius: 10px 14px 11px 13px / 12px 9px 13px 10px;
  filter: url(#woodcut-edge);
  transition: transform 0.16s ease;
}

.printer-chop-cta em {
  font-style: normal;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  opacity: 0.88;
}

.printer-chop-cta:hover { transform: scale(1.03) rotate(-0.8deg); }

/* 10 Woodblock 8x8 Pixel Sprite Chops along the bottom of the island! */
.sprite-dock {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.55rem;
  padding-top: 0.35rem;
}

.sprite-chop {
  position: relative;
  isolation: isolate;
  width: 38px;
  height: 38px;
  border: 0;
  background: transparent;
  color: var(--chop-accent);
  cursor: pointer;
  display: grid;
  place-items: center;
  opacity: 0.68;
  transition: transform 0.16s ease, opacity 0.16s ease;
}

html[data-dark='true'] .sprite-chop {
  color: var(--chop-tint);
}

.sprite-chop::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: 50%;
  border: 1.6px dashed transparent;
  filter: url(#woodcut-fine);
  transition: border-color 0.16s ease, background-color 0.16s ease;
}

.sprite-chop:hover {
  opacity: 1;
  transform: scale(1.16) rotate(-4deg);
}

.sprite-chop:hover::before {
  border-color: var(--contour-faint);
}

.sprite-chop.is-active {
  opacity: 1;
  transform: scale(1.18);
}

.sprite-chop.is-active::before {
  border: 2px solid var(--signal);
  background: color-mix(in srgb, var(--signal) 12%, transparent);
}

/* ==========================================================================
   CALM BOTTOM FOOTER (Woodblock Gravity Sandbox bottom-left + GitHub Music Box bottom-right)
   ========================================================================== */

.map-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.85rem;
  position: relative;
  z-index: 26;
  pointer-events: none;
}
.map-footer > * { pointer-events: auto; }

/* Woodblock Gravity Sandbox Launcher & Unfurling Material Tray */
.sandbox-dock {
  display: inline-flex;
  align-items: flex-end;
  max-width: 100%;
  transition: opacity 0.22s ease;
}

/* Raised 2-plate tactile woodblock icon button — unmistakably clickable! */
.sandbox-launcher {
  width: 54px;
  height: 54px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: transform 0.24s cubic-bezier(0.34, 1.56, 0.64, 1), color 0.16s ease;
}

.sandbox-launcher[hidden] { display: none; }

.sandbox-launcher::before {
  border-radius: 15px 18px 14px 17px / 17px 14px 18px 15px;
  border-width: 2.2px;
  background-color: var(--paper);
  transition: border-color 0.16s ease, background-color 0.16s ease;
}

/* Always-visible Risograph offset push-button shadow plate */
.sandbox-launcher::after {
  content: '';
  position: absolute;
  inset: 1px;
  z-index: -2;
  background-color: var(--signal);
  border-radius: 15px 18px 14px 17px / 17px 14px 18px 15px;
  filter: url(#woodcut-edge);
  opacity: 0.88;
  transform: translate(4px, 4px);
  transition: transform 0.24s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.18s ease;
}

.sandbox-launcher-ico {
  display: grid;
  place-items: center;
  transition: transform 0.42s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.sbx-grain {
  animation: sbx-grain-fall 2.1s ease-in infinite;
}
.sbx-grain-b {
  animation-delay: 1.05s;
}

@keyframes sbx-grain-fall {
  0% { opacity: 0; transform: translateY(-2.4px); }
  25% { opacity: 1; }
  85% { opacity: 1; transform: translateY(2.2px); }
  100% { opacity: 0; transform: translateY(3px); }
}

.sandbox-live-dot {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--signal);
  box-shadow: 0 0 0 1.5px var(--paper);
  display: none;
}

.sandbox-dock[data-has-matter='true'] .sandbox-live-dot {
  display: block;
}

.sandbox-launcher:hover,
.sandbox-launcher:focus-visible {
  color: var(--signal);
  transform: translate(-2px, -3px) scale(1.06);
}

.sandbox-launcher:hover .sandbox-launcher-ico {
  transform: rotate(180deg);
}

.sandbox-launcher:hover::before,
.sandbox-launcher:focus-visible::before {
  border-color: var(--signal);
  background-color: var(--paper);
}

.sandbox-launcher:hover::after,
.sandbox-launcher:focus-visible::after {
  opacity: 1;
  transform: translate(6px, 6px);
}

.sandbox-launcher:active {
  transform: translate(3px, 3px) scale(0.95);
  transition: transform 0.09s ease;
}

.sandbox-launcher:active::after {
  transform: translate(1px, 1px);
  transition: transform 0.09s ease;
}

.sandbox-tray {
  padding: 0.46rem 0.64rem 0.52rem;
  display: flex;
  flex-direction: column;
  gap: 0.36rem;
  max-width: 100%;
  animation: sandbox-unfurl 0.24s cubic-bezier(0.16, 1, 0.3, 1);
}

.sandbox-tray[hidden] { display: none; }

@keyframes sandbox-unfurl {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.sandbox-tray-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0 0.12rem;
}

.sandbox-readout {
  display: inline-flex;
  align-items: baseline;
  gap: 0.34rem;
  min-width: 0;
  line-height: 1.1;
}

.sandbox-proj {
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
  white-space: nowrap;
}

.sandbox-sep {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--ink-muted);
}

.sandbox-mat {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  font-weight: 500;
  color: var(--signal);
  white-space: nowrap;
}

.sandbox-tools {
  display: inline-flex;
  align-items: center;
  gap: 0.26rem;
}

.sbx-tool {
  position: relative;
  isolation: isolate;
  width: 26px;
  height: 26px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 600;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: transform 0.16s ease, color 0.14s ease;
}

.sbx-tool::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: 50%;
  border: 1.5px solid var(--contour-faint);
  background: var(--paper);
  filter: url(#woodcut-fine);
  transition: background-color 0.14s ease, border-color 0.14s ease;
}

.sbx-tool:hover,
.sbx-tool:focus-visible {
  transform: scale(1.1);
  color: var(--signal);
}

.sbx-tool:hover::before,
.sbx-tool:focus-visible::before {
  border-color: var(--signal);
}

.sbx-tool[aria-pressed='true'] {
  color: var(--paper);
}

.sbx-tool[aria-pressed='true']::before {
  background: var(--ink);
  border-color: var(--ink);
}

.sbx-tool.is-close:hover {
  color: var(--paper);
}

.sbx-tool.is-close:hover::before {
  background: var(--signal);
  border-color: var(--signal);
}

.sbx-size-dot {
  border-radius: 50%;
  background: currentColor;
  display: block;
  width: 7px;
  height: 7px;
  transition: width 0.14s ease, height 0.14s ease;
}

.sbx-size-dot[data-size='0'] { width: 4px; height: 4px; }
.sbx-size-dot[data-size='1'] { width: 7px; height: 7px; }
.sbx-size-dot[data-size='2'] { width: 11px; height: 11px; }

.sandbox-sprites {
  display: flex;
  align-items: center;
  gap: 0.24rem;
}

.sbx-sprite {
  width: 34px;
  height: 34px;
  opacity: 0.78;
}

.sbx-sprite:hover,
.sbx-sprite.is-active {
  opacity: 1;
}

/* GitHub 52-Week Risograph Music-Box Roll (minimal, zero clutter text) */
.gh-cartouche {
  padding: 0.5rem 0.8rem 0.5rem 0.58rem;
  display: inline-flex;
  align-items: center;
  gap: 0.72rem;
  max-width: 100%;
}

.gh-play-btn {
  position: relative;
  isolation: isolate;
  width: 34px;
  height: 34px;
  flex: none;
  border: 0;
  background: transparent;
  color: var(--ink);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1), color 0.16s ease;
}

.gh-play-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: 50%;
  border: 1.8px solid var(--contour);
  background: var(--paper);
  filter: url(#woodcut-fine);
  transition: background-color 0.18s ease, border-color 0.18s ease;
}

.gh-play-btn:hover {
  transform: scale(1.1) rotate(-4deg);
  color: var(--paper);
}
.gh-play-btn:hover::before {
  background: var(--signal);
  border-color: var(--signal);
}
.gh-play-btn:active { transform: scale(0.92); }

.gh-play-btn .gh-ico-stop { display: none; }
.gh-play-btn.is-playing { color: var(--paper); }
.gh-play-btn.is-playing::before { background: var(--signal); border-color: var(--signal); }
.gh-play-btn.is-playing .gh-ico-play { display: none; }
.gh-play-btn.is-playing .gh-ico-stop { display: block; }

.gh-roll-col {
  display: flex;
  flex-direction: column;
  gap: 0.22rem;
  min-width: 0;
}

.gh-meta-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.6rem;
  line-height: 1;
}

.gh-total {
  font-family: var(--font-display);
  font-size: 0.96rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}

.gh-unit {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--ink-muted);
  white-space: nowrap;
}

.gh-canvas {
  display: block;
  width: 280px;
  height: 46px;
  max-width: calc(100vw - 7.5rem);
  cursor: pointer;
}

/* ==========================================================================
   VIEW 02: FIELD NOTES — DENSE STAGGERED WOODBLOCK CONTACT TABLE (121 NOTES)
   Shows ~18-20+ travel diptychs at once in an asymmetric 6-col editorial flow
   with micro-tilts, elastic pop-out inspection on hover & unified Lightbox.
   ========================================================================== */

.view-scrapbook {
  align-items: center;
}

.sb-stage {
  width: min(1360px, 100%);
  margin: 1.4rem auto 3.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  pointer-events: none;
}

.sb-gallery {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  grid-auto-flow: dense;
  gap: 0.88rem;
  align-items: stretch;
}

/* Tactile woodblock specimen postcard floating over the living Risograph sea */
.sb-plate {
  position: relative;
  isolation: isolate;
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  padding: 5px;
  border: 0;
  background: transparent;
  cursor: zoom-in;
  pointer-events: auto;
  transform: translateY(var(--oy, 0px)) rotate(var(--tilt, 0deg));
  transition: transform 0.32s cubic-bezier(0.34, 1.56, 0.64, 1), z-index 0s;
}

.sb-plate.is-hero {
  grid-column: span 2;
  grid-row: span 2;
  aspect-ratio: auto;
  height: 100%;
  padding: 7px;
}

/* Crisp organic cotton-rag contour frame (lightweight at rest, woodcut-filtered on hover) */
.sb-plate::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background-color: var(--paper-fill);
  background-image: var(--halftone);
  background-size: 5px 5px;
  border: 1.8px solid var(--contour);
  border-radius: 7px 11px 8px 10px / 9px 7px 10px 8px;
  transition: border-color 0.18s ease, background-color 0.18s ease;
}

/* Second Risograph spot-ink offset ghost plate blooming on hover */
.sb-plate::after {
  content: '';
  position: absolute;
  inset: 1px;
  z-index: -2;
  background: var(--signal);
  border-radius: 7px 11px 8px 10px / 9px 7px 10px 8px;
  opacity: 0;
  transform: translate(0, 0) scale(0.96);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.2s ease;
}

.sb-plate:hover,
.sb-plate:focus-visible {
  transform: translateY(-6px) scale(1.22) rotate(0deg);
  z-index: 24;
}

.sb-plate.is-hero:hover,
.sb-plate.is-hero:focus-visible {
  transform: translateY(-6px) scale(1.09) rotate(0deg);
}

.sb-plate:hover::before,
.sb-plate:focus-visible::before {
  border-color: var(--signal);
  background-color: var(--paper);
  filter: url(#woodcut-fine);
}

.sb-plate:hover::after,
.sb-plate:focus-visible::after {
  opacity: 0.78;
  transform: translate(5px, 5px) scale(1);
  filter: url(#woodcut-fine);
}

.sb-plate:active {
  transform: scale(0.95) rotate(-0.6deg);
  transition: transform 0.1s ease;
}

.sb-plate-media {
  display: block;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: 2px;
  background: #eae4d8;
}

.sb-plate img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Tiny hand-stamped caption slip peeking ONLY on hover */
.sb-hover-stamp {
  position: absolute;
  left: 50%;
  bottom: -11px;
  transform: translate(-50%, 4px);
  max-width: calc(100% - 10px);
  padding: 2px 7px;
  background: var(--ink);
  color: var(--paper);
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 0.56rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.16s ease, transform 0.22s ease;
}

.sb-plate:hover .sb-hover-stamp,
.sb-plate:focus-visible .sb-hover-stamp {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* Unified Woodblock Lightbox */
.sb-lightbox {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 1.5rem;
}
.sb-lightbox[hidden] { display: none; }

.lb-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(18, 20, 24, 0.78);
  backdrop-filter: blur(4px);
  cursor: pointer;
}

.lb-figure {
  position: relative;
  z-index: 2;
  margin: 0;
  max-width: min(88vw, 1180px);
  max-height: 90svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.85rem;
  animation: lb-pop-in 0.26s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes lb-pop-in {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.92);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.lb-frame {
  padding: 10px;
}

/* Every field note is 4:3. Sizing the frame here (same limits as before) lets the
   lightbox show the grid thumbnail first and swap in the original without a jump. */
.lb-frame img {
  display: block;
  width: min(84vw, 1160px, calc(82svh * 4 / 3));
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 3px;
}

.lb-nav,
.lb-close {
  position: fixed;
  z-index: 4;
  width: 40px;
  height: 40px;
  font-size: 1.15rem;
}
.lb-close { top: 1.35rem; right: 1.5rem; }
.lb-nav { top: 50%; transform: translateY(-50%); }
.lb-nav:hover { transform: translateY(-50%) scale(1.1) rotate(-4deg); }
.lb-prev { left: 1.4rem; }
.lb-next { right: 1.4rem; }

/* ==========================================================================
   VIEW 03: CALM WOODBLOCK INDEX (CENTERED CLEANLY ON GPU-CARVED ISLAND)
   ========================================================================== */

.view-index {
  position: relative;
}

.idx-island {
  position: fixed;
  left: 50%;
  top: 52%;
  transform: translate(-50%, -50%);
  z-index: 22;
  width: min(780px, calc(100vw - 5rem));
  max-height: calc(100svh - 8.5rem);
  display: flex;
  flex-direction: column;
  gap: 1.05rem;
  background: transparent;
  pointer-events: auto;
  animation: island-emerge 0.36s cubic-bezier(0.16, 1, 0.3, 1);
}

.idx-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.7rem 1.5rem;
  padding-bottom: 0.9rem;
  border-bottom: 1.5px dashed var(--contour-faint);
}

.idx-identity h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 2.8vw, 2.3rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.04;
  color: var(--ink);
}

.idx-identity p {
  margin: 0.25rem 0 0;
  font-size: 0.95rem;
  color: var(--ink-soft);
}

.idx-elsewhere {
  display: flex;
  flex-wrap: wrap;
  gap: 1.05rem;
  padding-bottom: 0.15rem;
}

.idx-ext {
  display: inline-flex;
  align-items: baseline;
  gap: 0.24rem;
  text-decoration: none;
  font-family: var(--font-display);
  font-size: 0.96rem;
  font-weight: 600;
  color: var(--ink);
  transition: color 0.15s ease, transform 0.18s ease;
}

.idx-ext span {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--ink-muted);
  transition: transform 0.18s ease, color 0.15s ease;
}

.idx-ext:hover { color: var(--signal); }
.idx-ext:hover span { color: var(--signal); transform: translate(2px, -2px); }

/* Clean 2x5 Woodblock Project Grid */
.idx-grid {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem 1rem;
}

.idx-card {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.58rem 0.78rem 0.62rem 0.62rem;
  text-decoration: none;
  transition: transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Subtle woodblock contour plate emerges smoothly on hover */
.idx-card::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background-color: var(--paper-fill);
  background-image: var(--halftone);
  background-size: 5px 5px;
  border: 1.8px solid transparent;
  border-radius: 10px 13px 11px 9px / 9px 11px 10px 12px;
  filter: url(#woodcut-fine);
  opacity: 0;
  transition: opacity 0.18s ease, border-color 0.18s ease;
}

.idx-card::after {
  content: '';
  position: absolute;
  inset: 1px;
  z-index: -2;
  background: var(--swatch);
  border-radius: 10px 13px 11px 9px / 9px 11px 10px 12px;
  filter: url(#woodcut-fine);
  opacity: 0;
  transform: translate(0, 0);
  transition: transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.18s ease;
}

html[data-dark='true'] .idx-card::after {
  background: var(--swatch-tint);
}

.idx-card:hover,
.idx-card:focus-visible {
  transform: translate(-1px, -2px);
}

.idx-card:hover::before,
.idx-card:focus-visible::before {
  opacity: 1;
  border-color: var(--contour);
}

.idx-card:hover::after,
.idx-card:focus-visible::after {
  opacity: 0.58;
  transform: translate(4px, 4px);
}

.idx-medallion {
  position: relative;
  isolation: isolate;
  width: 32px;
  height: 32px;
  margin-top: 1px;
  flex: none;
  display: grid;
  place-items: center;
  color: var(--swatch);
  transition: transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1);
}

html[data-dark='true'] .idx-medallion {
  color: var(--swatch-tint);
}

.idx-medallion::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: 50%;
  border: 1.6px solid currentColor;
  background: color-mix(in srgb, currentColor 13%, var(--paper));
  filter: url(#woodcut-fine);
}

.idx-card:hover .idx-medallion {
  transform: scale(1.12) rotate(-7deg);
}

.idx-card:hover .idx-medallion svg {
  animation: sprite-woodcut-bob 0.42s steps(2, end) infinite alternate;
}

.idx-card-body {
  display: flex;
  flex-direction: column;
  gap: 0.14rem;
  min-width: 0;
  flex: 1;
}

.idx-card-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
}

.idx-card-top strong {
  font-family: var(--font-display);
  font-size: 1.04rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.idx-arrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--ink-muted);
  transition: transform 0.18s ease, color 0.15s ease;
}

.idx-card:hover .idx-arrow {
  color: var(--signal);
  transform: translate(2px, -2px);
}

.idx-card-body em {
  font-style: normal;
  font-size: 0.8rem;
  line-height: 1.38;
  color: var(--ink-soft);
}

/* PRINT BROADSHEET */
.print-broadsheet { display: none; }
@media print {
  #press-canvas, #overlay-canvas, #sandbox-canvas, #sandbox-brush, #plain-sheet, #press-app, #sb-lightbox { display: none !important; }
  body { background: #fff !important; color: #111 !important; }
  .print-broadsheet { display: block !important; padding: 1.5rem; border: 1.5px solid #111; font-family: Georgia, serif; }
  .pb-head { display: flex; justify-content: space-between; border-bottom: 1px solid #111; padding-bottom: 1rem; margin-bottom: 1rem; }
  .pb-kicker { font-family: monospace; font-size: 9pt; letter-spacing: 0.14em; margin: 0 0 0.35rem; }
  .pb-head h1 { margin: 0 0 0.25rem; font-size: 20pt; }
  .pb-links { text-align: right; font-family: monospace; font-size: 9pt; line-height: 1.45; }
  .pb-links p { margin: 0; }
  .pb-projects { margin: 0; padding-left: 1.2rem; line-height: 1.65; font-size: 10.5pt; }
  .pb-foot { margin-top: 1.4rem; padding-top: 0.75rem; border-top: 1px dashed #444; font-family: monospace; font-size: 8.5pt; }
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */

@media (max-width: 1220px) {
  .sb-gallery { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}

@media (max-width: 960px) {
  .island-spread { grid-template-columns: 1fr; }
  .island-folio,
  .idx-island {
    width: calc(100vw - 2.6rem);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  .idx-grid { grid-template-columns: 1fr; }
  .sb-gallery { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.68rem; }
}

@media (max-width: 720px) {
  .press-app {
    padding: 0.78rem 0.85rem 0.9rem;
  }

  /* Crisp 2-row mobile header: brand + scrub full width on row 1, section ribbon centered on row 2 */
  .map-header {
    flex-direction: column;
    align-items: stretch;
    gap: 0.55rem;
  }

  .header-left-group {
    width: 100%;
    justify-content: space-between;
  }

  .brand-cartouche {
    max-width: calc(100% - 48px);
    padding: 0.36rem 0.78rem 0.36rem 0.52rem;
    gap: 0.54rem;
    flex-wrap: wrap;
  }

  .brand-handle { font-size: 1.1rem; }
  .brand-sub { font-size: 0.58rem; }

  .brand-links {
    width: 100%;
    margin: 0;
    padding: 0;
    border-left: 0;
    max-height: 0;
    transition: max-height 0.26s ease, opacity 0.2s ease, padding 0.22s ease;
  }

  .brand-links[data-open='true'] {
    max-width: 100%;
    max-height: 44px;
    padding-top: 0.38rem;
    margin-top: 0.28rem;
    border-top: 1px dashed var(--contour-faint);
  }

  .ink-nav {
    width: 100%;
    justify-content: space-between;
    padding: 0.26rem 0.35rem;
  }

  .ink-tab {
    flex: 1;
    text-align: center;
    font-size: 0.94rem;
    padding: 0.34rem 0.5rem;
  }

  /* Mobile Works Open Map: organic 2-column staggered woodblock landmarks */
  .station-field {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.72rem 0.62rem;
    align-content: center;
    padding: 1.15rem 0.1rem;
    min-height: 0;
  }

  .map-station {
    position: relative;
    left: auto;
    top: auto;
    width: 100%;
    padding: 0.44rem 0.65rem 0.44rem 0.44rem;
    gap: 0.46rem;
    transform: rotate(calc(var(--srot, 0deg) * 0.75));
  }

  .map-station:nth-child(even) {
    transform: translateY(6px) rotate(calc(var(--srot, 0deg) * 0.75));
  }

  .map-station:hover,
  .map-station:focus-visible {
    transform: translateY(-2px) scale(1.03) rotate(0deg);
  }

  .map-station:active,
  .map-station.is-pressing {
    transform: scale(0.94);
  }

  .station-medallion {
    width: 26px;
    height: 26px;
  }

  .station-name {
    font-size: 0.92rem;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  /* Hide footer music box while inspecting a project island on small screens */
  .view-map.is-folio-open .map-footer {
    opacity: 0;
    pointer-events: none;
  }

  /* Mobile Project Island: centered cleanly below the 2-row header with generous pure-paper margins */
  .island-folio {
    top: 57%;
    width: calc(100vw - 4.2rem);
    max-height: calc(100svh - 10.6rem);
    padding: 0.25rem 0.2rem 0.5rem;
    gap: 0.65rem;
    scrollbar-width: none;
  }
  .island-folio::-webkit-scrollbar { display: none; }

  .island-spread { gap: 0.72rem; }
  .loupe-organic-wrap { cursor: pointer; }
  .island-copy { gap: 0.6rem; }
  .island-sprite-seal { width: 36px; height: 36px; }
  .island-title { font-size: 1.62rem; }
  .island-blurb { font-size: 0.88rem; line-height: 1.5; }
  .printer-chop-cta { padding: 0.5rem 0.96rem; font-size: 0.94rem; }
  .sprite-dock {
    display: grid;
    grid-template-columns: repeat(5, 34px);
    justify-content: center;
    gap: 0.3rem 0.5rem;
    padding-top: 0.2rem;
  }
  .sprite-chop { width: 34px; height: 34px; }

  /* Full-width balanced footer on phones: compact Sandbox toggle + GitHub Music Box */
  .map-footer {
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.52rem;
    transition: opacity 0.2s ease;
  }

  .sandbox-dock {
    width: 100%;
  }

  .sandbox-launcher {
    width: 48px;
    height: 48px;
    padding: 0;
  }

  .sandbox-tray {
    width: 100%;
    padding: 0.48rem 0.58rem 0.56rem;
    gap: 0.42rem;
  }

  .sandbox-sprites {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    justify-items: center;
    gap: 0.26rem 0.2rem;
  }

  .sbx-sprite {
    width: 36px;
    height: 36px;
  }

  /* When drawing on phones, hide the music box cleanly so the map has generous drawing space */
  .view-map.is-sandbox-open .gh-cartouche {
    display: none;
  }

  .gh-cartouche {
    width: 100%;
    padding: 0.45rem 0.68rem 0.45rem 0.52rem;
    gap: 0.58rem;
  }

  .gh-roll-col { flex: 1; }

  .gh-canvas {
    width: 100%;
    max-width: 100%;
    height: 40px;
  }

  /* Mobile Act I Postcard */
  .plain-sheet {
    padding: 2.2rem 1.2rem 3rem;
  }
  .plain-nav { gap: 0.85rem; }
  .plain-intro { margin: 1.8rem 0 2rem; }
  .plain-ink-tile canvas { width: 64px; height: 64px; }
  .plain-list { gap: 0.88rem; }
  .plain-list li { grid-template-columns: 1fr; gap: 0.16rem; }

  /* Mobile Field Notes: lively 2-column staggered diptych mosaic + mobile lightbox controls */
  .sb-stage { margin: 0.9rem auto 2.5rem; }
  .sb-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.58rem; }
  .sb-plate {
    padding: 4px;
    transform: rotate(calc(var(--tilt, 0deg) * 0.45));
  }
  .sb-plate.is-hero {
    grid-column: span 2;
    grid-row: span 1;
    aspect-ratio: 4 / 3;
    height: auto;
    padding: 5px;
  }
  .sb-plate:hover,
  .sb-plate.is-hero:hover {
    transform: scale(1.03) rotate(0deg);
  }
  .sb-hover-stamp { display: none; }

  .sb-lightbox { padding: 1rem 0.85rem 4.8rem; }
  .lb-frame { padding: 6px; }
  .lb-frame img { width: min(calc(100vw - 2.4rem), calc(70svh * 4 / 3)); }
  .lb-close { top: 0.95rem; right: 0.95rem; width: 38px; height: 38px; }
  .lb-nav {
    top: auto;
    bottom: 1.15rem;
    transform: none;
    width: 44px;
    height: 44px;
  }
  .lb-nav:hover { transform: scale(1.06); }
  .lb-prev { left: calc(50% - 56px); }
  .lb-next { right: calc(50% - 56px); }

  /* Mobile Index Island: sits 100% inside pure paper below the upper coastal ridge */
  .idx-island {
    top: 58.5%;
    width: calc(100vw - 4.2rem);
    max-height: calc(100svh - 11.4rem);
    padding: 0.2rem 0.2rem 0.75rem;
    gap: 0.75rem;
    scrollbar-width: none;
  }
  .idx-island::-webkit-scrollbar { display: none; }
  .idx-head { padding-bottom: 0.7rem; gap: 0.55rem 1rem; }
  .idx-identity h2 { font-size: 1.55rem; }
  .idx-identity p { font-size: 0.86rem; }
  .idx-elsewhere { gap: 0.85rem; }
  .idx-ext { font-size: 0.88rem; }
  .idx-grid { gap: 0.38rem; }
  .idx-card { padding: 0.48rem 0.55rem 0.5rem 0.48rem; gap: 0.62rem; }
  .idx-medallion { width: 28px; height: 28px; }
  .idx-card-top strong { font-size: 0.96rem; }
  .idx-card-body em { font-size: 0.78rem; }
}
