/* VISION TV — POLISH v4: Dynamic Island · Back btns · Apple-grade */

:root {
  --p-ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --p-ease-out: cubic-bezier(0.32, 0.72, 0, 1);
  --p-ease-bounce: cubic-bezier(0.5, 1.5, 0.5, 1);
  --p-d-fast: 180ms; --p-d-base: 280ms; --p-d-slow: 420ms;
  --p-sh-1: 0 1px 2px rgba(0,0,0,0.10), 0 2px 6px rgba(0,0,0,0.08);
  --p-sh-2: 0 2px 8px rgba(0,0,0,0.14), 0 8px 24px rgba(0,0,0,0.10);
  --p-sh-3: 0 6px 18px rgba(0,0,0,0.18), 0 20px 56px rgba(0,0,0,0.14);
  --p-sh-4: 0 12px 32px rgba(0,0,0,0.22), 0 40px 96px rgba(0,0,0,0.20);
  --p-sh-gold: 0 4px 16px rgba(212,175,55,0.42), 0 14px 36px rgba(212,175,55,0.26);
  --p-sh-glow: 0 0 32px rgba(212,175,55,0.45);
  --p-sh-island: 0 8px 32px rgba(0,0,0,0.45), 0 16px 48px rgba(0,0,0,0.30), inset 0 1px 0 rgba(255,255,255,0.08);
}

body { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility; letter-spacing: -0.005em; }
h1,h2,h3,h4,.home-section-title { letter-spacing: -0.018em !important; font-weight: 700 !important; }

/* ============================================
   ANIMATED BACKGROUND ORBS
   ============================================ */
body::before {
  content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(circle 700px at 10% 0%, rgba(212,175,55,0.07), transparent 50%),
    radial-gradient(circle 600px at 90% 50%, rgba(99,102,241,0.06), transparent 50%),
    radial-gradient(circle 500px at 50% 100%, rgba(255,127,0,0.05), transparent 50%);
  animation: bgOrbs 24s ease-in-out infinite;
}
[data-theme="light"] body::before {
  background:
    radial-gradient(circle 700px at 10% 0%, rgba(212,175,55,0.10), transparent 50%),
    radial-gradient(circle 600px at 90% 50%, rgba(99,102,241,0.08), transparent 50%),
    radial-gradient(circle 500px at 50% 100%, rgba(255,127,0,0.06), transparent 50%);
}
@keyframes bgOrbs {
  0%, 100% { transform: scale(1) rotate(0); opacity: 1; }
  33%      { transform: scale(1.1) rotate(120deg); opacity: 0.85; }
  66%      { transform: scale(1.05) rotate(240deg); opacity: 0.95; }
}

/* ============================================
   LIGHT MODE polish (comprehensive)
   ============================================ */
[data-theme="light"] body { background: linear-gradient(180deg, #FAF8F4 0%, #F5F2EC 100%) !important; color: #1A1A1A; }
[data-theme="light"] .header { background: rgba(255,253,247,0.78) !important; border-bottom-color: rgba(0,0,0,0.06) !important; backdrop-filter: saturate(200%) blur(24px); -webkit-backdrop-filter: saturate(200%) blur(24px); }
[data-theme="light"] .bottom-nav { background: rgba(255,253,247,0.85) !important; border-top-color: rgba(0,0,0,0.06) !important; backdrop-filter: saturate(200%) blur(24px); -webkit-backdrop-filter: saturate(200%) blur(24px); }
[data-theme="light"] .section-card, [data-theme="light"] .card, [data-theme="light"] .video-card, [data-theme="light"] .hscroll-item {
  background: #FFFFFF !important;
  border: 1px solid rgba(0,0,0,0.05) !important;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04), 0 4px 16px rgba(0,0,0,0.06) !important;
}
[data-theme="light"] .section-card:hover, [data-theme="light"] .card:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.08), 0 16px 48px rgba(0,0,0,0.10) !important;
}
[data-theme="light"] .qa-tile, [data-theme="light"] .quick-action { background: #FFFFFF !important; border: 1px solid rgba(0,0,0,0.05) !important; }
[data-theme="light"] .home-section-title { color: #0A0A0A !important; }
[data-theme="light"] .card-title { color: #1A1A1A !important; }
[data-theme="light"] .text-muted, [data-theme="light"] .text-secondary { color: #666 !important; }
[data-theme="light"] .input, [data-theme="light"] input.input, [data-theme="light"] input[type="text"], [data-theme="light"] input[type="tel"], [data-theme="light"] input[type="email"], [data-theme="light"] select.input, [data-theme="light"] textarea.input, [data-theme="light"] .af-input {
  background: #FFFFFF !important; border: 1.5px solid rgba(0,0,0,0.10) !important; color: #1A1A1A !important;
}
[data-theme="light"] .input:focus, [data-theme="light"] input:focus, [data-theme="light"] select:focus, [data-theme="light"] textarea:focus {
  border-color: #B8860B !important; box-shadow: 0 0 0 4px rgba(184,134,11,0.15), 0 4px 16px rgba(0,0,0,0.06) !important;
}
[data-theme="light"] .search-bar { background: #FFFFFF !important; border: 1px solid rgba(0,0,0,0.06) !important; box-shadow: 0 1px 4px rgba(0,0,0,0.04); }
[data-theme="light"] .header-btn { background: #FFFFFF !important; border: 1px solid rgba(0,0,0,0.05) !important; box-shadow: 0 1px 3px rgba(0,0,0,0.04); color: #1A1A1A; }
[data-theme="light"] .modal { background: #FFFFFF !important; }
[data-theme="light"] .toast { background: #FFFFFF !important; color: #1A1A1A !important; box-shadow: var(--p-sh-3); }
[data-theme="light"] #authScreen { background: linear-gradient(180deg, #FAF8F4 0%, #F0EBE2 100%) !important; }
[data-theme="light"] .auth-card, [data-theme="light"] .auth-tabs { background: #FFFFFF !important; border: 1px solid rgba(0,0,0,0.06) !important; box-shadow: 0 4px 24px rgba(0,0,0,0.06); }
[data-theme="light"] .live-banner { background: linear-gradient(135deg, rgba(255,68,68,0.08), rgba(255,68,68,0.02)) !important; border: 1.5px solid rgba(255,68,68,0.25) !important; }
[data-theme="light"] .daily-action-card { background: linear-gradient(135deg, #FFF6E0 0%, #FFFAE8 50%, #F5E8C0 100%) !important; color: #1A1A1A !important; border: 1px solid rgba(212,175,55,0.25) !important; }
[data-theme="light"] .daily-action-card * { color: #1A1A1A !important; }
[data-theme="light"] .daily-action-card [style*="color:var(--gold)"] { color: #B8860B !important; }
[data-theme="light"] .tm-card { background: #FFFFFF !important; border-color: rgba(0,0,0,0.05) !important; }
[data-theme="light"] .tm-quote, [data-theme="light"] .tm-name { color: #1A1A1A !important; }
[data-theme="light"] .tm-place { color: #666 !important; }

/* ============================================
   DYNAMIC ISLAND — floating section nav (Apple-style)
   ============================================ */
#sectionJumper {
  position: sticky;
  top: 70px;
  z-index: 60;
  margin: 16px auto;
  padding: 0;
  width: fit-content;
  max-width: calc(100% - 32px);
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: saturate(200%) blur(28px);
  -webkit-backdrop-filter: saturate(200%) blur(28px);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 28px;
  box-shadow: var(--p-sh-island);
  transition: transform 320ms var(--p-ease-spring), padding 280ms var(--p-ease-out), max-width 280ms var(--p-ease-out), border-radius 280ms var(--p-ease-out);
  animation: islandIn 600ms var(--p-ease-spring);
  left: 50%;
  transform: translateX(-50%);
}
[data-theme="light"] #sectionJumper {
  background: rgba(20, 20, 20, 0.86) !important;
  border-color: rgba(255,255,255,0.06) !important;
  box-shadow: 0 8px 32px rgba(0,0,0,0.18), 0 16px 48px rgba(0,0,0,0.12) !important;
}
@keyframes islandIn {
  from { opacity: 0; transform: translateX(-50%) translateY(-12px) scale(0.94); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
}
.sj-row {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  padding: 8px;
  scroll-behavior: smooth;
}
.sj-row::-webkit-scrollbar { display: none; }
.sj-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  padding: 8px 14px;
  border-radius: 999px;
  background: transparent;
  border: 0;
  color: rgba(255,255,255,0.85);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 220ms var(--p-ease-spring), background 200ms ease, box-shadow 220ms ease, color 200ms ease;
  -webkit-tap-highlight-color: transparent;
}
.sj-chip:active { transform: scale(0.92); }
.sj-chip:hover { background: rgba(255,255,255,0.10); color: #fff; }
.sj-chip.current {
  background: linear-gradient(135deg, #F7D060 0%, #D4AF37 100%);
  color: #1A1A1A;
  box-shadow: 0 4px 12px rgba(212,175,55,0.45);
  animation: chipGlow 2s ease-in-out infinite;
}
@keyframes chipGlow {
  0%, 100% { box-shadow: 0 4px 12px rgba(212,175,55,0.45); }
  50%      { box-shadow: 0 4px 12px rgba(212,175,55,0.45), 0 0 24px rgba(212,175,55,0.5); }
}
.sj-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: 0.85; flex-shrink: 0; }

.section-highlighted {
  animation: sectionFlash 2.4s ease-out;
  border-radius: 16px;
}
@keyframes sectionFlash {
  0%   { box-shadow: 0 0 0 0 rgba(212,175,55,0); transform: scale(1); }
  10%  { box-shadow: 0 0 0 12px rgba(212,175,55,0.45), 0 0 80px rgba(212,175,55,0.5); transform: scale(1.01); }
  50%  { box-shadow: 0 0 0 8px rgba(212,175,55,0.25), 0 0 56px rgba(212,175,55,0.3); transform: scale(1); }
  100% { box-shadow: 0 0 0 0 rgba(212,175,55,0); transform: scale(1); }
}
.home-section-title.section-pop {
  animation: titlePop 800ms var(--p-ease-bounce);
}
@keyframes titlePop {
  0%   { transform: scale(1); color: var(--text-primary); }
  30%  { transform: scale(1.10); color: #D4AF37; text-shadow: 0 0 28px rgba(212,175,55,0.7); }
  100% { transform: scale(1); color: var(--text-primary); text-shadow: none; }
}

/* ============================================
   UNIVERSAL BACK BUTTON (floating, top-left of every sub-page)
   ============================================ */
#universalBack {
  position: fixed;
  top: 70px;
  left: 14px;
  z-index: 70;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: rgba(0,0,0,0.70);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.10);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0,0,0,0.30), 0 8px 24px rgba(0,0,0,0.20);
  transition: transform 180ms var(--p-ease-spring), background 200ms;
}
[data-theme="light"] #universalBack {
  background: rgba(20,20,20,0.86) !important;
  color: #fff;
}
#universalBack:active { transform: scale(0.88); }
#universalBack:hover { background: rgba(0,0,0,0.85); transform: translateY(-2px); }
#universalBack svg { width: 22px; height: 22px; stroke-width: 2.4; }

/* ============================================
   PAGE TRANSITIONS
   ============================================ */
.page { animation: pageEnter var(--p-d-base) var(--p-ease-out); will-change: transform, opacity; min-height: 60vh; }
@keyframes pageEnter {
  from { opacity: 0; transform: translateY(20px) scale(0.985); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* CARDS */
.card, .section-card, .hscroll-item, .video-card, .daily-action-card, .live-banner, .qa-tile, .quick-action {
  box-shadow: var(--p-sh-2) !important;
  transition: transform var(--p-d-fast) var(--p-ease-out), box-shadow var(--p-d-fast) var(--p-ease-out), background var(--p-d-fast) ease !important;
  will-change: transform; transform: translateZ(0);
}
.card:active, .section-card:active, .hscroll-item:active, .video-card:active, .qa-tile:active, .quick-action:active {
  transform: scale(0.96) !important; box-shadow: var(--p-sh-1) !important;
}
@media (hover: hover) and (pointer: fine) {
  .card:hover, .section-card:hover, .hscroll-item:hover, .video-card:hover, .qa-tile:hover, .quick-action:hover {
    transform: translateY(-5px) !important; box-shadow: var(--p-sh-3) !important;
  }
  .section-card:hover .card-icon { transform: scale(1.14) rotate(-5deg); }
}
.card-icon { transition: transform 320ms var(--p-ease-spring); }

/* BUTTONS */
button, .btn, [role="button"] {
  transition: transform var(--p-d-fast) var(--p-ease-spring), box-shadow var(--p-d-fast) var(--p-ease-out), background var(--p-d-fast) ease !important;
  will-change: transform;
}
button:active, .btn:active, [role="button"]:active { transform: scale(0.94) !important; }
@media (hover: hover) { button:hover, .btn:hover { transform: translateY(-2px); } }
.btn-gold, .btn.btn-gold {
  background: linear-gradient(135deg, #F7D060 0%, #D4AF37 50%, #B8860B 100%) !important;
  background-size: 200% 200% !important; box-shadow: var(--p-sh-gold) !important;
  animation: goldShimmer 4s ease-in-out infinite; color: #1A1A1A !important;
}
@keyframes goldShimmer { 0%,100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }
.btn-gold:hover { box-shadow: var(--p-sh-gold), var(--p-sh-glow) !important; }

/* GLASS HEADER + NAV */
.header { backdrop-filter: saturate(200%) blur(24px) !important; -webkit-backdrop-filter: saturate(200%) blur(24px) !important; }
.bottom-nav { backdrop-filter: saturate(200%) blur(24px) !important; -webkit-backdrop-filter: saturate(200%) blur(24px) !important; }
.bottom-nav .nav-item { transition: transform var(--p-d-fast) var(--p-ease-spring) !important; }
.bottom-nav .nav-item:active { transform: scale(0.85) !important; }
.bottom-nav .nav-item.active svg { animation: navPop var(--p-d-base) var(--p-ease-bounce); }
@keyframes navPop { 0% { transform: scale(1); } 50% { transform: scale(1.3); } 100% { transform: scale(1.15); } }

/* Hide Ctrl+K hint */
.cmd-k-hint, .kbd-hint, .search-shortcut-hint, [class*="cmd-k"], [class*="kbd"]:not(input):not(button), .shortcut-tag { display: none !important; }

/* HERO */
.daily-action-card { position: relative; overflow: hidden; background-size: 200% 200% !important; animation: heroGradient 14s ease infinite; }
@keyframes heroGradient { 0%,100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }
.daily-action-card::before {
  content: ''; position: absolute; top: -100%; left: -100%; width: 200%; height: 200%;
  background: linear-gradient(135deg, transparent 30%, rgba(255,255,255,0.10) 45%, rgba(255,255,255,0.20) 50%, rgba(255,255,255,0.10) 55%, transparent 70%);
  animation: shimmerSweep 9s linear infinite; pointer-events: none;
}
@keyframes shimmerSweep { from { transform: translate(-100%, -100%); } to { transform: translate(100%, 100%); } }

.live-banner { border: 1.5px solid rgba(255,68,68,0.35) !important; box-shadow: 0 0 0 0 rgba(255,68,68,0.5), var(--p-sh-2) !important; animation: livePulse 2s ease-in-out infinite; }
@keyframes livePulse { 0%,100% { box-shadow: 0 0 0 0 rgba(255,68,68,0.5), var(--p-sh-2); } 50% { box-shadow: 0 0 0 10px rgba(255,68,68,0), var(--p-sh-3); } }
.live-dot { animation: heartbeat 1.4s ease-in-out infinite !important; }
@keyframes heartbeat { 0%,100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.35); opacity: 0.7; } }

.qa-icon, .quick-action .card-icon { transition: transform var(--p-d-base) var(--p-ease-spring); }
.qa-tile:active .qa-icon, .quick-action:active .card-icon { animation: iconBounce 520ms var(--p-ease-bounce); }
@keyframes iconBounce { 0% { transform: scale(0.85) rotate(-8deg); } 50% { transform: scale(1.22) rotate(8deg); } 100% { transform: scale(1) rotate(0); } }

/* FLOATS */
.sos-fab, #aiFloat {
  box-shadow: 0 8px 24px rgba(0,0,0,0.22), 0 20px 56px rgba(0,0,0,0.26), inset 0 1px 0 rgba(255,255,255,0.18) !important;
  transition: transform var(--p-d-fast) var(--p-ease-spring), box-shadow var(--p-d-fast) ease !important;
}
.sos-fab { animation: sosFloat 2.6s ease-in-out infinite; }
@keyframes sosFloat { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
#aiFloat { animation: aiFloat 3.4s ease-in-out infinite; }
@keyframes aiFloat { 0%,100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-3px) rotate(2deg); } }
.sos-fab:active, #aiFloat:active { transform: scale(0.92) !important; animation: none !important; }

.avatar { transition: transform var(--p-d-fast) var(--p-ease-spring); box-shadow: var(--p-sh-1); }
@media (hover: hover) { .avatar:hover { transform: scale(1.08); box-shadow: var(--p-sh-2); } }

.toast { animation: toastIn 460ms var(--p-ease-spring) !important; backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }
@keyframes toastIn { from { opacity: 0; transform: translateY(32px) scale(0.92); } to { opacity: 1; transform: translateY(0) scale(1); } }
.modal { animation: modalIn 480ms var(--p-ease-spring) !important; }
@keyframes modalIn { from { opacity: 0; transform: translateY(60px); } to { opacity: 1; transform: translateY(0); } }

.scroll-reveal { opacity: 0; transform: translateY(28px); transition: opacity var(--p-d-slow) var(--p-ease-out), transform var(--p-d-slow) var(--p-ease-out); }
.scroll-reveal.revealed { opacity: 1; transform: translateY(0); }
.animate-cards > * { opacity: 0; animation: cardStagger 600ms var(--p-ease-out) forwards; }
.animate-cards > *:nth-child(1) { animation-delay: 0ms; } .animate-cards > *:nth-child(2) { animation-delay: 60ms; }
.animate-cards > *:nth-child(3) { animation-delay: 120ms; } .animate-cards > *:nth-child(4) { animation-delay: 180ms; }
.animate-cards > *:nth-child(5) { animation-delay: 240ms; } .animate-cards > *:nth-child(6) { animation-delay: 300ms; }
.animate-cards > *:nth-child(7) { animation-delay: 360ms; } .animate-cards > *:nth-child(8) { animation-delay: 420ms; }
@keyframes cardStagger { from { opacity: 0; transform: translateY(28px) scale(0.92) rotateX(10deg); } to { opacity: 1; transform: translateY(0) scale(1) rotateX(0); } }
.home-section-title.in-view { animation: titleSlide 700ms var(--p-ease-out); }
@keyframes titleSlide { from { opacity: 0; transform: translateX(-20px); } to { opacity: 1; transform: translateX(0); } }

.mf-pill, .tab, .filter-chip { transition: all var(--p-d-fast) var(--p-ease-spring) !important; }
.mf-pill:active, .tab:active, .filter-chip:active { transform: scale(0.92) !important; }
.mf-pill.active, .tab.active, .filter-chip.active { box-shadow: 0 4px 16px rgba(212,175,55,0.36) !important; animation: chipPop 460ms var(--p-ease-bounce); }
@keyframes chipPop { 0% { transform: scale(1); } 50% { transform: scale(1.12); } 100% { transform: scale(1); } }

.ripple { position: relative; overflow: hidden; }
.ripple::after { content: ''; position: absolute; top: 50%; left: 50%; width: 0; height: 0; border-radius: 50%; background: rgba(212,175,55,0.30); transform: translate(-50%, -50%); transition: width 700ms var(--p-ease-out), height 700ms var(--p-ease-out), opacity 900ms ease; opacity: 0; pointer-events: none; }
.ripple:active::after { width: 240%; height: 240%; opacity: 1; transition: 0s; }

.badge, .notif-badge { animation: badgePulse 2s ease-in-out infinite; }
@keyframes badgePulse { 0%,100% { box-shadow: 0 0 0 0 rgba(255,59,71,0.6); } 50% { box-shadow: 0 0 0 8px rgba(255,59,71,0); } }

.hscroll-row { mask-image: linear-gradient(to right, transparent 0, black 16px, black calc(100% - 16px), transparent 100%); -webkit-mask-image: linear-gradient(to right, transparent 0, black 16px, black calc(100% - 16px), transparent 100%); }

.video-card .v-thumb, .hscroll-item .v-thumb, .video-card img, .hscroll-item img { transition: transform 700ms var(--p-ease-out); }
@media (hover: hover) { .video-card:hover .v-thumb, .hscroll-item:hover .v-thumb, .video-card:hover img, .hscroll-item:hover img { transform: scale(1.08); } }

#authScreen { position: relative; overflow: hidden; }
#authScreen::before {
  content: ''; position: absolute; inset: -50%;
  background: radial-gradient(circle at 20% 20%, rgba(212,175,55,0.14), transparent 40%), radial-gradient(circle at 80% 80%, rgba(99,102,241,0.10), transparent 40%);
  animation: bgBreathe 14s ease-in-out infinite; z-index: 0; pointer-events: none;
}
@keyframes bgBreathe { 0%,100% { transform: scale(1) rotate(0); } 33% { transform: scale(1.15) rotate(120deg); } 66% { transform: scale(1.05) rotate(240deg); } }
#authScreen > * { position: relative; z-index: 1; }

/* ============================================
   TESTIMONIALS — INFINITE MARQUEE
   ============================================ */
#testimonialsSection { margin: 40px 0 32px; overflow: hidden; }
.tm-marquee-wrap {
  position: relative; margin: 0 -16px; padding: 8px 0 16px; overflow: hidden;
  mask-image: linear-gradient(to right, transparent 0, black 64px, black calc(100% - 64px), transparent 100%);
  -webkit-mask-image: linear-gradient(to right, transparent 0, black 64px, black calc(100% - 64px), transparent 100%);
}
.tm-marquee { display: flex; gap: 16px; width: max-content; animation: tmMarquee 50s linear infinite; will-change: transform; }
.tm-marquee-wrap:hover .tm-marquee { animation-play-state: paused; }
@keyframes tmMarquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

.tm-card {
  flex: 0 0 auto; width: 320px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 22px; padding: 22px 22px 20px;
  box-shadow: var(--p-sh-2); position: relative; overflow: hidden;
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
}
[data-theme="light"] .tm-card { background: #FFFFFF !important; border-color: rgba(0,0,0,0.05) !important; }
.tm-card::before { content: '"'; position: absolute; top: -22px; right: 14px; font-family: 'Sora', 'Inter', serif; font-size: 140px; font-weight: 800; color: rgba(212,175,55,0.12); line-height: 1; pointer-events: none; }
.tm-stars { display: flex; gap: 2px; margin-bottom: 12px; }
.tm-star { font-size: 16px; color: #FFC700; text-shadow: 0 1px 2px rgba(255,199,0,0.4); }
.tm-quote { font-size: 14.5px; line-height: 22px; color: var(--text-primary); margin-bottom: 16px; font-weight: 500; letter-spacing: -0.01em; }
.tm-meta { display: flex; align-items: center; gap: 12px; padding-top: 14px; border-top: 1px solid rgba(255,255,255,0.06); }
[data-theme="light"] .tm-meta { border-top-color: rgba(0,0,0,0.06); }
.tm-avatar-wrap { position: relative; flex-shrink: 0; }
.tm-avatar { width: 44px; height: 44px; border-radius: 50%; background-size: cover; background-position: center; background-color: var(--bg-elevated); position: relative; overflow: hidden; }
.tm-avatar-wrap::before { content: ''; position: absolute; inset: -3px; border-radius: 50%; background: linear-gradient(135deg, #F7D060, #D4AF37, #B8860B); z-index: -1; }
.tm-avatar-fallback { display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 15px; color: #fff; width: 100%; height: 100%; border-radius: 50%; }
.tm-name { font-size: 14px; font-weight: 700; color: var(--text-primary); letter-spacing: -0.01em; }
.tm-place { font-size: 12px; color: var(--text-secondary); font-weight: 500; }
.tm-verified { display: inline-flex; align-items: center; gap: 3px; font-size: 10px; color: #22C55E; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; margin-top: 1px; }
.tm-verified::before { content: '✓'; font-size: 11px; }

/* ============================================
   SCROLL PROGRESS
   ============================================ */
#scrollProgress { position: fixed; top: 0; left: 0; height: 3px; background: linear-gradient(90deg, #F7D060, #D4AF37, #B8860B); box-shadow: 0 0 14px rgba(212,175,55,0.7); z-index: 1000; transform-origin: left; transform: scaleX(0); transition: transform 100ms ease; pointer-events: none; width: 100%; }

/* ============================================
   ADMIN DASHBOARD polish
   ============================================ */
.admin-stat-card {
  background: linear-gradient(135deg, var(--bg-card), var(--bg-elevated));
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 18px;
  padding: 20px;
  box-shadow: var(--p-sh-2);
  transition: transform 200ms var(--p-ease-out), box-shadow 200ms;
}
.admin-stat-card:hover { transform: translateY(-3px); box-shadow: var(--p-sh-3); }
.admin-stat-num { font-family: 'Sora','Inter',sans-serif; font-size: 36px; font-weight: 800; line-height: 1; background: linear-gradient(135deg, #F7D060, #D4AF37); -webkit-background-clip: text; background-clip: text; color: transparent; }
.admin-stat-label { font-size: 12px; font-weight: 600; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.05em; margin-top: 6px; }

/* ============================================
   Reduce motion + Focus rings
   ============================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  .tm-marquee { animation: none !important; }
}
button:focus-visible, a:focus-visible, [role="button"]:focus-visible, input:focus-visible, select:focus-visible {
  outline: 3px solid var(--gold, #D4AF37); outline-offset: 3px;
}
html { scroll-behavior: smooth; }
body { overscroll-behavior-y: contain; }

/* Reading plan flicker fix: prevent layout shift during render */
#page-readingplan, #page-fasting, #page-gifts, #page-worship, #page-audiobible { min-height: 80vh; }

/* Spiritual Gifts polish */
#page-gifts .gift-question {
  background: linear-gradient(135deg, var(--bg-card), var(--bg-elevated));
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 20px;
  padding: 24px;
  box-shadow: var(--p-sh-2);
  margin-bottom: 16px;
}
[data-theme="light"] #page-gifts .gift-question {
  background: #FFFFFF !important;
  border-color: rgba(0,0,0,0.06) !important;
}
#page-gifts .gift-options {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
  margin-top: 16px;
}
#page-gifts .gift-option {
  background: var(--bg-elevated);
  border: 1.5px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  padding: 16px 8px;
  text-align: center;
  cursor: pointer;
  transition: all 200ms var(--p-ease-spring);
}
[data-theme="light"] #page-gifts .gift-option {
  background: #F8F8F4 !important;
  border-color: rgba(0,0,0,0.08) !important;
}
#page-gifts .gift-option:hover {
  background: rgba(212,175,55,0.10);
  border-color: var(--gold);
  transform: translateY(-3px);
  box-shadow: var(--p-sh-2);
}
#page-gifts .gift-option:active {
  transform: scale(0.95);
}
#page-gifts .gift-option-num {
  font-family: 'Sora','Inter',sans-serif;
  font-size: 28px;
  font-weight: 800;
  color: var(--gold);
  line-height: 1;
}
#page-gifts .gift-option-label {
  font-size: 11px;
  color: var(--text-secondary);
  margin-top: 6px;
  font-weight: 600;
}

/* ============================================
   FIX: Sub-page cards must show immediately (no stagger fade)
   ============================================ */
#page-worship .animate-cards > *,
#page-fasting .animate-cards > *,
#page-gifts .animate-cards > *,
#page-readingplan .animate-cards > *,
#page-flashcards .animate-cards > *,
#page-versesearch .animate-cards > *,
#page-prayerwall .animate-cards > *,
#page-testimonies .animate-cards > *,
#page-sermons .animate-cards > *,
#page-fellowship .animate-cards > *,
#page-events .animate-cards > *,
#page-marketplace .animate-cards > *,
#page-jobs .animate-cards > *,
#page-marriage .animate-cards > * {
  opacity: 1 !important;
  animation: cardStaggerSimple 280ms ease-out forwards !important;
  transform: none;
}
@keyframes cardStaggerSimple {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Ensure all sub-pages show even without animation class */
.page > * { min-height: 0; }
[id^="page-"][style*="display: block"] { animation: pageEnter var(--p-d-base) var(--p-ease-out); }
