:root {
  color-scheme: light;
  --bg: #fcfbf7;
  --panel: #ffffff;
  --text: #141414;
  --muted: #666;
  --border: rgba(0, 0, 0, 0.1);
  --border-strong: rgba(0, 0, 0, 0.18);
  --accent: #111;
  --accent-inverse: #fff;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

button,
input,
textarea,
select {
  font: inherit;
}

.page {
  max-width: 720px;
  margin: 0 auto;
  padding: 24px;
}

.header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.95rem;
}

.home-link {
  color: inherit;
  text-decoration: none;
}

.divider {
  opacity: 0.5;
}

.hero {
  padding: 40px 0 28px;
}

.eyebrow {
  margin: 0 0 8px;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

h1 {
  margin: 0;
  font-size: 2.4rem;
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.subtitle {
  margin: 14px 0 0;
  max-width: 58ch;
  color: var(--muted);
  line-height: 1.6;
}

.game-shell,
.notes {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 20px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.04);
}

.notes {
  margin-top: 20px;
}

.status-row {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 16px;
  margin-bottom: 18px;
}

.label {
  margin: 0 0 6px;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.status {
  margin: 0;
  font-weight: 500;
}

.reset-button {
  border: 1px solid var(--border-strong);
  background: transparent;
  color: var(--text);
  border-radius: 999px;
  padding: 10px 16px;
  cursor: pointer;
}

.reset-button:hover {
  background: rgba(0, 0, 0, 0.03);
}

.board {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.cell {
  aspect-ratio: 1;
  border: 1px solid var(--border-strong);
  background: #fff;
  border-radius: 16px;
  font-size: clamp(2rem, 8vw, 3.5rem);
  font-weight: 600;
  cursor: pointer;
}

.cell:hover {
  background: rgba(0, 0, 0, 0.025);
}

.notes h2 {
  margin-top: 0;
  font-size: 1.1rem;
}

.notes ol {
  padding-left: 1.2rem;
  color: var(--muted);
  line-height: 1.7;
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.92em;
}

.footnote {
  margin: 12px 0 0;
  color: var(--muted);
}

@media (max-width: 640px) {
  .page {
    padding: 18px;
  }

  .status-row {
    flex-direction: column;
    align-items: stretch;
  }

  .reset-button {
    width: 100%;
  }
}
