:root {
  --bg-top: #ffe7f0;
  --bg-mid: #f2f5ff;
  --bg-low: #eefbf2;
  --ink: #213249;
  --paper: rgba(255, 255, 255, 0.9);
  --line: rgba(33, 50, 73, 0.12);
  --shadow: 0 16px 36px rgba(33, 50, 73, 0.14);
  --good: #8fdc79;
  --bad: #ff9ca9;
  --accent: #2f73db;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Comic Sans MS", "Chalkboard SE", "Marker Felt", cursive;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(255, 170, 196, 0.34), transparent 24%),
    radial-gradient(circle at top right, rgba(159, 229, 141, 0.24), transparent 22%),
    linear-gradient(180deg, var(--bg-top) 0%, var(--bg-mid) 46%, var(--bg-low) 100%);
}

.wrap {
  width: min(1120px, calc(100% - 24px));
  margin: 12px auto 20px;
  display: grid;
  gap: 12px;
}

.hero,
.board,
.side {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.hero {
  padding: 14px 16px;
  display: grid;
  gap: 8px;
}

.badge {
  width: fit-content;
  padding: 7px 12px;
  border-radius: 999px;
  border: 2px dashed rgba(33, 50, 73, 0.2);
  background: white;
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: clamp(1.6rem, 4vw, 2.6rem);
  color: var(--accent);
}

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 250px;
  gap: 12px;
}

.board {
  padding: 14px;
  display: grid;
  gap: 12px;
}

.mode-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.mode-chip {
  border: 2px solid var(--line);
  border-radius: 999px;
  padding: 8px 12px;
  background: white;
  font: inherit;
  font-weight: 900;
  cursor: pointer;
}

.mode-chip.active {
  background: #fff2a9;
}

.prompt {
  border: 2px dashed rgba(33, 50, 73, 0.18);
  border-radius: 18px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.82);
  font-size: clamp(1rem, 2vw, 1.2rem);
  font-weight: 900;
  text-align: center;
}

.question {
  text-align: center;
  font-size: clamp(1.2rem, 3vw, 1.8rem);
  font-weight: 900;
}

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

.choice-btn,
.action-btn {
  border: 2px solid var(--line);
  border-radius: 16px;
  padding: 12px;
  font: inherit;
  font-weight: 900;
  cursor: pointer;
  background: white;
}

.choice-btn {
  font-size: 1.2rem;
}

.choice-btn.good {
  background: #dff7cc;
}

.choice-btn.bad {
  background: #ffd8e0;
}

.status {
  min-height: 1.4em;
  text-align: center;
  font-weight: 900;
  color: var(--accent);
}

.status.good {
  color: #2a8b4d;
}

.status.bad {
  color: #cc4966;
}

.actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

.action-btn {
  background: linear-gradient(135deg, #5f95ff, #86b2ff);
  color: white;
}

.action-btn.secondary {
  background: linear-gradient(135deg, #ffb1c3, #ffd28b);
  color: var(--ink);
}

.side {
  padding: 14px;
  display: grid;
  gap: 10px;
  align-content: start;
}

.score-box {
  border-radius: 16px;
  padding: 12px;
  background: white;
  border: 1px solid var(--line);
  text-align: center;
}

.score-label {
  display: block;
  font-size: 0.85rem;
  opacity: 0.8;
}

.score-value {
  display: block;
  margin-top: 4px;
  font-size: 1.9rem;
  font-weight: 900;
}

.helper {
  border-radius: 16px;
  padding: 10px 12px;
  background: linear-gradient(135deg, rgba(143, 220, 121, 0.32), rgba(255, 232, 157, 0.56));
  text-align: center;
  font-weight: 800;
}

.tiny-links {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
}

.tiny-link {
  text-decoration: none;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 10px;
  background: white;
  font-weight: 900;
}

@media (max-width: 860px) {
  .layout {
    grid-template-columns: 1fr;
  }

  .side {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-content: start;
  }
}
