:root {
  color-scheme: dark;
  --background: #15111c;
  --surface: #211a2c;
  --raised: #2b2238;
  --border: #3a2e49;
  --text: #f7f1e6;
  --muted: #c7bbce;
  --accent: #ffcf68;
  --accent-hover: #ffe197;
  --link: #c9a9ff;
  --display: "Archivo Black", "Arial Black", sans-serif;
  --mono: "IBM Plex Mono", Consolas, monospace;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-padding-top: 1rem; }
body {
  margin: 0;
  color: var(--text);
  background: var(--background);
  font: 1rem/1.65 Inter, system-ui, sans-serif;
}
a { color: var(--link); text-underline-offset: .2em; }
a:hover { color: var(--accent-hover); }
a:focus-visible, button:focus-visible, summary:focus-visible, iframe:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 4px;
}
button { font: inherit; cursor: pointer; }
h1, h2, h3, p { margin: 0; }
h2, h3 { line-height: 1.2; }
h3 { font-size: 1.13rem; }
.wrap { width: min(1120px, calc(100% - 64px)); margin-inline: auto; }
.skip-link {
  position: fixed;
  z-index: 3;
  inset: .75rem auto auto .75rem;
  padding: .5rem 1rem;
  background: var(--surface);
  transform: translateY(-200%);
}
.skip-link:focus { transform: none; }
.site-header { border-bottom: 1px solid var(--border); background: #1a1423; }
.header-inner, .footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  column-gap: 1.75rem;
}
.header-inner { min-height: 72px; }
.brand {
  display: inline-flex;
  align-items: center;
  gap: .64rem;
  color: var(--text);
  text-decoration: none;
  font-weight: 800;
  letter-spacing: -.035em;
  white-space: nowrap;
}
.brand img { display: block; border-radius: 8px; border: 1px solid var(--border); }
.site-nav, .footer-links { display: flex; align-items: center; flex-wrap: wrap; gap: .25rem 1.4rem; }
.site-nav a, .footer-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  text-decoration: none;
  color: var(--muted);
  font-weight: 600;
  font-size: .875rem;
}
.site-nav .nav-play { color: var(--accent); }
.site-nav a:hover, .footer-links a:hover { color: var(--text); text-decoration: underline; }
.hero {
  display: grid;
  align-items: end;
  grid-template-columns: minmax(0, 1.5fr) minmax(16rem, .8fr);
  gap: 1rem 3rem;
  padding: clamp(2.3rem, 6vw, 5rem) 0 clamp(1.5rem, 4vw, 2.7rem);
}
.hero h1, .info-page h1 {
  font: 400 clamp(2.45rem, 5.45vw, 5.2rem)/.99 var(--display);
  letter-spacing: -.065em;
}
.hero h1 span { display: block; color: var(--accent); }
.hero p { color: var(--muted); max-width: 40ch; line-height: 1.65; padding-bottom: .15rem; }
.player {
  background: var(--surface);
  border: 1px solid #4b3b5d;
  border-radius: 16px;
  box-shadow: 0 18px 48px #08050c60;
  min-width: 0;
}
.player-top, .player-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .35rem 1rem;
  padding: .55rem 1.15rem;
  min-height: 54px;
}
.player-top h2 { font-size: .98rem; font-weight: 750; letter-spacing: -.025em; }
.port-label {
  color: var(--link);
  font-family: var(--mono);
  font-size: .75rem;
}
.player-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #0e0b13;
  border-block: 1px solid var(--border);
}
.player-stage iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  border: 0;
}
.player-loading {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: #0e0b13;
  pointer-events: none;
}
.player-spinner {
  width: clamp(2rem, 6vw, 3.25rem);
  aspect-ratio: 1;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: player-spin .9s linear infinite;
}
@keyframes player-spin {
  to { transform: rotate(360deg); }
}
@media (prefers-reduced-motion: reduce) {
  .player-spinner { animation: none; }
}
.player-stage:fullscreen { border: 0; width: 100%; height: 100%; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .7rem;
  min-height: 50px;
  padding: .65rem 1.3rem;
  border: 1px solid transparent;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 800;
}
.primary-button {
  color: var(--background);
  background: var(--accent);
  box-shadow: 0 4px 0 #a86f2b;
}
.primary-button:hover { color: var(--background); background: var(--accent-hover); }
.player-toolbar { font-size: .8375rem; }
.player-status { color: var(--muted); max-width: 62ch; flex: 1 1 17rem; }
.player-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 0 .85rem; }
.player-actions button, .player-actions a {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  min-height: 44px;
  background: transparent;
  border: 0;
  padding: 0;
  color: var(--text);
  text-decoration: none;
  font-weight: 650;
}
.player-actions button:hover, .player-actions a:hover { color: var(--accent); text-decoration: underline; }
.content-section {
  padding: clamp(2rem, 5vw, 4rem) 0;
  border-bottom: 1px solid var(--border);
}
.section-heading { margin-bottom: 1.5rem; }
.section-heading h2 {
  font: 400 clamp(1.55rem, 3.2vw, 2.55rem)/1.15 var(--display);
  letter-spacing: -.055em;
}
.section-heading p { color: var(--muted); max-width: 68ch; margin-top: .65rem; }
.controls-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(15rem, .9fr);
  align-items: start;
  gap: 1.5rem clamp(1.5rem, 6vw, 5rem);
}
.prose { max-width: 72ch; }
.prose p, .guide-card p, .version-card p { color: var(--muted); margin-top: .55rem; }
.prose h3:not(:first-child) { margin-top: 1.15rem; }
.control-card, .guide-card, .version-card {
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  padding: clamp(1rem, 2.5vw, 1.55rem);
}
.control-card dl { margin: .7rem 0; }
.control-card dl div {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  column-gap: .7rem;
  row-gap: .35rem;
  padding: .68rem 0;
  border-bottom: 1px solid var(--border);
}
.control-card dd { margin: 0; display: flex; flex-wrap: wrap; gap: .3rem; }
.control-card dt, .control-card p { color: var(--muted); font-size: .9rem; }
kbd {
  display: inline-block;
  padding: .1rem .43rem;
  border: 1px solid #5e4c73;
  border-bottom-width: 2px;
  border-radius: 4px;
  background: var(--raised);
  color: var(--text);
  font: 500 .76rem/1.4 var(--mono);
}
.text-link { display: inline-flex; gap: .35rem; align-items: center; min-height: 44px; font-weight: 700; }
.guide-grid, .version-grid { display: grid; gap: 1rem; }
.guide-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.version-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.guide-card h3 { color: var(--accent); }
.battle-example {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: center;
  gap: 1.25rem clamp(1.25rem, 4vw, 3rem);
  margin-top: 1.5rem;
}
.field-note { border-left: 3px solid var(--accent); padding-left: 1rem; }
.battle-screenshot {
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
}
.battle-screenshot img { display: block; width: 100%; height: auto; }
.battle-screenshot figcaption {
  padding: .65rem .85rem;
  color: var(--muted);
  font-size: .875rem;
}
.troubleshoot { margin-top: 1.4rem; }
.faq { border-bottom: 0; }
.faq-list { max-width: 54rem; }
details { border-top: 1px solid var(--border); }
details:last-child { border-bottom: 1px solid var(--border); }
summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  min-height: 52px;
  padding: .75rem .2rem;
  cursor: pointer;
  list-style: none;
  font-weight: 700;
}
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; color: var(--accent); font: 500 1.4rem/1 var(--mono); flex: none; }
details[open] summary::after { content: "−"; }
summary:hover { color: var(--accent-hover); }
details p { padding: 0 .85rem 1rem .2rem; max-width: 74ch; color: var(--muted); }
.site-footer { border-top: 1px solid var(--border); background: #1a1423; }
.footer-inner { padding-block: 1.65rem; gap: .7rem 1.75rem; }
.footer-inner p { color: var(--muted); font-size: .875rem; margin-top: .5rem; }
.info-page { max-width: 780px; padding-block: clamp(2rem, 6vw, 5rem); }
.info-page h1 { font-size: clamp(2.15rem, 6vw, 4.2rem); }
.info-intro { color: var(--muted); margin: 1rem 0 1.75rem; }
.info-page section { margin: 1.75rem 0; }
.info-page h2 { font-size: 1.3rem; }
.effective-date { margin-top: .75rem; color: var(--link); }
@media (max-width: 800px) {
  .hero { grid-template-columns: 1fr; gap: .9rem; }
  .hero p { max-width: 63ch; }
  .guide-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .battle-example { grid-template-columns: 1fr; }
}
@media (max-width: 570px) {
  .wrap { width: calc(100% - 32px); }
  .header-inner { padding-top: .65rem; gap: .15rem; }
  .site-nav { width: 100%; gap: .25rem 1.25rem; }
  .player-top, .player-toolbar { padding-inline: .75rem; }
  .player-toolbar { padding-block: .6rem .15rem; }
  .controls-layout, .guide-grid, .version-grid { grid-template-columns: 1fr; }
}
