:root {
  --bg: #f8f5f9;
  --card: #ffffff;
  --accent: #f2b5d4;
  --accent-strong: #ef7cb3;
  --text: #2f2a30;
  --muted: #6b6570;
  --shadow: 0 10px 30px rgba(53, 28, 65, 0.08);
  --radius: 18px;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: 'Manrope', 'Inter', system-ui, -apple-system, sans-serif;
  background: radial-gradient(circle at 20% 20%, #fde7f3, #f8f5f9 45%),
              radial-gradient(circle at 80% 0%, #e8f2ff, #f8f5f9 40%),
              var(--bg);
  color: var(--text);
  min-height: 100vh;
}

.page {
  max-width: 960px;
  margin: 0 auto;
  padding: 32px 20px 64px;
}

.hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.hero h1 {
  margin: 6px 0;
  font-size: 30px;
  letter-spacing: -0.02em;
}

.subtitle {
  margin: 0;
  color: var(--muted);
  max-width: 520px;
  line-height: 1.5;
}

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

.card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(4px);
}

.cta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
  background: linear-gradient(90deg, #f9e4f1, #f3f0fb);
  border: 1px solid #f0e3ec;
  border-radius: 16px;
  box-shadow: var(--shadow);
  margin-bottom: 16px;
}

.cta-title {
  font-weight: 700;
  font-size: 18px;
  margin: 4px 0;
}

.cta-text {
  margin: 0;
  color: var(--muted);
}

.status-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.pill {
  background: #f5e9f3;
  color: var(--text);
  border-radius: 999px;
  padding: 10px 14px;
  font-weight: 600;
  font-size: 14px;
}

.pill.ghost {
  background: #f1f1f5;
  color: var(--muted);
}

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

.cell {
  aspect-ratio: 1;
  border-radius: 16px;
  background: #f8f3f7;
  border: 1px solid #f0e3ec;
  display: grid;
  place-items: center;
  font-size: clamp(32px, 5vw, 44px);
  font-weight: 700;
  color: var(--text);
  cursor: pointer;
  transition: transform 120ms ease, box-shadow 120ms ease, background 120ms ease;
}

.cell:hover,
.cell:focus-visible {
  background: #fff1f8;
  box-shadow: 0 8px 18px rgba(239, 124, 179, 0.18);
  transform: translateY(-1px);
  outline: none;
}

.cell.disabled {
  cursor: not-allowed;
  opacity: 0.6;
  background: #f6f6f6;
}

.cell.win {
  background: #dff3e8;
  border-color: #b7e3c8;
  box-shadow: 0 10px 24px rgba(69, 170, 135, 0.25);
}

.actions {
  margin-top: 20px;
  display: flex;
  justify-content: center;
}

.primary,
.secondary,
.icon-btn {
  border: none;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 120ms ease, box-shadow 120ms ease, background 120ms ease, color 120ms ease;
}

.primary {
  background: linear-gradient(135deg, var(--accent-strong), var(--accent));
  color: #2b1425;
  padding: 12px 18px;
  box-shadow: 0 10px 24px rgba(239, 124, 179, 0.25);
}

.primary:hover,
.primary:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 12px 26px rgba(239, 124, 179, 0.35);
}

.secondary {
  background: #f3eef7;
  color: var(--text);
  padding: 11px 16px;
}

.secondary:hover,
.secondary:focus-visible {
  background: #ebe3f2;
}

.icon-btn {
  background: #f3eef7;
  color: var(--text);
  padding: 10px 12px;
}

.icon-btn:hover,
.icon-btn:focus-visible {
  background: #ebe3f2;
}

.hidden { display: none; }

.modal {
  position: fixed;
  inset: 0;
  background: rgba(26, 18, 32, 0.38);
  display: grid;
  place-items: center;
  padding: 20px;
  z-index: 10;
}

.modal.hidden {
  display: none;
}

.modal-content {
  background: var(--card);
  border-radius: 16px;
  padding: 24px;
  width: min(420px, 100%);
  box-shadow: var(--shadow);
  text-align: center;
}

.modal h2 {
  margin: 8px 0 12px;
  font-size: 26px;
}

.modal-text {
  color: var(--muted);
  margin: 10px 0 18px;
}

.promo-box {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  background: #f5e9f3;
  border: 1px dashed #e3c8dc;
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.modal-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.modal-actions.vertical {
  flex-direction: column;
}

.modal-actions a {
  text-decoration: none;
  text-align: center;
}

.toast {
  position: fixed;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  background: #2f2a30;
  color: #fff;
  padding: 12px 16px;
  border-radius: 12px;
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transition: opacity 120ms ease;
}

.toast.show {
  opacity: 1;
}

@media (max-width: 640px) {
  .hero h1 { font-size: 24px; }
  .board { gap: 10px; }
  .cell { border-radius: 14px; }
  .cta { flex-direction: column; align-items: flex-start; }
}

