:root {
  --bg: #fff7e6;
  --primary: #ff8c42;
  --secondary: #4cc9f0;
  --accent: #7bd389;
  --danger: #ff6b6b;
  --text: #2d2d2d;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Comic Sans MS", "Trebuchet MS", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
}

#app {
  max-width: 1100px;
  margin: 0 auto;
  padding: 16px;
}

.screen { display: none; text-align: center; }
.screen.active { display: block; }

h1, h2, h3 { margin: 12px 0; }

.btn {
  background: var(--primary);
  color: white;
  border: none;
  padding: 12px 20px;
  border-radius: 16px;
  font-size: 18px;
  cursor: pointer;
  box-shadow: 0 4px 0 rgba(0,0,0,0.15);
}
.btn:disabled { background: #ccc; cursor: not-allowed; }
.btn.big { font-size: 22px; padding: 14px 26px; }

.topic-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin: 16px 0;
}

.topic-btn {
  background: #fff;
  border: 3px dashed var(--secondary);
  border-radius: 16px;
  padding: 12px;
  font-size: 16px;
  cursor: pointer;
}

.topic-btn.selected {
  background: var(--secondary);
  color: #fff;
  border-style: solid;
}

.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.zones {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.zone {
  min-height: 120px;
  border: 3px solid #ddd;
  border-radius: 16px;
  padding: 8px;
  background: #fff;
  transition: 0.2s;
}

.zone.highlight { border-color: var(--accent); box-shadow: 0 0 12px rgba(0,0,0,0.1); }

.zone h4 { margin: 4px 0 8px; }

.items-title { margin-top: 18px; }

.items {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
  gap: 10px;
}

.item {
  background: #fff;
  border-radius: 14px;
  padding: 10px;
  font-size: 34px;
  cursor: grab;
  user-select: none;
  border: 2px solid #f0f0f0;
}

.item:active { cursor: grabbing; }

.complete {
  margin-top: 16px;
  font-size: 22px;
  color: var(--accent);
  font-weight: bold;
}

.hidden { display: none; }

.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

.overlay-card {
  background: #fff;
  padding: 24px;
  border-radius: 18px;
  width: min(90vw, 360px);
  text-align: center;
}

.confetti {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9;
}

@media (max-width: 600px) {
  .btn.big { width: 100%; }
  .top-bar { flex-direction: column; }
}
