@font-face {
  font-family: 'Familjen Grotesk';
  src: url('/assets/fonts/familjen-grotesk-var.woff2') format('woff2-variations');
  font-weight: 400 700;
  font-style: normal;
  font-display: optional;
}

@font-face {
  font-family: 'Instrument Sans';
  src: url('/assets/fonts/instrument-sans-var.woff2') format('woff2-variations');
  font-weight: 400 600;
  font-style: normal;
  font-display: optional;
}

:root {
  --ink: #14181c;
  --ink-2: #545c65;
  --ink-3: #656d76;
  --paper: #f1f2ef;
  --paper-2: #e6e8e3;
  --surface: #fff;
  --line: rgba(20, 24, 28, .13);
  --line-soft: rgba(20, 24, 28, .07);
  --accent: #d81e5b;
  --accent-deep: #a81346;
  --accent-wash: rgba(216, 30, 91, .09);
  --r-card: 16px;
  --r-input: 12px;
  --r-pill: 999px;
  --ease: cubic-bezier(.23, 1, .32, 1);
  --shell: 1240px;
  --header-offset: 118px;
  --font-display: 'Familjen Grotesk', 'Segoe UI', system-ui, sans-serif;
  --font-body: 'Instrument Sans', 'Segoe UI', system-ui, sans-serif;
}

* { box-sizing: border-box; }

html {
  overflow-x: clip;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-offset) + 16px);
  color-scheme: light;
}

body {
  margin: 0;
  overflow-x: clip;
  width: 100%;
  max-width: 100%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

main { flex: 1; }

img, svg, video { display: block; max-width: 100%; }
figure { margin: 0; }
[hidden] { display: none !important; }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -.02em;
  margin: 0;
  overflow-wrap: break-word;
  word-break: break-word;
}

p { margin: 0; overflow-wrap: break-word; }

a {
  color: inherit;
  text-decoration: none;
  overflow-wrap: break-word;
  word-break: break-word;
}

button, input, select, textarea { font: inherit; color: inherit; }

button, a, summary, label, .btn {
  -webkit-tap-highlight-color: transparent;
  -webkit-user-select: none;
  user-select: none;
  touch-action: manipulation;
}

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.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;
}

.shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: 24px;
}

.lede {
  font-size: 18px;
  color: var(--ink-2);
  max-width: 62ch;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 1px solid transparent;
  border-radius: var(--r-pill);
  padding: 13px 26px;
  font-weight: 600;
  font-size: 15px;
  white-space: nowrap;
  cursor: pointer;
  transition: transform .16s var(--ease), background-color .2s var(--ease), border-color .2s var(--ease), color .2s var(--ease);
}

.btn--primary { background: var(--accent); color: #fff; }
.btn--primary:hover { background: var(--accent-deep); }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn--ghost:hover { border-color: var(--ink); }
.btn:active { transform: scale(.97); }

.btn__dot {
  width: 26px;
  height: 26px;
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, .2);
  display: grid;
  place-items: center;
  transition: transform .25s var(--ease);
}

.btn__dot svg { width: 13px; height: 13px; fill: currentColor; }
.btn:hover .btn__dot { transform: translate(2px, -1px); }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(241, 242, 239, .88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
  overflow: visible;
}

.site-header__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-block: 14px;
}

.brand { display: flex; align-items: center; gap: 11px; }
.brand svg { width: 34px; height: 34px; flex-shrink: 0; }

.brand__name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 19px;
  letter-spacing: -.02em;
  line-height: 1.05;
}

.brand__name span { display: block; font-size: 10px; font-weight: 500; letter-spacing: .18em; text-transform: uppercase; color: var(--ink-3); font-family: var(--font-body); }

.nav { display: flex; align-items: center; gap: 26px; }

.nav a {
  font-size: 15px;
  font-weight: 500;
  color: var(--ink-2);
  position: relative;
  padding-block: 4px;
  transition: color .2s var(--ease);
}

.nav a::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .3s var(--ease);
}

.nav a:hover { color: var(--ink); }
.nav a:hover::after, .nav a.is-active::after { transform: scaleX(1); }
.nav a.is-active { color: var(--ink); }

.burger {
  display: none;
  width: 44px;
  height: 44px;
  position: relative;
  z-index: 110;
  flex-shrink: 0;
  border-radius: var(--r-input);
  background: rgba(20, 24, 28, .05);
  border: 1px solid var(--line);
  cursor: pointer;
}

.burger span {
  position: absolute;
  left: 12px;
  right: 12px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform .3s var(--ease), opacity .2s var(--ease), top .3s var(--ease);
}

.burger span:nth-child(1) { top: 15px; }
.burger span:nth-child(2) { top: 21px; }
.burger span:nth-child(3) { top: 27px; }
.burger[aria-expanded="true"] span:nth-child(1) { top: 21px; transform: rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { top: 21px; transform: rotate(-45deg); }

/* Header second row: age marker + geo switcher */
.site-header__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 12px;
  flex-wrap: wrap;
}

.header-marks { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.mark {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border-radius: var(--r-pill);
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 5px 13px 5px 6px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-2);
}

.mark__age {
  display: inline-grid;
  place-items: center;
  min-width: 30px;
  height: 22px;
  padding-inline: 6px;
  border-radius: var(--r-pill);
  background: var(--ink);
  color: #fff;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .01em;
}

.mark--free { padding-left: 13px; color: var(--accent-deep); border-color: var(--accent-wash); background: var(--accent-wash); }

/* Geo switcher */
.geo { position: relative; }

.geo__toggle {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  border-radius: var(--r-pill);
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 5px 14px 5px 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color .2s var(--ease);
}

.geo__toggle:hover { border-color: var(--ink); }
.geo__flag { width: 26px; height: 19px; border-radius: 4px; object-fit: cover; box-shadow: 0 0 0 1px var(--line-soft); }
.geo__caret { width: 10px; height: 10px; fill: var(--ink-3); transition: transform .25s var(--ease); }
.geo__toggle[aria-expanded="true"] .geo__caret { transform: rotate(180deg); }

.geo__menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 70;
  min-width: 216px;
  padding: 6px;
  border-radius: var(--r-card);
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: 0 18px 44px rgba(20, 24, 28, .14);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px) scale(.97);
  transform-origin: top right;
  transition: opacity .18s var(--ease), transform .18s var(--ease), visibility 0s linear .18s;
}

.geo__menu[data-open="true"] {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
  transition: opacity .18s var(--ease), transform .18s var(--ease), visibility 0s linear 0s;
}

.geo__item {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  padding: 9px 11px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-2);
  transition: background-color .18s var(--ease), color .18s var(--ease);
}

.geo__item:hover { background: var(--paper); color: var(--ink); }
.geo__item[aria-current="true"] { color: var(--ink); font-weight: 600; }
.geo__item small { margin-left: auto; font-size: 11.5px; color: var(--ink-3); font-weight: 600; }

/* Hero */
.gw-hero {
  position: relative;
  padding-block: 72px 84px;
  background-image: url('/assets/img/hero/hero-bg.avif');
  background-size: cover;
  background-position: 68% center;
  background-repeat: no-repeat;
  border-bottom: 1px solid var(--line);
}

.gw-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, rgba(241, 242, 239, .97) 0%, rgba(241, 242, 239, .93) 38%, rgba(241, 242, 239, .3) 68%, rgba(241, 242, 239, 0) 100%);
}

.gw-hero .shell { position: relative; }
.gw-hero__inner { max-width: 620px; }

.gw-hero h1 {
  font-size: clamp(38px, 6.2vw, 66px);
  margin-bottom: 20px;
}

.gw-hero h1 em { font-style: normal; color: var(--accent); }

.gw-hero__sub { font-size: clamp(16px, 2vw, 19px); color: var(--ink-2); max-width: 46ch; }

.gw-hero__cta { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 30px; }

.gw-hero__note {
  margin-top: 18px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink-2);
  letter-spacing: .01em;
}

/* Lobby */
.gw-lobby { padding-block: 76px; }

.gw-lobby__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 34px;
}

.gw-lobby__head h2 { font-size: clamp(30px, 4vw, 44px); }
.gw-lobby__count { font-size: 14px; color: var(--ink-3); font-weight: 600; }

.gw-lobby__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.game-card {
  position: relative;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  background: var(--surface);
  overflow: hidden;
  cursor: pointer;
  text-align: left;
  padding: 0;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .25s var(--ease);
}

.game-card:hover {
  transform: translateY(-4px);
  border-color: rgba(20, 24, 28, .24);
  box-shadow: 0 20px 44px rgba(20, 24, 28, .13);
}

.game-card:active { transform: translateY(-1px) scale(.995); }

.game-card__shot { position: relative; aspect-ratio: 16 / 9; background: var(--paper-2); }
.game-card__shot img { width: 100%; height: 100%; object-fit: cover; }

.game-card__badge {
  position: absolute;
  top: 12px;
  left: 12px;
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, .94);
  color: var(--accent-deep);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: 6px 12px;
}

.game-card__body { padding: 20px 22px 22px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.game-card__body h3 { font-size: 21px; }
.game-card__meta { font-size: 13px; color: var(--ink-3); font-weight: 600; letter-spacing: .02em; }
.game-card__text { font-size: 14.5px; color: var(--ink-2); }

.game-card__play {
  margin-top: auto;
  align-self: flex-start;
  padding: 16px 0 0;
  border: 0;
  background: none;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
  cursor: pointer;
}

.game-card__play svg { width: 14px; height: 14px; fill: currentColor; transition: transform .25s var(--ease); }
.game-card:hover .game-card__play svg { transform: translateX(3px); }

/* Basics: what this platform is */
.gw-basics { padding-block: 76px; background: var(--surface); border-block: 1px solid var(--line); }

.gw-basics__grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 54px;
  align-items: start;
}

.gw-basics h2 { font-size: clamp(30px, 4vw, 44px); margin-bottom: 18px; }

.gw-basics__list { display: flex; flex-direction: column; gap: 4px; margin: 0; padding: 0; list-style: none; }

.gw-basics__list li {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  padding-block: 20px;
  border-top: 1px solid var(--line-soft);
}

.gw-basics__list li:first-child { border-top: 0; padding-top: 0; }

.gw-basics__icon {
  width: 44px;
  height: 44px;
  border-radius: var(--r-input);
  display: grid;
  place-items: center;
  background: var(--accent-wash);
}

.gw-basics__icon svg { width: 21px; height: 21px; fill: var(--accent-deep); }
.gw-basics__list h3 { font-size: 18px; margin-bottom: 5px; }
.gw-basics__list p { font-size: 15px; color: var(--ink-2); }

/* No-cash statement */
.gw-nocash { padding-block: 82px; background: var(--ink); color: #fff; }
.gw-nocash h2 { font-size: clamp(30px, 4.4vw, 48px); max-width: 20ch; margin-bottom: 18px; }
.gw-nocash p { color: rgba(255, 255, 255, .72); max-width: 60ch; font-size: 17px; }

.gw-nocash__row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  margin-top: 46px;
  border-top: 1px solid rgba(255, 255, 255, .16);
}

.gw-nocash__cell { padding: 26px 24px 8px 0; }
.gw-nocash__cell + .gw-nocash__cell { padding-left: 24px; border-left: 1px solid rgba(255, 255, 255, .16); }

.gw-nocash__cell strong {
  display: block;
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -.02em;
  margin-bottom: 7px;
}

.gw-nocash__cell span { font-size: 14.5px; color: rgba(255, 255, 255, .66); }

/* FAQ */
.gw-faq { padding-block: 76px; }
.gw-faq h2 { font-size: clamp(30px, 4vw, 44px); margin-bottom: 30px; }

.faq-item {
  border-bottom: 1px solid var(--line);
  background: none;
}

.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-block: 22px;
  cursor: pointer;
  font-family: var(--font-display);
  font-size: clamp(17px, 2.2vw, 21px);
  font-weight: 700;
  letter-spacing: -.01em;
  list-style: none;
}

.faq-item summary::-webkit-details-marker { display: none; }

.faq-item__sign {
  position: relative;
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  border-radius: var(--r-pill);
  border: 1px solid var(--line);
  transition: background-color .25s var(--ease), border-color .25s var(--ease), transform .3s var(--ease);
}

.faq-item__sign::before,
.faq-item__sign::after {
  content: '';
  position: absolute;
  inset: 50% 8px auto;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transform: translateY(-50%);
  transition: transform .3s var(--ease), background-color .25s var(--ease);
}

.faq-item__sign::after { transform: translateY(-50%) rotate(90deg); }
.faq-item.is-open .faq-item__sign { background: var(--accent); border-color: var(--accent); }
.faq-item.is-open .faq-item__sign::before,
.faq-item.is-open .faq-item__sign::after { background: #fff; }
.faq-item.is-open .faq-item__sign::after { transform: translateY(-50%) rotate(0deg); }

.faq-item__body { overflow: hidden; }
.faq-item__body p { padding-bottom: 24px; color: var(--ink-2); max-width: 78ch; }

/* Safe play band */
.gw-safeplay { padding-block: 72px; background: var(--surface); border-top: 1px solid var(--line); }

.gw-safeplay__grid {
  display: grid;
  grid-template-columns: minmax(0, 6fr) minmax(0, 6fr);
  gap: 48px;
  align-items: center;
}

.gw-safeplay h2 { font-size: clamp(28px, 3.6vw, 38px); margin-bottom: 16px; }
.gw-safeplay p { color: var(--ink-2); }
.gw-safeplay__link { display: inline-flex; align-items: center; gap: 8px; margin-top: 20px; font-weight: 600; color: var(--accent); }
.gw-safeplay__link svg { width: 13px; height: 13px; fill: currentColor; }

.rg-band { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }

.rg-band__item {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 78px;
  flex: 0 1 auto;
  padding: 16px 24px;
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  background: var(--surface);
  transition: border-color .2s var(--ease), transform .2s var(--ease);
}

.rg-band__item:hover { border-color: var(--ink); transform: translateY(-2px); }
.rg-band__item:active { transform: none; }

.rg-band__logo {
  width: auto;
  height: auto;
  max-width: 146px;
  max-height: 38px;
  filter: grayscale(1) brightness(0);
  opacity: .66;
  transition: opacity .2s var(--ease);
}

.rg-band__wordmark {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -.02em;
  line-height: 1.1;
  color: var(--ink-2);
  transition: color .2s var(--ease);
}

.rg-band__item:hover .rg-band__logo { opacity: 1; }
.rg-band__item:hover .rg-band__wordmark { color: var(--ink); }

/* Document pages */
.doc-hero { padding-block: 58px 34px; border-bottom: 1px solid var(--line); }
.doc-hero h1 { font-size: clamp(34px, 5vw, 52px); margin-bottom: 14px; }
.doc-hero p { color: var(--ink-2); max-width: 68ch; }
.doc-hero__meta { margin-top: 18px; font-size: 13px; color: var(--ink-3); font-weight: 600; }

.doc-body { padding-block: 46px 78px; }
.doc-body h2 { font-size: clamp(22px, 3vw, 28px); margin: 44px 0 14px; }
.doc-body h2:first-of-type { margin-top: 0; }
.doc-body h3 { font-size: 18px; margin: 26px 0 10px; }
.doc-body p { margin-bottom: 16px; color: var(--ink-2); }
.doc-body ul { margin: 0 0 20px; padding-left: 22px; color: var(--ink-2); }
.doc-body li { margin-bottom: 9px; }
.doc-body strong { color: var(--ink); font-weight: 600; }
.doc-body a { color: var(--accent-deep); font-weight: 500; text-decoration: underline; text-underline-offset: 3px; }

.doc-contact { line-height: 1.9; }

.doc-callout {
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  background: var(--surface);
  padding: 22px 24px;
  margin: 26px 0 30px;
}

.doc-callout p:last-child { margin-bottom: 0; }

.x-wrap { overflow-x: auto; }

/* Footer */
.site-footer { background: var(--ink); color: rgba(255, 255, 255, .7); padding-block: 58px 34px; }

.site-footer__grid {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 3fr) minmax(0, 3fr);
  gap: 44px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255, 255, 255, .14);
}

.site-footer .brand__name { color: #fff; }
.site-footer .brand__name span { color: rgba(255, 255, 255, .5); }
.site-footer__about { margin-top: 18px; font-size: 14.5px; max-width: 42ch; }

.site-footer__org { margin-top: 16px; font-size: 13.5px; line-height: 1.75; color: rgba(255, 255, 255, .56); }
.site-footer__org a { color: rgba(255, 255, 255, .82); text-decoration: underline; text-underline-offset: 3px; }

.site-footer h2 { font-size: 13px; letter-spacing: .16em; text-transform: uppercase; color: rgba(255, 255, 255, .52); font-family: var(--font-body); font-weight: 600; margin-bottom: 16px; }

.site-footer__links { display: flex; flex-direction: column; gap: 11px; font-size: 15px; }
.site-footer__links a { color: rgba(255, 255, 255, .82); transition: color .2s var(--ease); }
.site-footer__links a:hover { color: #fff; }

.footer-rg { display: flex; flex-direction: column; gap: 12px; }

.footer-rg__item { display: flex; align-items: center; gap: 11px; font-size: 14px; color: rgba(255, 255, 255, .82); transition: color .2s var(--ease); }
.footer-rg__item:hover { color: #fff; }
.footer-rg__item svg { width: 26px; height: 26px; flex-shrink: 0; fill: rgba(255, 255, 255, .88); }
.footer-rg__name { display: block; font-weight: 500; }
.footer-rg__url { display: block; font-size: 12px; color: rgba(255, 255, 255, .5); }

.footer-age {
  display: inline-flex;
  align-self: flex-start;
  width: max-content;
  max-width: 100%;
  align-items: center;
  gap: 10px;
  margin-top: 4px;
  padding: 7px 15px 7px 7px;
  border-radius: var(--r-pill);
  border: 1px solid rgba(255, 255, 255, .2);
  font-size: 13px;
  font-weight: 600;
  color: #fff;
}

.footer-age b {
  display: inline-grid;
  place-items: center;
  min-width: 32px;
  height: 24px;
  padding-inline: 7px;
  border-radius: var(--r-pill);
  background: #fff;
  color: var(--ink);
  font-size: 12px;
}

.site-footer__disclaimer {
  margin-top: 32px;
  font-family: var(--font-display);
  font-size: clamp(17px, 2.4vw, 22px);
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -.01em;
  color: #fff;
  max-width: 74ch;
}

.site-footer__fine { margin-top: 18px; font-size: 13.5px; color: rgba(255, 255, 255, .55); max-width: 84ch; }

.site-footer__bottom {
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, .14);
  display: flex;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  font-size: 13.5px;
  color: rgba(255, 255, 255, .55);
}

/* Game modal */
.gw-modal {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(12, 15, 18, .72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  visibility: hidden;
  transition: opacity .25s var(--ease), visibility 0s linear .25s;
}

.gw-modal[data-open="true"] { opacity: 1; visibility: visible; transition: opacity .25s var(--ease), visibility 0s linear 0s; }

.gw-modal__panel {
  width: min(1180px, 100%);
  height: min(760px, calc(100dvh - 48px));
  max-height: calc(100dvh - 48px);
  display: flex;
  flex-direction: column;
  background: var(--ink);
  border-radius: var(--r-card);
  overflow: hidden;
  box-shadow: 0 16px 40px rgba(0, 0, 0, .34);
  transform: scale(.96);
  transition: transform .3s var(--ease);
}

.gw-modal[data-open="true"] .gw-modal__panel { transform: scale(1); }

.gw-modal__bar {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 13px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, .12);
  color: #fff;
}

.gw-modal__title { font-family: var(--font-display); font-weight: 700; font-size: 17px; letter-spacing: -.01em; }
.gw-modal__tag { font-size: 11.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: rgba(255, 255, 255, .55); }

.gw-modal__close {
  margin-left: auto;
  width: 38px;
  height: 38px;
  border-radius: var(--r-pill);
  border: 1px solid rgba(255, 255, 255, .2);
  background: transparent;
  color: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background-color .2s var(--ease), transform .16s var(--ease);
}

.gw-modal__close:hover { background: rgba(255, 255, 255, .12); }
.gw-modal__close:active { transform: scale(.94); }
.gw-modal__close svg { width: 15px; height: 15px; fill: currentColor; }

.gw-modal__stage { position: relative; flex: 1; min-height: 0; background: #000; }
.gw-modal__stage iframe { width: 100%; height: 100%; border: 0; display: block; }

.gw-modal__loading {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 14px;
  align-content: center;
  color: rgba(255, 255, 255, .7);
  font-size: 14px;
  background: var(--ink);
}

.gw-modal__spinner {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, .2);
  border-top-color: var(--accent);
  animation: gw-spin .7s linear infinite;
}

@keyframes gw-spin { to { transform: rotate(360deg); } }

.gw-modal__foot {
  padding: 11px 16px;
  font-size: 12.5px;
  color: rgba(255, 255, 255, .55);
  border-top: 1px solid rgba(255, 255, 255, .12);
  text-align: center;
}

/* Cookie bar */
.gw-cookie {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  padding: 18px 22px;
  border-radius: var(--r-card);
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: 0 22px 54px rgba(20, 24, 28, .18);
  max-width: 780px;
  margin-inline: auto;
  transform: translateY(140%);
  transition: transform .45s var(--ease);
}

.gw-cookie[data-open="true"] { transform: translateY(0); }
.gw-cookie p { font-size: 14px; color: var(--ink-2); flex: 1 1 320px; }
.gw-cookie a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.gw-cookie__actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* About page */
.about-lead { padding-block: 58px 34px; border-bottom: 1px solid var(--line); }
.about-lead h1 { font-size: clamp(34px, 5vw, 54px); margin-bottom: 16px; max-width: 18ch; }
.about-lead p { color: var(--ink-2); max-width: 68ch; font-size: 18px; }

.about-story { padding-block: 64px; }
.about-story__grid { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 48px; align-items: start; }
.about-story h2 { font-size: clamp(26px, 3.4vw, 36px); }
.about-story p { color: var(--ink-2); margin-bottom: 16px; }
.about-story p:last-child { margin-bottom: 0; }

.about-story__figure {
  margin-top: 26px;
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  overflow: hidden;
  background: var(--paper-2);
}

.about-story__figure img { width: 100%; height: auto; }

.about-rules { padding-block: 64px; background: var(--surface); border-block: 1px solid var(--line); }
.about-rules h2 { font-size: clamp(26px, 3.4vw, 36px); margin-bottom: 30px; }
.about-rules__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; border-top: 1px solid var(--line-soft); }
.about-rules__cell { padding: 26px 28px 26px 0; border-bottom: 1px solid var(--line-soft); }
.about-rules__cell:nth-child(even) { padding-left: 28px; border-left: 1px solid var(--line-soft); }
.about-rules__cell h3 { font-size: 19px; margin-bottom: 8px; }
.about-rules__cell p { color: var(--ink-2); font-size: 15px; }

.about-titles { padding-block: 64px; }
.about-titles h2 { font-size: clamp(26px, 3.4vw, 36px); margin-bottom: 12px; }
.about-titles p { color: var(--ink-2); max-width: 70ch; margin-bottom: 26px; }
.about-titles__list { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 26px; padding: 0; list-style: none; }
.about-titles__list li {
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  background: var(--surface);
  padding: 9px 18px;
  font-weight: 600;
  font-size: 14.5px;
}

/* Contact page */
.contact-lead { padding-block: 58px 34px; border-bottom: 1px solid var(--line); }
.contact-lead h1 { font-size: clamp(34px, 5vw, 54px); margin-bottom: 16px; }
.contact-lead p { color: var(--ink-2); max-width: 66ch; font-size: 18px; }

.contact-main { padding-block: 56px 78px; }
.contact-main__grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 56px; align-items: start; }
.contact-main h2 { font-size: clamp(24px, 3vw, 30px); margin-bottom: 8px; }
.contact-main__hint { color: var(--ink-2); margin-bottom: 26px; }

.contact-form { display: grid; gap: 18px; }
.contact-form__row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.field > span { font-size: 13.5px; font-weight: 600; color: var(--ink-2); }

.field input,
.field textarea,
.field select {
  border: 1px solid var(--line);
  border-radius: var(--r-input);
  background: var(--surface);
  padding: 12px 14px;
  font-size: 15px;
  width: 100%;
  transition: border-color .2s var(--ease);
}

.field textarea { min-height: 148px; resize: none; }
.field input::placeholder, .field textarea::placeholder { color: var(--ink-3); }
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--accent); }
.field input:user-invalid, .field textarea:user-invalid { border-color: var(--accent-deep); }

.cselect { position: relative; }
.cselect select { appearance: none; -webkit-appearance: none; padding-right: 40px; cursor: pointer; }
.cselect svg { position: absolute; right: 14px; bottom: 16px; width: 11px; height: 11px; fill: var(--ink-3); pointer-events: none; }

.contact-form__note { font-size: 13px; color: var(--ink-3); }
.contact-form button { justify-self: start; }

.contact-aside { display: flex; flex-direction: column; gap: 14px; }

.contact-aside__card {
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  background: var(--surface);
  padding: 22px 24px;
}

.contact-aside__card h2 { font-size: 17px; margin-bottom: 8px; }
.contact-aside__card p { color: var(--ink-2); font-size: 14.5px; }
.contact-aside__card a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }

.contact-notes { padding-block: 62px 78px; background: var(--surface); border-top: 1px solid var(--line); }
.contact-notes__grid { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 48px; align-items: start; }
.contact-notes h2 { font-size: clamp(24px, 3vw, 32px); margin-bottom: 12px; }
.contact-notes p { color: var(--ink-2); margin-bottom: 16px; }
.contact-notes p:last-child { margin-bottom: 0; }
.contact-notes strong { color: var(--ink); font-weight: 600; }
.contact-notes a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }

/* Toast confirmation */
.gw-toast {
  position: fixed;
  inset: 0;
  z-index: 130;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(12, 15, 18, .5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: 0;
  visibility: hidden;
  transition: opacity .22s var(--ease), visibility 0s linear .22s;
}

.gw-toast[data-open="true"] { opacity: 1; visibility: visible; transition: opacity .22s var(--ease), visibility 0s linear 0s; }

.gw-toast__card {
  width: min(420px, 100%);
  background: var(--surface);
  border-radius: var(--r-card);
  padding: 32px 30px 28px;
  text-align: center;
  box-shadow: 0 14px 34px rgba(20, 24, 28, .2);
  transform: scale(.95);
  transition: transform .26s var(--ease);
}

.gw-toast[data-open="true"] .gw-toast__card { transform: scale(1); }

.gw-toast__mark {
  width: 54px;
  height: 54px;
  margin: 0 auto 18px;
  border-radius: var(--r-pill);
  background: var(--accent-wash);
  display: grid;
  place-items: center;
}

.gw-toast__mark svg { width: 26px; height: 26px; fill: var(--accent-deep); }
.gw-toast__card h2 { font-size: 23px; margin-bottom: 10px; }
.gw-toast__card p { color: var(--ink-2); font-size: 15px; margin-bottom: 22px; }

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }

/* Responsive */
@media (max-width: 1220px) {
  .burger { display: block; }

  .nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    width: 100%;
    max-width: 100vw;
    max-height: calc(100dvh - var(--header-offset, 118px));
    z-index: 50;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 12px 24px 26px;
    background: var(--paper);
    border-top: 1px solid var(--line);
    box-shadow: 0 20px 42px rgba(20, 24, 28, .16);
    overflow-y: auto;
    overscroll-behavior: contain;
    transform: translateY(-12px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: transform .3s var(--ease), opacity .25s var(--ease), visibility 0s linear .3s;
  }

  .nav[data-open="true"] {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transition: transform .3s var(--ease), opacity .25s var(--ease), visibility 0s linear 0s;
  }

  .nav a { width: 100%; padding: 15px 0; font-size: 19px; color: var(--ink); border-bottom: 1px solid var(--line-soft); }
  .nav a::after { display: none; }
}

@media (max-width: 1000px) {
  .gw-basics__grid { grid-template-columns: minmax(0, 1fr); gap: 34px; }
  .gw-safeplay__grid { grid-template-columns: minmax(0, 1fr); gap: 34px; }
  .site-footer__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 34px; }
  .gw-nocash__row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gw-nocash__cell:nth-child(3) { border-left: 0; padding-left: 0; }
  .gw-nocash__cell:nth-child(n+3) { border-top: 1px solid rgba(255, 255, 255, .16); margin-top: 8px; }
}

@media (max-width: 820px) {
  .gw-hero { padding-block: 54px 62px; background-position: 78% bottom; }
  .gw-hero::before { background: linear-gradient(180deg, rgba(241, 242, 239, .97) 0%, rgba(241, 242, 239, .92) 62%, rgba(241, 242, 239, .68) 100%); }
  .gw-lobby__grid { grid-template-columns: minmax(0, 1fr); }
  .gw-lobby, .gw-basics, .gw-faq, .gw-safeplay { padding-block: 56px; }
  .gw-nocash { padding-block: 60px; }
  .site-footer__grid { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 640px) {
  .site-header__top { padding-block: 11px; }
  .site-header__bar { gap: 10px; padding-bottom: 10px; }
  .brand svg { width: 30px; height: 30px; }
  .brand__name { font-size: 17px; }
  .gw-nocash__row { grid-template-columns: minmax(0, 1fr); }
  .gw-nocash__cell, .gw-nocash__cell + .gw-nocash__cell { padding: 20px 0 4px; border-left: 0; }
  .gw-nocash__cell + .gw-nocash__cell { border-top: 1px solid rgba(255, 255, 255, .16); margin-top: 0; }
  .gw-cookie { left: 10px; right: 10px; bottom: 10px; padding: 16px; }
  .gw-cookie__actions { width: 100%; }
  .gw-cookie__actions .btn { flex: 1; }
  .gw-modal { padding: 10px; }
  .gw-modal__panel { height: calc(100dvh - 20px); max-height: calc(100dvh - 20px); }
}

@media (max-width: 520px) {
  .shell { padding-inline: 16px; }
  .nav { padding-inline: 16px; }
  .gw-hero__cta { gap: 10px; }
  .gw-hero__cta .btn { flex: 1 1 100%; }
  .header-marks .mark--free { display: none; }
  .rg-band__item { flex: 1 1 100%; }
  .doc-body ul { padding-left: 18px; }
}

@media (max-width: 380px) {
  .brand__name span { display: none; }
  .geo__toggle { padding-right: 10px; }
}

@media (max-width: 1000px) {
  .about-story__grid { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .about-story__figure { max-width: 460px; }
  .contact-main__grid { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .contact-notes__grid { grid-template-columns: minmax(0, 1fr); gap: 24px; }
}

@media (max-width: 640px) {
  .about-rules__grid { grid-template-columns: minmax(0, 1fr); }
  .about-rules__cell, .about-rules__cell:nth-child(even) { padding: 22px 0; border-left: 0; }
  .contact-form__row { grid-template-columns: minmax(0, 1fr); }
  .contact-form button { justify-self: stretch; }
}

@media (hover: none) {
  .game-card:hover { transform: none; box-shadow: none; border-color: var(--line); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}
