/* ============================================================
 * theme.css — TEMA de la guía LEY DE COULOMB (capa LIBRE).
 * Estilos de los widgets propios (prefijo lc-): laboratorio de cargas,
 * fórmula por toque, Reto ×2, resolvedor paso a paso y caza-errores;
 * más los visuales SVG estáticos y la tarjeta-definición del hero.
 * Andamiaje en assets/guia-components.css; solo variables --guia-*.
 * ============================================================ */

/* ===== Tarjeta-definición del hero (snippet-bait, en el DOM al cargar) ===== */
.lc-defcard { background: var(--guia-cream); border: 2px solid var(--guia-ink); border-radius: 14px; padding: 14px 18px; margin: 14px 0 0; }
.lc-defcard p { margin: 0; font-size: 17px; line-height: 1.55; }
.lc-defcard .lc-defk { margin-top: 6px; font-size: 17px; color: var(--guia-muted); font-weight: 600; }
.lc-defcard b { color: var(--guia-deep); }
.guia-reassure { font-size: 15px; line-height: 1.5; color: var(--guia-muted); margin: 2px 0 0; }

/* ===== Lead de cualquier widget ===== */
.lc-wg-lead { font-size: 17px; line-height: 1.5; color: var(--guia-deep); font-weight: 600; margin: 0 0 12px; }

/* ===== Visuales SVG estáticos ===== */
.lc-visual { background: #fff; border: 2px solid var(--guia-line); border-radius: 14px; padding: 10px; margin: 12px 0; }
.lc-visual svg { width: 100%; height: auto; display: block; }
.lc-cap-svg { font: 700 15px/1 system-ui, sans-serif; fill: var(--guia-ink); }
.lc-cap-svg.muted, .lc-cap-svg.muted2 { fill: var(--guia-muted); font-weight: 600; }
.lc-cap-svg.onland { fill: #fff; }

/* Cargas (compartidas por visuales y laboratorio) */
.lc-q circle { stroke-width: 3; }
.lc-q.pos circle { fill: var(--guia-orange); stroke: var(--guia-deep); }
.lc-q.neg circle { fill: var(--guia-navy); stroke: var(--guia-ink); }
.lc-q-sign { font: 800 26px/1 system-ui, sans-serif; fill: #fff; pointer-events: none; }
.lc-q.drag { cursor: grab; touch-action: none; }
.lc-q.drag:active { cursor: grabbing; }
.lc-q-mini { font: 800 19px/1 system-ui, sans-serif; fill: #fff; }
.lc-q-mini.pos-mini { fill: var(--guia-deep); }

/* Vectores de fuerza */
.lc-vec line { stroke-width: 5; stroke-linecap: round; }
.lc-vec.rep line { stroke: var(--guia-deep); } .lc-vec.rep polygon { fill: var(--guia-deep); }
.lc-vec.atr line { stroke: var(--guia-green-deep); } .lc-vec.atr polygon { fill: var(--guia-green-deep); }
.lc-guideline { stroke: var(--guia-line); stroke-width: 2.5; stroke-dasharray: 6 7; }

/* Visual escala de unidades */
.lc-esc rect { fill: var(--guia-cream); stroke: var(--guia-ink); stroke-width: 2; }
.lc-esc-big { font: 800 24px/1 system-ui, sans-serif; fill: var(--guia-deep); }
.lc-esc-arrow { font: 800 16px/1 system-ui, sans-serif; fill: var(--guia-muted); }

/* Visual globo / pelo / Tierra */
.lc-globo ellipse, .lc-globo path { fill: var(--guia-navy); }
.lc-globo.mini ellipse { fill: var(--guia-navy); }
.lc-pelo path, .lc-pelo-solo { stroke: var(--guia-deep); stroke-width: 3; stroke-linecap: round; }
.lc-tierra circle { fill: var(--guia-green-deep); stroke: var(--guia-ink); stroke-width: 2.5; }

/* ===== Leyenda de color (módulo de cálculo) ===== */
.lc-legend { display: flex; gap: 16px 18px; flex-wrap: wrap; align-items: center; background: #fff; border: 1.5px solid var(--guia-line); border-radius: 12px; padding: 10px 14px; font-size: 15px; font-weight: 600; }
.lc-legend .it { display: flex; gap: 8px; align-items: center; }
.lc-legend .it b { font-weight: 800; }
.lc-legend .sw { width: 17px; height: 17px; border-radius: 5px; flex: 0 0 auto; }
.lc-legend .sw.inc { background: var(--guia-orange); border: 2px solid var(--guia-deep); }
.lc-legend .sw.qq { background: var(--guia-navy); }
.lc-legend .sw.rr { background: var(--guia-green-deep); }

/* ===== Tarjeta base de widget ===== */
.lc-lab, .lc-fparts, .lc-reto, .lc-solver, .lc-caza {
  display: grid; gap: 12px; padding: 16px;
  border: 2px solid var(--guia-ink); border-radius: 14px; background: var(--guia-cream);
  margin: 2px 0;
}

/* ===== Laboratorio de cargas ===== */
.lc-lab-stage { background: #fff; border: 2px solid var(--guia-line); border-radius: 12px; padding: 4px; }
.lc-lab-stage svg { width: 100%; height: auto; display: block; touch-action: none; }
.lc-lab-controls { display: flex; gap: 14px 22px; flex-wrap: wrap; align-items: center; justify-content: center; }
.lc-lab-side { display: grid; gap: 6px; justify-items: center; }
.lc-lab-cap { font-size: 13px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--guia-muted); }
.lc-lab-row { display: flex; gap: 8px; align-items: center; }
.lc-lab-btn { font: inherit; font-weight: 800; font-size: 19px; width: 44px; height: 44px; border: 2px solid var(--guia-ink); border-radius: 10px; background: #fff; color: var(--guia-ink); cursor: pointer; box-shadow: 2px 2px 0 var(--guia-ink); transition: transform .1s, box-shadow .1s; }
.lc-lab-btn:hover { transform: translate(-1px, -1px); box-shadow: 3px 3px 0 var(--guia-ink); }
.lc-lab-btn:active { transform: translate(0, 0); box-shadow: 1px 1px 0 var(--guia-ink); }
.lc-lab-mag { font-size: 17px; font-weight: 800; color: var(--guia-navy); min-width: 56px; text-align: center; }
.lc-lab-read { display: grid; gap: 2px; justify-items: center; background: #fff; border: 2px solid var(--guia-line); border-radius: 12px; padding: 8px 16px; }
.lc-lab-read span { font-size: 15px; font-weight: 700; color: var(--guia-muted); }
.lc-lab-read .big { font-size: 19px; font-weight: 800; color: var(--guia-deep); }
.lc-lab-goals { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.lc-lab-goal { font-size: 15px; font-weight: 700; background: #fff; border: 2px dashed var(--guia-line); border-radius: 999px; padding: 6px 14px; color: var(--guia-muted); }
.lc-lab-goal.done { border: 2px solid var(--guia-green); color: var(--guia-green-deep); background: #e6f5ec; }
.lc-lab-status { font-size: 17px; line-height: 1.45; font-weight: 600; color: var(--guia-deep); text-align: center; margin: 0; min-height: 1.5em; }

/* ===== Fórmula por toque ===== */
.lc-fchips { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.lc-fchip { font: inherit; font-weight: 800; font-size: 21px; padding: 10px 18px; border: 2px solid var(--guia-ink); border-radius: 12px; background: #fff; cursor: pointer; box-shadow: 3px 3px 0 var(--guia-ink); transition: transform .1s, box-shadow .1s; }
.lc-fchip:hover { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--guia-ink); }
.lc-fchip.F { color: var(--guia-deep); }
.lc-fchip.k { color: var(--guia-ink); }
.lc-fchip.q { color: var(--guia-navy); }
.lc-fchip.r { color: var(--guia-green-deep); }
.lc-fchip.on { background: var(--guia-ink); color: #fff; box-shadow: 1px 1px 0 var(--guia-ink); transform: translate(2px, 2px); }
.lc-fcard { background: #fff; border: 2px solid var(--guia-line); border-radius: 12px; padding: 12px 16px; min-height: 64px; }
.lc-fcard p { margin: 0; font-size: 17px; line-height: 1.5; }
.lc-fcard .name { font-weight: 800; color: var(--guia-deep); margin-bottom: 4px; }
.lc-fcard .hint { color: var(--guia-muted); font-weight: 600; text-align: center; }

/* ===== Reto ×2 y caza-errores: cabecera común ===== */
.lc-reto-head, .lc-caza-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.lc-reto-tag { font-size: 13px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--guia-deep); }
.lc-reto-count { font-size: 15px; font-weight: 800; color: var(--guia-muted); }
.lc-reto-q { font-size: 17px; line-height: 1.45; font-weight: 700; margin: 0 0 10px; }
.lc-reto-opts .guia-opt { min-width: 76px; }

/* ===== Resolvedor paso a paso ===== */
.lc-solver-datos { font-size: 17px; line-height: 1.55; margin: 0; background: #fff; border: 1.5px solid var(--guia-line); border-radius: 10px; padding: 9px 13px; }
.lc-eq { font-size: 21px; text-align: center; background: #fff; border: 2px solid var(--guia-ink); border-radius: 12px; padding: 14px 12px; overflow-x: auto; }
.lc-flash { animation: lc-pop .45s ease; }
@keyframes lc-pop { 0% { transform: scale(.96); } 60% { transform: scale(1.03); } 100% { transform: scale(1); } }
.lc-solver-panel { display: grid; gap: 10px; }
.lc-prompt { font-size: 17px; line-height: 1.45; font-weight: 700; margin: 0; }
.lc-opts { display: flex; flex-wrap: wrap; gap: 8px; }
.lc-trace { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.lc-trace:empty { display: none; }
.lc-trace li { font-size: 17px; text-align: center; color: var(--guia-ink); background: #fff; border: 1.5px solid var(--guia-line); border-radius: 8px; padding: 7px 10px; overflow-x: auto; }

/* ===== Feedback y cierre (compartidos) ===== */
.lc-fb { font-size: 17px; line-height: 1.45; margin: 0; min-height: 1.2em; }
.lc-fb.ok { color: var(--guia-green-deep); font-weight: 700; }
.lc-fb.miss { color: var(--guia-deep); font-weight: 700; }
.lc-done { font-size: 18px; font-weight: 800; color: var(--guia-green-deep); text-align: center; background: #e6f5ec; border: 2px solid var(--guia-green); border-radius: 12px; padding: 14px; margin: 0; }

/* ===== Caza-errores ===== */
.lc-caza-st { font-size: 17px; font-weight: 700; margin: 0 0 4px; }
.lc-caza-hint { font-size: 15px; font-weight: 600; color: var(--guia-muted); margin: 0 0 8px; }
.lc-caza-lines { list-style: decimal inside; margin: 0 0 10px; padding: 0; display: grid; gap: 8px; }
.lc-caza-line { font: inherit; font-size: 17px; line-height: 1.5; text-align: left; width: 100%; padding: 10px 14px; border: 2px solid var(--guia-line); border-radius: 10px; background: #fff; cursor: pointer; transition: border-color .12s, transform .1s; }
.lc-caza-line:hover:not(:disabled) { border-color: var(--guia-navy); transform: translate(-1px, -1px); }
.lc-caza-line.right { border-color: var(--guia-green); background: #e6f5ec; }
.lc-caza-line.wrong { border-color: var(--guia-orange); background: var(--guia-cream); }
.lc-caza-line:disabled { cursor: default; }

/* ===== Responsive (360–540px): apilar controles, cero overflow ===== */
@media (max-width: 540px) {
  .lc-lab-controls { flex-direction: column; align-items: stretch; }
  .lc-lab-side { justify-items: stretch; text-align: center; }
  .lc-lab-row { justify-content: center; }
  .lc-fchip { font-size: 19px; padding: 9px 14px; }
  .lc-eq { font-size: 18px; }
}

@media print {
  .lc-lab, .lc-reto, .lc-solver, .lc-caza, .lc-fparts { display: none !important; }
}
