:root {
  --ink: #f8fbff;
  --muted: #a8b4c7;
  --panel: rgba(11, 17, 31, 0.78);
  --panel-strong: #101829;
  --line: rgba(255, 255, 255, 0.14);
  --cyan: #34d8ff;
  --lime: #b8ff55;
  --coral: #ff6f61;
  --gold: #ffd166;
  --pink: #ff4fd8;
  --blue: #506dff;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.42);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

section[id],
figure[id] {
  scroll-margin-top: 92px;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(135deg, rgba(52, 216, 255, 0.16), transparent 34%),
    linear-gradient(315deg, rgba(255, 111, 97, 0.14), transparent 38%),
    #070b14;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -2;
  content: "";
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 54px 54px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.7), transparent 78%);
}

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

a {
  color: inherit;
  text-decoration: none;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

body.arcade-expanded {
  overflow: hidden;
}

.music-toggle {
  position: fixed;
  right: max(1rem, env(safe-area-inset-right));
  bottom: max(1rem, env(safe-area-inset-bottom));
  z-index: 80;
  display: grid;
  width: 58px;
  aspect-ratio: 1;
  place-items: center;
  padding: 0;
  overflow: hidden;
  background: linear-gradient(135deg, var(--gold), var(--coral));
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.34), 0 0 26px rgba(255, 209, 102, 0.28);
  cursor: pointer;
}

.music-toggle::before {
  position: absolute;
  inset: 8px;
  content: "";
  border: 2px solid rgba(6, 17, 31, 0.28);
  border-radius: 50%;
}

.music-toggle::after {
  position: absolute;
  inset: 50%;
  width: 7px;
  aspect-ratio: 1;
  content: "";
  background: rgba(6, 17, 31, 0.34);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.music-toggle:hover,
.music-toggle:focus-visible {
  outline: none;
  border-color: rgba(184, 255, 85, 0.86);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.34), 0 0 30px rgba(52, 216, 255, 0.34);
}

.music-toggle.is-playing {
  background: linear-gradient(135deg, var(--lime), var(--cyan));
}

.music-toggle.is-playing::before {
  animation: music-spin 5s linear infinite;
  border-color: rgba(6, 17, 31, 0.42);
  border-left-color: rgba(6, 17, 31, 0.08);
}

.music-icon {
  position: relative;
  z-index: 1;
  display: grid;
  min-width: 22px;
  min-height: 22px;
  place-items: center;
}

.music-play-shape {
  display: block;
  width: 0;
  height: 0;
  margin-left: 4px;
  border-top: 10px solid transparent;
  border-bottom: 10px solid transparent;
  border-left: 15px solid #06111f;
}

.music-pause-shape {
  display: none;
  gap: 5px;
}

.music-pause-shape span {
  width: 6px;
  height: 21px;
  background: #06111f;
  border-radius: 3px;
}

.music-toggle.is-playing .music-play-shape {
  display: none;
}

.music-toggle.is-playing .music-pause-shape {
  display: flex;
}

body.arcade-expanded .music-toggle {
  z-index: 1101;
}

@keyframes music-spin {
  to {
    transform: rotate(360deg);
  }
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 76px;
  padding: 0.85rem clamp(1rem, 4vw, 3rem);
  background: linear-gradient(180deg, rgba(5, 8, 15, 0.96), rgba(5, 8, 15, 0.42));
  border-bottom: 1px solid transparent;
}

.site-header.is-scrolled {
  border-bottom-color: var(--line);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
}

.brand-mark {
  display: grid;
  width: 42px;
  aspect-ratio: 1;
  place-items: center;
  color: #06111f;
  background: linear-gradient(135deg, var(--cyan), var(--lime));
  border-radius: 8px;
  font-weight: 950;
  box-shadow: 0 0 26px rgba(52, 216, 255, 0.34);
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 0.94rem;
}

.brand small {
  color: var(--cyan);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.site-nav a {
  padding: 0.7rem 0.9rem;
  color: var(--muted);
  border: 1px solid transparent;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 800;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  color: var(--ink);
  border-color: rgba(52, 216, 255, 0.42);
  outline: none;
}

.nav-toggle {
  display: none;
  width: 44px;
  aspect-ratio: 1;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.07);
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: var(--ink);
}

.hero {
  position: relative;
  min-height: min(860px, 100svh);
  padding: 7.5rem clamp(1rem, 4vw, 4rem) 4rem;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(7, 11, 20, 0.94) 0%, rgba(7, 11, 20, 0.78) 44%, rgba(7, 11, 20, 0.34) 100%),
    url("/assets/images/template/hero-bg.png") center / cover no-repeat;
}

.hero-bg::after {
  position: absolute;
  inset: auto 0 0;
  height: 32%;
  content: "";
  background: linear-gradient(180deg, transparent, #070b14 86%);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.72fr);
  align-items: center;
  gap: clamp(2rem, 6vw, 5rem);
  max-width: 1180px;
  min-height: calc(min(860px, 100svh) - 11.5rem);
  margin: 0 auto;
}

.hero-copy {
  max-width: 720px;
}

.eyebrow {
  margin: 0 0 0.65rem;
  color: var(--cyan);
  font-size: 0.78rem;
  font-weight: 950;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 11ch;
  margin-bottom: 1rem;
  font-size: 6.4rem;
  line-height: 0.88;
  text-transform: uppercase;
}

h2 {
  margin-bottom: 0.7rem;
  font-size: 3.35rem;
  line-height: 1;
}

h3 {
  font-size: 1.18rem;
  line-height: 1.15;
}

.hero-lede {
  max-width: 46rem;
  color: #d7e2f5;
  font-size: 1.35rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin: 2rem 0 1.6rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0.8rem 1.15rem;
  border: 1px solid transparent;
  border-radius: 8px;
  font-weight: 950;
}

.btn.primary {
  color: #07111e;
  background: linear-gradient(135deg, var(--lime), var(--cyan));
  box-shadow: 0 12px 32px rgba(52, 216, 255, 0.24);
}

.btn.secondary {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--line);
}

.status-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.status-strip span {
  padding: 0.55rem 0.7rem;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 800;
}

.status-strip b {
  color: var(--gold);
}

.hero-photo {
  position: relative;
  align-self: end;
  margin: 0;
}

.hero-photo::before {
  position: absolute;
  inset: 6% -5% -5% 12%;
  z-index: -1;
  content: "";
  background: linear-gradient(145deg, rgba(52, 216, 255, 0.55), rgba(255, 111, 97, 0.36));
  border-radius: 8px;
  transform: skew(-4deg);
  filter: blur(4px);
}

.hero-photo img {
  width: min(440px, 88vw);
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.hero-photo figcaption {
  position: absolute;
  right: 1rem;
  bottom: 1rem;
  max-width: calc(100% - 2rem);
  padding: 0.8rem 0.95rem;
  background: rgba(6, 10, 18, 0.82);
  border: 1px solid rgba(52, 216, 255, 0.36);
  border-radius: 8px;
  backdrop-filter: blur(16px);
}

.hero-photo figcaption span,
.hero-photo figcaption strong {
  display: block;
}

.hero-photo figcaption span {
  color: var(--cyan);
  font-size: 0.72rem;
  font-weight: 950;
  letter-spacing: 0;
}

.hero-photo figcaption strong {
  font-size: 0.92rem;
}

.section {
  padding: clamp(3.5rem, 7vw, 6.5rem) clamp(1rem, 4vw, 4rem);
}

.section-heading {
  max-width: 760px;
  margin: 0 auto 2rem;
  text-align: center;
}

.fact-grid,
.world-grid,
.game-frame-grid {
  display: grid;
  max-width: 1180px;
  margin: 0 auto;
  gap: 1rem;
}

.fact-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  max-width: 1320px;
}

.fact-card,
.world-grid article,
.game-frame,
.quest-panel,
.parent-note {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.22);
}

.fact-card {
  min-height: 220px;
  padding: 1.3rem;
}

.fact-card span {
  display: inline-block;
  margin-bottom: 1rem;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 950;
  letter-spacing: 0;
  text-transform: uppercase;
}

.fact-card strong {
  display: block;
  margin-bottom: 0.9rem;
  font-size: clamp(2.15rem, 3vw, 3rem);
  line-height: 0.92;
}

.fact-card p,
.world-grid p,
.game-frame p,
.loadout-copy p,
.parent-note p {
  color: var(--muted);
}

.tone-cyan {
  border-top-color: var(--cyan);
}

.tone-lime {
  border-top-color: var(--lime);
}

.tone-coral {
  border-top-color: var(--coral);
}

.tone-gold {
  border-top-color: var(--gold);
}

.tone-minecraft {
  border-top-color: var(--lime);
  background:
    linear-gradient(145deg, rgba(184, 255, 85, 0.1), rgba(52, 216, 255, 0.06)),
    var(--panel);
}

.tone-minecraft span {
  color: var(--lime);
}

.tone-minecraft strong {
  color: #d8ffb0;
}

.loadout-section {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(280px, 0.65fr);
  align-items: center;
  gap: 2rem;
  max-width: 1180px;
  margin: 0 auto;
  background:
    linear-gradient(90deg, rgba(7, 11, 20, 0.94), rgba(7, 11, 20, 0.74)),
    url("/assets/images/template/match-bg.png") center / cover no-repeat;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.gear-list {
  display: grid;
  gap: 0.8rem;
}

.gear-item {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.gear-item span {
  color: var(--muted);
}

.gear-item strong {
  color: var(--lime);
}

.fun-fact-section {
  background:
    linear-gradient(135deg, rgba(52, 216, 255, 0.14), transparent 38%),
    linear-gradient(315deg, rgba(255, 79, 216, 0.12), transparent 44%),
    rgba(7, 11, 20, 0.96);
}

.fun-fact-panel {
  display: grid;
  grid-template-columns: minmax(0, 0.74fr) minmax(280px, 0.5fr);
  align-items: stretch;
  gap: 1rem;
  max-width: 1180px;
  margin: 0 auto;
}

.fun-fact-copy,
.fun-fact-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(11, 17, 31, 0.82);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.22);
}

.fun-fact-copy {
  display: grid;
  align-content: center;
  min-height: 260px;
  padding: clamp(1.3rem, 4vw, 2.4rem);
  background:
    linear-gradient(90deg, rgba(7, 11, 20, 0.88), rgba(7, 11, 20, 0.5)),
    url("/assets/images/template/game-card-2.png") center / cover no-repeat;
}

.fun-fact-copy p:not(.eyebrow) {
  max-width: 36rem;
  margin-bottom: 0;
  color: #d7e2f5;
  font-size: 1.05rem;
}

.fun-fact-card {
  position: relative;
  display: grid;
  align-content: center;
  min-height: 260px;
  overflow: hidden;
  padding: clamp(1.3rem, 4vw, 2.2rem);
}

.fun-fact-card::before {
  position: absolute;
  inset: 0;
  content: "";
  background:
    linear-gradient(90deg, rgba(184, 255, 85, 0.18), transparent 46%),
    linear-gradient(135deg, rgba(52, 216, 255, 0.2), rgba(255, 111, 97, 0.12));
  opacity: 0.9;
}

.fun-fact-card span,
.fun-fact-card strong,
.fun-fact-card p {
  position: relative;
  z-index: 1;
}

.fun-fact-card span {
  display: inline-flex;
  width: max-content;
  margin-bottom: 1rem;
  padding: 0.36rem 0.62rem;
  color: #06111f;
  background: var(--lime);
  border-radius: 6px;
  font-size: 0.74rem;
  font-weight: 950;
}

.fun-fact-card strong {
  display: block;
  margin-bottom: 0.85rem;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  line-height: 1;
}

.fun-fact-card p {
  margin-bottom: 0;
  color: #d7e2f5;
  font-size: 1.04rem;
}

.cheat-section {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(7, 11, 20, 0.88), rgba(7, 11, 20, 0.98)),
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    url("/assets/images/template/video-bg.png") center / cover no-repeat;
  background-size: auto, 44px 44px, 44px 44px, cover;
}

.cheat-vault-shell {
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(1rem, 3vw, 1.35rem);
  border: 1px solid rgba(52, 216, 255, 0.34);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(8, 13, 23, 0.92), rgba(8, 13, 23, 0.78)),
    linear-gradient(135deg, rgba(52, 216, 255, 0.1), rgba(255, 209, 102, 0.08));
  box-shadow: var(--shadow);
}

.cheat-vault-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.4fr);
  gap: 1rem;
  align-items: stretch;
  padding: clamp(1rem, 4vw, 1.7rem);
  margin-bottom: 1rem;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(6, 10, 18, 0.92), rgba(6, 10, 18, 0.5)),
    linear-gradient(135deg, rgba(52, 216, 255, 0.2), rgba(255, 111, 97, 0.14));
}

.cheat-vault-top h2 {
  max-width: 12ch;
}

.cheat-vault-top p:not(.eyebrow) {
  max-width: 48rem;
  margin-bottom: 0;
  color: #d7e2f5;
}

.cheat-vault-status {
  display: grid;
  gap: 0.65rem;
}

.cheat-vault-status span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 50px;
  padding: 0.72rem 0.85rem;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-weight: 900;
}

.cheat-vault-status b {
  color: var(--gold);
  font-size: 0.72rem;
  text-transform: uppercase;
}

.cheat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  max-width: 1180px;
  margin: 0 auto;
}

.cheat-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background: rgba(11, 17, 31, 0.88);
  box-shadow: 0 18px 54px rgba(0, 0, 0, 0.28);
}

.cheat-card::before {
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  content: "";
  background: linear-gradient(90deg, var(--cyan), var(--lime));
}

.cheat-frontier::before {
  background: linear-gradient(90deg, var(--gold), var(--coral));
}

.cheat-card-header {
  position: relative;
  min-height: 210px;
  padding: clamp(1rem, 3vw, 1.45rem);
  background:
    linear-gradient(90deg, rgba(6, 10, 18, 0.94), rgba(6, 10, 18, 0.48)),
    linear-gradient(135deg, rgba(52, 216, 255, 0.22), rgba(80, 109, 255, 0.14));
  border-bottom: 1px solid var(--line);
}

.cheat-frontier .cheat-card-header {
  background:
    linear-gradient(90deg, rgba(6, 10, 18, 0.94), rgba(6, 10, 18, 0.48)),
    linear-gradient(135deg, rgba(255, 209, 102, 0.24), rgba(255, 111, 97, 0.15));
}

.cheat-card-header span {
  display: inline-flex;
  margin-bottom: 1rem;
  padding: 0.35rem 0.62rem;
  color: #06111f;
  background: var(--cyan);
  border-radius: 6px;
  font-size: 0.74rem;
  font-weight: 950;
}

.cheat-frontier .cheat-card-header span {
  background: var(--gold);
}

.cheat-card-header h3 {
  margin-bottom: 0.6rem;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 0.95;
}

.cheat-card-header p {
  max-width: 34rem;
  margin-bottom: 0;
  color: #d7e2f5;
}

.cheat-list {
  display: grid;
  gap: 0.75rem;
  padding: 1rem;
  counter-reset: cheat-code;
}

.cheat-row {
  position: relative;
  display: grid;
  gap: 0.62rem;
  min-height: 104px;
  padding: 0.9rem 0.9rem 0.9rem 3.8rem;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.cheat-row::before {
  position: absolute;
  top: 0.9rem;
  left: 0.9rem;
  display: grid;
  width: 34px;
  aspect-ratio: 1;
  place-items: center;
  color: #06111f;
  background: var(--cyan);
  border-radius: 8px;
  content: counter(cheat-code, decimal-leading-zero);
  counter-increment: cheat-code;
  font-size: 0.74rem;
  font-weight: 950;
}

.cheat-frontier .cheat-row::before {
  background: var(--gold);
}

.cheat-row strong {
  font-size: 0.95rem;
}

.cheat-input {
  display: flex;
  flex-wrap: wrap;
  gap: 0.32rem;
}

.cheat-input kbd,
.cheat-row code {
  color: #06111f;
  background: #e7eefb;
  border: 0;
  border-radius: 6px;
  box-shadow: none;
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 950;
}

.cheat-input kbd {
  padding: 0.26rem 0.46rem;
}

.cheat-row code {
  display: block;
  width: 100%;
  padding: 0.58rem 0.68rem;
  color: #07111e;
  line-height: 1.35;
  white-space: normal;
}

.games-section {
  background:
    linear-gradient(180deg, rgba(7, 11, 20, 0.84), rgba(7, 11, 20, 0.96)),
    url("/assets/images/template/games-bg.png") center / cover fixed;
}

.game-frame-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.game-frame {
  overflow: hidden;
  background: rgba(11, 17, 31, 0.9);
}

.game-frame-header {
  padding: 1.1rem;
}

.game-frame-header span {
  display: inline-flex;
  margin-bottom: 0.6rem;
  padding: 0.28rem 0.5rem;
  color: #07111e;
  background: var(--cyan);
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 950;
}

.game-frame.tone-coral .game-frame-header span {
  background: var(--coral);
}

.game-frame iframe {
  display: block;
  width: 100%;
  height: 530px;
  border: 0;
  border-top: 1px solid var(--line);
  background: #080d17;
}

.external-section {
  background:
    linear-gradient(180deg, rgba(7, 11, 20, 0.94), rgba(7, 11, 20, 0.82)),
    url("/assets/images/template/match-bg.png") center / cover no-repeat;
}

.section-heading p:not(.eyebrow) {
  max-width: 52rem;
  margin-right: auto;
  margin-left: auto;
  color: var(--muted);
}

.arcade-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 380px);
  gap: 1rem;
  max-width: 1180px;
  margin: 0 auto;
}

.arcade-player {
  overflow: hidden;
  border: 1px solid rgba(52, 216, 255, 0.32);
  border-radius: 8px;
  background: rgba(8, 13, 23, 0.92);
  box-shadow: var(--shadow);
}

.arcade-player.is-expanded {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  width: 100vw;
  height: 100vh;
  width: 100dvw;
  height: 100dvh;
  max-width: none;
  border: 0;
  border-radius: 0;
  background: #060a12;
  box-shadow: none;
}

.arcade-player-header {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  border-bottom: 1px solid var(--line);
}

.arcade-player.is-expanded .arcade-player-header {
  flex: 0 0 auto;
  padding:
    max(0.85rem, env(safe-area-inset-top))
    max(0.85rem, env(safe-area-inset-right))
    0.85rem
    max(0.85rem, env(safe-area-inset-left));
  background: rgba(6, 10, 18, 0.94);
  backdrop-filter: blur(18px);
}

.arcade-player-header span,
.arcade-game span {
  display: inline-flex;
  width: max-content;
  padding: 0.3rem 0.55rem;
  color: #06111f;
  background: var(--gold);
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 950;
}

.arcade-player-header h3 {
  margin-bottom: 0.25rem;
  font-size: 1.65rem;
}

.arcade-player-header p {
  margin-bottom: 0;
  color: var(--muted);
}

.arcade-source-link,
.arcade-fullscreen {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0.6rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.08);
  font-size: 0.82rem;
  font-weight: 900;
}

.arcade-fullscreen {
  cursor: pointer;
}

.arcade-source-link:hover,
.arcade-source-link:focus-visible,
.arcade-fullscreen:hover,
.arcade-fullscreen:focus-visible {
  border-color: rgba(52, 216, 255, 0.7);
  outline: none;
  background: rgba(52, 216, 255, 0.14);
}

.arcade-player iframe,
.arcade-launch-panel {
  display: block;
  width: 100%;
  height: min(680px, 72svh);
  min-height: 560px;
}

.arcade-player iframe {
  border: 0;
  background: #060a12;
}

.arcade-player.is-expanded iframe,
.arcade-player.is-expanded .arcade-launch-panel {
  flex: 1 1 auto;
  height: auto;
  min-height: 0;
}

.arcade-launch-panel {
  position: relative;
  display: grid;
  align-items: end;
  overflow: hidden;
  padding: 1.35rem;
  background: #060a12;
}

.arcade-launch-panel::after {
  position: absolute;
  inset: 0;
  content: "";
  background:
    linear-gradient(90deg, rgba(6, 10, 18, 0.92), rgba(6, 10, 18, 0.32)),
    linear-gradient(180deg, transparent, rgba(6, 10, 18, 0.88));
}

.arcade-launch-panel img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.72;
}

.arcade-launch-content {
  position: relative;
  z-index: 1;
  max-width: 440px;
}

.arcade-launch-content h4 {
  margin: 0 0 0.55rem;
  font-size: 1.8rem;
  line-height: 1;
}

.arcade-launch-content p {
  color: #d7e2f5;
}

.arcade-launch-content a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.7rem 1rem;
  color: #06111f;
  background: linear-gradient(135deg, var(--lime), var(--cyan));
  border-radius: 8px;
  font-weight: 950;
}

.arcade-list {
  display: grid;
  gap: 0.7rem;
  align-content: start;
  max-height: 780px;
  overflow: auto;
  padding-right: 0.2rem;
}

.arcade-game {
  display: grid;
  grid-template-areas:
    "thumb tag"
    "thumb title"
    "thumb desc";
  grid-template-columns: 116px minmax(0, 1fr);
  gap: 0.36rem 0.72rem;
  align-items: center;
  width: 100%;
  min-height: 104px;
  padding: 0.55rem;
  color: var(--ink);
  text-align: left;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
}

.arcade-game img {
  grid-area: thumb;
  width: 100%;
  height: 100%;
  min-height: 78px;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: #060a12;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
}

.arcade-game:hover,
.arcade-game:focus-visible,
.arcade-game.is-active {
  border-color: rgba(52, 216, 255, 0.7);
  outline: none;
  background: rgba(52, 216, 255, 0.12);
}

.arcade-game:hover img,
.arcade-game:focus-visible img,
.arcade-game.is-active img {
  border-color: rgba(184, 255, 85, 0.7);
  box-shadow: 0 0 22px rgba(52, 216, 255, 0.22);
}

.arcade-game span {
  grid-area: tag;
}

.arcade-game strong {
  grid-area: title;
  font-size: 0.98rem;
  line-height: 1.2;
}

.arcade-game small {
  grid-area: desc;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.35;
}

.arcade-game em {
  grid-column: 2;
  color: var(--lime);
  font-size: 0.72rem;
  font-style: normal;
  font-weight: 950;
}

.gallery-section {
  background:
    linear-gradient(180deg, rgba(7, 11, 20, 0.94), rgba(7, 11, 20, 0.9)),
    url("/assets/images/template/video-bg.png") center / cover no-repeat;
}

.world-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.world-grid article {
  overflow: hidden;
}

.world-grid img {
  width: 100%;
  aspect-ratio: 1.15;
  object-fit: cover;
}

.world-grid h3,
.world-grid p {
  padding: 0 1rem;
}

.world-grid h3 {
  margin-top: 1rem;
  margin-bottom: 0.45rem;
}

.world-grid p {
  padding-bottom: 1rem;
}

.quest-section {
  display: grid;
  grid-template-columns: minmax(0, 0.72fr) minmax(280px, 0.42fr);
  gap: 1rem;
  max-width: 1180px;
  margin: 0 auto;
}

.quest-panel,
.parent-note {
  padding: clamp(1.2rem, 3vw, 2rem);
}

.quest-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
  margin-top: 1.4rem;
}

.quest-item {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  min-height: 74px;
  padding: 0.9rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.quest-item span {
  display: grid;
  flex: 0 0 36px;
  aspect-ratio: 1;
  place-items: center;
  color: #06111f;
  background: var(--gold);
  border-radius: 8px;
  font-weight: 950;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 2rem clamp(1rem, 4vw, 4rem);
  color: var(--muted);
  background:
    linear-gradient(180deg, rgba(7, 11, 20, 0.88), rgba(7, 11, 20, 0.98)),
    url("/assets/images/template/footer-bg.png") center / cover no-repeat;
  border-top: 1px solid var(--line);
}

.site-footer strong,
.site-footer span {
  display: block;
}

.site-footer strong,
.site-footer a {
  color: var(--ink);
}

.game-body {
  min-height: 100svh;
  background: #080d17;
}

.mini-game {
  display: flex;
  flex-direction: column;
  min-height: 100svh;
  padding: 1rem;
  background:
    linear-gradient(135deg, rgba(52, 216, 255, 0.16), transparent 36%),
    linear-gradient(315deg, rgba(255, 111, 97, 0.14), transparent 42%),
    #080d17;
}

.mini-game-top,
.mini-game-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.mini-game-top h1 {
  max-width: none;
  margin: 0;
  font-size: 2rem;
  line-height: 1;
}

.mini-label {
  display: inline-block;
  margin-bottom: 0.35rem;
  color: var(--cyan);
  font-size: 0.72rem;
  font-weight: 950;
  letter-spacing: 0;
  text-transform: uppercase;
}

.mini-score {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.5rem;
}

.mini-score span {
  min-width: 86px;
  padding: 0.55rem 0.7rem;
  color: var(--muted);
  text-align: center;
  background: rgba(0, 0, 0, 0.18);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.mini-score strong {
  display: block;
  color: var(--ink);
  font-size: 1.25rem;
}

.memory-board {
  display: grid;
  flex: 1;
  grid-template-columns: repeat(4, minmax(58px, 1fr));
  gap: 0.65rem;
  align-content: center;
  width: min(100%, 640px);
  margin: 1rem auto;
}

.memory-card {
  position: relative;
  min-height: 92px;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  perspective: 600px;
}

.card-back,
.card-front {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  backface-visibility: hidden;
  transition: transform 180ms ease, border-color 180ms ease;
}

.card-back {
  color: var(--cyan);
  background: linear-gradient(135deg, rgba(80, 109, 255, 0.32), rgba(52, 216, 255, 0.13));
  font-size: 2rem;
  font-weight: 950;
}

.card-front {
  color: #06111f;
  background: linear-gradient(135deg, var(--lime), var(--cyan));
  font-size: 2rem;
  font-weight: 950;
  transform: rotateY(180deg);
}

.memory-card.is-open .card-back,
.memory-card.is-matched .card-back {
  transform: rotateY(180deg);
}

.memory-card.is-open .card-front,
.memory-card.is-matched .card-front {
  transform: rotateY(360deg);
}

.memory-card.is-matched .card-front {
  border-color: var(--lime);
  box-shadow: 0 0 24px rgba(184, 255, 85, 0.22);
}

.mini-game-footer p {
  margin: 0;
  color: var(--muted);
  font-weight: 800;
}

.mini-button {
  min-height: 42px;
  padding: 0.65rem 0.9rem;
  color: #06111f;
  background: var(--gold);
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 950;
}

.mini-button:disabled {
  color: var(--muted);
  background: rgba(255, 255, 255, 0.14);
  cursor: not-allowed;
}

.reflex-arena {
  position: relative;
  flex: 1;
  min-height: 330px;
  margin: 1rem 0;
  overflow: hidden;
  background:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    rgba(255, 255, 255, 0.06);
  background-size: 34px 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.reflex-target {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 72px;
  aspect-ratio: 1;
  color: #06111f;
  background: linear-gradient(135deg, var(--coral), var(--gold));
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  font-weight: 950;
  box-shadow: 0 0 28px rgba(255, 111, 97, 0.35);
  transform: translate(-50%, -50%) scale(0.9);
  transition: transform 120ms ease;
}

.reflex-target.is-live {
  transform: translate(0, 0) scale(1);
}

@media (max-width: 980px) {
  h1 {
    font-size: 4.8rem;
  }

  h2 {
    font-size: 2.75rem;
  }

  .hero-grid,
  .loadout-section,
  .fun-fact-panel,
  .cheat-vault-top,
  .arcade-layout,
  .quest-section {
    grid-template-columns: 1fr;
  }

  .hero-grid {
    min-height: auto;
  }

  .hero-photo {
    justify-self: center;
  }

  .games-section {
    background-attachment: scroll;
  }

  .fact-grid,
  .world-grid,
  .cheat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .game-frame-grid {
    grid-template-columns: 1fr;
  }

  .arcade-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-height: none;
    overflow: visible;
    padding-right: 0;
  }
}

@media (max-width: 840px) {
  .site-header {
    min-height: 68px;
  }

  .nav-toggle {
    display: block;
  }

  .site-nav {
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 1rem;
    right: 1rem;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 0.6rem;
    background: rgba(5, 8, 15, 0.96);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
  }

  .site-nav.is-open {
    display: flex;
  }

  .site-nav a {
    padding: 0.85rem;
  }
}

@media (max-width: 720px) {
  .brand strong {
    max-width: 15ch;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .hero {
    min-height: auto;
    padding-top: 5.8rem;
    padding-bottom: 2.6rem;
  }

  .hero-grid {
    gap: 1.1rem;
  }

  h1 {
    font-size: 3.1rem;
  }

  h2 {
    font-size: 2.25rem;
  }

  .hero-lede {
    font-size: 1rem;
  }

  .hero-actions {
    margin: 1rem 0 0.85rem;
  }

  .status-strip {
    gap: 0.42rem;
  }

  .status-strip span {
    padding: 0.45rem 0.52rem;
    font-size: 0.76rem;
  }

  .hero-photo img {
    width: min(340px, 88vw);
    margin: 0 auto;
    aspect-ratio: 3 / 4;
    object-position: center top;
  }

  .hero-photo figcaption {
    position: static;
    width: min(340px, 88vw);
    max-width: none;
    margin: 0.65rem auto 0;
    padding: 0.65rem 0.75rem;
  }

  .fact-grid,
  .world-grid,
  .cheat-grid,
  .quest-list {
    grid-template-columns: 1fr;
  }

  .game-frame iframe {
    height: 70svh;
    min-height: 430px;
  }

  .arcade-player-header {
    grid-template-columns: 1fr;
  }

  .arcade-player.is-expanded .arcade-player-header {
    gap: 0.65rem;
  }

  .arcade-source-link,
  .arcade-fullscreen {
    width: 100%;
  }

  .arcade-player iframe,
  .arcade-launch-panel {
    height: 72svh;
    min-height: 430px;
  }

  .arcade-list {
    grid-template-columns: 1fr;
  }

  .arcade-game {
    grid-template-columns: 104px minmax(0, 1fr);
    min-height: 98px;
  }

  .site-footer,
  .mini-game-top,
  .mini-game-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .mini-score {
    justify-content: flex-start;
  }

  .memory-board {
    grid-template-columns: repeat(3, minmax(56px, 1fr));
  }

  .memory-card {
    min-height: 82px;
  }
}

@media (max-width: 480px) {
  section[id],
  figure[id] {
    scroll-margin-top: 78px;
  }

  .section {
    padding: 2.75rem 0.85rem;
  }

  .site-header {
    gap: 0.7rem;
    padding: 0.7rem 0.85rem;
  }

  .music-toggle {
    width: 52px;
  }

  .brand {
    gap: 0.55rem;
  }

  .brand-mark {
    width: 38px;
  }

  .brand strong {
    max-width: 20ch;
    font-size: 0.84rem;
  }

  .brand small {
    font-size: 0.66rem;
  }

  .hero {
    padding-right: 0.85rem;
    padding-left: 0.85rem;
  }

  .section-heading {
    margin-bottom: 1.25rem;
  }

  h1 {
    font-size: 2.6rem;
  }

  h2 {
    font-size: 1.9rem;
  }

  .hero-actions .btn {
    flex: 1 1 100%;
  }

  .fact-card {
    min-height: auto;
    padding: 1rem;
  }

  .fact-card strong {
    font-size: 2.2rem;
  }

  .loadout-section {
    gap: 1rem;
  }

  .gear-item {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.35rem;
  }

  .fun-fact-copy,
  .fun-fact-card {
    min-height: auto;
    padding: 1rem;
  }

  .fun-fact-card strong {
    font-size: 1.75rem;
  }

  .cheat-vault-shell {
    padding: 0.75rem;
  }

  .cheat-vault-top {
    padding: 1rem;
  }

  .cheat-vault-status span {
    min-height: 44px;
  }

  .cheat-card-header {
    min-height: auto;
  }

  .cheat-list {
    padding: 0.85rem;
  }

  .cheat-row {
    min-height: auto;
    padding: 0.78rem 0.78rem 0.78rem 3.25rem;
  }

  .cheat-row::before {
    top: 0.78rem;
    left: 0.78rem;
    width: 30px;
  }

  .game-frame iframe,
  .arcade-player iframe,
  .arcade-launch-panel {
    height: 68svh;
    min-height: 380px;
  }

  .arcade-launch-panel {
    padding: 1rem;
  }

  .arcade-launch-content h4 {
    font-size: 1.45rem;
  }

  .arcade-player-header {
    gap: 0.75rem;
    padding: 0.85rem;
  }

  .arcade-player-header h3 {
    font-size: 1.35rem;
  }

  .arcade-source-link,
  .arcade-fullscreen {
    min-height: 42px;
  }

  .arcade-game {
    grid-template-columns: 92px minmax(0, 1fr);
    gap: 0.3rem 0.58rem;
    min-height: 92px;
  }

  .arcade-game img {
    min-height: 64px;
  }

  .arcade-game strong {
    font-size: 0.9rem;
  }

  .arcade-game small {
    font-size: 0.76rem;
  }

  .quest-item {
    min-height: auto;
  }

  .mini-game {
    padding: 0.7rem;
  }

  .mini-game-top h1 {
    font-size: 1.55rem;
  }

  .memory-board {
    gap: 0.48rem;
  }
}
