:root {
  --felt-deep: #14291b;
  --felt: #1e3a27;
  --felt-light: #274a31;
  --wood-dark: #33220f;
  --wood: #533718;
  --wood-light: #79512a;
  --parchment: #efe2c4;
  --parchment-dim: #d9c39a;
  --stone: #c3baa7;
  --emerald: #74d76f;
  --emerald-deep: #3c9c46;
  --bronze: #c5842c;
  --gold: #edc370;
  --ink: #2b1d0f;
  --ink-soft: #4d3a22;
  --frost: #f5edda;
  --frost-dim: #cfc2a4;
  --danger: #d0523a;
  --panel-line: rgba(0, 0, 0, 0.35);
  --shadow-soft: 0 16px 34px rgba(0, 0, 0, 0.42);
  --radius-lg: 18px;
  --radius-md: 12px;
  --radius-sm: 8px;
  --focus-ring: 0 0 0 3px #edc370, 0 0 0 6px rgba(60, 156, 70, 0.7);
  --pad-shell: clamp(16px, 4vw, 48px);
  --head-font: "Trebuchet MS", "Segoe UI", system-ui, sans-serif;
  --mono-font: ui-monospace, "SFMono-Regular", "Consolas", "Courier New", monospace;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  color: var(--frost);
  background:
    radial-gradient(1200px 700px at 50% -12%, rgba(116, 215, 111, 0.12), transparent 60%),
    radial-gradient(900px 900px at 90% 110%, rgba(197, 132, 44, 0.1), transparent 60%),
    linear-gradient(180deg, #1b3524 0%, #14291b 60%, #10231a 100%);
  background-attachment: fixed;
  min-height: 100vh;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--gold); }

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

h1, h2, h3, h4 {
  font-family: var(--head-font);
  line-height: 1.14;
  margin: 0 0 0.5em;
  font-weight: 800;
  letter-spacing: 0.01em;
}

p { margin: 0 0 1em; }

:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
  border-radius: 6px;
}

.aurora-skip {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--gold);
  color: var(--ink);
  padding: 12px 18px;
  border-radius: 0 0 10px 0;
  font-weight: 800;
  z-index: 60;
}
.aurora-skip:focus { left: 0; }

.northern-arcade-shell {
  position: sticky;
  top: 0;
  z-index: 50;
  background:
    linear-gradient(180deg, #3d2913, #2c1d0d);
  border-bottom: 3px solid var(--wood-light);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45);
}

.northern-arcade-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 12px var(--pad-shell);
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

.sng-wordmark {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--head-font);
  font-weight: 800;
  font-size: 1.24rem;
  color: var(--parchment);
  text-decoration: none;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.4);
}

.sng-wordmark small {
  display: block;
  font-size: 0.6rem;
  letter-spacing: 0.28em;
  color: var(--emerald);
  font-weight: 700;
}

.sng-mark {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  object-fit: cover;
  border: 2px solid var(--wood-light);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.5);
  flex: none;
}

.aurora-nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.aurora-nav-link {
  color: var(--parchment-dim);
  text-decoration: none;
  padding: 9px 14px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  transition: background 0.18s ease, color 0.18s ease, transform 0.12s ease;
}

.aurora-nav-link:hover,
.aurora-nav-link[aria-current="page"] {
  background: rgba(237, 195, 112, 0.16);
  color: var(--gold);
}

.aurora-nav-toggle { display: none; }

.aurora-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  cursor: pointer;
  font: inherit;
  font-family: var(--head-font);
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 13px 24px;
  border-radius: 10px;
  color: #3a2408;
  background: linear-gradient(180deg, #f0c368, #d79733);
  border-bottom: 3px solid #a9701f;
  text-decoration: none;
  transition: transform 0.14s ease, box-shadow 0.2s ease, filter 0.2s ease;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
}

.aurora-action:hover {
  transform: translateY(-2px);
  filter: brightness(1.06);
  box-shadow: 0 12px 26px rgba(237, 195, 112, 0.3);
}
.aurora-action:active { transform: translateY(1px); border-bottom-width: 2px; }

.aurora-action--ghost {
  background: linear-gradient(180deg, #5e4022, #45301a);
  color: var(--parchment);
  border-bottom: 3px solid #2c1d0d;
}
.aurora-action--ghost:hover { filter: brightness(1.12); }

.aurora-action--small { padding: 9px 16px; font-size: 0.82rem; }

.mapleplay-stage {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--pad-shell);
}

.mapleplay-hero {
  padding: clamp(44px, 8vw, 92px) 0 clamp(30px, 5vw, 52px);
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(28px, 5vw, 56px);
  align-items: center;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--head-font);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink);
  background: linear-gradient(180deg, var(--parchment), var(--parchment-dim));
  padding: 7px 16px;
  border-radius: 6px;
  border: 2px solid var(--wood-light);
  box-shadow: 0 3px 0 rgba(0, 0, 0, 0.25);
}

.hero-title {
  font-size: clamp(2.1rem, 5.2vw, 3.6rem);
  margin-top: 18px;
  color: var(--parchment);
  text-shadow: 0 3px 0 rgba(0, 0, 0, 0.35), 0 0 26px rgba(116, 215, 111, 0.18);
  text-transform: uppercase;
  letter-spacing: 0.01em;
}
.hero-title span { color: var(--gold); }

.hero-lede {
  font-size: clamp(1.02rem, 2vw, 1.18rem);
  color: var(--frost-dim);
  max-width: 48ch;
}

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin: 26px 0 30px;
}

.skillforge-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.skillforge-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.83rem;
  font-weight: 700;
  color: var(--parchment);
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid var(--wood-light);
  padding: 8px 14px;
  border-radius: 999px;
}
.skillforge-badge::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--emerald);
  box-shadow: 0 0 10px var(--emerald);
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 8px 16px 8px 8px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid var(--wood-light);
  margin-bottom: 4px;
}
.hero-badge img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--gold);
  flex: none;
}
.hero-badge b {
  font-family: var(--head-font);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--parchment);
  font-size: 0.92rem;
}
.hero-badge span {
  display: block;
  font-size: 0.66rem;
  letter-spacing: 0.22em;
  color: var(--emerald);
  font-weight: 700;
}

.hero-visual {
  position: relative;
  display: grid;
  place-items: center;
  padding: 10px;
}

.hero-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  width: min(100%, 440px);
}
.hero-tile {
  position: relative;
  aspect-ratio: 960 / 523;
  border-radius: 14px;
  overflow: hidden;
  border: 3px solid var(--wood-light);
  box-shadow: var(--shadow-soft);
  transition: transform 0.35s ease, box-shadow 0.35s ease;
  text-decoration: none;
}
.hero-tile img { width: 100%; height: 100%; object-fit: cover; }
.hero-tile::after {
  content: attr(data-label);
  position: absolute;
  left: 8px;
  bottom: 8px;
  font-family: var(--head-font);
  font-weight: 800;
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink);
  background: linear-gradient(180deg, var(--gold), var(--bronze));
  padding: 3px 8px;
  border-radius: 5px;
}
.hero-tile:nth-child(1) { transform: rotate(-3deg); }
.hero-tile:nth-child(2) { transform: rotate(2.5deg); }
.hero-tile:nth-child(3) { transform: rotate(2deg); }
.hero-tile:nth-child(4) { transform: rotate(-2.5deg); }
.hero-tile:hover {
  transform: rotate(0) scale(1.06);
  box-shadow: var(--shadow-soft), 0 0 30px rgba(116, 215, 111, 0.3);
  z-index: 2;
}

.arcade-card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  background:
    linear-gradient(180deg, rgba(239, 226, 196, 0.06), rgba(0, 0, 0, 0.14)),
    var(--felt-light);
  border: 2px solid var(--wood-light);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  transition: transform 0.2s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.arcade-card:hover {
  transform: translateY(-6px);
  border-color: var(--gold);
  box-shadow: var(--shadow-soft), 0 0 34px rgba(237, 195, 112, 0.22);
}
.arcade-card-cover {
  position: relative;
  aspect-ratio: 960 / 523;
  overflow: hidden;
  border-bottom: 3px solid var(--wood-light);
}
.arcade-card-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.arcade-card:hover .arcade-card-cover img { transform: scale(1.06); }
.arcade-card-body { padding: 18px 22px 22px; display: flex; flex-direction: column; gap: 8px; }
.arcade-card-tag {
  font-family: var(--head-font);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.7rem;
  color: var(--emerald);
}
.arcade-card-title {
  font-family: var(--head-font);
  font-weight: 800;
  text-transform: uppercase;
  font-size: 1.24rem;
  color: var(--parchment);
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.3);
}
.arcade-card-blurb { color: var(--frost-dim); font-size: 0.94rem; }
.arcade-card-cta {
  margin-top: 6px;
  align-self: flex-start;
  font-family: var(--head-font);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.82rem;
  color: #3a2408;
  background: linear-gradient(180deg, #f0c368, #d79733);
  border-bottom: 3px solid #a9701f;
  padding: 10px 18px;
  border-radius: 10px;
  transition: transform 0.14s ease, filter 0.2s ease;
}
.arcade-card:hover .arcade-card-cta { filter: brightness(1.06); transform: translateY(-1px); }

.game-page-hero {
  position: relative;
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 var(--pad-shell);
}
.game-page-banner {
  position: relative;
  margin-top: clamp(20px, 4vw, 36px);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 3px solid var(--wood-light);
  box-shadow: var(--shadow-soft);
  aspect-ratio: 960 / 340;
}
.game-page-banner img { width: 100%; height: 100%; object-fit: cover; }
.game-page-banner-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 6px;
  padding: clamp(16px, 3vw, 30px);
  background: linear-gradient(180deg, rgba(16, 35, 26, 0) 30%, rgba(10, 22, 15, 0.85) 100%);
}
.game-page-banner-overlay .kicker {
  font-family: var(--head-font);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.72rem;
  color: var(--gold);
}
.game-page-banner-overlay h1 {
  margin: 0;
  color: var(--parchment);
  text-transform: uppercase;
  font-size: clamp(1.5rem, 4vw, 2.6rem);
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
}

.game-shell {
  max-width: 640px;
  margin: 0 auto;
  padding: clamp(24px, 4vw, 40px) var(--pad-shell) 20px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.game-shell .playdeck-instructions { text-align: center; }
.game-crumbs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 0.9rem;
  color: var(--frost-dim);
}
.game-crumbs a { color: var(--gold); text-decoration: none; }
.game-crumbs a:hover { text-decoration: underline; }

.game-switch {
  max-width: 1000px;
  margin: 0 auto;
  padding: 10px var(--pad-shell) clamp(30px, 6vw, 60px);
}
.game-switch h2 {
  font-family: var(--head-font);
  text-transform: uppercase;
  font-size: 1.1rem;
  color: var(--parchment);
  margin-bottom: 14px;
}
.game-switch-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
}
.game-switch-card {
  display: block;
  border-radius: 12px;
  overflow: hidden;
  border: 2px solid var(--wood-light);
  text-decoration: none;
  position: relative;
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.game-switch-card:hover { transform: translateY(-4px); border-color: var(--gold); }
.game-switch-card img { width: 100%; aspect-ratio: 960 / 523; object-fit: cover; display: block; }
.game-switch-card span {
  display: block;
  padding: 8px 10px;
  font-family: var(--head-font);
  font-weight: 700;
  font-size: 0.8rem;
  text-transform: uppercase;
  color: var(--parchment);
  background: rgba(0, 0, 0, 0.4);
}

.fun-cta {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--pad-shell);
}
.fun-cta-inner {
  background:
    radial-gradient(600px 220px at 20% 0%, rgba(116, 215, 111, 0.16), transparent 70%),
    linear-gradient(180deg, #5e4022, #3a2712);
  border: 2px solid var(--wood-light);
  border-radius: var(--radius-lg);
  padding: clamp(26px, 5vw, 46px);
  text-align: center;
  box-shadow: var(--shadow-soft);
}
.fun-cta-inner h2 {
  color: var(--parchment);
  text-transform: uppercase;
  font-size: clamp(1.5rem, 3.4vw, 2.2rem);
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.3);
}
.fun-cta-inner p { color: var(--parchment-dim); max-width: 52ch; margin: 0 auto 20px; }

@media (max-width: 560px) {
  .hero-grid { max-width: 340px; }
}

.frost-section { padding: clamp(38px, 7vw, 74px) 0; }

.frost-section-head {
  max-width: 62ch;
  margin-bottom: 30px;
}
.frost-section-head .kicker {
  color: var(--emerald);
  font-family: var(--head-font);
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 0.78rem;
}
.frost-section-head h2 {
  font-size: clamp(1.7rem, 3.6vw, 2.5rem);
  margin-top: 8px;
  color: var(--parchment);
  text-transform: uppercase;
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.3);
}
.frost-section-head p {
  color: var(--frost-dim);
  font-size: 1.05rem;
}

.skillforge-panel {
  background:
    linear-gradient(180deg, rgba(239, 226, 196, 0.06), rgba(0, 0, 0, 0.14)),
    var(--felt-light);
  border: 2px solid var(--wood-light);
  border-radius: var(--radius-lg);
  padding: clamp(20px, 3vw, 30px);
  box-shadow: var(--shadow-soft);
}

.compliance-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 16px;
}

.compliance-note {
  background: linear-gradient(180deg, var(--parchment), var(--parchment-dim));
  color: var(--ink);
  border: 2px solid var(--wood-light);
  border-radius: var(--radius-md);
  padding: 20px;
  box-shadow: 0 6px 0 rgba(0, 0, 0, 0.18);
}
.compliance-note h3 {
  font-size: 1.05rem;
  color: var(--wood);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
.compliance-note p { color: var(--ink-soft); font-size: 0.95rem; margin: 0; }

.cleargame-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
}

.playdeck-unit {
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow: hidden;
  padding: 0;
}

.playdeck-cover {
  position: relative;
  margin: 0;
  aspect-ratio: 960 / 523;
  overflow: hidden;
  border-bottom: 3px solid var(--wood-light);
}
.playdeck-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.playdeck-unit:hover .playdeck-cover img { transform: scale(1.05); }
.playdeck-cover figcaption {
  position: absolute;
  left: 12px;
  bottom: 12px;
  font-family: var(--head-font);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.72rem;
  color: var(--ink);
  background: linear-gradient(180deg, var(--gold), var(--bronze));
  padding: 5px 12px;
  border-radius: 6px;
  border: 1px solid rgba(0, 0, 0, 0.3);
}

.playdeck-body {
  padding: 0 clamp(18px, 2.6vw, 26px) clamp(20px, 2.6vw, 26px);
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.playdeck-title {
  font-size: 1.3rem;
  margin: 0 0 4px;
  color: var(--parchment);
  text-transform: uppercase;
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.3);
}
.playdeck-instructions { color: var(--frost-dim); font-size: 0.92rem; margin: 0; }

.playdeck-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  list-style: none;
  padding: 0;
  margin: 0;
}
.playdeck-stats li {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--wood-light);
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 0.78rem;
  min-width: 80px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--frost-dim);
}
.playdeck-stats b {
  display: block;
  font-family: var(--mono-font);
  font-size: 1.2rem;
  color: var(--gold);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
}

.playdeck-controls { display: flex; flex-wrap: wrap; gap: 10px; }

.aurora-live {
  min-height: 1.4em;
  font-weight: 700;
  color: var(--emerald);
  font-size: 0.92rem;
}

.game-stage {
  position: relative;
  overflow: hidden;
  display: grid;
  place-items: center;
  padding: 14px;
  background:
    radial-gradient(circle at 50% 40%, rgba(0, 0, 0, 0.12), rgba(0, 0, 0, 0.34)),
    var(--felt);
  border: 2px solid var(--wood-dark);
  border-radius: var(--radius-md);
  box-shadow: inset 0 0 28px rgba(0, 0, 0, 0.4);
}

.game-stage.is-celebrating { animation: stageWin 1.1s ease-out; }
@keyframes stageWin {
  0% { box-shadow: inset 0 0 28px rgba(0, 0, 0, 0.4); }
  28% { box-shadow: inset 0 0 28px rgba(0, 0, 0, 0.4), 0 0 0 3px var(--gold), 0 0 40px rgba(237, 195, 112, 0.55); }
  100% { box-shadow: inset 0 0 28px rgba(0, 0, 0, 0.4); }
}

.stw-burst {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 5;
}
.stw-spark {
  position: absolute;
  width: 9px;
  height: 9px;
  border-radius: 2px;
  opacity: 0;
  will-change: transform, opacity;
  animation: sparkFly 1s ease-out forwards;
}
@keyframes sparkFly {
  0% { transform: translate(0, 0) rotate(0deg) scale(0.6); opacity: 0; }
  15% { opacity: 1; }
  100% { transform: translate(var(--dx), var(--dy)) rotate(220deg) scale(1); opacity: 0; }
}

.stw-board {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 9px;
  width: min(100%, 320px);
}

.stw-card {
  aspect-ratio: 3 / 4;
  border-radius: 9px;
  border: 2px solid #2c1d0d;
  background:
    repeating-linear-gradient(135deg, #4a3420, #4a3420 5px, #3f2c1a 5px, #3f2c1a 10px);
  color: transparent;
  font-size: clamp(1.4rem, 6vw, 2.1rem);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: transform 0.16s ease, background 0.25s ease, box-shadow 0.2s ease;
  box-shadow: inset 0 2px 4px rgba(255, 255, 255, 0.08), 0 3px 6px rgba(0, 0, 0, 0.4);
}
.stw-card::after {
  content: "ᛝ";
  color: rgba(116, 215, 111, 0.28);
  font-size: 1.5rem;
}
.stw-card.is-open,
.stw-card.is-locked {
  background: linear-gradient(180deg, var(--parchment), var(--parchment-dim));
  color: var(--emerald-deep);
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.2);
}
.stw-card.is-open::after,
.stw-card.is-locked::after { content: ""; }
.stw-card.is-locked {
  border-color: var(--emerald-deep);
  box-shadow: inset 0 0 0 2px rgba(60, 156, 70, 0.55), 0 0 16px rgba(116, 215, 111, 0.4);
  cursor: default;
}

.snake-frame {
  border: 3px solid var(--wood-light);
  border-radius: 10px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.45);
  overflow: hidden;
  line-height: 0;
  background: #33512e;
}
.snake-frame canvas {
  display: block;
  width: 100%;
  height: auto;
  image-rendering: pixelated;
  touch-action: none;
}

.ascend-board {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  width: min(100%, 320px);
  padding: 8px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 10px;
  border: 2px solid var(--wood-dark);
  touch-action: none;
}
.ascend-tile {
  aspect-ratio: 1 / 1;
  border-radius: 8px;
  display: grid;
  place-items: center;
  font-family: var(--mono-font);
  font-weight: 800;
  font-size: clamp(1.1rem, 4.4vw, 1.7rem);
  color: var(--parchment);
  background: rgba(239, 226, 196, 0.06);
  border: 1px solid rgba(0, 0, 0, 0.3);
  transition: transform 0.12s ease;
}
.ascend-tile[data-value="0"] { color: transparent; }
.ascend-tile[data-value="2"] { background: linear-gradient(180deg, #6a7d55, #566845); color: var(--frost); }
.ascend-tile[data-value="4"] { background: linear-gradient(180deg, #7c8b4f, #63723d); color: var(--frost); }
.ascend-tile[data-value="8"] { background: linear-gradient(180deg, #cf9a44, #b07d2c); color: #241703; }
.ascend-tile[data-value="16"] { background: linear-gradient(180deg, #d98f38, #b96f22); color: #241703; }
.ascend-tile[data-value="32"] { background: linear-gradient(180deg, #d97b3c, #b85c22); color: #fff; }
.ascend-tile[data-value="64"] { background: linear-gradient(180deg, #d85f3a, #b34220); color: #fff; }
.ascend-tile[data-value="128"] { background: linear-gradient(180deg, #5aa457, #3f8341); color: #fff; font-size: clamp(0.95rem, 3.6vw, 1.45rem); }
.ascend-tile[data-value="256"] { background: linear-gradient(180deg, #4fae63, #37864a); color: #fff; font-size: clamp(0.95rem, 3.6vw, 1.45rem); }
.ascend-tile[data-value="512"] { background: linear-gradient(180deg, #45b08a, #2f8869); color: #fff; font-size: clamp(0.95rem, 3.6vw, 1.45rem); }
.ascend-tile[data-value="1024"] { background: linear-gradient(180deg, #45a7c0, #2f7f96); color: #fff; font-size: clamp(0.82rem, 3vw, 1.2rem); }
.ascend-tile[data-value="2048"] { background: linear-gradient(180deg, #edc370, #c5842c); color: #241703; box-shadow: 0 0 20px rgba(237, 195, 112, 0.65); font-size: clamp(0.82rem, 3vw, 1.2rem); }

.sudoku-wrap { display: grid; gap: 14px; width: min(100%, 360px); }
.sudoku-board {
  display: grid;
  grid-template-columns: repeat(9, 1fr);
  gap: 1px;
  background: #2c1d0d;
  border: 3px solid #2c1d0d;
  border-radius: 8px;
  overflow: hidden;
}
.sudoku-cell {
  aspect-ratio: 1 / 1;
  border: none;
  background: linear-gradient(180deg, #d9cdb2, #c9bb9c);
  color: var(--ink);
  font-family: var(--mono-font);
  font-weight: 700;
  font-size: clamp(0.85rem, 3.4vw, 1.15rem);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background 0.14s ease;
}
.sudoku-cell.is-given {
  background: linear-gradient(180deg, #b7a684, #a1906f);
  color: #2b1d0f;
  cursor: default;
}
.sudoku-cell[data-fill="1"] { color: var(--emerald-deep); }
.sudoku-cell.is-selected { background: linear-gradient(180deg, #f2dd9c, #e6c96f); box-shadow: inset 0 0 0 2px var(--bronze); }
.sudoku-cell.is-wrong { background: linear-gradient(180deg, #e79a86, #d76a52); color: #3a0f06; }
.sudoku-cell.edge-right { border-right: 2px solid #2c1d0d; }
.sudoku-cell.edge-bottom { border-bottom: 2px solid #2c1d0d; }

.sudoku-pad {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
}
.sudoku-key {
  padding: 10px 0;
  border: 2px solid var(--wood-light);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.28);
  color: var(--parchment);
  font-family: var(--mono-font);
  font-weight: 800;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.14s ease, transform 0.1s ease;
}
.sudoku-key:hover { background: rgba(237, 195, 112, 0.2); }
.sudoku-key:active { transform: translateY(1px); }
.sudoku-key--erase {
  grid-column: span 2;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.dpad {
  display: grid;
  grid-template-columns: repeat(3, 50px);
  grid-template-rows: repeat(3, 50px);
  gap: 6px;
}
.dpad-btn {
  border: 2px solid var(--wood-light);
  background: rgba(0, 0, 0, 0.3);
  color: var(--parchment);
  border-radius: 10px;
  font-size: 1.2rem;
  cursor: pointer;
  transition: background 0.14s ease, transform 0.1s ease;
}
.dpad-btn:hover { background: rgba(237, 195, 112, 0.2); }
.dpad-btn:active { transform: translateY(1px); }
.dpad-up { grid-area: 1 / 2; }
.dpad-left { grid-area: 2 / 1; }
.dpad-right { grid-area: 2 / 3; }
.dpad-down { grid-area: 3 / 2; }

.game-controls-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px;
  justify-content: center;
}

.step-flow {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
  counter-reset: flowstep;
  padding: 0;
}
.step-flow li {
  list-style: none;
  background: linear-gradient(180deg, var(--parchment), var(--parchment-dim));
  color: var(--ink);
  border: 2px solid var(--wood-light);
  border-radius: var(--radius-md);
  padding: 24px 22px;
  box-shadow: 0 6px 0 rgba(0, 0, 0, 0.16);
}
.step-flow li::before {
  counter-increment: flowstep;
  content: counter(flowstep);
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: linear-gradient(180deg, var(--emerald), var(--emerald-deep));
  color: #10230f;
  font-family: var(--head-font);
  font-weight: 800;
  font-size: 1.2rem;
  margin-bottom: 14px;
  border: 2px solid rgba(0, 0, 0, 0.25);
}
.step-flow h3 { font-size: 1.1rem; color: var(--wood); text-transform: uppercase; }
.step-flow p { color: var(--ink-soft); margin: 0; font-size: 0.95rem; }

.privacy-columns {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
}
.privacy-columns .compliance-note h3::before { content: "\2713  "; color: var(--emerald-deep); }

.game-help {
  max-width: 1000px;
  margin: 0 auto;
  padding: clamp(20px, 4vw, 44px) var(--pad-shell) clamp(10px, 2vw, 22px);
}
.game-help h2 {
  font-family: var(--head-font);
  color: var(--frost);
  margin-bottom: 6px;
}
.game-help h3 {
  font-family: var(--head-font);
  color: var(--gold);
  margin: 26px 0 10px;
  font-size: 1.05rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.help-steps, .help-tips { color: var(--frost-dim); padding-left: 1.2em; display: grid; gap: 8px; }
.help-steps li::marker { color: var(--emerald); font-weight: 700; }
.help-tips li::marker { color: var(--bronze); }
.help-diagram {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 4px 0 8px;
  background: var(--felt-deep);
  border: 1px solid var(--panel-line);
  border-radius: var(--radius-md);
  padding: 8px;
}
.help-controls {
  display: grid;
  grid-template-columns: minmax(140px, 200px) 1fr;
  gap: 10px 20px;
  margin: 0;
  color: var(--frost-dim);
}
.help-controls dt { color: var(--emerald); font-weight: 700; }
.help-controls dd { margin: 0; }
@media (max-width: 620px) {
  .help-controls { grid-template-columns: 1fr; gap: 4px 0; }
  .help-controls dd { margin-bottom: 10px; }
}

.faq-list { display: grid; gap: 12px; }
.faq-item {
  background: linear-gradient(180deg, var(--parchment), var(--parchment-dim));
  color: var(--ink);
  border: 2px solid var(--wood-light);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.faq-item summary {
  cursor: pointer;
  padding: 18px 22px;
  font-family: var(--head-font);
  font-weight: 800;
  font-size: 1.02rem;
  color: var(--wood);
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  font-size: 1.5rem;
  color: var(--bronze);
  transition: transform 0.2s ease;
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item p { padding: 0 22px 20px; margin: 0; color: var(--ink-soft); }

.northern-foot {
  border-top: 3px solid var(--wood-light);
  background: linear-gradient(180deg, #2c1d0d, #21160a);
  margin-top: 44px;
}
.northern-foot-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: clamp(34px, 6vw, 56px) var(--pad-shell) 28px;
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 34px;
}
.foot-brand p { color: var(--parchment-dim); max-width: 42ch; font-size: 0.95rem; }
.foot-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 26px;
  align-content: start;
}
.foot-links a,
.foot-privacy-open {
  color: var(--parchment-dim);
  text-decoration: none;
  font-size: 0.94rem;
  padding: 4px 0;
  background: none;
  border: none;
  cursor: pointer;
  font: inherit;
  text-align: left;
}
.foot-links a:hover,
.foot-privacy-open:hover { color: var(--gold); text-decoration: underline; }

.foot-baseline {
  max-width: 1200px;
  margin: 0 auto;
  padding: 22px var(--pad-shell) 30px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(217, 195, 154, 0.75);
  font-size: 0.85rem;
  display: flex;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.consent-drawer {
  position: fixed;
  left: 50%;
  bottom: 20px;
  transform: translateX(-50%);
  width: min(920px, calc(100% - 28px));
  background: linear-gradient(180deg, #3a2712, #2b1d0d);
  border: 2px solid var(--wood-light);
  border-radius: 16px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6);
  padding: 22px 24px;
  z-index: 80;
}
.consent-drawer[hidden] { display: none; }
.consent-drawer h2 { font-size: 1.15rem; margin-bottom: 6px; color: var(--gold); text-transform: uppercase; }
.consent-drawer p { color: var(--parchment-dim); font-size: 0.92rem; margin-bottom: 16px; }
.consent-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.consent-panel {
  margin-top: 18px;
  border-top: 1px solid var(--wood-light);
  padding-top: 16px;
  display: grid;
  gap: 12px;
}
.consent-panel[hidden] { display: none; }
.consent-toggle {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid var(--wood-light);
  border-radius: 10px;
  padding: 14px 16px;
}
.consent-toggle input {
  margin-top: 4px;
  width: 20px;
  height: 20px;
  accent-color: var(--emerald-deep);
  flex: none;
}
.consent-toggle span b { display: block; font-size: 0.98rem; color: var(--parchment); }
.consent-toggle span small { color: var(--parchment-dim); }
.consent-toggle input:disabled { opacity: 0.7; }

.doc-shell {
  max-width: 860px;
  margin: 0 auto;
  padding: clamp(34px, 6vw, 68px) var(--pad-shell) 40px;
}
.doc-shell > * { position: relative; }
.doc-shell h1 {
  font-size: clamp(1.9rem, 4vw, 2.7rem);
  color: var(--parchment);
  text-transform: uppercase;
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.3);
}
.doc-meta { color: var(--frost-dim); font-size: 0.9rem; margin-bottom: 26px; }
.doc-shell h2 { font-size: 1.4rem; margin-top: 2em; color: var(--emerald); text-transform: uppercase; }
.doc-shell h3 { font-size: 1.1rem; margin-top: 1.5em; color: var(--gold); }
.doc-shell ul, .doc-shell ol { color: var(--frost-dim); padding-left: 22px; }
.doc-shell li { margin-bottom: 8px; }
.doc-shell strong { color: var(--frost); }

.doc-callout {
  background: linear-gradient(180deg, var(--parchment), var(--parchment-dim));
  color: var(--ink);
  border: 2px solid var(--wood-light);
  border-left: 5px solid var(--bronze);
  border-radius: 12px;
  padding: 16px 20px;
  margin: 22px 0;
  box-shadow: 0 6px 0 rgba(0, 0, 0, 0.16);
}
.doc-callout strong { color: var(--wood); }
.doc-callout a { color: var(--wood); }

.doc-toc {
  background: rgba(0, 0, 0, 0.24);
  border: 2px solid var(--wood-light);
  border-radius: var(--radius-md);
  padding: 18px 22px;
  margin-bottom: 30px;
}
.doc-toc ul { list-style: none; padding: 0; columns: 2; gap: 20px; color: var(--gold); }
.doc-toc a { text-decoration: none; }
.doc-toc a:hover { text-decoration: underline; }

.sng-form { display: grid; gap: 16px; max-width: 560px; }
.sng-field { display: grid; gap: 6px; }
.sng-field label { font-weight: 700; font-size: 0.95rem; color: var(--parchment); }
.sng-field .req { color: var(--gold); }
.sng-field input,
.sng-field textarea,
.sng-field select {
  font: inherit;
  color: var(--ink);
  background: linear-gradient(180deg, #f3e8cd, #e6d5b2);
  border: 2px solid var(--wood-light);
  border-radius: 10px;
  padding: 12px 14px;
  width: 100%;
}
.sng-field textarea { min-height: 130px; resize: vertical; }
.sng-field input:focus,
.sng-field textarea:focus,
.sng-field select:focus { border-color: var(--bronze); }
.sng-field input[aria-invalid="true"],
.sng-field textarea[aria-invalid="true"] { border-color: var(--danger); }
.field-error { color: #ffb0a0; font-size: 0.85rem; min-height: 1em; }

.sng-consent {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: rgba(0, 0, 0, 0.24);
  border: 1px solid var(--wood-light);
  border-radius: 10px;
  padding: 14px 16px;
}
.sng-consent input {
  width: 22px;
  height: 22px;
  accent-color: var(--emerald-deep);
  flex: none;
  margin-top: 2px;
}
.sng-consent label { font-size: 0.92rem; color: var(--parchment-dim); }

.form-notice { border-radius: 10px; padding: 14px 18px; font-weight: 700; margin-top: 6px; }
.form-notice[hidden] { display: none; }
.form-notice.is-ok { background: rgba(60, 156, 70, 0.16); border: 1px solid var(--emerald-deep); color: var(--frost); }
.form-notice.is-warn { background: rgba(237, 195, 112, 0.16); border: 1px solid var(--bronze); color: var(--frost); }

.privacy-tools { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 16px; }
.status-line { color: var(--frost-dim); font-size: 0.92rem; margin-top: 10px; }
.status-chip {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 800;
  margin-left: 6px;
}
.status-chip.on { background: rgba(60, 156, 70, 0.28); color: var(--emerald); }
.status-chip.off { background: rgba(237, 195, 112, 0.2); color: var(--gold); }

.pref-grid { display: grid; gap: 14px; margin: 18px 0; }

@media (max-width: 900px) {
  .mapleplay-hero { grid-template-columns: 1fr; }
  .northern-foot-inner { grid-template-columns: 1fr; }
  .doc-toc ul { columns: 1; }
}

@media (max-width: 680px) {
  .aurora-nav {
    order: 3;
    width: 100%;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
  }
  .aurora-nav.is-open { display: flex; }
  .aurora-nav-toggle {
    display: inline-flex;
    margin-left: auto;
    background: linear-gradient(180deg, #5e4022, #45301a);
    border: 2px solid var(--wood-light);
    color: var(--parchment);
    border-radius: 8px;
    padding: 9px 13px;
    cursor: pointer;
    font: inherit;
    font-weight: 700;
  }
  .aurora-nav-link { padding: 12px 14px; border-radius: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

@media print {
  .northern-arcade-shell,
  .northern-foot,
  .consent-drawer,
  .hero-visual { display: none !important; }
  body { background: #fff; color: #111; }
  .doc-shell { max-width: 100%; }
  a { color: #114; }
}
