:root {
  color-scheme: dark;
  --background: #130a20;
  --panel: #211231;
  --border: #54356b;
  --text: #fcfaff;
  --muted: #e0d7ea;
  --accent: #b9ff29;
  --radius: 16px;
  --header-height: 68px;
  --gutter: clamp(16px, 4vw, 48px);
  --section-space: clamp(32px, 4.5vw, 64px);
  --grid-gap: clamp(12px, 2vw, 24px);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-height) + 1px); }
body { margin: 0; background: var(--background); color: var(--text); font: 16px/1.55 system-ui, sans-serif; }
h1, h2, h3, p, figure { margin: 0; }
h1, h2, h3 { line-height: 1.12; }
h2 { margin-bottom: 20px; font-size: clamp(1.65rem, 3vw, 2.35rem); letter-spacing: -.035em; }
h3 { font-size: 1.125rem; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
:where(a, button, summary):focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
img { display: block; width: 100%; }
.wrap { width: min(1160px, 100% - 2 * var(--gutter)); margin-inline: auto; }
.section { padding-block-start: var(--section-space); scroll-margin-top: 12px; }
.header, footer { background: #180d25; }
.header {
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid var(--border);
  background: #180d25f5;
  backdrop-filter: blur(14px);
}
.nav, .footer, .nav-links, .nav-actions { display: flex; align-items: center; gap: clamp(12px, 2.5vw, 32px); }
.nav, .footer { justify-content: space-between; min-height: var(--header-height); }
.brand { display: inline-flex; align-items: center; gap: 10px; font-size: 1.2rem; font-weight: 800; white-space: nowrap; }
.brand-mark { width: 36px; height: 36px; flex: none; object-fit: contain; }
.nav-links a, .footer > a:last-child { display: inline-flex; align-items: center; min-height: 44px; }
.nav-links a:hover, .footer a:hover { text-decoration: underline; }
.screenshot-nav a { background: var(--panel); border: 1px solid var(--border); border-radius: 8px; min-height: 44px; padding: 8px 12px; }
.nav-actions { margin-inline-start: auto; }
.drawer-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--panel);
}
.drawer-icon svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.drawer-icon:hover { border-color: var(--accent); }
.menu { display: none; }
.mobile-drawer {
  position: fixed;
  inset: 0 0 0 auto;
  width: min(88vw, 360px);
  max-width: none;
  height: 100dvh;
  max-height: none;
  margin: 0;
  padding: 20px clamp(14px, 5vw, 24px);
  border: 0;
  border-inline-start: 1px solid var(--border);
  background: linear-gradient(155deg, #2b173e, var(--background) 58%);
  color: var(--text);
  box-shadow: -18px 0 48px #0006;
  overscroll-behavior: contain;
}
.mobile-drawer[open] { animation: drawer-enter .25s ease-out both; }
.mobile-drawer::backdrop { background: #09040dc2; }
html:has(.mobile-drawer[open]) { overflow: hidden; }
@keyframes drawer-enter { from { transform: translateX(100%); } to { transform: translateX(0); } }
.drawer-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding-bottom: 18px; border-bottom: 1px solid var(--border); }
.drawer-links { display: grid; gap: 8px; margin-block: 20px; }
.drawer-links a { display: flex; align-items: center; min-height: 48px; padding: 10px 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--panel); font-weight: 650; }
.drawer-links a:hover { border-color: var(--accent); }
.drawer-download { width: 100%; }
.drawer-meta { text-align: center; }

.hero, .download { position: relative; isolation: isolate; overflow: hidden; background: #231035; }
.hero::after, .download::after { content: ""; position: absolute; inset: 0; z-index: -1; }
.hero::after { background: linear-gradient(100deg, #180b26 5%, #180b26ed 32%, #180b26ac 100%); }
.poster-wall { position: absolute; z-index: -2; inset: -36px -32px -36px 28%; display: grid; grid-template: repeat(2, minmax(0, 1fr)) / repeat(3, minmax(0, 1fr)); gap: 8px; transform: skew(-10deg); }
.poster-wall div { min-height: 0; overflow: hidden; }
.poster-wall img, .art img, .genre img, .download > img { height: 100%; object-fit: cover; }
.hero-inner { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: var(--grid-gap); padding-block: clamp(32px, 4vw, 60px); }
.hero h1 { font-size: clamp(2.9rem, 6vw, 5.6rem); letter-spacing: -.06em; }
.hero-copy > p:not(.apk-meta) { color: var(--muted); margin: 16px 0 24px; max-width: 36ch; font-size: clamp(1rem, 1.6vw, 1.2rem); }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 10px 22px; border-radius: 999px; background: var(--accent); color: #151c08; font-weight: 800; transition: background-color .18s, transform .18s; }
.header-download { min-height: 44px; padding-inline: 14px; font-size: .875rem; white-space: nowrap; }
.button:hover { background: #d4ff83; transform: translateY(-2px); }
.apk-meta { margin-top: 10px; color: var(--muted); font-size: .875rem; }
.download-dialog { width: min(420px, calc(100% - 32px)); margin: auto; padding: 24px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--panel); color: var(--text); }
.download-dialog::backdrop { background: #000c; }
.download-dialog h2 { font-size: 1.25rem; }
.download-dialog p { margin: 10px 0; color: var(--muted); }
.download-dialog progress { width: 100%; height: 12px; accent-color: var(--accent); }
.download-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.download-actions .button[hidden] { display: none; }
.hero-phones { display: flex; min-width: 0; justify-content: center; align-items: center; gap: var(--grid-gap); animation: enter .45s ease-out both; }
@keyframes enter { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.device { display: block; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: #100c16; }
.device img { height: auto; }
.hero-phones .device { width: min(54%, 224px); box-shadow: 0 12px 26px #0009; }
.hero-phones .device + .device { width: min(36%, 150px); }

.gallery-heading { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 20px; margin-bottom: 20px; }
.gallery-heading h2 { margin-bottom: 0; }
.gallery-help { color: var(--muted); margin: -8px 0 14px; }
.screenshot-nav { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.screenshot-nav a { display: inline-flex; align-items: center; }
.screenshot-nav a:hover, .screenshot-link:hover, .gallery figure:target .device { border-color: var(--accent); }
.features, .genres, .steps { display: grid; gap: var(--grid-gap); }
.gallery {
  --visible-frames: 4;
  position: relative;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: calc(100% / var(--visible-frames));
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
  padding-block: 8px;
}
.gallery figure {
  min-width: 0;
  padding-inline: 10px;
  scroll-snap-align: start;
}
.gallery .device {
  width: min(100%, 224px, 34svh);
  margin-inline: auto;
  border: 3px solid var(--border);
  border-radius: clamp(16px, 4vw, 24px);
}
.gallery-controls:not([hidden]) {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
}
.gallery-controls button {
  min-width: 44px;
  min-height: 44px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--panel);
  font-size: 1.2rem;
}
.gallery-controls button:hover:not(:disabled) { border-color: var(--accent); }
.gallery-controls button:disabled { opacity: .45; cursor: default; }
.gallery-position { min-width: 6ch; text-align: center; color: var(--muted); font-variant-numeric: tabular-nums; }
.gallery figcaption, .screenshot-dialog figcaption { padding-top: 8px; text-align: center; font-weight: 700; }
.screenshot-dialog { width: fit-content; max-width: calc(100vw - 24px); max-height: calc(100dvh - 24px); margin: auto; padding: 12px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--panel); color: var(--text); }
.screenshot-dialog::backdrop { background: #000c; }
.screenshot-dialog form { display: flex; justify-content: flex-end; }
.screenshot-dialog .close { min-width: 44px; min-height: 44px; border: 0; background: transparent; font-size: 1.5rem; }
.screenshot-dialog img { width: auto; height: auto; max-width: min(100%, 716px); max-height: calc(100dvh - 126px); margin-inline: auto; object-fit: contain; }

.features, .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.feature, .genre, .steps li, details { border: 1px solid var(--border); border-radius: var(--radius); background: var(--panel); overflow: hidden; }
.art { aspect-ratio: 2 / 1; }
.feature-copy, .steps li { padding: 16px; }
.feature p, .steps p, .faq p { margin-top: 6px; color: var(--muted); }
.genres { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.genre { position: relative; isolation: isolate; display: grid; place-items: end center; padding: 8px; min-height: clamp(85px, 12vw, 146px); text-align: center; font-weight: 750; }
.genre img, .download > img { position: absolute; inset: 0; z-index: -2; }
.genre::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(transparent 25%, #100719f0); }
.steps { list-style: none; margin: 0; padding: 0; counter-reset: steps; }
.steps li { display: flex; align-items: flex-start; gap: 12px; counter-increment: steps; }
.steps li::before { content: counter(steps); display: grid; place-items: center; width: 28px; height: 28px; flex: 0 0 28px; border: 1px solid var(--border); border-radius: 50%; font-weight: 800; }
.faq { display: grid; gap: 10px; max-width: 760px; }
summary { min-height: 44px; padding: 12px 16px; cursor: pointer; font-weight: 700; }
details[open] summary { background: #352048; }
summary:focus-visible { outline-offset: -4px; }
.faq p { margin-top: 0; padding: 12px 16px 16px; }
.download { margin-top: var(--section-space); padding-block: clamp(36px, 6vw, 72px); text-align: center; }
.download::after { background: #211032dc; }
footer { border-top: 1px solid var(--border); }

@media (max-width: 960px) {
  .gallery { --visible-frames: 3; }
}
@media (max-width: 760px) {
  .gallery { --visible-frames: 2; }
  .features, .steps { grid-template-columns: 1fr; }
  .feature { display: grid; grid-template-columns: minmax(104px, 1fr) 2fr; }
  .art { aspect-ratio: auto; position: relative; }
  .art img { position: absolute; inset: 0; }
  .genres { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .nav-actions { display: none; }
  .menu { display: grid; }
  .hero-inner { grid-template-columns: 1fr; gap: 24px; }
  .poster-wall { inset-inline-start: 0; }
  .hero-phones .device { width: min(62%, 186px); }
  .hero-phones .device + .device { display: none; }
}
@media (max-width: 390px) {
  .gallery { --visible-frames: 1; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; }
}

.policy-doc {
  max-width: 72ch;
  margin-inline: auto;
  padding-block: var(--section-space);
}
.policy-doc h1 { font-size: clamp(2rem, 5vw, 3rem); }
.policy-doc h2 { margin: 1.75rem 0 .75rem; font-size: clamp(1.3rem, 3vw, 1.65rem); }
.policy-doc h3 { margin-block: 1rem .5rem; }
.policy-doc p { margin-block: .75rem; color: var(--muted); }
