/* Lo marcado como oculto se oculta siempre, aunque su clase le ponga display (menú de cuentas, paneles). */
[hidden] { display: none !important; }

@font-face { font-family: "Montserrat"; src: url("fonts/montserrat-latin-wght-normal.woff2") format("woff2"); font-weight: 100 900; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Montserrat"; src: url("fonts/montserrat-latin-ext-wght-normal.woff2") format("woff2"); font-weight: 100 900; font-display: swap; unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

@font-face { font-family: "DM Sans"; src: url("fonts/dm-sans-latin-wght-normal.woff2") format("woff2"); font-weight: 100 1000; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Space Grotesk"; src: url("fonts/space-grotesk-latin-wght-normal.woff2") format("woff2"); font-weight: 300 700; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Caveat"; src: url("fonts/caveat-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Caveat"; src: url("fonts/caveat-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-display: swap; }

/* Tokens. temas.js los fija según la paleta, el estilo y el fondo que elige cada usuario; estos son los de Marca con Profesional */
:root {
  --titulo: #1440C9; --fuente: "Montserrat", system-ui, sans-serif; --pc: 400; --pt: 500; --r: 12px; --r2: 9px; --bw: 1px; --bs: solid; --esp: 22px;
  --h1: 26px; --fondo-img: radial-gradient(color-mix(in srgb, var(--suave) 45%, transparent) 1.1px, transparent 1.3px); --fondo-tam: 18px 18px; --h1-fondo: none; --h1-color: var(--titulo); --degradado: linear-gradient(var(--primario), var(--primario));
  --azul: #1440C9; --azul-medio: #1A70F5; --violeta: #4E4FBB; --morado: #8E3FCF; --fucsia: #C13ACD;
  --fondo: #F4F5FC; --panel: #FFFFFF; --borde: #E3E6F0; --texto: #161A2E; --suave: #5B6180; --tenue: #EEF1FA;
  --primario: var(--azul); --primario-texto: #fff; --acento: var(--morado);
  /* Estados aptos para daltonismo (Okabe-Ito) y siempre con icono o texto */
  --pendiente: #0072B2; --encurso: #E69F00; --hecha: #009E73; --vencida: #D55E00;
  --sombra: 0 1px 2px rgba(20, 30, 80, .06), 0 8px 24px rgba(20, 30, 80, .06);
  --radio: 14px;
  --letra: clamp(16px, 0.4vw + 10.5px, 19px);
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font-family: var(--fuente); font-weight: var(--pc); font-size: var(--letra); color: var(--texto); background: var(--fondo); line-height: 1.5; -webkit-font-smoothing: antialiased; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--primario); }
svg.lucide { width: 1.1em; height: 1.1em; stroke-width: 2; vertical-align: -0.18em; flex: none; }

#app { display: grid; grid-template-columns: 260px 1fr auto; height: 100vh; }
#lateral { background: var(--panel); border-right: 1px solid var(--borde); display: flex; flex-direction: column; padding: 18px 14px; gap: 8px; overflow-y: auto; }
.marca { display: flex; align-items: center; text-decoration: none; padding: 4px 8px 12px; }
.marca img { width: 230px; height: auto; flex: none; }
.marca-texto { display: flex; flex-direction: column; line-height: 1.1; }
.marca-nombre { font-weight: 300; letter-spacing: .16em; font-size: 1.15em; color: var(--azul); }
.marca-firma { font-weight: 500; font-size: 12px; letter-spacing: .04em; color: var(--suave); margin-top: 3px; }
.salir-movil { display: none; margin: 24px 0 90px; } /* Cerrar sesión de la app: en el celular va al final de Hoy */
.marca-movil { display: none; align-items: center; gap: 10px; text-decoration: none; margin-bottom: 14px; }
.marca-movil img { width: 230px; height: auto; }
:root[data-theme="dark"] .marca img, :root[data-theme="dark"] .marca-movil img { background: #F4F5FC; padding: 8px 10px; border-radius: 12px; }
.ensenar { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; color: var(--suave); text-decoration: none; font-weight: 500; font-size: .92em; }
.ensenar:hover { background: var(--tenue); color: var(--texto); }
h1 { color: var(--titulo); }
.buscar-btn { display: flex; align-items: center; gap: 8px; border: 1px solid var(--borde); background: var(--fondo); border-radius: 10px; padding: 9px 12px; color: var(--suave); text-align: left; }
.buscar-btn span { flex: 1; }
kbd { font-size: 12px; border: 1px solid var(--borde); border-radius: 6px; padding: 1px 6px; color: var(--suave); }
#nav { display: flex; flex-direction: column; gap: 2px; margin-top: 8px; }
#nav a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; color: var(--texto); text-decoration: none; font-weight: 500; }
#nav a:hover { background: var(--tenue); }
#nav a.activo { background: var(--tenue); color: var(--primario); font-weight: 700; }
#nav .cuenta { margin-left: auto; font-size: 13px; color: var(--suave); font-weight: 600; }
.nuevo { margin-top: 10px; display: flex; align-items: center; justify-content: center; gap: 8px; background: var(--primario); color: var(--primario-texto); border: 0; border-radius: 12px; padding: 12px; font-weight: 700; }
.nuevo:hover { filter: brightness(1.08); }
.pie-lateral { margin-top: auto; display: flex; align-items: center; justify-content: space-between; color: var(--suave); font-size: 13px; padding: 8px; }
.punto { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; }

button.icono { border: 0; background: transparent; padding: 8px; border-radius: 10px; color: var(--suave); display: inline-flex; }
button.icono:hover { background: var(--tenue); color: var(--texto); }
button.primario, .boton { display: inline-flex; align-items: center; gap: 8px; border-radius: 10px; padding: 9px 16px; font-weight: 600; border: 1px solid var(--borde); background: var(--panel); text-decoration: none; color: var(--texto); }
button.primario { background: var(--primario); color: var(--primario-texto); border-color: transparent; }
.boton:hover { border-color: var(--primario); }
input[type=text], input:not([type]), input[type=date], select, textarea { border: 1px solid var(--borde); background: var(--panel); border-radius: 10px; padding: 9px 12px; }
input:focus, textarea:focus, select:focus { outline: 2px solid color-mix(in srgb, var(--primario) 40%, transparent); border-color: var(--primario); }

#vista { overflow-y: auto; padding: clamp(20px, 3vw, 56px) clamp(20px, 4vw, 72px); }
.cabecera { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
h1 { font-size: clamp(32px, 2.6vw + 12px, 64px); line-height: 1.1; margin: 0; font-weight: 800; letter-spacing: -0.02em; }
h2 { font-size: clamp(19px, 0.8vw + 10px, 26px); margin: 0 0 14px; font-weight: 700; }
.sub { color: var(--suave); margin: 6px 0 0; }
.filtros { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

/* Hoy: dos columnas que usan el ancho */
.hoy { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 28px; }
.bloque { background: var(--panel); border: var(--bw) var(--bs) var(--borde); border-radius: var(--radio); padding: 22px 24px; box-shadow: var(--sombra); }
.captura-rapida { display: flex; gap: 10px; margin-bottom: 28px; }
.captura-rapida input { flex: 1; font-size: 1.05em; padding: 14px 18px; border-radius: 14px; }
.captura-rapida.con-ayuda { flex-direction: column; gap: 8px; }
.captura-rapida.con-ayuda label { color: var(--suave); font-size: 14px; }
.captura-rapida.con-ayuda > div { display: flex; gap: 10px; }
.captura-rapida.con-ayuda input:first-child { flex: 1; }
.ayuda-editor { color: var(--suave); margin: 0 0 -1.7em; pointer-events: none; }
.prop span { font-weight: 600; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.cifras { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; margin: 4px 0 26px; border-top: 1px solid var(--borde); border-bottom: 1px solid var(--borde); }
.cifra { padding: 16px 0; }
.cabecera > div:first-child { flex: 1 1 auto; }
.filtros select { width: auto; }
.cifra strong { display: block; font-size: clamp(30px, 2vw + 10px, 46px); font-weight: 800; line-height: 1; }
.cifra span { color: var(--suave); font-size: 14px; }

/* Listas de documentos: filas, no rejilla de cajas */
.lista { display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--borde); border-radius: var(--radio); overflow: hidden; box-shadow: var(--sombra); }
.fila { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 14px 20px; border-bottom: 1px solid var(--borde); color: var(--texto); text-decoration: none; }
.fila:last-child { border-bottom: 0; }
.fila-sel { display: flex; align-items: stretch; border-bottom: 1px solid var(--borde); }
.fila-sel:last-child { border-bottom: 0; }
.fila-sel .fila { flex: 1; min-width: 0; border-bottom: 0; }
.chk { display: flex; align-items: center; padding: 0 4px 0 18px; cursor: pointer; }
.chk input, .sel-todo input { width: 20px; height: 20px; accent-color: var(--primario); cursor: pointer; }
.sel-todo { display: flex; align-items: center; gap: 10px; margin: 0 0 10px 2px; color: var(--suave); font-size: 14px; cursor: pointer; }
.sel-fila { display: flex; align-items: center; margin: 0 0 10px; }
#lst { margin-bottom: 90px; }
.sel-fila .sel-todo { margin: 0 0 0 2px; }
.barra-lote { position: fixed; bottom: 16px; left: 284px; right: 96px; margin: 0 auto; width: fit-content; z-index: 30; justify-content: center; display: flex; flex-wrap: wrap; gap: 2px; align-items: center; max-width: 100%; padding: 6px 6px 6px 14px; background: var(--texto); color: var(--panel); border-radius: 22px; box-shadow: var(--sombra); white-space: nowrap; }
.barra-lote[hidden] { display: none; }
.barra-lote strong { margin-right: 6px; font-size: 14px; }
.barra-lote > * { flex-shrink: 0; }
.barra-lote .boton { display: inline-flex; align-items: center; gap: 6px; background: transparent; color: inherit; border: 0; border-radius: 999px; padding: 8px 10px; }
.barra-lote .boton:hover { background: rgba(255,255,255,.12); }
.barra-lote .peligro { color: #FF8A8A; }
.barra-lote select { max-width: 180px; border-radius: 999px; }
@media (max-width: 560px) { .barra-lote .boton span { display: none; } .barra-lote .boton { padding: 10px; } }
@media (max-width: 820px) { .barra-lote { left: 12px; right: 76px; bottom: calc(12px + env(safe-area-inset-bottom)); } }
.fila:hover { background: var(--tenue); }
.fila .t { font-weight: 600; }
.fila .e { color: var(--suave); font-size: 14px; }
.cabecera .acciones-cabecera { display: flex; gap: 10px; flex-wrap: wrap; }
.fila .m { color: var(--suave); font-size: 13px; text-align: right; display: flex; gap: 10px; align-items: center; }
.chip { display: inline-flex; align-items: center; gap: 5px; border-radius: 999px; padding: 2px 10px; font-size: 13px; font-weight: 600; background: var(--tenue); color: var(--suave); white-space: nowrap; }
.chip.pendiente { color: var(--pendiente); } .chip.encurso { color: var(--encurso); } .chip.hecha { color: var(--hecha); } .chip.vencida { color: var(--vencida); }
.vacio { color: var(--suave); padding: 28px; text-align: center; }

/* Documento */
.doc { max-width: 1480px; margin: 0 auto; }
.doc-barra { display: flex; align-items: center; gap: 8px; margin-bottom: 18px; color: var(--suave); font-size: 14px; flex-wrap: wrap; }
.doc-barra .ruta { flex: 1; }
.selectores { display: flex; gap: 10px; flex-wrap: wrap; }
input.titulo-doc, .prop input, .caja-buscar input { border: 0 !important; background: transparent !important; }
.titulo-doc { width: 100%; border: 0; background: transparent; font-size: clamp(30px, 2.2vw + 10px, 48px); font-weight: 800; letter-spacing: -0.02em; padding: 0; outline: none !important; }
.props { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 22px; }
.prop { display: inline-flex; align-items: center; gap: 6px; border: 1px dashed var(--borde); border-radius: 999px; padding: 4px 12px; font-size: 14px; color: var(--suave); background: transparent; }
.prop input, .prop select { border: 0; padding: 0; background: transparent; width: 11em; font: inherit; font-size: 14px; color: var(--texto); outline: none !important; cursor: pointer; }
.prop select { width: auto; max-width: 14em; appearance: none; -webkit-appearance: none; padding-right: 4px; }
.prop input[type="datetime-local"] { width: 13.5em; }
.prop input[type="date"] { width: 9.5em; }
.prop { cursor: pointer; transition: border-color .15s, background .15s; }
.prop:hover, .prop:focus-within { border-style: solid; border-color: var(--primario); background: var(--panel); }
.ProseMirror { outline: none; min-height: 50vh; line-height: 1.7; }
.ProseMirror h1 { font-size: 1.8em; margin: 1.2em 0 .4em; } .ProseMirror h2 { font-size: 1.4em; margin: 1.2em 0 .4em; } .ProseMirror h3 { font-size: 1.15em; }
.ProseMirror blockquote { border-left: 4px solid var(--acento); margin: 1em 0; padding: .2em 1em; color: var(--suave); }
.ProseMirror img { max-width: 100%; border-radius: 12px; }
.ProseMirror img.ProseMirror-selectednode { outline: 3px solid var(--primario); }
.ProseMirror pre { background: var(--tenue); padding: 14px; border-radius: 10px; overflow-x: auto; }
.ProseMirror mark { background: #FFE58A; border-radius: 3px; padding: 0 2px; }
:root[data-theme="dark"] .ProseMirror mark { background: #7A6420; color: #fff; }
.ProseMirror ul[data-type="taskList"] { list-style: none; padding-left: 4px; }
.ProseMirror ul[data-type="taskList"] li { display: flex; gap: 10px; align-items: flex-start; }
.ProseMirror ul[data-type="taskList"] li > label { margin-top: .3em; }
.ProseMirror ul[data-type="taskList"] li[data-checked="true"] > div { text-decoration: line-through; color: var(--suave); }
.ProseMirror hr { border: 0; border-top: 2px solid var(--borde); margin: 2em 0; }
.ProseMirror .arrastrando { outline: 2px dashed var(--primario); }

.burbuja { display: flex; gap: 2px; background: var(--texto); border-radius: 10px; padding: 4px; box-shadow: var(--sombra); }
.burbuja button { border: 0; background: transparent; color: var(--fondo); padding: 6px 8px; border-radius: 7px; display: inline-flex; }
.burbuja button:hover, .burbuja button.on { background: rgba(255,255,255,.18); }
.burbuja .color { width: 18px; height: 18px; border-radius: 50%; padding: 0; margin: 4px; border: 2px solid rgba(255,255,255,.6); }

.menu-barra { position: fixed; z-index: 50; background: var(--panel); border: 1px solid var(--borde); border-radius: 12px; box-shadow: var(--sombra); padding: 6px; width: 280px; max-height: 340px; overflow-y: auto; }
.menu-barra button { display: flex; width: 100%; gap: 12px; align-items: center; border: 0; background: transparent; padding: 9px 10px; border-radius: 8px; text-align: left; }
.menu-barra button.sel, .menu-barra button:hover { background: var(--tenue); }
.menu-barra small { display: block; color: var(--suave); font-size: 12px; }

/* Tareas */
.tablero { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; align-items: stretch; }
.columna { background: var(--tenue); border-radius: var(--radio); padding: 14px; min-height: 220px; }
.columna.sobre { outline: 2px dashed var(--primario); }
.columna h3 { margin: 4px 6px 12px; font-size: 15px; display: flex; align-items: center; gap: 8px; }
.tarea { background: var(--panel); border: 1px solid var(--borde); border-radius: 12px; padding: 12px 14px; margin-bottom: 10px; cursor: grab; }
.tarea .txt { font-weight: 600; }
.tarea .meta { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; font-size: 13px; color: var(--suave); }
.tarea a { font-size: 13px; color: var(--suave); }
.fila-tarea { display: grid; grid-template-columns: 30px minmax(0,1fr) 130px 120px; gap: 12px; align-items: center; padding: 12px 20px; border-bottom: 1px solid var(--borde); }
.fila-tarea .hecha { text-decoration: line-through; color: var(--suave); }
.check { width: 22px; height: 22px; border-radius: 7px; border: 2px solid var(--borde); background: var(--panel); display: inline-flex; align-items: center; justify-content: center; padding: 0; color: var(--panel); }
.check.hecha { background: var(--hecha); border-color: var(--hecha); }
.check.encurso { border-color: var(--encurso); color: var(--encurso); }
.grupo-persona h3 { margin: 22px 0 10px; display: flex; gap: 8px; align-items: center; }
.avatar { width: 28px; height: 28px; border-radius: 50%; background: linear-gradient(135deg, var(--azul), var(--morado)); color: var(--primario-texto); font-size: 13px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.segmentos { display: inline-flex; background: var(--tenue); border-radius: 10px; padding: 3px; }
.segmentos button { border: 0; background: transparent; padding: 6px 14px; border-radius: 8px; font-weight: 600; color: var(--suave); }
.segmentos button.on { background: var(--panel); color: var(--texto); box-shadow: var(--sombra); }

/* Lienzo */
.herr-sel { cursor: default; } .herr-dibujo { cursor: crosshair; } .herr-goma, .herr-borrar { cursor: cell; } .herr-gota { cursor: copy; } .herr-texto { cursor: text; } .herr-nota { cursor: copy; }
.zoom-pill { position: absolute; left: 12px; top: 12px; z-index: 6; display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 999px; border: 1px solid var(--borde); background: var(--panel); color: var(--suave); font-size: 12px; font-weight: 600; box-shadow: var(--sombra); touch-action: manipulation; }
.zoom-pill svg { width: 14px; height: 14px; }
/* Tinta: colores de marca; en oscuro, versiones claras para que se lean */
:root { --t-azul: #1440C9; --t-morado: #8E3FCF; --t-fucsia: #C13ACD; --t-tinta: #1F2233; --t-amarillo: #F5C518; }
:root[data-theme="dark"] { --t-azul: #5B86FF; --t-morado: #B57BEA; --t-fucsia: #E27BEB; --t-tinta: #EEF0FA; }
/* Barra flotante del lienzo (abajo, centrada, plegable) */
.barra-lienzo { position: absolute; width: max-content; left: 50%; bottom: 14px; transform: translateX(-50%); z-index: 7; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 4px; max-width: calc(100% - 24px); padding: 6px; border-radius: 22px; background: color-mix(in srgb, var(--panel) 92%, transparent); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border: 1px solid var(--borde); box-shadow: 0 10px 30px -8px rgba(20, 30, 80, .28), 0 2px 6px rgba(20, 30, 80, .08); touch-action: manipulation; }
.barra-lienzo .grupo { display: flex; align-items: center; gap: 2px; }
.barra-lienzo .sep { width: 1px; height: 22px; background: var(--borde); margin: 0 4px; }
.barra-lienzo button { position: relative; width: 38px; height: 38px; padding: 0; border: 0; border-radius: 14px; background: transparent; color: var(--suave); display: inline-flex; align-items: center; justify-content: center; }
.barra-lienzo button svg { width: 20px; height: 20px; }
.barra-lienzo button:hover:not(:disabled) { background: var(--tenue); color: var(--texto); }
.barra-lienzo button:disabled { opacity: .35; }
.barra-lienzo button.on { background: linear-gradient(135deg, var(--azul), var(--morado)); color: var(--primario-texto); }
.barra-lienzo button:focus-visible { outline: 3px solid var(--primario); outline-offset: 1px; }
.barra-lienzo [data-tam].on, .barra-lienzo [data-c].on { background: var(--tenue); box-shadow: inset 0 0 0 2px var(--primario); color: var(--texto); }
.barra-lienzo .punto { display: block; border-radius: 50%; background: currentColor; }
.barra-lienzo .muestra { display: block; width: 20px; height: 20px; border-radius: 50%; box-shadow: 0 0 0 2px var(--panel), 0 0 0 3px var(--borde); }
.barra-lienzo #bDedo.on { background: var(--tenue); box-shadow: inset 0 0 0 2px var(--morado); color: var(--morado); }
.barra-lienzo .plegar .lucide-chevron-up { display: none; }
.barra-lienzo.plegada { padding: 4px; border-radius: 999px; }
.barra-lienzo.plegada > :not(.plegar) { display: none; }
.barra-lienzo.plegada .plegar .lucide-chevron-up { display: block; } .barra-lienzo.plegada .plegar .lucide-chevron-down { display: none; }
.barra-lienzo [data-tip]:hover::after, .barra-lienzo [data-tip]:focus-visible::after, .zoom-pill:hover::after { content: attr(data-tip); position: absolute; bottom: calc(100% + 10px); left: 50%; transform: translateX(-50%); white-space: nowrap; background: var(--texto); color: var(--fondo); font-size: 12px; font-weight: 600; padding: 5px 9px; border-radius: 8px; pointer-events: none; }
.zoom-pill:hover::after { bottom: auto; top: calc(100% + 8px); left: 0; transform: none; }
@media (pointer: coarse) and (min-width: 561px) { .barra-lienzo button { width: 44px; height: 44px; } }
@media (pointer: coarse) { .barra-lienzo [data-tip]::after { display: none; } }
@media (max-width: 820px) { .barra-lienzo { bottom: 10px; gap: 2px; border-radius: 20px; } .barra-lienzo .sep { display: none; } }
@media (max-width: 560px) { .barra-lienzo .grupo { display: contents; } .barra-lienzo button, .barra-lienzo button { width: 34px; height: 34px; border-radius: 11px; } .barra-lienzo button svg { width: 18px; height: 18px; } .barra-lienzo { gap: 2px; padding: 5px; } }

/* Asistente */
#asistente { width: 400px; border-left: 1px solid var(--borde); background: var(--panel); display: flex; flex-direction: column; height: 100vh; }
#asistente[hidden] { display: none; }
#asistente header { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px; border-bottom: 1px solid var(--borde); }
#chat { flex: 1; overflow-y: auto; padding: 16px 18px; display: flex; flex-direction: column; gap: 12px; }
.msg { padding: 10px 14px; border-radius: 14px; max-width: 92%; white-space: pre-wrap; line-height: 1.5; }
.msg.yo { align-self: flex-end; background: var(--primario); color: var(--primario-texto); }
.msg.mind { align-self: flex-start; background: var(--tenue); }
.msg .acciones { margin-top: 8px; display: flex; gap: 8px; flex-wrap: wrap; }
.sugerencias { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 18px 10px; }
.sugerencias button { border: 1px solid var(--borde); background: var(--panel); border-radius: 999px; padding: 5px 12px; font-size: 13px; }
#formChat { display: flex; gap: 8px; padding: 12px 18px 18px; border-top: 1px solid var(--borde); }
#formChat textarea { flex: 1; resize: none; }
#abrirAsistente { position: fixed; right: 26px; bottom: 26px; z-index: 20; height: 52px; padding: 0 22px 0 18px; gap: 10px; border: 0; border-radius: 999px; color: var(--primario-texto); font-weight: 600; font-size: 15px; letter-spacing: .1px; background: linear-gradient(120deg, var(--azul) 0%, var(--morado) 55%, var(--fucsia) 100%); box-shadow: 0 12px 28px -8px color-mix(in srgb, var(--acento) 60%, transparent), 0 3px 8px color-mix(in srgb, var(--primario) 25%, transparent), inset 0 1px 0 rgba(255, 255, 255, .25); display: inline-flex; align-items: center; justify-content: center; transition: transform .18s ease, box-shadow .18s ease, filter .18s ease; }
#abrirAsistente svg { width: 20px; height: 20px; stroke-width: 2.2; }
#abrirAsistente:hover { transform: translateY(-2px); filter: brightness(1.06); box-shadow: 0 18px 34px -8px color-mix(in srgb, var(--acento) 70%, transparent), 0 4px 10px color-mix(in srgb, var(--primario) 30%, transparent), inset 0 1px 0 rgba(255, 255, 255, .3); }
#abrirAsistente:active { transform: translateY(0); }
#abrirAsistente:focus-visible { outline: 3px solid var(--panel); outline-offset: 0; box-shadow: 0 0 0 6px var(--primario), 0 12px 28px -8px color-mix(in srgb, var(--acento) 60%, transparent); }
:root[data-theme="dark"] #abrirAsistente { box-shadow: 0 12px 30px -8px color-mix(in srgb, var(--acento) 50%, transparent), 0 3px 8px rgba(0, 0, 0, .4), inset 0 1px 0 rgba(255, 255, 255, .22); }
@media (prefers-reduced-motion: reduce) { #abrirAsistente { transition: none; } #abrirAsistente:hover { transform: none; } }
/* En el lienzo se queda en un círculo con solo el ícono y sube para no tapar la barra */
body.en-lienzo #abrirAsistente { width: 52px; padding: 0; bottom: 96px; right: 22px; }
body.en-lienzo #abrirAsistente span { display: none; }
#abrirAsistente.oculto { display: none; }

dialog { border: 1px solid var(--borde); border-radius: 18px; padding: 0; background: var(--panel); color: var(--texto); box-shadow: 0 30px 80px rgba(0,0,0,.25); width: min(680px, calc(100vw - 32px)); }
dialog::backdrop { background: rgba(15, 18, 34, .35); }
.caja-buscar { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--borde); }
.caja-buscar input { flex: 1; border: 0; font-size: 1.1em; padding: 6px 0; outline: none !important; background: transparent; }
#resultados { max-height: 60vh; overflow-y: auto; }
#resultados a { display: block; padding: 12px 18px; text-decoration: none; color: var(--texto); border-bottom: 1px solid var(--borde); }
#resultados a:hover, #resultados a.sel { background: var(--tenue); }
#resultados small { display: block; color: var(--suave); }
.dlg-cuerpo { padding: 22px 24px; display: flex; flex-direction: column; gap: 14px; }
.opciones-nuevo { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; }
.opciones-nuevo button { display: flex; gap: 12px; align-items: center; border: 1px solid var(--borde); background: var(--panel); border-radius: 12px; padding: 14px; text-align: left; font-weight: 600; }
.opciones-nuevo button:hover { border-color: var(--primario); }
#toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); background: var(--texto); color: var(--fondo); padding: 10px 18px; border-radius: 12px; opacity: 0; transition: opacity .2s; pointer-events: none; z-index: 100; }
#toast.ver { opacity: 1; }

@media (max-width: 1100px) { .hoy { grid-template-columns: 1fr; } #asistente { position: fixed; right: 0; top: 0; z-index: 40; box-shadow: var(--sombra); } }
@media (max-width: 820px) {
  #app { grid-template-columns: 1fr; }
  #lateral { position: fixed; bottom: 0; left: 0; right: 0; top: auto; height: auto; flex-direction: row; align-items: center; padding: 6px 8px calc(6px + env(safe-area-inset-bottom)); z-index: 30; border-right: 0; border-top: 1px solid var(--borde); overflow: visible; }
  .marca-movil { display: flex; }
  .cuenta-mind { display: none; }
  .salir-movil { display: block; }
  #lateral .marca, #lateral .buscar-btn, #lateral .pie-lateral, #lateral .cuenta-txt, #lateral .cuenta-btn.entrar span, #nav .cuenta, #lateral .ensenar, #navProyectos { display: none; }
  #nav { flex-direction: row; margin: 0; flex: 1; justify-content: space-around; gap: 0; }
  #nav a { display: none; }
  #nav .nav-movil { display: flex; flex: 1; justify-content: space-around; gap: 2px; }
  #nav .nav-movil button { flex: 1 1 0; min-width: 0; min-height: 56px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; padding: 6px 2px; border: 0; border-radius: 12px; background: none; color: var(--texto); font: inherit; font-size: 11px; line-height: 1.1; cursor: pointer; }
  #nav .nav-movil button span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  #nav .nav-movil button svg { width: 26px; height: 26px; }
  #nav .nav-movil button.grabar { color: #fff; background: var(--degradado); border-radius: 16px; margin: 0 2px; }
  #nav .nav-movil button:active { background: var(--tenue); }
  #nav .nav-movil button.grabar:active { filter: brightness(.9); background: var(--degradado); }
  .nuevo { display: none; }
  .captura-rapida.con-ayuda > div { flex-wrap: wrap; }
  .captura-rapida.con-ayuda > div > * { flex: 1 1 100%; min-width: 0; }
  #vista { padding: 20px 16px 150px; }
  #lateral .ensenar span { display: none; }
  .tablero { grid-template-columns: 1fr; }
  .fila { grid-template-columns: 24px minmax(0,1fr); } .fila .m { display: none; }
  .fila-tarea { grid-template-columns: 30px minmax(0,1fr); } .fila-tarea > :nth-child(n+3) { display: none; }
  #asistente { width: 100vw; }
  #abrirAsistente { bottom: 86px; right: 16px; width: 54px; height: 54px; padding: 0; }
  #abrirAsistente span { display: none; }
  body.en-lienzo #abrirAsistente { bottom: 200px; right: 16px; }
  .opciones-nuevo { grid-template-columns: 1fr; }
}

/* Reunión estilo Granola */
.escribiendo { display: flex; align-items: center; gap: 8px; padding: 12px 16px; margin: 0 0 16px; border-radius: var(--radio); background: var(--tenue); color: var(--primario); font-weight: 600; animation: latido 1.6s ease-in-out infinite; }
@keyframes latido { 50% { opacity: .55; } }
#editor h3 { font-size: 1.05em; margin: 1.4em 0 .4em; color: var(--primario); }
#editor h3 + ul { margin-top: 0; }
#editor ul li p { margin: .2em 0; }
.transcripcion { margin: 28px 0 90px; }
.pastilla { border-radius: 999px; display: inline-flex; align-items: center; gap: 8px; }
.pastilla[aria-expanded="true"] svg:last-child { transform: rotate(180deg); }
.trans-cuerpo { margin-top: 14px; max-height: 60vh; overflow: auto; padding: 4px 2px; border-left: 2px solid var(--borde); padding-left: 16px; }
.trans-cuerpo p { margin: 0 0 14px; line-height: 1.55; }
.trans-cuerpo p.yo b { color: var(--primario); }
.trans-cuerpo time { color: var(--suave); font-size: 13px; font-variant-numeric: tabular-nums; }
.transcripcion .pastilla { width: 100%; justify-content: flex-start; padding: 12px 18px; border-radius: var(--radio); }
.transcripcion .pastilla svg:last-child { margin-left: auto; }

/* Cuenta de Google en el lateral */
.cuenta-mind { padding: 4px 0 2px; }
.cuenta-btn { width: 100%; display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--borde); border-radius: 12px; background: var(--panel); color: var(--texto); text-align: left; font: inherit; font-size: 14px; cursor: pointer; }
.cuenta-btn.entrar { justify-content: center; font-weight: 600; }
.cuenta-btn .avatar { flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--primario); color: var(--primario-texto); font-weight: 700; }
.cuenta-txt { display: grid; min-width: 0; line-height: 1.25; }
.cuenta-txt b, .cuenta-txt small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cuenta-txt small { color: var(--suave); font-size: 12px; }
.cuenta-mind { position: relative; }
.cuenta-btn > svg:last-child { margin-left: auto; flex: none; width: 16px; height: 16px; color: var(--suave); }
.cuenta-btn .chip { margin-left: auto; }
.menu-cuentas { position: absolute; left: 0; width: min(320px, calc(100vw - 24px)); bottom: calc(100% + 6px); background: var(--panel); border: 1px solid var(--borde); border-radius: 14px; box-shadow: var(--sombra); padding: 6px; display: grid; gap: 2px; z-index: 30; }
.fila-cuenta { display: flex; align-items: center; gap: 2px; border-radius: 10px; }
.fila-cuenta:hover { background: var(--tenue); }
.fila-cuenta > button:first-child { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; padding: 8px; border: 0; background: none; color: var(--texto); font: inherit; font-size: 14px; text-align: left; cursor: pointer; }
.fila-cuenta > button:first-child > svg { margin-left: auto; color: var(--primario); flex: none; }
.fila-cuenta .avatar { flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--primario); color: var(--primario-texto); font-weight: 700; font-size: 13px; }
.fila-cuenta:not(.activa) .avatar { background: var(--acento); }
.agregar-cuenta { display: flex; align-items: center; gap: 10px; padding: 10px 8px; border: 0; border-top: 1px solid var(--borde); margin-top: 4px; background: none; color: var(--texto); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; border-radius: 0 0 10px 10px; }
.agregar-cuenta:hover { background: var(--tenue); }

/* Enlaces entre notas y tablas */
.enlace-nota { color: var(--primario); background: var(--tenue); border-radius: 6px; padding: 1px 6px; cursor: pointer; font-weight: 500; }
.enlace-nota:hover { text-decoration: underline; }
#editor table { border-collapse: collapse; width: 100%; margin: 14px 0; table-layout: fixed; }
#editor th, #editor td { border: 1px solid var(--borde); padding: 8px 10px; vertical-align: top; min-width: 60px; }
#editor th { background: var(--tenue); text-align: left; font-weight: 600; }
#editor td > p, #editor th > p { margin: 0; }

/* Grafo */
.grafo-caja { position: relative; height: calc(100vh - 190px); min-height: 380px; border: 1px solid var(--borde); border-radius: var(--radio); overflow: hidden;
  background: radial-gradient(1200px 700px at 50% 40%, color-mix(in srgb, var(--panel) 92%, var(--azul) 8%), var(--fondo) 70%); }
.grafo-caja canvas { display: block; cursor: grab; touch-action: none; }
.grafo-leyenda { position: absolute; left: 12px; top: 12px; display: flex; flex-direction: column; gap: 2px; max-height: calc(100% - 70px); overflow-y: auto; max-width: 240px;
  background: color-mix(in srgb, var(--panel) 88%, transparent); backdrop-filter: blur(8px); padding: 6px; border-radius: 12px; border: 1px solid var(--borde); box-shadow: var(--sombra); }
.grafo-leyenda button { display: flex; align-items: center; gap: 8px; border: 0; background: transparent; color: var(--texto); font-size: 13px; font-weight: 600; padding: 5px 8px; border-radius: 8px; text-align: left; min-width: 0; }
.grafo-leyenda button span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.grafo-leyenda button b { color: var(--suave); font-weight: 600; font-size: 12px; }
.grafo-leyenda button:hover, .grafo-leyenda button.activo { background: var(--tenue); }
.grafo-leyenda button.apagado { opacity: .45; }
.grafo-leyenda i { width: 10px; height: 10px; border-radius: 50%; display: inline-block; flex: none; box-shadow: 0 0 0 3px color-mix(in srgb, currentColor 0%, transparent); }
.grafo-zoom { position: absolute; right: 12px; top: 12px; display: flex; flex-direction: column; background: color-mix(in srgb, var(--panel) 90%, transparent); border: 1px solid var(--borde); border-radius: 12px; box-shadow: var(--sombra); }
.grafo-tarjeta { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); display: flex; align-items: center; gap: 12px; max-width: min(520px, calc(100% - 90px));
  background: var(--panel); border: 1px solid var(--borde); border-radius: 14px; padding: 10px 10px 10px 14px; box-shadow: var(--sombra); }
.grafo-tarjeta > i { width: 12px; height: 12px; border-radius: 50%; flex: none; }
.grafo-tarjeta > div { min-width: 0; display: flex; flex-direction: column; }
.grafo-tarjeta strong, .grafo-tarjeta .sub { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin: 0; font-size: 13px; }
.grafo-tarjeta strong { font-size: 15px; }
.grafo-ayuda { position: absolute; left: 16px; bottom: 12px; font-size: 12px; margin: 0; }
.grafo-vacio { position: absolute; inset: 0; display: grid; place-items: center; }
.grafo-buscador { flex: 0 1 240px; box-shadow: none; }
.segmentos { display: inline-flex; border: 1px solid var(--borde); border-radius: 10px; background: var(--panel); padding: 3px; gap: 2px; }
.segmentos button, .filtros > .boton.conmutar { display: inline-flex; align-items: center; gap: 6px; border: 0; background: transparent; color: var(--suave); font-weight: 600; font-size: 14px; padding: 6px 10px; border-radius: 8px; }
.segmentos button.activo { background: var(--tenue); color: var(--primario); }
.segmentos svg, #grafoSueltos svg { width: 16px; height: 16px; }
#grafoSueltos.activo { color: var(--primario); border-color: color-mix(in srgb, var(--primario) 45%, var(--borde)); }
@media (max-width: 820px) {
  .grafo-caja { height: calc(100vh - 250px); }
  .grafo-leyenda { top: auto; bottom: 10px; left: 10px; right: 10px; max-width: none; flex-direction: row; overflow-x: auto; overflow-y: hidden; max-height: none; }
  .grafo-leyenda button { flex: none; }
  .grafo-zoom, .grafo-ayuda { display: none; }
  .grafo-tarjeta { bottom: 64px; max-width: calc(100% - 24px); width: calc(100% - 24px); }
  .segmentos button span, #grafoSueltos span { display: none; }
  .grafo-buscador { flex: 1 1 auto; min-width: 0; }
}
/* Tarjeta de nota en el lienzo */
#listaNota { max-height: 60vh; overflow-y: auto; }
#listaNota a { display: block; padding: 12px 18px; text-decoration: none; color: var(--texto); border-bottom: 1px solid var(--borde); }
#listaNota a:hover { background: var(--tenue); }
#listaNota small { display: block; color: var(--suave); }
.msg a.enlace-nota { text-decoration: none; }

/* Menú de cuentas: el correo distingue las cuentas; Salir es texto, no un ícono ambiguo */
.menu-titulo { margin: 4px 10px 6px; font-size: 12px; font-weight: 700; color: var(--suave); text-transform: uppercase; letter-spacing: .04em; }
.cuenta-txt small svg { width: 12px; height: 12px; vertical-align: -2px; }
.fila-cuenta .salir { flex: none; border: 0; background: none; color: var(--suave); font: inherit; font-size: 13px; padding: 6px 8px; border-radius: 8px; cursor: pointer; }
.fila-cuenta .salir:hover, .fila-cuenta .salir:focus-visible { color: var(--vencida); background: var(--tenue); }

/* Ventanas bajas: el lateral se compacta para que idioma, tema y cuenta siempre se vean sin desplazar */
@media (min-width: 821px) and (max-height: 920px) {
  #lateral { padding-top: 12px; padding-bottom: 10px; gap: 4px; }
  .marca { padding: 0 8px 6px; }
  .marca img { max-height: 60px; width: auto; }
  #nav a, .ensenar { padding: 7px 12px; }
  .nuevo { margin-top: 4px; padding: 9px; }
  .pie-lateral { padding: 4px 8px; }
}

/* Barra para agregar imagen, video y capturas a la nota */
.medios { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 0 0 14px; padding: 8px; border-radius: var(--radio); background: var(--tenue); border: 1px solid var(--borde); }
.medios .boton { color: var(--azul); background: var(--fondo); border-color: var(--azul); padding: 7px 14px; }
.medios .boton:hover { background: var(--azul); color: var(--primario-texto); }
.medios .boton.grabando { background: var(--vencida); border-color: var(--vencida); color: var(--panel); }
.medios .boton:disabled { opacity: .6; cursor: progress; }
:root[data-theme="dark"] .medios { background: var(--tenue); }
:root[data-theme="dark"] .medios .boton { color: var(--texto); background: var(--panel); border-color: var(--primario); }
:root[data-theme="dark"] .medios .boton:hover { background: var(--primario); color: var(--primario-texto); }
.medios-ayuda { color: var(--suave); font-size: 14px; flex: 1 1 100%; }
@media (min-width: 560px) { .medios-ayuda { flex: 1 1 auto; } }
@media (max-width: 560px) { .medios .boton span { display: none; } .medios .boton { padding: 9px 14px; } }

/* Video dentro de la nota y manija para mover bloques (estilo Notion) */
.ProseMirror video { display: block; max-width: 100%; border-radius: 12px; margin: 12px 0; background: #000; }
.ProseMirror video.ProseMirror-selectednode { outline: 3px solid var(--primario); }
.drag-handle { position: fixed; z-index: 20; width: 24px; height: 24px; border-radius: 6px; cursor: grab; display: flex; align-items: center; justify-content: center; color: var(--suave); background: var(--panel); border: 1px solid var(--borde); transition: opacity .12s; touch-action: none; -webkit-user-select: none; user-select: none; }
.drag-handle::before { content: "⋮⋮"; font-size: 14px; line-height: 1; letter-spacing: -2px; font-weight: 800; }
.drag-handle:hover { color: var(--azul); border-color: var(--azul); background: var(--fondo); }
.drag-handle:active { cursor: grabbing; }
.drag-handle.hide { opacity: 0; pointer-events: none; }
:root[data-theme="dark"] .drag-handle:hover { color: var(--primario); border-color: var(--primario); }
.ProseMirror.dragging { cursor: grabbing; }
.ProseMirror .ProseMirror-dropcursor, .ProseMirror-dropcursor { background: var(--primario) !important; height: 3px !important; border-radius: 2px; }
@media (max-width: 820px), (pointer: coarse) { .drag-handle { display: none; } }

/* Versión y aviso de actualización */
.version-mind { color: var(--suave); font-size: 11px; padding: 0 8px; opacity: .8; }
.aviso-version { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 60; display: flex; align-items: center; gap: 12px; padding: 10px 10px 10px 16px; background: var(--panel); color: var(--texto); border: 1px solid var(--borde); border-radius: 14px; box-shadow: var(--sombra); font-weight: 600; max-width: calc(100vw - 32px); }
.aviso-version .primario { padding: 8px 14px; border-radius: 10px; }
@media (max-width: 820px) { .version-mind { display: none; } .aviso-version { bottom: 76px; } }
.md-audio { cursor: pointer; user-select: none; }
.md-audio input { margin: 0 2px 0 0; accent-color: var(--primario); }
.md-audio:has(input:disabled) { opacity: .55; cursor: default; }

/* Listas: buscador, filtros, árbol de carpetas y agrupación */
.lista-barra { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: -6px 0 10px; --alto: 40px; }
.lista-barra select, .grafo-filtros select, .buscador, .lista-barra .boton.conmutar { height: var(--alto); border: 1px solid var(--borde); background-color: var(--panel); border-radius: 10px; box-shadow: none; font-size: 14px; font-weight: 500; }
.lista-barra select, .grafo-filtros select { width: auto; max-width: 170px; padding: 0 30px 0 12px; appearance: none; -webkit-appearance: none; cursor: pointer; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238A93B8' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 9px center; background-size: 16px; }
.lista-barra select:hover, .grafo-filtros select:hover, .lista-barra .boton.conmutar:hover { border-color: var(--primario); }
.buscador { flex: 1 1 220px; display: flex; align-items: center; gap: 8px; padding: 0 12px; }
.buscador:focus-within { border-color: var(--primario); outline: 2px solid color-mix(in srgb, var(--primario) 30%, transparent); }
.buscador svg { width: 16px; height: 16px; color: var(--suave); flex: none; }
.buscador input { border: 0; background: transparent; padding: 0; height: 100%; flex: 1; min-width: 0; outline: none; font-size: 14px; }
.boton.conmutar { padding: 0; width: var(--alto, 40px); display: inline-grid; place-items: center; }
.boton.conmutar.activo { color: var(--primario); border-color: color-mix(in srgb, var(--primario) 45%, var(--borde)); background: var(--tenue); }
#cuentaLista { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
#cuentaLista b { color: var(--primario); font-weight: 800; }
.chip.quitar { border: 0; cursor: pointer; color: var(--primario); }
.chip.quitar svg { width: 13px; height: 13px; }
.lista-cuerpo.con-arbol { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 18px; align-items: start; }
.arbol { position: sticky; top: 12px; max-height: calc(100vh - 40px); overflow-y: auto; background: var(--panel); border: 1px solid var(--borde); border-radius: var(--radio); padding: 8px; box-shadow: var(--sombra); font-size: 14px; }
.arbol .nodo { display: flex; align-items: center; gap: 2px; padding-left: calc(var(--nivel) * 14px); border-radius: 8px; }
.arbol .nodo.activo { background: var(--tenue); }
.arbol .nodo.activo .nombre { color: var(--primario); font-weight: 700; }
.arbol .plegar { width: 22px; height: 26px; flex: none; border: 0; background: transparent; color: var(--suave); padding: 0; display: inline-grid; place-items: center; }
.arbol .plegar svg { width: 14px; height: 14px; transition: transform .15s; }
.arbol .plegar.abierta svg { transform: rotate(90deg); }
.arbol .nombre { flex: 1; min-width: 0; display: flex; align-items: center; gap: 7px; border: 0; background: transparent; color: var(--texto); padding: 5px 6px; border-radius: 8px; text-align: left; font-weight: 500; }
.arbol .nombre:hover { background: var(--tenue); }
.arbol .nombre svg { width: 16px; height: 16px; color: var(--acento); flex: none; }
.arbol .nombre span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.arbol .nombre b { font-size: 12px; color: var(--suave); font-weight: 600; }
.chips-carpeta { display: none; gap: 8px; overflow-x: auto; padding: 2px 0 12px; scrollbar-width: none; }
.chips-carpeta .chip { border: 1px solid var(--borde); background: var(--panel); color: var(--texto); padding: 6px 12px; cursor: pointer; }
.chips-carpeta .chip.activo { background: var(--tenue); color: var(--primario); border-color: transparent; }
.chips-carpeta .chip b { color: var(--suave); font-weight: 600; }
.chips-carpeta svg { width: 14px; height: 14px; }
.grupo-lista { margin-bottom: 18px; }
.grupo-lista h3 { display: flex; align-items: center; gap: 8px; font-size: 15px; margin: 4px 4px 8px; color: var(--texto); }
.grupo-lista h3 svg { width: 16px; height: 16px; color: var(--acento); }
.grupo-lista h3 b { color: var(--suave); font-weight: 600; font-size: 13px; }
.fila-env { position: relative; border-bottom: 1px solid var(--borde); }
.fila-env:last-child { border-bottom: 0; }
.fila-env .fila { border-bottom: 0; padding-right: 58px; }
.fila .m .chip svg { width: 13px; height: 13px; }
.fila .m .chip.carpeta, .fila .m .chip.etiqueta { cursor: pointer; max-width: 170px; overflow: hidden; text-overflow: ellipsis; }
.fila .m .chip.etiqueta { color: var(--acento); }
.fila .m .chip:hover { color: var(--primario); }
.fila .m .fecha { white-space: nowrap; min-width: 52px; text-align: right; }
.fila-env .mover { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); opacity: 0; transition: opacity .15s; }
.fila-env:hover .mover, .fila-env .mover:focus-visible { opacity: 1; }
@media (pointer: coarse) { .fila-env .mover { opacity: .7; } }
@media (max-width: 820px) {
  .lista-cuerpo.con-arbol { display: block; }
  .arbol { display: none; }
  .chips-carpeta { display: flex; }
  .lista-barra select { flex: 1 1 40%; min-width: 0; max-width: none; }
  .buscador { flex-basis: 100%; }
  .fila .m .chip.carpeta, .fila .m .chip.etiqueta { display: none; }
}

.grafo-filtros { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: -8px 0 12px; }
.grafo-filtros { --alto: 36px; }
.grafo-filtros select { max-width: 240px; }
.chip-filtro { height: 36px; }
.chip-filtro { display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--borde); background: var(--panel); color: var(--texto); border-radius: 999px; padding: 6px 12px; font-size: 14px; font-weight: 600; }
.chip-filtro i { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.chip-filtro b { color: var(--suave); font-weight: 600; font-size: 12px; }
.chip-filtro.activo { background: var(--tenue); color: var(--primario); border-color: color-mix(in srgb, var(--primario) 45%, var(--borde)); }
.chip-filtro.limpiar { color: var(--primario); border-style: dashed; }
.chip-filtro svg, .grafo-leyenda .todos svg { width: 14px; height: 14px; }
.grafo-leyenda .todos { color: var(--primario); }
@media (max-width: 820px) { .grafo-filtros { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; } .chip-filtro, .grafo-filtros select { flex: none; } }
/* ===== Diseño y usabilidad 2026-11-26: densidad tipo Notion, responsivo por contenedor y arrastrar y soltar ===== */
:root { --letra: clamp(15px, 0.2vw + 12.5px, 17px); --radio: var(--r); }
:root[data-theme="dark"] { --sombra: 0 1px 2px rgba(0,0,0,.3), 0 6px 18px rgba(0,0,0,.25); }
/* Títulos en azul de marca, nunca negro ni navy; en oscuro, azul claro */
h1 { font-size: var(--h1); font-weight: var(--pt); background: var(--h1-fondo); -webkit-background-clip: text; background-clip: text; color: var(--h1-color); padding-bottom: .06em; }
h2 { color: var(--titulo); font-weight: var(--pt); font-size: clamp(17px, .5vw + 11px, 21px); display: flex; align-items: center; gap: 8px; }
.columna h3 { color: var(--titulo); }
.sub { font-size: .92em; }
#vista { container-type: inline-size; container-name: vista; padding: clamp(18px, 2.4vw, 44px) clamp(16px, 3.2vw, 56px); }
.cabecera { margin-bottom: 18px; align-items: center; }

/* Lateral: activo con barra de marca, proyectos como páginas */
#lateral { gap: 6px; }
#nav a { padding: 7px 10px; gap: 10px; font-size: .95em; position: relative; }
#nav a.activo { background: color-mix(in srgb, var(--azul) 9%, var(--panel)); color: var(--azul); }
#nav a.activo::before { content: ""; position: absolute; left: -14px; top: 6px; bottom: 6px; width: 3px; border-radius: 0 3px 3px 0; background: var(--degradado); }
.nav-proyectos { display: flex; flex-direction: column; gap: 1px; margin-top: 6px; }
.nav-proyectos:empty { display: none; }
.nav-titulo { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--suave); padding: 8px 10px 4px; }
.nav-proy { display: flex; align-items: center; gap: 8px; padding: 5px 10px; border-radius: 8px; color: var(--suave); text-decoration: none; font-size: .9em; font-weight: 500; min-width: 0; }
.nav-proy span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-proy svg { color: var(--morado); }
.nav-proy:hover, .nav-proy.activo { background: var(--tenue); color: var(--texto); }
.nuevo { background: var(--degradado); color: var(--primario-texto); box-shadow: var(--sombra); }

/* Cifras como tarjetas con color, no texto suelto */
.cifras { gap: 12px; border: 0; margin: 0 0 22px; }
.cifra { background: var(--panel); border: 1px solid var(--borde); border-radius: var(--radio); padding: 14px 16px; box-shadow: var(--sombra); position: relative; overflow: hidden; }
.cifra::after { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: var(--degradado); opacity: .85; }
.cifra strong { font-size: clamp(24px, 1.2vw + 12px, 34px); color: var(--azul); }
.cifra span { font-size: 13px; }
.captura-rapida { margin-bottom: 18px; }
.captura-rapida input { padding: 11px 16px; font-size: 1em; }
.hoy { gap: 22px; }

/* Filas: una línea de título, extracto en máximo 2 líneas, nunca una palabra por línea */
.fila { grid-template-columns: 18px 22px minmax(0, 1fr) auto; gap: 10px; padding: 9px 14px 9px 6px; position: relative; }
.fila:not(:has(.manija)) { grid-template-columns: 22px minmax(0, 1fr) auto; padding-left: 14px; }
.fila .cuerpo-fila { min-width: 0; }
.fila .t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fila .e { font-size: 13px; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.fila .ico-tipo { display: inline-flex; color: var(--azul); opacity: .85; }
.fila.tipo-reunion .ico-tipo { color: var(--morado); } .fila.tipo-proyecto .ico-tipo { color: var(--fucsia); }
.fila .m { flex-wrap: nowrap; white-space: nowrap; }
.manija { display: inline-flex; color: var(--suave); opacity: 0; cursor: grab; transition: opacity .12s; }
.fila:hover .manija, .fila:focus-visible .manija { opacity: .7; }
.manija svg { width: 16px; height: 16px; }
@media (pointer: coarse) { .manija { opacity: .45; } }
.fila-sel .chk { padding-left: 12px; }
.fila-tarea { grid-template-columns: 26px minmax(0, 1fr) auto auto; gap: 10px; padding: 9px 14px; }
.fila-tarea > div:nth-child(2) > div:first-child { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-weight: 500; }
.fila-tarea > div:nth-child(2) a { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lista { border-radius: var(--radio); }

/* Con poco ancho (asistente abierto, iPad, ventana angosta) todo pasa a una columna */
@container vista (max-width: 900px) {
  .hoy { grid-template-columns: minmax(0, 1fr); }
  .cifras { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tablero.fechas { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@container vista (max-width: 640px) {
  .fila { grid-template-columns: 18px 22px minmax(0, 1fr); }
  .fila .m { grid-column: 3; justify-content: flex-start; flex-wrap: wrap; }
  .fila-tarea { grid-template-columns: 26px minmax(0, 1fr); }
  .fila-tarea > :nth-child(n+3) { grid-column: 2; }
  .fila-tarea > :nth-child(n+3):empty { display: none; }
  .tablero, .tablero.fechas { grid-template-columns: minmax(0, 1fr); }
  .cabecera { align-items: flex-start; }
}
.tablero.fechas { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@container vista (min-width: 1300px) { .tablero.fechas { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.columna.col-vencidas h3 { color: var(--vencida); }

/* Asistente: en ventanas menores a 1200 flota encima en vez de aplastar el contenido */
@media (max-width: 1199px) and (min-width: 821px) { #asistente { position: fixed; right: 0; top: 0; bottom: 0; z-index: 40; box-shadow: -20px 0 50px -20px rgba(20, 30, 80, .35); } }
#asistente { width: min(400px, 100vw); }
#asistente header strong { display: flex; align-items: center; gap: 8px; color: var(--azul); }
.msg.yo { background: var(--degradado); }

/* Carpetas como chips que reciben notas */
.carpetas { display: flex; gap: 6px; flex-wrap: wrap; margin: 0 0 12px; }
.chip-carpeta { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--borde); background: var(--panel); color: var(--suave); border-radius: 999px; padding: 5px 12px; font-size: 13px; font-weight: 600; max-width: 260px; }
.chip-carpeta span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chip-carpeta svg { width: 15px; height: 15px; }
.chip-carpeta:hover { border-color: var(--azul); color: var(--azul); }
.chip-carpeta.on { background: color-mix(in srgb, var(--azul) 10%, var(--panel)); color: var(--azul); border-color: var(--azul); }
.chip-carpeta.nueva { border-style: dashed; }
input.chip-carpeta { width: 200px; color: var(--texto); }

/* Arrastrar y soltar */
.fila[draggable="true"] { cursor: default; }
.fila.arrastrando, .tarea.arrastrando { opacity: .4; }
.fantasma { position: fixed; top: -100px; left: -100px; padding: 8px 14px; border-radius: 999px; background: var(--degradado); color: var(--primario-texto); font-weight: 600; font-size: 14px; max-width: 280px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; box-shadow: 0 10px 24px -8px color-mix(in srgb, var(--acento) 60%, transparent); }
body.arrastrando-docs [data-soltar] { outline: 1px dashed color-mix(in srgb, var(--azul) 45%, transparent); outline-offset: -1px; }
.destino-sobre, body.arrastrando-docs .destino-sobre { outline: 2px solid var(--azul) !important; background: color-mix(in srgb, var(--azul) 12%, var(--panel)) !important; color: var(--azul) !important; }
.linea-soltar { height: 3px; border-radius: 2px; background: var(--degradado); margin: -5px 2px 7px; }
.tarea { padding: 10px 12px; margin-bottom: 8px; box-shadow: 0 1px 2px color-mix(in srgb, var(--primario) 5%, transparent); transition: box-shadow .12s, transform .12s; }
.tarea:hover { box-shadow: var(--sombra); transform: translateY(-1px); }
.tarea .txt { font-weight: 500; overflow-wrap: anywhere; }
.columna { background: color-mix(in srgb, var(--azul) 4%, var(--fondo)); padding: 12px; min-height: 160px; transition: background .12s; }
.columna.sobre { outline: 2px solid var(--azul); background: color-mix(in srgb, var(--azul) 9%, var(--fondo)); }
:root[data-theme="dark"] .columna { background: var(--tenue); }
.doc { position: relative; }
.aviso-soltar { display: none; }
.doc.soltar-archivos { outline: 2px dashed var(--azul); outline-offset: 8px; border-radius: 12px; }
.doc.soltar-archivos .aviso-soltar { display: flex; position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); z-index: 60; align-items: center; gap: 8px; padding: 10px 18px; border-radius: 999px; background: var(--degradado); color: var(--primario-texto); font-weight: 600; }

/* Panel de notas del lienzo */
.panel-notas { width: 260px; flex: none; height: calc(100dvh - 190px); min-height: 320px; display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--borde); border-radius: var(--radio); overflow: hidden; }
.panel-notas .sub { padding: 8px 14px 4px; font-size: 12px; margin: 0; }
.panel-notas .caja-buscar { padding: 10px 12px; }
#panelLista { overflow-y: auto; padding: 4px 6px 10px; }
.item-panel { display: flex; align-items: center; gap: 8px; padding: 7px 8px; border-radius: 8px; cursor: grab; font-size: 14px; font-weight: 500; }
.item-panel span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item-panel svg { color: var(--morado); }
.item-panel:hover { background: var(--tenue); }
#panelNotasBtn.on { border-color: var(--azul); color: var(--azul); }
@media (max-width: 820px) { .panel-notas { position: absolute; right: 8px; top: 8px; bottom: 70px; height: auto; z-index: 8; width: min(260px, calc(100% - 16px)); box-shadow: var(--sombra); } }

/* Manija de bloques del editor con la marca */
.drag-handle { border-radius: 6px; border-color: transparent; background: transparent; }
.drag-handle:hover { background: var(--tenue); border-color: var(--borde); }
@container vista (max-width: 640px) {
  .fila-tarea { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 6px 10px; }
  .fila-tarea > :nth-child(2) { flex: 1 1 calc(100% - 40px); min-width: 0; }
  .fila-tarea > :nth-child(n+3) { margin-left: 36px; }
  .fila-tarea > :nth-child(4) { margin-left: 0; }
}
.titulo-doc { color: var(--titulo); font-weight: var(--pt); }

/* Botón del asistente: se mueve, se achica a círculo o se lleva arriba */
.burbuja-mind { position: fixed; right: 26px; bottom: 26px; z-index: 20; touch-action: none; -webkit-user-select: none; user-select: none; }
.burbuja-mind.oculto { display: none; }
.burbuja-mind #abrirAsistente { position: static; height: 46px; padding: 0 18px 0 14px; font-size: 14px; cursor: grab; }
.burbuja-mind.moviendo #abrirAsistente { cursor: grabbing; transform: scale(1.04); }
.burbuja-mind.chico #abrirAsistente { width: 46px; padding: 0; }
.burbuja-mind.chico #abrirAsistente span { display: none; }
.burbuja-ctl { position: absolute; top: -10px; right: -8px; display: flex; gap: 3px; opacity: 0; transition: opacity .12s; }
.burbuja-mind:hover .burbuja-ctl, .burbuja-mind:focus-within .burbuja-ctl { opacity: 1; }
.burbuja-ctl button { width: 22px; height: 22px; padding: 0; border-radius: 50%; border: 1px solid var(--borde); background: var(--panel); color: var(--suave); display: inline-flex; align-items: center; justify-content: center; box-shadow: var(--sombra); }
.burbuja-ctl button:hover { color: var(--azul); border-color: var(--azul); }
.burbuja-ctl svg { width: 12px; height: 12px; }
@media (pointer: coarse) { .burbuja-ctl { opacity: 1; } }
body.en-lienzo .burbuja-mind:not([style*="top"]) { bottom: 96px; right: 22px; }
body.en-lienzo .burbuja-mind #abrirAsistente { width: 46px; padding: 0; }
body.en-lienzo .burbuja-mind #abrirAsistente span { display: none; }
.asistente-arriba { position: fixed; top: 12px; right: 16px; z-index: 25; display: flex; align-items: center; gap: 2px; padding: 3px; border-radius: 999px; background: color-mix(in srgb, var(--panel) 88%, transparent); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); border: 1px solid var(--borde); box-shadow: var(--sombra); }
.asistente-arriba.abierto { display: none; }
#abrirArriba { display: inline-flex; align-items: center; gap: 6px; border: 0; border-radius: 999px; padding: 5px 12px 5px 9px; font-size: 13px; font-weight: 600; color: var(--primario-texto); background: var(--degradado); }
#abrirArriba svg { width: 15px; height: 15px; }
.asistente-arriba .icono { padding: 5px; }
.asistente-arriba .icono svg { width: 15px; height: 15px; }
@media (max-width: 820px) {
  .burbuja-mind { bottom: 86px; right: 16px; }
  .burbuja-mind #abrirAsistente { width: 50px; height: 50px; padding: 0; }
  .burbuja-mind #abrirAsistente span, #abrirArriba span { display: none; }
  body.en-lienzo .burbuja-mind { bottom: 200px; }
}

@media (max-width: 820px) { .nav-proyectos { display: none; } }

/* Avisos de sincronización en Hoy: una línea discreta, se despliega o se oculta */
.avisos-sync { margin-top: 4px; font-size: 13px; color: var(--suave); }
.avisos-sync summary { cursor: pointer; display: inline-flex; align-items: center; gap: 6px; list-style: none; }
.avisos-sync summary::-webkit-details-marker { display: none; }
.avisos-sync summary svg { width: 14px; height: 14px; }
.avisos-sync ul { margin: 6px 0 4px; padding-left: 20px; max-width: 640px; }
.avisos-sync li { margin: 2px 0; overflow-wrap: anywhere; }
.avisos-sync .enlace { background: none; border: 0; padding: 0; color: inherit; text-decoration: underline; cursor: pointer; font: inherit; }
/* ---- plantillas y exportar ---- */
.caja-tarjeta { border: 1px solid var(--borde); background: var(--tenue); border-radius: var(--radio); padding: 10px 16px 6px; margin: 14px 0; }
.caja-tarjeta-cab { margin-bottom: 4px; }
.caja-tarjeta-titulo { width: 100%; border: 0 !important; background: transparent !important; padding: 2px 0; font: inherit; font-size: 1.1em; font-weight: var(--pt); color: var(--titulo); outline: none !important; }
.caja-tarjeta-cuerpo > :first-child { margin-top: 0; } .caja-tarjeta-cuerpo > :last-child { margin-bottom: 8px; }
.caja-instruccion { position: relative; border-left: 4px solid var(--acento); background: color-mix(in srgb, var(--acento) 9%, transparent); border-radius: 0 var(--radio) var(--radio) 0; padding: 22px 14px 4px; margin: 12px 0; font-style: italic; color: var(--suave); }
.caja-instruccion::before { content: "Instrucción"; position: absolute; top: 5px; left: 14px; font-size: 10.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; font-style: normal; color: #8E3FCF; }
:root[lang="en"] .caja-instruccion::before { content: "Instruction"; }
.caja-instruccion > :first-child { margin-top: 0; } .caja-instruccion > :last-child { margin-bottom: 8px; }
.caja-tarjeta .caja-instruccion { margin: 8px 0; }
.ProseMirror-selectednode.caja-tarjeta, .ProseMirror-selectednode.caja-instruccion { outline: 2px solid var(--primario); }
.paleta-bloques { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 0 0 14px; padding: 8px; border-radius: var(--radio); background: var(--tenue); border: 1px solid var(--borde); }
.paleta-bloques .paleta-titulo { font-weight: 700; font-size: 13px; color: var(--suave); padding: 0 4px; }
.paleta-bloques .boton { color: var(--azul); background: var(--fondo); border-color: var(--azul); padding: 7px 14px; }
.paleta-bloques .boton:hover { background: var(--azul); color: var(--primario-texto); }
:root[data-theme="dark"] .paleta-bloques .boton { color: var(--texto); background: var(--panel); border-color: var(--primario); }
.menu-exportar { position: fixed; z-index: 60; width: 230px; padding: 6px; border-radius: var(--radio); background: var(--panel); border: 1px solid var(--borde); box-shadow: var(--sombra); display: flex; flex-direction: column; }
.menu-exportar-titulo { font-size: 12px; font-weight: 700; color: var(--suave); padding: 6px 10px 4px; text-transform: uppercase; letter-spacing: .04em; }
.menu-exportar button { display: flex; align-items: center; gap: 10px; border: 0; background: transparent; color: var(--texto); padding: 9px 10px; border-radius: 8px; font: inherit; font-size: 14px; text-align: left; cursor: pointer; }
.menu-exportar button:hover, .menu-exportar button:focus-visible { background: var(--tenue); color: var(--azul); }
.menu-exportar hr { border: 0; border-top: 1px solid var(--borde); margin: 4px 0; }
.menu-exportar svg { width: 16px; height: 16px; }
/* La burbuja "Pregúntale a Mind" nunca tapa la barra del documento: cuando va arriba, la barra le deja su sitio */
body:has(#asistenteArriba:not([hidden])) .doc-barra { padding-right: 330px; }
@media (max-width: 820px) { body:has(#asistenteArriba:not([hidden])) .doc-barra { padding-right: 150px; } }
/* Con la barra de acciones en lote abierta, la burbuja sube para no taparla */
body:has(.barra-lote:not([hidden])) .burbuja-mind:not([style*="top"]) { bottom: 96px; }
.doc-barra .cerrar-doc { margin-right: 4px; }

/* ---------- Llaves ---------- */
.cuenta.aviso { color: var(--vencida); font-weight: 700; }
.llaves-cerrado { max-width: 520px; margin: 40px auto; text-align: center; background: var(--panel); border: 1px solid var(--borde); border-radius: 18px; padding: 36px 28px; box-shadow: var(--sombra); }
.llaves-cerrado > svg { width: 40px; height: 40px; color: var(--primario); }
.llaves-cerrado h2 { margin: 12px 0 6px; }
.llaves-cerrado p { color: var(--suave); margin: 0 0 20px; }
.llaves-filtros { margin-bottom: 16px; }
.ll-buscar { flex: 1 1 260px; display: flex; align-items: center; gap: 8px; border: 1px solid var(--borde); border-radius: 10px; background: var(--panel); padding: 0 10px; color: var(--suave); }
.ll-buscar input { border: 0; background: transparent; flex: 1; padding: 9px 0; outline: none; }
.fila-llave { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; gap: 14px; align-items: start; padding: 14px 20px; border-bottom: 1px solid var(--borde); }
.fila-llave:last-child { border-bottom: 0; }
.ll-icono { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--tenue); color: var(--primario); }
.ll-datos .t { font-weight: 600; } .ll-datos .e { color: var(--suave); font-size: 14px; }
.ll-chips { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.ll-chips .chip svg { width: 13px; height: 13px; }
.ll-secreto { margin-top: 8px; display: flex; flex-direction: column; gap: 6px; }
.ll-secreto code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; background: var(--tenue); border-radius: 8px; padding: 6px 10px; word-break: break-all; user-select: all; }
.ll-captura { max-width: 100%; max-height: 360px; object-fit: contain; border: 1px solid var(--borde); border-radius: 10px; }
.ll-acciones { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.dlg-llave .dlg-cuerpo { display: flex; flex-direction: column; gap: 12px; min-width: min(560px, 92vw); }
.dlg-llave label.sub { display: flex; flex-direction: column; gap: 4px; }
.ll-dos { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.ll-campo-secreto { display: flex; gap: 6px; align-items: center; }
.ll-campo-secreto input { flex: 1; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.ll-soltar { border: 2px dashed var(--borde); border-radius: 12px; padding: 16px; display: flex; flex-direction: column; align-items: center; gap: 6px; color: var(--suave); cursor: pointer; text-align: center; }
.ll-soltar.sobre { border-color: var(--primario); background: var(--tenue); }
.ll-soltar img { max-width: 100%; max-height: 200px; border-radius: 8px; }
.ll-soltar.con-imagen > svg, .ll-soltar.con-imagen > span { display: none; }
.ll-check { display: flex; gap: 8px; align-items: center; font-size: 14px; color: var(--suave); }
.ll-botones { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.boton.peligro { color: var(--vencida); }
@media (max-width: 640px) { .fila-llave { grid-template-columns: 1fr; } .ll-icono { display: none; } .ll-acciones { justify-content: flex-start; } .ll-dos { grid-template-columns: 1fr; } }
.ll-nota { margin-top: 14px; display: flex; gap: 8px; align-items: center; font-size: 13px; }
.ll-nota svg { width: 15px; height: 15px; flex: none; }
.ll-notas { margin-top: 4px; white-space: pre-wrap; }

/* App propia (/mind-app/ sola o instalada): pantalla de entrada de Mind */
.entrar-mind { position: fixed; inset: 0; z-index: 1000; background: var(--fondo); display: flex; align-items: center; justify-content: center; padding: max(24px, env(safe-area-inset-top)) 24px max(24px, env(safe-area-inset-bottom)); overflow-y: auto; }
.entrar-caja { width: 100%; max-width: 380px; display: flex; flex-direction: column; align-items: center; gap: 16px; text-align: center; background: var(--panel); border: 1px solid var(--borde); border-radius: 20px; padding: 32px 24px; box-shadow: var(--sombra); }
.entrar-caja img { width: 220px; max-width: 100%; height: auto; }
.entrar-caja h1 { font-size: clamp(24px, 2vw + 14px, 32px); }
.entrar-caja p { margin: 0; }
.entrar-pie { font-size: 14px; color: var(--suave); }
.boton-google { display: inline-flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 48px; border-radius: 12px; border: 1px solid #DADCE0; background: #FFFFFF; color: #1F1F1F; font-weight: 600; padding: 10px 16px; }
.boton-google:hover { border-color: var(--primario); }
.boton-google:disabled { opacity: .6; cursor: progress; }
.entrar-boton { width: 100%; justify-content: center; min-height: 48px; }

/* Grabar reunión desde el celular o el navegador (solo texto, nunca audio) */
.grabar { max-width: 760px; display: flex; flex-direction: column; gap: 10px; }
.grabar h1 { font-size: clamp(28px, 2vw + 14px, 44px); }
.grabar input, .grabar textarea { width: 100%; min-height: 44px; }
.grabar-control { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin: 8px 0; }
.grabar-boton { min-height: 56px; padding: 12px 22px; font-size: 1.05em; border-radius: 16px; }
.grabar-boton.grabando { background: var(--vencida); }
.grabar-estado { color: var(--suave); font-weight: 600; }
.grabar-texto { min-height: 160px; max-height: 42vh; overflow-y: auto; border: 1px solid var(--borde); background: var(--panel); border-radius: var(--radio); padding: 12px 16px; }
.grabar-texto p { margin: 0 0 8px; white-space: pre-wrap; }
.grabar-texto .parcial { color: var(--suave); }
.grabar-acciones { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; margin-top: 6px; }
.grabar-acciones button { min-height: 44px; }

/* Fondo de las notas y lienzos (puntos por defecto, cuadrícula o liso): lo elige cada usuario en Configuración */
.fondo-nota, .doc .ProseMirror, .lienzo-envoltura { background-image: var(--fondo-img); background-size: var(--fondo-tam); }

/* ===== Configuración ===== */
.config-vista { max-width: 1040px; }
.pestanas { display: flex; gap: 4px; flex-wrap: wrap; border-bottom: var(--bw) var(--bs) var(--borde); padding-bottom: 8px; margin-bottom: 22px; }
.pestanas a { padding: 7px 12px; border-radius: var(--r2); color: var(--suave); text-decoration: none; font-size: .95em; }
.pestanas a:hover { background: var(--tenue); color: var(--texto); }
.pestanas a.activa { background: var(--tenue); color: var(--primario); font-weight: var(--pt); }
.panel-cfg { display: flex; flex-direction: column; gap: 26px; min-width: 0; }
.panel-cfg h2 { margin: 0 0 6px; }
.nota { font-size: .9em; color: var(--suave); margin: 2px 0 12px; max-width: 64ch; }
.sub-t { font-size: 12px; letter-spacing: .04em; text-transform: uppercase; color: var(--suave); margin: 12px 0 8px; font-weight: var(--pc); }
.cabeza-cfg { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.segmento { display: inline-flex; border: var(--bw) var(--bs) var(--borde); border-radius: var(--r2); padding: 3px; background: var(--tenue); gap: 2px; }
.segmento button { border: 0; background: transparent; color: var(--suave); padding: 6px 14px; border-radius: var(--r2); font: inherit; font-size: .9em; cursor: pointer; }
.segmento button[aria-pressed="true"] { background: var(--panel); color: var(--texto); box-shadow: 0 1px 2px var(--sombra-borde); }
.segmento button:disabled { opacity: .45; cursor: default; }
.paletas { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.paleta, .estilo { border: var(--bw) var(--bs) var(--borde); border-radius: var(--r); background: var(--panel); padding: 8px; cursor: pointer; text-align: left; font: inherit; color: var(--texto); display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.paleta:hover, .estilo:hover { border-color: var(--suave); }
.paleta[aria-pressed="true"], .estilo[aria-pressed="true"] { border-color: var(--primario); box-shadow: 0 0 0 1px var(--primario); }
.duo { display: grid; grid-template-columns: 1fr 1fr; border-radius: var(--r2); overflow: hidden; border: 1px solid var(--borde); height: 64px; }
.mitad { padding: 8px; display: flex; flex-direction: column; justify-content: space-between; }
.mitad i { display: block; height: 6px; border-radius: 3px; }
.mitad .l1 { width: 70%; } .mitad .l2 { width: 45%; opacity: .55; margin-top: 4px; }
.mitad .fila { display: flex; gap: 4px; padding: 0; } .mitad .fila b { width: 12px; height: 12px; border-radius: 50%; display: block; }
.paleta .nombre, .estilo .nombre { font-size: 13px; font-weight: var(--pt); padding: 0 2px; }
.paleta .desc, .estilo .desc { font-size: 11.5px; color: var(--suave); padding: 0 2px; }
.estilos { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.estilo .aa { font-size: 22px; line-height: 1.1; color: var(--titulo); }
.fondo-pr { height: 44px; border-radius: var(--r2); border: 1px solid var(--borde); background-color: var(--panel); display: block; }
.fondo-nota { background-color: var(--panel); }
.previa-cfg { min-height: 130px; display: flex; flex-direction: column; gap: 10px; }
.callout-cfg { border-left: 3px solid var(--acento); background: var(--tenue); padding: 8px 12px; border-radius: 0 var(--r2) var(--r2) 0; font-size: .92em; }
.barra-previa { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.etiq-cfg { font-size: 12px; padding: 1px 8px; border-radius: 20px; background: var(--tenue); color: var(--primario); }
.lista-cfg { display: flex; flex-direction: column; }
.fila-cfg { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 0; border-bottom: var(--bw) var(--bs) var(--borde); flex-wrap: wrap; }
.fila-cfg .suave { flex: 1 1 260px; max-width: 60ch; }
.area-cfg { width: 100%; border: var(--bw) var(--bs) var(--borde); border-radius: var(--r); background: var(--panel); padding: 14px 16px; line-height: 1.6; resize: vertical; }
.cuenta-cfg { max-width: 420px; position: relative; padding: 4px 0 2px; }
#btnLlaves.activo, #btnConfig.activo { background: var(--tenue); color: var(--primario); }
.fila-cfg.conector { display: block; }
.fila-cfg.conector > b { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.url-cfg { display: flex; gap: 8px; margin: 12px 0; flex-wrap: wrap; }
.url-cfg input { flex: 1 1 260px; min-width: 0; font-family: ui-monospace, Menlo, monospace; font-size: .9em; }
.pasos-cfg { margin: 0; padding-left: 20px; color: var(--suave); font-size: .92em; display: flex; flex-direction: column; gap: 6px; max-width: 70ch; }
.cuenta-config, #cuenta-config { margin-left: auto; font-size: 13px; color: var(--suave); font-weight: 600; } #cuenta-config.aviso { color: var(--vencida); }

/* Lienzo: papel propio y paneles de utensilios, grosor, color y papel */
.pop-lz { position: absolute; left: 50%; transform: translateX(-50%); z-index: 8; width: max-content; max-width: calc(100% - 24px); max-height: 60%; overflow: auto; padding: 12px; border-radius: 18px; background: color-mix(in srgb, var(--panel) 96%, transparent); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border: 1px solid var(--borde); box-shadow: 0 14px 40px -10px rgba(20, 30, 80, .35); touch-action: pan-y; }
.pop-lz[hidden] { display: none; }
.pop-grid { display: grid; gap: 8px; }
.pop-grid.ut { grid-template-columns: repeat(4, 132px); }
@media (max-width: 760px) { .pop-grid.ut { grid-template-columns: repeat(3, minmax(0, 1fr)); width: min(440px, calc(100vw - 48px)); } }
.ut-b, .pp-b { display: flex; flex-direction: column; align-items: stretch; gap: 4px; padding: 6px; border: 1px solid var(--borde); border-radius: 12px; background: var(--fondo); color: var(--texto); font-size: 12px; font-weight: 600; text-align: center; cursor: pointer; }
.ut-b canvas { display: block; width: 100% !important; max-width: 100%; height: auto !important; border-radius: 8px; }
.ut-b.on, .pp-b.on { border-color: var(--azul); box-shadow: 0 0 0 2px var(--azul) inset; }
.ut-ico { display: flex; align-items: center; justify-content: center; height: 42px; color: var(--suave); }
.ut-ico svg { width: 22px; height: 22px; }
.ut-ilu { display: flex; justify-content: center; }
.ut-ilu svg { width: 18px; height: 60px; }
.ut-ico.ut-ilu { height: 60px; }
.ut-ico.ut-ilu svg { width: 18px; height: 60px; }
.pop-grid.papeles { grid-template-columns: repeat(4, 84px); }
.pp-mira { display: block; height: 52px; border-radius: 8px; border: 1px solid var(--borde); }
.pop-rangos { display: grid; gap: 12px; width: min(300px, 76vw); }
.pop-rangos label { display: grid; gap: 4px; font-size: 13px; font-weight: 600; color: var(--suave); }
.pop-rangos input[type="range"] { width: 100%; min-height: 28px; accent-color: var(--azul); }
.pop-muestra { display: block; width: 100%; height: auto; border-radius: 10px; border: 1px solid var(--borde); }
.pop-color { display: grid; gap: 6px; width: min(300px, 76vw); }
.pop-t { margin: 4px 0 0; font-size: 12px; font-weight: 700; color: var(--suave); }
.pc-fila { display: flex; flex-wrap: wrap; gap: 6px; }
.pc-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 5px; }
.pc { width: 100%; min-width: 26px; aspect-ratio: 1; border-radius: 50%; border: 1px solid var(--borde); background: var(--c); cursor: pointer; padding: 0; }
.pc-fila .pc { width: 30px; }
.pc.on { box-shadow: 0 0 0 2px var(--panel), 0 0 0 4px var(--azul); }
.pc-libre { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 4px; }
.pc-input { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; }
.pc-input input { width: 44px; height: 32px; padding: 0; border: 1px solid var(--borde); border-radius: 8px; background: none; }
.barra-lienzo .muestra { background: var(--muestra); }
@media (max-width: 560px) { .pop-grid.ut { grid-template-columns: repeat(2, minmax(0, 1fr)); } .pop-grid.papeles { grid-template-columns: repeat(3, 84px); } }

/* ======================================================================
   La Hoja: una sola superficie para escribir, dibujar y ordenar (hoja.js)
   ====================================================================== */
.hoja-caja { position: relative; display: flex; gap: 10px; }
.hoja-caja > .hoja-env { flex: 1; min-width: 0; }
.hoja-env { position: relative; height: calc(100dvh - 190px); min-height: 360px; background-color: var(--panel); background-image: radial-gradient(var(--borde) 1.2px, transparent 1.2px); background-size: 22px 22px; border: 1px solid var(--borde); border-radius: var(--radio); overflow: hidden; touch-action: none; -webkit-user-select: none; user-select: none; overscroll-behavior: contain; }
.hoja-env.sin-puntos, .hoja-env.modo-pagina { background-image: none; }
.hoja-env.modo-pagina { background-color: color-mix(in srgb, var(--fondo) 70%, var(--borde)); }
.hoja-env.papel-propio { background-repeat: repeat; }
.hoja-env.espacio, .hoja-env.espacio * { cursor: grab !important; }
.hoja-env.soltar-aqui { outline: 2px dashed var(--azul); outline-offset: -3px; }
.hoja-env.conectando, .hoja-env.conectando .hel { cursor: crosshair; }
.hoja-mundo { position: absolute; left: 0; top: 0; width: 0; height: 0; transform-origin: 0 0; }
.hoja-mundo > #paginas, .hoja-mundo > #capaEl { position: absolute; left: 0; top: 0; width: 0; height: 0; }
.hoja-tinta { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 3; }
.hoja-alto { z-index: 4; pointer-events: none; }
.hoja-pagina { position: absolute; border-radius: 3px; box-shadow: 0 1px 2px rgba(20,30,80,.12), 0 10px 30px -10px rgba(20,30,80,.28); overflow: hidden; pointer-events: none; }
.hoja-div { position: absolute; display: block; opacity: .85; }
.hoja-num { position: absolute; right: 14px; bottom: 8px; font-size: 11px; font-weight: 600; color: rgba(120,128,150,.7); }
.hoja-flechas { position: absolute; left: 0; top: 0; width: 1px; height: 1px; overflow: visible; pointer-events: none; }
.hoja-guias, .hoja-marquesina { position: absolute; left: 0; top: 0; width: 1px; height: 1px; overflow: visible; pointer-events: none; }
.hoja-marquesina .marco { fill: color-mix(in srgb, var(--primario) 8%, transparent); stroke: var(--primario); stroke-dasharray: 6 4; }
.hoja-guias line { stroke: var(--fucsia); stroke-width: calc(1px * var(--iz, 1)); }

/* Elementos libres */
.hel { position: absolute; box-sizing: border-box; z-index: 2; cursor: default; touch-action: none; }
.herr-dibujo .hel, .herr-goma .hel, .herr-borrar .hel { pointer-events: none; }
.hel-ed { outline: none; white-space: pre-wrap; overflow-wrap: anywhere; min-height: 1.4em; line-height: 1.45; -webkit-user-select: text; user-select: text; cursor: text; touch-action: manipulation; }
.hel-ed:empty::before { content: attr(data-ph); color: var(--suave); opacity: .65; -webkit-text-fill-color: currentColor; }
.hel-ed.con-degrade { -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.hel-texto { padding: 4px 6px; border-radius: 8px; }
.hel-tarjeta { padding: 12px 14px; border-radius: 14px; background: var(--panel); border: 1px solid var(--borde); box-shadow: var(--sombra); overflow: hidden; }
.hel-tarjeta.con-fondo { border-color: rgba(0,0,0,.08); box-shadow: 0 6px 16px -6px rgba(20,30,80,.35); }
.hel-tabla { padding: 0; border-radius: 10px; overflow: visible; }
.hel-tabla table, table.hel-tabla { border-collapse: collapse; width: 100%; background: var(--panel); border-radius: 10px; }
.hel-tabla td, .hel-tabla th { border: 1px solid var(--borde); padding: 6px 8px; min-width: 60px; outline: none; vertical-align: top; -webkit-user-select: text; user-select: text; cursor: text; touch-action: manipulation; }
.hel-tabla tr:first-child td, .hel-tabla th { font-weight: 700; background: color-mix(in srgb, var(--primario) 8%, var(--panel)); }
.hel-tabla td:focus { box-shadow: inset 0 0 0 2px var(--primario); }
.hel-tabla.con-fondo td { background: transparent; }
.hel-imagen { border-radius: 6px; }
.hel-imagen img { width: 100%; height: 100%; display: block; object-fit: fill; -webkit-user-drag: none; pointer-events: none; }
.hel-imagen.rota { outline: 2px dashed var(--vencida, #c0392b); background: repeating-linear-gradient(45deg, transparent 0 8px, rgba(192,57,43,.08) 8px 16px); }
.hel-nota { padding: 12px 14px; border-radius: 14px; background: var(--panel); border: 1px solid var(--borde); box-shadow: var(--sombra); overflow: hidden; }
.hel-nota p { margin: 4px 0 0; font-size: 13px; color: var(--suave); }
.hel-archivo, .hel-enlace { padding: 10px 12px; border-radius: 12px; background: var(--panel); border: 1px solid var(--borde); overflow: hidden; }
.hel.sel { outline: 1px solid color-mix(in srgb, var(--primario) 55%, transparent); outline-offset: 2px; }

/* Caja de selección: ocho asas y el giro (se dibujan al tamaño de la pantalla, no del mundo) */
.hoja-caja-sel { position: absolute; box-sizing: border-box; pointer-events: none; transform-origin: 50% 50%; }
.hoja-caja-sel.una { border: calc(1.5px * var(--iz, 1)) solid var(--primario); }
.hoja-caja-sel.varias { border: calc(1.5px * var(--iz, 1)) dashed var(--primario); background: color-mix(in srgb, var(--primario) 5%, transparent); }
.asa-r { position: absolute; width: calc(12px * var(--iz, 1)); height: calc(12px * var(--iz, 1)); margin: calc(-6px * var(--iz, 1)); background: #fff; border: calc(2px * var(--iz, 1)) solid var(--primario); border-radius: 50%; pointer-events: auto; touch-action: none; box-sizing: border-box; }
.asa-r[data-asa="nw"] { left: 0; top: 0; cursor: nwse-resize; } .asa-r[data-asa="n"] { left: 50%; top: 0; cursor: ns-resize; } .asa-r[data-asa="ne"] { left: 100%; top: 0; cursor: nesw-resize; }
.asa-r[data-asa="e"] { left: 100%; top: 50%; cursor: ew-resize; } .asa-r[data-asa="se"] { left: 100%; top: 100%; cursor: nwse-resize; } .asa-r[data-asa="s"] { left: 50%; top: 100%; cursor: ns-resize; }
.asa-r[data-asa="sw"] { left: 0; top: 100%; cursor: nesw-resize; } .asa-r[data-asa="w"] { left: 0; top: 50%; cursor: ew-resize; }
.asa-giro { position: absolute; left: 50%; top: calc(-34px * var(--iz, 1)); width: calc(16px * var(--iz, 1)); height: calc(16px * var(--iz, 1)); margin-left: calc(-8px * var(--iz, 1)); background: var(--primario); border: calc(2px * var(--iz, 1)) solid #fff; border-radius: 50%; cursor: grab; pointer-events: auto; touch-action: none; box-sizing: border-box; }
.asa-giro-linea { position: absolute; left: 50%; top: calc(-20px * var(--iz, 1)); width: calc(1.5px * var(--iz, 1)); height: calc(20px * var(--iz, 1)); background: var(--primario); }
@media (pointer: coarse) { .asa-r { width: calc(20px * var(--iz, 1)); height: calc(20px * var(--iz, 1)); margin: calc(-10px * var(--iz, 1)); } .asa-giro { width: calc(24px * var(--iz, 1)); height: calc(24px * var(--iz, 1)); margin-left: calc(-12px * var(--iz, 1)); top: calc(-44px * var(--iz, 1)); } .asa-giro-linea { top: calc(-30px * var(--iz, 1)); height: calc(30px * var(--iz, 1)); } }

/* Marcas de tiempo */
.hel-marcas { position: absolute; right: 100%; top: 0; width: 0; height: 100%; pointer-events: none; display: none; }
.ver-marcas .hel-marcas { display: block; }
.chip-t { position: absolute; display: inline-flex; align-items: center; padding: 1px 7px; border: 1px solid color-mix(in srgb, var(--morado) 45%, transparent); border-radius: 999px; background: color-mix(in srgb, var(--panel) 92%, var(--morado)); color: var(--morado); font-size: calc(11px * var(--iz, 1)); font-weight: 700; line-height: 1.5; white-space: nowrap; pointer-events: auto; cursor: pointer; transform: translateX(calc(-100% - 6px)); touch-action: manipulation; }
.chip-t:hover { background: var(--morado); color: #fff; }
.chip-esquina { display: none; right: 6px; top: -10px; transform: none; }
.ver-marcas .chip-esquina { display: inline-flex; }
.hoja-alto .chip-trazo { transform: translate(0, -100%); display: none; font-size: calc(11px * var(--iz, 1)); }
.ver-marcas .hoja-alto .chip-trazo { display: inline-flex; }

/* Tiras de páginas, vista, contexto */
.hoja-tiras { display: flex; flex-direction: column; gap: 6px; overflow: auto; padding: 2px; flex: 0 0 auto; }
.hoja-tiras[hidden] { display: none; }
.tira { position: relative; width: 38px; height: 52px; padding: 0; border: 1px solid var(--borde); border-radius: 6px; background: var(--panel); color: var(--suave); font-size: 12px; font-weight: 700; box-shadow: var(--sombra); }
.tira.on { border-color: var(--primario); color: var(--primario); box-shadow: 0 0 0 2px color-mix(in srgb, var(--primario) 30%, transparent); }
.tira-mas { height: 38px; font-size: 20px; border-style: dashed; }
.tira-x { position: absolute; right: -6px; top: -6px; width: 18px; height: 18px; line-height: 16px; border-radius: 50%; background: var(--texto); color: var(--fondo); font-style: normal; font-size: 12px; }
@media (max-width: 820px) { .hoja-tiras { display: none; } }
.hoja-modo { position: absolute; right: 12px; top: 12px; z-index: 6; box-shadow: var(--sombra); }
.hoja-vacio { position: absolute; inset: 0; z-index: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; color: var(--suave); pointer-events: none; font-weight: 500; text-align: center; padding: 0 24px; }
.hoja-vacio svg { width: 30px; height: 30px; color: var(--morado); opacity: .8; }
.hoja-vacio.oculto { display: none; }
.hoja-ctx { position: absolute; z-index: 7; display: flex; align-items: center; gap: 2px; padding: 5px; border-radius: 16px; background: color-mix(in srgb, var(--panel) 94%, transparent); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border: 1px solid var(--borde); box-shadow: 0 10px 28px -8px rgba(20,30,80,.32); max-width: calc(100% - 16px); flex-wrap: wrap; touch-action: manipulation; }
.hoja-ctx[hidden] { display: none; }
.hoja-ctx button { position: relative; width: 36px; height: 36px; padding: 0; border: 0; border-radius: 11px; background: transparent; color: var(--suave); display: inline-flex; align-items: center; justify-content: center; }
.hoja-ctx button svg { width: 18px; height: 18px; }
.hoja-ctx button:hover { background: var(--tenue); color: var(--texto); }
.hoja-ctx button.on { background: var(--tenue); box-shadow: inset 0 0 0 2px var(--primario); color: var(--texto); }
.hoja-ctx .sep { width: 1px; height: 20px; background: var(--borde); margin: 0 4px; }
.hoja-ctx [data-tip]:hover::after { content: attr(data-tip); position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%); white-space: nowrap; background: var(--texto); color: var(--fondo); font-size: 12px; font-weight: 600; padding: 5px 9px; border-radius: 8px; pointer-events: none; z-index: 9; }
@media (pointer: coarse) { .hoja-ctx button { width: 44px; height: 44px; } .hoja-ctx [data-tip]::after { display: none; } }

/* Paneles nuevos de la barra: insertar, degradé, plantillas */
.pop-tabs { margin-bottom: 4px; }
.pop-lista { display: grid; gap: 4px; min-width: 220px; }
.pop-it { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border: 0; border-radius: 12px; background: transparent; color: var(--texto); font-weight: 600; text-align: left; }
.pop-it:hover { background: var(--tenue); }
.pop-it svg { width: 20px; height: 20px; color: var(--morado); }
.deg-vista { height: 34px; border-radius: 10px; border: 1px solid var(--borde); }
.deg-presets { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.deg-p { height: 28px; border-radius: 8px; border: 1px solid var(--borde); padding: 0; }
.deg-slots { display: flex; gap: 8px; align-items: center; }
.deg-s { position: relative; display: inline-block; }
.deg-s i { display: block; width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--borde); }
.deg-s button { position: absolute; right: -6px; top: -6px; width: 16px; height: 16px; padding: 0; line-height: 14px; font-size: 12px; border-radius: 50%; border: 0; background: var(--texto); color: var(--fondo); }
.deg-mas { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border: 1px dashed var(--borde); border-radius: 50%; color: var(--suave); }
.pc-auto { background: repeating-conic-gradient(var(--borde) 0 25%, transparent 0 50%) 50% / 10px 10px !important; display: inline-flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; color: var(--suave); }
.pl-lista { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.pl-b { display: flex; flex-direction: column; gap: 4px; padding: 6px; border: 1px solid var(--borde); border-radius: 10px; background: var(--fondo); color: var(--texto); font-size: 11px; font-weight: 600; }
.pl-b.on { border-color: var(--azul); box-shadow: 0 0 0 2px var(--azul) inset; }
.pl-mira { display: block; height: 44px; border-radius: 5px; border: 1px solid var(--borde); background-repeat: repeat; }

/* Diseñador de plantillas */
dialog.dlg-plantillas { width: min(880px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); }
.pl-cuerpo { padding: 18px; max-height: calc(100dvh - 24px); overflow: auto; }
.pl-grid { display: grid; grid-template-columns: minmax(0, 1fr) 270px; gap: 20px; margin-top: 10px; }
@media (max-width: 720px) { .pl-grid { grid-template-columns: 1fr; } .pl-der { order: -1; } }
.pl-ctl { display: grid; gap: 8px; align-content: start; }
.pl-ctl input:not([type]), .pl-ctl input[type="text"] { width: 100%; min-height: 40px; }
.pl-base { display: flex; flex-wrap: wrap; gap: 6px; }
.pl-rango { display: grid; gap: 4px; font-size: 13px; font-weight: 600; color: var(--suave); }
.pl-rango input { width: 100%; accent-color: var(--azul); }
.pl-div { display: grid; grid-template-columns: 22px 1fr 40px 32px; align-items: center; gap: 8px; }
.pl-div input[type="color"], .pc-input input[type="color"] { width: 36px; height: 30px; padding: 0; border: 1px solid var(--borde); border-radius: 8px; background: none; }
.pl-chk { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; margin-top: 4px; }
.pl-der { display: grid; gap: 10px; align-content: start; justify-items: center; }
.pl-marco { position: relative; overflow: hidden; border-radius: 4px; border: 1px solid var(--borde); box-shadow: var(--sombra); }
.pl-hoja { position: absolute; left: 0; top: 0; transform-origin: 0 0; }
.pl-lin { position: absolute; display: block; }
.pl-el { position: absolute; border-radius: 6px; overflow: hidden; white-space: pre-wrap; box-sizing: border-box; }
.pl-acc { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.pl-mias { display: flex; flex-wrap: wrap; gap: 6px; }

/* Transcripción: la línea a la que llegó una marca de tiempo */
.trans-cuerpo p.salto { background: color-mix(in srgb, var(--morado) 14%, transparent); border-radius: 8px; box-shadow: 0 0 0 2px color-mix(in srgb, var(--morado) 50%, transparent); }
/* Home acomodable: cada sección es un bloque que se oculta, se muestra y se reordena */
.hoy-bloques { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 22px 28px; align-items: start; }
.hoy-bloques > .bloque-hoy { min-width: 0; }
.hoy-bloques > .bloque-hoy.ancho { grid-column: 1 / -1; }
.hoy-bloques.editando > .bloque-hoy { border: 2px dashed var(--borde); border-radius: 16px; padding: 10px 12px 14px; cursor: grab; background: color-mix(in srgb, var(--panel) 60%, transparent); }
.hoy-bloques.editando > .bloque-hoy.oculto { opacity: .45; }
.hoy-bloques > .bloque-hoy.arrastrando { opacity: .5; border-color: var(--primario); }
.bloque-mando { display: flex; align-items: center; gap: 4px; margin: 0 0 8px; color: var(--suave); font-size: 13px; }
.bloque-mando strong { flex: 1; font-size: 13px; }
.bloque-mando .manija { display: inline-flex; color: var(--suave); }
@media (max-width: 1100px) { .hoy-bloques { grid-template-columns: minmax(0, 1fr); } }

/* Escribir a mano en cualquier nota */
.dlg-tinta { border: 1px solid var(--borde); border-radius: var(--radio); background: var(--fondo); color: var(--texto); padding: 12px; width: min(1000px, 98vw); max-height: 98vh; }
.dlg-tinta::backdrop { background: rgba(0,0,0,.45); }
.dlg-tinta .dlg-cuerpo { display: flex; flex-direction: column; gap: 10px; }
.dlg-tinta h3 { margin: 0; }
.tinta-cab { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.tinta-acc { display: inline-flex; gap: 8px; }
.tinta-herr { display: flex; flex-wrap: wrap; gap: 6px; }
.tinta-h { min-height: 44px; min-width: 44px; display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border: 1px solid var(--borde); border-radius: 10px; background: var(--fondo); color: var(--texto); cursor: pointer; }
.tinta-h.on { border-color: var(--azul); box-shadow: 0 0 0 2px var(--azul) inset; }
.tinta-h svg { width: 20px; height: 20px; }
.tinta-ajustes { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.tinta-color-libre { display: inline-flex; align-items: center; gap: 6px; }
.tinta-color-libre input { width: 44px; height: 44px; padding: 0; border: 1px solid var(--borde); border-radius: 10px; background: none; cursor: pointer; }
.tinta-paleta { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.tinta-color { width: 32px; height: 32px; border-radius: 50%; border: 2px solid var(--borde); background: var(--c); cursor: pointer; padding: 0; }
.tinta-color.on { outline: 3px solid var(--azul); outline-offset: 2px; }
.tinta-rango { display: inline-flex; flex-direction: column; gap: 2px; font-size: 12px; min-width: 130px; }
.tinta-rango input { min-height: 32px; }
.tinta-papel { display: inline-flex; flex-direction: column; gap: 2px; font-size: 12px; }
.tinta-papel select { min-height: 40px; }
.tinta-figuras { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; min-height: 44px; }
.tinta-figuras input { width: 22px; height: 22px; }
.tinta-hist { display: inline-flex; gap: 6px; margin-left: auto; }
.tinta-hist .boton, .tinta-acc .boton, .tinta-acc .primario { min-height: 44px; }
.tinta-lienzo { width: 100%; aspect-ratio: 1200 / 760; max-height: 62vh; object-fit: contain; background: #fff; border: 1px solid var(--borde); border-radius: 8px; cursor: crosshair; touch-action: none; }
@media (max-width: 700px) { .dlg-tinta { width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; border-radius: 0; padding: 8px; } .tinta-lienzo { max-height: none; flex: 1; } .tinta-h span { display: none; } }

/* Hoja "Más" del celular */
.hoja-mas { border: 0; border-radius: 20px 20px 0 0; background: var(--panel); color: var(--texto); padding: 14px 14px calc(18px + env(safe-area-inset-bottom)); width: 100%; max-width: 100%; margin: auto 0 0; box-shadow: var(--sombra); }
.hoja-mas::backdrop { background: rgba(0,0,0,.4); }
.hoja-cab { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.hoja-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.hoja-grid a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 80px; border-radius: 14px; background: var(--tenue); color: var(--texto); text-decoration: none; font-size: 14px; font-weight: 600; text-align: center; padding: 8px 4px; }
.hoja-grid a svg { width: 26px; height: 26px; }
.hoja-grid a.activo { background: color-mix(in srgb, var(--azul) 14%, var(--panel)); color: var(--azul); }
.hoja-acciones { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.hoja-acciones .boton { min-height: 46px; padding: 0 16px; }
@media (min-width: 821px) { .nav-movil, .hoja-mas { display: none !important; } }
/* Toques cómodos en pantallas táctiles */
@media (pointer: coarse) {
  .boton, .primario, .icono, select, .segmentos button, .chip-filtro { min-height: 44px; }
  .icono { min-width: 44px; }
}
.boton#vozTarea.on { background: var(--azul); color: #fff; }

/* Stickers, post-its e imágenes redimensionables */
:root { --postit-amarillo: #FFE87A; --postit-rosa: #FFB8DD; --postit-azul: #A9C4FF; --postit-verde: #B6EDB9; --postit-morado: #D4B8F5; --postit-naranja: #FFC48A; }
.caja-postit { position: relative; background: var(--postit-amarillo); color: #1F2233; border-radius: 4px 4px 14px 4px; padding: 14px 16px 8px; margin: 14px 0; max-width: 420px; box-shadow: 0 6px 14px rgba(20, 30, 80, .16); transform: rotate(-.6deg); }
.caja-postit[data-color="rosa"] { background: var(--postit-rosa); } .caja-postit[data-color="azul"] { background: var(--postit-azul); }
.caja-postit[data-color="verde"] { background: var(--postit-verde); } .caja-postit[data-color="morado"] { background: var(--postit-morado); } .caja-postit[data-color="naranja"] { background: var(--postit-naranja); }
.caja-postit .caja-postit-cuerpo > :first-child { margin-top: 0; } .caja-postit p { margin: 0 0 6px; }
.postit-colores { position: absolute; top: -12px; right: 8px; display: none; gap: 5px; padding: 4px 6px; background: var(--fondo); border: 1px solid var(--borde); border-radius: 999px; }
.caja-postit:hover .postit-colores, .caja-postit:focus-within .postit-colores { display: inline-flex; }
@media (hover: none) { .postit-colores { display: inline-flex; } }
.postit-c { width: 22px; height: 22px; padding: 0; border-radius: 50%; border: 2px solid rgba(0,0,0,.15); background: var(--c); cursor: pointer; }
.img-env { position: relative; display: inline-block; max-width: 100%; line-height: 0; }
.img-env img { display: block; height: auto; }
.img-asa { position: absolute; right: -6px; bottom: -6px; width: 22px; height: 22px; border-radius: 50%; background: var(--azul); border: 2px solid #fff; cursor: nwse-resize; display: none; touch-action: none; }
.img-env.sel .img-asa, .img-env:hover .img-asa { display: block; }
@media (hover: none) { .img-env.sel .img-asa { width: 30px; height: 30px; right: -10px; bottom: -10px; } }
.img-env.sel img { outline: 2px solid var(--azul); outline-offset: 2px; }
.dlg-stickers { border: 1px solid var(--borde); border-radius: var(--radio); background: var(--fondo); color: var(--texto); padding: 14px; width: min(720px, 96vw); max-height: 92dvh; }
.dlg-stickers::backdrop { background: rgba(0,0,0,.45); }
.dlg-stickers .dlg-cuerpo { display: flex; flex-direction: column; gap: 10px; }
.st-tam { display: flex; align-items: center; gap: 6px; font-size: 13px; } .st-tam .boton { min-height: 40px; } .st-tam .boton.on { background: var(--azul); color: #fff; }
.st-cuerpo { overflow: auto; max-height: 56dvh; }
.st-cuerpo h4 { margin: 12px 0 6px; font-size: 13px; color: var(--suave); }
.st-rejilla { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; }
.st-item { min-height: 84px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 6px; border: 1px solid var(--borde); border-radius: 12px; background: var(--fondo); color: var(--texto); font-size: 11px; cursor: pointer; }
.st-item:hover { border-color: var(--azul); } .st-item svg { width: 56px; height: 56px; } .st-item img { max-width: 100%; max-height: 56px; object-fit: contain; }
.st-logos { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.st-mio { position: relative; display: block; } .st-mio .st-item { width: 100%; }
.st-borrar { position: absolute; top: 2px; right: 2px; width: 24px; height: 24px; border-radius: 50%; border: 1px solid var(--borde); background: var(--fondo); cursor: pointer; line-height: 1; }
.st-subir { font-size: 26px; color: var(--azul); }

.hist-lista { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; max-height: 50vh; overflow: auto; }
.hist-lista li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 10px; border: 1px solid var(--borde); border-radius: 10px; }
.hist-lista .boton { min-height: 40px; }

.marca-t { font: 600 11px/1 ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--t-azul); background: color-mix(in srgb, var(--t-azul) 10%, transparent); border: 1px solid color-mix(in srgb, var(--t-azul) 28%, transparent); border-radius: 999px; padding: 2px 8px; cursor: pointer; margin-right: 4px; white-space: nowrap; }
.marca-t:hover, .marca-t.salto { background: color-mix(in srgb, var(--t-azul) 22%, transparent); }
.t-l { border-radius: 4px; transition: background .3s; }
.t-l.con-nota { border-bottom: 2px solid var(--t-fucsia); cursor: pointer; }
.t-l.salto { background: color-mix(in srgb, var(--t-amarillo) 55%, transparent); }
.grabar-notas-cab { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.grabar-ayuda { display: flex; align-items: center; gap: 6px; margin: 0; font-size: 12px; }
.grabar-ayuda svg { width: 14px; height: 14px; flex: none; }

/* Pantalla de grabación discreta: neutra y oscura, un solo botón, se puede escribir encima */
body.modo-grabar { background: #0e1013; }
body.modo-grabar #lateral, body.modo-grabar #burbujaMind, body.modo-grabar #asistenteArriba { display: none !important; }
body.modo-grabar #app { grid-template-columns: 1fr; }
body.modo-grabar #vista { background: #0e1013; padding: max(20px, env(safe-area-inset-top)) 16px calc(24px + env(safe-area-inset-bottom)); }
.grabar-discreta { max-width: 560px; margin: 0 auto; gap: 14px; color: #c9ccd3; min-height: 100%; }
.grabar-discreta .sub, .grabar-discreta label.sub { color: #7e838e; }
.grabar-discreta .grabar-cab { display: flex; align-items: center; gap: 10px; }
.grabar-discreta input[type="text"], .grabar-discreta #grabNombre { flex: 1; background: transparent; border: 0; border-bottom: 1px solid #23262d; border-radius: 0; color: #c9ccd3; font-size: 15px; padding: 8px 2px; }
.grabar-discreta textarea { background: #14171c; border: 1px solid #23262d; border-radius: 14px; color: #e4e6ea; font-size: 16px; padding: 12px 14px; resize: none; line-height: 1.5; }
.grabar-discreta textarea:focus, .grabar-discreta #grabNombre:focus { outline: none; border-color: #4a4f5b; }
.enlace-suave { background: none; border: 0; color: #8d929d; font: inherit; font-size: 13px; min-height: 44px; padding: 0 8px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.enlace-suave:hover { color: #c9ccd3; }
.enlace-suave svg { width: 16px; height: 16px; }
.grabar-discreta .grabar-centro { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 18px 0 8px; }
.grabar-discreta .grabar-boton { width: 96px; height: 96px; min-height: 96px; border-radius: 50%; padding: 0; background: #181b21; border: 2px solid #3a3e48; color: #e4e6ea; display: grid; place-items: center; cursor: pointer; transition: border-color .2s, background .2s; }
.grabar-discreta .grabar-boton span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.grabar-discreta .grabar-boton svg { width: 34px; height: 34px; }
.grabar-discreta .grabar-boton.grabando { background: #1b1416; border-color: #b4474f; color: #e8a3a8; }
.grabar-discreta .grabar-reloj { font: 500 26px/1 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .04em; color: #7e838e; }
.grabar-discreta.en-curso .grabar-reloj { color: #e4e6ea; }
.grabar-discreta .grabar-estado { color: #6e737d; font-size: 13px; font-weight: 500; min-height: 18px; }
.grabar-discreta .grabar-texto { background: #14171c; border-color: #23262d; color: #b9bcc4; font-size: 14px; max-height: 30vh; min-height: 0; }
.grabar-discreta .grabar-texto .parcial { color: #6e737d; }
.grabar-discreta .grabar-acciones { justify-content: space-between; align-items: center; margin-top: 2px; }
.grabar-discreta .grabar-terminar { background: #e4e6ea; color: #0e1013; border: 0; border-radius: 12px; min-height: 46px; padding: 0 18px; font: inherit; font-weight: 600; font-size: 14px; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; }
.grabar-discreta .grabar-terminar:disabled { opacity: .5; }
.grabar-discreta .grabar-terminar svg { width: 16px; height: 16px; }
.grabar-discreta .grabar-abrir { display: flex; align-items: center; gap: 10px; font-size: 13px; color: #7e838e; min-height: 44px; }
.grabar-discreta .grabar-abrir input { width: 20px; height: 20px; }
.grabar-discreta .grabar-aviso { font-size: 11px; color: #5a5f69; margin: 0; }
.grabar-discreta .grabar-ayuda { color: #6e737d; }
.grabar-discreta .vacio { background: #14171c; border: 1px solid #23262d; color: #b9bcc4; }

.audio-reunion { display: flex; flex-direction: column; gap: 6px; margin: 14px 0 10px; padding: 12px 14px; border: 1px solid var(--borde); border-radius: var(--radio); background: var(--panel); transition: box-shadow .3s; }
.audio-reunion .sub { display: flex; align-items: center; gap: 6px; font-size: 12px; }
.audio-reunion .sub svg { width: 14px; height: 14px; }
.audio-reunion audio { width: 100%; }
.audio-reunion.salto { box-shadow: 0 0 0 2px var(--t-azul); }
.mas-lista { display: block; width: 100%; margin: 12px 0 90px; min-height: 48px; }

/* Celular (2026-11-28): la hoja de escribir a mano deja el dibujo arriba y quieto; los ajustes se desplazan debajo */
@media (max-width: 700px) {
  .dlg-tinta { overflow: hidden; padding: calc(8px + env(safe-area-inset-top)) 8px calc(8px + env(safe-area-inset-bottom)); }
  .dlg-tinta .dlg-cuerpo { height: calc(100dvh - 16px - env(safe-area-inset-top) - env(safe-area-inset-bottom)); min-height: 0; gap: 8px; }
  .dlg-tinta .tinta-cab { order: 0; flex: none; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
  .dlg-tinta .tinta-cab h3 { font-size: 16px; }
  .dlg-tinta .tinta-lienzo { order: 1; flex: none; width: min(100%, calc(46dvh * 1200 / 760)); max-height: none; margin-inline: auto; }
  .dlg-tinta .tinta-herr { order: 2; flex: none; display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
  .dlg-tinta .tinta-h { flex: none; }
  .dlg-tinta .tinta-ajustes { order: 3; flex: 1 1 0; min-height: 0; overflow-y: auto; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding-bottom: 8px; }
}

/* Celular (2026-11-28): la nota abre lista para escribir. Barras en una sola fila y sin tapar el texto */
@media (max-width: 820px) {
  #vista { padding-left: 14px; padding-right: 14px; padding-bottom: calc(92px + env(safe-area-inset-bottom)); }
  .doc-barra { flex-wrap: nowrap; gap: 6px; margin-bottom: 6px; overflow-x: auto; scrollbar-width: none; }
  .doc-barra::-webkit-scrollbar { display: none; }
  .doc-barra > * { flex: none; }
  .doc-barra .ruta { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .doc-barra #historial, .doc-barra #exportar { font-size: 0; gap: 0; padding: 0 12px; }
  .doc-barra #historial svg, .doc-barra #exportar svg { width: 20px; height: 20px; }
  .titulo-doc { font-size: 28px; }
  .props { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 6px 0 8px; }
  .props::-webkit-scrollbar { display: none; }
  .prop { flex: none; }
  .medios { position: sticky; top: 0; z-index: 6; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; gap: 6px; margin: 0 -14px 10px; padding: 6px 14px; border-radius: 0; border-left: 0; border-right: 0; background: var(--fondo); }
  .medios::-webkit-scrollbar { display: none; }
  .medios .boton, .medios label.boton { flex: none; min-width: 44px; justify-content: center; }
  .medios .medios-ayuda { flex: none; white-space: nowrap; }
  /* Con el teclado abierto no hay barra de abajo ni burbuja: ocupaban el espacio de lo que se escribe */
  body.teclado #lateral, body.teclado .burbuja-mind, body.teclado .asistente-arriba { display: none !important; }
  body.teclado #vista { padding-bottom: 16px; }
}

/* Celular (2026-11-28): nueva tarea en pocas líneas: el texto arriba, fecha y hora lado a lado */
@media (max-width: 820px) {
  .captura-rapida.con-ayuda > div > #fechaTarea, .captura-rapida.con-ayuda > div > #horaTarea { flex: 1 1 calc(50% - 5px); }
  .captura-rapida.con-ayuda > div > #vozTarea { flex: 0 0 auto; }
  .captura-rapida.con-ayuda > div > #txtTarea { flex: 1 1 100%; }
  .captura-rapida.con-ayuda label { font-size: 13px; }
}

/* Celular (2026-11-28): el lienzo ocupa la pantalla; los botones van en una sola fila que se desliza */
@media (max-width: 820px) {
  body.en-lienzo .cabecera h1 { font-size: 24px; }
  body.en-lienzo .cabecera .sub { display: none; }
  body.en-lienzo .cabecera { margin-bottom: 8px; }
  body.en-lienzo .cabecera .filtros { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 8px -14px 0; padding: 0 14px; }
  body.en-lienzo .cabecera .filtros::-webkit-scrollbar { display: none; }
  body.en-lienzo .cabecera .filtros .boton { flex: none; }
}
@media (max-width: 820px) {
  body.en-lienzo .burbuja-mind:not([style*="top"]) { bottom: auto; top: 14px; right: 14px; }
}


/* Etiquetas y supertags (compartido por notas y Hoja) */
.hoja-props { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: -4px 0 8px; }
.prop-chip { cursor: pointer; border: 1px solid var(--borde); background: var(--panel); color: var(--texto); }
.prop-chip svg { width: 14px; height: 14px; }
.chip.etiqueta.super { border: 1px solid var(--morado); }
.chip.etiqueta.super small { opacity: .7; margin-left: 2px; }
button.chip.etiqueta { cursor: pointer; }
.super-chips, .super-campos, .super-edit { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.super-campos { margin-top: 6px; }
.super-edit .chip .icono { padding: 0 0 0 4px; min-width: 0; height: auto; }
.super-edit .chip .icono svg { width: 12px; height: 12px; }
dialog.dlg-super { width: min(560px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); }
.super-fila { display: grid; grid-template-columns: 1fr 120px 36px; gap: 8px; margin-bottom: 8px; }
.hoja-grabar { position: absolute; right: 12px; top: 12px; z-index: 30; width: min(360px, calc(100vw - 24px)); max-height: calc(100dvh - 160px); overflow: auto; background: var(--panel); border: 1px solid var(--borde); border-radius: var(--radio); box-shadow: var(--sombra); padding: 12px; }
.hoja-grabar[hidden] { display: none; }
.grabar-embebida .grabar-notas-cab, .grabar-embebida #grabNotas, .grabar-embebida .grabar-ayuda, .grabar-embebida .grabar-abrir:not(#grabAudioFila) { display: none; }
#btnGrabarHoja.on { border-color: var(--fucsia); }

/* Hoja y propiedades: más calma. Pesos regulares, menos bordes y pastillas, más aire. */
.hoja-caja, .hoja-props, .hoja-barra, .pop-lz, dialog.dlg-super, dialog.dlg-plantillas { --peso-ui: 500; }
.pop-it, .pl-b, .pl-rango, .pl-chk, .pc-input, .hoja-modo button, .zoom-pill, .hoja-ctx button { font-weight: 500; }
.hoja-num { font-weight: 400; }
.hel-tabla tr:first-child td, .hel-tabla th { font-weight: 600; background: transparent; }
.hoja-props { gap: 4px 14px; margin: 0 0 14px; }
.hoja-props .chip { border: 0; background: transparent; padding: 2px 0; color: var(--suave); font-weight: 400; font-size: 13px; }
.hoja-props .chip.etiqueta { color: var(--primario); }
.hoja-props .prop-chip:hover { color: var(--texto); }
.chip.etiqueta.super { border: 0; text-decoration: underline dotted; }
dialog.dlg-super h2 { font-weight: 600; font-size: 18px; }
dialog.dlg-super .prop span { font-weight: 400; color: var(--suave); }
.super-fila input, .super-fila select { font-weight: 400; }
body.en-lienzo .cabecera h1 { font-size: 26px; }
body.en-lienzo .cabecera .boton { font-weight: 500; }

/* Lenguaje visual sobrio de toda la app: títulos en azul de marca sólido (sin degradé), pesos regulares, botón principal plano. */
h1, :root[data-theme="dark"] h1 { background: none; -webkit-background-clip: border-box; background-clip: border-box; -webkit-text-fill-color: currentColor; color: var(--azul); font-weight: 600; letter-spacing: -0.01em; }
:root[data-theme="dark"] h1 { color: #8FA8FF; }
h2 { font-weight: 600; }
.titulo-doc { font-weight: 600; }
#lateral nav a, #lateral .ensenar, #lateral a { font-weight: 400; }
#nav a.activo { font-weight: 500; }
.nuevo { background: var(--azul); font-weight: 500; }

/* Nota unificada: papel editable (puntos por defecto), tinta sobre el texto, PDF y Google dentro de la nota */
.doc #editor { position: relative; }
.doc #editor .ProseMirror { --papel-img: radial-gradient(circle at center, color-mix(in srgb, var(--suave) 26%, transparent) 1.1px, transparent 1.7px); --papel-tam: 28px 28px; --papel-pos: 0 14px; --lh: 28px;
  background-image: var(--papel-img); background-size: var(--papel-tam); background-position: var(--papel-pos); padding: 0 2px; line-height: var(--lh); touch-action: pan-y; }
.doc #editor .ProseMirror p { margin: 0; }
.doc #editor .ProseMirror h1, .doc #editor .ProseMirror h2 { margin-block: var(--lh) calc(var(--lh) / 2); line-height: calc(var(--lh) * 1.5); }
.doc #editor .ProseMirror ul, .doc #editor .ProseMirror ol { margin-block: 0; }
.tinta-viva { position: absolute; left: 0; top: 0; width: 100%; height: 100%; pointer-events: none; z-index: 3; }
.img-env.tinta-nota { display: block; position: relative; margin-bottom: 4px; max-width: 70%; cursor: pointer; }
.img-env.tinta-nota.izq { float: left; margin-right: 14px; }
.img-env.tinta-nota.der { float: right; margin-left: 14px; }
.img-env.tinta-nota img { border-radius: 0; background: none; }
.img-env.tinta-nota.sel img { outline: 1px dashed var(--azul); outline-offset: 2px; }
.img-env.tinta-nota.con-hora { margin-bottom: 26px; }
.img-env.tinta-nota .marca-t { position: absolute; left: 0; top: 100%; margin: 4px 0 0; line-height: 1.2; }
.img-env.tinta-nota .img-asa { display: none !important; }
:root[data-theme="dark"] .img-env.tinta-nota img { filter: invert(1) hue-rotate(180deg); }
.tinta-pill { position: fixed; left: 0; right: 0; margin-inline: auto; width: max-content; bottom: calc(18px + env(safe-area-inset-bottom, 0px)); z-index: 40; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: center; max-width: calc(100vw - 24px); background: var(--panel); border: 1px solid var(--borde); border-radius: 22px; padding: 6px 12px; box-shadow: 0 10px 28px rgba(15, 25, 70, .16); font-size: 13px; color: var(--suave); }
.tinta-pill[hidden] { display: none; }
@media (max-width: 820px) { .tinta-pill { bottom: calc(78px + env(safe-area-inset-bottom, 0px)); } }
.tinta-pill button { border: 0; background: transparent; color: var(--suave); width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; cursor: pointer; padding: 0; }
.tinta-pill button.ut { width: 20px; height: 52px; border-radius: 6px; align-self: flex-end; margin-bottom: -10px; transition: transform .12s; }
.tinta-pill button.ut svg { width: 100%; height: 100%; }
.tinta-pill button.ut.on { transform: translateY(-8px); background: transparent; }
.tinta-pill button:hover:not(:disabled) { background: var(--tenue); color: var(--texto); }
.tinta-pill button.on:not(.color) { background: var(--tenue); color: var(--azul); }
.tinta-pill button:disabled { opacity: .35; cursor: default; }
.tinta-pill button svg { width: 18px; height: 18px; }
.tinta-pill .color { width: 22px; height: 22px; border: 2px solid transparent; }
.tinta-pill .color.on { border-color: var(--panel); box-shadow: 0 0 0 2px var(--azul); }
.tinta-pill .sep { width: 1px; height: 20px; background: var(--borde); }
.tinta-pill input[type=range] { width: 80px; accent-color: var(--azul); }
.tinta-pill .op { display: flex; align-items: center; gap: 4px; cursor: pointer; white-space: nowrap; }
.tinta-forma { position: absolute; z-index: 6; display: flex; align-items: center; gap: 8px; background: var(--panel); border: 1px solid var(--borde); border-radius: 12px; padding: 6px 10px; font-size: 13px; color: var(--suave); box-shadow: 0 8px 24px rgba(15, 25, 70, .16); white-space: nowrap; }
.papel-pop { position: fixed; z-index: 60; width: 280px; max-width: calc(100vw - 16px); background: var(--panel); border: 1px solid var(--borde); border-radius: 12px; padding: 12px 14px; box-shadow: 0 12px 32px rgba(15, 25, 70, .18); display: flex; flex-direction: column; gap: 12px; font-size: 13px; }
.papel-pop .fila-p { display: flex; flex-direction: column; gap: 6px; color: var(--suave); }
.papel-pop .fila-p b { color: var(--texto); font-weight: 500; }
.papel-pop input[type=range] { width: 100%; accent-color: var(--azul); }
.papel-pop .seg { display: flex; flex-wrap: wrap; gap: 4px; }
.papel-pop .seg button { background: var(--tenue); border: 1px solid var(--borde); border-radius: 8px; padding: 6px 10px; font-size: 13px; cursor: pointer; color: var(--texto); }
.papel-pop .seg button[aria-pressed="true"] { border-color: var(--azul); color: var(--azul); font-weight: 500; background: color-mix(in srgb, var(--azul) 8%, var(--panel)); }
.papel-pop .colores { display: flex; gap: 8px; }
.papel-pop .sw { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--borde); cursor: pointer; padding: 0; }
.papel-pop .sw[aria-pressed="true"] { border-color: var(--azul); box-shadow: 0 0 0 2px color-mix(in srgb, var(--azul) 25%, transparent); }
.incrustado { clear: both; margin: 14px 0; background: var(--panel); border: 1px solid var(--borde); border-radius: 12px; overflow: hidden; line-height: 1.4; }
.incrustado.ProseMirror-selectednode { outline: 2px solid var(--azul); }
.inc-cab { display: flex; align-items: center; gap: 12px; padding: 10px 12px; flex-wrap: wrap; }
.inc-ico { width: 34px; height: 34px; border-radius: 8px; background: color-mix(in srgb, var(--azul) 10%, transparent); color: var(--azul); display: grid; place-items: center; flex: none; }
.incrustado[data-clase="documento"] .inc-ico { color: #1A73E8; background: #E8F0FE; } .incrustado[data-clase="hoja"] .inc-ico { color: #188038; background: #E6F4EA; } .incrustado[data-clase="presentacion"] .inc-ico { color: #B06000; background: #FEF0D6; }
.inc-tit { flex: 1; min-width: 120px; display: flex; flex-direction: column; } .inc-tit b { font-weight: 500; word-break: break-word; } .inc-tit small { color: var(--suave); }
.inc-ver, .inc-abrir { font: inherit; font-size: 13px; padding: 6px 12px; border-radius: 8px; border: 1px solid var(--borde); background: var(--panel); color: var(--texto); cursor: pointer; text-decoration: none; }
.inc-ver:hover, .inc-abrir:hover { border-color: var(--azul); color: var(--azul); }
.inc-cuerpo iframe { display: block; width: 100%; height: min(70vh, 560px); border: 0; border-top: 1px solid var(--borde); background: #fff; }
.dlg-google { border: 1px solid var(--borde); border-radius: 14px; padding: 18px; background: var(--panel); color: var(--texto); width: min(440px, calc(100vw - 32px)); }
.dlg-google h2 { margin: 0 0 6px; font-size: 16px; } .dlg-google .ayuda { color: var(--suave); font-size: 13px; margin: 0 0 12px; }
.dlg-google input[type=url] { width: 100%; padding: 9px 10px; border-radius: 8px; border: 1px solid var(--borde); background: var(--panel); color: var(--texto); font: inherit; }
.dlg-google .error { color: #B42318; font-size: 13px; margin: 8px 0 0; } .dlg-google .fila { display: flex; gap: 8px; justify-content: flex-end; margin-top: 14px; }

/* Nota de texto: barra de medios y propiedades más calmas (sin cajas ni negritas) */
.doc .medios { background: transparent; border: 0; padding: 0; gap: 2px 4px; margin: 4px 0 14px; }
.doc .medios .boton { border: 0; background: transparent; box-shadow: none; color: var(--suave); font-weight: 400; font-size: 13px; padding: 6px 8px; }
.doc .medios .boton:hover { background: var(--tenue); color: var(--texto); }
.doc .medios .boton svg { width: 16px; height: 16px; }
.doc .props .prop { border-style: solid; border-color: transparent; background: transparent; padding-left: 0; }
.doc .props .prop > span { font-weight: 400; color: var(--suave); }
.doc .doc-barra .boton { font-weight: 400; }

/* ---------- Tableros: estados propios, minimalistas; los colores salen de las variables del tema ---------- */
.tb { position: relative; font-weight: 400; }
.tb-barra { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin: 0 0 14px; }
.tb-tabs { display: flex; gap: 2px; overflow-x: auto; max-width: 100%; }
.tb-tabs button, .tb-acciones button, .tb-acciones a.tb-grabar { padding: 5px 10px; border-radius: 6px; border: 0; background: none; color: var(--suave); font-size: .85em; text-decoration: none; white-space: nowrap; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.tb-tabs button:hover, .tb-acciones button:hover, .tb-acciones a.tb-grabar:hover { background: var(--tenue); color: var(--texto); }
.tb-tabs button.on { background: var(--tenue); color: var(--texto); font-weight: 500; }
.tb-acciones { display: flex; gap: 4px; align-items: center; flex-wrap: wrap; margin-left: auto; }
.tb-acciones select { border: 0; background: none; color: var(--suave); font-size: .85em; padding: 5px 4px; }
.tb-acciones .tb-nueva { background: var(--azul); color: var(--primario-texto, #fff); font-weight: 500; margin-left: 6px; }
.tb-acciones .tb-nueva:hover { background: var(--azul); color: var(--primario-texto, #fff); opacity: .92; }
.tb-linea { display: flex; gap: 2px; height: 4px; border-radius: 2px; overflow: hidden; margin: 0 0 18px; }
.tb-linea i { display: block; min-width: 4px; }
.tb-cols { display: flex; gap: 26px; overflow-x: auto; padding: 0 2px 18px; align-items: flex-start; scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch; }
.tb-col { flex: 0 0 264px; min-height: 140px; scroll-snap-align: start; border-radius: 10px; padding: 0 2px; }
.tb-col.tb-sobre { background: var(--tenue); }
.tb-col h3 { margin: 0 0 10px; font-size: .88em; font-weight: 500; display: flex; align-items: center; gap: 8px; color: var(--texto); }
.tb-col h3 small { color: var(--suave); font-weight: 400; font-size: .85em; }
.tb-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--c); flex: none; }
.tb-menu { margin-left: auto; border: 0; background: none; color: var(--suave); border-radius: 5px; padding: 2px 6px; opacity: 0; cursor: pointer; }
.tb-col:hover .tb-menu, .tb-menu:focus-visible { opacity: 1; }
@media (hover: none) { .tb-menu { opacity: 1; } }
.tb-card { background: var(--panel); border: 1px solid var(--borde); border-radius: 8px; padding: 10px 12px; margin-bottom: 6px; cursor: grab; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.tb-card:hover { border-color: color-mix(in srgb, var(--borde) 60%, var(--suave)); }
.tb-card:focus-visible, .tb-add:focus-visible, .tb-menu:focus-visible { outline: 2px solid var(--azul); outline-offset: 2px; }
.tb-t { overflow-wrap: anywhere; }
.tb-meta { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 6px; font-size: .78em; color: var(--suave); }
.tb-meta:empty { display: none; }
.tb-venc { color: var(--vencida); }
.tb-et { display: inline-flex; align-items: center; gap: 5px; } .tb-et i { width: 6px; height: 6px; border-radius: 50%; display: block; }
.tb-fant { opacity: .35; }
.tb-vuela { position: fixed; left: 0; top: 0; z-index: 90; pointer-events: none; box-shadow: var(--sombra, 0 10px 28px rgba(20, 30, 80, .18)); background: var(--panel); border: 1px solid var(--borde); border-radius: 8px; padding: 10px 12px; will-change: transform; }
body.tb-arrastrando { cursor: grabbing; user-select: none; -webkit-user-select: none; overscroll-behavior: contain; }
.tb-soltar { height: 2px; background: var(--azul); border-radius: 2px; margin: -3px 0 4px; }
.tb-mas, .tb-add { width: 100%; text-align: left; padding: 7px 10px; color: var(--suave); font-size: .85em; border: 0; background: none; border-radius: 6px; cursor: pointer; }
.tb-mas:hover, .tb-add:hover { background: var(--tenue); color: var(--texto); }
.tb-colnueva { flex-basis: 160px; }
.tb-panel { position: fixed; right: 20px; top: 70px; width: min(320px, calc(100vw - 24px)); max-height: calc(100dvh - 100px); overflow: auto; background: var(--panel); border: 1px solid var(--borde); border-radius: 12px; box-shadow: var(--sombra, 0 12px 40px rgba(20, 30, 80, .14)); padding: 18px; z-index: 60; }
.tb-panel[hidden] { display: none; }
.tb-panel h4 { margin: 0 0 8px; font-size: .85em; font-weight: 500; color: var(--suave); }
.tb-panel label { display: block; font-size: .8em; color: var(--suave); margin: 12px 0 0; }
.tb-panel input[type=text], .tb-panel input[type=date], .tb-panel select { width: 100%; border: 0; border-bottom: 1px solid var(--borde); background: none; padding: 6px 0; border-radius: 0; outline: none; color: var(--texto); font-size: 1rem; }
.tb-panel input:focus, .tb-panel select:focus { border-bottom-color: var(--azul); }
.tb-lab { font-size: .8em; color: var(--suave); margin: 14px 0 6px; }
.tb-sw { display: flex; gap: 8px; flex-wrap: wrap; }
.tb-sw button { width: 22px; height: 22px; border-radius: 50%; border: 0; cursor: pointer; padding: 0; }
.tb-sw button.on { box-shadow: 0 0 0 2px var(--panel), 0 0 0 3px var(--azul); }
.tb-color { display: flex; gap: 10px; align-items: center; margin-top: 10px; }
.tb-color input[type=color] { width: 26px; height: 26px; border: 0; padding: 0; background: none; border-radius: 50%; }
.tb-seg { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 4px; }
.tb-seg button { padding: 5px 10px; border-radius: 6px; font-size: .85em; color: var(--suave); background: var(--tenue); border: 0; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.tb-seg button.on { color: var(--azul); box-shadow: inset 0 0 0 1px var(--azul); }
.tb-seg button:disabled { opacity: .4; cursor: default; }
.tb-estados i { width: 8px; height: 8px; border-radius: 50%; display: block; }
.tb-ets { display: flex; gap: 12px; flex-wrap: wrap; font-size: .9em; margin-bottom: 4px; }
.tb-ets button { border: 0; background: none; color: var(--suave); cursor: pointer; padding: 0 2px; }
.tb-fila { display: flex; gap: 10px; align-items: center; margin-top: 10px; } .tb-fila input[type=color] { width: 24px; height: 24px; border: 0; padding: 0; background: none; border-radius: 50%; }
.tb-vacio { color: var(--suave); font-size: .85em; }
.tb-pie { display: flex; justify-content: space-between; align-items: center; margin-top: 20px; gap: 12px; }
.tb-pie a { color: var(--suave); font-size: .85em; margin-right: 8px; }
.tb-ok { background: var(--azul); color: var(--primario-texto, #fff); border: 0; padding: 6px 16px; border-radius: 6px; font-weight: 500; cursor: pointer; }
.tb-peligro { background: none; border: 0; color: var(--vencida); cursor: pointer; font-size: .85em; } .tb-peligro:disabled { opacity: .4; }
.tb-compacto .tb-cols { gap: 16px; } .tb-compacto .tb-col { flex-basis: 200px; }
@media (max-width: 700px) {
  .tb-col { flex-basis: 80vw; } .tb-cols { gap: 14px; scroll-snap-type: x mandatory; }
  .tb-panel { left: 12px; right: 12px; top: auto; bottom: calc(84px + env(safe-area-inset-bottom)); width: auto; max-height: 62dvh; }
  .tb-acciones { margin-left: 0; }
}
.tb-plantillas { display: flex; flex-direction: column; gap: 4px; }
.tb-plantillas button { text-align: left; border: 0; background: none; padding: 10px; border-radius: 8px; cursor: pointer; display: flex; flex-direction: column; gap: 2px; color: var(--texto); }
.tb-plantillas button:hover { background: var(--tenue); } .tb-plantillas span { color: var(--suave); font-size: .85em; }
.hel-tablero { background: var(--panel); border: 1px solid var(--borde); border-radius: 10px; overflow: hidden; display: flex; flex-direction: column; }
.hel-tb-barra { display: flex; align-items: center; gap: 8px; padding: 6px 12px; font-size: .85em; color: var(--suave); border-bottom: 1px solid var(--borde); cursor: grab; flex: none; }
.hel-tb-cuerpo { flex: 1; overflow: auto; padding: 12px 14px; min-height: 0; }
.hel-tb-cuerpo .tb-barra { margin-bottom: 8px; }

/* Buscador: siempre hay una salida a mano */
.caja-buscar input { min-width: 0; }
.cerrar-buscar { flex: none; padding: 6px 12px; min-height: 36px; }
@media (max-width: 720px) { .caja-buscar .sub { display: none; } #cerrarBuscar { margin-left: auto; min-height: 44px; } #dlgBuscar { max-height: calc(100dvh - 24px); overflow: auto; } }
/* Ventanas: la × de salida cuando no trae Cancelar ni Cerrar */
dialog { position: relative; }
.cerrar-x { position: sticky; top: 6px; float: right; margin: 6px 6px -34px 0; z-index: 3; width: 44px; height: 44px; border-radius: 50%; border: 0; background: color-mix(in srgb, var(--texto) 8%, transparent); color: var(--texto); font-size: 24px; line-height: 1; cursor: pointer; }
.cerrar-x:hover { background: color-mix(in srgb, var(--texto) 16%, transparent); }

/* Lienzo: salida y estado de guardado siempre a la vista (en el celular el guardado se ocultaba) */
body.en-lienzo .cabecera #cerrarDoc { float: right; margin: 2px 0 0 8px; }
body.en-lienzo .cabecera .filtros #guardado { display: inline-flex; align-items: center; flex: none; padding-left: 6px; }

/* Celular: la nota respira (margen lateral) y la barra de insertar no se monta sobre el texto */
@media (max-width: 820px) {
  #vista { padding-left: 20px; padding-right: 20px; }
  .doc .ProseMirror { padding-left: 4px; padding-right: 4px; }
  .doc .medios { position: sticky; top: 0; z-index: 6; margin: 0 -20px 10px; padding: 6px 20px; border-radius: 0; background: var(--fondo); border-bottom: 1px solid var(--borde); }
  body.en-lienzo .cabecera .filtros { margin-left: -20px; margin-right: -20px; padding-left: 20px; padding-right: 20px; }
}

/* Fichas (etiquetas, participantes, equipo): cada valor es una ficha; Enter agrega y deja el campo listo para la siguiente */
.prop-fichas { flex-wrap: wrap; align-items: center; cursor: text; max-width: 100%; row-gap: 4px; }
.prop-fichas .fichas { display: contents; }
.ficha { display: inline-flex; align-items: center; gap: 2px; padding: 2px 4px 2px 10px; border-radius: 999px; background: var(--tenue); color: var(--texto); font-size: 13px; line-height: 1.4; }
.ficha-x { border: 0; background: transparent; color: var(--suave); font-size: 18px; line-height: 1; min-width: 28px; min-height: 28px; border-radius: 50%; cursor: pointer; padding: 0; }
.ficha-x:hover { color: var(--texto); background: color-mix(in srgb, var(--texto) 10%, transparent); }
.prop-fichas input.ficha-in { width: 9em; min-width: 6em; flex: 1 1 8em; cursor: text; }
.ficha-add { flex: none; padding: 2px 12px; min-height: 30px; font-size: 13px; }

/* Buscador: ayuda, recientes y tipo de cada resultado */
.busca-ayuda { margin: 0; padding: 12px 18px 4px; color: var(--suave); font-size: .9em; }
.busca-tit { margin: 0; padding: 10px 18px 2px; font-size: .75em; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--suave); }
.tipo-res { font-style: normal; display: inline-block; margin-right: 8px; padding: 0 8px; border-radius: 999px; background: var(--tenue); font-size: .85em; }
#resultados a { min-height: 44px; }

@media (max-width: 820px) {
  /* Propiedades: en el celular se acomodan en varias filas para que las fichas se vean completas */
  .props { flex-wrap: wrap; overflow-x: visible; }
  .prop { flex: 0 1 auto; max-width: 100%; }
  .prop-fichas { width: 100%; border-radius: 16px; }
  .prop-fichas input.ficha-in { font-size: 16px; min-height: 32px; }
  #q { font-size: 16px; }
  /* Margen a prueba de todo: lo pone la propia nota, no solo la página, y respeta el borde seguro del iPhone */
  .doc { padding-left: max(0px, env(safe-area-inset-left)); padding-right: max(0px, env(safe-area-inset-right)); box-sizing: border-box; }
  .doc .titulo-doc, .doc .props, .doc .super { margin-left: 0; margin-right: 0; }
}
@media (max-width: 820px) { input.titulo-doc { padding-left: 0; padding-right: 0; } }

.grafo-tarjeta { flex-wrap: wrap; }
.grafo-sug { flex-basis: 100%; display: flex; flex-direction: column; gap: 6px; border-top: 1px solid var(--borde, #e3e6f3); padding-top: 8px; }
.grafo-sug-fila { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 13px; }
.grafo-sug-fila > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.grafo-tiempo { position: absolute; left: 14px; right: 14px; bottom: 58px; display: flex; align-items: center; gap: 10px; max-width: 420px; }
.grafo-tiempo input[type=range] { flex: 1; accent-color: var(--marca, #1440C9); }
.grafo-tiempo[hidden] { display: none; }

.busca-filtros { display: flex; gap: 6px; flex-wrap: wrap; padding: 8px 14px 0; }
.res-elim { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 14px; }
.res-elim small { display: block; color: var(--suave); }

/* Llaves: miniaturas de las imágenes pegadas */
.ll-miniaturas { display: flex; flex-wrap: wrap; gap: 8px; }
.ll-miniaturas:empty { display: none; }
.ll-mini { position: relative; display: inline-block; }
.ll-mini img { width: 84px; height: 84px; object-fit: cover; border-radius: 8px; border: 1px solid var(--borde); display: block; }
.ll-mini button { position: absolute; top: -6px; right: -6px; width: 28px; height: 28px; min-height: 0; border-radius: 50%; border: 1px solid var(--borde); background: var(--panel); color: var(--texto); font-size: 18px; line-height: 1; padding: 0; cursor: pointer; }
.dlg-llave textarea[name="notas"] { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; resize: vertical; }

.enlazado { color: var(--suave); font-size: 12.5px; margin-left: 6px; transition: color .3s; }
.enlazado.nuevo { color: var(--marca, #1440C9); }

/* Cifras del Home: cada una es un enlace a lo que cuenta */
a.cifra { display: block; color: inherit; text-decoration: none; cursor: pointer; transition: border-color .15s, box-shadow .15s, transform .15s; }
a.cifra:hover { border-color: var(--primario); transform: translateY(-1px); }
a.cifra:focus-visible { outline: 2px solid var(--primario); outline-offset: 2px; }
/* Hoy: Antes de tu reunión y Compromisos */
.antes, .compromisos { display: grid; gap: 14px 28px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); margin: 0 0 22px; }
.antes-cab { grid-column: 1 / -1; }
.antes h3, .compromisos h3 { font-size: 13px; font-weight: 500; color: var(--suave); margin: 0 0 6px; }
.antes ul, .compromisos ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.antes a, .compromisos a { color: inherit; text-decoration: none; }
.antes a:hover, .compromisos a:hover { text-decoration: underline; }
.comp-persona summary { cursor: pointer; padding: 4px 0; }
.comp-persona ul { padding: 4px 0 8px 22px; }

#llVenceCampos.apagado { opacity: .45; }
