:root {
  font-family: system-ui, -apple-system, "Noto Sans Georgian", Arial, sans-serif;
  color: #15171a;
  background: #fafafa;
  font-synthesis: none;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  --edge: clamp(20px, 5vw, 32px);
}
* { box-sizing: border-box; }
body { margin: 0; font-size: 1rem; line-height: 1.55; }
body.modal-open { overflow: hidden; }
button, a { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
button { font: inherit; cursor: pointer; }
a { color: inherit; text-decoration: none; }
button, a, img { -webkit-user-drag: none; }
img { display: block; max-width: 100%; height: auto; }
button:focus-visible, a:focus-visible { outline: 3px solid #2375ed; outline-offset: 4px; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { line-height: 1.25; overflow-wrap: break-word; }
[hidden] { display: none !important; }
.primary {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; min-height: 54px; padding: 14px 18px; border: 0;
  border-radius: 16px; background: #15171a; color: #fff;
  font-size: 1rem; font-weight: 650; line-height: 1.4; text-align: center;
}
.primary img { width: 24px; height: 24px; object-fit: contain; }
.primary:active { opacity: .8; }

/* Landing: a stable first screen, including short Android viewports. */
.landing { background: #080909; color: #fff; }
.landing-main {
  min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: clamp(16px, 3vh, 32px);
  padding: max(16px, env(safe-area-inset-top)) max(var(--edge), env(safe-area-inset-right))
    max(28px, env(safe-area-inset-bottom)) max(var(--edge), env(safe-area-inset-left));
  background: radial-gradient(ellipse at 50% 28%, #242627 0, transparent 55%), #080909;
}
.scene { width: 100%; display: grid; place-items: center; min-width: 0; }
.galaxy {
  width: min(78vw, 38vh, 360px); width: min(78vw, 38svh, 360px);
  aspect-ratio: 1; position: relative; border-radius: 50%;
  background: repeating-radial-gradient(circle, transparent 0 12%, #ffffff0c 12.2% 12.6%, transparent 12.9% 22%);
}
.satellite {
  position: absolute; left: var(--x); top: var(--y); width: 10%; aspect-ratio: 1;
  transform: translate(-50%, -50%); border-radius: 50%;
}
.center { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; }
.center img { width: clamp(64px, 17vw, 100px); aspect-ratio: 1; border-radius: 50%; box-shadow: 0 0 28px #ffffff24; }
.center strong { margin-top: 12px; font-size: 1rem; font-weight: 600; }
.landing-copy { width: 100%; max-width: 440px; text-align: center; }
.landing h1 { font-size: clamp(1.75rem, 7.5vw, 2.5rem); letter-spacing: -.025em; text-wrap: balance; }
.landing-copy p { margin: 14px auto 24px; max-width: 34ch; color: #d5d7d7; text-wrap: pretty; }
.landing .primary { max-width: 380px; background: #fff; color: #111; border-radius: 999px; }
.landing a:focus-visible { outline-color: #fff; }

/* Download page */
.page-header, .guide-main { max-width: 1120px; margin-inline: auto; }
.page-header {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: max(12px, env(safe-area-inset-top)) max(var(--edge), env(safe-area-inset-right))
    12px max(var(--edge), env(safe-area-inset-left));
}
.brand-link { min-height: 48px; display: flex; align-items: center; }
.brand-link img { width: 119px; height: 32px; }
.text-button { min-height: 48px; padding: 8px; border: 0; border-radius: 10px; background: transparent; color: #24262a; font-size: .875rem; }
.guide-main {
  padding: 12px max(var(--edge), env(safe-area-inset-right))
    max(28px, env(safe-area-inset-bottom)) max(var(--edge), env(safe-area-inset-left));
}
.hero { display: grid; gap: 24px; text-align: center; align-items: center; }
.hero-copy { min-width: 0; }
.hero h1 { font-size: clamp(1.875rem, 8vw, 2.75rem); letter-spacing: -.025em; text-wrap: balance; }
.hero p { margin: 14px auto 22px; max-width: 32ch; color: #50545a; }
.hero .primary { max-width: 380px; }
.hero-image { width: min(100%, 290px); max-height: 210px; object-fit: contain; margin-inline: auto; }
.features { display: grid; gap: 12px; margin-top: 28px; }
.features article { padding: 18px; border: 1px solid #e6e7e8; border-radius: 18px; background: #fff; }
.features h2 { font-size: 1.125rem; }
.features p { margin-top: 8px; color: #50545a; }

/* A bounded dialog with independently scrolling content and a fixed action area. */
.modal {
  width: calc(100% - 24px); max-width: 420px; padding: 0; border: 0; border-radius: 24px;
  color: #15171a; background: #fff; overflow: hidden;
  max-height: calc(100vh - 24px); max-height: calc(100dvh - 24px);
  margin: auto; box-shadow: 0 20px 70px #0005;
}
.modal::backdrop { background: #0c1019b8; }
.modal:not([open]) { display: none; }
.modal-shell {
  display: flex; flex-direction: column; min-height: 0;
  max-height: calc(100vh - 24px); max-height: calc(100dvh - 24px);
}
.modal-header {
  flex: 0 0 auto; display: grid; grid-template-columns: 52px minmax(0, 1fr) 48px;
  align-items: center; gap: 8px; padding: 12px 16px 8px;
}
.modal-logo { width: 119px; height: 32px; justify-self: center; }
.modal-back { padding-inline: 0; }
.modal-back[aria-hidden="true"] { visibility: hidden; }
.icon-button {
  width: 48px; height: 48px; display: grid; place-items: center;
  border: 0; border-radius: 50%; background: #f0f1f3; color: #252a32;
}
.icon-button svg { width: 20px; height: 20px; }
.modal-scroll { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 8px 20px 20px; }
.offer, .conditions { text-align: center; }
.modal h2 { font-size: clamp(1.5rem, 6.4vw, 1.875rem); letter-spacing: -.02em; }
.modal h2 span { display: block; }
.modal h2:focus { outline: none; }
.offer-art { width: 200px; height: auto; margin: 6px auto 14px; }
.tabs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; margin-top: 18px; }
.tabs button {
  min-width: 0; min-height: 48px; padding: 8px 2px; border: 0; border-radius: 10px;
  background: #f1f2f5; color: #454b56; font-size: .875rem; line-height: 1.35; overflow-wrap: anywhere;
}
.tabs [aria-pressed="true"] { background: #e6efff; color: #164eab; font-weight: 650; }
.example { min-height: 3.1em; margin: 12px 0 16px; font-size: 1rem; line-height: 1.55; color: #50545a; }
.plan { padding: 16px; border-radius: 16px; background: #edf4ff; text-align: left; }
.plan-heading { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 1rem; }
.plan-price { flex: 0 0 auto; padding: 2px 9px; border-radius: 8px; background: #fff; color: #1b59b7; font-weight: 700; }
.plan ul { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 8px; list-style: none; margin: 16px 0 0; padding: 0; }
.plan li { display: flex; align-items: center; gap: 7px; min-width: 0; font-size: .875rem; overflow-wrap: anywhere; }
.plan li img { flex: 0 0 22px; width: 22px; height: 22px; }
.install-art { width: 160px; height: auto; margin: 10px auto 16px; }
.install-note { margin-top: 12px; color: #50545a; }
.steps { counter-reset: step; list-style: none; padding: 0; margin: 22px 0 0; display: grid; gap: 20px; text-align: left; }
.steps li { counter-increment: step; position: relative; padding-left: 46px; }
.steps li::before {
  content: counter(step); position: absolute; left: 0; top: 0;
  display: grid; place-items: center; width: 32px; height: 32px;
  border-radius: 50%; background: #e6efff; color: #164eab; font-weight: 650;
}
.steps strong { display: block; margin-bottom: 4px; font-size: 1rem; line-height: 1.4; }
.steps p { color: #50545a; font-size: 1rem; }
.modal-actions { flex: 0 0 auto; padding: 14px 20px 18px; border-top: 1px solid #eceef1; background: #fff; }

@media (max-width: 480px) {
  .modal { margin: auto max(12px, env(safe-area-inset-right)) max(12px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left)); }
  .modal, .modal-shell {
    max-height: calc(100vh - 24px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
    max-height: calc(100dvh - 24px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
  }
}
@media (max-width: 359px) {
  .modal-scroll { padding-inline: 16px; }
  .modal-actions { padding-inline: 16px; }
  .tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .plan { padding: 12px; }
  .plan ul { column-gap: 6px; }
  .plan li { gap: 5px; }
}
@media (min-width: 740px) {
  .landing-main { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 5vw; padding: 40px 6vw; }
  .galaxy { width: min(44vw, 72vh, 580px); }
  .center img { width: clamp(90px, 10vw, 132px); }
  .center strong { font-size: 1.25rem; }
  .landing-copy { text-align: left; max-width: 480px; }
  .landing h1 { font-size: clamp(2.25rem, 4vw, 3.5rem); }
  .landing-copy p { margin-left: 0; }
  .hero { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); text-align: left; padding-block: 36px; gap: 40px; }
  .hero h1 { font-size: clamp(2.5rem, 4.5vw, 3.5rem); }
  .hero p { margin-left: 0; }
  .hero-image { width: 100%; max-width: 372px; max-height: none; }
  .features { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (orientation: landscape) and (max-height: 500px) {
  .landing-main { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1fr); gap: 20px; padding-block: 20px; }
  .galaxy { width: min(36vw, 70vh); }
  .landing h1 { font-size: 1.75rem; }
  .landing-copy p { margin-block: 10px 16px; }
  .offer-art { width: 140px; }
  .install-art { width: 120px; }
}
@media (prefers-reduced-motion: no-preference) {
  .landing-copy { animation: enter .25s ease-out both; }
  @keyframes enter { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
}
