/* Creador de vistas — estilos propios */
.vx-pagina { --alz: #f39a2e; --pla: #5cc46a; --per: #3b7be0; --alz-ink: #b5600a; --pla-ink: #237a33; --per-ink: #1f56b0; }
.vx { width: 100%; max-width: 1320px; margin: 0 auto; padding: 32px 20px 90px; box-sizing: border-box; }
.vx *, .vx *::before, .vx *::after { box-sizing: border-box; }
.vx-cabecera { margin-bottom: 18px; }
.vx-titulo { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; }
.vx-etiqueta { margin: 0 0 6px; font-size: 12px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--sec); }
.vx h1 { font-family: Fraunces, Georgia, serif; font-size: clamp(32px, 4.4vw, 52px); line-height: 1.05; margin: 0; color: var(--sec-ink); letter-spacing: -.02em; }
.vx-intro { max-width: 640px; color: var(--ink-2); margin: 10px 0 0; font-size: 16px; line-height: 1.55; }
.vx-leyenda { display: flex; gap: 8px; flex-wrap: wrap; }
.vx-leyenda span { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); font-weight: 600; font-size: 13px; color: var(--ink); }
.vx-leyenda small { font-weight: 500; color: var(--ink-3); }
.vx-leyenda i { width: 14px; height: 14px; border-radius: 4px; display: inline-block; }

.vx-pestanas { display: flex; gap: 6px; margin-top: 24px; padding: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; overflow-x: auto; box-shadow: var(--shadow-sm); }
.vx-pestanas button { flex: 1 0 auto; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 16px; border: 0; border-radius: 11px; background: transparent; font: 600 15px Inter, system-ui, sans-serif; color: var(--ink-2); cursor: pointer; white-space: nowrap; transition: background var(--dur), color var(--dur); }
.vx-pestanas button b { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--wash); font-size: 12px; color: var(--ink-3); }
.vx-pestanas button:hover { background: var(--wash); color: var(--ink); }
.vx-pestanas button[aria-selected="true"] { background: var(--sec-ink); color: #fff; }
.vx-pestanas button[aria-selected="true"] b { background: rgba(255,255,255,.18); color: #fff; }
.vx-panel { margin-top: 18px; }
.vx-panel[hidden] { display: none; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 9px 14px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--surface); color: var(--ink); font: 600 14px Inter, system-ui, sans-serif; cursor: pointer; transition: background var(--dur), border-color var(--dur), transform .12s; text-decoration: none; }
.btn:hover { background: var(--wash); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-fuerte { background: var(--sec); border-color: var(--sec); color: #fff; }
.btn-fuerte:hover { background: var(--sec-ink); }
.btn.ancho { width: 100%; }
.vx button:focus-visible, .vx select:focus-visible, .vx input:focus-visible, .tambor:focus-visible { outline: 3px solid color-mix(in srgb, var(--sec) 55%, transparent); outline-offset: 2px; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { padding: 7px 13px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface); font: 600 13px Inter, system-ui, sans-serif; color: var(--ink-2); cursor: pointer; }
.chip[aria-pressed="true"] { background: var(--sec-bg); border-color: var(--sec); color: var(--sec-ink); }
.mini-sel { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.vx select, .vx input[type=text] { font: 500 14px Inter, system-ui, sans-serif; padding: 8px 10px; border: 1px solid var(--line-2); border-radius: 9px; background: var(--surface); color: var(--ink); max-width: 100%; }

/* ---------- Tambor ---------- */
.tambor-barra { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.tambor-acciones { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.tambor { position: relative; margin-top: 12px; height: 190px; border-radius: 20px; background: linear-gradient(180deg, var(--surface), var(--wash)); border: 1px solid var(--line); overflow: hidden; perspective: 900px; box-shadow: inset 0 -18px 30px -24px rgba(23,19,15,.25); outline: none; }
.tambor::before, .tambor::after { content: ''; position: absolute; top: 0; bottom: 0; width: 18%; z-index: 2; pointer-events: none; }
.tambor::before { left: 0; background: linear-gradient(90deg, var(--wash), transparent); }
.tambor::after { right: 0; background: linear-gradient(270deg, var(--wash), transparent); }
.tambor-pista { position: absolute; inset: 0; transform-style: preserve-3d; pointer-events: none; }
.tambor { touch-action: pan-y; cursor: grab; }
.tambor-item { position: absolute; left: 50%; top: 14px; width: 150px; height: 160px; margin-left: -75px; padding: 8px 8px 6px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm); display: flex; flex-direction: column; align-items: center; cursor: pointer; transition: transform .45s var(--ease), opacity .45s var(--ease), box-shadow .3s, border-color .3s; user-select: none; -webkit-user-select: none; }
.tambor-item svg { width: 100%; height: 104px; display: block; }
.tambor-item .t-nombre { font-size: 12.5px; font-weight: 700; color: var(--ink); text-align: center; line-height: 1.2; margin-top: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.tambor-item .t-nivel { font-size: 10.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; margin-top: 2px; }
.tambor-item.activo { border-color: var(--sec); box-shadow: 0 16px 34px -18px rgba(23,40,80,.55), 0 0 0 3px color-mix(in srgb, var(--sec) 25%, transparent); }
.tambor-flecha { position: absolute; top: 50%; transform: translateY(-50%); z-index: 3; width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line-2); background: var(--surface); font-size: 26px; line-height: 1; color: var(--ink); cursor: pointer; box-shadow: var(--shadow-sm); }
.tambor-flecha.izq { left: 12px; } .tambor-flecha.der { right: 12px; }
.tambor-vacio { position: absolute; inset: 0; display: grid; place-items: center; color: var(--ink-3); font-size: 14px; text-align: center; padding: 20px; }
.n-facil { color: #237a33; } .n-media { color: #b5600a; } .n-dificil { color: #b4232c; }

/* ---------- Visor ---------- */
.visor-rejilla { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(320px, 1fr); gap: 18px; margin-top: 18px; align-items: start; }
.visor-3d-caja, .visor-info, .fichas-ajustes, .editor-herr, .editor-vistas, .reto, .explica-col { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow-sm); }
.visor-3d-caja { padding: 10px; }
.visor-3d, .editor-3d { position: relative; width: 100%; aspect-ratio: 4 / 3.2; min-height: 340px; border-radius: 14px; overflow: hidden; background: radial-gradient(ellipse at 50% 30%, #fff 0%, #f1ede5 100%); touch-action: none; }
.visor-3d canvas, .editor-3d canvas { display: block; }
.visor-carga { position: absolute; inset: 0; display: grid; place-items: center; margin: 0; color: var(--ink-3); font-size: 14px; text-align: center; padding: 20px; }
.visor-barra { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
.grupo-btn { display: inline-flex; border: 1px solid var(--line-2); border-radius: 10px; overflow: hidden; background: var(--surface); }
.grupo-btn button { border: 0; border-right: 1px solid var(--line); background: transparent; padding: 8px 12px; font: 600 13px Inter, system-ui, sans-serif; color: var(--ink-2); cursor: pointer; }
.grupo-btn button:last-child { border-right: 0; }
.grupo-btn button:hover { background: var(--wash); }
.grupo-btn .c-alz { box-shadow: inset 0 -3px 0 var(--alz); } .grupo-btn .c-pla { box-shadow: inset 0 -3px 0 var(--pla); } .grupo-btn .c-per { box-shadow: inset 0 -3px 0 var(--per); }
.abatir { display: flex; align-items: center; gap: 10px; }
.abatir input[type=range] { width: 120px; accent-color: var(--sec); }
.visor-opciones { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 10px; font-size: 13.5px; color: var(--ink-2); }
.visor-opciones label { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.visor-opciones input { accent-color: var(--sec); width: 16px; height: 16px; }
.visor-opciones.compacto { margin-top: 6px; }
.visor-info { padding: 18px; }
.info-cab { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.info-cab h2 { margin: 2px 0 0; font-family: Fraunces, Georgia, serif; font-size: 26px; color: var(--sec-ink); line-height: 1.1; }
.nivel { display: inline-block; font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; padding: 3px 9px; border-radius: 999px; background: var(--wash); }
.nivel.n-facil { background: #e3f4e6; } .nivel.n-media { background: #fdebd5; } .nivel.n-dificil { background: #fbe0e1; }
.info-num { font-size: 12px; color: var(--ink-3); font-weight: 600; white-space: nowrap; }
.info-pista { margin: 10px 0 0; padding: 10px 12px; border-radius: 12px; background: var(--sec-bg); color: var(--sec-ink); font-size: 14px; line-height: 1.5; }
.info-pista:empty { display: none; }
.info-pista::before { content: 'Pista: '; font-weight: 700; }
.vistas-caja { margin-top: 12px; border: 1px dashed var(--line-2); border-radius: 14px; padding: 10px; background: #fff; }
.vistas-caja svg { width: 100%; height: auto; max-height: 420px; display: block; }
.info-acciones { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.explica { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin-top: 22px; }
.explica-col { padding: 18px 20px; }
.explica h3 { margin: 0 0 8px; font-size: 17px; color: var(--sec-ink); }
.explica p, .explica li { font-size: 14.5px; line-height: 1.6; color: var(--ink-2); margin: 0 0 8px; }
.explica ol { padding-left: 20px; margin: 0 0 8px; }
.t-alz { color: var(--alz-ink); } .t-pla { color: var(--pla-ink); } .t-per { color: var(--per-ink); }

/* ---------- Fichas ---------- */
.fichas-rejilla { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 20px; align-items: start; }
.fichas-ajustes { padding: 16px 18px; position: sticky; top: 12px; max-height: calc(100vh - 24px); overflow: auto; }
.fichas-ajustes h2, .editor-herr h2, .editor-vistas h2 { font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); margin: 0 0 10px; }
.fichas-ajustes fieldset { border: 0; border-top: 1px solid var(--line); margin: 0; padding: 12px 0 10px; display: grid; gap: 10px; }
.fichas-ajustes legend { font-weight: 800; font-size: 14px; color: var(--sec-ink); padding: 0 0 4px; }
.fichas-ajustes label { display: grid; gap: 4px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.fichas-ajustes label.check { display: flex; align-items: center; gap: 8px; font-weight: 500; }
.fichas-ajustes label.radio { display: flex; gap: 8px; align-items: flex-start; font-weight: 500; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; }
.fichas-ajustes label.radio:has(input:checked) { border-color: var(--sec); background: var(--sec-bg); }
.fichas-ajustes label.radio span { display: grid; gap: 2px; }
.fichas-ajustes label.radio small { color: var(--ink-3); font-weight: 500; font-size: 12px; line-height: 1.35; }
.fichas-ajustes input[type=checkbox], .fichas-ajustes input[type=radio] { accent-color: var(--sec); width: 16px; height: 16px; margin-top: 2px; }
.campo-fila { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.fichas-botones { border-top: 1px solid var(--line); padding-top: 14px; }
.nota { font-size: 12px; color: var(--ink-3); margin: 8px 0 0; line-height: 1.4; }
.fichas-ayuda { margin: 0 0 10px; font-size: 13.5px; color: var(--ink-3); }
.hojas { display: grid; gap: 22px; justify-items: center; }
.hoja { width: 100%; max-width: 820px; aspect-ratio: 210 / 297; background: #fff; box-shadow: 0 2px 4px rgba(0,0,0,.06), 0 18px 40px -20px rgba(0,0,0,.35); border-radius: 4px; padding: 3.8%; display: flex; flex-direction: column; color: #111; font-family: Inter, system-ui, sans-serif; container-type: inline-size; }
.hoja-cab { display: flex; justify-content: space-between; align-items: flex-end; gap: 2cqw; border-bottom: 0.25cqw solid #111; padding-bottom: 1.2cqw; margin-bottom: 1.6cqw; }
.hoja-cab .ti { font-weight: 800; font-size: 2.4cqw; letter-spacing: .03em; }
.hoja-cab .st { font-size: 1.7cqw; color: #444; margin-top: .4cqw; }
.hoja-cab .campos { display: flex; gap: 2.4cqw; font-size: 1.7cqw; }
.hoja-cab .campos span { display: inline-flex; gap: .8cqw; align-items: flex-end; white-space: nowrap; }
.hoja-cab .campos i { display: inline-block; border-bottom: 0.15cqw solid #333; width: 15cqw; height: 1.6cqw; }
.hoja-cab .campos i.corto { width: 8cqw; }
.hoja-cuerpo { flex: 1; display: grid; border-top: 0.2cqw solid #111; border-left: 0.2cqw solid #111; min-height: 0; }
.tarjeta { position: relative; border-right: 0.2cqw solid #111; border-bottom: 0.2cqw solid #111; min-width: 0; min-height: 0; overflow: hidden; }
.tarjeta.fija::before { content: 'Fija'; position: absolute; top: 5px; left: 6px; font: 700 10px Inter, system-ui, sans-serif; letter-spacing: .06em; text-transform: uppercase; color: var(--sec); background: var(--sec-bg); padding: 2px 6px; border-radius: 6px; }
@media print { .tarjeta.fija::before { display: none; } }
.tarjeta svg { width: 100%; height: 100%; display: block; }
.tarjeta-acc { position: absolute; top: 6px; right: 6px; display: flex; gap: 4px; opacity: 0; transition: opacity .2s; }
.tarjeta:hover .tarjeta-acc, .tarjeta:focus-within .tarjeta-acc { opacity: 1; }
.tarjeta-acc button { border: 1px solid var(--line-2); background: #fff; border-radius: 8px; padding: 4px 8px; font: 600 12px Inter, system-ui, sans-serif; cursor: pointer; box-shadow: var(--shadow-sm); }
.hoja-pie { display: flex; justify-content: space-between; font-size: 1.3cqw; color: #666; margin-top: 1cqw; }
.hoja.solucion .hoja-cab .ti::after { content: ' · SOLUCIONES'; color: #b4232c; }

/* ---------- Editor ---------- */
.editor-rejilla { display: grid; grid-template-columns: 230px minmax(0, 1fr) 320px; gap: 16px; align-items: start; }
.editor-herr, .editor-vistas { padding: 14px; }
.herr-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-bottom: 16px; }
.herr-btns button { display: flex; align-items: center; gap: 6px; padding: 8px 9px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--surface); font: 600 13px Inter, system-ui, sans-serif; color: var(--ink-2); cursor: pointer; text-align: left; }
.herr-btns button span { display: inline-grid; place-items: center; width: 20px; font-size: 15px; }
.herr-btns button[aria-pressed="true"] { background: var(--sec-ink); border-color: var(--sec-ink); color: #fff; }
.formas { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.formas button { border: 1px solid var(--line-2); background: var(--surface); border-radius: 10px; padding: 4px 2px 3px; cursor: pointer; font: 600 10.5px Inter, system-ui, sans-serif; color: var(--ink-2); display: grid; justify-items: center; }
.formas button svg { width: 100%; height: 46px; }
.formas button[aria-pressed="true"] { border-color: var(--sec); background: var(--sec-bg); color: var(--sec-ink); box-shadow: 0 0 0 2px color-mix(in srgb, var(--sec) 30%, transparent); }
.formas-giro { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; margin: 8px 0 16px; }
.formas-giro .btn { padding: 7px 4px; font-size: 12px; }
.pieza-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-bottom: 12px; }
.pieza-btns .btn { padding: 8px 6px; font-size: 12.5px; }
.pieza-btns #ed-vaciar { grid-column: 1 / -1; }
label.mini { display: grid; gap: 4px; font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.ayuda-editor { font-size: 12.5px; line-height: 1.45; color: var(--ink-3); margin: 12px 0 0; }
.editor-centro { min-width: 0; }
.editor-3d { aspect-ratio: auto; height: min(68vh, 640px); border: 1px solid var(--line); }
.editor-aviso { position: absolute; left: 12px; bottom: 12px; right: 12px; padding: 8px 12px; border-radius: 10px; background: #fff7e0; border: 1px solid #f0d58a; color: #6b4c00; font-size: 13px; }
.editor-guardar { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; align-items: center; }
.editor-guardar input[type=text] { flex: 1 1 160px; }
.ed-iso { margin-top: 10px; border: 1px dashed var(--line-2); border-radius: 14px; background: #fff; padding: 6px; }
.ed-iso svg { width: 100%; height: 150px; display: block; }
.ed-datos { font-size: 12.5px; color: var(--ink-3); margin-top: 8px; line-height: 1.5; }
.mt { margin-top: 18px !important; }
.mis-piezas { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.mis-piezas .mp { position: relative; border: 1px solid var(--line); border-radius: 10px; background: #fff; padding: 3px; cursor: pointer; text-align: center; font-size: 10.5px; font-weight: 600; color: var(--ink-2); }
.mis-piezas .mp svg { width: 100%; height: 58px; display: block; }
.mis-piezas .mp .borrar { position: absolute; top: 2px; right: 2px; width: 20px; height: 20px; border-radius: 50%; border: 1px solid var(--line-2); background: #fff; font-size: 11px; line-height: 1; cursor: pointer; display: none; }
.mis-piezas .mp:hover .borrar, .mis-piezas .mp:focus-within .borrar { display: block; }
.mis-piezas .vacio { grid-column: 1 / -1; font-size: 12.5px; color: var(--ink-3); margin: 0; }

/* ---------- Reto ---------- */
.reto { padding: 18px; }
.reto-cab { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; }
.reto-marcador { display: flex; gap: 14px; font-size: 13.5px; color: var(--ink-3); }
.reto-marcador b { color: var(--sec-ink); font-size: 18px; }
.reto-cuerpo { margin-top: 16px; }
.reto-enunciado { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 18px; align-items: center; }
.reto-enunciado .pregunta { font-family: Fraunces, Georgia, serif; font-size: clamp(22px, 2.6vw, 30px); color: var(--sec-ink); line-height: 1.2; margin: 0; }
.reto-enunciado .pregunta small { display: block; font-family: Inter, system-ui, sans-serif; font-size: 14px; color: var(--ink-3); margin-top: 8px; line-height: 1.5; }
.reto-figura { border: 1px dashed var(--line-2); border-radius: 16px; background: #fff; padding: 10px; }
.reto-figura svg { width: 100%; height: 260px; display: block; }
.reto-opciones { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 18px; }
.reto-op { position: relative; border: 2px solid var(--line); border-radius: 16px; background: #fff; padding: 10px; cursor: pointer; transition: border-color .2s, transform .15s, box-shadow .2s; }
.reto-op:hover:not(:disabled) { border-color: var(--sec); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.reto-op svg { width: 100%; height: 150px; display: block; }
.reto-op .letra { position: absolute; top: 8px; left: 10px; font-weight: 800; color: var(--ink-3); }
.reto-op.bien { border-color: #2e9b47; background: #effaf1; }
.reto-op.mal { border-color: #d0383f; background: #fdf0f0; }
.reto-op:disabled { cursor: default; }
.reto-pie { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 16px; flex-wrap: wrap; }
.reto-pie p { margin: 0; font-size: 15px; font-weight: 600; color: var(--ink-2); min-height: 1.4em; }

/* ---------- Selector y aviso ---------- */
.selector { position: fixed; inset: 0; z-index: 1000; background: rgba(20,16,12,.45); display: grid; place-items: center; padding: 20px; }
.selector[hidden] { display: none; }
.selector-caja { background: var(--surface); border-radius: 20px; width: min(980px, 100%); max-height: 86vh; display: flex; flex-direction: column; box-shadow: var(--shadow-lg); }
.selector-cab { display: flex; justify-content: space-between; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.selector-cab h2 { margin: 0; font-size: 18px; }
.selector-lista { overflow: auto; padding: 14px 18px 20px; display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
.selector-lista h3 { grid-column: 1 / -1; margin: 8px 0 0; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.selector-lista button { border: 1px solid var(--line); border-radius: 12px; background: #fff; padding: 6px; cursor: pointer; font: 600 12px Inter, system-ui, sans-serif; color: var(--ink-2); }
.selector-lista button:hover { border-color: var(--sec); }
.selector-lista svg { width: 100%; height: 80px; display: block; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 30px); background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 12px; font-size: 14px; font-weight: 600; opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s; z-index: 1100; max-width: calc(100% - 32px); }
.toast.ver { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Pantallas pequeñas ---------- */
@media (max-width: 1100px) {
  .editor-rejilla { grid-template-columns: 210px minmax(0, 1fr); }
  .editor-vistas { grid-column: 1 / -1; }
  .editor-vistas .vistas-caja svg { max-height: 300px; }
}
@media (max-width: 900px) {
  .visor-rejilla, .fichas-rejilla { grid-template-columns: 1fr; }
  .fichas-ajustes { position: static; max-height: none; }
  .explica { grid-template-columns: 1fr; }
  .reto-opciones { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .reto-enunciado { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
  .vx { padding: 20px 16px 70px; }
  .editor-rejilla { grid-template-columns: 1fr; }
  .editor-3d { height: 58vh; }
  .tambor { height: 170px; }
  .tambor-item { width: 128px; height: 142px; margin-left: -64px; }
  .tambor-item svg { height: 88px; }
  .visor-3d { min-height: 300px; }
  .tarjeta-acc { opacity: 1; }
  .vx-pestanas button { flex: 0 0 auto; }
}

/* ---------- Imprimir: solo las hojas ---------- */
@media print {
  @page { size: A4 portrait; margin: 0; }
  body.vx-pagina { background: #fff !important; display: block !important; min-height: 0 !important; }
  body.vx-pagina > *:not(.page-body) { display: none !important; }
  body.vx-pagina .page-body::before, body.vx-pagina .page-body::after { display: none; }
  .vx > *:not(#t-fichas), .fichas-ajustes, .fichas-ayuda { display: none !important; }
  #t-fichas { display: block !important; margin: 0; }
  .fichas-rejilla { display: block; }
  #hojas { display: block; width: 210mm; }
  .vx { padding: 0; max-width: none; margin: 0; }
  .hoja { width: 210mm; height: 297mm; max-width: none; aspect-ratio: auto; box-shadow: none; border-radius: 0; padding: 8mm; page-break-after: always; break-after: page; }
  .hoja:last-child { page-break-after: auto; break-after: auto; }
  .tarjeta-acc { display: none !important; }
}
.tambor-pista.sin-trans .tambor-item { transition: none; }
.visor-rejilla > *, .fichas-rejilla > *, .editor-rejilla > *, .explica > * { min-width: 0; }
.grupo-btn { max-width: 100%; overflow-x: auto; }
.grupo-btn button { white-space: nowrap; }
@media (max-width: 520px) {
  .abatir { width: 100%; }
  .abatir input[type=range] { flex: 1; }
  .info-acciones .btn, .editor-guardar .btn { flex: 1 1 auto; }
}

.vistas-tapa-barra { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.vistas-tapa-barra p { margin: 0; font-size: 13.5px; color: var(--ink-2); }
.btn-mini { padding: 6px 10px; font-size: 12.5px; }
.vistas-tapa-barra + .vistas-caja { margin-top: 8px; }
#vistas-caja [data-vista] { outline: none; }
#vistas-caja [data-vista]:hover > rect, #vistas-caja [data-vista]:focus-visible > rect { stroke-width: 0.1; }
#vistas-caja .tapada:hover > rect { fill: #faf7f1; }

.ed-datos .reglas { margin-top: 8px; padding: 8px 10px; border-radius: 10px; background: #fff7e0; border: 1px solid #f0d58a; color: #5b4200; font-size: 12.5px; line-height: 1.45; }
.ed-datos .reglas.ok { background: #eaf7ed; border-color: #b9e2c2; color: #1f5f2e; }
.ed-datos .reglas ul { margin: 4px 0 0; padding-left: 18px; }
