/* ───────────────────────────────────────────────────────────────────────────
 * maxpaterson.space — shared "MP chrome" for the sectioned app pages.
 *
 * Holidays / Games / Finances each render as a set of thin sub-pages that link
 * this file and let nav.js inject the top bar, section header, and the bottom
 * selector row. Keeping the chrome here (instead of inlining it 12×) is what
 * stops the four bottom rows from drifting apart.
 *
 * Canonical dark tokens — kept identical to the landing page (mp-space/index.html).
 * The deals tracker and catch-up lobby still inline their own copies; match this.
 * ─────────────────────────────────────────────────────────────────────────── */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }

:root {
  --bg:         #0A0A0B;
  --text:       rgba(255,255,255,0.96);
  --text-2:     rgba(255,255,255,0.45);
  --text-3:     rgba(255,255,255,0.30);
  --surface:    rgba(255,255,255,0.06);
  --surface-hi: rgba(255,255,255,0.11);
  --border:     rgba(255,255,255,0.12);
  --border-hi:  rgba(255,255,255,0.22);
  --accent:     #7A6BFF;
  --accent-2:   #9D8FFF;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", system-ui, sans-serif;
}

html, body {
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
}
body { overflow-x: hidden; }

/* ── Ambient blobs — identical family to the landing page ─────────────────── */
.bg { position: fixed; inset: 0; overflow: hidden; z-index: 0; pointer-events: none; }
.bg .blob {
  position: absolute;
  width: 70vmax; height: 70vmax;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.55;
  will-change: transform;
}
.bg .b1 { background: #7A6BFF; animation: drift1 32s ease-in-out infinite; }
.bg .b2 { background: #2DC8C0; animation: drift2 38s ease-in-out infinite; }
.bg .b3 { background: #B86BFF; animation: drift3 44s ease-in-out infinite; }

@keyframes drift1 { 0%,100% { transform: translate(-25vw,-15vh) scale(1); }   50% { transform: translate(15vw,10vh)  scale(1.25); } }
@keyframes drift2 { 0%,100% { transform: translate(30vw,40vh)  scale(1.2); }  50% { transform: translate(-15vw,25vh) scale(0.9);  } }
@keyframes drift3 { 0%,100% { transform: translate(50vw,15vh)  scale(0.9); }  50% { transform: translate(15vw,60vh)  scale(1.15); } }

/* ── Top bar — home affordance ────────────────────────────────────────────── */
.topbar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center;
  padding: 12px 18px 8px;
  padding-top: calc(12px + env(safe-area-inset-top));
}
.home-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 16px 9px 12px;
  border-radius: 100px;
  font-size: 13px; font-weight: 600; letter-spacing: 0.01em;
  text-decoration: none;
  color: rgba(255,255,255,0.78);
  background: var(--surface);
  border: 1px solid var(--border);
  transition: color .2s ease, background .2s ease, border-color .2s ease, transform .2s ease;
}
.home-btn:hover { color: rgba(255,255,255,0.98); background: var(--surface-hi); border-color: var(--border-hi); transform: translateY(-1px); }
.home-btn svg { width: 16px; height: 16px; }

/* ── Content column ───────────────────────────────────────────────────────── */
.content {
  position: relative; z-index: 1;
  width: 100%; max-width: 440px;
  margin: 0 auto;
  padding: 0 20px calc(110px + env(safe-area-inset-bottom));
  display: flex; flex-direction: column;
}

/* Section header (title + tagline) — injected by nav.js */
.section-head { text-align: center; padding: 18px 4px 22px; }
.section-head h1 {
  font-size: clamp(34px, 6.5vw, 54px);
  font-weight: 700; letter-spacing: -0.03em;
  background: linear-gradient(135deg, #D4AF7F 0%, #FFFFFF 35%, #9D8FFF 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.section-head .tagline {
  margin-top: 6px;
  font-size: clamp(13px, 2.6vw, 15px); font-weight: 600;
  letter-spacing: 0.01em; color: var(--text-2);
}

/* ── Cards ────────────────────────────────────────────────────────────────── */
.card-list { display: flex; flex-direction: column; gap: 12px; }
.card {
  display: flex; flex-direction: column; gap: 4px;
  padding: 16px 20px; border-radius: 18px;
  text-decoration: none; text-align: left;
  background: var(--surface); border: 1px solid var(--border);
  transition: color .2s ease, background .2s ease, border-color .2s ease, transform .2s ease;
}
.card:hover { background: var(--surface-hi); border-color: var(--border-hi); transform: translateY(-2px); }
.card-title { font-size: 16px; font-weight: 600; color: rgba(255,255,255,0.92); }
.card-desc  { font-size: 13px; color: var(--text-2); letter-spacing: 0.01em; }
.card.soon  { opacity: 0.5; pointer-events: none; }

/* Small uppercase label above a group of cards */
.group-label {
  font-size: 11px; font-weight: 700; letter-spacing: 0.10em; text-transform: uppercase;
  color: var(--text-3); margin: 22px 4px 10px;
}
.group-label:first-child { margin-top: 4px; }

/* ── Empty / placeholder state ────────────────────────────────────────────── */
.empty {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  gap: 12px; padding: 52px 24px;
  border-radius: 20px;
  background: rgba(255,255,255,0.03);
  border: 1px dashed var(--border);
}
.empty .empty-icon {
  width: 48px; height: 48px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  background: var(--surface); color: var(--accent-2);
}
.empty .empty-icon svg { width: 24px; height: 24px; }
.empty h2 { font-size: 16px; font-weight: 600; color: rgba(255,255,255,0.85); }
.empty p  { font-size: 13px; color: var(--text-3); max-width: 270px; line-height: 1.55; }

/* ── Bottom selector row — injected by nav.js ─────────────────────────────── */
.botnav {
  position: fixed; left: 14px; right: 14px;
  bottom: calc(14px + env(safe-area-inset-bottom));
  z-index: 100; max-width: 460px; margin: 0 auto;
  display: flex; gap: 4px; padding: 6px;
  background: rgba(28,28,32,0.86);
  backdrop-filter: blur(28px) saturate(180%);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 999px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.4);
}
.nav-item {
  flex: 1;
  min-height: 44px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  padding: 9px 4px 7px;
  border-radius: 999px;
  text-decoration: none;
  color: rgba(255,255,255,0.55);
  font-size: 10px; font-weight: 700; letter-spacing: 0.03em;
  transition: background .16s ease, color .16s ease, transform .12s ease;
}
.nav-item:active { transform: scale(0.94); }
.nav-item svg { width: 22px; height: 22px; }
.nav-item span { white-space: nowrap; }
.nav-item.active { background: rgba(122,107,255,0.22); color: var(--accent-2); }

/* ── Games: "playing as" chip + cross-game scoreboard (injected by nav.js) ── */
.playing-as {
  display: inline-flex; align-self: center; align-items: center; gap: 9px;
  margin-bottom: 16px; padding: 7px 15px 7px 7px;
  border-radius: 100px;
  background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.10);
  font-size: 13px; color: rgba(255,255,255,0.6);
}
.playing-as .pa-ava {
  width: 26px; height: 26px; border-radius: 8px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 15px; line-height: 1;
  box-shadow: inset 0 0 0 1.5px rgba(255,255,255,0.18);
}
.playing-as b { color: rgba(255,255,255,0.92); font-weight: 600; }

.scoreboard {
  margin-bottom: 16px; padding: 12px 16px;
  border-radius: 16px;
  background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.10);
  text-align: left;
}
.scoreboard .sb-head { font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: rgba(255,255,255,0.4); margin-bottom: 8px; display: flex; justify-content: space-between; gap: 10px; }
.scoreboard .sb-row  { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; padding: 3px 0; color: rgba(255,255,255,0.68); }
.scoreboard .sb-row b { color: #ffd23f; font-weight: 700; }

/* ── Accessibility: keyboard focus + disabled affordance ──────────────────── */
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, [tabindex]:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 2px; }
button:disabled, .btn:disabled { cursor: not-allowed; }

@media (prefers-reduced-motion: reduce) {
  .bg .blob { animation: none; }
}

@media (prefers-reduced-motion: reduce){ *,*::before,*::after{ animation-duration:.01ms !important; animation-iteration-count:1 !important; transition-duration:.01ms !important; scroll-behavior:auto !important; } }
