.rules-page {
  --rules-bg: #fff8ed;
  --rules-bg-deep: #f1e9dc;
  --rules-card: rgba(255, 253, 247, .88);
  --rules-card-solid: #fffdf8;
  --rules-ink: #202019;
  --rules-copy: #625d54;
  --rules-muted: #918a7f;
  --rules-line: rgba(46, 39, 29, .12);
  --rules-soft-line: rgba(46, 39, 29, .075);
  --rules-coral: #f26b3a;
  --rules-coral-deep: #c94727;
  --rules-sun: #ffc844;
  --rules-palm: #118f83;
  --rules-palm-deep: #066d69;
  --rules-ocean: #167d91;
  --rules-shadow: 0 28px 80px rgba(64, 47, 25, .13);
  width: 100%;
  min-width: 0;
  max-width: 100%;
  overflow-x: hidden;
  overflow-x: clip;
  overscroll-behavior-x: none;
  color: var(--rules-ink);
  background:
    radial-gradient(circle at 77% 6%, rgba(255, 198, 71, .2), transparent 27rem),
    radial-gradient(circle at 10% 32%, rgba(29, 155, 148, .08), transparent 30rem),
    var(--rules-bg);
  font-family: var(--font-copy, Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif);
}

.rules-page::before {
  position: fixed;
  z-index: -3;
  inset: 0;
  background: linear-gradient(110deg, transparent 0 52%, rgba(255, 255, 255, .22) 52% 53%, transparent 53% 100%);
  content: "";
  pointer-events: none;
}

.rules-page .pixel-grid {
  position: fixed;
  z-index: -2;
  inset: 0;
  opacity: .28;
  background-image:
    linear-gradient(var(--rules-soft-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--rules-soft-line) 1px, transparent 1px);
  background-size: 88px 88px;
  mask-image: linear-gradient(to bottom, #000, transparent 63%);
  pointer-events: none;
}

.rules-page .grain { opacity: .025; }

.rules-aurora {
  position: fixed;
  z-index: -2;
  border-radius: 50%;
  filter: blur(14px);
  pointer-events: none;
}

.rules-aurora-one {
  top: -220px;
  right: -180px;
  width: 530px;
  height: 530px;
  background: rgba(255, 185, 54, .19);
}

.rules-aurora-two {
  bottom: -250px;
  left: -210px;
  width: 560px;
  height: 560px;
  background: rgba(13, 147, 141, .1);
}

.rules-page ::selection {
  color: #181411;
  background: #ffd16a;
}

.rules-page :where(a, button):focus-visible {
  outline: 3px solid var(--rules-palm);
  outline-offset: 4px;
}

.rules-skip-link {
  position: fixed;
  z-index: 100;
  top: 12px;
  left: 12px;
  padding: 12px 16px;
  border-radius: 12px;
  color: #fff;
  background: var(--rules-ink);
  font-weight: 800;
  transform: translateY(-150%);
  transition: transform .18s ease;
}

.rules-skip-link:focus { transform: translateY(0); }

.rules-header.site-header {
  height: 104px;
  border-color: var(--rules-line);
}

.rules-header .brand-mark {
  overflow: hidden;
  width: 48px;
  height: 48px;
  border-radius: 15px;
  background: linear-gradient(145deg, var(--rules-sun), var(--rules-coral));
  box-shadow: 0 13px 30px rgba(226, 104, 47, .2);
}

.rules-header .brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  image-rendering: pixelated;
}

.rules-header .brand-name { color: var(--rules-ink); }
.rules-header .brand-name > span { color: var(--rules-coral); }
.rules-header .brand-name > small { color: var(--rules-muted); }

.rules-header-nav {
  display: flex;
  align-items: center;
  gap: 10px;
}

.rules-theme-toggle,
.rules-telegram-link,
.rules-header .cabinet-link {
  display: inline-flex;
  min-height: 45px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 1px solid var(--rules-line);
  border-radius: 999px;
  color: var(--rules-copy);
  background: rgba(255, 255, 255, .42);
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  transition: border-color .2s ease, color .2s ease, background .2s ease, transform .2s ease;
}

.rules-theme-toggle { padding: 0 15px; }
.rules-telegram-link { padding: 0 17px; }
.rules-header .cabinet-link { padding: 0 19px; color: #fff; background: var(--rules-ink); }

.rules-theme-toggle:hover,
.rules-telegram-link:hover,
.rules-header .cabinet-link:hover {
  opacity: 1;
  transform: translateY(-2px);
}

.rules-theme-toggle:hover,
.rules-telegram-link:hover {
  border-color: rgba(10, 131, 125, .35);
  color: var(--rules-palm-deep);
  background: rgba(255, 255, 255, .72);
}

.rules-theme-toggle-icon {
  color: var(--rules-coral);
  font-size: 17px;
  line-height: 1;
}

.rules-hero {
  display: grid;
  min-height: min(760px, calc(100vh - 104px));
  padding-block: clamp(68px, 8vw, 112px) clamp(82px, 9vw, 132px);
  grid-template-columns: minmax(0, 1.02fr) minmax(380px, .98fr);
  align-items: center;
  gap: clamp(48px, 8vw, 118px);
}

.rules-eyebrow {
  display: flex;
  margin: 0 0 24px;
  align-items: center;
  gap: 11px;
  color: var(--rules-palm-deep);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.rules-eyebrow > span {
  width: 32px;
  height: 3px;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--rules-palm), var(--rules-sun));
}

.rules-hero h1 {
  margin: 0;
  color: var(--rules-ink);
  font-size: clamp(56px, 6.7vw, 100px);
  font-weight: 950;
  letter-spacing: -.07em;
  line-height: .88;
}

.rules-hero h1 em {
  color: var(--rules-coral);
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 500;
}

.rules-lead {
  max-width: 650px;
  margin: 31px 0 0;
  color: var(--rules-copy);
  font-size: clamp(17px, 1.55vw, 20px);
  line-height: 1.68;
}

.rules-hero-actions {
  display: flex;
  margin-top: 35px;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.rules-primary-action,
.rules-secondary-action {
  display: inline-flex;
  min-height: 56px;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  font-size: 13px;
  font-weight: 900;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}

.rules-primary-action {
  min-width: 242px;
  padding: 0 13px 0 21px;
  justify-content: space-between;
  gap: 20px;
  color: #fff;
  background: var(--rules-ink);
  box-shadow: 0 19px 38px rgba(40, 31, 22, .18);
}

.rules-primary-action b {
  display: grid;
  width: 37px;
  height: 37px;
  place-items: center;
  border-radius: 11px;
  color: #20190f;
  background: linear-gradient(145deg, var(--rules-sun), var(--rules-coral));
}

.rules-secondary-action {
  padding: 0 19px;
  color: var(--rules-copy);
  border: 1px solid var(--rules-line);
  background: rgba(255, 255, 255, .36);
}

.rules-primary-action:hover,
.rules-secondary-action:hover { transform: translateY(-3px); }
.rules-primary-action:hover { box-shadow: 0 24px 48px rgba(40, 31, 22, .24); }
.rules-secondary-action:hover { background: rgba(255, 255, 255, .75); }

.rules-world-card {
  position: relative;
  min-height: 520px;
  margin: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .5);
  border-radius: 36px;
  background: #14333a;
  box-shadow: var(--rules-shadow);
  transform: rotate(1.2deg);
}

.rules-world-card::before {
  position: absolute;
  z-index: 2;
  top: 22px;
  right: 22px;
  width: 13px;
  height: 13px;
  border: 6px solid rgba(255, 255, 255, .9);
  border-radius: 50%;
  box-shadow: 0 0 0 7px rgba(255, 210, 86, .25), 0 0 30px rgba(255, 214, 102, .75);
  content: "";
}

.rules-world-card > img {
  position: absolute;
  width: 112%;
  height: 112%;
  inset: -6%;
  object-fit: cover;
  filter: saturate(1.08) contrast(1.03);
  transform: scale(1.02);
  transition: transform .7s cubic-bezier(.2, .8, .2, 1);
}

.rules-world-card:hover > img { transform: scale(1.065); }

.rules-world-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(6, 26, 30, .92) 0%, rgba(6, 26, 30, .24) 52%, rgba(6, 26, 30, .04) 100%);
}

.rules-world-card figcaption {
  position: absolute;
  z-index: 2;
  right: 31px;
  bottom: 32px;
  left: 31px;
  padding-top: 21px;
  border-top: 1px solid rgba(255, 255, 255, .28);
  color: #fff;
}

.rules-world-card figcaption span {
  display: block;
  margin-bottom: 10px;
  color: #ffd266;
  font-size: 9px;
  font-weight: 950;
  letter-spacing: .17em;
}

.rules-world-card figcaption strong {
  display: block;
  max-width: 470px;
  font-size: clamp(18px, 2.1vw, 26px);
  line-height: 1.35;
}

.rules-layout {
  display: grid;
  padding-bottom: clamp(90px, 10vw, 150px);
  grid-template-columns: 230px minmax(0, 1fr);
  align-items: start;
  gap: clamp(35px, 6vw, 82px);
}

.rules-toc { position: sticky; top: 28px; }

.rules-toc-inner {
  padding: 23px;
  border: 1px solid var(--rules-line);
  border-radius: 24px;
  background: rgba(255, 253, 247, .62);
  box-shadow: 0 18px 50px rgba(68, 51, 30, .06);
  backdrop-filter: blur(18px);
}

.rules-toc-inner > p {
  margin: 0 0 17px;
  color: var(--rules-muted);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .17em;
  text-transform: uppercase;
}

.rules-toc nav { display: grid; gap: 2px; }

.rules-toc nav a {
  display: grid;
  min-height: 43px;
  padding: 8px 5px;
  grid-template-columns: 27px 1fr;
  align-items: center;
  gap: 7px;
  border-radius: 10px;
  color: var(--rules-copy);
  font-size: 12px;
  font-weight: 750;
  transition: color .18s ease, background .18s ease, transform .18s ease;
}

.rules-toc nav a span {
  color: var(--rules-coral);
  font-size: 9px;
  font-weight: 950;
}

.rules-toc nav a:hover {
  color: var(--rules-ink);
  background: rgba(255, 255, 255, .75);
  transform: translateX(3px);
}

.rules-toc-telegram {
  display: block;
  margin-top: 17px;
  padding: 16px;
  border-radius: 15px;
  color: #e9ffff;
  background: linear-gradient(140deg, #117f87, #0a5f72);
  box-shadow: 0 13px 28px rgba(6, 116, 121, .18);
}

.rules-toc-telegram small,
.rules-toc-telegram strong { display: block; }
.rules-toc-telegram small { color: rgba(230, 255, 255, .65); font-size: 9px; }
.rules-toc-telegram strong { margin-top: 7px; font-size: 12px; }
.rules-toc-telegram strong span { color: #ffd46b; }

.rules-sections { min-width: 0; }

.rules-section {
  scroll-margin-top: 28px;
  padding: clamp(40px, 5vw, 65px) 0 clamp(60px, 7vw, 92px);
  border-top: 1px solid var(--rules-line);
}

.rules-section:first-child { padding-top: 0; border-top: 0; }

.rules-section-head {
  display: flex;
  margin-bottom: 25px;
  align-items: flex-start;
  gap: 18px;
}

.rules-section-number {
  display: grid;
  width: 46px;
  height: 46px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid rgba(14, 132, 125, .2);
  border-radius: 14px;
  color: var(--rules-palm-deep);
  background: rgba(22, 158, 149, .09);
  font-size: 10px;
  font-weight: 950;
}

.rules-section-head p {
  margin: 0 0 6px;
  color: var(--rules-coral);
  font-size: 9px;
  font-weight: 950;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.rules-section h2 {
  margin: 0;
  color: var(--rules-ink);
  font-size: clamp(31px, 4vw, 48px);
  line-height: 1.08;
  letter-spacing: -.045em;
}

.rules-section-intro {
  max-width: 760px;
  margin: -4px 0 30px 64px;
  color: var(--rules-copy);
  font-size: 17px;
  line-height: 1.65;
}

.territory-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.territory-card,
.rules-list-card,
.rules-feature-card {
  border: 1px solid var(--rules-line);
  background: var(--rules-card);
  box-shadow: 0 18px 45px rgba(57, 42, 25, .055);
}

.territory-card {
  position: relative;
  min-height: 100%;
  padding: 25px;
  overflow: hidden;
  border-radius: 23px;
}

.territory-card::after {
  position: absolute;
  right: -45px;
  bottom: -65px;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: var(--territory-glow);
  opacity: .12;
  filter: blur(4px);
  content: "";
}

.territory-neutral { --territory-color: #168d84; --territory-glow: #30d1bd; }
.territory-wild { --territory-color: #d75231; --territory-glow: #ff7d41; }
.territory-private { --territory-color: #81713b; --territory-glow: #f0c74f; }

.territory-card-top {
  display: flex;
  min-height: 59px;
  margin-bottom: 20px;
  align-items: center;
  gap: 13px;
}

.territory-card-top > span {
  display: grid;
  width: 48px;
  height: 48px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 14px;
  color: #fff;
  background: var(--territory-color);
  font: 900 16px/1 var(--font-game, monospace);
  box-shadow: 0 11px 24px color-mix(in srgb, var(--territory-color) 25%, transparent);
}

.territory-card small {
  display: block;
  margin-bottom: 5px;
  color: var(--territory-color);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.territory-card h3 {
  margin: 0;
  color: var(--rules-ink);
  font-size: 16px;
  line-height: 1.25;
}

.territory-card > p {
  min-height: 98px;
  margin: 0 0 19px;
  color: var(--rules-copy);
  font-size: 13px;
  line-height: 1.63;
}

.rules-page ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.territory-card li,
.rules-list-card li,
.rules-feature-card li,
.rules-admin-grid > ul li {
  position: relative;
  padding-left: 20px;
  color: var(--rules-copy);
  font-size: 13px;
  line-height: 1.58;
}

.territory-card li + li,
.rules-list-card li + li,
.rules-feature-card li + li,
.rules-admin-grid > ul li + li { margin-top: 12px; }

.territory-card li::before,
.rules-list-card li::before,
.rules-feature-card li::before,
.rules-admin-grid > ul li::before {
  position: absolute;
  top: .68em;
  left: 1px;
  width: 6px;
  height: 6px;
  border-radius: 2px;
  background: var(--territory-color, var(--rules-palm));
  content: "";
  transform: rotate(45deg);
}

.rules-two-columns,
.rules-feature-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 13px;
}

.rules-list-card,
.rules-feature-card {
  padding: clamp(25px, 3vw, 34px);
  border-radius: 23px;
}

.rules-list-card h3,
.rules-feature-card h3 {
  margin: 0 0 23px;
  color: var(--rules-ink);
  font-size: 19px;
  line-height: 1.35;
}

.rules-list-card h3 span {
  display: inline-grid;
  width: 29px;
  height: 29px;
  margin-right: 8px;
  place-items: center;
  border-radius: 9px;
  color: #fff;
}

.rules-list-allowed { --territory-color: var(--rules-palm); }
.rules-list-forbidden { --territory-color: var(--rules-coral); }
.rules-list-allowed h3 span { background: var(--rules-palm); }
.rules-list-forbidden h3 span { background: var(--rules-coral); }

.rules-feature-card { --territory-color: var(--rules-ocean); }
.rules-feature-warm { --territory-color: var(--rules-coral); }

.rules-feature-card h3 {
  max-width: 400px;
  margin-top: 10px;
  font-size: clamp(21px, 2.4vw, 28px);
}

.rules-feature-label {
  color: var(--territory-color);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.rules-statement {
  margin-bottom: 16px;
  padding: clamp(22px, 3vw, 30px);
  border: 1px solid rgba(18, 145, 136, .18);
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(26, 153, 144, .11), rgba(255, 255, 255, .38));
}

.rules-statement p {
  max-width: 770px;
  margin: 0;
  color: var(--rules-ink);
  font-size: clamp(18px, 2.2vw, 25px);
  font-weight: 750;
  line-height: 1.47;
}

.rules-compact-list {
  display: grid;
  border-block: 1px solid var(--rules-line);
}

.rules-compact-list article {
  display: grid;
  min-height: 72px;
  padding: 15px 9px;
  grid-template-columns: 48px 1fr;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--rules-line);
}

.rules-compact-list article:last-child { border-bottom: 0; }

.rules-compact-list article > span {
  color: var(--rules-coral);
  font-size: 10px;
  font-weight: 950;
  letter-spacing: .08em;
}

.rules-compact-list article p {
  margin: 0;
  color: var(--rules-copy);
  font-size: 14px;
  line-height: 1.55;
}

.rules-admin-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(250px, .65fr);
  align-items: start;
  gap: 18px;
}

.rules-admin-grid > ul {
  padding: clamp(26px, 3vw, 35px);
  border: 1px solid var(--rules-line);
  border-radius: 24px;
  background: var(--rules-card);
}

.rules-admin-grid > aside {
  padding: 27px;
  border-radius: 24px;
  color: #fff;
  background:
    radial-gradient(circle at 100% 0, rgba(255, 203, 87, .22), transparent 46%),
    linear-gradient(145deg, #193b3d, #0d292e);
  box-shadow: 0 22px 50px rgba(6, 50, 55, .15);
}

.rules-admin-grid > aside span {
  display: inline-block;
  padding: 7px 9px;
  border-radius: 8px;
  color: #252013;
  background: var(--rules-sun);
  font-size: 9px;
  font-weight: 950;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.rules-admin-grid > aside p {
  margin: 18px 0 0;
  color: rgba(239, 255, 254, .82);
  font-size: 14px;
  line-height: 1.65;
}

.rules-closing {
  position: relative;
  padding: clamp(38px, 6vw, 70px);
  overflow: hidden;
  border-radius: 30px;
  color: #fff;
  background:
    radial-gradient(circle at 84% 12%, rgba(255, 201, 70, .28), transparent 22rem),
    radial-gradient(circle at 5% 110%, rgba(24, 160, 153, .32), transparent 25rem),
    linear-gradient(145deg, #1c2220, #0c1819);
  box-shadow: 0 30px 75px rgba(13, 31, 31, .18);
}

.rules-closing::after {
  position: absolute;
  right: -90px;
  bottom: -110px;
  width: 270px;
  height: 270px;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 50%;
  box-shadow: 0 0 0 35px rgba(255, 255, 255, .025), 0 0 0 70px rgba(255, 255, 255, .02);
  content: "";
}

.rules-closing > p {
  margin: 0 0 17px;
  color: #ffd06b;
  font-size: 10px;
  font-weight: 950;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.rules-closing h2 {
  position: relative;
  z-index: 1;
  max-width: 760px;
  margin: 0;
  font-size: clamp(29px, 4.3vw, 53px);
  line-height: 1.16;
  letter-spacing: -.045em;
}

.rules-closing > div {
  display: flex;
  position: relative;
  z-index: 1;
  margin-top: 34px;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  color: rgba(235, 250, 248, .64);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.rules-closing > div i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--rules-coral);
  box-shadow: 0 0 11px var(--rules-coral);
}

.rules-footer {
  display: grid;
  min-height: 135px;
  padding-block: 28px;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 38px;
  border-top: 1px solid var(--rules-line);
  color: var(--rules-muted);
}

.rules-footer > div {
  display: flex;
  align-items: center;
  gap: 12px;
}

.rules-footer img {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  image-rendering: pixelated;
}

.rules-footer p { margin: 0; }
.rules-footer p strong,
.rules-footer p span { display: block; }
.rules-footer p strong { color: var(--rules-ink); font-size: 14px; }
.rules-footer p span { margin-top: 4px; font-size: 10px; }

.rules-footer nav {
  display: flex;
  align-items: center;
  gap: 20px;
  font-size: 11px;
  font-weight: 800;
}

.rules-footer nav a { transition: color .18s ease; }
.rules-footer nav a:hover { color: var(--rules-palm-deep); }
.rules-footer > small { font-size: 9px; font-weight: 800; letter-spacing: .08em; }

html[data-theme="night"] .rules-page {
  --rules-bg: #06141c;
  --rules-bg-deep: #091c26;
  --rules-card: rgba(11, 31, 41, .84);
  --rules-card-solid: #0b202a;
  --rules-ink: #effcf9;
  --rules-copy: #aec6c7;
  --rules-muted: #6f9195;
  --rules-line: rgba(139, 225, 218, .13);
  --rules-soft-line: rgba(87, 208, 199, .07);
  --rules-coral: #ff6e67;
  --rules-coral-deep: #ff8b79;
  --rules-sun: #ffd15a;
  --rules-palm: #25dec7;
  --rules-palm-deep: #54ead7;
  --rules-ocean: #52cff3;
  --rules-shadow: 0 32px 90px rgba(0, 7, 14, .45);
  background:
    radial-gradient(circle at 78% 3%, rgba(112, 46, 170, .28), transparent 30rem),
    radial-gradient(circle at 8% 30%, rgba(0, 197, 195, .14), transparent 31rem),
    linear-gradient(155deg, #071721 0%, #06121a 45%, #07101b 100%);
}

html[data-theme="night"] .rules-page::before {
  background:
    linear-gradient(175deg, transparent 0 67%, rgba(21, 175, 176, .035) 67% 68%, transparent 68% 100%),
    linear-gradient(110deg, transparent 0 52%, rgba(130, 220, 214, .025) 52% 53%, transparent 53% 100%);
}

html[data-theme="night"] .rules-page .grain { opacity: .045; }
html[data-theme="night"] .rules-page ::selection { color: #06141c; background: #39dfca; }
html[data-theme="night"] .rules-aurora-one { background: rgba(139, 49, 199, .18); }
html[data-theme="night"] .rules-aurora-two { background: rgba(0, 219, 200, .1); }

html[data-theme="night"] .rules-theme-toggle,
html[data-theme="night"] .rules-telegram-link {
  color: var(--rules-copy);
  background: rgba(9, 29, 39, .58);
}

html[data-theme="night"] .rules-header .cabinet-link {
  color: #031511;
  border-color: rgba(47, 231, 204, .55);
  background: linear-gradient(135deg, #45e7cc, #1abfae);
  box-shadow: 0 0 28px rgba(29, 219, 194, .17);
}

html[data-theme="night"] .rules-theme-toggle:hover,
html[data-theme="night"] .rules-telegram-link:hover {
  border-color: rgba(67, 231, 207, .4);
  color: #77f3df;
  background: rgba(14, 43, 55, .85);
}

html[data-theme="night"] .rules-primary-action {
  color: #031612;
  background: linear-gradient(135deg, #49ead0, #1dbdad);
  box-shadow: 0 0 34px rgba(32, 222, 198, .18), 0 20px 40px rgba(0, 0, 0, .25);
}

html[data-theme="night"] .rules-primary-action b {
  color: #231607;
  background: linear-gradient(145deg, #ffdf69, #ff8d5d);
}

html[data-theme="night"] .rules-secondary-action {
  background: rgba(9, 31, 41, .54);
}

html[data-theme="night"] .rules-secondary-action:hover,
html[data-theme="night"] .rules-toc nav a:hover { background: rgba(17, 53, 65, .8); }

html[data-theme="night"] .rules-world-card {
  border-color: rgba(67, 228, 209, .18);
  box-shadow: 0 0 55px rgba(19, 215, 194, .08), var(--rules-shadow);
}

html[data-theme="night"] .rules-world-card > img {
  filter: saturate(1.04) contrast(1.03) brightness(.96);
}

html[data-theme="night"] .rules-world-shade {
  background:
    linear-gradient(to top, rgba(2, 15, 23, .97), rgba(4, 21, 33, .25) 58%, rgba(43, 17, 67, .26)),
    linear-gradient(115deg, rgba(16, 222, 201, .1), transparent 48%);
}

html[data-theme="night"] .rules-toc-inner {
  background: rgba(7, 24, 33, .67);
  box-shadow: 0 18px 55px rgba(0, 4, 9, .27);
}

html[data-theme="night"] .rules-toc-telegram {
  color: #ecffff;
  background: linear-gradient(140deg, #0f777c, #174061 65%, #4a285e);
  box-shadow: 0 0 29px rgba(26, 207, 196, .12);
}

html[data-theme="night"] :is(.territory-card, .rules-list-card, .rules-feature-card, .rules-admin-grid > ul) {
  box-shadow: inset 0 1px rgba(255, 255, 255, .02), 0 18px 50px rgba(0, 4, 9, .14);
}

html[data-theme="night"] .rules-statement {
  background: linear-gradient(135deg, rgba(32, 214, 192, .11), rgba(105, 46, 139, .1));
}

html[data-theme="night"] .rules-admin-grid > aside {
  background:
    radial-gradient(circle at 100% 0, rgba(165, 73, 203, .3), transparent 48%),
    linear-gradient(145deg, #0e3a3d, #0a1c2b);
  box-shadow: 0 0 35px rgba(37, 222, 199, .08), 0 22px 50px rgba(0, 0, 0, .24);
}

html[data-theme="night"] .rules-closing {
  border: 1px solid rgba(71, 230, 211, .12);
  background:
    radial-gradient(circle at 84% 12%, rgba(149, 62, 185, .34), transparent 23rem),
    radial-gradient(circle at 5% 110%, rgba(23, 206, 194, .28), transparent 26rem),
    linear-gradient(145deg, #0b2832, #09131f);
  box-shadow: 0 0 60px rgba(27, 204, 193, .08), 0 30px 75px rgba(0, 0, 0, .28);
}

@media (max-width: 1080px) {
  .rules-header-nav { gap: 7px; }
  .rules-theme-toggle > span:last-child,
  .rules-telegram-link { display: none; }
  .rules-theme-toggle { width: 45px; padding: 0; }
  .rules-hero { grid-template-columns: minmax(0, 1fr) minmax(330px, .8fr); gap: 45px; }
  .rules-layout { grid-template-columns: 190px minmax(0, 1fr); gap: 35px; }
  .territory-grid { grid-template-columns: 1fr; }
  .territory-card > p { min-height: 0; }
}

@media (max-width: 820px) {
  .rules-header.site-header { height: 88px; }
  .rules-header .brand-name > small { display: none; }
  .rules-header .cabinet-link { min-width: 45px; width: 45px; padding: 0; font-size: 0; }
  .rules-header .cabinet-link > span { margin: 0; font-size: 17px; }
  .rules-hero {
    min-height: auto;
    padding-block: 58px 92px;
    grid-template-columns: 1fr;
  }
  .rules-hero-copy { max-width: 690px; }
  .rules-world-card { min-height: 460px; transform: none; }
  .rules-layout { display: block; }
  .rules-toc {
    position: relative;
    z-index: 4;
    top: auto;
    margin-bottom: 74px;
  }
  .rules-toc-inner { padding: 16px; }
  .rules-toc-inner > p { margin: 0 0 12px 4px; }
  .rules-toc nav {
    display: flex;
    padding-bottom: 4px;
    overflow-x: auto;
    scroll-snap-type: x proximity;
    scrollbar-width: thin;
  }
  .rules-toc nav a {
    min-width: max-content;
    padding-inline: 12px;
    grid-template-columns: auto auto;
    scroll-snap-align: start;
  }
  .rules-toc-telegram { display: none; }
  .rules-section:first-child { border-top: 1px solid var(--rules-line); padding-top: 48px; }
  .rules-section-intro { margin-left: 0; }
}

@media (max-width: 660px) {
  .rules-header.site-header { height: 80px; }
  .rules-header .brand-mark { width: 42px; height: 42px; border-radius: 13px; }
  .rules-header .brand-name { font-size: 15px; }
  .rules-theme-toggle { width: 42px; min-height: 42px; }
  .rules-header .cabinet-link { width: 42px; min-height: 42px; }
  .rules-hero { padding-block: 52px 74px; gap: 39px; }
  .rules-hero h1 { font-size: clamp(49px, 16vw, 72px); }
  .rules-lead { font-size: 16px; }
  .rules-hero-actions { align-items: stretch; flex-direction: column; }
  .rules-primary-action,
  .rules-secondary-action { width: 100%; }
  .rules-world-card { min-height: 410px; border-radius: 28px; }
  .rules-world-card figcaption { right: 23px; bottom: 24px; left: 23px; }
  .rules-toc { margin-bottom: 60px; }
  .rules-section { padding-bottom: 66px; }
  .rules-section-head { gap: 13px; }
  .rules-section-number { width: 42px; height: 42px; }
  .rules-section h2 { font-size: clamp(29px, 10vw, 39px); }
  .rules-section-intro { font-size: 15px; }
  .rules-two-columns,
  .rules-feature-grid,
  .rules-admin-grid { grid-template-columns: 1fr; }
  .territory-card,
  .rules-list-card,
  .rules-feature-card { padding: 22px; }
  .rules-compact-list article { padding-inline: 3px; grid-template-columns: 37px 1fr; }
  .rules-closing { padding: 32px 25px; border-radius: 24px; }
  .rules-closing > div { align-items: flex-start; flex-direction: column; }
  .rules-closing > div i { display: none; }
  .rules-footer { grid-template-columns: 1fr auto; gap: 20px; }
  .rules-footer nav { display: none; }
}

@media (max-width: 420px) {
  .rules-header-nav { gap: 5px; }
  .rules-header .brand { gap: 8px; }
  .rules-header .brand-mark { width: 39px; height: 39px; }
  .rules-theme-toggle,
  .rules-header .cabinet-link { width: 39px; min-height: 39px; }
  .rules-hero h1 { font-size: clamp(43px, 15vw, 58px); }
  .rules-world-card { min-height: 360px; }
  .rules-world-card figcaption strong { font-size: 17px; }
  .rules-section-head { align-items: center; }
  .rules-section-head p { display: none; }
  .territory-card-top { align-items: flex-start; }
  .rules-footer { grid-template-columns: 1fr; }
  .rules-footer > small { margin-left: 54px; }
}

@media (prefers-reduced-motion: reduce) {
  .rules-page { scroll-behavior: auto; }
  .rules-skip-link,
  .rules-theme-toggle,
  .rules-telegram-link,
  .rules-header .cabinet-link,
  .rules-primary-action,
  .rules-secondary-action,
  .rules-world-card > img,
  .rules-toc nav a { transition: none; }
  .rules-world-card:hover > img { transform: scale(1.02); }
}
