/* Klariti v40 - Program Detail tabs + Player chips */

:root {
  --bg: #0e0e10;
  --surface: rgba(26,26,31,0.65);
  --surface-raised: rgba(36,36,41,0.7);
  --accent: #7c9e87;
  --accent-deep: #5d7a66;
  --accent-soft: rgba(124,158,135,0.15);
  --text-1: #f5f5f5;
  --text-2: rgba(255,255,255,0.5);
  --text-3: rgba(255,255,255,0.3);
  --border: rgba(255,255,255,0.07);
  --border-light: rgba(255,255,255,0.12);
  --glass-bg: rgba(26,26,31,0.55);
  --glass-border: rgba(255,255,255,0.1);
  --danger: #ef4444;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-display: 'Playfair Display', Georgia, serif;
  --nav-h: 64px;
  --mini-h: 64px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* ═══ CUSTOM SCROLLBAR (global) ═══ */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.12);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(255,255,255,0.22);
}
/* Firefox */
* {
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.12) transparent;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text-1);
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

a { color: var(--accent); text-decoration: none; }
button { font-family: var(--font); cursor: pointer; border: none; background: none; color: inherit; -webkit-tap-highlight-color: transparent; }
input, select { font-family: var(--font); }

/* ═══ AUTH SCREEN ═══ */
.auth-screen {
  position: fixed; inset: 0;
  display: flex; align-items: center; justify-content: center;
  z-index: 1000; overflow: hidden;
}
.auth-bg { position: absolute; inset: 0; z-index: 0; }
.auth-bg img { width: 100%; height: 100%; object-fit: cover; }
.auth-bg-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(14,14,16,0.6) 0%, rgba(14,14,16,0.8) 100%);
}

.auth-marquee-wrap {
  position: absolute; top: 50%; left: 0; right: 0;
  transform: translateY(-50%); z-index: 1;
  overflow: hidden; pointer-events: none;
}
.auth-marquee {
  display: flex; white-space: nowrap;
  animation: auth-scroll 25s linear infinite;
  font-family: var(--font-display);
  font-size: clamp(80px, 14vw, 160px);
  font-weight: 400; font-style: italic;
  color: rgba(255,255,255,0.04);
  letter-spacing: 0.02em; line-height: 1; gap: 40px;
}
.auth-marquee span { flex-shrink: 0; }
@keyframes auth-scroll { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }

.auth-card {
  position: relative; z-index: 2;
  width: 100%; max-width: 400px;
  background: rgba(26,26,31,0.9);
  backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--border-light);
  border-radius: 20px; padding: 40px 32px;
  box-shadow: 0 16px 64px rgba(0,0,0,0.5);
  margin: 16px;
}
.auth-brand { text-align: center; margin-bottom: 28px; }
.auth-logo { width: 56px; height: 56px; object-fit: contain; margin-bottom: 12px; }
.auth-title { font-family: var(--font); font-size: 22px; font-weight: 500; letter-spacing: 0.08em; color: white; margin-bottom: 4px; }
.auth-tagline { font-size: 0.82rem; color: var(--text-2); }

.field { margin-bottom: 12px; }
.field input {
  width: 100%; padding: 14px 16px;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border-light);
  border-radius: 12px; color: white; font-size: 0.9rem; outline: none;
  transition: border-color 0.2s;
}
.field input:focus { border-color: var(--accent); }
.field input::placeholder { color: var(--text-3); }

.btn-primary {
  width: 100%; padding: 14px; margin-top: 8px;
  background: var(--accent); color: white;
  font-weight: 600; font-size: 0.9rem; border-radius: 12px;
  transition: background 0.15s, transform 0.1s;
}
.btn-primary:hover { background: var(--accent-deep); }
.btn-primary:active { transform: scale(0.98); }

.auth-switch { text-align: center; font-size: 0.8rem; color: var(--text-3); margin-top: 14px; }
.auth-switch a { color: var(--accent); font-weight: 500; }

.btn-google {
  width: 100%; padding: 12px; border-radius: 12px;
  background: rgba(255,255,255,0.08); border: 1px solid var(--border-light);
  color: var(--text-1); font-size: 0.9rem; font-weight: 500;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  cursor: pointer; transition: background 0.2s; font-family: var(--font);
  margin-bottom: 0;
}
.btn-google:hover { background: rgba(255,255,255,0.12); }

.auth-divider {
  display: flex; align-items: center; gap: 12px;
  margin: 16px 0; color: var(--text-3); font-size: 0.75rem;
}
.auth-divider::before, .auth-divider::after {
  content: ''; flex: 1; height: 1px; background: var(--border);
}
.auth-divider span { text-transform: uppercase; letter-spacing: 1px; }

.auth-error {
  background: rgba(239,68,68,0.12); color: #fca5a5; font-size: 0.8rem;
  padding: 10px 14px; border-radius: 10px; margin-top: 12px;
  display: none; border: 1px solid rgba(239,68,68,0.2);
}
.auth-error.visible { display: block; }

/* ═══ APP SHELL ═══ */
.app-shell {
  position: fixed; inset: 0;
  display: flex; flex-direction: column;
  background: var(--bg);
}

/* ═══ TAB VIEWS ═══ */
.tab-view {
  position: absolute; top: 0; left: 0; right: 0;
  bottom: calc(var(--nav-h) + var(--safe-bottom));
  opacity: 0; pointer-events: none;
  transition: opacity 0.25s var(--ease);
  z-index: 1;
}
.tab-view.active {
  opacity: 1; pointer-events: auto;
}
/* offset when mini player is visible */
.app-shell.has-mini .tab-view {
  bottom: calc(var(--nav-h) + var(--mini-h) + var(--safe-bottom));
}

.view-scroll {
  position: relative;
  z-index: 1;
  height: 100%; overflow-y: auto; overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
}
.view-content {
  max-width: 600px; margin: 0 auto;
  padding: 20px 20px 32px;
}
.view-header {
  font-family: var(--font-display);
  font-size: 1.8rem; font-weight: 600;
  margin-bottom: 20px; padding-top: 8px;
}

/* ═══ BOTTOM NAV ═══ */
.bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0;
  height: calc(var(--nav-h) + var(--safe-bottom));
  padding-bottom: var(--safe-bottom);
  background: rgba(14,14,16,0.88);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-top: 1px solid var(--border);
  display: flex; align-items: stretch;
  z-index: 50;
}
.nav-tab {
  flex: 1;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 4px;
  color: var(--text-3);
  transition: color 0.2s;
  -webkit-tap-highlight-color: transparent;
  padding: 0;
}
.nav-tab i { width: 22px; height: 22px; }
.nav-tab span { font-size: 10px; font-weight: 500; letter-spacing: 0.02em; }
.nav-tab.active { color: var(--accent); }

/* ═══ HOME VIEW ═══ */
.home-hero {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 300px;
  background-image: url('https://images.unsplash.com/photo-1519681393784-d120267933ba?w=1920&q=80');
  background-size: cover;
  background-position: center top;
  z-index: 0;
  pointer-events: none;
}
.home-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(14,14,16,0.15) 0%,
    rgba(14,14,16,0.3) 40%,
    rgba(14,14,16,0.75) 70%,
    rgba(14,14,16,1) 90%
  );
}

.view-content {
  position: relative;
  z-index: 1;
}

/* Welcome row */
.home-welcome-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
  padding-top: 8px;
}
.home-avatar {
  width: 52px; height: 52px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--bg);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem; font-weight: 600;
  flex-shrink: 0;
}
.home-welcome-text {
  flex: 1;
}
.home-greeting {
  font-family: var(--font-display);
  font-size: 1.6rem; font-weight: 600;
  color: var(--text-1);
  line-height: 1.2;
  margin-bottom: 2px;
}
.home-date {
  font-size: 0.78rem; color: var(--text-3);
  letter-spacing: 0.3px;
}

/* Continue Card - Glass morphism */
.continue-card {
  position: relative;
  border-radius: 22px;
  overflow: visible;
  margin-bottom: 20px;
  margin-top: 0;
  cursor: pointer;
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  padding: 20px 20px 16px;
}
.continue-bg {
  display: none; /* No background image in glass card */
}
.continue-overlay {
  display: none;
}
.continue-content {
  position: relative; z-index: 1;
  padding: 0;
  display: flex; flex-direction: column;
  justify-content: flex-start;
  min-height: auto;
}
.continue-program { 
  font-size: 0.68rem; 
  text-transform: none; 
  letter-spacing: 0.4px; 
  color: var(--text-2); 
  font-weight: 400; 
  margin-bottom: 8px; 
}
.continue-session { 
  font-family: var(--font); 
  font-size: 1.5rem; 
  font-weight: 600; 
  line-height: 1.2; 
  margin-bottom: 0px;
  letter-spacing: -0.5px;
  padding-right: 50px;
}
.continue-meta { 
  font-size: 0.75rem; 
  color: var(--text-3); 
  margin-top: 6px;
  margin-bottom: 0;
}
.continue-bar { 
  display: none; /* Hide progress bar from glass card */
}
.continue-bar-fill { 
  display: none;
}
.continue-play {
  position: absolute; 
  top: 20px; 
  right: 20px;
  width: 46px; 
  height: 46px;
  background: rgba(255,255,255,0.18);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 50%;
  display: flex; 
  align-items: center; 
  justify-content: center;
  color: white; 
  font-size: 16px;
  box-shadow: none;
  transition: transform 0.15s, background 0.15s;
}
.continue-play:active { transform: scale(0.92); }
.continue-play i { margin-left: 2px; }

/* Stats Row - Glass effect */
.stats-row {
  display: flex; gap: 10px;
  margin-bottom: 28px;
}
.stat-chip {
  flex: 1;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 16px;
  padding: 14px 12px;
  display: flex; flex-direction: column;
  align-items: center; text-align: center;
  gap: 4px;
}
.stat-icon { width: 18px; height: 18px; color: var(--accent); margin-bottom: 2px; }
.stat-value { font-size: 1.1rem; font-weight: 600; }
.stat-label { font-size: 0.65rem; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.04em; }

/* Section */
.section { margin-bottom: 28px; }
.section-title {
  font-size: 0.72rem; 
  text-transform: uppercase;
  letter-spacing: 0.08em; 
  color: var(--text-3);
  font-weight: 600; 
  margin-bottom: 12px;
}

/* Next Up - hidden, merged into continue card */
#nextUpSection { display: none !important; }

/* Next Up Card */
.next-up-card {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 16px;
  padding: 14px;
  display: flex; align-items: center; gap: 14px;
  cursor: pointer;
  transition: background 0.15s;
}
.next-up-card:active { background: rgba(255,255,255,0.1); }
.next-up-thumb { width: 52px; height: 52px; border-radius: 12px; object-fit: cover; flex-shrink: 0; }
.next-up-info { flex: 1; min-width: 0; }
.next-up-name { font-size: 0.88rem; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.next-up-meta { font-size: 0.72rem; color: var(--text-3); margin-top: 2px; }
.next-up-play { color: var(--accent); font-size: 20px; flex-shrink: 0; padding: 8px; }

/* Home Programs Scroll */
.programs-scroll {
  display: flex; gap: 14px;
  overflow-x: auto; overflow-y: hidden;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 4px;
  scrollbar-width: none;
  position: relative;
  z-index: 2;
}
.programs-scroll::-webkit-scrollbar { display: none; }

.prog-scroll-card {
  flex-shrink: 0;
  width: 140px;
  scroll-snap-align: start;
  cursor: pointer;
  position: relative;
}
.prog-scroll-art {
  width: 140px; height: 180px;
  border-radius: 14px;
  object-fit: cover;
  display: block;
  margin-bottom: 8px;
  position: relative;
}
.prog-scroll-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 180px;
  background: linear-gradient(
    180deg,
    rgba(14,14,16,0) 0%,
    rgba(14,14,16,0) 50%,
    rgba(14,14,16,0.7) 100%
  );
  border-radius: 14px;
  z-index: 1;
  pointer-events: none;
}
.prog-scroll-name { 
  font-size: 0.8rem; 
  font-weight: 500; 
  line-height: 1.3; 
}
.prog-scroll-meta { 
  font-size: 0.66rem; 
  color: var(--text-3); 
  margin-top: 2px; 
}

/* ═══ LIBRARY ═══ */
.library-search {
  position: relative;
  margin-bottom: 16px;
}
.library-search-icon {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  width: 18px; height: 18px; color: var(--text-3); pointer-events: none;
}
.library-search-input {
  width: 100%; padding: 12px 16px 12px 42px;
  background: var(--glass-bg);
  border: 1px solid var(--border-light);
  border-radius: 14px; color: var(--text-1);
  font-size: 0.88rem; outline: none;
  transition: border-color 0.2s;
}
.library-search-input:focus { border-color: var(--accent); }
.library-search-input::placeholder { color: var(--text-3); }

.library-categories {
  display: flex; gap: 8px; flex-wrap: wrap;
  margin-bottom: 24px;
}
.lib-cat {
  padding: 8px 16px;
  border-radius: 20px;
  background: var(--glass-bg);
  border: 1px solid var(--border);
  color: var(--text-2);
  font-size: 0.8rem; font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
}
.lib-cat:hover { background: rgba(255,255,255,0.1); }
.lib-cat.active {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
}

.library-section { margin-bottom: 32px; }
.library-section-title {
  font-size: 0.72rem; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--text-3);
  font-weight: 600; margin-bottom: 14px;
}

/* ═══ PROGRAMS GRID ═══ */
.programs-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
.prog-card {
  cursor: pointer;
  transition: transform 0.2s var(--ease);
}
.prog-card:active { transform: scale(0.98); }
.prog-card-img-wrap {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  width: 100%;
  aspect-ratio: 3 / 4;
  margin-bottom: 10px;
}
.prog-card-img-wrap::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 40%;
  background: linear-gradient(to bottom, transparent, rgba(14,14,16,0.3));
  pointer-events: none;
}
.prog-card-img {
  width: 100%; height: 100%;
  object-fit: cover; display: block;
  transition: transform 0.3s var(--ease);
}
.prog-card:hover .prog-card-img { transform: scale(1.05); }
.prog-card-name { 
  font-size: 0.85rem; 
  font-weight: 500; 
  line-height: 1.3; 
  margin-bottom: 4px;
  color: var(--text-1);
}
.prog-card-meta { 
  font-size: 0.68rem; 
  color: var(--text-3); 
  line-height: 1.3;
}
.prog-card-progress {
  height: 2px;
  background: rgba(255,255,255,0.1);
  border-radius: 1px;
  margin-top: 6px;
  overflow: hidden;
}
.prog-card-bar {
  height: 3px; margin-top: 8px;
  background: rgba(255,255,255,0.15); border-radius: 2px; overflow: hidden;
}

/* ═══ SINGLE SESSIONS ═══ */
.singles-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}
.single-card {
  display: flex; align-items: center; gap: 14px;
  padding: 12px;
  background: var(--glass-bg);
  border: 1px solid var(--border);
  border-radius: 14px;
  cursor: pointer;
  transition: background 0.15s;
}
.single-card:hover { background: rgba(255,255,255,0.08); }
.single-thumb {
  width: 64px; height: 64px;
  border-radius: 12px;
  background-size: cover; background-position: center;
  flex-shrink: 0;
}
.single-info { flex: 1; min-width: 0; }
.single-title { font-size: 0.9rem; font-weight: 600; margin-bottom: 3px; }
.single-desc { font-size: 0.75rem; color: var(--text-2); line-height: 1.4; margin-bottom: 4px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.single-meta { font-size: 0.68rem; color: var(--text-3); }
.prog-card-bar-fill { height: 100%; background: var(--accent); border-radius: 2px; }

/* ═══ PROGRAM DETAIL ═══ */
.program-detail {
  position: fixed; inset: 0;
  background: var(--bg);
  z-index: 60;
  transform: translateY(100%);
  transition: transform 0.35s var(--ease);
  overflow: hidden;
  display: flex; flex-direction: column;
}
.program-detail.open {
  transform: translateY(0);
}

.pd-hero {
  position: relative;
  height: 300px;
  flex-shrink: 0; overflow: hidden;
}
.pd-hero-img {
  width: 100%; height: 100%;
  object-fit: cover;
}
.pd-hero-gradient {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(14,14,16,0.3) 0%, rgba(14,14,16,0.1) 35%, rgba(14,14,16,0.85) 80%, var(--bg) 100%);
}
.pd-back {
  position: absolute; top: 16px; left: 16px;
  width: 36px; height: 36px;
  background: rgba(0,0,0,0.3); backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: white; z-index: 2;
  padding-top: env(safe-area-inset-top, 0px);
  transition: background 0.15s;
}
.pd-back:active { background: rgba(0,0,0,0.6); }
.pd-back i { width: 16px; height: 16px; }

.pd-body {
  flex: 1; overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  max-width: 600px;
  margin: 0 auto;
  width: 100%;
}
.pd-body::-webkit-scrollbar { display: none; }

/* Header info below hero */
.pd-header-info {
  padding: 0 20px;
  position: relative;
  z-index: 2;
}
.pd-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.5px;
  line-height: 1.15;
}
.pd-subtitle {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.45);
  margin-top: 6px;
}
.pd-progress-wrap {
  display: flex; align-items: center; gap: 10px;
  margin-top: 14px;
}
.pd-progress-bar {
  flex: 1; height: 3px;
  background: rgba(255,255,255,0.1);
  border-radius: 2px; overflow: hidden;
}
.pd-progress-fill { height: 100%; background: rgba(255,255,255,0.6); border-radius: 2px; transition: width 0.3s; }
.pd-progress-text { font-size: 0.69rem; color: rgba(255,255,255,0.35); white-space: nowrap; }

/* CTA Button */
.pd-cta-btn {
  width: 100%;
  height: 50px;
  border-radius: 16px;
  background: #fff;
  color: #080a13;
  font-size: 0.94rem;
  font-weight: 700;
  border: none;
  cursor: pointer;
  letter-spacing: -0.2px;
  margin-top: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform 0.1s, opacity 0.15s;
}
.pd-cta-btn:active { transform: scale(0.98); }

/* Tabs */
.pd-tabs {
  display: flex;
  padding: 20px 20px 0;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  gap: 0;
  position: relative;
  z-index: 2;
}
.pd-tab {
  font-size: 0.82rem;
  font-weight: 500;
  color: rgba(255,255,255,0.35);
  padding: 0 16px 12px;
  border: none; background: none;
  cursor: pointer;
  position: relative;
  letter-spacing: 0.2px;
  transition: color 0.15s;
}
.pd-tab:first-child { padding-left: 0; }
.pd-tab.active {
  color: #fff;
}
.pd-tab.active::after {
  content: '';
  position: absolute;
  bottom: -1px; left: 0; right: 0;
  height: 2px;
  background: #fff;
  border-radius: 1px;
}
.pd-tab:first-child.active::after { left: 0; }

/* Tab Panels */
.pd-tab-panel {
  display: none;
  padding: 0 20px;
  animation: pdFadeUp 0.3s ease;
}
.pd-tab-panel.active { display: block; }
@keyframes pdFadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

/* ── Overview Tab ── */
.pd-overview-section {
  padding: 20px 0;
}
.pd-overview-label {
  font-size: 0.69rem;
  font-weight: 600;
  color: rgba(255,255,255,0.3);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 10px;
}
.pd-overview-text {
  font-size: 0.88rem;
  color: rgba(255,255,255,0.7);
  line-height: 1.65;
  letter-spacing: -0.1px;
}
.pd-stats-row {
  display: flex;
  gap: 12px;
  margin-top: 8px;
}
.pd-stat-card {
  flex: 1;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 14px;
  padding: 14px;
  text-align: center;
}
.pd-stat-value {
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.5px;
}
.pd-stat-label {
  font-size: 0.69rem;
  color: rgba(255,255,255,0.35);
  margin-top: 2px;
}
.pd-section-divider {
  height: 1px;
  background: rgba(255,255,255,0.06);
  margin: 0;
}
.pd-learn-list {
  list-style: none;
  margin-top: 4px;
}
.pd-learn-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.pd-learn-item:last-child { border-bottom: none; }
.pd-learn-icon {
  width: 28px; height: 28px;
  border-radius: 8px;
  background: rgba(255,255,255,0.06);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}
.pd-learn-icon svg {
  width: 14px; height: 14px;
  stroke: rgba(255,255,255,0.5);
  fill: none;
  stroke-width: 1.8;
}
.pd-learn-text {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.6);
  line-height: 1.5;
}

/* ── Sessions Tab ── */
.pd-sess-list { padding: 6px 0 40px; }
.pd-sess-item {
  display: flex; align-items: center; gap: 14px;
  padding: 13px 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  cursor: pointer;
  transition: background 0.15s;
}
.pd-sess-item:last-child { border-bottom: none; }
.pd-sess-item:active { background: rgba(255,255,255,0.04); }

.pd-sess-num {
  width: 32px; height: 32px;
  border-radius: 10px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.82rem; font-weight: 600;
  color: rgba(255,255,255,0.35);
  flex-shrink: 0;
}
.pd-sess-num.done {
  background: rgba(255,255,255,0.12);
  border-color: rgba(255,255,255,0.18);
  color: #fff;
}
.pd-sess-num.active {
  background: rgba(255,255,255,0.18);
  border: 2px solid rgba(255,255,255,0.5);
  color: #fff;
}

.pd-sess-text { flex: 1; min-width: 0; }
.pd-sess-name {
  font-size: 0.88rem;
  font-weight: 500;
  color: #fff;
  margin-bottom: 2px;
  letter-spacing: -0.1px;
}
.pd-sess-name.muted { color: rgba(255,255,255,0.3); }
.pd-sess-meta { font-size: 0.75rem; color: rgba(255,255,255,0.3); }

.pd-sess-status { flex-shrink: 0; }
.pd-sess-status svg { width: 18px; height: 18px; stroke: rgba(255,255,255,0.2); fill: none; stroke-width: 1.8; }
.pd-sess-status.done svg { stroke: rgba(255,255,255,0.5); }

/* Tonight's session highlight */
.pd-sess-item.tonight {
  background: rgba(255,255,255,0.04);
  border-radius: 14px;
  margin: 4px -12px;
  padding: 13px 12px;
  border-bottom: none;
}

/* ── Science Tab ── */
.pd-science-section {
  padding: 20px 0 40px;
}
.pd-science-stat {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  background: rgba(124,158,135,0.06);
  border: 1px solid rgba(124,158,135,0.12);
  border-radius: 14px;
  margin-bottom: 16px;
}
.pd-science-stat-num {
  font-size: 1.75rem;
  font-weight: 700;
  color: rgba(124,158,135,0.9);
  letter-spacing: -1px;
  line-height: 1;
}
.pd-science-stat-text {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.5);
  line-height: 1.45;
}
.pd-science-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 16px;
  padding: 18px;
  margin-bottom: 12px;
}
.pd-science-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.pd-science-icon {
  width: 34px; height: 34px;
  border-radius: 10px;
  background: rgba(124,158,135,0.12);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.pd-science-icon svg {
  width: 16px; height: 16px;
  stroke: rgba(124,158,135,0.8);
  fill: none;
  stroke-width: 1.8;
}
.pd-science-card-title {
  font-size: 0.88rem;
  font-weight: 600;
  color: #fff;
  letter-spacing: -0.2px;
}
.pd-science-card-text {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.55);
  line-height: 1.6;
}
.pd-science-source {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.69rem;
  color: rgba(124,158,135,0.7);
  margin-top: 8px;
}
.pd-science-source svg {
  width: 12px; height: 12px;
  stroke: rgba(124,158,135,0.7);
  fill: none;
  stroke-width: 1.8;
}

/* Legacy - keep pd-desc for any remaining references */
.pd-desc { display: none; }

/* Session List */
.pd-sessions { display: flex; flex-direction: column; gap: 2px; }

.session-row {
  display: flex; flex-direction: column;
  padding: 12px 14px; border-radius: 14px;
  cursor: pointer; transition: background 0.15s;
  animation: fadeSlideUp 0.3s var(--ease) both;
}
.session-row:active { background: var(--surface-raised); }
.session-row.active { background: var(--accent-soft); }

.session-row-header {
  display: flex; align-items: center; gap: 12px;
}

.session-mindset {
  display: none;
  padding: 12px 0 0 40px;
  font-size: 0.82rem;
  color: var(--text-2);
  line-height: 1.6;
  margin-top: 8px;
}
.session-mindset.expanded {
  display: block;
}
.session-mindset-text {
  margin-bottom: 12px;
}
.session-play-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: var(--accent);
  color: white;
  border-radius: 10px;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}
.session-play-btn:hover {
  background: var(--accent-deep);
}

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

.session-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 600;
  flex-shrink: 0;
}
.session-thumb {
  width: 48px; height: 48px;
  border-radius: 10px; object-fit: cover; flex-shrink: 0;
  display: none; /* Hidden per PRD - same image repeated */
}
.session-info { flex: 1; min-width: 0; }
.session-name {
  font-size: 0.85rem; font-weight: 500;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.session-meta-text { font-size: 0.7rem; color: var(--text-3); margin-top: 2px; }
.session-status { flex-shrink: 0; color: var(--text-3); }
.session-status i { width: 20px; height: 20px; }
.session-status .done { color: var(--accent); }

/* Playing indicator */
.playing-bars {
  display: flex; align-items: flex-end; gap: 2px; height: 16px;
}
.playing-bars span {
  width: 3px; background: var(--accent); border-radius: 1px;
  animation: barPulse 1s ease-in-out infinite;
}
.playing-bars span:nth-child(1) { animation-delay: 0s; height: 60%; }
.playing-bars span:nth-child(2) { animation-delay: 0.2s; height: 100%; }
.playing-bars span:nth-child(3) { animation-delay: 0.4s; height: 40%; }

@keyframes barPulse {
  0%, 100% { transform: scaleY(0.4); }
  50% { transform: scaleY(1); }
}

/* ═══ FULL-SCREEN PLAYER ═══ */
.full-player {
  position: fixed; inset: 0;
  z-index: 200;
  transform: translateY(100%);
  transition: transform 0.35s var(--ease);
  overflow: hidden;
}
.full-player.open { transform: translateY(0); }

.fp-bg {
  position: absolute; 
  inset: 0;
  background-size: cover; 
  background-position: center;
  filter: none;
}
.fp-bg-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(
    180deg,
    rgba(14,14,16,0.65) 0%,
    rgba(14,14,16,0.2) 25%,
    rgba(14,14,16,0.15) 50%,
    rgba(14,14,16,0.75) 80%,
    rgba(14,14,16,0.97) 100%
  );
}

.fp-content {
  position: relative; z-index: 1;
  height: 100%;
  display: flex; flex-direction: column;
  padding: 16px 24px calc(var(--safe-bottom) + 24px);
  padding-top: calc(env(safe-area-inset-top, 12px) + 12px);
}

.fp-topbar {
  display: flex; align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.fp-dismiss {
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-2);
  transition: color 0.15s;
}
.fp-dismiss:active { color: white; }
.fp-dismiss i { width: 24px; height: 24px; }

.fp-topbar-right { display: flex; gap: 8px; }
.fp-topbar-chip {
  display: flex; align-items: center; gap: 6px;
  padding: 6px 12px;
  background: rgba(255,255,255,0.08);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 20px;
  font-size: 0.78rem; color: var(--text-2);
  transition: all 0.2s;
}
.fp-topbar-chip:active { background: rgba(255,255,255,0.15); }
.fp-chip-ico { width: 14px; height: 14px; }

.fp-center {
  flex: 1;
  display: flex; 
  flex-direction: column;
  align-items: center; 
  justify-content: flex-start;
  text-align: center;
  padding: 40px 32px 0;
}
.fp-program-tag {
  font-size: 0.72rem; 
  text-transform: none;
  letter-spacing: 0.4px; 
  color: var(--text-3);
  margin-bottom: 8px; 
  font-weight: 400;
  order: 3;
}
.fp-artwork-wrap {
  display: none; /* Hidden in new design */
}
.fp-artwork {
  display: none;
}
.fp-session-name {
  font-family: var(--font);
  font-size: 1.6rem; 
  font-weight: 300;
  font-style: italic;
  line-height: 1.5; 
  margin-bottom: 0;
  max-width: 90%;
  color: rgba(255,255,255,0.88);
  order: 1;
}
.fp-session-meta { 
  font-size: 0.78rem; 
  color: var(--text-3); 
  order: 2;
  margin-top: 12px;
  margin-bottom: 24px;
}

.fp-bottom-controls {
  flex-shrink: 0;
  padding-top: 16px;
}

/* Progress bar */
.fp-progress { margin-bottom: 20px; }
.fp-range {
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 5px;
  background: transparent; cursor: pointer;
  outline: none; border: none; margin: 0;
}
.fp-range::-webkit-slider-runnable-track {
  height: 5px; border-radius: 3px;
  background: linear-gradient(to right,
    var(--accent) 0%, var(--accent) var(--progress, 0%),
    rgba(255,255,255,0.12) var(--progress, 0%), rgba(255,255,255,0.12) 100%
  );
}
.fp-range::-moz-range-track { height: 5px; border-radius: 3px; background: rgba(255,255,255,0.12); border: none; }
.fp-range::-moz-range-progress { height: 5px; border-radius: 3px; background: var(--accent); }
.fp-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px; height: 16px; border-radius: 50%;
  background: white; box-shadow: 0 2px 8px rgba(0,0,0,0.4);
  margin-top: -5.5px; cursor: pointer;
}
.fp-range::-moz-range-thumb {
  width: 16px; height: 16px; border-radius: 50%;
  background: white; box-shadow: 0 2px 8px rgba(0,0,0,0.4);
  border: none; cursor: pointer;
}

.fp-times {
  display: flex; justify-content: space-between;
  margin-top: 8px;
  font-size: 0.72rem; color: var(--text-3);
  font-variant-numeric: tabular-nums;
}

/* Controls */
.fp-controls {
  display: flex; align-items: center;
  justify-content: center; gap: 20px;
}
.fp-ctrl {
  color: rgba(255,255,255,0.6);
  font-size: 18px; padding: 10px;
  transition: color 0.15s;
}
.fp-ctrl:active { color: white; }

.fp-ctrl-sm {
  position: relative;
  color: rgba(255,255,255,0.5);
  font-size: 16px; padding: 10px;
  transition: color 0.15s;
}
.fp-ctrl-sm:active { color: white; }
.fp-ctrl-sm span {
  position: absolute;
  font-size: 8px; font-weight: 700;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.fp-play-btn {
  width: 64px; height: 64px;
  background: white;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #080a13; 
  font-size: 22px;
  box-shadow: 0 4px 24px rgba(255,255,255,0.15);
  transition: transform 0.1s, background 0.15s;
}
.fp-play-btn:active { transform: scale(0.92); }
.fp-play-btn i { margin-left: 2px; }

.fp-complete-btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; margin-top: 16px;
  padding: 12px;
  background: var(--accent); color: white;
  border-radius: 14px;
  font-size: 0.88rem; font-weight: 600;
  transition: background 0.15s;
}
.fp-complete-btn:active { background: var(--accent-deep); }
.fp-complete-btn i { width: 18px; height: 18px; }

/* Player chips (voice + music) below controls */
.fp-player-chips {
  display: flex;
  gap: 8px;
  margin-top: 18px;
  justify-content: center;
}
.fp-player-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  background: rgba(255,255,255,0.08);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.15s;
  color: rgba(255,255,255,0.65);
  font-size: 0.75rem;
  font-weight: 500;
}
.fp-player-chip:hover, .fp-player-chip:active {
  background: rgba(255,255,255,0.14);
}
.fp-player-chip svg {
  flex-shrink: 0;
}
.fp-player-chip-label {
  white-space: nowrap;
}

/* ═══ MINI PLAYER ═══ */
.mini-player {
  position: fixed; left: 0; right: 0;
  bottom: calc(var(--nav-h) + var(--safe-bottom));
  height: var(--mini-h);
  background: rgba(26,26,31,0.9);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  z-index: 40;
  cursor: pointer;
  transition: transform 0.25s var(--ease);
}
.mini-progress {
  position: absolute; top: 0; left: 0; right: 0;
  height: 2px; background: rgba(255,255,255,0.06);
}
.mini-progress-fill {
  height: 100%; background: var(--accent);
  transition: width 0.3s linear;
  width: 0;
}
.mini-body {
  display: flex; align-items: center; gap: 12px;
  padding: 0 16px;
  height: 100%;
}
.mini-thumb { width: 44px; height: 44px; border-radius: 10px; object-fit: cover; flex-shrink: 0; }
.mini-info { flex: 1; min-width: 0; }
.mini-title {
  font-size: 0.85rem; font-weight: 500;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  display: block;
}
.mini-sub {
  font-size: 0.7rem; color: var(--text-3);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  display: block; margin-top: 1px;
}
.mini-play {
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  color: white; font-size: 16px;
  flex-shrink: 0;
}

/* ═══ PROFILE ═══ */
/* Profile View */
.profile-content { 
  text-align: left; 
  padding-top: 24px;
  padding-bottom: 32px;
}

/* Profile Header */
.profile-header {
  text-align: center;
  margin-bottom: 28px;
}

.profile-avatar-large {
  width: 88px; 
  height: 88px;
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: 50%;
  display: flex; 
  align-items: center; 
  justify-content: center;
  font-size: 2rem; 
  font-weight: 600;
  margin: 0 auto 16px;
  position: relative;
}

.profile-avatar-large::before {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  border: 2px solid var(--accent);
  opacity: 0.3;
}

.profile-name-display { 
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem; 
  font-weight: 600; 
  margin-bottom: 4px;
}

.profile-email-subdued { 
  font-size: 0.82rem; 
  color: var(--text-3); 
}

/* Stats Row */
.profile-stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 32px;
}

@media (max-width: 640px) {
  .profile-stats-row {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Profile Cards */
.profile-card {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 16px;
  overflow: hidden;
}

.profile-card-danger {
  border-color: rgba(239, 68, 68, 0.3);
}

.profile-card-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}

.profile-card-row:last-child {
  border-bottom: none;
}

.profile-card-row-clickable {
  cursor: pointer;
  transition: background 0.2s;
}

.profile-card-row-clickable:hover {
  background: rgba(255,255,255,0.04);
}

.profile-row-icon {
  width: 18px;
  height: 18px;
  color: var(--accent);
  flex-shrink: 0;
}

.profile-card-danger .profile-row-icon {
  color: rgba(239, 68, 68, 0.9);
}

.profile-row-label {
  font-size: 0.88rem;
  flex: 1;
}

.profile-row-value {
  font-size: 0.82rem;
  color: var(--text-3);
}

.profile-row-chevron {
  width: 16px;
  height: 16px;
  color: var(--text-3);
  flex-shrink: 0;
}

.profile-select {
  padding: 6px 12px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.1);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: 8px;
  color: var(--text-1);
  font-size: 0.82rem;
  outline: none;
  margin-left: auto;
  cursor: pointer;
}

.profile-select option { 
  background: var(--surface); 
}

.profile-app-version {
  font-size: 0.68rem;
  color: var(--text-3);
  text-align: center;
  margin-top: 8px;
  margin-bottom: 16px;
}

/* Legacy support - keep for old button if referenced in JS */
.btn-signout {
  width: 100%; 
  padding: 14px;
  background: transparent;
  border: 1px solid var(--border-light);
  border-radius: 12px;
  color: var(--danger);
  font-size: 0.88rem; font-weight: 500;
  transition: background 0.15s;
}
.btn-signout:active { background: rgba(239,68,68,0.08); }

/* ═══ BOTTOM SHEETS ═══ */
.sheet-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 300;
  opacity: 0; pointer-events: none;
  transition: opacity 0.25s;
}
.sheet-overlay.open { opacity: 1; pointer-events: auto; }

.bottom-sheet {
  position: fixed; bottom: 0; left: 0; right: 0;
  max-height: 70vh;
  background: rgba(26,26,31,0.95);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-radius: 20px 20px 0 0;
  box-shadow: 0 -8px 40px rgba(0,0,0,0.3);
  z-index: 310;
  padding: 8px 6px calc(var(--safe-bottom) + 20px);
  transform: translateY(100%);
  transition: transform 0.3s var(--ease);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  visibility: hidden;
}
.bottom-sheet.open { transform: translateY(0); visibility: visible; }

.sheet-handle {
  width: 40px; height: 4px;
  background: rgba(255,255,255,0.15);
  border-radius: 2px;
  margin: 4px auto 12px;
}
.sheet-title {
  font-size: 0.68rem; font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--text-3);
  padding: 4px 14px 10px;
}

/* Sheet Options */
.sheet-option {
  display: flex; align-items: center; gap: 12px;
  width: 100%; padding: 12px 14px;
  border-radius: 12px;
  transition: background 0.15s;
  text-align: left;
}
.sheet-option:active { background: var(--surface-raised); }
.sheet-option.selected { background: var(--accent-soft); }

.sheet-option-emoji {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--surface-raised);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; flex-shrink: 0;
}
.sheet-option.selected .sheet-option-emoji { background: var(--accent); }
.sheet-option-text { flex: 1; }
.sheet-option-name { font-size: 0.9rem; font-weight: 500; }
.sheet-option-desc { font-size: 0.72rem; color: var(--text-3); }
.sheet-option-check { color: var(--accent); font-size: 14px; opacity: 0; }
.sheet-option.selected .sheet-option-check { opacity: 1; }

/* Music Controls */
.music-controls { padding: 8px 8px 0; }
.music-toggle-row {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 8px;
}
.music-toggle-label { font-size: 0.88rem; font-weight: 500; }

.toggle-switch { position: relative; display: inline-block; width: 44px; height: 24px; flex-shrink: 0; }
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute; cursor: pointer; inset: 0;
  background: rgba(255,255,255,0.12);
  transition: 0.3s; border-radius: 24px;
}
.toggle-slider:before {
  position: absolute; content: ""; height: 18px; width: 18px;
  left: 3px; bottom: 3px; background: white;
  transition: 0.3s; border-radius: 50%;
}
.toggle-switch input:checked + .toggle-slider { background: var(--accent); }
.toggle-switch input:checked + .toggle-slider:before { transform: translateX(20px); }

.music-volume-row {
  padding: 14px 8px;
  border-top: 1px solid var(--border);
}
.music-vol-label { font-size: 0.82rem; color: var(--text-2); margin-bottom: 10px; display: block; }
.music-vol-slider {
  width: 100%; height: 4px; border-radius: 2px;
  background: rgba(255,255,255,0.12);
  outline: none; -webkit-appearance: none;
  cursor: pointer;
}
.music-vol-slider::-webkit-slider-thumb {
  -webkit-appearance: none; width: 18px; height: 18px;
  border-radius: 50%; background: var(--accent); cursor: pointer;
}
.music-vol-slider::-moz-range-thumb {
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--accent); border: none; cursor: pointer;
}

.music-tracks { padding: 14px 8px 0; border-top: 1px solid var(--border); }
.music-tracks-label {
  font-size: 0.68rem; font-weight: 600; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--text-3); margin-bottom: 8px;
}
.music-track {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 8px; border-radius: 10px;
  cursor: pointer; transition: background 0.15s;
}
.music-track:active { background: var(--surface-raised); }
.music-track.active { background: var(--accent-soft); }
.music-track-name { font-size: 0.85rem; font-weight: 500; flex: 1; }
.music-track-check { color: var(--accent); font-size: 14px; opacity: 0; }
.music-track.active .music-track-check { opacity: 1; }

/* Sessions sheet items */
.sheet-session {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; border-radius: 12px;
  cursor: pointer; transition: background 0.15s;
}
.sheet-session:active { background: var(--surface-raised); }
.sheet-session.active { background: var(--accent-soft); }
.sheet-session-thumb { width: 44px; height: 44px; border-radius: 10px; object-fit: cover; flex-shrink: 0; }
.sheet-session-info { flex: 1; min-width: 0; }
.sheet-session-name { font-size: 0.85rem; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sheet-session-meta { font-size: 0.7rem; color: var(--text-3); margin-top: 2px; }
.sheet-session-status { flex-shrink: 0; }
.sheet-session-status i { width: 18px; height: 18px; }

/* ═══ RESPONSIVE ═══ */
@media (min-width: 768px) {
  .view-content { padding: 32px 32px 48px; }
  .continue-card { 
    margin-top: 200px;
  }
  .home-hero {
    height: 280px;
  }
  .fp-session-name { font-size: 2rem; }
  .programs-grid { gap: 18px; }
  .prog-card-img-wrap { aspect-ratio: 4 / 3; }
  .fp-content { padding: 24px 40px calc(var(--safe-bottom) + 32px); }
}

/* ═══ DESKTOP LAYOUT (≥ 1024px) ═══ */

/* --- Desktop Sidebar --- */
.desktop-sidebar { display: none; }
.desktop-player { display: none; }

@media (min-width: 1024px) {
  /* Sidebar */
  .desktop-sidebar {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: fixed;
    left: 0; top: 0;
    width: 240px;
    height: 100vh;
    background: rgba(20,20,24,0.95);
    border-right: 1px solid var(--border);
    z-index: 55;
    padding: 0;
  }
  .sidebar-top { display: flex; flex-direction: column; }
  .sidebar-brand {
    padding: 28px 24px;
    display: flex; align-items: center;
  }
  .sidebar-logo { height: 32px; object-fit: contain; }
  .sidebar-divider {
    height: 1px;
    background: var(--border);
    margin: 0 16px 8px;
  }
  .sidebar-nav {
    display: flex; flex-direction: column;
    padding: 0 12px;
    gap: 2px;
  }
  .sidebar-nav-item {
    display: flex; align-items: center;
    gap: 12px;
    height: 44px;
    padding: 0 12px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    color: rgba(255,255,255,0.7);
    transition: background 0.15s, color 0.15s;
    cursor: pointer;
  }
  .sidebar-nav-item:hover {
    background: rgba(255,255,255,0.05);
  }
  .sidebar-nav-item.active {
    background: var(--accent-soft);
    color: var(--accent);
  }
  .sidebar-nav-item svg {
    flex-shrink: 0;
    opacity: 0.7;
    transition: opacity 0.15s;
  }
  .sidebar-nav-item.active svg {
    opacity: 1;
    color: var(--accent);
  }

  .sidebar-bottom {
    padding: 0 16px;
    border-top: 1px solid var(--border);
    height: 80px;
    display: flex;
    align-items: center;
  }
  .sidebar-user {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
  }
  .sidebar-avatar {
    width: 32px; height: 32px;
    border-radius: 50%;
    background: var(--accent);
    color: #0e0e10;
    display: flex; align-items: center; justify-content: center;
    font-size: 13px; font-weight: 600;
    flex-shrink: 0;
  }
  .sidebar-username {
    flex: 1;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-2);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
  }
  .sidebar-signout {
    flex-shrink: 0;
    width: 32px; height: 32px;
    display: flex; align-items: center; justify-content: center;
    color: var(--text-3);
    border-radius: 8px;
    transition: background 0.15s, color 0.15s;
    cursor: pointer;
  }
  .sidebar-signout:hover {
    background: rgba(255,255,255,0.06);
    color: var(--danger);
  }

  /* Hide bottom nav on desktop */
  .bottom-nav { display: none !important; }

  /* Hide mini player on desktop */
  .mini-player { display: none !important; }

  /* App shell: offset for sidebar */
  .app-shell {
    padding-left: 240px;
  }

  /* Tab views: adjust for sidebar + desktop player */
  .tab-view {
    left: 240px;
    bottom: 0;
  }
  .app-shell.has-mini .tab-view {
    bottom: 0;
  }
  .app-shell.has-desktop-player .tab-view {
    bottom: 80px;
  }

  /* View content - equal spacing both sides */
  .view-content {
    max-width: 100%;
    padding: 16px 48px 48px;
    margin: 0;
  }

  /* Hero on desktop */
  .home-hero {
    display: block;
    left: 240px;
    height: 220px;
  }

  /* Welcome row desktop - in the sky, compact */
  .home-welcome-row {
    padding-top: 40px;
    gap: 16px;
    margin-bottom: 8px;
  }
  .home-avatar {
    width: 48px; height: 48px;
    font-size: 1.1rem;
  }
  .home-greeting {
    font-size: 1.8rem;
  }

  /* Continue card */
  .continue-card {
    margin-top: 16px;
    margin-bottom: 16px;
  }

  /* Stats row - compact */
  .stats-row {
    margin-bottom: 20px;
  }

  /* Programs grid: 3 columns on desktop */
  .programs-grid { grid-template-columns: repeat(3, 1fr); gap: 18px; }
  .singles-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }

  /* ═══ Program Detail Desktop ═══ */
  .program-detail {
    left: 240px;
  }
  .pd-hero {
    height: 360px;
  }
  .pd-header-info {
    padding: 0 48px;
  }
  .pd-title {
    font-size: 2.2rem;
  }
  .pd-body {
    max-width: 100%;
    margin: 0;
  }
  .pd-tabs {
    padding: 20px 48px 0;
  }
  .pd-tab-panel {
    padding: 0 48px;
  }
  .pd-progress-wrap {
    max-width: 400px;
  }
  .pd-cta-btn {
    max-width: 400px;
  }
  .pd-sessions {
    max-width: 700px;
  }
  .pd-back {
    top: 24px;
    left: 24px;
  }

  /* Full player: offset from sidebar */
  .full-player {
    left: 240px;
  }

  /* Full player desktop layout - centered content */
  .fp-content {
    flex-direction: column;
    max-width: 700px;
    margin: 0 auto;
    width: 100%;
  }
  .fp-center {
    padding: 60px 40px 0;
  }
  .fp-session-name {
    font-size: 2.2rem;
    max-width: 85%;
  }
  .fp-bottom-controls {
    max-width: 600px;
    margin: 0 auto;
    width: 100%;
  }

  /* ═══ Desktop Player Bar ═══ */
  .desktop-player {
    display: none;
    position: fixed;
    bottom: 0;
    left: 240px;
    right: 0;
    height: 80px;
    background: rgba(26,26,31,0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid rgba(255,255,255,0.08);
    align-items: center;
    gap: 24px;
    padding: 0 24px;
    z-index: 45;
  }
  .desktop-player.visible {
    display: flex;
  }

  /* Desktop player info */
  .dp-info {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 240px;
    min-width: 0;
    flex-shrink: 0;
    cursor: pointer;
  }
  .dp-thumb {
    width: 48px; height: 48px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
  }
  .dp-text {
    min-width: 0;
    flex: 1;
  }
  .dp-title {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-1);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .dp-program {
    font-size: 11px;
    color: rgba(255,255,255,0.45);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 2px;
  }

  /* Desktop player center */
  .dp-center {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    max-width: 600px;
    min-width: 0;
  }
  .dp-controls {
    display: flex;
    align-items: center;
    gap: 14px;
  }
  .dp-ctrl-btn {
    width: 32px; height: 32px;
    display: flex; align-items: center; justify-content: center;
    color: rgba(255,255,255,0.6);
    font-size: 16px;
    border-radius: 50%;
    transition: color 0.15s;
    cursor: pointer;
    position: relative;
  }
  .dp-ctrl-btn i {
    font-size: 16px;
  }
  .dp-ctrl-btn:hover { color: white; }
  .dp-skip-btn { position: relative; }
  .dp-skip-btn i {
    font-size: 14px;
  }
  .dp-skip-label {
    font-size: 7px;
    font-weight: 700;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    line-height: 1;
  }
  .dp-play-btn {
    width: 36px; height: 36px;
    background: white;
    color: #080a13;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
    transition: transform 0.1s, background 0.15s;
    cursor: pointer;
  }
  .dp-play-btn:hover { background: rgba(255,255,255,0.9); }
  .dp-play-btn:active { transform: scale(0.93); }
  .dp-play-btn i { margin-left: 1px; }

  /* Desktop player progress */
  .dp-progress {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
  }
  .dp-time {
    font-size: 11px;
    color: rgba(255,255,255,0.4);
    font-variant-numeric: tabular-nums;
    min-width: 36px;
    text-align: center;
    flex-shrink: 0;
  }
  .dp-range {
    flex: 1;
    -webkit-appearance: none;
    appearance: none;
    height: 4px;
    border-radius: 2px;
    background: transparent;
    cursor: pointer;
    outline: none;
    border: none;
    margin: 0;
  }
  .dp-range::-webkit-slider-runnable-track {
    height: 4px;
    border-radius: 2px;
    background: linear-gradient(to right,
      var(--accent) 0%, var(--accent) var(--dp-progress, 0%),
      rgba(255,255,255,0.12) var(--dp-progress, 0%), rgba(255,255,255,0.12) 100%
    );
  }
  .dp-range::-moz-range-track {
    height: 4px; border-radius: 2px;
    background: rgba(255,255,255,0.12); border: none;
  }
  .dp-range::-moz-range-progress {
    height: 4px; border-radius: 2px;
    background: var(--accent);
  }
  .dp-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 12px; height: 12px;
    border-radius: 50%;
    background: var(--accent);
    margin-top: -4px;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.15s;
  }
  .dp-range:hover::-webkit-slider-thumb { opacity: 1; }
  .dp-range::-moz-range-thumb {
    width: 12px; height: 12px;
    border-radius: 50%;
    background: var(--accent);
    border: none;
    cursor: pointer;
  }

  /* Desktop player right */
  .dp-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
  }
  .dp-chip {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 20px;
    font-size: 12px;
    color: var(--text-2);
    cursor: pointer;
    transition: background 0.15s;
    white-space: nowrap;
  }
  .dp-chip:hover { background: rgba(255,255,255,0.14); }
  .dp-chip svg { flex-shrink: 0; }

  /* ═══ Desktop Bottom Sheets → Popovers ═══ */
  .sheet-overlay {
    background: rgba(0,0,0,0.3);
    left: 240px;
  }
  .bottom-sheet {
    position: fixed;
    bottom: auto;
    top: 50%;
    left: calc(240px + (100vw - 240px) / 2);
    right: auto;
    transform: translate(-50%, -50%) scale(0.95);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    max-height: 60vh;
    max-width: 400px;
    width: 90%;
    border-radius: 20px;
    box-shadow: 0 24px 80px rgba(0,0,0,0.5);
    border: 1px solid rgba(255,255,255,0.1);
    padding: 12px 8px 20px;
    transition: transform 0.25s var(--ease), opacity 0.25s var(--ease), visibility 0s 0.25s;
  }
  .bottom-sheet.open {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transition: transform 0.25s var(--ease), opacity 0.25s var(--ease), visibility 0s 0s;
  }
  .sheet-handle {
    display: none;
  }
}

/* ==== ACCESS CONTROL: LOCKED STATE STYLES ==== */
.session-row.locked {
  opacity: 0.6;
  cursor: pointer;
}

.session-row.locked:hover {
  opacity: 0.8;
}

.locked-icon {
  color: var(--text-muted);
  width: 20px;
  height: 20px;
}

.sheet-session.locked {
  opacity: 0.6;
}

.sheet-session.locked:hover {
  opacity: 0.8;
}

/* ==== UPGRADE MODAL ==== */
.upgrade-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  animation: fadeIn 0.2s var(--ease);
}

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

.upgrade-modal {
  background: var(--bg-glass);
  border: 1px solid var(--border);
  border-radius: 20px;
  max-width: 440px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6);
  animation: slideUp 0.3s var(--ease);
}

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

.upgrade-modal-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 24px 24px 16px;
  border-bottom: 1px solid var(--border);
  position: relative;
}

.upgrade-modal-header h3 {
  font-size: 22px;
  font-weight: 600;
  flex: 1;
  color: var(--text);
}

.upgrade-close-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
}

.upgrade-close-btn:hover {
  background: var(--bg-hover);
  color: var(--text);
}

.upgrade-close-btn i {
  width: 20px;
  height: 20px;
}

.upgrade-modal-body {
  padding: 24px;
}

.upgrade-modal-body p {
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.upgrade-modal-body strong {
  color: var(--text);
  font-weight: 600;
}

.upgrade-sessions-preview {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.upgrade-session-item {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  color: var(--text-muted);
}

.upgrade-lock-small {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  color: var(--text-muted);
}

.upgrade-more {
  font-size: 14px;
  color: var(--text-muted);
  font-style: italic;
  padding-left: 28px;
}

.upgrade-modal-footer {
  padding: 16px 24px 24px;
  border-top: 1px solid var(--border);
}

.upgrade-btn {
  width: 100%;
  background: var(--accent);
  color: white;
  border: none;
  border-radius: 12px;
  padding: 16px 24px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background 0.2s var(--ease), opacity 0.2s var(--ease);
}

.upgrade-btn:hover {
  background: var(--accent-deep);
  color: #fff;
}

.upgrade-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.upgrade-btn i {
  width: 20px;
  height: 20px;
}

/* Plan Toggle */
.plan-toggle {
  display: flex;
  gap: 10px;
  margin: 16px 0 8px;
}
.plan-option {
  flex: 1;
  background: var(--surface);
  border: 1.5px solid var(--border-light);
  border-radius: 12px;
  padding: 14px 12px;
  cursor: pointer;
  text-align: center;
  transition: all 0.2s;
  position: relative;
  color: var(--text-2);
}
.plan-option.active {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--text-1);
}
.plan-option:hover:not(.active) {
  border-color: var(--text-3);
}
.plan-name {
  display: block;
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 4px;
}
.plan-price {
  display: block;
  font-size: 13px;
  opacity: 0.7;
}
.plan-badge {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 20px;
  margin-top: 6px;
  letter-spacing: 0.3px;
}

/* Subscription status in profile */
.sub-active {
  color: var(--accent) !important;
  font-weight: 600;
}

/* Toast notification */
.toast-notification {
  position: fixed;
  bottom: 100px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--surface-raised);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  color: var(--text-1);
  padding: 12px 24px;
  border-radius: 12px;
  font-size: 14px;
  z-index: 10000;
  opacity: 0;
  transition: all 0.3s ease;
  pointer-events: none;
  text-align: center;
  max-width: 90vw;
}
.toast-notification.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ═══ PLAN TOGGLE ═══ */
.plan-toggle {
  display: flex;
  gap: 12px;
  margin-top: 24px;
}

.plan-option {
  flex: 1;
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  cursor: pointer;
  transition: all 0.2s var(--ease);
  display: flex;
  flex-direction: column;
  gap: 6px;
  position: relative;
}

.plan-option:hover {
  border-color: var(--accent);
  background: rgba(var(--accent-rgb), 0.05);
}

.plan-option.active {
  border-color: var(--accent);
  background: rgba(var(--accent-rgb), 0.1);
}

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

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

.plan-badge {
  position: absolute;
  top: -8px;
  right: 12px;
  background: var(--accent);
  color: white;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 12px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

/* ═══ TOAST NOTIFICATION ═══ */
.toast-notification {
  position: fixed;
  bottom: 100px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--surface);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 24px;
  color: var(--text);
  font-size: 15px;
  font-weight: 500;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  z-index: 10000;
  opacity: 0;
  transition: all 0.3s var(--ease);
  max-width: 90vw;
  text-align: center;
}

.toast-notification.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ═══ SUBSCRIPTION STATES ═══ */
.sub-active {
  color: var(--accent);
  font-weight: 600;
}

.profile-row-chevron {
  width: 18px;
  height: 18px;
  color: var(--text-muted);
  margin-left: auto;
}
