/* =========================================================
   PHONE APP LAYOUT — tab bar, "More" sheet, docked player, install prompt.
   Loaded after styles.css. Screens wider than 768px are unaffected.
   ========================================================= */
.tabbar, .sheet, .sheet-backdrop, .install-banner { display: none; }
html { -webkit-tap-highlight-color: transparent; }

@media (max-width: 768px) {
  :root { --header-h: 60px; --tab-h: 64px; --safe-b: env(safe-area-inset-bottom, 0px); --safe-t: env(safe-area-inset-top, 0px); }
  html { scroll-padding-top: calc(var(--header-h) + var(--safe-t)); }
  body { padding-bottom: calc(var(--tab-h) + var(--safe-b)); }
  body.has-player { padding-bottom: calc(var(--tab-h) + var(--safe-b) + 96px); }
  body.sheet-open { overflow: hidden; }
  .container { width: calc(100% - 40px); }

  /* App bar */
  .site-header { height: calc(var(--header-h) + var(--safe-t)); padding-top: var(--safe-t); background: rgba(10,10,10,.92); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
  .header-inner { width: calc(100% - 32px); }
  .nav-toggle, .main-nav { display: none; }
  .header-give { display: inline-flex; padding: .6rem 1rem; }
  .brand-logo { height: 38px; }
  .brand-text { font-size: 1.15rem; padding-left: .65rem; }
  .brand-text small { font-size: .5rem; letter-spacing: .42em; }

  /* Long button labels wrap instead of widening the page */
  .btn { white-space: normal; text-align: center; line-height: 1.3; }
  .header-give, .tab, .give-toggle button { white-space: nowrap; }

  /* Press feedback */
  .btn:active, .tab:active, .qa:active .qa-ico, .tile:active .qa-ico, .tile-card:active, .video:active { transform: scale(.96); }
  .reveal { transform: translateY(14px); transition-duration: .5s; }

  /* Hero: name + tagline + app shortcuts */
  .hero { min-height: 88svh; padding: calc(var(--header-h) + var(--safe-t) + 30px) 20px 48px; }
  .hero.has-photos { padding-bottom: 36px; }
  .hero h1 { font-size: clamp(3.6rem, 19vw, 5.5rem); }
  .hero-sub { font-size: .8rem; letter-spacing: .6em; padding-left: .6em; }
  .hero-tagline { font-size: .68rem; letter-spacing: .16em; margin: 1.6rem 0 2rem; white-space: nowrap; }
  .hero-actions { display: none; }
  .scroll-cue { display: none; }
  .quick-actions { display: grid; grid-template-columns: repeat(4, 1fr); gap: .5rem; max-width: 360px; margin-inline: auto; }
  .qa, .tile { display: flex; flex-direction: column; align-items: center; gap: .5rem; font: 600 .7rem/1.2 var(--sans); letter-spacing: .08em; text-transform: uppercase; text-decoration: none; background: none; border: 0; padding: 0; cursor: pointer; }
  .qa { color: var(--white); }
  .qa-ico { width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center; border: 1.5px solid rgba(255,255,255,.55); background: rgba(0,0,0,.35); backdrop-filter: blur(6px); transition: transform .15s; }
  .qa-ico svg { width: 24px; height: 24px; fill: var(--white); }
  .qa-ico.gold { background: var(--gold); border-color: var(--gold); }
  .qa-ico.gold svg { fill: var(--black); }

  /* Sections */
  .section { padding: 64px 0; }
  .section-head { margin-bottom: 2rem; }
  h2 { font-size: 2.6rem; }

  /* Bio */
  .bio-photo { aspect-ratio: 4/5; max-width: none; }

  /* Tiles: swipeable cards */
  .tiles { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; gap: 12px; margin-inline: -20px; padding: 0 20px 6px; scroll-padding-inline: 20px; }
  .tiles::-webkit-scrollbar { display: none; }
  .tile-card { flex: 0 0 84%; min-height: 360px; scroll-snap-align: start; padding: 2rem 1.5rem; }
  .tile-card p { max-height: none; opacity: 1; }
  .tile-card .tile-cta { opacity: 1; }
  .tile-card::before { background: rgba(0,0,0,.6); }
  .tiles .reveal { opacity: 1; transform: none; }

  /* New release */
  .book-cover { width: 210px; transform: rotateY(-12deg); }
  .book-title { font-size: 1.9rem; }
  .release-copy { text-align: center; }

  /* Partner */
  .give-card { margin-inline: -4px; }
  .amounts { grid-template-columns: repeat(3, 1fr); }
  .amt-custom { grid-column: span 3; }

  /* eBooks & music */
  .ebook-grid { grid-template-columns: 1fr; }
  .ebook { grid-template-columns: 96px 1fr; gap: 1rem; padding: 1rem; }
  .ebook-body h3 { font-size: 1.45rem; }
  .music-grid { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; gap: 12px; margin-inline: -20px; padding: 0 20px 4px; scroll-padding-inline: 20px; }
  .music-grid::-webkit-scrollbar { display: none; }
  .release-card { flex: 0 0 78%; scroll-snap-align: start; }
  .music-grid .reveal { opacity: 1; transform: none; }
  .music-grid .soon-card { flex: 1 0 100%; }

  /* Testimonies: swipeable cards */
  .testimony-grid { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; gap: 12px; margin: 0 -20px 2rem; padding: 0 20px; scroll-padding-inline: 20px; }
  .testimony-grid::-webkit-scrollbar { display: none; }
  .testimony { flex: 0 0 86%; scroll-snap-align: start; }
  .testimony-grid .reveal { opacity: 1; transform: none; }

  /* Videos: swipeable */
  .videos { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; gap: 14px; margin-inline: -20px; padding: 0 20px; scroll-padding-inline: 20px; }
  .videos::-webkit-scrollbar { display: none; }
  .video { flex: 0 0 78%; scroll-snap-align: start; }
  .videos .reveal { opacity: 1; transform: none; }
  .center { margin-top: 2rem; }

  /* Live */
  .live-player { margin-inline: -20px; border-inline: 0; }
  .play-ring { width: 70px; height: 70px; }
  .poster-title { font-size: 1.6rem; }
  .poster-sub { display: none; }

  /* Podcast */
  .podcast-copy { text-align: center; }
  .podcast-logo img { margin-inline: auto; width: min(240px, 70%); }
  .platforms { justify-content: center; }

  /* Events: stacked rows */
  .event { grid-template-columns: 1fr auto; gap: .3rem 1rem; padding: 1.3rem 0; }
  .event-date { grid-column: 1 / -1; font-size: 1.4rem; }
  .event-city { font-size: 1.5rem; }
  .event .btn { padding: .65rem .9rem; font-size: .66rem; }

  /* Contact & forms (16px text stops iOS zooming in) */
  .field-row { grid-template-columns: 1fr; }
  .form-card input, .form-card select, .form-card textarea, .newsletter-form input { font-size: 16px; }
  .form-card { margin-inline: -20px; }

  /* Footer: tab bar covers navigation */
  .footer-nav { display: none; }
  .site-footer { padding: 48px 0 28px; }

  /* Mini player docked above the tab bar */
  .player {
    position: fixed; left: 8px; right: 8px; z-index: 120; margin: 0;
    bottom: calc(var(--tab-h) + var(--safe-b) + 8px);
    display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 4px 10px;
    padding: 10px 12px 8px 16px; background: rgba(20,20,20,.97); backdrop-filter: blur(16px);
  }
  .player[hidden] { display: none; }
  .player-info { min-width: 0; }
  .player-info strong { font-size: .9rem; margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .player-controls { gap: .3rem; }
  #player-back, #player-fwd { width: 34px; height: 34px; }
  .icon-btn.big { width: 42px; height: 42px; }
  .player-progress { grid-column: 1 / -1; margin: 0; font-size: .66rem; gap: .5rem; }

  /* Tab bar */
  .tabbar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 130;
    display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
    height: calc(var(--tab-h) + var(--safe-b)); padding-bottom: var(--safe-b);
    background: rgba(10,10,10,.96); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
    border-top: 1px solid rgba(255,255,255,.1);
  }
  .tab { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: rgba(255,255,255,.5); text-decoration: none; font: 600 .6rem var(--sans); letter-spacing: .1em; text-transform: uppercase; background: none; border: 0; cursor: pointer; transition: color .2s, transform .15s; }
  .tab svg { width: 23px; height: 23px; fill: currentColor; }
  .tab.active { color: var(--gold-2); }
  .tab.active::before { content: ""; position: absolute; top: 0; width: 28px; height: 2px; background: var(--gold); }
  .tab-live-dot { position: absolute; top: 9px; left: calc(50% + 9px); display: none; }
  .tab-live-dot.on { display: block; }

  /* "More" bottom sheet */
  .sheet-backdrop { display: block; position: fixed; inset: 0; z-index: 140; background: rgba(0,0,0,.6); opacity: 0; transition: opacity .3s; }
  .sheet-backdrop[hidden] { display: none; }
  .sheet-open .sheet-backdrop { opacity: 1; }
  .sheet {
    display: block; position: fixed; left: 0; right: 0; bottom: 0; z-index: 150;
    background: var(--black-2); color: var(--white); border-radius: 22px 22px 0 0; border-top: 1px solid rgba(255,255,255,.1);
    padding: 10px 20px calc(24px + var(--safe-b)); max-height: 85vh; overflow-y: auto;
    transform: translateY(105%); visibility: hidden;
    transition: transform .32s cubic-bezier(.2,.8,.2,1), visibility 0s linear .32s;
  }
  .sheet-open .sheet { transform: none; visibility: visible; transition: transform .32s cubic-bezier(.2,.8,.2,1); }
  .sheet-handle { width: 40px; height: 4px; border-radius: 2px; background: rgba(255,255,255,.25); margin: 0 auto 12px; }
  .sheet-head { display: flex; align-items: center; justify-content: space-between; }
  .sheet-head h2 { font-size: 2rem; margin: 0; }
  .sheet-close { width: 36px; height: 36px; border-radius: 50%; border: 0; background: rgba(255,255,255,.1); color: var(--white); cursor: pointer; }
  .sheet-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.3rem .4rem; margin: 1.4rem 0 1.6rem; }
  .tile { color: var(--white); }
  .tile .qa-ico { width: 54px; height: 54px; background: transparent; }
  .tile .qa-ico.gold { background: var(--gold); }
  .tile[hidden] { display: none; }
  .sheet-socials { display: flex; justify-content: center; gap: .6rem; padding-top: 1.2rem; border-top: 1px solid rgba(255,255,255,.1); }
  .sheet-socials a { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.08); }
  .sheet-socials svg { width: 18px; height: 18px; fill: var(--white); }

  /* Install banner */
  .install-banner {
    display: flex; position: fixed; left: 10px; right: 10px; z-index: 125;
    bottom: calc(var(--tab-h) + var(--safe-b) + 10px);
    align-items: center; gap: .7rem; background: var(--white); padding: 10px 12px;
    box-shadow: 0 20px 50px -15px rgba(0,0,0,.6); animation: rise .4s cubic-bezier(.2,.8,.2,1);
  }
  .install-banner[hidden] { display: none; }
  .has-player .install-banner { bottom: calc(var(--tab-h) + var(--safe-b) + 106px); }
  .install-banner img { border-radius: 10px; flex: none; }
  .ib-text { flex: 1; min-width: 0; line-height: 1.25; }
  .ib-text strong { display: block; font-size: .9rem; }
  .ib-text small { color: var(--muted); font-size: .75rem; }
  .ib-close { border: 0; background: none; color: var(--muted); font-size: 1rem; padding: 6px; cursor: pointer; }
  @keyframes rise { from { transform: translateY(30px); opacity: 0; } }
}

/* Install guide (all screen sizes) */
.install-guide { position: fixed; inset: 0; z-index: 200; display: grid; place-items: end center; padding: 16px 16px calc(16px + env(safe-area-inset-bottom, 0px)); background: rgba(0,0,0,.65); opacity: 0; transition: opacity .25s; }
.install-guide[hidden] { display: none; }
.install-guide.open { opacity: 1; }
.ig-card { width: min(420px, 100%); background: var(--white); color: var(--text); padding: 1.6rem 1.4rem 1.3rem; text-align: center; display: grid; gap: .7rem; transform: translateY(24px); transition: transform .3s cubic-bezier(.2,.8,.2,1); }
.install-guide.open .ig-card { transform: none; }
.ig-card [hidden] { display: none; }
.ig-icon { margin: 0 auto; border-radius: 14px; }
.ig-card h3 { margin: .2rem 0 0; font-size: 2rem; }
.ig-steps { text-align: left; margin: .2rem 0 .4rem; padding: 0; list-style: none; counter-reset: s; display: grid; gap: .7rem; }
.ig-steps li { counter-increment: s; display: grid; grid-template-columns: 28px 1fr; gap: .7rem; align-items: start; font-size: .95rem; line-height: 1.45; }
.ig-steps li::before { content: counter(s); width: 28px; height: 28px; border-radius: 50%; background: var(--black); color: var(--gold-2); display: grid; place-items: center; font-weight: 700; font-size: .85rem; }
.inline-ico { width: 18px; height: 18px; fill: #1a73e8; vertical-align: -3px; display: inline-block; }
@media (min-width: 769px) { .install-guide { place-items: center; } }

/* Installed (home-screen) app */
.standalone .install-tile, .standalone .install-banner { display: none !important; }
