/* ============================================
   DESIGN SYSTEM - CSS VARIABLES
   Maps to: theme config in React/Next.js
   ============================================ */
:root {
  /* Colors - Nike-inspired minimal palette */
  --bg-primary: #ffffff;
  --bg-secondary: #f5f5f5;
  --bg-tertiary: #e5e5e5;
  --bg-card: #ffffff;
  --bg-card-hover: #fafafa;
  --bg-elevated: #ffffff;

  --text-primary: #111111;
  --text-secondary: #707072;
  --text-tertiary: #666666;
  --text-muted: #888888;

  /* Accent - warm black (Nike uses almost no color) */
  --accent: #ffffff;
  --accent-dim: #f0f0f0;
  --accent-soft: rgba(255, 255, 255, 0.15);
  --accent-glow: rgba(255, 255, 255, 0.4);

  /* Brand colors - used sparingly */
  --pink: #111111;
  --pink-soft: rgba(17, 17, 17, 0.06);
  --yellow: #111111;
  --yellow-soft: rgba(17, 17, 17, 0.06);
  --green: #128a09;
  --green-soft: rgba(18, 138, 9, 0.08);
  --red: #d13b18;
  --red-soft: rgba(209, 59, 24, 0.08);
  --blue: #3ba4c9;
  --orange: #fa5400;

  --gradient-primary: linear-gradient(135deg, #111111, #333333);
  --gradient-warm: linear-gradient(135deg, #fa5400, #d13b18);
  --gradient-cool: linear-gradient(135deg, #3ba4c9, #128a09);
  --gradient-premium: linear-gradient(135deg, #111111, #333333);

  /* Borders - subtler */
  --border: rgba(0, 0, 0, 0.06);
  --border-hover: rgba(0, 0, 0, 0.12);
  --border-accent: rgba(0, 0, 0, 0.2);

  /* Radius - Nike is very angular, almost no rounding */
  --radius-sm: 0px;
  --radius-md: 0px;
  --radius-lg: 0px;
  --radius-xl: 4px;
  --radius-full: 9999px;

  /* Shadows - minimal, Nike barely uses shadows */
  --shadow-sm: none;
  --shadow-md: 0 2px 6px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-glow: none;

  /* Spacing */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 40px;
  --space-2xl: 64px;
  --space-3xl: 96px;
  --space-4xl: 128px;

  /* Typography - matches propeller.la aktiv-grotesk */
  --font-body: 'aktiv-grotesk', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-display: 'aktiv-grotesk-condensed', 'aktiv-grotesk', 'Inter', sans-serif;

  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 2.5rem;
  --text-4xl: 3.5rem;
  --text-5xl: 5rem;

  /* Transitions */
  --ease-out: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --duration-fast: 150ms;
  --duration-normal: 250ms;
  --duration-slow: 400ms;

  /* Layout */
  --preview-bar-height: 40px;
  --nav-height: 64px;
}

/* PWA standalone mode — hide dev preview bar, reclaim 40px */
@media all and (display-mode: standalone) {
  :root {
    --preview-bar-height: 0px;
  }
  .preview-bar {
    display: none !important;
  }
}

/* Mobile spacing + typography scale — tighten everything for small screens */
@media (max-width: 768px) {
  :root {
    --space-xl: 32px;
    --space-2xl: 40px;
    --space-3xl: 48px;
    --space-4xl: 64px;
    --text-3xl: 2rem;
    --text-4xl: 2.5rem;
    --text-5xl: 3rem;
  }
}
@media (max-width: 480px) {
  :root {
    --space-xl: 24px;
    --space-2xl: 32px;
    --space-3xl: 40px;
    --space-4xl: 48px;
    --text-3xl: 1.75rem;
    --text-4xl: 2rem;
    --text-5xl: 2.5rem;
  }
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
button { cursor: pointer; border: none; background: none; font: inherit; color: inherit; }
ul, ol { list-style: none; }

.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

/* ============================================
   TYPOGRAPHY
   ============================================ */
.text-gradient {
  color: var(--text-primary);
  -webkit-text-fill-color: var(--text-primary);
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 900;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  margin-bottom: var(--space-sm);
  line-height: 1;
}

.section-subtitle {
  color: var(--text-secondary);
  font-size: var(--text-base);
  margin-bottom: var(--space-xl);
  line-height: 1.6;
}

.page-title {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 900;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  margin-bottom: var(--space-sm);
  line-height: 0.95;
  text-align: center;
}

.page-subtitle {
  color: var(--text-secondary);
  font-size: var(--text-sm);
  font-weight: 400;
  margin-bottom: var(--space-2xl);
  line-height: 1.5;
  text-align: center;
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-xl);
  flex-wrap: wrap;
  gap: var(--space-md);
}

.section-link {
  font-size: var(--text-base);
  font-weight: 500;
  color: var(--text-primary);
  text-decoration: underline;
  cursor: pointer;
  transition: opacity var(--duration-fast);
}

.section-link:hover { opacity: 0.6; }

/* ============================================
   NAVIGATION
   ============================================ */
.nav {
  position: fixed;
  top: var(--preview-bar-height);
  left: 0;
  right: 0;
  height: var(--nav-height);
  background: #000000;
  border-bottom: none;
  z-index: 1000;
  transition: background var(--duration-normal) var(--ease-out);
}

.nav__inner {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--space-lg);
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav__logo {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-xl);
  flex-shrink: 0;
}

.nav__logo-img { height: 28px; width: auto; display: block; object-fit: contain; flex-shrink: 0; }
.footer__logo-img { height: 24px; width: auto; display: block; }

.nav__links {
  display: flex;
  gap: var(--space-lg);
  align-items: center;
}

.nav__link {
  font-size: var(--text-sm);
  font-weight: 500;
  color: rgba(255, 255, 255, 0.7);
  transition: color var(--duration-fast);
  position: relative;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.nav__link:hover { color: #ffffff; }

.nav__link--accent {
  color: #ffffff;
  font-weight: 600;
}

.nav__link--accent:hover { color: rgba(255,255,255,0.7); }

.nav__right {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.nav__points {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 3px;
  font-size: var(--text-sm);
  font-weight: 700;
  color: #ffffff;
  font-family: var(--font-display);
  cursor: pointer;
  transition: all var(--duration-fast);
}

.nav__points:hover {
  background: rgba(255, 255, 255, 0.15);
}

.nav__points-icon { display: flex; }

.nav__streak {
  display: flex;
  align-items: center;
  gap: 2px;
  font-size: var(--text-sm);
  font-weight: 600;
  color: #ffffff;
}

.nav__streak-fire { font-size: 16px; }

.nav__avatar {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.3);
  transition: border-color var(--duration-fast);
}

.nav__avatar:hover { border-color: #ffffff; }
.nav__avatar img { width: 100%; height: 100%; object-fit: cover; }

.nav__hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 4px;
}

.nav__hamburger span {
  display: block;
  width: 20px;
  height: 2px;
  background: #ffffff;
  border-radius: 2px;
  transition: all var(--duration-normal);
}

.nav__mobile {
  display: none;
  position: absolute;
  top: var(--nav-height);
  left: 0;
  right: 0;
  background: #000000;
  border-bottom: none;
  padding: var(--space-md) var(--space-lg);
  flex-direction: column;
  gap: var(--space-xs);
}

.nav__mobile.active { display: flex; }

.nav__mobile-link {
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-md);
  font-weight: 500;
  color: #ffffff;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  transition: background var(--duration-fast);
}

.nav__mobile-link:hover { background: rgba(255, 255, 255, 0.1); }

.nav__hamburger.open span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}
.nav__hamburger.open span:nth-child(2) {
  opacity: 0;
}
.nav__hamburger.open span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

@media (max-width: 768px) {
  .nav__links { display: none; }
  .nav__hamburger { display: flex; padding: 10px; }
  .nav__points-value { display: none; }
  .nav__search-btn,
  .nav__notif-btn,
  .nav__admin-btn {
    width: 44px;
    height: 44px;
  }
  .nav__avatar {
    width: 36px;
    height: 36px;
  }
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: 8px 24px;
  font-size: var(--text-base);
  font-weight: 500;
  border-radius: 30px;
  transition: all var(--duration-normal) var(--ease-out);
  white-space: nowrap;
}

.btn--primary {
  background: #111111;
  color: #ffffff;
  font-family: var(--font-body);
  text-transform: none;
  letter-spacing: normal;
  box-shadow: none;
}

.btn--primary:hover {
  transform: none;
  box-shadow: none;
  background: #3d3d3d;
}

.btn--outline {
  border: 1.5px solid #cacacb;
  color: #111111;
  background: transparent;
  text-transform: none;
  letter-spacing: normal;
  font-family: var(--font-body);
}

.btn--outline:hover {
  border-color: #111111;
  background: transparent;
  color: #111111;
}

.btn--ghost {
  color: var(--text-secondary);
  padding: var(--space-sm) var(--space-md);
}

.btn--ghost:hover { color: var(--text-primary); }

.btn--accent {
  background: #111111;
  color: #fff;
  font-weight: 500;
}

.btn--accent:hover { background: #3d3d3d; transform: none; }

.btn--lg { padding: 14px 32px; font-size: var(--text-base); border-radius: 30px; }
.btn--full { width: 100%; }
.btn--back { margin-bottom: var(--space-xl); }

/* Detail page floating back button (overlays hero images) */
.detail-back-btn {
  position: absolute;
  top: max(16px, env(safe-area-inset-top, 16px));
  left: 16px;
  z-index: 20;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #fff;
  border: none;
  border-radius: 24px;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.detail-back-btn:hover {
  background: rgba(0, 0, 0, 0.7);
}
/* Ensure all hero containers position the back button correctly */
.chd__hero, .iv__hero {
  position: relative;
}

/* ============================================
   BADGES
   ============================================ */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 500;
  font-family: var(--font-body);
  border-radius: 30px;
  text-transform: none;
  letter-spacing: normal;
}

.badge--gold { background: #f5f5f5; color: #111; font-weight: 500; }
.badge--premium { background: #111; color: #fff; }
.badge--pink { background: #111; color: #fff; }
.badge--green { background: #f5f5f5; color: #111; }
.badge--yellow { background: #f5f5f5; color: #111; font-weight: 500; }

/* ============================================
   TABS - Propeller underline style
   ============================================ */
.section-tabs {
  display: flex;
  gap: var(--space-md);
  flex-wrap: nowrap;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  scroll-snap-type: x mandatory;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0;
}
.section-tabs::-webkit-scrollbar { display: none; }

.tab {
  scroll-snap-align: start;
  padding: 8px 4px;
  font-size: var(--text-base);
  font-weight: 500;
  font-family: var(--font-body);
  text-transform: none;
  letter-spacing: normal;
  color: var(--text-tertiary);
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: all var(--duration-fast);
  cursor: pointer;
}

.tab:hover { color: var(--text-primary); }
.tab--active { color: var(--text-primary); border-bottom-color: #111111; }

/* ============================================
   CAUSE PILLS - Propeller chip style
   ============================================ */
.cause-filters { display: flex; gap: 8px; flex-wrap: wrap; }

.cause-pill {
  padding: 8px 20px;
  font-size: var(--text-sm);
  font-weight: 500;
  font-family: var(--font-body);
  text-transform: none;
  letter-spacing: normal;
  border-radius: 30px;
  background: transparent;
  border: 1.5px solid #e5e5e5;
  color: var(--text-secondary);
  transition: all var(--duration-fast);
  cursor: pointer;
}

.cause-pill:hover {
  border-color: #111111;
  color: #111111;
}

.cause-pill--active {
  border-color: #111111;
  color: #fff;
  background: #111111;
}

/* ============================================
   PAGE TRANSITIONS
   ============================================ */
.page {
  display: none;
  min-height: calc(100vh - var(--nav-height) - var(--preview-bar-height));
  padding-top: calc(var(--nav-height) + var(--preview-bar-height));
  animation: pageIn var(--duration-slow) var(--ease-out);
}

.page.active { display: block; }

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

/* ============================================
   PROGRESS BAR
   ============================================ */
.progress-bar {
  width: 100%;
  height: 6px;
  background: var(--bg-tertiary);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.progress-bar__fill {
  height: 100%;
  background: #111111;
  border-radius: var(--radius-full);
  transition: width 1s var(--ease-out);
}

/* ============================================
   TOAST NOTIFICATIONS
   ============================================ */
.toast-container {
  position: fixed;
  bottom: var(--space-xl);
  right: var(--space-xl);
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  max-width: calc(100vw - 32px);
}

.toast {
  padding: var(--space-md) var(--space-lg);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  font-size: var(--text-sm);
  animation: toastIn var(--duration-normal) var(--ease-spring);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  max-width: 360px;
}

.toast--points { border-color: #111; }
.toast--streak { border-color: #111; }
.toast--level { border-color: #111; }

.toast__icon { font-size: 20px; }
.toast__text { flex: 1; }
.toast__value { font-weight: 600; color: #111; }

@keyframes toastIn {
  from { opacity: 0; transform: translateX(40px) scale(0.95); }
  to { opacity: 1; transform: translateX(0) scale(1); }
}

@keyframes toastOut {
  from { opacity: 1; transform: translateX(0); }
  to { opacity: 0; transform: translateX(40px); }
}

/* ============================================
   LIVE TICKER
   ============================================ */
.ticker {
  padding: var(--space-lg) 0;
  background: #000000;
  color: #ffffff;
  border-top: none;
  border-bottom: none;
  overflow: hidden;
}

.ticker__track {
  display: flex;
  gap: var(--space-2xl);
  animation: ticker 30s linear infinite;
  white-space: nowrap;
}

.ticker__item {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: var(--text-sm);
  color: var(--text-secondary);
  flex-shrink: 0;
}

.ticker__item-name { font-weight: 600; color: #ffffff; }
.ticker__item-action { color: rgba(255,255,255,0.7); }
.ticker__item-time { color: rgba(255,255,255,0.4); font-size: var(--text-xs); }

@keyframes ticker {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
  background: #000000;
  color: #ffffff;
  border-top: none;
  padding: var(--space-3xl) 0 var(--space-xl);
}

.footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--space-2xl);
  margin-bottom: var(--space-2xl);
}

.footer__tagline { color: rgba(255,255,255,0.6); margin-top: var(--space-sm); font-size: var(--text-sm); }

.footer__links h4 {
  font-size: var(--text-sm);
  font-weight: 600;
  margin-bottom: var(--space-md);
  color: #ffffff;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.footer__links a {
  display: block;
  font-size: var(--text-sm);
  color: rgba(255,255,255,0.6);
  padding: var(--space-xs) 0;
  transition: color var(--duration-fast);
}

.footer__links a:hover { color: #ffffff; }

.footer__bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: var(--space-xl);
  border-top: 1px solid rgba(255,255,255,0.1);
  font-size: var(--text-sm);
  color: rgba(255,255,255,0.4);
}

.footer__social { display: flex; gap: var(--space-md); }
.footer__social a { color: rgba(255,255,255,0.6); transition: color var(--duration-fast); }
.footer__social a:hover { color: #ffffff; }

@media (max-width: 768px) {
  .footer__grid { grid-template-columns: 1fr 1fr; gap: var(--space-xl); }
  .footer { padding: var(--space-2xl) 0 var(--space-lg); }
}

@media (max-width: 480px) {
  .footer__grid { grid-template-columns: 1fr; }
  .footer__bottom {
    flex-direction: column;
    gap: var(--space-md);
    text-align: center;
  }
}

/* ============================================
   NAV - SEARCH & NOTIFICATION BUTTONS
   ============================================ */
.nav__search-btn,
.nav__notif-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  color: rgba(255, 255, 255, 0.7);
  transition: all var(--duration-fast);
}

.nav__search-btn:hover,
.nav__notif-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
}

.nav__notif-dot {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 8px;
  height: 8px;
  background: var(--pink);
  border-radius: var(--radius-full);
  border: 2px solid #000;
}

.nav__admin-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  color: rgba(255, 255, 255, 0.45);
  transition: all var(--duration-fast);
}

.nav__admin-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
}

/* ============================================
   SEARCH OVERLAY
   ============================================ */
.search-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  z-index: 2500;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 120px;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--duration-normal), visibility var(--duration-normal);
}

.search-overlay.active {
  opacity: 1;
  visibility: visible;
}

.search-overlay__inner {
  width: 100%;
  max-width: 600px;
  margin: 0 var(--space-lg);
}

.search-overlay__bar {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md) var(--space-lg);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
}

.search-overlay__bar svg {
  flex-shrink: 0;
  color: var(--text-tertiary);
}

.search-overlay__input {
  flex: 1;
  border: none;
  outline: none;
  font-size: var(--text-lg);
  font-family: var(--font-body);
  background: transparent;
  color: var(--text-primary);
}

.search-overlay__input::placeholder {
  color: var(--text-muted);
}

.search-overlay__close {
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--text-tertiary);
  background: var(--bg-tertiary);
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.search-overlay__results {
  margin-top: var(--space-md);
  max-height: 400px;
  overflow-y: auto;
  background: var(--bg-elevated);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
}

.search-overlay__empty {
  padding: var(--space-xl);
  text-align: center;
  color: var(--text-tertiary);
  font-size: var(--text-sm);
}

.search-group {
  padding: var(--space-sm) 0;
}

.search-group h4 {
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-tertiary);
  padding: var(--space-sm) var(--space-lg);
}

.search-result {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-sm) var(--space-lg);
  cursor: pointer;
  transition: background var(--duration-fast);
}

.search-result:hover {
  background: var(--bg-secondary);
}

.search-result__icon {
  font-size: 20px;
  flex-shrink: 0;
}

.search-result strong {
  font-size: var(--text-sm);
  display: block;
}

.search-result small {
  font-size: var(--text-xs);
  color: var(--text-tertiary);
}

/* ============================================
   NOTIFICATION PANEL
   ============================================ */
.notif-panel {
  position: fixed;
  top: calc(var(--nav-height) + var(--preview-bar-height));
  right: 0;
  width: min(380px, 100vw);
  max-height: calc(100vh - var(--nav-height) - var(--preview-bar-height));
  background: var(--bg-elevated);
  border-left: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  z-index: 1500;
  transform: translateX(100%);
  transition: transform var(--duration-normal) var(--ease-out);
  overflow-y: auto;
}

.notif-panel.active {
  transform: translateX(0);
}

.notif-panel__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-lg);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: var(--bg-elevated);
  z-index: 1;
}

.notif-panel__title {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.notif-panel__mark-read {
  font-size: var(--text-xs);
  color: var(--pink);
  font-weight: 600;
}

.notif-panel__mark-read:hover {
  text-decoration: underline;
}

.notif-panel__list {
  padding: var(--space-sm) 0;
}

.notif-item {
  display: flex;
  gap: var(--space-md);
  padding: var(--space-md) var(--space-lg);
  border-bottom: 1px solid var(--border);
  transition: background var(--duration-fast);
}

.notif-item:hover {
  background: var(--bg-secondary);
}

.notif-item--unread {
  background: rgba(238, 44, 103, 0.04);
  border-left: 3px solid var(--pink);
}

.notif-item__icon {
  font-size: 20px;
  flex-shrink: 0;
  margin-top: 2px;
}

.notif-item__content {
  flex: 1;
  min-width: 0;
}

.notif-item__text {
  font-size: var(--text-sm);
  line-height: 1.4;
  color: var(--text-primary);
}

.notif-item__time {
  font-size: var(--text-xs);
  color: var(--text-tertiary);
  margin-top: 4px;
  display: block;
}

.notif-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.3);
  z-index: 1400;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--duration-normal), visibility var(--duration-normal);
}

.notif-backdrop.active {
  opacity: 1;
  visibility: visible;
}

@media (max-width: 480px) {
  .container {
    padding: 0 var(--space-md);
  }
  .nav__inner {
    padding: 0 var(--space-md);
  }
  .notif-panel {
    width: 100%;
    max-height: 70vh;
  }
  .notif-item {
    padding: var(--space-sm) var(--space-md);
    gap: var(--space-sm);
  }
  .modal__close {
    width: 44px;
    height: 44px;
  }
}

/* ============================================
   MODAL OVERLAY
   ============================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-lg);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--duration-normal), visibility var(--duration-normal);
}

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

.modal {
  background: var(--bg-elevated);
  border-radius: var(--radius-xl);
  max-width: 560px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  position: relative;
  animation: modalIn var(--duration-normal) var(--ease-spring);
  box-shadow: var(--shadow-lg);
}

@keyframes modalIn {
  from { opacity: 0; transform: scale(0.95) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal__close {
  position: absolute;
  top: var(--space-md);
  right: var(--space-md);
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: var(--text-tertiary);
  background: var(--bg-secondary);
  border-radius: var(--radius-full);
  z-index: 2;
  transition: all var(--duration-fast);
}

.modal__close:hover {
  background: var(--bg-tertiary);
  color: var(--text-primary);
}

@media (max-width: 480px) {
  .modal-overlay {
    padding: var(--space-sm);
    align-items: flex-end;
  }
  .modal {
    max-height: 90vh;
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  }
  .modal-action__body {
    padding: var(--space-lg);
  }
}

/* Modal Action Detail */
.modal-action__img {
  width: 100%;
  aspect-ratio: 16/10;
  object-fit: cover;
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}

.modal-action__body {
  padding: var(--space-xl);
}

.modal-action__title {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 700;
  margin-top: var(--space-md);
  margin-bottom: var(--space-xs);
}

.modal-action__org {
  font-size: var(--text-sm);
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--space-md);
}

.modal-action__desc {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: var(--space-lg);
}

.modal-action__meta {
  display: flex;
  gap: var(--space-lg);
  font-size: var(--text-sm);
  color: var(--text-tertiary);
  margin-bottom: var(--space-xl);
}

.modal-action__cta {
  margin-top: var(--space-md);
}

/* Modal Reward Detail */
.modal-reward {
  padding: var(--space-xl);
  text-align: center;
}

.modal-reward__img {
  width: 200px;
  height: 200px;
  object-fit: cover;
  border-radius: var(--radius-lg);
  margin: 0 auto var(--space-lg);
}

.modal-reward__title {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 700;
  margin-bottom: var(--space-md);
}

.modal-reward__price {
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: var(--space-sm);
}

.modal-reward__bonus {
  font-size: var(--text-sm);
  color: var(--green);
  background: var(--green-soft);
  display: inline-block;
  padding: 4px 12px;
  border-radius: 3px;
  font-weight: 700;
  margin-bottom: var(--space-xl);
  font-family: var(--font-display);
  letter-spacing: 0.02em;
}

/* ============================================
   ADDITIONAL BADGE VARIANTS
   ============================================ */
.badge--purple {
  background: #b388ff;
  color: #000;
  font-weight: 700;
}

/* ============================================
   BUTTON VARIANTS
   ============================================ */
.btn--sm {
  padding: 6px 14px;
  font-size: var(--text-xs);
  border-radius: var(--radius-md);
}

/* ============================================
   ACTION CARD DESCRIPTION
   ============================================ */
.action-card__desc {
  font-size: var(--text-xs);
  color: var(--text-tertiary);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ============================================
   TOGGLE SWITCHES
   ============================================ */
.toggle {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}

.toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle__slider {
  position: absolute;
  inset: 0;
  background: var(--bg-tertiary);
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: background var(--duration-fast);
}

.toggle__slider::before {
  content: '';
  position: absolute;
  left: 3px;
  top: 3px;
  width: 18px;
  height: 18px;
  background: #ffffff;
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-sm);
  transition: transform var(--duration-fast);
}

.toggle input:checked + .toggle__slider {
  background: var(--pink);
}

.toggle input:checked + .toggle__slider::before {
  transform: translateX(20px);
}

/* ============================================
   MOBILE: Prevent iOS Safari zoom on input focus
   iOS zooms when font-size < 16px on form elements
   ============================================ */
@supports (-webkit-touch-callout: none) {
  input, textarea, select {
    font-size: max(16px, 1em) !important;
  }
}

/* Safe area inset for iPhone home indicator (bottom only — top handled by nav) */
body {
  padding-bottom: env(safe-area-inset-bottom);
}

/* Reduced motion for accessibility */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ── Mobile touch targets ── */
@media (max-width: 768px) {
  /* Modal close buttons */
  .modal__close { width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; }
}

/* ── Mobile performance: simplify backdrop-filter on low-power devices ── */
@media (max-width: 768px) {
  /* Replace GPU-heavy backdrop-filter with solid backgrounds on mobile */
  .nav,
  .detail-back-btn {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }
  .nav {
    background: rgba(255, 255, 255, 0.97) !important;
  }
  .detail-back-btn {
    background: rgba(0, 0, 0, 0.65) !important;
  }
}

/* ── Scroll performance: use passive-friendly smooth scrolling ── */
@media (max-width: 768px) {
  * {
    -webkit-overflow-scrolling: touch;
  }
}
