/* =========================
   RESET + BASE
========================= */

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  overflow-x: hidden;
  font-family: -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  background: #f2f4f7;
}

body {
  padding-bottom: env(safe-area-inset-bottom);
}

/* =========================
   PREMIUM HEADER SHELL
========================= */

.app-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: linear-gradient(135deg,#0f172a,#111827);
  color: white;
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.app-header-inner {
  max-width: 520px;
  margin: 0 auto;
  padding: 14px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.app-header-title {
  font-weight: 800;
  font-size: 15px;
  display: flex;
  gap: 8px;
  align-items: center;
}

.app-header-owner {
  font-size: 12px;
  opacity: .85;
  display: flex;
  gap: 6px;
  align-items: center;
}


/* =========================
   TOOL STRIP (SEARCH + CHIPS)
========================= */

.app-tools {
  max-width: 520px;
  margin: 0 auto;
  padding: 10px 14px 4px;
  background: #f2f4f7;
}

.search-wrap {
  position: relative;
}

.search-wrap i {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #6b7280;
}

.search-wrap #appSearch {
  padding-left: 36px;
}


/* =========================
   CHIP ROW — SCROLLABLE
========================= */

.cat-chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 6px 0 10px;
  scrollbar-width: none;
}

.cat-chips::-webkit-scrollbar {
  display: none;
}


/* =========================
   APP CONTAINER
========================= */

#app {
  max-width:520px;
  margin:0 auto;
  padding: 6px 14px 110px;
}



/* (desktop landing is handled further down) */



/* =========================
   HERO BANNER
========================= */

.hero-banner {
  width: 100%;
  max-width: 520px;
  margin: 0 auto 14px;
  border-radius: 0;          /* remove rounded corners */
  overflow: hidden;
}


.hero-banner img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

/* Mobile: hero banner full-bleed edge-to-edge */
/* Mobile: hero banner true viewport full-bleed */
@media (max-width: 899px) {
  .hero-banner {
    width: 100vw;
    max-width: 100vw;
    margin-left: 50%;
    transform: translateX(-50%);
    border-radius: 0;
  }
}

/* hero banner hidden on desktop/tablet (≥768px) */
@media (min-width: 768px) {
  .hero-banner {
    display: none !important;
  }
}

/* (install-banner replaced by desktop-landing) */


/* =========================
   SEARCH
========================= */

#appSearch {
  width: 100%;
  height: 44px;
  font-size: 16px;
  padding: 0 14px;
  border-radius: 14px;
  border: 1px solid #e5e7eb;
  background: #ffffff;
  margin: 10px 0 8px;
}


/* =========================
   CATEGORY CHIPS
========================= */

#catTabs {
  display: flex;
  flex-wrap: nowrap;
  gap: 10px;
  overflow-x: auto;
  padding: 6px 2px 10px;
  scrollbar-width: none;
}

#catTabs::-webkit-scrollbar {
  display: none;
}

.cat-btn {
  font-size: 14px;
  padding: 10px 16px;
  border-radius: 14px;
  border: 1px solid #d1d5db;
  background: #f8fafc;
  color: #1f2937;
  font-weight: 700;
  white-space: nowrap;
  flex: 0 0 auto;
}

.cat-btn.active {
  background: #2563eb;
  color: white;
  border-color: #2563eb;
  box-shadow: 0 2px 6px rgba(37,99,235,.35);
}


/* =========================
   CARD
========================= */

.card {
  background: white;
  border-radius: 18px;
  padding: 14px;
  margin: 12px 0;
  box-shadow: 0 6px 18px rgba(0,0,0,.08);
}


.cover-sm {
  width: 96px;
  height: 96px;
  border-radius: 14px;
  object-fit: cover;
  flex-shrink: 0;
}


/* =========================
   PREMIUM CARD LAYOUT
========================= */

.card-top {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.card-head h3 {
  font-size: 16px;
  margin: 0 0 4px;
}

.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

.badge {
  font-size: 11px;
  font-weight: 800;
  padding: 4px 8px;
  border-radius: 999px;
}

.badge-new { background:#16a34a; color:white; }
.badge-featured { background:#7c3aed; color:white; }
.badge-pdf { background:#f97316; color:white; }
.badge-video { background:#111827; color:white; }


.card-actions {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.btn-primary-open {
  height: 46px;
  border: none;
  border-radius: 14px;
  background: #2563eb;
  color: white;
  font-weight: 800;
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
}

.action-icons {
  display: flex;
  gap: 10px;
}

.icon-btn {
  flex: 1;
  height: 42px;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  background: #f9fafb;
  font-size: 16px;
}

/* =========================
   TEXT
========================= */

.card h3 {
  font-size: 18px;
  margin: 0 0 6px;
}

.sub {
  font-size: 14px;
  color: #6b7280;
  margin-bottom: 12px;
}


/* =========================
   BUTTON STACK
========================= */

.btn-col {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.app-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 14px;
  font-size: 15px;
  font-weight: 700;
  border: none;
  border-radius: 14px;
}

.app-btn:active {
  transform: scale(.97);
}

.app-bottom-nav button:active {
  transform: scale(.92);
  opacity: .8;
}


.btn-notes { background:#2563eb;color:white; }
.btn-cheat { background:#16a34a;color:white; }
.btn-mind  { background:#eab308;color:#111; }
.btn-pdf   { background:#f97316;color:white; }
.btn-video { background:#111827;color:white; }


/* =========================
   OWNER PANEL
========================= */

.owner-panel {
  padding: 18px;
}

.owner-panel.hidden {
  display: none;
}

.owner-avatar{
  width:72px;
  height:72px;
  border-radius:50%;
  object-fit:cover;
  background:#e5e7eb;
  display:block;
  margin:0 auto 12px auto;
}

.owner-card {
  background: white;
  border-radius: 20px;
  padding: 22px;
  box-shadow: 0 8px 24px rgba(0,0,0,.08);
  text-align: center;
}

.owner-avatar {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: linear-gradient(135deg,#2563eb,#7c3aed);
  margin: 0 auto 12px;
}

.owner-sub {
  color: #64748b;
  margin-bottom: 16px;
}

/* =========================
   VIEWER MODAL
========================= */

.viewer {
  position: fixed;
  inset: 0;
  background: white;
  z-index: 9999;
  overflow: auto;
  padding:
    calc(16px + env(safe-area-inset-top))
    16px
    calc(16px + env(safe-area-inset-bottom));
}


.viewer-close {
  width: 100%;
  min-height: 56px;
  background: #0f172a;
  color: white;
  border: none;
  border-radius: 14px;
  font-weight: 800;
  margin-bottom: 16px;
  font-size: 16px;
}



/* =========================
   BOTTOM NAV — CLEAN NATIVE STYLE
========================= */

.app-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;

  height: 64px;
  padding-bottom: env(safe-area-inset-bottom);

  background: linear-gradient(180deg,#0b1220,#020617);
  border-top: 1px solid rgba(255,255,255,.08);

  display: flex;
  justify-content: space-around;
  align-items: center;

  box-shadow: 0 -4px 18px rgba(0,0,0,.35);
}


.app-bottom-nav button {
  background: none;
  border: none;
  color: #cbd5f5;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  gap: 3px;
  font-size: 11px;
  font-weight: 700;
  min-width: 72px;

  padding-top: 6px;   /* ← NEW */
}

/* =========================
   CONTENT UPDATE TOAST
========================= */

.content-update-toast {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: calc(74px + env(safe-area-inset-bottom));
  z-index: 1200;
  background: #0f172a;
  color: #ffffff;
  border-radius: 14px;
  box-shadow: 0 10px 28px rgba(2, 6, 23, 0.35);
  padding: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  animation: toastIn .22s ease-out;
}

.content-update-toast__text {
  font-size: 13px;
  line-height: 1.3;
  font-weight: 600;
}

.content-update-toast__btn {
  border: none;
  border-radius: 10px;
  padding: 9px 12px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
  background: #22c55e;
  color: #052e16;
}

.content-update-toast--success {
  background: #065f46;
  justify-content: center;
}

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


/* =========================
   PROGRESS RING (HEADER)
========================= */

.progress-ring-wrap {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: conic-gradient(
    #2563eb calc(var(--pct, 0) * 1%),
    rgba(255,255,255,.15) 0
  );
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: background .4s ease;
}

.progress-ring-inner {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #0f172a;
  display: flex;
  align-items: center;
  justify-content: center;
}

#progressCount {
  font-size: 8px;
  font-weight: 800;
  color: rgba(255,255,255,.8);
  line-height: 1;
  text-align: center;
  white-space: nowrap;
}

/* header layout tweak: space between title, ring, owner */
.app-header-inner {
  gap: 10px;
}


/* =========================
   CARD PROGRESS TICK
========================= */

.card {
  position: relative;
}

.card-tick {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  background: #f3f4f6;
  color: #d1d5db;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: color .2s, background .2s, transform .15s;
  z-index: 2;
  padding: 0;
}

.card-tick.ticked {
  color: #16a34a;
  background: #dcfce7;
}

.card-tick:active {
  transform: scale(.85);
}


/* =========================
   START HERE STRIP
========================= */

.start-here-wrap {
  margin: 0 0 10px;
}

.start-here-label {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #6b7280;
  padding: 0 2px 8px;
}

.start-here-strip {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: none;
}

.start-here-strip::-webkit-scrollbar { display: none; }

.sh-card {
  flex: 0 0 160px;
  background: white;
  border-radius: 14px;
  padding: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,.08);
  cursor: pointer;
  border: 2px solid transparent;
  transition: border-color .2s, transform .15s;
}

.sh-card:active {
  transform: scale(.97);
  border-color: #2563eb;
}

.sh-card-img {
  width: 100%;
  height: 70px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 8px;
  background: linear-gradient(135deg, #2563eb22, #7c3aed22);
}

.sh-card-title {
  font-size: 12px;
  font-weight: 800;
  line-height: 1.3;
  color: #111827;
}

.sh-card-badge {
  display: inline-block;
  margin-top: 6px;
  font-size: 10px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 999px;
  background: #2563eb;
  color: white;
}


/* =========================
   5-BUTTON BOTTOM NAV
========================= */

.app-bottom-nav button {
  min-width: 58px;
  font-size: 10px;
}


/* =========================
   QUIZ OVERLAY
========================= */

.quiz-overlay {
  position: fixed;
  inset: 0;
  z-index: 9000;
  background: #f2f4f7;
  display: flex;
  flex-direction: column;
  transform: translateY(100%);
  transition: transform .35s cubic-bezier(.32,.72,0,1);
  overflow: hidden;
}

.quiz-overlay.open {
  transform: translateY(0);
}

.quiz-shell {
  display: flex;
  flex-direction: column;
  height: 100%;
  max-width: 520px;
  margin: 0 auto;
  width: 100%;
}

.quiz-topbar {
  background: linear-gradient(135deg, #0f172a, #111827);
  padding: calc(14px + env(safe-area-inset-top)) 16px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.quiz-prog-track {
  flex: 1;
  height: 4px;
  background: rgba(255,255,255,.15);
  border-radius: 99px;
  overflow: hidden;
}

.quiz-prog-fill {
  height: 100%;
  background: linear-gradient(90deg, #2563eb, #7c3aed);
  border-radius: 99px;
  transition: width .4s cubic-bezier(.4,0,.2,1);
}

.quiz-close-btn {
  background: rgba(255,255,255,.1);
  border: none;
  color: white;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  cursor: pointer;
}

.quiz-page-label {
  color: rgba(255,255,255,.5);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  flex-shrink: 0;
}

.quiz-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px 16px 0;
  overscroll-behavior: contain;
}

.quiz-page-heading {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #2563eb;
  margin-bottom: 20px;
}

.quiz-question-block {
  margin-bottom: 24px;
}

.quiz-question-text {
  font-size: 17px;
  font-weight: 800;
  color: #111827;
  margin: 0 0 12px;
  line-height: 1.35;
}

.quiz-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.quiz-option {
  background: white;
  border: 2px solid #e5e7eb;
  border-radius: 14px;
  padding: 12px 10px;
  font-size: 13px;
  font-weight: 600;
  color: #374151;
  text-align: center;
  line-height: 1.3;
  cursor: pointer;
  transition: border-color .15s, background .15s, color .15s, transform .1s;
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  -webkit-tap-highlight-color: transparent;
}

.quiz-option:active {
  transform: scale(.96);
}

.quiz-option.selected {
  border-color: #2563eb;
  background: #eff6ff;
  color: #1d4ed8;
}

.quiz-footer {
  padding: 14px 16px calc(16px + env(safe-area-inset-bottom));
  background: white;
  border-top: 1px solid #e5e7eb;
  flex-shrink: 0;
}

.quiz-hint {
  font-size: 12px;
  color: #9ca3af;
  text-align: center;
  margin-bottom: 10px;
  transition: opacity .2s;
}

.quiz-hint.hidden { opacity: 0; }

.quiz-next-btn {
  width: 100%;
  height: 52px;
  border: none;
  border-radius: 14px;
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  color: white;
  font-size: 16px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  transition: opacity .2s, transform .1s;
}

.quiz-next-btn:disabled {
  opacity: .4;
  cursor: not-allowed;
}

.quiz-next-btn:not(:disabled):active {
  transform: scale(.97);
}


/* =========================
   QUIZ REPORT SCREEN
========================= */

.quiz-report-body {
  flex: 1;
  overflow-y: auto;
  padding: 24px 16px calc(24px + env(safe-area-inset-bottom));
}

.report-profile-card {
  border-radius: 20px;
  padding: 24px;
  color: white;
  text-align: center;
  margin-bottom: 20px;
  position: relative;
  overflow: hidden;
}

.report-profile-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.15);
  border-radius: inherit;
}

.report-profile-card > * {
  position: relative;
  z-index: 1;
}

.report-icon {
  font-size: 40px;
  margin-bottom: 10px;
}

.report-profile-label {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 2px;
  text-transform: uppercase;
  opacity: .8;
  margin-bottom: 6px;
}

.report-profile-title {
  font-size: 22px;
  font-weight: 900;
  margin: 0 0 14px;
  line-height: 1.2;
}

.report-insight {
  font-size: 14px;
  line-height: 1.6;
  opacity: .9;
}

.report-owner-sign {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid rgba(255,255,255,.2);
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 700;
  opacity: .85;
  text-align: left;
}

.report-owner-sign img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255,255,255,.4);
  flex-shrink: 0;
}

.report-section-label {
  font-size: 13px;
  font-weight: 800;
  color: #374151;
  margin: 0 0 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.report-guide-chips {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
}

.report-guide-chip {
  background: white;
  border-radius: 14px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,.07);
  cursor: pointer;
  border: 2px solid transparent;
  transition: border-color .15s;
  -webkit-tap-highlight-color: transparent;
}

.report-guide-chip:active {
  border-color: #2563eb;
}

.report-chip-thumb {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  object-fit: cover;
  flex-shrink: 0;
  background: linear-gradient(135deg, #2563eb22, #7c3aed22);
}

.report-chip-text strong {
  display: block;
  font-size: 13px;
  font-weight: 800;
  color: #111827;
  line-height: 1.3;
}

.report-chip-text span {
  font-size: 11px;
  color: #6b7280;
}

.report-chip-arrow {
  margin-left: auto;
  color: #9ca3af;
  font-size: 13px;
  flex-shrink: 0;
}

.report-get-yours {
  background: linear-gradient(135deg, #0f172a, #1e1b4b);
  border-radius: 18px;
  padding: 20px;
  text-align: center;
  color: white;
  margin-top: 8px;
}

.report-get-yours h4 {
  font-size: 17px;
  font-weight: 900;
  margin: 0 0 8px;
}

.report-get-yours p {
  font-size: 13px;
  color: rgba(255,255,255,.65);
  margin: 0 0 14px;
  line-height: 1.5;
}

.report-get-yours-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  color: white;
  border: none;
  border-radius: 12px;
  padding: 12px 22px;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  transition: transform .1s;
}

.report-get-yours-btn:active {
  transform: scale(.97);
}

.report-retake {
  text-align: center;
  margin-top: 16px;
}

.report-retake-btn {
  background: none;
  border: none;
  color: #6b7280;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
}


/* =========================
   WELCOME DRAWER
========================= */

.welcome-drawer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 8000;
  background: white;
  border-radius: 24px 24px 0 0;
  box-shadow: 0 -8px 40px rgba(0,0,0,.2);
  padding: 0 20px calc(20px + env(safe-area-inset-bottom));
  transform: translateY(100%);
  transition: transform .38s cubic-bezier(.32,.72,0,1);
  max-width: 520px;
  margin: 0 auto;
}

.welcome-drawer.open {
  transform: translateY(0);
}

.welcome-drawer-handle {
  width: 36px;
  height: 4px;
  background: #e5e7eb;
  border-radius: 99px;
  margin: 12px auto 20px;
}

.welcome-drawer-close {
  position: absolute;
  top: 14px;
  right: 16px;
  background: #f3f4f6;
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #6b7280;
}

.welcome-owner-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}

.welcome-owner-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #eff6ff;
  flex-shrink: 0;
  background: linear-gradient(135deg, #2563eb, #7c3aed);
}

.welcome-owner-name {
  font-size: 17px;
  font-weight: 900;
  color: #111827;
}

.welcome-owner-sub {
  font-size: 12px;
  color: #6b7280;
}

.welcome-message {
  font-size: 15px;
  line-height: 1.65;
  color: #374151;
  margin-bottom: 20px;
}

.welcome-cta-btn {
  width: 100%;
  height: 50px;
  border: none;
  border-radius: 14px;
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  color: white;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

/* drawer backdrop */
.welcome-backdrop {
  position: fixed;
  inset: 0;
  z-index: 7999;
  background: rgba(0,0,0,.4);
  opacity: 0;
  transition: opacity .3s;
}

.welcome-backdrop.open {
  opacity: 1;
}


/* =========================
   SPLASH SCREEN
========================= */

#splashScreen {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: linear-gradient(160deg, #0f172a 0%, #1e1b4b 55%, #0f172a 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 28px;
  transition: opacity .5s ease, visibility .5s ease;
}

#splashScreen.hide {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.splash-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  animation: splashIn .55s cubic-bezier(.34,1.56,.64,1) forwards;
}

.splash-icon-ring {
  width: 92px;
  height: 92px;
  border-radius: 26px;
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 38px;
  color: white;
  box-shadow:
    0 0 0 0 rgba(124,58,237,.6),
    0 20px 40px rgba(37,99,235,.4);
  animation: iconPulse 2.2s ease-out .6s infinite;
}

.splash-brand {
  color: white;
  font-size: 26px;
  font-weight: 900;
  letter-spacing: -.5px;
  text-align: center;
}

.splash-tag {
  color: rgba(255,255,255,.55);
  font-size: 12px;
  letter-spacing: 2.5px;
  text-transform: uppercase;
}

.splash-dots {
  display: flex;
  gap: 8px;
  opacity: 0;
  animation: fadeIn .3s ease .7s forwards;
}

.splash-dots span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,.25);
  animation: dotBounce 1.2s ease-in-out infinite;
}

.splash-dots span:nth-child(2) { animation-delay: .18s; }
.splash-dots span:nth-child(3) { animation-delay: .36s; }

@keyframes splashIn {
  from { opacity: 0; transform: scale(.65); }
  to   { opacity: 1; transform: scale(1);   }
}

@keyframes iconPulse {
  0%   { box-shadow: 0 0 0 0 rgba(124,58,237,.55), 0 20px 40px rgba(37,99,235,.4); }
  70%  { box-shadow: 0 0 0 22px rgba(124,58,237,0), 0 20px 40px rgba(37,99,235,.4); }
  100% { box-shadow: 0 0 0 0 rgba(124,58,237,0),   0 20px 40px rgba(37,99,235,.4); }
}

@keyframes dotBounce {
  0%, 80%, 100% { transform: scale(.75); opacity: .35; }
  40%            { transform: scale(1.25); opacity: 1; }
}

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


/* =========================
   CARD ENTRANCE ANIMATIONS
========================= */

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

.card {
  animation: fadeSlideUp .38s ease both;
}

.card:nth-child(1)  { animation-delay: .04s; }
.card:nth-child(2)  { animation-delay: .09s; }
.card:nth-child(3)  { animation-delay: .14s; }
.card:nth-child(4)  { animation-delay: .19s; }
.card:nth-child(5)  { animation-delay: .23s; }
.card:nth-child(6)  { animation-delay: .27s; }
.card:nth-child(7)  { animation-delay: .31s; }
.card:nth-child(8)  { animation-delay: .34s; }
.card:nth-child(9)  { animation-delay: .37s; }
.card:nth-child(10) { animation-delay: .39s; }
.card:nth-child(11) { animation-delay: .41s; }
.card:nth-child(12) { animation-delay: .43s; }


/* =========================
   INSTALL BUTTON — LIVE DOT
========================= */

#installBtn {
  position: relative;
}

#installBtn::after {
  content: '';
  position: absolute;
  top: 6px;
  right: 14px;
  width: 7px;
  height: 7px;
  background: #22c55e;
  border-radius: 50%;
  animation: installPing 2.5s ease-in-out 4s infinite;
}

@keyframes installPing {
  0%, 100% { opacity: 0; transform: scale(1); }
  15%  { opacity: 1; transform: scale(1); }
  85%  { opacity: 0; transform: scale(2.8); }
}


/* =========================
   INSTALL MODAL (improved)
========================= */

.install-modal {
  text-align: center;
  padding: 8px 0 16px;
}

.install-modal h2 {
  font-size: 22px;
  font-weight: 900;
  margin: 0 0 6px;
}

.install-modal .install-sub {
  color: #64748b;
  font-size: 14px;
  margin: 0 0 24px;
}

.install-steps {
  display: flex;
  flex-direction: column;
  gap: 14px;
  text-align: left;
  margin-bottom: 24px;
}

.install-step {
  display: flex;
  align-items: center;
  gap: 14px;
  background: #f8fafc;
  border-radius: 14px;
  padding: 14px 16px;
}

.install-step-num {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 900;
  flex-shrink: 0;
}

.step-ios  { background: #eff6ff; color: #2563eb; }
.step-and  { background: #f0fdf4; color: #16a34a; }

.install-step-copy strong {
  display: block;
  font-size: 14px;
  font-weight: 800;
  margin-bottom: 2px;
}

.install-step-copy span {
  font-size: 13px;
  color: #6b7280;
}

.install-platform-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 800;
  color: #374151;
  margin-bottom: 10px;
}


/* =========================
   DESKTOP LANDING
========================= */

.desktop-landing {
  display: none;
}

@media (min-width: 768px) {

  /* Kill mobile UI on tablet/desktop */
  .app-tools,
  .search-wrap,
  #app,
  .app-bottom-nav {
    display: none !important;
  }

  .app-header-inner {
    max-width: 1100px;
  }

  /* Show desktop landing — !important overrides the inline display:none mobile safeguard */
  .desktop-landing {
    display: block !important;
    min-height: calc(100vh - 56px);
    background: linear-gradient(160deg, #0d1117 0%, #0f172a 45%, #140a24 100%);
    overflow: hidden;
    position: relative;
  }

  /* Ambient glow layers */
  .desktop-landing::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
      radial-gradient(ellipse 700px 500px at 75% 25%, rgba(124,58,237,.13) 0%, transparent 65%),
      radial-gradient(ellipse 500px 350px at 15% 75%, rgba(37,99,235,.1) 0%, transparent 65%);
    pointer-events: none;
  }

  .desktop-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 64px 40px 80px;
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 70px;
    align-items: center;
    position: relative;
    z-index: 1;
  }

  /* ---- LEFT COLUMN ---- */
  .desktop-left {
    color: white;
  }

  .desktop-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(37,99,235,.18);
    border: 1px solid rgba(37,99,235,.4);
    border-radius: 999px;
    padding: 7px 16px;
    font-size: 11px;
    font-weight: 800;
    color: #93c5fd;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    margin-bottom: 22px;
    animation: fadeSlideUp .5s ease both;
  }

  .desktop-headline {
    font-size: clamp(34px, 4vw, 54px);
    font-weight: 900;
    line-height: 1.08;
    letter-spacing: -1.5px;
    margin: 0 0 18px;
    color: white;
    animation: fadeSlideUp .5s .08s ease both;
  }

  .desktop-headline .hl-blue {
    background: linear-gradient(90deg, #60a5fa 0%, #a78bfa 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
  }

  .desktop-sub {
    font-size: 17px;
    color: rgba(255,255,255,.6);
    line-height: 1.6;
    margin: 0 0 30px;
    animation: fadeSlideUp .5s .14s ease both;
  }

  /* Owner bar */
  .desktop-owner {
    display: flex;
    align-items: center;
    gap: 14px;
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 16px;
    padding: 14px 18px;
    margin-bottom: 26px;
    animation: fadeSlideUp .5s .18s ease both;
  }

  .desktop-owner-avatar {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    object-fit: cover;
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    border: 2px solid rgba(255,255,255,.2);
    flex-shrink: 0;
  }

  .desktop-owner-info strong {
    display: block;
    font-size: 15px;
    font-weight: 800;
    color: white;
  }

  .desktop-owner-info span {
    font-size: 12px;
    color: rgba(255,255,255,.45);
  }

  .desktop-owner-badge {
    margin-left: auto;
    color: #4ade80;
    font-size: 18px;
  }

  /* Feature bullets */
  .desktop-features {
    list-style: none;
    margin: 0 0 30px;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 11px;
    animation: fadeSlideUp .5s .22s ease both;
  }

  .desktop-features li {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 15px;
    color: rgba(255,255,255,.78);
  }

  .feat-icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
  }

  .fi-blue   { background: rgba(37,99,235,.28);  color: #60a5fa; }
  .fi-green  { background: rgba(22,163,74,.28);   color: #4ade80; }
  .fi-purple { background: rgba(124,58,237,.28);  color: #c084fc; }
  .fi-orange { background: rgba(249,115,22,.28);  color: #fb923c; }

  /* QR block */
  .desktop-qr-block {
    display: flex;
    align-items: center;
    gap: 22px;
    background: rgba(255,255,255,.05);
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 20px;
    padding: 20px 24px;
    animation: fadeSlideUp .5s .28s ease both;
  }

  #desktopQR {
    flex-shrink: 0;
    border-radius: 12px;
    overflow: hidden;
    background: white;
    padding: 8px;
    line-height: 0;
  }

  #desktopQR canvas,
  #desktopQR img {
    display: block;
    border-radius: 6px;
  }

  .qr-copy h4 {
    font-size: 16px;
    font-weight: 900;
    margin: 0 0 5px;
    color: white;
  }

  .qr-copy p {
    font-size: 13px;
    color: rgba(255,255,255,.5);
    margin: 0 0 12px;
    line-height: 1.5;
  }

  .qr-platforms {
    display: flex;
    gap: 8px;
  }

  .qr-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(255,255,255,.1);
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 9px;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 700;
    color: rgba(255,255,255,.65);
  }

  /* ---- RIGHT COLUMN — PHONE MOCKUP ---- */
  .desktop-right {
    display: flex;
    justify-content: center;
    animation: fadeSlideUp .6s .18s ease both;
  }

  .phone-stage {
    position: relative;
    width: 260px;
  }

  /* Purple glow under phone */
  .phone-stage::after {
    content: '';
    position: absolute;
    bottom: -30px;
    left: 50%;
    transform: translateX(-50%);
    width: 180px;
    height: 50px;
    background: rgba(124,58,237,.55);
    border-radius: 50%;
    filter: blur(28px);
  }

  .phone-mockup {
    width: 100%;
    aspect-ratio: 9 / 19.5;
    background: #080810;
    border-radius: 48px;
    border: 10px solid #1c1c2e;
    box-shadow:
      0 0 0 2px #2a2a3e,
      0 50px 100px rgba(0,0,0,.7),
      inset 0 0 40px rgba(0,0,0,.5);
    overflow: hidden;
    position: relative;
    animation: phoneFloat 5.5s ease-in-out infinite;
  }

  /* Dynamic island / notch */
  .phone-notch {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 90px;
    height: 26px;
    background: #080810;
    border-radius: 0 0 18px 18px;
    z-index: 10;
  }

  .phone-screen {
    width: 100%;
    height: 100%;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    background: #f2f4f7;
  }

  .phone-screen-banner {
    width: 100%;
    flex-shrink: 0;
  }

  .phone-screen-banner img {
    width: 100%;
    height: auto;
    display: block;
  }

  .phone-mini-header {
    background: linear-gradient(135deg, #0f172a, #111827);
    color: white;
    padding: 7px 12px;
    font-size: 8.5px;
    font-weight: 800;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
    letter-spacing: .2px;
  }

  .phone-mini-cards {
    padding: 7px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    flex: 1;
    overflow: hidden;
  }

  .phone-mini-card {
    background: white;
    border-radius: 9px;
    padding: 7px 9px;
    box-shadow: 0 2px 6px rgba(0,0,0,.07);
    display: flex;
    gap: 8px;
    align-items: center;
  }

  .phone-mini-card-thumb {
    width: 28px;
    height: 28px;
    border-radius: 7px;
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 11px;
  }

  .phone-mini-card-text { flex: 1; }

  .phone-mini-card-text .t1 {
    height: 6px;
    background: #e5e7eb;
    border-radius: 3px;
    margin-bottom: 4px;
    width: 78%;
  }

  .phone-mini-card-text .t2 {
    height: 5px;
    background: #f3f4f6;
    border-radius: 3px;
    width: 55%;
  }

  .phone-mini-nav {
    background: linear-gradient(180deg, #0b1220, #020617);
    padding: 6px 10px 8px;
    display: flex;
    justify-content: space-around;
    flex-shrink: 0;
    border-top: 1px solid rgba(255,255,255,.07);
  }

  .phone-mini-nav span {
    color: rgba(255,255,255,.45);
    font-size: 7.5px;
    font-weight: 700;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
  }

  .phone-mini-nav span i {
    font-size: 9px;
  }

  @keyframes phoneFloat {
    0%, 100% { transform: translateY(0px)   rotate(-.8deg); }
    50%       { transform: translateY(-18px) rotate(.8deg);  }
  }

} /* end @media ≥768px */
