/* The platform shell follows the CS 1.6 landing (cs16-design/1-20261119).
   Sync navigation and layout with that page when updating the shared shell. */
@font-face {
  font-family: Inter;
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url("inter-variable-1.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: Inter;
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url("inter-variable-6.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  color-scheme: dark;
  --stage: #191c17;
  --surface: #22251e;
  --line: #f1eee125;
  --muted: #c7c9bf;
  --text: #f4f1e8;
  --accent: #edb56a;
  --platform-accent: #c6ee67;
  --gutter: 28px;
  --backdrop-height: 782px;
  font-family: Inter, Arial, sans-serif;
  font-synthesis: none;
  color: var(--text);
  background: var(--stage);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none; }
body {
  min-width: 0;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  margin: 0;
  position: relative;
  isolation: isolate;
}
h1, h2, h3, p, figure { margin: 0; }
a { color: inherit; text-decoration: none; }
button { color: inherit; font: inherit; cursor: pointer; }
button, a, summary { touch-action: manipulation; }
:focus-visible { outline: 2px solid var(--platform-accent); outline-offset: 4px; }
.skip {
  position: absolute;
  z-index: 3;
  top: 12px;
  left: 16px;
  transform: translateY(-200%);
  padding: 12px 16px;
  background: var(--surface);
  border-radius: 8px;
}
.skip:focus { transform: none; }

.platform-head {
  z-index: 1;
  position: relative;
  padding-top: env(safe-area-inset-top);
  background: #11161178;
  border-bottom: 1px solid var(--line);
}
.header-inner, .footer-inner {
  max-width: 1256px;
  width: 100%;
  margin-inline: auto;
  padding-inline: max(var(--gutter), env(safe-area-inset-left))
                  max(var(--gutter), env(safe-area-inset-right));
}
.header-inner {
  min-height: 87px;
  display: flex;
  align-items: center;
  gap: 42px;
}
.brand {
  flex: none;
  font-size: 26px;
  font-weight: 900;
  letter-spacing: -.045em;
  white-space: nowrap;
}
.brand strong { color: var(--platform-accent); font-weight: inherit; }
.desktop-nav {
  display: flex;
  align-self: stretch;
  gap: 32px;
}
.desktop-nav a {
  display: flex;
  align-items: center;
  padding-top: 3px;
  border-bottom: 3px solid transparent;
  color: var(--muted);
  white-space: nowrap;
}
.desktop-nav a:hover, .desktop-nav .current-section { color: var(--text); }
.desktop-nav .current-section { border-color: var(--platform-accent); }
.locale {
  display: flex;
  margin-left: auto;
  gap: 2px;
}
.locale a {
  display: grid;
  place-items: center;
  min-width: 40px;
  min-height: 44px;
  border-radius: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}
.locale a:hover, .locale [aria-current] {
  color: var(--platform-accent);
  background: #252d21;
}
.mobile-nav { display: none; }

.backdrop {
  position: absolute;
  z-index: -1;
  inset: 0 0 auto;
  height: var(--backdrop-height);
  overflow: hidden;
  mask-image: linear-gradient(#000 55%, transparent);
  pointer-events: none;
}
.backdrop img {
  width: min(100%, 1480px);
  height: 100%;
  display: block;
  margin-inline: auto;
  object-fit: cover;
  object-position: center 54%;
  mask-image: linear-gradient(90deg, transparent, #000 10%, #000 41%, transparent 94%);
}
.backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, #191c1759 0%, transparent 20%, transparent 41%, #191c17bd 90%);
}
.content {
  width: 100%;
  max-width: 1280px;
  margin-inline: auto;
  padding-inline: max(var(--gutter), env(safe-area-inset-left))
                  max(var(--gutter), env(safe-area-inset-right));
  flex: 1;
}
.hero {
  min-height: 694px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: end;
  gap: 34px;
  padding-block: 82px 80px;
}
.hero-copy { grid-column: 2; }
.hero h1 {
  font-size: clamp(34px, 4.35vw, 64px);
  font-weight: 900;
  letter-spacing: -.05em;
  line-height: 1;
  text-transform: uppercase;
}
.hero-intro {
  margin-top: 17px;
  font-size: clamp(18px, 2vw, 25px);
  line-height: 1.35;
}
.hero-meta {
  margin-top: 10px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.4;
}
.hero h1, .hero-intro, .hero-meta { text-shadow: 0 1px 10px #181a16; }
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.hero-actions {
  display: grid;
  grid-template-columns: 1.16fr 1fr;
  margin-top: 26px;
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 50px;
  padding: 10px 15px;
  border: 1px solid #dcded17d;
  border-radius: 9px;
  background: #1d221dc9;
  color: var(--text);
  text-align: center;
  font-size: 15px;
  font-weight: 750;
  line-height: 1.2;
}
.button:hover { background: #2b3028; }
.button:disabled { cursor: default; opacity: .65; }
.button.primary {
  grid-column: 1 / -1;
  color: #231a0e;
  background: var(--accent);
  border-color: var(--accent);
  font-size: 20px;
  font-weight: 850;
}
.button.primary:hover { background: #f6c17c; }
.download-link, .download-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  margin-top: 4px;
  color: var(--text);
  font-size: 14px;
  font-weight: 650;
}
.download-link:hover { text-decoration: underline; }
.download-status { color: var(--muted); }
.arrow { font-family: Arial, sans-serif; font-size: 1.2em; line-height: 1; }
.chevron {
  width: 7px;
  height: 7px;
  border: solid currentColor;
  border-width: 1.5px 1.5px 0 0;
  rotate: 45deg;
  margin-inline: 1px 3px;
}

.section {
  padding-bottom: 62px;
  scroll-margin-top: 22px;
}
.section h2 {
  font-size: clamp(28px, 3.6vw, 44px);
  line-height: 1.1;
  font-weight: 850;
  letter-spacing: -.04em;
}
.section-copy, .room-status {
  margin-top: 9px;
  color: var(--muted);
  line-height: 1.45;
}
.room-status:empty { display: none; }
.room-actions { margin-top: 14px; }
.room-actions .button { min-height: 48px; }
.room-list {
  list-style: none;
  margin: 18px 0 0;
  padding: 2px 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}
.room-list li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding-block: 12px;
}
.room-list li + li { border-top: 1px solid var(--line); }
.room-list strong { font-size: 20px; overflow-wrap: anywhere; }
.room-list span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.room-list .button { min-width: 108px; min-height: 44px; }
.room-roster { max-width: 620px; }
.online-steps ol {
  margin: 18px 0 0;
  padding-left: 24px;
  max-width: 660px;
  color: var(--muted);
  line-height: 1.5;
}
.online-steps li + li { margin-top: 8px; }

.how-layout {
  display: grid;
  grid-template-columns: 1.9fr 1fr;
  gap: 34px;
  align-items: center;
  margin-top: 22px;
}
.how-layout img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
}
figcaption {
  margin-top: 8px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.4;
}
.how-copy ol { margin: 0; padding-left: 21px; color: var(--muted); line-height: 1.5; }
.how-copy li + li { margin-top: 6px; }
.related { margin-top: 16px; }

.platform-footer {
  border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom);
  background: #161a16;
}
.footer-inner {
  min-height: 148px;
  padding-block: 24px;
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  align-items: center;
  gap: 24px 38px;
}
.footer-brand p { margin-top: 5px; color: var(--muted); }
.footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 0 24px; }
.footer-links a, .footer-store, .footer-telegram {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
}
.footer-links a:hover, .footer-store:hover, .footer-telegram:hover { color: var(--text); }

@media (max-width: 1000px) {
  :root { --backdrop-height: 651px; }
  .header-inner { gap: 24px; }
  .desktop-nav { gap: 20px; }
  .hero {
    min-height: 566px;
    grid-template-columns: .84fr 1fr;
    gap: 21px;
    padding-bottom: 65px;
  }
  .backdrop img {
    object-position: 33% center;
    mask-image: linear-gradient(90deg, #000 27%, transparent 85%);
  }
  .hero-actions .button { font-size: 14px; }
  .hero-actions .primary { font-size: 18px; }
  .how-layout { gap: 22px; }
  .footer-inner {
    grid-template-columns: 1fr auto auto;
    gap: 8px 24px;
  }
  .footer-brand { grid-row: 1 / 3; }
  .footer-links { grid-column: 2 / 4; grid-row: 1; }
}

@media (max-width: 760px) {
  :root {
    --gutter: 18px;
    --backdrop-height: 452px;
  }
  .header-inner { min-height: 71px; gap: 13px; }
  .brand { font-size: 20px; }
  .desktop-nav { display: none; }
  .locale a { min-width: 34px; }
  .mobile-nav { display: block; }
  .mobile-nav summary {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: #181e1870;
    list-style: none;
    cursor: pointer;
  }
  .mobile-nav summary::-webkit-details-marker { display: none; }
  .menu-icon {
    width: 18px;
    height: 2px;
    background: currentColor;
    box-shadow: 0 -6px, 0 6px;
  }
  .mobile-nav nav {
    position: absolute;
    top: 100%;
    inset-inline: 0;
    display: grid;
    padding: 6px max(var(--gutter), env(safe-area-inset-right)) 14px
                 max(var(--gutter), env(safe-area-inset-left));
    border-bottom: 1px solid var(--line);
    background: var(--stage);
  }
  .mobile-nav nav a { padding: 13px 4px; min-height: 48px; }
  .mobile-nav .current-section { color: var(--platform-accent); }

  .backdrop { mask-image: linear-gradient(#000 35%, transparent 98%); }
  .backdrop img { mask-image: none; object-position: center 45%; }
  .backdrop::after { background: linear-gradient(#191c1766, transparent 23%, #191c170a 43%, #191c17 85%); }
  .hero {
    min-height: 0;
    display: block;
    padding-block: clamp(218px, 64vw, 266px) 39px;
  }
  .hero h1 { font-size: clamp(30px, 8.15vw, 54px); }
  .hero-intro { margin-top: 10px; }
  .hero-meta { margin-top: 7px; font-size: 14px; }
  .hero-actions { margin-top: 19px; gap: 8px; }
  .hero-actions .button { min-height: 46px; padding-inline: 7px; font-size: 13px; }
  .hero-actions .primary { min-height: 49px; font-size: 17px; }

  .section { padding-bottom: 40px; }
  .section-copy, .room-status { font-size: 14px; }
  .room-actions { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
  .room-actions .button { padding-inline: 10px; font-size: 13px; }
  .room-list { padding-inline: 11px; }
  .room-list strong { font-size: 17px; }
  .room-list span, .room-list .button { font-size: 13px; }
  .room-list .button { min-width: 68px; padding-inline: 8px; }
  .how-layout { grid-template-columns: 1fr; gap: 17px; margin-top: 16px; }

  .footer-inner { grid-template-columns: 1fr 1fr; gap: 12px 16px; }
  .footer-brand, .footer-links { grid-column: 1 / -1; grid-row: auto; }
  .footer-links { justify-content: flex-start; gap: 0 15px; }
  .footer-telegram { justify-self: end; }
  .footer-inner { font-size: 14px; }
}

@media (max-width: 360px) {
  :root { --gutter: 16px; }
  .brand { font-size: 21px; }
  .header-inner { gap: 8px; }
}

.mode-links {
  margin-top: 10px;
  gap: 2px 18px;
  color: var(--muted);
  font-size: 14px;
}
.mode-links a, .room-back {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
}
.mode-links a:hover, .room-back:hover { text-decoration: underline; }

.room-entry {
  width: min(100%, 580px);
  margin-inline: auto;
  padding-top: clamp(24px, 7vw, 84px);
}
.room-entry h1 {
  font-size: clamp(32px, 6vw, 52px);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -.045em;
  overflow-wrap: anywhere;
}
.room-back, .room-test-label { color: var(--muted); }
.room-test-label { margin-bottom: 8px; font-size: 14px; }
.room-form {
  display: grid;
  gap: 14px;
  margin: 20px 0 0;
}
.room-form label {
  display: grid;
  gap: 6px;
  font-size: 15px;
  font-weight: 700;
}
.room-form label[hidden], .room-form[hidden] { display: none; }
.room-form input, .room-form select {
  width: 100%;
  min-width: 0;
  min-height: 48px;
  padding: 10px 12px;
  color: var(--text);
  background: var(--surface);
  border: 1px solid #dcded17d;
  border-radius: 8px;
  font: 400 16px/1.3 Inter, Arial, sans-serif;
}
.room-form button { min-height: 48px; }
.room-form .primary { grid-column: auto; font-size: 16px; }
.room-form small { color: var(--muted); font-weight: 400; }
#nick-help { margin-top: -10px; }
#entry-status:empty { display: none; }
#my-rooms-link { margin-top: 12px; }
#my-rooms-link[hidden] { display: none; }
#my-room-list a { min-height: 44px; display: flex; align-items: center; overflow-wrap: anywhere; }
