@import url("https://fonts.googleapis.com/css2?family=DM+Mono:wght@400;500&family=Manrope:wght@400;600&family=Newsreader:ital,opsz,wght@0,6..72,300;1,6..72,300&display=swap");

:root { --ink: #171820; --rust: #9e3e28; --lime: #c8ff68; }
* { box-sizing: border-box; }
html, body { width: 100%; height: 100%; margin: 0; overflow: hidden; }
body { color: var(--ink); background: #c6c3bc; font-family: Manrope, Arial, sans-serif; }
button { font: inherit; }

.game-shell {
  position: relative;
  width: 100vw;
  height: 100svh;
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(ellipse at 72% 78%, rgba(220, 234, 241, .7) 0, rgba(220, 234, 241, 0) 42%),
    radial-gradient(ellipse at 22% 8%, rgba(240, 246, 248, .62) 0, transparent 46%),
    linear-gradient(145deg, #7894a5 0%, #9fb4c0 43%, #b8c7cd 68%, #89a4b5 100%);
  transition: background 1.2s ease;
}
.game-shell.dusk-mode {
  background:
    radial-gradient(ellipse at 14% 88%, rgba(221, 146, 92, .72) 0, rgba(221, 146, 92, 0) 31%),
    radial-gradient(ellipse at 82% 14%, rgba(202, 214, 221, .2) 0, transparent 24%),
    linear-gradient(180deg, #263746 0%, #455565 38%, #77757a 66%, #b87961 84%, #d39b69 100%);
}
.game-shell::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  opacity: .17;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.3'/%3E%3C/svg%3E");
  mix-blend-mode: soft-light;
}
.celestial-layer { position: absolute; inset: 0; z-index: 0; overflow: hidden; opacity: 0; pointer-events: none; transition: opacity 1.2s ease; }
.dusk-mode .celestial-layer { opacity: 1; }
.rising-moon { position: absolute; left: 82%; top: 24%; width: clamp(54px, 6vw, 86px); aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle at 35% 32%, rgba(255, 255, 245, .95) 0 8%, transparent 9%), radial-gradient(circle at 66% 67%, rgba(119, 128, 135, .22) 0 10%, transparent 11%), radial-gradient(circle at 62% 28%, rgba(119, 128, 135, .16) 0 7%, transparent 8%), #d8dddc; box-shadow: inset -12px -7px 18px rgba(86, 96, 108, .28), 0 0 24px rgba(225, 234, 235, .42); transform: translate(-50%, -50%); transition: opacity .2s ease; }
.cloud-layer { position: absolute; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; opacity: 1; transition: opacity .5s ease; }
.cloud-layer.clouds-hidden { opacity: 0; }
.cloud { --scale: 1; position: absolute; left: -520px; width: 440px; height: 64px; border-radius: 50%; background: linear-gradient(90deg, rgba(246, 250, 251, 0), rgba(246, 250, 251, .55) 38%, rgba(236, 244, 247, .42) 68%, rgba(236, 244, 247, 0)); filter: blur(17px); opacity: .48; animation: cloud-drift 72s linear infinite; }
.cloud::before, .cloud::after { content: ""; position: absolute; border-radius: 50%; background: rgba(244, 249, 250, .4); filter: blur(8px); }
.cloud::before { width: 210px; height: 75px; left: 74px; top: -30px; }
.cloud::after { width: 255px; height: 57px; right: 22px; top: 16px; }
.cloud-one { --scale: 1.15; top: 17%; animation-duration: 78s; }
.cloud-two { --scale: .72; top: 38%; opacity: .32; animation-duration: 61s; animation-delay: -34s; }
.cloud-three { --scale: 1.4; top: 62%; opacity: .25; animation-duration: 96s; animation-delay: -59s; }
.cloud-four { --scale: .55; top: 78%; opacity: .3; animation-duration: 54s; animation-delay: -19s; }
.cloud-five { --scale: 1.75; top: 28%; opacity: .2; animation-duration: 112s; animation-delay: -73s; }
.cloud-six { --scale: .92; top: 69%; opacity: .24; animation-duration: 68s; animation-delay: -47s; }
.dusk-mode .cloud { background: linear-gradient(90deg, rgba(57, 65, 73, 0), rgba(75, 82, 89, .7) 34%, rgba(119, 120, 122, .68) 64%, rgba(57, 65, 73, 0)); filter: blur(15px); opacity: .66; }
.dusk-mode .cloud::before, .dusk-mode .cloud::after { background: rgba(83, 89, 95, .56); }
.dusk-mode .cloud-two, .dusk-mode .cloud-six { opacity: .5; }
.dusk-mode .cloud-three { opacity: .56; }
.dusk-mode .cloud-five { opacity: .72; }
@keyframes cloud-drift { from { transform: translateX(0) scale(var(--scale)); } to { transform: translateX(calc(100vw + 1040px)) scale(var(--scale)); } }
.sky { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; cursor: crosshair; touch-action: none; }
.sky:focus-visible { outline: 2px solid rgba(158, 62, 40, .75); outline-offset: -4px; }
.immersive-mode .sky { cursor: grab; }
.immersive-mode .sky:active { cursor: grabbing; }
.immersive-hud { position: absolute; z-index: 3; inset: 16px; display: none; padding: 12px; border: 1px solid rgba(23, 24, 32, .16); color: rgba(23, 24, 32, .58); font: 500 9px DM Mono, monospace; letter-spacing: .12em; text-transform: uppercase; pointer-events: none; }
.immersive-hud::before, .immersive-hud::after { content: ""; position: absolute; left: 50%; top: 50%; background: rgba(158, 62, 40, .48); transform: translate(-50%, -50%); }
.immersive-hud::before { width: 24px; height: 1px; }
.immersive-hud::after { width: 1px; height: 24px; }
.view-status { position: absolute; right: 12px; bottom: 12px; left: 12px; display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; }
.view-status b { max-width: 440px; font-weight: 500; text-align: right; }
.viewpoint-panel { position: absolute; top: 88px; right: 12px; width: 166px; margin: 0; padding: 8px; border: 1px solid rgba(23, 24, 32, .2); border-radius: 3px; background: rgba(225, 230, 226, .48); backdrop-filter: blur(9px); box-shadow: 0 12px 35px rgba(37, 31, 27, .08); }
.viewpoint-panel canvas { display: block; width: 148px; height: 148px; }
.viewpoint-panel figcaption { margin-top: 6px; font-size: 7px; letter-spacing: .08em; text-align: center; }
.immersive-mode .immersive-hud { display: block; }
.title-card { position: absolute; z-index: 3; top: clamp(24px, 5vw, 64px); left: clamp(24px, 6vw, 88px); max-width: 560px; pointer-events: none; }
.home-link { display: inline-block; margin-bottom: clamp(30px, 5vh, 66px); color: var(--ink); font-size: 20px; font-weight: 600; letter-spacing: -.06em; text-decoration: none; pointer-events: auto; }
.home-link span { color: var(--rust); }
.eyebrow { display: flex; align-items: center; gap: 11px; margin-bottom: 14px; font: 500 11px DM Mono, monospace; letter-spacing: .18em; text-transform: uppercase; }
.eyebrow i { width: 34px; height: 1px; background: var(--rust); }
h1 { margin: 0; font: 300 clamp(52px, 8vw, 112px)/.88 Newsreader, Georgia, serif; letter-spacing: -.055em; }
.title-card p { margin: 18px 0 0 4px; color: rgba(23, 24, 32, .7); font: italic 300 clamp(15px, 1.6vw, 20px)/1.4 Newsreader, Georgia, serif; }
.invitation { position: absolute; z-index: 3; left: 50%; top: 55%; display: flex; flex-direction: column; align-items: center; gap: 12px; transform: translate(-50%, -50%); color: rgba(23, 24, 32, .64); font: 500 10px DM Mono, monospace; letter-spacing: .18em; text-transform: uppercase; pointer-events: none; animation: breathe 2.4s ease-in-out infinite; }
.invitation.hidden { display: none; }
.pointer-mark { width: 46px; height: 46px; border: 1px solid rgba(158, 62, 40, .65); border-radius: 50%; position: relative; }
.pointer-mark::before, .pointer-mark::after { content: ""; position: absolute; background: var(--rust); }
.pointer-mark::before { width: 8px; height: 1px; left: 18px; top: 22px; }
.pointer-mark::after { width: 1px; height: 8px; left: 22px; top: 18px; }
@keyframes breathe { 50% { opacity: .45; transform: translate(-50%, -50%) scale(.98); } }
.controls { position: absolute; z-index: 4; right: clamp(18px, 3vw, 42px); top: clamp(18px, 3vw, 36px); display: flex; align-items: center; gap: 7px; padding: 7px; border: 1px solid rgba(28, 29, 33, .16); border-radius: 999px; background: rgba(234, 231, 224, .52); backdrop-filter: blur(12px); box-shadow: 0 10px 35px rgba(37, 31, 27, .08); }
.flock-count { display: flex; align-items: center; gap: 8px; padding: 0 12px; border-right: 1px solid rgba(28, 29, 33, .15); }
.flock-count span { color: rgba(23, 24, 32, .58); font: 500 9px DM Mono, monospace; letter-spacing: .12em; text-transform: uppercase; }
.flock-count input { width: 58px; border: 0; border-bottom: 1px solid rgba(23, 24, 32, .28); border-radius: 0; padding: 3px 2px 2px; color: var(--ink); background: transparent; font: 300 21px Newsreader, Georgia, serif; text-align: center; }
.flock-count input:focus { outline: 0; border-bottom-color: var(--rust); }
.flight-speed { display: flex; align-items: center; gap: 7px; padding: 0 10px 0 5px; border-right: 1px solid rgba(28, 29, 33, .15); color: rgba(23, 24, 32, .7); font: 500 9px DM Mono, monospace; letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; }
.flight-speed input { width: 66px; margin: 0; accent-color: var(--rust); cursor: pointer; }
.flight-speed output { min-width: 18px; color: var(--rust); font-size: 10px; text-align: right; }
.edge-toggle, .cloud-toggle, .dusk-toggle, .view-toggle, .auto-track-toggle { display: flex; align-items: center; gap: 6px; padding: 0 8px 0 3px; color: rgba(23, 24, 32, .7); font: 500 9px DM Mono, monospace; letter-spacing: .08em; text-transform: uppercase; cursor: pointer; white-space: nowrap; }
.edge-toggle input, .cloud-toggle input, .dusk-toggle input, .view-toggle input, .auto-track-toggle input { width: 15px; height: 15px; margin: 0; accent-color: var(--rust); cursor: pointer; }
.controls button { border: 0; border-radius: 999px; padding: 10px 13px; background: transparent; color: var(--ink); font: 500 10px DM Mono, monospace; letter-spacing: .08em; text-transform: uppercase; cursor: pointer; }
.controls button:hover, .controls button:focus-visible { outline: none; background: rgba(255, 255, 255, .48); }
footer { position: absolute; z-index: 3; right: clamp(24px, 4vw, 58px); bottom: clamp(22px, 4vw, 42px); color: rgba(23, 24, 32, .52); font: italic 300 12px Newsreader, Georgia, serif; pointer-events: none; }
footer span { padding: 0 7px; color: var(--rust); }
@media (max-width: 700px) {
  .title-card { top: 24px; left: 24px; }
  .home-link { margin-bottom: 30px; }
  .title-card p { max-width: 260px; }
  .controls { top: auto; right: 50%; bottom: 58px; max-width: calc(100vw - 24px); transform: translateX(50%); flex-wrap: wrap; justify-content: center; white-space: nowrap; }
  footer { right: 0; bottom: 22px; width: 100%; text-align: center; font-size: 10px; }
  .invitation { width: 100%; }
  .immersive-hud { inset: 10px; padding: 8px; }
  .view-status { right: 8px; bottom: 8px; left: 8px; }
  .view-status b { max-width: 138px; text-align: right; }
  .viewpoint-panel { top: 205px; right: 8px; width: 126px; padding: 6px; }
  .viewpoint-panel canvas { width: 112px; height: 112px; }
  .viewpoint-panel figcaption { font-size: 6px; }
}
@media (max-width: 700px) and (max-height: 520px) {
  .viewpoint-panel { top: 70px; }
}
@media (prefers-reduced-motion: reduce) { .invitation, .cloud { animation: none; } }
