:root {
  color-scheme: dark;
  --background: #161c1a;
  --surface: #1f2725;
  --ink: #f4f3e9;
  --muted: #c1cbc5;
  --accent: #b4ecd5;
  --line: #45564f;
  font-family: system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--background);
  color: var(--ink);
  line-height: 1.55;
}

a { color: inherit; }
a:focus-visible, summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.wrap { width: min(1120px, calc(100% - 48px)); margin-inline: auto; }

.skip {
  position: absolute;
  z-index: 2;
  top: 8px;
  left: 8px;
  transform: translateY(-150%);
  padding: 12px 16px;
  background: var(--accent);
  color: var(--background);
}

.skip:focus { transform: none; }

.header, .footer, .game-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.header { min-height: 68px; }
.header a { text-decoration: none; }
.header nav { display: flex; gap: 16px; }
.header nav a { display: grid; min-height: 44px; place-items: center; color: var(--muted); }
.header nav a:hover, .header nav [aria-current] { color: var(--accent); }

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  font-size: .95rem;
  font-weight: 750;
}

.ball {
  display: inline-block;
  flex: 0 0 18px;
  width: 18px;
  aspect-ratio: 1;
  border: 1px solid var(--background);
  border-radius: 50%;
  background: linear-gradient(135deg, transparent 45%, var(--background) 47% 53%, transparent 55%), #fb9f65;
}

.cover {
  display: grid;
  place-items: center;
  position: relative;
  isolation: isolate;
  aspect-ratio: 16 / 8.6;
  max-height: 66svh;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #234642;
}

.cover img { position: absolute; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.cover::after { content: ""; position: absolute; inset: 0; background: #121c183d; z-index: -1; }

.button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 10px 18px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: var(--accent);
  color: #12251d;
  text-decoration: none;
  text-align: center;
  font-weight: 750;
  transition: transform 150ms ease, background-color 150ms ease;
}

.button:hover { transform: translateY(-2px); background-color: #d2f8e7; }
.button:active { transform: translateY(1px); }
.cover-play { margin-top: 13%; box-shadow: 0 4px 0 #10251e, 0 8px 24px #0007; }
.secondary { border-color: var(--line); background: var(--surface); color: var(--ink); }
.secondary:hover { background: #30413b; }

.game-bar { padding: 24px 0 30px; }
.game-bar p, .guide-intro p, .section p { color: var(--muted); }
.game-bar p { margin: 4px 0 0; }
h1, h2 { margin: 0; letter-spacing: -.035em; line-height: 1.12; }
h1 { font-size: clamp(2.15rem, 5vw, 3.7rem); }
h2 { font-size: clamp(1.65rem, 3vw, 2.45rem); }
p { max-width: 62ch; }

.section { border-top: 1px solid var(--line); padding-block: clamp(32px, 6vw, 70px); }
.quick { display: grid; grid-template-columns: 1fr minmax(250px, .53fr); align-items: center; gap: 24px; }
.text-link { display: inline-block; padding-block: 11px; color: var(--accent); text-underline-offset: 4px; }
.text-link:hover { text-decoration-thickness: 2px; }

.keys {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--line);
}

.keys div { display: grid; justify-items: center; gap: 12px; padding: 24px 12px; background: var(--surface); }
.keys dt { color: var(--muted); font-size: .9rem; }
.keys dd { margin: 0; }

kbd {
  display: inline-block;
  min-width: 1.75rem;
  padding-inline: .4em;
  border: 1px solid var(--line);
  border-bottom-width: 3px;
  border-radius: 6px;
  background: var(--surface);
  color: var(--accent);
  text-align: center;
}

.keys kbd { min-width: 50px; font-size: 1.55rem; background: var(--background); }
.guide { max-width: 880px; }
.guide-intro { padding-block: clamp(32px, 9vw, 96px); }
.guide-intro p { margin-bottom: 26px; }
.steps { margin-bottom: 0; padding-left: 1.7rem; max-width: 66ch; }
.steps li { margin-top: 12px; padding-left: .45rem; }

details { border-bottom: 1px solid var(--line); }
details:first-of-type { margin-top: 20px; }
summary { cursor: pointer; min-height: 44px; padding-block: 12px; font-weight: 650; }
summary:hover { color: var(--accent); }
details p { margin-top: 0; padding-left: 1.1rem; }
.footer { min-height: 82px; border-top: 1px solid var(--line); color: var(--muted); font-size: .875rem; }
.footer a { display: inline-block; padding-block: 12px; text-underline-offset: 4px; }

@media (max-width: 640px) {
  .wrap { width: calc(100% - 32px); }
  .header { min-height: 56px; gap: 8px; }
  .header nav { gap: 12px; }
  .header nav a { font-size: .9rem; }
  .cover { aspect-ratio: 4 / 3; }
  .game-bar { align-items: stretch; flex-direction: column; gap: 14px; padding-top: 18px; }
  .quick { grid-template-columns: 1fr; }
  .footer { flex-wrap: wrap; gap: 0 12px; padding-block: 12px; }
}

@media (prefers-reduced-motion: no-preference) {
  [data-enter] { animation: enter 320ms ease-out both; }
  @keyframes enter { from { transform: translateY(6px); opacity: .7; } }
}
@media (prefers-reduced-motion: reduce) {
  .button { transition: none; }
}

.host-note { font-size: .85rem; }
.text-link.inline { display: inline; padding: 0; }
.footer nav { display: flex; flex-wrap: wrap; gap: 0 16px; }
.footer [aria-current] { color: var(--accent); }
.info { min-height: 55vh; padding-block: clamp(32px, 7vw, 78px); }
.info h2 { margin-top: 1.5em; font-size: 1.35rem; }
.info p { color: var(--muted); }
