:root {
  --bg1: #0b1426;
  --bg2: #16284a;
  --card: #14213d;
  --card2: #1b2d52;
  --ink: #eef4ff;
  --muted: #b4c4e0;
  --ice: #8fd3ff;
  --ice2: #c9ecff;
  --warm: #ffc766;
  --line: #2d4272;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: system-ui, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 18px;
  line-height: 1.6;
  color: var(--ink);
  background: linear-gradient(180deg, var(--bg1) 0%, var(--bg2) 100%) fixed;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Falling snow, pure CSS, two layers */
body::before,
body::after {
  content: "";
  position: fixed;
  inset: -100% 0 0 0;
  pointer-events: none;
  z-index: 0;
  background-repeat: repeat;
}

body::before {
  background-image:
    radial-gradient(3px 3px at 20px 30px, #fff, transparent),
    radial-gradient(2px 2px at 90px 120px, #fff, transparent),
    radial-gradient(3px 3px at 160px 60px, #fff, transparent),
    radial-gradient(2px 2px at 230px 180px, #fff, transparent),
    radial-gradient(3px 3px at 300px 90px, #fff, transparent);
  background-size: 340px 220px;
  opacity: 0.85;
  animation: snow1 18s linear infinite;
}

body::after {
  background-image:
    radial-gradient(2px 2px at 50px 70px, #dff3ff, transparent),
    radial-gradient(1.5px 1.5px at 140px 20px, #dff3ff, transparent),
    radial-gradient(2px 2px at 210px 140px, #dff3ff, transparent),
    radial-gradient(1.5px 1.5px at 280px 200px, #dff3ff, transparent);
  background-size: 260px 260px;
  opacity: 0.6;
  animation: snow2 28s linear infinite;
}

@keyframes snow1 {
  from { transform: translateY(0); }
  to   { transform: translateY(220px); }
}

@keyframes snow2 {
  from { transform: translate(0, 0); }
  to   { transform: translate(60px, 260px); }
}

@media (prefers-reduced-motion: reduce) {
  body::before, body::after { animation: none; }
  html { scroll-behavior: auto; }
}

.wrap {
  position: relative;
  z-index: 1;
  max-width: 980px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header and hero */
.hero {
  text-align: center;
  padding: 36px 0 0;
}

.hero svg {
  width: 100%;
  max-width: 760px;
  height: auto;
  display: block;
  margin: 0 auto 12px;
  overflow: visible;
  position: relative;
  pointer-events: none;
}

.hero h1 {
  margin: 8px 0 6px;
  font-size: 2.6rem;
  letter-spacing: 0.02em;
  color: var(--ice2);
  text-shadow: 0 0 24px rgba(143, 211, 255, 0.35);
}

.hero p {
  margin: 0 auto 8px;
  max-width: 600px;
  color: var(--muted);
  font-size: 1.1rem;
}

.cta {
  margin: 22px 0 8px;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 12px 22px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  border: 2px solid var(--ice);
  color: var(--bg1);
  background: var(--ice);
  transition: transform 0.15s ease, background 0.15s ease;
}

.btn:hover, .btn:focus-visible {
  background: var(--ice2);
  transform: translateY(-2px);
}

.btn.ghost {
  background: transparent;
  color: var(--ice2);
}

.btn.ghost:hover, .btn.ghost:focus-visible {
  background: rgba(143, 211, 255, 0.15);
}

.btn.warm {
  background: var(--warm);
  border-color: var(--warm);
}

.btn.small {
  padding: 8px 14px;
  font-size: 0.95rem;
}

a:focus-visible, .btn:focus-visible {
  outline: 3px solid var(--warm);
  outline-offset: 3px;
}

/* Service cards */
h2.section {
  text-align: center;
  margin: 44px 0 18px;
  font-size: 1.7rem;
  color: var(--ice2);
}

.grid {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
}

.card {
  background: linear-gradient(180deg, var(--card2), var(--card));
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

.card .icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: rgba(143, 211, 255, 0.12);
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}

.card .icon img {
  width: 36px;
  height: 36px;
  object-fit: contain;
}

.card .icon svg {
  width: 32px;
  height: 32px;
  stroke: var(--ice);
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.card h3 {
  margin: 0 0 4px;
  font-size: 1.4rem;
  color: #fff;
}

.card .tag {
  color: var(--warm);
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 10px;
}

.card p {
  margin: 0 0 12px;
  color: var(--muted);
}

.card ul {
  margin: 0 0 18px;
  padding-left: 20px;
  color: var(--muted);
}

.card .actions {
  margin-top: auto;
}

.card .url {
  display: block;
  margin-top: 10px;
  font-size: 0.9rem;
  color: var(--muted);
  word-break: break-all;
}

/* Info box */
.note {
  background: rgba(255, 199, 102, 0.1);
  border: 1px solid rgba(255, 199, 102, 0.5);
  border-radius: 12px;
  padding: 16px 20px;
  margin: 28px 0;
  color: var(--ink);
}

.note strong { color: var(--warm); }

/* Setup page */
.topbar {
  position: relative;
  z-index: 1;
  padding: 18px 0 0;
}

.topbar a.back {
  color: var(--ice);
  font-weight: 600;
  text-decoration: none;
}

.topbar a.back:hover { text-decoration: underline; }

.page-title {
  text-align: center;
  margin: 14px 0 4px;
  font-size: 2.2rem;
  color: var(--ice2);
}

.page-sub {
  text-align: center;
  color: var(--muted);
  margin: 0 auto 24px;
  max-width: 620px;
}

.jump {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-bottom: 10px;
}

.guide {
  background: linear-gradient(180deg, var(--card2), var(--card));
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 26px;
  margin: 26px 0;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  scroll-margin-top: 16px;
}

.guide h2 {
  margin: 0;
  font-size: 1.7rem;
  color: #fff;
}

/* Foldable service panels */
.guide { padding: 0; margin: 16px 0; }

.guide summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 26px;
  cursor: pointer;
  list-style: none;
  border-radius: 16px;
}

.guide summary::-webkit-details-marker { display: none; }

.guide summary:hover h2 { color: var(--ice2); }

.guide summary:focus-visible {
  outline: 3px solid var(--warm);
  outline-offset: 3px;
}

.chev {
  flex: none;
  width: 14px;
  height: 14px;
  border-right: 3px solid var(--ice);
  border-bottom: 3px solid var(--ice);
  transform: rotate(45deg) translate(-3px, -3px);
  transition: transform 0.2s ease;
}

.guide[open] .chev { transform: rotate(-135deg) translate(-3px, -3px); }

.guide-body { padding: 0 26px 26px; }

.guide .intro {
  color: var(--muted);
  margin: 0 0 18px;
}

.guide h3 {
  margin: 26px 0 10px;
  font-size: 1.2rem;
  color: var(--warm);
}

.server {
  background: #0a1325;
  border: 1px dashed var(--ice);
  border-radius: 10px;
  padding: 12px 16px;
  margin: 12px 0 18px;
  color: var(--muted);
}

.server code {
  display: block;
  margin-top: 4px;
  font-size: 1.15rem;
  color: var(--ice2);
  font-weight: 700;
  word-break: break-all;
}

.downloads {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 8px 0 4px;
}

ol.steps {
  list-style: none;
  counter-reset: step;
  padding: 0;
  margin: 10px 0;
}

ol.steps li {
  counter-increment: step;
  position: relative;
  padding: 6px 0 14px 52px;
  color: var(--ink);
}

ol.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 2px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--ice);
  color: var(--bg1);
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}

ol.steps li span.hint {
  display: block;
  color: var(--muted);
  font-size: 0.95rem;
}

.tips {
  margin: 8px 0 0;
  padding-left: 22px;
  color: var(--muted);
}

.tips li { margin-bottom: 6px; }

/* Ways to use a service */
.ways-title {
  margin: 4px 0 10px;
  font-weight: 700;
  color: var(--ice2);
}

.ways {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.way {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(143, 211, 255, 0.06);
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.way:hover, .way:focus-visible {
  border-color: var(--ice);
  transform: translateY(-2px);
}

.way:focus-visible {
  outline: 3px solid var(--warm);
  outline-offset: 3px;
}

.way[aria-pressed="true"] {
  border: 2px solid var(--ice);
  background: rgba(143, 211, 255, 0.18);
  box-shadow: 0 0 18px rgba(143, 211, 255, 0.25);
}

.way[aria-pressed="true"] strong { color: var(--ice2); }

.way span {
  color: var(--muted);
  font-size: 0.95rem;
}

.micon {
  width: 30px;
  height: 30px;
  flex: none;
  stroke: var(--ice);
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.small-note {
  color: var(--muted);
  font-size: 0.95rem;
  margin: 12px 0 0;
}

/* One way of using a service */
.method {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  scroll-margin-top: 16px;
}

.method-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.guide .method-head h3 {
  margin: 0;
  font-size: 1.4rem;
  color: #fff;
}

.guide h4 {
  margin: 26px 0 8px;
  font-size: 1.1rem;
  color: var(--warm);
}

.method-text {
  margin: 8px 0;
  color: var(--ink);
}

.badge {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 10px;
  border-radius: 999px;
  background: var(--warm);
  color: var(--bg1);
  font-size: 0.8rem;
  font-weight: 700;
  vertical-align: middle;
}

.split {
  display: grid;
  gap: 8px 24px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.os {
  margin: 8px 0 0;
  font-weight: 700;
  color: var(--ice2);
}

.guide h3.tips-title {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

/* Collapsible group of steps */
.group {
  margin: 14px 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(143, 211, 255, 0.04);
}

.group summary, .important summary {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  list-style: none;
}

.group summary { padding: 14px 18px; }
.group summary::-webkit-details-marker, .important summary::-webkit-details-marker { display: none; }
.group summary h4 { margin: 0; flex: 1; }

.group .count {
  color: var(--muted);
  font-size: 0.9rem;
  white-space: nowrap;
}

.group[open] .chev, .important[open] .chev { transform: rotate(-135deg) translate(-3px, -3px); }
.group-body { padding: 0 18px 12px; }
.important .group-body { padding: 8px 0 0; }
.important summary .important-title { flex: 1; }

/* Highlighted must-know box */
.important {
  margin-top: 32px;
  padding: 18px 20px;
  border: 1px solid rgba(255, 199, 102, 0.5);
  border-left: 5px solid var(--warm);
  border-radius: 12px;
  background: rgba(255, 199, 102, 0.08);
}

.important p { margin: 0 0 8px; }

.important-title {
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--warm);
}

/* Screenshots */
.shots {
  display: grid;
  gap: 14px;
  margin: 10px 0 6px;
}

.shots.phone { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.shots.wide  { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }

.shot { margin: 0; }

.shot img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #0a1325;
  cursor: zoom-in;
}

.shot figcaption {
  margin-top: 6px;
  font-size: 0.9rem;
  color: var(--muted);
  text-align: center;
}

.shot.missing img { display: none; }

.shot.missing::before {
  content: "\2744\FE0E\A Screenshot coming soon";
  white-space: pre;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  border: 2px dashed var(--line);
  border-radius: 10px;
  background: rgba(143, 211, 255, 0.05);
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.8;
}

.shots.phone .shot.missing::before { aspect-ratio: 9 / 16; }
.shots.wide  .shot.missing::before { aspect-ratio: 16 / 10; }

/* Footer */
footer {
  position: relative;
  z-index: 1;
  text-align: center;
  color: var(--muted);
  padding: 40px 20px 50px;
  font-size: 0.95rem;
}

.ground {
  position: relative;
  z-index: 1;
  height: 60px;
  background: linear-gradient(180deg, rgba(238, 244, 255, 0) 0%, rgba(238, 244, 255, 0.12) 100%);
  margin-top: 30px;
}

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
img, svg { max-width: 100%; }

/* Tablets and phones */
@media (max-width: 600px) {
  body { font-size: 16px; }
  .wrap { padding: 0 14px; }
  .hero { padding-top: 20px; }
  .hero p { font-size: 1rem; }
  .hero h1 { font-size: 2rem; }
  h2.section { font-size: 1.4rem; margin: 32px 0 14px; }
  .page-title { font-size: 1.7rem; }

  /* Cards stack in a single column */
  .grid { grid-template-columns: 1fr; gap: 16px; }
  .card { padding: 18px; }
  .card h3 { font-size: 1.25rem; }
  .card .actions .btn { display: block; text-align: center; }
  .platforms a { width: 44px; height: 44px; }

  /* Bigger touch targets, full-width buttons */
  .btn { padding: 14px 20px; }
  .btn.small { padding: 12px 16px; }
  .downloads { flex-direction: column; }
  .downloads .btn { text-align: center; }
  .jump { gap: 8px; }
  .jump .btn { flex: 1 1 calc(50% - 8px); text-align: center; }

  /* Foldable panels */
  .guide { margin: 12px 0; border-radius: 14px; }
  .guide summary { padding: 16px 16px; gap: 10px; }
  .guide-body { padding: 0 16px 18px; }
  .guide h2 { font-size: 1.25rem; gap: 10px; }
  .guide h2 img { width: 32px; height: 32px; }
  .guide h3 { font-size: 1.1rem; }
  .guide .method-head h3 { font-size: 1.2rem; }

  .method { margin-top: 22px; padding-top: 18px; }
  .ways { grid-template-columns: 1fr; }
  .split { grid-template-columns: 1fr; }
  .server code { font-size: 1rem; }

  /* Numbered steps */
  ol.steps li { padding: 4px 0 12px 44px; }
  ol.steps li::before { width: 30px; height: 30px; font-size: 0.9rem; }

  .group summary { padding: 12px 14px; flex-wrap: wrap; gap: 6px 10px; }
  .group-body { padding: 0 14px 10px; }
  .important { padding: 14px 14px; }

  /* Screenshots: two phone shots per row */
  .shots.phone { grid-template-columns: repeat(2, 1fr); }
  .shots.wide { grid-template-columns: 1fr; }

  /* Language menu stays inside the screen */
  .lang summary { padding: 8px 14px; }
  .lang ul a { padding: 11px 14px; }

  footer { padding: 28px 16px 40px; }
}

/* Very small phones */
@media (max-width: 360px) {
  .hero h1 { font-size: 1.7rem; }
  .jump .btn { flex-basis: 100%; }
  .shots.phone { grid-template-columns: 1fr 1fr; gap: 10px; }
}

/* Touch screens: no hover lift */
@media (hover: none) {
  .btn:hover, .way:hover { transform: none; }
}

/* Language switcher */
.lang {
  position: relative;
  z-index: 5;
  display: flex;
  justify-content: flex-end;
  padding-top: 18px;
}

.topbar .lang { padding-top: 0; }

.lang details { position: relative; }

.lang summary {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  list-style: none;
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 600;
  padding: 6px 12px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 999px;
}

.lang summary::-webkit-details-marker { display: none; }
.lang summary:hover, .lang details[open] summary { border-color: var(--ice); }

.lang .chev {
  width: 7px;
  height: 7px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(45deg) translateY(-2px);
  transition: transform 0.15s;
}

.lang details[open] .chev { transform: rotate(-135deg); }

.lang .flag {
  width: 22px;
  height: 15px;
  border-radius: 3px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.25);
  flex: none;
}

.lang ul {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  min-width: 100%;
  margin: 0;
  padding: 6px;
  list-style: none;
  background: var(--card2);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.lang li { margin: 0; padding: 0; }
.lang li::before { content: none; }

.lang ul a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 12px;
  border-radius: 9px;
  color: var(--ink);
  text-decoration: none;
  font-size: 0.9rem;
  white-space: nowrap;
}

.lang ul a:hover { background: var(--line); }
.lang ul a[aria-current] { color: var(--ice2); background: rgba(143, 211, 255, 0.12); }

/* Service logos */
.guide h2 {
  display: flex;
  align-items: center;
  gap: 14px;
}

.guide h2 img { flex: none; object-fit: contain; }

.btn .btn-icon {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  vertical-align: -5px;
  margin-right: 8px;
}

.btn-logo {
  vertical-align: -7px;
  margin-right: 8px;
  object-fit: contain;
}

/* Hero: title is drawn in the picture, the h1 stays for screen readers and search */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.hero .stars circle { animation: twinkle 4s ease-in-out infinite alternate; }
.hero .stars circle:nth-child(3n) { animation-delay: -1.3s; }
.hero .stars circle:nth-child(3n+1) { animation-delay: -2.6s; }
.hero .smoke { animation: smoke 5s ease-in-out infinite alternate; }
.hero .flakes circle { animation: flake 6s ease-in-out infinite alternate; }
.hero .flakes circle:nth-child(2n) { animation-duration: 8s; animation-delay: -3s; }
.hero .flakes circle:nth-child(3n) { animation-duration: 7s; animation-delay: -5s; }

@keyframes twinkle { from { opacity: 0.35; } to { opacity: 1; } }
@keyframes smoke { from { transform: translate(0, 0); opacity: 0.7; } to { transform: translate(5px, -6px); opacity: 0.4; } }
@keyframes flake { from { transform: translate(0, 0); } to { transform: translate(6px, 14px); } }

@media (prefers-reduced-motion: reduce) {
  .hero .stars circle, .hero .smoke, .hero .flakes circle { animation: none; }
}

/* Platform icons on service cards */
.platforms {
  display: flex;
  gap: 8px;
  margin: 0 0 18px;
}

.platforms a {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.platforms a:hover, .platforms a:focus-visible {
  border-color: var(--ice);
  background: rgba(255, 255, 255, 0.08);
}

.platforms .micon {
  width: 22px;
  height: 22px;
}

/* "Which phone?" chooser */
.phone-ask {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #0a1325;
  color: var(--ink);
  padding: 22px 24px;
  text-align: center;
}

.phone-ask::backdrop { background: rgba(0, 0, 0, 0.6); }
.phone-ask p { margin: 0 0 14px; font-weight: 700; }
.phone-ask-btns { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-bottom: 12px; }
