/* Click-Through Builder styles */
.cb-wrap { max-width: 1100px; margin: 0 auto; padding: 20px 24px 60px; }
.cb-tabs { display: flex; gap: 8px; margin: 18px 0; flex-wrap: wrap; }
.cb-tab { background: var(--surface); border: 2px solid var(--line); border-radius: 12px; padding: 10px 18px; font-size: 1rem; font-weight: 600; font-family: inherit; color: var(--muted); cursor: pointer; }
.cb-tab.active { border-color: var(--primary); color: var(--primary-dark); }
.cb-pane { display: none; }
.cb-pane.active { display: block; }

.cb-editor { display: grid; grid-template-columns: 320px 1fr; gap: 20px; align-items: start; }
@media (max-width: 900px) { .cb-editor { grid-template-columns: 1fr; } }
.cb-side { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; }
.cb-label { display: block; font-weight: 600; margin: 10px 0 4px; font-size: .9rem; }
.cb-input { width: 100%; padding: 10px 12px; border: 2px solid var(--line); border-radius: 10px; font-size: 1rem; font-family: inherit; }
.cb-actions { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }

.cb-canvas-wrap { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px; }
.cb-canvas { position: relative; display: inline-block; max-width: 100%; cursor: crosshair; }
.cb-canvas img { max-width: 100%; height: auto; display: block; border-radius: 8px; }
.cb-box { position: absolute; border: 3px solid #ff7a00; background: rgba(255, 122, 0, .18); border-radius: 6px; pointer-events: none; }
.cb-hintbox { border: 3px dashed #178a4c; background: rgba(23, 138, 76, .12); }
.cb-canvas-hint { color: var(--muted); font-size: .9rem; margin-top: 8px; }

.cb-steps { margin-top: 14px; display: flex; flex-direction: column; gap: 8px; }
.cb-step {
  background: #f6f8fd; border-radius: 10px; padding: 8px 10px; font-size: .9rem;
  display: flex; align-items: center; gap: 10px;
}
.cb-step .thumb { width: 48px; height: 32px; object-fit: cover; border-radius: 6px; }
.cb-step .cap { flex: 1; }
.cb-step button { background: transparent; border: none; cursor: pointer; color: var(--bad); font-size: 1.1rem; }

.cb-player { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; max-width: 760px; }
.cb-play-canvas { position: relative; display: inline-block; max-width: 100%; cursor: pointer; }
.cb-play-canvas img { max-width: 100%; height: auto; display: block; border-radius: 8px; }
.cb-play-caption { font-size: 1.1rem; font-weight: 600; margin: 12px 0; }
.cb-play-feedback { margin-top: 10px; font-weight: 600; min-height: 24px; }
.cb-play-feedback.good { color: var(--good); }
.cb-play-feedback.bad { color: var(--bad); }
.cb-play-progress { color: var(--muted); font-size: .9rem; }

.cb-lib { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.cb-libcard { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; }
.cb-libcard h3 { margin: 0 0 6px; }
.cb-libcard p { color: var(--muted); font-size: .9rem; margin: 0 0 10px; }
.cb-libcard .actions { display: flex; gap: 8px; flex-wrap: wrap; }
