.start { text-align: center; padding: 28px 18px; }
.start .gate-big { font-size: 32px; margin: 4px 0 6px; }

.hero {
  display: grid; grid-template-columns: auto 1fr auto; gap: 4px 16px; align-items: end;
  border: var(--o); border-radius: 12px; box-shadow: 4px 4px 0 var(--ink); padding: 0 18px 16px; margin-bottom: 18px;
  background: var(--paper-2) var(--grain); overflow: hidden; position: relative;
}
.hero-banner { grid-column: 1 / -1; height: 128px; margin: 0 -18px; border-bottom: 1px solid var(--ink); }
.hero-av { margin-top: -46px; }
.av-big { width: 84px; height: 84px; font-size: 44px; border-width: 4px; background: #fffdf6; }
.hero h1 { margin: 6px 0 0; font-size: 32px; overflow-wrap: anywhere; }
.hero-identity { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px; }
.hero-identity .btn { font-size: 13px; padding: 6px 10px; min-height: 36px; }
.hero-text, .hero-streak { color: var(--ink); }
.hero-title { margin: 0 0 8px; font-family: var(--font-hand); font-size: 20px; }
.xp { display: flex; align-items: center; gap: 10px; font-family: var(--font-hand); font-size: 16px; }
.xp-bar { flex: 1; height: 16px; border: 2.5px solid #1e1a16; border-radius: 12px; background: #fffdf6; overflow: hidden; }
.xp-bar i { display: block; height: 100%; background: var(--hi); border-right: 2.5px solid #1e1a16; transition: width 0.6s cubic-bezier(.2, 1.4, .5, 1); }
.hero-streak { text-align: center; font-family: var(--font-hand); line-height: 1; }
.hero-streak b { display: block; font-family: var(--font-display); font-size: 44px; font-weight: 400; }
.hero-streak small { display: block; margin-top: 4px; font-size: 15px; }

.daily { display: grid; grid-template-columns: 1fr 1.3fr; gap: 16px; }
.daily .card { margin: 0 0 16px; text-align: center; }
.btn.big { font-size: 14px; padding: 13px 24px; }
.box-stage { width: 220px; height: 200px; margin: 0 auto 6px; display: grid; place-items: center; }
.box-stage canvas { display: block; }
.box-flat { font-size: 96px; filter: drop-shadow(3px 3px 0 var(--ink)); }
.box-stage.has3d .box-flat { display: none; }
.box-flat.shake { animation: wobble 0.5s 2; }
@keyframes wobble { 25% { transform: rotate(-12deg); } 75% { transform: rotate(12deg); } }
.reveal {
  margin: 12px auto 0; max-width: 300px; padding: 14px; border: var(--o); border-radius: 12px;
  box-shadow: 4px 4px 0 var(--ink); background: var(--paper);
  animation: pop 0.45s cubic-bezier(.2, 1.7, .5, 1);
}
@keyframes pop { from { transform: scale(0.6) rotate(-6deg); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .reveal, .box-flat.shake { animation: none; } }
.reveal .rarity { display: inline-block; padding: 0 10px; border: var(--o); border-radius: 12px; background: var(--r); color: #1e1a16; font-family: var(--font-hand); font-size: 16px; text-transform: capitalize; }
.reveal b { display: block; font-family: var(--font-display); font-weight: 900; font-size: 24px; margin: 6px 0; }
.odds { margin-top: 12px; text-align: left; }
.odds summary { font-family: var(--font-hand); font-size: 18px; cursor: pointer; }
.odds table { width: 100%; border-collapse: collapse; margin: 6px 0; font-size: 15px; }
.odds td { padding: 3px 0; border-bottom: 1.5px dashed var(--rule); }
.odds td:last-child { text-align: right; font-weight: 700; }
.odds i { display: inline-block; width: 11px; height: 11px; border: 1.5px solid var(--ink); border-radius: 4px; background: var(--r); margin-right: 6px; vertical-align: -1px; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.locker { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.item {
  border: var(--o); border-radius: 12px; padding: 10px; background: var(--paper);
  box-shadow: 4px 4px 0 var(--ink); display: grid; gap: 6px; justify-items: center; text-align: center; min-height: 136px;
}
.item.locked { opacity: 0.55; box-shadow: none; border-style: dashed; }
.item.on { background: color-mix(in srgb, var(--hi) 35%, var(--paper)); }
.item .prev { width: 100%; height: 42px; display: grid; place-items: center; border-radius: 12px; font-family: var(--font-hand); font-size: 20px; }
.item .prev.banner { border: var(--o); }
.item b { font-family: var(--font-hand); font-weight: 400; font-size: 17px; line-height: 1.1; }
.item small { font-size: 12px; color: var(--ink-soft); }
.item .btn { font-size: 15px; padding: 4px 10px; }

/* ---- 3D Avatar Showcase Stage ---- */
.av-stage-box {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 14px 18px;
  margin: 10px 0 16px;
  border: var(--o);
  border-radius: 16px;
  background: var(--paper) var(--grain);
  box-shadow: 4px 4px 0 var(--ink);
}

:root[data-theme="dark"] .av-stage-box {
  border-color: rgba(255, 255, 255, 0.16);
  box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.45);
}

.av-stage-col {
  flex-shrink: 0;
}

.av-stage {
  position: relative;
  width: 110px;
  height: 110px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(229, 184, 92, 0.28) 0%, rgba(30, 26, 22, 0.08) 72%, transparent 100%);
  border: 2.5px dashed #dfb15b;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: grab;
  touch-action: none;
  overflow: visible;
  transition: transform 0.25s var(--spring);
}

:root[data-theme="dark"] .av-stage {
  background: radial-gradient(circle, rgba(229, 184, 92, 0.2) 0%, rgba(255, 255, 255, 0.04) 72%, transparent 100%);
  border-color: #dfb15b;
}

.av-stage:active {
  cursor: grabbing;
}

.av-stage canvas {
  width: 100%;
  height: 100%;
  display: block;
  border-radius: 50%;
  pointer-events: auto;
}

.av-stage-flat {
  font-size: 52px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.av-stage-flat img {
  width: 88px;
  height: 88px;
  object-fit: contain;
}

.av-stage.has3d .av-stage-flat {
  display: none;
}

.av-stage-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.av-stage-head {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.av-stage-name {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.15;
}

.av-stage-pill {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 12px;
  font-family: var(--font-hand);
  font-size: 14px;
  font-weight: 700;
  border: 1.5px solid var(--ink);
  background: var(--paper-2);
  color: var(--ink);
  line-height: 1.2;
}

.av-stage-pill.equipped {
  background: #d4f7dc;
  color: #155724;
  border-color: #155724;
}

:root[data-theme="dark"] .av-stage-pill.equipped {
  background: #155724;
  color: #d4f7dc;
  border-color: #28a745;
}

.av-stage-pill.locked {
  background: color-mix(in srgb, var(--rule) 50%, var(--paper));
  border-style: dashed;
  color: var(--ink-soft);
}

.av-stage-desc {
  margin: 0;
  font-size: 14px;
  color: var(--ink-soft);
  line-height: 1.35;
}

.av-stage-actions {
  margin-top: 4px;
  display: flex;
  gap: 8px;
}

.av-stage-actions .btn {
  padding: 5px 14px;
  font-size: 14px;
  font-weight: 700;
}

.av3d-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 10px; margin: 8px 0 14px; }
.av3d-card {
  display: grid; justify-items: center; gap: 2px; padding: 8px 6px 10px; border: var(--o); border-radius: 12px;
  background: var(--paper); box-shadow: 4px 4px 0 var(--ink); color: var(--ink);
  cursor: pointer; transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.av3d-card:hover {
  transform: translateY(-2px);
}
.av3d-card.preview-active {
  outline: 2.5px solid var(--red, #d64045);
  outline-offset: 2px;
  transform: translateY(-2px);
}
.av3d-canvas-wrap {
  width: 88px;
  height: 88px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.av3d-canvas-wrap canvas {
  width: 88px;
  height: 88px;
  display: block;
  pointer-events: none;
}
.av3d-canvas-wrap.has3d .av3d-fallback {
  display: none;
}
.av3d-card img { width: 88px; height: 88px; object-fit: contain; }
.av3d-card b { font-family: var(--font-hand); font-weight: 400; font-size: 17px; line-height: 1.1; text-align: center; }
.av3d-card small { font-size: 12px; color: var(--ink-soft); }
.av3d-card[aria-pressed="true"] { background: color-mix(in srgb, var(--hi) 40%, var(--paper)); }
.av3d-card.locked { opacity: 0.65; box-shadow: none; border-style: dashed; }
.av3d-card.locked img { filter: grayscale(1) brightness(0.6); }
.av3d-card.locked .av3d-canvas-wrap canvas { filter: grayscale(1) brightness(0.7); opacity: 0.75; }
.emoji-label { margin: 6px 0; }
.emoji-row { display: flex; flex-wrap: wrap; gap: 8px; }
.emoji-row button { width: 46px; height: 46px; font-size: 25px; border: var(--o); border-radius: 12px; background: var(--paper); cursor: pointer; transition: transform 0.15s ease; }
.emoji-row button:hover { transform: translateY(-2px); }
.emoji-row button[aria-pressed="true"] { background: var(--hi); box-shadow: 4px 4px 0 var(--ink); }
.av-big.av3d { padding: 0; overflow: hidden; background: #fffdf6; }
.av-big.av3d canvas, .av-big.av3d img { width: 100%; height: 100%; display: block; }

.milestones { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.milestones li { display: flex; justify-content: space-between; gap: 10px; padding: 7px 10px; border: var(--o); border-radius: 12px; font-family: var(--font-hand); font-size: 17px; }
.milestones li.done { background: color-mix(in srgb, var(--age-0) 30%, var(--paper)); }

@media (max-width: 680px) {
  .hero { grid-template-columns: auto 1fr; }
  .hero-banner { height: 104px; }
  .hero-streak { grid-column: 1 / -1; display: flex; gap: 8px; align-items: baseline; justify-content: center; }
  .hero-streak b { font-size: 34px; }
  .daily { grid-template-columns: 1fr; }
  .av-big { width: 68px; height: 68px; font-size: 36px; }
}

.returning { margin-top: 22px; padding-top: 16px; border-top: 2px dashed var(--rule); display: grid; gap: 8px; justify-items: center; }
.recover-form { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.recover-form input { width: min(290px, 70vw); font-family: ui-monospace, monospace; text-transform: uppercase; }
.keep-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 10px 0; }
.keep-grid > div { border: 2px dashed var(--rule); border-radius: 12px; padding: 12px; }
.keep-grid .display { font-size: 20px; }
.keep.saved { background: color-mix(in srgb, var(--age-0) 14%, var(--paper-2)); }
.code-box { margin-top: 10px; padding: 10px; border: var(--o); border-radius: 12px; background: var(--paper); text-align: center; }
.code-box code { display: block; font-size: 18px; font-weight: 700; letter-spacing: 0.04em; word-break: break-all; margin: 4px 0 8px; }
.acct-more summary { font-family: var(--font-hand); font-size: 18px; cursor: pointer; }
.acct-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.acct-msg { min-height: 1.2em; margin: 8px 0 0; }
@media (max-width: 680px) { .keep-grid { grid-template-columns: 1fr; } }
.code-actions { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }

/* Titles: one tag showing exactly how it reads under your name (no duplicate label). */
.item .prev.title-tag {
  height: auto; min-height: 54px; display: grid; align-content: center; gap: 2px; padding: 6px 4px;
  font-family: var(--font-hand); font-size: 17px; line-height: 1.15; overflow-wrap: anywhere;
}
.item .prev.title-tag small { font-size: 12px; font-family: var(--font-body); font-weight: 700; color: var(--ink-soft); }

.item .prev.banner { padding: 0; overflow: hidden; height: 52px; }
.item .prev.banner svg { width: 100%; height: 100%; }

/* ---- reminders ---- */
.notif-grid { display: grid; gap: 12px; margin: 12px 0 4px; }
.notif { display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: start; cursor: pointer; }
.notif input { margin-top: 4px; width: 20px; height: 20px; accent-color: var(--red); }
.notifications .actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
@media (max-width: 720px) { .notifications .actions .btn { flex: 1 1 0; justify-content: center; } }

/* ---- St. Louis Bar Passport (Simple & Cute Booklet) ----
   Styled as a charming pocket passport booklet with cute 3D Arch emblem,
   guilloche watermark, and open stamp pages for collectible bar stamps. */
.passport-card {
  padding: 0 0 16px;
  overflow: hidden;
  background: var(--paper-2) var(--grain);
  border: 2.5px solid var(--ink);
  border-radius: 16px;
  box-shadow: 4px 5px 0 var(--ink);
}

:root[data-theme="dark"] .passport-card {
  border-color: rgba(255, 255, 255, 0.16);
  box-shadow: 4px 5px 0 rgba(0, 0, 0, 0.45);
}

.passport-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  background: linear-gradient(135deg, #1b263b 0%, #111827 100%);
  color: #fffdf6;
  border-bottom: 2.5px solid var(--ink);
}

:root[data-theme="dark"] .passport-header {
  background: linear-gradient(135deg, #161f30 0%, #0d121c 100%);
}

.passport-seal {
  flex-shrink: 0;
  color: #e5b85c;
  display: flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(1px 1px 0 rgba(0, 0, 0, 0.45));
}

.passport-seal-svg {
  display: block;
}

.passport-title-wrap {
  flex: 1;
  min-width: 0;
}

.passport-kicker {
  display: block;
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: #e5b85c;
  text-transform: uppercase;
  line-height: 1.2;
}

.passport-title {
  margin: 2px 0 1px;
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 900;
  color: #fffdf6;
  line-height: 1.1;
  letter-spacing: 0.02em;
}

.passport-sub {
  display: block;
  font-family: var(--font-body);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: #b0bfd4;
  text-transform: uppercase;
}

.passport-badge {
  flex-shrink: 0;
}

.passport-page-tag {
  display: inline-block;
  padding: 4px 8px;
  border: 1.5px solid #e5b85c;
  border-radius: 4px;
  color: #e5b85c;
  font-family: var(--font-body);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: rgba(229, 184, 92, 0.14);
}

/* Metadata & 3D Arch Row */
.passport-meta-box {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 18px 12px;
}

.passport-arch3d-col {
  flex-shrink: 0;
}

.arch3d-stage {
  position: relative;
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(229, 184, 92, 0.22) 0%, rgba(27, 38, 59, 0.1) 70%, transparent 100%);
  border: 2px dashed #e5b85c;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: grab;
  transition: transform 0.25s var(--spring);
}

.arch3d-stage:active {
  cursor: grabbing;
  transform: scale(0.96);
}

.arch3d-stage canvas {
  width: 100% !important;
  height: 100% !important;
  border-radius: 50%;
  display: block;
}

.arch3d-flat {
  font-size: 38px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.arch3d-stage.has3d .arch3d-flat {
  display: none;
}

.passport-progress-col {
  flex: 1;
  min-width: 0;
}

.passport-stats-bar {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}

.book-count {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}

.book-count b {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 38px;
  line-height: 1;
}

.book-count span {
  font-family: var(--font-hand);
  font-size: 19px;
  color: var(--ink-soft);
}

.book-rank {
  font-size: 13px;
  font-weight: 700;
  background: color-mix(in srgb, var(--hi) 25%, var(--paper));
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  padding: 3px 12px;
}

.book-bar {
  height: 14px;
  border: 2.5px solid var(--ink);
  border-radius: 999px;
  background: #fffdf6;
  overflow: hidden;
  margin: 6px 0 8px;
}

:root[data-theme="dark"] .book-bar {
  background: #2b251f;
}

.book-bar i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #d49a2a 0%, #f3c246 100%);
  border-right: 2.5px solid var(--ink);
  transition: width 0.6s cubic-bezier(0.2, 1.4, 0.5, 1);
}

.passport-progress-col p {
  margin: 0;
}

/* Open visa pages container with Saint Louis backdrop */
.passport-pages {
  position: relative;
  margin: 0 16px;
  border: 2px solid var(--rule);
  border-radius: 12px;
  background: color-mix(in srgb, var(--paper) 95%, #fff);
  min-height: 280px;
  overflow: hidden;
  box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.04);
  padding: 22px 18px;
}

:root[data-theme="dark"] .passport-pages {
  background: color-mix(in srgb, var(--paper-2) 90%, #000);
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: inset 0 2px 14px rgba(0, 0, 0, 0.45);
}

/* Center spine crease of passport spread */
.passport-pages::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 2px;
  transform: translateX(-50%);
  background: linear-gradient(to bottom, transparent, rgba(30, 26, 22, 0.08) 15%, rgba(30, 26, 22, 0.08) 85%, transparent);
  pointer-events: none;
  z-index: 1;
}

:root[data-theme="dark"] .passport-pages::before {
  background: linear-gradient(to bottom, transparent, rgba(255, 255, 255, 0.06) 15%, rgba(255, 255, 255, 0.06) 85%, transparent);
}

.passport-backdrop {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.passport-backdrop-svg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  color: var(--ink);
  opacity: 0.14;
}

:root[data-theme="dark"] .passport-backdrop-svg {
  opacity: 0.2;
  color: #dfb15b;
}

#book {
  position: relative;
  z-index: 2;
}

.passport-scroll-shelf {
  position: relative;
  z-index: 2;
  max-height: 460px;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  padding-right: 4px;
  scrollbar-width: thin;
  scrollbar-color: color-mix(in srgb, var(--ink) 25%, transparent) rgba(0, 0, 0, 0.04);
}

.passport-scroll-shelf::-webkit-scrollbar {
  width: 6px;
}
.passport-scroll-shelf::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.04);
  border-radius: 999px;
}
.passport-scroll-shelf::-webkit-scrollbar-thumb {
  background: color-mix(in srgb, var(--ink) 25%, transparent);
  border-radius: 999px;
}
.passport-scroll-shelf::-webkit-scrollbar-thumb:hover {
  background: color-mix(in srgb, var(--ink) 45%, transparent);
}

.passport-scroll-shelf.is-expanded {
  max-height: none;
  overflow-y: visible;
}

.passport-scroll-footer {
  margin-top: 14px;
  display: flex;
  justify-content: center;
  position: relative;
  z-index: 2;
}

.passport-expand-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: color-mix(in srgb, var(--paper-2) 92%, var(--paper));
  border: 1.5px solid var(--rule);
  color: var(--ink);
  padding: 6px 16px;
  border-radius: 999px;
  font-family: var(--font-hand);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.passport-expand-btn:hover {
  background: var(--paper);
  border-color: var(--ink);
  transform: translateY(-1px);
}

.passport-expand-btn .expand-icon {
  font-size: 14px;
  line-height: 1;
  color: var(--ink-soft);
}

:root[data-theme="dark"] .passport-expand-btn {
  background: color-mix(in srgb, var(--paper-2) 90%, #000);
  border-color: rgba(255, 255, 255, 0.18);
  color: var(--ink);
}

.passport-empty {
  text-align: center;
  padding: 36px 16px;
  background: transparent !important;
  display: grid;
  gap: 8px;
  justify-items: center;
}

.passport-empty .mark {
  font-size: 50px;
  line-height: 1;
}

.passport-empty b {
  font-family: var(--font-display);
  font-size: 22px;
}

.passport-empty span {
  max-width: 44ch;
  color: var(--ink-soft);
  font-size: 15px;
}

.book-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 16px 18px 4px;
}

.stampbook .skel {
  display: block;
}

#book-msg {
  margin: 8px 18px 0;
}

@media (prefers-reduced-motion: reduce) {
  .book-bar i {
    transition: none;
  }
}

/* ================= Mobile Layout ================= */
@media (max-width: 680px) {
  .passport-header {
    padding: 12px 14px;
    gap: 10px;
  }
  .passport-seal-svg {
    width: 26px;
    height: 26px;
  }
  .passport-title {
    font-size: 21px;
  }
  .passport-badge {
    display: none;
  }
  .passport-meta-box {
    padding: 12px 14px 8px;
    gap: 12px;
  }
  .arch3d-stage {
    width: 74px;
    height: 74px;
  }
  .book-count b {
    font-size: 28px;
  }
  .book-count span {
    font-size: 15px;
  }
  .passport-pages {
    margin: 0 10px;
    padding: 14px 8px 16px;
    min-height: 200px;
  }
  /* Remove center crease on small screens to prevent slicing through stamps */
  .passport-pages::before {
    display: none;
  }
  .passport-scroll-shelf {
    max-height: 330px;
    padding: 2px 2px 8px;
    overscroll-behavior: contain;
  }
  .passport-scroll-shelf.is-expanded {
    max-height: none;
  }
  /* 2 columns on mobile so stamps are ~150-170px wide instead of cramped 105px 3-column squish */
  .stamp-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 16px 10px !important;
    justify-items: center;
  }
  .stamp {
    max-width: 170px;
    width: 100%;
  }
  .stamp-face {
    padding: 8px 10px;
  }
  .stamp-name {
    font-size: clamp(12px, 3.5vw, 14px) !important;
    line-height: 1.15 !important;
    word-break: normal !important;
    overflow-wrap: break-word !important;
    max-width: 96% !important;
  }
  .stamp-top, .stamp-date {
    font-size: 8.5px !important;
    letter-spacing: 0.16em !important;
  }
  .stamp-hood {
    font-size: 9px !important;
    max-width: 92% !important;
  }
  .stamp-line {
    font-size: 13px !important;
    line-height: 1.2 !important;
    max-width: 22ch !important;
  }
  .stamp-badge {
    font-size: 7.5px !important;
    padding: 1px 6px !important;
    bottom: 5px !important;
  }
  .book-actions {
    margin: 14px 10px 4px;
  }
  .book-actions .btn {
    flex: 1 1 0;
    justify-content: center;
  }
  #book-msg {
    margin: 8px 10px 0;
  }
  .av-stage-box {
    padding: 12px 14px;
    gap: 14px;
  }
  .av-stage {
    width: 92px;
    height: 92px;
  }
  .av-stage-name {
    font-size: 19px;
  }
}

@media (max-width: 460px) {
  .av-stage-box {
    flex-direction: column;
    text-align: center;
    gap: 10px;
  }
  .av-stage-head {
    justify-content: center;
  }
  .av-stage-actions {
    justify-content: center;
  }
}


.review-thread { padding:1rem 0; border-bottom:1px solid var(--line); }
.review-thread summary { cursor:pointer; font-weight:bold; }
.review-thread p { white-space:pre-wrap; overflow-wrap:anywhere; }
.review-thread textarea { display:block; width:100%; min-height:5rem; margin:.6rem 0; font:inherit; }

.passport-collections { padding:0 24px 24px; }
.collection-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(190px,1fr)); gap:12px; }
.collection-goal { padding:16px; border:1px dashed var(--ink-soft); border-radius:14px; background:var(--paper); color:var(--ink); }
.collection-goal p { font-size:12px; margin:8px 0; }
.collection-goal progress { display:block; width:100%; height:7px; accent-color:#197a72; margin:12px 0 6px; }
.collection-goal small { font-size:11px; }
.collection-goal.unlocked { border:2px solid #197a72; }
.collection-seal { display:block; margin-top:12px; padding:8px; border:2px double currentColor; border-radius:50%; text-align:center; font-size:10px; letter-spacing:.12em; color:#197a72; }
@media(max-width:420px) { .passport-collections { padding:0 16px 16px; } }

.profile-awards { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,240px),1fr)); gap:14px; list-style:none; margin:20px 0 0; padding:0; }
.profile-award { display:flex; flex-direction:column; align-items:flex-start; gap:10px; padding:20px; border:1px solid var(--line); border-radius:14px; background:var(--paper-2); }
.profile-award-rank { font-size:11px; color:var(--warn-ink); letter-spacing:.04em; }
.profile-award h3 { margin:0; font-family:var(--font-display); font-size:22px; line-height:1.2; overflow-wrap:anywhere; }
.profile-award p { margin:0; color:var(--ink-soft); font-size:14px; line-height:1.55; }
.profile-award small { margin-top:auto; padding-top:14px; border-top:1px solid var(--line); width:100%; font-size:11px; color:var(--ink-soft); }
