@font-face {
  font-family: 'Baloo 2';
  font-style: normal;
  font-weight: 500 800;
  font-display: swap;
  src: url(/fonts/baloo-2-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url(/fonts/manrope-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 500 700;
  font-display: swap;
  src: url(/fonts/jetbrains-mono-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ─── variables.css ──────────────────────────────────────────────
   CSS custom properties (:root), dark mode variable overrides
   ([data-theme="dark"]), and the theme toggle button (.btn-theme).

   Design system: "Toy Shelf" — Adopt Me's own chunky, saturated,
   3D-plastic-toy visual language, executed with real confidence.
   Pink and purple are solid color-blocked fills, not pastel tints;
   chunky rounded-square shapes carry genuine depth via a solid-color
   offset shadow (the toy/game-UI "button lip"), not blurred glows.
   The two sources are two solid colored tabs, directly, no metaphor.
   ─────────────────────────────────────────────────────────────── */

/* ─── Variables ─────────────────────────────────────────────── */
:root {
  --bg:           #fef6fa;
  --bg-panel:     #ffffff;
  --bg-row-hover: #fdeef6;

  --pink:         #e91e8c;
  --pink-mid:     #c21774;
  --pink-deep:    #9c0f5c;
  --pink-soft:    #fce4f1;
  --pink-pale:    #fef2f8;
  --rose:         #f6c9e0;

  --positive:     #2e8f5c;
  --negative:     #c2373b;
  --neutral:      #b8a0ad;

  --text:         #211129;
  --text-sec:     #6b5470;
  --text-muted:   #7a6685;
  --border:       #f0d3e5;
  --shadow:       rgba(33, 17, 41, 0.10);
  --shadow-lg:    rgba(33, 17, 41, 0.20);

  /* -mid variants are for TEXT on themed panels (4.5:1+) and shift
     lighter in dark mode so they stay legible on dark surfaces.
     -fill variants are for solid panel/button fills paired with
     hardcoded white — deliberately NOT overridden in dark mode,
     since a white-on-fill or fill-on-white pairing needs the same
     dark, saturated ink regardless of page theme. -deep is the
     solid-color "button lip" depth shadow for a -mid fill; -fill-deep
     is the lip for a -fill fill. */
  --pink-fill:      #c21774;
  --pink-fill-deep: #8f0e56;

  --amvgg:        #a855f7;
  --amvgg-mid:    #8829c4;
  --amvgg-deep:   #6a1fad;
  --amvgg-fill:      #8829c4;
  --amvgg-fill-deep: #6a1fad;
  --amvgg-soft:   #f2e6fd;
  --amvgg-border: #ddc7f7;

  --warning-bg:     #fdf1c7;
  --warning-border: #c9932a;
  --warning-text:   #5c3d0a;

  /* Display: chunky, rounded, confident — a toy-shelf face, not the
     incumbent's cursive-party register. Body: quiet humanist
     workhorse. Mono: ledger numerals for prices/deltas only. */
  --font-display: 'Baloo 2', sans-serif;
  --font-body:    'Manrope', sans-serif;
  --font-mono:    'JetBrains Mono', monospace;

  --radius:       16px;
  --radius-lg:    24px;
  --radius-pill:  100px;

  --transition:     150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-theme: 320ms ease;
  --duration-enter: 0.55s;

  --warning-amber:      #ffb74d;
  --warning-amber-glow: rgba(255, 183, 77, 0.22);

  --bg-surface:   #ffffff;
  --bg-glass:     rgba(255, 255, 255, 0.94);
  --row-border:   #f5dfec;
  --bg-gradient:  var(--bg-row-hover);

  /* Source-color roles: the two-source mechanism lives directly in
     color — a solid pink tab and a solid purple tab, everywhere. */
  --stamp-elve:   var(--pink);
  --stamp-amvgg:  var(--amvgg);
}

/* ─── Theme toggle button ────────────────────────────────────── */
.btn-theme {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: var(--pink-soft);
  border: 2px solid var(--rose);
  border-radius: 50%;
  color: var(--pink-mid);
  font-size: 1.15rem;
  cursor: pointer;
  transition: transform var(--transition), background var(--transition), box-shadow var(--transition);
  flex-shrink: 0;
  line-height: 1;
}
.btn-theme:hover {
  transform: translateY(-2px);
  background: var(--pink-mid);
  color: white;
  box-shadow: 0 4px 14px var(--shadow-lg);
}
.btn-theme:active { transform: scale(0.95); }

/* ─── Dark mode variables ─────────────────────────────────────── */
/* Same solid-color-block logic against a near-black ground — colors
   stay bold and saturated at night, not dimmed to muted pastels. */
[data-theme="dark"] {
  --bg:           #170f1c;
  --bg-panel:     #1f1526;
  --bg-surface:   #241a2c;
  --bg-row-hover: #2b1f34;
  --bg-glass:     rgba(23, 15, 28, 0.94);
  --row-border:   #3a2a45;

  --pink-mid:     #f06292;
  --pink-deep:    #c21774;
  --pink-soft:    rgba(233, 30, 140, 0.18);
  --pink-pale:    rgba(233, 30, 140, 0.1);
  --rose:         #522a44;

  --text:         #f4e6f5;
  --text-sec:     #c9a8ce;
  --text-muted:   #9a80a0;
  --border:       #3a2a45;
  --shadow:       rgba(0, 0, 0, 0.45);
  --shadow-lg:    rgba(0, 0, 0, 0.65);

  --amvgg-mid:    #c495fb;
  --amvgg-deep:   #8829c4;
  --amvgg-soft:   rgba(168, 85, 247, 0.18);
  --amvgg-border: #4a2a70;

  --warning-bg:     #241a05;
  --warning-border: #a07800;
  --warning-text:   #f0c060;

  --positive:     #4cb47f;
  --negative:     #e06467;
}


[data-theme="dark"] .rarity-common     { background: #1e1e1e; color: #aaaaaa; border-color: #333; }
[data-theme="dark"] .rarity-uncommon   { background: #0d1f10; color: #66bb6a; border-color: #1b3e1f; }
[data-theme="dark"] .rarity-rare       { background: #0d1929; color: #64b5f6; border-color: #1a3a5a; }
[data-theme="dark"] .rarity-ultra-rare,
[data-theme="dark"] .rarity-ultra_rare { background: #1a0d2a; color: #ce93d8; border-color: #3d1a5a; }
[data-theme="dark"] .rarity-legendary  { background: #1a1400; color: #ffd740; border-color: #3a2d00; }

[data-theme="dark"] .demand-high   { background: #0d1f10; color: #66bb6a; border-color: #1b3e1f; }
[data-theme="dark"] .demand-medium { background: #1a1400; color: #ffd740; border-color: #3a2d00; }

/* ─── base.css ───────────────────────────────────────────────────
   Reset, body, polka-dot background, floating decorations,
   and .main layout wrapper.
   ─────────────────────────────────────────────────────────────── */

/* ─── Reset ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 15px; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  transition: background-color var(--transition-theme), color var(--transition-theme);
}

/* Toy-shelf ground: a clean near-white surface the bold color-blocked
   panels sit on top of, like toy packaging on a shelf — no texture,
   no gradient wash. */
.svg-defs { position: absolute; width: 0; height: 0; overflow: hidden; }

/* ─── Shared spinner (used on home and values pages) ────────── */
.spinner-ring {
  width: 34px;
  height: 34px;
  border: 3px solid var(--rose);
  border-top-color: var(--pink-mid);
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ─── View Transitions API (cross-page navigation) ──────────── */
@view-transition {
  navigation: auto;
}

@keyframes vt-out {
  to { opacity: 0; transform: translateY(-6px); }
}

@keyframes vt-in {
  from { opacity: 0; transform: translateY(8px); }
}

::view-transition-old(root) {
  animation: 160ms ease-out both vt-out;
}

::view-transition-new(root) {
  animation: 240ms ease-in both vt-in;
}

/* Logo morphs smoothly between pages */
::view-transition-old(site-logo),
::view-transition-new(site-logo) {
  animation-duration: 380ms;
  animation-timing-function: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ─── Discord CTA card (homepage) ───────────────────────────── */
.discord-cta-card {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  background: #5865f205;
  border: 1.5px solid #5865f230;
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0;
  text-decoration: none;
  color: inherit;
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
  flex-wrap: wrap;
}
.discord-cta-card:hover {
  border-color: #5865f2;
  box-shadow: 0 4px 20px var(--shadow-lg);
  transform: translateY(-2px);
}
.discord-cta-card:active { transform: scale(0.99); }

.discord-cta-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  background: #5865f2;
  border-radius: var(--radius);
  flex-shrink: 0;
  font-size: 1.6rem;
  color: white;
}
.discord-cta-body {
  flex: 1;
  min-width: 180px;
}
.discord-cta-body strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--text);
}
.discord-cta-body span {
  font-size: 0.85rem;
  color: var(--text-sec);
  line-height: 1.4;
}
.discord-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: #5865f2;
  color: white;
  font-family: var(--font-display);
  font-size: 0.9rem;
  padding: 0.55rem 1.1rem;
  border-radius: var(--radius);
  white-space: nowrap;
  flex-shrink: 0;
  transition: background var(--transition), box-shadow var(--transition);
}
.discord-cta-card:hover .discord-cta-btn {
  background: #4752c4;
  box-shadow: 0 2px 12px var(--shadow-lg);
}

/* ─── Discord CTA banner (values page) ──────────────────────── */
.discord-cta-banner {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: #5865f205;
  border: 1.5px solid #5865f230;
  border-radius: var(--radius);
  padding: 0.85rem 1.1rem;
  margin: 1.5rem 0;
  text-decoration: none;
  color: inherit;
  transition: border-color var(--transition), box-shadow var(--transition);
  flex-wrap: wrap;
}
.discord-cta-banner:hover {
  border-color: #5865f2;
  box-shadow: 0 3px 14px var(--shadow);
}
.discord-cta-banner .discord-cta-icon {
  width: 36px;
  height: 36px;
  font-size: 1.15rem;
  border-radius: 8px;
}
.discord-cta-banner .discord-cta-body {
  min-width: 120px;
}
.discord-cta-banner .discord-cta-body strong {
  font-size: 0.95rem;
}
.discord-cta-banner .discord-cta-btn {
  font-size: 0.82rem;
  padding: 0.4rem 0.85rem;
  margin-left: auto;
}

[data-theme="dark"] .discord-cta-card,
[data-theme="dark"] .discord-cta-banner {
  background: rgba(88, 101, 242, 0.08);
  border-color: rgba(88, 101, 242, 0.25);
}
[data-theme="dark"] .discord-cta-card:hover,
[data-theme="dark"] .discord-cta-banner:hover {
  border-color: #5865f2;
}

/* ─── Screen-reader only (visually hidden but indexable) ─────── */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ─── Typography ─────────────────────────────────────────────── */
h1, h2, h3 { text-wrap: balance; }

/* Tabular data (prices, deltas, catalog numbers) reads in the ledger
   mono face with lining figures, everywhere it appears. */
.num, .ledger-figure {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums lining-nums;
  letter-spacing: -0.01em;
}

/* ─── Browser surfaces ───────────────────────────────────────
   The parts we didn't draw still carry the design: selection,
   focus rings, and scrollbars are themed from the palette rather
   than left as generic OS chrome. ─────────────────────────── */
::selection {
  background: var(--pink-fill);
  color: #fff;
}

a { text-underline-offset: 0.15em; }

:focus-visible {
  outline: 2px solid var(--pink);
  outline-offset: 2px;
  border-radius: 3px;
}

html {
  scrollbar-color: var(--rose) transparent;
  scrollbar-width: thin;
}

::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: var(--rose);
  border-radius: var(--radius-pill);
  border: 3px solid var(--bg);
}
::-webkit-scrollbar-thumb:hover { background: var(--pink-fill); }

/* ─── About / FAQ explanatory content ─────────────────────────
   Shared across home, values, and calculator: static prose for
   crawlers/AI citation plus an optional FAQ disclosure list. ─── */
.about-section {
  max-width: 860px;
  margin: 48px auto 16px;
  padding: 0 20px;
}

.about-section h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.15rem;
  color: var(--text);
  margin: 32px 0 10px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.about-section h2::before {
  content: '';
  display: block;
  width: 4px;
  height: 1.1em;
  background: var(--pink-fill);
  border-radius: 2px;
  flex-shrink: 0;
}

.about-section h2:first-child { margin-top: 0; }

.about-section p {
  font-size: 0.9rem;
  line-height: 1.7;
  color: var(--text-sec);
  margin: 0 0 12px;
}

.about-section ul {
  margin: 0 0 16px;
  padding-left: 0;
  list-style: none;
}

.about-section li {
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--text-sec);
  padding: 8px 0 8px 18px;
  border-top: 1px solid var(--border);
  position: relative;
}
.about-section li:last-child { border-bottom: 1px solid var(--border); }

.about-section li::before {
  content: '';
  position: absolute;
  left: 2px;
  top: 15px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--pink-fill);
}

.about-section li strong { color: var(--text); }

.faq-list { margin-top: 28px; display: flex; flex-direction: column; gap: 6px; }

.faq-item {
  background: var(--bg-panel);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.faq-item[open] {
  border-color: var(--pink-mid);
  box-shadow: 0 4px 16px var(--shadow);
}

.faq-question {
  display: block;
  padding: 13px 16px;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text);
  cursor: pointer;
  list-style: none;
  user-select: none;
  transition: background var(--transition), color var(--transition);
}

.faq-question:hover { background: var(--pink-pale); }

.faq-question::-webkit-details-marker { display: none; }
.faq-question::before { content: '+ '; color: var(--pink-mid); font-weight: 800; }
.faq-item[open] .faq-question::before { content: '\2212 '; }

.faq-answer {
  font-size: 0.86rem;
  line-height: 1.65;
  color: var(--text-sec);
  padding: 0 16px 16px;
  margin: 0;
  border-top: 1px solid var(--border);
}

/* ─── Main ───────────────────────────────────────────────────── */
.main {
  position: relative;
  z-index: 1;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0px 24px 80px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* ─── Toast notifications ───────────────────────────────────── */
#toast-container {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  pointer-events: none;
}

.toast {
  background: var(--bg-panel);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 10px 22px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text);
  box-shadow: 0 4px 20px var(--shadow-lg);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 200ms ease, transform 200ms ease;
  white-space: nowrap;
}

.toast--visible {
  opacity: 1;
  transform: translateY(0);
}

.toast--success { border-color: rgba(46, 143, 92, 0.45); color: var(--positive); }
.toast--error   { border-color: rgba(220, 60, 80, 0.4);   color: var(--negative); }

/* ─── Mobile: keep toast clear of the safe-area inset ─────────── */
@media (max-width: 599px) {
  #toast-container {
    bottom: calc(28px + env(safe-area-inset-bottom, 0px));
    width: calc(100% - 32px);
    max-width: 100%;
  }
  .toast { white-space: normal; text-align: center; }
}

/* ═══════════════════════════════════════════════════════════════
   SHARED DATA PRIMITIVES
   Source chips, rarity ink and AMVGG demand meters are used by the
   values ledger, trade calculator and search, so they live here.
   ═══════════════════════════════════════════════════════════════ */

/* ─── Rarity colours (Adopt Me's own tier hues, as ink not fills) */
.rarity-common     { --rar: #857a8a; }
.rarity-uncommon   { --rar: #3a8a3e; }
.rarity-rare       { --rar: #1f6fc4; }
.rarity-ultra-rare,
.rarity-ultra_rare { --rar: #8e44ad; }
.rarity-legendary  { --rar: #b86400; }
.rarity-event,
.rarity-exotic,
.rarity-limited    { --rar: var(--pink-mid); }

[data-theme="dark"] .rarity-common     { --rar: #aba1b0; }
[data-theme="dark"] .rarity-uncommon   { --rar: #72c476; }
[data-theme="dark"] .rarity-rare       { --rar: #6fb1f2; }
[data-theme="dark"] .rarity-ultra-rare,
[data-theme="dark"] .rarity-ultra_rare { --rar: #c992e4; }
[data-theme="dark"] .rarity-legendary  { --rar: #f2ac45; }

/* Source chip: miniature of the solid source tabs */
.src-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1;
  color: #fff;
  flex-shrink: 0;
}
.src-chip-e { background: var(--pink-fill); }
.src-chip-a { background: var(--amvgg-fill); }
.src-chip-sp { background: #15803d; }   /* StarPets € prices */

/* Rarity tag: coloured dot + ink label. [class] lifts specificity past the
   pill-badge colour rules (incl. dark-mode overrides) that share .rarity-* */
.rarity-tag[class],
.pet-rarity-inline[class] {
  background: none;
  border: 0;
  padding: 0;
  color: var(--rar, var(--text-sec));
}

.rarity-tag {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--rar, var(--text-sec));
  white-space: nowrap;
  text-transform: capitalize;
}
.rarity-tag::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 3px;
  background: currentColor;
  flex-shrink: 0;
}

/* AMVGG demand meter: three rising bars, filled in AMVGG purple */
.demand-meter {
  display: inline-flex;
  align-items: flex-end;
  gap: 2px;
  height: 11px;
  flex-shrink: 0;
}
.demand-meter i {
  display: block;
  width: 3px;
  border-radius: 1px;
  background: var(--border);
}
.demand-meter i:nth-child(1) { height: 5px; }
.demand-meter i:nth-child(2) { height: 8px; }
.demand-meter i:nth-child(3) { height: 11px; }
.demand-meter-low    i:nth-child(-n+1),
.demand-meter-medium i:nth-child(-n+2),
.demand-meter-high   i:nth-child(-n+3) { background: var(--amvgg-mid); }


/* ─── header.css ─────────────────────────────────────────────────
   Header bar, logo, version badge, sync button, status dot,
   animations, and page nav tabs.
   ─────────────────────────────────────────────────────────────── */

/* ─── Reserve header height before JS populates it (prevents CLS) */
#app-header { min-height: 68px; }

/* ─── Header ─────────────────────────────────────────────────── */
/* Clean white strip, no glass blur — the toy pieces (nav, buttons)
   sit on top of it with their own solid color and depth. */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  height: 68px;
  background: var(--bg-panel);
  border-bottom: 2px solid var(--border);
  box-shadow: none;
  transition: box-shadow 220ms ease, background-color var(--transition-theme), border-color var(--transition-theme);
}

.header--scrolled {
  box-shadow: 0 4px 28px var(--shadow-lg);
}

.header-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.header-logo {
  height: 44px;
  width: auto;
  display: block;
  view-transition-name: site-logo;
  contain: layout;
  transition: transform var(--transition);
}
/* The two blocks nudge like a pressed toy on hover */
a:hover > .header-logo { transform: translateY(-1px) rotate(-1deg); }
a:active > .header-logo { transform: translateY(1px); }

@media (max-width: 599px) { .header-logo { height: 32px; } }
@media (max-width: 379px) { .header-logo { height: 28px; } }
/* Narrow phones: the wordmark needs the room; the version stays in the footer */
@media (max-width: 419px) { .header-version { display: none; } }
@media (prefers-reduced-motion: reduce) { .header-logo { transition: none; } a:hover > .header-logo { transform: none; } }

.header-version {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--pink-mid);
  background: var(--pink-soft);
  border: 1px solid var(--rose);
  border-radius: 4px;
  padding: 2px 7px;
  letter-spacing: 0.02em;
  align-self: center;
  margin-left: 2px;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 18px;
}

.last-updated {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-sec);
}

/* ─── Live badge ──────────────────────────────────────────────── */
.live-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(46, 143, 92, 0.1);
  border: 1px solid rgba(46, 143, 92, 0.3);
  border-radius: var(--radius-pill);
  padding: 3px 8px 3px 6px;
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--positive);
  letter-spacing: 0.07em;
  text-transform: uppercase;
  flex-shrink: 0;
  transition: background var(--transition), border-color var(--transition), color var(--transition);
}

.live-badge--stale {
  background: rgba(255, 183, 77, 0.1);
  border-color: rgba(255, 183, 77, 0.35);
  color: var(--warning-amber);
}

.live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
  transition: background var(--transition);
}

.live-badge:not(.live-badge--stale) .live-dot {
  animation: pulse-dot 2.5s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { transform: scale(1); opacity: 1; }
  50%       { transform: scale(1.5); opacity: 0.7; }
}

/* legacy status-dot kept for backwards compat */
.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}

/* ─── Search hint button (desktop only) ──────────────────────── */
.btn-search-hint {
  display: none;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  background: var(--pink-soft);
  border: 1.5px solid var(--rose);
  border-radius: var(--radius);
  color: var(--text-sec);
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
  white-space: nowrap;
  min-height: 36px;
}

@media (min-width: 800px) {
  .btn-search-hint { display: flex; }
}

.btn-search-hint:hover {
  background: rgba(233, 30, 140, 0.08);
  border-color: var(--pink-mid);
  color: var(--pink-mid);
}

.search-hint-icon { font-size: 0.85rem; line-height: 1; }

.search-hint-kbd {
  display: inline-flex;
  white-space: nowrap;
  align-items: center;
  padding: 1px 5px;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 5px;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  font-family: var(--font-body);
  line-height: 1.4;
}

.btn-sync {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 9px 22px;
  background: var(--pink-fill);
  border: none;
  border-radius: var(--radius);
  color: white;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 4px 14px var(--shadow-lg);
  transition: transform var(--transition), box-shadow var(--transition);
  min-height: 44px;
}

.btn-sync:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px var(--shadow-lg);
}

.btn-sync:active { transform: scale(0.97); }

.btn-sync.spinning .btn-icon { animation: spin 0.9s linear infinite; }
.btn-icon { display: inline-block; font-size: 1rem; line-height: 1; }

/* ─── Page routing ───────────────────────────────────────────── */
.page.page-hidden { display: none; }

/* ─── Page nav: chunky toy tabs ────────────────────────────────
   Solid color-blocked rounded-rects with a real 3D "button lip" —
   the active tab sits on a solid pink offset shadow like a pressed
   toy switch, not a gradient pill or a paper folder tab. */
.page-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.page-tab {
  display: inline-flex;
  align-items: center;
  padding: 9px 16px;
  border: none;
  border-radius: var(--radius);
  background: transparent;
  color: var(--text-sec);
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 800;
  cursor: pointer;
  text-decoration: none;
  transition: background var(--transition), color var(--transition), transform var(--transition), box-shadow var(--transition);
  white-space: nowrap;
  position: relative;
}

.page-tab:hover {
  background: var(--pink-pale);
  color: var(--pink-mid);
}

.page-tab.active {
  background: var(--pink-fill);
  color: #fff;
  box-shadow: 0 3px 0 var(--pink-fill-deep);
  transform: translateY(-1px);
}

.page-tab.active:hover { background: var(--pink-fill); }

.page-tab.active:active {
  transform: translateY(1px);
  box-shadow: 0 1px 0 var(--pink-fill-deep);
}

/* ─── Apps nav dropdown ──────────────────────────────────────── */
.page-tab-dropdown {
  position: relative;
}

.page-tab-dropdown-trigger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.page-tab-dropdown-caret {
  font-size: 0.75rem;
  transition: transform var(--transition);
}

.page-tab-dropdown.open .page-tab-dropdown-caret {
  transform: rotate(180deg);
}

.page-tab-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 200px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  background: var(--bg-panel);
  border: 1.5px solid var(--rose);
  border-radius: var(--radius);
  box-shadow: 0 8px 28px var(--shadow-lg);
  padding: 6px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity var(--transition), transform var(--transition), visibility var(--transition);
  z-index: 60;
}

.page-tab-dropdown.open .page-tab-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.page-tab-dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  border-radius: var(--radius);
  color: var(--text-sec);
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: background var(--transition), color var(--transition);
}

.page-tab-dropdown-item i {
  width: 16px;
  text-align: center;
  color: var(--pink-mid);
}

.page-tab-dropdown-item:hover {
  background: var(--pink-soft);
  color: var(--pink-mid);
}

.page-tab-dropdown-item.active {
  background: var(--pink-fill);
  color: #fff;
}

.page-tab-dropdown-item.active i {
  color: #fff;
}

@media (max-width: 599px) {
  .page-tab { padding: 5px 14px; font-size: 0.8rem; }
  /* Hide desktop nav tabs — the hamburger drawer replaces them */
  .page-nav { display: none; }
}

/* ─── Trade Calculator CTA button ──────────────────────────────
   The chunky toy-button language: solid pink fill, a solid-color
   offset "lip" for depth, presses flush on click. */
.btn-trade-cta {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 10px 22px;
  background: var(--pink-fill);
  border: none;
  border-radius: var(--radius);
  color: #fff;
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  cursor: pointer;
  min-height: 44px;
  white-space: nowrap;
  position: relative;
  box-shadow: 0 4px 0 var(--pink-fill-deep);
  transition: transform var(--transition), box-shadow var(--transition);
}

.btn-trade-icon {
  font-size: 1.05rem;
  line-height: 1;
  display: inline-block;
}

.btn-trade-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 5px 0 var(--pink-fill-deep);
}

.btn-trade-cta:active {
  transform: translateY(3px);
  box-shadow: 0 1px 0 var(--pink-fill-deep);
}

/* ─── Hamburger menu trigger (mobile only) ───────────────────── */
.btn-hamburger {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: var(--pink-soft);
  border: 1.5px solid var(--rose);
  border-radius: var(--radius-pill);
  color: var(--pink-mid);
  font-size: 1.05rem;
  cursor: pointer;
  transition: transform var(--transition), background var(--transition), box-shadow var(--transition);
  flex-shrink: 0;
  line-height: 1;
}

.btn-hamburger:hover {
  transform: translateY(-2px);
  background: var(--pink-fill);
  color: white;
  box-shadow: 0 4px 14px var(--shadow-lg);
}

.btn-hamburger:active { transform: scale(0.95); }

@media (max-width: 599px) {
  .btn-hamburger { display: flex; }

  /* Compact the remaining quick-access buttons to icon-only circles */
  .btn-search-hint {
    display: flex;
    width: 40px;
    height: 40px;
    padding: 0;
    justify-content: center;
    border-radius: 50%;
  }
  .btn-search-hint .search-hint-label,
  .btn-search-hint .search-hint-kbd { display: none; }

  .btn-trade-cta {
    display: flex;
    width: 40px;
    height: 40px;
    padding: 0;
    justify-content: center;
    border-radius: 50%;
    box-shadow: none;
  }
  .btn-trade-cta::before { display: none; }
  .btn-trade-cta .btn-trade-label { display: none; }

  /* Theme toggle + account move into the drawer to keep the header uncrowded */
  .btn-theme,
  #headerUserWrap { display: none; }

  .header-right { gap: 8px; }
}

/* ─── Header user / login ─────────────────────────────────────── */
.header-user-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.header-user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid var(--rose);
  object-fit: cover;
  transition: border-color var(--transition), transform var(--transition);
}

.header-user-avatar:hover {
  border-color: var(--pink-mid);
  transform: scale(1.08);
}

.header-login-btn {
  display: inline-flex;
  align-items: center;
  padding: 6px 16px;
  background: var(--pink-soft);
  border: 1.5px solid var(--rose);
  border-radius: var(--radius);
  color: var(--pink-mid);
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none;
  transition: background var(--transition), border-color var(--transition);
  white-space: nowrap;
}

.header-login-btn:hover {
  background: var(--pink-fill);
  border-color: var(--pink-mid);
  color: #fff;
}

/* ─── Mobile slide-out drawer (hamburger menu) ───────────────── */
.mobile-drawer-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 110;
  background: rgba(0, 0, 0, 0.45);
  opacity: 0;
  transition: opacity var(--transition);
}

.mobile-drawer-backdrop.open {
  display: block;
  opacity: 1;
}

.mobile-drawer {
  display: none;
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 120;
  width: min(300px, 84vw);
  flex-direction: column;
  gap: 4px;
  background: var(--bg-panel);
  border-left: 1.5px solid var(--border);
  box-shadow: -8px 0 32px var(--shadow-lg);
  padding: 18px 16px calc(18px + env(safe-area-inset-bottom, 0px));
  transform: translateX(100%);
  transition: transform 240ms cubic-bezier(0.4, 0, 0.2, 1);
  overflow-y: auto;
}

@media (max-width: 599px) {
  .mobile-drawer { display: flex; }
}

.mobile-drawer.open {
  transform: translateX(0);
}

.mobile-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 8px;
}

.mobile-drawer-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--text);
}

.mobile-drawer-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: var(--pink-soft);
  border: 1.5px solid var(--rose);
  border-radius: 50%;
  color: var(--text-sec);
  font-size: 0.95rem;
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
}

.mobile-drawer-close:hover {
  background: var(--pink-fill);
  color: #fff;
}

.mobile-drawer-user {
  padding: 6px 2px 12px;
}

.mobile-drawer-user:empty { display: none; }

.mobile-drawer-user .header-user-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
  font-weight: 700;
  font-size: 0.9rem;
}

.mobile-drawer-user .header-user-avatar {
  width: 38px;
  height: 38px;
}

.mobile-drawer-user .header-login-btn {
  display: flex;
  width: 100%;
  justify-content: center;
  padding: 10px 16px;
  font-size: 0.85rem;
}

.mobile-drawer-links {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.mobile-drawer-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: none;
  border-radius: var(--radius);
  background: transparent;
  color: var(--text-sec);
  font-family: var(--font-body);
  font-size: 0.92rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  text-align: left;
  width: 100%;
  transition: background var(--transition), color var(--transition);
  -webkit-tap-highlight-color: transparent;
}

.mobile-drawer-link i {
  width: 18px;
  text-align: center;
  color: var(--pink-mid);
}

.mobile-drawer-link:hover {
  background: var(--pink-soft);
  color: var(--pink-mid);
}

.mobile-drawer-link.active {
  background: var(--pink-fill);
  color: #fff;
}

.mobile-drawer-link.active i {
  color: #fff;
}

.mobile-drawer-divider {
  height: 1px;
  margin: 10px 4px;
  background: var(--border);
}

/* ── Login chooser dialog ──────────────────────────────────────── */
.login-chooser-dialog {
  position: fixed;
  border: 1.5px solid var(--border);
  border-radius: 16px;
  background: var(--bg-panel);
  padding: 28px 24px 24px;
  max-width: 320px;
  width: calc(100% - 32px);
  box-shadow: 0 8px 40px rgba(0,0,0,0.18);
}

.login-chooser-dialog::backdrop {
  background: rgba(0,0,0,0.45);
}

.login-chooser-close {
  position: absolute;
  top: 10px;
  right: 14px;
  background: none;
  border: none;
  font-size: 1.3rem;
  color: var(--text-muted);
  cursor: pointer;
  line-height: 1;
  padding: 4px 6px;
  border-radius: 6px;
}

.login-chooser-close:hover { background: var(--bg-alt); }

.login-chooser-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--text);
  margin: 0 0 6px;
  text-align: center;
}

.login-chooser-sub {
  font-size: 0.8rem;
  color: var(--text-sec);
  text-align: center;
  margin: 0 0 20px;
  line-height: 1.5;
}

.login-chooser-btns {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.login-chooser-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 16px;
  border-radius: var(--radius);
  font-size: 0.88rem;
  font-weight: 700;
  text-decoration: none;
  transition: opacity 140ms;
}

.login-chooser-btn:hover { opacity: 0.88; }

.login-chooser-btn svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.login-chooser-btn--discord {
  background: #5865f2;
  color: #fff;
}

.login-chooser-btn--roblox {
  background: #e52207;
  color: #fff;
}

/* ─── Mobile tap targets: header controls (hit area only, look unchanged) ─── */
@media (max-width: 640px) {
  .header-login-btn,
  .header-user-btn,
  .page-tab { position: relative; }
  .header-login-btn::after,
  .page-tab::after { content: ''; position: absolute; inset: -7px 0; }
  .header-user-btn::after { content: ''; position: absolute; inset: -6px; }
}

/* ─── palette.css ─────────────────────────────────────────────────
   Global pet search (⌘K / Ctrl+K / "/"). Included in every bundle
   that renders the site header.
   ─────────────────────────────────────────────────────────────── */

html.palette-lock { overflow: hidden; }

/* ─── Backdrop ───────────────────────────────────────────────── */
#cmdBackdrop {
  position: fixed;
  inset: 0;
  z-index: 500;
  background: rgba(33, 17, 41, 0.42);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity 0.18s ease;
}
#cmdBackdrop.palette-open { opacity: 1; }
#cmdBackdrop[hidden], #cmdPalette[hidden] { display: none; }

/* ─── Panel ──────────────────────────────────────────────────── */
#cmdPalette {
  position: fixed;
  top: 12vh;
  left: 50%;
  z-index: 501;
  display: flex;
  flex-direction: column;
  width: min(620px, calc(100vw - 32px));
  max-height: min(620px, 76vh);
  background: var(--bg-panel);
  border-radius: var(--radius-lg);
  box-shadow: 0 30px 70px var(--shadow-lg), 0 8px 22px var(--shadow);
  overflow: hidden;
  opacity: 0;
  transform: translate(-50%, -8px) scale(0.985);
  transition: opacity 0.18s ease, transform 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}
#cmdPalette.palette-open { opacity: 1; transform: translate(-50%, 0) scale(1); }

/* ─── Search row: a solid pink band, the site's toy-tab language ─ */
.palette-search-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 12px 12px 18px;
  background: var(--pink-fill);
  box-shadow: inset 0 -4px 0 var(--pink-fill-deep);
}

.palette-search-icon { font-size: 1.05rem; color: rgba(255, 255, 255, 0.85); flex-shrink: 0; }

#cmdInput {
  flex: 1;
  min-width: 0;
  height: 48px;
  padding: 0 16px;
  border: none;
  border-radius: 14px;
  background: #fff;
  color: #211129;
  font-family: var(--font-body);
  font-size: 1.05rem;
  font-weight: 700;
  outline: none;
  box-shadow: 0 3px 0 var(--pink-fill-deep);
}
#cmdInput::placeholder { color: #8a7490; font-weight: 600; }
#cmdInput:focus-visible { box-shadow: 0 3px 0 var(--pink-fill-deep), 0 0 0 3px rgba(255, 255, 255, 0.5); }

.palette-spinner {
  width: 18px;
  height: 18px;
  border: 2.5px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  flex-shrink: 0;
}
.palette-spinner[hidden] { display: none; }

.palette-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  min-width: 44px;
  padding: 0 10px;
  border: 1.5px solid rgba(255, 255, 255, 0.4);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 800;
  cursor: pointer;
  flex-shrink: 0;
  transition: background var(--transition);
}
.palette-close:hover { background: rgba(255, 255, 255, 0.26); }
.palette-close i { display: none; font-size: 0.95rem; }

/* ─── Body ───────────────────────────────────────────────────── */
.palette-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 8px;
  scrollbar-width: thin;
  scrollbar-color: var(--rose) transparent;
}

.palette-section {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 10px 6px;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.palette-section[hidden] { display: none; }
.palette-section-action {
  border: none;
  background: none;
  padding: 2px 4px;
  font: inherit;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: 6px;
}
.palette-section-action:hover { color: var(--pink-mid); }
.palette-section-action[hidden] { display: none; }

#cmdResults { list-style: none; margin: 0; padding: 0; }

.palette-result {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto 16px;
  align-items: center;
  gap: 12px;
  padding: 8px 10px;
  border-radius: 14px;
  cursor: pointer;
  transition: background var(--transition);
}
.palette-result.palette-active { background: var(--bg-row-hover); box-shadow: inset 0 0 0 2px var(--pink); }

.palette-result-img {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--pink-pale);
  object-fit: contain;
  flex-shrink: 0;
}
.palette-result-placeholder {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--pink-mid);
}
.palette-result-all .palette-result-placeholder { background: var(--bg); color: var(--text-sec); }
.palette-result-all .palette-result-rarity { text-transform: none; color: var(--text-muted); }

.palette-result-info { display: flex; flex-direction: column; gap: 1px; min-width: 0; }

.palette-result-name {
  font-weight: 800;
  font-size: 0.92rem;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.palette-result-rarity {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: capitalize;
  color: var(--rar, var(--text-muted));
}
.palette-result-rarity[class] { background: none; border: 0; padding: 0; }

.palette-result-vals {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums lining-nums;
  color: var(--text);
}
.palette-result-vals > span { display: inline-flex; align-items: center; gap: 6px; }
.palette-result-vals .src-chip,
.palette-footer .src-chip { width: 16px; height: 16px; font-size: 0.6rem; border-radius: 5px; }

.palette-result-arrow {
  grid-column: 4;
  font-size: 0.8rem;
  color: var(--pink-mid);
  opacity: 0;
  transform: translateX(-3px);
  transition: opacity var(--transition), transform var(--transition);
}
.palette-result.palette-active .palette-result-arrow { opacity: 1; transform: none; }

/* ─── Status (hint, empty, error) ────────────────────────────── */
.palette-status {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 34px 24px;
  text-align: center;
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1.5;
  color: var(--text-sec);
}
.palette-status[hidden], .palette-status:empty { display: none; }
.palette-status i { font-size: 1.3rem; color: var(--pink-mid); opacity: 0.6; }
.palette-status strong { color: var(--text); }

/* ─── Footer ─────────────────────────────────────────────────── */
.palette-footer {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 10px 16px;
  border-top: 1px solid var(--border);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
}
.palette-footer > span { display: inline-flex; align-items: center; gap: 4px; }
.palette-footer-src { margin-left: auto; }

.palette-footer kbd {
  min-width: 20px;
  padding: 1px 5px;
  border-radius: 5px;
  background: var(--bg);
  box-shadow: 0 2px 0 var(--border);
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 800;
  text-align: center;
  color: var(--text-sec);
}

@media (prefers-reduced-motion: reduce) {
  #cmdPalette, #cmdBackdrop { transition: none; }
}

/* ─── Phones: pinned to the top so the keyboard never covers it ─ */
@media (max-width: 599px) {
  #cmdPalette {
    top: calc(8px + env(safe-area-inset-top, 0px));
    width: calc(100vw - 16px);
    max-height: calc(100dvh - 16px - env(safe-area-inset-top, 0px));
    border-radius: 20px;
  }
  .palette-search-row { padding: 10px 10px 10px 14px; gap: 10px; }
  #cmdInput { font-size: 16px; height: 46px; }
  .palette-close { min-width: 40px; height: 40px; padding: 0; }
  .palette-close-kbd { display: none; }
  .palette-close i { display: inline; }
  .palette-footer > span:not(.palette-footer-src) { display: none; }
  .palette-result { grid-template-columns: 40px minmax(0, 1fr) auto; gap: 10px; }
  .palette-result-img { width: 40px; height: 40px; }
  .palette-result-arrow { display: none; }
}

@media (pointer: coarse) {
  .palette-result { -webkit-tap-highlight-color: transparent; }
}

/* ─── footer.css ─────────────────────────────────────────────────
   Site footer layout, brand, links, copyright, and version badge.
   ─────────────────────────────────────────────────────────────── */

/* ─── Footer ─────────────────────────────────────────────────── */
.site-footer {
  position: relative;
  z-index: 1;
  margin-top: 40px;
  border-top: 1.5px solid var(--border);
  background: var(--bg-panel);
  transition: background-color var(--transition-theme), border-color var(--transition-theme);
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px 20px 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.footer-logo {
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--pink-mid);
  letter-spacing: 0.01em;
}

.footer-tagline {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.55;
  max-width: 560px;
}

.footer-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

.footer-sources {
  display: flex;
  align-items: center;
  gap: 8px;
}

.footer-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-right: 2px;
}

.footer-link {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-sec);
  text-decoration: none;
  transition: color var(--transition);
}
.footer-link:hover { color: var(--pink-mid); }
.footer-link-icon { font-size: 1rem; line-height: 1; vertical-align: middle; }

.footer-dot {
  font-size: 0.75rem;
  color: var(--border);
}

.footer-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.footer-copyright {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.footer-version {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--pink-mid);
  background: var(--pink-soft);
  border: 1px solid var(--rose);
  border-radius: 4px;
  padding: 2px 8px;
  letter-spacing: 0.02em;
}

@media (max-width: 599px) {
  .footer-inner { padding: 16px 14px calc(16px + env(safe-area-inset-bottom, 0px)); gap: 12px; }

  .footer-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .footer-right {
    flex-wrap: wrap;
    gap: 8px;
  }

  /* Dot separators look orphaned when items wrap on narrow screens */
  .footer-dot { display: none; }
}

/* ─── Sync status in footer ──────────────────────────────────── */
.footer-sync-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
}

.footer-sync-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--positive);
  flex-shrink: 0;
  animation: pulse-dot 2.5s ease-in-out infinite;
}

.footer-sync-dot--stale {
  background: var(--warning-amber);
  animation: none;
}

/* ─── Rarity / egg / event hub pages ─────────────────────────── */

.hub-hero {
  text-align: center;
  padding: 48px 20px 24px;
}

.hub-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 5vw, 2.6rem);
  color: var(--pink-mid);
  margin: 0 0 12px;
  line-height: 1.2;
}

.hub-intro {
  max-width: 640px;
  margin: 0 auto;
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--text-sec);
}

.hub-intro a { color: var(--pink-mid); font-weight: 700; }

.hub-wrap {
  max-width: 820px;
  margin: 0 auto;
  padding: 0 20px 64px;
}

.hub-back {
  display: inline-block;
  margin-bottom: 14px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-sec);
  text-decoration: none;
}
.hub-back:hover { color: var(--pink-mid); }

/* Same panel look as the values ledger */
.hub-table-wrap {
  background: var(--bg-panel);
  border-radius: var(--radius-lg);
  overflow: clip;
  box-shadow: 0 4px 0 var(--border);
}

.hub-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.hub-table th {
  background: var(--bg-panel);
  color: var(--text-sec);
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  text-align: left;
  white-space: nowrap;
  padding: 14px;
  border-bottom: 1.5px solid var(--border);
}

.hub-table td {
  padding: 8px 14px;
  border-bottom: 1px solid var(--row-border);
  font-size: 0.875rem;
  vertical-align: middle;
}

.hub-table tbody tr:last-child td { border-bottom: none; }
.hub-table tbody tr:hover { background: var(--bg-row-hover); }

.hub-table .hub-col-rank { width: 48px; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.hub-table .hub-col-val { text-align: right; font-family: var(--font-mono); font-variant-numeric: tabular-nums; white-space: nowrap; }
.hub-table th.hub-col-val { font-family: var(--font-body); }

.hub-pet-link {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  color: var(--text);
  font-weight: 700;
  text-decoration: none;
}
.hub-pet-link:hover span { color: var(--pink-mid); }

.hub-pet-img {
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  border-radius: 11px;
  background: var(--pink-pale);
  object-fit: contain;
}

@media (max-width: 560px) {
  .hub-table .hub-col-rarity { display: none; }
  .hub-table th, .hub-table td { padding-left: 10px; padding-right: 10px; }
}

/* ─── consent.css ─────────────────────────────────────────────
   Compact, non-blocking cookie bar (cookieconsent "edgeless" theme).
   Fixed to the viewport bottom so it overlays without shifting layout or
   blocking scroll/clicks elsewhere. Colours follow the site theme
   (light + [data-theme="dark"]) through variables.css.

   Rules target .cc-window (not .cc-banner): the library switches to
   .cc-floating on Android/iPhone/iPad UAs. Never force `display` here: the
   library hides/shows the popup with an inline display:none.

   cookieconsent.min.css loads async, so the bar can be inserted before it
   arrives: position/display and the fade (opacity transition + .cc-invisible)
   are duplicated here so the bar never lands in normal flow and fadeOut's
   transitionend still fires (that is what sets display:none on dismiss).

   Height budget (content area, excluding the safe-area inset which is added
   to max-height): desktop <= 72px, mobile <= 120px.
   ─────────────────────────────────────────────────────────── */

.cc-window {
  position: fixed !important;
  display: flex;
  opacity: 1;
  transition: opacity 1s ease;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  top: auto !important;
  width: 100% !important;
  max-width: none !important;
  box-sizing: border-box !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 16px !important;
  max-height: calc(72px + env(safe-area-inset-bottom, 0px)) !important;
  overflow: hidden !important;
  padding: 10px 20px calc(10px + env(safe-area-inset-bottom, 0px)) !important;
  background: var(--bg-panel) !important;
  color: var(--text) !important;
  border: 0 !important;
  border-top: 1px solid var(--border) !important;
  border-radius: 0 !important;
  box-shadow: 0 -4px 16px var(--shadow) !important;
  font-family: var(--font-body) !important;
  z-index: 9999 !important;
}

.cc-window.cc-invisible {
  opacity: 0;
}

.cc-window .cc-message {
  flex: 0 1 auto !important;
  margin: 0 !important;
  font-size: 0.875rem !important;
  line-height: 1.35 !important;
  text-align: left !important;
  color: var(--text) !important;
}

.cc-window .cc-compliance {
  display: flex;
  flex: 0 0 auto !important;
  flex-direction: row !important;
  gap: 8px !important;
}

.cc-window .cc-btn {
  box-sizing: border-box !important;
  flex: 0 0 auto !important;
  min-width: 88px !important;
  height: 36px !important;
  margin: 0 !important;
  padding: 0 16px !important;
  border-radius: var(--radius-pill) !important;
  font-family: var(--font-body) !important;
  font-size: 0.85rem !important;
  font-weight: 700 !important;
  line-height: 33px !important;
  text-align: center !important;
  cursor: pointer !important;
}

.cc-window .cc-btn.cc-allow {
  background: var(--pink-fill) !important;
  border: 1.5px solid var(--pink-fill) !important;
  color: #ffffff !important;
}

.cc-window .cc-btn.cc-deny {
  background: transparent !important;
  border: 1.5px solid var(--text-sec) !important;
  color: var(--text) !important;
}

.cc-window .cc-btn:hover {
  opacity: 0.85 !important;
}

.cc-window .cc-btn:focus-visible {
  outline: 2px solid var(--text) !important;
  outline-offset: 2px !important;
}

/* Mobile: message above, buttons below.
   Height: 8 pad + 2 lines x 0.8rem x 1.35 (~35) + 6 gap + 34 buttons + 8 pad
   = 91px of content, inside the 120px budget (safe-area inset is extra). */
@media (max-width: 600px) {
  .cc-window {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 6px !important;
    max-height: calc(120px + env(safe-area-inset-bottom, 0px)) !important;
    padding: 8px 14px calc(8px + env(safe-area-inset-bottom, 0px)) !important;
  }

  .cc-window .cc-message {
    font-size: 0.8rem !important;
  }

  .cc-window .cc-compliance {
    width: 100% !important;
  }

  .cc-window .cc-btn {
    flex: 1 1 0 !important;
    height: 34px !important;
    line-height: 31px !important;
  }
}
