:root {
  --night: #081717;
  --night-soft: #102827;
  --night-raised: #173332;
  --paper: #f0f4ed;
  --paper-deep: #dfe9df;
  --panel: #fffdf7;
  --ink: #17231f;
  --ink-soft: #58675f;
  --muted: #849189;
  --line: rgba(23, 35, 31, 0.15);
  --line-light: rgba(255, 255, 255, 0.16);
  --jade: #21816b;
  --jade-bright: #69c4a8;
  --jade-pale: #d8eee5;
  --gold: #d7a63d;
  --gold-bright: #f1ca72;
  --coral: #bb6258;
  --sky: #609aab;
  --serif: "Noto Serif SC", "Songti SC", "STSong", "Yu Mincho", "Hiragino Mincho ProN", "SimSun", serif;
  --sans: "Noto Sans SC", "Microsoft YaHei", "PingFang SC", "Yu Gothic UI", "Hiragino Sans", sans-serif;
  --max-width: 1240px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--night);
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}

body.nav-open {
  overflow: hidden;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  font: inherit;
}

[hidden] {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  left: 16px;
  top: -64px;
  z-index: 100;
  padding: 11px 15px;
  color: var(--night);
  background: var(--gold-bright);
  border: 1px solid var(--gold);
  transition: top 180ms ease;
}

.skip-link:focus {
  top: 16px;
}

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  color: #fffdf5;
  border-bottom: 1px solid transparent;
  transition:
    background-color 220ms ease,
    border-color 220ms ease,
    transform 220ms ease;
}

.site-header.is-solid,
.site-header.is-open {
  background: rgba(7, 22, 22, 0.95);
  border-color: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(16px);
}

.site-header.is-hidden {
  transform: translateY(-100%);
}

.nav-shell {
  width: min(calc(100% - 40px), var(--max-width));
  height: 76px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex: 0 0 auto;
}

.brand-mark {
  display: grid;
  grid-template-columns: repeat(2, 10px);
  grid-template-rows: repeat(2, 10px);
  gap: 3px;
  width: 31px;
  height: 31px;
  padding: 3px;
  border: 1px solid currentColor;
  transform: rotate(45deg);
}

.brand-mark > span {
  display: block;
  border: 1px solid currentColor;
}

.brand-mark > span:nth-child(2),
.brand-mark > span:nth-child(3) {
  background: currentColor;
}

.brand-type {
  display: grid;
  gap: 1px;
  line-height: 1;
}

.brand-type strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 16px;
  letter-spacing: 0.14em;
}

.brand-type small {
  color: rgba(255, 255, 255, 0.66);
  font-family: var(--serif);
  font-size: 10px;
  letter-spacing: 0.18em;
}

.primary-navigation,
.nav-actions,
.nav-links {
  display: flex;
  align-items: center;
}

.primary-navigation {
  gap: 28px;
  font-size: 14px;
}

.nav-links {
  gap: 26px;
}

.nav-links a {
  position: relative;
  color: rgba(255, 255, 255, 0.78);
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: -8px;
  height: 1px;
  background: var(--gold-bright);
  transition: right 180ms ease;
}

.nav-links a:hover::after,
.nav-links a:focus-visible::after {
  right: 0;
}

.nav-actions {
  gap: 10px;
}

.language-switcher {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 42px;
  padding: 4px 5px 4px 12px;
  color: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.045);
}

.language-switcher__label {
  font-size: 10px;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.language-options {
  display: flex;
  align-items: center;
  gap: 2px;
}

.language-options button {
  min-width: 42px;
  height: 30px;
  padding: 0 8px;
  color: rgba(255, 255, 255, 0.72);
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
  transition:
    color 160ms ease,
    background-color 160ms ease,
    border-color 160ms ease;
}

.language-options button:hover,
.language-options button:focus-visible {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.28);
}

.language-options button[aria-pressed="true"] {
  color: var(--night);
  background: var(--gold-bright);
  border-color: var(--gold-bright);
}

.nav-play {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 16px;
  color: var(--night);
  background: var(--gold-bright);
  border: 1px solid var(--gold-bright);
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
  transition:
    color 180ms ease,
    background-color 180ms ease,
    border-color 180ms ease;
}

.nav-play:hover,
.nav-play:focus-visible {
  color: #fff;
  background: var(--jade);
  border-color: var(--jade);
}

.nav-play svg,
.button svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: square;
  stroke-linejoin: miter;
}

.nav-fullscreen {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  padding: 0;
  color: #fffdf5;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.24);
  cursor: pointer;
}

.nav-fullscreen:hover,
.nav-fullscreen:focus-visible,
.nav-fullscreen.is-active {
  color: var(--night);
  background: var(--gold-bright);
  border-color: var(--gold-bright);
}

.nav-fullscreen svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: square;
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 0;
  color: inherit;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.22);
}

.nav-toggle > span:not(.sr-only) {
  display: block;
  width: 20px;
  height: 1px;
  margin: 5px auto;
  background: currentColor;
  transition: transform 180ms ease;
}

.nav-toggle[aria-expanded="true"] > span:first-child {
  transform: translateY(3px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] > span:nth-child(2) {
  transform: translateY(-3px) rotate(-45deg);
}

.hero {
  position: relative;
  min-height: 760px;
  height: min(900px, 92svh);
  overflow: hidden;
  color: #fffdf5;
  background:
    linear-gradient(90deg, rgba(7, 22, 22, 0.97) 0%, rgba(7, 22, 22, 0.88) 46%, rgba(13, 46, 43, 0.86) 100%),
    #0b1c1c;
}

.hero::before,
.hero::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.hero::before {
  right: -7vw;
  top: 6%;
  width: min(54vw, 760px);
  aspect-ratio: 1;
  border: 1px solid rgba(105, 196, 168, 0.17);
  transform: rotate(45deg);
}

.hero::after {
  left: 0;
  right: 0;
  bottom: 0;
  height: 38%;
  background: linear-gradient(0deg, rgba(3, 13, 13, 0.88), transparent);
}

.hero-grid {
  position: absolute;
  inset: 0;
  opacity: 0.13;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.28) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.28) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(90deg, #000, transparent 82%);
}

.hero-inner {
  position: relative;
  z-index: 2;
  width: min(calc(100% - 40px), var(--max-width));
  height: 100%;
  margin: 0 auto;
  padding-top: 110px;
  display: grid;
  grid-template-columns: minmax(0, 0.93fr) minmax(480px, 1.07fr);
  gap: 68px;
  align-items: center;
}

.hero-copy-column {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.eyebrow,
.section-label {
  margin: 0;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--gold-bright);
}

.eyebrow span + span {
  display: inline-flex;
  align-items: center;
  gap: 14px;
}

.eyebrow span + span::before {
  content: "";
  width: 34px;
  height: 1px;
  background: currentColor;
}

.hero h1 {
  margin: 22px 0 0;
  font-family: var(--serif);
  font-weight: 600;
  line-height: 0.94;
}

.hero h1 > span {
  display: block;
  color: #fff8df;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(58px, 7vw, 106px);
  letter-spacing: 0.045em;
  text-shadow: 0 10px 40px rgba(0, 0, 0, 0.38);
}

.hero h1 small {
  display: block;
  margin-top: 14px;
  color: var(--gold-bright);
  font-size: clamp(28px, 3vw, 45px);
  font-weight: 500;
  letter-spacing: 0.22em;
}

.hero-copy {
  max-width: 510px;
  margin: 26px 0 0;
  color: rgba(255, 255, 255, 0.74);
  font-family: var(--serif);
  font-size: clamp(16px, 1.48vw, 19px);
  line-height: 1.9;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 32px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 11px;
  min-height: 54px;
  padding: 0 23px;
  border: 1px solid transparent;
  font-size: 15px;
  font-weight: 800;
  transition:
    color 180ms ease,
    background-color 180ms ease,
    border-color 180ms ease,
    transform 180ms ease;
}

.button:hover,
.button:focus-visible {
  transform: translateY(-2px);
}

.button-primary {
  color: var(--night);
  background: var(--gold-bright);
  border-color: var(--gold-bright);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.22);
}

.button-primary:hover,
.button-primary:focus-visible {
  color: #fff;
  background: var(--jade);
  border-color: var(--jade);
}

.button-quiet {
  color: #fff;
  background: rgba(255, 255, 255, 0.055);
  border-color: rgba(255, 255, 255, 0.28);
}

.button-quiet:hover,
.button-quiet:focus-visible {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.5);
}

.hero-facts {
  display: flex;
  gap: 30px;
  padding: 0;
  margin: 44px 0 0;
  list-style: none;
}

.hero-facts li {
  display: grid;
  gap: 4px;
  min-width: 88px;
  padding-left: 14px;
  border-left: 1px solid rgba(241, 202, 114, 0.42);
}

.hero-facts strong {
  color: #fff8df;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 17px;
  letter-spacing: 0.08em;
}

.hero-facts span {
  color: rgba(255, 255, 255, 0.52);
  font-size: 11px;
}

.board-demo {
  position: relative;
  width: min(100%, 610px);
  margin-left: auto;
  padding: 16px;
  background:
    linear-gradient(145deg, rgba(24, 57, 54, 0.96), rgba(8, 28, 28, 0.98)),
    var(--night-soft);
  border: 1px solid rgba(105, 196, 168, 0.34);
  box-shadow:
    0 34px 90px rgba(0, 0, 0, 0.4),
    inset 0 0 0 1px rgba(255, 255, 255, 0.035);
}

.board-demo::before {
  content: "";
  position: absolute;
  inset: 7px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  pointer-events: none;
}

.board-demo__topline {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 12px;
  color: rgba(255, 255, 255, 0.58);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.14em;
}

.board-demo__topline strong {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--gold-bright);
  font-size: 10px;
}

.board-demo__topline strong i {
  width: 6px;
  height: 6px;
  background: var(--coral);
  transform: rotate(45deg);
  animation: status-pulse 1400ms ease-in-out infinite;
}

.board-demo__body {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 104px;
  gap: 12px;
}

.board-demo__hint {
  position: relative;
  z-index: 1;
  min-height: 20px;
  margin: 0 0 10px;
  color: rgba(255, 255, 255, 0.7);
  font-family: var(--serif);
  font-size: 12px;
  line-height: 1.55;
}

.mini-board {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 5px;
  padding: 7px;
  background: rgba(5, 18, 18, 0.84);
  border: 1px solid rgba(105, 196, 168, 0.24);
}

.demo-cell {
  position: relative;
  display: block;
  min-width: 0;
  padding: 0;
  aspect-ratio: 1;
  border: 1px solid rgba(255, 255, 255, 0.075);
  background: rgba(255, 255, 255, 0.025);
  cursor: default;
}

.demo-cell.is-target {
  border-color: rgba(241, 202, 114, 0.84);
  background: rgba(241, 202, 114, 0.12);
  box-shadow: inset 0 0 18px rgba(241, 202, 114, 0.1);
  cursor: pointer;
  animation: target-pulse 1200ms ease-in-out infinite;
}

.demo-cell.is-target::after {
  content: "+";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--gold-bright);
  font-size: clamp(15px, 2vw, 23px);
}

.demo-cell.is-invalid {
  border-color: var(--coral);
  animation: invalid-shake 260ms ease both;
}

.demo-tile {
  position: relative;
  display: block;
  color: var(--ink);
  background: linear-gradient(145deg, #fffdf5 0%, #e8e1cd 100%);
  border: 1px solid rgba(241, 202, 114, 0.78) !important;
  box-shadow:
    inset 0 0 0 2px rgba(255, 255, 255, 0.62),
    0 3px 10px rgba(0, 0, 0, 0.22);
}

.tile-edge {
  position: absolute;
  z-index: 1;
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(10px, 1.2vw, 15px);
  line-height: 1;
  pointer-events: none;
}

.tile-edge--up {
  left: 50%;
  top: 3px;
  transform: translateX(-50%);
}

.tile-edge--right {
  right: 3px;
  top: 50%;
  transform: translateY(-50%);
}

.tile-edge--down {
  left: 50%;
  bottom: 3px;
  transform: translateX(-50%);
}

.tile-edge--left {
  left: 3px;
  top: 50%;
  transform: translateY(-50%);
}

.seam-live {
  animation: tile-glow 1700ms ease-in-out infinite;
}

.candidate-rail {
  display: grid;
  align-content: start;
  gap: 9px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.11);
}

.candidate-rail__label {
  color: rgba(255, 255, 255, 0.54);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.candidate-stack {
  display: grid;
  gap: 8px;
}

.candidate-option {
  display: grid;
  grid-template-columns: 1fr;
  gap: 5px;
  width: 100%;
  padding: 6px;
  color: rgba(255, 255, 255, 0.62);
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.1);
  cursor: pointer;
}

.candidate-option b {
  font-size: 8px;
  letter-spacing: 0.08em;
}

.candidate-option:hover,
.candidate-option:focus-visible,
.candidate-option[aria-pressed="true"] {
  color: var(--gold-bright);
  border-color: var(--jade-bright);
  outline: none;
}

.candidate-tile {
  width: 100%;
  aspect-ratio: 1;
}

.candidate-option[aria-pressed="true"] .candidate-tile {
  outline: 2px solid var(--jade-bright);
  outline-offset: 2px;
}

.board-demo__actions {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin-top: 12px;
}

.board-demo__actions button {
  display: grid;
  place-items: center;
  min-height: 42px;
  padding: 0 12px;
  color: rgba(255, 255, 255, 0.62);
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  cursor: pointer;
}

.board-demo__actions button:first-child {
  color: var(--night);
  background: var(--jade-bright);
  border-color: var(--jade-bright);
}

.board-demo__actions button:hover,
.board-demo__actions button:focus-visible {
  border-color: var(--gold-bright);
  outline: none;
}

.board-demo__actions button:disabled {
  opacity: 0.42;
  cursor: not-allowed;
}

.link-toast {
  position: absolute;
  right: -18px;
  bottom: 84px;
  z-index: 3;
  display: grid;
  gap: 4px;
  min-width: 230px;
  padding: 13px 16px 14px;
  color: var(--night);
  background: var(--gold-bright);
  border: 1px solid #fff2bf;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.28);
  animation: toast-float 2500ms ease-in-out infinite;
}

.link-toast[hidden] {
  display: none;
}

.link-toast.is-triple {
  color: #fff;
  background: var(--coral);
  border-color: #ffb6aa;
}

.link-toast strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 13px;
  letter-spacing: 0.12em;
}

.link-toast span {
  font-size: 10px;
}

.rules {
  padding: 122px max(20px, calc((100% - var(--max-width)) / 2)) 126px;
  background:
    linear-gradient(90deg, rgba(33, 129, 107, 0.055) 1px, transparent 1px),
    linear-gradient(rgba(33, 129, 107, 0.055) 1px, transparent 1px),
    var(--paper);
  background-size: 74px 74px;
}

.rules-heading,
.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 56px;
}

.rules-heading h2,
.section-heading h2 {
  max-width: 720px;
  margin: 18px 0 0;
  font-family: var(--serif);
  font-size: clamp(38px, 4.8vw, 64px);
  font-weight: 500;
  line-height: 1.24;
  letter-spacing: 0.02em;
}

.rules-heading > p,
.section-heading > p {
  max-width: 380px;
  margin: 0 0 6px;
  color: var(--ink-soft);
  font-family: var(--serif);
  font-size: 16px;
  line-height: 1.8;
}

.rules .section-label {
  color: var(--jade);
}

.rules-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(360px, 0.9fr);
  gap: 26px;
  align-items: start;
  margin-top: 54px;
}

.rules-visual {
  position: sticky;
  top: 102px;
  margin: 0;
  overflow: hidden;
  background: var(--night-soft);
  border: 1px solid rgba(23, 35, 31, 0.18);
  box-shadow: 0 28px 70px rgba(19, 37, 32, 0.16);
}

.rules-visual picture {
  display: block;
  aspect-ratio: 16 / 9;
  background: var(--night);
}

.rules-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hotspot {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 28px;
  padding: 5px 9px 5px 6px;
  color: #fff;
  background: rgba(8, 25, 24, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(8px);
  font-size: 10px;
  white-space: nowrap;
}

.hotspot span {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  color: var(--night);
  background: var(--gold-bright);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 9px;
}

.hotspot b {
  font-weight: 700;
}

.hotspot-candidates {
  left: 51%;
  top: 23%;
}

.hotspot-match {
  left: 18%;
  top: 54%;
}

.hotspot-reward {
  left: 48%;
  bottom: 9%;
}

.rule-stack {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.rule-card {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 18px;
  min-height: 178px;
  padding: 24px 24px 22px 20px;
  background: rgba(255, 253, 247, 0.92);
  border: 1px solid rgba(23, 35, 31, 0.14);
  border-left: 4px solid var(--rule-color, var(--jade));
  box-shadow: 0 12px 32px rgba(23, 35, 31, 0.055);
}

.rule-card__index {
  color: var(--rule-color, var(--jade));
  font-family: Georgia, "Times New Roman", serif;
  font-size: 12px;
  letter-spacing: 0.12em;
}

.rule-card h3 {
  margin: 0;
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 600;
}

.rule-card p {
  margin: 13px 0 0;
  color: var(--ink-soft);
  font-family: var(--serif);
  font-size: 14px;
  line-height: 1.78;
}

.rule-card-objective {
  --rule-color: var(--sky);
}

.rule-card-turn {
  --rule-color: var(--jade);
}

.rule-card-connect {
  --rule-color: var(--gold);
}

.rule-card-reward {
  --rule-color: var(--coral);
}

.modes {
  padding: 126px max(20px, calc((100% - var(--max-width)) / 2)) 136px;
  color: #f7f3e9;
  background:
    linear-gradient(90deg, rgba(105, 196, 168, 0.07) 1px, transparent 1px),
    linear-gradient(rgba(105, 196, 168, 0.07) 1px, transparent 1px),
    var(--night-soft);
  background-size: 74px 74px;
}

.modes .section-label {
  color: var(--gold-bright);
}

.modes .section-heading > p {
  color: rgba(255, 255, 255, 0.58);
}

.mode-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 56px;
}

.mode-card {
  position: relative;
  min-height: 330px;
  padding: 28px 28px 70px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.mode-card::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 4px;
  background: var(--mode-color, var(--gold));
  transform: scaleX(0.24);
  transform-origin: left;
  transition: transform 220ms ease;
}

.mode-card:hover::after {
  transform: scaleX(1);
}

.mode-card__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.mode-card__top > span {
  color: rgba(255, 255, 255, 0.34);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 13px;
  letter-spacing: 0.16em;
}

.mode-symbol {
  position: relative;
  display: block;
  width: 58px;
  height: 58px;
  border: 1px solid color-mix(in srgb, var(--mode-color) 72%, transparent);
  transform: rotate(45deg);
}

.mode-symbol::after {
  content: "";
  position: absolute;
  inset: 16px;
  background: var(--mode-color);
  box-shadow: inset 0 0 0 5px rgba(255, 255, 255, 0.78);
}

.mode-symbol-gold {
  --mode-color: var(--gold-bright);
}

.mode-symbol-jade {
  --mode-color: var(--jade-bright);
}

.mode-symbol-coral {
  --mode-color: #dd8478;
}

.mode-card h3 {
  margin: 46px 0 0;
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 600;
}

.mode-card p {
  margin: 16px 0 0;
  color: rgba(255, 255, 255, 0.62);
  font-family: var(--serif);
  font-size: 15px;
  line-height: 1.8;
}

.mode-card small {
  position: absolute;
  left: 28px;
  right: 28px;
  bottom: 25px;
  padding-top: 14px;
  color: rgba(255, 255, 255, 0.42);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 10px;
  letter-spacing: 0.05em;
}

.final-cta {
  position: relative;
  padding: 118px 20px 126px;
  overflow: hidden;
  text-align: center;
  color: var(--ink);
  background: var(--gold-bright);
}

.cta-board {
  position: absolute;
  right: max(30px, calc((100% - var(--max-width)) / 2));
  top: 50%;
  width: 310px;
  height: 310px;
  opacity: 0.13;
  background-image:
    linear-gradient(rgba(23, 35, 31, 0.42) 1px, transparent 1px),
    linear-gradient(90deg, rgba(23, 35, 31, 0.42) 1px, transparent 1px);
  background-size: 52px 52px;
  border: 1px solid rgba(23, 35, 31, 0.42);
  transform: translateY(-50%) rotate(45deg);
}

.final-cta > *:not(.cta-board) {
  position: relative;
  z-index: 1;
}

.final-cta .section-label {
  color: #8a4f45;
}

.final-cta h2 {
  margin: 18px 0 0;
  font-family: var(--serif);
  font-size: clamp(48px, 6.2vw, 82px);
  font-weight: 500;
  line-height: 1.15;
}

.final-cta > p:not(.section-label) {
  margin: 18px 0 0;
  color: rgba(23, 35, 31, 0.66);
  font-family: var(--serif);
  font-size: 19px;
}

.button-large {
  min-height: 62px;
  margin-top: 34px;
  padding: 0 32px;
  color: #fff;
  background: var(--night-soft);
  border-color: var(--night-soft);
}

.button-large:hover,
.button-large:focus-visible {
  background: var(--coral);
  border-color: var(--coral);
}

.site-footer {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 28px;
  padding: 42px max(20px, calc((100% - var(--max-width)) / 2));
  color: rgba(255, 255, 255, 0.64);
  background: #071313;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #fff8df;
}

.footer-brand .brand-mark {
  width: 27px;
  height: 27px;
  grid-template-columns: repeat(2, 8px);
  grid-template-rows: repeat(2, 8px);
}

.footer-brand > div {
  display: grid;
  gap: 2px;
}

.footer-brand strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 13px;
  letter-spacing: 0.14em;
}

.footer-brand small {
  color: rgba(255, 255, 255, 0.44);
  font-family: var(--serif);
  font-size: 10px;
  letter-spacing: 0.16em;
}

.site-footer > p {
  margin: 0;
  font-family: var(--serif);
  font-size: 13px;
}

.footer-links {
  display: flex;
  gap: 20px;
  font-size: 12px;
}

.footer-links a:hover,
.footer-links a:focus-visible {
  color: var(--gold-bright);
}

.site-footer > .copyright {
  grid-column: 1 / -1;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  font-size: 10px;
  letter-spacing: 0.08em;
}

.has-js .reveal {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity 620ms cubic-bezier(0.22, 1, 0.36, 1),
    transform 620ms cubic-bezier(0.22, 1, 0.36, 1);
}

.has-js .reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes status-pulse {
  0%,
  100% {
    opacity: 0.42;
    transform: rotate(45deg) scale(0.8);
  }
  50% {
    opacity: 1;
    transform: rotate(45deg) scale(1.18);
  }
}

@keyframes tile-glow {
  0%,
  100% {
    box-shadow:
      inset 0 0 0 2px rgba(255, 255, 255, 0.62),
      0 0 0 rgba(105, 196, 168, 0);
  }
  50% {
    box-shadow:
      inset 0 0 0 2px rgba(255, 255, 255, 0.8),
      0 0 24px rgba(105, 196, 168, 0.62);
  }
}

@keyframes toast-float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-7px);
  }
}

@keyframes target-pulse {
  0%,
  100% {
    box-shadow: inset 0 0 12px rgba(241, 202, 114, 0.08), 0 0 0 rgba(241, 202, 114, 0);
  }
  50% {
    box-shadow: inset 0 0 18px rgba(241, 202, 114, 0.2), 0 0 16px rgba(241, 202, 114, 0.3);
  }
}

@keyframes invalid-shake {
  0%,
  100% { transform: translateX(0); }
  35% { transform: translateX(-3px); }
  70% { transform: translateX(3px); }
}

@media (max-width: 1160px) {
  .primary-navigation {
    gap: 20px;
  }

  .nav-links {
    gap: 20px;
  }

  .language-switcher__label {
    display: none;
  }

  .language-switcher {
    padding-left: 5px;
  }

  .hero-inner {
    grid-template-columns: minmax(0, 0.9fr) minmax(430px, 1.1fr);
    gap: 44px;
  }
}

@media (max-width: 1180px) {
  .rules-panel {
    grid-template-columns: 1fr;
  }

  .rules-visual {
    position: relative;
    top: auto;
  }
}

@media (max-width: 980px) {
  .hero {
    min-height: 0;
    height: auto;
  }

  .hero-inner {
    padding-top: 132px;
    padding-bottom: 92px;
    grid-template-columns: 1fr;
    gap: 52px;
  }

  .hero-copy {
    max-width: 640px;
  }

  .board-demo {
    width: min(100%, 720px);
    margin: 0;
  }

  .rules-heading,
  .section-heading {
    align-items: start;
    flex-direction: column;
    gap: 24px;
  }

  .rules-heading > p,
  .section-heading > p {
    max-width: 620px;
  }

  .rules-panel {
    grid-template-columns: 1fr;
  }

  .rules-visual {
    position: relative;
    top: auto;
  }

  .rule-stack {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .mode-grid {
    grid-template-columns: 1fr;
  }

  .mode-card {
    min-height: 290px;
  }
}

@media (max-width: 780px) {
  .site-header {
    background: rgba(7, 22, 22, 0.92);
  }

  .nav-shell {
    width: min(calc(100% - 28px), var(--max-width));
    height: 64px;
  }

  .nav-toggle {
    display: block;
  }

  .primary-navigation {
    position: fixed;
    inset: 64px 0 auto;
    display: grid;
    gap: 0;
    max-height: calc(100svh - 64px);
    padding: 12px 20px 24px;
    overflow-y: auto;
    background: rgba(7, 22, 22, 0.985);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-12px);
    transition:
      opacity 180ms ease,
      visibility 180ms ease,
      transform 180ms ease;
  }

  .primary-navigation.is-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }

  .nav-links {
    display: grid;
    gap: 0;
  }

  .nav-links a {
    padding: 16px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  .nav-links a::after {
    display: none;
  }

  .nav-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    margin-top: 18px;
  }

  .language-switcher {
    grid-column: 1 / -1;
    justify-content: space-between;
    padding-left: 14px;
  }

  .language-switcher__label {
    display: inline;
  }

  .language-options button {
    min-width: 58px;
  }

  .nav-play {
    justify-content: center;
  }

  .nav-fullscreen {
    display: grid;
  }

  .hero-inner {
    width: min(calc(100% - 28px), var(--max-width));
    padding-top: 104px;
    padding-bottom: 78px;
  }

  .hero h1 > span {
    font-size: clamp(46px, 15vw, 70px);
  }

  .hero h1 small {
    font-size: clamp(23px, 7.5vw, 34px);
  }

  .hero-actions {
    width: 100%;
    align-items: stretch;
    flex-direction: column;
  }

  .button {
    width: 100%;
  }

  .hero-facts {
    width: 100%;
    gap: 0;
    justify-content: space-between;
    margin-top: 30px;
  }

  .hero-facts li {
    min-width: 0;
  }

  .hero-facts span {
    font-size: 10px;
  }

  .board-demo {
    padding: 12px;
  }

  .link-toast {
    right: -4px;
    bottom: 76px;
    min-width: 205px;
  }

  .rules,
  .modes {
    padding: 88px 24px 96px;
  }

  .rules-heading h2,
  .section-heading h2 {
    font-size: clamp(34px, 10vw, 48px);
  }

  .rules-panel {
    margin-top: 38px;
  }

  .rule-stack {
    grid-template-columns: 1fr;
  }

  .rule-card {
    min-height: 0;
  }

  .mode-grid {
    margin-top: 38px;
  }

  .mode-card {
    min-height: 300px;
    padding: 26px 24px 68px;
  }

  .mode-card small {
    left: 24px;
    right: 24px;
  }

  .final-cta {
    padding: 94px 24px 102px;
  }

  .cta-board {
    width: 220px;
    height: 220px;
  }

  .final-cta h2 {
    font-size: clamp(42px, 13vw, 62px);
  }

  .site-footer {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 38px 24px 30px;
  }

  .footer-links {
    flex-wrap: wrap;
  }
}

@media (max-width: 540px) {
  .brand-type small {
    display: none;
  }

  .board-demo__body {
    grid-template-columns: 1fr;
  }

  .candidate-rail {
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
  }

  .candidate-stack {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .board-demo__actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .link-toast {
    left: 18px;
    right: 18px;
    bottom: 58px;
    min-width: 0;
  }

  .hotspot {
    min-height: 24px;
    padding: 4px 6px 4px 4px;
    font-size: 8px;
  }

  .hotspot span {
    width: 16px;
    height: 16px;
    font-size: 8px;
  }

  .hotspot-candidates {
    left: 42%;
  }

  .hotspot-match {
    left: 8%;
  }

  .hotspot-reward {
    left: 39%;
  }

  .rule-card {
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 12px;
    padding: 20px 18px;
  }

  .rule-card h3 {
    font-size: 21px;
  }

  .hero-facts strong {
    font-size: 13px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }

  .reveal,
  .has-js .reveal {
    opacity: 1;
    transform: none;
  }
}
