/* Scoped styles for Cuentos con Pictogramas */
#ccp, #ccp * { box-sizing: border-box; }
#ccp { font-family: system-ui, -apple-system, Segoe UI, Roboto, Noto Sans, sans-serif; }

#ccp .ccp-container { max-width: 860px; margin: 0 auto; padding: 16px; }
#ccp .ccp-title { font-size: clamp(22px, 5vw, 32px); margin: 4px 0 6px; }
#ccp .ccp-subtitle { color: #444; margin: 0 0 12px; }

#ccp .ccp-controls { display: grid; gap: 12px; margin: 8px 0 12px; }
#ccp .ccp-label { font-weight: 600; font-size: 14px; color: #222; }
#ccp .ccp-textarea { width: 100%; padding: 12px 14px; border: 1px solid #ccd1d5; border-radius: 12px; font-size: 16px; min-height: 140px; }

#ccp .ccp-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
#ccp .ccp-field { display: flex; align-items: center; justify-content: space-between; background: #f7f8fa; border: 1px solid #e6e9ef; padding: 10px 12px; border-radius: 12px; }
#ccp .ccp-switch { justify-content: space-between; }

#ccp .ccp-actions { display: flex; gap: 10px; flex-wrap: wrap; }
#ccp .ccp-button { padding: 10px 14px; border-radius: 12px; border: 1px solid #cfd6dd; background: #fff; cursor: pointer; font-weight: 700; }
#ccp .ccp-button.primary { background: #111827; color: #fff; border-color: #111827; }

#ccp .ccp-output { background: #fff; border: 1px solid #e6e9ef; border-radius: 14px; padding: 14px; box-shadow: 0 8px 24px rgba(0,0,0,.05); }

/* Rendered story */
#ccp .ccp-story { display: flex; flex-wrap: wrap; gap: 10px; }
#ccp .ccp-token { display: inline-flex; align-items: center; gap: 6px; background: #f9fafb; border: 1px solid #e5e7eb; padding: 8px 10px; border-radius: 12px; }
#ccp .ccp-picto { display: inline-flex; align-items: center; justify-content: center; width: 56px; height: 56px; border-radius: 12px; background: #fff; border: 1px solid #e5e7eb; }
#ccp .ccp-word { font-size: 14px; color: #111; }

/* Responsive */
@media (max-width: 720px) {
  #ccp .ccp-grid { grid-template-columns: 1fr; }
  #ccp .ccp-actions { flex-direction: column; }
  #ccp .ccp-button { width: 100%; }
  #ccp .ccp-container { padding: 12px; }
}
