/* ============================================================================
   PokéNomad — shared scrapbook styles
   Desktop values mirror the Claude Design mockups ("../site design/*.dc.html");
   responsive behavior below ~1240px is added here.
   ========================================================================= */

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

:root {
  --paper: #F9EFD9;
  --ink: #3A2E1F;
  --ink-soft: #6B5B42;
  --ink-mute: #8A7A60;
  --ink-faint: #B8A784;
  --nav-ink: #5C4E38;
  --gold: #C07C10;
  --sun: #F4A428;
  --poppy: #E8543F;
  --sky: #2E86AB;
  --cream: #FFF7E8;
  --rule: #D9CCA8;
  --chip-border: #C9B490;
  --chip-bg: #FFFDF6;
  --note-yellow: #FBE29A;
  --note-green: #DDE8CE;
  --note-blue: #C3E3ED;
  --tape-sun: rgba(244, 164, 40, .5);
  --tape-sky: rgba(46, 134, 171, .4);
  --tape-poppy: rgba(232, 84, 63, .4);
  --tape-leaf: rgba(91, 140, 62, .35);
  --font-serif: 'Lora', Georgia, serif;
  --font-sans: 'Karla', system-ui, -apple-system, sans-serif;
  --font-hand: 'Caveat', cursive;
}

html { color-scheme: light; }
body {
  margin: 0;
  padding: 0 24px;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
button { font: inherit; border: 0; cursor: pointer; }
/* author display rules (e.g. .page-meter { display:flex }) must not defeat the
   hidden attribute — pre-hydration shells ship chrome hidden until JS fills it */
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--sky); outline-offset: 2px; }

.wrap { max-width: 1560px; margin: 0 auto; }

/* --- tape strips (shared) ------------------------------------------------ */
.tape {
  position: absolute;
  background: var(--tape, var(--tape-sun));
  transform: rotate(var(--tape-tilt, -4deg));
}

/* --- top bar --------------------------------------------------------------- */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap;
  padding: 20px 36px 4px;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand-name {
  font-family: var(--font-serif); font-weight: 700; font-size: 22px;
  color: var(--ink); text-decoration: none;
}
.brand-tagline {
  font-family: var(--font-hand); font-size: 18px; color: var(--gold);
  transform: rotate(-3deg);
}
.nav { display: flex; gap: 26px; align-items: center; font-weight: 700; font-size: 14px; }
.nav a { color: var(--nav-ink); text-decoration: none; white-space: nowrap; }
.nav a:hover { color: var(--ink); }
.nav a[aria-current="page"] {
  display: inline-block; background: var(--tape-sun);
  padding: 3px 10px; transform: rotate(1deg); color: var(--ink);
}
.btn-signin {
  background: var(--poppy); color: var(--cream);
  padding: 8px 16px; border-radius: 4px; font-weight: 800; font-size: 14px;
  transform: rotate(-1deg); box-shadow: 3px 3px 0 var(--ink);
  transition: transform .15s ease, box-shadow .15s ease;
  white-space: nowrap;
}
.btn-signin:hover { transform: rotate(-1deg) translate(-1px, -1px); box-shadow: 4px 4px 0 var(--ink); }

/* --- topbar search ---------------------------------------------------------- */
.searchbox { position: relative; flex: 1 1 240px; max-width: 400px; min-width: 180px; }
.search-input {
  width: 100%; font: inherit; font-weight: 600; font-size: 14px;
  color: var(--ink); background: var(--chip-bg);
  border: 2px solid var(--chip-border); border-radius: 4px;
  padding: 8px 14px; transform: rotate(-.4deg);
  transition: border-color .15s ease;
}
.search-input:hover, .search-input:focus { border-color: var(--ink); }
.search-input::placeholder { font-family: var(--font-hand); font-size: 17px; font-weight: 500; color: var(--ink-faint); }
.search-input::-webkit-search-decoration { -webkit-appearance: none; }
.search-pop {
  position: absolute; top: calc(100% + 12px); left: 0; z-index: 60;
  width: min(540px, calc(100vw - 40px));
  background: #fff; box-shadow: 0 16px 34px rgba(58, 46, 31, .3);
  transform: rotate(.3deg);
  animation: search-pop-in .14s ease-out;
}
@keyframes search-pop-in {
  from { opacity: 0; transform: rotate(.3deg) translateY(-5px); }
}
.search-pop::before {
  content: ''; position: absolute; top: -9px; left: 34px; width: 68px; height: 18px;
  background: var(--tape-sun); transform: rotate(-4deg);
}
.search-scroll { max-height: min(62vh, 520px); overflow-y: auto; padding: 12px 0 8px; }
.search-group {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 18px 5px 20px; font-size: 10px; font-weight: 800;
  letter-spacing: .14em; color: var(--ink-mute);
}
.search-group::after { content: ''; flex: 1; border-top: 1.5px dashed var(--rule); }
.search-item {
  display: flex; align-items: center; gap: 14px; justify-content: space-between;
  padding: 8px 18px 8px 20px; text-decoration: none; color: var(--ink);
}
.search-item:hover { background: rgba(244, 164, 40, .16); box-shadow: inset 3px 0 0 var(--sun); }
.search-item.active { background: rgba(244, 164, 40, .26); box-shadow: inset 3px 0 0 var(--poppy); }
.sr-main {
  font-weight: 700; font-size: 14px; min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.sr-native { font-family: var(--font-hand); font-size: 16px; font-weight: 600; color: var(--gold); margin-left: 6px; }
.sr-meta { flex: none; font-size: 10px; font-weight: 800; color: var(--ink-mute); letter-spacing: .05em; }
.search-note {
  margin: 0; padding: 12px 18px 8px; font-family: var(--font-hand);
  font-size: 18px; color: var(--ink-mute); transform: rotate(-.5deg);
}
.search-foot {
  display: flex; justify-content: flex-end; padding: 7px 16px;
  border-top: 1.5px dashed var(--rule);
  font-family: var(--font-hand); font-size: 15px; color: var(--ink-faint);
}

/* --- hero ------------------------------------------------------------------ */
.hero {
  display: grid; grid-template-columns: 1fr 480px; gap: 32px;
  padding: 36px 36px 40px 48px; align-items: center;
}
.hero > * { min-width: 0; }
.hero-copy { display: flex; flex-direction: column; gap: 20px; }
.hero h1 {
  margin: 0;
  font-family: var(--font-serif); font-weight: 700;
  font-size: clamp(34px, 4vw, 50px); line-height: 1.1; color: var(--ink);
  text-wrap: pretty;
}
.hl { background: linear-gradient(transparent 60%, var(--sun) 60%); padding: 0 4px; }
.hero-sub {
  margin: 0; font-size: 18px; line-height: 1.55; color: var(--ink-soft);
  max-width: 42ch; text-wrap: pretty;
}
.hero-scribble {
  margin: 0; font-family: var(--font-hand); font-size: 22px; color: var(--sky);
  transform: rotate(-1.5deg);
}
.hero-ctas { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.btn-primary {
  background: var(--ink); color: var(--cream); font-weight: 800; font-size: 17px;
  padding: 14px 26px; border-radius: 4px; box-shadow: 4px 4px 0 var(--sun);
  text-decoration: none; transition: transform .15s ease, box-shadow .15s ease;
}
.btn-primary:hover { transform: translate(-1px, -1px); box-shadow: 5px 5px 0 var(--sun); }
.btn-ghost {
  display: inline-block;
  border: 2px solid var(--ink); color: var(--ink); font-weight: 800; font-size: 17px;
  padding: 12px 24px; border-radius: 4px; text-decoration: none;
  transition: background .15s ease;
}
.btn-ghost:hover { background: rgba(58, 46, 31, .06); }

/* --- hero collage ----------------------------------------------------------- */
.collage {
  position: relative; width: 100%; max-width: 480px; aspect-ratio: 480 / 430;
  margin: 0 auto; container-type: inline-size;
}
.polaroid {
  position: absolute; margin: 0; width: 39.6%;
  background: #fff; padding: 5.3% 5.3% 15.8%;
  box-shadow: 0 12px 26px rgba(58, 46, 31, .25);
}
.polaroid figcaption {
  position: absolute; bottom: 2.5%; left: 7%;
  font-family: var(--font-hand); font-size: clamp(12px, 3.6cqi, 17px);
  color: var(--ink-soft); white-space: nowrap;
}
.polaroid .tape { top: -10px; width: 47%; height: clamp(14px, 5cqi, 24px); }
.polaroid.p1 { left: 0; top: 5.6%; transform: rotate(-5deg); }
.polaroid.p1 .tape { left: 20%; }
.polaroid.p2 { right: 5%; top: 0; transform: rotate(4deg); }
.polaroid.p2 .tape { right: 16%; }
.polaroid.p3 { left: 25%; bottom: 0; transform: rotate(-1deg); }
.polaroid.p3 .tape { left: 23%; }
.stamp {
  position: absolute; right: 0; bottom: 15%;
  width: 20%; aspect-ratio: 1;
  border: 3px double var(--gold); border-radius: 50%;
  display: grid; place-items: center;
  transform: rotate(12deg); opacity: .85;
  text-align: center; font-weight: 800; font-size: clamp(8px, 2.3cqi, 11px);
  color: var(--gold); letter-spacing: .08em; line-height: 1.3;
}

/* --- ledger (the trip so far + fresh pastings) -------------------------------- */
.ledger-status, .ledger-noscript {
  margin: 0; padding: 0 36px 44px; text-align: center;
  font-family: var(--font-hand); font-size: 24px; color: var(--ink-mute);
}
.ledger-error { font-size: 22px; color: var(--poppy); }
.ledger-inner { display: flex; flex-direction: column; gap: 22px; padding: 4px 36px 44px; }

.rule-row { display: flex; align-items: center; gap: 14px; }
.fresh-row { margin-top: 8px; }
.kicker {
  font-size: 12px; font-weight: 800; letter-spacing: .14em;
  color: var(--ink-mute); text-transform: uppercase; white-space: nowrap;
}
.rule-note { font-family: var(--font-hand); font-size: 19px; color: var(--ink-mute); }
.rule-note.poppy { color: var(--poppy); transform: rotate(-1.5deg); }
.rule { flex: 1; border-top: 2px dashed var(--rule); }

.notes { display: flex; gap: 18px; align-items: stretch; }
.note {
  flex: 1;
  background: var(--bg, var(--note-yellow));
  padding: 14px 20px 16px;
  transform: rotate(var(--tilt, 0deg));
  box-shadow: 0 8px 16px rgba(58, 46, 31, .16);
  text-decoration: none; display: flex; flex-direction: column; gap: 2px;
  transition: transform .15s ease, box-shadow .15s ease;
}
.note:hover { transform: rotate(0deg) translateY(-3px); box-shadow: 0 14px 26px rgba(58, 46, 31, .22); }
.note-big { font-family: var(--font-hand); font-size: 31px; font-weight: 700; color: var(--ink); line-height: 1; }
.note-cap { font-size: 10px; font-weight: 800; letter-spacing: .12em; color: var(--cap, var(--ink-mute)); margin-top: 4px; }

.fresh-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px 16px; padding-top: 6px; }
.fresh-card {
  position: relative; background: #fff; padding: 12px 14px 13px;
  transform: rotate(var(--tilt, 0deg));
  box-shadow: 0 8px 18px rgba(58, 46, 31, .16);
  text-decoration: none; display: flex; flex-direction: column; gap: 3px;
  min-height: 96px;
  transition: transform .15s ease, box-shadow .15s ease;
}
.fresh-card:hover { transform: rotate(0deg) translateY(-3px); box-shadow: 0 14px 28px rgba(58, 46, 31, .24); }
.fresh-card .tape { top: -9px; left: 50%; margin-left: -34px; width: 68px; height: 19px; }
.fresh-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.fresh-code {
  border: 1.5px solid var(--chip-border); color: var(--ink-soft); background: var(--chip-bg);
  font-weight: 800; font-size: 9px; padding: 1.5px 6px; transform: rotate(-1deg);
}
.fresh-when { font-family: var(--font-hand); font-size: 16px; color: var(--poppy); white-space: nowrap; }
.fresh-name { font-weight: 800; font-size: 15px; color: var(--ink); line-height: 1.15; margin-top: 2px; }
.fresh-sub { font-size: 12px; font-weight: 600; color: var(--ink-mute); }
.fresh-set { margin-top: auto; font-size: 10.5px; font-weight: 700; color: var(--ink-mute); padding-top: 6px; }

.ledger-foot {
  display: flex; justify-content: space-between; align-items: baseline;
  gap: 20px; margin-top: 6px; flex-wrap: wrap;
}
.slots-note { font-family: var(--font-hand); font-size: 21px; color: var(--ink-mute); transform: rotate(-.5deg); }
.foot-note { font-size: 11px; font-weight: 600; color: var(--ink-faint); }

/* --- page scaffold (Destinations & future pages) -------------------------------- */
.page-main { display: flex; flex-direction: column; gap: 22px; padding: 10px 36px 44px; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; }
.page-head-left { display: flex; flex-direction: column; gap: 6px; }
.page-title-row { display: flex; align-items: baseline; gap: 16px; flex-wrap: wrap; }
.page-title { margin: 0; font-family: var(--font-serif); font-size: 40px; font-weight: 700; color: var(--ink); }
.page-scribble { font-family: var(--font-hand); font-size: 22px; color: var(--poppy); transform: rotate(-2deg); }
.page-sub { margin: 0; font-size: 14px; color: var(--ink-soft); font-weight: 600; }
.page-meter { display: flex; align-items: center; gap: 10px; flex: none; min-width: 320px; }
.meter { flex: 1; height: 10px; background: #F1E5C8; border-radius: 99px; overflow: hidden; }
.meter i { display: block; height: 100%; width: 0; background: var(--poppy); border-radius: 99px; }
.meter-label { font-family: var(--font-hand); font-size: 20px; font-weight: 700; color: var(--poppy); flex: none; }

/* --- destinations: legs & tiles --------------------------------------------------- */
.legs { display: flex; flex-direction: column; gap: 22px; }
.leg { display: flex; flex-direction: column; gap: 14px; }
.leg-head { display: flex; align-items: center; gap: 14px; }
.plate {
  background: var(--accent, var(--poppy)); color: var(--cream);
  font-family: var(--font-serif); font-weight: 700; font-size: 18px;
  padding: 4px 14px; transform: rotate(-1deg);
  box-shadow: 2px 2px 0 rgba(58, 46, 31, .25); white-space: nowrap;
}
.leg-note { font-family: var(--font-hand); font-size: 19px; color: var(--ink-mute); }
.dest-grid, .set-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px 16px; padding-top: 6px; }
.dest-cell { position: relative; }
.dest-tile {
  position: relative; background: #fff; padding: 12px 14px 13px;
  transform: rotate(var(--tilt, 0deg));
  box-shadow: 0 8px 18px rgba(58, 46, 31, .16);
  min-height: 190px; height: 100%;
  display: flex; flex-direction: column; gap: 7px;
  text-decoration: none; color: inherit;
  transition: transform .15s ease, box-shadow .15s ease;
}
.dest-tile:hover { transform: rotate(0deg) translateY(-3px); box-shadow: 0 14px 28px rgba(58, 46, 31, .24); }
.dest-tile .tape { top: -10px; left: 50%; margin-left: -42px; width: 84px; height: 22px; }
.dest-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.dest-code {
  background: rgba(58, 46, 31, .06); border: 1.5px solid var(--accent, var(--poppy));
  color: var(--ink); font-weight: 800; font-size: 10.5px; padding: 2px 7px;
  transform: rotate(-1deg); white-space: nowrap;
}
.dest-status { font-size: 10px; font-weight: 800; white-space: nowrap; }
.dest-status.active { color: #5B8C3E; }
.dest-status.closed { color: var(--poppy); }
.dest-body { display: flex; gap: 12px; flex: 1; }
.dest-scan {
  width: 66px; border-radius: 4px; flex: none; align-self: flex-start;
  box-shadow: 0 4px 10px rgba(58, 46, 31, .25); transform: rotate(-2deg);
}
.dest-stampbox {
  width: 62px; height: 88px; flex: none; align-self: flex-start;
  border: 2.5px solid var(--accent, var(--poppy)); color: var(--accent, var(--poppy));
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  transform: rotate(-2deg); opacity: .72; text-align: center;
}
.dest-stampcode { font-weight: 800; font-size: 11.5px; letter-spacing: .03em; padding: 0 3px; line-height: 1.1; }
.dest-stampregion { font-size: 6.5px; font-weight: 800; letter-spacing: .16em; padding: 0 4px; line-height: 1.5; }
.dest-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.dest-names { display: flex; flex-direction: column; gap: 1px; }
.dest-native { font-family: var(--font-serif); font-weight: 700; font-size: 22px; color: var(--ink); line-height: 1.12; }
.dest-english { font-size: 11.5px; font-weight: 700; color: var(--ink-mute); }
.dest-regions { font-size: 10.5px; font-weight: 700; color: var(--ink-soft); }
.dest-progress { margin-top: auto; display: flex; flex-direction: column; gap: 4px; }
.dest-count { font-size: 10.5px; font-weight: 700; color: var(--ink-mute); }
.dest-meter-row { display: flex; align-items: center; gap: 8px; }
.dest-meter-row .meter { height: 7px; }
.dest-meter-row .meter-label { font-size: 16px; }
.dest-progress-sub { font-size: 9.5px; font-weight: 700; color: var(--ink-mute); }
.dest-note {
  font-family: var(--font-hand); font-size: 15.5px; line-height: 1.25; color: var(--ink-mute);
  border-top: 1.5px dashed #EDE2C6; padding-top: 5px;
}
.route-stamp {
  position: absolute; right: 8px; top: 34px; width: 68px; height: 68px;
  border: 2.5px double #B04A3A; border-radius: 50%;
  display: grid; place-items: center; transform: rotate(-14deg); opacity: .85;
  background: rgba(249, 239, 217, .55); pointer-events: none;
  text-align: center; font-weight: 800; font-size: 8px; color: #B04A3A;
  letter-spacing: .1em; line-height: 1.5;
}
.route-stamp.small { right: 6px; top: 32px; width: 58px; height: 58px; opacity: .6; font-size: 7px; }
.dest-ghost {
  position: relative; border: 2.5px dashed var(--chip-border); border-radius: 4px;
  min-height: 190px; height: 100%; box-sizing: border-box;
  display: flex; flex-direction: column; gap: 6px; padding: 12px 14px;
  cursor: help; transition: border-color .15s ease, background .15s ease;
}
.dest-ghost:hover { border-color: var(--ink-mute); background: rgba(255, 253, 246, .6); }
.ghost-code {
  border: 1.5px solid var(--chip-border); color: var(--ink-faint);
  font-weight: 800; font-size: 10.5px; padding: 2px 7px;
  transform: rotate(-1deg); white-space: nowrap;
}
.ghost-status { font-size: 10px; font-weight: 800; color: var(--ink-faint); white-space: nowrap; }
.ghost-native { font-family: var(--font-hand); font-size: 26px; color: var(--ink-faint); line-height: 1.02; }
.ghost-english { font-size: 11.5px; font-weight: 700; color: var(--chip-border); }
.ghost-regions { font-size: 10.5px; font-weight: 700; color: var(--chip-border); }
.ghost-foot { margin-top: auto; display: flex; flex-direction: column; gap: 3px; }
.ghost-unmapped { font-family: var(--font-hand); font-size: 17px; color: var(--ink-faint); }
.ghost-note { font-family: var(--font-hand); font-size: 15px; line-height: 1.25; color: var(--chip-border); }
.dest-foot { margin: 0; font-family: var(--font-hand); font-size: 20px; color: var(--ink-mute); }
.dest-foot a { color: var(--sky); text-decoration: none; }

/* --- set browse: era chips, set tiles & side pockets ------------------------------ */
.era-chips { display: flex; gap: 10px 8px; align-items: center; flex-wrap: wrap; }
.era-chips-lead { font-family: var(--font-hand); font-size: 18px; color: var(--ink-mute); transform: rotate(-2deg); margin-right: 4px; }
.era-chip {
  background: var(--chip-tint, rgba(58, 46, 31, .1)); color: var(--chip-ink, var(--ink));
  padding: 7px 15px; font-weight: 800; font-size: 13px;
  transform: rotate(var(--tilt, 0deg)); white-space: nowrap;
  transition: transform .15s ease, box-shadow .15s ease;
}
.era-chip:hover { transform: rotate(0deg) scale(1.05); box-shadow: 0 4px 10px rgba(58, 46, 31, .15); }
.set-tile {
  position: relative; background: #fff; padding: 12px 13px;
  transform: rotate(var(--tilt, 0deg));
  box-shadow: 0 10px 22px rgba(58, 46, 31, .18);
  min-height: 148px; height: 100%;
  display: flex; gap: 12px;
  transition: transform .15s ease, box-shadow .15s ease;
}
.set-tile:hover { transform: rotate(0deg) translateY(-3px); box-shadow: 0 14px 28px rgba(58, 46, 31, .24); }
a.set-tile, a.set-empty { text-decoration: none; color: inherit; cursor: pointer; }
.set-tile .tape { top: -10px; left: 50%; margin-left: -42px; width: 84px; height: 22px; }
.set-scan {
  width: 76px; border-radius: 4px; flex: none; align-self: flex-start;
  box-shadow: 0 4px 10px rgba(58, 46, 31, .25);
}
.set-stampbox {
  width: 72px; height: 100px; flex: none; align-self: flex-start;
  border: 2.5px solid var(--accent, var(--poppy)); color: var(--accent, var(--poppy));
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  transform: rotate(-2deg); opacity: .72; text-align: center;
}
.set-stampcode { font-weight: 800; font-size: 13px; letter-spacing: .03em; padding: 0 4px; line-height: 1.1; overflow-wrap: anywhere; }
.set-stampyear { font-size: 7px; font-weight: 800; letter-spacing: .2em; }
.set-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.set-name { font-weight: 800; font-size: 14px; color: var(--ink); line-height: 1.18; }
.set-meta { font-size: 10.5px; font-weight: 700; color: var(--ink-mute); }
.set-progress { margin-top: auto; display: flex; flex-direction: column; gap: 5px; }
.set-meter-row { display: flex; align-items: center; gap: 7px; }
.set-meter-row .meter { height: 7px; }
.set-meter-row .meter i { background: var(--bar, var(--poppy)); }
.set-meter-row .meter-label { font-size: 15px; color: var(--bar, var(--poppy)); }
.travel-chips { display: flex; gap: 4px; flex-wrap: wrap; align-items: center; }
.travel-chip {
  border: 1.5px solid var(--chip-border); color: var(--ink-soft); background: var(--chip-bg);
  font-weight: 800; font-size: 9px; padding: 1.5px 5px; transform: rotate(var(--tilt, 0deg));
}
.travel-more { color: var(--ink-mute); font-weight: 800; font-size: 9.5px; }
.travel-none { font-family: var(--font-hand); font-size: 14px; color: var(--ink-faint); }
.set-tag {
  position: absolute; top: -8px; right: -5px;
  background: var(--tag-bg, var(--ink)); color: var(--tag-fg, var(--cream));
  font-size: 8.5px; font-weight: 800; padding: 2px 7px; border-radius: 3px;
  transform: rotate(3deg); letter-spacing: .06em;
}
.set-complete {
  position: absolute; bottom: 44px; right: 8px;
  border: 2px solid var(--gold); color: var(--gold);
  font-weight: 800; font-size: 9px; letter-spacing: .1em; padding: 2px 6px;
  transform: rotate(-8deg); background: rgba(255, 253, 246, .85);
}
.set-empty {
  position: relative; border: 2.5px dashed var(--chip-border); border-radius: 4px;
  min-height: 148px; height: 100%;
  display: flex; flex-direction: column; gap: 4px; padding: 10px 12px;
  transition: border-color .15s ease, background .15s ease;
}
.set-empty:hover { border-color: var(--ink-mute); background: rgba(255, 253, 246, .6); }
.set-empty-top { display: flex; justify-content: space-between; gap: 6px; align-items: center; }
.set-empty-code { font-size: 10px; font-weight: 800; color: var(--ink-faint); }
.set-empty-date { font-size: 9.5px; font-weight: 700; color: var(--chip-border); white-space: nowrap; }
.set-empty-name { font-family: var(--font-hand); font-size: 19px; color: var(--ink-faint); line-height: 1.02; }
.set-empty-tag { font-size: 8.5px; font-weight: 800; letter-spacing: .06em; color: var(--ink-faint); }
.set-empty-foot { margin-top: auto; font-size: 9.5px; font-weight: 700; color: var(--chip-border); }
.pocket {
  background: var(--chip-bg); border: 1.5px solid #E8DCC2; border-radius: 6px;
  padding: 12px 16px 14px; display: flex; flex-direction: column; gap: 8px;
}
.pocket-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.pocket-label { font-size: 10.5px; font-weight: 800; letter-spacing: .12em; color: var(--ink-mute); }
.pocket-sub { font-family: var(--font-hand); font-size: 16px; color: var(--ink-faint); }
.pocket-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 22px; }
.pocket-row { display: flex; align-items: center; gap: 8px; border-bottom: 1.5px dashed #EDE2C6; padding: 5px 0; min-width: 0; }
.pocket-code {
  border: 1.5px solid var(--chip-border); color: var(--ink-soft);
  font-weight: 800; font-size: 9.5px; padding: 1.5px 6px;
  transform: rotate(var(--tilt, 0deg)); white-space: nowrap; flex: none;
}
.pocket-name { font-weight: 800; font-size: 12px; color: var(--nav-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pocket-meta { font-size: 10px; font-weight: 700; color: var(--ink-mute); white-space: nowrap; margin-left: auto; flex: 0 1 auto; overflow: hidden; text-overflow: ellipsis; }
.pocket-pct { font-family: var(--font-hand); font-size: 15px; flex: none; width: 40px; text-align: right; }

/* --- set page: hunts, travels, lenses & card tiles --------------------------------- */
.page-stamp {
  width: 64px; height: 64px; flex: none; align-self: center; margin-left: 4px;
  border: 3px double var(--gold); border-radius: 50%;
  display: grid; place-items: center; transform: rotate(10deg); opacity: .85;
  text-align: center; font-weight: 800; font-size: 10.5px; color: var(--gold);
  letter-spacing: .08em; line-height: 1.35;
}
.panel-grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: 18px; }
.panel {
  background: var(--chip-bg); border: 1.5px solid #E8DCC2; border-radius: 6px;
  padding: 18px 20px; display: flex; flex-direction: column; gap: 12px;
}
.panel-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.panel-kicker { margin: 0; font-size: 11px; font-weight: 800; letter-spacing: .12em; color: var(--ink-mute); }
.panel-aside { font-family: var(--font-hand); font-size: 18px; color: var(--poppy); transform: rotate(-2deg); }
.hunt-row { display: flex; gap: 12px; flex-wrap: wrap; }
.hunt-btn {
  background: var(--chip-bg); color: var(--ink-soft); border: 2px solid var(--chip-border);
  padding: 8px 14px; transform: rotate(var(--tilt, 0deg)); text-align: left;
  transition: transform .15s ease, box-shadow .15s ease;
}
.hunt-btn:hover { transform: rotate(0deg); }
.hunt-btn .hunt-label { display: block; font-weight: 800; font-size: 14px; }
.hunt-btn .hunt-sub { display: block; font-size: 11px; font-weight: 600; color: var(--ink-mute); margin-top: 1px; }
.hunt-btn.active { background: var(--poppy); color: var(--cream); border-color: var(--poppy); box-shadow: 3px 3px 0 var(--ink); }
.hunt-btn.active .hunt-sub { color: rgba(255, 247, 232, .85); }
.hunt-note { margin: 0; font-family: var(--font-hand); font-size: 19px; color: var(--ink-soft); line-height: 1.15; }
.travel-stamps { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.lang-stamp {
  border: 2px solid var(--chip-border); color: var(--ink-soft); background: var(--chip-bg);
  font-weight: 800; font-size: 12px; padding: 5px 11px; transform: rotate(var(--tilt, 0deg));
}
.lang-stamp.active { border-color: var(--poppy); background: var(--poppy); color: var(--cream); }
.lang-stamp.none { border-style: dashed; background: transparent; color: var(--ink-faint); text-decoration: line-through; }
.travel-note { margin: 0; font-family: var(--font-hand); font-size: 19px; color: var(--sky); line-height: 1.15; }
.lens-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.lens-kicker { font-size: 11px; font-weight: 800; letter-spacing: .12em; color: var(--ink-mute); margin-right: 2px; }
.lens-chip {
  background: var(--chip-tint, rgba(58, 46, 31, .1)); color: var(--chip-ink, var(--ink));
  border: 2px solid transparent; font-weight: 800; font-size: 12px; padding: 5px 12px;
  transform: rotate(var(--tilt, 0deg)); transition: transform .15s ease;
}
.lens-chip:hover { transform: rotate(0deg); }
.lens-chip.active { background: var(--ink); color: var(--cream); border-color: var(--ink); }
.lens-aside { font-family: var(--font-hand); font-size: 18px; color: var(--ink-mute); transform: rotate(-1deg); }
/* set-page paste mode (P1.3) — signed-in only; sits between the lens row and
   the grid and flips tiles from navigate to paste/un-paste */
.paste-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 12px 0 2px; }
.paste-enter {
  background: transparent; border: 2px dashed var(--poppy); color: var(--poppy);
  font-weight: 800; font-size: 12px; padding: 6px 14px; transform: rotate(-1deg);
  transition: background .15s ease;
}
.paste-enter:hover { background: rgba(232, 84, 63, .1); }
.paste-bar.on {
  border: 2px dashed var(--sun); background: rgba(244, 164, 40, .1);
  padding: 10px 14px; transform: rotate(-.2deg);
}
.paste-mode-tag { font-size: 11px; font-weight: 800; letter-spacing: .12em; color: var(--poppy); }
.paste-aside { font-family: var(--font-hand); font-size: 18px; color: var(--ink-mute); transform: rotate(-.5deg); }
.paste-live { font-weight: 800; font-size: 12px; color: var(--ink-soft); }
.paste-bulk { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-left: auto; }
.paste-all, .paste-none, .paste-cancel, .paste-exit { font-weight: 800; font-size: 11px; padding: 6px 12px; transition: background .15s ease; }
.paste-all { background: rgba(91, 140, 62, .12); border: 2px solid #5B8C3E; color: #4A7332; transform: rotate(-1deg); }
.paste-all:hover { background: rgba(91, 140, 62, .22); }
.paste-none { background: rgba(232, 84, 63, .07); border: 2px dashed var(--poppy); color: var(--poppy); transform: rotate(1deg); }
.paste-none:hover { background: rgba(232, 84, 63, .16); }
.paste-all.armed, .paste-none.armed { background: var(--ink); border-color: var(--ink); border-style: solid; color: var(--cream); }
.paste-cancel { background: transparent; color: var(--ink-mute); text-decoration: underline; }
.paste-exit { background: var(--ink); border: 2px solid var(--ink); color: var(--cream); transform: rotate(1deg); }
.paste-exit:hover { background: var(--ink-soft); }
.card-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 20px 14px; padding-top: 8px; }
.card-cell { min-width: 0; }
.card-cell { position: relative; }
.card-tile {
  position: relative; background: #fff; padding: 7px 7px 9px;
  transform: rotate(var(--tilt, 0deg));
  box-shadow: 0 8px 18px rgba(58, 46, 31, .18);
  min-height: 88px; height: 100%;
  display: flex; flex-direction: column;
}
.card-tile .tape { top: -8px; left: 50%; margin-left: -28px; width: 56px; height: 16px; }
.card-band {
  display: flex; justify-content: space-between; align-items: center; gap: 6px;
  background: var(--band, rgba(201, 180, 144, .28)); color: var(--band-ink, #7A6A52);
  padding: 3px 8px; font-weight: 800; font-size: 11px;
}
.card-band .num { white-space: nowrap; }
.card-band .mark { flex: none; }
.card-name { font-weight: 800; font-size: 13.5px; color: var(--ink); margin-top: 7px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-sub { font-size: 10px; font-weight: 700; color: var(--ink-mute); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-tag {
  position: absolute; top: -9px; right: -6px;
  background: var(--ink); color: var(--cream);
  font-size: 9px; font-weight: 800; padding: 2px 7px; border-radius: 3px;
  transform: rotate(3deg); letter-spacing: .06em;
}
.card-ghost {
  border: 2.5px dashed var(--chip-border); border-radius: 4px;
  min-height: 88px; height: 100%;
  display: flex; flex-direction: column; justify-content: center; gap: 3px; padding: 10px 12px;
  transition: border-color .15s ease, background .15s ease;
}
.card-ghost:hover { border-color: var(--ink-mute); background: rgba(255, 253, 246, .6); }
.card-ghost .num { font-size: 11px; font-weight: 800; color: var(--ink-faint); }
.card-ghost .gname { font-family: var(--font-hand); font-size: 19px; color: var(--ink-faint); line-height: 1.05; }
.card-ghost .gtag { font-size: 9px; font-weight: 800; letter-spacing: .06em; color: var(--ink-faint); }
a.card-tile, a.card-ghost { text-decoration: none; color: inherit; cursor: pointer; }
picture { display: contents; }
.card-body { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.card-tile.has-img { flex-direction: row; gap: 8px; }
.card-thumb { width: 46px; height: auto; flex: none; align-self: center; border-radius: 2px; box-shadow: 0 2px 6px rgba(58, 46, 31, .3); }

/* --- other-print substitute -----------------------------------------------------
   Wizards sets split by print run, but a given card was scanned by the community
   in only ONE run (CARD-IMAGE-PLAN.md §6). Rather than a blank slot we show the
   sibling run's scan — always visibly marked, never passed off as this run's own. */
.card-tile.img-substitute { position: relative; }
.card-tile.img-substitute .card-thumb { opacity: .82; filter: saturate(.9); }
.thumb-sub {
  position: absolute; left: 4px; bottom: 4px;
  font-family: monospace; font-size: 8px; letter-spacing: .02em; line-height: 1;
  color: var(--ink-mute); background: rgba(255, 255, 255, .88);
  border: 1px solid rgba(58, 46, 31, .18); border-radius: 2px; padding: 2px 3px;
  pointer-events: none;
}

/* --- card detail page ---------------------------------------------------------- */
.card-main { gap: 16px; }
.backlinks { display: flex; gap: 14px; justify-content: flex-end; align-items: baseline; }
.backlinks a { font-size: 11px; font-weight: 800; color: var(--sky); text-decoration: none; }
.card-cols { display: flex; gap: 26px; align-items: flex-start; }
.specimen { width: 392px; flex: none; display: flex; flex-direction: column; gap: 14px; }
.spec-frame {
  position: relative; background: #fff; padding: 14px;
  box-shadow: 0 12px 28px rgba(58, 46, 31, .18); transform: rotate(-.8deg);
}
.spec-frame .tape.t1 { top: -9px; left: 34px; width: 74px; height: 20px; }
.spec-frame .tape.t2 { top: -9px; right: 34px; left: auto; width: 74px; height: 20px; }
.spec-art {
  aspect-ratio: 5 / 7; position: relative; border: 1.5px solid #EDE2C6;
  background: repeating-linear-gradient(135deg, var(--s1, #FBF3DD) 0 9px, var(--s2, #F3E7C9) 9px 18px);
}
.spec-art.has-img { aspect-ratio: auto; border: none; background: none; }
.spec-art .spec-img { display: block; width: 100%; height: auto; }
.spec-art .spec-note {
  position: absolute; bottom: 8px; left: 8px;
  font-family: monospace; font-size: 10px; color: var(--ink-mute);
  background: rgba(255, 255, 255, .8); padding: 2px 6px;
}
/* the card page is where the substitution must be unmissable — a full-width
   band under the scan, not a corner chip */
.spec-art .spec-sub-note {
  display: block; margin-top: 6px; padding: 6px 8px;
  font-family: var(--font-hand); font-size: 15px; line-height: 1.25;
  color: #8F4E2F; background: rgba(232, 84, 63, .09);
  border-left: 3px solid rgba(232, 84, 63, .45);
}
.spec-caption { display: flex; flex-direction: column; gap: 2px; padding: 0 6px; }
.spec-title-row { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.spec-name { margin: 0; font-family: var(--font-serif); font-size: 38px; font-weight: 700; color: var(--ink); }
.spec-sub { font-family: var(--font-hand); font-size: 24px; color: var(--ink-mute); }
.spec-meta { display: flex; align-items: center; gap: 8px; }
.spec-loc {
  background: rgba(58, 46, 31, .06); border: 1.5px solid var(--accent, var(--poppy));
  color: var(--ink); font-weight: 800; font-size: 10.5px; padding: 2px 7px; transform: rotate(-1deg);
}
.spec-setname { font-size: 12px; font-weight: 700; color: var(--ink-soft); }
.spec-num { font-family: var(--font-hand); font-size: 20px; font-weight: 700; color: var(--gold); margin-left: auto; }
.spec-quip { font-family: var(--font-hand); font-size: 18px; color: var(--poppy); transform: rotate(-1deg); }
.plaques { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.plaque {
  background: #fff; padding: 14px 18px; transform: rotate(var(--tilt, 0deg));
  box-shadow: 0 8px 18px rgba(58, 46, 31, .14);
  display: flex; flex-direction: column; gap: 8px;
}
.plaque-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.plaque-kicker { margin: 0; font-size: 10px; font-weight: 800; letter-spacing: .12em; color: var(--ink-mute); }
.plaque-aside { font-family: var(--font-hand); font-size: 15px; color: var(--chip-border); }
.museum-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 22px; }
.museum-row { display: flex; align-items: baseline; gap: 8px; border-bottom: 1.5px dotted #EDE2C6; padding-bottom: 4px; }
.museum-row .mk { font-size: 9.5px; font-weight: 800; color: var(--chip-border); letter-spacing: .08em; flex: none; width: 74px; }
.museum-row .mv { font-size: 12px; font-weight: 700; color: var(--ink); min-width: 0; }
.museum-row .mnote { font-family: var(--font-hand); font-size: 14px; color: var(--ink-mute); flex: none; }
.printing { display: flex; align-items: center; gap: 12px; background: #FDF7E7; border: 1.5px solid #EDE2C6; padding: 8px 12px; }
.print-swatch {
  width: 34px; height: 46px; flex: none; position: relative; border: 1px solid #EDE2C6;
  background: repeating-linear-gradient(135deg, var(--s1, #FBF3DD) 0 5px, var(--s2, #F3E7C9) 5px 10px);
}
.print-sfx {
  position: absolute; top: 2px; right: 2px; background: var(--ink); color: var(--paper);
  font-weight: 800; font-size: 7px; padding: 0 3px; border-radius: 2px;
}
.print-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.print-top { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.print-label { font-weight: 800; font-size: 13px; color: var(--ink); }
.print-hunt { font-size: 10px; font-weight: 700; color: var(--ink-mute); }
.print-local { font-size: 9px; font-weight: 800; color: var(--sky); border: 1px solid rgba(46, 134, 171, .45); padding: 1px 5px; border-radius: 2px; }
.print-date { font-family: var(--font-hand); font-size: 15px; }
.print-date.on { color: #5B8C3E; }
.print-date.off { color: var(--poppy); }
.btn-pasted {
  background: rgba(244, 164, 40, .35); border: 2px solid var(--ink); color: var(--ink);
  font-weight: 800; font-size: 11px; padding: 6px 14px; transform: rotate(-2deg); flex: none;
  transition: background .15s ease;
}
.btn-pasted:hover { background: rgba(244, 164, 40, .55); }
.btn-paste {
  background: rgba(232, 84, 63, .05); border: 2px dashed var(--poppy); color: var(--poppy);
  font-weight: 800; font-size: 11px; padding: 6px 14px; transform: rotate(-2deg); flex: none;
  transition: background .15s ease;
}
.btn-paste:hover { background: rgba(232, 84, 63, .14); }
.chain-row { display: flex; gap: 10px; flex-wrap: wrap; }
.chain-link {
  width: 170px; padding: 10px 12px; position: relative;
  display: flex; flex-direction: column; gap: 3px;
  border: var(--b, 1.5px solid #EDE2C6); background: var(--bg, #FDF7E7);
  transform: rotate(var(--tilt, 0deg)); text-decoration: none; color: inherit;
  transition: transform .15s ease;
}
.chain-link:hover { transform: rotate(0deg); }
.chain-here {
  position: absolute; top: -8px; right: 10px; background: var(--sky); color: var(--cream);
  font-weight: 800; font-size: 8px; letter-spacing: .08em; padding: 2px 6px; transform: rotate(2deg);
}
.chain-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.chain-loc { background: rgba(58, 46, 31, .06); border: 1px solid var(--chip-border); color: var(--nav-ink); font-weight: 800; font-size: 8.5px; padding: 1.5px 5px; }
.chain-state { font-size: 9px; font-weight: 800; letter-spacing: .06em; }
.chain-num { font-family: var(--font-serif); font-weight: 700; font-size: 24px; }
.chain-set { font-size: 9.5px; font-weight: 800; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chain-when { font-family: var(--font-hand); font-size: 13px; color: var(--ink-mute); min-height: 15px; }
.chain-lone { align-self: center; font-family: var(--font-hand); font-size: 17px; color: var(--ink-mute); transform: rotate(-1deg); }
.gd-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.gd-type { font-size: 11px; font-weight: 700; color: var(--ink-soft); }
.gd-right { display: flex; align-items: center; gap: 5px; margin-left: auto; }
.energy-chip {
  width: 17px; height: 17px; border-radius: 99px; background: var(--e, var(--chip-border));
  color: var(--cream); font-weight: 800; font-size: 9px;
  display: inline-flex; align-items: center; justify-content: center; flex: none;
}
.energy-chip.small { width: 15px; height: 15px; font-size: 8px; }
.gd-hp { font-family: var(--font-serif); font-weight: 700; font-size: 18px; color: var(--ink); }
.gd-ability { display: flex; flex-direction: column; gap: 2px; border-left: 3px solid var(--sun); padding-left: 10px; }
.gd-ab-head { display: flex; align-items: baseline; gap: 8px; }
.gd-ab-type { font-size: 9px; font-weight: 800; color: var(--gold); letter-spacing: .08em; }
.gd-ab-name { font-weight: 800; font-size: 12.5px; color: var(--ink); }
.gd-text { font-size: 11px; font-weight: 600; color: var(--ink-soft); line-height: 1.45; }
.gd-attack { display: flex; flex-direction: column; gap: 2px; border-top: 1.5px dotted #EDE2C6; padding-top: 7px; }
.gd-at-head { display: flex; align-items: center; gap: 6px; }
.gd-at-name { font-weight: 800; font-size: 12.5px; color: var(--ink); }
.gd-dmg { font-family: var(--font-serif); font-weight: 700; font-size: 16px; color: var(--poppy); margin-left: auto; }
.gd-bottom { display: flex; gap: 20px; border-top: 1.5px dotted #EDE2C6; padding-top: 7px; flex-wrap: wrap; }
.gd-bottom span { font-size: 10.5px; font-weight: 700; color: var(--ink-mute); }
.gd-bottom b { color: var(--ink); font-weight: 800; }
.card-disclaimer { border-top: 2px dashed var(--rule); padding-top: 12px; display: flex; align-items: baseline; gap: 14px; }
.disclaimer-text { margin: 0; font-size: 10.5px; font-weight: 700; color: var(--ink-faint); line-height: 1.5; flex: 1; }
.btn-forget {
  font-size: 10px; font-weight: 800; color: var(--poppy); white-space: nowrap;
  border: 1.5px dashed var(--poppy); background: none; padding: 3px 8px; border-radius: 3px;
  transition: background .15s ease;
}
.btn-forget:hover { background: rgba(232, 84, 63, .08); }
.lang-stamp.absorb { border-style: dashed; border-color: var(--sun); color: #A66F0B; background: rgba(244, 164, 40, .12); }
.page-title-sub { font-size: 17px; font-weight: 700; color: var(--ink-mute); white-space: nowrap; }

/* --- my album: mission, wall & rail ---------------------------------------------- */
.album-head { display: flex; gap: 18px; align-items: flex-start; }
.album-head-left { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.mission-card {
  position: relative; width: 340px; flex: none;
  background: #fff; padding: 12px 15px; transform: rotate(.35deg);
  box-shadow: 0 8px 18px rgba(58, 46, 31, .14);
  display: flex; flex-direction: column; gap: 6px;
}
.mission-card .tape, .rail-card .tape { top: -9px; left: 50%; margin-left: -32px; width: 64px; height: 18px; }
.mission-row { display: flex; align-items: baseline; gap: 8px; }
.mission-pct { font-family: var(--font-serif); font-size: 30px; font-weight: 700; color: var(--poppy); }
.mission-sub { font-size: 11px; font-weight: 700; color: var(--ink-soft); }
.mission-meter { height: 8px; }
.mission-foot { font-size: 10.5px; font-weight: 700; color: var(--ink-mute); }
.wall-head-row { display: flex; align-items: baseline; gap: 10px; }
.wall-head { font-family: var(--font-hand); font-size: 17px; color: var(--gold); }
.wall-row { display: flex; gap: 18px; align-items: flex-start; margin-top: -6px; }
.wall { flex: 1; min-width: 0; padding: 10px 2px 4px; }
.wall-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); gap: 10px; }
.wtile {
  position: relative; background: #fff; border: 1.5px solid #EDE2C6; padding: 6px;
  display: flex; flex-direction: column; gap: 3px; min-width: 0;
  transform: rotate(var(--tilt, 0deg)); text-decoration: none; color: inherit;
  box-shadow: 0 4px 10px rgba(58, 46, 31, .08);
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.wtile:hover { transform: rotate(0deg) translateY(-2px); box-shadow: 0 8px 16px rgba(58, 46, 31, .16); border-color: var(--rule); }
.wtile .tape { top: -7px; left: 50%; margin-left: -25px; width: 50px; height: 14px; }
.wart {
  aspect-ratio: 5 / 6; position: relative; border: 1px solid #EDE2C6;
  background: repeating-linear-gradient(135deg, var(--s1, #FBF3DD) 0 6px, var(--s2, #F3E7C9) 6px 12px);
  display: flex; align-items: flex-end; justify-content: flex-end;
}
.wart.has-img { background: #fff; }
.wart img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.wsfx {
  position: absolute; top: 4px; right: 4px; background: var(--ink); color: var(--paper);
  font-weight: 800; font-size: 8px; padding: 1px 4px; border-radius: 2px; letter-spacing: .05em; z-index: 1;
}
.wfin { font-family: monospace; font-size: 8px; color: var(--ink-mute); background: rgba(255, 255, 255, .75); padding: 1px 4px; margin: 3px; }
.wmeta { display: flex; align-items: center; gap: 5px; }
.wnum { font-family: var(--font-hand); font-size: 14px; font-weight: 700; color: var(--gold); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.wloc {
  margin-left: auto; background: rgba(58, 46, 31, .06); border: 1px solid var(--chip-border);
  color: var(--nav-ink); font-weight: 800; font-size: 7.5px; padding: 1px 4px; flex: none;
}
.wname { font-weight: 800; font-size: 11px; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wsub { font-size: 9px; font-weight: 700; color: var(--ink-mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wwhen { font-family: var(--font-hand); font-size: 12.5px; color: var(--poppy); white-space: nowrap; }
.wgap {
  border: 2px dashed var(--chip-border); background: rgba(255, 255, 255, .45);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  min-height: 200px; padding: 8px; transform: rotate(var(--tilt, 0deg));
  text-decoration: none; transition: border-color .15s ease;
}
.wgap:hover { border-color: var(--poppy); }
.wgap-num { font-family: var(--font-serif); font-weight: 700; font-size: 20px; color: var(--chip-border); }
.wgap-name { font-weight: 800; font-size: 9px; color: var(--chip-border); text-align: center; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wgap-hunt { font-family: var(--font-hand); font-size: 14px; color: var(--poppy); transform: rotate(-2deg); }
.wall-more {
  border: 1.5px dashed var(--rule); padding: 8px 14px; margin-top: 12px;
  font-family: var(--font-hand); font-size: 17px; color: var(--ink-mute); transform: rotate(-.2deg);
}
.rail {
  width: 290px; flex: none; display: flex; flex-direction: column; gap: 12px;
  position: sticky; top: 0; max-height: 100vh; overflow-y: auto;
  padding: 12px 4px 14px;
}
.rail-card {
  position: relative; background: #fff; padding: 12px 15px;
  transform: rotate(var(--tilt, 0deg)); box-shadow: 0 8px 18px rgba(58, 46, 31, .14);
  display: flex; flex-direction: column; gap: 6px;
}
.rail-kicker { font-size: 10px; font-weight: 800; letter-spacing: .12em; color: var(--ink-mute); }
.rail-sub { font-family: var(--font-hand); font-size: 15px; color: var(--chip-border); margin-top: -2px; }
.sort-row { display: flex; gap: 6px; }
.sort-btn {
  flex: 1; text-align: center; background: #FDF7E7; border: 1.5px solid #EDE2C6;
  color: var(--ink); font-weight: 800; font-size: 10.5px; padding: 5px 8px;
  transition: border-color .15s ease;
}
.sort-btn:hover { border-color: var(--ink); }
.sort-btn.active { background: rgba(244, 164, 40, .35); border-color: var(--ink); }
.lang-pick {
  display: flex; align-items: center; gap: 8px; text-align: left;
  background: var(--tint, rgba(58, 46, 31, .13)); border: 1.5px solid transparent; padding: 6px 10px;
  transition: border-color .15s ease;
}
.lang-pick:hover, .set-pick:hover, .adv-pick:hover { border-color: var(--ink); }
.lang-pick.active, .set-pick.active, .adv-pick.active { border-color: var(--ink); }
.lp-label { font-weight: 800; font-size: 11px; color: var(--ink); white-space: nowrap; }
.lp-native { font-family: var(--font-hand); font-size: 15px; color: var(--ink-mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.lp-count { margin-left: auto; font-family: var(--font-hand); font-size: 15px; font-weight: 700; color: var(--gold); flex: none; }
.est-note { border: 1.5px dashed var(--rule); padding: 5px 9px; font-size: 9.5px; font-weight: 700; color: var(--ink-faint); line-height: 1.4; }
.set-pick {
  display: flex; align-items: center; gap: 7px; text-align: left;
  background: #FDF7E7; border: 1.5px solid #EDE2C6; padding: 6px 10px;
  transition: border-color .15s ease;
}
.set-pick.active { background: rgba(244, 164, 40, .35); }
.set-pick .wloc { margin-left: 0; }
.sp-names { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.sp-name { font-weight: 800; font-size: 10.5px; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sp-sub { font-size: 9px; font-weight: 700; color: var(--ink-mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.adv-pick {
  display: flex; flex-direction: column; gap: 4px; text-align: left;
  background: #FDF7E7; border: 1.5px solid #EDE2C6; padding: 7px 10px;
  transition: border-color .15s ease;
}
.adv-pick.active { background: rgba(244, 164, 40, .35); }
.adv-top { display: flex; align-items: center; gap: 7px; }
.adv-top .wloc { margin-left: 0; }
.adv-label { font-weight: 800; font-size: 10.5px; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.adv-flag { color: var(--poppy); font-size: 11px; font-weight: 800; flex: none; }
.adv-frac { margin-left: auto; font-family: var(--font-hand); font-size: 14.5px; font-weight: 700; color: var(--c, var(--sky)); flex: none; }
.adv-meter-row { display: flex; align-items: center; gap: 7px; }
.adv-meter { height: 5px; }
.adv-meter i { background: var(--c, var(--sky)); }
.adv-left { font-size: 9px; font-weight: 800; color: var(--c, var(--sky)); flex: none; }
.adv-toggle {
  border: 1.5px dashed var(--chip-border); background: none; padding: 5px 9px;
  font-weight: 800; font-size: 10px; color: var(--nav-ink); text-align: center; letter-spacing: .04em;
  transition: border-color .15s ease, background .15s ease;
}
.adv-toggle:hover { border-color: var(--ink); background: rgba(244, 164, 40, .15); }
.clear-btn {
  border: 2px dashed var(--poppy); color: var(--poppy); font-weight: 800; font-size: 11px;
  text-align: center; padding: 8px 10px; background: rgba(232, 84, 63, .05); transform: rotate(-.4deg);
  transition: background .15s ease;
}
.clear-btn:hover { background: rgba(232, 84, 63, .12); }
.album-foot { border-top: 2px dashed var(--rule); padding-top: 12px; display: flex; flex-direction: column; gap: 3px; }
.album-foot p { margin: 0; font-size: 10.5px; font-weight: 700; color: var(--ink-faint); line-height: 1.5; }

/* --- card SSR pre-hydration state ---------------------------------------------
   The crawlable article the edge function renders; card.js replaces it on
   hydrate. Styled as a museum index card so the moment before hydration reads
   as intentional — same white plate, tape, kickers as the final spread. */
.card-ssr {
  position: relative; background: #fff; padding: 30px 34px 36px;
  box-shadow: 0 12px 26px rgba(58, 46, 31, .18);
  display: grid; grid-template-columns: minmax(220px, 392px) 1fr; gap: 4px 40px;
}
.card-ssr::before {
  content: ''; position: absolute; top: -12px; left: 42px; width: 86px; height: 22px;
  background: var(--tape-sun); transform: rotate(-4deg);
}
.card-ssr > * { grid-column: 2; margin: 0; min-width: 0; }
/* The SSR scan mirrors the client's specimen markup exactly — same .spec-frame >
   .spec-art.has-img > <picture> > img.spec-img, so the server paint and the
   card.js re-render are pixel-identical (same 364px box, same AVIF asset) and the
   swap is invisible. Two earlier shapes MUST keep working: card pages are edge-
   cached for 4h and the ?v= on site.css is only a cache-buster (the path is
   stable), so freshly-deployed CSS is served to HTML up to 4h old. Dropping the
   bare `> img` rule stranded that cached markup with NO sizing rule and it
   rendered at intrinsic size, overflowing the viewport. Keep all three until the
   TTL has comfortably passed. */
.card-ssr > .spec-frame {
  grid-column: 1; grid-row: 1 / span 8; align-self: start;
  width: 392px; max-width: 100%;
}
.card-ssr > img,
.card-ssr > picture {
  grid-column: 1; grid-row: 1 / span 8; align-self: start;
  width: 100%; max-width: 340px; height: auto;
  box-shadow: 0 10px 22px rgba(58, 46, 31, .22);
}
.card-ssr > picture > img { display: block; width: 100%; height: auto; }
.card-ssr:not(:has(> .spec-frame)):not(:has(> picture)):not(:has(> img)) { display: block; max-width: 780px; }
.card-ssr h1 { font-family: var(--font-serif); font-size: 30px; line-height: 1.15; padding-top: 2px; }
.card-ssr h1 .spec-sub { margin-left: 10px; }
.card-ssr > p { margin: 10px 0 0; font-size: 13.5px; line-height: 1.6; color: var(--ink-soft); max-width: 62ch; }
.card-ssr section { margin-top: 22px; }
.card-ssr h2 {
  margin: 0 0 10px; display: flex; align-items: center; gap: 10px;
  font-size: 10px; font-weight: 800; letter-spacing: .14em;
  text-transform: uppercase; color: var(--ink-mute);
}
.card-ssr h2::after { content: ''; flex: 1; border-top: 1.5px dashed var(--rule); }
.card-ssr ul { list-style: none; margin: 0; padding: 0; columns: 2 240px; column-gap: 36px; }
.card-ssr li { font-size: 13px; font-weight: 600; color: var(--ink-soft); padding: 3px 0; break-inside: avoid; }
.card-ssr a { color: var(--sky); font-weight: 700; text-decoration: none; }
.card-ssr a:hover { text-decoration: underline; }
.card-ssr section p { margin: 6px 0 0; font-size: 13px; line-height: 1.55; color: var(--ink-soft); }

/* --- toast -------------------------------------------------------------------- */
.toast {
  position: fixed; left: 50%; bottom: 28px; z-index: 50;
  transform: translateX(-50%) rotate(-1deg) translateY(16px);
  background: var(--note-yellow); color: var(--ink);
  font-family: var(--font-hand); font-size: 21px;
  padding: 10px 20px; box-shadow: 0 10px 22px rgba(58, 46, 31, .28);
  opacity: 0; pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
}
.toast.show { opacity: 1; transform: translateX(-50%) rotate(-1deg) translateY(0); }

/* --- placeholder (stub) pages --------------------------------------------------- */
.stub { min-height: 60vh; display: grid; place-items: center; padding: 48px 36px 64px; }
.stub-note {
  position: relative; max-width: 520px; text-align: center;
  background: #fff; padding: 44px 40px 36px;
  transform: rotate(var(--tilt, -1deg));
  box-shadow: 0 12px 26px rgba(58, 46, 31, .25);
}
.stub-note .tape { top: -12px; left: 50%; margin-left: -45px; width: 90px; height: 24px; }
.stub-note h1 { margin: 0 0 10px; font-family: var(--font-hand); font-weight: 600; font-size: 36px; color: var(--ink); }
.stub-note p { margin: 0 0 22px; font-size: 15px; line-height: 1.55; color: var(--ink-soft); }

/* --- pokémon passport pages -------------------------------------------------------
   /pokemon/<slug>/ — identity header baked by tools/build-pokemon-pages.mjs,
   printings rendered by js/pokemon.js. Reuses the scrapbook vocabulary:
   lang-stamps for native names, panels per language, chip rows per set. */
.passport-head { display: flex; gap: 30px; align-items: flex-start; margin-bottom: 26px; }
.pp-photo {
  position: relative; flex: none; width: 230px; padding: 12px 12px 34px;
  background: #fff; box-shadow: 0 12px 28px rgba(58, 46, 31, .18);
  transform: rotate(-1.4deg);
}
.pp-photo .tape { top: -10px; left: 50%; margin-left: -40px; width: 80px; height: 22px; }
.pp-photo-art {
  aspect-ratio: 5 / 7; position: relative; border: 1.5px solid #EDE2C6;
  background: repeating-linear-gradient(135deg, #FBF3DD 0 9px, #F3E7C9 9px 18px);
}
.pp-photo-art.has-img { aspect-ratio: auto; border: none; background: none; }
.pp-photo-art img { display: block; width: 100%; height: auto; }
.pp-photo-art .spec-note {
  position: absolute; bottom: 8px; left: 8px;
  font-family: monospace; font-size: 10px; color: var(--ink-mute);
  background: rgba(255, 255, 255, .8); padding: 2px 6px;
}
.pp-photo-caption {
  position: absolute; left: 0; right: 0; bottom: 7px; text-align: center;
  font-family: var(--font-hand); font-size: 16px; color: var(--ink-mute);
}
.pp-id { flex: 1; min-width: 0; }
.pp-meter { margin: 10px 0 0; font-size: 14px; color: var(--ink-soft); font-weight: 600; }
.pp-meter b { color: var(--ink); font-weight: 800; }
.pp-stamps { margin-top: 14px; }
.pp-lang { margin-bottom: 16px; transform: rotate(var(--tilt, 0deg)); }
.pp-shelf-link { text-decoration: none; }
.pp-shelf-link:hover { text-decoration: underline; }
.pp-set-row {
  display: flex; gap: 8px 18px; align-items: baseline; flex-wrap: wrap;
  padding: 9px 0; border-bottom: 1.5px dotted #EDE2C6;
}
.pp-set-row:last-child { border-bottom: 0; }
.pp-set { flex: none; width: 300px; min-width: 0; display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.pp-set-link {
  font-family: var(--font-serif); font-size: 15px; font-weight: 700;
  color: var(--ink); text-decoration: none;
}
.pp-set-link:hover { color: var(--sky); text-decoration: underline; }
.pp-set-native { font-size: 12px; color: var(--ink-mute); }
.pp-set-id { font-size: 10px; font-weight: 800; letter-spacing: .06em; color: var(--ink-faint); }
.pp-chips { flex: 1; min-width: 260px; display: flex; flex-wrap: wrap; gap: 6px; }
.pp-card {
  display: inline-flex; align-items: baseline; gap: 6px; max-width: 100%;
  background: var(--chip-bg); border: 1.5px solid var(--chip-border);
  padding: 3px 9px; font-size: 11.5px; color: var(--ink-soft); text-decoration: none;
  transition: transform .12s ease, box-shadow .12s ease;
}
.pp-card:hover { transform: translateY(-1px) rotate(-.5deg); box-shadow: 0 3px 8px rgba(58, 46, 31, .14); border-color: var(--sky); }
.pp-card .num { font-weight: 800; color: var(--ink); white-space: nowrap; }
.pp-card .pname { font-weight: 700; }
.pp-card .native { color: var(--ink-mute); }
/* P1.3 signed-in paste-state: chips you own get the pasted look + a tick */
.pp-card.pp-owned { background: rgba(91, 140, 62, .12); border-color: #5B8C3E; }
.pp-card .pp-tick { font-weight: 800; color: #4A7332; }
.pp-mine {
  margin: 0 0 14px; font-family: var(--font-hand); font-size: 20px;
  color: #4A7332; transform: rotate(-.4deg);
}

/* card page → passport backlink (SSR paragraph + hydrated caption line) */
.spec-passport { font-family: var(--font-hand); font-size: 18px; margin-top: 2px; }
.spec-passport a, .card-ssr .pp-ssr-link a { color: var(--sky); text-decoration: none; }
.spec-passport a:hover, .card-ssr .pp-ssr-link a:hover { text-decoration: underline; }

/* --- responsive ------------------------------------------------------------------ */
@media (max-width: 1080px) {
  .hero { grid-template-columns: 1fr minmax(320px, 420px); padding: 32px 28px 36px 36px; }
}
@media (max-width: 1020px) {
  .fresh-grid { grid-template-columns: repeat(2, 1fr); }
  .dest-grid, .set-grid { grid-template-columns: repeat(2, 1fr); }
  .card-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 880px) {
  .topbar { padding: 18px 20px 4px; }
  .searchbox { order: 9; flex: 1 1 100%; max-width: none; }
  .hero { grid-template-columns: 1fr; gap: 40px; padding: 28px 20px 36px; }
  .collage { max-width: 440px; }
  .ledger-inner, .ledger-status, .ledger-noscript { padding-left: 20px; padding-right: 20px; }
  .page-main { padding-left: 20px; padding-right: 20px; }
  .page-head { flex-direction: column; align-items: stretch; }
  .page-meter { min-width: 0; }
  .pocket-grid { grid-template-columns: 1fr; }
  .panel-grid { grid-template-columns: 1fr; }
  .card-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .card-cols { flex-direction: column; }
  .specimen { width: 100%; max-width: 420px; margin: 0 auto; }
  .museum-grid { grid-template-columns: 1fr; }
  .card-ssr { display: block; padding: 24px 20px 28px; }
  .card-ssr > img,
  .card-ssr > picture { display: block; margin: 0 auto 18px; }
  .card-ssr > .spec-frame { width: 100%; max-width: 392px; margin: 0 auto 18px; }
  .album-head { flex-direction: column; }
  .mission-card { width: 100%; }
  .wall-row { flex-direction: column; }
  .rail { width: 100%; position: static; max-height: none; overflow: visible; }
  .passport-head { flex-direction: column; }
  .pp-photo { margin: 0 auto; }
  .pp-set { width: 100%; }
}
@media (max-width: 640px) {
  .dest-grid, .set-grid { grid-template-columns: 1fr; }
  .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
  .brand-tagline { display: none; }
  .nav { gap: 16px; }
}
@media (max-width: 560px) {
  body { padding: 0 12px; }
  .hero-sub { font-size: 16px; }
  .notes { flex-direction: column; }
}
@media (max-width: 460px) {
  .fresh-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* --- account (P1): topbar chip, sign-in page, album banner -------------------- */
.acct { display: inline-flex; align-items: center; gap: 10px; min-width: 0; }
.acct-email {
  font-weight: 700; font-size: 13px; color: var(--nav-ink);
  max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.signin-wrap { max-width: 620px; margin: 8px 0 40px; }
.signin-card {
  position: relative; background: var(--chip-bg);
  border: 2px solid var(--chip-border); border-radius: 6px;
  padding: 26px 26px 20px; box-shadow: 4px 4px 0 rgba(58, 46, 31, .12);
  transform: rotate(-.3deg);
}
.signin-card .tape { position: absolute; top: -12px; left: 34px; }
.signin-label {
  display: block; font-weight: 800; font-size: 12px; letter-spacing: .08em;
  color: var(--ink-mute); margin-bottom: 8px;
}
.signin-row { display: flex; gap: 12px; flex-wrap: wrap; }
.signin-input {
  flex: 1 1 220px; font: inherit; font-weight: 600; font-size: 15px;
  color: var(--ink); background: var(--cream);
  border: 2px solid var(--chip-border); border-radius: 4px; padding: 9px 12px;
}
.signin-input:focus { outline: none; border-color: var(--sky); }
.signin-msg {
  margin: 0 0 14px; font-weight: 700; font-size: 14px; color: var(--ink-soft);
  border-left: 3px solid var(--chip-border); padding-left: 10px;
}
.signin-msg.warn { color: #C4432F; border-left-color: var(--poppy); }
.signin-msg.good { color: #4A7332; border-left-color: var(--tape-leaf); }
.signin-sent-big { margin: 0 0 8px; font-weight: 800; font-size: 16px; color: var(--ink); }
.signin-sent-sub { margin: 0; font-size: 14px; color: var(--ink-soft); line-height: 1.55; }
.signin-again {
  font: inherit; font-weight: 800; font-size: 13px; color: var(--sky);
  background: none; border: none; padding: 0; cursor: pointer; text-decoration: underline;
}
.signin-dev {
  margin: 14px 0 0; font-size: 13px; font-weight: 700; color: var(--gold);
  border: 2px dashed var(--gold); border-radius: 4px; padding: 8px 10px; word-break: break-all;
}
.signin-foot { margin: 18px 0 0; font-size: 12.5px; color: var(--ink-mute); }

/* --- album, signed in: CSV rail card + first-visit empty state ------------- */
.csv-note { font-size: 10.5px; font-weight: 700; color: var(--ink-mute); line-height: 1.5; overflow-wrap: break-word; }
.album-empty {
  position: relative; background: #fff; padding: 30px 28px 26px; max-width: 520px;
  transform: rotate(var(--tilt, 0deg)); box-shadow: 0 8px 18px rgba(58, 46, 31, .14);
  display: flex; flex-direction: column; gap: 10px;
}
.album-empty .tape { top: -9px; left: 50%; margin-left: -32px; width: 64px; height: 18px; }
.ae-lead { margin: 0; font-family: var(--font-hand); font-size: 21px; font-weight: 600; color: var(--ink); line-height: 1.35; }
.ae-sub { margin: 0; font-size: 13px; font-weight: 600; color: var(--ink-soft); line-height: 1.55; }
.ae-link { font-weight: 800; font-size: 13px; color: var(--sky); text-decoration: underline; text-underline-offset: 3px; }

/* ============================== homepage: story ⇄ base camp ==============================
   The homepage is two pages in one document. html.pn-in (stamped pre-paint from
   the pn_in marker cookie — see index.html <head>) flips .home-b (signed-out
   brand story) ⇄ .home-dash (signed-in base camp). js/home.js strips the class
   if the marker turns out stale, so a wrong flip lasts one /api/me round-trip. */
html.pn-in .home-b { display: none !important; }
html:not(.pn-in) .home-dash { display: none !important; }

.home-section { padding: 8px 36px 34px; }
.home-section > .rule-row { margin-bottom: 16px; }
.home-section .leg { margin-top: 18px; }
.see-all { font-size: 12px; font-weight: 800; color: var(--sky); text-decoration: none; white-space: nowrap; }
.see-all:hover { text-decoration: underline; }
.pledge { margin: 0; font-size: 11.5px; font-weight: 800; letter-spacing: .06em; color: var(--gold); }

/* --- hero fan: five real prints of the same card --- */
.fan { position: relative; width: 100%; max-width: 560px; aspect-ratio: 560 / 470; margin: 0 auto; container-type: inline-size; }
.fan .polaroid { width: 31%; padding: 4.4% 4.4% 13%; }
.fan .polaroid figcaption { bottom: 2%; left: 8%; }
.fan .f1 { left: 0;   top: 20%; transform: rotate(-12deg); z-index: 1; }
.fan .f2 { left: 16%; top: 9%;  transform: rotate(-6deg);  z-index: 2; }
.fan .f3 { left: 33%; top: 4%;  transform: rotate(0deg);   z-index: 3; }
.fan .f4 { left: 50%; top: 9%;  transform: rotate(6deg);   z-index: 2; }
.fan .f5 { left: 66%; top: 20%; transform: rotate(12deg);  z-index: 1; }
.fan .polaroid .tape { left: 26%; }
/* f4/f5 sit under their left neighbors — nudge captions right so the
   language labels (the whole point of the fan) stay readable */
.fan .f4 figcaption { left: 36%; }
.fan .f5 figcaption { left: 30%; }
.fan-stamp {
  position: absolute; left: 42%; bottom: 4%; width: 19%; aspect-ratio: 1; z-index: 4;
  border: 3px double #B04A3A; border-radius: 50%;
  display: grid; place-items: center; text-align: center;
  transform: rotate(-11deg); opacity: .85;
  font-weight: 800; font-size: clamp(8px, 2.2cqi, 11px); color: #B04A3A;
  letter-spacing: .1em; line-height: 1.4; background: rgba(249, 239, 217, .6);
  animation: stamp-in .5s cubic-bezier(.2, 1.4, .4, 1) .55s backwards;
}
@keyframes stamp-in {
  from { opacity: 0; transform: rotate(-11deg) scale(1.6); }
  to   { opacity: .85; transform: rotate(-11deg) scale(1); }
}
@media (prefers-reduced-motion: reduce) { .fan-stamp { animation: none; } }
.fan-note { text-align: center; font-family: var(--font-hand); font-size: 19px; color: var(--ink-mute); transform: rotate(-.6deg); margin: 6px 0 0; }

/* --- destinations legs: small boarding-pass chips --- */
.dest-strip { display: flex; flex-wrap: wrap; gap: 12px 10px; padding-top: 8px; }
.dest-chip {
  position: relative;
  display: flex; flex-direction: column; gap: 2px; min-width: 128px;
  border: 2px solid var(--accent, var(--chip-border)); background: var(--chip-bg);
  padding: 8px 12px 7px; transform: rotate(var(--tilt, 0deg));
  text-decoration: none; color: inherit;
  transition: transform .15s ease, box-shadow .15s ease;
}
.dest-chip:hover { transform: rotate(0deg) translateY(-2px); box-shadow: 0 6px 14px rgba(58, 46, 31, .16); }
.dest-chip .dc-native { font-family: var(--font-serif); font-weight: 700; font-size: 16px; color: var(--ink); line-height: 1.1; }
.dest-chip .dc-eng { font-size: 9px; font-weight: 800; letter-spacing: .08em; color: var(--ink-mute); text-transform: uppercase; }
.dest-chip .dc-meta { font-size: 9px; font-weight: 700; color: var(--ink-mute); }

/* --- arrivals board: slim list rows, airport-board flavored --- */
.board { display: flex; flex-direction: column; padding-top: 4px; }
.board-row {
  display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap;
  padding: 9px 2px; border-bottom: 1.5px dashed #EDE2C6;
  text-decoration: none; color: inherit;
}
.board-row:hover { background: rgba(244, 164, 40, .1); }
.board-row:last-child { border-bottom: 0; }
.board-date { flex: none; font-size: 10px; font-weight: 800; color: var(--ink-mute); letter-spacing: .06em; width: 92px; }
.board-loc {
  flex: none; background: rgba(58, 46, 31, .06); border: 1px solid var(--chip-border);
  color: var(--nav-ink); font-weight: 800; font-size: 9px; padding: 1.5px 6px;
}
.board-name { font-family: var(--font-serif); font-weight: 700; font-size: 16px; color: var(--ink); }
.board-sub { font-size: 11px; font-weight: 700; color: var(--ink-mute); }
.board-status { margin-left: auto; font-family: var(--font-hand); font-size: 16px; white-space: nowrap; }
.board-status.landed { color: #4A7332; }
.board-status.docking { color: var(--poppy); }

/* --- passport teaser plaque --- */
.passport-panel { display: flex; gap: 26px; align-items: flex-start; background: #fff; padding: 22px 26px; box-shadow: 0 10px 22px rgba(58,46,31,.16); transform: rotate(-.3deg); position: relative; }
.passport-panel .tape { position: absolute; top: -10px; left: 40px; width: 80px; height: 21px; }
.pp-mini { flex: none; width: 150px; background: #fff; border: 1.5px solid #EDE2C6; padding: 8px 8px 24px; transform: rotate(-2deg); box-shadow: 0 8px 18px rgba(58,46,31,.2); position: relative; }
.pp-mini img { width: 100%; height: auto; display: block; }
.pp-mini figcaption { position: absolute; bottom: 3px; left: 10px; font-family: var(--font-hand); font-size: 14px; color: var(--ink-soft); }
.pp-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.pp-title { margin: 0; font-family: var(--font-serif); font-size: 26px; font-weight: 700; color: var(--ink); }
.pp-title .spec-sub { font-family: var(--font-hand); font-size: 20px; color: var(--ink-mute); margin-left: 8px; }
.pp-stats { display: flex; gap: 22px; flex-wrap: wrap; }
.pp-stat b { font-family: var(--font-serif); font-size: 24px; font-weight: 700; color: var(--poppy); display: block; line-height: 1.05; }
.pp-stat span { font-size: 9.5px; font-weight: 800; letter-spacing: .1em; color: var(--ink-mute); }
.pp-links { display: flex; gap: 16px; align-items: baseline; flex-wrap: wrap; }
.pp-sub { font-size: 14px; max-width: 56ch; }
@media (max-width: 700px) { .passport-panel { flex-direction: column; } }

/* --- base camp: welcome strip --- */
.welcome { display: flex; gap: 24px; align-items: flex-start; padding: 30px 36px 8px; flex-wrap: wrap; }
.welcome-copy { flex: 1; min-width: 280px; display: flex; flex-direction: column; gap: 10px; }
.welcome h1 { margin: 0; font-family: var(--font-serif); font-weight: 700; font-size: clamp(30px, 3.4vw, 42px); line-height: 1.1; color: var(--ink); }
.welcome-scribble { margin: 0; font-family: var(--font-hand); font-size: 21px; color: var(--sky); transform: rotate(-1deg); }
.welcome .mission-card { width: 360px; }
@media (max-width: 880px) { .welcome { padding: 24px 20px 8px; } .welcome .mission-card { width: 100%; } }

/* --- base camp: resume / closest-to-full tiles --- */
.resume-grid, .finish-grid, .action-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px 16px; padding-top: 10px; }
@media (max-width: 1020px) { .resume-grid, .finish-grid, .action-grid { grid-template-columns: 1fr; } }
.resume-tile {
  position: relative; background: #fff; padding: 14px 16px;
  transform: rotate(var(--tilt, 0deg));
  box-shadow: 0 10px 22px rgba(58, 46, 31, .18);
  display: flex; flex-direction: column; gap: 8px;
  transition: transform .15s ease, box-shadow .15s ease;
}
.resume-tile:hover { transform: rotate(0deg) translateY(-3px); box-shadow: 0 14px 28px rgba(58, 46, 31, .24); }
.resume-tile .tape { position: absolute; top: -10px; left: 50%; margin-left: -38px; width: 76px; height: 20px; }
.resume-top { display: flex; align-items: center; gap: 8px; }
.resume-when { margin-left: auto; font-family: var(--font-hand); font-size: 16px; color: var(--poppy); white-space: nowrap; }
.resume-name { font-weight: 800; font-size: 16px; color: var(--ink); line-height: 1.15; }
.resume-native { font-family: var(--font-hand); font-size: 17px; color: var(--gold); font-weight: 600; }
.resume-meta { font-size: 11px; font-weight: 700; color: var(--ink-mute); }
a.resume-cta { align-self: flex-start; margin-top: 4px; text-decoration: none; display: inline-block; }

/* --- base camp: 16 labeled route meters (identity by text, never color) --- */
.routes-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 40px; padding-top: 8px; }
@media (max-width: 880px) { .routes-grid { grid-template-columns: 1fr; } }
.route-row {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 0; border-bottom: 1.5px dashed #EDE2C6;
  text-decoration: none; color: inherit;
}
.route-row:hover { background: rgba(244, 164, 40, .08); }
.route-label { flex: none; width: 118px; display: flex; flex-direction: column; }
.route-label b { font-weight: 800; font-size: 12px; color: var(--ink); }
.route-label span { font-size: 10px; font-weight: 700; color: var(--ink-mute); }
.route-count { flex: none; width: 118px; font-size: 10.5px; font-weight: 700; color: var(--ink-soft); text-align: right; font-variant-numeric: tabular-nums; }
.route-row .meter { height: 7px; }
.route-pct { flex: none; width: 42px; font-family: var(--font-hand); font-size: 16px; font-weight: 700; color: var(--poppy); text-align: right; }

/* --- base camp: toolkit cards --- */
.action-card {
  position: relative; background: var(--chip-bg); border: 1.5px solid #E8DCC2; border-radius: 6px;
  padding: 16px 18px; display: flex; flex-direction: column; gap: 7px;
}
.action-card h3 { margin: 0; font-size: 14px; font-weight: 800; color: var(--ink); }
.action-card p { margin: 0; font-size: 12px; font-weight: 600; color: var(--ink-soft); line-height: 1.5; }
.action-link { font-size: 12px; font-weight: 800; color: var(--sky); text-decoration: none; margin-top: auto; background: none; border: none; padding: 0; text-align: left; cursor: pointer; font-family: inherit; }
.action-link:hover { text-decoration: underline; }

/* --- base camp: wall strip (denser than /album) --- */
.dash-wall { padding-top: 10px; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); }

/* --- footer (site-wide component, homepage first) --- */
.footer {
  margin-top: 18px; padding: 26px 36px 42px;
  border-top: 2px dashed var(--rule);
  display: flex; gap: 30px 56px; flex-wrap: wrap; align-items: flex-start;
}
.footer-brand { display: flex; flex-direction: column; gap: 8px; max-width: 300px; }
.footer-brand .brand-name { font-size: 19px; }
.footer-note { font-size: 11px; font-weight: 600; color: var(--ink-faint); line-height: 1.6; margin: 0; }
.footer-col { display: flex; flex-direction: column; gap: 7px; min-width: 130px; }
.footer-kicker { font-size: 10px; font-weight: 800; letter-spacing: .13em; color: var(--ink-mute); text-transform: uppercase; margin-bottom: 3px; }
.footer-col a { font-size: 12.5px; font-weight: 700; color: var(--nav-ink); text-decoration: none; }
.footer-col a:hover { color: var(--ink); text-decoration: underline; }
.footer-scribble { font-family: var(--font-hand); font-size: 18px; color: var(--gold); transform: rotate(-2deg); margin-left: auto; align-self: center; }
@media (max-width: 700px) { .footer { padding: 22px 20px 34px; gap: 22px 32px; } .footer-scribble { margin-left: 0; } }

/* inside .home-section the ledger blocks inherit the section's padding —
   zero their own (they were built for the old full-bleed #ledger strip) */
.home-section .ledger-inner, .home-section .ledger-status, .home-section .ledger-noscript { padding-left: 0; padding-right: 0; padding-bottom: 10px; }
.home-section .ledger-inner { padding-top: 0; }
@media (max-width: 880px) {
  .home-section { padding: 8px 20px 30px; }
  .welcome { padding-top: 24px; }
  .fan { max-width: 440px; }
  .footer { padding-left: 20px; padding-right: 20px; }
}
