:root {
  --pitch: #0d2818;
  --pitch-light: #1a3d2a;
  --line: rgba(255, 255, 255, 0.12);
  --gold: #c9a227;
  --cream: #f4f1e8;
  --muted: #a8b5aa;
  --font-display: "Instrument Serif", Georgia, serif;
  --font-body: "DM Sans", system-ui, sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--cream);
  background: var(--pitch);
  background-image:
    linear-gradient(90deg, var(--line) 1px, transparent 1px),
    linear-gradient(var(--line) 1px, transparent 1px);
  background-size: 48px 48px;
}

a {
  color: var(--gold);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  color: #e4c94a;
}

.wrap {
  width: min(1100px, 92vw);
  margin-inline: auto;
}

header {
  padding: 4rem 0 3rem;
  border-bottom: 1px solid var(--line);
}

.badge {
  display: inline-block;
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1rem;
}

h1 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2.4rem, 6vw, 3.6rem);
  line-height: 1.1;
  margin: 0 0 1rem;
  max-width: 14ch;
}

.lead {
  margin: 0;
  max-width: 42ch;
  color: var(--muted);
  font-size: 1.1rem;
}

main {
  padding: 3rem 0 5rem;
}

.grid {
  display: grid;
  gap: 2rem;
}

@media (min-width: 800px) {
  .grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.75rem;
  }
}

.card {
  background: linear-gradient(145deg, var(--pitch-light), var(--pitch));
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1.75rem 1.5rem;
  height: 100%;
}

.card h2 {
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 400;
  margin: 0 0 0.75rem;
  color: var(--cream);
}

.card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.98rem;
}

.corner-game {
  margin-top: 3.5rem;
  padding: 2.5rem 0 1rem;
  border-top: 1px solid var(--line);
}

.corner-game__head {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
}

.corner-game__flag {
  height: clamp(40px, 7vw, 56px);
  width: auto;
  max-width: min(520px, 85vw);
  object-fit: contain;
  object-position: left center;
  border-radius: 8px;
  border: 1px solid var(--line);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
  flex-shrink: 0;
}

.corner-game__head h2 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.8rem, 3vw, 2.25rem);
  line-height: 1.1;
  margin: 0;
  flex: 1 1 12rem;
  min-width: min(100%, 12rem);
}

.corner-game__intro {
  margin: 0 0 1.5rem;
  max-width: 62ch;
  color: var(--muted);
  font-size: 0.98rem;
}

.corner-game__intro kbd {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.82em;
  padding: 0.1em 0.4em;
  border-radius: 4px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.35);
  color: var(--cream);
}

.corner-game__stage {
  display: grid;
  gap: 1rem;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: linear-gradient(160deg, rgba(0, 0, 0, 0.35), rgba(26, 61, 42, 0.45));
  padding: 1rem;
  overflow: hidden;
  min-width: 0;
  min-height: min(52vh, 320px);
}

@media (min-width: 900px) {
  .corner-game__stage {
    grid-template-columns: minmax(0, 1fr) minmax(200px, 240px);
    align-items: start;
  }
}

.corner-game__canvas {
  display: block;
  width: 100%;
  min-width: 0;
  aspect-ratio: 16 / 9;
  height: auto;
  max-height: min(52vh, 520px);
  min-height: 220px;
  border-radius: 10px;
  border: 1px solid rgba(201, 162, 39, 0.45);
  box-shadow:
    inset 0 0 40px rgba(0, 0, 0, 0.35),
    0 0 0 1px rgba(255, 255, 255, 0.06);
  background: rgba(0, 0, 0, 0.35);
  cursor: grab;
  touch-action: none;
  position: relative;
  z-index: 0;
}

.corner-game__canvas:active {
  cursor: grabbing;
}

.corner-game__hud {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  position: relative;
  z-index: 1;
}

.corner-game__level {
  margin: 0;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
}

.corner-game__status {
  margin: 0;
  font-size: 0.95rem;
  color: var(--cream);
  min-height: 2.8em;
}

.corner-game__strike-hint {
  margin: 0;
  font-size: 0.82rem;
  letter-spacing: 0.03em;
  color: rgba(245, 240, 230, 0.78);
  min-height: 1.35em;
}

.corner-game__view {
  margin: 0;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--gold);
}

.corner-game__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.corner-game__btn {
  font-family: var(--font-body);
  font-size: 0.92rem;
  font-weight: 500;
  padding: 0.55rem 1.1rem;
  border-radius: 999px;
  border: 1px solid var(--gold);
  background: var(--gold);
  color: var(--pitch);
  cursor: pointer;
}

.corner-game__btn:hover {
  background: #e4c94a;
  border-color: #e4c94a;
}

.corner-game__btn:disabled {
  cursor: wait;
  opacity: 0.65;
}

.corner-game__btn--ghost {
  background: transparent;
  color: var(--cream);
}

.corner-game__btn--ghost:hover {
  background: rgba(201, 162, 39, 0.12);
  color: #fff;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.positions {
  margin-top: 3.5rem;
  padding: 2.5rem 0;
  border-top: 1px solid var(--line);
}

.positions h2 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.8rem, 3vw, 2.2rem);
  margin: 0 0 0.5rem;
}

.sub {
  color: var(--muted);
  margin: 0 0 1.75rem;
  max-width: 50ch;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.tag {
  font-size: 0.82rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.2);
  color: var(--cream);
}

footer {
  padding: 2rem 0 3rem;
  border-top: 1px solid var(--line);
  font-size: 0.88rem;
  color: var(--muted);
}

footer p {
  margin: 0;
}

footer code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.84em;
  padding: 0.12em 0.35em;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--line);
}
