/* La redonda explosiva: arena con los dos lados, la redonda con la mecha y la tarjeta de la pregunta */
:root { --rojo: #c73a2b; --azul: #2d63b8; }
.oculto { display: none !important; }
.rx-dos { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 600px) { .rx-dos { grid-template-columns: 1fr; } }
.setup-opts { display: flex; flex-direction: column; gap: 16px; flex: none; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  min-height: 44px; padding: 8px 14px; border-radius: 999px; font-size: 15px; font-weight: 800;
  background: var(--orange-soft); color: var(--orange-dark); box-shadow: inset 0 0 0 2px transparent;
}
.chip.on { background: #2b1d16; color: #fff; }

.niveles { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.nivel-btn {
  min-height: 54px; border-radius: 14px; background: var(--orange-soft); color: var(--orange-dark);
  display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.05;
}
.nivel-btn b { font-size: 22px; font-weight: 900; }
.nivel-estado { font-size: 13px; min-height: 1em; }
.nivel-btn.ganado .nivel-estado { color: #d99a00; }
.nivel-btn.on { background: #fff; color: var(--orange-ink); box-shadow: inset 0 0 0 3px var(--orange), var(--shadow-sm); }
.nivel-btn:disabled { opacity: 0.45; }

/* ---------- arena ---------- */
.rx-body { max-width: 1100px; gap: 10px; }
.arena {
  position: relative; width: 100%; flex: none;
  display: grid; grid-template-columns: 1fr minmax(120px, 2.2fr) 1fr; align-items: center; gap: 8px;
  height: clamp(110px, 21vh, 190px);
}
.lado {
  height: 100%; border-radius: 20px; padding: 8px; color: #fff;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  opacity: 0.6; transform: scale(0.94);
  transition: opacity 0.25s, transform 0.25s var(--ease-out);
}
.lado-a { background: var(--rojo); }
.lado-b { background: var(--azul); }
.modo-solo .lado-a { background: #2f7d4a; }
.modo-solo .lado-b { background: #4a4a52; }
.lado.tiene { opacity: 1; transform: none; box-shadow: 0 0 0 4px #fff, 0 8px 20px rgba(0, 0, 0, 0.3); }
.lado-nombre { font-size: clamp(16px, 2.4vw, 26px); font-weight: 900; text-align: center; line-height: 1.05; }
.rondas { display: flex; gap: 6px; }
.rondas i { width: 16px; height: 16px; border-radius: 50%; border: 3px solid #fff; }
.rondas i.on { background: #ffd23f; border-color: #ffd23f; }

.pista-redonda { position: relative; height: 100%; }
.redonda { position: absolute; inset: 0; transition: transform 0.45s var(--ease-in-out); }
.redonda.en-a { transform: translateX(-32%); }
.redonda.en-b { transform: translateX(32%); }
.redonda.sin-anim { transition: none; }
.redonda-svg { width: 100%; height: 100%; overflow: visible; display: block; }
.redonda-mueve { position: absolute; top: 50%; left: 50%; height: 92%; aspect-ratio: 12 / 11; margin-top: -2%; translate: -50% -50%; }
.chispa { transform-origin: 100px 6px; animation: rx-chispa 0.32s steps(2) infinite; }
@keyframes rx-chispa { 0% { transform: scale(0.75) rotate(0deg); } 100% { transform: scale(1.2) rotate(35deg); } }
.prisa .redonda-mueve { animation: rx-tiembla 0.16s steps(2) infinite; }
.prisa .redonda-svg ellipse:first-of-type { fill: #8a1f12; }
@keyframes rx-tiembla { 0% { transform: translate(-3px, 1px) rotate(-4deg); } 100% { transform: translate(3px, -1px) rotate(4deg); } }
.boom .redonda { opacity: 0; transition: opacity 0.1s; }
/* segundos que le quedan, dentro de la cabeza de la redonda */
.segundos {
  position: absolute; left: 46.7%; top: 60%; translate: -50% -50%;
  font-size: clamp(26px, 5.4vh, 46px); font-weight: 900; color: #fff; font-variant-numeric: tabular-nums; line-height: 1;
  -webkit-text-stroke: 7px #2b1d16; paint-order: stroke fill;
}
.prisa .segundos { color: #ffd23f; }
.suma {
  position: absolute; left: 50%; top: 4%; translate: -50% 0; z-index: 3; pointer-events: none;
  font-size: clamp(18px, 3vh, 28px); font-weight: 900; color: #fff; background: #16a34a; border-radius: 999px; padding: 2px 10px;
}
.suma[hidden] { display: none; }
.suma.sube { animation: rx-suma 1s var(--ease-out) forwards; }
@keyframes rx-suma { 0% { transform: translateY(10px); opacity: 0; } 25% { transform: none; opacity: 1; } 100% { transform: translateY(-14px); opacity: 0; } }
.segmented.seg-5 { grid-template-columns: repeat(5, 1fr); }

.pum {
  position: absolute; top: 50%; z-index: 4; pointer-events: none;
  font-size: clamp(44px, 9vw, 96px); font-weight: 900; color: #ffd23f; letter-spacing: -2px;
  -webkit-text-stroke: 3px #2b1d16; text-shadow: 0 6px 0 #2b1d16;
  animation: rx-pum 0.6s var(--ease-out) both;
}
.pum-a { left: 18%; } .pum-b { left: 82%; }
.pum[hidden] { display: none; }
@keyframes rx-pum { 0% { transform: translate(-50%, -50%) scale(0.2) rotate(-12deg); opacity: 0; } 60% { transform: translate(-50%, -50%) scale(1.25) rotate(4deg); opacity: 1; } 100% { transform: translate(-50%, -50%) scale(1) rotate(-3deg); } }

/* ---------- pregunta ---------- */
.pregunta {
  flex: 1; min-height: 0; width: 100%; overflow-y: auto;
  background: #fffdf7; color: #2b1d16; border-radius: 22px; padding: clamp(12px, 2vw, 22px);
  box-shadow: 0 6px 0 rgba(60, 25, 5, 0.25); border-top: 10px solid var(--rojo);
  display: flex; flex-direction: column; align-items: center; gap: clamp(6px, 1.2vh, 12px); text-align: center;
}
.pregunta[data-lado="b"] { border-top-color: var(--azul); }
.modo-solo ~ .pregunta[data-lado="a"] { border-top-color: #2f7d4a; }
.modo-solo ~ .pregunta[data-lado="b"] { border-top-color: #4a4a52; }
.turno { font-size: clamp(15px, 1.8vw, 20px); font-weight: 900; color: var(--muted); }
.tema { font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.8px; color: var(--orange-ink); }
.enunciado { font-size: clamp(21px, 3vw, 36px); font-weight: 900; line-height: 1.15; max-width: 30ch; }
.visual { width: 100%; display: flex; justify-content: center; }
.visual[hidden] { display: none; }
.visual .staff { width: clamp(150px, 26vw, 260px); color: #2b1d16; }
.figs { display: flex; align-items: center; justify-content: center; gap: 6px 10px; flex-wrap: wrap; }
.figs .fig { height: clamp(56px, 9vh, 84px); width: auto; }
.figs .op { font-size: clamp(26px, 4vw, 40px); font-weight: 900; }
.compas { display: inline-flex; flex-direction: column; font-size: clamp(24px, 3.4vw, 36px); font-weight: 900; line-height: 0.9; margin-right: 6px; }
.hueco { display: inline-grid; place-items: center; width: 54px; height: 64px; border: 3px dashed #2b1d16; border-radius: 12px; font-size: 32px; font-weight: 900; }
.signo { font-family: Georgia, "Times New Roman", serif; font-style: italic; font-weight: 700; font-size: clamp(54px, 9vw, 90px); line-height: 1; }
.btn-oir { flex: none; }

.opciones { width: 100%; max-width: 820px; display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: auto; }
.opciones.n3 { grid-template-columns: repeat(3, 1fr); }
.opcion {
  min-height: clamp(54px, 9vh, 84px); padding: 8px 12px; border-radius: 16px;
  background: #fff; color: #2b1d16; font-size: clamp(18px, 2.4vw, 28px); font-weight: 900; line-height: 1.1;
  box-shadow: inset 0 0 0 3px #2b1d16, 0 5px 0 rgba(60, 25, 5, 0.3); touch-action: manipulation;
}
.opcion:not(:disabled):active { transform: translateY(3px); box-shadow: inset 0 0 0 3px #2b1d16, 0 2px 0 rgba(60, 25, 5, 0.3); }
.opcion:disabled { cursor: default; }
.opcion.is-correct, .opcion.bien, .opcion.es-la-buena { background: #16a34a; color: #fff; box-shadow: inset 0 0 0 3px #0f6b32, 0 5px 0 rgba(60, 25, 5, 0.3); }
.opcion.is-wrong, .opcion.mal { background: #dc2626; color: #fff; box-shadow: inset 0 0 0 3px #8f1717, 0 5px 0 rgba(60, 25, 5, 0.3); animation: rx-sacude 0.35s; }
@keyframes rx-sacude { 25% { transform: translateX(-7px); } 75% { transform: translateX(7px); } }
.opciones.piensa .opcion { animation: rx-piensa 0.9s steps(3) infinite; }
.opciones.piensa .opcion:nth-child(2) { animation-delay: 0.3s; }
.opciones.piensa .opcion:nth-child(3) { animation-delay: 0.6s; }
@keyframes rx-piensa { 0%, 100% { opacity: 1; } 50% { opacity: 0.55; } }

.explica {
  width: 100%; max-width: 820px; background: #fff4d6; border-radius: 16px; padding: 10px 14px;
  display: flex; align-items: center; gap: 12px; text-align: left; font-size: clamp(16px, 2vw, 22px); font-weight: 600; line-height: 1.3;
}
.explica[hidden] { display: none; }
.explica p { flex: 1; }
.explica .btn { flex: none; }

/* ---------- final ---------- */
.repaso { width: 100%; text-align: left; max-height: 40vh; overflow-y: auto; }
.repaso ul { list-style: none; display: grid; gap: 8px; margin-top: 6px; }
.repaso li { background: var(--orange-soft); border-radius: 12px; padding: 8px 10px; display: grid; gap: 2px; font-size: 15px; }
.repaso li b { color: var(--ok-ink); }
.repaso li small { color: var(--muted); font-size: 13px; }

@media (max-width: 600px) {
  .arena { grid-template-columns: 1fr 1.4fr 1fr; height: 96px; }
  .opciones, .opciones.n3 { grid-template-columns: 1fr 1fr; }
  .explica { flex-direction: column; align-items: stretch; }
}
@media (max-height: 560px) {
  .arena { height: 78px; }
  .opcion { min-height: 44px; }
}
@media (prefers-reduced-motion: reduce) {
  .chispa, .prisa .redonda-mueve, .opciones.piensa .opcion { animation: none; }
  .redonda { transition: none; }
}

/* botones de papel (recortes.js les pone .rc-btn): colores propios */
.recortes .rc-btn.nivel-btn { --rc-btn: #f6e3d3; color: #6f3f1f !important; }
.recortes .rc-strip.chip { --rc-strip: #f6e3d3; color: #6f3f1f !important; }
.recortes .rc-strip.chip.on { --rc-strip: #b8501c; color: #ffffff !important; }
html.recortes.halloween .rc-strip.chip.on { --rc-strip: #4a2a74; }
.recortes .rc-btn.chip.on, .recortes .rc-btn.nivel-btn.on { --rc-btn: #b8501c; color: #ffffff !important; }
html.recortes.halloween .rc-btn.chip.on, html.recortes.halloween .rc-btn.nivel-btn.on { --rc-btn: #4a2a74; }

/* pentagrama en tira de papel (staffSVG de concurso/notes.js) */
.recortes .staff.on-paper { --tira: #faf3e3; overflow: visible; color: #1d1410; }
.recortes .staff .tira-papel { fill: var(--tira); }
.recortes .staff .tira-fibra { fill: #fffefa; }
.recortes .staff .tira-sombra { fill: rgba(45, 18, 4, 0.34); }
.recortes .staff .tira-grano { opacity: 0.85; }
.recortes .staff.on-paper .hole { fill: var(--tira); }

/* en clase con iPads: los nombres de cada equipo y las opciones solo se ven (se contesta en los iPads) */
.miembros { font-size: clamp(11px, 1.3vw, 15px); font-weight: 700; opacity: 0.9; text-align: center; line-height: 1.2; max-height: 3.6em; overflow: hidden; padding: 0 4px; }
.pizarra .opcion:disabled { opacity: 1; }
