:root {
    color-scheme: dark;
    --night: #181818;
    --ink: #f5f5f5;
    --muted: #c6c6c6;
    --line: #cccccc44;
    --signal: #dadada;
    --button-ink: #171717;
    --button-hover: #f3f3f3;
    --text-soft: #dedede;
    --landing-ink: #13152d;
    --mantle: #472c75;
    --mantle-core: #794dac;
    --mantle-glint: #9675ca;
    --echo: #153d50;
    --echo-core: #2a6875;
    --landing-wash: #2b2050;
    --glass-border: #bcbcbc57;
    --glass-top: #ecececad;
    --glass-left: #dcdcdc85;
    --glass-sheen: #d6d6d629;
    --glass-base-sheen: #bdbdbd15;
    --glass-fill: #181818c7;
    --glass-blur-fill: #18181899;
    --glass-inner-top: #f7f7f72e;
    --glass-inner-left: #ebebeb1c;
    --glass-inner-bottom: #aaaaaa25;
    --glass-shadow: #08080855;
    --sphere-border: #b897ff91;
    --sphere-top: #f3ddfff0;
    --sphere-right: #8beaffae;
    --sphere-sheen: #f0f0f065;
    --sphere-mid: #17123324;
    --sphere-edge: #0b102b54;
    --sphere-inner-top: #d2abff95;
    --sphere-inner-bottom: #7bdef47a;
    --sphere-inner-shadow: #08080869;
    --sphere-shadow: #08080856;
    --clock-shadow: #080808;
    --gutter: clamp(24px, 5.55vw, 104px);
    font-family: Geist, system-ui, sans-serif;
    background: var(--night);
    color: var(--ink);
  }
  :root[data-theme="light"] {
    color-scheme: light;
    --night: #f5f5f5;
    --ink: #242424;
    --muted: #494949;
    --line: #30303044;
    --signal: #353535;
    --button-ink: #ffffff;
    --button-hover: #454545;
    --text-soft: #383838;
    --landing-ink: #f6f3fb;
    --mantle: #cdb9eb;
    --mantle-core: #dfcef7;
    --mantle-glint: #fffaf5;
    --echo: #afcee7;
    --echo-core: #d4eff5;
    --landing-wash: #f3c3af;
    --glass-border: #67676753;
    --glass-top: #ffffffed;
    --glass-left: #ffffffcf;
    --glass-sheen: #ffffffa6;
    --glass-base-sheen: #9c9c9c18;
    --glass-fill: #fafafae0;
    --glass-blur-fill: #fafafacc;
    --glass-inner-top: #ffffffb3;
    --glass-inner-left: #ffffff66;
    --glass-inner-bottom: #56565624;
    --glass-shadow: #41414129;
    --sphere-border: #8664c782;
    --sphere-top: #fffffff5;
    --sphere-right: #4b9bb78c;
    --sphere-sheen: #ffffffe8;
    --sphere-mid: #ece5ff29;
    --sphere-edge: #a8b4d94d;
    --sphere-inner-top: #ffffffd9;
    --sphere-inner-bottom: #76b8d989;
    --sphere-inner-shadow: #60606042;
    --sphere-shadow: #41414132;
    --clock-shadow: #ffffffbf;
  }
  *, *::before, *::after { box-sizing: border-box; }
  body { margin: 0; }
  button { font: inherit; }
  button { -webkit-tap-highlight-color: var(--line); }
  button { cursor: pointer; }
  ::selection { background: var(--signal); color: var(--button-ink); }
  :focus-visible { outline: 2px solid var(--signal); outline-offset: 5px; }
  .landing {
    position: relative;
    overflow: clip;
    isolation: isolate;
    background: var(--landing-ink);
    padding-inline: var(--gutter);
  }
  .landing::before,
  .landing::after {
    content: "";
    position: absolute;
    z-index: -1;
    pointer-events: none;
  }
  .landing::before {
    inset: -40% 25% 19% -32%;
    border-radius: 28% 72% 43% 57% / 39% 44% 56% 61%;
    transform: rotate(-22deg);
    background:
      radial-gradient(ellipse at 67% 70%, var(--mantle-core), transparent 56%),
      radial-gradient(ellipse at 52% 58%, var(--mantle), transparent 74%);
    filter: blur(28px);
  }
  .landing::after {
    inset: 17% -23% -38% 21%;
    border-radius: 69% 31% 62% 38% / 61% 42% 58% 39%;
    transform: rotate(17deg);
    background:
      radial-gradient(ellipse 37% 20% at 27% 33%, var(--mantle-glint), transparent 80%),
      radial-gradient(ellipse 48% 37% at 42% 36%, var(--landing-wash), transparent 88%),
      radial-gradient(ellipse 59% 39% at 54% 53%, var(--echo-core), transparent 90%),
      radial-gradient(ellipse at 55% 58%, var(--echo), transparent 67%);
    filter: blur(13px);
  }
  .shell {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-height: 100svh;
    margin-inline: auto;
  }
  .hero {
    display: grid;
    flex: 1;
    place-items: center;
    padding-block: 52px;
  }
  .primary, #theme-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 13px;
    min-height: 47px;
    font-size: 14px;
    font-weight: 670;
    white-space: nowrap;
  }
  .primary, #theme-toggle { border: 1px solid var(--signal); background: var(--signal); color: var(--button-ink); padding: 0 15px; }
  .primary:hover, #theme-toggle:hover { background: var(--button-hover); }
  .scene {
    position: relative;
    isolation: isolate;
    display: grid;
    place-items: center;
    width: min(100%, clamp(320px, 46vw, 540px), clamp(260px, 64svh, 540px));
    aspect-ratio: 1;
  }
  .drop-layer {
    position: absolute;
    z-index: -1;
    inset: 4% 3% 7%;
    pointer-events: none;
  }
  .drop-layer:has([data-liquid-ready])::before {
    content: "";
    position: absolute;
    inset: 92% 9% -12%;
    background:
      radial-gradient(ellipse 28% 9% at 64% 34%, #72e7f454, transparent),
      radial-gradient(ellipse 50% 46% at 50% 44%, var(--sphere-shadow), transparent);
  }
  .glass-drop {
    position: absolute;
    inset: 0;
    overflow: hidden;
    border-radius: 54% 46% 49% 51% / 53% 48% 52% 47%;
    border: 1px solid var(--sphere-border);
    border-top-color: var(--sphere-top);
    border-right-color: var(--sphere-right);
    box-shadow:
      inset 2px 3px 4px var(--sphere-inner-top),
      inset -2px -3px 5px var(--sphere-inner-bottom),
      inset -8px -10px 22px var(--sphere-inner-shadow),
      0 24px 58px var(--sphere-shadow);
    animation: glass-ripple 4.8s ease-in-out infinite;
  }
  .drop-surface {
    position: absolute;
    inset: -1px;
    border-radius: inherit;
    background: radial-gradient(ellipse at 48% 49%, transparent 56%, var(--sphere-mid) 82%, var(--sphere-edge));
  }
  .drop-surface > canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    visibility: hidden;
  }
  .drop-surface[data-liquid-ready] {
    background: transparent;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
  .drop-surface[data-liquid-ready] > canvas { visibility: visible; }
  .drop-surface[data-liquid-ready]::before { display: none; }
  .drop-outline {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: visible;
    visibility: hidden;
  }
  .drop-layer[data-shaped] .drop-outline { visibility: visible; }
  .drop-layer[data-shaped] .glass-drop {
    overflow: visible;
    border-color: transparent;
    box-shadow: none;
    clip-path: url(#drop-clip);
  }
  .drop-layer[data-shaped] .drop-surface {
    inset: -21px;
    border: 20px solid transparent;
    border-radius: 0;
  }
  .drop-layer[data-shaped] .drop-surface::after { display: none; }
  .drop-rim { filter: drop-shadow(0 12px 18px var(--sphere-shadow)); }
  .drop-surface::before {
    content: "";
    position: absolute;
    inset: 7% 18% 22% 6%;
    border-radius: 50%;
    border-top: 3px solid var(--sphere-sheen);
    transform: rotate(-16deg);
  }
  .drop-surface::after {
    content: "";
    position: absolute;
    inset: 6px;
    border-radius: inherit;
    border: 1px solid transparent;
    border-top-color: var(--sphere-inner-top);
    border-bottom-color: var(--sphere-inner-bottom);
  }
  @keyframes glass-ripple {
    /* Adjacent radii add up to 100% along each edge to keep the joins smooth. */
    0%, 100% {
      border-radius: 54% 46% 49% 51% / 53% 48% 52% 47%;
    }
    16% {
      border-radius: 65% 35% 48% 52% / 57% 48% 52% 43%;
    }
    36% {
      border-radius: 58% 42% 57% 43% / 50% 65% 35% 50%;
    }
    57% {
      border-radius: 50% 50% 65% 35% / 48% 57% 43% 52%;
    }
    78% {
      border-radius: 43% 57% 57% 43% / 35% 50% 50% 65%;
    }
  }
  .scene[data-suspended] .glass-drop { animation-play-state: paused; }
  .motion-toggle {
    position: absolute;
    inset: 100% 0 auto auto;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: var(--night);
    color: var(--muted);
    line-height: 0;
  }
  .motion-toggle:focus-visible { outline: 2px solid var(--signal); outline-offset: 3px; }
  .motion-toggle .play-icon,
  .motion-toggle[aria-pressed="true"] .pause-icon { display: none; }
  .motion-toggle[aria-pressed="true"] .play-icon { display: inline; }
  @media (prefers-reduced-motion: reduce) {
    .glass-drop { animation: none; }
    .motion-toggle { display: none; }
  }
  .sphere-clock {
    display: grid;
    justify-items: center;
    gap: clamp(12px, 2vw, 22px);
    text-align: center;
    white-space: nowrap;
    text-shadow: 0 2px 12px var(--clock-shadow);
  }
  .sphere-clock time {
    font-family: Bricolage, Geist, sans-serif;
    display: block;
    font-size: clamp(44px, 11vw, 104px);
    font-weight: 650;
    font-variant-numeric: tabular-nums;
    line-height: 1;
  }
  #connect {
    text-decoration: none;
    min-width: 116px;
    padding-inline: 23px;
    justify-content: center;
    border-radius: 999px;
    border-color: var(--glass-border);
    border-top-color: var(--glass-top);
    color: var(--ink);
    background:
      linear-gradient(155deg, var(--glass-sheen), transparent 58%, var(--glass-base-sheen)),
      var(--glass-blur-fill);
    box-shadow: inset 0 1px 0 var(--glass-inner-top),
      inset 0 -2px 0 var(--sphere-inner-bottom), 0 5px 16px var(--glass-shadow);
    -webkit-backdrop-filter: blur(9px) saturate(128%);
    backdrop-filter: blur(9px) saturate(128%);
  }
  #connect:hover { background-color: var(--glass-fill); }
