/* ─── variables.css ──────────────────────────────────────────────
   CSS custom properties (:root), dark mode variable overrides
   ([data-theme="dark"]), and the theme toggle button (.btn-theme).
   ─────────────────────────────────────────────────────────────── */

/* ─── Variables ─────────────────────────────────────────────── */
:root {
  --bg:           #fff5f9;
  --bg-panel:     #ffffff;
  --bg-row-hover: #fff5f9;

  --pink:         #e91e8c;
  --pink-mid:     #f06292;
  --pink-soft:    #fce4ec;
  --pink-pale:    #fff0f6;
  --rose:         #f8bbd0;

  --positive:     #2ecc8f;
  --negative:     #f0607e;
  --neutral:      #d4a8bd;

  --text:         #3d1a2e;
  --text-sec:     #8d5a72;
  --text-muted:   #c4a0b5;
  --border:       #fad4e4;
  --shadow:       rgba(233, 30, 140, 0.08);
  --shadow-lg:    rgba(233, 30, 140, 0.15);

  --amvgg:        #a855f7;
  --amvgg-soft:   #f3e8ff;
  --amvgg-border: #ddd6fe;

  --warning-bg:     #fef9c3;
  --warning-border: #eab308;
  --warning-text:   #713f12;

  --font-display: 'Fredoka One', cursive;
  --font-body:    'Plus Jakarta Sans', sans-serif;

  --radius:       12px;
  --radius-lg:    20px;
  --radius-pill:  100px;

  --transition:    150ms cubic-bezier(0.4, 0, 0.2, 1);
  --duration-enter: 0.55s;

  --warning-amber:      #ffb74d;
  --warning-amber-glow: rgba(255, 183, 77, 0.22);

  --bg-surface:   #ffffff;
  --bg-gradient:  linear-gradient(135deg, #fff0f6, #fce4ec);
  --bg-glass:     rgba(255, 255, 255, 0.92);
  --row-border:   #fff0f5;
}

/* ─── Theme toggle button ────────────────────────────────────── */
.btn-theme {
  display: flex;
  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);
  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);
  color: white;
  box-shadow: 0 4px 14px var(--shadow-lg);
}
.btn-theme:active { transform: scale(0.95); }

/* ─── Dark mode variables ─────────────────────────────────────── */
[data-theme="dark"] {
  --bg:           #1a0d15;
  --bg-panel:     #231218;
  --bg-surface:   #2a1420;
  --bg-row-hover: #351825;
  --bg-gradient:  linear-gradient(135deg, #2d1422, #3d1a2e);
  --bg-glass:     rgba(26, 13, 21, 0.94);
  --row-border:   #3a1a2e;

  --pink-soft:    rgba(233, 30, 140, 0.18);
  --pink-pale:    rgba(233, 30, 140, 0.1);
  --rose:         #5a2040;

  --text:         #f0d4e6;
  --text-sec:     #c4829b;
  --text-muted:   #7d4a63;
  --border:       #3a1a2e;
  --shadow:       rgba(0, 0, 0, 0.45);
  --shadow-lg:    rgba(0, 0, 0, 0.65);

  --amvgg-soft:   rgba(168, 85, 247, 0.18);
  --amvgg-border: #3d1a5a;

  --warning-bg:     #1e1400;
  --warning-border: #a07800;
  --warning-text:   #f0c060;
}


[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;
}

/* Ambient mesh gradient background */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse at 10% 45%, rgba(249, 168, 212, 0.52) 0%, transparent 48%),
    radial-gradient(ellipse at 88% 12%, rgba(216, 180, 254, 0.42) 0%, transparent 40%),
    radial-gradient(ellipse at 55% 90%, rgba(251, 207, 232, 0.48) 0%, transparent 46%),
    radial-gradient(ellipse at 4%  88%, rgba(233, 30, 140, 0.16) 0%, transparent 32%);
  background-attachment: fixed;
  pointer-events: none;
  z-index: 0;
}

/* Grain overlay for texture depth */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 200px 200px;
  opacity: 0.05;
  pointer-events: none;
  z-index: 0;
}

[data-theme="dark"] body::before {
  background:
    radial-gradient(ellipse at 10% 45%, rgba(90, 15, 55, 0.75) 0%, transparent 48%),
    radial-gradient(ellipse at 88% 12%, rgba(55, 10, 95, 0.6) 0%, transparent 40%),
    radial-gradient(ellipse at 55% 90%, rgba(70, 10, 55, 0.65) 0%, transparent 46%),
    radial-gradient(ellipse at 4%  88%, rgba(180, 20, 100, 0.22) 0%, transparent 30%);
}

/* ─── Floating decorations ───────────────────────────────────── */
.bg-deco {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.deco {
  position: absolute;
  font-size: 0; /* hide original emoji text */
  color: transparent;
  --dx: 0px;
  opacity: 0;
  will-change: transform, opacity;
  animation: float-deco linear infinite, deco-enter 1.8s ease forwards;
}

/* All decos render as glowing ✦ stars via ::before */
.deco::before {
  content: '✦';
  font-size: 1.3rem;
  color: var(--pink);
  text-shadow:
    0 0 10px rgba(233, 30, 140, 0.8),
    0 0 25px rgba(233, 30, 140, 0.4),
    0 0 50px rgba(233, 30, 140, 0.15);
  display: block;
  line-height: 1;
}

/* Alternating purple sparkles for visual variety */
.d2::before, .d5::before, .d8::before {
  color: var(--amvgg);
  text-shadow:
    0 0 10px rgba(168, 85, 247, 0.8),
    0 0 25px rgba(168, 85, 247, 0.4),
    0 0 50px rgba(168, 85, 247, 0.15);
}

/* Size variations */
.d3::before { font-size: 0.9rem; }
.d6::before { font-size: 0.85rem; }
.d4::before { font-size: 1.6rem; }
.d7::before { font-size: 1.5rem; }
.d8::before { font-size: 0.8rem; }

/* Staggered entry: fades+unblurs in at different times */
@keyframes deco-enter {
  from { opacity: 0; filter: blur(6px); }
  to   { opacity: 0.5; filter: blur(0); }
}

/* Unique horizontal drift per element via --dx custom property */
.d1 { left:  4%;  top: 12%; animation-duration: 13s, 1.8s; animation-delay: 0s,   0.1s; --dx:  10px; }
.d2 { left: 14%;  top: 68%; animation-duration: 16s, 1.8s; animation-delay: -4s,  0.3s; --dx: -14px; }
.d3 { left: 28%;  top: 32%; animation-duration: 19s, 1.8s; animation-delay: -8s,  0.5s; --dx:   8px; }
.d4 { left: 48%;  top: 82%; animation-duration: 14s, 1.8s; animation-delay: -2s,  0.7s; --dx: -10px; }
.d5 { left: 63%;  top:  8%; animation-duration: 17s, 1.8s; animation-delay: -6s,  0.2s; --dx:  12px; }
.d6 { left: 76%;  top: 52%; animation-duration: 12s, 1.8s; animation-delay: -9s,  0.6s; --dx:  -8px; }
.d7 { left: 87%;  top: 28%; animation-duration: 15s, 1.8s; animation-delay: -3s,  0.4s; --dx:  16px; }
.d8 { left: 93%;  top: 74%; animation-duration: 18s, 1.8s; animation-delay: -7s,  0.8s; --dx: -11px; }

@keyframes float-deco {
  0%   { transform: translate(0, 0)              rotate(0deg);   opacity: 0.22; }
  25%  { transform: translate(calc(var(--dx) * 0.5), -13px)  rotate(90deg);  opacity: 0.55; }
  50%  { transform: translate(var(--dx), -24px)  rotate(180deg); opacity: 0.6; }
  75%  { transform: translate(calc(var(--dx) * 0.5), -11px)  rotate(270deg); opacity: 0.5; }
  100% { transform: translate(0, 0)              rotate(360deg); opacity: 0.22; }
}

/* ─── Shared spinner (used on home and values pages) ────────── */
.spinner-ring {
  width: 34px;
  height: 34px;
  border: 3px solid var(--rose);
  border-top-color: var(--pink);
  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.34, 1.56, 0.64, 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 rgba(88, 101, 242, 0.15);
  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-pill);
  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 rgba(88, 101, 242, 0.35);
}

/* ─── Discord CTA banner (values page) ──────────────────────── */
.discord-cta-banner {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: #5865f205;
  border: 1.5px solid #5865f230;
  border-left: 4px solid #5865f2;
  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 rgba(88, 101, 242, 0.12);
}
.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; }

/* ─── 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, 204, 143, 0.45); color: var(--positive); }
.toast--error   { border-color: rgba(220, 60, 80, 0.4);   color: var(--negative); }

/* ─── Mobile: push toast above bottom nav ───────────────────── */
@media (max-width: 599px) {
  #toast-container {
    bottom: calc(72px + env(safe-area-inset-bottom, 0px));
    width: calc(100% - 32px);
    max-width: 100%;
  }
  .toast { white-space: normal; text-align: center; }
}

/* ─── 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 ─────────────────────────────────────────────────── */
.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-glass);
  backdrop-filter: blur(16px);
  border-bottom: 2px solid var(--rose);
  box-shadow: none;
  transition: box-shadow 220ms ease;
}

.header--scrolled {
  box-shadow: 0 4px 28px var(--shadow-lg);
}

.header-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.header-logo {
  height: 56px;
  width: auto;
  display: block;
  view-transition-name: site-logo;
  contain: layout;
}

.header-version {
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--pink-mid);
  background: var(--pink-soft);
  border: 1px solid var(--rose);
  border-radius: var(--radius-pill);
  padding: 2px 8px;
  letter-spacing: 0.03em;
  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, 204, 143, 0.1);
  border: 1px solid rgba(46, 204, 143, 0.3);
  border-radius: var(--radius-pill);
  padding: 3px 8px 3px 6px;
  font-size: 0.62rem;
  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-pill);
  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);
}

.search-hint-icon { font-size: 0.85rem; line-height: 1; }

.search-hint-kbd {
  display: inline-flex;
  align-items: center;
  padding: 1px 5px;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 5px;
  font-size: 0.68rem;
  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);
  border: none;
  border-radius: var(--radius-pill);
  color: white;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(233, 30, 140, 0.38);
  transition: transform var(--transition), box-shadow var(--transition);
  min-height: 44px;
}

.btn-sync:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(233, 30, 140, 0.48);
}

.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 tabs ──────────────────────────────────────────── */
.page-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  background: var(--pink-soft);
  border: 1.5px solid var(--rose);
  border-radius: var(--radius-pill);
  padding: 4px;
}

.page-tab {
  display: inline-flex;
  align-items: center;
  padding: 6px 18px;
  border: none;
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--text-sec);
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  transition: background var(--transition), color var(--transition), box-shadow var(--transition);
  white-space: nowrap;
}

.page-tab:hover {
  background: rgba(233, 30, 140, 0.08);
  color: var(--pink);
}

.page-tab.active {
  background: var(--pink);
  color: #fff;
  box-shadow: 0 2px 10px rgba(233, 30, 140, 0.35);
}

@media (max-width: 599px) {
  .page-tab { padding: 5px 14px; font-size: 0.8rem; }
  /* Hide desktop nav tabs — mobile bottom nav replaces them */
  .page-nav { display: none; }
}

/* ─── Trade Calculator CTA button ────────────────────────────── */
.btn-trade-cta {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  background: linear-gradient(135deg, var(--pink) 0%, var(--amvgg) 100%);
  border: none;
  border-radius: var(--radius-pill);
  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;
  overflow: hidden;
  box-shadow: 0 4px 18px rgba(233, 30, 140, 0.38), 0 2px 8px rgba(168, 85, 247, 0.28);
  transition: transform var(--transition), box-shadow var(--transition);
}

/* shimmer sweep */
.btn-trade-cta::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.25) 50%,
    transparent 100%
  );
  transform: translateX(-120%);
  animation: trade-shimmer 3.2s ease-in-out infinite;
  pointer-events: none;
}

@keyframes trade-shimmer {
  0%      { transform: translateX(-120%); }
  35%, 100% { transform: translateX(220%); }
}

.btn-trade-icon {
  font-size: 1.05rem;
  line-height: 1;
  display: inline-block;
}

.btn-trade-cta:hover {
  transform: translateY(-2px) scale(1.04);
  box-shadow: 0 8px 28px rgba(233, 30, 140, 0.52), 0 4px 14px rgba(168, 85, 247, 0.4);
}

.btn-trade-cta:active {
  transform: scale(0.97);
}

@media (max-width: 599px) {
  /* Bottom nav has a Trade button, so hide the duplicate header CTA */
  .btn-trade-cta { display: none; }
  /* Tighter gap — fewer items visible without page-nav */
  .header-right { gap: 10px; }
}

/* ─── 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);
  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-pill);
  color: var(--pink);
  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);
  border-color: var(--pink);
  color: #fff;
}

/* ─── Mobile bottom navigation ───────────────────────────────── */
.mobile-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 90;
  background: var(--bg-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1.5px solid var(--border);
  padding: 6px 0 calc(6px + env(safe-area-inset-bottom, 0px));
  justify-content: space-around;
  align-items: center;
}

@media (max-width: 599px) {
  .mobile-bottom-nav { display: flex; }
}

.mbnav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 6px 18px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 0;
  cursor: pointer;
  text-decoration: none;
  border-radius: var(--radius);
  transition: color var(--transition), background var(--transition);
  min-width: 56px;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.mbnav-item:hover,
.mbnav-item.active {
  color: var(--pink);
  background: var(--pink-soft);
}

.mbnav-icon {
  font-size: 1.2rem;
  line-height: 1;
}

.mbnav-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.mbnav-item.active .mbnav-icon {
  filter: drop-shadow(0 0 6px rgba(233, 30, 140, 0.5));
}

/* ─── 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);
}

.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);
  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.72rem;
  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); }
.footer-link-icon { font-size: 1rem; line-height: 1; vertical-align: middle; }

.footer-dot {
  font-size: 0.55rem;
  color: var(--border);
}

.footer-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.footer-copyright {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.footer-version {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--pink-mid);
  background: var(--pink-soft);
  border: 1px solid var(--rose);
  border-radius: var(--radius-pill);
  padding: 2px 9px;
  letter-spacing: 0.03em;
}

@media (max-width: 599px) {
  .footer-inner { padding: 16px 14px calc(72px + 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;
}

/* ─── Legal pages (Privacy Policy & Terms of Service) ─────────── */

.legal-hero {
  text-align: center;
  padding: 48px 20px 32px;
}

.legal-hero-icon {
  font-size: 2.4rem;
  line-height: 1;
  margin-bottom: 12px;
}

.legal-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 5vw, 2.6rem);
  color: var(--pink);
  margin: 0 0 8px;
  line-height: 1.2;
}

.legal-hero-meta {
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* ─── Content wrapper ─── */

.legal-wrap {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 20px 64px;
}

/* ─── Section cards ─── */

.legal-section {
  background: var(--bg-panel);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 28px;
  margin-bottom: 16px;
}

.legal-section h2 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--pink);
  margin: 0 0 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.legal-section h2 .section-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--pink-soft);
  border: 1px solid var(--rose);
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--pink);
  flex-shrink: 0;
}

.legal-section p {
  font-size: 0.9rem;
  color: var(--text-sec);
  line-height: 1.7;
  margin: 0 0 10px;
}

.legal-section p:last-child {
  margin-bottom: 0;
}

.legal-section ul {
  margin: 8px 0 10px 0;
  padding-left: 20px;
}

.legal-section ul li {
  font-size: 0.9rem;
  color: var(--text-sec);
  line-height: 1.7;
  margin-bottom: 4px;
}

.legal-section a {
  color: var(--pink);
  text-decoration: none;
  font-weight: 700;
}

.legal-section a:hover {
  text-decoration: underline;
}

/* ─── Contact callout ─── */

.legal-contact {
  background: var(--pink-soft);
  border: 1.5px solid var(--rose);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin-top: 24px;
  text-align: center;
}

.legal-contact p {
  font-size: 0.88rem;
  color: var(--text-sec);
  margin: 0;
  line-height: 1.6;
}

.legal-contact a {
  color: var(--pink);
  font-weight: 700;
  text-decoration: none;
}

.legal-contact a:hover {
  text-decoration: underline;
}

/* ─── Back link ─── */

.legal-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-sec);
  text-decoration: none;
  margin-bottom: 24px;
  transition: color var(--transition);
}

.legal-back:hover {
  color: var(--pink);
}
