/* DiscoveryLab Web — Design System */
@import url('https://fonts.googleapis.com/css2?family=Fredoka:wght@400;500;600;700&family=Nunito:wght@400;600;700&display=swap');

:root {
  --bg: #0F172A;
  --bg-card: #1A2236;
  --bg-card-hover: #1E293B;
  --bg-input: #1E293B;
  --bg-surface: #162032;
  --text-heading: #F1F5F9;
  --text-body: #94A3B8;
  --text-muted: #64748B;
  --accent: #6C63FF;
  --accent-hover: #7B73FF;
  --accent-glow: rgba(108, 99, 255, 0.3);
  --accent-subtle: rgba(108, 99, 255, 0.12);
  --green: #22C55E;
  --amber: #F59E0B;
  --red: #EF4444;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.15);
  --sidebar-width: 300px;
  --header-height: 56px;
  --radius: 12px;
  --radius-sm: 8px;
  --radius-xs: 6px;
  --font-display: 'Fredoka', sans-serif;
  --font-body: 'Nunito', sans-serif;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.4);
  --transition: 200ms ease-out;
  --transition-slow: 300ms ease-out;
}

/* Reset */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html, body {
  height: 100%;
  background: var(--bg);
  color: var(--text-body);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.1); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.2); }

/* =============================
   VIEWS
   ============================= */
.view {
  min-height: 100vh;
  animation: fadeIn 300ms ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

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

/* =============================
   ONBOARDING
   ============================= */
.onboarding {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.onboarding-inner {
  max-width: 560px;
  width: 100%;
  text-align: center;
  animation: slideUp 500ms ease-out;
}

.onboarding-logo {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.5px;
  margin-bottom: 24px;
}

.onboarding-title {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 700;
  color: var(--text-heading);
  line-height: 1.2;
  margin-bottom: 8px;
}

.onboarding-subtitle {
  color: var(--text-muted);
  font-size: 16px;
  margin-bottom: 40px;
}

.onboarding-section {
  margin-bottom: 36px;
}

.onboarding-label {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  color: var(--text-heading);
  margin-bottom: 16px;
}

/* Avatar Grid */
.avatar-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
  max-width: 480px;
  margin: 0 auto;
}

.avatar-grid.compact {
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
}

.avatar-tile {
  width: 72px;
  height: 72px;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
  position: relative;
}

.avatar-tile:hover {
  transform: scale(1.05);
  border-color: var(--border-strong);
  box-shadow: 0 0 16px var(--accent-glow);
}

.avatar-tile.selected {
  border-color: var(--accent);
  background: var(--accent-subtle);
  box-shadow: 0 0 20px var(--accent-glow);
}

.avatar-tile.small {
  width: 52px;
  height: 52px;
}

.avatar-emoji {
  font-size: 32px;
  line-height: 1;
}

.avatar-tile.small .avatar-emoji {
  font-size: 24px;
}

/* Age Picker */
/* Age input — desktop-friendly +/- stepper with direct typing */
.age-input-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin: 8px auto;
  max-width: 320px;
}

.age-btn {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 2px solid var(--border-strong);
  background: var(--bg-card);
  color: var(--text-heading);
  font-size: 24px;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
}
.age-btn:hover:not(:disabled) {
  background: var(--accent-subtle);
  border-color: var(--accent);
  color: var(--accent);
  transform: scale(1.08);
}
.age-btn:active:not(:disabled) { transform: scale(0.95); }
.age-btn:disabled { opacity: 0.3; cursor: default; }

.age-input-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.age-input {
  width: 100px;
  text-align: center;
  font-family: var(--font-display);
  font-size: 48px;
  font-weight: 700;
  color: var(--accent);
  background: transparent;
  border: none;
  outline: none;
  -moz-appearance: textfield;
}
.age-input::-webkit-inner-spin-button,
.age-input::-webkit-outer-spin-button { -webkit-appearance: none; }
.age-input:focus {
  background: var(--accent-subtle);
  border-radius: var(--radius-sm);
}

.age-unit {
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--text-muted);
}

/* =============================
   BUTTONS
   ============================= */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  background: var(--accent);
  color: white;
  border: none;
  border-radius: var(--radius);
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  box-shadow: 0 4px 16px var(--accent-glow);
}

.btn-primary:hover:not(:disabled) {
  background: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 6px 24px var(--accent-glow);
}

.btn-primary:active:not(:disabled) {
  transform: translateY(0);
}

.btn-primary:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  background: transparent;
  color: var(--text-body);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
}

.btn-ghost:hover {
  background: var(--bg-card);
  border-color: var(--border-strong);
  color: var(--text-heading);
}

.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: var(--bg-card);
  color: var(--text-body);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  margin-bottom: 24px;
}

.back-btn:hover {
  background: var(--bg-card-hover);
  color: var(--text-heading);
}

.onboarding-start {
  margin-top: 12px;
}

/* =============================
   HEADER
   ============================= */
#header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  z-index: 100;
}

.header-inner {
  height: 100%;
  max-width: 100%;
  padding: 0 20px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.header-brand {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.3px;
}

.header-spacer { flex: 1; }

.header-profile {
  display: flex;
  align-items: center;
  gap: 10px;
}

.header-avatar-btn {
  width: 40px;
  height: 40px;
  border: 2px solid var(--border-strong);
  background: var(--bg-card);
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
}
.header-avatar-btn:hover {
  border-color: var(--accent);
  transform: scale(1.1);
  box-shadow: 0 0 12px var(--accent-glow);
}
.header-avatar {
  font-size: 22px;
  line-height: 1;
}

.header-settings {
  width: 36px;
  height: 36px;
  border: none;
  background: var(--bg-card);
  border-radius: 50%;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
}
.header-settings:hover {
  background: var(--bg-card-hover, rgba(255,255,255,0.08));
  color: var(--text-heading);
  transform: rotate(30deg);
}

.settings-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  color: var(--text-body);
  text-decoration: none;
  font-size: 14px;
  transition: background var(--transition);
  border: 1px solid transparent;
}
.settings-link:hover {
  background: var(--bg-card);
  border-color: var(--border);
}
.settings-link svg { color: var(--text-muted); flex-shrink: 0; }
.settings-info { color: var(--text-muted); font-size: 12px; cursor: default; }
.settings-info:hover { background: none; border-color: transparent; }

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
}

.hamburger span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text-body);
  border-radius: 1px;
  transition: all var(--transition);
}

.hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(4px, 4px); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(4px, -4px); }

/* =============================
   LAYOUT
   ============================= */
#layout {
  display: flex;
  padding-top: var(--header-height);
  min-height: 100vh;
}

/* =============================
   SIDEBAR
   ============================= */
#sidebar {
  position: fixed;
  top: var(--header-height);
  left: 0;
  bottom: 0;
  width: var(--sidebar-width);
  background: var(--bg-surface);
  border-right: 1px solid var(--border);
  overflow-y: auto;
  z-index: 90;
  transition: transform var(--transition-slow);
}

.sidebar-nav {
  padding: 20px 0;
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - var(--header-height));
}

.sidebar-section {
  padding: 0 16px;
  margin-bottom: 8px;
}

.sidebar-section-title {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  padding: 12px 8px 8px;
}

.sidebar-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sidebar-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 12px;
  background: none;
  border: none;
  border-radius: var(--radius-xs);
  color: var(--text-body);
  font-family: var(--font-body);
  font-size: 14px;
  cursor: pointer;
  transition: all var(--transition);
  text-align: left;
}

.sidebar-item:hover {
  background: var(--bg-card);
  color: var(--text-heading);
}

.sidebar-item-icon {
  font-size: 16px;
  flex-shrink: 0;
}

.sidebar-item-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  background: none;
  border: none;
  border-radius: var(--radius-xs);
  color: var(--text-body);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  text-align: left;
}

.sidebar-link:hover {
  background: var(--bg-card);
  color: var(--text-heading);
}

.sidebar-link-icon {
  font-size: 16px;
  flex-shrink: 0;
}

.sidebar-badge {
  margin-left: auto;
  background: var(--accent-subtle);
  color: var(--accent);
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
}

.sidebar-empty {
  padding: 8px 12px;
  color: var(--text-muted);
  font-size: 13px;
  font-style: italic;
}

.sidebar-footer {
  margin-top: auto;
  padding: 16px 24px;
  border-top: 1px solid var(--border);
}

.sidebar-footer-link {
  color: var(--text-muted);
  font-size: 12px;
  text-decoration: none;
  transition: color var(--transition);
}

.sidebar-footer-link:hover {
  color: var(--text-body);
}

/* Sidebar loading */
.sidebar-loading {
  padding: 8px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* =============================
   CONTENT
   ============================= */
#content {
  flex: 1;
  margin-left: var(--sidebar-width);
  min-height: calc(100vh - var(--header-height));
}

.content-inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 32px 32px 64px;
}

/* =============================
   LENS SWITCHER
   ============================= */
.lens-switcher {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  margin-bottom: 32px;
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.lens-switcher::-webkit-scrollbar { display: none; }

.lens-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 24px;
  color: var(--text-body);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: all var(--transition);
}

.lens-chip:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-strong);
  color: var(--text-heading);
}

.lens-chip.active {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
  box-shadow: 0 2px 12px var(--accent-glow);
}

.lens-chip-icon {
  font-size: 14px;
}

/* =============================
   SECTION TITLES
   ============================= */
.section-title {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  color: var(--text-heading);
  margin-bottom: 20px;
}

.content-section {
  margin-bottom: 48px;
  animation: slideUp 400ms ease-out both;
}

.content-section:nth-child(2) { animation-delay: 50ms; }
.content-section:nth-child(3) { animation-delay: 100ms; }
.content-section:nth-child(4) { animation-delay: 150ms; }
.content-section:nth-child(5) { animation-delay: 200ms; }

/* =============================
   REIS CARDS
   ============================= */
.reis-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.reis-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  cursor: pointer;
  transition: all var(--transition);
  text-align: left;
  position: relative;
  overflow: hidden;
  width: 100%;
}

.reis-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--reis-accent, var(--accent));
  opacity: 0.7;
  transition: opacity var(--transition);
}

.reis-card:hover {
  border-color: var(--border-strong);
  background: var(--bg-card-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.reis-card:hover::before {
  opacity: 1;
}

.reis-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 12px;
}

.reis-icon {
  font-size: 32px;
  line-height: 1;
}

.reis-badges {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.reis-title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  color: var(--text-heading);
  line-height: 1.3;
  margin-bottom: 4px;
}

.reis-subtitle {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 12px;
}

.reis-meta {
  display: flex;
  align-items: center;
  gap: 8px;
}

.reis-pack-count {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 600;
}

/* =============================
   BADGES
   ============================= */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  text-transform: capitalize;
  letter-spacing: 0.3px;
}

.badge-lens {
  background: color-mix(in srgb, var(--badge-color, var(--accent)) 15%, transparent);
  color: var(--badge-color, var(--accent));
  border: 1px solid color-mix(in srgb, var(--badge-color, var(--accent)) 30%, transparent);
}

.badge-age {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
  border: 1px solid var(--border);
}

.badge-count {
  background: var(--accent-subtle);
  color: var(--accent);
  border: 1px solid rgba(108, 99, 255, 0.25);
}

.badge-cat {
  background: rgba(34, 197, 94, 0.1);
  color: var(--green);
  border: 1px solid rgba(34, 197, 94, 0.25);
}

/* =============================
   REIS DETAIL
   ============================= */
.reis-detail {
  animation: slideUp 300ms ease-out;
}

.reis-detail-header {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 24px;
  padding: 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  position: relative;
  overflow: hidden;
}

.reis-detail-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--reis-accent, var(--accent));
}

.reis-detail-icon {
  font-size: 48px;
  line-height: 1;
  flex-shrink: 0;
}

.reis-detail-title {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
  color: var(--text-heading);
  line-height: 1.2;
  margin-bottom: 4px;
}

.reis-detail-subtitle {
  font-size: 16px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.reis-detail-badges {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.reis-detail-desc {
  font-size: 15px;
  line-height: 1.7;
  color: var(--text-body);
}

/* Pack list in reis detail */
.pack-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pack-list-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: background var(--transition);
}

.pack-list-item:hover {
  background: var(--bg-card-hover);
}

.pack-list-num {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent-subtle);
  color: var(--accent);
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.pack-list-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.pack-list-title {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  color: var(--text-heading);
}

.pack-list-status {
  font-size: 12px;
  color: var(--text-muted);
  font-style: italic;
}

/* =============================
   PACK CARDS
   ============================= */
.pack-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}

.pack-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px;
  transition: all var(--transition);
}

.pack-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-strong);
}

.pack-card-icon {
  font-size: 28px;
  margin-bottom: 8px;
}

.pack-card-title {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  color: var(--text-heading);
  line-height: 1.3;
  margin-bottom: 8px;
}

.pack-card-meta {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.pack-card-status {
  font-size: 12px;
  color: var(--text-muted);
  font-style: italic;
}

/* =============================
   ACCORDIONS
   ============================= */
.accordion {
  margin-bottom: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.accordion-header {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 14px 16px;
  background: var(--bg-card);
  border: none;
  color: var(--text-heading);
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition);
}

.accordion-header:hover {
  background: var(--bg-card-hover);
}

.accordion-title { flex: 1; text-align: left; }

.accordion-count {
  font-size: 12px;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.05);
  padding: 2px 8px;
  border-radius: 10px;
}

.accordion-arrow {
  color: var(--text-muted);
  transition: transform var(--transition);
  flex-shrink: 0;
}

.accordion[data-open="true"] .accordion-arrow {
  transform: rotate(0deg);
}

.accordion[data-open="false"] .accordion-arrow {
  transform: rotate(-90deg);
}

.accordion-body {
  padding: 12px 16px 16px;
  overflow: hidden;
  transition: all var(--transition-slow);
}

.accordion[data-open="false"] .accordion-body {
  display: none;
}

/* =============================
   EMPTY & ERROR STATES
   ============================= */
.empty-state {
  text-align: center;
  padding: 48px 24px;
  grid-column: 1 / -1;
}

.empty-state.small {
  padding: 24px 16px;
}

.empty-state-icon {
  font-size: 40px;
  margin-bottom: 12px;
  opacity: 0.5;
}

.empty-state-text {
  color: var(--text-muted);
  font-size: 14px;
  max-width: 300px;
  margin: 0 auto;
}

.error-state {
  text-align: center;
  padding: 48px 24px;
  grid-column: 1 / -1;
}

.error-icon {
  font-size: 40px;
  margin-bottom: 12px;
}

.error-text {
  color: var(--text-body);
  font-size: 15px;
  margin-bottom: 16px;
}

/* =============================
   PROGRESS & FAVORITES
   ============================= */
.progress-item, .favorite-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
  transition: background var(--transition);
}

.progress-item:hover, .favorite-item:hover {
  background: var(--bg-card-hover);
}

.progress-icon, .favorite-icon {
  font-size: 18px;
  flex-shrink: 0;
}

.progress-label, .favorite-label {
  font-size: 14px;
  color: var(--text-heading);
  font-weight: 600;
}

/* =============================
   SHIMMER / LOADING
   ============================= */
.shimmer-card {
  pointer-events: none;
}

.shimmer-line {
  height: 12px;
  background: linear-gradient(90deg, var(--bg-card) 25%, var(--bg-card-hover) 50%, var(--bg-card) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 6px;
  margin-bottom: 8px;
}

.shimmer-line.short {
  width: 60%;
}

.shimmer-block {
  background: linear-gradient(90deg, var(--bg-card) 25%, var(--bg-card-hover) 50%, var(--bg-card) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
}

.shimmer-block.tall {
  height: 80px;
}

/* =============================
   MODAL
   ============================= */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  opacity: 0;
  transition: opacity var(--transition);
  padding: 24px;
}

.modal-overlay.visible {
  opacity: 1;
}

.modal {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  width: 100%;
  max-width: 480px;
  box-shadow: var(--shadow-lg);
  animation: slideUp 300ms ease-out;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--border);
}

.modal-title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  color: var(--text-heading);
}

.modal-close {
  width: 32px;
  height: 32px;
  border: none;
  background: none;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
}

.modal-close:hover {
  background: var(--bg-card);
  color: var(--text-heading);
}

.modal-body {
  padding: 24px;
}

.modal-section {
  margin-bottom: 24px;
}

.modal-section:last-child {
  margin-bottom: 0;
}

.modal-label {
  display: block;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-heading);
  margin-bottom: 12px;
}

.modal-footer {
  display: flex;
  justify-content: space-between;
  padding: 16px 24px;
  border-top: 1px solid var(--border);
}

/* Age input in modal */
.age-input-row {
  display: flex;
  align-items: center;
  gap: 16px;
  justify-content: center;
}

.age-btn {
  width: 40px;
  height: 40px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-heading);
  font-size: 20px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
}

.age-btn:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent);
  color: var(--accent);
}

.age-value {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 700;
  color: var(--accent);
  min-width: 60px;
  text-align: center;
}

/* =============================
   TEXT UTILITIES
   ============================= */
.text-muted { color: var(--text-muted); }

/* =============================
   RESPONSIVE
   ============================= */

/* Tablet */
@media (max-width: 1024px) {
  :root {
    --sidebar-width: 260px;
  }

  .content-inner {
    padding: 24px;
  }

  .reis-grid {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  }
}

/* Mobile */
@media (max-width: 768px) {
  .hamburger {
    display: flex;
  }

  #sidebar {
    transform: translateX(-100%);
    width: 280px;
    box-shadow: var(--shadow-lg);
  }

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

  #content {
    margin-left: 0;
  }

  .content-inner {
    padding: 20px 16px 48px;
  }

  .onboarding-title {
    font-size: 26px;
  }

  .avatar-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
  }

  .avatar-grid.compact {
    grid-template-columns: repeat(4, 1fr);
  }

  .avatar-tile {
    width: 64px;
    height: 64px;
  }

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

  .pack-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  }

  .reis-detail-header {
    flex-direction: column;
    gap: 12px;
  }

  .reis-detail-title {
    font-size: 22px;
  }

  .header-brand {
    font-size: 17px;
  }

  .lens-switcher {
    margin-bottom: 24px;
  }
}

/* Small mobile */
@media (max-width: 480px) {
  .avatar-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .avatar-grid.compact {
    grid-template-columns: repeat(3, 1fr);
  }

  .modal {
    margin: 16px;
  }

  .onboarding-inner {
    padding: 0 8px;
  }
}
