@layer reset, token, pen, form;
@layer pen {
  html {
    overflow: clip;
    color-scheme: dark;
    accent-color: #09b5a6;
  }

  body {
    display: flex;
    flex-direction: column;
    font-family: Space Mono, monospace;
  }

  ow-system {
    --cycle: 1320s;
    --unit: calc(var(--scale, 1) * 95vmin);
    --sun-glow: #ba702f;
    --orbit-border-width: 1px;
    position: relative;
    isolation: isolate;
    flex: 1;
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: 1fr;
    justify-content: center;
    align-items: center;
    block-size: calc(1 * var(--unit));
    inline-size: calc(1 * var(--unit));
    aspect-ratio: 1;
    margin: auto;
    background: radial-gradient(circle at center, var(--sun-glow), transparent 35%) no-repeat center/var(--unit) var(--unit);
    transition: --scale 5ms linear;
    -webkit-animation: --sun-glow var(--cycle) linear infinite;
            animation: --sun-glow var(--cycle) linear infinite;
  }
  ow-system[timelapse=true] {
    --cycle: 120s;
  }

  ow-starfield {
    position: absolute;
    inset: 0;
    z-index: -2;
    block-size: calc(1 * var(--unit));
    inline-size: calc(1 * var(--unit));
    margin: auto;
    pointer-events: none;
  }
  ow-system:not([stars=true]) ow-starfield {
    visibility: hidden;
  }
  ow-system:not([stars=true]) ow-starfield ow-star {
    -webkit-animation-play-state: paused;
            animation-play-state: paused;
  }

  ow-star {
    position: absolute;
    inset-block-start: var(--star-y, 50%);
    inset-inline-start: var(--star-x, 50%);
    display: flex;
    aspect-ratio: 1;
    translate: -50% -50%;
    -webkit-animation: --star calc(var(--cycle) * 0.25) ease-in-out calc(var(--cycle) * var(--delay)) 1 both;
            animation: --star calc(var(--cycle) * 0.25) ease-in-out calc(var(--cycle) * var(--delay)) 1 both;
  }

  #sun {
    --orbit-radius: 0.00000000000000001;
    --body-radius: 0.05;
    --orbital-speed: 0;
    --w-color: #f6ab48;
    -webkit-animation: --orbit calc(var(--cycle) * 0.1) linear infinite;
            animation: --orbit calc(var(--cycle) * 0.1) linear infinite;
  }
  #sun ow-wanderer {
    -webkit-animation: --supernova var(--cycle) linear infinite;
            animation: --supernova var(--cycle) linear infinite;
  }

  #sun-station {
    --orbit-radius: 0.055;
    --body-radius: 0.005;
    --orbital-speed: 0.025;
    --w-color: gold;
    --w-angle: 90deg;
    -webkit-animation: --eaten calc(54.5/120 * var(--cycle)) linear 1 forwards;
            animation: --eaten calc(54.5/120 * var(--cycle)) linear 1 forwards;
  }
  #sun-station ow-wanderer {
    --revolution-animation: none;
  }

  #stranger {
    --orbit-radius: 0.15;
    --body-radius: 0.01;
    --orbital-speed: 0;
    --w-color: green;
    --w-offset: 60%;
    border-color: transparent;
  }
  #stranger::before {
    pointer-events: none;
    position: absolute;
    inset: 0;
    background: conic-gradient(from calc(0.6 * -360deg), transparent 40%, black 50%, transparent 60%) no-repeat top left/20% 20%;
    -webkit-mask-image: radial-gradient(circle, transparent 60%, red 0);
            mask-image: radial-gradient(circle, transparent 60%, red 0);
    opacity: 0.5;
  }
  #stranger ow-wanderer {
    transition: opacity 300ms ease-in-out;
  }
  #stranger:not(:hover) ow-wanderer {
    opacity: 0;
  }

  #hourglass-twins {
    --orbit-radius: 0.105;
    --body-radius: 0.0000001;
    --orbital-speed: 0.091667;
    --w-color: orangered;
    --w-offset: 60%;
  }
  #hourglass-twins > ow-wanderer {
    display: flex;
    justify-content: center;
    align-items: center;
    --revolution-dir: reverse;
  }
  #hourglass-twins > ow-wanderer:defined[image] {
    --gap: calc(0.0075 * var(--unit));
  }
  #hourglass-twins > ow-wanderer:defined[image]::before {
    content: "";
    position: absolute;
    inset: 50%;
    flex-shrink: 0;
    block-size: var(--gap);
    inline-size: var(--gap);
    margin: auto;
    background: inherit;
    scale: 2;
  }

  #twins {
    --orbit-radius: 0.0075;
    --body-radius: 0.0000001;
    --orbital-speed: 0;
    --w-offset: 0%;
  }

  #ash-twin, #ember-twin {
    --orbit-radius: 0.0075;
    --body-radius: 0.005;
    --orbital-speed: 0;
  }

  #ember-twin {
    --w-offset: 50%;
  }

  #timber-hearth {
    --orbit-radius: 0.18;
    --body-radius: 0.0075;
    --orbital-speed: 0.191667;
    --w-color: greenyellow;
    --w-offset: -12%;
  }

  #attlerock {
    --orbit-radius: 0.0125;
    --body-radius: 0.005;
    --orbital-speed: 0;
    --w-color: slategray;
  }

  #brittle-hollow {
    --orbit-radius: 0.245;
    --body-radius: 0.01;
    --orbital-speed: 0.3;
    --w-color: darkturquoise;
    --w-offset: 5%;
  }

  #hollows-lantern {
    --orbit-radius: 0.015;
    --body-radius: 0.005;
    --orbital-speed: 0;
    --w-color: darkorange;
  }
  #hollows-lantern ow-wanderer {
    filter: drop-shadow(0 0 3px #e48a24);
  }

  #giants-deep {
    --orbit-radius: 0.3425;
    --body-radius: 0.0225;
    --orbital-speed: 0.5;
    --w-color: darkseagreen;
    --w-offset: -20%;
    --revolution-dir: reverse;
    --spin-speed: 0.0666;
  }

  #orbital-probe-cannon {
    --orbit-radius: 0.025;
    --body-radius: 0.005;
    --orbital-speed: 0.75;
    --spin-speed: 0;
    --w-color: gold;
    --w-angle: 270deg;
  }

  #dark-bramble {
    --orbit-radius: 0.4175;
    --body-radius: 0.01625;
    --orbital-speed: 0.6667;
    --w-color: darkslateblue;
    --w-offset: 27.5%;
  }

  #interloper {
    --orbit-radius: 0.278;
    --body-radius: 0.0075;
    --orbit-ratio: 0.575;
    --orbital-speed: 0.4125;
    --tilt-axis: -8.9deg;
    --w-color: cyan;
    --orbit-dir: -1;
    --w-offset: 55%;
    transform-origin: 93.5% 47.6%;
    transform: translate(-41%, 0) rotate(var(--tilt-axis));
    -webkit-animation: --eaten calc(119/120 * var(--cycle)) linear 1 forwards;
            animation: --eaten calc(119/120 * var(--cycle)) linear 1 forwards;
  }
  #interloper ow-wanderer {
    --revolution-animation: none;
    offset-rotate: auto -90deg;
  }
  #quantum-moon {
    --orbit-radius: 0.0275;
    --body-radius: 0.0075;
    --orbital-speed: 0.25;
    --w-color: slategray;
    --w-offset: 50%;
    -webkit-animation: --quantum 5s ease-in-out infinite;
            animation: --quantum 5s ease-in-out infinite;
  }

  #white-hole-station {
    --orbit-radius: 0.48;
    --body-radius: 0.01625;
    --orbital-speed: 0;
    --w-color: gold;
    --w-offset: 48%;
    border-color: transparent;
  }

  ow-orbit {
    position: relative;
    pointer-events: none;
    grid-area: 1/1/-1/-1;
    place-self: center;
    display: flex;
    block-size: calc(var(--orbit-radius) * 2 * var(--unit) * var(--orbit-ratio, 1));
    inline-size: calc(var(--orbit-radius) * 2 * var(--unit));
    border: var(--orbit-border-width) solid #8888;
    border-color: color-mix(in oklch, transparent, color-mix(in oklch, var(--fg), var(--w-color)));
    border-radius: 50%;
  }

  ow-wanderer {
    --revolution-animation: --orbit calc(var(--cycle) * var(--spin-speed, var(--orbital-speed) * 0.5)) linear infinite var(--revolution-dir, );
    position: absolute;
    z-index: 2;
    pointer-events: auto;
    inset-block-start: 0;
    inset-inline-start: 50%;
    display: block;
    block-size: calc(var(--body-radius) * 2 * var(--unit));
    inline-size: calc(var(--body-radius) * 2 * var(--unit));
    aspect-ratio: 1;
    border-radius: 50%;
    background: var(--w-color, deeppink);
    offset-anchor: 50% 50%;
    offset-rotate: auto calc(-90deg + var(--w-angle, 0deg));
    offset-distance: var(--w-offset, 0%);
    -webkit-animation: var(--orbit-animation), var(--revolution-animation);
            animation: var(--orbit-animation), var(--revolution-animation);
    transform-origin: 50% 50%;
  }
  ow-wanderer:defined[image] {
    background: var(--w-image) no-repeat 50%/contain;
  }

  ow-wanderer,
ow-name {
    --orbit-animation: --w-orbit calc(var(--cycle) * var(--orbital-speed)) linear var(--initial-delay, 0s) infinite;
    offset-path: ellipse(calc(var(--orbit-radius) * var(--unit)) calc(var(--orbit-radius) * var(--unit) * var(--orbit-ratio, 1)) at 50% 50%);
  }

  ow-name {
    position: absolute;
    z-index: 3;
    inset-block-end: 100%;
    inset-inline-start: 50%;
    pointer-events: auto;
    min-block-size: 1em;
    inline-size: calc(0.25 * var(--unit));
    max-inline-size: 50vw;
    margin-block: auto;
    font-size: clamp(8px, 1vmin + 0.25rem, 24px);
    text-transform: uppercase;
    color: var(--fg);
    text-shadow: 0 1px 2px var(--bg);
    offset-anchor: -2em 100%;
    offset-rotate: calc(var(--tilt-axis, 0deg) * -1);
    -webkit-animation: var(--orbit-animation);
            animation: var(--orbit-animation);
  }
  ow-name[shy], ow-system[labels=false] ow-name {
    visibility: hidden;
    pointer-events: none;
  }

  ow-orbit[path=false],
ow-wanderer > ow-orbit,
ow-system[orbits=false] ow-orbit {
    border-color: transparent;
  }

  ow-system > ow-orbit:has(:hover),
ow-system > ow-orbit:has(:hover) ow-orbit {
    border-color: cyan;
  }

  ow-wanderer > ow-orbit {
    position: absolute;
    inset: 50% 0 0 50%;
    place-self: unset;
    transform: translate(-50%, -50%);
  }

  ow-system[paused=true], ow-system[paused=true] * {
    -webkit-animation-play-state: paused !important;
            animation-play-state: paused !important;
  }
}
@layer form {
  form {
    position: fixed;
    inset-block-end: 0;
    inset-inline: 16px;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.5em 1em;
    max-inline-size: -webkit-max-content;
    max-inline-size: -moz-max-content;
    max-inline-size: max-content;
    margin: auto;
    padding: 8px;
    outline: 1px solid var(--fg);
    border-radius: 4px 4px 0 0;
    background: var(--bg);
  }

  input {
    margin: 0;
  }

  label {
    text-align: center;
  }

  label > span {
    display: inline-block;
  }

  label > input:not(:checked) + span {
    opacity: 0.8;
  }

  label:is(:hover, :focus-within) > input:not(:checked) + span {
    text-decoration: underline;
  }

  label small {
    font-size: 0.75em;
  }
}
@layer token {
  :root {
    --fg: #fcfefc;
    --bg: #050215;
  }
}
@property --w-color {
  syntax: "<color>";
  inherits: true;
  initial-value: deeppink;
}
@property --sun-glow {
  syntax: "<color>";
  inherits: true;
  initial-value: deeppink;
}
@property --scale {
  syntax: "<number>";
  inherits: true;
  initial-value: 1;
}
@-webkit-keyframes --orbit {
  to {
    transform: rotate(-360deg);
  }
}
@keyframes --orbit {
  to {
    transform: rotate(-360deg);
  }
}
@-webkit-keyframes --w-orbit {
  from {
    offset-distance: calc(var(--orbit-dir, 1) * (100% - var(--w-offset, 0%)));
  }
  to {
    offset-distance: calc(var(--orbit-dir, 1) * (0% - var(--w-offset, 0%)));
  }
}
@keyframes --w-orbit {
  from {
    offset-distance: calc(var(--orbit-dir, 1) * (100% - var(--w-offset, 0%)));
  }
  to {
    offset-distance: calc(var(--orbit-dir, 1) * (0% - var(--w-offset, 0%)));
  }
}
@-webkit-keyframes --sun-glow {
  99% {
    --sun-glow: red;
    background-size: 0 0;
  }
  99.5% {
    --sun-glow: cyan;
    background-size: var(--unit) var(--unit);
  }
  100% {
    --sun-glow: white;
    background-size: calc(var(--unit) * 2) calc(var(--unit) * 2);
  }
}
@keyframes --sun-glow {
  99% {
    --sun-glow: red;
    background-size: 0 0;
  }
  99.5% {
    --sun-glow: cyan;
    background-size: var(--unit) var(--unit);
  }
  100% {
    --sun-glow: white;
    background-size: calc(var(--unit) * 2) calc(var(--unit) * 2);
  }
}
@-webkit-keyframes --supernova {
  0% {
    transform: scale(1);
  }
  99% {
    transform: scale(1.25);
    filter: hue-rotate(-20deg);
    --w-color: #f6ab48;
    z-index: 2;
  }
  99.5% {
    transform: scale(0.25);
    filter: hue-rotate(160deg);
    --w-color: cyan;
    z-index: 9;
  }
  100% {
    transform: scale(12);
    filter: hue-rotate(160deg) brightness(2);
    --w-color: white;
  }
}
@keyframes --supernova {
  0% {
    transform: scale(1);
  }
  99% {
    transform: scale(1.25);
    filter: hue-rotate(-20deg);
    --w-color: #f6ab48;
    z-index: 2;
  }
  99.5% {
    transform: scale(0.25);
    filter: hue-rotate(160deg);
    --w-color: cyan;
    z-index: 9;
  }
  100% {
    transform: scale(12);
    filter: hue-rotate(160deg) brightness(2);
    --w-color: white;
  }
}
@-webkit-keyframes --star {
  0%, 50% {
    scale: 0.33;
  }
  75% {
    scale: 0.75;
    filter: brightness(1);
  }
  95% {
    scale: 1;
    filter: brightness(2);
    opacity: 1;
  }
  100% {
    scale: 3;
    opacity: 0;
  }
}
@keyframes --star {
  0%, 50% {
    scale: 0.33;
  }
  75% {
    scale: 0.75;
    filter: brightness(1);
  }
  95% {
    scale: 1;
    filter: brightness(2);
    opacity: 1;
  }
  100% {
    scale: 3;
    opacity: 0;
  }
}
@-webkit-keyframes --quantum {
  0%, 1% {
    opacity: 0;
  }
  5%, 95% {
    opacity: 1;
  }
  99%, 100% {
    opacity: 0;
  }
}
@keyframes --quantum {
  0%, 1% {
    opacity: 0;
  }
  5%, 95% {
    opacity: 1;
  }
  99%, 100% {
    opacity: 0;
  }
}
@-webkit-keyframes --eaten {
  0%, 99.9% {
    visibility: visible;
  }
  100% {
    visibility: hidden;
  }
}
@keyframes --eaten {
  0%, 99.9% {
    visibility: visible;
  }
  100% {
    visibility: hidden;
  }
}
@layer reset {
  *,
*::before,
*::after {
    box-sizing: border-box;
  }

  html {
    height: 100%;
  }

  body {
    min-height: 100%;
    margin: 0;
    line-height: 1.2;
    color: var(--fg, #fff);
    background-color: var(--bg, #000);
    font-family: var(--font, sans-serif);
  }

  [hidden]:not(#\#) {
    display: none !important;
  }
}