/* ════════════════════════════════════════════════
   BoredOut — design system
   Warm paper + ink, one restrained terracotta accent,
   Fraunces for display type, muted earthy categories.
═══════════════════════════════════════════════════ */
:root {
  /* surfaces */
  --paper: #F1ECE4;
  --card: #FBF9F5;
  --card-2: #F4F0E9;          /* inset surfaces: inputs, tracks */
  --ink: #211C17;             /* primary buttons / strong text */
  --ink-panel: #211C17;       /* dark hero anchor */
  --on-ink: #F3EDE3;          /* text on ink/hero */
  --on-ink-soft: rgba(243,237,227,0.68);

  /* text */
  --text: #221D18;
  --text-muted: #6F6458;
  --text-light: #7E7060;

  /* lines */
  --line: rgba(34,29,24,0.10);
  --line-strong: rgba(34,29,24,0.20);

  /* the one accent — terracotta */
  --accent: #BB502E;
  --accent-press: #9F3F20;
  --accent-tint: #EEE0D6;
  --accent-ink: #8C3A1D;

  /* muted semantics */
  --gold: #B07D3C;            /* streaks, highlights */
  --gold-tint: #EFE4D2;
  --good: #5C7152;            /* online / confirmed (sage) */
  --good-tint: #E2E7DC;
  --good-ink: #3E5236;
  --danger: #AE473B;
  --danger-tint: #F0DDD8;

  /* muted earthy category family */
  --c-outdoor:#5C7152; --c-food:#B07D3C; --c-arts:#8A5A6A; --c-sports:#AF553D;
  --c-games:#5B6485; --c-music:#3F7672; --c-movies:#8C6A43; --c-social:#6B774F;

  /* metrics */
  --nav-h: 64px; --bottom-nav-h: 62px;
  --r-lg: 14px; --r-md: 10px; --r-sm: 8px;
  --shadow: 0 1px 2px rgba(34,26,18,0.04), 0 8px 24px rgba(34,26,18,0.06);
  --shadow-soft: 0 1px 2px rgba(34,26,18,0.05);

  --font-display: 'Fraunces', 'Iowan Old Style', Georgia, 'Times New Roman', serif;
  --font-ui: system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;

  /* ── back-compat aliases (old var names used in markup/JS) ── */
  --primary: var(--accent); --primary-light: var(--accent-tint); --primary-dark: var(--accent-ink);
  --accent-light: var(--good-tint); --accent-dark: var(--good-ink);
  --warn: var(--gold); --warn-light: var(--gold-tint);
  --danger-light: var(--danger-tint);
  --bg: var(--paper); --border: var(--line);
  --radius: var(--r-lg); --radius-sm: var(--r-md);
  --shadow-hover: var(--shadow);
}
html.dark {
  --paper: #15110D;
  --card: #1E1812;
  --card-2: #251E16;
  --ink: #F1EBE1;             /* buttons invert to warm-white */
  --ink-panel: #0E0B08;
  --on-ink: #F1EBE1;
  --on-ink-soft: rgba(241,235,225,0.66);

  --text: #F1EBE1;
  --text-muted: #A89C8B;
  --text-light: #8C8170;

  --line: rgba(255,255,255,0.09);
  --line-strong: rgba(255,255,255,0.17);

  --accent: #C45A30;            /* darkened so #fff labels clear WCAG AA */
  --accent-press: #D77046;
  --accent-tint: #2E2017;
  --accent-ink: #E89A72;

  --gold: #C99A5B; --gold-tint: #2B2113;
  --good: #88A079; --good-tint: #1E281A; --good-ink: #A8BE9A;
  --danger: #D2685B; --danger-tint: #301815;

  --shadow: 0 1px 2px rgba(0,0,0,0.45), 0 10px 28px rgba(0,0,0,0.34);
  --shadow-soft: 0 1px 2px rgba(0,0,0,0.4);
}
* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
body { font-family: var(--font-ui); background: var(--paper); color: var(--text); min-height: 100vh; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; transition: background 0.25s, color 0.25s; }
a { color: var(--accent-ink); text-underline-offset: 2px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

/* ── AUTH ─────────────────────────────────────── */
.auth-overlay { position: fixed; inset: 0; background: var(--paper); z-index: 1000; display: flex; align-items: center; justify-content: center; padding: 1rem; overflow-y: auto; }
.auth-box { background: var(--card); border-radius: var(--r-lg); border: 1px solid var(--line); padding: 2.25rem 2rem; width: 100%; max-width: 408px; box-shadow: var(--shadow); }
.auth-logo { text-align: center; margin-bottom: 1.75rem; }
.auth-logo h1 { font-family: var(--font-display); font-size: 2rem; font-weight: 500; letter-spacing: -0.01em; color: var(--text); }
.auth-logo p { font-size: 14px; color: var(--text-muted); margin-top: 6px; }
.auth-tabs { display: flex; border-bottom: 1px solid var(--line); margin-bottom: 1.5rem; }
.auth-tab { flex: 1; padding: 11px; text-align: center; border: none; background: none; font-size: 14px; font-weight: 500; color: var(--text-muted); cursor: pointer; border-bottom: 1.5px solid transparent; margin-bottom: -1px; transition: color 0.15s, border-color 0.15s; }
.auth-tab.active { color: var(--text); border-bottom-color: var(--accent); }
.auth-switch { text-align: center; font-size: 13px; color: var(--text-muted); margin-top: 1.25rem; }
.auth-switch a { color: var(--accent); font-weight: 500; }
.remember-row { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-muted); margin-bottom: 14px; cursor: pointer; }
.remember-row input { width: 16px; height: 16px; accent-color: var(--accent); }
.form-error { color: var(--danger); font-size: 13px; margin-bottom: 10px; }
.field-hint { font-size: 12px; color: var(--text-light); margin: -2px 0 8px; }
.interest-count { font-size: 12px; font-weight: 600; color: var(--text-light); }
.interest-count.ok { color: var(--good); }
.interests-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 6px; }
.interest-chip { width: 100%; padding: 9px 8px; border: 1px solid var(--line); border-radius: var(--r-md); font-size: 12px; font-weight: 500; font-family: inherit; text-align: center; cursor: pointer; color: var(--text-muted); background: var(--card); transition: border-color 0.15s, color 0.15s, background 0.15s; }
.interest-chip:hover { border-color: var(--line-strong); }
.interest-chip.selected { background: var(--accent); color: #fff; border-color: var(--accent); }

/* ── NAV ──────────────────────────────────────── */
nav { position: sticky; top: 0; z-index: 100; height: var(--nav-h); background: color-mix(in srgb, var(--card) 88%, transparent); backdrop-filter: saturate(140%) blur(12px); border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; padding: 0 1.25rem; gap: 0.75rem; }
.nav-logo { font-family: var(--font-display); font-size: 1.3rem; font-weight: 600; letter-spacing: -0.01em; color: var(--text); display: flex; align-items: center; gap: 8px; cursor: pointer; flex-shrink: 0; }
.nav-tabs { display: flex; gap: 2px; }
.nav-tab { display: flex; align-items: center; gap: 6px; padding: 8px 13px; border-radius: var(--r-md); border: none; background: none; cursor: pointer; color: var(--text-muted); font-family: inherit; font-size: 14px; font-weight: 500; transition: color 0.15s, background 0.15s; }
.nav-tab:hover { background: var(--card-2); color: var(--text); }
.nav-tab.active { background: var(--card-2); color: var(--accent); }
.nav-right { display: flex; align-items: center; gap: 6px; }
.nav-bored-btn { display: inline-flex; align-items: center; gap: 7px; padding: 9px 16px; border-radius: var(--r-md); border: none; cursor: pointer; font-family: inherit; font-size: 14px; font-weight: 600; color: #fff; background: var(--accent); transition: background 0.15s; }
.nav-bored-btn:hover { background: var(--accent-press); }
.icon-btn { position: relative; background: none; border: none; cursor: pointer; color: var(--text-muted); padding: 8px; border-radius: var(--r-md); font-size: 20px; display: flex; align-items: center; transition: background 0.15s, color 0.15s; }
.icon-btn:hover { background: var(--card-2); color: var(--text); }
.badge { position: absolute; top: 3px; right: 3px; min-width: 16px; height: 16px; background: var(--accent); border-radius: 999px; font-size: 10px; font-weight: 700; color: #fff; display: flex; align-items: center; justify-content: center; border: 2px solid var(--card); padding: 0 3px; }
.avatar-btn { width: 34px; height: 34px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; color: #fff; cursor: pointer; border: none; flex-shrink: 0; }

/* level chip */
.level-chip { display: flex; align-items: center; gap: 5px; background: var(--card-2); border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; font-size: 13px; font-weight: 600; color: var(--text); cursor: pointer; white-space: nowrap; transition: border-color 0.15s; }
.level-chip:hover { border-color: var(--line-strong); }
.level-chip i { color: var(--gold); }
.streak-flame { color: var(--text-muted); }

/* ── BOTTOM NAV (mobile) ──────────────────────── */
.bottom-nav { display: none; position: fixed; bottom: 0; left: 0; right: 0; z-index: 100; height: var(--bottom-nav-h); background: var(--card); border-top: 1px solid var(--line); padding: 0 0.25rem; padding-bottom: env(safe-area-inset-bottom); }
.bottom-nav-inner { display: flex; height: 100%; align-items: stretch; }
.bnav-item { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; border: none; background: none; cursor: pointer; color: var(--text-light); font-family: inherit; font-size: 10px; font-weight: 500; position: relative; transition: color 0.15s; }
.bnav-item.active { color: var(--accent); }
.bnav-item i { font-size: 22px; }
.bnav-badge { position: absolute; top: 6px; right: calc(50% - 18px); min-width: 14px; height: 14px; background: var(--accent); border-radius: 999px; font-size: 9px; font-weight: 700; color: #fff; display: flex; align-items: center; justify-content: center; border: 2px solid var(--card); }
.bnav-bored { flex: 0 0 72px; position: relative; }
.bnav-bored-circle { position: absolute; top: -22px; left: 50%; transform: translateX(-50%); width: 56px; height: 56px; border-radius: 50%; background: var(--accent); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 25px; border: 4px solid var(--paper); cursor: pointer; transition: background 0.15s; box-shadow: var(--shadow); }
.bnav-bored-circle:active { background: var(--accent-press); }
.bnav-bored-label { position: absolute; bottom: 6px; left: 0; right: 0; text-align: center; font-size: 10px; font-weight: 600; color: var(--accent); }

/* ── PAGES ────────────────────────────────────── */
.page { display: none; padding: 1.5rem 1.25rem; max-width: 1080px; margin: 0 auto; animation: fadeIn 0.25s ease; }
.page.active { display: block; padding-bottom: 2rem; }
.page-title { font-family: var(--font-display); font-size: 1.6rem; font-weight: 500; letter-spacing: -0.01em; margin-bottom: 3px; }
.page-subtitle { color: var(--text-muted); font-size: 14px; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ── HERO ─────────────────────────────────────── */
.hero { background: var(--ink-panel); border-radius: var(--r-lg); padding: 2rem 1.85rem; margin-bottom: 1.5rem; color: var(--on-ink); position: relative; overflow: hidden; }
.hero::before { content: ''; position: absolute; top: -55%; right: -8%; width: 320px; height: 320px; border-radius: 50%; background: radial-gradient(circle, rgba(214,120,80,0.20), transparent 68%); pointer-events: none; }
.hero > * { position: relative; z-index: 1; }
.hero h1 { font-family: var(--font-display); font-size: 2rem; font-weight: 500; line-height: 1.12; letter-spacing: -0.015em; margin-bottom: 0.5rem; }
.hero p { font-size: 14px; color: var(--on-ink-soft); margin-bottom: 1.25rem; max-width: 46ch; line-height: 1.55; }
.location-bar { display: flex; gap: 8px; max-width: 460px; }
.location-bar input { flex: 1; min-width: 0; padding: 10px 13px; border-radius: var(--r-md); border: 1px solid rgba(255,255,255,0.14); font-size: 16px; font-family: inherit; background: rgba(255,255,255,0.07); color: var(--on-ink); }
.location-bar input::placeholder { color: var(--on-ink-soft); }
.location-bar input:focus { outline: none; border-color: rgba(255,255,255,0.4); }
.weather-bar { display: flex; align-items: center; gap: 8px; background: rgba(255,255,255,0.07); border: 1px solid rgba(255,255,255,0.10); border-radius: var(--r-md); padding: 8px 14px; margin: 12px 0 0; font-size: 13px; font-weight: 500; color: var(--on-ink); flex-wrap: wrap; }
.weather-bar span { color: var(--on-ink-soft); }
.weather-bar #weather-temp { color: var(--on-ink); font-weight: 600; }
.weather-sep { opacity: 0.4; }
#weather-tip { font-style: italic; }
.hero-bored-btn { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; max-width: 460px; margin-top: 14px; padding: 15px; border-radius: var(--r-md); border: none; cursor: pointer; font-family: inherit; font-size: 16px; font-weight: 600; color: #fff; background: var(--accent); transition: background 0.15s; }
.hero-bored-btn:hover { background: var(--accent-press); }
.hero-bored-btn:active { transform: translateY(1px); }
.hero-bored-btn i { font-size: 20px; }

/* ── MOOD ─────────────────────────────────────── */
.mood-section { margin-bottom: 1.5rem; }
.mood-label { font-size: 13px; font-weight: 600; color: var(--text-muted); display: block; margin-bottom: 9px; }
.mood-row { display: flex; gap: 8px; flex-wrap: wrap; }
.mood-chip { display: inline-flex; align-items: center; gap: 7px; padding: 9px 15px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); font-family: inherit; font-size: 13px; font-weight: 500; color: var(--text); cursor: pointer; transition: border-color 0.15s, background 0.15s, color 0.15s; }
.mood-chip i { font-size: 16px; color: var(--text-muted); transition: color 0.15s; }
.mood-chip:hover { border-color: var(--line-strong); }
.mood-chip.active { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.mood-chip.active i { color: var(--paper); }

/* ── BUTTONS ──────────────────────────────────── */
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 9px 16px; border-radius: var(--r-md); border: none; cursor: pointer; font-family: inherit; font-size: 14px; font-weight: 500; transition: background 0.15s, border-color 0.15s, color 0.15s; white-space: nowrap; text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-white { background: rgba(255,255,255,0.13); color: var(--on-ink); border: 1px solid rgba(255,255,255,0.18); }
.btn-white:hover { background: rgba(255,255,255,0.2); }
.btn-primary { background: var(--ink); color: var(--paper); }
.btn-primary:hover:not(:disabled) { background: var(--accent); color: #fff; }
.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { background: var(--accent-press); }
.btn-outline { background: none; color: var(--text); border: 1px solid var(--line-strong); }
.btn-outline:hover { background: var(--card-2); border-color: var(--text-light); }
.btn-danger { background: var(--danger-tint); color: var(--danger); }
.btn-danger:hover { background: var(--danger); color: #fff; }
.btn-sm { padding: 7px 12px; font-size: 13px; }
.btn-block { width: 100%; justify-content: center; }
.btn-big { padding: 13px 26px; font-size: 16px; font-weight: 600; border-radius: var(--r-md); }

/* ── SECTIONS / CATEGORIES ────────────────────── */
.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem; gap: 8px; }
.section-title { font-family: var(--font-display); font-size: 1.15rem; font-weight: 500; letter-spacing: -0.01em; display: flex; align-items: center; gap: 8px; }
.section-title i { color: var(--text-light); font-size: 0.95em; }
.category-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(105px, 1fr)); gap: 9px; margin-bottom: 1.5rem; }
.cat-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 0.85rem; text-align: center; cursor: pointer; transition: border-color 0.15s, transform 0.15s; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.cat-card:hover { border-color: var(--line-strong); transform: translateY(-2px); }
.cat-card.active { border-color: var(--ink); }
.cat-icon { width: 44px; height: 44px; border-radius: var(--r-md); background: var(--card-2); display: flex; align-items: center; justify-content: center; font-size: 20px; color: var(--text); transition: background 0.15s, color 0.15s; }
.cat-card.active .cat-icon { background: var(--ink); color: var(--paper); }
.cat-label { font-size: 12px; font-weight: 500; color: var(--text-muted); }

/* ── FOR YOU / RECENT ROW ─────────────────────── */
.foryou-row { display: flex; gap: 11px; overflow-x: auto; padding-bottom: 8px; margin-bottom: 1.5rem; scroll-snap-type: x mandatory; }
.foryou-row::-webkit-scrollbar { height: 5px; }
.foryou-row::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 4px; }
.foryou-card { flex: 0 0 212px; scroll-snap-align: start; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; cursor: pointer; transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s; }
.foryou-card:hover { border-color: var(--line-strong); transform: translateY(-2px); box-shadow: var(--shadow); }
.foryou-img { height: 96px; display: flex; align-items: center; justify-content: center; font-size: 2.2rem; position: relative; }
.foryou-body { padding: 11px 13px; }
.foryou-body h4 { font-size: 13px; font-weight: 600; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 34px; }
.foryou-body span { font-size: 11px; color: var(--text-muted); }
.match-pill { position: absolute; top: 8px; right: 8px; background: var(--card); color: var(--text); font-size: 10px; font-weight: 600; padding: 3px 8px; border-radius: 999px; box-shadow: var(--shadow-soft); }

/* ── ACTIVITY CARDS ───────────────────────────── */
.activity-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(272px, 1fr)); gap: 14px; }
.activity-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; cursor: pointer; transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s; }
.activity-card:hover { border-color: var(--line-strong); box-shadow: var(--shadow); transform: translateY(-2px); }
.activity-img { height: 132px; display: flex; align-items: center; justify-content: center; font-size: 2.8rem; position: relative; overflow: hidden; }
.activity-badge { position: absolute; top: 9px; right: 9px; border-radius: 999px; padding: 3px 10px; font-size: 11px; font-weight: 600; background: var(--card); color: var(--text); box-shadow: var(--shadow-soft); }
.activity-badge.free { color: var(--good-ink); }
.activity-badge.hot { color: var(--accent-ink); }
.when-chip { position: absolute; bottom: 9px; left: 9px; background: rgba(25,20,15,0.62); color: #fff; font-size: 11px; font-weight: 500; padding: 3px 10px; border-radius: 999px; backdrop-filter: blur(3px); }
.activity-body { padding: 0.9rem; }
.activity-body h3 { font-size: 15px; font-weight: 600; margin-bottom: 5px; letter-spacing: -0.005em; }
.activity-meta { display: flex; flex-wrap: wrap; gap: 10px; margin: 6px 0; }
.meta-item { display: flex; align-items: center; gap: 4px; font-size: 12px; color: var(--text-muted); }
.meta-item i { font-size: 13px; }
.rating-row { display: flex; align-items: center; gap: 6px; margin: 7px 0; }
.friends-going { font-size: 12px; color: var(--good-ink); display: flex; align-items: center; gap: 5px; margin: 6px 0; font-weight: 500; }
.friends-going i { font-size: 14px; }
.activity-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 11px; }

/* ── STARS ────────────────────────────────────── */
.stars { display: flex; gap: 2px; align-items: center; }
.star { font-size: 18px; cursor: pointer; color: var(--line-strong); transition: color 0.12s; padding: 2px; line-height: 1; background: none; border: none; font-family: inherit; }
.star.filled { color: var(--gold); }
.star:hover { color: var(--gold); }
.rating-count { font-size: 12px; color: var(--text-muted); margin-left: 4px; }

/* ── AVATARS ──────────────────────────────────── */
.avatar-stack { display: flex; }
.av { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--card); margin-left: -6px; font-size: 9px; display: flex; align-items: center; justify-content: center; font-weight: 700; color: #fff; }
.av:first-child { margin-left: 0; }

/* ── PEOPLE ───────────────────────────────────── */
.people-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(238px, 1fr)); gap: 14px; }
.person-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 1.15rem; transition: border-color 0.15s, box-shadow 0.15s; position: relative; cursor: pointer; }
.person-card:hover { border-color: var(--line-strong); box-shadow: var(--shadow); }
.person-header { display: flex; align-items: center; gap: 11px; margin-bottom: 10px; }
.person-avatar { width: 48px; height: 48px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-family: var(--font-display); font-weight: 600; font-size: 18px; color: #fff; flex-shrink: 0; }
.person-name { font-size: 14px; font-weight: 600; }
.person-sub { font-size: 12px; color: var(--text-muted); margin-top: 2px; display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.person-mood { font-size: 13px; color: var(--text-muted); font-style: italic; }
.online-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--good); border: 2px solid var(--card); position: absolute; top: 1.15rem; right: 1.15rem; box-shadow: 0 0 0 3px color-mix(in srgb, var(--good) 22%, transparent); }
.online-dot-inline { width: 7px; height: 7px; border-radius: 50%; background: var(--good); display: inline-block; }
.tags { display: flex; flex-wrap: wrap; gap: 5px; margin: 8px 0; }
.tag { background: var(--card-2); color: var(--text-muted); font-size: 11px; padding: 3px 9px; border-radius: 999px; font-weight: 500; }
.tag.gold { background: var(--accent-tint); color: var(--accent-ink); }
.person-actions { display: flex; gap: 7px; margin-top: 12px; }
.person-actions .btn { flex: 1; justify-content: center; }
.person-profile-top { text-align: center; }
.person-profile-top .profile-avatar-big { margin: 0 auto; }

/* ── QUICK MATCH DECK ─────────────────────────── */
.mode-toggle { display: flex; background: var(--card-2); border: 1px solid var(--line); border-radius: 999px; padding: 3px; margin-bottom: 1.25rem; max-width: 320px; }
.mode-toggle button { flex: 1; padding: 8px 14px; border-radius: 999px; border: none; background: none; cursor: pointer; font-family: inherit; font-size: 13px; font-weight: 600; color: var(--text-muted); transition: background 0.15s, color 0.15s; }
.mode-toggle button.active { background: var(--card); color: var(--text); box-shadow: var(--shadow-soft); }
.deck-wrap { max-width: 360px; margin: 0 auto; }
.deck-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 2rem 1.5rem; text-align: center; box-shadow: var(--shadow); transition: transform 0.3s ease, opacity 0.3s ease; position: relative; touch-action: none; user-select: none; }
.deck-card.swipe-right { transform: translateX(120%) rotate(10deg); opacity: 0; }
.deck-card.swipe-left { transform: translateX(-120%) rotate(-10deg); opacity: 0; }
.deck-online { position: absolute; top: 14px; right: 14px; font-size: 11px; font-weight: 600; color: var(--good); display: flex; align-items: center; gap: 5px; }
.deck-avatar { width: 92px; height: 92px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-family: var(--font-display); font-weight: 600; font-size: 32px; color: #fff; margin: 0 auto 1rem; }
.deck-card h3 { font-family: var(--font-display); font-size: 1.35rem; font-weight: 500; }
.deck-card .mood { font-size: 14px; color: var(--text-muted); font-style: italic; margin: 8px 0; }
.deck-tags { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin: 12px 0; }
.deck-actions { display: flex; gap: 16px; justify-content: center; margin-top: 1.35rem; }
.deck-btn { width: 60px; height: 60px; border-radius: 50%; border: 1px solid var(--line); cursor: pointer; font-size: 25px; display: flex; align-items: center; justify-content: center; background: var(--card); transition: transform 0.15s, border-color 0.15s; }
.deck-btn:active { transform: translateY(1px); }
.deck-skip { color: var(--text-muted); }
.deck-skip:hover { border-color: var(--line-strong); }
.deck-connect { background: var(--accent); color: #fff; border-color: var(--accent); }
.deck-connect:hover { background: var(--accent-press); }
.deck-counter { text-align: center; font-size: 12px; color: var(--text-muted); margin-top: 14px; display: flex; align-items: center; justify-content: center; gap: 12px; }
.deck-undo { background: none; border: none; color: var(--accent); font-family: inherit; font-size: 12px; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; }
.deck-undo:disabled { color: var(--text-light); cursor: not-allowed; }
.deck-hint { text-align: center; font-size: 11px; color: var(--text-light); margin-top: 8px; }

/* ── PLANS ────────────────────────────────────── */
.plans-list { display: flex; flex-direction: column; gap: 11px; }
.plan-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 1.15rem; display: flex; align-items: flex-start; gap: 0.95rem; transition: border-color 0.15s; }
.plan-card:hover { border-color: var(--line-strong); }
.plan-date-box { background: var(--card-2); border: 1px solid var(--line); border-radius: var(--r-md); padding: 9px 12px; text-align: center; min-width: 58px; flex-shrink: 0; }
.plan-date-box .month { font-size: 10px; font-weight: 700; color: var(--accent); text-transform: uppercase; letter-spacing: 0.06em; }
.plan-date-box .day { font-family: var(--font-display); font-size: 26px; font-weight: 600; color: var(--text); line-height: 1.05; }
.plan-info { flex: 1; min-width: 0; }
.plan-info h3 { font-size: 15px; font-weight: 600; margin-bottom: 3px; display: flex; align-items: center; gap: 6px; }
.plan-status { padding: 3px 10px; border-radius: 999px; font-size: 11px; font-weight: 600; text-transform: capitalize; }
.status-confirmed { background: var(--good-tint); color: var(--good-ink); }
.status-pending { background: var(--gold-tint); color: #6b4a16; }
html.dark .status-pending { color: var(--gold); }
.status-declined { background: var(--danger-tint); color: var(--danger); }
.rsvp-row { display: flex; gap: 6px; margin-top: 11px; flex-wrap: wrap; }
.rsvp-btn { display: inline-flex; align-items: center; gap: 4px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); font-family: inherit; font-size: 12px; font-weight: 600; color: var(--text-muted); cursor: pointer; transition: background 0.15s, color 0.15s, border-color 0.15s; }
.rsvp-btn:hover { border-color: var(--line-strong); }
.rsvp-btn.active.going { background: var(--good); color: #fff; border-color: var(--good); }
.rsvp-btn.active.maybe { background: var(--gold); color: #241A09; border-color: var(--gold); }
.rsvp-btn.active.cant { background: var(--danger); color: #fff; border-color: var(--danger); }
.plan-card-actions { display: flex; flex-direction: column; gap: 4px; }
.plan-del:hover { color: var(--danger); background: var(--danger-tint); }

/* ── FRIENDS ──────────────────────────────────── */
.friends-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 1.25rem; }
.ftab { padding: 9px 16px; border: none; background: none; cursor: pointer; font-family: inherit; font-size: 14px; font-weight: 500; color: var(--text-muted); border-bottom: 1.5px solid transparent; margin-bottom: -1px; transition: color 0.15s, border-color 0.15s; }
.ftab.active { color: var(--text); border-bottom-color: var(--accent); }
.req-badge { background: var(--accent); color: #fff; padding: 1px 7px; border-radius: 999px; font-size: 11px; margin-left: 4px; }

/* ── PROFILE / GAMIFICATION ───────────────────── */
.profile-header { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 1.5rem; margin-bottom: 1.15rem; display: flex; align-items: center; gap: 1.25rem; flex-wrap: wrap; }
.profile-avatar-big { width: 80px; height: 80px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-family: var(--font-display); font-weight: 600; font-size: 30px; color: #fff; flex-shrink: 0; }
.profile-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 11px; margin-bottom: 1.15rem; }
.stat-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-md); padding: 1.1rem 1rem; text-align: center; }
.stat-num { font-family: var(--font-display); font-size: 1.6rem; font-weight: 600; color: var(--text); }
.stat-label { font-size: 12px; color: var(--text-muted); margin-top: 3px; }
.level-bar-wrap, .profile-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 1.25rem; margin-bottom: 1.15rem; }
.level-bar-track { height: 9px; background: var(--card-2); border-radius: 999px; overflow: hidden; margin: 11px 0 6px; }
.level-bar-fill { height: 100%; background: var(--accent); border-radius: 999px; transition: width 0.6s ease; }
.badges-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px; }
.badge-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-md); padding: 0.95rem 0.5rem; text-align: center; transition: border-color 0.15s; position: relative; }
.badge-card.earned { border-color: var(--accent); background: var(--accent-tint); }
.badge-card.locked { opacity: 0.5; }
.badge-check { position: absolute; top: 7px; right: 7px; width: 18px; height: 18px; border-radius: 50%; background: var(--accent); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 11px; }
.badge-emoji { font-size: 1.55rem; margin-bottom: 5px; color: var(--text); }
.badge-emoji i { display: inline-block; }
.badge-card.earned .badge-emoji { color: var(--accent-ink); }
.badge-name { font-size: 11px; font-weight: 700; }
.badge-desc { font-size: 10px; color: var(--text-muted); margin-top: 2px; }
.leaderboard { display: flex; flex-direction: column; gap: 2px; }
.lb-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--r-md); }
.lb-row.me { background: var(--accent-tint); }
.lb-rank { font-family: var(--font-display); font-weight: 600; color: var(--text-light); width: 20px; text-align: center; }
.lb-row.me .lb-rank { color: var(--accent); }
.lb-name { flex: 1; font-size: 14px; font-weight: 600; }
.lb-you { font-size: 10px; font-weight: 700; background: var(--accent); color: #fff; padding: 1px 6px; border-radius: 999px; margin-left: 4px; }
.lb-xp { font-size: 13px; color: var(--text-muted); font-weight: 600; }
.xp-log { display: flex; flex-direction: column; gap: 2px; }
.xp-log-row { display: flex; justify-content: space-between; align-items: center; padding: 9px 4px; border-bottom: 1px solid var(--line); font-size: 13px; }
.xp-log-row:last-child { border-bottom: none; }
.xp-log-amt { color: var(--good-ink); font-weight: 700; }
.theme-row { display: flex; gap: 8px; }
.theme-opt { flex: 1; padding: 11px; border-radius: var(--r-md); border: 1px solid var(--line); background: none; color: var(--text-muted); cursor: pointer; font-family: inherit; font-size: 13px; font-weight: 600; display: flex; align-items: center; justify-content: center; gap: 6px; transition: border-color 0.15s, color 0.15s, background 0.15s; }
.theme-opt.active { background: var(--card-2); color: var(--text); border-color: var(--ink); }

/* ── SURPRISE OVERLAY ─────────────────────────── */
.bored-overlay { position: fixed; inset: 0; background: rgba(20,15,11,0.86); backdrop-filter: blur(4px); z-index: 500; display: none; align-items: center; justify-content: center; padding: 1.25rem; }
.bored-overlay.open { display: flex; }
.bored-box { width: 100%; max-width: 420px; text-align: center; }
.bored-box h2 { font-family: var(--font-display); color: var(--on-ink); font-size: 1.5rem; font-weight: 500; margin-bottom: 1.25rem; }
.suggest-card { background: var(--card); border-radius: var(--r-lg); padding: 2rem 1.5rem; box-shadow: var(--shadow); animation: riseIn 0.3s cubic-bezier(0.2,0,0,1); }
@keyframes riseIn { from { transform: translateY(12px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.suggest-card.shuffling { animation: pulse 0.7s ease infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.72; } }
.suggest-emoji { font-size: 3.6rem; margin-bottom: 0.85rem; }
.suggest-card h3 { font-family: var(--font-display); font-size: 1.4rem; font-weight: 500; margin-bottom: 7px; }
.suggest-meta { font-size: 13px; color: var(--text-muted); margin-bottom: 4px; }
.suggest-why { display: inline-flex; align-items: center; gap: 5px; background: var(--accent-tint); color: var(--accent-ink); font-size: 12px; font-weight: 600; padding: 5px 13px; border-radius: 999px; margin: 11px 0; }
.suggest-actions { display: flex; gap: 10px; margin-top: 1.35rem; }
.suggest-actions .btn { flex: 1; justify-content: center; }
.bored-close { margin-top: 1.15rem; background: none; border: none; color: var(--on-ink-soft); font-family: inherit; font-size: 14px; cursor: pointer; padding: 8px; }
.bored-close:hover { color: var(--on-ink); }

/* ── MODALS ───────────────────────────────────── */
.modal-overlay { display: none; position: fixed; inset: 0; background: rgba(20,15,11,0.5); backdrop-filter: blur(3px); z-index: 400; align-items: center; justify-content: center; padding: 1rem; }
.modal-overlay.open { display: flex; }
.modal { background: var(--card); border-radius: var(--r-lg); padding: 1.5rem; padding-bottom: calc(1.5rem + env(safe-area-inset-bottom)); width: 100%; max-width: 460px; max-height: 90vh; max-height: 90dvh; overflow-y: auto; box-shadow: var(--shadow); animation: riseIn 0.22s cubic-bezier(0.2,0,0,1); }
.modal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.25rem; }
.modal-header h2 { font-family: var(--font-display); font-size: 1.3rem; font-weight: 500; }
.detail-hero { border-radius: var(--r-md); height: 124px; display: flex; align-items: center; justify-content: center; font-size: 3.4rem; margin-bottom: 1rem; }
.detail-desc { font-size: 14px; color: var(--text-muted); line-height: 1.6; margin-bottom: 1rem; }
.detail-friends { font-size: 13px; color: var(--good-ink); font-weight: 600; display: flex; align-items: center; gap: 6px; margin-bottom: 0.5rem; }
.form-group { margin-bottom: 0.95rem; }
.form-group label { display: block; font-size: 13px; font-weight: 500; color: var(--text-muted); margin-bottom: 6px; }
.form-group input, .form-group select, .form-group textarea { width: 100%; padding: 11px 12px; border-radius: var(--r-md); border: 1px solid var(--line); background: var(--card-2); color: var(--text); font-family: inherit; font-size: 16px; transition: border-color 0.15s; }
.form-group textarea { height: 76px; resize: vertical; }
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { outline: none; border-color: var(--accent); }

/* ── LEVEL UP MODAL ───────────────────────────── */
.levelup-card { background: var(--ink-panel); color: var(--on-ink); border-radius: var(--r-lg); padding: 2.25rem 1.85rem; width: 100%; max-width: 360px; text-align: center; box-shadow: var(--shadow); animation: riseIn 0.3s cubic-bezier(0.2,0,0,1); }
.levelup-burst { font-size: 3rem; }
.levelup-num { font-size: 11px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--on-ink-soft); margin-top: 8px; }
.levelup-card h3 { font-family: var(--font-display); font-size: 1.7rem; font-weight: 500; margin: 4px 0 10px; }
.levelup-card p { font-size: 14px; color: var(--on-ink-soft); line-height: 1.6; margin-bottom: 1.35rem; }
.levelup-card .btn-primary { background: var(--accent); color: #fff; }
.levelup-card .btn-primary:hover { background: var(--accent-press); }

/* ── ONBOARDING TOUR ──────────────────────────── */
.tour-card { background: var(--card); border-radius: var(--r-lg); padding: 2rem 1.5rem; width: 100%; max-width: 360px; text-align: center; box-shadow: var(--shadow); animation: riseIn 0.26s cubic-bezier(0.2,0,0,1); }
.tour-icon { font-size: 2.6rem; margin-bottom: 0.85rem; }
.tour-card h3 { font-family: var(--font-display); font-size: 1.35rem; font-weight: 500; margin-bottom: 9px; }
.tour-card p { font-size: 14px; color: var(--text-muted); line-height: 1.6; margin-bottom: 1.35rem; }
.tour-dots { display: flex; gap: 6px; justify-content: center; margin-bottom: 1.35rem; }
.tour-dots span { width: 7px; height: 7px; border-radius: 50%; background: var(--line-strong); transition: width 0.2s, background 0.2s; }
.tour-dots span.on { background: var(--accent); width: 22px; border-radius: 999px; }
.tour-actions { display: flex; gap: 10px; }
.tour-actions .btn { flex: 1; justify-content: center; }

/* ── CHAT ─────────────────────────────────────── */
.chat-panel { position: fixed; bottom: 0; right: 24px; width: 348px; height: 480px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg) var(--r-lg) 0 0; box-shadow: var(--shadow); z-index: 300; display: flex; flex-direction: column; transform: translateY(110%); transition: transform 0.3s cubic-bezier(0.2,0,0,1); }
.chat-panel.open { transform: translateY(0); }
.chat-header { padding: 0.9rem 1rem; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.chat-header h3 { font-size: 14px; font-weight: 600; flex: 1; }
.chat-messages { flex: 1; overflow-y: auto; padding: 1rem; display: flex; flex-direction: column; gap: 9px; }
.chat-empty { text-align: center; color: var(--text-muted); font-size: 13px; padding: 1rem; }
.msg { max-width: 80%; padding: 9px 13px; border-radius: 16px; font-size: 13px; line-height: 1.5; word-wrap: break-word; }
.msg.mine { background: var(--ink); color: var(--paper); align-self: flex-end; border-bottom-right-radius: 4px; }
.msg.theirs { background: var(--card-2); color: var(--text); align-self: flex-start; border-bottom-left-radius: 4px; }
.msg-time { font-size: 10px; opacity: 0.6; margin-top: 3px; }
.msg .seen { opacity: 0.85; }
.typing-indicator { display: flex; align-items: center; gap: 4px; padding: 9px 13px; background: var(--card-2); border-radius: 16px; border-bottom-left-radius: 4px; align-self: flex-start; }
.typing-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--text-muted); animation: typingBounce 1.2s infinite; }
.typing-dot:nth-child(2) { animation-delay: 0.2s; }
.typing-dot:nth-child(3) { animation-delay: 0.4s; }
@keyframes typingBounce { 0%,60%,100% { transform: translateY(0); } 30% { transform: translateY(-5px); } }
.chat-emoji-bar { display: flex; gap: 2px; padding: 6px 8px; border-top: 1px solid var(--line); overflow-x: auto; flex-shrink: 0; }
.chat-emoji { background: none; border: none; cursor: pointer; font-size: 20px; padding: 3px 5px; border-radius: 8px; transition: background 0.15s; }
.chat-emoji:hover { background: var(--card-2); }
.chat-input-row { padding: 0.75rem; border-top: 1px solid var(--line); display: flex; gap: 8px; flex-shrink: 0; }
.chat-input-row input { flex: 1; min-width: 0; padding: 10px 13px; border-radius: 999px; border: 1px solid var(--line); background: var(--card-2); color: var(--text); font-family: inherit; font-size: 16px; transition: border-color 0.15s; }
.chat-input-row input:focus { outline: none; border-color: var(--accent); }
.chat-send { width: 38px; height: 38px; border-radius: 50%; background: var(--accent); color: #fff; border: none; cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 16px; flex-shrink: 0; transition: background 0.15s; }
.chat-send:hover { background: var(--accent-press); }

/* ── NOTIFICATIONS ────────────────────────────── */
.notif-panel { position: fixed; top: var(--nav-h); right: 0; width: 332px; max-height: 480px; background: var(--card); border: 1px solid var(--line); border-radius: 0 0 var(--r-lg) var(--r-lg); box-shadow: var(--shadow); z-index: 150; overflow: hidden; opacity: 0; transform: translateY(-6px); visibility: hidden; pointer-events: none; transition: opacity 0.2s ease, transform 0.2s ease, visibility 0s linear 0.2s; }
.notif-panel.open { opacity: 1; transform: translateY(0); visibility: visible; pointer-events: auto; transition: opacity 0.2s ease, transform 0.2s ease, visibility 0s linear 0s; }
.notif-panel-header { padding: 0.9rem 1rem; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; }
.notif-panel-header h3 { font-size: 14px; font-weight: 600; }
.notif-list { overflow-y: auto; max-height: 400px; }
.notif-item { padding: 0.9rem 1rem; border-bottom: 1px solid var(--line); display: flex; gap: 11px; align-items: flex-start; cursor: pointer; transition: background 0.15s; }
.notif-item:hover { background: var(--card-2); }
.notif-item.unread { background: color-mix(in srgb, var(--accent-tint) 55%, var(--card)); }
.notif-icon { width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 16px; flex-shrink: 0; }
.notif-icon.accent { background: var(--accent-tint); color: var(--accent-ink); }
.notif-icon.good { background: var(--good-tint); color: var(--good-ink); }
.notif-icon.warn { background: var(--gold-tint); color: #6b4a16; }
html.dark .notif-icon.warn { color: var(--gold); }
.notif-icon.danger { background: var(--danger-tint); color: var(--danger); }
.notif-text { font-size: 13px; line-height: 1.5; }
.notif-time { font-size: 11px; color: var(--text-light); margin-top: 2px; }
.notif-enable { padding: 0.85rem 1rem; background: var(--accent-tint); font-size: 13px; display: flex; align-items: center; gap: 10px; }

/* ── FILTERS / SEARCH ─────────────────────────── */
.filter-row { display: flex; gap: 7px; flex-wrap: wrap; margin-bottom: 1.25rem; }
.filter-pill { padding: 6px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); font-family: inherit; font-size: 13px; color: var(--text-muted); cursor: pointer; transition: background 0.15s, color 0.15s, border-color 0.15s; font-weight: 500; }
.filter-pill:hover { border-color: var(--line-strong); color: var(--text); }
.filter-pill.active { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.search-bar { display: flex; align-items: center; gap: 10px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-md); padding: 9px 13px; margin-bottom: 1.25rem; transition: border-color 0.15s; }
.search-bar:focus-within { border-color: var(--accent); }
.search-bar i { color: var(--text-light); font-size: 18px; }
.search-bar input { border: none; background: none; flex: 1; min-width: 0; font-family: inherit; font-size: 16px; color: var(--text); }
.search-bar input:focus { outline: none; }

/* ── INSTALL BANNER ───────────────────────────── */
.install-banner { display: none; align-items: center; gap: 12px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 0.95rem 1.15rem; margin-bottom: 1.5rem; }
.install-banner.show { display: flex; }
.install-banner i { font-size: 24px; color: var(--accent); }
.install-banner p { flex: 1; font-size: 13px; color: var(--text-muted); }
.install-banner strong { color: var(--text); font-size: 14px; display: block; margin-bottom: 1px; }

/* ── XP FLOAT / CONFETTI / TOAST ──────────────── */
.xp-float { position: fixed; z-index: 998; font-family: var(--font-display); font-size: 16px; font-weight: 600; color: var(--accent); pointer-events: none; animation: xpRise 1.2s ease forwards; }
@keyframes xpRise { from { opacity: 1; transform: translateY(0); } to { opacity: 0; transform: translateY(-46px); } }
@keyframes spin { to { transform: rotate(360deg); } }
.confetti-bit { position: fixed; width: 8px; height: 12px; z-index: 997; pointer-events: none; animation: confettiFall 2.4s ease-in forwards; }
@keyframes confettiFall { from { transform: translateY(-10vh) rotate(0); opacity: 1; } to { transform: translateY(105vh) rotate(680deg); opacity: 0.5; } }
.toast { position: fixed; bottom: 80px; left: 50%; transform: translateX(-50%) translateY(200px); opacity: 0; background: var(--ink); color: var(--paper); padding: 11px 20px; border-radius: 999px; font-size: 14px; font-weight: 500; z-index: 999; transition: transform 0.3s cubic-bezier(0.2,0,0,1), opacity 0.3s ease; display: flex; align-items: center; gap: 9px; box-shadow: var(--shadow); white-space: nowrap; max-width: 92vw; pointer-events: none; }
.toast.show { transform: translateX(-50%) translateY(0); opacity: 1; pointer-events: auto; }
.toast i { color: var(--accent); }
html.dark .toast i { color: var(--accent); }
.toast.achievement { background: var(--ink); }
.toast.achievement i { color: var(--gold); }

/* ── EMPTY / MISC ─────────────────────────────── */
.empty { text-align: center; padding: 2.75rem 1rem; color: var(--text-muted); }
.empty i { font-size: 2.4rem; margin-bottom: 0.85rem; opacity: 0.4; display: block; }
.empty p { font-size: 14px; line-height: 1.55; }
.divider { border: none; border-top: 1px solid var(--line); margin: 1rem 0; }

/* ── RESPONSIVE ───────────────────────────────── */
@media (max-width: 760px) {
  .nav-tabs { display: none; }
  .nav-bored-btn span { display: none; }
  .nav-bored-btn { padding: 9px 12px; }
  .bottom-nav { display: block; }
  body { padding-bottom: calc(var(--bottom-nav-h) + 32px); }
  .hero h1 { font-size: 1.55rem; }
  .page { padding: 1.15rem 1rem; }
  .page-title { font-size: 1.4rem; }
  .category-grid { grid-template-columns: repeat(4, 1fr); }
  .activity-grid, .people-grid { grid-template-columns: 1fr; }
  .chat-panel { right: 0; width: 100%; height: 70vh; bottom: calc(var(--bottom-nav-h) + env(safe-area-inset-bottom)); }
  .toast { bottom: calc(var(--bottom-nav-h) + 16px); white-space: normal; text-align: center; }
  .notif-panel { width: 100%; max-height: calc(100dvh - var(--nav-h) - var(--bottom-nav-h) - 8px); }
  .notif-list { max-height: none; }
  .profile-stats { grid-template-columns: repeat(2, 1fr); }
  .star { font-size: 22px; }
  body:has(.chat-panel.open) .toast { bottom: calc(70vh + var(--bottom-nav-h) + 16px); }
}
@media (max-width: 420px) {
  .cat-label { display: none; }
  .category-grid { gap: 7px; }
  .mood-chip { padding: 8px 13px; font-size: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
