:root {
  --bg: #120304;
  --bg-deep: #080102;
  --header: #0c0304;
  --gold: #c9a227;
  --gold-hi: #e4c56a;
  --ink: #140c02;
  --nav: #e8d7a8;
  --line: rgba(201, 162, 39, 0.32);
  --card: rgba(0, 0, 0, 0.38);
  --max: 1080px;
  --text: #f4efe4;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  margin: 0;
  overflow-x: hidden;
  background-color: var(--bg);
  background-image: radial-gradient(1200px 500px at 50% -80px, #2a0a0c 0%, var(--bg) 55%);
  color: var(--text);
  font-family: Georgia, "Palatino Linotype", Palatino, "Times New Roman", serif;
  font-size: 16px;
  line-height: 1.7;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--gold-hi);
  text-decoration: none;
}

a:hover {
  color: #fff3c4;
}

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

h1,
h2,
h3 {
  font-family: Georgia, "Times New Roman", serif;
  line-height: 1.25;
  font-weight: 700;
  margin: 0 0 14px;
  scroll-margin-top: 110px;
  color: #fff8e8;
}

h1 {
  font-size: 38px;
  text-align: center;
  letter-spacing: 0.01em;
}

h2 {
  font-size: 26px;
  margin-top: 36px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
  clear: both;
}

h3 {
  font-size: 19px;
  margin-top: 22px;
  color: var(--gold-hi);
}

p {
  margin: 0 0 14px;
}

ul,
ol {
  margin: 0 0 16px;
  padding-left: 22px;
}

li + li {
  margin-top: 6px;
}

.skip {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  white-space: nowrap;
  background: var(--gold);
  color: var(--ink);
  z-index: 100;
}

.skip:hover,
.skip:focus:not(:focus-visible) {
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
}

.skip:focus-visible {
  left: 12px;
  top: 12px;
  width: auto;
  height: auto;
  padding: 8px 12px;
  overflow: visible;
  clip: auto;
  clip-path: none;
  white-space: normal;
  z-index: 100;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: var(--header);
  border-bottom: 1px solid var(--gold);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.45);
}

.header-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 8px 18px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.logo {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
}

.logo img {
  height: 52px;
  width: auto;
}

.nav-wrap {
  flex: 1 1 auto;
}

.menu {
  list-style: none;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 2px;
  margin: 0;
  padding: 0;
}

.menu > li {
  position: relative;
}

.menu a {
  color: var(--nav);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 10px 8px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.menu a:hover,
.menu a[aria-current="page"] {
  color: var(--gold-hi);
}

.has-sub > a::after {
  content: "";
  width: 6px;
  height: 6px;
  margin-top: -2px;
  border-right: 1.5px solid var(--gold);
  border-bottom: 1.5px solid var(--gold);
  transform: rotate(45deg);
  flex: 0 0 auto;
}

.submenu > .has-sub > a::after {
  margin-left: auto;
  margin-top: 0;
  transform: rotate(-45deg);
}

.sub-toggle {
  display: none;
  background: transparent;
  border: 0;
  color: var(--nav);
  cursor: pointer;
  padding: 6px;
}

.submenu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 210px;
  background: #160405;
  border: 1px solid var(--gold);
  padding: 6px 0;
  margin: 0;
  list-style: none;
  z-index: 40;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.45);
}

.submenu a {
  text-transform: none;
  letter-spacing: 0.02em;
  font-size: 15px;
  font-weight: 600;
  display: flex;
  padding: 8px 14px;
}

.submenu .submenu {
  top: 0;
  left: 100%;
}

.menu > li:hover > .submenu,
.menu > li:focus-within > .submenu,
.menu > li.open > .submenu,
.submenu li:hover > .submenu,
.submenu li:focus-within > .submenu,
.submenu li.open > .submenu {
  display: block;
}

.login-btn,
.join-btn,
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-align: center;
  cursor: pointer;
  border: 0;
  clip-path: polygon(10px 0, 100% 0, calc(100% - 10px) 100%, 0 100%);
}

.login-btn {
  color: var(--gold);
  background: transparent;
  box-shadow: inset 0 0 0 1px var(--gold);
  padding: 9px 22px;
  font-size: 12px;
}

.login-btn:hover {
  background: var(--gold);
  color: var(--ink);
}

.btn {
  background: #1a0b06;
  color: var(--gold);
  box-shadow: inset 0 0 0 1px var(--gold);
  padding: 10px 18px;
  font-size: 12px;
}

.btn:hover {
  background: var(--gold);
  color: var(--ink);
}

.join-btn {
  background: linear-gradient(180deg, #e6c86a 0%, #c9a227 46%, #8a6b14 100%);
  color: var(--ink);
  padding: 13px 38px;
  font-size: 15px;
  clip-path: polygon(14px 0, 100% 0, calc(100% - 14px) 100%, 0 100%);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.4);
}

.join-btn:hover {
  filter: brightness(1.08);
  color: var(--ink);
}

.burger {
  display: none;
  margin-left: auto;
  width: 46px;
  height: 42px;
  border: 1px solid var(--gold);
  background: transparent;
  cursor: pointer;
  padding: 8px;
  clip-path: polygon(8px 0, 100% 0, calc(100% - 8px) 100%, 0 100%);
}

.burger span {
  display: block;
  height: 2px;
  margin: 5px 0;
  background: var(--gold);
}

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 18px 18px 64px;
}

.page-banner {
  position: relative;
  margin: 8px 16px 24px;
  overflow: hidden;
  clip-path: polygon(56px 0, 100% 0, calc(100% - 56px) 100%, 0 100%);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.45);
}

.page-banner img {
  width: 100%;
  height: 380px;
  object-fit: cover;
  display: block;
}

.banner-copy {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 56px 9% 26px;
  text-align: center;
  background: linear-gradient(180deg, transparent 0%, rgba(8, 1, 2, 0.9) 62%);
}

.page-banner h1 {
  margin: 0 0 12px;
  font-size: 34px;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.8);
}

.page-banner .join-btn {
  margin: 0;
}

.crumbs {
  font-size: 14px;
  margin-bottom: 16px;
  color: var(--nav);
}

.crumbs a {
  color: var(--nav);
}

.toc {
  float: none;
  width: min(420px, 100%);
  max-width: 420px;
  margin: 4px auto 20px;
  text-align: center;
  background: var(--card);
  border: 1px solid var(--line);
  padding: 12px 14px 14px;
}

.toc p {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  color: var(--gold);
}

.toc button {
  background: none;
  border: 0;
  color: var(--gold-hi);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  padding: 0 0 0 6px;
}

.toc ol {
  display: none;
  margin: 10px auto 0;
  padding-left: 22px;
  font-size: 14px;
  text-align: left;
  width: fit-content;
  max-width: 100%;
}

.toc.open ol {
  display: block;
}

.toc a {
  color: var(--nav);
}

.demo-frame {
  clear: both;
  width: 100%;
  margin: 8px 0 24px;
  border: 1px solid var(--line);
  background: var(--bg-deep);
  overflow: hidden;
}

.demo-frame iframe {
  display: block;
  width: 100%;
  height: 700px;
  border: 0;
  background: #080102;
}

.prose::after {
  content: "";
  display: block;
  clear: both;
}

.wrap-block {
  overflow: visible;
  margin: 0 0 8px;
}

.float-fig {
  float: left;
  width: 32%;
  max-width: 300px;
  margin: 4px 20px 8px 0;
}

.float-fig.right {
  float: right;
  margin: 4px 0 8px 20px;
}

.float-fig img {
  width: 100%;
  height: auto;
  max-height: 188px;
  border: 1px solid var(--line);
  object-fit: cover;
}

.prose ul,
.prose ol {
  overflow: visible;
}

.table-wrap,
.split,
.games,
.faq,
.form {
  clear: both;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 16px 0 8px;
}

.cta-single {
  margin: 18px 0 8px;
}

.games {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin: 18px 0 8px;
  clear: both;
}

.game-card {
  background: #160405;
  border: 1px solid var(--line);
  overflow: hidden;
  color: var(--text);
  min-height: 0;
}

.game-media {
  position: relative;
}

.game-card img {
  width: 100%;
  height: 140px;
  object-fit: cover;
}

.game-actions {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 6px;
  padding: 0 8px 10px;
  background: linear-gradient(180deg, transparent 30%, rgba(8, 1, 2, 0.88) 100%);
  opacity: 1;
}

.game-actions .btn {
  padding: 10px 16px;
  min-height: 44px;
  min-width: 44px;
  font-size: 12px;
  clip-path: polygon(8px 0, 100% 0, calc(100% - 8px) 100%, 0 100%);
}

.game-actions .btn-demo {
  background: transparent;
  color: var(--gold);
  box-shadow: inset 0 0 0 1px var(--gold);
}

.game-actions .btn-demo:hover {
  background: var(--gold);
  color: var(--ink);
}

.game-card strong,
.game-card span {
  display: block;
  padding: 0 10px;
}

.game-card strong {
  font-size: 16px;
  margin: 10px 0 4px;
}

.game-card span {
  font-size: 13px;
  color: var(--nav);
  line-height: 1.4;
  padding-bottom: 12px;
}

.game-card:hover {
  border-color: var(--gold);
  color: #fff8e8;
}

@media (min-width: 981px) and (hover: hover) and (pointer: fine) {
  .game-actions {
    opacity: 0;
    transition: opacity 0.18s ease;
  }

  .game-card:hover .game-actions,
  .game-card:focus-within .game-actions,
  .game-card.is-open .game-actions {
    opacity: 1;
  }
}

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 12px 0 18px;
}

.panel {
  background: var(--card);
  border: 1px solid var(--line);
  padding: 14px 16px 6px;
}

.panel h3 {
  margin-top: 0;
}

.panel.good {
  border-color: rgba(120, 200, 90, 0.45);
}

.panel.bad {
  border-color: rgba(160, 40, 40, 0.55);
}

.table-wrap {
  overflow-x: auto;
  margin: 8px 0 18px;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 520px;
}

th,
td {
  border: 1px solid var(--line);
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
}

th {
  background: #1a0708;
  color: var(--gold-hi);
}

tr:nth-child(even) td {
  background: rgba(0, 0, 0, 0.22);
}

.faq {
  background: var(--card);
  border: 1px solid var(--line);
  padding: 10px 14px;
  margin: 0 0 10px;
}

.faq summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--gold-hi);
}

.faq p {
  margin: 10px 0 6px;
}

.form {
  max-width: 520px;
  background: var(--card);
  border: 1px solid var(--line);
  padding: 18px 18px 8px;
  margin: 12px 0 20px;
}

.form-wide {
  max-width: none;
  width: 100%;
  box-sizing: border-box;
}

label {
  display: block;
  font-weight: 700;
  margin-bottom: 6px;
}

input,
select,
textarea {
  width: 100%;
  margin-bottom: 14px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  background: #0a0203;
  color: #fff8e8;
  font: inherit;
}

input:focus,
select:focus,
textarea:focus {
  outline: 2px solid var(--gold);
  border-color: var(--gold);
}

.check {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  font-weight: 400;
  margin-bottom: 14px;
}

.check input {
  width: auto;
  margin: 4px 0 0;
}

.note,
.form-msg {
  font-size: 14px;
  color: var(--nav);
}

.form-msg.ok {
  color: #b6f0a0;
}

.form-msg.err {
  color: #ffb4a8;
}

.posts {
  display: grid;
  gap: 14px;
}

.post-card {
  display: block;
  background: var(--card);
  border: 1px solid var(--line);
  padding: 16px 18px;
  color: var(--text);
}

.post-card:hover {
  border-color: var(--gold);
  color: #fff8e8;
}

.post-card small {
  color: var(--gold);
  font-weight: 700;
}

.site-footer {
  background: var(--bg-deep);
  border-top: 1px solid var(--gold);
  padding: 28px 18px 22px;
}

.footer-inner {
  max-width: 1080px;
  margin: 0 auto;
}

.footer-menu {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin: 0 0 14px;
  padding: 0;
}

.footer-menu a {
  color: var(--nav);
  font-weight: 700;
}

.age {
  display: inline-block;
  border: 1px solid var(--gold);
  color: var(--gold);
  font-weight: 700;
  width: 42px;
  height: 42px;
  line-height: 40px;
  text-align: center;
  margin-right: 8px;
  clip-path: polygon(8px 0, 100% 0, calc(100% - 8px) 100%, 0 100%);
}

.legal {
  color: #d8c7a4;
  font-size: 14px;
}

.to-top {
  position: fixed;
  right: 22px;
  bottom: 22px;
  width: 48px;
  height: 48px;
  border: 0;
  background: linear-gradient(180deg, #e6c86a, #c9a227);
  color: var(--ink);
  cursor: pointer;
  z-index: 40;
  display: none;
  align-items: center;
  justify-content: center;
  clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
}

.to-top.show {
  display: flex;
}

.to-top:hover {
  filter: brightness(1.08);
}

.to-top svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

@media (max-width: 980px) {
  .page-banner {
    margin: 6px 10px 20px;
    clip-path: polygon(28px 0, 100% 0, calc(100% - 28px) 100%, 0 100%);
  }

  .page-banner img {
    height: 280px;
  }

  .page-banner h1 {
    font-size: 24px;
  }

  .banner-copy {
    padding: 40px 8% 20px;
  }

  h1 {
    font-size: 28px;
  }

  h2 {
    font-size: 22px;
  }

  .games {
    grid-template-columns: repeat(2, 1fr);
  }

  .burger {
    display: block;
  }

  .nav-wrap {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    background: #160405;
    border-bottom: 1px solid var(--gold);
    max-height: calc(100vh - 78px);
    overflow: auto;
    padding: 8px 0 16px;
  }

  .nav-wrap.open {
    display: block;
  }

  .menu {
    flex-direction: column;
    align-items: stretch;
  }

  .menu > li {
    border-top: 1px solid rgba(201, 162, 39, 0.15);
  }

  .menu a {
    padding: 12px 18px;
  }

  .sub-toggle {
    display: inline-flex;
    position: absolute;
    right: 8px;
    top: 6px;
    width: 40px;
    height: 36px;
    align-items: center;
    justify-content: center;
  }

  .submenu > .has-sub > a::after,
  .has-sub > a::after {
    margin-left: 8px;
    margin-top: -2px;
    transform: rotate(45deg);
  }

  .submenu,
  .submenu .submenu {
    position: static;
    display: none;
    border: 0;
    box-shadow: none;
    background: rgba(0, 0, 0, 0.25);
    min-width: 0;
  }

  .menu > li.open > .submenu,
  .submenu li.open > .submenu {
    display: block;
  }

  .menu > li:hover > .submenu,
  .submenu li:hover > .submenu {
    display: none;
  }

  .menu > li.open:hover > .submenu,
  .submenu li.open:hover > .submenu {
    display: block;
  }

  .toc {
    float: none;
    width: min(420px, 100%);
    margin: 0 auto 16px;
  }

  .demo-frame iframe {
    height: 460px;
  }

  .float-fig,
  .float-fig.right {
    float: none;
    width: 100%;
    max-width: none;
    margin: 0 0 14px;
  }

  .float-fig img {
    max-height: none;
  }

  .split {
    grid-template-columns: 1fr;
  }

  .header-inner {
    flex-wrap: wrap;
  }

  .login-btn {
    margin-left: auto;
  }

  .burger {
    margin-left: 0;
  }
}

@media (max-width: 640px) {
  .page-banner {
    clip-path: polygon(18px 0, 100% 0, calc(100% - 18px) 100%, 0 100%);
  }

  .page-banner img {
    height: 230px;
  }

  .page-banner h1 {
    font-size: 20px;
  }

  .banner-copy {
    padding: 32px 10% 16px;
  }

  h1 {
    font-size: 24px;
  }

  .logo img {
    height: 42px;
  }

  .join-btn {
    padding: 12px 26px;
    font-size: 14px;
  }

  .games {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .game-card img {
    height: 120px;
  }

  .to-top {
    right: 14px;
    bottom: 14px;
  }
}
