:root {
  color-scheme: dark;
  --ink: #080a14;
  --cream: #f7eddf;
  --muted: #c5b9ca;
  --line: #3d3448;
  --gold: #ebc38b;
  font: 100%/1.5 system-ui, sans-serif;
  background: var(--ink);
  color: var(--cream);
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
button { font: inherit; }
button:not(:disabled) { cursor: pointer; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; }

.observatory { max-width: 96rem; margin: auto; padding: 0 clamp(1rem, 4.6vw, 4.5rem) clamp(1rem, 3vw, 2.5rem); }
.masthead { min-height: 5.5rem; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .25rem 1rem; }
.brand, .catalog { display: inline-flex; align-items: center; gap: .65rem; min-height: 44px; text-decoration: none; font-weight: 600; }
.brand { font-size: .95rem; }
.brand-star { font-size: 1.45rem; color: var(--gold); }
.catalog { text-decoration: underline; text-underline-offset: .28em; text-decoration-color: #8a7284; font-size: .9rem; }
.catalog:hover { text-decoration-color: var(--gold); }

.sky {
  position: relative;
  isolation: isolate;
  min-height: clamp(30rem, 65vh, 48rem);
  border: 1px solid var(--line);
  border-radius: 1.5rem 1.5rem 0 0;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 70% 53%, #171421, transparent 57%),
    radial-gradient(ellipse at 90% 10%, #0c1420, transparent 68%),
    #07080c;
}
.sky canvas, .orbit, .stars { position: absolute; inset: 0; width: 100%; height: 100%; }
.sky canvas { pointer-events: none; }
.orbit { border: 0; border-radius: inherit; background: transparent; touch-action: pan-y pinch-zoom; }
.orbit:not(:disabled) { cursor: grab; }
.orbit:active:not(:disabled) { cursor: grabbing; }
.orbit:focus-visible { outline-offset: -5px; }
.intro { position: absolute; inset: 50% auto auto clamp(1.5rem, 5vw, 5rem); translate: 0 -52%; pointer-events: none; }
.intro h1 { margin: 0; font: 400 clamp(3.7rem, 9vw, 9.2rem)/.91 Georgia, serif; letter-spacing: -.055em; text-shadow: 0 0 33px #090816; }
.intro h1 em { font-weight: inherit; color: var(--gold); }
.intro p { margin: 1.45rem 0 0; color: #e9dfed; font-size: clamp(1rem, 1.7vw, 1.24rem); text-shadow: 0 1px 8px #090816; }

.stars { pointer-events: none; }
.star--picture { --star-color: #f2d3a5; }
.star--forest { --star-color: #b3e7d3; }
.star--pulse { --star-color: #dbbaf9; }
.star--picture.star { --x: 57%; --y: 64%; }
.star--forest.star { --x: 78%; --y: 28%; }
.star--pulse.star { --x: 83%; --y: 68%; }
.star {
  position: absolute;
  left: var(--x);
  top: var(--y);
  translate: -50% -50%;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid transparent;
  border-radius: 50%;
  background: transparent;
  color: var(--star-color);
  pointer-events: auto;
}
.star-light { position: relative; width: 8px; height: 8px; border-radius: 50%; background: #fff7ed; box-shadow: 0 0 9px 4px currentColor, 0 0 26px 5px currentColor; }
.star-light::before, .star-light::after { content: ""; position: absolute; inset: 50% auto auto 50%; width: 27px; height: 2px; translate: -50% -50%; background: linear-gradient(90deg, transparent, currentColor 40%, #fff7ed, currentColor 60%, transparent); }
.star-light::after { rotate: 90deg; }
.star:hover, .star[aria-pressed=true] { border-color: currentColor; background: color-mix(in srgb, currentColor 12%, transparent); }
.star-name { position: absolute; top: calc(100% + .45rem); left: 50%; translate: -50% 0; padding: .24rem .6rem; border-radius: .45rem; background: #11101e; color: var(--cream); font-size: .875rem; white-space: nowrap; visibility: hidden; }
.star:hover .star-name, .star:focus-visible .star-name, .star[aria-pressed=true] .star-name { visibility: visible; }

.sky-instructions { position: absolute; inset: auto 1rem .85rem; width: fit-content; margin: 0; padding: .22rem .55rem; border-radius: .35rem; background: #11101e; color: #ded1e2; font-size: .875rem; pointer-events: none; }

.dock { padding: .65rem clamp(.95rem, 2.8vw, 2rem) 1.35rem; border: 1px solid var(--line); border-top: 0; border-radius: 0 0 1.5rem 1.5rem; background: #14111f; }
.game-index { display: flex; flex-wrap: wrap; gap: .2rem .6rem; padding-bottom: .65rem; border-bottom: 1px solid var(--line); }
.game-index button { min-height: 44px; padding: .2rem .7rem; border: 1px solid transparent; border-radius: .55rem; background: transparent; color: var(--muted); font-size: .9rem; font-weight: 570; }
.game-index button span { color: var(--star-color); margin-right: .16rem; }
.game-index button:hover, .game-index button[aria-pressed=true] { background: #251d31; color: var(--cream); border-color: #51415f; }
.game-details { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .85rem 1.5rem; padding-top: 1rem; }
.game-copy h2 { margin: 0; font: 400 clamp(1.65rem, 3vw, 2.2rem)/1.12 Georgia, serif; }
.game-copy p { color: var(--muted); margin: .35rem 0 0; }
.play { min-height: 44px; display: inline-flex; align-items: center; padding: .5rem 1.05rem; background: var(--gold); color: #221522; border-radius: 999px; text-decoration: none; font-weight: 700; }
.play:hover { background: #f8d9ac; }

@media (max-width: 720px) {
  .masthead { min-height: 4.75rem; }
  .sky { min-height: clamp(30rem, 66vh, 38rem); }
  .intro { inset: clamp(1.5rem, 6vw, 3.25rem) 1.1rem auto; translate: none; }
  .intro h1 { font-size: clamp(3.4rem, 13vw, 6rem); }
  .intro p { margin-top: .95rem; }
  .star--picture.star { --x: 29%; --y: 64%; }
  .star--forest.star { --x: 76%; --y: 51%; }
  .star--pulse.star { --x: 69%; --y: 76%; }
}
@media (max-width: 370px) {
  .observatory { padding-inline: .65rem; }
  .brand { gap: .35rem; }
  .brand, .catalog { font-size: .8rem; }
  .game-index { gap: .15rem .2rem; }
  .game-index button { padding-inline: .35rem; }
}

.drift-control { position: absolute; right: .85rem; top: .85rem; min-height: 44px; padding: .35rem .8rem; border: 1px solid var(--line); border-radius: 999px; background: #0d1019; color: var(--cream); font-size: .875rem; }
@media (max-width: 720px) {
  .drift-control { top: auto; bottom: .55rem; }
  .sky-instructions { right: 8.8rem; width: auto; font-size: .8rem; }
}
