/* ============================================================
   LittleSpaceHub v4 — Main Styles (v3 look, kept)
   Fonts: Baloo 2 (display) + Nunito (body)
   Mobile-first, CSS token system, 14 themes
   ============================================================ */


/* ─── Reset ─────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Nunito', sans-serif;
  font-size: 15px;
  line-height: 1.6;
  color: var(--text);
  background-color: var(--bg);
  background-image: var(--bg-art);
  background-attachment: fixed;
  background-size: cover;
  min-height: 100dvh;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* ─── Themes ─────────────────────────────────────────────── */

/* Blush (default) */
:root, :root[data-theme="blush"] {
  --bg: #fef6fb;
  --bg-art: radial-gradient(900px 500px at 5% -5%, rgba(233,111,173,0.14) 0%, transparent 55%),
            radial-gradient(700px 400px at 95% 5%, rgba(167,139,250,0.1) 0%, transparent 50%),
            radial-gradient(600px 400px at 50% 110%, rgba(233,111,173,0.07) 0%, transparent 50%);
  --card: #ffffff;
  --card-2: #fdf2fa;
  --text: #2d1f3d;
  --text-2: #6b5980;
  --muted: #9b88ab;
  --brand: #e96fad;
  --brand-2: #a78bfa;
  --brand-3: #5eead4;
  --accent: #fbbf24;
  --ring: rgba(233,111,173,0.3);
  --border: #f0e4f7;
  --border-2: #e6d5f5;
  --shadow: 0 2px 12px rgba(140,60,130,0.08);
  --shadow-md: 0 6px 24px rgba(140,60,130,0.12);
  --shadow-lg: 0 12px 40px rgba(140,60,130,0.16);
  --r-sm: 8px; --r-md: 12px; --r-lg: 16px; --r-xl: 20px; --r-pill: 999px;
  --header-bg: rgba(254,246,251,0.88);
  --header-border: var(--border);
}

:root[data-theme="plushie"] {
  --bg: #fffbf5; --bg-art: radial-gradient(800px 400px at 10% -5%, rgba(255,183,177,0.2) 0%, transparent 55%), radial-gradient(600px 350px at 90% 5%, rgba(186,225,255,0.15) 0%, transparent 50%);
  --card: #fffdf8; --card-2: #fff5ee; --text: #3b2a1e; --text-2: #7a5940; --muted: #a58970;
  --brand: #f4967e; --brand-2: #bae1ff; --brand-3: #a8e6cf; --accent: #ffd166;
  --ring: rgba(244,150,126,0.3); --border: #ffe8d9; --border-2: #ffd5c0;
  --shadow: 0 2px 12px rgba(180,90,60,0.07); --shadow-md: 0 6px 24px rgba(180,90,60,0.11); --shadow-lg: 0 12px 40px rgba(180,90,60,0.15);
  --r-sm: 8px; --r-md: 12px; --r-lg: 16px; --r-xl: 20px; --r-pill: 999px;
  --header-bg: rgba(255,251,245,0.88); --header-border: var(--border);
}

:root[data-theme="mint"] {
  --bg: #f2fdf7; --bg-art: radial-gradient(800px 400px at 5% -5%, rgba(94,234,212,0.15) 0%, transparent 55%), radial-gradient(600px 350px at 95% 10%, rgba(134,239,172,0.12) 0%, transparent 50%);
  --card: #ffffff; --card-2: #edfaf4; --text: #0f2820; --text-2: #2a6050; --muted: #6a9985;
  --brand: #0ea576; --brand-2: #38bdf8; --brand-3: #a78bfa; --accent: #fbbf24;
  --ring: rgba(14,165,118,0.25); --border: #c6f0de; --border-2: #a7e7cc;
  --shadow: 0 2px 12px rgba(10,100,70,0.07); --shadow-md: 0 6px 24px rgba(10,100,70,0.11); --shadow-lg: 0 12px 40px rgba(10,100,70,0.14);
  --r-sm: 8px; --r-md: 12px; --r-lg: 16px; --r-xl: 20px; --r-pill: 999px;
  --header-bg: rgba(242,253,247,0.88); --header-border: var(--border);
}

:root[data-theme="cloud"] {
  --bg: #f0f8ff; --bg-art: radial-gradient(700px 360px at -5% 5%, rgba(255,255,255,0.85) 0%, transparent 55%), radial-gradient(800px 400px at 105% 0%, rgba(255,255,255,0.8) 0%, transparent 55%), linear-gradient(180deg, #e8f5ff 0%, #f0f8ff 100%);
  --card: #ffffff; --card-2: #eef8ff; --text: #1a2f45; --text-2: #3a5875; --muted: #7a9ab8;
  --brand: #3b90e3; --brand-2: #60c8e8; --brand-3: #a78bfa; --accent: #fbbf24;
  --ring: rgba(59,144,227,0.25); --border: #d0e8f8; --border-2: #b8d8f4;
  --shadow: 0 2px 12px rgba(30,80,140,0.07); --shadow-md: 0 6px 24px rgba(30,80,140,0.11); --shadow-lg: 0 12px 40px rgba(30,80,140,0.14);
  --r-sm: 8px; --r-md: 12px; --r-lg: 16px; --r-xl: 20px; --r-pill: 999px;
  --header-bg: rgba(240,248,255,0.88); --header-border: var(--border);
}

:root[data-theme="rainbow"] {
  --bg: #fff8ff; --bg-art: radial-gradient(900px 450px at 0% -5%, rgba(255,182,255,0.2) 0%, transparent 50%), radial-gradient(700px 400px at 100% 0%, rgba(182,210,255,0.2) 0%, transparent 50%);
  --card: #ffffff; --card-2: #fdf5ff; --text: #2a1a3a; --text-2: #6040a0; --muted: #a070d0;
  --brand: #d060e0; --brand-2: #6080f0; --brand-3: #20d0a0; --accent: #f0b820;
  --ring: rgba(208,96,224,0.25); --border: #f0d8ff; --border-2: #e0c0ff;
  --shadow: 0 2px 12px rgba(120,60,160,0.08); --shadow-md: 0 6px 24px rgba(120,60,160,0.12); --shadow-lg: 0 12px 40px rgba(120,60,160,0.16);
  --r-sm: 8px; --r-md: 12px; --r-lg: 16px; --r-xl: 20px; --r-pill: 999px;
  --header-bg: rgba(255,248,255,0.88); --header-border: var(--border);
}

:root[data-theme="bedtime"] {
  --bg: #0d1025; --bg-art: radial-gradient(900px 500px at 10% -10%, rgba(167,139,250,0.2) 0%, transparent 55%), radial-gradient(700px 400px at 90% 5%, rgba(96,165,250,0.15) 0%, transparent 50%);
  --card: #161a36; --card-2: #111430; --text: #e8eaff; --text-2: #a8b0e0; --muted: #7080b8;
  --brand: #a78bfa; --brand-2: #60a5fa; --brand-3: #5eead4; --accent: #fbbf24;
  --ring: rgba(167,139,250,0.3); --border: #222650; --border-2: #2a2e58;
  --shadow: 0 2px 12px rgba(0,0,30,0.3); --shadow-md: 0 6px 24px rgba(0,0,30,0.4); --shadow-lg: 0 12px 40px rgba(0,0,30,0.5);
  --r-sm: 8px; --r-md: 12px; --r-lg: 16px; --r-xl: 20px; --r-pill: 999px;
  --header-bg: rgba(13,16,37,0.92); --header-border: var(--border);
}

:root[data-theme="midnight"] {
  --bg: #080c14; --bg-art: none;
  --card: #0e1420; --card-2: #0b1018; --text: #e0e8ff; --text-2: #8899cc; --muted: #4a5a88;
  --brand: #4f46e5; --brand-2: #22d3ee; --brand-3: #a78bfa; --accent: #fbbf24;
  --ring: rgba(79,70,229,0.35); --border: #161e30; --border-2: #1e2840;
  --shadow: 0 2px 12px rgba(0,0,20,0.4); --shadow-md: 0 6px 24px rgba(0,0,20,0.5); --shadow-lg: 0 12px 40px rgba(0,0,20,0.6);
  --r-sm: 8px; --r-md: 12px; --r-lg: 16px; --r-xl: 20px; --r-pill: 999px;
  --header-bg: rgba(8,12,20,0.95); --header-border: var(--border);
}

:root[data-theme="lavender"] {
  --bg: #f7f3ff; --bg-art: radial-gradient(900px 450px at 10% -5%, rgba(196,181,253,0.2) 0%, transparent 55%), radial-gradient(700px 400px at 90% 10%, rgba(233,213,255,0.2) 0%, transparent 55%);
  --card: #ffffff; --card-2: #f2ecff; --text: #1e0a40; --text-2: #5030a0; --muted: #9070c0;
  --brand: #7c3aed; --brand-2: #c084fc; --brand-3: #5eead4; --accent: #fbbf24;
  --ring: rgba(124,58,237,0.25); --border: #ddd0f5; --border-2: #ccc0f0;
  --shadow: 0 2px 12px rgba(80,30,160,0.08); --shadow-md: 0 6px 24px rgba(80,30,160,0.12); --shadow-lg: 0 12px 40px rgba(80,30,160,0.16);
  --r-sm: 8px; --r-md: 12px; --r-lg: 16px; --r-xl: 20px; --r-pill: 999px;
  --header-bg: rgba(247,243,255,0.88); --header-border: var(--border);
}

:root[data-theme="sunset"] {
  --bg: #fff8f0; --bg-art: radial-gradient(900px 450px at 5% -5%, rgba(255,180,100,0.18) 0%, transparent 55%), radial-gradient(700px 400px at 95% 5%, rgba(255,100,150,0.14) 0%, transparent 55%);
  --card: #ffffff; --card-2: #fff2e6; --text: #2d1400; --text-2: #804020; --muted: #c07050;
  --brand: #f06030; --brand-2: #e0408a; --brand-3: #6080f0; --accent: #fbbf24;
  --ring: rgba(240,96,48,0.28); --border: #ffe0cc; --border-2: #ffcaaa;
  --shadow: 0 2px 12px rgba(180,80,20,0.08); --shadow-md: 0 6px 24px rgba(180,80,20,0.12); --shadow-lg: 0 12px 40px rgba(180,80,20,0.16);
  --r-sm: 8px; --r-md: 12px; --r-lg: 16px; --r-xl: 20px; --r-pill: 999px;
  --header-bg: rgba(255,248,240,0.88); --header-border: var(--border);
}

/* ─── v4 themes ─────────────────────────────────────────── */
:root[data-theme="bubblegum"] {
  --bg: #fff4fa; --bg-art: radial-gradient(900px 450px at 0% -5%, rgba(255,95,162,0.18) 0%, transparent 55%), radial-gradient(700px 400px at 100% 0%, rgba(125,211,252,0.18) 0%, transparent 50%);
  --card: #ffffff; --card-2: #fff0f7; --text: #3a1028; --text-2: #8a3a66; --muted: #c07aa0;
  --brand: #ff5fa2; --brand-2: #7dd3fc; --brand-3: #fde047; --accent: #fde047;
  --ring: rgba(255,95,162,0.28); --border: #ffd9ea; --border-2: #ffc4de;
  --shadow: 0 2px 12px rgba(200,40,120,0.08); --shadow-md: 0 6px 24px rgba(200,40,120,0.12); --shadow-lg: 0 12px 40px rgba(200,40,120,0.16);
  --r-sm: 8px; --r-md: 12px; --r-lg: 16px; --r-xl: 20px; --r-pill: 999px;
  --header-bg: rgba(255,244,250,0.88); --header-border: var(--border);
}
:root[data-theme="honey"] {
  --bg: #fffaeb; --bg-art: radial-gradient(900px 450px at 5% -5%, rgba(250,204,21,0.18) 0%, transparent 55%), radial-gradient(700px 400px at 95% 5%, rgba(217,119,6,0.1) 0%, transparent 55%);
  --card: #fffdf5; --card-2: #fff6d9; --text: #3a2600; --text-2: #7a5410; --muted: #b08840;
  --brand: #c98a00; --brand-2: #f59e0b; --brand-3: #a3e635; --accent: #f59e0b;
  --ring: rgba(201,138,0,0.28); --border: #fbe8b0; --border-2: #f6d98a;
  --shadow: 0 2px 12px rgba(150,100,0,0.08); --shadow-md: 0 6px 24px rgba(150,100,0,0.12); --shadow-lg: 0 12px 40px rgba(150,100,0,0.16);
  --r-sm: 8px; --r-md: 12px; --r-lg: 16px; --r-xl: 20px; --r-pill: 999px;
  --header-bg: rgba(255,250,235,0.9); --header-border: var(--border);
}
:root[data-theme="ocean"] {
  --bg: #effcff; --bg-art: radial-gradient(900px 450px at 5% -5%, rgba(8,145,178,0.15) 0%, transparent 55%), radial-gradient(700px 400px at 95% 5%, rgba(45,212,191,0.14) 0%, transparent 55%);
  --card: #ffffff; --card-2: #e8f9fd; --text: #062a33; --text-2: #1f5f6e; --muted: #5f97a5;
  --brand: #0891b2; --brand-2: #2dd4bf; --brand-3: #a78bfa; --accent: #fbbf24;
  --ring: rgba(8,145,178,0.25); --border: #c8eef6; --border-2: #a9e2ef;
  --shadow: 0 2px 12px rgba(0,80,110,0.08); --shadow-md: 0 6px 24px rgba(0,80,110,0.12); --shadow-lg: 0 12px 40px rgba(0,80,110,0.15);
  --r-sm: 8px; --r-md: 12px; --r-lg: 16px; --r-xl: 20px; --r-pill: 999px;
  --header-bg: rgba(239,252,255,0.9); --header-border: var(--border);
}
:root[data-theme="starlight"] {
  --bg: #120a1f; --bg-art: radial-gradient(1.5px 1.5px at 12% 18%, #fff8 50%, transparent 51%), radial-gradient(1px 1px at 70% 30%, #fff9 50%, transparent 51%), radial-gradient(1.5px 1.5px at 40% 75%, #fff7 50%, transparent 51%), radial-gradient(1px 1px at 85% 80%, #fff8 50%, transparent 51%), radial-gradient(900px 500px at 10% -10%, rgba(240,171,252,0.18) 0%, transparent 55%), radial-gradient(700px 400px at 90% 5%, rgba(129,140,248,0.14) 0%, transparent 50%);
  --card: #1d1330; --card-2: #170f28; --text: #fbefff; --text-2: #d6b9e8; --muted: #9c80b4;
  --brand: #f0abfc; --brand-2: #818cf8; --brand-3: #67e8f9; --accent: #fde68a;
  --ring: rgba(240,171,252,0.3); --border: #2e1f48; --border-2: #3a2858;
  --shadow: 0 2px 12px rgba(0,0,0,0.35); --shadow-md: 0 6px 24px rgba(0,0,0,0.45); --shadow-lg: 0 12px 40px rgba(0,0,0,0.55);
  --r-sm: 8px; --r-md: 12px; --r-lg: 16px; --r-xl: 20px; --r-pill: 999px;
  --header-bg: rgba(18,10,31,0.92); --header-border: var(--border);
}
:root[data-theme="nightlight"] {
  --bg: #0b0f1a; --bg-art: radial-gradient(600px 380px at 85% -5%, rgba(251,191,36,0.16) 0%, transparent 60%), radial-gradient(800px 500px at 0% 100%, rgba(30,58,138,0.35) 0%, transparent 60%);
  --card: #141a2a; --card-2: #10162a; --text: #fdf6e3; --text-2: #d8c9a3; --muted: #8f8670;
  --brand: #fbbf24; --brand-2: #fb923c; --brand-3: #93c5fd; --accent: #fde68a;
  --ring: rgba(251,191,36,0.28); --border: #222a40; --border-2: #2c3550;
  --shadow: 0 2px 12px rgba(0,0,0,0.4); --shadow-md: 0 6px 24px rgba(0,0,0,0.5); --shadow-lg: 0 12px 40px rgba(0,0,0,0.6);
  --r-sm: 8px; --r-md: 12px; --r-lg: 16px; --r-xl: 20px; --r-pill: 999px;
  --header-bg: rgba(11,15,26,0.94); --header-border: var(--border);
}
:root[data-theme="nightlight"] .btn-primary, :root[data-theme="honey"] .btn-primary { color: #2a1a00 !important; }

/* ─── Typography ─────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 { font-family: 'Baloo 2', cursive; font-weight: 700; color: var(--text); line-height: 1.25; }
h1 { font-size: clamp(1.6rem, 4vw, 2.2rem); }
h2 { font-size: clamp(1.3rem, 3vw, 1.7rem); }
h3 { font-size: 1.2rem; }
p { color: var(--text-2); }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
small, .text-xs { font-size: 12px; }
.text-sm { font-size: 13px; }
.text-muted { color: var(--muted); }
.text-2 { color: var(--text-2); }
.hint { font-size: 12px; color: var(--muted); }

/* ─── Layout ─────────────────────────────────────────────── */
.container { width: 100%; max-width: 1100px; margin: 0 auto; padding: 0 16px; }
.inner { display: flex; align-items: center; gap: 12px; }
.flex { display: flex; }
.flex-col { display: flex; flex-direction: column; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.flex-center { display: flex; justify-content: center; align-items: center; }
.flex-wrap { flex-wrap: wrap; }
.gap-4 { gap: 4px; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.mt-4 { margin-top: 4px; }
.mt-8 { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mb-4 { margin-bottom: 4px; }
.mb-8 { margin-bottom: 8px; }
.mb-12 { margin-bottom: 12px; }
.mb-16 { margin-bottom: 16px; }
.grid { display: grid; }
.grid-2 { grid-template-columns: 1fr 1fr; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-auto { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }

/* ─── Header ─────────────────────────────────────────────── */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--header-bg);
  border-bottom: 1px solid var(--header-border);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  height: 60px;
}
.site-header .inner { height: 60px; justify-content: space-between; }
.site-logo {
  font-family: 'Baloo 2', cursive;
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--brand);
  text-decoration: none;
  white-space: nowrap;
}
.site-logo:hover { text-decoration: none; opacity: 0.85; }
.nav-actions { display: flex; align-items: center; gap: 8px; }

/* ─── Bottom nav (mobile) ────────────────────────────────── */
.bottom-nav {
  display: none;
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 100;
  background: var(--header-bg);
  border-top: 1px solid var(--header-border);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 4px 0 env(safe-area-inset-bottom, 4px);
}
.bottom-nav-inner { display: grid; grid-template-columns: repeat(5, 1fr); }
.bottom-nav-item {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 6px 4px; font-size: 10px; color: var(--text-2);
  text-decoration: none; cursor: pointer; border: none; background: none;
  font-family: 'Nunito', sans-serif; font-weight: 600;
  transition: color 0.15s ease;
}
.bottom-nav-item .nav-icon { font-size: 20px; line-height: 1; }
.bottom-nav-item.active, .bottom-nav-item:hover { color: var(--brand); }
@media (max-width: 640px) {
  .bottom-nav { display: block; }
  .hide-mobile { display: none !important; }
  body { padding-bottom: calc(60px + env(safe-area-inset-bottom, 0px)); }
  main { padding-top: 8px; }
}

/* ─── Cards ──────────────────────────────────────────────── */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 16px;
  box-shadow: var(--shadow);
}
.card-sm { padding: 12px; border-radius: var(--r-md); }
.card-lg { padding: 24px; border-radius: var(--r-xl); }
.section-title {
  font-family: 'Baloo 2', cursive;
  font-size: 14px; font-weight: 700;
  color: var(--text-2); text-transform: uppercase;
  letter-spacing: 0.05em; margin-bottom: 12px;
}

/* ─── Buttons ────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 8px 16px; border-radius: var(--r-md);
  font-family: 'Nunito', sans-serif; font-size: 14px; font-weight: 700;
  border: 1.5px solid var(--border-2); background: var(--card); color: var(--text);
  cursor: pointer; text-decoration: none; transition: all 0.15s ease;
  white-space: nowrap; user-select: none;
}
.btn:hover { border-color: var(--brand); color: var(--brand); text-decoration: none; transform: translateY(-1px); box-shadow: var(--shadow); }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--brand); border-color: var(--brand); color: #fff !important; }
.btn-primary:hover { opacity: 0.9; color: #fff !important; }
.btn-ghost { background: transparent; border-color: transparent; }
.btn-ghost:hover { background: var(--card-2); border-color: var(--border); }
.btn-sm { padding: 5px 12px; font-size: 13px; }
.btn-lg { padding: 12px 24px; font-size: 15px; }
.btn-wide { width: 100%; }
.btn-pill { border-radius: var(--r-pill); }
.btn-icon { padding: 8px; width: 36px; height: 36px; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

/* ─── Inputs ─────────────────────────────────────────────── */
input[type="text"], input[type="password"], input[type="email"], input[type="search"],
textarea, select {
  width: 100%; padding: 10px 14px;
  background: var(--card); color: var(--text);
  border: 1.5px solid var(--border-2); border-radius: var(--r-md);
  font-family: 'Nunito', sans-serif; font-size: 14px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  outline: none;
}
input:focus, textarea:focus, select:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--ring);
}
input::placeholder, textarea::placeholder { color: var(--muted); }
textarea { resize: vertical; min-height: 80px; }
label { font-size: 13px; font-weight: 600; color: var(--text-2); display: block; margin-bottom: 4px; }
.form-group { margin-bottom: 16px; }
.field-hint { font-size: 12px; color: var(--muted); margin-top: 4px; }

/* ─── Checkboxes ─────────────────────────────────────────── */
.check-label { display: flex; align-items: center; gap: 8px; cursor: pointer; font-size: 14px; color: var(--text); }
.check-label input[type="checkbox"] { width: 16px; height: 16px; cursor: pointer; accent-color: var(--brand); }

/* ─── Progress bar ───────────────────────────────────────── */
.progress-track { background: var(--border); border-radius: var(--r-pill); height: 8px; overflow: hidden; }
.progress-fill { background: linear-gradient(90deg, var(--brand), var(--brand-2)); height: 100%; border-radius: var(--r-pill); transition: width 0.4s ease; }

/* ─── Stat bars (pet) ────────────────────────────────────── */
.stat-bar { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.stat-label { font-size: 12px; color: var(--muted); width: 60px; flex-shrink: 0; }
.stat-track { flex: 1; background: var(--border); border-radius: var(--r-pill); height: 10px; overflow: hidden; }
.stat-fill { height: 100%; border-radius: var(--r-pill); transition: width 0.4s ease; }
.stat-fill.hunger  { background: linear-gradient(90deg, #f97316, #fb923c); }
.stat-fill.happy   { background: linear-gradient(90deg, var(--brand), var(--brand-2)); }
.stat-fill.energy  { background: linear-gradient(90deg, #3b82f6, #60a5fa); }

/* ─── Badge / Tag ────────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 8px; border-radius: var(--r-pill);
  font-size: 11px; font-weight: 700;
  background: var(--card-2); color: var(--text-2); border: 1px solid var(--border-2);
}
.badge-brand { background: var(--ring); color: var(--brand); border-color: var(--brand); }

/* ─── Mood tags ──────────────────────────────────────────── */
.mood-grid { display: flex; flex-wrap: wrap; gap: 6px; }
.mood-chip {
  padding: 4px 10px; border-radius: var(--r-pill);
  border: 1.5px solid var(--border-2); background: var(--card-2);
  font-size: 13px; cursor: pointer; transition: all 0.15s ease;
}
.mood-chip:hover, .mood-chip.active { border-color: var(--brand); background: var(--ring); color: var(--brand); }

/* ─── Theme swatches ─────────────────────────────────────── */
.theme-swatch {
  width: 22px; height: 22px; border-radius: 50%; cursor: pointer;
  border: 2px solid transparent; transition: transform 0.15s ease, border-color 0.15s ease;
  flex-shrink: 0;
}
.theme-swatch:hover { transform: scale(1.2); }
.theme-swatch.active { border-color: var(--text); transform: scale(1.15); }

/* ─── Toast notifications ────────────────────────────────── */
#toast-container {
  position: fixed; bottom: 80px; right: 16px; z-index: 500;
  display: flex; flex-direction: column; gap: 8px; pointer-events: none;
}
@media (min-width: 641px) { #toast-container { bottom: 24px; } }
.toast {
  background: var(--card); border: 1px solid var(--border-2);
  border-radius: var(--r-lg); padding: 12px 16px;
  box-shadow: var(--shadow-lg); font-size: 14px; color: var(--text);
  display: flex; align-items: center; gap: 8px;
  animation: toast-in 0.2s ease; pointer-events: auto;
  max-width: 300px;
}
.toast.removing { animation: toast-out 0.2s ease forwards; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes toast-out { to { opacity: 0; transform: translateY(8px); } }

/* ─── Modal ──────────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0; z-index: 300;
  background: rgba(0,0,0,0.4); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center; padding: 16px;
}
.modal-overlay[hidden] { display: none; }
.modal-box {
  background: var(--card); border: 1px solid var(--border-2);
  border-radius: var(--r-xl); padding: 24px; width: 100%; max-width: 480px;
  box-shadow: var(--shadow-lg); animation: modal-in 0.2s ease;
}
.modal-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 16px; }
@keyframes modal-in { from { opacity: 0; transform: scale(0.95) translateY(8px); } to { opacity: 1; transform: scale(1) translateY(0); } }

/* ─── Tile grid (home page) ──────────────────────────────── */
.grid-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.tile {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 4px; padding: 12px 8px; text-align: center;
  background: var(--card-2); border: 1px solid var(--border);
  border-radius: var(--r-md); text-decoration: none; color: var(--text);
  transition: all 0.15s ease; cursor: pointer;
  font-size: 13px; font-weight: 600; min-height: 72px;
}
.tile:hover { border-color: var(--brand); color: var(--brand); transform: translateY(-2px); box-shadow: var(--shadow); text-decoration: none; }
.tile-icon { font-size: 22px; line-height: 1; }
.tile-label { font-size: 11px; color: var(--text-2); font-weight: 600; }

/* ─── Status feed (mini) ─────────────────────────────────── */
.mini-status {
  display: flex; gap: 8px; padding: 8px 0;
  border-bottom: 1px solid var(--border);
}
.mini-status:last-child { border-bottom: none; }
.mini-status-avatar { font-size: 20px; flex-shrink: 0; }
.mini-status-body { flex: 1; min-width: 0; }
.mini-status-name { font-size: 12px; font-weight: 700; color: var(--text-2); }
.mini-status-text { font-size: 13px; color: var(--text); word-break: break-word; }

/* ─── Pet ────────────────────────────────────────────────── */
.pet-display {
  display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 16px 0;
}
.pet-sprite {
  font-size: 72px; line-height: 1;
  animation: pet-float 3s ease-in-out infinite;
  cursor: pointer; user-select: none;
  transition: transform 0.15s ease;
}
.pet-sprite:hover { transform: scale(1.1); }
.pet-sprite:active { transform: scale(0.9); }
@keyframes pet-float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
.pet-name { font-family: 'Baloo 2', cursive; font-size: 1.1rem; font-weight: 700; color: var(--brand); }
.pet-mood { font-size: 13px; color: var(--text-2); font-style: italic; }

/* ─── Star jar ───────────────────────────────────────────── */
.star-jar { font-size: 18px; line-height: 1.4; min-height: 24px; letter-spacing: 2px; }

/* ─── Divider ────────────────────────────────────────────── */
.divider { border: none; border-top: 1px solid var(--border); margin: 12px 0; }

/* ─── Alert / Flash ──────────────────────────────────────── */
.alert { padding: 12px 16px; border-radius: var(--r-md); font-size: 14px; margin-bottom: 16px; }
.alert-error { background: rgba(239,68,68,0.1); border: 1px solid rgba(239,68,68,0.3); color: #dc2626; }
.alert-success { background: rgba(34,197,94,0.1); border: 1px solid rgba(34,197,94,0.3); color: #16a34a; }

/* ─── Auth pages ─────────────────────────────────────────── */
.auth-wrap { min-height: 100dvh; display: flex; align-items: center; justify-content: center; padding: 24px 16px; }
.auth-card { width: 100%; max-width: 420px; }
.auth-logo { text-align: center; font-size: 2.5rem; margin-bottom: 8px; }
.auth-title { text-align: center; margin-bottom: 4px; }
.auth-sub { text-align: center; color: var(--muted); font-size: 13px; margin-bottom: 24px; }
.auth-divider { display: flex; align-items: center; gap: 12px; margin: 20px 0; color: var(--muted); font-size: 12px; }
.auth-divider::before, .auth-divider::after { content: ''; flex: 1; border-top: 1px solid var(--border); }

/* ─── Page hero ──────────────────────────────────────────── */
.page-hero { padding: 24px 0 8px; }

/* ─── Footer ─────────────────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--border); padding: 20px 0;
  font-size: 13px; color: var(--muted); margin-top: 40px;
}
.site-footer .inner { justify-content: space-between; flex-wrap: wrap; gap: 8px; }

/* ─── Loading spinner ────────────────────────────────────── */
.spinner {
  width: 20px; height: 20px;
  border: 2px solid var(--border-2); border-top-color: var(--brand);
  border-radius: 50%; animation: spin 0.6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ─── Pair badge ─────────────────────────────────────────── */
.pair-badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: var(--r-pill);
  background: var(--ring); border: 1px solid var(--brand);
  font-size: 12px; font-weight: 600; color: var(--brand);
}

/* ─── Responsive ─────────────────────────────────────────── */
@media (max-width: 640px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .card { padding: 14px; }
  .card-lg { padding: 16px; }
  .grid-auto { grid-template-columns: 1fr; }
  .hide-on-mobile { display: none !important; }
}
@media (min-width: 641px) {
  .hide-on-desktop { display: none !important; }
}
