/* =====================================================================
   Editor de Noticias — Colegio Científico Costarricense – Puntarenas
   Hoja de estilos propia de editor-noticias.html
   ===================================================================== */

:root {
  --azul: #0B1F3A;
  --azul-osc: #071629;
  --miel: #E0A526;
  --miel-osc: #B47F10;
  --crema: #F6F4EE;
  --mesa: #ECE9E2;
  --cinta: #FAF8F3;
  --borde: #DDD7C9;
  --borde-2: #D5CEBE;
  --linea: #E3DDD0;
  --texto: #1F2733;
  --texto-2: #3D4552;
  --gris: #5F6672;
  --enlace: #1F4E8C;
  --nota-fondo: #EAF1FA;
  --nota-texto: #12325C;
  --sel: #2F6DB5;
  --serif: 'DM Serif Display', Georgia, 'Times New Roman', serif;
  --sans: Inter, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono: ui-monospace, Consolas, 'Cascadia Mono', Menlo, monospace;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  display: flex;
  flex-direction: column;
  background: var(--mesa);
  color: var(--texto);
  font: 14px/1.45 var(--sans);
  overflow: hidden;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
svg { fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex: none; }
:focus-visible { outline: 2px solid var(--sel); outline-offset: 2px; }

/* ---------- Listón superior ---------- */
.liston {
  background: var(--azul);
  color: #fff;
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 10px 20px;
  flex-wrap: wrap;
  border-bottom: 3px solid var(--miel);
  flex: none;
}
.liston__marca { display: flex; align-items: center; gap: 12px; }
.liston__logo { width: 38px; height: 38px; object-fit: contain; }
.liston__textos { display: flex; flex-direction: column; line-height: 1.15; }
.liston__nombre { font-family: var(--serif); font-size: 20px; }
.liston__sub { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--miel); }
.liston__centro { flex: 1 1 320px; display: flex; justify-content: center; }
.liston__proyecto {
  display: flex; align-items: center; gap: 10px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 8px; padding: 0 12px; height: 38px;
  width: 100%; max-width: 560px;
}
.liston__proyecto:focus-within { border-color: rgba(224,165,38,.8); }
.liston__etq { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: rgba(255,255,255,.65); }
.liston__proyecto input { flex: 1; min-width: 0; background: transparent; border: 0; color: #fff; font-weight: 500; outline: none; }
.liston__estado { font-size: 12px; color: rgba(255,255,255,.62); white-space: nowrap; }
.liston__acciones { display: flex; gap: 10px; }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  height: 38px; padding: 0 16px; border-radius: 999px;
  font-weight: 600; font-size: 13px; text-decoration: none; border: 0; white-space: nowrap;
}
.btn--borde { border: 1.5px solid rgba(224,165,38,.8); color: #fff; background: transparent; }
.btn--borde:hover { background: rgba(224,165,38,.14); }
.btn--miel { background: var(--miel); color: var(--azul); font-weight: 700; padding: 0 18px; }
.btn--miel:hover { background: #EBB43C; }
.btn--claro { border: 1.5px solid #B9B09C; color: var(--azul); background: transparent; }
.btn--claro:hover { background: #EFE9DA; }
.btn--grande { height: 44px; padding: 0 22px; font-size: 14px; }

/* ---------- Pestañas y cinta ---------- */
.pestanas {
  background: var(--cinta);
  display: flex; gap: 2px;
  padding: 6px 16px 0;
  border-bottom: 1px solid var(--borde);
  flex-wrap: wrap; flex: none;
}
.pestanas button {
  flex: 0 0 116px; width: 116px; text-align: center;
  height: 36px; padding: 0 8px; border: 0; border-radius: 8px 8px 0 0;
  font-weight: 600; font-size: 13px; background: transparent; color: var(--gris);
}
.pestanas button:hover { color: var(--azul); background: #F1EDE3; }
.pestanas button[aria-selected="true"] { background: #fff; color: var(--azul); box-shadow: inset 0 -3px 0 var(--miel); }

.cinta {
  background: var(--cinta);
  border-bottom: 1px solid var(--borde);
  padding: 8px 16px;
  display: flex; flex-wrap: nowrap; align-items: stretch;
  height: 106px;              /* todas las pestañas con la misma altura */
  overflow-x: auto; overflow-y: hidden;
  box-shadow: 0 2px 6px rgba(11,31,58,.06);
  flex: none; position: relative; z-index: 2;
}
.grupo {
  flex: none;
  display: flex; flex-direction: column; justify-content: space-between;
  padding: 0 11px; border-right: 1px solid var(--linea);
}
.grupo:last-child { border-right: 0; }
.grupo__items { display: flex; align-items: flex-start; gap: 4px; height: 68px; }
.chicos { display: grid; grid-template-rows: repeat(2, 30px); grid-auto-flow: column; gap: 4px 4px; align-content: start; padding-top: 2px; }
.grupo__sep { align-self: stretch; width: 1px; margin: 4px 6px; background: #E6D3A0; }
.grupo__nombre { margin: 4px 0 0; text-align: center; font-size: 11px; letter-spacing: .06em; color: var(--gris); white-space: nowrap; }

/* Zona Multimedia (dentro de Insertar), resaltada en miel */
.grupo--zona {
  margin: -4px 0 -4px 10px; padding: 4px 12px 4px; border: 1px solid #E9D39B; border-radius: 10px;
  background: linear-gradient(180deg, #FFF8E6, #FBF1D6);
  box-shadow: inset 0 1px 0 #fff;
}
.grupo--zona + .grupo, .grupo:has(+ .grupo--zona) { border-right: 0; }
.grupo--zona .grupo__nombre { color: #8A5E00; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; font-size: 10.5px; }
.grupo--zona .rb:hover { background: #F5E4B8; }
.grupo--zona .rb--grande .rb__ico { color: #0B1F3A; }

.rb {
  border: 0; border-radius: 8px; background: transparent; color: var(--texto);
  font-weight: 500;
}
.rb:hover { background: #EFE9DA; }
.rb:active { background: #E6DEC9; }
.rb.activo { background: #E9E1CC; box-shadow: inset 0 0 0 1px #D8CBA8; }
.rb[disabled] { opacity: .45; cursor: default; }
.rb--grande {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  min-width: 68px; height: 68px; padding: 6px 8px; font-size: 12px; line-height: 1.2; text-align: center; white-space: nowrap;
}
.rb--grande .rb__ico { display: flex; width: 34px; height: 34px; align-items: center; justify-content: center; color: var(--azul); }
.rb--chico {
  display: flex; align-items: center; gap: 8px; white-space: nowrap;
  height: 30px; padding: 0 10px 0 6px; font-size: 12.5px; min-width: 44px; border-radius: 6px;
}
.rb--chico .rb__ico { display: flex; color: var(--azul); }
.rb--glifo { width: 34px; min-width: 34px; padding: 0; justify-content: center; }
.rb__glifo { width: 20px; text-align: center; font-family: Georgia, serif; font-size: 16px; color: var(--azul); }

.estilo { display: flex; flex-direction: column; gap: 6px; padding-top: 2px; }
.estilo select {
  width: 176px; height: 30px; padding: 0 8px; background: #fff;
  border: 1px solid var(--borde-2); border-radius: 6px; font-size: 13px;
}
.estilo__rapidos { display: flex; gap: 4px; }
.estilo__rapidos button { background: #fff; border: 1px solid var(--linea); border-radius: 4px; height: 28px; padding: 0 8px; color: var(--azul); line-height: 1; }
.estilo__rapidos button:hover { border-color: var(--miel); }
.estilo__rapidos .e-t { font-family: var(--serif); font-size: 17px; }
.estilo__rapidos .e-s { font-family: var(--serif); font-size: 15px; }
.estilo__rapidos .e-p { font-size: 13px; }

/* ---------- Área de trabajo ---------- */
.area { flex: 1; min-height: 0; display: flex; }
.mesa { flex: 1 1 auto; min-width: 0; overflow-y: auto; padding: 32px 24px 64px; }
.hoja {
  max-width: 820px; margin: 0 auto; background: #fff; border-radius: 6px;
  box-shadow: 0 1px 2px rgba(11,31,58,.08), 0 8px 28px rgba(11,31,58,.08);
  padding: 56px 72px 64px; position: relative;
}
.hoja__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-bottom: 16px; }
.chip-tipo {
  font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  padding: 4px 10px; border-radius: 999px; background: #E6EDF7; color: var(--azul);
}
.chip-tipo--aviso { background: #FFF4D9; color: #7A5300; }
.chip-tipo--ejecutiva { background: var(--azul); color: var(--miel); box-shadow: inset 0 0 0 1px var(--miel); }
.hoja__fecha { font-size: 13px; color: var(--gris); }
.hoja__titulo {
  margin: 0 0 20px; font-family: var(--serif); font-weight: 400; font-size: 40px; line-height: 1.12;
  color: var(--azul); outline: none; border-radius: 4px;
}
.hoja__titulo:focus { box-shadow: 0 0 0 6px #F7F2E4; background: #F7F2E4; }
[data-placeholder]:empty::before { content: attr(data-placeholder); color: #A39C8D; pointer-events: none; }
.cuerpo:has(> p:only-child > br:only-child)::before { content: attr(data-placeholder); color: #A39C8D; position: absolute; pointer-events: none; }

.hoja__portada { margin: 0 0 28px; position: relative; }
.hoja__portada img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 6px; }
.portada-vacia {
  width: 100%; aspect-ratio: 16 / 6; border: 2px dashed var(--borde-2); border-radius: 8px;
  background: #FBFAF6; color: var(--gris); display: flex; flex-direction: column; gap: 8px;
  align-items: center; justify-content: center; font-weight: 600; font-size: 14px;
}
.portada-vacia:hover { border-color: var(--miel); color: var(--azul); background: #FFFBF0; }
.portada-vacia svg { width: 30px; height: 30px; color: var(--azul); }
.portada-acciones { position: absolute; top: 12px; left: 12px; display: flex; gap: 6px; }
.portada-acciones button {
  font-size: 11px; font-weight: 600; padding: 5px 11px; border-radius: 999px; border: 0;
  background: rgba(11,31,58,.84); color: #fff;
}
.portada-acciones button:hover { background: var(--azul); color: var(--miel); }

.cuerpo { outline: none; min-height: 240px; position: relative; }
.fuente {
  width: 100%; min-height: 560px; border: 1px solid var(--linea); border-radius: 6px;
  background: #FBFAF6; padding: 18px 20px; font: 13.5px/1.65 var(--mono); color: #233; resize: vertical;
  tab-size: 2;
}
/* Etiquetas: discretas, justo después de la fecha (igual que en la web) */
.hoja__etiquetas { display: inline-flex; flex-wrap: wrap; gap: 4px 10px; font-size: 13px; color: var(--gris); opacity: .8; }
.hoja__etiquetas:empty { display: none; }
.hoja__etiquetas span::before { content: "·"; margin-right: 10px; }

body.modo-web .hoja__titulo:focus { box-shadow: none; background: none; }
body.modo-web .portada-acciones, body.modo-web .portada-vacia { display: none; }

/* ---------- Panel derecho ---------- */
.panel {
  flex: 0 0 330px; background: var(--cinta); border-left: 1px solid var(--borde);
  overflow-y: auto; display: flex; flex-direction: column;
  box-shadow: -6px 0 18px rgba(11,31,58,.06);
}
.panel__cab {
  position: sticky; top: 0; z-index: 2; display: flex; align-items: flex-start; gap: 12px;
  padding: 16px 20px 14px; background: var(--azul); color: #fff; border-bottom: 3px solid var(--miel);
}
.panel__cab > svg { color: var(--miel); margin-top: 2px; }
.panel__titulo { margin: 0; font-family: var(--serif); font-weight: 400; font-size: 21px; line-height: 1.15; color: #fff; }
.panel__sub { margin: 4px 0 0; font-size: 12px; line-height: 1.45; color: rgba(255,255,255,.72); }
.panel__cerrar { display: none; margin-left: auto; width: 34px; height: 34px; border: 0; border-radius: 8px; background: rgba(255,255,255,.1); color: #fff; font-size: 20px; line-height: 1; }
.panel__cuerpo { padding: 18px 20px 24px; display: flex; flex-direction: column; gap: 16px; }
.subir.subir--panel { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 8px; align-items: center; }
.subir.subir--panel img, .subir.subir--panel .subir__vacio { grid-column: 1 / -1; width: 100%; height: 120px; border-radius: 6px; }
.subir.subir--panel span { font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.btn-panel { display: none; }
.campo { display: flex; flex-direction: column; gap: 6px; }
.campo__etq { font-size: 12px; font-weight: 600; color: var(--texto-2); }
.campo__ayuda { font-size: 12px; color: var(--gris); }
.campo__ayuda.exceso { color: #A33A1C; font-weight: 600; }
.campo input[type="text"], .campo input[type="date"], .campo input[type="url"], .campo input[type="number"], .campo select, .campo textarea {
  height: 36px; padding: 0 10px; border: 1px solid var(--borde-2); border-radius: 8px; background: #fff; width: 100%;
}
.campo textarea { height: auto; padding: 8px 10px; line-height: 1.5; resize: vertical; }
.campo input:focus, .campo textarea:focus, .campo select:focus { outline: none; border-color: var(--miel); box-shadow: 0 0 0 3px rgba(224,165,38,.2); }

.segmento { display: flex; flex-wrap: wrap; gap: 3px; background: #fff; border: 1px solid var(--borde-2); border-radius: 8px; padding: 3px; min-height: 38px; }
.segmento button { flex: 1; height: 30px; border: 0; border-radius: 6px; background: transparent; font-weight: 500; color: var(--texto-2); }
.segmento button[data-tipo="Notas Ejecutivas"] { flex-basis: 100%; } /* tercera opción en una fila completa */
.segmento button[aria-checked="true"] { background: var(--azul); color: #fff; }

.etiquetas { display: flex; flex-wrap: wrap; gap: 6px; padding: 6px 8px; background: #fff; border: 1px solid var(--borde-2); border-radius: 8px; min-height: 38px; align-items: center; }
.etiquetas:focus-within { border-color: var(--miel); box-shadow: 0 0 0 3px rgba(224,165,38,.2); }
.etq { display: inline-flex; align-items: center; gap: 4px; padding: 3px 4px 3px 10px; border-radius: 999px; background: #EDF1F7; color: var(--azul); font-weight: 500; font-size: 12.5px; }
.etq button { border: 0; background: transparent; width: 20px; height: 20px; border-radius: 50%; color: var(--gris); font-size: 14px; line-height: 1; }
.etq button:hover { background: #DCE4F0; color: var(--azul); }
.etiquetas input { flex: 1; min-width: 80px; border: 0 !important; outline: none; height: 26px !important; padding: 0 4px !important; box-shadow: none !important; background: transparent !important; }

.tarjeta-prev { background: #fff; border: 1px solid var(--linea); border-radius: 10px; overflow: hidden; }
.tarjeta-prev__img { height: 120px; background: #E9E5DB center / cover no-repeat; }
.tarjeta-prev__txt { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 4px; }
.tarjeta-prev__tipo { font-size: 11px; color: #7A5300; font-weight: 700; letter-spacing: .08em; }
.tarjeta-prev__titulo { font-family: var(--serif); font-size: 17px; color: var(--azul); line-height: 1.25; }
.tarjeta-prev__resumen { font-size: 12.5px; color: var(--gris); line-height: 1.45; }

/* ---------- Barra inferior ---------- */
.barra {
  display: flex; align-items: center; gap: 18px; padding: 6px 20px;
  background: var(--cinta); border-top: 1px solid var(--borde);
  font-size: 12px; color: var(--gris); flex-wrap: wrap; flex: none;
}
.barra__esp { flex: 1; }
#bArchivo { font-family: var(--mono); font-size: 11.5px; }
.interruptor { display: flex; gap: 2px; background: #EFEBE1; border-radius: 6px; padding: 2px; }
.interruptor button { border: 0; background: transparent; padding: 3px 10px; border-radius: 4px; font-size: 12px; color: var(--gris); }
.interruptor button.activo { background: #fff; color: var(--azul); font-weight: 600; box-shadow: 0 1px 2px rgba(11,31,58,.1); }

/* ---------- Barra flotante de tablas ---------- */
.tabla-barra {
  position: fixed; z-index: 30; display: flex; gap: 2px; background: var(--azul);
  border-radius: 8px; padding: 4px; box-shadow: 0 6px 16px rgba(11,31,58,.25);
}
.tabla-barra[hidden] { display: none; }
.tabla-barra button { height: 28px; padding: 0 10px; border: 0; border-radius: 5px; background: transparent; color: #fff; font-size: 12px; font-weight: 500; }
.tabla-barra button:hover { background: rgba(255,255,255,.12); }
.tabla-barra .miel { color: var(--miel); }
.tabla-barra .rojo { color: #FFB4A8; }

/* ---------- Bloques especiales dentro del editor ---------- */
.ed-embed {
  position: relative; margin: 24px 0; border-radius: 8px;
  outline: 1px dashed transparent; outline-offset: 6px; user-select: none;
}
.ed-embed:hover, .ed-embed.sel { outline-color: #B8C8DE; }
.ed-embed.sel { outline: 2px solid var(--sel); }
.ed-embed__barra {
  position: absolute; top: -18px; right: 0; z-index: 3; display: none; gap: 2px; align-items: center;
  background: var(--azul); border-radius: 8px; padding: 3px; box-shadow: 0 6px 16px rgba(11,31,58,.25);
}
.ed-embed:hover .ed-embed__barra, .ed-embed.sel .ed-embed__barra { display: flex; }
.ed-embed__tipo { color: var(--miel); font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; padding: 0 8px; }
.ed-embed__barra button { height: 26px; min-width: 26px; padding: 0 8px; border: 0; border-radius: 5px; background: transparent; color: #fff; font-size: 12px; display: inline-flex; align-items: center; justify-content: center; }
.ed-embed__barra button:hover { background: rgba(255,255,255,.14); }
.ed-embed__barra button.rojo { color: #FFB4A8; }
.ed-embed__vista a { pointer-events: none; }
.ed-embed__vista { margin: 0; }
.ed-embed__vista > *:first-child { margin-top: 0 !important; }
.ed-embed__vista > *:last-child { margin-bottom: 0 !important; }

.yt-prev {
  position: relative; aspect-ratio: 16 / 9; border-radius: 6px; overflow: hidden;
  background: #111A26 center / cover no-repeat; display: flex; align-items: center; justify-content: center;
}
.yt-prev::after { content: ''; position: absolute; inset: 0; background: linear-gradient(transparent 55%, rgba(0,0,0,.55)); }
.yt-prev__play { position: relative; z-index: 1; display: flex; width: 68px; height: 48px; border-radius: 12px; background: rgba(232,227,215,.95); align-items: center; justify-content: center; }
.yt-prev__play svg { fill: #111A26; stroke: none; }
.yt-prev__txt { position: absolute; z-index: 1; left: 14px; bottom: 12px; font-size: 12px; color: rgba(255,255,255,.85); }

.red-prev {
  display: flex; align-items: center; gap: 14px; padding: 18px 20px; border: 1px solid var(--linea);
  border-radius: 10px; background: #FBFAF6; color: var(--texto-2); font-size: 14px;
}
.red-prev strong { color: var(--azul); display: block; }
.red-prev svg { width: 34px; height: 34px; color: var(--azul); }

.ed-img-sel { outline: 3px solid var(--sel); outline-offset: 2px; }

/* =====================================================================
   CONTENIDO DE LA NOTICIA (.prosa) — copia de las reglas de estilos.css
   para que la hoja se vea igual que la noticia publicada.
   ===================================================================== */
.prosa { --borde: rgba(11,31,58,.10); --gris-texto: #55607A; --miel-oscuro: #8A5A00; font-size: 17px; line-height: 1.75; color: #1F2A44; }
.prosa p { margin: 0 0 18px; }
.prosa h2 { margin: 40px 0 14px; font-family: var(--serif); font-weight: 400; font-size: 30px; line-height: 1.12; color: var(--azul); }
.prosa h3 { margin: 28px 0 10px; font-size: 20px; font-weight: 700; line-height: 1.25; color: var(--azul); }
.prosa h4 { margin: 20px 0 8px; font-size: 17px; font-weight: 700; color: var(--azul); }
.prosa ul, .prosa ol { margin: 0 0 22px; padding-left: 22px; }
.prosa li { margin-bottom: 6px; }
.prosa li::marker { color: var(--miel-oscuro); font-weight: 700; }
.prosa a { color: var(--azul); }
.prosa strong, .prosa b { font-weight: 700; }
.prosa img { display: block; max-width: 100%; height: auto; border-radius: 12px; margin: 8px auto 24px; }
.prosa blockquote { margin: 0 0 28px; padding: 20px 24px; background: var(--azul); color: #fff; border-radius: 12px; }
.prosa blockquote p:last-child { margin-bottom: 0; }
.prosa blockquote a { color: var(--miel); }
.prosa code { font-family: var(--mono); font-size: .88em; background: #F1EEE6; padding: 1px 5px; border-radius: 4px; }
.prosa pre { background: #F1EEE6; padding: 14px 16px; border-radius: 6px; overflow-x: auto; }
.prosa pre code { background: none; padding: 0; }
.prosa hr { border: 0; height: 1px; background: var(--borde); margin: 40px 0; }
.prosa table { width: 100%; border-collapse: collapse; margin-bottom: 24px; font-size: 15.5px; }
.prosa th, .prosa td { padding: 10px 12px; border-bottom: 1px solid var(--borde); text-align: left; }
.cuerpo table th, #vistaWeb table th { background: var(--azul); color: #fff; font-weight: 600; border-bottom: 0; }
.cuerpo table tbody tr:nth-child(even), #vistaWeb table tbody tr:nth-child(even) { background: var(--crema); }
.cuerpo table td, .cuerpo table th { min-width: 60px; }
.cuerpo table.tabla-activa { outline: 2px solid var(--sel); outline-offset: 6px; }
.prosa .lead { font-size: 19px; color: #2A3550; }
#vistaWeb .video-16x9 iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-16x9 { position: relative; width: 100%; aspect-ratio: 16 / 9; margin: 8px 0 24px; border-radius: 12px; overflow: hidden; background: var(--azul); }

/* =========================================================
   Bloques del Editor de Noticias — idénticos a los de estilos.css
   Van dentro de .prosa, por eso llevan ese prefijo: así ganan a
   las reglas generales de .prosa img, .prosa iframe y .prosa a.
   ========================================================= */

/* Superíndice y subíndice */
.prosa sup, .prosa sub { font-size: .72em; line-height: 0; }

/* Viñetas con niveles */
.prosa li > ul, .prosa li > ol { margin: 6px 0 4px; }
.prosa ul ul { list-style-type: circle; }
.prosa ul ul ul { list-style-type: square; }
.prosa ol ol { list-style-type: lower-alpha; }
.prosa ol ol ol { list-style-type: lower-roman; }

/* Documento adjunto (PDF u otro archivo) */
.prosa .doc-noticia { margin: 8px 0 24px; }
.prosa .doc-noticia a {
  display: flex; align-items: center; gap: 16px; padding: 16px 20px;
  border: 1px solid var(--borde, rgba(11,31,58,.10)); border-radius: 14px; background: var(--crema, #F6F4EE);
  color: var(--azul, #0B1F3A); text-decoration: none; font-weight: 600; font-size: 15.5px; line-height: 1.4;
  transition: border-color .2s, background .2s, transform .2s, box-shadow .2s;
}
.prosa .doc-noticia a::before {
  content: ""; flex: none; width: 34px; height: 42px; border-radius: 4px;
  background: linear-gradient(225deg, var(--crema, #F6F4EE) 0 7px, transparent 7px), linear-gradient(0deg, var(--miel, #E0A526) 0 9px, var(--azul, #0B1F3A) 9px);
}
.prosa .doc-noticia a::after {
  content: "↓"; flex: none; margin-left: auto; width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center; background: var(--azul, #0B1F3A); color: var(--miel, #E0A526); font-size: 17px;
}
.prosa .doc-noticia a:hover { border-color: var(--miel, #E0A526); background: #FFFBF0; transform: translateY(-2px); box-shadow: 0 10px 24px rgba(11,31,58,.10); color: var(--azul, #0B1F3A); }

/* Botón */
.prosa .boton-noticia { margin: 8px 0 24px; }
.prosa .boton-noticia a {
  display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 26px; border-radius: 999px;
  background: var(--azul, #0B1F3A); color: #fff; text-decoration: none; font-weight: 600; font-size: 15px;
  box-shadow: inset 0 -3px 0 var(--miel, #E0A526); transition: background .2s, transform .2s;
}
.prosa .boton-noticia a:hover { background: #14315A; color: #fff; transform: translateY(-2px); }

/* Video y audio locales */
.prosa .medio { margin: 8px 0 24px; }
.prosa .medio video { display: block; width: 100%; max-height: 70vh; border-radius: 12px; background: #000; }
.prosa .medio audio { display: block; width: 100%; }
.prosa .medio figcaption, .prosa .grafico-noticia figcaption { margin-top: 8px; font-size: 14px; color: var(--gris-texto, #55607A); text-align: center; }

/* Gráfico (imagen SVG) */
.prosa .grafico-noticia { margin: 8px 0 24px; padding: 12px; border: 1px solid var(--borde, rgba(11,31,58,.10)); border-radius: 16px; background: #fff; }
.prosa .grafico-noticia img { display: block; width: 100%; height: auto; margin: 0; border-radius: 8px; }

/* Tarjeta-enlace de Facebook o Instagram (sin código de terceros) */
.prosa .tarjeta-red { margin: 8px 0 24px; }
.prosa .tarjeta-red a {
  display: flex; align-items: stretch; overflow: hidden; text-decoration: none; color: inherit;
  border: 1px solid var(--borde, rgba(11,31,58,.10)); border-radius: 16px; background: #fff; transition: box-shadow .2s, border-color .2s;
}
.prosa .tarjeta-red a:hover { border-color: var(--miel, #E0A526); box-shadow: 0 10px 24px rgba(11,31,58,.12); }
.prosa .tarjeta-red img { display: block; width: 38%; max-width: 260px; aspect-ratio: 4 / 3; object-fit: cover; margin: 0; border-radius: 0; flex: none; }
.prosa .tarjeta-red__texto { display: flex; flex-direction: column; gap: 6px; padding: 18px 22px; line-height: 1.45; }
.prosa .tarjeta-red__red { font-size: 11.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--miel-oscuro, #8A5A00); }
.prosa .tarjeta-red__texto strong { font-family: 'DM Serif Display', Georgia, serif; font-weight: 400; font-size: 21px; color: var(--azul, #0B1F3A); }
.prosa .tarjeta-red__texto span:not(.tarjeta-red__red) { font-size: 15px; color: var(--gris-texto, #55607A); }
.prosa .tarjeta-red__texto em { margin-top: auto; font-style: normal; font-size: 13.5px; font-weight: 600; color: var(--azul, #0B1F3A); }
@media (max-width: 560px) { .prosa .tarjeta-red a { flex-direction: column; } .prosa .tarjeta-red img { width: 100%; max-width: none; aspect-ratio: 16 / 9; } }

/* Publicación oficial de Facebook o Instagram (iframe) */
.prosa .red-oficial { margin: 8px 0 24px; display: flex; justify-content: center; }
.prosa .red-oficial iframe { width: 100%; max-width: 500px; height: 640px; margin: 0; border: 0; border-radius: 12px; background: #fff; }

/* Tablas dentro de una noticia: encabezado azul y filas alternas */
.prosa .datos-noticia ~ table th, [data-noticia] table th, #vistaWeb table th { background: var(--azul, #0B1F3A); color: #fff; font-weight: 600; border-bottom: 0; }
[data-noticia] table tbody tr:nth-child(even), #vistaWeb table tbody tr:nth-child(even) { background: var(--crema, #F6F4EE); }
[data-noticia] table { border-radius: 12px; overflow: hidden; }
@media (max-width: 640px) { [data-noticia] table { display: block; overflow-x: auto; } }
/* ===== Fin de los bloques del Editor de Noticias ===== */

/* Galería dentro del editor (vista simple; en la web la dibuja galeria.js) */
.ed-embed .galeria { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.ed-embed .galeria img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 6px; display: block; margin: 0; }
#vistaWeb .galeria { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 8px; margin: 24px 0; }
#vistaWeb .galeria img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; margin: 0; border-radius: 8px; }

/* ---------- Diálogos ---------- */
.dlg {
  border: 0; padding: 0; border-radius: 14px; background: var(--cinta); color: var(--texto);
  width: min(560px, calc(100vw - 32px)); max-height: calc(100vh - 40px);
  box-shadow: 0 24px 60px rgba(7,22,41,.45);
}
.dlg--ancho { width: min(980px, calc(100vw - 32px)); }
.dlg::backdrop { background: rgba(11,31,58,.55); }
.dlg__form { display: flex; flex-direction: column; max-height: calc(100vh - 40px); }
.dlg__cab {
  display: flex; align-items: center; gap: 14px; padding: 18px 24px;
  background: var(--azul); color: #fff; border-bottom: 3px solid var(--miel); flex: none;
}
.dlg__cab svg { width: 24px; height: 24px; color: var(--miel); }
.dlg__cab h2 { margin: 0; font-family: var(--serif); font-weight: 400; font-size: 23px; }
.dlg__cab p { margin: 2px 0 0; font-size: 13px; color: rgba(255,255,255,.75); }
.dlg__cerrar { margin-left: auto; width: 38px; height: 38px; border: 0; border-radius: 8px; background: rgba(255,255,255,.08); color: #fff; font-size: 20px; line-height: 1; }
.dlg__cerrar:hover { background: rgba(255,255,255,.16); }
.dlg__cuerpo { padding: 22px 24px; display: flex; flex-direction: column; gap: 14px; overflow-y: auto; }
.dlg__pie { display: flex; align-items: center; gap: 12px; padding: 14px 24px; border-top: 1px solid var(--linea); background: #F4F1EA; flex: none; flex-wrap: wrap; }
.dlg__pie .esp { flex: 1; }
.dlg__nota { padding: 12px 14px; background: var(--nota-fondo); border-radius: 10px; font-size: 13px; line-height: 1.55; color: var(--nota-texto); }
.dlg__nota--alerta { background: #FFF4D9; color: #6A4700; }
.dlg__nota code, .codigo { font-family: var(--mono); font-size: 12.5px; }
.dlg__fila { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.dlg__dos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; }
.dlg__error { color: #A33A1C; font-size: 13px; font-weight: 600; }
.opciones { display: flex; flex-direction: column; gap: 8px; }
.opcion { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--borde-2); border-radius: 10px; background: #fff; cursor: pointer; font-size: 13.5px; }
.opcion:has(input:checked) { border-color: var(--azul); box-shadow: 0 0 0 1px var(--azul); }
.opcion input { margin-top: 3px; accent-color: var(--azul); }
.opcion small { display: block; color: var(--gris); font-size: 12.5px; margin-top: 2px; }
.check { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--texto-2); }
.check input { width: 18px; height: 18px; accent-color: var(--azul); }

.subir {
  display: flex; align-items: center; gap: 12px; padding: 8px; background: #fff; border: 1px solid var(--borde-2); border-radius: 8px;
}
.subir img, .subir .subir__vacio { width: 96px; height: 60px; object-fit: cover; border-radius: 6px; background: #E9E5DB; flex: none; }
.subir span { flex: 1; font-size: 13px; color: var(--texto-2); min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.btn-chico { height: 34px; padding: 0 14px; border: 1px solid var(--borde-2); border-radius: 999px; background: var(--cinta); font-size: 12px; font-weight: 600; color: var(--azul); white-space: nowrap; }
.btn-chico:hover { border-color: var(--miel); }
.btn-chico--rojo { color: #A33A1C; }

.arbol { padding: 14px 16px; background: #fff; border: 1px solid var(--linea); border-radius: 10px; font-size: 13px; }
.arbol div { display: flex; align-items: center; gap: 8px; padding: 3px 0; color: #2B3340; }
.arbol svg { width: 16px; height: 16px; }
.arbol .n { font-family: var(--mono); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.arbol .t { margin-left: auto; color: var(--gris); font-size: 12px; white-space: nowrap; }
.linea-lista { margin-top: 8px; display: flex; gap: 8px; align-items: center; padding: 8px 10px; background: #fff; border-radius: 6px; font-family: var(--mono); font-size: 12.5px; color: var(--azul); }
.linea-lista span { flex: 1; overflow-wrap: anywhere; }
.linea-lista[hidden] { display: none; }

.lista-proy { display: flex; flex-direction: column; gap: 6px; max-height: 50vh; overflow-y: auto; }
.lista-proy__item { display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: #fff; border: 1px solid var(--linea); border-radius: 10px; }
.lista-proy__item.actual { border-color: var(--miel); }
.lista-proy__item b { display: block; color: var(--azul); font-weight: 600; }
.lista-proy__item small { color: var(--gris); }
.lista-proy__item > div { flex: 1; min-width: 0; }

.grafico-prev { background: #fff; border: 1px solid var(--linea); border-radius: 10px; padding: 8px; }
.grafico-prev img, .grafico-prev svg { display: block; width: 100%; height: auto; }
.fotos-edit { display: flex; flex-direction: column; gap: 8px; max-height: 42vh; overflow-y: auto; }
.fotos-edit__item { display: flex; gap: 10px; align-items: center; }
.fotos-edit__item img { width: 72px; height: 54px; object-fit: cover; border-radius: 6px; flex: none; }
.fotos-edit__item input[type="text"] { flex: 1; height: 34px; padding: 0 10px; border: 1px solid var(--borde-2); border-radius: 8px; }

/* ---------- Avisos ---------- */
.avisos { position: fixed; left: 50%; bottom: 46px; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; z-index: 60; align-items: center; pointer-events: none; }
.aviso { background: var(--azul); color: #fff; padding: 10px 18px; border-radius: 999px; font-size: 13px; box-shadow: 0 8px 24px rgba(7,22,41,.3); border-bottom: 2px solid var(--miel); animation: aparecer .2s ease-out; max-width: 80vw; }
.aviso--error { background: #7A2614; border-bottom-color: #FFB4A8; }
@keyframes aparecer { from { opacity: 0; transform: translateY(8px); } }

/* ---------- Adaptación a pantallas pequeñas ---------- */
@media (max-width: 1100px) {
  .panel { display: none; }
  body.ver-panel .panel { display: flex; position: fixed; right: 0; top: 0; bottom: 0; z-index: 40; width: min(360px, 92vw); box-shadow: -8px 0 30px rgba(11,31,58,.25); }
  body.ver-panel .panel__cerrar { display: block; }
  .btn-panel {
    display: inline-flex; align-items: center; gap: 8px; position: fixed; right: 16px; bottom: 48px; z-index: 35;
    height: 44px; padding: 0 18px; border: 0; border-radius: 999px; background: var(--azul); color: #fff;
    font-weight: 600; font-size: 13px; box-shadow: 0 8px 22px rgba(11,31,58,.3), inset 0 -3px 0 var(--miel);
  }
  .btn-panel svg { color: var(--miel); }
  body.ver-panel .btn-panel { display: none; }
}
@media (max-width: 760px) {
  .hoja { padding: 32px 22px 40px; }
  .hoja__titulo { font-size: 30px; }
  .liston__estado { display: none; }
  .dlg__dos, .dlg__fila { grid-template-columns: 1fr; }
}
body.pantalla-completa .panel { display: none; }

/* ---------- Entrada: aviso en celular y contraseña ---------- */
body:not(.abierto) { overflow: hidden; }
.acceso {
  position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 20px;
  background: radial-gradient(circle at 50% 30%, #12325C 0%, #0B1F3A 55%, #071629 100%);
  overflow-y: auto;
}
.acceso__tarjeta {
  width: min(440px, 100%); background: var(--cinta); border-radius: 16px; overflow: hidden;
  box-shadow: 0 30px 70px rgba(0,0,0,.45);
}
.acceso__cab { display: flex; align-items: center; gap: 16px; padding: 22px 26px; background: var(--azul); color: #fff; border-bottom: 3px solid var(--miel); }
.acceso__cab h1 { margin: 0; font-family: var(--serif); font-weight: 400; font-size: 26px; line-height: 1.1; }
.acceso__cab p { margin: 4px 0 0; font-size: 12.5px; color: rgba(255,255,255,.72); }
.acceso__ico { flex: none; border-radius: 14px; }
.acceso__ico, .acceso__ico * { stroke: none; }
.acceso__cuerpo { display: flex; flex-direction: column; gap: 12px; padding: 26px; }
.acceso__cuerpo[hidden] { display: none; }
.acceso__cuerpo > svg { color: var(--azul); }
.acceso__cuerpo h2 { margin: 0; font-family: var(--serif); font-weight: 400; font-size: 24px; color: var(--azul); }
.acceso__cuerpo p { margin: 0; font-size: 14.5px; line-height: 1.6; color: var(--texto-2); }
.acceso__etq { font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: #9A6A00; }
.acceso__campo { display: flex; align-items: center; gap: 6px; margin-top: 6px; background: #fff; border: 1px solid var(--borde-2); border-radius: 10px; padding: 4px 4px 4px 14px; }
.acceso__campo:focus-within { border-color: var(--miel); box-shadow: 0 0 0 3px rgba(224,165,38,.22); }
.acceso__campo input { flex: 1; min-width: 0; border: 0; outline: none; height: 40px; font-size: 16px; background: transparent; }
.acceso__campo button { border: 0; background: var(--cinta); color: var(--azul); font-size: 12px; font-weight: 600; height: 36px; padding: 0 12px; border-radius: 8px; }
.acceso__error { color: #A33A1C !important; font-weight: 600; font-size: 13px !important; }
.acceso__cuerpo .btn { justify-content: center; }
.acceso__volver { align-self: center; font-size: 13px; color: var(--enlace); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Versión y «Acerca de» ---------- */
.version {
  display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: 999px;
  border: 1px solid #E3D3A8; background: #FFF8E6; color: #7A5300; font-size: 11.5px; font-weight: 600;
}
.version:hover { background: #FBEFCF; border-color: var(--miel); }
.acerca { display: flex; align-items: center; gap: 16px; }
.acerca__ico { width: 72px; height: 72px; border-radius: 16px; box-shadow: 0 6px 16px rgba(11,31,58,.18); }
.acerca__nombre { margin: 0; font-family: var(--serif); font-size: 26px; color: var(--azul); line-height: 1.1; }
.acerca__ver { margin: 4px 0 0; font-size: 13px; color: #7A5300; font-weight: 600; }
.historial { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; max-height: 210px; overflow-y: auto; }
.historial li { display: flex; gap: 10px; font-size: 13px; line-height: 1.5; color: var(--texto-2); }
.historial b { flex: none; min-width: 34px; height: 22px; display: inline-flex; align-items: center; justify-content: center; border-radius: 6px; background: var(--azul); color: var(--miel); font-size: 12px; }
.historial li:first-child b { background: var(--miel); color: var(--azul); }
.acceso__version { margin: 4px 0 0 !important; text-align: center; font-size: 11.5px !important; color: var(--gris) !important; }

/* ---------- Barras de desplazamiento sutiles y transparentes ---------- */
* { scrollbar-width: thin; scrollbar-color: rgba(11,31,58,.18) transparent; }
*:hover { scrollbar-color: rgba(11,31,58,.32) transparent; }
::-webkit-scrollbar { width: 8px; height: 8px; background: transparent; }
::-webkit-scrollbar-track, ::-webkit-scrollbar-corner { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(11,31,58,.18); border-radius: 999px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background: rgba(11,31,58,.38); background-clip: padding-box; }
::-webkit-scrollbar-button { display: none; }
.acceso { scrollbar-color: rgba(255,255,255,.2) transparent; }
