/* Phone homepage only. Desktop hero, atlas, and nav are unchanged. */
.m-hero,.m-atlas-head,.m-planets,.m-foot,.hero-video-m{display:none}

@media (max-width:699px){
  body.is-home{background:#100b24}
  body.is-home .hero-video-m{display:block}

  /* Top bar over the video: brand + language pill + menu. */
  body.is-home .topbar{position:absolute;top:0;left:0;right:0;z-index:50;padding:calc(env(safe-area-inset-top) + 14px) 16px 0;background:transparent;pointer-events:none}
  body.is-home.nav-on-dark .topbar-in,body.is-home .topbar-in{max-width:none;min-height:0;gap:10px;padding:0;background:transparent;border:0;box-shadow:none;backdrop-filter:none;-webkit-backdrop-filter:none;pointer-events:auto}
  body.is-home .logo{gap:9px;text-shadow:0 2px 12px #0b0925}
  body.is-home .logo img{display:none}
  body.is-home .logo::before{content:"✧";width:34px;height:34px;border:1px solid rgba(255,226,179,.7);border-radius:50%;display:grid;place-items:center;background:rgba(36,21,73,.5);color:#f3d7ae;font-size:21px;line-height:1}
  body.is-home .logo span{display:inline;font-size:15px;font-weight:750;white-space:nowrap}
  body.is-home .search.mini,body.is-home .nav-more-btn{display:none}
  body.is-home .lang-switch{height:36px;min-width:36px;padding:0 10px;border:1px solid rgba(239,219,255,.28);border-radius:18px;background:rgba(36,24,65,.52);backdrop-filter:blur(16px);-webkit-backdrop-filter:blur(16px)}
  body.is-home .lang-switch button{color:#fff;background:transparent;box-shadow:none;padding:0 2px;font-weight:650}
  body.is-home .lang-switch button[aria-pressed="true"]{display:none}
  body.is-home .nav-menu{width:36px;height:36px;border:1px solid rgba(239,219,255,.28);border-radius:18px;color:#fff;background:rgba(36,24,65,.52);backdrop-filter:blur(16px);-webkit-backdrop-filter:blur(16px)}

  /* Drawer uses the existing nav actions. */
  body.is-home.nav-drawer::before{content:"";position:fixed;inset:0;z-index:40;background:#0b061bd4}
  body.is-home.nav-drawer .topbar{z-index:80}
  body.is-home .topnav.is-open{position:fixed;z-index:2;top:0;right:0;bottom:0;left:auto;width:min(320px,85vw);height:100%;margin:0;padding:25px 20px;border:0;border-left:1px solid #b78de35c;border-radius:0;background:#241838;box-shadow:-15px 0 50px #0007;max-height:none}
  body.is-home .topnav.is-open a,body.is-home .topnav.is-open .nav-ex{display:block;width:100%;padding:16px 10px;border-bottom:1px solid #ffffff1a;border-radius:0;background:transparent;color:#f9f4ff;text-align:left}
  body.is-home .topnav.is-open>.nav-donate{display:inline-flex;width:auto;max-width:100%;align-self:flex-start;margin:12px 10px 4px;padding:8px 16px;border:1px solid rgba(220,195,155,.72);border-radius:999px;background:linear-gradient(115deg,rgba(90,63,176,.55),rgba(220,195,155,.16));color:#F3D69C;text-align:center;box-shadow:inset 0 0 0 1px rgba(174,140,207,.35)}
  body.is-home .topnav.is-open>.nav-donate:hover,body.is-home .topnav.is-open>.nav-donate:focus-visible{border-color:#E6C79E;background:rgba(220,195,155,.24);color:#F7E7C4}
  body.is-home .nav-overflow{border-top:0;margin:0;padding:0}
  body.is-home .nav-overflow-label{padding:18px 10px 4px;color:#e5caa4}

  /* Page 1 fills one small viewport. The top bar is overlaid, so do not pull the hero up by the header height. */
  body.is-home{overflow-x:clip}
  body.is-home main{overflow-x:clip}
  body.is-home .hero-screen{height:100svh;min-height:100svh;max-height:100svh;margin-top:0;display:block;overflow:hidden;background:#0d0a21}
  body.is-home .hero-screen::after{display:none}
  body.is-home .hero-media{position:absolute;inset:0;display:block;width:100%;aspect-ratio:auto}
  body.is-home .hero-frame{position:absolute;inset:0;width:100%;height:100%;max-width:none;aspect-ratio:auto;background:#0d0a21}
  body.is-home .hero-frame::before,body.is-home .hero-portrait{display:none}
  body.is-home .hero-video{display:none}
  body.is-home .hero-video-m{position:absolute;inset:0;z-index:1;width:100%;height:100%;object-fit:cover;object-position:center 42%;background:transparent;-webkit-mask-image:none;mask-image:none}
  body.is-home .hero-video-m.is-still,body.is-home .hero-video-m.is-broken{opacity:0}
  body.is-home .hero-frame::after{inset:0;z-index:2;background:linear-gradient(180deg,rgba(8,7,26,.48),transparent 18%,transparent 48%,rgba(13,8,32,.14) 60%,rgba(13,8,32,.76) 83%,#120c2a 100%)}
  body.is-home .hero-shade{display:block;position:absolute;inset:0;z-index:2;pointer-events:none;background:linear-gradient(90deg,rgba(15,10,33,.12),transparent 40%,rgba(15,10,33,.12))}
  body.is-home .hero-copy{display:none}
  body.is-home .m-hero{display:block;position:absolute;left:18px;right:18px;bottom:max(10px,env(safe-area-inset-bottom));z-index:3;text-align:center}
  body.is-home .m-hero .eyebrow{color:#f2d8ae;letter-spacing:.22em;font-size:10px;font-weight:700;margin-bottom:6px;text-shadow:0 2px 10px #130a29}
  body.is-home .m-hero h1{font-family:Georgia,"Songti SC","Noto Serif CJK SC",serif;font-size:clamp(26px,7.4vw,34px);letter-spacing:.04em;font-weight:700;margin:0 0 6px;line-height:1.15;color:#f9f4ff;text-shadow:0 4px 24px rgba(13,5,38,.85)}
  body.is-home .m-hero p{color:#e6d7f5;font-size:12px;line-height:1.45;margin:0 auto 12px;text-shadow:0 2px 12px #120c28}
  body.is-home .m-hero .buttons{display:flex;gap:10px;justify-content:center;max-width:420px;margin:auto}
  body.is-home .m-hero .primary,body.is-home .m-hero .secondary{border-radius:999px;min-height:42px;padding:0 16px;font-weight:750;flex:1;display:grid;place-items:center;text-decoration:none}
  body.is-home .m-hero .primary{background:linear-gradient(120deg,#ffe5bc,#e8bd8d);color:#332344;box-shadow:0 0 24px #e6b57e66;border:1px solid #fff0d1}
  body.is-home .m-hero .secondary{border:1px solid #c7a7e99c;background:#35234d99;color:#f6eaff;backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px)}
  body.is-home .m-hero .scrollhint{display:block;color:#d5c1e6;font-size:10px;letter-spacing:.08em;margin-top:8px}

  /* Page 2: six floating planets. The desktop seven-planet row stays hidden. */
  body.is-home .planet-scene{background:#100b24}
  body.is-home #footer{display:none}
  body.is-home #h-toc{scroll-margin-top:0}
  body.is-home .planet-scene .scene{height:100svh;max-height:100svh;min-height:0;box-sizing:border-box;display:flex;flex-direction:column;justify-content:space-between;padding:12px 14px max(8px,env(safe-area-inset-bottom));overflow:hidden;background:radial-gradient(ellipse at 13% 15%,#42275d 0,transparent 39%),radial-gradient(ellipse at 92% 72%,#392050 0,transparent 42%),linear-gradient(180deg,#120c2a 0%,#19102f 38%,#100b25 100%)}
  body.is-home .planet-scene .scene:before{opacity:.52;background-image:radial-gradient(1px 1px at 12% 10%,#fff 98%,transparent),radial-gradient(1px 1px at 83% 23%,#f6d6ff 98%,transparent),radial-gradient(2px 2px at 43% 32%,#e8cfa9 98%,transparent),radial-gradient(1px 1px at 74% 56%,#fff 98%,transparent),radial-gradient(1px 1px at 22% 77%,#d5c2ff 98%,transparent),radial-gradient(2px 2px at 61% 87%,#e3ccff 98%,transparent);background-size:211px 239px}
  body.is-home .planet-scene .heading,body.is-home .planet-scene .galaxy,body.is-home .planet-scene .footnote{display:none}
  body.is-home .m-atlas-head,body.is-home .m-planets{display:block;position:relative;z-index:1;text-align:center}
  body.is-home .m-atlas-head{flex:none}
  body.is-home .m-atlas-head .kicker{font-size:10px;letter-spacing:.22em;color:#e5caa4;margin-bottom:4px}
  body.is-home .m-atlas-head h2{font-family:Georgia,"Songti SC",serif;font-size:clamp(20px,5.4vw,26px);letter-spacing:.04em;color:#f5ebff;margin:0 0 4px;font-weight:500}
  body.is-home .m-atlas-head p{font-size:12px;color:#bfb0d3;margin:0 auto 8px;line-height:1.45}
  body.is-home .m-planets{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px 4px;flex:1 1 auto;align-content:center;max-width:490px;width:100%;margin:0 auto;min-height:0}
  body.is-home .m-planets .m-planet:nth-child(7){grid-column:1 / -1;flex-direction:row;justify-content:center;gap:10px;transform:none;padding-bottom:0}
  body.is-home .m-planets .m-planet:nth-child(7) .desc{display:none}
  body.is-home .m-planets:before{content:"";position:absolute;inset:6% 50% 7%;width:1px;background:linear-gradient(180deg,transparent,#c9a4f32b,transparent);pointer-events:none}
  body.is-home .m-planet{position:relative;min-height:0;border:0;border-radius:0;background:transparent;padding:0 1px 6px;display:flex;align-items:center;justify-content:flex-start;flex-direction:column;color:#f4ecff;font:inherit;cursor:pointer;isolation:isolate;-webkit-tap-highlight-color:transparent}
  body.is-home .m-planet:nth-child(even){transform:translateY(12px)}
  body.is-home .m-planet .orb{position:relative;width:min(100%,132px);height:108px;display:flex;align-items:center;justify-content:center;filter:drop-shadow(0 0 14px var(--aura));animation:m-float var(--duration) ease-in-out infinite;animation-delay:var(--delay)}
  body.is-home .m-planet .orb:before{content:"";position:absolute;width:75%;height:75%;border-radius:50%;background:var(--aura);filter:blur(27px);opacity:.33;z-index:-1}
  body.is-home .m-planet .orb img{max-width:100%;max-height:100%;object-fit:contain;display:block;pointer-events:none;-webkit-user-drag:none;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none}
  body.is-home .m-planets .m-planet:nth-child(7) .orb{width:64px;height:64px}
  body.is-home .m-planet:active .orb img{transform:scale(1.07);filter:brightness(1.13)}
  body.is-home .m-planet .number{font-family:Georgia,serif;font-size:10px;color:#e5c99f;letter-spacing:.16em;margin:2px 0 2px}
  body.is-home .m-planet strong{font-size:13px;white-space:nowrap;font-weight:650;color:#f4ecff}
  body.is-home .m-planet .desc{font-size:10px;color:#bdafce;line-height:1.35;margin-top:2px;max-width:150px}
  body.is-home .m-planet:after{content:"";position:absolute;bottom:0;width:28px;height:1px;background:linear-gradient(90deg,transparent,#d5b88d99,transparent)}
  body.is-home .m-foot{display:block;flex:none;margin:8px 0 0;color:#aa94c6;font-size:11px;line-height:1.45;text-align:center}
  body.is-home .m-foot span{color:#aa94c6}
  @keyframes m-float{0%,100%{translate:0 0}50%{translate:0 -9px}}
}
@media (max-width:360px){
  body.is-home .m-planet .orb{width:min(100%,112px);height:92px}
  body.is-home .m-planet strong{font-size:12px}
}
@media (max-width:699px) and (max-height:700px){
  body.is-home .m-hero{bottom:max(6px,env(safe-area-inset-bottom))}
  body.is-home .m-hero h1{font-size:26px;margin-bottom:4px}
  body.is-home .m-hero p{margin-bottom:8px;font-size:11px}
  body.is-home .m-hero .primary,body.is-home .m-hero .secondary{min-height:38px}
  body.is-home .m-hero .scrollhint{display:none}
  body.is-home .m-planet .orb{width:min(100%,108px);height:86px}
  body.is-home .m-planet:nth-child(even){transform:translateY(8px)}
  body.is-home .m-atlas-head p{margin-bottom:4px}
  body.is-home .m-foot{margin-top:4px;font-size:10px}
}
@media (max-width:699px) and (prefers-reduced-motion:reduce){
  body.is-home .m-planet .orb{animation:none}
}
