:root {
  color-scheme: dark;
  --ink: #fff9ff;
  --muted: #d8cbe6;
  --subtle: #a89bb8;
  --panel: rgba(44, 21, 68, .78);
  --panel-strong: #2f1748;
  --edge: rgba(255, 255, 255, .13);
  --accent: #ff4f8f;
  --accent-2: #a154ff;
  --gold: #ffd66b;
  --ok: #5be3b2;
  --bg: #10071e;
  --shadow: 0 24px 80px rgba(0, 0, 0, .34);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 7%, rgba(161, 84, 255, .24), transparent 28rem),
    radial-gradient(circle at 94% 18%, rgba(255, 79, 143, .19), transparent 30rem),
    linear-gradient(155deg, #0f071c 0%, #180b2c 48%, #0e0719 100%);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Tahoma, Arial, sans-serif;
  line-height: 1.72;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: .36;
  background-image:
    linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
  background-size: 36px 36px;
  mask-image: linear-gradient(to bottom, black, transparent 84%);
}

a { color: inherit; }

.shell {
  width: min(1120px, calc(100% - 32px));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(16, 7, 30, .82);
  border-bottom: 1px solid var(--edge);
  backdrop-filter: blur(18px);
}

.nav {
  min-height: 72px;
  display: flex;
  align-items: center;
  gap: 18px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-inline-end: auto;
  text-decoration: none;
  font-weight: 850;
  letter-spacing: -.02em;
}

.brand img {
  width: 40px;
  height: 40px;
  filter: drop-shadow(0 8px 14px rgba(255,79,143,.24));
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-links a,
.language-button {
  border: 1px solid transparent;
  border-radius: 12px;
  padding: 9px 12px;
  color: var(--muted);
  background: transparent;
  text-decoration: none;
  font: inherit;
  font-size: .92rem;
  cursor: pointer;
}

.nav-links a:hover,
.nav-links a:focus-visible,
.language-button:hover,
.language-button:focus-visible {
  color: white;
  border-color: var(--edge);
  background: rgba(255,255,255,.055);
  outline: none;
}

.language-button {
  color: white;
  border-color: rgba(255, 214, 107, .32);
  background: rgba(255, 214, 107, .08);
}

main { padding: 60px 0 76px; }

.hero {
  display: grid;
  grid-template-columns: 1.18fr .82fr;
  gap: 34px;
  align-items: center;
  min-height: 510px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  color: var(--gold);
  font-size: .86rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 22px rgba(255,214,107,.75);
}

h1, h2, h3 { line-height: 1.18; margin-top: 0; }

h1 {
  margin-bottom: 20px;
  font-size: clamp(2.55rem, 7vw, 5.4rem);
  letter-spacing: -.055em;
  max-width: 780px;
}

.gradient-text {
  background: linear-gradient(100deg, #fff 3%, #ffd9e8 45%, #d5b6ff 92%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero p {
  max-width: 650px;
  color: var(--muted);
  font-size: clamp(1rem, 2vw, 1.2rem);
}

.hero-art {
  position: relative;
  aspect-ratio: 1 / 1;
  display: grid;
  place-items: center;
}

.board {
  width: min(390px, 88%);
  aspect-ratio: 1;
  border-radius: 34px;
  border: 1px solid rgba(255,255,255,.17);
  background:
    linear-gradient(135deg, rgba(255,255,255,.12), transparent 44%),
    linear-gradient(145deg, #6e256f, #3d1c61 58%, #231039);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255,255,255,.16);
  transform: rotate(7deg);
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  padding: 24px;
}

.home-cell {
  border-radius: 24px;
  border: 1px solid rgba(255,255,255,.16);
  display: grid;
  place-items: center;
  box-shadow: inset 0 8px 26px rgba(0,0,0,.18);
}

.home-cell span {
  width: 44%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: rgba(255,255,255,.84);
  box-shadow: 0 10px 24px rgba(0,0,0,.26);
}

.home-cell:nth-child(1) { background: linear-gradient(145deg,#ff4d7f,#b82255); }
.home-cell:nth-child(2) { background: linear-gradient(145deg,#46dd9d,#118258); }
.home-cell:nth-child(3) { background: linear-gradient(145deg,#ffd15e,#d58d0b); }
.home-cell:nth-child(4) { background: linear-gradient(145deg,#63aaff,#275ccb); }

.dice-mark {
  position: absolute;
  width: 92px;
  aspect-ratio: 1;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  padding: 18px;
  border-radius: 24px;
  background: linear-gradient(150deg, #fff, #eadff6);
  box-shadow: 0 20px 48px rgba(0,0,0,.42);
  transform: translate(-12%, 8%) rotate(-11deg);
}

.dice-mark i { border-radius: 50%; background: #6e2a95; }

.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 22px;
}

.card,
.legal-card,
.notice {
  border: 1px solid var(--edge);
  background: linear-gradient(145deg, rgba(55,26,84,.83), rgba(35,16,57,.82));
  box-shadow: 0 18px 54px rgba(0,0,0,.2), inset 0 1px 0 rgba(255,255,255,.06);
}

.card {
  min-height: 230px;
  padding: 28px;
  border-radius: 24px;
  text-decoration: none;
  transition: transform .18s ease, border-color .18s ease, background .18s ease;
}

.card:hover,
.card:focus-visible {
  transform: translateY(-5px);
  border-color: rgba(255,214,107,.42);
  background: linear-gradient(145deg, rgba(70,31,103,.9), rgba(42,19,68,.88));
  outline: none;
}

.card-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  margin-bottom: 30px;
  border-radius: 15px;
  color: #241234;
  background: linear-gradient(145deg, #ffe18a, #ffab4f);
  font-weight: 950;
  font-size: 1.1rem;
}

.card h2 { margin-bottom: 9px; font-size: 1.25rem; }
.card p { margin: 0; color: var(--muted); font-size: .98rem; }

.page-head {
  max-width: 810px;
  margin: 12px auto 34px;
  text-align: center;
}

.page-head h1 { margin-inline: auto; font-size: clamp(2.25rem, 6vw, 4.35rem); }
.page-head p { color: var(--muted); font-size: 1.08rem; }

.legal-layout {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.toc {
  position: sticky;
  top: 98px;
  padding: 20px;
  border: 1px solid var(--edge);
  border-radius: 20px;
  background: rgba(37,17,59,.72);
}

.toc strong { display: block; margin-bottom: 11px; }
.toc a { display: block; padding: 7px 0; color: var(--muted); text-decoration: none; font-size: .92rem; }
.toc a:hover { color: white; }

.legal-card {
  padding: clamp(24px, 4.5vw, 50px);
  border-radius: 28px;
}

.legal-card h2 {
  margin-top: 42px;
  margin-bottom: 12px;
  font-size: clamp(1.35rem, 3vw, 1.8rem);
}

.legal-card h2:first-child { margin-top: 0; }
.legal-card h3 { margin: 28px 0 7px; }
.legal-card p, .legal-card li { color: var(--muted); }
.legal-card li + li { margin-top: 8px; }
.legal-card a { color: #ffd6e5; text-underline-offset: 3px; }
.legal-card strong { color: white; }

.meta-line {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 18px;
  color: var(--subtle);
  font-size: .9rem;
}

.pill {
  padding: 7px 11px;
  border-radius: 999px;
  border: 1px solid var(--edge);
  background: rgba(255,255,255,.04);
}

.notice {
  margin: 22px 0;
  padding: 18px 20px;
  border-inline-start: 4px solid var(--gold);
  border-radius: 16px;
}

.notice.ok { border-inline-start-color: var(--ok); }
.notice p { margin: 0; }

.steps {
  list-style: none;
  padding: 0;
  counter-reset: steps;
}

.steps li {
  counter-increment: steps;
  position: relative;
  padding: 3px 52px 18px 0;
}

[dir="ltr"] .steps li { padding: 3px 0 18px 52px; }

.steps li::before {
  content: counter(steps);
  position: absolute;
  inset-inline-start: 0;
  top: 0;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: linear-gradient(145deg, var(--accent), var(--accent-2));
  color: white;
  font-weight: 900;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 11px 18px;
  border-radius: 14px;
  text-decoration: none;
  font-weight: 800;
  background: linear-gradient(135deg, var(--accent), #b443e7);
  box-shadow: 0 12px 28px rgba(213,48,137,.26);
}

.button.secondary {
  color: var(--muted);
  background: rgba(255,255,255,.055);
  border: 1px solid var(--edge);
  box-shadow: none;
}

.site-footer {
  border-top: 1px solid var(--edge);
  color: var(--subtle);
}

.footer-inner {
  min-height: 108px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.footer-links { display: flex; gap: 16px; flex-wrap: wrap; }
.footer-links a { color: var(--muted); text-decoration: none; }
.footer-links a:hover { color: white; }

[hidden] { display: none !important; }

@media (max-width: 840px) {
  .nav { flex-wrap: wrap; padding: 12px 0; }
  .nav-links { order: 3; width: 100%; overflow-x: auto; padding-bottom: 2px; }
  .nav-links a { white-space: nowrap; }
  .hero { grid-template-columns: 1fr; min-height: auto; }
  .hero-art { order: -1; max-width: 420px; margin: 0 auto; width: 100%; }
  .cards { grid-template-columns: 1fr; }
  .card { min-height: auto; }
  .legal-layout { grid-template-columns: 1fr; }
  .toc { position: static; }
}

@media (max-width: 520px) {
  .shell { width: min(100% - 22px, 1120px); }
  main { padding-top: 34px; }
  .brand span { font-size: .96rem; }
  .language-button { padding-inline: 10px; }
  .hero { gap: 18px; }
  .board { border-radius: 26px; padding: 17px; gap: 11px; }
  .home-cell { border-radius: 17px; }
  .dice-mark { width: 76px; border-radius: 19px; padding: 15px; gap: 9px; }
  .legal-card { border-radius: 22px; }
  .footer-inner { align-items: flex-start; flex-direction: column; justify-content: center; padding: 24px 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
