@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700;800&family=JetBrains+Mono:wght@500&display=swap');


/* ─────────────────────────────────────────────────────────────────────────────
   SIDEQUEST — Bold Design System
   ───────────────────────────────────────────────────────────────────────────── */
/* ── TOKENS ─────────────────────────────────────────────────────────────── */
:root {
  --bg:          #eef2ff;
  --bg-2:        #e3e9f8;
  --bg-3:        #d7dff0;
  --bg-card:     #ffffff;
  --bg-card-h:   #f7f9ff;
  --bg-input:    #ffffff;
  --border:      #d7deea;
  --border-2:    #c1cce0;

  --text:        #111827;
  --text-2:      #4b5563;
  --text-3:      #6b7280;

  --accent:      #6c5ce7;
  --accent-2:    #8b7ff5;
  --accent-glow: rgba(108, 92, 231, 0.14);
  --accent-glow-strong: rgba(108, 92, 231, 0.24);

  --green:   #00d896;
  --yellow:  #f7b731;
  --red:     #ff4757;
  --easy:    #00d896;
  --medium:  #f7b731;
  --hard:    #ff4757;

  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-xl: 28px;
  --r-full: 9999px;

  --font: 'Space Grotesk', -apple-system, sans-serif;
  --mono: 'JetBrains Mono', monospace;

  --sidebar-w: 240px;
  --nav-h: 72px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);

  --shadow-sm:  0 2px 8px rgba(15,23,42,0.08);
  --shadow-md:  0 8px 24px rgba(15,23,42,0.10);
  --shadow-lg:  0 16px 48px rgba(15,23,42,0.14);
  --shadow-accent: 0 0 24px var(--accent-glow-strong);
}
/* ── DARK MODE TOKENS ────────────────────────────────────────────────────── */
[data-theme="dark"] {
  --bg:          #050a14;
  --bg-2:        #0a1120;
  --bg-3:        #101a2e;
  --bg-card:     #0c1422;
  --bg-card-h:   #121e30;
  --bg-input:    #080e1c;
  --border:      #1a2840;
  --border-2:    #243650;

  --text:        #f0f0f8;
  --text-2:      #9898b8;
  --text-3:      #5c5c7c;

  --accent:      #6c5ce7;
  --accent-2:    #8b7ff5;
  --accent-glow: rgba(108, 92, 231, 0.2);
  --accent-glow-strong: rgba(108, 92, 231, 0.35);

  --shadow-sm:  0 2px 8px rgba(0,0,0,0.4);
  --shadow-md:  0 8px 24px rgba(0,0,0,0.5);
  --shadow-lg:  0 16px 48px rgba(0,0,0,0.6);
  --shadow-accent: 0 0 20px var(--accent-glow-strong);
}
/* ── SMOOTH THEME TRANSITION ─────────────────────────────────────────────── */
.theme-transitioning,
.theme-transitioning *,
.theme-transitioning *::before,
.theme-transitioning *::after {
  transition:
    background-color 0.35s ease,
    color 0.35s ease,
    border-color 0.35s ease,
    box-shadow 0.35s ease,
    fill 0.35s ease !important;
}
/* ── RESET ───────────────────────────────────────────────────────────────── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html, body, #root { height: 100%; }
body {
  font-family: var(--font);
  background: radial-gradient(circle at top, rgba(108,92,231,0.08), transparent 40%), linear-gradient(180deg, #eef2ff 0%, #f7f9ff 100%);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  overflow-y: hidden;
}
#root { background: var(--bg); }
a { color: var(--accent-2); text-decoration: none; }
/* ── BASE INPUTS ─────────────────────────────────────────────────────────── */
input, textarea, select {
  font-family: var(--font);
  background: var(--bg-input);
  border: 1.5px solid var(--border);
  color: var(--text);
  border-radius: var(--r-sm);
  padding: 11px 14px;
  font-size: 14px;
  outline: none;
  width: 100%;
  transition: border-color 0.2s, box-shadow 0.2s;
}
input:focus, textarea:focus, select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
input::placeholder, textarea::placeholder { color: var(--text-3); }
select { cursor: pointer; }
/* ── BUTTONS ─────────────────────────────────────────────────────────────── */
button { font-family: var(--font); cursor: pointer; border: none; transition: all 0.18s; }
.btn {
  background: var(--accent);
  color: #fff;
  padding: 11px 22px;
  border-radius: var(--r-sm);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.3px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.btn:hover:not(:disabled) {
  background: var(--accent-2);
  transform: translateY(-1px);
  box-shadow: var(--shadow-accent);
}
.btn:active:not(:disabled) { transform: translateY(0); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn-full { width: 100%; justify-content: center; }
.btn-sm {
  padding: 7px 14px;
  font-size: 13px;
  gap: 6px;
}
.btn-outline {
  background: transparent;
  border: 1.5px solid var(--border-2);
  color: var(--text);
  padding: 10px 20px;
  border-radius: var(--r-sm);
  font-size: 14px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.btn-outline:hover { border-color: var(--accent-2); color: var(--accent-2); }
.btn-ghost {
  background: transparent;
  color: var(--text-2);
  padding: 8px 12px;
  border-radius: var(--r-sm);
  font-size: 14px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.btn-ghost:hover { background: var(--bg-card-h); color: var(--text); }
.btn-icon {
  padding: 8px;
  border-radius: var(--r-sm);
}
.btn-icon-sm {
  width: 30px;
  height: 30px;
  border-radius: var(--r-sm);
  background: var(--bg-3);
  border: 1px solid var(--border);
  color: var(--text-2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s;
  flex-shrink: 0;
}
.btn-icon-sm:hover { background: var(--bg-card-h); color: var(--text); border-color: var(--border-2); }
.btn-icon-sm.btn-success:hover { background: rgba(0,216,150,0.15); color: var(--green); border-color: var(--green); }
.btn-icon-sm.btn-danger:hover { background: rgba(255,71,87,0.15); color: var(--red); border-color: var(--red); }
/* ── CARD ─────────────────────────────────────────────────────────────────── */
.card {
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: var(--r-lg);
  padding: 20px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
/* ── BADGES ──────────────────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: var(--r-full);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}
.badge-easy   { background: rgba(0,216,150,0.15);  color: var(--easy); }
.badge-medium { background: rgba(247,183,49,0.15); color: var(--medium); }
.badge-hard   { background: rgba(255,71,87,0.15);  color: var(--hard); }
.badge-group  { background: rgba(108,92,231,0.15); color: var(--accent-2); }
.pts-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 700;
  color: var(--yellow);
  white-space: nowrap;
}
.streak-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 12px;
  font-weight: 700;
  color: var(--red);
  background: rgba(255,71,87,0.12);
  padding: 2px 8px;
  border-radius: var(--r-full);
}
.category-badge {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-3);
  text-transform: capitalize;
}
/* ── AVATAR ──────────────────────────────────────────────────────────────── */
.avatar {
  border-radius: var(--r-full);
  background: linear-gradient(135deg, var(--accent), #e040fb);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  color: white;
  flex-shrink: 0;
  overflow: hidden;
}
/* ── SPINNER ─────────────────────────────────────────────────────────────── */
.spin { animation: spin 0.7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
/* ── ANIMATIONS ──────────────────────────────────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes slideDown {
  from { opacity: 0; transform: translateY(-10px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.6; }
}
.page-enter { animation: fadeUp 0.25s ease forwards; }
.page-exit  { opacity: 0; transform: translateY(6px); }
/* ── LAYOUT ──────────────────────────────────────────────────────────────── */
.app {
  display: flex;
  height: 100vh;
  height: 100dvh;
  min-height: 100svh;
  overflow: hidden;
  width: 100%;
  max-width: none;
  margin: 0;
  background: var(--bg);
}
.boot-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: radial-gradient(circle at top, rgba(108,92,231,0.08), transparent 45%), var(--bg);
}
.boot-card {
  width: min(440px, 100%);
  text-align: center;
  padding: 36px 28px;
}
/* ── SIDEBAR NAV ─────────────────────────────────────────────────────────── */
.sidebar-nav {
  display: none;
}
@media (min-width: 900px) {
  .sidebar-nav {
    display: flex;
    flex-direction: column;
    width: var(--sidebar-w);
    min-width: var(--sidebar-w);
    background: var(--bg-2);
    border-right: 1.5px solid var(--border);
    padding: 24px 16px;
    gap: 4px;
    overflow-y: auto;
  }
}
.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px 24px;
  color: var(--accent-2);
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.5px;
}
.sidebar-logo span { flex: 1; }
.brand-syde {
  color: #1db4ff;
  font-weight: 800;
}
.brand-quest {
  color: #6f7cff;
  font-weight: 800;
}
.theme-toggle {
  background: var(--bg-3);
  border: 1.5px solid var(--border);
  color: var(--text-2);
  border-radius: var(--r-full);
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}
.theme-toggle:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.btn-danger-soft {
  color: var(--red) !important;
}
.btn-danger-soft:hover:not(:disabled) {
  background: rgba(255, 71, 87, 0.12);
  color: var(--red) !important;
}
.sidebar-links {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
}
.sidebar-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: var(--r-md);
  color: var(--text-2);
  font-size: 14px;
  font-weight: 600;
  background: transparent;
  transition: all 0.15s;
  text-align: left;
  cursor: pointer;
  border: none;
}
.sidebar-link:hover { background: var(--bg-card-h); color: var(--text); }
.sidebar-link.active {
  background: var(--accent-glow);
  color: var(--accent-2);
  border: 1px solid rgba(108,92,231,0.25);
}
.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border-radius: var(--r-md);
  border: 1.5px solid var(--border);
  cursor: pointer;
  background: transparent;
  transition: all 0.15s;
  text-align: left;
  margin-top: 12px;
}
.sidebar-user:hover { background: var(--bg-card-h); border-color: var(--border-2); }
.sidebar-user-info { display: flex; flex-direction: column; gap: 2px; overflow: hidden; }
.sidebar-username { font-size: 13px; font-weight: 700; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-pts { font-size: 11px; color: var(--yellow); font-weight: 600; display: flex; align-items: center; gap: 3px; }
/* ── CONTENT WRAPPER ─────────────────────────────────────────────────────── */
.app-content-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-width: 0;
  background: var(--bg);
}
.app-content {
  flex: 1;
  overflow-y: auto;
  padding: 24px 20px 96px;
  max-width: none;
  width: 100%;
  margin: 0;
  overscroll-behavior-y: contain;
}
@media (min-width: 900px) {
  .app-content {
    padding: 32px 40px 48px;
  }
}
/* ── BOTTOM NAV ──────────────────────────────────────────────────────────── */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: calc(var(--nav-h) + var(--safe-bottom));
  padding-bottom: var(--safe-bottom);
  background: color-mix(in srgb, var(--bg-2) 96%, transparent);
  border-top: 1.5px solid var(--border);
  display: flex;
  justify-content: space-around;
  align-items: center;
  z-index: 100;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}
@media (min-width: 900px) {
  .bottom-nav { display: none; }
}
.nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 8px 4px;
  color: var(--text-3);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  background: none;
  cursor: pointer;
  border: none;
  transition: color 0.15s;
}
.nav-item.active { color: var(--accent-2); }
.nav-item:hover:not(.active) { color: var(--text-2); }
@media (max-width: 899px) {
  .app-content {
    /* Keep content clear of the bottom nav + device safe area */
    padding-bottom: calc(var(--nav-h) + var(--safe-bottom) + 18px);
  }
}
/* ── PAGE HEADER ─────────────────────────────────────────────────────────── */
.page-header {
  margin-bottom: 28px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}
.page-header h1 {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -1px;
  color: var(--text);
  line-height: 1;
}
.page-header p {
  color: var(--text-2);
  font-size: 14px;
  margin-top: 6px;
  font-weight: 500;
}
/* ── SECTION TITLE ───────────────────────────────────────────────────────── */
.section-title {
  font-size: 14px;
  font-weight: 800;
  color: var(--text-2);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 12px;
  margin-top: 24px;
}
/* ── TABS ─────────────────────────────────────────────────────────────────── */
.tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 20px;
  background: var(--bg-2);
  padding: 4px;
  border-radius: var(--r-md);
  border: 1.5px solid var(--border);
}
.tab {
  flex: 1;
  padding: 9px;
  text-align: center;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-2);
  cursor: pointer;
  background: none;
  border: none;
  transition: all 0.18s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}
.tab:hover:not(.active) { background: var(--bg-card-h); color: var(--text); }
.tab.active { background: var(--accent); color: #fff; box-shadow: var(--shadow-accent); }
.timed-tabs .tab { letter-spacing: 0.2px; }
.timed-tabs-compact { margin-bottom: 10px; }
.timed-tabs-compact .tab { padding: 7px 8px; font-size: 12px; }
/* ── TIMED MISSION CARD ──────────────────────────────────────────────────── */
.timed-mission-card {
  padding: 28px;
  border-color: var(--border-2);
  box-shadow: var(--shadow-md);
  transition: transform 0.2s, box-shadow 0.2s;
}
.timed-mission-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.timed-mission-card-compact {
  padding: 16px;
}
.timed-mission-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  flex-wrap: wrap;
  gap: 6px;
}
.timed-type-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--accent-2);
  background: var(--accent-glow);
  padding: 5px 12px;
  border-radius: var(--r-full);
  border: 1px solid rgba(108,92,231,0.2);
}
.countdown-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  color: var(--yellow);
  background: rgba(247,183,49,0.1);
  border: 1px solid rgba(247,183,49,0.2);
  padding: 4px 10px;
  border-radius: var(--r-full);
  font-variant-numeric: tabular-nums;
}
.timed-mission-title {
  font-size: 20px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.3px;
  margin-bottom: 8px;
}
.timed-mission-desc {
  color: var(--text-2);
  font-size: 14px;
  line-height: 1.45;
  margin-bottom: 10px;
}
.timed-mission-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
/* ── MISSIONS GRID ───────────────────────────────────────────────────────── */
.filters-row {
  display: flex;
  gap: 6px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.search-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-input);
  border: 1.5px solid var(--border);
  border-radius: var(--r-sm);
  padding: 0 10px;
  flex: 1;
  min-width: 140px;
}
.search-wrap:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); }
.search-wrap svg { color: var(--text-3); flex-shrink: 0; }
.filter-input { background: transparent; border: none; padding: 7px 0; box-shadow: none; font-size: 13px; }
.filter-input:focus { box-shadow: none; }
.filter-select {
  min-width: 100px;
  flex-shrink: 0;
  padding: 7px 10px;
  font-size: 12px;
  font-weight: 600;
}
.missions-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}
@media (min-width: 640px) {
  .missions-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1100px) {
  .missions-grid { grid-template-columns: repeat(3, 1fr); }
}
.mission-card {
  cursor: pointer;
  padding: 18px;
  border-radius: var(--r-md);
  transition: all 0.18s;
  animation: fadeUp 0.3s ease backwards;
}
.mission-card:hover {
  border-color: var(--accent);
  background: var(--bg-card-h);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md), 0 0 20px var(--accent-glow);
}
.mission-card:nth-child(1)  { animation-delay: 0.03s; }
.mission-card:nth-child(2)  { animation-delay: 0.06s; }
.mission-card:nth-child(3)  { animation-delay: 0.09s; }
.mission-card:nth-child(4)  { animation-delay: 0.12s; }
.mission-card:nth-child(5)  { animation-delay: 0.15s; }
.mission-card:nth-child(n+6){ animation-delay: 0.18s; }
.mission-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 10px;
}
.mission-title {
  font-size: 14px;
  font-weight: 800;
  line-height: 1.3;
  flex: 1;
}
.mission-desc {
  font-size: 12px;
  color: var(--text-2);
  line-height: 1.5;
  margin-bottom: 12px;
}
.mission-card-footer {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.mission-category { font-size: 11px; color: var(--text-3); text-transform: capitalize; }
/* ── FEED ─────────────────────────────────────────────────────────────────── */
.feed-post {
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: var(--r-lg);
  margin-bottom: 10px;
  overflow: hidden;
  animation: fadeUp 0.25s ease;
  transition: border-color 0.2s;
}
.feed-post:hover { border-color: var(--border-2); }
.feed-post-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px 8px;
}
.feed-post-info { flex: 1; min-width: 0; }
.feed-username { display: block; font-size: 14px; font-weight: 800; color: var(--text); }
.feed-mission { display: block; font-size: 12px; color: var(--text-2); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.feed-caption { padding: 0 14px 8px; font-size: 13px; color: var(--text-2); line-height: 1.45; }
.feed-tags {
  padding: 0 14px 8px;
  font-size: 12px;
  color: var(--accent-2);
  font-weight: 600;
}
.feed-post-media {
  width: 100%;
  max-height: min(72vh, 560px);
  object-fit: contain;
  display: block;
  background: var(--bg-2);
}
.feed-post-media video {
  width: 100%;
  max-height: min(72vh, 560px);
  display: block;
  background: var(--bg-3);
}
.video-thumb-play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.35);
  pointer-events: none;
}
.feed-post-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px 12px;
  flex-wrap: wrap;
}
.reaction-btn {
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--r-full);
  padding: 5px 12px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--text-2);
  transition: all 0.15s;
}
.reaction-btn:hover { border-color: var(--accent-2); color: var(--accent-2); background: var(--accent-glow); }
.reaction-active-up   { border-color: var(--green) !important; color: var(--green) !important; background: rgba(0,216,150,0.12) !important; }
.reaction-active-down { border-color: var(--red)   !important; color: var(--red)   !important; background: rgba(255,71,87,0.12)  !important; }
.feed-time { margin-left: auto; font-size: 11px; color: var(--text-3); font-weight: 600; }
.feed-no-media {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
  font-size: 13px;
  color: var(--text-3);
  font-weight: 500;
}
/* ── LEADERBOARD ─────────────────────────────────────────────────────────── */
.lb-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: var(--r-md);
  margin-bottom: 8px;
  transition: all 0.15s;
  animation: fadeUp 0.2s ease backwards;
}
.lb-row:hover { border-color: var(--border-2); background: var(--bg-card-h); }
.lb-row-me { border-color: var(--accent); background: var(--accent-glow); }
.lb-rank {
  width: 36px;
  text-align: center;
  font-size: 13px;
  font-weight: 800;
  color: var(--text-3);
  flex-shrink: 0;
}
.lb-rank-0 { color: #ffd700; }
.lb-rank-1 { color: #c0c0c0; }
.lb-rank-2 { color: #cd7f32; }
.lb-info { flex: 1; min-width: 0; }
.lb-tag { display: block; font-size: 14px; font-weight: 800; color: var(--text); }
.lb-completions { font-size: 12px; color: var(--text-3); font-weight: 500; }
.lb-right { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
/* ── PROFILE ─────────────────────────────────────────────────────────────── */
.profile-banner {
  height: 180px;
  background: linear-gradient(135deg, #1a1a35 0%, #2a1a4e 50%, #1a2a4e 100%);
  background-size: cover;
  background-position: center;
  border-radius: var(--r-xl);
  margin-bottom: 0;
  position: relative;
  overflow: hidden;
  border: 1.5px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
}
@media (min-width: 900px) { .profile-banner { height: 220px; } }
.profile-banner-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: var(--text-3);
  font-size: 13px;
  font-weight: 600;
}
.profile-body {
  padding: 0;
  margin-top: -1px;
}
.profile-avatar-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 16px;
  padding: 0 4px;
  margin-bottom: 14px;
}
.profile-avatar-wrap {
  border: 4px solid var(--bg);
  border-radius: var(--r-full);
  background: var(--bg);
}
.profile-actions { display: flex; gap: 8px; align-items: center; margin-bottom: 4px; }
.profile-info { margin-bottom: 20px; }
.profile-username { font-size: 26px; font-weight: 800; letter-spacing: -0.5px; }
.profile-tag { font-size: 14px; color: var(--text-2); font-weight: 600; margin-top: 2px; display: block; }
.profile-bio { margin-top: 8px; font-size: 14px; color: var(--text-2); line-height: 1.5; }
.profile-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 24px;
}
@media (max-width: 500px) {
  .profile-stats { grid-template-columns: repeat(2, 1fr); }
}
.stat-box {
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: var(--r-md);
  padding: 14px 12px;
  text-align: center;
  transition: border-color 0.2s;
}
.stat-box:hover { border-color: var(--border-2); }
.stat-val {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  font-size: 20px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 4px;
}
.stat-label { font-size: 11px; font-weight: 700; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.5px; }
/* ── FRIENDS SECTION ─────────────────────────────────────────────────────── */
.friends-section { margin-bottom: 24px; }
.friends-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: var(--r-md);
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
  text-align: left;
}
.friends-toggle:hover { border-color: var(--border-2); background: var(--bg-card-h); }
.friends-toggle span:first-of-type { flex: 1; }
.notif-dot {
  background: var(--red);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  width: 18px;
  height: 18px;
  border-radius: var(--r-full);
  display: flex;
  align-items: center;
  justify-content: center;
}
.chevron { transition: transform 0.2s; color: var(--text-3); }
.chevron.open { transform: rotate(90deg); }
.friends-panel {
  background: var(--bg-2);
  border: 1.5px solid var(--border);
  border-top: none;
  border-radius: 0 0 var(--r-md) var(--r-md);
  padding: 16px;
  animation: slideDown 0.2s ease;
}
.friends-subsection { margin-bottom: 20px; }
.friends-subsection:last-child { margin-bottom: 0; }
.friends-subheader {
  font-size: 11px;
  font-weight: 800;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 10px;
}
.friend-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 6px;
  border-radius: var(--r-sm);
  transition: background 0.15s;
  margin-bottom: 4px;
}
.friend-row:hover { background: var(--bg-card-h); }
.friend-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; font-size: 13px; font-weight: 700; color: var(--text); }
.friend-pts { font-size: 11px; color: var(--yellow); font-weight: 600; display: flex; align-items: center; gap: 3px; }
.friend-actions { display: flex; gap: 5px; }
/* ── PROFILE COMPLETIONS GRID ───────────────────────────────────────────── */
.profile-completions { margin-top: 24px; }
.profile-completions-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-top: 10px;
}
@media (min-width: 640px) {
  .profile-completions-grid { grid-template-columns: repeat(4, 1fr); }
}
.profile-completion-thumb {
  aspect-ratio: 1;
  border-radius: var(--r-sm);
  overflow: hidden;
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  position: relative;
  cursor: pointer;
  transition: border-color 0.15s;
}
.profile-completion-thumb:hover { border-color: var(--accent); }
.profile-thumb-media {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.profile-thumb-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: var(--text-3);
  font-size: 10px;
  font-weight: 600;
  padding: 6px;
  text-align: center;
}
.profile-thumb-overlay {
  position: absolute;
  bottom: 4px;
  right: 4px;
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  border-radius: var(--r-sm);
  padding: 4px 6px;
  display: inline-flex;
  gap: 6px;
  align-items: center;
}
.tagged-pill {
  font-size: 10px;
  color: var(--accent-2);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.badge-media {
  background: color-mix(in srgb, var(--accent) 16%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent);
  color: var(--accent-2);
}
.tag-friends-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}
.tag-friend-chip {
  border: 1px solid var(--border);
  background: var(--bg-2);
  color: var(--text-2);
  border-radius: var(--r-full);
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 700;
}
.tag-friend-chip.active {
  border-color: var(--accent);
  color: #fff;
  background: var(--accent);
}
/* ── TABS ────────────────────────────────────────────────────────────────── */
.profile-tabs {
  display: flex;
  justify-content: center;
}
.tabs {
  display: inline-flex;
  gap: 4px;
  background: var(--bg-2);
  border: 1.5px solid var(--border);
  border-radius: var(--r-md);
  padding: 4px;
}
.tab {
  background: transparent;
  border: none;
  color: var(--text-2);
  padding: 10px 18px;
  border-radius: var(--r-sm);
  font-size: 14px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.15s;
}
.tab:hover {
  background: var(--bg-3);
  color: var(--text);
}
.tab.active {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 2px 8px rgba(29, 180, 255, 0.25);
}
/* ── COMPLETION ROWS ─────────────────────────────────────────────────────── */
.completions-section { margin-top: 24px; }
.completion-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: var(--r-md);
  margin-bottom: 6px;
  animation: fadeUp 0.2s ease;
}
.completion-info { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.completion-tag { font-size: 13px; font-weight: 800; color: var(--text); }
.completion-time { font-size: 11px; color: var(--text-3); font-weight: 500; }
.completion-check { color: var(--green); flex-shrink: 0; }
/* ── UPLOAD PAGE ─────────────────────────────────────────────────────────── */
.upload-card { padding: 24px; }
.mission-select {
  margin-bottom: 0;
  font-weight: 600;
  font-size: 14px;
}
.selected-mission-preview {
  margin-top: 16px;
  padding: 16px;
  background: var(--bg-2);
  border: 1.5px solid var(--accent);
  border-radius: var(--r-md);
  animation: fadeIn 0.2s ease;
}
.selected-mission-preview h3 {
  font-size: 15px;
  font-weight: 800;
  margin-bottom: 6px;
}
.selected-mission-preview p {
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.5;
}
.upload-drop-zone {
  border: 2px dashed var(--border-2);
  border-radius: var(--r-md);
  padding: 32px 24px;
  text-align: center;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  color: var(--text-2);
  font-size: 14px;
  font-weight: 600;
  transition: all 0.2s;
  background: var(--bg-2);
}
.upload-drop-zone:hover { border-color: var(--accent); color: var(--accent-2); background: var(--accent-glow); }
.upload-hint { font-size: 12px; color: var(--text-3); font-weight: 500; }
.upload-preview-wrap {
  margin-bottom: 0;
  border-radius: var(--r-md);
  overflow: hidden;
  border: 1.5px solid var(--accent);
  position: relative;
}
.upload-preview-media {
  width: 100%;
  max-height: 320px;
  object-fit: contain;
  display: block;
  background: var(--bg-3);
}
.upload-preview-remove {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  padding: 8px 14px;
  background: rgba(255,71,87,0.1);
  border: none;
  color: var(--red);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s;
  font-family: var(--font);
}
.upload-preview-remove:hover { background: rgba(255,71,87,0.2); }
.upload-file-info {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--green);
  font-size: 14px;
  font-weight: 700;
}
/* ── FORM LABELS ─────────────────────────────────────────────────────────── */
.form-label {
  display: block;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--text-2);
  margin-bottom: 8px;
}
.form-optional { font-weight: 500; text-transform: none; color: var(--text-3); letter-spacing: 0; }
/* ── MODAL ───────────────────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
  animation: fadeIn 0.15s ease;
  backdrop-filter: blur(6px);
}
.modal {
  background: var(--bg-2);
  border: 1.5px solid var(--border-2);
  border-radius: var(--r-xl);
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  animation: fadeUp 0.25s ease;
}
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px 0;
}
.modal-header h2 { font-size: 20px; font-weight: 800; }
.modal-body {
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
}
.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 24px 20px;
  border-top: 1px solid var(--border);
}
/* ── BANNER UPLOAD ───────────────────────────────────────────────────────── */
.banner-upload-zone {
  height: 120px;
  border: 2px dashed var(--border-2);
  border-radius: var(--r-md);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  color: var(--text-2);
  font-size: 13px;
  font-weight: 600;
  background-size: cover;
  background-position: center;
  transition: border-color 0.2s, background-color 0.2s;
  position: relative;
  overflow: hidden;
}
.banner-upload-zone:hover { border-color: var(--accent); color: var(--accent-2); }
.banner-edit-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  border-radius: var(--r-md);
}
.avatar-upload-row {
  display: flex;
  align-items: center;
  gap: 14px;
}
/* ── EMPTY STATE ─────────────────────────────────────────────────────────── */
.empty {
  text-align: center;
  padding: 48px 20px;
  color: var(--text-3);
  font-size: 14px;
  font-weight: 600;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.empty svg { opacity: 0.4; }
/* ── TOAST ───────────────────────────────────────────────────────────────── */
.toast {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-card);
  border: 1.5px solid var(--border-2);
  border-radius: var(--r-md);
  padding: 12px 16px;
  z-index: 2000;
  font-size: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: var(--shadow-lg);
  animation: fadeUp 0.25s ease;
  max-width: calc(100vw - 40px);
  white-space: nowrap;
}
.toast-success { border-color: var(--green); color: var(--green); }
.toast-error   { border-color: var(--red);   color: var(--red); }
.toast-success svg { color: var(--green); }
.toast-error svg   { color: var(--red); }
.toast-close { background: transparent; border: none; color: inherit; cursor: pointer; padding: 0 0 0 4px; opacity: 0.7; display: flex; align-items: center; }
.toast-close:hover { opacity: 1; }
/* ── AUTH ERROR ─────────────────────────────────────────────────────────── */
.auth-error {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,71,87,0.1);
  border: 1px solid rgba(255,71,87,0.3);
  color: var(--red);
  border-radius: var(--r-sm);
  padding: 10px 14px;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 20px;
  animation: fadeUp 0.2s ease;
}
/* ── AUTH PAGE ───────────────────────────────────────────────────────────── */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: radial-gradient(ellipse at 30% 20%, rgba(108,92,231,0.08) 0%, transparent 60%),
              radial-gradient(ellipse at 70% 80%, rgba(224,64,251,0.05) 0%, transparent 60%),
              var(--bg);
}
.auth-card {
  width: 100%;
  max-width: 440px;
  background: var(--bg-card);
  border: 1.5px solid var(--border-2);
  border-radius: var(--r-xl);
  padding: 36px 32px;
  box-shadow: var(--shadow-lg);
  animation: fadeUp 0.35s ease;
}
.auth-logo {
  display: flex;
  justify-content: center;
  margin-bottom: 14px;
  color: var(--accent-2);
}
.auth-title {
  font-size: 36px;
  font-weight: 800;
  text-align: center;
  letter-spacing: -1px;
  margin-bottom: 6px;
  background: linear-gradient(135deg, var(--text), var(--accent-2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.auth-subtitle {
  text-align: center;
  color: var(--text-2);
  font-size: 15px;
  font-weight: 500;
  margin-bottom: 32px;
}
.auth-section h2 {
  font-size: 16px;
  font-weight: 800;
  margin-bottom: 14px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-2);
}
.auth-form { display: flex; flex-direction: column; gap: 10px; }
.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 24px 0;
}
.auth-divider::before, .auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}
.auth-divider span { font-size: 12px; font-weight: 700; color: var(--text-3); }
/* ── SCROLLBAR ───────────────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-2); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-3); }
/* ── UTILITY ─────────────────────────────────────────────────────────────── */
.mt-16 { margin-top: 16px; }
/* ── RESPONSIVE TWEAKS ───────────────────────────────────────────────────── */
@media (max-width: 400px) {
  .page-header h1 { font-size: 26px; }
  .timed-mission-card-compact { padding: 12px; }
  .timed-mission-title { font-size: 18px; }
  .timed-mission-desc { font-size: 13px; }
  .timed-tabs-compact .tab { padding: 7px 6px; font-size: 11px; gap: 3px; }
  .auth-card { padding: 24px 20px; }
}
/* ── FEED CLICKABLE AREAS ────────────────────────────────────────────────── */
.feed-post-clickable {
  display: contents;
  cursor: pointer;
}
.feed-media-clickable {
  cursor: pointer;
  overflow: hidden;
}
.feed-media-clickable:hover .feed-post-media {
  opacity: 0.92;
  transition: opacity 0.15s;
}
/* ── POST DETAIL MODAL ───────────────────────────────────────────────────── */
.post-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.75);
  backdrop-filter: blur(6px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: fadeIn 0.18s ease;
}
@keyframes fadeIn {
  from { opacity: 0 }
  to   { opacity: 1 }
}
.post-modal {
  background: var(--bg-card);
  border: 1.5px solid var(--border-2);
  border-radius: var(--r-xl);
  width: 100%;
  max-width: 960px;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  animation: scaleUp 0.2s ease;
}
@keyframes scaleUp {
  from { transform: scale(0.95); opacity: 0 }
  to   { transform: scale(1);    opacity: 1 }
}
.post-modal-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1.5px solid var(--border);
  flex-shrink: 0;
}
.post-modal-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.post-modal-user {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.post-modal-body {
  display: flex;
  flex: 1;
  overflow: hidden;
  min-height: 0;
}
/* ── Media column ── */
.post-modal-media-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-right: 1.5px solid var(--border);
}
.post-modal-media-wrap {
  flex: 1;
  overflow: hidden;
  background: var(--bg-3);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
}
[data-theme="light"] .bottom-nav {
  background: color-mix(in srgb, var(--bg) 95%, transparent);
}
[data-theme="light"] .video-thumb-play {
  background: rgba(15, 15, 31, 0.18);
}
[data-theme="light"] .post-modal-overlay {
  background: rgba(15, 15, 31, 0.52);
}
.post-modal-media {
  width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
}
.post-modal-no-media {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--text-3);
  font-weight: 600;
  font-size: 15px;
  background: var(--bg-3);
}
/* ── NOTIFICATIONS ───────────────────────────────────────────────────────── */
.tabs-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.tab-btn {
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  color: var(--text-2);
  padding: 8px 14px;
  border-radius: var(--r-md);
  font-size: 13px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.15s;
}
.tab-btn svg { color: inherit; }
.tab-btn:hover { background: var(--bg-3); color: var(--text); }
.tab-btn.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.notifications-list { display: flex; flex-direction: column; gap: 8px; }
.notification-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
}
.notification-content { flex: 1; }
.notification-content p { margin: 0 0 4px 0; font-size: 14px; }
.notification-content strong { font-weight: 700; color: var(--accent-2); }
.notification-time { font-size: 12px; color: var(--text-3); }
/* ── STATS PAGE ──────────────────────────────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
@media (min-width: 640px) {
  .stats-grid { grid-template-columns: repeat(3, 1fr); }
}
.stat-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px;
}
.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--r-md);
  display: flex;
  align-items: center;
  justify-content: center;
}
.stat-content { flex: 1; }
.stat-value {
  font-size: 28px;
  font-weight: 800;
  color: var(--text);
  line-height: 1;
  margin-bottom: 4px;
}
.stat-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.activity-breakdown { margin-top: 16px; }
.activity-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.activity-label {
  min-width: 80px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-2);
  display: flex;
  align-items: center;
  gap: 6px;
}
.category-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}
.activity-bar-wrap {
  flex: 1;
  height: 18px;
  background: var(--bg-3);
  border-radius: var(--r-full);
  overflow: hidden;
}
.activity-bar {
  height: 100%;
  background: var(--accent);
  border-radius: var(--r-full);
  transition: width 0.3s ease;
}
.activity-count {
  min-width: 30px;
  text-align: right;
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}
/* ── HEATMAP ─────────────────────────────────────────────────────────────── */
.heatmap-section {
  margin-top: 20px;
  padding: 18px;
}
.heatmap-grid {
  display: grid;
  grid-template-columns: repeat(15, 1fr);
  gap: 3px;
  margin-top: 12px;
}
@media (min-width: 640px) {
  .heatmap-grid { grid-template-columns: repeat(18, 1fr); }
}
.heatmap-cell {
  aspect-ratio: 1;
  border-radius: 2px;
  transition: transform 0.15s;
}
.heatmap-cell:hover { transform: scale(1.2); }
.heatmap-level-0 { background: var(--bg-3); }
.heatmap-level-1 { background: rgba(29, 180, 255, 0.25); }
.heatmap-level-2 { background: rgba(29, 180, 255, 0.5); }
.heatmap-level-3 { background: rgba(29, 180, 255, 0.75); }
.heatmap-level-4 { background: var(--accent); }
.heatmap-legend {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 12px;
  font-size: 11px;
  color: var(--text-3);
  justify-content: flex-end;
}
.heatmap-legend .heatmap-cell {
  width: 12px;
  height: 12px;
}
/* ── HOURPIC ─────────────────────────────────────────────────────────────── */
.hourpic-intro {
  text-align: center;
  padding: 30px 20px;
}
.hourpic-intro h3 {
  margin: 12px 0 8px 0;
  font-size: 20px;
}
.hourpic-intro p {
  color: var(--text-2);
  line-height: 1.6;
  max-width: 500px;
  margin: 0 auto;
}
.hourpic-games {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-top: 20px;
}
@media (min-width: 640px) {
  .hourpic-games { grid-template-columns: repeat(2, 1fr); }
}
.hourpic-game-card { padding: 18px; }
.hourpic-game-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.hourpic-game-header h3 { margin: 0; font-size: 16px; }
.hourpic-participants {
  display: flex;
  gap: 6px;
  margin-bottom: 12px;
}
.hourpic-progress { font-size: 13px; color: var(--text-2); }
.hourpic-progress-bar {
  height: 6px;
  background: var(--bg-3);
  border-radius: var(--r-full);
  overflow: hidden;
  margin-bottom: 6px;
}
.hourpic-progress-fill {
  height: 100%;
  background: var(--accent);
  border-radius: var(--r-full);
  transition: width 0.3s ease;
}
.hourpic-collage-modal {
  max-width: 900px;
  width: 95%;
  max-height: 90vh;
}
.collage-view-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}
.hourpic-collage-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}
@media (min-width: 640px) {
  .hourpic-collage-grid { grid-template-columns: repeat(6, 1fr); }
}
.hourpic-collage-cell {
  aspect-ratio: 1;
  border-radius: var(--r-sm);
  overflow: hidden;
  background: var(--bg-3);
}
.hourpic-collage-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: var(--text-3);
  font-size: 11px;
  font-weight: 600;
}
.post-modal-caption {
  padding: 14px 18px;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}
.post-modal-caption p {
  font-size: 14px;
  color: var(--text-2);
  line-height: 1.55;
}
.post-modal-votes {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}
.reaction-btn-lg {
  padding: 8px 16px;
  font-size: 14px;
  gap: 8px;
}
/* ── Comments column ── */
.post-modal-comments-col {
  width: 340px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-width: 0;
}
.post-modal-comments-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-2);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  padding: 16px 18px 12px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.post-modal-comments-list {
  flex: 1;
  overflow-y: auto;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.post-modal-no-comments {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--text-3);
  padding: 40px 0;
  text-align: center;
}
.post-modal-no-comments p { font-size: 15px; font-weight: 600; }
.post-modal-no-comments span { font-size: 13px; }
.post-modal-comment {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  animation: fadeUp 0.15s ease;
}
.post-modal-comment-body {
  flex: 1;
  background: var(--bg-3);
  border-radius: var(--r-sm);
  padding: 8px 12px;
}
.post-modal-comment-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}
.post-modal-comment-tag {
  font-size: 12px;
  font-weight: 800;
  color: var(--text);
}
.post-modal-comment-time {
  font-size: 11px;
  color: var(--text-3);
}
.post-modal-comment-text {
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
}
.post-modal-comment-input {
  display: flex;
  gap: 10px;
  padding: 12px 14px;
  border-top: 1.5px solid var(--border);
  align-items: flex-start;
  flex-shrink: 0;
}
.post-modal-input-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
/* ── Responsive: stack on mobile ── */
@media (max-width: 700px) {
  .post-modal {
    max-height: 95vh;
    border-radius: var(--r-lg);
  }
  .post-modal-header {
    align-items: flex-start;
    flex-wrap: wrap;
  }
  .post-modal-header-actions {
    width: 100%;
    margin-left: 0;
  }
  .post-modal-body {
    flex-direction: column;
    overflow-y: auto;
  }
  .post-modal-media-col {
    border-right: none;
    border-bottom: 1.5px solid var(--border);
    max-height: 55vh;
  }
  .post-modal-media-wrap {
    max-height: 40vh;
  }
  .post-modal-comments-col {
    width: 100%;
    max-height: 40vh;
  }
}
