:root {
  color-scheme: dark;
  --bg: #0b0f16;
  --bg-soft: #0f1420;
  --panel: #161c26;
  --panel-soft: #1a2230;
  --stroke: rgba(255, 255, 255, 0.08);
  --glow: rgba(30, 140, 255, 0.12);
  --text: #f4f7ff;
  --muted: #a2acb8;
  --accent: #2f89ff;
  --accent-strong: #1e6fe8;
  --success: #38b165;
  --warning: #ef4d4d;
  --purple: #8a3dff;
  --gold: #db9a2a;
  --shadow: 0 20px 60px rgba(2, 6, 18, 0.55);
  --font-ui: "Sora", "Space Grotesk", sans-serif;
  --font-display: "Spectral", serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-ui);
  background: radial-gradient(circle at 20% 10%, #122236, var(--bg) 55%)
      fixed,
    radial-gradient(circle at 80% 0%, rgba(47, 137, 255, 0.25), transparent 45%)
      fixed,
    radial-gradient(circle at 10% 80%, rgba(56, 177, 101, 0.18), transparent 50%)
      fixed,
    linear-gradient(135deg, #0b101b, #0a0f18);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

#root {
  min-height: 100vh;
}

.auth-screen,
.status-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  color: var(--muted);
  position: relative;
  overflow: hidden;
}

.auth-screen::before {
  content: "";
  position: absolute;
  inset: -20%;
  background: radial-gradient(circle at 15% 20%, rgba(47, 137, 255, 0.28), transparent 45%),
    radial-gradient(circle at 85% 30%, rgba(99, 102, 241, 0.2), transparent 42%),
    radial-gradient(circle at 30% 85%, rgba(56, 177, 101, 0.18), transparent 48%),
    linear-gradient(120deg, rgba(9, 14, 26, 0.96), rgba(10, 16, 30, 0.96));
  background-size: 200% 200%;
  animation: slowShift 18s ease-in-out infinite;
  z-index: 0;
}

.auth-screen::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.38) 1.5px, transparent 1.5px);
  background-size: 28px 28px;
  opacity: 0.35;
  animation: particlesFloat 18s linear infinite;
  z-index: 0;
}

.auth-screen .particle-layer {
  position: absolute;
  inset: -10%;
  background: radial-gradient(circle, rgba(86, 156, 255, 0.45) 2px, transparent 2px);
  background-size: 20px 20px;
  opacity: 0.4;
  animation: particlesFloat 12s linear infinite;
  z-index: 0;
  pointer-events: none;
}

.auth-screen .particle-layer.secondary {
  position: absolute;
  inset: -20%;
  background: radial-gradient(circle, rgba(56, 177, 101, 0.35) 1.5px, transparent 1.5px);
  background-size: 32px 32px;
  opacity: 0.3;
  animation: particlesFloat 22s linear infinite reverse;
  z-index: 0;
  pointer-events: none;
}

.auth-card {
  width: min(420px, 90vw);
  padding: 32px;
  border-radius: 24px;
  border: 1px solid var(--stroke);
  background: linear-gradient(160deg, rgba(28, 35, 48, 0.95), rgba(20, 26, 38, 0.95));
  box-shadow: var(--shadow);
  display: grid;
  gap: 18px;
  position: relative;
  z-index: 1;
}

.auth-card h1 {
  font-size: 26px;
  color: var(--text);
}

.auth-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}

.auth-benefits {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.auth-benefits span {
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(47, 137, 255, 0.12);
  border: 1px solid rgba(47, 137, 255, 0.2);
  font-size: 12px;
  color: var(--text);
}

.auth-card .ghost-btn {
  color: rgba(182, 203, 255, 0.9);
}

.auth-card .ghost-btn:hover {
  color: #fff;
}

.auth-card .auth-link {
  font-weight: 600;
  letter-spacing: 0.01em;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(47, 137, 255, 0.12);
  border: 1px solid rgba(47, 137, 255, 0.25);
  box-shadow: 0 8px 20px rgba(47, 137, 255, 0.18);
}

.auth-card .auth-link:hover {
  border-color: rgba(56, 177, 101, 0.45);
  box-shadow: 0 10px 26px rgba(56, 177, 101, 0.25);
}

.auth-card .cta {
  background: linear-gradient(120deg, rgba(47, 137, 255, 0.9), rgba(36, 102, 210, 0.95));
  color: #fff;
  border: none;
  box-shadow: 0 12px 24px rgba(47, 137, 255, 0.3);
}

.auth-card .cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 30px rgba(47, 137, 255, 0.35);
}

.auth-card .cta.is-active {
  background: linear-gradient(120deg, rgba(56, 177, 101, 0.95), rgba(44, 144, 83, 0.95));
  box-shadow: 0 14px 26px rgba(56, 177, 101, 0.3);
}

.status {
  font-size: 13px;
  color: var(--muted);
}

.app-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.app-body {
  display: flex;
  gap: 24px;
  padding: 0 36px 80px;
  position: relative;
  flex-direction: row-reverse;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 24px;
  background: rgba(9, 13, 21, 0.8);
  border-bottom: 1px solid var(--stroke);
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(12px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
  transition: padding 0.2s ease, background 0.2s ease;
}

.topbar::after {
  content: "";
  position: absolute;
  inset: auto 36px 0 36px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(47, 137, 255, 0.8), transparent);
  opacity: 0.6;
  animation: sweep 8s linear infinite;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 600;
}

.menu-btn {
  border: 1px solid var(--stroke);
  background: rgba(14, 19, 29, 0.8);
  color: var(--text);
  width: 32px;
  height: 32px;
  border-radius: 12px;
  font-size: 15px;
  cursor: pointer;
  margin-left: auto;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.menu-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 20px rgba(47, 137, 255, 0.2);
}

.brand-mark {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid var(--accent);
  box-shadow: 0 0 0 4px rgba(47, 137, 255, 0.2);
  position: relative;
  animation: glowPulse 3s ease-in-out infinite;
}

.brand-name {
  font-family: var(--font-display);
  font-size: 16px;
}

.primary-nav {
  display: none;
  gap: 16px;
  padding: 8px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 999px;
  border: 1px solid var(--stroke);
  overflow-x: auto;
  scrollbar-width: none;
  box-shadow: inset 0 0 0 1px rgba(47, 137, 255, 0.1);
}

.primary-nav::-webkit-scrollbar {
  display: none;
}

.nav-link {
  border: none;
  background: transparent;
  color: var(--muted);
  padding: 8px 18px;
  font-size: 14px;
  border-radius: 999px;
  cursor: pointer;
  transition: 0.2s ease;
  position: relative;
}

.nav-link.is-active {
  background: rgba(47, 137, 255, 0.2);
  color: var(--text);
  box-shadow: inset 0 0 0 1px rgba(47, 137, 255, 0.5);
}

.nav-link:hover {
  color: var(--text);
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 4px;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(47, 137, 255, 0.8), transparent);
  opacity: 0;
  transform: scaleX(0.6);
  transition: 0.2s ease;
}

.nav-link.is-active::after,
.nav-link:hover::after {
  opacity: 1;
  transform: scaleX(1);
}

.topbar-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}

.logout-btn {
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  cursor: pointer;
  transition: 0.2s ease;
}

.logout-btn:hover {
  border-color: rgba(47, 137, 255, 0.4);
}

.user-pill {
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--stroke);
  color: var(--muted);
  font-size: 12px;
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.icon-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--stroke);
  background: var(--panel);
  color: var(--text);
  font-weight: 600;
  cursor: pointer;
  transition: 0.2s ease;
}

.icon-btn.avatar {
  background: var(--accent);
  color: #fff;
}

.icon-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 20px rgba(47, 137, 255, 0.25);
}

.content {
  padding: 32px 0 0;
  display: flex;
  flex-direction: column;
  gap: 28px;
  flex: 1;
  min-width: 0;
}

.sidebar {
  width: 240px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding-top: 32px;
  position: sticky;
  top: 92px;
  height: fit-content;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
  padding-right: 6px;
}

.sidebar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--muted);
  font-size: 12px;
}

.plan-badge {
  padding: 4px 10px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 10px;
}

.plan-free {
  background: rgba(255, 255, 255, 0.08);
  color: var(--muted);
}

.plan-pro {
  background: rgba(47, 137, 255, 0.2);
  color: var(--text);
}

.plan-team {
  background: rgba(56, 177, 101, 0.2);
  color: var(--text);
}

.sidebar-group-toggle {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: none;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  padding: 4px 0;
}

.sidebar-group-toggle .sidebar-label {
  margin: 0;
}

.sidebar-label-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.sidebar-icon {
  font-size: 12px;
  color: var(--muted);
}

.sidebar-link.is-plans {
  border-color: rgba(219, 154, 42, 0.5);
  box-shadow: 0 0 0 1px rgba(219, 154, 42, 0.2);
}

.sidebar-link.is-plans span {
  color: #f0c97a;
}

.sidebar-link.is-locked {
  background: linear-gradient(120deg, rgba(255, 107, 107, 0.18), rgba(239, 77, 77, 0.12), rgba(255, 107, 107, 0.22));
  background-size: 200% 200%;
  animation: shimmer 3s ease infinite;
  border-color: rgba(239, 77, 77, 0.4);
}

.sidebar-link.is-locked .sidebar-icon,
.sidebar-link.is-locked span {
  color: #ffb3b3;
}

.sidebar-link.is-restricted {
  background: linear-gradient(120deg, rgba(138, 61, 255, 0.15), rgba(47, 137, 255, 0.08), rgba(138, 61, 255, 0.2));
  background-size: 200% 200%;
  animation: shimmer 3s ease infinite;
  border-color: rgba(138, 61, 255, 0.35);
}

.sidebar-link.is-restricted .sidebar-icon,
.sidebar-link.is-restricted span {
  color: #cdb7ff;
}

.lock-icon {
  font-size: 16px;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.lock-icon.is-full {
  color: #ff9b9b;
  background: rgba(239, 77, 77, 0.2);
}

.lock-icon.is-restricted {
  color: #cdb7ff;
  background: rgba(138, 61, 255, 0.2);
}

.auth-form {
  display: grid;
  gap: 14px;
}

.auth-card {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.auth-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 24px 60px rgba(7, 16, 40, 0.45);
}
.close-btn {
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 16px;
  cursor: pointer;
}

.sidebar-overlay {
  position: fixed;
  inset: 0;
  background: rgba(5, 10, 20, 0.65);
  opacity: 0;
  pointer-events: none;
  transition: 0.2s ease;
  z-index: 15;
}

.sidebar-overlay.is-visible {
  opacity: 1;
  pointer-events: auto;
}

 

.sidebar::-webkit-scrollbar {
  width: 6px;
}

.sidebar::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
}

.sidebar-group {
  display: grid;
  gap: 12px;
}

.sidebar-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--muted);
}

.sidebar-link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  border-radius: 14px;
  border: 1px solid transparent;
  background: rgba(14, 19, 29, 0.5);
  color: var(--muted);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, color 0.2s ease;
  position: relative;
}

.sidebar-link.is-active {
  background: rgba(47, 137, 255, 0.2);
  border-color: rgba(47, 137, 255, 0.4);
  color: var(--text);
  box-shadow: 0 10px 25px rgba(47, 137, 255, 0.2);
}

.sidebar-link:hover {
  color: var(--text);
  border-color: rgba(47, 137, 255, 0.3);
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(5, 12, 24, 0.35);
}

.sidebar-link::before {
  content: "";
  position: absolute;
  left: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(47, 137, 255, 0.4);
  opacity: 0;
  transition: 0.2s ease;
}

.sidebar-link.is-active::before,
.sidebar-link:hover::before {
  opacity: 1;
}

.sidebar-badge {
  background: rgba(239, 77, 77, 0.2);
  color: #ff9b9b;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 999px;
}

.sidebar-card {
  padding: 16px;
  border-radius: 16px;
  border: 1px solid var(--stroke);
  background: linear-gradient(160deg, rgba(23, 34, 50, 0.9), rgba(16, 22, 33, 0.9));
  color: var(--muted);
  font-size: 13px;
  display: grid;
  gap: 8px;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
  animation: float 6s ease-in-out infinite;
}

.sidebar-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top right, rgba(47, 137, 255, 0.2), transparent 60%);
  opacity: 0.7;
  pointer-events: none;
}

.status-banner {
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid rgba(239, 77, 77, 0.4);
  background: rgba(239, 77, 77, 0.1);
  color: #ff9b9b;
  font-size: 13px;
}

.confetti {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: radial-gradient(circle, rgba(47, 137, 255, 0.6) 2px, transparent 2px),
    radial-gradient(circle, rgba(56, 177, 101, 0.6) 2px, transparent 2px),
    radial-gradient(circle, rgba(219, 154, 42, 0.6) 2px, transparent 2px);
  background-size: 120px 120px, 160px 160px, 200px 200px;
  animation: confettiFall 1.8s ease-out;
  z-index: 30;
}

.insight-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.insight-card {
  display: grid;
  gap: 12px;
}

.insight-stats {
  display: flex;
  gap: 24px;
  color: var(--muted);
  font-size: 12px;
}

.insight-stats strong {
  display: block;
  color: var(--text);
  font-size: 18px;
}

.recap-card {
  display: grid;
  gap: 12px;
}

.recap-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--muted);
  font-size: 12px;
}

.recap-stats {
  display: flex;
  gap: 24px;
  color: var(--muted);
  font-size: 12px;
}

.recap-stats strong {
  display: block;
  color: var(--text);
  font-size: 18px;
}

.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-size: 13px;
}

.toggle-row input[type="checkbox"] {
  accent-color: var(--accent);
}

.notice-list {
  display: grid;
  gap: 16px;
}

.notice-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.notice-card h3 {
  margin-top: 10px;
  font-weight: 500;
}

.notice-meta {
  color: var(--muted);
  font-size: 13px;
  margin-top: 8px;
}

.notice-badge {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  padding: 6px 10px;
  border-radius: 999px;
  display: inline-flex;
}

.notice-badge.overdue {
  background: rgba(239, 77, 77, 0.15);
  color: #ff9b9b;
}

.notice-badge.missed {
  background: rgba(219, 154, 42, 0.2);
  color: #f0c97a;
}

.community-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}

.community-card {
  display: grid;
  gap: 12px;
}

.community-tag {
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

.community-meta {
  color: var(--muted);
  font-size: 13px;
}

.community-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--muted);
  font-size: 12px;
}

.friends-list {
  display: grid;
  gap: 14px;
}

.requests {
  display: grid;
  gap: 12px;
}

.requests h3 {
  font-weight: 500;
}

.friend-card {
  display: grid;
  grid-template-columns: 48px 1fr auto;
  align-items: center;
  gap: 16px;
}

.friend-avatar {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  background: rgba(47, 137, 255, 0.25);
  display: grid;
  place-items: center;
  font-weight: 600;
  color: var(--text);
}

.friend-info h3 {
  font-weight: 500;
  margin-bottom: 4px;
}

.friend-info p {
  color: var(--muted);
  font-size: 13px;
}

.friend-stats {
  display: grid;
  gap: 8px;
  text-align: right;
  font-size: 12px;
  color: var(--muted);
}

.leaderboard {
  display: grid;
  gap: 12px;
}

.leaderboard-row {
  display: grid;
  grid-template-columns: 64px 1fr auto;
  align-items: center;
  gap: 16px;
}

.leaderboard-row.is-top {
  border-color: rgba(219, 154, 42, 0.5);
  box-shadow: 0 0 0 1px rgba(219, 154, 42, 0.2), var(--shadow);
}

.leader-rank {
  font-size: 18px;
  font-weight: 600;
  color: var(--gold);
}

.leader-info h3 {
  font-weight: 500;
}

.leader-info p {
  color: var(--muted);
  font-size: 13px;
}

.leader-metrics {
  display: grid;
  gap: 6px;
  text-align: right;
  color: var(--muted);
  font-size: 12px;
}

.rooms-layout {
  display: grid;
  grid-template-columns: minmax(280px, 320px) 1fr;
  gap: 20px;
}

.rooms-panel {
  display: grid;
  gap: 18px;
}

.rooms-list {
  display: grid;
  gap: 12px;
}

.room-card {
  display: grid;
  gap: 8px;
  padding: 16px;
  border-radius: 16px;
  border: 1px solid var(--stroke);
  background: rgba(14, 19, 29, 0.7);
  color: var(--muted);
  text-align: left;
  cursor: pointer;
  transition: 0.2s ease;
}

.room-card h3 {
  color: var(--text);
  font-weight: 600;
}

.room-card.is-active {
  border-color: rgba(47, 137, 255, 0.4);
  box-shadow: 0 16px 30px rgba(47, 137, 255, 0.15);
}

.room-detail {
  display: grid;
  gap: 16px;
}

.room-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

.room-content {
  display: grid;
  grid-template-columns: minmax(220px, 280px) 1fr;
  gap: 18px;
}

.room-section {
  display: grid;
  gap: 12px;
}

.room-score-row {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 13px;
}

.room-invite-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.room-chat {
  display: grid;
  gap: 12px;
}

.room-chat-header {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 13px;
}

.room-chat-list {
  max-height: 360px;
  overflow-y: auto;
  display: grid;
  gap: 12px;
  padding-right: 6px;
}

.room-chat-item {
  display: grid;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
}

.room-chat-item strong {
  color: var(--text);
}

.room-chat-item img {
  width: 100%;
  max-height: 220px;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid var(--stroke);
}

.room-chat-form {
  display: grid;
  gap: 10px;
}

.room-chat-form input {
  background: var(--panel);
  border: 1px solid var(--stroke);
  border-radius: 10px;
  padding: 10px 12px;
  color: var(--text);
}

.room-proof {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px;
  align-items: center;
}

.room-proof select,
.room-proof input[type="number"],
.room-proof input[type="file"] {
  background: var(--panel);
  border: 1px solid var(--stroke);
  border-radius: 10px;
  padding: 8px 10px;
  color: var(--text);
  font-size: 13px;
}

.room-points {
  font-size: 12px;
  color: var(--muted);
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--stroke);
  text-align: center;
}

.rewards-grid {
  display: grid;
  gap: 18px;
}

.rewards-rules {
  display: grid;
  gap: 10px;
}

.reward-rules {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.reward-rules .rule {
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(14, 19, 29, 0.6);
  color: var(--muted);
  font-size: 12px;
}

.reward-rules .rule.ok {
  border-color: rgba(56, 177, 101, 0.5);
  color: #b6f1c9;
  background: rgba(56, 177, 101, 0.12);
}

.rewards-summary,
.rewards-achievements,
.rewards-list {
  display: grid;
  gap: 14px;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
}

.achievement-list {
  display: grid;
  gap: 12px;
}

.achievement-row {
  display: grid;
  gap: 8px;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid var(--stroke);
  color: var(--muted);
}

.achievement-row.is-achieved {
  border-color: rgba(56, 177, 101, 0.5);
  color: var(--text);
}

.achievement-progress {
  display: grid;
  gap: 6px;
  font-size: 12px;
}

.reward-items {
  display: grid;
  gap: 12px;
}

.reward-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  color: var(--muted);
}

.reward-row.is-claimed {
  opacity: 0.6;
}

.reward-actions {
  display: grid;
  gap: 6px;
  text-align: right;
}

.ad-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.ad-slot {
  min-width: 220px;
  min-height: 120px;
  padding: 12px;
  border-radius: 14px;
  border: 1px dashed rgba(96, 165, 250, 0.4);
  background: rgba(12, 20, 36, 0.6);
  display: grid;
  place-items: center;
}

.ad-placeholder {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: rgba(147, 197, 253, 0.9);
}

.ad-debug-banner {
  margin: 0 0 16px;
  padding: 12px;
  border-radius: 16px;
  border: 1px solid rgba(56, 189, 248, 0.35);
  background: rgba(10, 20, 40, 0.65);
  box-shadow: 0 16px 28px rgba(5, 12, 24, 0.35);
}

.ad-debug-banner .ad-slot {
  width: 100%;
  min-height: 110px;
  border: 2px dashed rgba(96, 165, 250, 0.6);
  background: rgba(15, 30, 55, 0.75);
}

.ad-debug-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: rgba(147, 197, 253, 0.95);
  margin-bottom: 8px;
}

.ad-placeholder {
  font-size: 13px;
  color: rgba(239, 246, 255, 0.92);
}

.ad-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--muted);
}

.plan-lock {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
}

.plans-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.plan-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.plan-price {
  font-size: 20px;
  font-weight: 600;
  color: var(--text);
}

.plan-card {
  display: grid;
  gap: 10px;
}

.plan-card ul {
  list-style: none;
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  padding: 0;
}

.plan-card.is-highlight {
  border-color: rgba(47, 137, 255, 0.4);
  box-shadow: 0 16px 30px rgba(47, 137, 255, 0.15);
}

.challenge-grid {
  display: grid;
  gap: 16px;
}

.challenge-panel {
  display: grid;
  gap: 12px;
}

.challenge-list {
  display: grid;
  gap: 12px;
}

.challenge-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid var(--stroke);
  color: var(--muted);
}

.challenge-card strong {
  color: var(--text);
  display: block;
  margin-bottom: 6px;
}

.challenge-card span {
  font-size: 12px;
  color: var(--muted);
}

.challenge-actions {
  display: grid;
  gap: 6px;
}

.room-habits {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}

.room-habit-list {
  display: grid;
  gap: 6px;
}

.room-habit-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 10px;
  padding: 6px 10px;
  color: var(--muted);
  font-size: 12px;
}

.team-layout {
  display: grid;
  grid-template-columns: minmax(260px, 320px) 1fr;
  gap: 18px;
}

.team-panel,
.team-detail {
  display: grid;
  gap: 16px;
}

.team-section {
  display: grid;
  gap: 12px;
}

.team-list {
  display: grid;
  gap: 10px;
}

.view {
  display: flex;
  flex-direction: column;
  gap: 24px;
  animation: fadeIn 0.6s ease;
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 4px;
}

.section-title h2 {
  font-size: 15px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text);
}

.section-title span {
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--muted);
}

.section-title.muted h2 {
  color: var(--muted);
}

.view-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.view-header h1 {
  font-size: 30px;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.subtle {
  color: var(--muted);
  font-size: 14px;
  margin-top: 6px;
}

.tab-row {
  display: flex;
  gap: 12px;
}

.community-filters {
  flex-wrap: wrap;
}

.form-card {
  display: grid;
  gap: 16px;
  padding: 20px;
  border-radius: 18px;
  border: 1px solid var(--stroke);
  background: rgba(14, 19, 29, 0.7);
}

.form-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}

.field {
  display: grid;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
}

.field input,
.field select {
  background: var(--panel);
  border: 1px solid var(--stroke);
  border-radius: 10px;
  padding: 10px 12px;
  color: var(--text);
  font-size: 14px;
  width: 100%;
  min-width: 0;
}

.field.checkbox {
  display: grid;
  grid-template-columns: 18px 1fr;
  align-items: start;
  gap: 10px;
}

.field.checkbox a {
  color: #9ec0ff;
  font-weight: 600;
  text-decoration: none;
}

.field.checkbox a:hover {
  color: #fff;
}

.inline-fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
}

.profile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}

.profile-card {
  display: grid;
  gap: 14px;
}

.profile-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
}

.profile-row strong {
  color: var(--text);
  font-weight: 500;
  word-break: break-all;
}

.profile-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

.chip {
  border: 1px solid var(--stroke);
  background: var(--panel);
  color: var(--muted);
  padding: 8px 16px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: 0.2s ease;
}

.chip.is-active {
  background: var(--accent);
  color: #fff;
}

.chip:hover {
  color: var(--text);
  border-color: rgba(47, 137, 255, 0.4);
}

.chip-count {
  background: rgba(255, 255, 255, 0.12);
  color: inherit;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 999px;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 18px;
}

.card {
  background: linear-gradient(160deg, rgba(28, 35, 48, 0.95), rgba(20, 26, 38, 0.95));
  border-radius: 18px;
  padding: 18px;
  border: 1px solid var(--stroke);
  box-shadow: var(--shadow);
  transition: 0.25s ease;
  position: relative;
  overflow: hidden;
}

.tour-overlay {
  position: fixed;
  inset: 0;
  background: rgba(6, 10, 18, 0.35);
  z-index: 50;
  pointer-events: none;
}

.tour-spotlight {
  position: fixed;
  border-radius: 18px;
  background: rgba(86, 156, 255, 0.08);
  border: 1px solid rgba(86, 156, 255, 0.55);
  box-shadow: 0 0 0 9999px rgba(6, 10, 18, 0.65), 0 0 30px rgba(86, 156, 255, 0.4);
  animation: pulseGlow 2.6s ease-in-out infinite;
  pointer-events: none;
}

.tour-bubble {
  position: fixed;
  z-index: 60;
  max-width: 320px;
  width: min(320px, 88vw);
  background: rgba(18, 25, 38, 0.98);
  border: 1px solid rgba(86, 156, 255, 0.25);
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 20px 50px rgba(6, 10, 18, 0.6);
  color: var(--text);
  transition: top 0.2s ease, left 0.2s ease, transform 0.2s ease;
}

.tour-text {
  font-size: 14px;
  line-height: 1.45;
}

.tour-actions {
  margin-top: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: space-between;
}

.tour-hint {
  font-size: 12px;
  color: var(--muted);
}

.tour-bubble .ghost-btn {
  color: rgba(182, 203, 255, 0.9);
}

.tour-bubble .ghost-btn:hover {
  color: #fff;
}

.tour-highlight {
  position: relative;
  z-index: 55;
}

.sidebar .tour-highlight {
  z-index: 60;
}

.card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top right, rgba(47, 137, 255, 0.12), transparent 55%);
  opacity: 0;
  transition: 0.3s ease;
  pointer-events: none;
}

.card:hover {
  transform: translateY(-4px);
  border-color: rgba(47, 137, 255, 0.35);
  box-shadow: 0 20px 60px rgba(7, 16, 40, 0.5);
}

.card:hover::after {
  opacity: 1;
}

.habit-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 240px;
}

.habit-card.is-highlight {
  border-color: rgba(56, 177, 101, 0.5);
  box-shadow: 0 0 0 1px rgba(56, 177, 101, 0.2), var(--shadow);
}

.habit-card.is-complete {
  opacity: 0.75;
  border-color: rgba(90, 104, 130, 0.5);
}

.habit-card.is-complete .cta {
  background: rgba(47, 137, 255, 0.12);
  color: var(--muted);
  border-color: transparent;
  box-shadow: none;
  transform: none;
}

.habit-card.is-complete .cta:hover {
  transform: none;
  box-shadow: none;
}

.card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.card-actions {
  display: flex;
  gap: 8px;
}

.pill {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(47, 137, 255, 0.15);
  color: var(--accent);
}

.habit-card h3 {
  font-size: 18px;
  font-weight: 500;
  letter-spacing: 0.01em;
}

.meta {
  display: flex;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
}

.progress-list {
  display: grid;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
}

.progress-list strong {
  float: right;
  color: var(--text);
}

.progress-list .accent {
  color: var(--success);
}

.streak {
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(219, 154, 42, 0.15);
  color: #f0c97a;
  font-size: 13px;
}

.goal-meter {
  display: grid;
  gap: 8px;
  font-size: 12px;
  color: var(--muted);
}

.goal-meter strong {
  color: var(--text);
  font-size: 13px;
}

.goal-bar {
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  overflow: hidden;
}

.goal-bar span {
  display: block;
  height: 100%;
  width: 0%;
  background: linear-gradient(120deg, rgba(47, 137, 255, 0.9), rgba(99, 102, 241, 0.9));
  border-radius: 999px;
  transition: width 0.3s ease;
}

.cta {
  margin-top: auto;
  border: 1px solid rgba(255, 255, 255, 0.14);
  padding: 10px 14px;
  border-radius: 12px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: 0.2s ease;
}

.cta.is-active {
  background: var(--success);
  color: #fff;
  border-color: transparent;
}

.cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 20px rgba(56, 177, 101, 0.25);
}

.cta:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

.task-list {
  display: grid;
  gap: 16px;
}

.task-card {
  display: grid;
  grid-template-columns: 24px 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 20px;
  border-left: 3px solid transparent;
}

.task-card.is-urgent {
  border-left-color: var(--warning);
}

.task-check {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  border: 2px solid var(--stroke);
  background: transparent;
  color: var(--text);
  font-weight: 600;
  cursor: pointer;
}

.task-card.is-done {
  opacity: 0.7;
}

.task-card.is-done h3 {
  text-decoration: line-through;
}

.task-main h3 {
  font-weight: 500;
  margin-top: 8px;
  letter-spacing: 0.01em;
}

.task-meta {
  display: flex;
  gap: 12px;
  align-items: center;
  color: var(--muted);
  font-size: 13px;
}

.overdue {
  background: rgba(239, 77, 77, 0.2);
  color: #ff7b7b;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
}

.ghost-btn {
  border: none;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.2s ease, transform 0.2s ease;
}

.ghost-btn:hover {
  color: var(--text);
  transform: translateY(-1px);
}

.ghost-btn.danger {
  color: #ff9b9b;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(120px, 1fr));
  gap: 14px;
}

.calendar-cell {
  background: var(--panel-soft);
  border-radius: 16px;
  padding: 18px;
  min-height: 96px;
  border: 1px solid var(--stroke);
  display: flex;
  flex-direction: column;
  gap: 12px;
  font-size: 14px;
  color: var(--muted);
}

.calendar-cell span {
  font-weight: 500;
}

.calendar-cell.has-highlight {
  border-color: rgba(47, 137, 255, 0.6);
  box-shadow: 0 0 0 1px rgba(47, 137, 255, 0.4);
  color: var(--text);
}

.calendar-bars {
  display: grid;
  gap: 6px;
}

.calendar-bars .bar {
  display: block;
  height: 6px;
  border-radius: 999px;
  background: var(--accent);
}

.calendar-bars .bar.habit {
  background: var(--accent);
}

.calendar-bars .bar.task {
  background: var(--warning);
}

.calendar-bars small {
  color: var(--muted);
  font-size: 11px;
}

.calendar-cell.has-green {
  box-shadow: inset 0 0 0 1px rgba(56, 177, 101, 0.3);
}

.calendar-cell.has-red {
  box-shadow: inset 0 0 0 1px rgba(239, 77, 77, 0.3);
}

.calendar-cell.is-empty {
  background: transparent;
  border: 1px dashed rgba(255, 255, 255, 0.08);
  box-shadow: none;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

.metric-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
}

.metric-icon {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: rgba(47, 137, 255, 0.2);
}

.metric-icon.check {
  background: rgba(56, 177, 101, 0.25);
}

.metric-icon.flame {
  background: rgba(219, 154, 42, 0.25);
}

.metric-icon.trend {
  background: rgba(138, 61, 255, 0.25);
}

.metric-label {
  color: var(--muted);
  font-size: 13px;
}

.metric-value {
  font-size: 24px;
  font-weight: 600;
  margin-top: 6px;
}

.metric-sub {
  color: var(--muted);
  font-size: 12px;
}

.chart-card {
  padding: 20px 22px 30px;
}

.card-title {
  font-weight: 600;
  margin-bottom: 16px;
}

.chart {
  display: grid;
  gap: 16px;
}

.chart-line {
  position: relative;
  height: 200px;
  background: linear-gradient(180deg, rgba(47, 137, 255, 0.1), transparent);
  border-radius: 16px;
  border: 1px solid var(--stroke);
}

.chart-line::before {
  content: "";
  position: absolute;
  inset: 20px;
  border: 1px dashed rgba(255, 255, 255, 0.08);
  border-radius: 12px;
}

.chart-line span {
  position: absolute;
  left: var(--x);
  top: var(--y);
  transform: translate(-50%, -50%);
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px rgba(47, 137, 255, 0.6);
  animation: pulse 2.5s ease-in-out infinite;
}

.chart-axis {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--muted);
}

.heatmap-card {
  padding: 20px;
}

.heatmap {
  display: grid;
  grid-template-columns: repeat(14, 14px);
  gap: 8px;
  margin-bottom: 16px;
}

.heatmap span {
  width: 14px;
  height: 14px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.06);
}

.heatmap span[data-level="2"] {
  background: rgba(56, 177, 101, 0.3);
}

.heatmap span[data-level="3"] {
  background: rgba(56, 177, 101, 0.6);
}

.heatmap span[data-level="4"] {
  background: rgba(56, 177, 101, 0.9);
}

.heatmap-legend {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: var(--muted);
}

.legend-dots {
  display: flex;
  gap: 6px;
}

.legend-dots span {
  width: 12px;
  height: 12px;
  border-radius: 3px;
}

.legend-dots span[data-level="1"] {
  background: rgba(255, 255, 255, 0.08);
}

.legend-dots span[data-level="2"] {
  background: rgba(56, 177, 101, 0.3);
}

.legend-dots span[data-level="3"] {
  background: rgba(56, 177, 101, 0.6);
}

.legend-dots span[data-level="4"] {
  background: rgba(56, 177, 101, 0.9);
}

.stats-card {
  padding: 20px;
  display: grid;
  gap: 18px;
}

.stat-item {
  padding: 16px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--stroke);
  display: grid;
  gap: 12px;
}

.stat-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.stat-head h4 {
  font-weight: 500;
}

.stat-row {
  display: grid;
  grid-template-columns: 1fr 200px auto;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: var(--muted);
}

.progress {
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.progress span {
  display: block;
  height: 100%;
  background: var(--success);
}

.stat-footer {
  display: flex;
  justify-content: space-between;
  text-align: center;
  font-size: 12px;
  color: var(--muted);
}

.stat-footer strong {
  display: block;
  font-size: 16px;
  color: var(--text);
}

.fab {
  position: fixed;
  right: 32px;
  bottom: 32px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: none;
  background: var(--accent);
  color: #fff;
  font-size: 28px;
  box-shadow: 0 16px 40px rgba(47, 137, 255, 0.4);
  cursor: pointer;
  transition: 0.2s ease;
}

.fab:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 20px 45px rgba(47, 137, 255, 0.6);
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes glowPulse {
  0% {
    box-shadow: 0 0 0 4px rgba(47, 137, 255, 0.2);
  }
  50% {
    box-shadow: 0 0 0 6px rgba(47, 137, 255, 0.35);
  }
  100% {
    box-shadow: 0 0 0 4px rgba(47, 137, 255, 0.2);
  }
}

@keyframes sweep {
  0% {
    opacity: 0.2;
    filter: blur(0px);
  }
  50% {
    opacity: 0.7;
    filter: blur(1px);
  }
  100% {
    opacity: 0.2;
    filter: blur(0px);
  }
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 rgba(47, 137, 255, 0.0);
  }
  50% {
    box-shadow: 0 0 16px rgba(47, 137, 255, 0.55);
  }
  100% {
    box-shadow: 0 0 0 rgba(47, 137, 255, 0.0);
  }
}

@keyframes confettiFall {
  0% {
    opacity: 0;
    transform: translateY(-10%);
  }
  20% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translateY(20%);
  }
}

@keyframes confettiGlow {
  0% {
    opacity: 0;
    transform: scale(0.98);
  }
  60% {
    opacity: 0.7;
    transform: scale(1);
  }
  100% {
    opacity: 0;
    transform: scale(1.02);
  }
}

@keyframes shimmer {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

@keyframes float {
  0% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-6px);
  }
  100% {
    transform: translateY(0px);
  }
}

@keyframes slowShift {
  0% {
    transform: translateY(0) scale(1);
    background-position: 0% 0%;
  }
  50% {
    transform: translateY(-2%) scale(1.04);
    background-position: 60% 40%;
  }
  100% {
    transform: translateY(0) scale(1);
    background-position: 0% 0%;
  }
}

@keyframes particlesFloat {
  0% {
    transform: translate(0, 0);
    opacity: 0.18;
  }
  50% {
    transform: translate(-12px, -20px);
    opacity: 0.3;
  }
  100% {
    transform: translate(8px, -60px);
    opacity: 0.22;
  }
}

@keyframes pulseGlow {
  0% {
    box-shadow: 0 0 0 9999px rgba(6, 10, 18, 0.65), 0 0 20px rgba(86, 156, 255, 0.35);
  }
  50% {
    box-shadow: 0 0 0 9999px rgba(6, 10, 18, 0.72), 0 0 34px rgba(86, 156, 255, 0.5);
  }
  100% {
    box-shadow: 0 0 0 9999px rgba(6, 10, 18, 0.65), 0 0 20px rgba(86, 156, 255, 0.35);
  }
}

@media (max-width: 960px) {
  .topbar {
    padding: 10px 16px;
    align-items: center;
    flex-direction: row;
    gap: 12px;
  }

  .topbar::after {
    inset: auto 16px 0 16px;
  }

  .app-body {
    padding: 0 24px 80px;
  }

  .sidebar {
    position: fixed;
    right: 16px;
    top: 5px;
    bottom: 24px;
    background: rgba(9, 13, 21, 0.95);
    border: 1px solid var(--stroke);
    border-radius: 16px;
    padding: 16px;
    width: 240px;
    max-height: none;
    transform: translateX(120%);
    transition: transform 0.2s ease;
    z-index: 20;
  }

  .sidebar.is-open {
    transform: translateX(0);
  }

  .content {
    padding: 24px 0 0;
  }

  .calendar-grid {
    grid-template-columns: repeat(3, minmax(120px, 1fr));
  }

  .stat-row {
    grid-template-columns: 1fr;
  }

  .rooms-layout {
    grid-template-columns: 1fr;
  }

  .room-content {
    grid-template-columns: 1fr;
  }

  .team-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .topbar {
    padding: 18px 16px;
  }

  .app-body {
    padding: 0 18px 86px;
  }

  .content {
    padding: 22px 0 104px;
  }

  .view-header {
    gap: 8px;
  }

  .form-card {
    padding: 18px;
  }

  .card {
    padding: 16px;
  }

  .tab-row {
    gap: 10px;
  }

  .tab-row button {
    padding: 6px 10px;
    font-size: 12px;
  }

  .auth-card {
    padding: 26px;
  }

  .brand-name {
    font-size: 16px;
  }

  .view-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .task-card {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .task-check {
    display: none;
  }

  .calendar-grid {
    grid-template-columns: repeat(2, minmax(120px, 1fr));
  }

  .content {
    padding: 22px 0 104px;
  }

  .fab {
    right: 20px;
    bottom: 20px;
  }

  .inline-fields {
    grid-template-columns: 1fr;
  }

  .form-card {
    padding: 18px;
  }

  .user-pill {
    max-width: 120px;
  }

  .topbar-actions {
    width: 100%;
    justify-content: space-between;
  }

  .logout-btn {
    display: none;
  }

  .card {
    border-radius: 16px;
  }

  .card-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .insight-grid {
    gap: 14px;
  }

  .view {
    gap: 20px;
  }

  .tab-row {
    flex-wrap: wrap;
  }

  .confetti {
    background-image: radial-gradient(circle, rgba(47, 137, 255, 0.35) 2px, transparent 2px),
      radial-gradient(circle, rgba(56, 177, 101, 0.35) 2px, transparent 2px);
    background-size: 160px 160px, 200px 200px;
    animation: confettiGlow 2.2s ease-out;
    opacity: 0.7;
  }

  .profile-grid {
    grid-template-columns: 1fr;
  }

  .form-card input,
  .form-card select {
    font-size: 14px;
  }

  .friend-card,
  .leaderboard-row {
    grid-template-columns: 1fr;
    text-align: left;
  }

  .friend-stats,
  .leader-metrics {
    text-align: left;
  }

  .room-header {
    flex-direction: column;
  }

  .room-proof {
    grid-template-columns: 1fr;
  }
}
