/* Celestial Dial landing page — ported from the "CelestialDial.dc.html" Claude Design file
   (claude.ai/design/p/4ede657c…). Markup kept 1:1; the original DCLogic interactivity
   (tweaks, the tap-a-sign sample selector, and the parallax/tilt/glow) is reimplemented
   in the React effects below. Auth links point at the live app worker. The Claude-only
   <dc-import name="Dial"> is substituted with a static on-brand dial. */

const MARKUP = `
  <!-- ===================== NAV ===================== -->
  <header style="position:sticky;top:0;z-index:50;background:rgba(245,239,227,.82);backdrop-filter:blur(12px);border-bottom:1px solid rgba(34,26,46,.08)">
    <nav style="max-width:1180px;margin:0 auto;padding:16px 28px;display:flex;align-items:center;justify-content:space-between;gap:24px">
      <a href="#top" style="display:flex;align-items:center;gap:9px;text-decoration:none;color:#221A2E">
        <span style="font-size:19px;color:var(--accent,#805FBF)">✦</span>
        <span style="font-family:'Newsreader',Georgia,serif;font-size:23px;font-weight:500;letter-spacing:.01em">Celestial Dial</span>
      </a>
      <div style="display:flex;align-items:center;gap:30px">
        <div data-r="navlinks" style="display:flex;align-items:center;gap:26px;font-size:14.5px;font-weight:500">
          <a href="#how" style="color:#4B4357;text-decoration:none">How it works</a>
          <a href="#sample" style="color:#4B4357;text-decoration:none">A sample</a>
          <a href="#pricing" style="color:#4B4357;text-decoration:none">Pricing</a>
          <a href="#faq" style="color:#4B4357;text-decoration:none">FAQ</a>
          <a href="https://app.celestialdial.com/find-your-sign" style="color:#4B4357;text-decoration:none">Find your sign</a>
          <a href="https://app.celestialdial.com/app/login" style="color:#4B4357;text-decoration:none">Sign in</a>
        </div>
        <a href="https://app.celestialdial.com/app/signup" style="background:var(--accent,#805FBF);color:#fff;text-decoration:none;font-weight:600;font-size:14.5px;padding:10px 20px;border-radius:999px;box-shadow:0 5px 14px rgba(128,95,191,.32)">Start free week</a>
      </div>
    </nav>
  </header>

  <!-- ===================== HERO ===================== -->
  <section id="top" style="position:relative;background:#F5EFE3">
    <span data-motif style="position:absolute;top:90px;left:7%;color:var(--accent,#805FBF);font-size:14px;animation:asterTwinkle 4s ease-in-out infinite">✦</span>
    <span data-motif style="position:absolute;top:220px;left:46%;color:#221A2E;opacity:.25;font-size:9px;animation:asterTwinkle 5.5s ease-in-out .5s infinite">✦</span>
    <span data-motif style="position:absolute;top:140px;right:38%;color:var(--accent,#805FBF);font-size:10px;animation:asterTwinkle 6s ease-in-out 1s infinite">✦</span>
    <span data-motif style="position:absolute;bottom:120px;left:13%;color:#221A2E;opacity:.2;font-size:12px;animation:asterTwinkle 5s ease-in-out .8s infinite">✦</span>

    <div data-r="hero" style="max-width:1180px;margin:0 auto;padding:78px 28px 92px;display:grid;grid-template-columns:1.05fr .95fr;gap:56px;align-items:center">
      <div>
        <div style="display:inline-flex;align-items:center;gap:8px;font-size:13px;font-weight:600;letter-spacing:.12em;text-transform:uppercase;color:var(--accent,#805FBF);background:rgba(128,95,191,.1);padding:7px 14px;border-radius:999px">Your daily horoscope, by text</div>
        <h1 data-r="hero-h1" style="font-family:'Newsreader',Georgia,serif;font-weight:500;color:#221A2E;font-size:62px;line-height:1.04;letter-spacing:-.015em;margin:22px 0 0">Begin the day with a<br>moment that’s yours.</h1>
        <p style="font-size:19px;line-height:1.6;max-width:498px;margin:24px 0 0;color:#564E60">Celestial Dial sends one thoughtful, personal reading to your phone each morning — at the hour you choose. Before the inbox fills and everyone needs you, there’s a quiet minute that belongs to you alone.</p>
        <div style="display:flex;flex-wrap:wrap;align-items:center;gap:14px;margin-top:34px">
          <a href="https://app.celestialdial.com/app/signup" style="background:var(--accent,#805FBF);color:#fff;text-decoration:none;font-weight:600;font-size:16px;padding:15px 30px;border-radius:999px;box-shadow:0 8px 22px rgba(128,95,191,.34)">Start your free week</a>
          <a href="#sample" style="background:transparent;color:#221A2E;text-decoration:none;font-weight:600;font-size:16px;padding:15px 26px;border-radius:999px;border:1px solid rgba(34,26,46,.18)">Read a sample →</a>
        </div>
        <p style="font-size:14px;color:#8A8194;margin:20px 0 0;display:flex;align-items:center;gap:8px"><span style="color:var(--accent,#805FBF)">✦</span> 7 days free, then $9/mo · cancel anytime by texting STOP</p>
      </div>

      <!-- Phone mockup -->
      <div style="display:flex;justify-content:center">
        <div data-r="phone" data-tilt style="width:312px;background:#15101D;border-radius:48px;padding:13px;box-shadow:0 40px 80px -24px rgba(28,20,40,.55),0 0 0 1px rgba(255,255,255,.04) inset;transition:transform .25s ease-out;will-change:transform">
          <div style="background:#ECE6DC;border-radius:36px;overflow:hidden;display:flex;flex-direction:column;height:600px;position:relative">
            <div style="position:absolute;top:11px;left:50%;transform:translateX(-50%);width:96px;height:26px;background:#15101D;border-radius:999px;z-index:5"></div>
            <div style="display:flex;justify-content:space-between;align-items:center;padding:15px 24px 6px;font-size:13px;font-weight:600;color:#221A2E">
              <span>7:02</span>
              <span style="letter-spacing:1px;opacity:.85">●●● ▮</span>
            </div>
            <div style="display:flex;flex-direction:column;align-items:center;gap:5px;padding:8px 0 12px;border-bottom:1px solid rgba(34,26,46,.08);background:rgba(236,230,220,.9)">
              <div style="width:46px;height:46px;border-radius:50%;background:#221A2E;display:flex;align-items:center;justify-content:center;color:var(--accent,#805FBF);font-size:21px">✦</div>
              <div style="font-size:13.5px;font-weight:600;color:#221A2E">Celestial Dial</div>
            </div>
            <div style="flex:1;padding:18px 16px;display:flex;flex-direction:column;gap:10px;overflow:hidden">
              <div style="text-align:center;font-size:11px;color:#9A9089;margin-bottom:2px">Tuesday, May 4 · 7:02 AM</div>
              <div style="align-self:flex-start;max-width:84%;background:#fff;color:#2A2336;font-size:14.5px;line-height:1.5;padding:12px 15px;border-radius:19px;border-bottom-left-radius:5px;box-shadow:0 1px 2px rgba(34,26,46,.08)">Diane, today’s clear thinking is a gift, and you’ll want to use it on something that matters. The Mercury–Pluto trine sharpens your read on a situation you’ve been quietly turning over. Trust the pattern you’re seeing and say it out loud.</div>
              <div style="align-self:flex-end;font-size:10.5px;color:#9A9089;margin-right:6px">Delivered</div>
            </div>
            <div style="padding:10px 16px 14px;display:flex;align-items:center;gap:8px">
              <div style="flex:1;height:34px;border-radius:999px;border:1px solid rgba(34,26,46,.16);display:flex;align-items:center;padding:0 14px;font-size:12.5px;color:#9A9089">Text Message</div>
            </div>
            <div style="width:120px;height:5px;border-radius:999px;background:#221A2E;opacity:.35;margin:0 auto 9px"></div>
          </div>
        </div>
      </div>
    </div>
  </section>

  <!-- ===================== TRUST STRIP ===================== -->
  <section style="background:#F5EFE3;border-top:1px solid rgba(34,26,46,.08);border-bottom:1px solid rgba(34,26,46,.08)">
    <div style="max-width:1180px;margin:0 auto;padding:26px 28px;display:flex;flex-wrap:wrap;justify-content:space-between;gap:24px;align-items:center;font-size:14.5px;color:#564E60">
      <span style="display:flex;align-items:center;gap:9px"><span style="color:var(--accent,#805FBF)">✦</span> A grounded minute before the day begins</span>
      <span style="display:flex;align-items:center;gap:9px"><span style="color:var(--accent,#805FBF)">✦</span> Written for the life you actually lead</span>
      <span style="display:flex;align-items:center;gap:9px"><span style="color:var(--accent,#805FBF)">✦</span> Yours alone · read it with your coffee</span>
    </div>
  </section>

  <!-- ===================== HOW IT WORKS ===================== -->
  <section id="how" style="background:#F5EFE3">
    <div style="max-width:1180px;margin:0 auto;padding:96px 28px">
      <div style="font-size:13px;font-weight:600;letter-spacing:.12em;text-transform:uppercase;color:var(--accent,#805FBF)">How it works</div>
      <h2 data-r="big" style="font-family:'Newsreader',Georgia,serif;font-weight:500;color:#221A2E;font-size:44px;line-height:1.1;letter-spacing:-.01em;margin:14px 0 0;max-width:620px">Three minutes to set up. Then it simply arrives.</h2>

      <div data-r="grid3" style="display:grid;grid-template-columns:repeat(3,1fr);gap:26px;margin-top:52px">
        <div style="background:#FCF9F2;border:1px solid rgba(34,26,46,.08);border-radius:18px;padding:32px 28px">
          <div style="width:42px;height:42px;border-radius:50%;background:rgba(128,95,191,.13);color:var(--accent,#805FBF);font-family:'Newsreader',serif;font-size:20px;display:flex;align-items:center;justify-content:center;font-weight:500">1</div>
          <h3 style="font-family:'Newsreader',Georgia,serif;font-weight:500;color:#221A2E;font-size:23px;margin:20px 0 10px">Tell us about you</h3>
          <p style="font-size:15.5px;margin:0;color:#564E60">Your name, your birthday, and — if you know it — when and where you were born. Enough to read your chart, and nothing you’ll have to go hunting for.</p>
        </div>
        <div style="background:#FCF9F2;border:1px solid rgba(34,26,46,.08);border-radius:18px;padding:32px 28px">
          <div style="width:42px;height:42px;border-radius:50%;background:rgba(128,95,191,.13);color:var(--accent,#805FBF);font-family:'Newsreader',serif;font-size:20px;display:flex;align-items:center;justify-content:center;font-weight:500">2</div>
          <h3 style="font-family:'Newsreader',Georgia,serif;font-weight:500;color:#221A2E;font-size:23px;margin:20px 0 10px">Choose your hour</h3>
          <p style="font-size:15.5px;margin:0;color:#564E60">Before the house wakes, or once it’s finally quiet again — pick the moment your reading arrives, in your own time zone. Change it whenever life does.</p>
        </div>
        <div style="background:#FCF9F2;border:1px solid rgba(34,26,46,.08);border-radius:18px;padding:32px 28px">
          <div style="width:42px;height:42px;border-radius:50%;background:rgba(128,95,191,.13);color:var(--accent,#805FBF);font-family:'Newsreader',serif;font-size:20px;display:flex;align-items:center;justify-content:center;font-weight:500">3</div>
          <h3 style="font-family:'Newsreader',Georgia,serif;font-weight:500;color:#221A2E;font-size:23px;margin:20px 0 10px">Let it find you</h3>
          <p style="font-size:15.5px;margin:0;color:#564E60">Each morning, one personal reading is already waiting in your texts. Nothing to download, nothing to remember — it simply arrives.</p>
        </div>
      </div>
    </div>
  </section>

  <!-- ===================== CHOOSE YOUR HOUR (dial) ===================== -->
  <section style="background:#FCF9F2;border-top:1px solid rgba(34,26,46,.08);border-bottom:1px solid rgba(34,26,46,.08)">
    <div data-r="dial" style="max-width:1180px;margin:0 auto;padding:90px 28px;display:grid;grid-template-columns:1fr auto;gap:64px;align-items:center">
      <div style="max-width:500px">
        <div style="font-size:13px;font-weight:600;letter-spacing:.12em;text-transform:uppercase;color:var(--accent,#805FBF)">Your dial</div>
        <h2 data-r="big" style="font-family:'Newsreader',Georgia,serif;font-weight:500;color:#221A2E;font-size:42px;line-height:1.1;letter-spacing:-.01em;margin:14px 0 16px">One small choice, and the whole day turns on it.</h2>
        <p style="font-size:17px;line-height:1.65;color:#564E60;margin:0 0 22px">This is the dial we’re named for. Choose the hour your reading arrives — we’ll hold that time for you every single morning, and you can move it whenever your days change.</p>
        <div style="display:flex;gap:10px;flex-wrap:wrap">
          <span style="display:inline-flex;align-items:center;gap:7px;font-size:13.5px;font-weight:500;color:#3D3548;background:#fff;border:1px solid rgba(34,26,46,.1);padding:8px 14px;border-radius:999px"><span style="color:var(--accent,#805FBF)">✦</span> 6:00 AM · with the first coffee</span>
          <span style="display:inline-flex;align-items:center;gap:7px;font-size:13.5px;font-weight:500;color:#3D3548;background:#fff;border:1px solid rgba(34,26,46,.1);padding:8px 14px;border-radius:999px"><span style="color:var(--accent,#805FBF)">✦</span> 8:00 PM · once the house is quiet</span>
        </div>
      </div>
      <div style="display:flex;flex-direction:column;align-items:center;gap:16px">
        <div style="position:relative;width:248px;height:248px;border-radius:50%;background:#221A2E;box-shadow:0 30px 60px -28px rgba(34,26,46,.55), inset 0 0 0 1px rgba(255,255,255,.05);display:flex;align-items:center;justify-content:center">
          <div style="position:absolute;inset:16px;border-radius:50%;border:1px dashed rgba(255,255,255,.13)"></div>
          <div style="position:absolute;top:14px;left:50%;width:16px;height:16px;margin-left:-8px;border-radius:50%;background:var(--accent,#805FBF);box-shadow:0 0 0 7px rgba(128,95,191,.18)"></div>
          <div style="text-align:center">
            <div style="font-family:'Newsreader',serif;font-size:42px;font-weight:500;color:#F4EEE0;line-height:1">7:00</div>
            <div style="font-size:11px;letter-spacing:.28em;color:#9A8FA0;text-transform:uppercase;margin-top:5px">AM · your hour</div>
          </div>
        </div>
        <div style="font-size:13px;color:#9A8FA0">Set it once — change it anytime</div>
      </div>
    </div>
  </section>

  <!-- ===================== SAMPLES (dark, tap-a-sign) ===================== -->
  <section id="sample" style="position:relative;background:#221A2E;overflow:hidden">
    <div data-glow style="position:absolute;width:560px;height:560px;border-radius:50%;background:radial-gradient(circle,rgba(128,95,191,.28),transparent 68%);pointer-events:none;opacity:0;transition:opacity .5s ease;filter:blur(28px);left:0;top:0;z-index:0;will-change:transform"></div>
    <span data-motif style="position:absolute;top:64px;left:10%;color:var(--accent,#805FBF);font-size:12px;animation:asterTwinkle 5s ease-in-out infinite">✦</span>
    <span data-motif style="position:absolute;top:130px;right:14%;color:#fff;opacity:.3;font-size:9px;animation:asterTwinkle 6s ease-in-out 1.2s infinite">✦</span>
    <span data-motif style="position:absolute;bottom:90px;left:30%;color:var(--accent,#805FBF);font-size:10px;animation:asterTwinkle 4.5s ease-in-out .6s infinite">✦</span>
    <div style="position:relative;z-index:1;max-width:1180px;margin:0 auto;padding:96px 28px">
      <div style="text-align:center;max-width:640px;margin:0 auto">
        <div style="font-size:13px;font-weight:600;letter-spacing:.12em;text-transform:uppercase;color:var(--accent,#805FBF)">A few mornings</div>
        <h2 data-r="big" style="font-family:'Newsreader',Georgia,serif;font-weight:500;color:#F4EEE0;font-size:44px;line-height:1.1;letter-spacing:-.01em;margin:14px 0 14px">Like a note from a friend who knows you — and your chart.</h2>
        <p style="font-size:17px;color:#B6ADBC;margin:0">Grounded, useful, and a little poetic — written for the life you actually lead, never the “cosmic energies, beautiful soul” cliché. Here’s the real thing.</p>
      </div>

      <div style="margin-top:42px;max-width:940px;margin-left:auto;margin-right:auto">
        <p style="text-align:center;font-size:13.5px;color:#9A8FA0;margin:0 0 16px">Tap your sign — see how a morning actually reads.</p>
        <div data-signrow style="display:flex;flex-wrap:wrap;justify-content:center;gap:9px">
          <button data-sign="0" style="display:inline-flex;align-items:center;gap:6px;border:1px solid rgba(255,255,255,.18);background:transparent;color:#C9BFD2;font-family:'Hanken Grotesk',sans-serif;font-size:13.5px;font-weight:600;padding:8px 14px;border-radius:999px;cursor:pointer"><span style="font-size:15px">♈︎</span>Aries</button>
          <button data-sign="1" style="display:inline-flex;align-items:center;gap:6px;border:1px solid rgba(255,255,255,.18);background:transparent;color:#C9BFD2;font-family:'Hanken Grotesk',sans-serif;font-size:13.5px;font-weight:600;padding:8px 14px;border-radius:999px;cursor:pointer"><span style="font-size:15px">♉︎</span>Taurus</button>
          <button data-sign="2" style="display:inline-flex;align-items:center;gap:6px;border:1px solid rgba(255,255,255,.18);background:transparent;color:#C9BFD2;font-family:'Hanken Grotesk',sans-serif;font-size:13.5px;font-weight:600;padding:8px 14px;border-radius:999px;cursor:pointer"><span style="font-size:15px">♊︎</span>Gemini</button>
          <button data-sign="3" style="display:inline-flex;align-items:center;gap:6px;border:1px solid rgba(255,255,255,.18);background:transparent;color:#C9BFD2;font-family:'Hanken Grotesk',sans-serif;font-size:13.5px;font-weight:600;padding:8px 14px;border-radius:999px;cursor:pointer"><span style="font-size:15px">♋︎</span>Cancer</button>
          <button data-sign="4" style="display:inline-flex;align-items:center;gap:6px;border:1px solid rgba(255,255,255,.18);background:transparent;color:#C9BFD2;font-family:'Hanken Grotesk',sans-serif;font-size:13.5px;font-weight:600;padding:8px 14px;border-radius:999px;cursor:pointer"><span style="font-size:15px">♌︎</span>Leo</button>
          <button data-sign="5" style="display:inline-flex;align-items:center;gap:6px;border:1px solid rgba(255,255,255,.18);background:transparent;color:#C9BFD2;font-family:'Hanken Grotesk',sans-serif;font-size:13.5px;font-weight:600;padding:8px 14px;border-radius:999px;cursor:pointer"><span style="font-size:15px">♍︎</span>Virgo</button>
          <button data-sign="6" style="display:inline-flex;align-items:center;gap:6px;border:1px solid rgba(255,255,255,.18);background:transparent;color:#C9BFD2;font-family:'Hanken Grotesk',sans-serif;font-size:13.5px;font-weight:600;padding:8px 14px;border-radius:999px;cursor:pointer"><span style="font-size:15px">♎︎</span>Libra</button>
          <button data-sign="7" style="display:inline-flex;align-items:center;gap:6px;border:1px solid rgba(255,255,255,.18);background:transparent;color:#C9BFD2;font-family:'Hanken Grotesk',sans-serif;font-size:13.5px;font-weight:600;padding:8px 14px;border-radius:999px;cursor:pointer"><span style="font-size:15px">♏︎</span>Scorpio</button>
          <button data-sign="8" style="display:inline-flex;align-items:center;gap:6px;border:1px solid rgba(255,255,255,.18);background:transparent;color:#C9BFD2;font-family:'Hanken Grotesk',sans-serif;font-size:13.5px;font-weight:600;padding:8px 14px;border-radius:999px;cursor:pointer"><span style="font-size:15px">♐︎</span>Sagittarius</button>
          <button data-sign="9" style="display:inline-flex;align-items:center;gap:6px;border:1px solid rgba(255,255,255,.18);background:transparent;color:#C9BFD2;font-family:'Hanken Grotesk',sans-serif;font-size:13.5px;font-weight:600;padding:8px 14px;border-radius:999px;cursor:pointer"><span style="font-size:15px">♑︎</span>Capricorn</button>
          <button data-sign="10" style="display:inline-flex;align-items:center;gap:6px;border:1px solid rgba(255,255,255,.18);background:transparent;color:#C9BFD2;font-family:'Hanken Grotesk',sans-serif;font-size:13.5px;font-weight:600;padding:8px 14px;border-radius:999px;cursor:pointer"><span style="font-size:15px">♒︎</span>Aquarius</button>
          <button data-sign="11" style="display:inline-flex;align-items:center;gap:6px;border:1px solid rgba(255,255,255,.18);background:transparent;color:#C9BFD2;font-family:'Hanken Grotesk',sans-serif;font-size:13.5px;font-weight:600;padding:8px 14px;border-radius:999px;cursor:pointer"><span style="font-size:15px">♓︎</span>Pisces</button>
        </div>

        <div data-r="feature" style="margin-top:30px;background:#FCF9F2;border-radius:24px;padding:38px 42px;box-shadow:0 30px 60px -28px rgba(0,0,0,.55);display:grid;grid-template-columns:148px 1fr;gap:36px;align-items:center">
          <div style="display:flex;flex-direction:column;align-items:center;gap:12px;text-align:center">
            <div data-ref="glyph" style="width:98px;height:98px;border-radius:50%;background:#221A2E;color:var(--accent,#805FBF);display:flex;align-items:center;justify-content:center;font-size:46px">♋︎</div>
            <div data-ref="name" style="font-family:'Newsreader',Georgia,serif;font-size:25px;font-weight:500;color:#221A2E">Cancer</div>
            <div data-ref="date" style="font-size:12.5px;color:#9A8FA0;font-weight:500">Jun 21 – Jul 22</div>
          </div>
          <div>
            <div data-ref="transit" style="display:inline-block;font-size:11.5px;font-weight:600;letter-spacing:.05em;text-transform:uppercase;color:var(--accent,#805FBF);background:rgba(128,95,191,.12);padding:6px 13px;border-radius:999px">Tuesday · Mercury trine Pluto</div>
            <p data-ref="text" style="font-family:'Newsreader',Georgia,serif;font-size:22px;line-height:1.5;color:#2A2336;margin:18px 0 0;font-style:italic">“Diane, today’s clear thinking is a gift, and you’ll want to use it on something that matters. The Mercury–Pluto trine sharpens your read on a situation you’ve been quietly turning over. Trust the pattern you’re seeing and say it out loud.”</p>
            <div data-ref="footer" style="font-size:12.5px;color:#9A9089;margin-top:20px">Delivered to <strong style="color:#221A2E">Diane</strong> · Tuesday morning · 7:02 AM</div>
          </div>
        </div>
      </div>
    </div>
  </section>

  <!-- ===================== INTELLIGENCE / ASTRONOMY ===================== -->
  <section id="intelligence" style="background:#F5EFE3;border-top:1px solid rgba(34,26,46,.08)">
    <div style="max-width:1180px;margin:0 auto;padding:96px 28px">
      <div style="max-width:680px">
        <div style="font-size:13px;font-weight:600;letter-spacing:.12em;text-transform:uppercase;color:var(--accent,#805FBF)">The intelligence behind it</div>
        <h2 data-r="big" style="font-family:'Newsreader',Georgia,serif;font-weight:500;color:#221A2E;font-size:44px;line-height:1.1;letter-spacing:-.01em;margin:14px 0 16px">Most horoscopes guess. Ours actually reads the sky.</h2>
        <p style="font-size:18px;line-height:1.65;color:#564E60;margin:0;max-width:620px">Every reading begins with where the planets really are — calculated to the minute — and ends as a few honest sentences our astrologers write for you alone. Here’s what happens between dusk and your morning.</p>
      </div>

      <div data-r="ai3" style="position:relative;display:grid;grid-template-columns:repeat(3,1fr);gap:24px;margin-top:54px">
        <div data-r="ai-line" style="position:absolute;top:38px;left:16%;right:16%;height:1px;background:linear-gradient(90deg,rgba(128,95,191,.15),rgba(128,95,191,.5),rgba(128,95,191,.15));z-index:0"></div>

        <div style="position:relative;z-index:1;background:#FCF9F2;border:1px solid rgba(34,26,46,.08);border-radius:18px;padding:30px 28px">
          <div style="width:60px;height:60px;border-radius:50%;background:#221A2E;display:flex;align-items:center;justify-content:center;box-shadow:0 8px 20px -8px rgba(128,95,191,.6)">
            <svg width="28" height="28" viewBox="0 0 28 28" fill="none" stroke="#805FBF" stroke-width="1.6"><ellipse cx="14" cy="14" rx="12" ry="5.2" transform="rotate(-22 14 14)"></ellipse><circle cx="14" cy="14" r="3.4" fill="#805FBF" stroke="none"></circle><circle cx="24" cy="9" r="1.5" fill="#F4EEE0" stroke="none"></circle></svg>
          </div>
          <h3 style="font-family:'Newsreader',Georgia,serif;font-weight:500;color:#221A2E;font-size:22px;margin:20px 0 9px">We read the real sky</h3>
          <p style="font-size:15.5px;line-height:1.6;color:#564E60;margin:0">Each night we compute the true positions of the sun, moon, and planets using the same precision ephemeris science observatories rely on. The day’s aspects — a Mercury trine, a Venus shift — are real movements, not a recycled monthly blurb.</p>
        </div>

        <div style="position:relative;z-index:1;background:#FCF9F2;border:1px solid rgba(34,26,46,.08);border-radius:18px;padding:30px 28px">
          <div style="width:60px;height:60px;border-radius:50%;background:#221A2E;display:flex;align-items:center;justify-content:center;box-shadow:0 8px 20px -8px rgba(128,95,191,.6)">
            <svg width="28" height="28" viewBox="0 0 28 28" fill="none" stroke="#805FBF" stroke-width="1.6"><circle cx="14" cy="14" r="11"></circle><circle cx="14" cy="14" r="5"></circle><line x1="14" y1="1.5" x2="14" y2="6.5"></line><line x1="14" y1="21.5" x2="14" y2="26.5"></line><line x1="1.5" y1="14" x2="6.5" y2="14"></line><line x1="21.5" y1="14" x2="26.5" y2="14"></line><circle cx="14" cy="14" r="1.6" fill="#805FBF" stroke="none"></circle></svg>
          </div>
          <h3 style="font-family:'Newsreader',Georgia,serif;font-weight:500;color:#221A2E;font-size:22px;margin:20px 0 9px">We read your chart</h3>
          <p style="font-size:15.5px;line-height:1.6;color:#564E60;margin:0">Those movements only matter in light of you. Your sun sign — and the birth time and place you choose to share — decide which house each transit lands in, so the same sky says something different to you than to anyone else.</p>
        </div>

        <div style="position:relative;z-index:1;background:#FCF9F2;border:1px solid rgba(34,26,46,.08);border-radius:18px;padding:30px 28px">
          <div style="width:60px;height:60px;border-radius:50%;background:#221A2E;display:flex;align-items:center;justify-content:center;box-shadow:0 8px 20px -8px rgba(128,95,191,.6)">
            <svg width="28" height="28" viewBox="0 0 28 28" fill="none" stroke="#805FBF" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"><path d="M21 4.5l2.5 2.5L10 20.5l-3.5 1 1-3.5z"></path><line x1="18.5" y1="7" x2="21" y2="9.5"></line><path d="M4.5 24.5h10" stroke-width="1.4"></path></svg>
          </div>
          <h3 style="font-family:'Newsreader',Georgia,serif;font-weight:500;color:#221A2E;font-size:22px;margin:20px 0 9px">Then our astrologers write it</h3>
          <p style="font-size:15.5px;line-height:1.6;color:#564E60;margin:0">Our expert astrologers — practicing readers, not a template — turn all of it into a short, warm, genuinely useful note, written in their own voice and addressed to you by name. Every reading is reviewed for care and tone, and never repeats what it told you last week.</p>
        </div>
      </div>

      <div style="margin-top:30px;display:flex;flex-wrap:wrap;align-items:center;gap:10px">
        <span style="display:inline-flex;align-items:center;gap:8px;font-size:13.5px;font-weight:600;color:#3D3548;background:#FCF9F2;border:1px solid rgba(34,26,46,.1);padding:9px 15px;border-radius:999px"><span style="color:var(--accent,#805FBF)">✦</span> Real astronomical data, computed nightly</span>
        <span style="display:inline-flex;align-items:center;gap:8px;font-size:13.5px;font-weight:600;color:#3D3548;background:#FCF9F2;border:1px solid rgba(34,26,46,.1);padding:9px 15px;border-radius:999px"><span style="color:var(--accent,#805FBF)">✦</span> Written fresh — never a template</span>
        <span style="display:inline-flex;align-items:center;gap:8px;font-size:13.5px;font-weight:600;color:#3D3548;background:#FCF9F2;border:1px solid rgba(34,26,46,.1);padding:9px 15px;border-radius:999px"><span style="color:var(--accent,#805FBF)">✦</span> Written by expert astrologers</span>
      </div>
    </div>
  </section>

  <!-- ===================== WHY TEXT ===================== -->
  <section id="why" style="background:#F5EFE3">
    <div data-r="why" style="max-width:1180px;margin:0 auto;padding:96px 28px;display:grid;grid-template-columns:.95fr 1.05fr;gap:60px;align-items:center">
      <div>
        <div style="font-size:13px;font-weight:600;letter-spacing:.12em;text-transform:uppercase;color:var(--accent,#805FBF)">Why text?</div>
        <h2 data-r="big" style="font-family:'Newsreader',Georgia,serif;font-weight:500;color:#221A2E;font-size:44px;line-height:1.1;letter-spacing:-.01em;margin:14px 0 18px">No new app. No new habit. Just your phone.</h2>
        <p style="font-size:17px;line-height:1.65;color:#564E60;margin:0 0 16px">You don’t need another app to check, another password to remember, or another feed to disappear into. You have a phone, and you read your texts. That’s all this asks of you.</p>
        <p style="font-size:17px;line-height:1.65;color:#564E60;margin:0">That’s the whole idea. One unhurried message, arriving where your attention already is, becomes a small ritual that’s yours — not one more thing on the list.</p>
      </div>
      <div style="display:grid;grid-template-columns:1fr 1fr;gap:18px">
        <div style="background:#221A2E;border-radius:18px;padding:30px 26px;color:#F4EEE0">
          <div style="font-family:'Newsreader',serif;font-size:48px;font-weight:500;color:var(--accent,#805FBF);line-height:1">90%+</div>
          <p style="font-size:14.5px;color:#B6ADBC;margin:10px 0 0">of text messages are opened — vs. roughly 20% of marketing email.</p>
        </div>
        <div style="background:#FCF9F2;border:1px solid rgba(34,26,46,.08);border-radius:18px;padding:30px 26px">
          <div style="font-family:'Newsreader',serif;font-size:48px;font-weight:500;color:#221A2E;line-height:1">1</div>
          <p style="font-size:14.5px;color:#564E60;margin:10px 0 0">message a morning. No feed, no badges piling up, nothing pulling you to scroll.</p>
        </div>
        <div style="background:#FCF9F2;border:1px solid rgba(34,26,46,.08);border-radius:18px;padding:30px 26px">
          <div style="font-family:'Newsreader',serif;font-size:48px;font-weight:500;color:#221A2E;line-height:1">24</div>
          <p style="font-size:14.5px;color:#564E60;margin:10px 0 0">hours to choose from — your reading arrives at the exact hour you pick.</p>
        </div>
        <div style="background:#221A2E;border-radius:18px;padding:30px 26px;color:#F4EEE0">
          <div style="font-family:'Newsreader',serif;font-size:48px;font-weight:500;color:var(--accent,#805FBF);line-height:1">STOP</div>
          <p style="font-size:14.5px;color:#B6ADBC;margin:10px 0 0">is all it takes to leave. One text, unsubscribed instantly. No hard feelings.</p>
        </div>
      </div>
    </div>
  </section>

  <!-- ===================== PRICING ===================== -->
  <section id="pricing" style="background:#F5EFE3">
    <div style="max-width:1180px;margin:0 auto;padding:40px 28px 100px">
      <div style="text-align:center;max-width:600px;margin:0 auto 44px">
        <div style="font-size:13px;font-weight:600;letter-spacing:.12em;text-transform:uppercase;color:var(--accent,#805FBF)">Pricing</div>
        <h2 data-r="big" style="font-family:'Newsreader',Georgia,serif;font-weight:500;color:#221A2E;font-size:44px;line-height:1.1;letter-spacing:-.01em;margin:14px 0 0">One simple plan. Free for a week.</h2>
      </div>

      <div style="max-width:460px;margin:0 auto;background:#FCF9F2;border:1px solid rgba(34,26,46,.1);border-radius:24px;padding:38px 36px;box-shadow:0 30px 60px -34px rgba(34,26,46,.3)">
        <div style="display:flex;align-items:baseline;gap:10px">
          <span style="font-family:'Newsreader',serif;font-size:58px;font-weight:500;color:#221A2E;line-height:1">$9</span>
          <span style="font-size:17px;color:#8A8194">/ month</span>
        </div>
        <p style="font-size:15.5px;color:#564E60;margin:8px 0 0">Start with <strong style="color:#221A2E">7 days free</strong>. Cancel before it ends and you’re never charged.</p>

        <div style="height:1px;background:rgba(34,26,46,.1);margin:26px 0"></div>

        <ul style="list-style:none;padding:0;margin:0;display:flex;flex-direction:column;gap:14px">
          <li style="display:flex;gap:11px;font-size:15.5px;color:#3D3548"><span style="color:var(--accent,#805FBF)">✦</span> A personal reading every single morning</li>
          <li style="display:flex;gap:11px;font-size:15.5px;color:#3D3548"><span style="color:var(--accent,#805FBF)">✦</span> Delivered at the hour you choose, your time zone</li>
          <li style="display:flex;gap:11px;font-size:15.5px;color:#3D3548"><span style="color:var(--accent,#805FBF)">✦</span> A web dashboard with your last seven days</li>
          <li style="display:flex;gap:11px;font-size:15.5px;color:#3D3548"><span style="color:var(--accent,#805FBF)">✦</span> Change your time or pause whenever you like</li>
        </ul>

        <a href="https://app.celestialdial.com/app/signup" style="display:block;text-align:center;background:var(--accent,#805FBF);color:#fff;text-decoration:none;font-weight:600;font-size:16px;padding:16px;border-radius:999px;margin-top:30px;box-shadow:0 10px 24px rgba(128,95,191,.34)">Start your free week</a>
        <p style="font-size:12.5px;line-height:1.55;color:#9A9089;margin:16px 0 0;text-align:center">Consent is not a condition of purchase. Up to 35 messages/month. Message &amp; data rates may apply. Reply HELP for help, STOP to cancel.</p>
      </div>
    </div>
  </section>

  <!-- ===================== FAQ ===================== -->
  <section id="faq" style="background:#F5EFE3;border-top:1px solid rgba(34,26,46,.08)">
    <div style="max-width:880px;margin:0 auto;padding:90px 28px">
      <div style="text-align:center;margin-bottom:48px">
        <div style="font-size:13px;font-weight:600;letter-spacing:.12em;text-transform:uppercase;color:var(--accent,#805FBF)">Questions</div>
        <h2 data-r="big" style="font-family:'Newsreader',Georgia,serif;font-weight:500;color:#221A2E;font-size:44px;line-height:1.1;margin:14px 0 0">Good things to ask first.</h2>
      </div>

      <div style="display:flex;flex-direction:column;gap:14px">
        <div style="background:#FCF9F2;border:1px solid rgba(34,26,46,.08);border-radius:16px;padding:24px 28px">
          <h3 style="font-family:'Newsreader',Georgia,serif;font-weight:500;color:#221A2E;font-size:21px;margin:0 0 8px">Is it actually personal, or just my sun sign?</h3>
          <p style="font-size:15.5px;color:#564E60;margin:0">It’s written for you by name, using your sun sign and the day’s real planetary transits. Share your birth time and place and we’ll layer in deeper, chart-aware personalization as it rolls out.</p>
        </div>
        <div style="background:#FCF9F2;border:1px solid rgba(34,26,46,.08);border-radius:16px;padding:24px 28px">
          <h3 style="font-family:'Newsreader',Georgia,serif;font-weight:500;color:#221A2E;font-size:21px;margin:0 0 8px">Can I choose when it arrives?</h3>
          <p style="font-size:15.5px;color:#564E60;margin:0">Any hour you like, in your own time zone — and you can change it anytime from your dashboard. It even follows you correctly through daylight saving.</p>
        </div>
        <div style="background:#FCF9F2;border:1px solid rgba(34,26,46,.08);border-radius:16px;padding:24px 28px">
          <h3 style="font-family:'Newsreader',Georgia,serif;font-weight:500;color:#221A2E;font-size:21px;margin:0 0 8px">How do I stop the texts?</h3>
          <p style="font-size:15.5px;color:#564E60;margin:0">Reply <strong style="color:#221A2E">STOP</strong> to any message and you’re unsubscribed immediately. Reply <strong style="color:#221A2E">HELP</strong> any time for support, or <strong style="color:#221A2E">START</strong> to come back.</p>
        </div>
        <div style="background:#FCF9F2;border:1px solid rgba(34,26,46,.08);border-radius:16px;padding:24px 28px">
          <h3 style="font-family:'Newsreader',Georgia,serif;font-weight:500;color:#221A2E;font-size:21px;margin:0 0 8px">What do you need from me?</h3>
          <p style="font-size:15.5px;color:#564E60;margin:0">Your name, birthday, phone number and email to set up the account. Birth time and place are optional — they only make your readings richer.</p>
        </div>
        <div style="background:#FCF9F2;border:1px solid rgba(34,26,46,.08);border-radius:16px;padding:24px 28px">
          <h3 style="font-family:'Newsreader',Georgia,serif;font-weight:500;color:#221A2E;font-size:21px;margin:0 0 8px">Is my data private?</h3>
          <p style="font-size:15.5px;color:#564E60;margin:0">Your sensitive details are encrypted, never sold, and never used for advertising. You can download or permanently delete everything from your settings whenever you want.</p>
        </div>
        <div style="background:#FCF9F2;border:1px solid rgba(34,26,46,.08);border-radius:16px;padding:24px 28px">
          <h3 style="font-family:'Newsreader',Georgia,serif;font-weight:500;color:#221A2E;font-size:21px;margin:0 0 8px">Is this real advice?</h3>
          <p style="font-size:15.5px;color:#564E60;margin:0">No — Celestial Dial is for reflection and entertainment. It isn’t medical, legal, or financial advice, and it’s not a substitute for a professional.</p>
        </div>
      </div>
    </div>
  </section>

  <!-- ===================== FINAL CTA ===================== -->
  <section style="position:relative;background:#221A2E;overflow:hidden">
    <div data-glow style="position:absolute;width:560px;height:560px;border-radius:50%;background:radial-gradient(circle,rgba(128,95,191,.28),transparent 68%);pointer-events:none;opacity:0;transition:opacity .5s ease;filter:blur(28px);left:0;top:0;z-index:0;will-change:transform"></div>
    <span data-motif style="position:absolute;top:50px;left:18%;color:var(--accent,#805FBF);font-size:13px;animation:asterTwinkle 5s ease-in-out infinite">✦</span>
    <span data-motif style="position:absolute;bottom:60px;right:20%;color:#fff;opacity:.3;font-size:10px;animation:asterTwinkle 6s ease-in-out 1s infinite">✦</span>
    <div style="position:relative;z-index:1;max-width:760px;margin:0 auto;padding:96px 28px;text-align:center">
      <div style="font-size:24px;color:var(--accent,#805FBF)">✦</div>
      <h2 data-r="big-cta" style="font-family:'Newsreader',Georgia,serif;font-weight:500;color:#F4EEE0;font-size:50px;line-height:1.08;letter-spacing:-.01em;margin:16px 0 0">Tomorrow morning,<br>let the sky speak first.</h2>
      <p style="font-size:18px;color:#B6ADBC;margin:20px auto 0;max-width:480px">Set it up in three minutes. Your first reading arrives at the hour you choose.</p>
      <a href="https://app.celestialdial.com/app/signup" style="display:inline-block;background:var(--accent,#805FBF);color:#fff;text-decoration:none;font-weight:600;font-size:16px;padding:16px 34px;border-radius:999px;margin-top:30px;box-shadow:0 10px 28px rgba(128,95,191,.4)">Start your free week</a>
      <p style="font-size:13.5px;color:#857B90;margin:18px 0 0">7 days free · then $9/mo · cancel anytime</p>
    </div>
  </section>

  <!-- ===================== FOOTER ===================== -->
  <footer style="background:#1A1424;color:#9A8FA0">
    <div style="max-width:1180px;margin:0 auto;padding:60px 28px 28px">
      <div data-r="foot4" style="display:grid;grid-template-columns:1.4fr 1fr 1fr 1fr;gap:32px">
        <div>
          <div style="display:flex;align-items:center;gap:9px;color:#F4EEE0">
            <span style="font-size:18px;color:var(--accent,#805FBF)">✦</span>
            <span style="font-family:'Newsreader',serif;font-size:22px;font-weight:500">Celestial Dial</span>
          </div>
          <p style="font-size:14px;line-height:1.6;margin:14px 0 0;max-width:280px">A thoughtful daily horoscope — delivered by text, at the hour you choose. A small moment that’s yours.</p>
        </div>
        <div>
          <div style="font-size:13px;font-weight:600;letter-spacing:.06em;text-transform:uppercase;color:#C9BFD2;margin-bottom:14px">Product</div>
          <div style="display:flex;flex-direction:column;gap:10px;font-size:14px">
            <a href="#how" style="color:#9A8FA0;text-decoration:none">How it works</a>
            <a href="#sample" style="color:#9A8FA0;text-decoration:none">A sample</a>
            <a href="#pricing" style="color:#9A8FA0;text-decoration:none">Pricing</a>
          </div>
        </div>
        <div>
          <div style="font-size:13px;font-weight:600;letter-spacing:.06em;text-transform:uppercase;color:#C9BFD2;margin-bottom:14px">Company</div>
          <div style="display:flex;flex-direction:column;gap:10px;font-size:14px">
            <a href="https://app.celestialdial.com/help" style="color:#9A8FA0;text-decoration:none">About</a>
            <a href="https://app.celestialdial.com/help" style="color:#9A8FA0;text-decoration:none">Help</a>
            <a href="https://app.celestialdial.com/help#contact" style="color:#9A8FA0;text-decoration:none">Contact</a>
          </div>
        </div>
        <div>
          <div style="font-size:13px;font-weight:600;letter-spacing:.06em;text-transform:uppercase;color:#C9BFD2;margin-bottom:14px">Legal</div>
          <div style="display:flex;flex-direction:column;gap:10px;font-size:14px">
            <a href="https://app.celestialdial.com/legal#privacy" style="color:#9A8FA0;text-decoration:none">Privacy Policy</a>
            <a href="https://app.celestialdial.com/legal#terms" style="color:#9A8FA0;text-decoration:none">Terms of Service</a>
            <a href="https://app.celestialdial.com/legal#sms" style="color:#9A8FA0;text-decoration:none">SMS Terms</a>
          </div>
        </div>
      </div>

      <div style="height:1px;background:rgba(255,255,255,.08);margin:36px 0 22px"></div>

      <p style="font-size:12.5px;line-height:1.6;color:#7E7488;margin:0 0 14px;max-width:760px">Horoscopes from Celestial Dial are for entertainment and reflection. They are not medical, legal, financial, or professional advice. If you are in crisis, please contact a qualified professional or call or text 988, the Suicide and Crisis Lifeline.</p>
      <div style="display:flex;flex-wrap:wrap;justify-content:space-between;gap:12px;font-size:12.5px;color:#6E6478">
        <span>© 2026 Celestial Dial. All rights reserved.</span>
        <span>By subscribing you agree to receive recurring automated texts. Msg &amp; data rates may apply. Reply STOP to cancel, HELP for help.</span>
      </div>
    </div>
  </footer>
`;

/* Zodiac sample data (ported from the design's DCLogic). */
const SIGNS = [
  { glyph: "♈︎", name: "Aries", dates: "Mar 21 – Apr 19", person: "Lauren", day: "Friday", transit: "Mars in the third house", reading: "Lauren, your words have weight today, more than usual. Mars moving through your third house gives them edge, and the people who matter will be paying attention. Pick the one conversation that’s been waiting and start it." },
  { glyph: "♉︎", name: "Taurus", dates: "Apr 20 – May 20", person: "Karen", day: "Monday", transit: "Venus conjunct Saturn", reading: "Karen, the steady thing you’ve been building quietly is starting to hold weight. Venus meets Saturn today and rewards what you’ve tended over what’s flashy. Let the slow work take up a little more room." },
  { glyph: "♊︎", name: "Gemini", dates: "May 21 – Jun 20", person: "Theresa", day: "Thursday", transit: "Mercury in the fifth house", reading: "Theresa, a lighter idea wants your attention, and it isn’t frivolous. Mercury in your fifth house turns play into clarity. Say yes to the thing that sounds fun before you talk yourself into the sensible version." },
  { glyph: "♋︎", name: "Cancer", dates: "Jun 21 – Jul 22", person: "Diane", day: "Tuesday", transit: "Mercury trine Pluto", reading: "Diane, today’s clear thinking is a gift, and you’ll want to use it on something that matters. The Mercury–Pluto trine sharpens your read on a situation you’ve been quietly turning over. Trust the pattern you’re seeing and say it out loud." },
  { glyph: "♌︎", name: "Leo", dates: "Jul 23 – Aug 22", person: "Paula", day: "Saturday", transit: "Sun in the tenth house", reading: "Paula, you don’t need to perform today — being clearly yourself is the whole strategy. The Sun lights your tenth house and people are taking their cue from you. Set the tone warm, and let them follow." },
  { glyph: "♍︎", name: "Virgo", dates: "Aug 23 – Sep 22", person: "Anne", day: "Monday", transit: "Moon in the sixth house", reading: "Anne, the small repair you keep postponing will cost far less than the worry about it. The Moon in your sixth house favors tending over fixing. Do the modest, quiet thing and feel how much it loosens." },
  { glyph: "♎︎", name: "Libra", dates: "Sep 23 – Oct 22", person: "Renée", day: "Sunday", transit: "Venus in the tenth house", reading: "Renée, your gift this week is reading a room before you walk into it, and it’s working in your favor at work. Venus in your tenth house wants you seen for what you actually do. Keep choosing the version that’s true." },
  { glyph: "♏︎", name: "Scorpio", dates: "Oct 23 – Nov 21", person: "Gail", day: "Thursday", transit: "Pluto sextile Sun", reading: "Gail, you can feel the difference between what you want and what you’ve settled for, and today that honesty is useful, not heavy. Pluto sextiles your sun. Name the truer want, even if only to yourself." },
  { glyph: "♐︎", name: "Sagittarius", dates: "Nov 22 – Dec 21", person: "Bonnie", day: "Saturday", transit: "Jupiter in the ninth house", reading: "Bonnie, the wider view you’ve been craving is closer than a plane ticket. Jupiter in your ninth house opens a door inside an ordinary day. Follow the curiosity that doesn’t quite make sense yet." },
  { glyph: "♑︎", name: "Capricorn", dates: "Dec 22 – Jan 19", person: "Eva", day: "Monday", transit: "Saturn return aspects", reading: "Eva, slow is winning this round, even if it doesn’t feel that way yet. Saturn keeps asking the same question, and you keep getting closer to the real answer. Today is a continuation, not a deadline." },
  { glyph: "♒︎", name: "Aquarius", dates: "Jan 20 – Feb 18", person: "Marie", day: "Wednesday", transit: "Uranus trine Mercury", reading: "Marie, the unconventional choice is also the practical one today, which doesn’t happen often. Uranus trines Mercury and clears the static. Trust the idea your past self would have called impractical." },
  { glyph: "♓︎", name: "Pisces", dates: "Feb 19 – Mar 20", person: "Maggie", day: "Wednesday", transit: "Neptune trine Sun", reading: "Maggie, today softens you in a way that feels good, not lost. Let yourself dream a little out loud with someone who can hold it. The trine between Neptune and your sun is rare — you don’t need to do anything productive with it." },
];

/* Wire the tap-a-sign sample selector against the injected DOM. */
function initSignSelector(root) {
  let selected = 3;
  const q = (r) => root.querySelector(`[data-ref="${r}"]`);
  function apply() {
    const s = SIGNS[selected];
    const set = (r, v) => { const el = q(r); if (el) el.textContent = v; };
    set("glyph", s.glyph); set("name", s.name); set("date", s.dates);
    set("transit", s.day + " · " + s.transit);
    set("text", "“" + s.reading + "”");
    const f = q("footer");
    if (f) f.innerHTML = 'Delivered to <strong style="color:#221A2E">' + s.person + '</strong> · ' + s.day + " morning · 7:02 AM";
    root.querySelectorAll("button[data-sign]").forEach(b => {
      const on = Number(b.dataset.sign) === selected;
      b.style.background = on ? "var(--accent,#805FBF)" : "transparent";
      b.style.color = on ? "#fff" : "#C9BFD2";
      b.style.borderColor = on ? "var(--accent,#805FBF)" : "rgba(255,255,255,.18)";
    });
  }
  const onClick = (e) => {
    const b = e.target.closest && e.target.closest("button[data-sign]");
    if (!b || !root.contains(b)) return;
    selected = Number(b.dataset.sign); apply();
  };
  root.addEventListener("click", onClick);
  apply();
  return () => root.removeEventListener("click", onClick);
}

/* Eased pointer parallax: drifting motifs, phone tilt, and section glow (ported from DCLogic). */
function initParallax(root) {
  if (window.matchMedia && window.matchMedia("(prefers-reduced-motion: reduce)").matches) return () => {};
  const motifs = [...root.querySelectorAll("[data-motif]")].map((el, i) => { el.style.willChange = "translate"; return { el, depth: 9 + (i % 4) * 6 }; });
  const tilt = root.querySelector("[data-tilt]");
  const glows = [...root.querySelectorAll("[data-glow]")];
  const tgt = { nx: 0, ny: 0 }, cur = { nx: 0, ny: 0 };
  let mx = -1, my = -1, raf = 0;
  const onMove = (e) => { tgt.nx = e.clientX / window.innerWidth - 0.5; tgt.ny = e.clientY / window.innerHeight - 0.5; mx = e.clientX; my = e.clientY; };
  window.addEventListener("mousemove", onMove, { passive: true });
  const loop = () => {
    cur.nx += (tgt.nx - cur.nx) * 0.07; cur.ny += (tgt.ny - cur.ny) * 0.07;
    const nx = cur.nx, ny = cur.ny;
    for (const m of motifs) m.el.style.translate = (-nx * m.depth).toFixed(2) + "px " + (-ny * m.depth).toFixed(2) + "px";
    if (tilt) tilt.style.transform = "perspective(1000px) rotateY(" + (nx * 5).toFixed(2) + "deg) rotateX(" + (-ny * 4).toFixed(2) + "deg) translateY(" + (ny * -6).toFixed(1) + "px)";
    if (mx >= 0) for (const g of glows) {
      const p = g.parentElement.getBoundingClientRect();
      const inside = my > p.top - 80 && my < p.bottom + 80 && mx > p.left - 80 && mx < p.right + 80;
      g.style.opacity = inside ? "1" : "0";
      if (inside) g.style.transform = "translate(" + (mx - p.left - 280) + "px," + (my - p.top - 280) + "px)";
    }
    raf = requestAnimationFrame(loop);
  };
  raf = requestAnimationFrame(loop);
  return () => { window.removeEventListener("mousemove", onMove); cancelAnimationFrame(raf); };
}

function App() {
  const [t, setTweak] = useTweaks(TWEAK_DEFAULTS);
  const rootRef = React.useRef(null);

  React.useEffect(() => { applyTweaks(rootRef.current, t); }, [t]);

  React.useEffect(() => {
    const root = rootRef.current;
    if (!root) return;
    const offSign = initSignSelector(root);
    const offPar = initParallax(root);
    return () => { offSign && offSign(); offPar && offPar(); };
  }, []);

  return (
    <div data-screen-label="Celestial Dial — Home">
      <div
        ref={rootRef}
        style={{
          "--accent": t.accent,
          fontFamily: "'Hanken Grotesk', system-ui, sans-serif",
          color: "#4B4357",
          background: "#F5EFE3",
          overflowX: "hidden",
          lineHeight: 1.55,
          WebkitTextSizeAdjust: "100%",
        }}
        dangerouslySetInnerHTML={{ __html: MARKUP }}
      />
      <TweaksPanel t={t} setTweak={setTweak} />
    </div>
  );
}
