.home-scene-frame{position:fixed;inset:0;overflow:hidden;pointer-events:none}
.home-scene-frame>.home-space{position:absolute;background:transparent}
body.home-page-3d-left::before{
  content:"";position:fixed;inset:0;pointer-events:none;
  background:#080e24 var(--home-sky-background,url("/assets/preloader/sky-1cbca58c8d206ed9.webp")) center/cover no-repeat;
}
.home-scene-frame>.home-ship-label-layer{position:absolute}
.home-page-3d .home-scene-frame>.home-ship-target{position:absolute;pointer-events:auto}
.home-page-3d .home-space canvas{display:block;width:100%;height:100%}
.home-page-3d .home-space::after{background:radial-gradient(ellipse at 50% 48%,#050b1cba 0%,#050b1c8a 20%,#050b1c2e 42%,transparent 67%),linear-gradient(180deg,#050b1c33,transparent 24%,transparent 78%,#050b1c38)}
.home-page-3d .home-main{justify-content:center;padding:98px var(--home-gutter) 38px}
.home-page-3d .home-content{width:306px;text-align:center}
.home-page-3d .home-content h1{font-size:clamp(54px,4.7vw,76px);letter-spacing:.045em;text-shadow:0 3px 30px #02081880}
.home-page-3d .home-lead{width:100%;max-width:100%;margin:0 auto 24px;color:#d0d9ec;font-size:14px;line-height:1.7}
.home-page-3d .home-actions{display:grid;grid-template-columns:1fr 1.35fr;width:100%;max-width:100%;margin:auto}
.home-page-3d .home-start{grid-column:1/-1;justify-content:center;position:relative}
.home-page-3d .home-start svg{position:absolute;right:18px}
.home-page-3d .home-rules,.home-page-3d .home-join{justify-content:center;gap:8px;padding:10px 12px;font-size:13px;white-space:nowrap}
.home-scene-message{margin:0;max-width:420px;padding:8px 12px;border-radius:8px;background:#0b173bc4;color:#bfcce0;font-size:11px;line-height:1.5}

.home-page-3d .home-content h1.home-title-accessible{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.home-logo{display:flex;align-items:center;justify-content:center;gap:15px;margin-bottom:19px}
.home-logo .home-brand-mark{font-size:66px}
.home-logo-name{color:#f1f4fa;font-size:17px;font-weight:650;line-height:1.45;letter-spacing:3px;text-align:left}
.home-page-3d .home-account{justify-content:center;margin:0 auto 22px;gap:10px}
.home-page-3d .home-main{padding-top:65px;padding-bottom:82px}
.home-page-3d .home-stage{cursor:grab}
.home-page-3d .home-content{cursor:auto}
.home-page-3d .home-stage.home-camera-dragging{cursor:grabbing;user-select:none}
/* Same camera buttons and grouping as the game HUD. */
.home-camera-controls{position:fixed;left:50%;bottom:22px;z-index:5;transform:translateX(-50%);display:flex;align-items:center;gap:8px;color:#c6dce7}
.home-page-3d-left .home-camera-controls{inset-inline:0;width:100%;bottom:70px;transform:none;pointer-events:none}
.home-page-3d-left .camera-zoom-controls{flex:none;pointer-events:auto}
.home-camera-row{display:flex;align-items:center;gap:inherit}
.home-camera-hint{display:flex;align-items:center;gap:8px;margin-inline-start:4px;user-select:none}
.home-camera-hint,.home-footer-links a{color:#92a4b6;font-size:12px;line-height:1.4;text-shadow:0 1px 4px #03091c}
.home-camera-hint>span,.home-footer-links a{opacity:.5}
.home-stage:not(:has(#home-scene[data-scene="ready"])) .home-camera-hint{display:none}
.home-camera-controls button{box-sizing:border-box;display:inline-flex;align-items:center;justify-content:center;min-height:36px;height:36px;padding:0 10px;border:1px solid #b8cff330;border-radius:9px;background:#111e32b8;color:#c6dce7;backdrop-filter:blur(16px);-webkit-backdrop-filter:blur(16px);font:500 12px/1.2 system-ui,sans-serif;letter-spacing:0;text-align:center;box-shadow:inset 0 1px 0 #ffffff05;transition:background .15s,border-color .15s,color .15s}
.home-camera-controls button:hover:not(:disabled){background:#284761d9;border-color:#9edee077;color:#efffff}
.home-camera-controls button:focus-visible{outline:2px solid #9de9e2;outline-offset:3px}
.home-camera-controls button:disabled{opacity:.35;cursor:not-allowed}
.home-camera-controls .camera-modes,.home-camera-controls .camera-zoom-controls{position:relative;display:flex;align-items:center;gap:6px;box-sizing:border-box;height:36px;padding:3px;border:1px solid #b8cff330;border-radius:9px;background:#111e32b8;backdrop-filter:blur(16px);-webkit-backdrop-filter:blur(16px);box-shadow:inset 0 1px 0 #ffffff05}
.home-camera-controls .camera-zoom-controls::before{content:'';position:absolute;left:50%;top:8px;bottom:8px;width:1px;background:#b8cff330;transform:translateX(-50%);pointer-events:none}
.home-camera-controls .camera-mode,.home-camera-controls .camera-zoom{width:34px;min-width:34px;min-height:28px;height:28px;padding:0;display:grid;place-items:center;border:0;border-radius:6px;background:transparent;backdrop-filter:none;box-shadow:none}
.home-camera-controls .camera-mode[aria-pressed="true"]{background:#31546de6;color:#efffff;box-shadow:inset 0 0 0 1px #9edee033}
.home-camera-controls .camera-mode[aria-pressed="true"]:hover:not(:disabled){background:#3d6680f2}
.home-camera-controls .camera-mode:focus-visible,.home-camera-controls .camera-zoom:focus-visible{outline-offset:0}
.home-camera-controls .camera-mode svg{display:block;width:18px;height:18px;pointer-events:none}
.home-camera-controls :is(.camera-zoom,.home-camera-hint) svg{display:block;width:12px;height:12px;flex:none;pointer-events:none}
.home-camera-controls #home-sound{height:36px;width:36px;min-width:36px;border:1px solid #b8cff330;border-radius:9px;background:#111e32b8;pointer-events:auto}
.home-camera-controls #home-sound svg{width:22px;height:22px}
.home-camera-controls #home-sound[hidden],#home-sound[aria-pressed="true"] .sound-cross,#home-sound[aria-pressed="false"] .sound-waves{display:none}

.home-ship-tag{position:absolute;top:0;left:0;z-index:1;display:flex;flex-direction:column;gap:2px;padding:6px 10px;border:1px solid color-mix(in srgb,var(--faction-color) 42%,transparent);border-radius:8px;background:#08172cdf;box-shadow:0 4px 16px #0004,inset 0 1px #ffffff0b;color:#e9f1fa;white-space:nowrap;pointer-events:none;will-change:transform}
.home-ship-tag strong{font-size:11px;line-height:1.35;font-weight:600}
.home-ship-tag small{font-size:10px;line-height:1.35;font-weight:400;color:color-mix(in srgb,var(--faction-color) 60%,#dce9f4)}

.home-page-3d .home-logo{width:max-content;max-width:100%;margin-left:auto;margin-right:auto}
.home-page-3d .home-account{width:max-content;max-width:100%}

/* The menu sits to the left of the planet and fleet. */
.home-page-3d-left{
  --home-content-wide-max:1776px;
  --home-content-max-width:clamp(var(--content-max-width),100vw - 784px,var(--home-content-wide-max));
  --home-column-width:calc((min(100vw,var(--home-content-max-width)) - 2 * var(--content-gutter))/12);
  --home-compact-inset:clamp(0px,(100vw - 1180px)/4,24px);
  --home-wide-inset:clamp(var(--home-compact-inset),(100vw - 1300px)/2,var(--home-column-width));
}
.home-page-3d-left :is(.home-content,.home-camera-row,.home-footer-links){margin-inline-start:var(--home-wide-inset)}
.home-page-3d-left .home-space::after{display:none;background:none}
.home-page-3d-left .home-main{justify-content:flex-start;padding-top:65px;padding-bottom:148px}
.home-page-3d-left .home-content{text-align:left}
.home-page-3d-left .home-logo,.home-page-3d-left .home-account{justify-content:flex-start;margin-left:0;margin-right:0}
.home-page-3d-left .home-logo{width:64%;gap:0;margin-bottom:24px}
.home-page-3d-left .home-logo-wordmark{display:block;width:100%;height:auto}
.home-page-3d-left .home-lead{color:#e3ebf7;text-shadow:0 2px 8px #020a1c66}
.home-page-3d-left .home-start{justify-content:flex-start}

/* Labels stay quiet until a ship attacks or evades; keep position tracking during fades. */
.home-page-3d-left .home-ship-tag{opacity:0;visibility:hidden;transition:opacity 320ms ease,visibility 0s linear 320ms;will-change:transform,opacity}
.home-page-3d-left .home-ship-tag.is-visible{opacity:1;visibility:visible;transition-delay:0s,0s}
@media(prefers-reduced-motion:reduce){.home-page-3d-left .home-ship-tag{transition:none}}

/* The image is blank: the action name stays selectable and accessible HTML. */
.home-start.home-start-illustrated,.home-button.home-resume{
  width:100%;
  min-height:0;
  aspect-ratio:306/50;
}
.home-start.home-start-illustrated{
  position:relative;
  isolation:isolate;
  display:flex;
  margin-top:2px;
  border:0;
  border-radius:6px;
  padding:0;
  overflow:visible;
  background:none;
  box-shadow:none;
  color:#142038;
  backdrop-filter:none;
  -webkit-backdrop-filter:none;
  transition:color .2s ease;
}
.home-start-illustrated .home-start-art{
  position:absolute;
  z-index:-1;
  left:-4.53782%;
  top:-127.45902%;
  display:block;
  width:108.73950%;
  max-width:none;
  height:331.96721%;
  object-fit:fill;
  pointer-events:none;
  user-select:none;
  transition:filter .2s ease;
}
.home-start-illustrated .home-start-label{
  display:flex;
  align-items:center;
  justify-content:center;
  width:75.4%;
  margin-left:7.4%;
  position:relative;
  z-index:1;
  color:inherit;
  font-size:16px;
  font-weight:700;
  line-height:1.2;
  white-space:nowrap;
}
.home-start.home-start-illustrated:is(:hover,:focus-visible){
  background:none;
  border:0;
  box-shadow:none;
  color:#0b172b;
  transform:none;
}
.home-start-illustrated:is(:hover,:focus-visible) .home-start-art{
  filter:brightness(1.12) saturate(1.08) drop-shadow(0 5px 9px #ffdda57a);
}
.home-start.home-start-illustrated:active{transform:translateY(0)}
.home-start.home-start-illustrated:focus-visible{outline:2px solid #fff0d5;outline-offset:4px}

/* Independently scale the crystal cluster by exactly 10% in both axes. */
.home-start-illustrated .home-start-crystals{
  position:absolute;
  z-index:0;
  left:85.4014599%;
  bottom:18.1434599%;
  width:10.0505334%;
  height:99.1561181%;
  transform:scale(1.10);
  transform-origin:50% 100%;
  pointer-events:none;
  user-select:none;
  transition:filter .2s ease;
}
.home-start-crystals img{
  position:absolute;
  display:block;
  left:-34.4236760%;
  top:-34.9369989%;
  width:169.1588785%;
  height:165.8648339%;
  max-width:none;
  object-fit:fill;
}
.home-start-illustrated:is(:hover,:focus-visible) .home-start-crystals{
  filter:brightness(1.25) saturate(1.12) drop-shadow(0 0 5px #d96effbb);
}
@media(prefers-reduced-motion:reduce){
  .home-start.home-start-illustrated,
  .home-start-illustrated .home-start-art,
  .home-start-illustrated .home-start-crystals{transition:none}
  .home-start.home-start-illustrated:is(:hover,:focus-visible){transform:none}
}

.home-footer-links{position:absolute;top:calc(100% + 8px);display:flex;flex-wrap:wrap;justify-content:center;gap:0 16px;max-width:calc(100vw - 32px)}
.home-footer-links a{padding:4px 0;text-decoration:none;pointer-events:auto}
.home-footer-links a:is(:hover,:focus-visible){opacity:1}
.home-footer-links a:focus-visible{outline:2px solid #9de9e2;outline-offset:3px}

.dialog.home-idea-dialog{width:min(460px,calc(100% - 32px));max-height:calc(100dvh - 32px);margin:auto;padding:16px 10px 24px;color:#f0f6ff;text-align:center}
.home-idea-dialog::backdrop{background:var(--modal-backdrop-color);backdrop-filter:var(--modal-backdrop-filter);-webkit-backdrop-filter:var(--modal-backdrop-filter)}
.home-idea-dialog header{position:relative;display:grid;place-items:center;min-height:40px;padding:0 44px;margin-bottom:14px}
.home-idea-dialog h2{margin:0;font-size:clamp(20px,5vw,29px);line-height:1.2}
.home-idea-dialog .modal-close{position:absolute;inset-inline-end:0;top:0}
.home-idea-dialog p{max-width:44ch;margin:0 auto 22px;color:#d7e6ed;font-size:clamp(12px,4vw,14px);line-height:1.65;overflow-wrap:anywhere}
.home-idea-email{color:var(--gold);text-decoration:none}
.home-idea-email:is(:hover,:focus-visible){color:#ffdf9e}
.home-idea-email:focus-visible{outline:2px solid currentColor;outline-offset:3px}

@media(max-width:860px){
  body.home-page-3d-left{background:#080e24}
  .home-page-3d-left .home-stage{cursor:auto}
  .home-page-3d-left .home-stage>.home-main{justify-content:center;min-height:0;padding-block:clamp(32px,6vw,52px) 8px}
  .home-page-3d-left .home-stage .home-content{width:min(100%,306px);text-align:center}
  .home-page-3d-left :is(.home-logo,.home-account){justify-content:center;margin-inline:auto}
  .home-scene-frame{position:relative;inset:auto;width:min(100%,720px);height:clamp(260px,62vw,460px);margin-inline:auto;overflow:visible;pointer-events:auto;touch-action:pan-y;cursor:grab}
  .home-scene-frame>:is(.home-space,.home-ship-label-layer){position:fixed}
  .home-page-3d .home-scene-frame>.home-ship-target{position:fixed;touch-action:pan-y}
  .home-scene-frame:has(#home-scene[data-scene="fallback"]){display:none}
  .home-page-3d-left .home-stage>.home-camera-controls{position:relative;inset:auto;flex-direction:column;padding-block:6px calc(24px + env(safe-area-inset-bottom))}
  .home-camera-row{flex-wrap:wrap;justify-content:center}
  .home-camera-controls .camera-zoom-controls{display:none}
  .home-footer-links{position:static}
  .home-page-3d-left .home-stage>.social-widget{margin:8px auto 16px}
  .home-page-3d-left .home-stage>.social-widget:not(:has(.social-activity)){display:none}
}
