/* ─────────────────────────────────────────────────────────────
   INSIDE THE PRACTICE V3 — MOBILE / RESPONSIVE
   All @media breakpoints for every module
   ───────────────────────────────────────────────────────────── */

/* ─── TABLET (≤ 860px) ───────────────────────────────────── */
@media (max-width: 860px) {
  :root { --nav-h: 58px; }

  /* Nav */
  .v3-nav { padding: 0 20px; }
  .v3-nav-cta span { display: none; }

  /* Entry section */
  .entry-section {
    padding: calc(var(--nav-h) + 32px) 20px 64px;
  }

  .entry-inner { max-width: 600px; }

  /* Buttons — keep 2-col but shrink padding */
  .entry-buttons { max-width: 580px; gap: 12px; }

  .entry-btn {
    padding: 22px 22px 20px;
  }

  .entry-btn-label { font-size: 1rem; }
}

/* ─── MOBILE (≤ 600px) ───────────────────────────────────── */
@media (max-width: 600px) {
  /* Nav */
  .v3-nav { padding: 0 16px; }

  .v3-logo-mark { width: 26px; height: 26px; font-size: 14px; }

  .v3-nav-logo span { display: none; }

  .v3-nav-cta {
    padding: 8px 14px;
    font-size: 9px;
    gap: 6px;
  }

  /* Background orbs — scale down */
  .entry-orb-1 { width: 400px; height: 400px; top: -150px; left: -150px; }
  .entry-orb-2 { width: 340px; height: 340px; bottom: -130px; right: -120px; }
  .entry-orb-3 { display: none; }

  /* Entry inner */
  .entry-section {
    padding: calc(var(--nav-h) + 24px) 16px 56px;
  }

  .entry-inner { max-width: 100%; }

  .entry-badge { margin-bottom: 22px; }
  .entry-badge-line { width: 20px; }

  .entry-sub { margin-bottom: 40px; }
  .entry-divider { margin-bottom: 36px; }

  /* Buttons — stack to single column */
  .entry-buttons {
    grid-template-columns: 1fr;
    max-width: 100%;
    gap: 12px;
  }

  .entry-btn {
    padding: 22px 20px 20px;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 0;
  }

  .entry-btn-has-thumb {
    padding-top: 0;
    flex-direction: column;
    align-items: flex-start;
  }

  .entry-btn-has-thumb::before {
    width: calc(100% + 40px);
    margin: 0 -20px 16px;
    height: 92px;
  }

  /* Re-order: eyebrow top-left, label fills, sub bottom */
  .entry-btn-eyebrow {
    width: 100%;
    margin-bottom: 6px;
  }

  .entry-btn-label {
    flex: 1;
    font-size: 1.05rem;
  }

  .entry-btn-sub {
    width: 100%;
    margin-top: 6px;
  }

  /* Lock icon stays top-right */
  .entry-lock-icon {
    top: 20px; right: 16px;
    width: 15px; height: 15px;
  }

  /* Scroll hint — hide on mobile, too crowded */
  .entry-scroll-hint { display: none; }
}

/* ─── SMALL MOBILE (≤ 390px) ─────────────────────────────── */
@media (max-width: 390px) {
  .entry-headline { font-size: 2.1rem; }
  .entry-btn { padding: 18px 16px; }
}

/* ─── PLAYER MOBILE EXPAND + LANDSCAPE FILL ─────────────── */
@media (max-width: 900px), (pointer: coarse) {
  .player-overlay.is-open .player-stage {
    flex: 1;
    min-height: 0;
  }

  .player-overlay.is-user-expanded .player-video,
  .player-overlay.is-landscape.is-open .player-video {
    object-fit: cover;
  }

  .player-overlay.is-user-expanded .player-meta,
  .player-overlay.is-landscape.is-open .player-meta {
    opacity: 0;
    visibility: hidden;
  }

  /* Only hide Part II CTA in landscape — keep it tappable in portrait expanded */
  .player-overlay.is-landscape.is-open .player-ceo-cta {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
  }

  .player-overlay.is-landscape.is-open.has-ceo-cta .player-stage {
    padding-bottom: 0;
  }

  .player-overlay.is-landscape.is-open .player-topbar {
    min-height: calc(44px + env(safe-area-inset-top, 0));
    height: auto;
    padding-left: max(14px, env(safe-area-inset-left, 0));
    padding-right: max(14px, env(safe-area-inset-right, 0));
  }

  .player-overlay.is-landscape.is-open .player-perspective-label {
    display: none;
  }

  .player-overlay.is-landscape.is-open .player-progress-bar {
    padding-bottom: env(safe-area-inset-bottom, 0);
  }
}

/* ─── PLAYER (all breakpoints) ──────────────────────────── */
@media (max-width: 600px) {
  .player-topbar {
    padding-left: max(14px, env(safe-area-inset-left, 0));
    padding-right: max(14px, env(safe-area-inset-right, 0));
  }

  .player-close span { display: none; }

  .player-perspective-label {
    font-size: 9px;
    letter-spacing: 0.10em;
    max-width: 34vw;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .player-expand-label { display: none; }

  .player-sound-label { display: none; }

  .player-play-ring {
    width: 68px; height: 68px;
  }

  .player-meta {
    bottom: max(10px, env(safe-area-inset-bottom, 0));
    padding: 0 16px 14px;
  }

  .player-play-ring svg { width: 22px; height: 22px; }

  .player-context { font-size: 13px; }

  .player-ceo-cta {
    bottom: max(22px, env(safe-area-inset-bottom, 0));
    padding: 12px 20px 11px;
    max-width: calc(100% - 32px);
  }

  .player-ceo-cta-label { font-size: 0.98rem; }

  #ceo-state-form {
    overflow-y: scroll;
    -webkit-overflow-scrolling: touch;
  }

  .ceo-panel {
    padding: 16px 16px max(32px, calc(20px + env(safe-area-inset-bottom, 0)));
  }

  .ceo-headline {
    font-size: clamp(1.45rem, 6vw, 1.85rem);
  }

  .ceo-form-row { grid-template-columns: 1fr; }

  .ceo-overlay .ceo-topbar-spacer { width: 44px; }

  .ceo-stage-frame {
    inset: 18px 16px 28px;
  }

  .ceo-play-ring {
    width: 76px;
    height: 76px;
  }

  .ceo-play-ring svg {
    width: 24px;
    height: 24px;
  }

  .ceo-meta {
    padding: 0 20px 18px;
    bottom: 14px;
  }

  .ceo-meta .player-title {
    font-size: 1.65rem;
  }

  .ceo-diagnostic-cta {
    bottom: 18px;
    padding: 10px 18px;
    font-size: 9px;
  }
}
