/* =====================================================================
   STAGE PILOT — FIRMA VISUAL
   Idea: el material de una gira. Flight cases (asfalto y aluminio),
   cinta de marcar escenario (spike tape) para identificar bandas,
   setlists pegados en el suelo (Anton, letra de cartel) y la
   acreditación de backstage como puerta de entrada.
   Se carga después de estilos.css y redefine su aspecto.
   ===================================================================== */
@font-face { font-family: 'Fira Sans'; font-weight: 400; font-display: swap; src: url('../fonts/fira-400.woff') format('woff'); }
@font-face { font-family: 'Fira Sans'; font-weight: 500; font-display: swap; src: url('../fonts/fira-500.woff') format('woff'); }
@font-face { font-family: 'Fira Sans'; font-weight: 600; font-display: swap; src: url('../fonts/fira-600.woff') format('woff'); }
@font-face { font-family: 'Fira Sans'; font-weight: 700; font-display: swap; src: url('../fonts/fira-700.woff') format('woff'); }
@font-face { font-family: 'Anton'; font-weight: 400; font-display: swap; src: url('../fonts/anton-400.woff') format('woff'); }

:root {
  --asfalto: #24282D; --asfalto-2: #2E3339; --aluminio: #E6E9EC; --cinta: #F4C430; --cinta-borde: #D9A914;
  --sans: 'Fira Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --cartel: 'Anton', 'Fira Sans', Impact, 'Arial Narrow', sans-serif;
  --mono: var(--sans);
  --acento: var(--cinta); --tinta: var(--asfalto); /* tinta = texto sobre el color de acento */
  --radio: 8px; --radio-s: 5px;
  --sombra: none;
  --ok: #2E9E5B; --aviso: #C98A00; --error: #D63B2F;
}
[data-tema="claro"] {
  --bg: #E6E9EC; --bg-2: #DADFE4; --card: #FFFFFF; --card-2: #F1F3F5; --borde: #CBD2D9;
  --txt: #24282D; --txt-2: #56606B; --txt-3: #7D8791; --enlace: #1E5FA8; --acento-txt: var(--acento-claro, #8A6A00);
}
[data-tema="oscuro"] {
  --bg: #1B1E22; --bg-2: #22262B; --card: #262A30; --card-2: #2E333A; --borde: #3A4048;
  --txt: #ECEEF0; --txt-2: #A9B2BB; --txt-3: #7F8993; --enlace: #8EC1FF; --acento-txt: var(--acento-oscuro, #F4C430);
}

body { font-family: var(--sans); font-feature-settings: 'kern', 'liga'; letter-spacing: 0; }
a { color: var(--enlace); }
.num, time, .kpi strong, .cal-num, .dist, .tabla td, .tabla th { font-variant-numeric: tabular-nums lining-nums; }
::selection { background: var(--cinta); color: var(--tinta); }
:focus-visible { outline: 3px solid var(--cinta); outline-offset: 2px; }

/* ---------- Cartel (Anton) ---------- */
.titulo, .ficha-cab h1, .entrada h1 { font-family: var(--cartel); font-weight: 400; letter-spacing: .005em; line-height: 1.04; }
.titulo { font-size: clamp(2rem, 6vw, 2.6rem); }
.ficha-cab h1 { font-size: clamp(1.8rem, 5.5vw, 2.5rem); margin-top: 4px; }

/* Marca con corte de plantilla de flight case */
.marca { font-family: var(--cartel); font-weight: 400; letter-spacing: .04em; text-transform: uppercase; line-height: 1;
  -webkit-mask-image: linear-gradient(to bottom, #000 0 47%, transparent 47% 55%, #000 55%); mask-image: linear-gradient(to bottom, #000 0 47%, transparent 47% 55%, #000 55%); }

/* ---------- Etiquetas sin mayúsculas forzadas ---------- */
.campo > span, .lf > span, .etq, .caja h2, .mes-tit, .badge, .fecha-bloque small, .kpi span, .cab-txt small, .cal-dia-sem, .rol {
  text-transform: none; letter-spacing: 0;
}
.campo > span, .lf > span, .etq { font-size: .84rem; font-weight: 500; color: var(--txt-2); }
.badge { font-size: .74rem; font-weight: 600; border-radius: 4px; padding: 2px 7px; }

/* ---------- Cabecera = tapa del case (siempre asfalto) ---------- */
.cab { background: var(--asfalto); border-bottom: 3px solid var(--cinta); color: #fff; backdrop-filter: none; -webkit-backdrop-filter: none; }
.cab-txt strong { font-family: var(--cartel); font-weight: 400; font-size: 1.32rem; letter-spacing: .05em; text-transform: uppercase; color: #fff;
  -webkit-mask-image: linear-gradient(to bottom, #000 0 47%, transparent 47% 55%, #000 55%); mask-image: linear-gradient(to bottom, #000 0 47%, transparent 47% 55%, #000 55%); }
#cab-sub small { color: #AEB6BF; font-size: .8rem; }
#cab-sub select { background-color: var(--asfalto-2); color: #fff; border-color: #464C54; }
.logo { width: 38px; height: 38px; border-radius: 6px; background: var(--cinta); box-shadow: none; }
.logo span { background: none; color: var(--tinta); font-family: var(--cartel); font-weight: 400; font-size: 1.15rem; letter-spacing: .02em; padding: 0;
  -webkit-mask-image: linear-gradient(to bottom, #000 0 46%, transparent 46% 56%, #000 56%); mask-image: linear-gradient(to bottom, #000 0 46%, transparent 46% 56%, #000 56%); }
.logo.grande { width: 76px; height: 76px; border-radius: 12px; } .logo.grande span { font-size: 2.3rem; }
.rol { background: transparent; border: 1px solid #5B636C; color: #D5DAE0; font-weight: 600; border-radius: 4px; }
.cab .rol-admin, .cab .rol-responsable { background: var(--cinta); color: var(--tinta); border-color: var(--cinta); }
.cab .rol-editor { color: var(--cinta); border-color: var(--cinta); }
.rejilla .rol-admin, .contactos .rol-admin, .ficha .rol-admin, .pagina .rol-admin { background: var(--cinta); color: var(--tinta); border-color: var(--cinta-borde); }
.pagina .rol-editor { color: var(--acento-txt); border-color: currentColor; }
.pagina .rol, .pagina .rol-lector, .pagina .rol-consulta { color: var(--txt-2); border-color: var(--borde); }

/* ---------- Navegación = pie del case ---------- */
.nav { background: var(--asfalto); border-top: 0; backdrop-filter: none; -webkit-backdrop-filter: none; }
.nav a { color: #9AA3AD; font-weight: 500; font-size: .7rem; }
.nav a.activo { color: #fff; }
.nav a.activo::before { background: var(--cinta); height: 3px; width: 32px; border-radius: 0; }
@media (min-width: 900px) {
  .nav { border-right: 0; }
  .nav a.activo::before { width: 3px; height: 40px; top: 17px; }
}

/* ---------- Botones: rectangulares, el principal es cinta amarilla ---------- */
.btn { border-radius: var(--radio-s); font-weight: 600; font-size: .92rem; letter-spacing: 0; border-color: var(--borde); background: var(--card); }
.btn:hover { border-color: var(--txt-3); }
.btn.primary { background: var(--cinta); border-color: var(--cinta-borde); color: var(--tinta); }
.btn.primary:hover { filter: none; background: #F7CF4E; }
.btn.danger { color: var(--error); }
.btn.primary.danger, .modal .btn.danger:last-child { background: var(--error); border-color: var(--error); color: #fff; }
.ico-btn { border-radius: var(--radio-s); }
.chip-btn { border-radius: var(--radio-s); font-weight: 500; }
.chip-btn.on { background: var(--asfalto); border-color: var(--asfalto); color: #fff; }
[data-tema="oscuro"] .chip-btn.on { background: var(--cinta); border-color: var(--cinta); color: var(--tinta); }
.segmentado { border-radius: var(--radio-s); padding: 3px; }
.segmentado button { border-radius: 4px; font-weight: 500; }
.segmentado button.on { background: var(--asfalto); color: #fff; }
[data-tema="oscuro"] .segmentado button.on { background: var(--cinta); color: var(--tinta); }
.buscador { border-radius: var(--radio-s); }
input, select, textarea { border-radius: var(--radio-s); }
input:focus, select:focus, textarea:focus { border-color: var(--txt-2); box-shadow: 0 0 0 3px color-mix(in srgb, var(--cinta) 55%, transparent); }
.barra-guardar { border-radius: var(--radio); background: var(--asfalto); padding: 8px; }
.barra-guardar .btn.ghost { color: #fff; border-color: #5B636C; background: transparent; }

/* ---------- Hojas y paneles: papel sobre aluminio, sin sombras ---------- */
.caja, .form fieldset, .calendario, .lugar, .menu-item, .modal, .tiempo, .persona { border-radius: var(--radio); box-shadow: none; }
.caja h2 { font-size: 1rem; font-weight: 600; color: var(--txt); padding-bottom: 9px; margin-bottom: 12px; border-bottom: 1px solid var(--borde); }
.caja h2 small { font-weight: 400; }
.form legend { font-weight: 600; font-size: 1rem; }
.form fieldset.privado, .caja.privado { border-style: solid; border-color: var(--borde); background: repeating-linear-gradient(-45deg, transparent 0 14px, color-mix(in srgb, var(--cinta) 7%, transparent) 14px 28px), var(--card); }
.mapa, .mapa-demo { border-radius: var(--radio-s); }

/* ---------- Listas de hojas de ruta: filas sobre una hoja, como un itinerario ---------- */
.mes { margin-bottom: 26px; }
.mes-tit { font-family: var(--cartel); font-weight: 400; font-size: 1.35rem; color: var(--txt); margin-bottom: 8px; letter-spacing: .01em; }
.tarjetas:not(.grid) { gap: 0; background: var(--card); border: 1px solid var(--borde); border-radius: var(--radio); overflow: hidden; }
.tarjetas:not(.grid) .tarjeta { border: 0; border-radius: 0; box-shadow: none; border-bottom: 1px solid var(--borde); padding: 14px 14px 14px 10px; gap: 12px; position: relative; }
.tarjetas:not(.grid) .tarjeta:last-child { border-bottom: 0; }
.tarjetas:not(.grid) .tarjeta:hover { background: var(--card-2); }
.tarjetas:not(.grid) .tarjeta.t-hoy { box-shadow: inset 5px 0 0 var(--cinta); }
.tarjeta:active { transform: none; }
.tarjetas.grid .tarjeta { box-shadow: none; border-left-width: 1px; border-radius: var(--radio); }
.tarjetas.grid .tarjeta:hover { border-color: var(--txt-3); }

.fecha-bloque { width: 54px; background: transparent; padding: 0; justify-content: flex-start; }
.fecha-bloque strong { font-family: var(--cartel); font-weight: 400; font-size: 2.15rem; line-height: 1; letter-spacing: 0; }
.fecha-bloque small { font-size: .74rem; font-weight: 500; color: var(--txt-2); }
.fecha-bloque.grande { width: 70px; } .fecha-bloque.grande strong { font-size: 3rem; }
.t-cuerpo h3 { font-size: 1.04rem; font-weight: 600; margin: 3px 0 2px; }
.t-cuerpo p { font-size: .9rem; }
.t-grupos { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 6px !important; }
.t-hora { font-family: var(--sans); color: var(--txt); font-weight: 600; margin-left: 0; }

/* ---------- Cinta de banda (spike tape) ---------- */
.cinta { display: inline-block; padding: 3px 11px 3px 10px; background: var(--gc, var(--cinta)); color: var(--gt, #fff); font-weight: 700; font-size: .76rem; line-height: 1.25; white-space: nowrap;
  clip-path: polygon(0 0, 100% 0, calc(100% - 3px) 25%, 100% 50%, calc(100% - 3px) 75%, 100% 100%, 0 100%, 3px 75%, 0 50%, 3px 25%); }
.chip { border: 0; border-radius: 0; padding: 4px 12px; background: var(--gc); color: var(--gt, #fff); font-weight: 700; border-left: 0;
  clip-path: polygon(0 0, 100% 0, calc(100% - 3px) 25%, 100% 50%, calc(100% - 3px) 75%, 100% 100%, 0 100%, 3px 75%, 0 50%, 3px 25%); }
.chip-chk { border-left: 0; position: relative; padding-left: 16px; }
.chip-chk::before { content: ""; position: absolute; left: 6px; top: 10px; bottom: 10px; width: 4px; background: var(--gc); }
.b-hoy { background: var(--cinta); color: var(--tinta); border-color: var(--cinta-borde); }
.b-nuevo { background: var(--enlace); border-color: var(--enlace); color: #fff; }
[data-tema="oscuro"] .b-nuevo { color: #10233a; }
.avatar { border-radius: 6px; font-family: var(--cartel); font-weight: 400; font-size: 1.35rem; letter-spacing: .02em; color: var(--gt, #fff); }

/* ---------- Ficha: el horario se lee como un setlist ---------- */
.ficha-cab { align-items: flex-start; gap: 14px; }
.c-horario { border-top: 1px solid var(--borde); }
.horario li { gap: 16px; padding: 8px 0; border-bottom: 1px dashed var(--borde); align-items: center; }
.horario time { font-family: var(--cartel); font-weight: 400; font-size: 1.45rem; min-width: 64px; letter-spacing: .01em; }
.horario li span { font-size: 1.02rem; }
.horario li.destacado { background: var(--cinta); color: var(--tinta); margin: 4px -8px; padding: 8px; border-radius: 0; border-bottom: 0;
  clip-path: polygon(0 0, 100% 0, calc(100% - 4px) 30%, 100% 60%, calc(100% - 4px) 100%, 0 100%, 4px 70%, 0 40%); }
.horario li.destacado time { color: var(--tinta); }
.horario li.destacado span { font-weight: 700; }
.dato > span { font-weight: 500; }
.v-ruta time { font-family: var(--cartel); font-weight: 400; font-size: 1.3rem; }
.v-flecha { color: var(--txt-3); }
.acciones .btn { white-space: nowrap; }

/* ---------- Cifras grandes ---------- */
.kpi { border-radius: var(--radio-s); background: var(--card-2); }
.kpi strong { font-family: var(--cartel); font-weight: 400; font-size: 1.7rem; letter-spacing: .01em; }
.hoy-sig time { font-family: var(--cartel); font-weight: 400; color: var(--txt); font-size: 1.6rem; }
.banner-hoy { background: var(--card); border: 1px solid var(--borde); box-shadow: inset 6px 0 0 var(--cinta); border-radius: var(--radio); }
.dist { color: var(--txt-2); font-weight: 600; }
.menu-item .ico { color: var(--txt); }
.subida .ico { color: var(--txt-2); }
.estrellas { color: #E0A800; }
.cal-ev { border-radius: 2px; }
.cal-celda { border-radius: 4px; }
.cal-celda.hoy { outline: 2px solid var(--cinta); }
.barra-progreso span { background: var(--ok); }
.aviso-cambio { border-radius: var(--radio-s); background: color-mix(in srgb, var(--enlace) 10%, var(--card)); border-color: color-mix(in srgb, var(--enlace) 55%, var(--borde)); }
.toast { border-radius: var(--radio-s); background: var(--asfalto); border-left-color: var(--cinta); }
.toast.error { border-left-color: var(--error); }
.volver { color: var(--txt-2); }

/* ---------- Entrada: acreditación de backstage ---------- */
.entrada { background: var(--asfalto); color: #fff; }
.entrada-box { max-width: 360px; }
.laminado { position: relative; background: #fff; color: var(--asfalto); border-radius: 14px; padding: 0 0 22px; text-align: left; overflow: hidden; margin: 26px auto 0; box-shadow: 0 30px 60px rgba(0, 0, 0, .35); }
.laminado::before { content: ""; position: absolute; top: 14px; left: 50%; width: 46px; height: 9px; margin-left: -23px; border-radius: 9px; background: var(--asfalto); z-index: 2; }
.laminado-cab { background: var(--cinta); padding: 40px 22px 18px; }
.laminado-cab .marca { font-size: 2.9rem; color: var(--tinta); display: block; }
.laminado-cab small { display: block; margin-top: 8px; font-weight: 600; font-size: .86rem; }
.laminado-cuerpo { padding: 18px 22px 0; }
.laminado-cuerpo .acceso { font-family: var(--cartel); font-size: 1.5rem; letter-spacing: .02em; margin: 0 0 4px; }
.laminado-cuerpo p { color: #56606B; font-size: .92rem; }
.laminado .btn.grande { margin-top: 14px; }
.laminado .aviso { background: #F1F3F5; border-color: #CBD2D9; color: var(--asfalto); }
.entrada .ver { color: #8C959F; }
.entrada .personas { margin-top: 14px; }
.persona { background: #fff; color: var(--asfalto); border-color: #CBD2D9; }
.persona small { color: #6B7580; }
.persona.nueva { border-color: var(--cinta-borde); background: #FFF8DF; }

/* ---------- Demo ---------- */
#demo-banda { background: var(--cinta); color: var(--tinta); }
#demo-banda button { background: var(--asfalto); color: #fff; border-radius: 4px; }
#demo-banda button + button { background: transparent; color: var(--tinta); border: 1px solid var(--asfalto); }
body.con-demo .cab { top: 32px; }

/* ---------- Impresión: titular de cartel ---------- */
@media print {
  #print, #print * { font-family: 'Fira Sans', Arial, sans-serif; }
  #print h1, #print .p-horario th, #print .p-mt { font-family: 'Anton', Impact, sans-serif !important; font-weight: 400; }
  .p-head { border-bottom-color: #F4C430; }
  .p-eyebrow { color: #24282D; }
}
body.ver-print #print h1 { font-family: var(--cartel); font-weight: 400; }
.tarjetas.grid .tarjeta { border-left-color: var(--borde); }
.laminado-cuerpo .acceso { color: var(--asfalto); }

/* ---------- Bloqueo biométrico ---------- */
html.bloqueada #app, html.bloqueada #toasts, html.bloqueada #demo-banda { visibility: hidden; }
html.bloqueada body { overflow: hidden; }
#bloqueo { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; padding: 24px; padding-top: calc(24px + var(--safe-t, 0px));
  background: var(--asfalto); color: #fff; overflow-y: auto; }
#bloqueo .laminado { width: 100%; max-width: 360px; margin: 0; }
#bloqueo .laminado-cuerpo { display: grid; gap: 12px; }
#bloqueo .btn.ghost { color: var(--asfalto); }

/* ---------- Solicitud de oficina ---------- */
.solicitud { margin-top: 16px; text-align: left; display: grid; gap: 10px; }
.solicitud h3 { margin: 0; font-size: 1.05rem; }
.solicitud textarea { resize: vertical; }
.lista-sol { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.lista-sol li { border: 1px solid var(--borde, #D5DADF); border-left: 6px solid var(--cinta); border-radius: 10px; padding: 12px 14px; display: grid; gap: 6px; }
.lista-sol .nota { white-space: pre-wrap; margin: 0; }
.contador { display: inline-grid; place-items: center; min-width: 1.5em; height: 1.5em; padding: 0 .4em; border-radius: 99px; background: var(--cinta); color: var(--tinta); font-weight: 700; font-size: .8rem; margin-left: 6px; }

/* ---------- Personalización (estética de oficina y banda) ---------- */
html.titulos-sobrios .titulo, html.titulos-sobrios .ficha-cab h1, .titulos-sobrios .mv-cab strong { font-family: var(--sans); font-weight: 700; letter-spacing: -.01em; }
html.titulos-sobrios .cab-txt strong { font-family: var(--sans); font-weight: 700; letter-spacing: .02em; -webkit-mask-image: none; mask-image: none; }
.logo.con-img { background: #fff; padding: 3px; overflow: hidden; }
.logo.con-img img { width: 100%; height: 100%; object-fit: contain; display: block; }
.cab-ayuda { flex: none; width: 32px; height: 32px; border-radius: 50%; border: 1px solid #5B636C; background: transparent; color: #fff; font-weight: 700; font-size: 1rem; cursor: pointer; }
.cab-ayuda:hover { border-color: var(--cinta); color: var(--cinta); }
.avatar.con-img { background: #fff; padding: 4px; border: 1px solid var(--borde); }
.avatar.con-img img { width: 100%; height: 100%; object-fit: contain; display: block; }
.portada { margin: 4px 0 0; border-radius: var(--radio); overflow: hidden; aspect-ratio: 5 / 2; max-height: 300px; width: 100%; background: var(--card-2); border-bottom: 4px solid var(--cinta); }
.portada img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ficha-cab.sobre-portada { margin-top: -38px; padding-left: 14px; position: relative; }
.ficha-cab.sobre-portada .avatar { box-shadow: 0 0 0 4px var(--bg); }
.ficha-cab.sobre-portada > div:last-child { padding-top: 42px; }
.banda-firma { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--txt-2); font-weight: 600; margin: 2px 0 10px; }
.banda-firma img { width: 40px; height: 40px; object-fit: contain; background: #fff; border-radius: 6px; padding: 3px; border: 1px solid var(--borde); }
.banda-marca .acciones .btn.primary, .ficha .btn.primary { background: var(--cinta); border-color: var(--cinta-borde); color: var(--tinta); }

.editor-marca { display: grid; gap: 12px; }
.marca-imgs { display: grid; grid-template-columns: minmax(120px, 160px) 1fr; gap: 14px; }
@media (max-width: 520px) { .marca-imgs { grid-template-columns: 1fr; } }
.marca-img { display: grid; gap: 6px; align-content: start; }
.marca-prev { border: 1px dashed var(--borde); border-radius: var(--radio-s); background: var(--card-2); display: grid; place-items: center; overflow: hidden; }
.logo-prev { aspect-ratio: 1; max-width: 160px; }
.logo-prev img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.portada-prev { aspect-ratio: 5 / 2; }
.portada-prev img { width: 100%; height: 100%; object-fit: cover; }
.marca-img label.btn { cursor: pointer; }
.esteticas { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; }
.estetica { display: grid; gap: 6px; padding: 8px; border: 1px solid var(--borde); border-radius: var(--radio-s); background: var(--card); color: var(--txt); font: inherit; font-size: .85rem; cursor: pointer; text-align: left; }
.estetica.on { border-color: var(--txt); box-shadow: inset 0 0 0 1px var(--txt); }
.muestra { display: block; height: 30px; border-radius: 4px; position: relative; }
.muestra i { position: absolute; left: 8px; right: 8px; bottom: 6px; height: 6px; border-radius: 2px; }
.marca-vista { border: 1px solid var(--borde); border-radius: var(--radio); overflow: hidden; }
.mv-cab { background: var(--asfalto); border-bottom: 3px solid var(--cinta); color: #fff; display: flex; align-items: center; gap: 10px; padding: 10px 12px; }
.mv-cab strong { font-family: var(--cartel); font-weight: 400; font-size: 1.15rem; letter-spacing: .04em; text-transform: uppercase; }
.mv-logo { width: 32px; height: 32px; border-radius: 5px; background: var(--cinta); color: var(--tinta); display: grid; place-items: center; font-family: var(--cartel); overflow: hidden; }
.mv-logo img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.mv-cuerpo { background: var(--card); padding: 12px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.mv-btn { background: var(--cinta); color: var(--tinta); border: 1px solid var(--cinta-borde); padding: 7px 14px; border-radius: var(--radio-s); font-weight: 600; font-size: .9rem; }
.mv-cinta { background: var(--cinta); color: var(--tinta); padding: 3px 10px; font-weight: 600; font-size: .8rem; clip-path: polygon(0 0, 100% 0, 97% 50%, 100% 100%, 0 100%, 3% 50%); }

/* ---------- Guía interactiva ---------- */
#tour { position: fixed; inset: 0; z-index: 900; pointer-events: none; }
#tour .tour-foco { position: fixed; border-radius: 8px; box-shadow: 0 0 0 9999px rgba(10, 12, 15, .62); outline: 3px solid var(--cinta); outline-offset: 2px; transition: all .25s ease; pointer-events: none; }
#tour .tour-foco.sin { width: 0 !important; height: 0 !important; left: 50% !important; top: 40% !important; outline: 0; }
#tour .tour-tarjeta { position: fixed; pointer-events: auto; width: min(340px, calc(100vw - 24px)); background: #fff; color: var(--asfalto); border-radius: 12px; overflow: hidden; box-shadow: 0 18px 40px rgba(0, 0, 0, .35); transition: top .25s ease, left .25s ease; }
#tour .tour-cab { background: var(--cinta); color: var(--tinta); padding: 10px 14px; display: flex; justify-content: space-between; align-items: center; font-weight: 600; font-size: .82rem; }
#tour .tour-cuerpo { padding: 14px; display: grid; gap: 8px; }
#tour .tour-cuerpo h3 { margin: 0; font-family: var(--cartel); font-weight: 400; font-size: 1.35rem; letter-spacing: .01em; }
#tour .tour-cuerpo p { margin: 0; line-height: 1.45; font-size: .95rem; }
#tour .tour-pie { display: flex; justify-content: space-between; gap: 8px; padding: 0 14px 14px; align-items: center; }
#tour .tour-pie .btn { min-height: 38px; }
#tour .tour-pie .btn.ghost { color: var(--asfalto); border-color: #CBD2D9; }
#tour .tour-puntos { display: flex; gap: 4px; }
#tour .tour-puntos i { width: 6px; height: 6px; border-radius: 50%; background: #CBD2D9; }
#tour .tour-puntos i.on { background: var(--asfalto); }
#tour .tour-saltar { background: none; border: 0; color: var(--tinta); font: inherit; font-size: .82rem; text-decoration: underline; cursor: pointer; padding: 0; }
@media (prefers-reduced-motion: reduce) { #tour .tour-foco, #tour .tour-tarjeta { transition: none; } }

/* ---------- Vehículos y material ---------- */
.rec-av { background: var(--asfalto); color: var(--cinta); }
.rec-av svg { width: 30px; height: 30px; }
.avisos-rec ul { margin: 6px 0 0; }
.txt-error { color: var(--error); font-weight: 600; }
.rec-elegir { display: grid; gap: 6px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); margin-bottom: 10px; }
.rec-elegir .opcion { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--borde); border-radius: var(--radio-s); background: var(--card); }
.rec-elegir .opcion:has(input:checked) { border-color: var(--cinta-borde); box-shadow: inset 4px 0 0 var(--cinta); }
.rec-elegir .opcion > span { flex: 1; min-width: 0; }
.rec-elegir .opcion[hidden] { display: none; }
.rec-cant { width: 64px; flex: none; }
.mini-buscador { margin-bottom: 8px; max-width: 320px; }
.lista-carga { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.lista-carga .checklist { margin-top: 4px; }
.tarjeta.rec { --gc: var(--asfalto); }

/* ---------- Símbolo de Stage Pilot (ruta en «S» con flecha de piloto) ---------- */
.simbolo { display: block; width: 100%; height: 100%; }
.logo:not(.con-img) { background: var(--asfalto-2); color: var(--cinta); padding: 5px; border: 1px solid rgba(255, 255, 255, .14); }
.lam-simbolo { display: block; width: 52px; height: 52px; color: var(--asfalto); margin-bottom: 12px; }
.lam-simbolo .s-origen { fill: var(--asfalto); } .lam-simbolo .s-origen + .s-origen { fill: var(--cinta); }
.p-mt { background: #24282D !important; color: #F4C430 !important; padding: 8px; }
.p-mt .simbolo { width: 100%; height: 100%; }

/* ---------- Animación de entrada ---------- */
#intro { position: fixed; inset: 0; z-index: 1200; background: #24282D; color: #fff; display: grid; place-items: center; cursor: pointer;
  transition: opacity .45s ease, visibility .45s; }
#intro.fuera { opacity: 0; visibility: hidden; }
#intro .intro-c { display: grid; justify-items: center; gap: 0; padding: 24px; text-align: center; }
#intro .intro-simbolo { width: min(34vw, 150px); height: auto; overflow: visible; }
#intro .s-ruta { stroke-dasharray: 1; stroke-dashoffset: 1; animation: sp-ruta .85s cubic-bezier(.65, 0, .35, 1) .25s forwards; }
#intro .s-origen { transform-box: fill-box; transform-origin: center; transform: scale(0); animation: sp-pop .35s cubic-bezier(.3, 1.6, .5, 1) .05s forwards; }
#intro .s-flecha { opacity: 0; transform: translateX(-46px); animation: sp-flecha .35s cubic-bezier(.2, .9, .3, 1.2) 1.02s forwards; }
#intro .intro-marca { margin-top: 26px; font-family: 'Anton', Impact, sans-serif; font-size: clamp(2.6rem, 11vw, 4.4rem); line-height: 1; letter-spacing: .06em; text-transform: uppercase;
  -webkit-mask-image: linear-gradient(to bottom, #000 0 47%, transparent 47% 55%, #000 55%); mask-image: linear-gradient(to bottom, #000 0 47%, transparent 47% 55%, #000 55%);
  clip-path: inset(0 100% 0 0); animation: sp-revela .5s cubic-bezier(.65, 0, .35, 1) 1.1s forwards; }
#intro .intro-cinta { width: 0; height: 9px; margin-top: 12px; background: #F4C430; clip-path: polygon(0 0, 100% 0, 98.5% 50%, 100% 100%, 0 100%, 1.5% 50%); animation: sp-cinta .45s ease-out 1.35s forwards; }
#intro .intro-eslogan { margin: 16px 0 0; font-family: 'Fira Sans', system-ui, sans-serif; font-weight: 500; font-size: clamp(1rem, 4.2vw, 1.25rem); color: #E6E9EC;
  opacity: 0; transform: translateY(8px); animation: sp-sube .45s ease-out 1.55s forwards; }
@keyframes sp-ruta { to { stroke-dashoffset: 0; } }
@keyframes sp-pop { to { transform: scale(1); } }
@keyframes sp-flecha { to { opacity: 1; transform: none; } }
@keyframes sp-revela { to { clip-path: inset(0 0 0 0); } }
@keyframes sp-cinta { to { width: min(78vw, 340px); } }
@keyframes sp-sube { to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  #intro *, #intro { animation: none !important; transition-duration: .2s !important; }
  #intro .s-ruta { stroke-dashoffset: 0; } #intro .s-origen { transform: none; } #intro .s-flecha { opacity: 1; transform: none; }
  #intro .intro-marca { clip-path: none; } #intro .intro-cinta { width: min(78vw, 340px); } #intro .intro-eslogan { opacity: 1; transform: none; }
}
#tour .tour-caps { display: grid; gap: 6px; max-height: min(52vh, 420px); overflow-y: auto; margin-top: 4px; }
#tour .tour-cap { display: grid; gap: 2px; text-align: left; padding: 9px 12px; border: 1px solid #CBD2D9; border-radius: 8px; background: #fff; color: var(--asfalto); font: inherit; cursor: pointer; }
#tour .tour-cap small { color: #56606B; font-size: .8rem; }
#tour .tour-cap:hover, #tour .tour-cap:focus-visible { border-color: var(--asfalto); }
#tour .tour-cap.destacado { background: var(--asfalto); color: #fff; border-color: var(--asfalto); }
#tour .tour-cap.destacado small { color: #C9D0D7; }
#tour .tour-barra { height: 4px; background: #E6E9EC; }
#tour .tour-barra i { display: block; height: 100%; background: var(--cinta); transition: width .25s ease; }
#tour .tour-pie { flex-wrap: wrap; }

/* ---------- Registro de actividad y permisos ---------- */
.registro { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.registro li { display: grid; grid-template-columns: 92px 1fr; gap: 2px 12px; padding: 8px 0; border-bottom: 1px solid var(--borde); font-size: .9rem; }
.registro time { color: var(--txt-2); font-variant-numeric: tabular-nums; grid-row: span 2; }
.registro small { color: var(--txt-3); }
.permisos { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 6px 14px; margin: 8px 0 12px; }
.campo.inline { display: inline-grid; }
.aviso-privacidad p { margin: 0 0 8px; font-size: .9rem; line-height: 1.45; }
.laminado .chk.compartido { margin-top: 12px; color: var(--asfalto); font-size: .86rem; }
/* La cabecera fija no tapa lo que se desplaza a la vista */
html { scroll-padding-top: 96px; scroll-padding-bottom: 96px; }

/* ---------- Hoja de ruta ampliada ---------- */
.h-fin { color: var(--txt-2); font-weight: 500; white-space: nowrap; }
.horario li.destacado .h-fin { color: var(--tinta); opacity: .8; }
.tabla-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.tabla.cartel { min-width: 760px; font-size: .86rem; }
.tabla.cartel th small { font-weight: 500; color: var(--txt-3); }
.tabla.cartel tbody th { text-align: left; }

/* ---------- Pestañas del evento: Preproducción | Hoja de ruta (v3.0) ---------- */
.pestanas { display: flex; gap: 4px; margin: 14px 0 12px; border-bottom: 2px solid var(--borde); }
.pestanas button { appearance: none; background: none; border: 0; padding: 10px 14px; font: inherit; font-weight: 600; color: var(--txt-2);
  border-bottom: 3px solid transparent; margin-bottom: -2px; cursor: pointer; border-radius: var(--radio-s) var(--radio-s) 0 0; }
.pestanas button small { font-weight: 500; opacity: .8; }
.pestanas button.activa { color: var(--txt); border-bottom-color: var(--gc, var(--acento)); }
.pestanas button:focus-visible { outline: 2px solid var(--acento); outline-offset: 2px; }
.preproduccion .pre-cab { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.pre-total { text-align: right; display: grid; } .pre-total strong { font-size: 1.4rem; } .pre-total em { color: var(--error); font-style: normal; font-weight: 600; font-size: .85rem; }
.pre-fase { margin-top: 18px; } .pre-fase h3 { font-size: 1rem; margin: 0 0 6px; }
.pre-lista { list-style: none; margin: 0; padding: 0; }
.pre-lista li { padding: 8px 0; border-top: 1px solid var(--borde); display: grid; gap: 6px; }
.pre-lista li.hecho .chk span { text-decoration: line-through; color: var(--txt-3); }
.pre-lista li.vencida { box-shadow: inset 3px 0 0 var(--error); padding-left: 8px; }
.pre-lista li.vencida input[type=date] { color: var(--error); border-color: var(--error); }
.pre-meta { display: grid; grid-template-columns: minmax(110px, 1fr) 140px minmax(120px, 2fr) 30px; gap: 6px; align-items: center; }
.pre-meta input { min-width: 0; min-height: 34px; height: 34px; padding: 4px 8px; font-size: .86rem; background: var(--card); }
.pre-meta .ico-btn { width: 30px; height: 30px; }
.pre-nueva { margin-top: 6px; }
@media (max-width: 640px) { .pre-meta { grid-template-columns: 1fr 1fr 30px; } .pre-meta .pre-notas { grid-column: 1 / 3; grid-row: 2; } }
@media print { .pestanas, .preproduccion { display: none !important; } #panel-hoja[hidden] { display: grid !important; } }

/* ---------- Autorrelleno (v3.0) ---------- */
.autorrelleno { margin-bottom: 14px; } .autorrelleno > summary { cursor: pointer; list-style: none; display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.autorrelleno > summary::-webkit-details-marker { display: none; } .autorrelleno > summary::before { content: '▸'; transition: transform .15s; } .autorrelleno[open] > summary::before { transform: rotate(90deg); }
.autorrelleno textarea { width: 100%; margin: 8px 0; font-family: inherit; }
.ar-tabla { min-width: 620px; } .ar-tabla td { vertical-align: middle; } .ar-tabla input:not([type=checkbox]), .ar-tabla select { width: 100%; min-height: 34px; padding: 4px 8px; }
.ar-tabla tr.apagada td:not(:last-child) { opacity: .55; } .badge.mini { font-size: .66rem; padding: 1px 6px; }
.campo.autorrellenado input, .campo.autorrellenado select, .campo.autorrellenado textarea { box-shadow: 0 0 0 2px var(--acento-2); }
/* Permisos por persona (v3.0) */
.miembros-perm li { display: grid; gap: 6px; }
.permisos-persona { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 4px 14px; padding: 8px 10px; background: var(--card-2); border-radius: var(--radio-s); font-size: .88rem; }

/* ---------- Riders y stage plot (v3.0) ---------- */
.lista-riders { list-style: none; margin: 0 0 10px; padding: 0; }
.lista-riders a { display: grid; padding: 9px 0; border-top: 1px solid var(--borde); color: inherit; text-decoration: none; }
.lista-riders a:hover strong { text-decoration: underline; } .lista-riders small { color: var(--txt-2); }
.mini-logo { width: 26px; height: 26px; object-fit: contain; vertical-align: middle; margin-right: 8px; border-radius: 6px; }
.rider-logo { width: 72px; height: 72px; object-fit: contain; border-radius: var(--radio-s); }
.rider-cuerpo { display: grid; gap: 14px; margin-top: 14px; }
.rider-intro { font-size: 1.02rem; }
.r-tiempos { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 8px; margin-bottom: 8px; }
.r-tiempos div { background: var(--card-2); border-radius: var(--radio-s); padding: 10px; display: grid; }
.r-tiempos strong { font-size: 1.3rem; } .r-tiempos span { font-size: .8rem; color: var(--txt-2); }
.tabla.canales { min-width: 640px; font-size: .88rem; } .tabla.canales td.num { font-weight: 700; width: 3.5em; }
.tabla.canales.editable input { width: 100%; min-height: 32px; padding: 3px 6px; font-size: .86rem; } .tabla.canales.editable input.corto { width: 3.5em; }
.r-seccion { border-top: 1px solid var(--borde); padding: 10px 0; display: grid; gap: 6px; }
.r-seccion textarea { width: 100%; font-family: inherit; } .r-sec-tit { font-weight: 700; }
.r-par { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)) 30px; gap: 6px; margin-bottom: 6px; }
/* Stage plot */
.plot { width: 100%; height: auto; display: block; border-radius: var(--radio-s); background: #1d1f24; touch-action: none; user-select: none; }
.pl-suelo { fill: #24272e; } .pl-rejilla line { stroke: #ffffff14; stroke-width: 1; }
.pl-publico { fill: #111317; } .pl-cota { fill: #ffffff80; font: 600 12px var(--fuente, system-ui); text-anchor: middle; letter-spacing: .08em; } .pl-cota.claro { fill: #ffffffb0; }
.pl-item { cursor: default; } .plot.editable .pl-item { cursor: grab; } .plot.editable .pl-item:active { cursor: grabbing; }
.pl-txt { fill: #f2f2f2; font: 600 12px var(--fuente, system-ui); text-anchor: middle; paint-order: stroke; stroke: #000a; stroke-width: 3px; }
.pl-mini { fill: #fff; font: 700 9px system-ui; text-anchor: middle; }
.pl-tarima { fill: #3a3e48; stroke: #8a90a0; stroke-width: 1.5; } .pl-pieza { fill: #d9dbe0; stroke: #555; } .pl-plato { fill: #e8c85a; stroke: #8a6d10; }
.pl-caja { fill: #4a4f5c; stroke: #c9ccd4; stroke-width: 1.5; } .pl-di { fill: #6b7280; stroke: #fff; }
.pl-mic { fill: #e8e8e8; stroke: #333; stroke-width: 2; } .pl-linea { stroke: #e8e8e8; stroke-width: 2; }
.pl-iem { fill: #2f7de1; } .pl-musico { fill: none; stroke: #f4c430; stroke-width: 2.5; stroke-dasharray: 4 3; }
.pl-corriente { fill: #f4c430; } .pl-rayo { fill: none; stroke: #222; stroke-width: 2; } .pl-telon { fill: #8b1e2d; }
.pl-item.sel > :first-child { stroke: var(--acento-2, #ffb020); stroke-width: 3; }
.plot-barra { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 8px; } .plot-barra input { width: 5em; min-height: 32px; }
.plot-paleta { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.plot-sel { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; align-items: center; } .plot-sel input { flex: 1 1 180px; min-height: 36px; }
@media print { .p-rider .caja { break-inside: avoid; border: 1px solid #ccc; padding: 8px 10px; margin-bottom: 8px; } .p-rider .plot { background: #fff; } .p-rider .pl-suelo { fill: #fff; } .p-rider .pl-rejilla line { stroke: #0001; }
  .p-rider .pl-txt { fill: #000; stroke: #fff; } .p-rider .pl-publico { fill: #ddd; } .p-rider .pl-cota { fill: #333; } }

/* ---------- Parkings: ¿cabe el vehículo? (v3.1) ---------- */
.caja-vehiculo { border: 1px dashed var(--borde); border-radius: var(--radio-s); padding: 10px 12px; margin: 10px 0; }
.caja-vehiculo .campos { grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); }
.aviso-mini { background: var(--card-2); border-left: 3px solid var(--acento-2); padding: 8px 10px; border-radius: var(--radio-s); font-size: .88rem; }
.resumen-cabe { display: flex; gap: 12px; flex-wrap: wrap; font-weight: 600; }
.cabe { font-size: .88rem; font-weight: 600; padding: 6px 9px; border-radius: var(--radio-s); margin: 6px 0; }
.cabe-cabe, .cabe-si { color: #1f8a43; } .cabe.cabe-cabe { background: #1f8a4318; }
.cabe-duda { color: #b7791f; } .cabe.cabe-duda { background: #b7791f1c; }
.cabe-no { color: var(--error); } .cabe.cabe-no { background: #d6303018; }
/* Lugares con Google Maps (v3.2) */
.mapa-google .mg-cab { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.mapa-google .mg-cab h2 { margin: 0; }
.mapa-lugares { width: 100%; height: min(62vh, 520px); border: 0; border-radius: var(--radio-s); display: block; margin: 8px 0; }

/* ---------- Editor de stage plot a pantalla completa (v3.4) ---------- */
html.sp-abierto, html.sp-abierto body { overflow: hidden; }
.sp-editor { position: fixed; inset: 0; z-index: 9000; background: var(--bg); color: var(--txt); display: grid;
  grid-template-columns: 270px 1fr 300px; grid-template-rows: auto 1fr; grid-template-areas: "barra barra barra" "paleta lienzo props"; }
.sp-barra { grid-area: barra; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding: 8px 12px; background: var(--card); border-bottom: 1px solid var(--borde);
  padding-top: max(8px, env(safe-area-inset-top)); }
.sp-titulo { font-size: 1.05rem; } .sp-grupo { display: flex; align-items: center; gap: 6px; } .sp-dcha { margin-left: auto; }
.sp-barra .btn.sm { min-height: 34px; } .sp-barra select { min-height: 32px; }
#sp-zoom { min-width: 46px; text-align: center; font-variant-numeric: tabular-nums; font-size: .86rem; }
.sp-pestanas { display: none; }
.sp-paleta, .sp-props { overflow-y: auto; padding: 10px; background: var(--card); -webkit-overflow-scrolling: touch; }
.sp-paleta { grid-area: paleta; border-right: 1px solid var(--borde); } .sp-props { grid-area: props; border-left: 1px solid var(--borde); }
.sp-props h3 { margin: 14px 0 6px; font-size: .95rem; } .sp-props h3:first-child { margin-top: 2px; }
.sp-buscar input { width: 100%; min-height: 38px; margin-bottom: 8px; }
.sp-cat { border-bottom: 1px solid var(--borde); padding: 4px 0; } .sp-cat summary { cursor: pointer; font-weight: 700; font-size: .9rem; padding: 6px 2px; }
.sp-cat summary small { color: var(--txt-3); font-weight: 500; }
.sp-elems { display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 6px; padding: 4px 0 8px; }
.sp-elem { display: grid; justify-items: center; gap: 2px; padding: 6px 4px; border: 1px solid var(--borde); border-radius: var(--radio-s); background: #1d1f24; color: #eee; cursor: pointer; font: inherit; font-size: .7rem; line-height: 1.15; text-align: center; min-height: 78px; }
.sp-elem:hover, .sp-elem:focus-visible { border-color: var(--acento-2, #ffb020); outline: none; }
.sp-lienzo { grid-area: lienzo; overflow: auto; background: #111317; padding: 18px; display: grid; place-items: start center; -webkit-overflow-scrolling: touch; }
.sp-lienzo-interior { width: 100%; max-width: none; transition: width .15s; }
.sp-lienzo-interior svg { display: block; width: 100%; height: auto; border-radius: 6px; box-shadow: 0 10px 40px rgba(0,0,0,.5); touch-action: none; user-select: none; -webkit-user-select: none; }
.sp-editor .pl-item { cursor: grab; } .sp-editor .pl-item.bloqueado { cursor: not-allowed; } .sp-editor .asa-rot { cursor: crosshair; } .sp-editor .asa-tam { cursor: nwse-resize; }
.sp-campos { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; } .sp-campos label { display: grid; gap: 3px; font-size: .78rem; color: var(--txt-2); }
.sp-campos label.ancho, .sp-campos label.chk { grid-column: 1 / -1; } .sp-campos label.chk { display: flex; gap: 8px; align-items: center; color: var(--txt); font-size: .86rem; }
.sp-campos input:not([type=checkbox]):not([type=range]), .sp-campos select { min-height: 34px; padding: 4px 8px; width: 100%; }
.sp-campos input[type=range] { width: 100%; }
.sp-botones, .sp-plantillas { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.sp-colores { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.sp-color { width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--borde); cursor: pointer; font-size: .8rem; color: var(--txt); }
.sp-color.on { outline: 3px solid var(--acento-2, #ffb020); outline-offset: 1px; }
.sp-colores input[type=color] { width: 34px; height: 30px; padding: 0; border: 0; background: none; }
@media (max-width: 860px) {
  .sp-editor { grid-template-columns: 1fr; grid-template-rows: auto 1fr auto auto; grid-template-areas: "barra" "lienzo" "pestanas" "panel"; }
  .sp-barra { gap: 6px; padding: 6px 8px; } .sp-titulo, #sp-cuenta { display: none; } .sp-dcha { margin-left: 0; width: 100%; justify-content: flex-end; }
  .sp-pestanas { grid-area: pestanas; display: flex; border-top: 1px solid var(--borde); background: var(--card); }
  .sp-pestanas button { flex: 1; padding: 10px; background: none; border: 0; color: var(--txt-2); font: inherit; font-weight: 600; border-bottom: 3px solid transparent; }
  .sp-pestanas button.on { color: var(--txt); border-bottom-color: var(--acento-2, #ffb020); }
  .sp-paleta, .sp-props { grid-area: panel; display: none; max-height: 40vh; border: 0; padding-bottom: max(10px, env(safe-area-inset-bottom)); }
  .sp-paleta.on, .sp-props.on { display: block; }
  .sp-lienzo { padding: 8px; }
}
/* Vista previa en el formulario del rider */
.sp-previa { cursor: zoom-in; border-radius: var(--radio-s); overflow: hidden; margin-bottom: 8px; }
.sp-previa svg, .sp-vista svg { display: block; width: 100%; height: auto; border-radius: 6px; }
/* Adjuntos */
.adj-lista { list-style: none; margin: 0 0 10px; padding: 0; } .adj-lista li { display: flex; gap: 8px; align-items: center; padding: 6px 0; border-top: 1px solid var(--borde); flex-wrap: wrap; }
.adj-lista li .ico-btn { margin-left: auto; width: 30px; height: 30px; }
.adj-marco { background: #fff; border-radius: var(--radio-s); padding: 6px; } .adj-img { display: block; max-width: 100%; height: auto; margin: 0 auto; }
@media print { .p-rider .adj-sec { break-inside: avoid; } .p-rider .adj-img { max-height: 24cm; } .p-rider .sp-vista svg { max-height: 24cm; } }
html.sp-abierto .modal-wrap { z-index: 9500; } html.sp-abierto #toasts { z-index: 9600; bottom: 70px; }
.sp-barra label.mini, .sp-barra label.chk { display: flex; align-items: center; gap: 5px; margin: 0; font-size: .82rem; }
.sp-barra label.mini select { width: auto; min-width: 74px; padding: 2px 6px; min-height: 30px; }
.sp-campos input[type=range] { appearance: auto; -webkit-appearance: auto; background: none; border: 0; padding: 0; min-height: 0; height: 26px; box-shadow: none; accent-color: var(--acento-2, #ffb020); }
.sp-campos output { font-weight: 700; color: var(--txt); }
@media (max-width: 860px) { .sp-barra .btn.sm { min-height: 32px; padding: 0 10px; } .sp-grupo { gap: 4px; } #sp-png { padding: 0 8px; } }
/* Stage plot: móvil en horizontal (v3.4.1) — escenario a la izquierda, panel a la derecha, barra en una línea */
.sp-editor { padding-left: env(safe-area-inset-left); padding-right: env(safe-area-inset-right); }
.sp-lienzo-interior { max-width: 100%; }
.sp-lienzo { place-items: center; }
@media (orientation: landscape) and (max-height: 540px) {
  .sp-editor { grid-template-columns: 1fr minmax(240px, 34vw); grid-template-rows: auto auto 1fr; grid-template-areas: "barra barra" "lienzo pestanas" "lienzo panel"; }
  .sp-barra { flex-wrap: nowrap; overflow-x: auto; gap: 6px; padding: 4px 8px; scrollbar-width: none; }
  .sp-barra::-webkit-scrollbar { display: none; }
  .sp-titulo, #sp-cuenta { display: none; }
  .sp-dcha { margin-left: auto; width: auto; flex: none; }
  .sp-barra .btn.sm { min-height: 30px; padding: 0 9px; white-space: nowrap; } .sp-grupo { flex: none; }
  .sp-barra label.mini select { min-height: 28px; }
  .sp-pestanas { grid-area: pestanas; display: flex; border-left: 1px solid var(--borde); border-top: 0; background: var(--card); }
  .sp-pestanas button { flex: 1; padding: 7px 6px; background: none; border: 0; color: var(--txt-2); font: inherit; font-size: .85rem; font-weight: 600; border-bottom: 3px solid transparent; }
  .sp-pestanas button.on { color: var(--txt); border-bottom-color: var(--acento-2, #ffb020); }
  .sp-paleta, .sp-props { grid-area: panel; display: none; max-height: none; border: 0; border-left: 1px solid var(--borde); padding: 8px; padding-bottom: max(8px, env(safe-area-inset-bottom)); }
  .sp-paleta.on, .sp-props.on { display: block; }
  .sp-lienzo { padding: 6px; }
  .sp-elems { grid-template-columns: repeat(auto-fill, minmax(68px, 1fr)); } .sp-elem { min-height: 68px; font-size: .66rem; }
  .sp-elem svg { width: 32px; height: 32px; }
  .sp-campos { gap: 6px; } .sp-props h3 { margin: 10px 0 4px; }
}
.sp-lienzo { display: flex; } .sp-lienzo-interior { margin: auto; flex: none; max-width: none; }

/* ---------- Impresión y PDF: que nada se corte entre páginas (v3.4.2) ---------- */
@media print {
  #print section, #print .caja, #print .dato, #print tr, #print li, #print figure, #print svg, #print img, #print .r-tiempos, #print .p-head, #print .p-foot { break-inside: avoid; page-break-inside: avoid; }
  #print p { break-inside: avoid; page-break-inside: avoid; orphans: 4; widows: 4; }
  #print table { break-inside: avoid; page-break-inside: avoid; }
  #print h1, #print h2, #print h3 { break-after: avoid; page-break-after: avoid; }
  #print thead { display: table-header-group; } #print tfoot { display: table-footer-group; }
  /* Dos columnas que no parten los bloques (columnas CSS: funciona igual en Chrome, Safari y Firefox) */
  #print .p-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; align-items: start; }
  #print .p-cols > section { break-inside: avoid; page-break-inside: avoid; min-width: 0; }
  /* Lista de canales: hasta 32 canales siempre en la misma hoja; con más puede seguir en la siguiente (repitiendo la cabecera) */
  #print .tabla.canales { font-size: 7.8pt; line-height: 1.18; table-layout: fixed; }
  #print .tabla.canales td, #print .tabla.canales th { padding: 1.5px 4px; width: auto; }
  #print .tabla.canales th:nth-child(1), #print .tabla.canales td:nth-child(1) { width: 6%; }
  #print .tabla.canales th:nth-child(2) { width: 20%; } #print .tabla.canales th:nth-child(3) { width: 22%; }
  #print .tabla.canales th:nth-child(4) { width: 15%; } #print .tabla.canales th:nth-child(5) { width: 11%; } #print .tabla.canales th:nth-child(6) { width: 26%; }
  #print .p-rider .caja.ancha:has(.tabla.canales) { padding: 6px 8px; }
  #print .canales-larga, #print .canales-larga table, #print .canales-larga .tabla-scroll { break-inside: auto; page-break-inside: auto; }
  #print .tabla-scroll { overflow: visible !important; } #print .tabla.canales { min-width: 0 !important; width: 100%; }
  /* Si un bloque es más alto que una página entera, el navegador lo parte igualmente (no se pierde nada) */
}
@media (orientation: landscape) and (max-height: 540px) { #intro .intro-simbolo { width: min(24vh, 150px); } #intro .intro-marca { margin-top: 12px; font-size: clamp(2rem, 13vh, 3.6rem); } #intro .intro-eslogan { margin-top: 10px; } }
#aviso-version { position: fixed; left: 50%; transform: translateX(-50%); top: calc(env(safe-area-inset-top) + 10px); z-index: 9800; display: flex; gap: 12px; align-items: center;
  background: #24282D; color: #fff; padding: 10px 12px 10px 16px; border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,.4); border-left: 4px solid #F4C430; font-size: .92rem; max-width: 94vw; }
@media print { .no-print, #print .no-print { display: none !important; } }
