*,
*::before,
*::after { box-sizing: border-box; }

[hidden] { display: none !important; }

:root {
  --bg: #eef2f7;
  --card: #ffffff;
  --ink: #0f172a;
  --muted: #3e4c63;
  --line: #d5deea;
  --navy: #0e1b33;
  --accent: #22c55e;
  --accent-ink: #052e16;
  --danger: #9f1239;
  --ok: #166534;
  --overlay: rgba(8, 12, 24, 0.56);
  color-scheme: light;
}

html:not(.ready) body { visibility: hidden; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Segoe UI", "PingFang SC", "Hiragino Sans", "Microsoft YaHei", sans-serif;
  font-size: 1rem;
  line-height: 1.5;
  background: var(--bg);
  color: var(--ink);
}

body.lock { overflow: hidden; }

h1, h2, h3 { line-height: 1.2; font-weight: 700; margin: 0; }

h1 { font-size: clamp(1.8rem, 4vw, 3.1rem); max-width: 18em; }

h2 { font-size: clamp(1.4rem, 2vw, 1.8rem); }

p { margin: 0; }

button, input { font: inherit; color: inherit; }

button { cursor: pointer; }

button:disabled { cursor: not-allowed; }

:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

.hero :focus-visible,
.banner :focus-visible { outline-color: #fff; }

.skip {
  position: absolute;
  left: 12px;
  top: -48px;
  z-index: 80;
  background: #fff;
  color: var(--ink);
  padding: 8px 12px;
}

.skip:focus { top: calc(12px + env(safe-area-inset-top)); }

.wrap { width: min(1120px, calc(100% - 32px)); margin: 0 auto; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--line);
  padding-top: env(safe-area-inset-top);
}

.bar { display: flex; align-items: center; gap: 12px; min-height: 64px; }

.grow { flex: 1; }

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  color: inherit;
  font-weight: 700;
  text-decoration: none;
}

.brand svg { width: 32px; height: 32px; flex: none; }

.nav-desktop { display: flex; gap: 4px; }

.nav-desktop a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 10px;
  border-radius: 10px;
  color: inherit;
  text-decoration: none;
}

.nav-desktop a:hover { background: #e7eef8; }

.icon-btn {
  min-width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.icon-btn svg { width: 22px; height: 22px; }

.burger { display: none; }

.btn {
  min-height: 44px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 700;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
}

.btn-accent { background: var(--accent); color: var(--accent-ink); }

.btn-accent:hover { background: #16a34a; }

.btn-soft { background: #fff; color: var(--ink); border-color: var(--line); }

.btn-soft:hover { background: #f8fafc; }

.btn-ghost { background: transparent; color: #fff; border-color: rgba(255, 255, 255, 0.45); }

.btn-ghost:hover { background: rgba(255, 255, 255, 0.08); }

.btn:active { filter: brightness(0.96); }

.who {
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.875rem;
}

.pop { position: relative; }

.menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 5;
  min-width: 168px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.12);
}

.menu button {
  display: block;
  width: 100%;
  min-height: 44px;
  padding: 0 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  text-align: left;
}

.menu button:hover,
.menu button[aria-selected="true"] { background: #e7eef8; font-weight: 700; }

.hero {
  background-color: var(--navy);
  background-image: radial-gradient(rgba(255, 255, 255, 0.16) 1px, transparent 1px);
  background-size: 22px 22px;
  color: #fff;
  padding: 72px 0 64px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.3fr 0.7fr;
  gap: 32px;
  align-items: center;
}

.kicker { margin: 0 0 12px; font-size: 0.875rem; font-weight: 700; color: #86efac; }

html[lang="en"] .kicker,
html[lang="ru"] .kicker,
html[lang="vi"] .kicker { letter-spacing: 0.06em; text-transform: uppercase; }

.hero-lead { max-width: 40rem; margin-top: 16px; color: #d5deea; font-size: 1.125rem; }

.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }

.points { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }

.points span {
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 0.875rem;
}

.statcard {
  display: grid;
  gap: 16px;
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.06);
}

.statcard p { margin: 0; }

.num {
  display: block;
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.statcard p span:last-child { color: #d5deea; }

.block { padding: 64px 0; }

.band { background: #e7eef8; }

.intro { max-width: 40rem; margin-top: 8px; color: var(--muted); }

.tools { display: flex; gap: 12px; align-items: flex-end; margin: 20px 0 12px; }

.field { flex: 1; }

label, .lbl { display: block; margin-bottom: 6px; font-weight: 600; }

input[type="search"],
input[type="email"],
input[type="password"] {
  width: 100%;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.places {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.place {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-rows: auto auto;
  column-gap: 10px;
  row-gap: 2px;
  align-items: center;
  min-height: 68px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  text-align: left;
}

.place:hover { border-color: #94a3b8; }

.place[aria-pressed="true"] { border-color: #16a34a; background: #f0fdf4; }

.flag {
  grid-row: 1 / span 2;
  width: 40px;
  height: 30px;
  object-fit: cover;
  border-radius: 4px;
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.16);
}

.pname { font-weight: 700; line-height: 1.3; overflow-wrap: anywhere; }

.pcount { color: var(--muted); font-size: 0.875rem; font-variant-numeric: tabular-nums; }

.picked {
  margin: 0 0 12px;
  padding: 12px 14px;
  border-radius: 12px;
  background: #f0fdf4;
  color: #052e16;
}

.none { color: var(--muted); }

.cards, .steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 24px;
}

.card {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--card);
}

.card svg { width: 24px; height: 24px; }

.card h3 { margin: 12px 0 6px; font-size: 1.05rem; }

.card p { color: var(--muted); }

.step b, .card > b { display: block; margin-bottom: 8px; color: var(--ok); font-size: 0.875rem; }

.apps { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }

.tick-title { margin-top: 28px; font-size: 1.05rem; }

.ticks {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 20px;
  margin: 12px 0 0;
  padding: 0;
}

.ticks li { display: flex; gap: 8px; align-items: flex-start; }

.ticks svg { width: 20px; height: 20px; flex: none; margin-top: 2px; color: var(--ok); }

.banner {
  padding: 28px;
  border-radius: 20px;
  background: var(--navy);
  color: #fff;
}

.banner p { max-width: 36rem; margin: 12px 0 20px; color: #d5deea; }

.foot {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
  align-items: center;
  padding: 8px 0 calc(28px + env(safe-area-inset-bottom));
  color: var(--muted);
}

.link {
  min-height: 44px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink);
  text-decoration: underline;
  font-weight: 600;
}

.drawer { position: fixed; inset: 0; z-index: 40; }

.sheet {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 1;
  width: min(320px, 88vw);
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: calc(12px + env(safe-area-inset-top)) 12px 12px;
  background: #fff;
}

.sheet a,
.sheet button:not(.icon-btn) {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 44px;
  padding: 0 12px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: inherit;
  text-align: left;
  text-decoration: none;
}

.sheet a:hover,
.sheet button:not(.icon-btn):hover { background: #e7eef8; }

.modal {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  padding: 12px;
  padding-bottom: calc(12px + env(safe-area-inset-bottom));
}

#legalModal { z-index: 36; }

.modal > * { grid-area: 1 / 1; }

.scrim { width: 100%; height: 100%; border: 0; background: var(--overlay); }

.dialog {
  justify-self: center;
  align-self: center;
  z-index: 1;
  width: min(440px, 100%);
  max-height: calc(100vh - 24px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
  overflow: auto;
  padding: 20px;
  border-radius: 16px;
  background: #fff;
  color: var(--ink);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.28);
}

.dialog-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }

.dialog .intro { margin: 0 0 12px; }

#authForm { display: grid; gap: 6px; }

#authForm .btn { margin-top: 8px; }

.check { display: flex; gap: 8px; align-items: flex-start; min-height: 44px; }

.check input { width: 20px; height: 20px; margin-top: 2px; flex: none; }

.captcha-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }

.captcha-row .lbl { margin: 0; }

#captchaCanvas {
  width: 100%;
  height: 148px;
  display: block;
  border-radius: 12px;
  background: #e7eef8;
  touch-action: none;
  cursor: grab;
}

#captchaCanvas:active { cursor: grabbing; }

.captcha-hint { margin-top: 8px; color: var(--muted); font-size: 0.875rem; }

#captchaStatus { min-height: 1.25em; margin: 4px 0 0; }

#captchaStatus[data-ok="1"] { color: var(--ok); }

#captchaStatus[data-ok="0"] { color: var(--danger); }

.err { min-height: 1.25em; margin: 0; color: var(--danger); }

.switch { margin-top: 12px; }

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(16px + env(safe-area-inset-bottom));
  z-index: 50;
  width: min(420px, calc(100% - 24px));
  transform: translateX(-50%);
  padding: 12px 16px;
  border-radius: 12px;
  background: var(--navy);
  color: #fff;
}

.noscript { padding: 16px; }

section { scroll-margin-top: 80px; }

@media (max-width: 900px) {
  .cards, .steps { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 800px) {
  .hero-grid, .cards, .steps { grid-template-columns: 1fr; }
  .nav-desktop, .auth-desktop { display: none; }
  .icon-btn.burger { display: inline-flex; }
  .hero { padding: 48px 0 40px; }
  .block { padding: 40px 0; }
}

@media (min-width: 720px) {
  .places { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (min-width: 1024px) {
  .places { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  .tools { flex-direction: column; align-items: stretch; }
  .ticks { grid-template-columns: 1fr; }
  .wrap { width: min(1120px, calc(100% - 24px)); }
  .places { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 420px) {
  .wordmark { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}
