:root {
  color-scheme: dark;
  --bg: #080e20;
  --surface: #101931;
  --surface-higher: #192442;
  --line: #2a395a;
  --text: #f4f6ff;
  --muted: #b8c5e0;
  --accent: #8de6ff;
  --accent-strong: #bef2ff;
  font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
  color: var(--text);
  background: var(--bg);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; line-height: 1.65; }
main, section, details { scroll-margin-top: 22px; }
img { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; }
figure, p, h1, h2, h3 { margin: 0; }
h1, h2, h3 { text-wrap: balance; }
h2 { font-size: clamp(2.1rem, 4.1vw, 3.35rem); font-weight: 760; letter-spacing: -0.046em; line-height: 1.05; }
:focus-visible { outline: 2px solid #c4f4ff; outline-offset: 5px; }

.shell { width: min(100% - 80px, 1240px); margin-inline: auto; }
.skip-link { position: fixed; z-index: 2; top: 12px; left: 12px; padding: 8px 14px; border-radius: 5px; color: #091624; background: var(--accent-strong); transform: translateY(-180%); }
.skip-link:focus { transform: translateY(0); }
.site-header { border-bottom: 1px solid #223052; background: #0b1228; }
.header-inner, .footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 24px; }
.header-inner { min-height: 74px; }
.brand { display: inline-flex; align-items: center; gap: 11px; text-decoration: none; }
.brand img { flex: 0 0 40px; width: 40px; height: 40px; border: 1px solid #8194ca; border-radius: 9px; }
.brand strong, .brand small { display: block; line-height: 1.2; }
.brand strong { font-size: 1rem; font-weight: 760; }
.brand small { margin-top: 3px; color: #b8d5f5; font-size: 0.77rem; font-weight: 680; letter-spacing: 0.17em; text-transform: uppercase; }
.header-inner nav { display: flex; align-items: center; gap: clamp(18px, 3.4vw, 42px); }
.header-inner nav a, .site-footer nav a { color: var(--muted); font-size: 0.93rem; font-weight: 650; text-decoration: none; }
.header-inner nav a:hover, .site-footer nav a:hover { color: var(--text); text-decoration: underline; text-underline-offset: 5px; }
.header-inner nav .nav-download { padding: 8px 15px; border: 1px solid #3a5a76; border-radius: 7px; color: var(--accent-strong); }
.header-inner nav .nav-download:hover { border-color: var(--accent); background: #142842; text-decoration: none; }

.hero { position: relative; display: grid; grid-template-columns: minmax(0, 0.89fr) minmax(0, 1.11fr); gap: clamp(16px, 3vw, 48px); align-items: center; min-height: 530px; padding-block: 82px 91px; isolation: isolate; }
.hero::before, .hero::after { position: absolute; z-index: -1; inset: 0; pointer-events: none; content: ''; }
.hero::before { background: radial-gradient(ellipse at 81% 42%, #233f7c 0%, #111d3e 32%, transparent 69%); opacity: 0.64; }
.hero::after { width: min(900px, 100%); margin: auto 0 auto auto; height: 78%; background: repeating-linear-gradient(126deg, transparent 0 38px, #7699e913 38px 39px, transparent 39px 83px); mask-image: radial-gradient(ellipse at center, #000, transparent 73%); }
.hero-copy { position: relative; }
.eyebrow { display: flex; align-items: center; gap: 10px; color: var(--accent); font-size: 0.84rem; font-weight: 730; letter-spacing: 0.115em; line-height: 1.4; text-transform: uppercase; }
.eyebrow::before { flex: 0 0 19px; width: 19px; height: 2px; background: currentColor; content: ''; }
.hero h1 { margin-top: 13px; font-size: clamp(2.8rem, 5.27vw, 5.05rem); font-weight: 820; letter-spacing: -0.068em; line-height: 0.98; text-wrap: initial; }
.hero h1 em { color: var(--accent-strong); font-style: normal; }
.hero-summary { max-width: 424px; margin-top: 21px; color: var(--muted); font-size: clamp(1.02rem, 1.4vw, 1.14rem); line-height: 1.62; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 24px; }
.button { display: inline-flex; justify-content: center; align-items: center; min-height: 48px; padding: 10px 17px; border: 1px solid transparent; border-radius: 7px; font-size: 0.95rem; font-weight: 725; line-height: 1.3; text-align: center; text-decoration: none; transition: color 150ms ease, background-color 150ms ease, border-color 150ms ease; }
.button-secondary { border-color: #42577a; color: var(--text); background: #121d36; }
.button-secondary:hover { border-color: var(--accent); background: #192b4a; }
.apk-button { position: relative; display: block; width: clamp(174px, 20vw, 216px); max-width: 100%; aspect-ratio: 318 / 104; overflow: hidden; border-radius: 9px; }
.apk-button img {
  position: absolute;
  top: -123.08%;
  left: -6.6%;
  width: 113.21%;
  max-width: none;
  height: auto;
  /* Trace the two silhouettes to hide the supplied PNG's checkerboard. */
  clip-path: polygon(evenodd,
    11.94% 35.56%, 37.50% 35.56%, 26.67% 64.44%, 11.94% 64.44%,
    9.44% 63.61%, 7.78% 62.22%, 6.39% 60%, 5.83% 57.78%,
    5.83% 42.22%, 6.67% 39.17%, 8.06% 37.22%, 10% 36.11%, 11.94% 35.56%,
    38.61% 35.56%, 87.78% 35.56%, 90.28% 36.39%, 92.50% 38.06%,
    93.61% 40.28%, 94.17% 42.50%, 94.17% 57.50%, 93.61% 59.44%,
    92.50% 61.67%, 90.83% 63.06%, 89.17% 63.89%, 87.78% 64.44%,
    27.78% 64.44%, 38.61% 35.56%, 11.94% 35.56%);
  transition: filter 150ms ease;
}
.apk-button:hover img { filter: brightness(1.12); }
.apk-button:active img { filter: brightness(0.85); }
.download-pending { color: #f4f6ff; font-size: 0.96rem; font-weight: 660; }
.file-info { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin: 14px 0 0; padding: 0; color: var(--muted); font-size: 0.91rem; font-weight: 570; list-style: none; }
.file-info li:not(:first-child)::before { display: inline-block; width: 3px; height: 3px; margin: 0 12px 3px 0; border-radius: 50%; background: #9bb4da; content: ''; }
.checksum { width: fit-content; max-width: 100%; margin-top: 11px; color: var(--muted); font-size: 0.86rem; }
.checksum summary { color: #cceaff; cursor: pointer; }
.checksum summary:hover { text-decoration: underline; text-underline-offset: 4px; }
.checksum code { display: block; margin-top: 4px; overflow-wrap: anywhere; }
.hero-art { position: relative; margin: 0; padding: 6px; border: 1px solid #536d9b; border-radius: 17px; background: #16213b; box-shadow: 0 24px 64px #04091cb5; }
.hero-art img { width: 100%; height: auto; aspect-ratio: 1024 / 500; border-radius: 11px; }

.game-section { padding-block: 64px 73px; border-block: 1px solid #243354; background: #0d162e; }
.game-copy { display: grid; grid-template-columns: 1fr 0.94fr; gap: clamp(18px, 4vw, 65px); align-items: end; }
.game-copy h2, .support-intro h2 { margin-top: 10px; }
.game-copy > p, .support-intro > p:not(.eyebrow) { color: var(--muted); }
.screenshots { margin-top: 36px; }
.screenshots h3 { margin-bottom: 13px; color: #e8f1ff; font-size: 1.15rem; font-weight: 740; }
.gallery { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); align-items: start; gap: clamp(11px, 1.5vw, 19px); }
.gallery figure:first-child { grid-row: span 2; grid-column: span 2; align-self: center; }
.gallery figure { min-width: 0; }
.screenshot { position: relative; display: block; overflow: hidden; border: 1px solid #425879; border-radius: 10px; background: #192746; cursor: zoom-in; }
.screenshot img { width: 100%; height: auto; aspect-ratio: 16 / 9; transition: transform 210ms ease; }
.screenshot:hover { border-color: var(--accent); }
.screenshot:hover img { transform: scale(1.035); }
.zoom { position: absolute; right: 9px; bottom: 9px; display: grid; width: 30px; height: 30px; place-items: center; border: 1px solid #9ab6e5; border-radius: 6px; color: var(--text); background: #0c152de8; font-size: 1.22rem; line-height: 1; }
.gallery figcaption { margin-top: 5px; color: #ccd7ee; font-size: 0.91rem; font-weight: 630; }

.support-section { display: grid; grid-template-columns: minmax(0, 0.78fr) minmax(0, 1.22fr); gap: clamp(28px, 5.4vw, 88px); padding-block: 76px 83px; }
.support-intro > p:not(.eyebrow) { max-width: 330px; margin-top: 13px; }
.support-intro .button { margin-top: 17px; }
.help-list { overflow: hidden; align-self: start; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.help-list details + details { border-top: 1px solid var(--line); }
.help-list summary { position: relative; min-height: 61px; padding: 17px 51px 17px 20px; font-weight: 715; line-height: 1.55; list-style: none; cursor: pointer; }
.help-list summary:hover { background: var(--surface-higher); }
.help-list summary:focus-visible { outline-offset: -5px; }
.help-list summary::-webkit-details-marker { display: none; }
.help-list summary::after { position: absolute; top: 16px; right: 17px; display: grid; width: 28px; height: 28px; place-items: center; border: 1px solid #48628b; border-radius: 6px; color: var(--accent); font-size: 1.07rem; font-weight: 500; line-height: 1; content: '+'; }
.help-list details[open] summary::after { content: '−'; }
.help-list details > :is(p, ol) { margin: 0; padding: 0 22px 17px 20px; color: var(--muted); }
.help-list details > ol { padding-left: 43px; }
.help-list li + li { margin-top: 5px; }
.help-list a { color: #c3eeff; text-underline-offset: 4px; }

.site-footer { padding-block: 27px; border-top: 1px solid #243354; background: #0a1227; }
.site-footer .brand img { flex-basis: 36px; width: 36px; height: 36px; }
.site-footer p { margin-top: 9px; color: var(--muted); font-size: 0.85rem; }
.site-footer nav { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px 23px; }
.site-footer nav a > span { margin-left: 3px; color: var(--accent-strong); overflow-wrap: anywhere; font-weight: 550; }

.lightbox { position: fixed; width: min(100vw - 24px, 1160px); max-height: calc(100dvh - 24px); padding: 8px; overflow: auto; border: 1px solid #576b94; border-radius: 12px; color: var(--text); background: #0a142b; }
.lightbox::backdrop { background: #030817e8; }
.lightbox figure img { width: 100%; max-height: calc(100dvh - 77px); border-radius: 6px; object-fit: contain; }
.lightbox figcaption { padding: 6px 8px 1px; color: #d3e5fb; font-size: 0.93rem; }
.lightbox-close { position: absolute; top: 14px; right: 14px; display: grid; width: 40px; height: 40px; align-content: center; padding: 0; border: 1px solid #9ab6e5; border-radius: 6px; color: white; background: #0a142bf2; font-size: 1.7rem; line-height: 1; cursor: pointer; }

.legal-layout { max-width: 850px; padding-block: 44px 75px; }
.back-link, .legal a { color: var(--accent-strong); text-underline-offset: 4px; }
.legal { margin-top: 17px; padding: clamp(19px, 5vw, 53px); border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.legal h1 { margin: 10px 0 13px; font-size: clamp(2.45rem, 5.4vw, 4rem); font-weight: 780; letter-spacing: -0.05em; line-height: 1.08; }
.legal section { margin-top: 24px; }
.legal h2 { margin-bottom: 8px; color: var(--text); font-size: 1.24rem; font-weight: 720; letter-spacing: -0.023em; line-height: 1.3; }
.legal :is(li, p:not(.eyebrow)) { color: var(--muted); }
.legal p + p { margin-top: 8px; }
.legal a { overflow-wrap: anywhere; }

@media (max-width: 995px) {
  .shell { width: calc(100% - 56px); }
  .hero { min-height: 460px; padding-block: 65px; }
  .hero h1 { font-size: clamp(2.6rem, 5.7vw, 4rem); }
  .game-section { padding-block: 54px 60px; }
  .footer-inner { align-items: flex-start; }
}

@media (max-width: 760px) {
  .shell { width: calc(100% - 32px); }
  .header-inner { min-height: 65px; gap: 12px; }
  .header-inner nav { gap: 11px; }
  .header-inner nav a { font-size: 0.85rem; }
  .header-inner nav .game-nav { display: none; }
  .header-inner nav .nav-download { padding-inline: 8px; }
  .brand { gap: 7px; }
  .brand img { flex-basis: 34px; width: 34px; height: 34px; }
  .brand strong { font-size: 0.91rem; }
  .brand small { font-size: 0.72rem; }
  .hero { min-height: 0; grid-template-columns: 1fr; gap: 25px; padding-block: 39px 45px; }
  .hero::before { background: radial-gradient(ellipse at 50% 53%, #273d70, transparent 75%); }
  .hero h1 { font-size: clamp(2.63rem, 9vw, 4.5rem); }
  .hero-summary { margin-top: 18px; }
  .actions { margin-top: 19px; }
  .actions .button { padding-inline: 12px; font-size: 0.89rem; }
  .download-pending { flex-basis: 100%; }
  .hero-art { padding: 4px; border-radius: 11px; }
  .hero-art img { border-radius: 7px; }
  .game-section { padding-block: 43px 46px; }
  .game-copy, .support-section { grid-template-columns: 1fr; gap: 15px; }
  .screenshots { margin-top: 24px; }
  .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gallery figure:first-child { grid-row: span 1; }
  .gallery figcaption { font-size: 0.86rem; }
  .zoom { right: 5px; bottom: 5px; width: 25px; height: 25px; }
  .support-section { gap: 23px; padding-block: 47px 52px; }
  .help-list details > :is(p, ol) { padding-right: 17px; }
  .footer-inner { flex-direction: column; gap: 16px; }
  .site-footer nav { justify-content: flex-start; }
  .legal-layout { padding-block: 27px 44px; }
}

@media (max-width: 350px) {
  .header-inner nav > a:not(.nav-download) { display: none; }
  .hero h1 { font-size: 2.4rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0s !important; }
}
