:root {
  color-scheme: dark;
  --bg: #03040b;
  --panel: rgba(8, 13, 27, 0.88);
  --cyan: #00e5ff;
  --pink: #ff2db2;
  --text: #f4f7ff;
  --muted: #a9b6ce;
  --line: rgba(0, 229, 255, 0.22);
}

* { box-sizing: border-box; }

html { min-height: 100%; background: var(--bg); }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.7;
  background:
    radial-gradient(circle at 18% 0%, rgba(255, 45, 178, .13), transparent 34rem),
    radial-gradient(circle at 88% 20%, rgba(0, 229, 255, .12), transparent 38rem),
    linear-gradient(rgba(0, 229, 255, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 229, 255, .035) 1px, transparent 1px),
    var(--bg);
  background-size: auto, auto, 42px 42px, 42px 42px, auto;
}

a { color: var(--cyan); text-underline-offset: 4px; }
a:hover { color: #76f3ff; }

.shell { width: min(900px, calc(100% - 36px)); margin: 0 auto; }

header {
  border-bottom: 1px solid var(--line);
  background: rgba(3, 4, 11, .82);
  backdrop-filter: blur(14px);
}

.nav {
  min-height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  text-decoration: none;
  font-weight: 800;
  letter-spacing: .03em;
}

.orb {
  width: 30px;
  height: 30px;
  border: 1px solid var(--cyan);
  border-radius: 50%;
  box-shadow: inset 0 0 10px var(--pink), 0 0 14px rgba(0, 229, 255, .5);
  background: radial-gradient(circle, var(--pink) 0 18%, transparent 22% 43%, var(--cyan) 46% 49%, transparent 52%);
}

nav { display: flex; gap: 22px; }
nav a { color: var(--muted); text-decoration: none; font-weight: 650; }
nav a[aria-current="page"], nav a:hover { color: var(--cyan); }

main { padding: 70px 0 90px; }

.eyebrow {
  color: var(--pink);
  font-size: .82rem;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
}

h1 { margin: 8px 0 18px; font-size: clamp(2.35rem, 7vw, 4.8rem); line-height: 1.02; letter-spacing: -.045em; }
h2 { margin: 2.2rem 0 .65rem; font-size: 1.35rem; line-height: 1.3; }
h3 { margin: 1.7rem 0 .4rem; font-size: 1.08rem; }
p, li { color: #d7dfef; }
.lede { max-width: 700px; color: var(--muted); font-size: 1.16rem; }

.cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; margin-top: 38px; }
.card, .document {
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: 0 18px 60px rgba(0, 0, 0, .28);
}
.card { padding: 28px; border-radius: 18px; text-decoration: none; }
.card strong { display: block; color: var(--text); font-size: 1.16rem; }
.card span { color: var(--muted); }
.card:hover { border-color: rgba(255, 45, 178, .6); transform: translateY(-2px); }
.document { margin-top: 34px; padding: clamp(24px, 5vw, 52px); border-radius: 22px; }
.document ul { padding-left: 1.25rem; }
.meta { color: var(--muted); font-size: .92rem; }
.button {
  display: inline-block;
  margin-top: 16px;
  padding: 11px 17px;
  border: 1px solid var(--cyan);
  border-radius: 10px;
  color: var(--text);
  text-decoration: none;
  font-weight: 750;
  box-shadow: 0 0 20px rgba(0, 229, 255, .12);
}

footer { border-top: 1px solid var(--line); padding: 28px 0 40px; color: var(--muted); font-size: .9rem; }

@media (max-width: 620px) {
  .nav { align-items: flex-start; flex-direction: column; padding: 18px 0; gap: 12px; }
  nav { gap: 18px; }
  main { padding-top: 48px; }
  .cards { grid-template-columns: 1fr; }
}


/* Download call-to-action */
.download-callout {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  margin: 30px 0 24px;
  padding: 24px;
  border: 1px solid rgba(0, 229, 255, .55);
  border-radius: 18px;
  background: rgba(0, 229, 255, .055);
  box-shadow: 0 0 28px rgba(0, 229, 255, .06);
}
.download-callout div { display: grid; gap: 6px; }
.download-callout strong { font-size: 1.12rem; }
.download-callout span { color: var(--muted); line-height: 1.55; }
.download-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 20px;
  border: 1px solid var(--cyan);
  border-radius: 12px;
  color: var(--cyan);
  background: rgba(0, 229, 255, .06);
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  transition: transform .15s ease, background .15s ease, box-shadow .15s ease;
}
.download-button:hover {
  transform: translateY(-1px);
  background: rgba(0, 229, 255, .12);
  box-shadow: 0 0 22px rgba(0, 229, 255, .12);
}
.download-panel { margin-top: 30px; }
.download-panel .download-button { margin-top: 10px; }
@media (max-width: 720px) {
  .download-callout { align-items: stretch; flex-direction: column; }
  .download-button { width: 100%; white-space: normal; text-align: center; }
}

/* Homepage mascot */
.home-hero { display: grid; grid-template-columns: minmax(0, 1fr) 220px; align-items: center; gap: 30px; }
.hero-copy { min-width: 0; }
.tama { display: block; width: 100%; padding: 0; border: 0; background: transparent; cursor: pointer; border-radius: 24px; -webkit-tap-highlight-color: transparent; }
.tama:focus-visible { outline: 2px solid var(--cyan); outline-offset: 6px; }
.tama-canvas { display: block; width: 100%; height: auto; transform-origin: 50% 80%; filter: drop-shadow(0 0 16px rgba(0,229,255,.16)); }
@media (max-width: 620px) {
  .home-hero { grid-template-columns: 1fr; gap: 8px; }
  .tama { width: 160px; justify-self: center; }
}

/* Shared illustrated layout across every page. */
body { background: #060b23; isolation: isolate; }
body::before { content: ""; position: fixed; inset: 0; z-index: -1;
  background: linear-gradient(rgba(4,7,22,.18), rgba(4,7,22,.40)), url('/assets/tower-background.jpg') center center / cover no-repeat;
  pointer-events: none; }
header { background: rgba(4,7,22,.9); }
.page-layout { width: min(1800px, calc(100% - 48px)); margin: 0 auto; display: grid;
  grid-template-columns: minmax(200px,1fr) minmax(0,800px) minmax(180px,.9fr);
  gap: clamp(20px,3vw,56px); align-items: start; padding: 64px 0 80px; }
.title-side, .mascot-side { position: sticky; top: 110px; margin-top: 44px; }
.title-side img { display: block; width: 100%; height: auto; filter: drop-shadow(0 8px 24px rgba(0,0,0,.35)); }
.title-side a { display: block; }
.mascot-side .tama { width: min(100%,340px); margin: auto; }
.page-content { min-width: 0; padding: clamp(24px,3vw,42px); border: 1px solid rgba(107,229,255,.4);
  border-radius: 26px; background: rgba(4,9,26,.94); box-shadow: 0 24px 70px rgba(0,0,0,.4); }
.home-hero { display: block; }
.page-content h1 { font-size: clamp(2.2rem,4vw,4rem); }
.lede { color: #d1dcf0; }
.card span, .download-callout span { color: #c6d3e9; }
.card { transition: transform .15s, border-color .15s; padding: 22px; }
.document { background: rgba(12,21,42,.85); padding: clamp(20px,3vw,32px); }
.document h2:first-child { margin-top: 0; }
.download-callout { flex-direction: column; align-items: stretch; }
.download-button { text-align: center; white-space: normal; }
footer { background: rgba(4,7,22,.9); }
@media (max-width: 1100px) {
 .page-layout { max-width: 820px; grid-template-columns: 1fr 180px; gap: 22px; padding-top: 24px; }
 .title-side { position: static; margin: 0; align-self: center; }
 .title-side img { max-width: 330px; }
 .mascot-side { position: static; margin: 0; grid-column: 2; grid-row: 1; }
 .mascot-side .tama { width: 160px; }
 .page-content { grid-column: 1 / -1; grid-row: 2; }
}
@media (max-width: 620px) {
 .page-layout { width: calc(100% - 24px); grid-template-columns: minmax(0,1fr) 112px; gap: 14px; padding-bottom: 36px; }
 .mascot-side .tama { width: 112px; }
 .page-content { padding: 24px 18px; border-radius: 20px; }
 .page-content h1 { font-size: 2.4rem; overflow-wrap: anywhere; }
 .document { padding: 20px 16px; }
 .cards { grid-template-columns: 1fr; }
 .download-callout { padding: 18px; }
 nav { flex-wrap: wrap; }
 .document a { overflow-wrap: anywhere; }
}

/* Keep the footer at the viewport bottom when content is short. */
body { display: grid; grid-template-rows: auto 1fr auto; min-height: 100vh; min-height: 100svh; }
body > header { grid-row: 1; }
body > .page-layout { grid-row: 2; align-self: start; }
body > footer { grid-row: 3; margin-top: 0; }

/* Responsive homepage gameplay video. */
.gameplay-video { margin-top: 32px; }
.gameplay-video h2 { margin: 0 0 16px; }
.video-player { width: 100%; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 16px; border: 1px solid var(--line); background: #000; }
.video-player iframe { display: block; width: 100%; height: 100%; border: 0; }
.video-link { margin: 10px 0 0; font-size: .9rem; }

/* Square gameplay player. */
.video-player { aspect-ratio: 1 / 1; max-width: 640px; margin-inline: auto; }
.video-player video { display: block; width: 100%; height: 100%; object-fit: contain; background: #000; }

/* High resolution layered Hoshitama, shared by every page. */
.tama { animation: hoshitama-float 5.8s ease-in-out infinite; }
.hoshitama-fallback, .tama-canvas { display:block; width:100%; height:auto; }
.tama-canvas[hidden], .hoshitama-fallback[hidden] { display:none; }
.hoshitama-name { display:block; width:min(100%,340px); height:auto; margin:10px auto 0; filter:drop-shadow(0 3px 12px rgba(255,55,206,.18)); }
@keyframes hoshitama-float { 0%,100% { transform:translateY(0); } 50% { transform:translateY(-7px); } }
@media(max-width:1100px) { .hoshitama-name { max-width:180px; margin-top:7px; } }
@media(max-width:620px) { .hoshitama-name { max-width:112px; margin-top:5px; } }
@media(prefers-reduced-motion:reduce) { .tama { animation:none; } }
