/* ===== RESET & ROOT ===== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg: #06061a;
  --surface: #0d0d2e;
  --card: #12122e;
  --card2: #18183a;
  --border: #1e1e50;
  --primary: #00e5ff;
  --primary-dim: rgba(0,229,255,0.15);
  --primary-glow: rgba(0,229,255,0.4);
  --secondary: #b040ff;
  --secondary-dim: rgba(176,64,255,0.15);
  --accent: #ffd700;
  --accent-dim: rgba(255,215,0,0.15);
  --success: #00ff88;
  --success-dim: rgba(0,255,136,0.15);
  --green: #00ff88;
  --warning: #ff9f43;
  --danger: #ff4757;
  --text: #e8e8ff;
  --text-muted: #6060a0;
  --text-dim: #4040708;
  --pixel: 'Press Start 2P', monospace;
  --body: 'Exo 2', sans-serif;
  --radius: 12px;
  --radius-sm: 8px;
  --transition: 0.25s cubic-bezier(0.4,0,0.2,1);
}

html { scroll-behavior: smooth; }

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

/* ===== LOADING ===== */
#loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  gap: 24px;
}
.loading-logo {
  font-family: var(--pixel);
  font-size: 1.2rem;
  color: var(--primary);
  text-shadow: 0 0 20px var(--primary-glow), 0 0 60px var(--primary-glow);
  animation: pulse 1.5s ease-in-out infinite;
}
.loading-bar {
  width: 200px;
  height: 8px;
  background: var(--border);
  border-radius: 4px;
  overflow: hidden;
}
.loading-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  border-radius: 4px;
  animation: loadingBar 1.2s ease-in-out forwards;
}
@keyframes loadingBar { from { width: 0% } to { width: 100% } }

/* ===== APP CONTAINER ===== */
#app {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  position: relative;
}

/* ===== SCREENS ===== */
.screen {
  display: none;
  min-height: 100vh;
  padding-bottom: 80px;
  animation: screenIn 0.3s ease-out;
}
.screen.active { display: block; }
@keyframes screenIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ===== BOTTOM NAV ===== */
#bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  background: rgba(13,13,46,0.96);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--border);
  padding: 8px 0 12px;
  z-index: 100;
}
#bottom-nav.visible { display: flex; }
.nav-items {
  display: flex;
  width: 100%;
  justify-content: space-around;
}
.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
  border: none;
  background: none;
  color: var(--text-muted);
  font-family: var(--body);
}
.nav-item:hover { color: var(--text); }
.nav-item.active { color: var(--primary); }
.nav-icon { font-size: 1.3rem; }
.nav-label { font-size: 0.65rem; font-weight: 600; letter-spacing: 0.5px; text-transform: uppercase; }

/* ===== WELCOME SCREEN ===== */
#screen-welcome {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 24px;
  text-align: center;
  background: radial-gradient(ellipse at 50% 30%, rgba(0,229,255,0.08) 0%, transparent 60%),
              radial-gradient(ellipse at 80% 80%, rgba(176,64,255,0.08) 0%, transparent 50%);
}
.welcome-logo {
  font-family: var(--pixel);
  font-size: 1.6rem;
  line-height: 2rem;
  color: var(--primary);
  text-shadow: 0 0 20px var(--primary-glow), 0 0 60px rgba(0,229,255,0.2);
  margin-bottom: 8px;
}
.welcome-sub {
  font-family: var(--pixel);
  font-size: 0.6rem;
  color: var(--secondary);
  text-shadow: 0 0 15px rgba(176,64,255,0.5);
  margin-bottom: 32px;
  letter-spacing: 2px;
}
.welcome-canvas-wrap {
  width: 100%;
  max-width: 400px;
  margin-bottom: 32px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: 0 0 40px rgba(0,229,255,0.1);
}
.welcome-tagline {
  font-size: 1rem;
  font-weight: 300;
  color: var(--text-muted);
  margin-bottom: 12px;
  line-height: 1.6;
}
.welcome-tagline strong { color: var(--text); font-weight: 700; }
.feature-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-bottom: 36px;
}
.pill {
  background: var(--card2);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 6px 14px;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-muted);
}
.pill span { margin-right: 4px; }

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border: none;
  border-radius: var(--radius-sm);
  font-family: var(--body);
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  letter-spacing: 0.5px;
}
.btn-primary {
  background: linear-gradient(135deg, var(--primary), #0090ff);
  color: #06061a;
  box-shadow: 0 4px 24px rgba(0,229,255,0.35);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(0,229,255,0.5);
}
.btn-secondary {
  background: var(--card2);
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-secondary:hover { border-color: var(--primary); color: var(--primary); }
.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
}
.btn-ghost:hover { color: var(--text); border-color: var(--text-muted); }
.btn-danger {
  background: rgba(255,71,87,0.15);
  color: var(--danger);
  border: 1px solid rgba(255,71,87,0.3);
}
.btn-sm { padding: 8px 16px; font-size: 0.82rem; }
.btn-lg { padding: 18px 36px; font-size: 1.05rem; }
.btn-full { width: 100%; }
.btn:disabled { opacity: 0.4; cursor: not-allowed; transform: none !important; }

/* ===== SETUP SCREEN ===== */
#screen-setup {
  padding: 0;
  min-height: 100vh;
  display: none;
  flex-direction: column;
}
#screen-setup.active { display: flex; }
.setup-header {
  padding: 24px 20px 16px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.setup-back {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1.2rem;
  margin-bottom: 16px;
  display: block;
}
.setup-progress {
  display: flex;
  gap: 6px;
  margin-bottom: 12px;
}
.setup-step-dot {
  flex: 1;
  height: 4px;
  border-radius: 2px;
  background: var(--border);
  transition: var(--transition);
}
.setup-step-dot.done { background: var(--primary); }
.setup-step-dot.active { background: var(--primary); box-shadow: 0 0 8px var(--primary-glow); }
.setup-title {
  font-family: var(--pixel);
  font-size: 0.75rem;
  color: var(--primary);
  margin-bottom: 4px;
}
.setup-subtitle {
  font-size: 0.85rem;
  color: var(--text-muted);
}
.setup-body {
  flex: 1;
  padding: 24px 20px;
  overflow-y: auto;
}
.setup-footer {
  padding: 16px 20px;
  background: var(--surface);
  border-top: 1px solid var(--border);
  display: flex;
  gap: 12px;
}

/* ===== FORMS ===== */
.form-group { margin-bottom: 20px; }
.form-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}
.form-label span { color: var(--danger); margin-left: 2px; }
.form-input, .form-textarea, .form-select {
  width: 100%;
  background: var(--card2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: var(--body);
  font-size: 0.92rem;
  padding: 12px 14px;
  transition: var(--transition);
  outline: none;
}
.form-input:focus, .form-textarea:focus, .form-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-dim);
}
.form-textarea { resize: vertical; min-height: 80px; }
.form-select option { background: var(--card); }
.form-hint {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 6px;
}
.char-count {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-align: right;
  margin-top: 4px;
}

/* ===== CATEGORY GRID ===== */
.category-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 8px;
}
.category-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 12px 8px;
  background: var(--card2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-align: center;
}
.category-item .cat-icon { font-size: 1.5rem; }
.category-item:hover { border-color: var(--primary); color: var(--primary); }
.category-item.selected {
  border-color: var(--primary);
  background: var(--primary-dim);
  color: var(--primary);
  box-shadow: 0 0 12px var(--primary-dim);
}

/* ===== HABIT LIST BUILDER ===== */
.habit-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }
.habit-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: var(--card2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: var(--transition);
}
.habit-item:hover { border-color: var(--border); }
.habit-icon-pick {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  background: var(--card);
  border-radius: 8px;
  cursor: pointer;
  border: 1px solid var(--border);
  flex-shrink: 0;
}
.habit-info { flex: 1; min-width: 0; }
.habit-name-input {
  background: none;
  border: none;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  font-family: var(--body);
  font-size: 0.88rem;
  font-weight: 500;
  width: 100%;
  padding: 2px 0 4px;
  outline: none;
}
.habit-name-input::placeholder { color: var(--text-muted); }
.habit-name-input:focus { border-color: var(--primary); }
.importance-stars {
  display: flex;
  gap: 4px;
  margin-top: 6px;
}
.importance-star {
  font-size: 0.9rem;
  cursor: pointer;
  color: var(--border);
  transition: var(--transition);
}
.importance-star.active { color: var(--accent); }
.habit-del {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1rem;
  padding: 4px;
  border-radius: 4px;
  transition: var(--transition);
  flex-shrink: 0;
}
.habit-del:hover { color: var(--danger); background: rgba(255,71,87,0.1); }
.add-habit-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: var(--primary-dim);
  border: 1px dashed var(--primary);
  border-radius: var(--radius-sm);
  color: var(--primary);
  font-family: var(--body);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  width: 100%;
}
.add-habit-btn:hover { background: rgba(0,229,255,0.2); }

/* ===== AVATAR SELECTOR ===== */
.avatar-section { text-align: center; margin-bottom: 24px; }
.avatar-preview {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  margin: 0 auto 16px;
  border: 3px solid var(--primary);
  box-shadow: 0 0 24px var(--primary-glow);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  cursor: pointer;
  transition: var(--transition);
}
.avatar-preview:hover { transform: scale(1.05); }
.avatar-emoji-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 6px;
  margin-top: 12px;
}
.avatar-emoji-item {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  border-radius: 8px;
  cursor: pointer;
  background: var(--card2);
  border: 1px solid var(--border);
  transition: var(--transition);
}
.avatar-emoji-item:hover { border-color: var(--primary); transform: scale(1.1); }
.avatar-emoji-item.selected { border-color: var(--primary); background: var(--primary-dim); }
.color-grid {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 12px;
}
.color-swatch {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  border: 3px solid transparent;
  transition: var(--transition);
}
.color-swatch.selected { border-color: white; transform: scale(1.15); }

/* ===== DASHBOARD SCREEN ===== */
.dash-header {
  padding: 16px 20px 12px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.dash-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.char-avatar-sm {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--card2);
  border: 2px solid var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  box-shadow: 0 0 12px var(--primary-glow);
}
.char-info { flex: 1; padding: 0 12px; }
.char-name {
  font-family: var(--pixel);
  font-size: 0.6rem;
  color: var(--text);
  margin-bottom: 4px;
}
.char-level {
  font-size: 0.75rem;
  color: var(--accent);
  font-weight: 700;
}
.streak-badge {
  display: flex;
  align-items: center;
  gap: 5px;
  background: var(--accent-dim);
  border: 1px solid rgba(255,215,0,0.3);
  border-radius: 20px;
  padding: 5px 10px;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent);
}
.xp-bar-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}
.xp-bar {
  flex: 1;
  height: 6px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
}
.xp-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  border-radius: 3px;
  transition: width 0.8s cubic-bezier(0.4,0,0.2,1);
  box-shadow: 0 0 8px var(--primary-glow);
}
.xp-text {
  font-size: 0.72rem;
  color: var(--text-muted);
  white-space: nowrap;
  font-weight: 600;
}

/* ===== GAME CANVAS ===== */
.game-wrap {
  position: relative;
  width: 100%;
  background: #050520;
  border-bottom: 1px solid var(--border);
}
#game-canvas {
  display: block;
  width: 100%;
  height: 240px;
}
.game-status-overlay {
  position: absolute;
  bottom: 10px;
  left: 12px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}
.status-chip {
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}
.status-ahead { background: var(--success-dim); color: var(--success); border: 1px solid rgba(0,255,136,0.3); }
.status-track { background: var(--primary-dim); color: var(--primary); border: 1px solid rgba(0,229,255,0.3); }
.status-behind { background: rgba(255,159,67,0.15); color: var(--warning); border: 1px solid rgba(255,159,67,0.3); }
.status-risk { background: rgba(255,71,87,0.15); color: var(--danger); border: 1px solid rgba(255,71,87,0.3); }
.progress-pct {
  font-family: var(--pixel);
  font-size: 0.7rem;
  color: #ffffff;
  background: rgba(6,6,26,0.85);
  padding: 4px 8px;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.15);
}

/* ===== DASHBOARD CONTENT ===== */
.dash-content { padding: 16px 20px; display: flex; flex-direction: column; gap: 16px; }

.section-title {
  font-family: var(--pixel);
  font-size: 0.55rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 10px;
}

/* ===== TODAY CARD ===== */
.today-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
}
.today-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.today-date {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-weight: 500;
}
.today-xp-badge {
  background: var(--accent-dim);
  color: var(--accent);
  border: 1px solid rgba(255,215,0,0.3);
  border-radius: 12px;
  padding: 3px 10px;
  font-size: 0.75rem;
  font-weight: 700;
}
.habit-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
  cursor: pointer;
  border: 1px solid transparent;
  margin-bottom: 6px;
}
.habit-row:last-child { margin-bottom: 0; }
.habit-row:hover { background: var(--card2); }
.habit-row.done { background: var(--success-dim); border-color: rgba(0,255,136,0.2); }
.habit-check {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  transition: var(--transition);
  flex-shrink: 0;
  background: var(--card);
}
.habit-row.done .habit-check {
  background: var(--success);
  border-color: var(--success);
  color: #06061a;
}
.habit-row-icon { font-size: 1.1rem; }
.habit-row-name {
  flex: 1;
  font-size: 0.88rem;
  font-weight: 500;
}
.habit-row.done .habit-row-name {
  text-decoration: line-through;
  color: var(--text-muted);
}
.habit-row-xp {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--accent);
}
.importance-dots {
  display: flex;
  gap: 2px;
}
.importance-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--border);
}
.importance-dot.filled { background: var(--accent); }

.habit-section-header {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px 4px;
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.7px;
}

.habit-check.habit-count {
  font-size: 0.6rem;
  font-weight: 700;
  color: var(--accent);
  text-align: center;
}
.habit-row.done .habit-check.habit-count {
  color: #06061a;
  font-size: 0.8rem;
}

.habit-type-picker {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.habit-type-btn {
  padding: 9px 6px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--card2);
  color: var(--text-muted);
  font-size: .8rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  text-align: center;
}
.habit-type-btn:hover { border-color: var(--primary); color: var(--text); }
.habit-type-btn.active { background: rgba(0,229,255,.12); border-color: var(--primary); color: var(--primary); }

.habit-icon-pick-btn {
  width: 36px;
  height: 36px;
  font-size: 1.25rem;
  border-radius: 8px;
  border: 1px solid transparent;
  background: var(--card);
  cursor: pointer;
  transition: var(--transition);
}
.habit-icon-pick-btn:hover { border-color: var(--primary); transform: scale(1.15); }

.habit-suggestions-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 14px;
}
.habit-suggest-chip {
  padding: 5px 10px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--card2);
  color: var(--text-muted);
  font-size: .78rem;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}
.habit-suggest-chip:hover { border-color: var(--primary); color: var(--text); }
.habit-suggest-chip.selected { background: rgba(0,229,255,.12); border-color: var(--primary); color: var(--primary); }

.habit-note-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: .85rem;
  opacity: 0.3;
  padding: 0 2px;
  line-height: 1;
  transition: opacity .15s;
  flex-shrink: 0;
}
.habit-note-btn:hover { opacity: 0.7; }
.habit-note-btn.has-note { opacity: 1; }

.habit-rating-row {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}
.habit-rating-btn {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--card2);
  color: var(--text);
  font-size: .82rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}
.habit-rating-btn:hover { border-color: var(--primary); color: var(--primary); }
.habit-rating-btn.active { background: var(--primary); border-color: var(--primary); color: #000; }

.today-footer {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.today-progress-text {
  font-size: 0.82rem;
  font-weight: 600;
}
.today-progress-text .done-count { color: var(--success); font-weight: 800; }
.today-mini-bar {
  width: 80px;
  height: 6px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
}
.today-mini-fill {
  height: 100%;
  background: var(--success);
  border-radius: 3px;
  transition: width 0.5s ease;
}

/* ===== GOAL CARD ===== */
.goal-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  position: relative;
  overflow: hidden;
}
.goal-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
}
.goal-category-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--secondary-dim);
  color: var(--secondary);
  border-radius: 12px;
  padding: 3px 10px;
  font-size: 0.72rem;
  font-weight: 600;
  margin-bottom: 8px;
  border: 1px solid rgba(176,64,255,0.2);
}
.goal-title-text {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 10px;
  line-height: 1.4;
}
.goal-deadline {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  color: var(--text-muted);
}
.goal-deadline strong { color: var(--text); }
.days-remaining {
  margin-left: auto;
  font-weight: 700;
  font-size: 0.8rem;
}
.days-remaining.good { color: var(--success); }
.days-remaining.warn { color: var(--warning); }
.days-remaining.critical { color: var(--danger); }
.goal-complete-btn {
  display: block;
  width: 100%;
  margin-top: 14px;
  padding: 10px;
  border-radius: 10px;
  border: 1px solid rgba(0,255,136,0.35);
  background: rgba(0,255,136,0.08);
  color: var(--success);
  font-family: var(--body);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  letter-spacing: 0.3px;
  transition: background 0.2s, opacity 0.2s;
}
.goal-complete-btn:hover { background: rgba(0,255,136,0.16); }
.goal-complete-btn.undone {
  border-color: rgba(255,71,87,0.35);
  background: rgba(255,71,87,0.08);
  color: var(--danger);
}
.goal-complete-btn.undone:hover { background: rgba(255,71,87,0.16); }
.goal-card.goal-completed::before {
  background: linear-gradient(90deg, var(--success), #00bcd4);
}
.goal-new-btn {
  display: block;
  width: 100%;
  margin-top: 8px;
  padding: 10px;
  border-radius: 10px;
  border: 1px solid rgba(176,64,255,0.4);
  background: rgba(176,64,255,0.1);
  color: var(--secondary);
  font-family: var(--body);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  letter-spacing: 0.3px;
  transition: background 0.2s;
}
.goal-new-btn:hover { background: rgba(176,64,255,0.2); }
.goal-new-btn-locked {
  opacity: .6; border-color: var(--border);
  color: var(--text-muted); border-style: dashed;
}
.goal-new-btn-locked:hover { background: rgba(255,255,255,.04); }

/* ===== COMPLETED GOALS ===== */
.history-entry-btn {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 16px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: var(--body);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}
.history-entry-btn:hover { border-color: var(--accent); background: rgba(255,215,0,0.05); }
.completed-goal-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: rgba(0,255,136,0.05);
  border: 1px solid rgba(0,255,136,0.15);
  border-radius: 10px;
}
.completed-goal-icon { font-size: 1.3rem; flex-shrink: 0; }
.completed-goal-info { flex: 1; min-width: 0; }
.completed-goal-title {
  font-size: .88rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.completed-goal-meta {
  font-size: .72rem;
  color: var(--text-muted);
  margin-top: 2px;
}
.completed-goal-badge {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--success);
  color: #000;
  font-size: .75rem;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* ===== MILESTONES ===== */
.milestone-list { display: flex; flex-direction: column; gap: 8px; }
.milestone-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--card2);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}
.milestone-check {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  flex-shrink: 0;
}
.milestone-item.done .milestone-check {
  background: var(--success);
  border-color: var(--success);
  color: #06061a;
}
.milestone-name {
  flex: 1;
  font-size: 0.85rem;
  font-weight: 500;
}
.milestone-item.done .milestone-name { text-decoration: line-through; color: var(--text-muted); }
.milestone-pct {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 600;
}

/* ===== STATS SCREEN ===== */
.stats-header {
  padding: 20px 20px 16px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.stats-title {
  font-family: var(--pixel);
  font-size: 0.7rem;
  color: var(--primary);
}
.stats-content { padding: 16px 20px; display: flex; flex-direction: column; gap: 16px; }

.stat-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
.stat-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  text-align: center;
}
.stat-value {
  font-family: var(--pixel);
  font-size: 1.1rem;
  color: var(--primary);
  margin-bottom: 6px;
  text-shadow: 0 0 10px var(--primary-glow);
}
.stat-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ===== CALENDAR ===== */
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}
.cal-day {
  aspect-ratio: 1;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 600;
  position: relative;
  cursor: default;
}
.cal-day.empty { background: transparent; }
.cal-day.no-data { background: var(--card2); color: var(--text-muted); }
.cal-day.partial { background: rgba(255,159,67,0.2); color: var(--warning); border: 1px solid rgba(255,159,67,0.3); }
.cal-day.full { background: var(--success-dim); color: var(--success); border: 1px solid rgba(0,255,136,0.3); }
.cal-day.shield { background: rgba(0,229,255,0.1); color: var(--primary); border: 1px solid rgba(0,229,255,0.3); }
.cal-day.today { box-shadow: 0 0 0 2px var(--primary); }
.cal-day-label { font-size: 0.65rem; color: var(--text-muted); text-align: center; padding: 2px 0; font-weight: 700; text-transform: uppercase; }

/* ===== WEEK BAR CHART ===== */
.week-chart {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 80px;
  padding-bottom: 20px;
  position: relative;
}
.week-bar-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  height: 100%;
  justify-content: flex-end;
  position: relative;
}
.week-bar {
  width: 100%;
  border-radius: 4px 4px 0 0;
  background: linear-gradient(180deg, var(--primary), rgba(0,229,255,0.3));
  transition: height 0.8s cubic-bezier(0.4,0,0.2,1);
  min-height: 2px;
}
.week-bar-label {
  position: absolute;
  bottom: -18px;
  font-size: 0.62rem;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
}
.week-bar-pct {
  position: absolute;
  top: -18px;
  font-size: 0.62rem;
  color: var(--text-muted);
  font-weight: 600;
}

/* ===== ACHIEVEMENTS ===== */
.achievements-content { padding: 16px 20px; }
.achievement-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
.achievement-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
  transition: var(--transition);
}
.achievement-card.unlocked {
  border-color: rgba(255,215,0,0.3);
  background: var(--accent-dim);
}
.achievement-card.unlocked:hover { transform: translateY(-2px); box-shadow: 0 4px 20px rgba(255,215,0,0.15); }
.achievement-icon {
  font-size: 2rem;
  filter: grayscale(1);
  opacity: 0.4;
}
.achievement-card.unlocked .achievement-icon { filter: none; opacity: 1; }
.achievement-name {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted);
}
.achievement-card.unlocked .achievement-name { color: var(--text); }
.achievement-desc { font-size: 0.7rem; color: var(--text-muted); line-height: 1.4; }
.achievement-xp {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--accent);
}

/* ===== SETTINGS SCREEN ===== */
.settings-content { padding: 16px 20px; display: flex; flex-direction: column; gap: 20px; }
.settings-section {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.settings-section-title {
  padding: 12px 16px;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  background: var(--card2);
  border-bottom: 1px solid var(--border);
}
.settings-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: var(--transition);
}
.settings-item:last-child { border-bottom: none; }
.settings-item:hover { background: var(--card2); }
.settings-item-left { display: flex; align-items: center; gap: 10px; }
.settings-item-icon { font-size: 1.1rem; width: 24px; text-align: center; }
.settings-item-name { font-size: 0.88rem; font-weight: 500; }
.settings-item-value { font-size: 0.8rem; color: var(--text-muted); }
.settings-arrow { color: var(--text-muted); font-size: 0.9rem; }

.settings-tabs {
  display: flex;
  gap: 0;
  background: var(--card);
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
  scrollbar-width: none;
}
.settings-tabs::-webkit-scrollbar { display: none; }
.settings-tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 10px 6px;
  border: none;
  background: transparent;
  cursor: pointer;
  color: var(--text-muted);
  border-bottom: 2px solid transparent;
  transition: var(--transition);
  min-width: 56px;
}
.settings-tab:hover { color: var(--text); background: var(--card2); }
.settings-tab.active { color: var(--primary); border-bottom-color: var(--primary); }
.settings-tab-icon { font-size: 1.2rem; }
.settings-tab-label { font-size: 0.62rem; font-weight: 600; letter-spacing: 0.3px; white-space: nowrap; }

/* ===== SKINS ===== */
.char-avatar-wrap {
  position: relative;
  display: inline-flex;
  flex-shrink: 0;
}
.skin-badge {
  position: absolute;
  bottom: -2px;
  right: -2px;
  font-size: 0.62rem;
  width: 18px;
  height: 18px;
  background: var(--card);
  border: 1.5px solid var(--border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  pointer-events: none;
}

/* Skin animations */
@keyframes skin-pulse-anim {
  0%, 100% { box-shadow: 0 0 12px #ffb74d88; }
  50%       { box-shadow: 0 0 26px #ffb74dcc; }
}
.skin-pulse { animation: skin-pulse-anim 2s ease-in-out infinite; }

@keyframes skin-golden-anim {
  0%,100% { box-shadow: 0 0 20px #ffd70099, 0 0 40px #ffd70033; }
  50%     { box-shadow: 0 0 32px #ffd700cc, 0 0 60px #ffd70066; }
}
.skin-golden {
  border-width: 3px !important;
  animation: skin-golden-anim 2.5s ease-in-out infinite;
}

@keyframes skin-shadow-anim {
  0%,100% { box-shadow: 0 0 14px #b040ff88; }
  50%     { box-shadow: 0 0 28px #b040ffcc; }
}
.skin-shadow { animation: skin-shadow-anim 3s ease-in-out infinite; }

@keyframes skin-phoenix-anim {
  0%   { box-shadow: 0 0 14px #ff634888; }
  33%  { box-shadow: 0 0 22px #ff9800aa; }
  66%  { box-shadow: 0 0 18px #ff4757aa; }
  100% { box-shadow: 0 0 14px #ff634888; }
}
.skin-phoenix { animation: skin-phoenix-anim 1.5s ease-in-out infinite; }

@keyframes skin-cyber-anim {
  0%,89%,91%,94%,96%,100% { box-shadow: 0 0 16px #00e5ffaa; }
  90%,95% { box-shadow: 0 0 4px #00e5ff44; }
}
.skin-cyber { animation: skin-cyber-anim 3.5s linear infinite; }

@keyframes skin-cosmic-anim {
  0%   { box-shadow: 0 0 20px #ff4dff99; border-color: #ff4dff; }
  25%  { box-shadow: 0 0 20px #4dffff99; border-color: #4dffff; }
  50%  { box-shadow: 0 0 20px #ffff4d99; border-color: #ffff4d; }
  75%  { box-shadow: 0 0 20px #4dff9999; border-color: #4dff99; }
  100% { box-shadow: 0 0 20px #ff4dff99; border-color: #ff4dff; }
}
.skin-cosmic { animation: skin-cosmic-anim 4s linear infinite; }

/* Skin Picker modal */
.skin-section-label {
  font-size: 0.58rem;
  font-family: var(--pixel);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 10px;
}
.skin-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 4px;
}
.skin-card {
  background: var(--card2);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 10px 4px 7px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  position: relative;
  transition: border-color .2s, transform .1s;
  -webkit-tap-highlight-color: transparent;
}
.skin-card:active { transform: scale(.96); }
.skin-card.selected {
  border-color: var(--primary);
  background: rgba(0,229,255,.07);
}
.skin-card.skin-locked { opacity: .6; }
.skin-card-preview {
  position: relative;
  display: inline-flex;
}
.skin-lock-overlay {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: rgba(0,0,0,.58);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.48rem;
  font-weight: 700;
  color: #fff;
  font-family: var(--pixel);
  text-align: center;
  line-height: 1.4;
  padding: 3px;
}
.skin-card-name {
  font-size: 0.58rem;
  font-weight: 600;
  color: var(--text-muted);
  text-align: center;
  line-height: 1.2;
}
.skin-card.selected .skin-card-name { color: var(--primary); }
.skin-card-check {
  position: absolute;
  top: -4px;
  right: -4px;
  width: 15px;
  height: 15px;
  background: var(--primary);
  border-radius: 50%;
  color: #06061a;
  font-size: 0.55rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}
.skin-pro-upgrade {
  background: linear-gradient(135deg, var(--card2), rgba(176,64,255,.12));
  border: 1px solid rgba(176,64,255,.4);
  border-radius: 14px;
  padding: 20px 16px;
  text-align: center;
}

/* ===== MILESTONE FORM ===== */
.milestone-form-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 12px; }
.milestone-form-item {
  background: var(--card2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px;
}
.milestone-form-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.milestone-form-num {
  font-family: var(--pixel);
  font-size: 0.5rem;
  color: var(--primary);
}

/* ===== MODAL ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(6,6,26,0.85);
  backdrop-filter: blur(4px);
  z-index: 200;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.modal-overlay.open { opacity: 1; pointer-events: all; }
.modal-sheet {
  background: var(--card);
  border-radius: var(--radius) var(--radius) 0 0;
  border: 1px solid var(--border);
  border-bottom: none;
  width: 100%;
  max-width: 480px;
  padding: 20px;
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.4,0,0.2,1);
  max-height: 90vh;
  overflow-y: auto;
}
.modal-overlay.open .modal-sheet { transform: translateY(0); }
.modal-handle {
  width: 40px;
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  margin: 0 auto 20px;
}
.modal-title {
  font-family: var(--pixel);
  font-size: 0.65rem;
  color: var(--primary);
  margin-bottom: 16px;
}

/* ===== TOAST ===== */
#toast-container {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 500;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
  width: 90%;
  max-width: 400px;
}
.toast {
  background: var(--card2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.85rem;
  font-weight: 500;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
  animation: toastIn 0.3s ease-out;
  pointer-events: all;
}
.toast.success { border-color: rgba(0,255,136,0.3); }
.toast.error { border-color: rgba(255,71,87,0.3); }
.toast.info { border-color: rgba(0,229,255,0.3); }
.toast.xp { border-color: rgba(255,215,0,0.4); background: rgba(255,215,0,0.1); }
.toast-icon { font-size: 1.2rem; }
.toast-leaving { animation: toastOut 0.3s ease-in forwards; }
@keyframes toastIn { from { opacity:0; transform:translateY(-12px); } to { opacity:1; transform:translateY(0); } }
@keyframes toastOut { from { opacity:1; transform:translateY(0); } to { opacity:0; transform:translateY(-12px); } }

/* ===== XP POPUP ===== */
.xp-popup {
  position: fixed;
  pointer-events: none;
  z-index: 600;
  font-family: var(--pixel);
  font-size: 0.65rem;
  color: var(--accent);
  text-shadow: 0 0 10px rgba(255,215,0,0.8);
  animation: xpFloat 1.5s ease-out forwards;
}
@keyframes xpFloat {
  0% { opacity: 1; transform: translateY(0) scale(1); }
  100% { opacity: 0; transform: translateY(-60px) scale(1.3); }
}

/* ===== LEVEL UP ===== */
.levelup-overlay {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(6,6,26,0.9);
  backdrop-filter: blur(8px);
  animation: levelupIn 0.4s ease-out;
}
.levelup-text {
  font-family: var(--pixel);
  font-size: 1.5rem;
  color: var(--accent);
  text-shadow: 0 0 30px rgba(255,215,0,0.8);
  animation: pulse 0.5s ease-in-out infinite alternate;
  margin-bottom: 16px;
}
.levelup-new {
  font-family: var(--pixel);
  font-size: 0.7rem;
  color: var(--primary);
  margin-bottom: 24px;
}
@keyframes levelupIn { from { opacity:0; } to { opacity:1; } }

/* ===== UTILITIES ===== */
@keyframes pulse {
  from { opacity: 0.7; }
  to { opacity: 1; }
}
@keyframes glow {
  from { box-shadow: 0 0 10px var(--primary-glow); }
  to { box-shadow: 0 0 25px var(--primary-glow), 0 0 50px rgba(0,229,255,0.2); }
}
.glow-anim { animation: glow 2s ease-in-out infinite alternate; }

.text-primary { color: var(--primary); }
.text-success { color: var(--success); }
.text-accent { color: var(--accent); }
.text-muted { color: var(--text-muted); }
.text-center { text-align: center; }
.mb-0 { margin-bottom: 0; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }

.divider {
  height: 1px;
  background: var(--border);
  margin: 12px 0;
}

.empty-state {
  text-align: center;
  padding: 32px 20px;
  color: var(--text-muted);
}
.empty-state .empty-icon { font-size: 2.5rem; margin-bottom: 12px; }
.empty-state p { font-size: 0.85rem; line-height: 1.5; }

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ===== RESPONSIVE ===== */
@media (max-width: 380px) {
  .welcome-logo { font-size: 1.2rem; }
  .category-grid { grid-template-columns: repeat(2, 1fr); }
  .achievement-grid { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: 1fr; }
}

/* ===== LIGHT THEME ===== */
[data-theme="light"] {
  --bg:            #f0f0f8;
  --surface:       #e4e4f0;
  --card:          #ffffff;
  --card2:         #eeeef8;
  --border:        #c8c8e0;
  --primary:       #0060c0;
  --primary-dim:   rgba(0,96,192,0.10);
  --primary-glow:  rgba(0,96,192,0.28);
  --secondary:     #7000c0;
  --secondary-dim: rgba(112,0,192,0.10);
  --accent:        #b07800;
  --accent-dim:    rgba(176,120,0,0.10);
  --success:       #008844;
  --success-dim:   rgba(0,136,68,0.10);
  --warning:       #c06000;
  --danger:        #cc1122;
  --text:          #18183a;
  --text-muted:    #5858a0;
}

/* Theme transition */
*, *::before, *::after {
  transition: background-color 0.3s ease, border-color 0.3s ease, color 0.2s ease;
}
/* Exclude transitions from animations to avoid jank */
.xp-fill, .today-mini-fill, .week-bar, .loading-fill { transition: width 0.8s ease, height 0.8s ease; }
.toast, .toast-leaving, .xp-popup, .levelup-overlay { transition: none; }

[data-theme="light"] .game-wrap { background: #c0d0e8; }
[data-theme="light"] #bottom-nav { background: rgba(228,228,240,0.97); }
[data-theme="light"] .modal-overlay { background: rgba(220,220,235,0.88); }
[data-theme="light"] .levelup-overlay { background: rgba(235,235,248,0.92); }
[data-theme="light"] .btn-primary { color: #ffffff; }
[data-theme="light"] .form-input,
[data-theme="light"] .form-textarea,
[data-theme="light"] .form-select { background: #f8f8ff; }
[data-theme="light"] ::-webkit-scrollbar-track { background: var(--surface); }

/* ===== AUTH SCREEN ===== */
.auth-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 32px 20px;
  background: radial-gradient(ellipse at 50% 20%, rgba(0,229,255,0.07) 0%, transparent 60%),
              radial-gradient(ellipse at 80% 80%, rgba(176,64,255,0.07) 0%, transparent 50%);
}
.auth-logo-wrap {
  text-align: center;
  margin-bottom: 28px;
}
.auth-logo-text {
  font-family: var(--pixel);
  font-size: 1.1rem;
  line-height: 1.9;
  color: var(--primary);
  text-shadow: 0 0 20px var(--primary-glow), 0 0 60px rgba(0,229,255,0.2);
}
.auth-logo-sub {
  font-family: var(--pixel);
  font-size: 0.5rem;
  color: var(--secondary);
  letter-spacing: 2px;
  margin-top: 6px;
}
.auth-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  width: 100%;
  max-width: 360px;
}
.auth-tabs {
  display: flex;
  gap: 4px;
  background: var(--card);
  border-radius: var(--radius-sm);
  padding: 4px;
  margin-bottom: 20px;
}
.auth-tab {
  flex: 1;
  padding: 9px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--text-muted);
  font-family: var(--body);
  font-size: .88rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
}
.auth-tab.active { background: var(--primary); color: #06061a; }
.auth-msg {
  font-size: .8rem;
  min-height: 18px;
  margin-bottom: 10px;
  line-height: 1.4;
}
.auth-msg.error  { color: var(--danger); }
.auth-msg.success { color: var(--success); }
.auth-divider {
  text-align: center;
  position: relative;
  margin: 16px 0;
  color: var(--text-muted);
  font-size: .72rem;
}
.auth-divider::before,
.auth-divider::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 42%;
  height: 1px;
  background: var(--border);
}
.auth-divider::before { left: 0; }
.auth-divider::after  { right: 0; }
.auth-google-btn {
  border: 1px solid var(--border) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  font-weight: 600 !important;
}
.auth-link {
  display: block;
  text-align: center;
  margin-top: 14px;
  color: var(--text-muted);
  font-size: .78rem;
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--body);
  transition: var(--transition);
}
.auth-link:hover { color: var(--primary); }

/* ===== LANDSCAPE PICKER ===== */
.ls-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 8px;
}
.ls-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 14px 8px;
  background: var(--card2);
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
  text-align: center;
}
.ls-card:hover { border-color: var(--primary); transform: translateY(-2px); }
.ls-card.selected {
  border-color: var(--primary);
  background: var(--primary-dim);
  box-shadow: 0 0 12px var(--primary-dim);
}
.ls-icon { font-size: 1.8rem; }
.ls-name { font-size: 0.72rem; font-weight: 700; color: var(--text-muted); }
.ls-card.selected .ls-name { color: var(--primary); }

/* ===== LANGUAGE BUTTONS ===== */
.lang-row { display: flex; gap: 8px; }
.lang-btn {
  flex: 1;
  padding: 8px 4px;
  background: var(--card2);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-family: var(--body);
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  text-align: center;
}
.lang-btn:hover { border-color: var(--primary); color: var(--primary); }
.lang-btn.active {
  border-color: var(--primary);
  background: var(--primary-dim);
  color: var(--primary);
}

/* ===== THEME TOGGLE ===== */
.theme-row { display: flex; gap: 8px; }
.theme-btn {
  flex: 1;
  padding: 8px 4px;
  background: var(--card2);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-family: var(--body);
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  text-align: center;
}
.theme-btn:hover { border-color: var(--accent); color: var(--accent); }
.theme-btn.active {
  border-color: var(--accent);
  background: var(--accent-dim);
  color: var(--accent);
}

/* ===== CHARACTER CREATOR ===== */
.cc-preview-ring {
  width: 160px; height: 160px; border-radius: 50%;
  border: 3px solid var(--primary); overflow: hidden;
  display: flex; align-items: flex-start; justify-content: center;
  margin: 10px auto 6px; transition: border-color .3s, box-shadow .3s;
}
.cc-preview-ring svg { width: 100%; height: auto; display: block; }
.cc-gender-row { display: flex; gap: 8px; justify-content: center; margin-bottom: 6px; }
.cc-gender-btn {
  padding: 5px 14px; border-radius: 20px;
  border: 1.5px solid var(--border); background: var(--card2);
  color: var(--text-muted); font-size: .72rem; font-weight: 700;
  cursor: pointer; font-family: var(--body); transition: var(--transition);
  -webkit-tap-highlight-color: transparent;
}
.cc-gender-btn.cc-active { border-color: var(--primary); background: var(--primary-dim); color: var(--primary); }
.cc-cat-scroll {
  display: flex; gap: 6px; padding: 4px 0 8px;
  overflow-x: scroll; scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  cursor: grab; user-select: none;
}
.cc-cat-scroll::-webkit-scrollbar { display: none; }
.cc-cat-scroll.cc-dragging { cursor: grabbing; }
.cc-cat-btn {
  flex-shrink: 0; padding: 5px 11px; border-radius: 20px;
  border: 1.5px solid var(--border); background: var(--card2);
  color: var(--text-muted); font-size: .68rem; font-weight: 600;
  cursor: pointer; white-space: nowrap; font-family: var(--body);
  transition: var(--transition); -webkit-tap-highlight-color: transparent;
}
.cc-cat-btn.cc-active { border-color: var(--primary); background: var(--primary-dim); color: var(--primary); }
.cc-opts-label {
  font-size: .58rem; font-weight: 700; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 1.2px; margin-bottom: 8px;
}
.cc-opts-row {
  display: flex; gap: 8px; overflow-x: auto;
  padding-bottom: 8px; scrollbar-width: none; margin-bottom: 8px;
}
.cc-opts-row::-webkit-scrollbar { display: none; }
.cc-opt {
  flex-shrink: 0; display: flex; flex-direction: column;
  align-items: center; gap: 4px; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.cc-opt-box {
  width: 56px; height: 56px; border-radius: 12px;
  border: 2px solid var(--border); background: var(--card2);
  display: flex; align-items: flex-start; justify-content: center;
  overflow: hidden; transition: border-color .15s, box-shadow .15s;
}
.cc-opt-box svg { width: 56px; height: auto; display: block; }
.cc-opt.cc-active .cc-opt-box { border-color: var(--primary); box-shadow: 0 0 10px var(--primary-dim); }
.cc-opt-name { font-size: .56rem; color: var(--text-muted); font-weight: 600; text-align: center; }
.cc-opt.cc-active .cc-opt-name { color: var(--primary); }
.cc-swatch { width: 36px; height: 36px; border-radius: 50%; border: 3px solid transparent; transition: transform .15s, border-color .15s; }
.cc-opt.cc-active .cc-swatch { border-color: white; transform: scale(1.1); }
.cc-bg-swatch { width: 44px; height: 44px; border-radius: 50%; border: 3px solid #444; transition: transform .15s, border-color .15s; }
.cc-opt.cc-active .cc-bg-swatch { border-color: white; transform: scale(1.1); }
.cc-warn {
  background: rgba(255,200,0,.08); border: 1px solid rgba(255,200,0,.2);
  border-radius: 8px; padding: 8px 10px; font-size: .72rem;
  color: var(--accent); line-height: 1.5; margin-top: 4px;
}
.char-avatar-sm svg { width: 100%; height: auto; display: block; }

/* ===== PLAN LAPSED ===== */
.habit-row.habit-locked {
  opacity: .75; cursor: pointer;
  background: rgba(255,255,255,.02);
  border: 1px dashed var(--border);
  border-radius: 10px; margin-bottom: 4px;
}
.habit-lock-icon { font-size: .9rem; }
.habit-locked-tag {
  margin-left: auto; font-size: .62rem; font-weight: 700;
  color: var(--text-muted); background: rgba(255,255,255,.05);
  border: 1px solid var(--border); border-radius: 6px; padding: 2px 7px;
  flex-shrink: 0;
}
.habit-item-locked { opacity: .55; }

.plan-lapsed-banner {
  display: flex; align-items: center; gap: 12px;
  margin: 0 16px 4px; padding: 12px 14px; border-radius: 12px;
  background: rgba(255,68,68,.08); border: 1.5px solid rgba(255,68,68,.3);
  color: var(--text); cursor: pointer;
}
.plan-lapsed-banner > div { flex: 1; }

/* ===== FAMILY CODE BOX ===== */
.family-code-box {
  background: var(--surface); border: 2px solid var(--primary);
  border-radius: 16px; padding: 18px; text-align: center;
  margin-bottom: 14px; position: relative; overflow: hidden;
}
.family-code-box::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(circle at 50% 0%, rgba(0,229,255,.07), transparent 70%);
  pointer-events: none;
}
.family-code-label {
  font-size: .65rem; letter-spacing: .12em; color: var(--text-muted);
  text-transform: uppercase; margin-bottom: 6px;
}
.family-code-value {
  font-size: 2rem; font-weight: 900; letter-spacing: .3em;
  color: var(--primary); font-family: 'Courier New', monospace;
  text-shadow: 0 0 16px rgba(0,229,255,.45);
}
.family-code-hint { font-size: .7rem; color: var(--text-muted); margin-top: 6px; }

/* ===== FAMILY SWITCHER BAR (dashboard) ===== */
.family-switcher-bar {
  display: flex; gap: 6px; align-items: center;
  padding: 8px 16px 6px;
  overflow-x: auto; scrollbar-width: none;
  background: var(--card);
  border-bottom: 1px solid var(--border);
}
.family-switcher-bar::-webkit-scrollbar { display: none; }
.family-switcher-btn {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 5px 10px; border-radius: 12px; border: 1.5px solid transparent;
  background: transparent; cursor: pointer; position: relative;
  transition: background .15s, border-color .15s; flex-shrink: 0;
}
.family-switcher-btn.active {
  background: rgba(0,229,255,.08); border-color: var(--primary);
}
.family-switcher-av {
  width: 28px; height: 28px; border-radius: 50%; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.family-switcher-name {
  font-size: .62rem; color: var(--text-muted); font-family: var(--body);
  white-space: nowrap; max-width: 52px; overflow: hidden; text-overflow: ellipsis;
}
.family-switcher-btn.active .family-switcher-name { color: var(--primary); }
.family-switcher-dot {
  position: absolute; top: 2px; right: 6px;
  width: 6px; height: 6px; border-radius: 50%; background: var(--primary);
}

/* ===== FAMILY MEMBERS LIST (settings) ===== */
.family-members-list {
  display: flex; flex-direction: column; gap: 8px; padding: 4px 0;
}
.family-member-card {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; border-radius: 12px;
  background: var(--surface); border: 1.5px solid var(--border);
  cursor: pointer; transition: border-color .15s, background .15s;
}
.family-member-card.active {
  border-color: var(--primary); background: rgba(0,229,255,.06); cursor: default;
}
.family-member-avatar-emoji {
  width: 40px; height: 40px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem; flex-shrink: 0;
  border: 2px solid var(--border);
  overflow: hidden;
}
.family-member-info { flex: 1; min-width: 0; }
.family-member-name { font-size: .88rem; font-weight: 600; color: var(--text); }
.family-active-badge {
  display: inline-block; font-size: .58rem; font-weight: 700; letter-spacing: .04em;
  color: var(--primary); background: rgba(0,229,255,.12);
  border: 1px solid var(--primary); border-radius: 4px;
  padding: 1px 5px; margin-top: 3px;
}
.family-remove-btn {
  background: none; border: none; color: var(--text-muted); font-size: .9rem;
  cursor: pointer; padding: 4px 6px; border-radius: 6px; flex-shrink: 0;
  transition: color .15s, background .15s;
}
.family-remove-btn:hover { color: var(--danger); background: rgba(255,59,59,.1); }
.family-add-btn {
  width: 100%; padding: 10px; border-radius: 10px;
  border: 1.5px dashed var(--border); background: none;
  color: var(--text-muted); font-size: .82rem; font-family: var(--body);
  cursor: pointer; transition: border-color .15s, color .15s;
}
.family-add-btn:hover { border-color: var(--primary); color: var(--primary); }

/* ===== PLANS MODAL ===== */
.pt-current-banner {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 14px; border-radius: 12px; margin-bottom: 14px;
  font-size: .82rem;
}
.pt-current-free {
  background: rgba(255,255,255,.04); border: 1px solid var(--border); color: var(--text-muted);
}
.pt-current-active {
  background: rgba(0,230,118,.07); border: 1px solid rgba(0,230,118,.25); color: var(--text);
}
.pt-current-lapsed {
  background: rgba(255,68,68,.07); border: 1px solid rgba(255,68,68,.25); color: var(--text);
}
.pt-current-banner > div { flex: 1; }

.pt-toggle {
  display: flex; background: var(--surface); border-radius: 12px;
  padding: 4px; gap: 2px; margin-bottom: 14px;
}
.pt-toggle-btn {
  flex: 1; padding: 8px 4px; border: none; border-radius: 9px;
  background: none; color: var(--text-muted); font-size: .75rem;
  font-weight: 600; font-family: var(--body); cursor: pointer;
  transition: background .15s, color .15s; position: relative;
  display: flex; align-items: center; justify-content: center; gap: 3px;
}
.pt-toggle-btn.active {
  background: var(--card); color: var(--text);
  box-shadow: 0 1px 4px rgba(0,0,0,.3);
}
.pt-toggle-hint {
  font-size: .6rem; font-weight: 700; color: var(--green);
  background: rgba(0,230,118,.1); border-radius: 4px; padding: 1px 4px;
}
.pt-toggle-btn.active .pt-toggle-hint { color: var(--green); }

.pt-cards { display: flex; flex-direction: column; gap: 10px; }

.pt-card {
  border: 1.5px solid var(--border); border-radius: 14px;
  padding: 14px 16px; background: var(--surface);
  transition: border-color .2s;
}
.pt-card-top {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 10px;
}
.pt-name { font-size: .9rem; font-weight: 800; }
.pt-badge {
  font-size: .6rem; font-weight: 800; letter-spacing: .06em;
  background: rgba(255,215,0,.15); color: #ffd700;
  border: 1px solid rgba(255,215,0,.3); border-radius: 20px;
  padding: 2px 7px; text-transform: uppercase;
}
.pt-active-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--green); flex-shrink: 0;
  box-shadow: 0 0 6px var(--green);
}
.pt-lapsed-tag {
  font-size: .58rem; font-weight: 800; letter-spacing: .06em;
  background: rgba(255,68,68,.12); color: var(--danger);
  border: 1px solid rgba(255,68,68,.3); border-radius: 6px;
  padding: 2px 6px;
}
.pt-price-block { margin-bottom: 12px; }
.pt-price {
  font-size: 1.5rem; font-weight: 900; color: var(--text); line-height: 1.2;
}
.pt-period { font-size: .72rem; font-weight: 400; color: var(--text-muted); }
.pt-equiv { font-size: .7rem; color: var(--text-muted); margin-top: 3px; }

.pt-features {
  list-style: none; padding: 0; margin: 0 0 12px;
  display: flex; flex-direction: column; gap: 5px;
}
.pt-features li {
  font-size: .78rem; color: var(--text-muted);
  padding-left: 16px; position: relative;
}
.pt-features li::before {
  content: '✓'; position: absolute; left: 0;
  color: var(--primary); font-weight: 700;
}
.pt-current-tag {
  text-align: center; font-size: .72rem; font-weight: 600;
  color: var(--green); padding: 8px 0 2px;
}
.pt-btn { font-size: .82rem; }

/* ===== PLAN CARDS (modal) ===== */
.plan-card {
  border: 1.5px solid var(--border); border-radius: 14px;
  padding: 14px 16px; background: var(--surface);
}
.plan-card-highlight { border-color: var(--primary); background: rgba(0,229,255,.04); }
.plan-card-familia  { border-color: var(--accent);  background: rgba(255,204,0,.03); }
.plan-card-header   { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.plan-badge {
  font-size: .72rem; font-weight: 700; padding: 2px 9px;
  border-radius: 20px; letter-spacing: .03em;
}
.plan-badge-free    { background: rgba(255,255,255,.08); color: var(--text-muted); }
.plan-badge-pro     { background: rgba(255,215,0,.15);   color: #ffd700; }
.plan-badge-familia { background: rgba(0,229,255,.12);   color: var(--accent); }
.plan-popular {
  font-size: .6rem; font-weight: 700; letter-spacing: .06em;
  color: var(--primary); background: rgba(0,229,255,.12);
  border: 1px solid var(--primary); border-radius: 4px; padding: 1px 6px;
}
.plan-price {
  font-size: 1.5rem; font-weight: 800; color: var(--text); margin-bottom: 10px;
}
.plan-period { font-size: .75rem; font-weight: 400; color: var(--text-muted); }
.plan-features {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-direction: column; gap: 5px;
}
.plan-features li {
  font-size: .78rem; color: var(--text-muted); padding-left: 16px; position: relative;
}
.plan-features li::before {
  content: '✓'; position: absolute; left: 0;
  color: var(--primary); font-weight: 700;
}

/* ===== HABIT VIEW TOGGLE ===== */
.habit-view-toggle {
  display: flex; gap: 3px; align-items: center;
  background: var(--surface); border-radius: 8px; padding: 3px;
  border: 1px solid var(--border);
}
.hv-btn {
  background: none; border: none; cursor: pointer;
  color: var(--text-muted); font-size: 1rem;
  width: 28px; height: 28px; border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  transition: var(--transition);
}
.hv-btn:hover { background: var(--primary-dim); color: var(--primary); }
.hv-btn.active { background: var(--primary-dim); color: var(--primary); }

/* ===== HABIT CARDS MODE ===== */
.habit-cards-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  padding: 4px 0;
}
.habit-card {
  background: var(--card); border: 1.5px solid var(--border);
  border-radius: var(--radius); padding: 14px 12px 12px;
  cursor: pointer; position: relative; overflow: hidden;
  transition: border-color .2s, box-shadow .2s;
  display: flex; flex-direction: column; gap: 8px;
  min-height: 130px;
}
.habit-card:hover { border-color: var(--primary-dim); box-shadow: 0 0 12px rgba(0,229,255,.1); }
.habit-card.done { border-color: var(--success); background: rgba(0,255,136,.05); }
.habit-card-top {
  display: flex; align-items: flex-start; justify-content: space-between;
}
.habit-card-icon { font-size: 2rem; line-height: 1; }
.habit-card-name {
  font-size: .82rem; font-weight: 600; color: var(--text);
  flex: 1; line-height: 1.3;
}
.habit-card.done .habit-card-name { text-decoration: line-through; color: var(--text-muted); }
.habit-card-xp-badge {
  font-size: .65rem; font-weight: 700; color: var(--accent);
  background: var(--accent-dim); border-radius: 20px;
  padding: 2px 7px; align-self: flex-start;
}
.habit-card-progress {
  height: 5px; background: var(--border); border-radius: 3px; overflow: hidden;
}
.habit-card-bottom {
  display: flex; align-items: center; justify-content: space-between;
}
.habit-card-xp {
  font-size: .65rem; font-weight: 700; color: var(--accent);
  background: var(--accent-dim); border-radius: 20px; padding: 2px 7px;
}
.habit-card-check {
  position: absolute; bottom: 10px; right: 10px;
  width: 26px; height: 26px; border-radius: 50%;
  border: 2px solid var(--border); display: flex;
  align-items: center; justify-content: center;
  font-size: .8rem; font-weight: 700; color: var(--text-muted);
  transition: var(--transition); background: var(--surface);
}
.habit-card-check.done {
  background: var(--success); border-color: var(--success);
  color: #000; box-shadow: 0 0 10px rgba(0,255,136,.4);
}

/* ===== HABIT MISSIONS MODE ===== */
.habit-mission {
  display: flex; align-items: center; gap: 12px;
  background: var(--card); border: 1.5px solid var(--border);
  border-radius: var(--radius); padding: 12px 14px;
  cursor: pointer; transition: border-color .2s, box-shadow .2s;
  position: relative;
}
.habit-mission:hover { border-color: rgba(176,64,255,.4); box-shadow: 0 0 14px rgba(176,64,255,.12); }
.habit-mission.done { border-color: var(--success); background: rgba(0,255,136,.04); }
.mission-icon-wrap {
  width: 48px; height: 48px; border-radius: 12px; flex-shrink: 0;
  background: rgba(176,64,255,.12); border: 1.5px solid rgba(176,64,255,.3);
  display: flex; align-items: center; justify-content: center;
}
.habit-mission.done .mission-icon-wrap {
  background: rgba(0,255,136,.1); border-color: rgba(0,255,136,.3);
}
.mission-icon { font-size: 1.6rem; line-height: 1; }
.mission-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.mission-top { display: flex; align-items: center; justify-content: space-between; }
.mission-tag {
  font-size: .6rem; font-weight: 700; letter-spacing: .06em;
  color: var(--secondary); background: rgba(176,64,255,.12);
  border: 1px solid rgba(176,64,255,.3); border-radius: 4px; padding: 2px 6px;
  text-transform: uppercase;
}
.habit-mission.done .mission-tag {
  color: var(--success); background: rgba(0,255,136,.1);
  border-color: rgba(0,255,136,.3);
}
.mission-name {
  font-size: .88rem; font-weight: 600; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.habit-mission.done .mission-name { text-decoration: line-through; color: var(--text-muted); }
.mission-xp-bar { display: flex; align-items: center; gap: 8px; }
.mission-xp-label { font-size: .65rem; color: var(--accent); font-weight: 700; white-space: nowrap; }
.mission-check {
  width: 30px; height: 30px; border-radius: 50%; flex-shrink: 0;
  border: 2px solid var(--border); display: flex;
  align-items: center; justify-content: center;
  font-size: .85rem; font-weight: 700; color: var(--text-muted);
  transition: var(--transition); background: var(--surface);
}
.mission-check.done {
  background: var(--success); border-color: var(--success);
  color: #000; box-shadow: 0 0 12px rgba(0,255,136,.4);
}

/* ===== PROMO ONBOARDING ===== */
.promo-onboarding {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(0,0,0,.85); backdrop-filter: blur(8px);
  display: flex; align-items: flex-end; justify-content: center;
  opacity: 0; transition: opacity .35s ease;
}
.promo-onboarding.open { opacity: 1; }
.promo-sheet {
  width: 100%; max-width: 480px;
  background: var(--surface); border-radius: 24px 24px 0 0;
  padding: 28px 24px 36px;
  transform: translateY(40px);
  transition: transform .35s cubic-bezier(0.4,0,0.2,1);
  max-height: 92vh; overflow-y: auto;
}
.promo-onboarding.open .promo-sheet { transform: translateY(0); }

.promo-slide { display: none; flex-direction: column; gap: 18px; }
.promo-slide.active { display: flex; }

.promo-dots {
  display: flex; gap: 6px; justify-content: center; margin-bottom: 4px;
}
.promo-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--border); transition: .3s;
}
.promo-dot.active { background: var(--primary); width: 18px; border-radius: 3px; }

.promo-badge {
  text-align: center; font-size: .75rem; font-weight: 700;
  color: var(--primary); background: var(--primary-dim);
  border: 1px solid var(--primary); border-radius: 20px;
  padding: 4px 14px; align-self: center;
}
.promo-launch-badge {
  text-align: center; font-size: .75rem; font-weight: 700;
  color: #ffaa00; background: rgba(255,170,0,.12);
  border: 1px solid rgba(255,170,0,.3); border-radius: 20px;
  padding: 4px 14px; align-self: center;
}
.promo-headline {
  font-size: 1.7rem; font-weight: 900; color: var(--text);
  line-height: 1.2; text-align: center;
}
.promo-benefits { display: flex; flex-direction: column; gap: 14px; }
.promo-benefit {
  display: flex; align-items: flex-start; gap: 12px;
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 12px 14px;
}
.promo-benefit-icon { font-size: 1.4rem; flex-shrink: 0; line-height: 1; }
.promo-benefit-title { font-size: .85rem; font-weight: 700; color: var(--text); margin-bottom: 2px; }
.promo-benefit-desc { font-size: .75rem; color: var(--text-muted); line-height: 1.4; }

.promo-price-block {
  display: flex; align-items: baseline; gap: 4px; justify-content: center;
}
.promo-price {
  font-size: 2.8rem; font-weight: 900; color: #ffd700;
  font-family: var(--body);
}
.promo-period { font-size: 1rem; color: var(--text-muted); font-weight: 500; }
.promo-price-note {
  text-align: center; font-size: .75rem; color: var(--text-muted);
  line-height: 1.5; margin-top: -8px;
}
.promo-features {
  display: flex; flex-direction: column; gap: 8px;
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 14px;
}
.promo-feature-item {
  font-size: .82rem; color: var(--text); font-weight: 500;
}
.promo-next-btn { margin-top: 4px; }
