/* EXUPERY DISCOVERY / HOME V6 — premium mobile planetary selector.
   Intentional mobile-only layer. Desktop V5 and the three destination pages are unchanged.
   Ref: user-approved 3-way segmented bar, central poster, accessible arrows, CTA and earth glimmer. */
@media (max-width: 700px) {
  :root { --mobileInk: #07162f; }
  .planetSection { padding-top: 0; overflow: hidden; }
  .planetSection::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: min(96svh, 780px);
    pointer-events: none;
    z-index: 0;
    background:
      radial-gradient(circle at 14% 12%, rgba(255,220,150,.28) 0 2px, transparent 3px),
      radial-gradient(circle at 87% 16%, rgba(255,237,196,.24) 0 2px, transparent 3px),
      radial-gradient(circle at 22% 23%, rgba(255,225,173,.17) 0 1.6px, transparent 3px),
      radial-gradient(circle at 79% 28%, rgba(205,227,255,.17) 0 1.6px, transparent 3px),
      radial-gradient(ellipse 34% 22% at 14% 20%, rgba(43,82,176,.23), transparent 72%),
      radial-gradient(ellipse 31% 22% at 88% 23%, rgba(126,71,182,.23), transparent 74%),
      radial-gradient(ellipse 54% 20% at 50% 33%, rgba(19,44,96,.33), transparent 78%),
      linear-gradient(180deg, rgba(9,22,50,.42), rgba(9,22,50,0) 42%);
  }
  .planetSection::after {
    content: "";
    position: absolute;
    right: -76px;
    top: 120px;
    width: 235px;
    height: 158px;
    pointer-events: none;
    z-index: 0;
    opacity: .68;
    transform: rotate(-20deg);
    background: radial-gradient(ellipse at 50% 50%, rgba(255,228,169,.20), rgba(143,120,236,.22) 26%, rgba(59,95,208,.20) 42%, transparent 72%);
    filter: blur(8px);
  }
  .top {
    top: max(9px, env(safe-area-inset-top)); width: calc(100% - 22px);
    min-height: 62px; gap: 8px; padding: 7px 9px 7px 14px;
    background: linear-gradient(115deg, rgba(90,128,191,.20), rgba(13,31,66,.80) 40%,rgba(9,25,57,.72));
    border-color: rgba(185,215,255,.31); box-shadow: inset 0 1px 0 rgba(255,255,255,.19),0 12px 40px #0004;
    backdrop-filter: blur(18px) saturate(1.3); -webkit-backdrop-filter: blur(18px) saturate(1.3);
  }
  .brand { min-width: 0; flex: 1; font-size: clamp(10px, 3vw, 12px); gap: 7px; letter-spacing: .036em; }
  .brand>span:not(.brandStar) { display:inline; font-size: inherit; line-height: 1.1; letter-spacing: inherit; white-space: nowrap; }
  .brandStar { font-size: 19px; }
  .headerActions { margin-left: auto; gap: 5px; flex-shrink: 0; }
  .motionToggle,.musicToggle,.menuToggle { width: 41px; height: 41px; border-color: rgba(163,198,255,.25); background: rgba(15,38,83,.43); }
  .mobileStage {
    display: block; position: relative; isolation: isolate; z-index: 4;
    max-width: 488px; padding: calc(107px + env(safe-area-inset-top)) 19px 180px;
    margin: 0 auto; text-align: center;
    --world-rgb: 255,202,104;
  }
  /* V6.3: fade the *stage atmosphere*, not just the Earth image.
     In V6.2 its lower purple-blue glow ended at the narrow column boundary,
     creating the rectangular silhouette visible in mobile screenshots. */
  .mobileStage::before {
    content: ""; position: absolute; pointer-events:none; z-index:-2;
    -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 58%, transparent 94%);
    mask-image: linear-gradient(to bottom, #000 0%, #000 58%, transparent 94%);
    inset: 42px -22px -20px; background:
      radial-gradient(ellipse 76% 22% at 50% 60%, rgba(35,80,164,.14), transparent 76%),
      radial-gradient(ellipse 56% 24% at 50% 34%, rgba(86,65,162,.11), transparent 79%),
      radial-gradient(circle at 12% 22%, rgba(255,225,168,.18) 0 2px, transparent 4px),
      radial-gradient(circle at 88% 18%, rgba(255,243,220,.22) 0 2px, transparent 4px),
      radial-gradient(circle at 20% 70%, rgba(154,190,255,.14) 0 1.5px, transparent 3px),
      radial-gradient(circle at 82% 74%, rgba(255,214,122,.15) 0 1.5px, transparent 3px),
      radial-gradient(ellipse 68% 32% at 50% 102%, rgba(72,112,201,.24), transparent 84%);
  }
  .mobileStage > .eyebrow {
    font-size: clamp(9px,2.8vw,11px); font-weight:850; line-height:1.6;
    letter-spacing:.13em; margin: 0 0 8px; color:#ffd580;
  }
  .mobileStage > h2 {
    font-size:clamp(29px,7.8vw,40px); font-weight:820; letter-spacing:-.045em;
    line-height:1.14; margin:0 0 27px; white-space:nowrap;
    text-shadow: 0 3px 15px #0003;
  }
  .mobileStage > h2 em { color:#ffcd76; font-style:italic; }
  .worldTabs {
    display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:0;
    width:100%; padding:4px; margin:0 auto 18px;
    border-radius:999px; background:linear-gradient(120deg,rgba(24,46,85,.89),rgba(23,37,77,.82));
    border:1px solid rgba(167,196,255,.42); box-shadow:inset 0 1px 0 rgba(255,255,255,.09),0 8px 22px #0003;
    overflow:visible;
  }
  .worldTabs button {
    min-width:0; min-height:67px; padding:10px 4px; display:flex;
    flex-direction:column; justify-content:center; align-items:center; gap:5px;
    border:1px solid transparent; border-radius:999px;
    background:transparent; color:#d4dff0; box-shadow:none;
    transition:background .32s ease, box-shadow .32s ease, color .28s ease, transform .3s ease;
    font-size:inherit;
  }
  .worldTabs button + button { position:relative; }
  .worldTabs button + button:not(.is-selected)::before {
    content:""; position:absolute; left:-1px; top:18%; bottom:18%; width:1px;
    background:linear-gradient(transparent,rgba(178,205,249,.32),transparent);
    pointer-events:none;
  }
  .worldTabs button .tabName { font-size:clamp(13px,3.9vw,17px); font-weight:780; line-height:1.12; letter-spacing:-.024em; }
  .worldTabs button .tabAges { font-size:clamp(10px,3.1vw,13px); line-height:1.14; color:#9db2d4; font-weight:480; letter-spacing:0; }
  .worldTabs button.is-selected { transform:translateY(-1px); color:#10152b; background:linear-gradient(132deg,#ffdb8e 0%,#ffd074 52%,#f7b64c 100%);
    border-color:#ffe6a7; box-shadow:0 0 0 1px rgba(255,211,125,.23),0 6px 24px rgba(255,183,70,.3),inset 0 1px 0 rgba(255,255,255,.55); }
  .worldTabs button.is-selected .tabAges { color:#45351f; font-weight:560; }
  .worldTabs button.school.is-selected { background:linear-gradient(125deg,#ffb5ab,#ff837c 56%,#fa6369); border-color:#ffc4bd; box-shadow:0 0 0 1px rgba(255,130,127,.24),0 6px 24px #fb717244; }
  .worldTabs button.high.is-selected { background:linear-gradient(125deg,#bbebff,#8ad5ff 58%,#6aaff7); border-color:#c2ebff; box-shadow:0 0 0 1px rgba(126,205,255,.24),0 6px 24px #62bfff38; }
  .worldTabs button:focus-visible { outline:2px solid #ffe4ad; outline-offset:3px; }
  .mobileFrame {
    position:relative; width:calc(100% - 15px); max-width:390px; margin:0 auto;
    overflow:visible; padding:0; border:1.5px solid rgba(var(--world-rgb),.86);
    border-radius:25px; background:#12274b;
    box-shadow:0 18px 48px #01061975,0 0 18px rgba(var(--world-rgb),.18),inset 0 1px 0 #fff2;
    transition:border-color .28s,box-shadow .28s;
    touch-action:pan-y;
  }
  .mobileFrame>a { border-radius:23px; overflow:hidden; display:block; }
  .mobileFrame img { display:block; width:100%; height:auto; aspect-ratio:1122/1402; border-radius:23px; }
  .posterArrow {
    position:absolute; top:50%; transform:translateY(-50%); width:47px; height:52px;
    display:flex; justify-content:center; align-items:center;
    background:linear-gradient(140deg,rgba(19,37,73,.97),rgba(7,20,49,.97));
    color:#fff6e6; border:1px solid rgba(var(--world-rgb),.72); border-radius:999px;
    box-shadow:0 7px 22px #0008,inset 0 1px 0 #ffffff16;
    font-size:32px; line-height:1; font-family:Georgia,serif; padding:0 0 6px;
    transition:background .2s,border-color .2s,box-shadow .2s;
    z-index:2;
  }
  .posterArrow.prev { left:-23px; }
  .posterArrow.next { right:-23px; }
  .posterArrow:active { background:#213b6a; box-shadow:0 0 18px rgba(var(--world-rgb),.32); }
  .mobileInfo { margin:24px 0 22px; }
  .mobileInfo strong { font-size:clamp(15px,4.4vw,19px); font-weight:800; letter-spacing:-.025em; line-height:1.35; min-height:unset; }
  .mobileInfo p { gap:7px; font-size:clamp(12px,3.2vw,14px); line-height:1.5; color:#c6d3e7; margin-top:7px; }
  .metaDot { color:#ffd27a; }
  .mobileExplore {
    width:calc(100% - 8px); max-width:390px; min-height:59px; border:1px solid #ffe3a4;
    border-radius:100px; background:linear-gradient(115deg,#ffdd8e 0%,#ffd275 47%,#fab95b 100%);
    color:#0a1931; font-size:clamp(13px,3.7vw,16px); font-weight:850; letter-spacing:-.01em;
    padding:15px 23px; margin:0 auto;
    box-shadow:0 9px 28px #efac552b,inset 0 2px 0 #fff8dd96;
    transition:filter .2s,transform .2s,box-shadow .2s;
  }
  .mobileExplore span { font-size:22px; font-weight:500; }
  .mobileExplore:active { transform:scale(.99); }
  .mobileDots { margin-top:24px; gap:8px; }
  .mobileDots i { width:8px; height:8px; background:#64789e8f; }
  .mobileDots i.active { width:31px; background:#ffd074; box-shadow:0 0 12px #ffcd7955; }
  .swipeHint { font-size:12px; color:#adbcd3; margin:11px 0 0; }
  .swipeHint span { font-size:14px; color:#ffd580; }
}
@media (min-width: 502px) and (max-width: 700px) {
  .mobileStage { padding-left: 28px; padding-right: 28px; padding-top: calc(116px + env(safe-area-inset-top)); }
  .mobileStage::before {
    inset: 34px -32px -26px;
    background:
      radial-gradient(ellipse 86% 26% at 50% 58%, rgba(32,77,160,.16), transparent 76%),
      radial-gradient(ellipse 60% 24% at 50% 34%, rgba(89,67,167,.12), transparent 79%),
      radial-gradient(circle at 11% 19%, rgba(255,227,174,.21) 0 2.2px, transparent 4px),
      radial-gradient(circle at 89% 16%, rgba(255,239,204,.24) 0 2.2px, transparent 4px),
      radial-gradient(circle at 20% 64%, rgba(163,198,255,.16) 0 1.7px, transparent 3px),
      radial-gradient(circle at 83% 68%, rgba(255,214,122,.17) 0 1.7px, transparent 3px),
      radial-gradient(ellipse 74% 34% at 50% 102%, rgba(85,125,214,.27), transparent 84%);
  }
  .mobileFrame { max-width: 430px; }
}
@media (max-width: 360px) {
  .top { padding-left:10px; padding-right:7px; gap:5px; }
  .brand { font-size:10px; gap:5px; }
  .brandStar { font-size:17px; }
  .headerActions { gap:4px; }
  .motionToggle,.musicToggle,.menuToggle { width:36px; height:36px; }
  .mobileStage { padding-left:17px; padding-right:17px; padding-top:calc(102px + env(safe-area-inset-top)); }
  .mobileStage>h2 { font-size:clamp(25px,7.75vw,29px); margin-bottom:23px; }
  .worldTabs button { min-height:60px; padding:8px 2px; gap:3px; }
  .worldTabs button .tabName { font-size:12px; }
  .worldTabs button .tabAges { font-size:10px; }
  .posterArrow { width:42px; height:47px; font-size:28px; }
  .posterArrow.prev { left:-19px; }
  .posterArrow.next { right:-19px; }
  .mobileInfo { margin-top:21px; }
  .mobileExplore { min-height:55px; padding:13px 18px; font-size:12.5px; }
}
@media (max-width:700px) and (prefers-reduced-motion:reduce) {
  .worldTabs button, .mobileFrame, .posterArrow, .mobileExplore { transition:none !important; }
}

/* V6.2 — the horizon belongs to the whole section, not the 488px poster column.
   Two-axis feathering removes the rectangular edges without changing the poster. */
.mobileEarthHorizon { display: none; }
@media (max-width: 700px) {
  .mobileStage::after { display: none; }
  .planetSection { position: relative; overflow: hidden; }
  .mobileEarthHorizon {
    position: absolute;
    display: block;
    inset: auto 0 -4px 0;
    width: 100%;
    height: clamp(170px, 28vw, 225px);
    pointer-events: none;
    z-index: 1;
    opacity: .77;
    background: url("earth-horizon.webp") center 46% / cover no-repeat;
    -webkit-mask-image:
      linear-gradient(to right, transparent 0%, #000 9%, #000 91%, transparent 100%),
      linear-gradient(to bottom, transparent 0%, #000 23%, #000 48%, transparent 90%, transparent 100%);
    -webkit-mask-composite: source-in;
    mask-image:
      linear-gradient(to right, transparent 0%, #000 9%, #000 91%, transparent 100%),
      linear-gradient(to bottom, transparent 0%, #000 23%, #000 48%, transparent 90%, transparent 100%);
    mask-composite: intersect;
  }
  .mobileEarthHorizon::after {
    content: ""; position: absolute; inset: 7% 0 12%;
    background: radial-gradient(ellipse 45% 42% at 53% 45%, rgba(255,192,106,.15), transparent 85%),
                radial-gradient(ellipse 60% 30% at 50% 55%, rgba(43,98,193,.25), transparent 90%);
    mix-blend-mode: screen;
  }
}
@media (min-width: 502px) and (max-width: 700px) {
  .mobileEarthHorizon { height: clamp(180px, 31vw, 235px); }
}
@media (max-width: 380px) {
  .mobileEarthHorizon { height: 166px; }
}
