:root {
  --bg: #f4f6fa;
  --surface: #ffffff;
  --text: #16203a;
  --muted: #5d6680;
  --accent: #0e7d73;
  --border: #e1e5ee;
  --placeholder-bg: #fff4d6;
  --navy: #13203c;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e182d;
    --surface: #16223b;
    --text: #e9edf5;
    --muted: #a2abc0;
    --accent: #36d0c3;
    --border: #27344f;
    --placeholder-bg: #4a3b10;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

header.top {
  max-width: 820px;
  margin: 0 auto;
  padding: 20px 16px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
header.top a.home { color: var(--text); font-weight: 600; text-decoration: none; display: inline-flex; align-items: center; gap: 10px; }
header.top a.home::before {
  content: ""; width: 32px; height: 32px; border-radius: 9px; flex: none;
  background: var(--navy) url(img/logo.png) center / cover;
}
header.top nav { display: flex; gap: 16px; flex-wrap: wrap; font-size: 15px; }

.lang-switch { display: inline-flex; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.lang-switch button {
  border: 0; background: transparent; color: var(--muted);
  padding: 4px 12px; font: inherit; font-size: 14px; cursor: pointer;
}
.lang-switch button.active { background: var(--accent); color: var(--surface); }

main {
  max-width: 820px;
  margin: 16px auto 40px;
  padding: 28px 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
}
@media (max-width: 600px) {
  main { margin: 12px 16px 32px; padding: 20px 16px; }
}

h1 { font-size: 28px; line-height: 1.25; margin: 0 0 8px; }
h2 { font-size: 20px; margin: 32px 0 8px; }
h3 { font-size: 17px; margin: 20px 0 4px; }
p, li { color: var(--text); }
.muted { color: var(--muted); font-size: 14px; }
a { color: var(--accent); }

.service {
  border-left: 3px solid var(--border);
  padding: 2px 0 2px 14px;
  margin: 14px 0;
}
.service p { margin: 4px 0; }

.placeholder {
  background: var(--placeholder-bg);
  padding: 0 4px;
  border-radius: 4px;
}

.cards { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); margin-top: 20px; }
.card {
  display: block; padding: 16px; border: 1px solid var(--border); border-radius: 10px;
  text-decoration: none; color: var(--text);
}
.card strong { display: block; margin-bottom: 4px; color: var(--accent); }

footer { text-align: center; color: var(--muted); font-size: 13px; padding: 0 16px 32px; }
.privacy-settings { display: block; width: fit-content; margin: 6px auto 0; font-size: 14px; }
.analytics-consent {
  position: fixed;
  z-index: 1;
  inset: auto 16px 16px auto;
  width: min(460px, calc(100% - 32px));
  max-height: calc(100% - 32px);
  overflow: auto;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 10px 32px rgb(0 0 0 / 20%);
  font-size: 14px;
}
.analytics-consent h2 { margin: 0; font-size: 18px; }
.analytics-consent p { margin: 8px 0; }
.analytics-consent-status { color: var(--muted); }
.analytics-consent-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; }
.analytics-consent-actions button {
  flex: 1 1 7rem;
  min-height: 44px;
  padding: 6px 12px;
  border: 1px solid var(--muted);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  cursor: pointer;
}
.analytics-consent-actions a, .analytics-consent-actions .analytics-consent-close {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 6px;
  border: 0;
  color: var(--accent);
  text-decoration: underline;
}
.analytics-consent :focus-visible, .privacy-settings:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* language visibility */
body:not(.lang-en) [lang="en"].l10n { display: none; }
body.lang-en [lang="ru"].l10n { display: none; }

/* games: one tab per store */
.tabs {
  display: flex; gap: 4px; padding: 4px; margin: 16px 0 12px;
  background: var(--bg); border: 1px solid var(--border); border-radius: 12px;
}
.tab {
  flex: 1; min-height: 40px; border: 0; border-radius: 9px; background: transparent;
  color: var(--muted); font: inherit; font-size: 15px; font-weight: 600; cursor: pointer;
}
.tab.active { background: var(--accent); color: var(--surface); }
.games { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); margin-top: 12px; }
.game {
  display: flex; align-items: center; gap: 14px; padding: 12px;
  border: 1px solid var(--border); border-radius: 14px; text-decoration: none; color: var(--text);
}
.games[hidden] { display: none; }
.game:hover { border-color: var(--accent); }
.game img { width: 64px; height: 64px; border-radius: 15px; flex: none; }
.game-details { flex: 1; display: grid; gap: 4px; }
.game .name { font-size: 17px; font-weight: 600; line-height: 1.3; }
.game-description { color: var(--muted); font-size: 14px; line-height: 1.4; }
.game .chevron { color: var(--muted); font-size: 26px; line-height: 1; }
.empty { margin: 16px 0; }
.about { margin-top: 36px; padding-top: 4px; border-top: 1px solid var(--border); }
@media (max-width: 600px) {
  .games { grid-template-columns: 1fr; }
  h1 { font-size: 24px; }
}

/* home page: dark band with the brand picture behind the logo */
.hero-wrap {
  background: var(--navy) url(img/hero.webp) center / cover no-repeat;
  color: #fff;
  padding-bottom: 56px;
}
header.top.on-dark a.home { color: #fff; }
header.top.on-dark a.home::before { display: none; }
.on-dark .lang-switch { border-color: rgba(255, 255, 255, 0.28); }
.on-dark .lang-switch button { color: #c9d2e6; }
.on-dark .lang-switch button.active { background: #36d0c3; color: var(--navy); }
.hero { max-width: 820px; margin: 0 auto; padding: 24px 16px 0; text-align: center; }
.hero-logo {
  width: 104px; height: 104px; border-radius: 26px; display: block; margin: 0 auto;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.45);
}
.hero-name { font-size: 30px; font-weight: 700; line-height: 1.2; margin: 16px 0 2px; color: #fff; }
.hero-tag { margin: 0; color: #c9d2e6; }
.hero-wrap + main { position: relative; margin-top: -36px; }
@media (min-width: 900px) {
  .hero-wrap { padding-bottom: 72px; }
  .hero { padding-top: 36px; }
}
