.cb-game { max-width: 540px; margin: 1rem auto 3rem; padding: 0 1rem; position: relative; z-index: 1; }

.panel {
  background: var(--card); border: 3px solid var(--card-border); border-radius: var(--radius);
  padding: 2rem; box-shadow: var(--shadow); text-align: center; backdrop-filter: blur(10px);
}
.panel.hidden { display: none; }
.panel h1 {
  margin: 0.25rem 0 0.5rem; font-size: clamp(1.8rem, 5vw, 2.8rem);
  background: linear-gradient(90deg, var(--primary), var(--accent));
  -webkit-background-clip: text; background-clip: text; color: transparent; padding-bottom: 0.1em;
}
.cb-icon { font-size: 4rem; filter: drop-shadow(0 4px 10px rgba(0,0,0,0.3)); animation: bob 3s ease-in-out infinite; }
@keyframes bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
.tagline { margin: 0 0 1.5rem; color: var(--text-soft); font-weight: 600; }

.row { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; margin: 1rem 0 1.5rem; }
.row label { display: flex; flex-direction: column; gap: 0.3rem; font-weight: 700; color: var(--text); text-align: left; }
.row select { font: inherit; padding: 0.5rem 0.75rem; border-radius: 12px; border: 2px solid var(--primary); background: white; color: #1f1b2e; cursor: pointer; }

.setup-actions { display: flex; gap: 0.75rem; justify-content: center; flex-wrap: wrap; align-items: center; }
.btn-primary {
  font: inherit; font-weight: 800; padding: 0.7rem 1.6rem; border-radius: 999px; border: none;
  background: linear-gradient(90deg, var(--primary), var(--accent)); color: white; cursor: pointer;
  box-shadow: var(--shadow); transition: transform 0.15s ease; font-size: 1.1rem; text-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.btn-primary:hover { transform: translateY(-3px) scale(1.03); }
.btn-secondary {
  display: inline-block; margin-left: 0.75rem; padding: 0.7rem 1.4rem; border-radius: 999px; text-decoration: none;
  color: var(--text); background: var(--card); border: 2px solid var(--card-border); font-weight: 700;
}

.cb-header { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.5rem; margin-bottom: 1rem; }
.hud { display: flex; flex-direction: column; align-items: center; background: rgba(0,0,0,0.15); border-radius: 12px; padding: 0.5rem; }
.hud-label { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-soft); font-weight: 700; }
.hud-value { font-size: 1.15rem; font-weight: 800; color: var(--text); }

/* History board */
.cb-board { display: flex; flex-direction: column; gap: 6px; margin-bottom: 1rem; max-height: 320px; overflow-y: auto; }
.cb-line { display: flex; align-items: center; justify-content: center; gap: 10px; }
.cb-pegs { display: flex; gap: 6px; }
.peg { width: 30px; height: 30px; border-radius: 50%; box-shadow: inset 0 -3px 6px rgba(0,0,0,0.3), 0 1px 3px rgba(0,0,0,0.3); }
.peg.empty { background: rgba(255,255,255,0.12); box-shadow: inset 0 0 0 2px rgba(255,255,255,0.25); cursor: pointer; }

/* Clue pegs (2xN grid) */
.cb-clue { display: grid; grid-template-columns: repeat(3, 10px); gap: 3px; width: 36px; }
.clue-peg { width: 10px; height: 10px; border-radius: 50%; background: transparent; }
.clue-peg.black { background: #111; box-shadow: 0 0 0 1px rgba(255,255,255,0.4); }
.clue-peg.white { background: #fff; box-shadow: 0 0 0 1px rgba(0,0,0,0.4); }

/* Current guess */
.cb-current { display: flex; gap: 10px; justify-content: center; margin-bottom: 1rem; }

/* Palette */
.cb-palette { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-bottom: 1rem; }
.swatch-btn { width: 40px; height: 40px; border-radius: 50%; border: 3px solid rgba(255,255,255,0.5); cursor: pointer; box-shadow: inset 0 -3px 6px rgba(0,0,0,0.3); transition: transform 0.1s ease; }
.swatch-btn:hover { transform: scale(1.12); }

.actions { display: flex; gap: 0.5rem; justify-content: center; flex-wrap: wrap; }
.btn-action {
  font: inherit; font-weight: 700; padding: 0.55rem 1rem; border-radius: 999px; border: 2px solid var(--card-border);
  background: var(--card); color: var(--text); cursor: pointer; box-shadow: var(--shadow); transition: transform 0.15s ease;
}
.btn-action:hover { transform: translateY(-2px); }
.btn-action.go { background: linear-gradient(90deg, var(--primary), var(--accent)); color: white; border: none; }

.feedback { min-height: 1.4em; font-weight: 700; margin-top: 0.75rem; }
.feedback.good { color: #2e8b3a; } .feedback.bad { color: #b32b2b; }

.cb-reveal { display: flex; gap: 10px; justify-content: center; margin: 1rem 0; }

@media (max-width: 460px) { .peg, .swatch-btn { width: 32px; height: 32px; } }
