/* RocketHub · estilos de las herramientas Endpoints (.eptool) y Pizarrón (.wbtool).
   Usan las variables de tema para adaptarse a claro/oscuro automáticamente. */

/* Estas herramientas necesitan ancho completo (el .page normal limita a 680px). */
.page:has(.eptool), .page:has(.wbtool), .page:has(.kbtool), .page:has(.caltool), .page:has(.mxtool), .page:has(.exptool), .page:has(.chtool), .page:has(.petstool), .page:has(.outfittool) { max-width: none; padding: 16px 20px 22px; }

/* ===== Mascotas (detalle estilo setups) ===== */
.petstool { display: flex; height: calc(100vh - 168px); min-height: 460px; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--surface); position: relative; }
.petstool__main { flex: 1; min-width: 0; display: flex; overflow: hidden; padding: 14px; }
.petstool__empty { padding: 32px 20px; color: var(--ink-faint); font-size: 14px; }
.pettree__photo { width: 18px; height: 18px; border-radius: 50%; object-fit: cover; display: block; }

/* Centro: el collage ocupa todo el espacio disponible (alto y ancho de la ventana). */
.petcenter { position: relative; flex: 1; min-width: 0; min-height: 0; display: flex; }

/* Collage empaquetado: una grilla cuyo reparto depende de cuántas fotos hay, de
   modo que TODAS calcen a la vez con distintos tamaños y sin scroll. Cada celda
   se llena con object-fit: cover y se reajusta sola al cambiar el tamaño. */
.petcollage { flex: 1; min-width: 0; min-height: 0; display: grid; gap: 6px; }
.petcollage[data-n="0"], .petcollage[data-n="1"] { grid-template-columns: 1fr; grid-template-rows: 1fr; }
.petcollage[data-n="2"] { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr; }
.petcollage[data-n="3"] { grid-template-columns: 1.4fr 1fr; grid-template-rows: 1fr 1fr; }
.petcollage[data-n="3"] .petcollage__item:nth-child(1) { grid-row: 1 / span 2; }
.petcollage[data-n="4"] { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; }
.petcollage[data-n="5"] { grid-template-columns: repeat(6, 1fr); grid-template-rows: 1fr 1fr; }
.petcollage[data-n="5"] .petcollage__item:nth-child(-n+2) { grid-column: span 3; }
.petcollage[data-n="5"] .petcollage__item:nth-child(n+3) { grid-column: span 2; }
.petcollage[data-n="6"] { grid-template-columns: repeat(3, 1fr); grid-template-rows: 1fr 1fr; }
.petcollage__item { position: relative; border-radius: 11px; overflow: hidden; cursor: zoom-in; background: color-mix(in srgb, var(--ink) 6%, var(--surface)); min-width: 0; min-height: 0; }
.petcollage__item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.petcollage__x { position: absolute; top: 6px; right: 6px; width: 24px; height: 24px; border: none; border-radius: 7px; background: rgba(0,0,0,.55); color: #fff; cursor: pointer; font-size: 12px; line-height: 1; opacity: 0; transition: opacity .12s; }
.petcollage__item:hover .petcollage__x { opacity: 1; }
.petcollage__add { width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; border: 1.5px dashed var(--line); border-radius: 14px; background: var(--bg); color: var(--ink-faint); cursor: pointer; font: inherit; font-size: 14px; }
.petcollage__add i { font-size: 42px; }
.petcollage__add:hover { border-color: var(--accent); color: var(--accent); }
/* botón flotante para sumar fotos (no ocupa celda de la grilla) */
.petcollage__fab { position: absolute; right: 14px; bottom: 14px; width: 46px; height: 46px; border-radius: 50%; border: none; background: var(--accent); color: #fff; font-size: 19px; cursor: pointer; box-shadow: 0 4px 14px rgba(0,0,0,.24); display: grid; place-items: center; transition: transform .12s, filter .12s; z-index: 3; }
.petcollage__fab:hover { transform: translateY(-1px); filter: brightness(1.06); }
.petcollage__fab[hidden] { display: none; }
.petcollage__fab.is-busy { pointer-events: none; opacity: .6; }
.petcenter--memoriam .petcollage__item img { filter: grayscale(.5); }
/* visor a pantalla completa */
.petlb { position: fixed; inset: 0; z-index: 1000; background: rgba(0,0,0,.82); display: flex; align-items: center; justify-content: center; padding: 30px; cursor: zoom-out; }
.petlb[hidden] { display: none; }
.petlb img { max-width: 92vw; max-height: 88vh; object-fit: contain; border-radius: 8px; }
.petlb__x { position: absolute; top: 16px; right: 20px; width: 38px; height: 38px; border: none; border-radius: 50%; background: rgba(255,255,255,.18); color: #fff; font-size: 18px; cursor: pointer; }

/* Barra derecha = ficha (estructura canónica .wbtool__side--right; colapso vía side-tabs) */
.petstool__detail { width: 320px; }
.petdetail__data { flex: 1; min-height: 0; padding: 16px; overflow-y: auto; display: flex; flex-direction: column; gap: 12px; }
.petdetail__name { font-size: 20px; font-weight: 700; color: var(--ink); border: none; border-bottom: 1px solid var(--line); background: none; padding: 5px 2px; }
.petdetail__name:focus { outline: none; border-color: var(--accent); }
.petfield { display: flex; flex-direction: column; gap: 4px; }
.petfield > span { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .4px; color: var(--ink-faint); }
.petdetail__desc { min-height: 110px; resize: vertical; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--ink); font-size: 13px; padding: 9px 10px; font-family: inherit; }
.petdetail__desc:focus { outline: none; border-color: var(--accent); }
.petstool__agecalc { font-size: 12.5px; font-weight: 600; color: var(--accent); min-height: 16px; }
.petfield--check { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--ink-soft); cursor: pointer; }
.petfield--check input { width: 16px; height: 16px; cursor: pointer; accent-color: var(--accent); }
.petmemorial { font-size: 12.5px; font-weight: 700; color: var(--ink-soft); background: color-mix(in srgb, var(--ink) 7%, transparent); border-radius: 8px; padding: 6px 10px; }
.petmemorial[hidden] { display: none; }
.pettree__mem { font-size: 11px; }

@media (max-width: 820px) {
  .petstool { flex-direction: column; height: auto; }
  .petstool__main { min-height: 340px; }
  .petstool__detail { width: auto; border-left: none; border-top: 1px solid var(--line); }
}

/* ===== Imágenes (biblioteca: carpetas · grilla · línea de tiempo) ===== */
.imgtool__tree { flex: 1; overflow-y: auto; padding: 6px 0; }
.imgfold { display: flex; align-items: center; gap: 7px; padding: 7px 10px 7px calc(10px + var(--d, 0) * 14px); cursor: pointer; font-size: 13px; color: var(--ink); }
.imgfold:hover { background: color-mix(in srgb, var(--ink) 4%, transparent); }
.imgfold.is-active { background: color-mix(in srgb, var(--accent) 12%, transparent); color: var(--accent); font-weight: 600; }
.imgfold__caret { width: 12px; display: inline-flex; justify-content: center; font-size: 10px; color: var(--ink-faint); transition: transform .15s; }
.imgfold__caret.is-empty { visibility: hidden; }
.imgfold__caret.is-open { transform: rotate(90deg); }
.imgfold__ico { font-size: 16px; color: var(--ink-soft); }
.imgfold.is-active .imgfold__ico { color: var(--accent); }
.imgfold__name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.imgtool__genthumbs { margin: 8px 12px 0; display: flex; align-items: center; justify-content: center; gap: 7px; border: 1px solid var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent); color: var(--accent); border-radius: 8px; padding: 8px 10px; font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; }
.imgtool__genthumbs:hover { background: color-mix(in srgb, var(--accent) 20%, transparent); }
.imgtool__genthumbs[hidden] { display: none; }
/* Mantenimiento automático (proteger / miniaturas): aviso discreto, no es un botón */
.imgtool__maint { display: flex; align-items: center; gap: 7px; margin: 8px 12px 0; padding: 7px 9px; border-radius: 8px; background: color-mix(in srgb, var(--accent) 10%, transparent); color: var(--accent); font-size: 11.5px; font-weight: 600; line-height: 1.3; }
.imgtool__maint[hidden] { display: none; }
.imgtool__maint span { flex: 1; min-width: 0; }
/* Cancelar un trabajo largo (subida o mantenimiento) */
.imgtool__cancel { flex: 0 0 auto; margin-left: auto; border: 1px solid currentColor; background: none; color: inherit;
  border-radius: 7px; padding: 4px 9px; font: inherit; font-size: 11.5px; font-weight: 600; cursor: pointer; opacity: .85; }
.imgtool__cancel:hover:not(:disabled) { opacity: 1; background: color-mix(in srgb, currentColor 14%, transparent); }
.imgtool__cancel:disabled { opacity: .5; cursor: default; }
.imgtool__spin { animation: imgspin 1s linear infinite; flex: 0 0 auto; }
@keyframes imgspin { to { transform: rotate(360deg); } }
/* Estado de privacidad en el panel de propiedades */
.imgprop__lock { display: flex; align-items: center; gap: 6px; margin: 12px 0 0; font-size: 12px; color: #1a7f4b; }
.imgprop__lock--open { color: #b47500; }
.imgprop__lock i { font-size: 14px; }
.imgtool__usage { display: flex; align-items: center; gap: 7px; padding: 9px 12px; border-top: 1px solid var(--line); font-size: 12px; color: var(--ink-soft); }
.imgtool__usage b { color: var(--ink); }
.imgtool__usage span { color: var(--ink-faint); }
.imgtool__main { flex: 1; min-width: 0; min-height: 0; display: flex; flex-direction: column; overflow: hidden; position: relative; }
.imgtool__main.is-drop::after { content: 'Suelta las imágenes aquí'; position: absolute; inset: 8px; border: 2px dashed var(--accent); border-radius: 12px; background: color-mix(in srgb, var(--accent) 10%, transparent); display: grid; place-items: center; font-size: 15px; font-weight: 700; color: var(--accent); z-index: 5; pointer-events: none; }
.imgtool__bar { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.imgtool__bar-title { font-size: 14px; color: var(--ink-soft); }
.imgtool__bar-title b { color: var(--ink); font-weight: 800; }
.imgtool__bar-title span { font-size: 12.5px; color: var(--ink-faint); }
.imgtool__search { flex: 1; min-width: 140px; max-width: 280px; margin-left: auto; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--ink); font: inherit; font-size: 13px; padding: 7px 10px; }
.imgtool__search:focus { outline: none; border-color: var(--accent); }
/* min-height:0 es imprescindible: sin él, este item flex no se encoge bajo su contenido,
   la grilla se desborda del centro y su scroll interno nunca se activa. */
.imgtool__grid { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 18px; display: grid; grid-template-columns: repeat(5, 1fr); gap: 22px; align-content: start; }
.imgtool__empty { grid-column: 1 / -1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 48px 20px; color: var(--ink-faint); text-align: center; }
.imgtool__empty i { font-size: 46px; }
.imgtool__empty p { font-size: 13.5px; max-width: 340px; line-height: 1.5; }
/* La tarjeta define el cuadrado (aspect-ratio + align-self:start para que la fila no la estire)
   y la miniatura lo rellena por completo. */
/* El alto de la fila lo fija el JS (grid-auto-rows en px) y la tarjeta lo rellena: es la
   única forma fiable de tener cuadrados en grid sin que se solapen entre filas. */
.imgcard { position: relative; margin: 0; border: 1px solid var(--line); border-radius: 11px; overflow: hidden; background: var(--bg); cursor: zoom-in; transition: border-color .12s, box-shadow .12s; }
.imgcard:hover { border-color: var(--accent); box-shadow: 0 4px 14px rgba(0,0,0,.12); }
.imgcard__thumb { position: absolute; inset: 0; background: repeating-conic-gradient(color-mix(in srgb, var(--ink) 5%, var(--surface)) 0% 25%, var(--surface) 0% 50%) 50% / 18px 18px; }
.imgcard__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* el nombre va superpuesto para que la tarjeta quede cuadrada */
.imgcard__name { position: absolute; left: 0; right: 0; bottom: 0; padding: 20px 8px 6px; font-size: 11.5px; color: #fff;
  background: linear-gradient(to top, rgba(0,0,0,.75), rgba(0,0,0,0)); overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  opacity: 0; transition: opacity .12s; }
.imgcard:hover .imgcard__name, .imgcard.is-sel .imgcard__name { opacity: 1; }
/* Tuerca: aparece al pasar por encima y lleva a Propiedades. El resto de la tarjeta
   abre la imagen, por eso la tuerca recupera el cursor de puntero. */
.imgcard__gear { position: absolute; top: 7px; right: 7px; z-index: 2; width: 30px; height: 30px; display: grid; place-items: center;
  border: 0; border-radius: 8px; background: rgba(17,17,17,.62); color: #fff; font-size: 16px; cursor: pointer;
  opacity: 0; transform: scale(.9); transition: opacity .12s, transform .12s, background .12s; }
.imgcard:hover .imgcard__gear, .imgcard.is-sel .imgcard__gear, .imgcard__gear:focus-visible { opacity: 1; transform: none; }
.imgcard__gear:hover { background: var(--accent); }
/* Casilla de selección en lote (arriba a la izquierda), misma mecánica que la tuerca */
.imgcard__pick { position: absolute; top: 7px; left: 7px; z-index: 2; width: 24px; height: 24px; display: grid; place-items: center;
  border: 2px solid rgba(255,255,255,.85); border-radius: 7px; background: rgba(17,17,17,.45); color: transparent; font-size: 12px; cursor: pointer;
  opacity: 0; transition: opacity .12s, background .12s, color .12s; }
.imgcard:hover .imgcard__pick, .imgcard__pick.is-on, .imgcard__pick:focus-visible { opacity: 1; }
.imgcard__pick.is-on { background: var(--accent); border-color: var(--accent); color: #fff; }
.imgcard.is-picked { border-color: var(--accent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 45%, transparent); }
@media (hover: none) { .imgcard__pick { opacity: 1; } }
/* Barra de acciones en lote */
.imgtool__selbar { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; padding: 9px 14px; border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--accent) 8%, transparent); font-size: 12.5px; }
.imgtool__selbar[hidden] { display: none; }
.imgtool__selbar b { margin-right: 2px; }
.imgsel__move { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-soft); }
.imgsel__move select { border: 1px solid var(--line); border-radius: 7px; background: var(--bg); color: var(--ink); padding: 5px 7px; font: inherit; font-size: 12px; }
/* En pantallas táctiles no hay "pasar por encima": se deja siempre visible. */
@media (hover: none) { .imgcard__gear { opacity: 1; transform: none; } }
.imgcard__x { position: absolute; top: 6px; right: 6px; width: 24px; height: 24px; border: none; border-radius: 7px; background: rgba(0,0,0,.55); color: #fff; cursor: pointer; font-size: 12px; line-height: 1; opacity: 0; transition: opacity .12s; }
.imgcard:hover .imgcard__x { opacity: 1; }
.imgtool__progress { display: flex; align-items: center; gap: 10px; padding: 9px 14px; border-top: 1px solid var(--line); font-size: 13px; font-weight: 600; color: var(--accent); }
.imgtool__progress[hidden] { display: none; }
/* selector de vista (Carpetas / Tiempo) */
.imgtool__modes { display: flex; gap: 6px; padding: 8px 10px; border-bottom: 1px solid var(--line); }
/* Tres modos (Carpetas · Tiempo · Tags): se aprieta el texto para que quepan */
.imgmode { flex: 1; min-width: 0; display: inline-flex; align-items: center; justify-content: center; gap: 5px; border: 1px solid var(--line); background: var(--bg); color: var(--ink-soft); border-radius: 8px; padding: 6px 5px; font: inherit; font-size: 11.5px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.imgmode:hover { border-color: var(--accent); color: var(--accent); }
.imgmode.is-on { background: var(--accent); border-color: var(--accent); color: #fff; }
/* ∞ — imágenes sin fecha de origen */
.imgfold__inf { flex: 0 0 auto; width: 16px; text-align: center; font-size: 16px; font-weight: 700; line-height: 1; color: var(--ink-faint); }
.imgfold--nodate.is-active .imgfold__inf { color: inherit; }
/* Menú de carpeta (nueva subcarpeta / renombrar / eliminar) */
.imgmenu { position: fixed; z-index: 60; min-width: 178px; display: flex; flex-direction: column; padding: 5px; gap: 1px; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 10px 30px rgba(0,0,0,.18); }
.imgmenu button { display: flex; align-items: center; gap: 8px; border: 0; background: none; color: var(--ink); border-radius: 7px; padding: 8px 10px; font: inherit; font-size: 13px; text-align: left; cursor: pointer; }
.imgmenu button:hover { background: color-mix(in srgb, var(--accent) 12%, transparent); color: var(--accent); }
.imgmenu button.is-danger:hover { background: color-mix(in srgb, #d33 12%, transparent); color: #d33; }
/* Etiquetas en el panel de propiedades */
/* Diálogo de 3 salidas (confirm() solo da dos) */
.imgask { position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; background: rgba(0,0,0,.45); padding: 20px; }
.imgask__box { width: min(430px, 100%); background: var(--bg); border: 1px solid var(--line); border-radius: 14px; padding: 18px; box-shadow: 0 20px 60px rgba(0,0,0,.28); }
.imgask__box h4 { margin: 0 0 8px; font-size: 15px; }
.imgask__box p { margin: 0 0 15px; font-size: 13px; line-height: 1.5; color: var(--ink-soft); }
.imgask__acts { display: flex; flex-direction: column; gap: 7px; }
.imgask__sel { width: 100%; margin-bottom: 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--ink); padding: 8px 9px; font: inherit; font-size: 13px; }
.imgask__cancel { color: var(--ink-faint); }
.imgprop__hint { margin: -4px 0 0; font-size: 11.5px; line-height: 1.4; color: var(--ink-faint); }
/* Atajo para completar la fecha de captura con la del archivo (imágenes en ∞) */
.imgprop__usefile { width: 100%; margin-top: 6px; font-size: 11.5px; }
.imgtags { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 7px; }
.imgtags__none { font-size: 12px; color: var(--ink-faint); }
.imgtag { display: inline-flex; align-items: center; gap: 5px; padding: 3px 6px 3px 9px; border-radius: 999px; background: color-mix(in srgb, var(--accent) 13%, transparent); color: var(--accent); font-size: 12px; font-weight: 600; }
.imgtag button { border: 0; background: none; color: inherit; padding: 0 1px; font: inherit; font-size: 11px; line-height: 1; cursor: pointer; opacity: .6; }
.imgtag button:hover { opacity: 1; }
/* Etiqueta que no está en TODAS las seleccionadas (edición en lote) */
.imgtag--partial { background: color-mix(in srgb, var(--accent) 8%, transparent); opacity: .8; }
.imgtag--partial em { font-style: normal; font-weight: 700; opacity: .7; }
/* Cabecera y campo deshabilitado del modo lote */
.imgprop__batchhdr { display: flex; align-items: center; gap: 7px; margin: 0 0 12px; padding-bottom: 10px; border-bottom: 1px solid var(--line); font-size: 13px; color: var(--ink-soft); }
.imgprop__batchhdr i { font-size: 17px; color: var(--accent); }
.ofield--off { opacity: .5; }
.ofield--off input { cursor: not-allowed; }
/* propiedades (derecha) */
.imgtool__props { width: 310px; }
.imgtool__props-body { flex: 1; min-height: 0; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 12px; }
.imgprop__prev { width: 100%; aspect-ratio: 4/3; border-radius: 10px; border: 1px solid var(--line); background: repeating-conic-gradient(color-mix(in srgb, var(--ink) 5%, var(--surface)) 0% 25%, var(--surface) 0% 50%) 50% / 18px 18px; overflow: hidden; cursor: zoom-in; }
.imgprop__prev img { width: 100%; height: 100%; object-fit: contain; }
.imgprop__dl { display: grid; grid-template-columns: auto 1fr; gap: 4px 10px; margin: 0; font-size: 12.5px; }
.imgprop__dl dt { color: var(--ink-faint); font-weight: 600; }
.imgprop__dl dd { margin: 0; color: var(--ink); overflow-wrap: anywhere; }
.imgprop__dl em { color: var(--ink-faint); font-size: 11.5px; }
.imgtool__props-body .ofield { gap: 8px; }                 /* separa etiqueta del campo */
.imgtool__props-body .ofield input, .imgtool__props-body .ofield select { width: 100%; }
.imgprop__acts { display: flex; align-items: stretch; gap: 8px; margin-top: 4px; }
.imgprop__acts .outfittool__btn { flex: 1; text-align: center; text-decoration: none; }
.imgprop__acts .imgprop__ico { flex: 0 0 auto; width: 44px; display: grid; place-items: center; padding: 9px 0; font-size: 17px; }
.imgcard.is-sel { border-color: var(--accent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 35%, transparent); }
/* paginador */
.imgtool__pager { display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap; padding: 10px 14px; border-top: 1px solid var(--line); }
.imgtool__pager[hidden] { display: none; }
.imgpg__btn { border: 1px solid var(--line); background: var(--bg); color: var(--ink-soft); border-radius: 8px; padding: 6px 12px; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.imgpg__btn:hover:not([disabled]) { border-color: var(--accent); color: var(--accent); }
.imgpg__btn[disabled] { opacity: .4; cursor: default; }
.imgpg__n { font-size: 12.5px; color: var(--ink-soft); padding: 0 6px; }
.imgpg__n b { color: var(--ink); }
.imgpg__n small { color: var(--ink-faint); }
/* visor con zoom */
.imglb { position: fixed; inset: 0; z-index: 1000; background: rgba(0,0,0,.9); display: flex; flex-direction: column; }
.imglb__stage { flex: 1; min-height: 0; overflow: hidden; display: grid; place-items: center; cursor: grab; touch-action: none; }
.imglb__stage:active { cursor: grabbing; }
/* max-height en % NO resuelve contra el escenario flex (medido: la imagen se abría
   desbordada). Con unidades de viewport siempre cabe entera al abrir. */
.imglb__img { width: auto; height: auto; max-width: 92vw; max-height: calc(100vh - 130px); object-fit: contain; border-radius: 6px; transform-origin: center; will-change: transform; user-select: none; pointer-events: none; }
.imglb__x { position: absolute; top: 16px; right: 20px; z-index: 2; width: 38px; height: 38px; border: none; border-radius: 50%; background: rgba(255,255,255,.18); color: #fff; font-size: 18px; cursor: pointer; }
.imglb__bar { display: flex; align-items: center; gap: 10px; padding: 12px 18px; color: #fff; font-size: 13px; flex-wrap: wrap; justify-content: center; background: rgba(0,0,0,.35); }
.imglb__zoom { min-width: 52px; text-align: center; font-variant-numeric: tabular-nums; font-weight: 600; }
.imglb__meta { color: rgba(255,255,255,.75); margin-left: 8px; }
.imglb__bar .outfittool__btn { background: rgba(255,255,255,.14); border-color: rgba(255,255,255,.25); color: #fff; text-decoration: none; }
.imglb__bar .outfittool__btn:hover { background: rgba(255,255,255,.24); color: #fff; }
@media (max-width: 1200px) { .imgtool__grid { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 980px) { .imgtool__grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 820px) { .imgtool { flex-direction: column; height: auto; } .imgtool__main { min-height: 380px; } .imgtool__props { width: auto; } }

/* ===== Outfits (clóset + lienzo) ===== */
.outfittool { display: flex; height: calc(100vh - 168px); min-height: 460px; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--surface); position: relative; }
.outfittool__main { flex: 1; min-width: 0; display: flex; flex-direction: column; overflow: hidden; }
.outfittool__bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.outfittool__bar-title { font-size: 14px; font-weight: 700; color: var(--ink); }
.outfittool__hint { color: var(--ink-faint); font-size: 12.5px; line-height: 1.5; padding: 14px; }
/* izquierda: lista de categorías → prendas dentro */
.outfittool__tree { flex: 1; overflow-y: auto; padding: 4px 0 12px; }
.otree-cat { border-bottom: 1px solid var(--line); }
.otree-cat__row { width: 100%; display: flex; align-items: center; gap: 8px; padding: 10px 12px; background: none; border: none; cursor: pointer; font: inherit; color: var(--ink); text-align: left; }
.otree-cat__row:hover { color: var(--accent); }
.otree-cat__caret { display: inline-flex; transition: transform .15s; font-size: 11px; color: var(--ink-faint); }
.otree-cat.is-open .otree-cat__caret { transform: rotate(90deg); }
.otree-cat__ico { font-size: 16px; color: var(--ink-soft); }
.otree-cat__name { flex: 1; font-size: 13px; font-weight: 600; }
.otree-cat__count { font-size: 11px; color: var(--ink-faint); background: color-mix(in srgb, var(--ink) 8%, transparent); border-radius: 20px; padding: 1px 8px; }
.otree-cat__items { display: none; grid-template-columns: repeat(auto-fill, minmax(82px, 1fr)); gap: 8px; padding: 2px 10px 12px; }
.otree-cat.is-open .otree-cat__items { display: grid; }
.oclo { position: relative; display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--bg); cursor: pointer; transition: border-color .12s, box-shadow .12s; }
.oclo:hover { border-color: var(--accent); }
.oclo.is-active { border-color: var(--accent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 30%, transparent); }
.oclo__img { aspect-ratio: 1; display: grid; place-items: center; background: repeating-conic-gradient(color-mix(in srgb, var(--ink) 5%, var(--surface)) 0% 25%, var(--surface) 0% 50%) 50% / 16px 16px; overflow: hidden; }
.oclo__img img { width: 100%; height: 100%; object-fit: contain; padding: 6px; }
.oclo__img i { font-size: 30px; color: var(--ink-faint); }
.oclo__name { font-size: 11px; font-weight: 600; color: var(--ink); padding: 5px 7px 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.oclo__add { position: absolute; top: 5px; right: 5px; width: 22px; height: 22px; border: none; border-radius: 6px; background: var(--accent); color: #fff; cursor: pointer; font-size: 13px; line-height: 1; display: grid; place-items: center; opacity: 0; transition: opacity .12s; }
.oclo:hover .oclo__add { opacity: 1; }
.oclo__add.is-on { opacity: 1; background: color-mix(in srgb, var(--ink) 45%, var(--surface)); }
/* barra: control de zoom del lienzo */
.outfittool__zoom { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.outfittool__zbtn { width: 28px; height: 28px; border: 1px solid var(--line); border-radius: 7px; background: var(--bg); color: var(--ink-soft); cursor: pointer; font-size: 15px; line-height: 1; display: grid; place-items: center; }
.outfittool__zbtn:hover { border-color: var(--accent); color: var(--accent); }
.outfittool__zlabel { min-width: 42px; text-align: center; font-size: 12px; font-weight: 600; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
/* centro: lienzo (capa de prendas con zoom + paneo) */
.outfittool__canvas { flex: 1; position: relative; overflow: hidden; background: repeating-conic-gradient(color-mix(in srgb, var(--ink) 4%, var(--surface)) 0% 25%, var(--surface) 0% 50%) 50% / 26px 26px; cursor: grab; }
.outfittool__canvas:active { cursor: grabbing; }
.ocanv-items { position: absolute; inset: 0; z-index: 1; transform-origin: center; will-change: transform; }
.ocanv-empty { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; text-align: center; padding: 28px; color: var(--ink-faint); }
.ocanv-empty i { font-size: 44px; }
.ocanv-empty p { max-width: 320px; font-size: 13px; line-height: 1.5; }
.ocanv-item { position: absolute; touch-action: none; cursor: grab; user-select: none; }
.ocanv-item img { width: 100%; height: auto; display: block; pointer-events: none; filter: drop-shadow(0 6px 10px rgba(0,0,0,.18)); }
.ocanv-item img.is-flip { transform: scaleX(-1); }
.ocanv-item.is-selected { outline: 2px dashed var(--accent); outline-offset: 4px; }
/* menú al agregar al lienzo (Agregar / Duplicado / Espejo) */
.oadd-menu { position: fixed; z-index: 1200; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 10px 28px rgba(0,0,0,.2); padding: 4px; display: flex; flex-direction: column; min-width: 180px; }
.oadd-menu button { display: flex; align-items: center; gap: 9px; border: none; background: none; color: var(--ink); font: inherit; font-size: 13px; padding: 9px 11px; border-radius: 7px; cursor: pointer; text-align: left; }
.oadd-menu button:hover { background: color-mix(in srgb, var(--accent) 12%, transparent); color: var(--accent); }
.oadd-menu button i { font-size: 17px; color: var(--ink-soft); }
.oadd-menu button:hover i { color: var(--accent); }
.ocanv-item__rm, .ocanv-item__h { position: absolute; opacity: 0; transition: opacity .12s; }
.ocanv-item.is-selected .ocanv-item__rm, .ocanv-item.is-selected .ocanv-item__h, .ocanv-item:hover .ocanv-item__rm, .ocanv-item:hover .ocanv-item__h { opacity: 1; }
.ocanv-item__rm { top: -10px; right: -10px; width: 24px; height: 24px; border: none; border-radius: 50%; background: #e5484d; color: #fff; cursor: pointer; font-size: 12px; line-height: 1; box-shadow: 0 2px 6px rgba(0,0,0,.3); }
.ocanv-item__h { width: 18px; height: 18px; border-radius: 50%; background: var(--accent); border: 2px solid #fff; box-shadow: 0 2px 6px rgba(0,0,0,.3); }
.ocanv-item__h--scale { bottom: -8px; right: -8px; cursor: nwse-resize; }
.ocanv-item__h--rot { top: -22px; left: 50%; margin-left: -9px; cursor: grab; background: #fff; border-color: var(--accent); }
.ocanv-item__h--rot::after { content: ''; position: absolute; left: 50%; top: 100%; width: 2px; height: 12px; background: var(--accent); transform: translateX(-50%); }
/* derecha: historial de outfits */
.outfittool__right { width: 300px; }
.outfittool__panel { flex: 1; min-height: 0; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 12px; }
.ohist-list { display: flex; flex-direction: column; gap: 12px; }
.ohist { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--bg); cursor: pointer; transition: border-color .12s, box-shadow .12s; }
.ohist:hover { border-color: var(--accent); }
.ohist.is-loaded { border-color: var(--accent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 28%, transparent); }
.ohist-prev { position: relative; height: 130px; overflow: hidden; background: repeating-conic-gradient(color-mix(in srgb, var(--ink) 4%, var(--surface)) 0% 25%, var(--surface) 0% 50%) 50% / 18px 18px; }
.ohist-it { position: absolute; height: auto; pointer-events: none; }
.ohist-foot { display: flex; align-items: center; gap: 6px; padding: 7px 10px; border-top: 1px solid var(--line); }
.ohist-name { flex: 1; font-size: 13px; font-weight: 600; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ohist-del { border: none; background: none; color: var(--ink-faint); cursor: pointer; font-size: 13px; line-height: 1; padding: 2px 4px; }
.ohist-del:hover { color: #e5484d; }
.outfittool__btn { border: 1px solid var(--line); background: var(--bg); color: var(--ink-soft); border-radius: 8px; padding: 9px 12px; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.outfittool__btn[disabled] { opacity: .5; cursor: default; }
.outfittool__btn:hover { border-color: var(--accent); color: var(--accent); }
.outfittool__btn--accent { background: var(--accent); border-color: var(--accent); color: #fff; }
.outfittool__btn--accent:hover { filter: brightness(1.06); color: #fff; }
.outfittool__btn--danger { color: #e5484d; }
.outfittool__btn--danger:hover { border-color: #e5484d; color: #e5484d; }
/* zona de imagen + quita-fondo (formulario de alta) */
.outfit-img { border: 1px solid var(--line); border-radius: 10px; background: var(--bg); padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.outfit-img__drop { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; min-height: 150px; border: 1.5px dashed var(--line); border-radius: 9px; background: var(--surface); color: var(--ink-faint); cursor: pointer; font: inherit; font-size: 13px; }
.outfit-img__drop i { font-size: 34px; }
.outfit-img__drop:hover { border-color: var(--accent); color: var(--accent); }
.outfit-img__bg { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--ink-soft); cursor: pointer; }
.outfit-img__bg input { width: 15px; height: 15px; accent-color: var(--accent); }
.outfit-img__bg small { color: var(--ink-faint); }
.outfit-img__busy { display: flex; align-items: center; gap: 10px; min-height: 150px; justify-content: center; color: var(--ink-soft); font-size: 13.5px; }
.outfit-img__busy small { color: var(--ink-faint); }
.outfit-img__spin { width: 18px; height: 18px; border: 2px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: outfitspin .7s linear infinite; }
@keyframes outfitspin { to { transform: rotate(360deg); } }
.outfit-img__has { display: flex; gap: 14px; align-items: flex-start; }
.outfit-img__prev { width: 150px; height: 150px; flex-shrink: 0; border-radius: 9px; border: 1px solid var(--line); background: repeating-conic-gradient(color-mix(in srgb, var(--ink) 5%, var(--surface)) 0% 25%, var(--surface) 0% 50%) 50% / 20px 20px; display: grid; place-items: center; overflow: hidden; }
.outfit-img__prev img { width: 100%; height: 100%; object-fit: contain; padding: 6px; }
.outfit-img__acts { display: flex; flex-direction: column; gap: 8px; }
.outfit-img__acts button { border: 1px solid var(--line); background: var(--surface); color: var(--ink-soft); border-radius: 8px; padding: 7px 14px; cursor: pointer; font: inherit; font-size: 13px; }
.outfit-img__acts button:hover { border-color: var(--accent); color: var(--accent); }
/* recortador rectangular */
.ocrop { display: flex; flex-direction: column; gap: 10px; }
.ocrop__stage { position: relative; align-self: center; display: inline-block; max-width: 100%; line-height: 0; touch-action: none; }
.ocrop__img { display: block; max-width: 100%; max-height: 300px; width: auto; height: auto; user-select: none; border-radius: 6px; }
.ocrop__box { position: absolute; box-sizing: border-box; border: 1.5px solid #fff; box-shadow: 0 0 0 9999px rgba(0,0,0,.45); cursor: move; touch-action: none; }
.ocrop__box i { position: absolute; width: 14px; height: 14px; background: #fff; border: 1.5px solid var(--accent); border-radius: 50%; box-sizing: border-box; touch-action: none; }
.ocrop__box i[data-h="nw"] { left: -7px; top: -7px; cursor: nwse-resize; }
.ocrop__box i[data-h="ne"] { right: -7px; top: -7px; cursor: nesw-resize; }
.ocrop__box i[data-h="sw"] { left: -7px; bottom: -7px; cursor: nesw-resize; }
.ocrop__box i[data-h="se"] { right: -7px; bottom: -7px; cursor: nwse-resize; }
.ocrop__acts { display: flex; gap: 8px; flex-wrap: wrap; }
.ocrop__acts .outfittool__btn { flex: 1; min-width: 84px; }
/* galería de imágenes de la prenda (varias por item) */
.outfit-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 10px; }
.ogal-item { border: 1px solid var(--line); border-radius: 9px; overflow: hidden; background: var(--surface); }
.ogal-thumb { aspect-ratio: 1; display: grid; place-items: center; background: repeating-conic-gradient(color-mix(in srgb, var(--ink) 5%, var(--surface)) 0% 25%, var(--surface) 0% 50%) 50% / 16px 16px; overflow: hidden; }
.ogal-thumb img { width: 100%; height: 100%; object-fit: contain; padding: 6px; }
.ogal-acts { display: flex; border-top: 1px solid var(--line); }
.ogal-acts button { flex: 1; border: none; background: var(--surface); color: var(--ink-soft); cursor: pointer; padding: 6px 0; font-size: 14px; }
.ogal-acts button + button { border-left: 1px solid var(--line); }
.ogal-acts button:hover { background: color-mix(in srgb, var(--accent) 12%, transparent); color: var(--accent); }
.ogal-add { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; aspect-ratio: 1; border: 1.5px dashed var(--line); border-radius: 9px; background: var(--surface); color: var(--ink-faint); cursor: pointer; font: inherit; font-size: 12px; }
.ogal-add i { font-size: 24px; }
.ogal-add:hover { border-color: var(--accent); color: var(--accent); }
.oclo__multi { position: absolute; left: 5px; top: 5px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 9px; background: rgba(14,17,22,.78); color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center; }
/* goma de borrar (limpiar residuos a mano) */
.oeraser { display: flex; flex-direction: column; gap: 10px; }
.oeraser__stage { width: 100%; height: 340px; overflow: auto; line-height: 0; background: repeating-conic-gradient(color-mix(in srgb, var(--ink) 6%, var(--surface)) 0% 25%, var(--surface) 0% 50%) 50% / 18px 18px; border: 1px solid var(--line); border-radius: 6px; }
.oeraser__stage canvas { display: block; max-width: 100%; max-height: 100%; width: auto; height: auto; touch-action: none; cursor: crosshair; }
.oeraser__ctl { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.oeraser__brush { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--ink-soft); flex: 1; }
.oeraser__brush input { flex: 1; accent-color: var(--accent); }
@media (max-width: 820px) { .outfittool { flex-direction: column; height: auto; } .outfittool__main { min-height: 360px; } }

/* ===== Gráficos ===== */
.chtool { display: flex; height: calc(100vh - 168px); min-height: 460px; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--surface); }
.chtool__main { flex: 1; min-width: 0; display: flex; flex-direction: column; overflow: hidden; }
.chtool__empty { padding: 32px 20px; color: var(--ink-faint); font-size: 14px; }
.chtool__board { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.chtool__bar { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.chtool__bar .mxtool__name { flex: 1; min-width: 160px; }
.chtool__canvas-wrap { height: 320px; padding: 14px 16px; flex-shrink: 0; }
.chtool__editor { flex: 1; overflow: auto; border-top: 1px solid var(--line); padding: 12px 16px; }
.chtool__editscroll { overflow-x: auto; }
.ch-edit { border-collapse: collapse; }
.ch-edit th, .ch-edit td { padding: 3px 4px; }
.ch-edit th { text-align: left; }
.ch-lab, .ch-val, .ch-sname { border: 1px solid var(--line); border-radius: 7px; background: var(--bg); color: var(--ink); font-size: 12.5px; padding: 6px 8px; }
.ch-lab { width: 130px; }
.ch-val { width: 84px; }
.ch-sname { width: 110px; }
.ch-lab:focus, .ch-val:focus, .ch-sname:focus { outline: none; border-color: var(--accent); }
.ch-x { border: none; background: none; color: var(--ink-faint); cursor: pointer; font-size: 15px; line-height: 1; padding: 0 4px; }
.ch-x:hover { color: #e5484d; }
.ch-add, .ch-addrow { border: 1px dashed var(--line); background: none; color: var(--ink-soft); border-radius: 7px; padding: 4px 9px; font-size: 12px; font-weight: 600; cursor: pointer; }
.ch-add:hover, .ch-addrow:hover { border-color: var(--accent); color: var(--accent); }
.ch-addrow { margin-top: 8px; }

/* ===== Gastos ===== */
.exptool { display: flex; height: calc(100vh - 168px); min-height: 460px; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--surface); }
.exptool__main { flex: 1; min-width: 0; display: flex; flex-direction: column; overflow: hidden; }
.exptool__bar { padding: 12px 16px; border-bottom: 1px solid var(--line); }
.exptool__total { font-size: 15px; color: var(--ink-soft); }
.exptool__total b { font-size: 20px; color: var(--ink); font-weight: 800; }
.exptool__total span { font-size: 12.5px; color: var(--ink-faint); }
.exptool__add { display: flex; gap: 8px; padding: 12px 16px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.exptool__in { border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--ink); font-size: 13px; padding: 8px 10px; }
.exptool__in:focus { outline: none; border-color: var(--accent); }
.exptool__in--name { flex: 1; min-width: 160px; }
.exptool__in--amount { width: 120px; }
.exptool__in--date { width: 150px; }
.exptool__unified-note { padding: 12px 16px; margin: 0; color: var(--ink-faint); font-size: 12.5px; border-bottom: 1px solid var(--line); }
.exptool__filters { width: 250px; }
.exptool__period { border-top: 1px solid var(--line); padding: 10px 12px; display: flex; flex-direction: column; gap: 7px; }
.exptool__filters .exptool__period { border-top: none; padding-top: 14px; }
.exptool__period-total { margin-top: auto; border-top: 1px solid var(--line); padding: 14px 14px 16px; display: flex; flex-direction: column; gap: 3px; background: color-mix(in srgb, var(--accent) 5%, transparent); }
.exptool__period-total:empty { display: none; }
.exptool__pt-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .4px; color: var(--ink-faint); }
.exptool__pt-amount { font-size: 24px; font-weight: 800; color: var(--ink); line-height: 1.1; }
.exptool__pt-sub { font-size: 12px; color: var(--ink-soft); }
.exptool__pt-range { font-size: 12px; color: var(--accent); font-weight: 600; }
.exptool__period-head { display: flex; align-items: center; justify-content: space-between; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .4px; color: var(--ink-faint); }
.exptool__period-clear { border: none; background: none; color: var(--accent); cursor: pointer; font-size: 11px; font-weight: 700; padding: 0; }
.exptool__period-clear[hidden] { display: none; }
.exptool__period-field { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 12px; color: var(--ink-soft); }
.exptool__period-field input { border: 1px solid var(--line); border-radius: 7px; background: var(--bg); color: var(--ink); font-size: 12px; padding: 5px 7px; }
.exptool__period-field input:focus { outline: none; border-color: var(--accent); }
.exptool__list { flex: 1; overflow-y: auto; padding: 8px 12px; }
/* boleta / recibo en el modal */
.exptool__receipt-add { display: inline-flex; align-items: center; gap: 8px; border: 1.5px dashed var(--line); border-radius: 8px; background: var(--bg); color: var(--ink-soft); padding: 10px 14px; cursor: pointer; font: inherit; font-size: 13px; }
.exptool__receipt-add:hover { border-color: var(--accent); color: var(--accent); }
.exptool__receipt-add i { font-size: 18px; }
.exptool__receipt-has { display: flex; gap: 12px; align-items: flex-start; }
.exptool__receipt-has img { width: 100px; height: 100px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); cursor: zoom-in; background: #0e1116; }
.exptool__receipt-acts { display: flex; flex-direction: column; gap: 6px; }
.exptool__receipt-acts button { border: 1px solid var(--line); background: var(--bg); color: var(--ink-soft); border-radius: 7px; padding: 5px 12px; cursor: pointer; font: inherit; font-size: 12px; }
.exptool__receipt-acts button:hover { border-color: var(--accent); color: var(--accent); }
.exptool__receipt-loading { color: var(--ink-faint); font-size: 13px; padding: 8px 0; }
/* indicadores en la fila */
.exprow__tag { border: none; background: none; padding: 0 1px; font-size: 13px; line-height: 1; }
.exprow__tag--receipt { cursor: zoom-in; }
/* visor a pantalla completa de la boleta */
.exptool__lb { position: fixed; inset: 0; z-index: 1000; background: rgba(0,0,0,.82); display: flex; align-items: center; justify-content: center; padding: 30px; cursor: zoom-out; }
.exptool__lb img { max-width: 92vw; max-height: 88vh; object-fit: contain; border-radius: 8px; }
.exptool__lb-x { position: absolute; top: 16px; right: 20px; width: 38px; height: 38px; border: none; border-radius: 50%; background: rgba(255,255,255,.18); color: #fff; font-size: 18px; cursor: pointer; }
.exptool__empty { color: var(--ink-faint); font-size: 13px; padding: 16px; }
.exprow { display: flex; align-items: center; gap: 12px; padding: 10px 10px; border-bottom: 1px solid var(--line); cursor: pointer; }
.exprow:hover { background: color-mix(in srgb, var(--ink) 4%, transparent); }
.exprow__name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13.5px; font-weight: 600; color: var(--ink); }
.exprow__coll { font-size: 11px; color: var(--ink-soft); background: color-mix(in srgb, var(--ink) 8%, transparent); border-radius: 20px; padding: 2px 9px; white-space: nowrap; }
.exprow__date { font-size: 12px; color: var(--ink-faint); white-space: nowrap; min-width: 96px; text-align: right; }
.exprow__amount { font-size: 14px; font-weight: 700; color: var(--ink); white-space: nowrap; min-width: 92px; text-align: right; font-variant-numeric: tabular-nums; }
.exprow__del { border: none; background: none; color: var(--ink-faint); cursor: pointer; font-size: 17px; line-height: 1; padding: 0 4px; }
.exprow__del:hover { color: #e5484d; }

/* ===== Bóveda cifrada (Endpoints E2EE) ===== */
.vault { display: flex; align-items: flex-start; justify-content: center; padding: 40px 16px; }
.vault__loading, .vault__err { color: var(--ink-faint); font-size: 14px; }
.vault__err { color: #e5484d; }
.vault__card { width: min(420px, 100%); border: 1px solid var(--line); border-radius: 14px; background: var(--surface); padding: 26px 24px; text-align: center; box-shadow: 0 8px 30px rgba(0,0,0,.08); }
.vault__ico { font-size: 38px; }
.vault__title { margin: 10px 0 6px; font-size: 18px; font-weight: 800; color: var(--ink); }
.vault__msg { margin: 0 0 16px; font-size: 13px; line-height: 1.6; color: var(--ink-soft); }
.vault__in { width: 100%; box-sizing: border-box; border: 1px solid var(--line); border-radius: 9px; background: var(--bg); color: var(--ink); font-size: 14px; padding: 10px 12px; margin-bottom: 10px; }
.vault__in:focus { outline: none; border-color: var(--accent); }
.vault__btn { width: 100%; border: none; border-radius: 9px; background: var(--accent); color: #fff; font-size: 14px; font-weight: 700; padding: 11px; cursor: pointer; }
.vault__btn:hover { filter: brightness(1.06); }
.vault__check { display: flex; align-items: flex-start; gap: 8px; text-align: left; font-size: 12.5px; color: var(--ink-soft); margin: 2px 0 12px; }
.vault__err[hidden] { display: none; }
.vault__chip { font-size: 11px; font-weight: 700; color: #1a9f4a; background: color-mix(in srgb, #1a9f4a 14%, transparent); border-radius: 20px; padding: 2px 9px; margin-left: 4px; }
.vault__lockbtn { border: 1px solid var(--line); background: var(--surface); color: var(--ink-soft); border-radius: 7px; padding: 3px 9px; font-size: 11.5px; cursor: pointer; margin-left: 4px; }
.vault__lockbtn:hover { border-color: var(--accent); color: var(--accent); }

/* ===== Matriz ===== */
.mxtool { display: flex; height: calc(100vh - 168px); min-height: 460px; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--surface); }
.mxtool__main { flex: 1; min-width: 0; display: flex; flex-direction: column; overflow: hidden; }
.mxtool__board { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.mxtool__bar { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.mxtool__name { font-size: 15px; font-weight: 700; color: var(--ink); border: none; border-bottom: 1px solid var(--line); background: none; padding: 4px 2px; flex: 1; min-width: 160px; }
.mxtool__name:focus { outline: none; border-color: var(--accent); }
.mxtool__hint { font-size: 12px; color: var(--ink-faint); }
.mxtool__axis { display: flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .3px; color: var(--ink-faint); }
.mxtool__axis input { border: 1px solid var(--line); border-radius: 7px; background: var(--bg); color: var(--ink); font-size: 12px; font-weight: 400; text-transform: none; letter-spacing: 0; padding: 6px 8px; width: 160px; }
.mxtool__axis input:focus { outline: none; border-color: var(--accent); }
.mxtool__corner-col { font-size: 10.5px; font-weight: 700; color: var(--ink-soft); text-align: right; white-space: nowrap; }
.mxtool__corner-row { font-size: 10.5px; font-weight: 700; color: var(--ink-soft); white-space: nowrap; margin-top: 2px; }
.mxtool__scroll { flex: 1; overflow: auto; }
.mxtool__empty { padding: 32px 20px; color: var(--ink-faint); font-size: 14px; line-height: 1.6; max-width: 560px; }
.mxtool__table { border-collapse: separate; border-spacing: 0; }
.mxtool__table th, .mxtool__table td { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.mxtool__corner { position: sticky; left: 0; top: 0; z-index: 4; background: var(--surface); min-width: 150px; max-width: 220px; padding: 8px 10px; font-size: 11px; font-weight: 700; color: var(--ink-faint); text-align: left; }
.mxtool__colh { position: sticky; top: 0; z-index: 2; background: color-mix(in srgb, var(--surface) 92%, var(--ink) 4%); min-width: 160px; max-width: 220px; padding: 8px 10px; vertical-align: bottom; }
.mxtool__rowh { position: sticky; left: 0; z-index: 1; background: color-mix(in srgb, var(--surface) 92%, var(--ink) 4%); min-width: 150px; max-width: 220px; padding: 8px 10px; text-align: left; vertical-align: top; }
.mxtool__colh, .mxtool__rowh { font-size: 12px; font-weight: 700; color: var(--ink); white-space: nowrap; }
.mxtool__colh > span, .mxtool__rowh > span { display: inline-block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 160px; vertical-align: middle; }
.mxtool__rowh { white-space: nowrap; }
.mxtool__colh.is-cross, .mxtool__rowh.is-cross { background: color-mix(in srgb, var(--accent) 26%, var(--surface)); color: var(--ink); }
.mxtool__elmenu { border: none; background: none; color: var(--ink-faint); cursor: pointer; font-weight: 700; font-size: 14px; padding: 0 2px; line-height: 1; margin-left: 4px; }
.mxtool__elmenu:hover { color: var(--accent); }
.mxtool__cell { min-width: 160px; max-width: 220px; height: 66px; padding: 6px 8px; cursor: pointer; vertical-align: top; }
.mxtool__cell:hover { background: color-mix(in srgb, var(--accent) 9%, transparent); }
.mxtool__cell.is-filled { background: color-mix(in srgb, var(--accent) 7%, transparent); }
.mxtool__cell.is-diag { background: color-mix(in srgb, var(--ink) 5%, transparent); }
.mxtool__cell-txt { font-size: 11.5px; line-height: 1.4; color: var(--ink); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }
/* modal de detalle de celda con cuaderno embebido (mismo motor que Cuaderno/Tareas) */
.mxtool__cellcard { width: min(980px, 96vw); }
.mxtool__cell-arrow { color: var(--accent); margin: 0 4px; }

/* ===== layout común de dos paneles ===== */
.eptool, .wbtool {
  display: flex; gap: 0;
  height: calc(100vh - 168px); min-height: 460px;
  border: 1px solid var(--line); border-radius: 14px; overflow: hidden;
  background: var(--surface);
}
/* En la vista de herramienta, el contenedor LLENA el alto disponible (sin el hueco del calc fijo). */
.tool-run { height: 100%; }
.tool-run > #toolHost { height: 100%; display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
.tool-run > #toolHost > .tool-desc { flex: none; }
.tool-run > #toolHost > .wbtool,
.tool-run > #toolHost > .eptool,
.tool-run > #toolHost > .caltool,
.tool-run > #toolHost > .kbtool,
.tool-run > #toolHost > .exptool,
.tool-run > #toolHost > .dctool,
.tool-run > #toolHost > .gentetool,
.tool-run > #toolHost > .outfittool,
.tool-run > #toolHost > .imgtool,
.tool-run > #toolHost > .mxtool { flex: 1 1 auto; height: auto; min-height: 0; }
.eptool__side, .wbtool__side {
  width: 270px; flex-shrink: 0; display: flex; flex-direction: column;
  border-right: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 92%, var(--ink) 4%);
  overflow: hidden;
  transition: width .4s cubic-bezier(.33, 0, .2, 1), opacity .28s ease;
}
/* barra lateral DERECHA genérica (mismo comportamiento que la izquierda; colapso vía side-tabs.js) */
.wbtool__side--right {
  width: 270px; flex-shrink: 0; display: flex; flex-direction: column;
  border-left: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 92%, var(--ink) 4%);
  overflow: hidden;
  transition: width .4s cubic-bezier(.33, 0, .2, 1), opacity .28s ease;
}
.is-detail-collapsed > .wbtool__side--right { width: 14px; pointer-events: none; }
.is-detail-collapsed > .wbtool__side--right > * { opacity: 0; transition: opacity .16s ease; }
.eptool__side-head, .wbtool__side-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 14px; font-weight: 700; font-size: 13px; color: var(--ink);
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.eptool__tree, .wbtool__tree { flex: 1; overflow-y: auto; padding: 8px; }
.eptool__main, .wbtool__main { flex: 1; min-width: 0; display: flex; flex-direction: column; overflow: hidden; }

.eptool__icon-btn, .wbtool__icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; border-radius: 7px; cursor: pointer;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink-soft); font-size: 15px;
}
.eptool__icon-btn:hover, .wbtool__icon-btn:hover { border-color: var(--accent); color: var(--accent); }
.eptool__icon-btn--sm, .wbtool__icon-btn--sm { width: 20px; height: 20px; border: none; font-size: 13px; }

.eptool__tree-empty, .wbtool__tree-empty { color: var(--ink-faint); font-size: 12.5px; padding: 10px 8px; }
.eptool__tree-empty--sub, .wbtool__tree-empty--sub { padding: 6px 8px 6px 26px; }

/* ===== árbol: colecciones ===== */
.eptool__ws-row, .wbtool__ws-row { display: flex; align-items: center; gap: 4px; padding: 3px 4px; border-radius: 8px; }
.eptool__ws-row:hover, .wbtool__ws-row:hover { background: color-mix(in srgb, var(--ink) 6%, transparent); }
.eptool__ws-toggle, .wbtool__ws-toggle {
  flex: 1; min-width: 0; display: flex; align-items: center; gap: 6px;
  background: none; border: none; cursor: pointer; color: var(--ink); font-weight: 600; font-size: 13px; text-align: left;
}
.eptool__ws-name, .wbtool__ws-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.eptool__caret, .wbtool__caret { font-size: 10px; color: var(--ink-faint); transition: transform .15s; }
.eptool__ws.is-expanded .eptool__caret, .wbtool__ws.is-expanded .wbtool__caret { transform: rotate(90deg); }
.eptool__count, .wbtool__count { font-size: 11px; color: var(--ink-faint); padding: 0 4px; }
.eptool__ws-eps, .wbtool__ws-notes { display: none; padding-left: 6px; }
.eptool__ws.is-expanded .eptool__ws-eps, .wbtool__ws.is-expanded .wbtool__ws-notes { display: block; }

.eptool__menu, .wbtool__menu { cursor: pointer; color: var(--ink-faint); padding: 0 4px; border-radius: 5px; font-weight: 700; }
.eptool__menu:hover, .wbtool__menu:hover { color: var(--ink); background: color-mix(in srgb, var(--ink) 10%, transparent); }
.wbtool__menu[data-setup-del]:hover, .wbtool__menu[data-example-del]:hover { color: #e5484d; background: color-mix(in srgb, #e5484d 12%, transparent); }

/* endpoints / notas en el árbol */
.eptool__ep, .wbtool__note {
  display: flex; align-items: center; gap: 7px; padding: 5px 6px; border-radius: 8px; cursor: pointer; margin: 1px 0;
}
.eptool__ep:hover, .wbtool__note:hover { background: color-mix(in srgb, var(--ink) 7%, transparent); }
.eptool__ep.is-active, .wbtool__note.is-active { background: color-mix(in srgb, var(--accent) 16%, transparent); }
.eptool__ep-name, .wbtool__note-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12.5px; color: var(--ink); }
.wbtool__note-ico { color: var(--ink-faint); font-size: 13px; }

.eptool__badge {
  font-size: 9.5px; font-weight: 800; padding: 2px 6px; border-radius: 5px; letter-spacing: .3px;
  background: color-mix(in srgb, var(--ink) 12%, transparent); color: var(--ink-soft);
}
.eptool__badge.m-GET { color: #1a7f37; background: #e7f5ec; }
.eptool__badge.m-POST { color: #9a6700; background: #fff4d6; }
.eptool__badge.m-PUT { color: #0a5dc2; background: #e6f0ff; }
.eptool__badge.m-PATCH { color: #6f42c1; background: #f1e9ff; }
.eptool__badge.m-DELETE { color: #b3261e; background: #fdeceb; }

/* ===== panel principal ===== */
.eptool__empty, .wbtool__empty {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; text-align: center; padding: 24px;
}
.eptool__empty p, .wbtool__empty p { font-weight: 700; color: var(--ink); margin: 0; }
.eptool__empty span, .wbtool__empty span { color: var(--ink-faint); font-size: 13px; }

/* ===== editor de endpoints ===== */
.eptool__editor { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.eptool__row--name { display: flex; gap: 8px; align-items: center; }
.eptool__name {
  flex: 1; font-size: 16px; font-weight: 700; color: var(--ink);
  border: none; border-bottom: 1px solid var(--line); background: none; padding: 4px 2px;
}
.eptool__name:focus { outline: none; border-color: var(--accent); }
.eptool__desc {
  width: 100%; resize: vertical; min-height: 34px; font-size: 12.5px; color: var(--ink-soft);
  border: 1px solid var(--line); border-radius: 8px; background: var(--bg); padding: 8px 10px; font-family: inherit;
}
.eptool__req { display: flex; gap: 8px; }
.eptool__method, .eptool__url, .eptool__send {
  border: 1px solid var(--line); border-radius: 8px; font-size: 13px; padding: 9px 11px; background: var(--bg); color: var(--ink);
}
.eptool__method { font-weight: 700; cursor: pointer; }
.eptool__url { flex: 1; font-family: Consolas, monospace; }
.eptool__send { background: var(--accent); color: #fff; border-color: var(--accent); font-weight: 700; cursor: pointer; }
.eptool__send:hover { filter: brightness(1.06); }
.eptool__proxy { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 12px; color: var(--ink-soft); }
.eptool__status { color: var(--ink-faint); }

.eptool__tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); }
.eptool__tab {
  background: none; border: none; border-bottom: 2px solid transparent; cursor: pointer;
  padding: 7px 12px; font-size: 13px; font-weight: 600; color: var(--ink-faint);
}
.eptool__tab.is-active { color: var(--ink); border-bottom-color: var(--accent); }
.eptool__pane { padding-top: 6px; }
.eptool__bodytypes { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12.5px; color: var(--ink-soft); margin-bottom: 8px; }
.eptool__muted { color: var(--ink-faint); font-size: 12.5px; }
.eptool__body { width: 100%; min-height: 130px; resize: vertical; font-family: Consolas, monospace; font-size: 12.5px;
  border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--ink); padding: 10px; }

.eptool__kv { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; }
.eptool__kv-key, .eptool__kv-val {
  flex: 1; border: 1px solid var(--line); border-radius: 7px; padding: 6px 8px; font-size: 12.5px; background: var(--bg); color: var(--ink);
}
.eptool__kv-del { border: none; background: none; cursor: pointer; color: var(--ink-faint); font-size: 16px; padding: 0 6px; }
.eptool__kv-del:hover { color: #e5484d; }

.eptool__ghost {
  align-self: flex-start; border: 1px solid var(--line); background: var(--surface); color: var(--ink-soft);
  border-radius: 8px; padding: 6px 10px; font-size: 12.5px; cursor: pointer;
}
.eptool__ghost:hover { border-color: var(--accent); color: var(--accent); }
.eptool__ghost--sm { padding: 4px 8px; font-size: 12px; }

.eptool__resp { margin-top: 4px; }
.eptool__resp-head { display: flex; align-items: center; justify-content: space-between; font-size: 12px; font-weight: 700; color: var(--ink-soft); margin-bottom: 5px; }
.eptool__resp-actions { display: flex; align-items: center; gap: 10px; }
.eptool__resp-meta { font-size: 12px; font-weight: 600; }
.eptool__resp-meta .ok { color: #1a7f37; } .eptool__resp-meta .err { color: #e5484d; }
.eptool__resp-body {
  margin: 0; max-height: 320px; overflow: auto; background: #0d1117; color: #e6edf3;
  border-radius: 8px; padding: 12px; font-size: 12px; white-space: pre-wrap; word-break: break-word;
}

/* ===== pizarrón ===== */
.wbtool__board { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.wbtool__board-head { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.wbtool__note-name { font-size: 15px; font-weight: 700; color: var(--ink); border: none; background: none; padding: 4px 2px; flex-shrink: 0; }
.wbtool__note-name:focus { outline: none; }
.wbtool__hint { font-size: 11.5px; color: var(--ink-faint); }
.wbtool__download { margin-left: auto; white-space: nowrap; }
/* ===== editor de notas por bloques (Editor.js, reusa el shell .wbtool) ===== */
.notetool__editor { flex: 1; display: flex; flex-direction: column; gap: 10px; padding: 16px 18px; min-height: 0; }
.notetool__title {
  font-size: 20px; font-weight: 700; color: var(--ink);
  border: none; border-bottom: 1px solid var(--line); background: none; padding: 6px 2px;
}
.notetool__title:focus { outline: none; border-color: var(--accent); }
.notetool__blocks {
  flex: 1; overflow: auto; color: var(--ink);
  border: 1px solid var(--line); border-radius: 10px; background: var(--bg); padding: 10px 14px;
}
.notetool__loading, .kbmodal .notetool__loading { color: var(--ink-faint); font-size: 13px; padding: 18px; }

/* Cuerpo por bloques (Editor.js) dentro del modal del Kanban */
.kbmodal__bodydoc { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); height: 62vh; min-height: 360px; overflow: hidden; color: var(--ink); }
.nbk--embed { flex: 1; min-height: 0; }

/* ===== RHBlocks — editor de bloques en filas (cuerpo de tareas) ===== */
.rhb { display: flex; flex-direction: column; }
.rhb-rows { display: flex; flex-direction: column; gap: 2px; }
.rhb-empty { color: var(--ink-faint); font-size: 13px; padding: 14px 6px; }
.rhb-row { display: flex; align-items: flex-start; gap: 6px; border-radius: 8px; padding: 2px 2px 2px 0; position: relative; }
.rhb-row:hover { background: color-mix(in srgb, var(--ink) 4%, transparent); }
.rhb-handle { flex: none; cursor: grab; color: var(--ink-faint); padding: 6px 2px; opacity: 0; transition: opacity .12s; user-select: none; font-size: 15px; }
.rhb-row:hover .rhb-handle { opacity: 1; }
.rhb-handle:active { cursor: grabbing; }
.rhb-content { flex: 1; min-width: 0; padding: 4px 2px; }
.rhb-row-del { flex: none; border: none; background: none; color: var(--ink-faint); cursor: pointer; font-size: 12px; padding: 6px 4px; opacity: 0; transition: opacity .12s; }
.rhb-row:hover .rhb-row-del { opacity: 1; }
.rhb-row-del:hover { color: #e5484d; }
.rhb-row.is-dragging { opacity: .4; }
.rhb-row.is-drop-before::before, .rhb-row.is-drop-after::after { content: ''; position: absolute; left: 24px; right: 24px; height: 2px; background: var(--accent); border-radius: 2px; }
.rhb-row.is-drop-before::before { top: -1px; }
.rhb-row.is-drop-after::after { bottom: -1px; }
.rhb-add { align-self: flex-start; margin-top: 8px; display: inline-flex; align-items: center; gap: 6px; border: 1px dashed var(--line); background: none; color: var(--ink-soft); border-radius: 8px; padding: 7px 12px; font-size: 13px; font-weight: 600; cursor: pointer; font-family: inherit; }
.rhb-add:hover { border-color: var(--accent); color: var(--accent); }
.rhb [contenteditable] { outline: none; }
.rhb [contenteditable][data-ph]:empty::before { content: attr(data-ph); color: var(--ink-faint); }
.rhb-text { font-size: 14px; line-height: 1.55; color: var(--ink); }
.rhb-title { font-size: 21px; font-weight: 800; line-height: 1.2; color: var(--ink); }
.rhb-subtitle { font-size: 16px; font-weight: 700; line-height: 1.3; color: var(--ink); }
.rhb-divider { border: none; border-top: 1px solid var(--line); margin: 8px 0; }
.rhb-checklist { display: flex; flex-direction: column; gap: 4px; }
.rhb-check { display: flex; align-items: flex-start; gap: 8px; }
.rhb-check input { margin-top: 3px; width: 16px; height: 16px; accent-color: var(--accent); cursor: pointer; flex: none; }
.rhb-check-tx { flex: 1; min-width: 0; font-size: 14px; line-height: 1.5; color: var(--ink); outline: none; }
.rhb-check.is-done .rhb-check-tx { text-decoration: line-through; color: var(--ink-faint); }
.rhb-check-x { border: none; background: none; color: var(--ink-faint); cursor: pointer; font-size: 11px; opacity: 0; align-self: center; }
.rhb-check:hover .rhb-check-x { opacity: 1; }
.rhb-check-x:hover { color: #e5484d; }
.rhb-check-add { align-self: flex-start; border: none; background: none; color: var(--accent); cursor: pointer; font-size: 12.5px; font-weight: 600; padding: 2px 0; display: inline-flex; align-items: center; gap: 4px; }
.rhb-image { position: relative; }
.rhb-image img { max-width: 100%; border-radius: 8px; display: block; cursor: zoom-in; }
.rhb-image-x { position: absolute; top: 6px; right: 6px; border: none; background: rgba(0,0,0,.55); color: #fff; border-radius: 6px; width: 24px; height: 24px; cursor: pointer; }
.rhb-image-drop { display: inline-flex; align-items: center; gap: 7px; border: 1px dashed var(--line); background: var(--bg); color: var(--ink-soft); border-radius: 8px; padding: 16px 18px; cursor: pointer; font-size: 13px; font-family: inherit; }
.rhb-image-drop:hover { border-color: var(--accent); color: var(--accent); }
.rhb-table-wrap { overflow-x: auto; }
.rhb-table { border-collapse: collapse; }
.rhb-table td { border: 1px solid var(--line); padding: 6px 8px; min-width: 60px; font-size: 13px; color: var(--ink); outline: none; vertical-align: top; }
.rhb-table td[contenteditable]:focus { box-shadow: inset 0 0 0 2px var(--accent); }
.rhb-table-act, .rhb-table-cols td { border: none; padding: 2px; text-align: center; }
.rhb-table-act button, .rhb-table-cols button { border: none; background: none; color: var(--ink-faint); cursor: pointer; font-size: 11px; opacity: 0; }
.rhb-table tr:hover .rhb-table-act button, .rhb-table:hover .rhb-table-cols button { opacity: .8; }
.rhb-table-act button:hover, .rhb-table-cols button:hover { color: #e5484d; }
.rhb-table-add { display: flex; gap: 8px; margin-top: 6px; }
.rhb-table-add button { border: 1px solid var(--line); background: none; color: var(--ink-soft); border-radius: 7px; padding: 4px 10px; font-size: 12px; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; }
.rhb-table-add button:hover { border-color: var(--accent); color: var(--accent); }
.rhb-picker { position: fixed; z-index: 80; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 12px 34px rgba(0,0,0,.25); padding: 6px; display: flex; flex-direction: column; min-width: 180px; }
.rhb-pick { display: flex; align-items: center; gap: 9px; border: none; background: none; color: var(--ink); cursor: pointer; padding: 8px 10px; border-radius: 7px; font-size: 13.5px; font-family: inherit; text-align: left; }
.rhb-pick:hover { background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent); }
.rhb-pick i { font-size: 17px; }

/* ===== Notas — cuaderno de hojas (nbk) ===== */
.nbk { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.nbk-bar { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.nbk-title { flex: 1; min-width: 160px; font-size: 18px; font-weight: 700; color: var(--ink); border: none; background: none; padding: 5px 2px; }
.nbk-title:focus { outline: none; }
.nbk-tools { display: flex; align-items: center; gap: 6px; }
.nbk-btn { display: inline-flex; align-items: center; gap: 5px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-soft); border-radius: 8px; padding: 6px 10px; font-size: 12.5px; font-weight: 600; cursor: pointer; font-family: inherit; }
.nbk-btn:hover { border-color: var(--accent); color: var(--accent); }
.nbk-btn.is-on { background: var(--accent); border-color: var(--accent); color: #fff; }
.nbk-bar-sep { width: 1px; align-self: stretch; background: var(--line); margin: 2px 2px; }
.nbk-color { width: 32px; height: 30px; border: 1px solid var(--line); border-radius: 8px; background: none; cursor: pointer; padding: 2px; }
.nbk-pages { flex: 1; min-height: 0; overflow: auto; padding: 26px 20px 20px; display: flex; flex-direction: column; align-items: center; gap: 26px; background: var(--bg); }
/* container-type: la hoja es un contenedor → el texto/trazo se miden en cqw (1% del ancho de la hoja)
   y así escalan junto con ella, manteniendo las proporciones al achicar/agrandar. */
.nbk-page { position: relative; width: min(820px, 100%); aspect-ratio: 1 / 1.414; background: #fff; border: 1px solid var(--line); border-radius: 4px; box-shadow: 0 4px 18px rgba(0,0,0,.12); flex: none; container-type: inline-size; }
.nbk-page--landscape { width: min(1160px, 100%); aspect-ratio: 1.414 / 1; }
.nbk-page__num { position: absolute; top: -18px; left: 2px; font-size: 11px; color: var(--ink-faint); display: inline-flex; align-items: center; gap: 6px; }
.nbk-page__del { border: none; background: none; color: var(--ink-faint); cursor: pointer; font-size: 11px; padding: 0 2px; border-radius: 4px; }
.nbk-page__del:hover { color: #e5484d; background: color-mix(in srgb, #e5484d 12%, transparent); }
.nbk-blocks { position: absolute; inset: 0; z-index: 2; }
.nbk-draw { position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 5; pointer-events: none; }
.nbk-page.is-pen .nbk-draw { pointer-events: auto; cursor: crosshair; }
/* Trazos: capa "hit" ancha clickeable con el lápiz apagado; resalte del seleccionado; botón borrar. */
.nbk-stroke { pointer-events: none; stroke-width: 0.25cqw; }   /* grosor relativo a la hoja → escala con ella */
.nbk-stroke--marker { stroke-width: 2.6cqw; stroke-opacity: 0.4; stroke-linecap: round; }   /* subrayador: grueso y translúcido, va por encima de los bloques */
.nbk-page:not(.is-pen) .nbk-stroke-hit { pointer-events: stroke; cursor: move; }
.nbk-page.is-pen .nbk-stroke-hit { pointer-events: none; }
.nbk-stroke.is-sel { filter: drop-shadow(0 0 2.5px #2b7fff) drop-shadow(0 0 1px #2b7fff); }
.nbk-stroke-chip { position: absolute; transform: translate(-30%, -120%); width: 24px; height: 24px; border-radius: 50%; border: 2px solid #fff; background: #e5484d; color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 11px; cursor: pointer; box-shadow: 0 1px 5px rgba(0,0,0,.3); z-index: 8; }
.nbk-stroke-chip:hover { background: #c93b3f; }
/* manijas de extremo de línea/flecha (mover cola y punta por separado) */
.nbk-stroke-end { position: absolute; width: 13px; height: 13px; border-radius: 50%; background: #fff; border: 2px solid #2b7fff; transform: translate(-50%, -50%); cursor: grab; z-index: 9; box-shadow: 0 1px 4px rgba(0,0,0,.3); }
.nbk-stroke-end:active { cursor: grabbing; }
.nbk-page.is-pen .nbk-blocks { pointer-events: none; }
/* Sin borde por defecto. Sin selección: el marco/controles aparecen al pasar el mouse.
   Con un bloque seleccionado (doble clic): solo ese muestra controles; los demás, nada. */
.nbk-block { position: absolute; border: 1px solid transparent; border-radius: 7px; }
.nbk-pages:not(.has-sel) .nbk-block:not(.is-locked):hover, .nbk-block.is-active { border-color: #2b7fff; box-shadow: 0 2px 12px rgba(43,127,255,.14); }
.nbk-block.is-selected { border-color: #2b7fff; box-shadow: 0 0 0 2px color-mix(in srgb, #2b7fff 30%, transparent), 0 2px 12px rgba(43,127,255,.16); }
/* El bloque seleccionado o en manipulación pasa al frente (no lo tapan los que están encima). */
.nbk-block.is-selected, .nbk-block.is-active { z-index: 10; }
.nbk-block__content { position: absolute; inset: 0; overflow: auto; padding: 0.85cqw 1.1cqw; }
.nbk-block.is-locked .nbk-block__content { pointer-events: none; }   /* bloqueado: no se edita ni se arrastra */
.nbk-block__grip, .nbk-block__rot, .nbk-rz { position: absolute; opacity: 0; transition: opacity .12s; z-index: 4; }
/* Controles (mover/rotar/redimensionar): nunca en bloques bloqueados. */
.nbk-pages:not(.has-sel) .nbk-block:not(.is-locked):hover .nbk-block__grip,
.nbk-pages:not(.has-sel) .nbk-block:not(.is-locked):hover .nbk-block__rot,
.nbk-pages:not(.has-sel) .nbk-block:not(.is-locked):hover .nbk-rz,
.nbk-block.is-active .nbk-block__grip, .nbk-block.is-active .nbk-block__rot, .nbk-block.is-active .nbk-rz,
.nbk-block.is-selected:not(.is-locked) .nbk-block__grip, .nbk-block.is-selected:not(.is-locked) .nbk-block__rot, .nbk-block.is-selected:not(.is-locked) .nbk-rz { opacity: 1; }
.nbk-block.is-locked .nbk-block__grip, .nbk-block.is-locked .nbk-block__rot, .nbk-block.is-locked .nbk-rz { display: none; }
.nbk-block__grip { top: -11px; left: 50%; transform: translateX(-50%); display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 18px; border-radius: 6px; background: #2b7fff; color: #fff; font-size: 11px; cursor: grab; }
.nbk-block__grip:active { cursor: grabbing; }
.nbk-block__rot { top: -33px; left: 50%; transform: translateX(-50%); width: 22px; height: 22px; border-radius: 50%; background: #fff; color: #2b7fff; box-shadow: 0 1px 5px rgba(0,0,0,.25); display: inline-flex; align-items: center; justify-content: center; font-size: 12px; cursor: grab; }
/* Insignia de candado (siempre visible cuando el bloque está bloqueado). */
.nbk-block__lockbadge { position: absolute; top: 4px; left: 4px; display: none; align-items: center; justify-content: center; color: #8a93a0; font-size: 13px; z-index: 4; }
.nbk-block.is-locked .nbk-block__lockbadge { display: inline-flex; }
/* Barra de acción (al seleccionar, debajo del bloque): candado / duplicar / eliminar, solo iconos. */
.nbk-block__action { position: absolute; top: auto; bottom: -36px; right: 0; display: none; gap: 6px; z-index: 6; }
.nbk-block.is-selected .nbk-block__action { display: inline-flex; }
.nbk-block__action button { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border: none; border-radius: 8px; font-size: 15px; cursor: pointer; box-shadow: 0 2px 8px rgba(0,0,0,.22); font-family: inherit; }
.nbk-act-lock { background: var(--surface); color: var(--ink-soft); }
.nbk-act-lock:hover { color: var(--accent); }
.nbk-act-dup { background: var(--surface); color: var(--ink-soft); }
.nbk-act-dup:hover { color: var(--accent); }
.nbk-act-del { background: #e5484d; color: #fff; }
.nbk-act-del:hover { background: #c93b3f; }
.nbk-page.is-droptarget { outline: 2px dashed var(--accent, #2b7fff); outline-offset: 3px; box-shadow: 0 0 0 4px color-mix(in srgb, #2b7fff 14%, transparent), 0 4px 18px rgba(0,0,0,.12); }
.nbk-marquee { position: absolute; border: 1px solid #2b7fff; background: rgba(43,127,255,.12); border-radius: 2px; z-index: 7; pointer-events: none; }
.nbk-rz { width: 12px; height: 12px; background: #fff; border: 2px solid #2b7fff; border-radius: 50%; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.nbk-rz--nw { top: -6px; left: -6px; cursor: nwse-resize; }
.nbk-rz--ne { top: -6px; right: -6px; cursor: nesw-resize; }
.nbk-rz--sw { bottom: -6px; left: -6px; cursor: nesw-resize; }
.nbk-rz--se { bottom: -6px; right: -6px; cursor: nwse-resize; }
.nbk-text { min-height: 100%; outline: none; font-size: 1.7cqw; line-height: 1.5; color: #1a1c20; }
.nbk-text[data-ph]:empty::before { content: attr(data-ph); color: #9aa1ab; }
.nbk-h1 { min-height: 100%; outline: none; font-size: 3.05cqw; font-weight: 800; line-height: 1.18; letter-spacing: -.01em; color: #16181c; }
.nbk-h2 { min-height: 100%; outline: none; font-size: 2.2cqw; font-weight: 700; line-height: 1.25; color: #16181c; }
.nbk-h1[data-ph]:empty::before, .nbk-h2[data-ph]:empty::before { content: attr(data-ph); color: #9aa1ab; }
.nbk-list { display: flex; flex-direction: column; gap: 3px; }
.nbk-li { display: flex; align-items: flex-start; gap: 6px; }
.nbk-li input { margin-top: 3px; accent-color: #2b7fff; }
.nbk-li-tx { flex: 1; outline: none; font-size: 1.65cqw; color: #1a1c20; }
.nbk-li-tx[data-ph]:empty::before { content: attr(data-ph); color: #9aa1ab; }
.nbk-li.is-done .nbk-li-tx { text-decoration: line-through; color: #9aa1ab; }
.nbk-li-x { border: none; background: none; color: #c0c5cd; cursor: pointer; font-size: 10px; }
.nbk-li-add { align-self: flex-start; border: none; background: none; color: #2b7fff; cursor: pointer; font-size: 12px; font-weight: 600; }
.nbk-img { width: 100%; height: 100%; object-fit: contain; display: block; }
.nbk-img-drop { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; gap: 7px; border: 1px dashed #cbd0d8; border-radius: 6px; background: #fafafa; color: #6b7280; cursor: pointer; font-size: 13px; }
.nbk-addpage { display: inline-flex; align-items: center; gap: 6px; border: 1px dashed var(--line); background: none; color: var(--ink-soft); border-radius: 8px; padding: 10px 18px; font-size: 13px; font-weight: 600; cursor: pointer; font-family: inherit; }
.nbk-addpage:hover { border-color: var(--accent); color: var(--accent); }

/* Tablas dentro del cuaderno — tamaños en cqw para escalar con la hoja */
.nbk-tbl-wrap { width: 100%; height: 100%; display: flex; flex-direction: column; gap: 0.6cqw; overflow: auto; }
.nbk-tbl { border-collapse: collapse; width: 100%; font-size: 1.6cqw; color: #1a1c20; }
.nbk-tbl td, .nbk-tbl th.nbk-tbl-hcell { border: 0.13cqw solid #d7dbe2; padding: 0.55cqw 0.7cqw; min-width: 4cqw; outline: none; vertical-align: top; text-align: left; }
.nbk-tbl td[contenteditable]:focus, .nbk-tbl th.nbk-tbl-hcell:focus { box-shadow: inset 0 0 0 0.15cqw #2b7fff; }
/* encabezados editables */
.nbk-tbl-hcell { background: #f3f5f9; font-weight: 700; color: #2a2f3a; }
.nbk-tbl-hcell[data-ph]:empty::before { content: attr(data-ph); color: #aab0bb; font-weight: 600; }
.nbk-tbl-htot { background: #dfeaff; color: #1f5fd0; }
/* agarraderas de fila/columna y esquinas (sin borde) */
.nbk-tbl-corner, .nbk-tbl-cgrip-cell, .nbk-tbl-rgrip-cell { border: none; background: transparent; padding: 0.18cqw; }
.nbk-tbl-rgrip-cell { width: 2.2cqw; }
.nbk-tbl-grip { display: inline-flex; align-items: center; justify-content: center; width: 100%; min-width: 1.8cqw; height: 1.8cqw; border: none; border-radius: 0.4cqw; background: #eef1f6; color: #8a909c; cursor: pointer; font-size: 1.2cqw; line-height: 1; padding: 0; }
.nbk-tbl-grip:hover { background: #2b7fff; color: #fff; }
/* totales */
.nbk-tbl-sum { background: #eef4ff; font-weight: 700; color: #1f5fd0; }
.nbk-tbl-trow td { background: #eef4ff; font-weight: 700; color: #1f5fd0; }
.nbk-tbl-trow .nbk-tbl-corner { background: transparent; }
.nbk-tbl-grand { background: #dfeaff !important; }
.nbk-tbl-tools { display: flex; flex-wrap: wrap; gap: 0.45cqw; }
.nbk-tbl-tools button { display: inline-flex; align-items: center; gap: 0.3cqw; border: 0.13cqw solid #d7dbe2; background: #f7f8fa; color: #4b5563; border-radius: 0.6cqw; padding: 0.4cqw 0.7cqw; font-size: 1.35cqw; font-weight: 600; cursor: pointer; font-family: inherit; }
.nbk-tbl-tools button:hover { border-color: #2b7fff; color: #2b7fff; }
.nbk-tbl-tools button.is-on { background: #2b7fff; border-color: #2b7fff; color: #fff; }
/* tabla: agarraderas de fila/columna y botones de suma solo con el bloque seleccionado */
.nbk-block:not(.is-selected) .nbk-tbl-ctrl-row,
.nbk-block:not(.is-selected) .nbk-tbl-rgrip-cell,
.nbk-block:not(.is-selected) .nbk-tbl-corner,
.nbk-block:not(.is-selected) .nbk-tbl-tools { display: none !important; }
/* lista: agregar/quitar ítems solo con el bloque seleccionado */
.nbk-block:not(.is-selected) .nbk-li-x,
.nbk-block:not(.is-selected) .nbk-li-add { display: none !important; }
.rhb-pick--danger { color: #e5484d; }
.rhb-pick--danger:hover { background: color-mix(in srgb, #e5484d 14%, transparent); color: #e5484d; }
.rhb-pick--back { color: var(--ink-soft); font-weight: 700; }
.rhb-pick-arrow { margin-left: auto; opacity: .6; }

/* Formas (SVG que llena el bloque y escala con él) */
.nbk-block--shape .nbk-block__content, .nbk-block--highlight .nbk-block__content { padding: 0; overflow: visible; }
.nbk-shape { display: block; width: 100%; height: 100%; overflow: visible; }
/* Marcador / destacador: franja translúcida que tiñe lo que tiene debajo */
.nbk-mark { width: 100%; height: 100%; background: color-mix(in srgb, var(--mark, #ffe14d) 45%, transparent); border-radius: 0.6cqw; }
/* color (formas): en una fila MÁS ABAJO que los iconos de acción, para que nunca se superpongan */
.nbk-shape-tools { position: absolute; top: auto; bottom: -70px; left: 0; display: none; align-items: center; gap: 5px; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 3px 5px; box-shadow: 0 2px 8px rgba(0,0,0,.22); z-index: 6; }
.nbk-block.is-selected .nbk-shape-tools { display: inline-flex; }
.nbk-shape-tools input[type="color"] { width: 24px; height: 24px; border: 1px solid var(--line); border-radius: 6px; background: none; cursor: pointer; padding: 1px; }
.nbk-shape-tools select { height: 26px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-soft); border-radius: 6px; cursor: pointer; font-family: inherit; font-size: 12px; padding: 0 4px; max-width: 120px; }
.nbk-shape-tools button { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-soft); border-radius: 6px; cursor: pointer; font-size: 14px; }
.nbk-shape-tools button.is-on { background: var(--accent); border-color: var(--accent); color: #fff; }
.nbk-shape-tools button:disabled { opacity: .4; cursor: default; }
/* recorte/encuadre de imagen */
.nbk-block--image .nbk-block__content { overflow: visible; padding: 0; }
.nbk-imgwrap { position: absolute; inset: 0; overflow: hidden; border-radius: 7px; }
.nbk-img { transform-origin: center center; }
.nbk-img[style*="cover"] { cursor: move; }
/* modo colocación de línea/flecha (dos clics) */
.nbk-pages.nbk-placing .nbk-page { cursor: crosshair; }
.nbk-pages.nbk-placing .nbk-block { pointer-events: none; }
.nbk-place-preview { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 9; overflow: visible; }

/* Exportar a PDF: clona las hojas en #nbk-print (flujo normal → pagina TODAS), a sangre completa */
#nbk-print { display: none; }
@media print {
  body.nbk-printing { background: #fff !important; }
  body.nbk-printing > *:not(#nbk-print) { display: none !important; }
  #nbk-print { display: block !important; background: #fff; margin: 0; padding: 0; }
  #nbk-print .nbk-page { position: relative; width: 100%; box-shadow: none !important; border: none !important; border-radius: 0; margin: 0; overflow: hidden; break-after: page; page-break-after: always; }
  #nbk-print .nbk-page:last-child { break-after: auto; page-break-after: auto; }
  #nbk-print .nbk-page, #nbk-print .nbk-page * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  /* ocultar controles de edición dentro de los clones */
  #nbk-print .nbk-page__num, #nbk-print .nbk-addpage,
  #nbk-print .nbk-block__grip, #nbk-print .nbk-block__rot, #nbk-print .nbk-rz,
  #nbk-print .nbk-block__action, #nbk-print .nbk-block__lockbadge,
  #nbk-print .nbk-stroke-chip, #nbk-print .nbk-marquee,
  #nbk-print .nbk-shape-tools, #nbk-print .nbk-tbl-tools, #nbk-print .nbk-tbl-grip,
  #nbk-print .nbk-tbl-ctrl-row, #nbk-print .nbk-tbl-rgrip-cell, #nbk-print .nbk-tbl-corner { display: none !important; }
}

/* Editor.js: adaptar a los temas (texto, placeholders, tablas, checklist) — compartido */
.rh-editor .codex-editor { color: var(--ink); }
/* Deja un carril a los lados para que el botón ＋ y el menú de bloque no queden tapados. */
.rh-editor .ce-block__content,
.rh-editor .ce-toolbar__content { max-width: calc(100% - 80px); }
.rh-editor .ce-paragraph,
.rh-editor .ce-header,
.rh-editor .cdx-checklist__item-text,
.rh-editor .tc-cell { color: var(--ink); }
.rh-editor .ce-paragraph[data-placeholder]:empty::before,
.rh-editor .ce-header[data-placeholder]:empty::before { color: var(--ink-faint); }
.rh-editor .tc-table, .rh-editor .tc-cell, .rh-editor .tc-row,
.rh-editor .tc-add-row, .rh-editor .tc-add-column { border-color: var(--line); }
.rh-editor .tc-toolbox__toggler,
.rh-editor .ce-toolbar__plus,
.rh-editor .ce-toolbar__settings-btn { color: var(--ink-soft); }
/* El "+" y los ajustes del bloque al INICIO de la fila (por defecto EditorJS los pone al final). */
.rh-editor .ce-toolbar__actions { left: 0; right: auto; }

/* ===== Kanban ===== */
.kbtool {
  display: flex; height: calc(100vh - 168px); min-height: 460px;
  border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--surface);
}
.kbtool__main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.kbtool__bar { display: flex; align-items: center; gap: 12px; padding: 9px 14px; border-bottom: 1px solid var(--line); flex: none; }
.kbtool__bar-title { flex: 1; min-width: 0; font-weight: 700; font-size: 14px; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kbtool__area { flex: 1; min-width: 0; min-height: 0; display: flex; gap: 14px; align-items: flex-start; overflow-x: auto; padding: 14px; }
.kbtool--embed .kbtool__area { flex: 1; }
.kbtool__side-title, .tool-side-title { flex: 1; }

/* Botón "agregar" al pie de la barra lateral (compartido) */
.tool-side-add {
  margin: 8px; padding: 8px; border: 1px dashed var(--line); border-radius: 8px;
  background: none; color: var(--ink-soft); cursor: pointer; font-size: 12.5px; font-weight: 600; flex-shrink: 0;
}
.tool-side-add:hover { border-color: var(--accent); color: var(--accent); }
/* El ＋ es contextual: en Imágenes se oculta en la vista Tiempo (no se "crea" una fecha).
   Con !important porque side-tabs.js puede reubicarlo y fijarle display en línea. */
.tool-side-add[hidden] { display: none !important; }

/* Contraer la barra lateral — compartido por todas las herramientas de 2 paneles */
.tool-expand { display: none; }
.is-side-collapsed > .eptool__side,
.is-side-collapsed > .wbtool__side { width: 14px; pointer-events: none; }
.is-side-collapsed > .eptool__side > *,
.is-side-collapsed > .wbtool__side > * { opacity: 0; transition: opacity .16s ease; }
.is-side-collapsed > .tool-expand:not(.tool-expand--r) {
  display: flex; align-items: flex-start; justify-content: center; padding-top: 14px;
  width: 30px; flex-shrink: 0; border: none; border-right: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 92%, var(--ink) 4%);
  color: var(--ink-soft); cursor: pointer; font-size: 16px;
}
.is-side-collapsed > .tool-expand:not(.tool-expand--r):hover { color: var(--accent); }
.kbtool__all { font-weight: 700; }
.wbtool__tree .kbtool__all { margin-bottom: 6px; padding-bottom: 8px; border-bottom: 1px solid var(--line); border-radius: 8px 8px 0 0; }
.kbtool__chip--board { color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, transparent); }
.kbtool__col {
  flex: 1 1 0; min-width: 220px; max-height: 100%;
  display: flex; flex-direction: column;
  background: color-mix(in srgb, var(--surface) 92%, var(--ink) 4%);
  border: 1px solid var(--line); border-radius: 12px; overflow: hidden;
}
.kbtool__col-head {
  display: flex; align-items: center; gap: 8px; padding: 11px 14px; font-weight: 800; font-size: 13px;
  background: var(--kb-phase, #8a93a0); color: #fff; letter-spacing: .3px;
}
.kbtool__col-name { flex: 1; }
.kbtool__col-count { font-size: 11px; font-weight: 700; color: #fff; background: rgba(255,255,255,.28); border-radius: 20px; padding: 1px 8px; }
.kbtool__list { flex: 1; overflow-y: auto; padding: 10px; display: flex; flex-direction: column; gap: 8px; min-height: 40px; }
.kbtool__list--over { background: color-mix(in srgb, var(--accent) 8%, transparent); }
.kbtool__add {
  margin: 0 10px 10px; padding: 7px; border: 1px dashed var(--line); border-radius: 8px;
  background: none; color: var(--ink-soft); cursor: pointer; font-size: 12.5px; font-weight: 600;
}
.kbtool__add:hover { border-color: var(--accent); color: var(--accent); }

.kbtool__card {
  position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: 9px;
  padding: 9px 26px 9px 11px; cursor: pointer; box-shadow: 0 1px 2px rgba(0,0,0,.05);
}
.kbtool__card:hover { border-color: color-mix(in srgb, var(--accent) 50%, var(--line)); }
.kbtool__card.is-dragging { opacity: .45; cursor: grabbing; }
.kbtool__card-title { font-size: 13px; font-weight: 600; line-height: 1.4; color: var(--ink); word-break: break-word; }
.kbtool__card-desc { font-size: 12px; line-height: 1.45; color: var(--ink-soft); margin-top: 3px; word-break: break-word;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.kbtool__card-ph { color: var(--ink-faint); font-weight: 500; }
.kbtool__card-meta { display: flex; align-items: center; gap: 6px; margin-top: 7px; flex-wrap: wrap; }
.kbtool__card-created { font-size: 10px; color: var(--ink-faint); white-space: nowrap; }
.kbtool__card-due { margin-left: auto; font-size: 11px; color: var(--ink-soft); white-space: nowrap; display: inline-flex; align-items: center; gap: 3px; }
.kbtool__card-due i { font-size: 12px; }
.kbtool__card-due.is-overdue { color: #e5484d; font-weight: 600; }
.kbtool__chip { font-size: 11px; font-weight: 600; color: var(--ink-soft);
  background: color-mix(in srgb, var(--ink) 8%, transparent); border-radius: 20px; padding: 1px 8px; }
.kbtool__chip--soft { color: var(--ink-faint); }
.kbtool__chip.is-overdue { color: #fff; background: #e5484d; }
.kbtool__card-del {
  position: absolute; top: 4px; right: 4px; width: 20px; height: 20px; border: none; border-radius: 6px;
  background: none; color: var(--ink-faint); cursor: pointer; font-size: 15px; line-height: 1; opacity: 0; transition: opacity .12s;
}
.kbtool__card:hover .kbtool__card-del { opacity: 1; }
.kbtool__card-del:hover { background: #e5484d; color: #fff; }

/* color representativo por fase: header coloreado de cada columna */
.kbtool__col--backlog   { --kb-phase: #8a93a0; }
.kbtool__col--progress  { --kb-phase: #2b7fff; }
.kbtool__col--done      { --kb-phase: #1a9f4a; }
.kbtool__col--blocked   { --kb-phase: #e5484d; }
.kbtool__col--cancelled { --kb-phase: #9aa3af; }
.kbtool__col--done .kbtool__card-title { color: color-mix(in srgb, var(--ink) 76%, transparent); }
.kbtool__col--cancelled .kbtool__card-title { text-decoration: line-through; color: var(--ink-faint); }

/* ===== Portafolio ===== */
.pftool__main { flex: 1; min-width: 0; overflow-y: auto; padding: 18px 20px; }
.pftool__empty { color: var(--ink-faint); font-size: 13px; line-height: 1.6; padding: 24px 6px; }
.pf { display: flex; flex-direction: column; gap: 15px; max-width: 640px; }
.pf__name { flex: none; width: 100%; min-width: 0; margin-bottom: 2px; }
.pf__input { width: 100%; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--ink); font-size: 13px; padding: 9px 10px; font-family: inherit; }
.pf__input:focus { outline: none; border-color: var(--accent); }
.pf__desc { min-height: 96px; }
.pf__linkrow { display: flex; gap: 8px; align-items: stretch; }
.pf__linkrow .pf__input { flex: 1; }
.pf__open { display: inline-flex; align-items: center; justify-content: center; width: 38px; flex: none; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--accent); font-size: 17px; cursor: pointer; text-decoration: none; }
.pf__open:hover { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent); }
.pf__open.is-off { color: var(--ink-faint); pointer-events: none; opacity: .5; }
.pf__tags { display: flex; flex-wrap: wrap; gap: 7px; }
.pf__tags-empty { color: var(--ink-faint); font-size: 12px; }
.pf__tag { display: inline-flex; align-items: center; gap: 6px; background: color-mix(in srgb, var(--accent) 13%, transparent); color: var(--accent); border-radius: 999px; padding: 4px 6px 4px 11px; font-size: 12px; font-weight: 700; }
.pf__tag button { border: none; background: none; color: inherit; cursor: pointer; font-size: 12px; line-height: 1; opacity: .7; padding: 0 2px; }
.pf__tag button:hover { opacity: 1; }

/* ===== Proyectos ===== */
.projtool__main { flex: 1; min-width: 0; display: flex; flex-direction: column; overflow: auto; padding: 16px 18px; }
.projtool__head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
/* índice (barra lateral derecha): elementos del proyecto; al seleccionar se abre al centro */
.projtool__index { width: 250px; flex: none; border-left: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; background: var(--surface); }
.projtool__index-head { padding: 12px 12px 4px; }
.projtool__index-head .projtool__name { width: 100%; min-width: 0; font-size: 15px; }
.projtool__index-sub { padding: 6px 14px 4px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--ink-faint); }
.projtool__index-list { flex: 1; min-height: 0; overflow: auto; padding: 4px 8px; display: flex; flex-direction: column; gap: 4px; }
.projidx { display: flex; align-items: center; gap: 8px; padding: 8px 9px; border-radius: 9px; cursor: pointer; border: 1px solid transparent; }
.projidx:hover { background: color-mix(in srgb, var(--ink) 5%, transparent); }
.projidx.is-active { background: color-mix(in srgb, var(--accent) 12%, transparent); border-color: color-mix(in srgb, var(--accent) 35%, transparent); }
.projidx > i { font-size: 17px; color: var(--accent); flex: none; }
.projidx__body { flex: 1; min-width: 0; }
.projidx__name { font-size: 13px; font-weight: 600; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.projidx__meta { font-size: 11px; color: var(--ink-faint); }
.projidx__x { color: var(--ink-faint); font-size: 15px; line-height: 1; padding: 0 3px; border-radius: 4px; flex: none; opacity: 0; }
.projidx:hover .projidx__x { opacity: 1; }
.projidx__x:hover { color: #e5484d; background: color-mix(in srgb, #e5484d 14%, transparent); }
.projtool__index .tool-side-add { margin: 8px; }
.projtool__center-empty { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; text-align: center; color: var(--ink-faint); padding: 30px; }
.projtool__center-empty i { font-size: 46px; color: var(--accent); opacity: .7; }
.projtool__center-empty p { max-width: 360px; font-size: 13.5px; line-height: 1.5; }
/* pestañas del proyecto (cada tab = un elemento vinculado de otra herramienta) */
.projtabs { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.projtabs__bar { display: flex; align-items: center; gap: 4px; overflow-x: auto; border-bottom: 1px solid var(--line); padding-bottom: 6px; margin-bottom: 12px; }
.projtab { display: inline-flex; align-items: center; gap: 6px; flex: none; border: 1px solid var(--line); background: var(--surface); color: var(--ink-soft); border-radius: 9px 9px 0 0; padding: 7px 10px; font-size: 12.5px; font-weight: 600; cursor: pointer; font-family: inherit; max-width: 210px; }
.projtab > i { color: var(--accent); font-size: 15px; flex: none; }
.projtab__name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.projtab.is-active { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, transparent); color: var(--ink); }
.projtab__x { color: var(--ink-faint); font-size: 14px; line-height: 1; padding: 0 2px; border-radius: 4px; flex: none; }
.projtab__x:hover { color: #e5484d; background: color-mix(in srgb, #e5484d 14%, transparent); }
.projtab--add { color: var(--accent); border-style: dashed; }
.projtabs__content { flex: 1; min-height: 0; overflow: auto; }
.projtab-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.projtab-head__t { font-weight: 700; color: var(--ink); display: inline-flex; align-items: center; gap: 7px; }
.projtab-head__t small { color: var(--ink-faint); font-weight: 500; }
.projtab-embed { display: flex; height: 65vh; min-height: 360px; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.projtab-card { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; padding: 38px 20px; border: 1px dashed var(--line); border-radius: 12px; color: var(--ink-soft); }
.projtab-card > i { font-size: 40px; color: var(--accent); }
.projtab-card__name { font-size: 16px; font-weight: 700; color: var(--ink); }
.projtab-card__meta { font-size: 12.5px; color: var(--ink-faint); }
.projtool__name { flex: none; width: 100%; font-size: 22px; font-weight: 700; color: var(--ink); border: none; border-bottom: 1px solid var(--line); background: none; padding: 4px 2px 10px; margin-bottom: 14px; }
.projtool__name:focus { outline: none; border-color: var(--accent); }
/* centro: todos los elementos apilados con scroll */
.projstack { display: flex; flex-direction: column; gap: 18px; }
.projsec { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--surface); }
.projsec__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 12px; background: color-mix(in srgb, var(--surface) 92%, var(--ink) 4%); cursor: pointer; }
.projsec.is-open > .projsec__head { border-bottom: 1px solid var(--line); }
.projsec__head:hover { background: color-mix(in srgb, var(--accent) 6%, var(--surface)); }
.projsec__caret { color: var(--ink-faint); transition: transform .15s ease; font-size: 13px; }
.projsec.is-open .projsec__caret { transform: rotate(90deg); }
.projsec__body { display: none; }
.projsec.is-open > .projsec__body { display: block; }
.projsec__t { font-weight: 700; color: var(--ink); display: inline-flex; align-items: baseline; gap: 7px; min-width: 0; }
.projsec__t i.projsec__caret { color: var(--ink-faint); align-self: center; }
.projsec__t i { color: var(--accent); align-self: center; }
.projsec__t small { color: var(--ink-faint); font-weight: 500; }
.projsec__type { font-size: 17px; font-weight: 800; letter-spacing: -.01em; color: var(--ink); }
.projsec__name { font-size: 14px; font-weight: 600; color: var(--ink-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.projsec__actions { display: inline-flex; align-items: center; gap: 8px; flex: none; }
.projsec__x { border: none; background: none; color: var(--ink-faint); font-size: 17px; line-height: 1; cursor: pointer; padding: 0 4px; border-radius: 5px; }
.projsec__x:hover { color: #e5484d; background: color-mix(in srgb, #e5484d 14%, transparent); }
.projsec__embed { height: 78vh; min-height: 420px; display: flex; }
.projsec__embed--cal, .projsec__embed--kb, .projsec__embed--exp { height: 62vh; min-height: 340px; }
.projsec__card { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px; flex-wrap: wrap; }
.projsec__card-meta { color: var(--ink-faint); font-size: 13px; }
/* embeds de herramientas dentro de una sección (llenan el alto) */
.caltool--embed, .kbtool--embed, .exptool--embed { flex: 1; height: 100%; min-height: 0; border: none; border-radius: 0; }
/* Cuaderno · colección: cada nota apilada */
.projsubnote { margin-top: 24px; border-top: 1px solid var(--line); }
.projsubnote:first-child { margin-top: 0; border-top: none; }
.projsubnote__t { display: flex; align-items: center; gap: 6px; padding: 7px 12px; font-weight: 600; font-size: 12.5px; color: var(--ink-soft); background: color-mix(in srgb, var(--surface) 94%, var(--ink) 3%); }
.projsubnote__t i { color: var(--accent); }
.projsubnote__embed { height: 78vh; min-height: 420px; display: flex; }
/* gente en el cuerpo: burbujas con avatar y nombre debajo */
.projbubbles { display: flex; flex-wrap: wrap; gap: 16px; padding: 18px 14px; }
.projbubble { position: relative; width: 92px; display: flex; flex-direction: column; align-items: center; gap: 7px; text-align: center; }
.projbubble__av { width: 64px; height: 64px; border-radius: 50%; background: color-mix(in srgb, var(--accent) 14%, var(--surface)); display: flex; align-items: center; justify-content: center; overflow: hidden; border: 1px solid var(--line); }
.projbubble__av i { font-size: 30px; color: var(--accent); }
.projbubble__av img { width: 100%; height: 100%; object-fit: cover; }
.projbubble__name { font-size: 12.5px; font-weight: 600; color: var(--ink); max-width: 92px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.projbubble__x { position: absolute; top: -4px; right: 10px; width: 20px; height: 20px; border-radius: 50%; border: none; background: var(--surface); color: var(--ink-faint); box-shadow: 0 1px 4px rgba(0,0,0,.22); cursor: pointer; font-size: 13px; line-height: 1; display: none; }
.projbubble:hover .projbubble__x { display: block; }
.projbubble__x:hover { color: #e5484d; }
.projbubble.is-me .projbubble__av { border-color: var(--accent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 35%, transparent); }
.projtool__muted, .projtool__empty { color: var(--ink-faint); font-size: 13px; line-height: 1.6; }

/* footer de acceso reutilizable (rh-access.js): "quién tiene acceso y de qué tipo" */
.nbk-access:empty { display: none; }
.rhaccess { position: relative; display: inline-flex; align-items: center; }
/* trigger: cuadrito "Gente" en la barra de controles */
.rhaccess__trigger { display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--line); border-radius: 22px; padding: 3px 11px 3px 5px; background: var(--surface); cursor: pointer; font-family: inherit; font-size: 12px; color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.04); }
.rhaccess__trigger:hover { border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); }
.rhaccess__tlabel { font-weight: 700; }
.rhaccess__trigger small { color: var(--ink-faint); font-weight: 600; }
.rhaccess__caret { font-size: 11px; color: var(--ink-faint); transition: transform .15s; }
.rhaccess.is-open .rhaccess__caret { transform: rotate(180deg); }
.rhaccess__stack { display: inline-flex; }
.rhaccess__sav { width: 24px; height: 24px; border-radius: 50%; overflow: hidden; display: inline-flex; align-items: center; justify-content: center; background: color-mix(in srgb, var(--accent) 14%, var(--surface)); border: 2px solid var(--surface); margin-left: -9px; }
.rhaccess__sav:first-child { margin-left: 0; }
.rhaccess__sav img { width: 100%; height: 100%; object-fit: cover; }
.rhaccess__sav i { font-size: 12px; color: var(--accent); }
/* panel desplegable (abre hacia abajo desde la barra) */
.rhaccess__panel { position: absolute; top: calc(100% + 6px); right: 0; width: 290px; max-height: 320px; overflow-y: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 34px rgba(0,0,0,.20); padding: 8px; z-index: 50; }
.rhaccess__list { display: flex; flex-direction: column; gap: 2px; }
.rhaccess__row { display: flex; align-items: center; gap: 9px; padding: 5px 6px; border-radius: 8px; }
.rhaccess__row:hover { background: var(--bg); }
.rhaccess__av { width: 28px; height: 28px; border-radius: 50%; overflow: hidden; display: inline-flex; align-items: center; justify-content: center; background: color-mix(in srgb, var(--accent) 14%, var(--surface)); flex: none; }
.rhaccess__av img { width: 100%; height: 100%; object-fit: cover; }
.rhaccess__av i { font-size: 15px; color: var(--accent); }
.rhaccess__name { flex: 1; min-width: 0; font-size: 13px; line-height: 1.2; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rhaccess__name small { color: var(--ink-faint); }
.rhaccess__perm { display: inline-flex; gap: 2px; flex: none; }
.rhaccess__pbtn { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 24px; border: 1px solid var(--line); background: var(--bg); border-radius: 6px; color: var(--ink-faint); cursor: pointer; font-size: 13px; padding: 0; }
.rhaccess__pbtn:hover { color: var(--ink); }
.rhaccess__pbtn.is-on { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent); }
.rhaccess__x { border: none; background: none; color: var(--ink-faint); cursor: pointer; font-size: 15px; line-height: 1; padding: 0 2px; flex: none; }
.rhaccess__x:hover { color: #e5484d; }
.rhaccess__add { display: flex; align-items: center; justify-content: center; gap: 6px; width: 100%; margin-top: 6px; border: 1px dashed var(--accent); color: var(--accent); background: none; border-radius: 9px; padding: 7px; font-size: 12px; font-weight: 700; cursor: pointer; font-family: inherit; }
.rhaccess__add:hover { background: color-mix(in srgb, var(--accent) 12%, transparent); }
.rhaccess__hint { margin: 0 0 8px; font-size: 12px; color: var(--ink-faint); }
.rhaccess-modal .rhaccess__list { max-height: 320px; overflow-y: auto; }
/* menú contextual reutilizable (⋯) con botones */
.rhmenu { position: fixed; z-index: 200; min-width: 168px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 12px 34px rgba(0,0,0,.22); padding: 5px; display: flex; flex-direction: column; gap: 2px; }
.rhmenu__item { display: flex; align-items: center; gap: 9px; width: 100%; border: none; background: none; border-radius: 7px; padding: 8px 10px; font-size: 13px; color: var(--ink); cursor: pointer; font-family: inherit; text-align: left; }
.rhmenu__item:hover { background: var(--bg); }
.rhmenu__item i { font-size: 16px; color: var(--ink-soft); }
.rhmenu__item--danger { color: #e5484d; }
.rhmenu__item--danger:hover { background: color-mix(in srgb, #e5484d 12%, transparent); }
.rhmenu__item--danger i { color: #e5484d; }
/* estado del acceso (pendiente/aceptado) */
.rhaccess__pend { color: var(--ink-faint); }
.rhaccess__ok { color: #2e9e6b; }
/* "Compartido conmigo" en barras laterales */
.rhshared-grp { margin-top: 10px; border-top: 1px dashed var(--line); padding-top: 6px; }
.rhshared-item { cursor: pointer; }
.rhshared-tag { margin-left: auto; font-size: 12px; opacity: .75; }
.rhshared-tag.is-edit { color: var(--accent); opacity: 1; }
/* invitaciones de compartir en la vista Gente */
.gente-share { display: flex; align-items: center; gap: 8px; padding: 7px 8px; border-radius: 8px; background: color-mix(in srgb, var(--accent) 7%, transparent); margin: 2px 0; }
.gente-share__txt { flex: 1; min-width: 0; font-size: 12.5px; color: var(--ink); display: flex; flex-direction: column; line-height: 1.25; }
.gente-share__txt small { color: var(--ink-faint); font-size: 11px; }
.gente-share__btns { display: inline-flex; gap: 4px; flex: none; }
.gente-share-open { cursor: pointer; }
/* visor modal de recurso compartido */
.rhshared-modal .kbmodal__card { width: min(1040px, 95vw); height: 88vh; display: flex; flex-direction: column; padding: 0; overflow: hidden; }
.rhshared-modal .kbmodal__head { padding: 12px 16px; border-bottom: 1px solid var(--line); margin: 0; }
.rhshared-role { margin-left: 12px; font-size: 12px; font-weight: 600; color: var(--ink-soft); display: inline-flex; align-items: center; gap: 5px; }
.rhshared-modal .kbmodal__x { margin-left: auto; }
.rhshared-body { flex: 1; min-height: 0; overflow: auto; display: flex; }
.rhshared-host { flex: 1; min-width: 0; display: flex; flex-direction: column; min-height: 0; }
.rhshared-host.is-ro { position: relative; }
.rhshared-host.is-ro::after { content: ''; position: absolute; inset: 0; pointer-events: none; }
/* badge de invitaciones en el nav Crew */
.nav-badge { margin-left: auto; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: #e5484d; color: #fff; font-size: 11px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
/* gente del proyecto */
.projpeople { margin-bottom: 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); padding: 10px 12px; }
.projpeople__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.projpeople__t { font-weight: 700; color: var(--ink); display: inline-flex; align-items: center; gap: 7px; }
.projpeople__t i { color: var(--accent); }
.projpeople__add { display: inline-flex; align-items: center; gap: 5px; border: 1px dashed var(--accent); background: color-mix(in srgb, var(--accent) 8%, transparent); color: var(--accent); border-radius: 8px; padding: 5px 10px; font-size: 12.5px; font-weight: 700; cursor: pointer; font-family: inherit; }
.projpeople__add:hover { background: color-mix(in srgb, var(--accent) 16%, transparent); }
.projpeople__list { display: flex; flex-wrap: wrap; gap: 6px; }
.projchip { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: 20px; padding: 4px 6px 4px 10px; font-size: 12.5px; color: var(--ink); background: var(--bg); }
.projchip i { color: var(--accent); }
.projchip__x { border: none; background: none; color: var(--ink-faint); font-size: 14px; line-height: 1; cursor: pointer; padding: 0 3px; border-radius: 50%; }
.projchip__x:hover { color: #e5484d; background: color-mix(in srgb, #e5484d 14%, transparent); }
/* selector de gente */
.projppl { display: flex; flex-direction: column; gap: 14px; max-height: 60vh; overflow: auto; }
.projppl__sec-t { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--ink-faint); margin-bottom: 6px; }
.projppl__row { display: flex; align-items: center; gap: 8px; padding: 6px 4px; border-bottom: 1px solid var(--line); }
.projppl__name { flex: 1; min-width: 0; display: inline-flex; align-items: center; gap: 7px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); }
.projppl__name i { color: var(--accent); }
.projppl__name small { color: var(--ink-faint); }
.projppl__add { border: 1px solid var(--accent); background: none; color: var(--accent); border-radius: 7px; padding: 3px 10px; font-size: 12px; font-weight: 700; cursor: pointer; white-space: nowrap; flex: none; }
.projppl__add.is-added { background: var(--accent); color: #fff; }
.projppl__toggle { border: none; background: none; color: var(--ink-faint); cursor: pointer; font-size: 12px; padding: 0 2px; flex: none; }
.projppl__members { padding-left: 18px; }
.projtool__blocks { display: flex; flex-direction: column; gap: 8px; }

/* bloques plasmados en el contenedor */
.projblock { display: flex; align-items: center; gap: 11px; padding: 11px 13px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.projblock:hover { border-color: var(--accent); box-shadow: 0 2px 10px rgba(0,0,0,.05); }
.projblock__ico { font-size: 22px; color: var(--accent); flex-shrink: 0; }
.projblock__body { flex: 1; min-width: 0; }
.projblock__title { font-size: 14px; font-weight: 700; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.projblock__meta { font-size: 12px; color: var(--ink-faint); margin-top: 2px; }
.projblock__tag { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .4px; color: var(--ink-soft); background: color-mix(in srgb, var(--ink) 8%, transparent); border-radius: 20px; padding: 2px 8px; }
.projtool__open { border: none; background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent); border-radius: 7px; padding: 5px 11px; font-size: 12px; font-weight: 700; cursor: pointer; white-space: nowrap; }
.projtool__open:hover { background: var(--accent); color: #fff; }
.projtool__item-del { border: none; background: none; color: var(--ink-faint); cursor: pointer; font-size: 17px; line-height: 1; padding: 0 4px; }
.projtool__item-del:hover { color: #e5484d; }

/* selector: tipos */
.projpick__types { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; padding: 6px 0; }
.projpick__type-btn { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 18px 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink); cursor: pointer; font-weight: 600; font-size: 13px; }
.projpick__type-btn i { font-size: 28px; color: var(--accent); }
.projpick__type-btn:hover { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 7%, transparent); }

/* selector: explorar colecciones/ítems */
.projpick__back { align-self: flex-start; border: none; background: none; color: var(--ink-soft); cursor: pointer; font-size: 13px; font-weight: 600; padding: 2px 0 8px; }
.projpick__back:hover { color: var(--accent); }
.projpick__create { display: inline-flex; align-items: center; gap: 6px; align-self: flex-start; border: 1px dashed var(--accent); background: color-mix(in srgb, var(--accent) 8%, transparent); color: var(--accent); border-radius: 8px; padding: 8px 12px; font-size: 13px; font-weight: 700; cursor: pointer; font-family: inherit; margin-bottom: 8px; }
.projpick__create:hover { background: color-mix(in srgb, var(--accent) 16%, transparent); }
.projpick__list { max-height: 52vh; overflow-y: auto; display: flex; flex-direction: column; gap: 4px; }
.projpick__coll { border: 1px solid var(--line); border-radius: 9px; overflow: hidden; }
.projpick__coll-head { display: flex; align-items: center; gap: 8px; padding: 8px 10px; }
.projpick__toggle { width: 18px; border: none; background: none; color: var(--ink-faint); cursor: pointer; font-size: 12px; padding: 0; }
.projpick__coll-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 700; font-size: 13px; color: var(--ink); }
.projpick__coll-items { border-top: 1px solid var(--line); padding: 4px 8px 6px 26px; display: flex; flex-direction: column; gap: 2px; background: color-mix(in srgb, var(--ink) 3%, transparent); }
.projpick__itemrow { display: flex; align-items: center; gap: 8px; padding: 4px 0; }
.projpick__itemname { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12.5px; color: var(--ink-soft); }
.projpick__addbtn { border: 1px solid var(--accent); background: none; color: var(--accent); border-radius: 7px; padding: 4px 10px; font-size: 12px; font-weight: 700; cursor: pointer; white-space: nowrap; }
.projpick__addbtn:hover { background: var(--accent); color: #fff; }
.projpick__addbtn--sm { padding: 2px 8px; }
.projpick__addbtn.is-added { border-color: #1a9f4a; color: #1a9f4a; }
.projpick__addbtn.is-added:hover { background: #1a9f4a; color: #fff; }

/* ===== Calendario ===== */
.caltool { display: flex; height: calc(100vh - 168px); min-height: 460px; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--surface); }
.caltool--embed { flex: 1; height: 100%; min-height: 0; border: none; border-radius: 0; }
.caltool__main { flex: 1; min-width: 0; display: flex; flex-direction: column; overflow: hidden; }
.caltool__bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.caltool__nav { display: flex; align-items: center; gap: 8px; }
.caltool__navbtn { width: 30px; height: 30px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--ink-soft); cursor: pointer; font-size: 18px; line-height: 1; }
.caltool__navbtn:hover { border-color: var(--accent); color: var(--accent); }
.caltool__title { font-weight: 700; font-size: 15px; min-width: 168px; text-align: center; text-transform: capitalize; color: var(--ink); }
.caltool__actions { display: flex; gap: 8px; flex-wrap: wrap; }
.caltool__add { border: none; background: var(--accent); color: #fff; border-radius: 8px; padding: 8px 14px; font-size: 13px; font-weight: 700; cursor: pointer; }
.caltool__add:hover { filter: brightness(1.06); }
.caltool__weekdays { display: grid; grid-template-columns: repeat(7, 1fr); padding: 6px 0; border-bottom: 1px solid var(--line); }
.caltool__weekdays span { text-align: center; font-size: 11px; font-weight: 700; color: var(--ink-faint); text-transform: uppercase; }
.caltool__grid { flex: 1; display: grid; grid-template-columns: repeat(7, 1fr); grid-auto-rows: minmax(86px, 1fr); overflow: auto; }
.caltool__cell { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 4px 5px; display: flex; flex-direction: column; gap: 3px; cursor: pointer; overflow: hidden; }
.caltool__cell:hover { background: color-mix(in srgb, var(--ink) 4%, transparent); }
.caltool__cell--out { background: color-mix(in srgb, var(--ink) 3%, transparent); }
.caltool__cell--out .caltool__daynum { color: var(--ink-faint); }
.caltool__daynum { font-size: 12px; font-weight: 600; color: var(--ink); width: 22px; height: 22px; display: flex; align-items: center; justify-content: center; border-radius: 50%; }
/* Día actual: se resalta todo el cuadro, no solo el número. */
.caltool__cell--today { background: color-mix(in srgb, var(--accent) 13%, transparent); box-shadow: inset 0 0 0 2px var(--accent); }
.caltool__cell--today:hover { background: color-mix(in srgb, var(--accent) 18%, transparent); }
.caltool__cell--today .caltool__daynum { background: var(--accent); color: #fff; }
.caltool__ev { font-size: 11px; padding: 1px 6px; border-radius: 5px; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; }
.caltool__ev .t { opacity: .85; margin-right: 3px; font-variant-numeric: tabular-nums; }
.caltool__cell--sel { box-shadow: inset 0 0 0 2px var(--ink); }
.caltool__cell--sel.caltool__cell--today { box-shadow: inset 0 0 0 2px var(--accent), inset 0 0 0 4px color-mix(in srgb, var(--ink) 35%, transparent); }
/* ---- barra derecha: detalle del día por horas ---- */
.caltool__day-body { flex: 1; min-height: 0; overflow: hidden; padding: 0; display: flex; flex-direction: column; }
/* Encabezado FIJO (no scrollea): agregar + eventos sin hora */
.calday__pinned { flex: none; padding: 10px; display: flex; flex-direction: column; gap: 6px; border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--surface) 92%, var(--ink) 4%); }
.calday__add { display: inline-flex; align-items: center; justify-content: center; gap: 6px; width: 100%; border: 1px dashed var(--accent); color: var(--accent); background: none; border-radius: 9px; padding: 7px; font-size: 12.5px; font-weight: 700; cursor: pointer; font-family: inherit; flex: none; }
.calday__add:hover { background: color-mix(in srgb, var(--accent) 12%, transparent); }
.calday__allday { display: flex; flex-direction: column; gap: 4px; }
/* Horas SCROLLEABLES */
.calday__hours { flex: 1; min-height: 0; overflow-y: auto; position: relative; padding: 0 10px 10px; display: flex; flex-direction: column; }
.calday__hour { display: flex; gap: 8px; align-items: flex-start; min-height: 60px; border-top: 1px solid color-mix(in srgb, var(--line) 70%, transparent); }
.calday__hour:first-child { border-top: none; }
.calday__hlabel { flex: none; width: 42px; padding-top: 6px; font-size: 11px; color: var(--ink-faint); font-variant-numeric: tabular-nums; }
.calday__hour--now .calday__hlabel { color: #e5484d; font-weight: 700; }
.calday__slot { position: relative; flex: 1; min-width: 0; padding: 4px 0; display: flex; flex-direction: column; gap: 4px; cursor: pointer; border-radius: 6px; }
.calday__slot:hover { background: color-mix(in srgb, var(--accent) 7%, transparent); }
/* Línea de la hora actual */
.calday__nowline { position: absolute; left: -4px; right: 0; height: 2px; background: #e5484d; z-index: 2; pointer-events: none; }
.calday__nowline::before { content: ''; position: absolute; left: -4px; top: -3px; width: 8px; height: 8px; border-radius: 50%; background: #e5484d; }
.calday__ev { display: flex; align-items: baseline; gap: 6px; padding: 4px 8px; border-radius: 7px; background: color-mix(in srgb, var(--evc) 16%, var(--surface)); border-left: 3px solid var(--evc); cursor: pointer; }
.calday__ev:hover { background: color-mix(in srgb, var(--evc) 26%, var(--surface)); }
.calday__evt { flex: none; font-size: 11px; font-weight: 700; color: var(--evc); font-variant-numeric: tabular-nums; }
.calday__evt--all { font-weight: 600; color: var(--ink-faint); }
.calday__evtitle { flex: 1; min-width: 0; font-size: 12.5px; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.calday__evcal { flex: none; font-size: 10px; color: var(--ink-faint); }
.caltool__swatches { display: flex; gap: 8px; }
.caltool__swatch { width: 24px; height: 24px; border-radius: 50%; cursor: pointer; border: 2px solid transparent; }
.caltool__swatch.is-on { border-color: var(--ink); box-shadow: 0 0 0 2px var(--surface) inset; }
/* punto de color del calendario (barra lateral) */
.caltool__caldot { width: 11px; height: 11px; border-radius: 50%; flex-shrink: 0; box-shadow: 0 0 0 1px rgba(0,0,0,.12) inset; }
/* selector de color del calendario (barra superior) */
.caltool__colorwrap { position: relative; }
.caltool__colorbtn { display: inline-flex; align-items: center; gap: 7px; }
.caltool__colorbtn:disabled { opacity: .5; cursor: not-allowed; }
.caltool__colordot { width: 13px; height: 13px; border-radius: 50%; display: inline-block; box-shadow: 0 0 0 1px rgba(0,0,0,.15) inset; }
.caltool__colorpop {
  position: absolute; top: calc(100% + 6px); right: 0; z-index: 30;
  display: flex; gap: 8px; padding: 10px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--surface); box-shadow: 0 8px 26px rgba(0,0,0,.18);
}
.caltool__colorpop[hidden] { display: none; }

/* ===== modal de detalle de tarjeta ===== */
.kbmodal { position: fixed; inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center; padding: 20px; }
.kbmodal[hidden] { display: none; }
.kbmodal__backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.45); }
.kbmodal__card {
  position: relative; width: min(620px, 100%); max-height: 90vh; overflow-y: auto;
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px;
  display: flex; flex-direction: column; gap: 12px; box-shadow: 0 18px 50px rgba(0,0,0,.3);
}
/* Modal de Tareas (el que tiene editor de cuerpo): más ancho para que el cuerpo se vea grande. */
.kbmodal__card:has(.kbmodal__bodydoc) { width: min(900px, 96vw); }
.kbmodal__head { display: flex; align-items: center; gap: 10px; }
.kbmodal__title { flex: 1; font-size: 18px; font-weight: 700; color: var(--ink); border: none; border-bottom: 1px solid var(--line); background: none; padding: 5px 2px; }
.kbmodal__title:focus { outline: none; border-color: var(--accent); }
.kbmodal__x { border: none; background: none; cursor: pointer; color: var(--ink-faint); font-size: 17px; }
.kbmodal__x:hover { color: var(--ink); }
.kbmodal__row { display: flex; gap: 14px; align-items: flex-end; flex-wrap: wrap; }
.kbmodal__field { display: flex; flex-direction: column; gap: 4px; }
.kbmodal__field > span { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .4px; color: var(--ink-faint); }
.kbmodal__field--full { flex: 1 1 100%; }
.kbmodal__select, .kbmodal__date, .kbmodal__desc, .kbmodal__body {
  border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--ink); font-size: 13px; padding: 8px 10px; font-family: inherit;
}
.kbmodal__select { cursor: pointer; font-weight: 600; }
.kbmodal__body { min-height: 200px; resize: vertical; line-height: 1.55; }
.kbmodal__created { font-size: 11.5px; color: var(--ink-faint); margin-left: auto; align-self: center; }
.kbmodal__foot { display: flex; align-items: center; justify-content: space-between; margin-top: 4px; }
.kbmodal__del { border: 1px solid var(--line); background: none; color: #e5484d; border-radius: 8px; padding: 7px 12px; font-size: 13px; cursor: pointer; }
.kbmodal__del:hover { background: #e5484d; color: #fff; border-color: #e5484d; }
.kbmodal__done { border: none; background: var(--accent); color: #fff; border-radius: 8px; padding: 8px 16px; font-size: 13px; font-weight: 700; cursor: pointer; }
.kbmodal__done:hover { filter: brightness(1.06); }

@media (max-width: 720px) {
  .eptool__side, .wbtool__side { width: 180px; }
}

/* ───────── Herramienta SongSense ───────── */
.ss { }
.ss-song { display: flex; align-items: center; gap: 9px; padding: 6px 8px; border-radius: 9px; cursor: pointer; }
.ss-song:hover { background: var(--hover); }
.ss-song.is-active { background: color-mix(in srgb, var(--accent) 16%, transparent); }
.ss-song__thumb { width: 46px; height: 35px; border-radius: 5px; object-fit: cover; flex-shrink: 0; background: var(--hover); }
.ss-song__meta { min-width: 0; flex: 1; display: flex; flex-direction: column; }
.ss-song__title { font-size: 13px; font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ss-song__artist { font-size: 11px; color: var(--ink-faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.ss-play, .ss-results, .ss-editor { max-width: 760px; margin: 0 auto; padding: 4px 6px 28px; }
.ss-play__head { display: flex; justify-content: space-between; margin-bottom: 8px; }
.ss-link { background: none; border: none; color: var(--ink-soft); font-size: 13px; font-weight: 600; cursor: pointer; padding: 4px 6px; border-radius: 6px; }
.ss-link:hover { background: var(--hover); color: var(--ink); }
.ss-link--danger { color: var(--danger); }
.ss-title { font-size: 22px; font-weight: 800; color: var(--ink); margin: 0; }
.ss-artist { font-size: 14px; color: var(--ink-faint); margin: 2px 0 16px; }

.ss-bar { position: sticky; top: 0; z-index: 5; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; margin-bottom: 20px; box-shadow: 0 4px 20px rgba(0,0,0,.12); }
.ss-videowrap { display: flex; justify-content: center; margin-bottom: 10px; }
/* El reproductor reemplaza el div por un <iframe>; lo dimensionamos y centramos */
.ss-videowrap iframe { width: 320px; max-width: 100%; height: 180px; border: none; border-radius: 8px; display: block; }
.ss-progress { height: 5px; background: var(--line); border-radius: 3px; margin-bottom: 10px; cursor: pointer; }
.ss-progress__fill { height: 100%; width: 0; background: var(--accent); border-radius: 3px; transition: width .4s linear; }
.ss-controls { display: flex; align-items: center; justify-content: center; gap: 8px; }
.ss-time { color: var(--ink-faint); font-size: 12px; margin-right: 4px; }
.ss-btn { padding: 8px 16px; background: var(--hover); border: 1px solid var(--line); border-radius: 8px; color: var(--ink); font-size: 13px; font-weight: 600; cursor: pointer; }
.ss-btn:hover { border-color: var(--accent); }
.ss-btn--primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.ss-btn--primary:hover { filter: brightness(1.06); }
.ss-btn--lg { padding: 12px 40px; font-size: 15px; }
.ss-hint { text-align: center; margin-top: 10px; font-size: 12px; color: var(--ink-faint); }
.ss-hint kbd { background: var(--bg); border: 1px solid var(--line); border-radius: 4px; padding: 1px 6px; font-family: monospace; font-size: 11px; }

.ss-game { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 22px 24px; margin-bottom: 20px; line-height: 2.4; }
.ss-game__label { color: var(--accent); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; text-align: center; margin: 0 0 14px; }
.ss-line { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: center; gap: 5px; margin-bottom: 3px; }
.ss-fixed { color: var(--ink-soft); font-size: 16px; }
.ss-blankwrap { display: inline-flex; align-items: baseline; }
.ss-blank { min-width: 2ch; background: transparent; border: none; border-bottom: 2px solid var(--line); color: var(--ink); font-size: 16px; text-align: center; outline: none; padding: 0; transition: border-color .2s; }
.ss-blank:focus { border-bottom-color: var(--accent); }
.ss-blank.is-filled { border-bottom-color: var(--accent); }
.ss-dots { text-align: center; padding-top: 14px; color: var(--ink-faint); letter-spacing: 6px; }
.ss-submit { display: flex; gap: 12px; align-items: center; justify-content: center; }
.ss-msg { color: var(--danger); font-size: 13px; }

.ss-score { position: relative; display: flex; align-items: center; gap: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 16px 20px; margin-bottom: 20px; }
.ss-score__pct { font-size: 44px; font-weight: 800; line-height: 1; }
.ss-score.is-good .ss-score__pct { color: #10b981; }
.ss-score.is-mid  .ss-score__pct { color: #f59e0b; }
.ss-score.is-bad  .ss-score__pct { color: var(--danger); }
.ss-score__meta { flex: 1; min-width: 0; }
.ss-score__meta .ss-title { font-size: 16px; }
.ss-score__meta .ss-artist { margin: 2px 0 0; }
.ss-score__video { width: 160px; height: 90px; border: none; border-radius: 8px; flex-shrink: 0; }

.ss-card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 18px 22px; margin-bottom: 14px; }
.ss-card__label { color: var(--accent); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; margin: 0 0 14px; }
.ss-card__label--warn { color: #f59e0b; }
.ss-rline { display: flex; flex-wrap: wrap; gap: 0 6px; align-items: flex-end; padding: 3px 4px; line-height: 2; }
.ss-rline--dim { opacity: .55; }
.ss-rline--dim .ss-fixed { font-size: 14px; }
.ss-ok { color: #10b981; font-size: 15px; font-weight: 600; }
.ss-pair { display: inline-flex; flex-direction: column; align-items: center; line-height: 1.2; }
.ss-corr { color: #10b981; font-size: 11px; font-weight: 700; }
.ss-bad { color: var(--danger); font-size: 15px; text-decoration: line-through; opacity: .85; }
.ss-miss { color: var(--ink-faint); font-size: 15px; letter-spacing: 2px; }
.ss-tr { color: var(--ink-faint); cursor: help; font-size: 13px; margin-left: 4px; }
.ss-after { margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--line); }
.ss-after h4 { color: var(--ink-faint); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; margin: 0 0 8px; }
.ss-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.ss-chip { background: var(--bg); border: 1px solid var(--line); border-radius: 6px; padding: 3px 9px; font-size: 12px; color: var(--ink); }
.ss-chip s { color: var(--danger); }
.ss-chip b { color: #10b981; }
.ss-chip--dim { color: var(--ink-faint); }

.ss-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 14px; }
.ss-field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 14px; font-size: 13px; color: var(--ink-faint); }
.ss-field > span { font-weight: 600; }
.ss-field input, .ss-field select, .ss-field textarea { width: 100%; padding: 10px 12px; background: var(--bg); border: 1px solid var(--line); border-radius: 8px; color: var(--ink); font-size: 14px; outline: none; box-sizing: border-box; }
.ss-field input:focus, .ss-field select:focus, .ss-field textarea:focus { border-color: var(--accent); }
.ss-field textarea { resize: vertical; font-family: monospace; line-height: 1.7; white-space: pre; }
.ss-preview { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.ss-preview img { width: 120px; height: 68px; border-radius: 6px; object-fit: cover; }
.ss-preview span { color: #10b981; font-size: 13px; }
.ss-tip { color: var(--ink-faint); font-size: 12px; margin: 0 0 12px; }
.ss-tip code { background: var(--bg); border: 1px solid var(--line); padding: 1px 5px; border-radius: 4px; }

@media (max-width: 640px) {
  .ss-grid2 { grid-template-columns: 1fr; }
  .ss-score { flex-wrap: wrap; }
}

.ss-adminbtn { display: flex; align-items: center; justify-content: center; gap: 6px; }
.ss-adminnote { text-align: center; font-size: 11px; color: #10b981; font-weight: 600; margin-top: 6px; }

/* SongSense — candado de administración (discreto, esquina inferior derecha) */
.wbtool.ss { position: relative; }
/* El panel principal debe poder scrollear (la letra puede ser larga) */
.wbtool.ss .wbtool__main { display: block; overflow-y: auto; }

/* Panel derecho: historial de partidas */
.ss-history { width: 232px; border-right: none; border-left: 1px solid var(--line); }
.ss-history .wbtool__tree { padding-bottom: 46px; }
.ss-hist-row { display: flex; align-items: center; gap: 8px; padding: 7px 8px; border-radius: 9px; cursor: pointer; }
.ss-hist-row:hover { background: var(--hover); }
.ss-hist-row__meta { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ss-hist-row__title { font-size: 12.5px; font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ss-hist-row__when { font-size: 10.5px; color: var(--ink-faint); }
.ss-hist-row__pct { font-size: 13px; font-weight: 800; flex-shrink: 0; }
.ss-hist-row__pct.is-good { color: #10b981; }
.ss-hist-row__pct.is-mid { color: #f59e0b; }
.ss-hist-row__pct.is-bad { color: var(--danger); }
@media (max-width: 820px) { .ss-history { display: none; } }
.ss-lock { position: absolute; right: 10px; bottom: 10px; z-index: 8; width: 30px; height: 30px; display: flex; align-items: center; justify-content: center; border-radius: 8px; border: 1px solid transparent; background: transparent; color: var(--ink-faint); font-size: 16px; cursor: pointer; opacity: .28; transition: opacity .2s, background .2s, border-color .2s; }
.ss-lock:hover { opacity: 1; background: var(--surface); border-color: var(--line); color: var(--ink); }

/* SongSense — modales */
.ss-ov { position: fixed; inset: 0; background: rgba(0,0,0,.5); display: flex; align-items: center; justify-content: center; z-index: 1000; padding: 20px; }
.ss-modal { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; width: 620px; max-width: 100%; max-height: 88vh; overflow: auto; padding: 20px 22px; box-shadow: 0 24px 70px rgba(0,0,0,.45); }
.ss-modal--sm { width: 360px; }
.ss-modal__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.ss-modal__title { font-size: 18px; font-weight: 800; color: var(--ink); }
.ss-modal__close { background: none; border: none; font-size: 22px; line-height: 1; color: var(--ink-faint); cursor: pointer; }
.ss-modal__close:hover { color: var(--ink); }

.ss-btn--sm { padding: 5px 10px; font-size: 12px; }
.ss-btn--danger { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 40%, var(--line)); }
.ss-btn--danger:hover { border-color: var(--danger); }

.ss-manage { margin-top: 18px; border-top: 1px solid var(--line); padding-top: 14px; }
.ss-manage__title { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-faint); margin: 0 0 10px; }
.ss-manage__row { display: flex; align-items: center; gap: 10px; padding: 6px 0; }
.ss-manage__row img { width: 48px; height: 36px; border-radius: 5px; object-fit: cover; flex-shrink: 0; }
.ss-manage__meta { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ss-manage__meta span { font-size: 13px; font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ss-manage__meta small { font-size: 11px; color: var(--ink-faint); }

/* ───────── Herramienta Daily Carry (flat lay) ───────── */
.dc-row { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 9px; cursor: pointer; }
.dc-row:hover { background: var(--hover); }
.dc-row.is-active { background: color-mix(in srgb, var(--accent) 16%, transparent); }
.dc-row__ico { flex-shrink: 0; display: inline-flex; align-items: center; color: var(--ink-faint); font-size: 13px; }
.dc-row__title { flex: 1; min-width: 0; font-size: 13px; font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dc-row__count { font-size: 11px; color: var(--ink-faint); }

.dctool .wbtool__main { overflow: hidden; }
.dc-editor { position: relative; display: flex; flex-direction: column; height: 100%; }
/* Barra flotante (Fondo / Agregar item) sobre el lienzo: no ocupa fila propia. */
.dc-bar { position: absolute; top: 12px; right: 14px; z-index: 9500; display: flex; align-items: center; gap: 8px; }
.dc-bar .dc-btn { box-shadow: 0 2px 10px rgba(0,0,0,.14); }
.dc-title { flex: 1; min-width: 0; font-size: 16px; font-weight: 700; color: var(--ink); background: transparent; border: none; outline: none; padding: 4px 0; }
.dc-btn { display: inline-flex; align-items: center; gap: 5px; padding: 8px 14px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); color: var(--ink); font-size: 13px; font-weight: 600; cursor: pointer; }
.dc-btn--primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.dc-btn--primary:hover { filter: brightness(1.06); }

.dc-stage { flex: 1; min-height: 0; padding: 0; overflow: hidden; }
/* El lienzo ocupa TODO el contenedor central (sin aspecto fijo ni márgenes). */
.dc-board { position: relative; width: 100%; height: 100%; overflow: hidden; touch-action: none;
  background:
    radial-gradient(circle at 1px 1px, color-mix(in srgb, var(--ink) 9%, transparent) 1px, transparent 0) 0 0 / 22px 22px,
    var(--bg); }
/* Capa de imagen de fondo (permite rotar las verticales a horizontal y cubrir). */
.dc-board__bg { position: absolute; inset: 0; overflow: hidden; z-index: 0; }
.dc-board__bg img { display: block; }
.dc-board.has-image { background: var(--bg); }
.dc-board__hint { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: var(--ink-faint); font-size: 14px; padding: 20px; text-align: center; z-index: 1; }
.dc-item { position: absolute; cursor: grab; user-select: none; }
.dc-item img { width: 100%; height: auto; display: block; pointer-events: none; filter: drop-shadow(0 6px 10px rgba(0,0,0,.22)); }
.dc-item.is-selected { outline: 2px dashed var(--accent); outline-offset: 4px; border-radius: 4px; }
.dc-item__del, .dc-item__resize { position: absolute; opacity: 0; transition: opacity .12s; }
.dc-item.is-selected .dc-item__del, .dc-item.is-selected .dc-item__resize, .dc-item:hover .dc-item__del, .dc-item:hover .dc-item__resize { opacity: 1; }
.dc-item__del { top: -10px; right: -10px; width: 20px; height: 20px; border: none; border-radius: 50%; background: var(--danger); color: #fff; font-size: 11px; line-height: 1; cursor: pointer; box-shadow: 0 1px 4px rgba(0,0,0,.3); }
.dc-item__resize { bottom: -8px; right: -8px; width: 16px; height: 16px; border-radius: 50%; background: var(--accent); border: 2px solid var(--surface); cursor: nwse-resize; }
.dc-foot { flex-shrink: 0; padding: 0 14px 12px; margin: 0; font-size: 12px; color: var(--ink-faint); }
.dc-loading { position: absolute; top: 12px; left: 50%; transform: translateX(-50%); z-index: 999; background: var(--ink); color: var(--surface); font-size: 13px; font-weight: 600; padding: 8px 16px; border-radius: 10px; }
.dc-item.is-grabbing { cursor: grabbing; }
/* nombre del item como etiqueta editable sobre el lienzo (modo flat lay) */
.dc-item__name { position: absolute; top: 100%; left: 50%; transform: translateX(-50%); margin-top: 4px; width: 120px; text-align: center; border: 1px solid transparent; border-radius: 7px; padding: 2px 6px; font: inherit; font-size: 11px; color: var(--ink); background: color-mix(in srgb, var(--surface) 86%, transparent); box-shadow: 0 1px 4px rgba(0,0,0,.12); }
.dc-item__name::placeholder { color: var(--ink-faint); }
.dc-item__name:hover { background: var(--surface); }
.dc-item__name:focus { outline: none; border-color: var(--accent); background: var(--surface); }

/* Daily Carry · selector de fondo */
.dc-bgwrap { position: relative; }
.dc-btn--sm { padding: 7px 11px; font-size: 12px; width: 100%; justify-content: center; }
.dc-bgpop { position: absolute; top: calc(100% + 8px); right: 0; z-index: 50; width: 220px; padding: 12px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 30px rgba(0,0,0,.18); }
.dc-sw-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin-bottom: 10px; }
.dc-sw { aspect-ratio: 1; border: 1px solid color-mix(in srgb, var(--ink) 16%, transparent); border-radius: 8px; cursor: pointer; padding: 0; }
.dc-sw:hover { transform: scale(1.08); }
.dc-sw.is-on { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
.dc-sw--grid { background:
  radial-gradient(circle at 2px 2px, color-mix(in srgb, var(--ink) 28%, transparent) 1.4px, transparent 0) 0 0 / 8px 8px,
  var(--bg); }
.dc-board.is-dark .dc-board__hint { color: rgba(255,255,255,.6); }

/* Daily Carry · panel de detalle (derecha, colapsable) */
.dc-detail { width: 290px; flex-shrink: 0; display: flex; flex-direction: column; overflow: hidden;
  border-left: 1px solid var(--line); background: color-mix(in srgb, var(--surface) 92%, var(--ink) 4%);
  transition: width .4s cubic-bezier(.33, 0, .2, 1), opacity .28s ease; }
.dc-detail__body { flex: 1; overflow-y: auto; padding: 14px; min-width: 262px; }
.dc-detail__empty { color: var(--ink-faint); font-size: 13px; text-align: center; padding: 36px 12px; line-height: 1.5; }
.dc-detail__thumb { width: 100%; aspect-ratio: 1; margin-bottom: 12px; border: 1px solid var(--line); border-radius: 12px;
  background:
    radial-gradient(circle at 1px 1px, color-mix(in srgb, var(--ink) 7%, transparent) 1px, transparent 0) 0 0 / 14px 14px,
    var(--bg);
  display: flex; align-items: center; justify-content: center; overflow: hidden; }
.dc-detail__thumb img { max-width: 82%; max-height: 82%; object-fit: contain; filter: drop-shadow(0 4px 8px rgba(0,0,0,.18)); }
.dc-field { width: 100%; margin-bottom: 10px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 9px;
  background: var(--surface); color: var(--ink); font-size: 13px; font-family: inherit; outline: none; }
.dc-field:focus { border-color: var(--accent); }
textarea.dc-field { resize: vertical; min-height: 64px; }
/* resumen del item en flat-lay (el detalle rico se edita en el modal de Setups) */
.dc-detail__nm { font-weight: 700; font-size: 14px; text-align: center; margin: 10px 0 2px; }
.dc-detail__sub { font-size: 12px; color: var(--ink-faint); text-align: center; }
.dc-detail__extra { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; margin: 10px 0; }
.dc-detail__extra img { width: 46px; height: 46px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); }
.dc-detail__edit { width: 100%; justify-content: center; margin: 12px 0 8px; }
.dc-rot { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--ink-soft); margin: 4px 0 14px; }
.dc-rot input { flex: 1; accent-color: var(--accent); }
.dc-detail__del { width: 100%; justify-content: center; color: #c0392b; border-color: color-mix(in srgb, #c0392b 35%, var(--line)); }
.dc-detail__del:hover { background: color-mix(in srgb, #c0392b 8%, var(--surface)); }

/* botón expandir del panel derecho */
.tool-expand--r { display: none; }
.dctool.is-detail-collapsed > .dc-detail { width: 14px; pointer-events: none; }
.dctool.is-detail-collapsed > .dc-detail > * { opacity: 0; transition: opacity .16s ease; }
.dctool.is-detail-collapsed > .tool-expand--r {
  display: flex; align-items: flex-start; justify-content: center; padding-top: 14px;
  width: 30px; flex-shrink: 0; border: none; border-left: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 92%, var(--ink) 4%);
  color: var(--ink-soft); cursor: pointer; font-size: 16px; }
.dctool.is-detail-collapsed > .tool-expand--r:hover { color: var(--accent); }

/* Daily Carry · swatches de fondos subidos */
.dc-pop-lbl { font-size: 11px; font-weight: 700; color: var(--ink-soft); margin: 4px 0 8px; text-transform: uppercase; letter-spacing: .04em; }
.dc-sw--img { background-size: cover; background-position: center; position: relative; overflow: visible; }
.dc-sw__x { position: absolute; top: -6px; right: -6px; width: 16px; height: 16px; border-radius: 50%; background: #c0392b; color: #fff; font-size: 9px; line-height: 16px; text-align: center; display: none; box-shadow: 0 1px 3px rgba(0,0,0,.3); }
.dc-sw--img:hover .dc-sw__x { display: block; }

/* Daily Carry · título (encabezado) y descripción (footer) dentro del lienzo */
.dc-bar__sp { display: none; }   /* barra ahora flotante: el spacer ya no se usa */
.dc-board__head, .dc-board__foot { position: absolute; left: 0; right: 0; z-index: 9000; pointer-events: none; padding: 16px 18px; }
.dc-board__head { top: 0; }
.dc-board__foot { bottom: 0; }
.dc-board__title, .dc-board__desc {
  pointer-events: auto; display: block; width: 100%; box-sizing: border-box;
  background: transparent; border: none; outline: none; font-family: inherit; text-align: center;
  text-shadow: 0 1px 2px rgba(0,0,0,.10);
}
.dc-board__title { font-size: 19px; font-weight: 800; letter-spacing: -.01em; color: var(--ink); }
.dc-board__desc { resize: none; overflow-y: auto; font-size: 12.5px; line-height: 1.4; color: var(--ink-soft); }
.dc-board__title::placeholder, .dc-board__desc::placeholder { color: var(--ink-faint); opacity: .9; }
.dc-board.is-dark .dc-board__title { color: #fff; }
.dc-board.is-dark .dc-board__desc { color: rgba(255,255,255,.82); }
.dc-board.is-dark .dc-board__title, .dc-board.is-dark .dc-board__desc { text-shadow: 0 1px 3px rgba(0,0,0,.5); }
.dc-board.is-dark .dc-board__title::placeholder, .dc-board.is-dark .dc-board__desc::placeholder { color: rgba(255,255,255,.5); }

/* ===== Setups · modo "Flat lay" (motor de Daily Carry embebido) ===== */
.flatlay-head { padding: 8px 0 4px; flex: none; }
.flatlay-title { font: inherit; font-size: 22px; font-weight: 700; letter-spacing: -.02em; border: none; background: transparent; width: 100%; padding: 4px 0; color: var(--ink); }
.flatlay-title:focus { outline: none; }
.flatlay-title::placeholder { color: var(--ink-faint); }
.flatlay-host { flex: 1 1 auto; min-height: 460px; display: flex; min-width: 0; }
.flatlay-host[hidden] { display: none; }   /* respeta hidden: el display:flex lo pisaba y dejaba un hueco vacío en Escena */
.dctool--embed { position: relative; flex: 1; display: flex; min-width: 0; min-height: 0; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--surface); }
.dctool--embed > .wbtool__main { flex: 1; min-width: 0; min-height: 0; overflow: hidden; }
/* La barra derecha de detalle usa la estructura canónica .wbtool__side--right:
   side-tabs.js le inyecta la pestaña centrada para colapsar (toggle is-detail-collapsed). */
.dctool--embed > .wbtool__side--right { background: color-mix(in srgb, var(--surface) 92%, var(--ink) 4%); }

/* Selector de tipo de setup al crear (Escena / Flat lay) */
.modepick { display: flex; gap: 14px; padding: 8px 4px 6px; }
.modepick__opt { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; padding: 22px 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); cursor: pointer; font-family: inherit; color: var(--ink); transition: border-color .15s, background .15s; }
.modepick__opt:hover { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 7%, var(--surface)); }
.modepick__opt i { font-size: 34px; color: var(--accent); }
.modepick__opt b { font-size: 16px; }
.modepick__opt span { font-size: 12.5px; color: var(--ink-faint); line-height: 1.35; }

/* ===== Pestaña de colapso centrada en el borde de las barras (global) ===== */
/* Oculta los controles antiguos (botón de arriba y franja de expandir) */
.tool-expand, .studio__expand { display: none !important; }
[data-collapse], [data-detail-collapse], #setupsCollapse, #legendCollapse { display: none !important; }

/* Ítem de ancho 0 sobre la juntura: la perilla circular monta sobre la línea */
.side-tab {
  flex-shrink: 0; width: 0; align-self: stretch;
  background: none; border: none; padding: 0; margin: 0; cursor: pointer;
  position: relative; z-index: 7;
}
.side-tab__grip {
  position: absolute; top: 50%; left: 0;
  transform: translate(-50%, -50%);
  display: flex; align-items: center; justify-content: center;
  width: 16px; height: 42px; border-radius: 7px;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--ink-soft); font-size: 12px;
  box-shadow: 0 1px 5px rgba(0, 0, 0, .12);
  transition: background .15s ease, color .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.side-tab:hover .side-tab__grip {
  color: #fff;
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 2px 9px color-mix(in srgb, var(--accent) 45%, transparent);
}

/* Botón "crear" reubicado al encabezado: mismo estilo que el ＋ por colección */
.tool-side-add--top { flex-shrink: 0; margin: 0 0 0 6px; padding: 0; }
/* si la barra tiene colecciones + items, el "+" de colección va en negrita */
.tool-side-add--top.is-collections { font-size: 16px; font-weight: 800; }

/* Quita el bloque descriptivo superior de las herramientas.
   Solo el que va seguido del shell; el "Cargando…" suelto (sin hermano) se mantiene. */
.tool-desc:has(+ *) { display: none; }

/* ===== TeamBreak (salas de juego en tiempo real) ===== */
.tbtool { position: relative; height: calc(100vh - 168px); min-height: 460px; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--surface); }
.tb-center { height: 100%; display: flex; align-items: center; justify-content: center; padding: 20px; }
.tb-card { width: min(380px, 100%); text-align: center; padding: 28px 26px; border: 1px solid var(--line); border-radius: 16px; background: var(--bg); }
.tb-logo { font-size: 44px; color: var(--accent); line-height: 1; }
.tb-card h2 { margin: 10px 0 4px; font-size: 22px; }
.tb-sub { color: var(--ink-soft); font-size: 13px; margin: 0 0 18px; }
.tb-or { color: var(--ink-faint); font-size: 12px; margin: 16px 0 10px; }
.tb-join { display: flex; gap: 8px; }
.tb-code-input { flex: 1; text-align: center; letter-spacing: .35em; font-weight: 800; font-size: 20px; text-transform: uppercase; padding: 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink); outline: none; }
.tb-code-input:focus { border-color: var(--accent); }

.tb-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 10px 16px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink); font-weight: 600; font-size: 14px; cursor: pointer; }
.tb-btn:hover { border-color: var(--accent); }
.tb-btn--primary { background: var(--accent); border-color: var(--accent); color: #fff; width: 100%; }
.tb-btn--primary:disabled { opacity: .5; cursor: not-allowed; }
.tb-btn--ghost { background: none; }
.tb-btn--sm { padding: 6px 11px; font-size: 12.5px; }

/* sala (lobby) */
.tb-room { height: 100%; display: flex; flex-direction: column; padding: 16px; gap: 14px; }
.tb-room__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.tb-room__code { font-size: 17px; } .tb-room__code b { letter-spacing: .15em; font-size: 22px; color: var(--accent); }
.tb-room__actions { display: flex; align-items: center; gap: 8px; }
.tb-hint { color: var(--ink-faint); font-size: 13px; } .tb-hint--c { text-align: center; }
.tb-members { display: flex; flex-wrap: wrap; gap: 12px; padding: 6px 0; }
.tb-member { display: flex; flex-direction: column; align-items: center; gap: 5px; width: 72px; }
.tb-member img, .tb-member__ph { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; border: 2px solid var(--line); }
.tb-member.is-host img, .tb-member.is-host .tb-member__ph { border-color: var(--accent); }
.tb-member__ph { display: flex; align-items: center; justify-content: center; background: var(--bg); color: var(--ink-faint); font-size: 24px; }
.tb-member__name { font-size: 12px; max-width: 72px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* chat */
.tb-chat { flex: 1; min-height: 0; display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--bg); }
.tb-chat__list { flex: 1; overflow-y: auto; padding: 10px 12px; display: flex; flex-direction: column; gap: 5px; font-size: 13px; }
.tb-line { color: var(--ink); }
.tb-line--sys { color: var(--ink-faint); font-style: italic; text-align: center; }
.tb-line--ok { color: #10b981; font-weight: 600; }
.tb-line--close { color: var(--ink-soft); }
.tb-close-tag { font-size: 10px; background: color-mix(in srgb, #f59e0b 22%, transparent); color: #b45309; padding: 1px 5px; border-radius: 6px; }
.tb-chat__form { display: flex; gap: 8px; padding: 8px; border-top: 1px solid var(--line); }
.tb-chat__input { flex: 1; padding: 9px 11px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); color: var(--ink); outline: none; }
.tb-chat__input:focus { border-color: var(--accent); }

/* juego */
.tb-game { height: 100%; display: flex; }
.tb-game__stage { flex: 1; min-width: 0; display: flex; flex-direction: column; padding: 12px; gap: 10px; }
.tb-game__bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 14px; flex-wrap: wrap; }
.tb-round { font-weight: 700; color: var(--ink-soft); }
.tb-word__mask { letter-spacing: .25em; font-weight: 800; font-size: 20px; }
.tb-word__len { color: var(--ink-faint); font-size: 12px; }
.tb-word--mine b { color: var(--accent); }
.tb-timer { font-weight: 700; }
.tb-canvas-wrap { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; }
.tb-canvas { max-width: 100%; max-height: 100%; aspect-ratio: 900/560; background: #fff; border: 1px solid var(--line); border-radius: 10px; touch-action: none; box-shadow: 0 2px 10px rgba(0,0,0,.06); }
.tb-tools { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.tb-tools.is-hidden { visibility: hidden; }
.tb-swatch { width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--line); cursor: pointer; padding: 0; }
.tb-swatch.is-on { outline: 2px solid var(--accent); outline-offset: 1px; }
.tb-tools__sep { width: 1px; height: 22px; background: var(--line); margin: 0 4px; }
.tb-size { width: 30px; height: 30px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); cursor: pointer; color: var(--ink-soft); }
.tb-size.is-on { border-color: var(--accent); color: var(--accent); }

.tb-game__side { width: 290px; flex-shrink: 0; display: flex; flex-direction: column; gap: 10px; padding: 12px 12px 12px 0; }
.tb-score { border: 1px solid var(--line); border-radius: 12px; padding: 10px; background: var(--bg); }
.tb-score__title { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-soft); margin-bottom: 6px; }
.tb-score__row { display: flex; align-items: center; gap: 8px; padding: 4px 4px; border-radius: 8px; font-size: 13px; }
.tb-score__row.is-drawer { background: color-mix(in srgb, var(--accent) 9%, transparent); }
.tb-score__row.is-correct { color: #10b981; }
.tb-score__rank { width: 16px; color: var(--ink-faint); font-size: 12px; text-align: center; }
.tb-score__av { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; }
.tb-score__av--ph { display: flex; align-items: center; justify-content: center; background: var(--surface); color: var(--ink-faint); }
.tb-score__name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.tb-score__pts { font-weight: 800; }
.tb-chat--side { min-height: 0; }

.tb-toast { position: absolute; bottom: 16px; left: 50%; transform: translateX(-50%); background: var(--ink); color: var(--surface); padding: 9px 16px; border-radius: 999px; font-size: 13px; z-index: 20; box-shadow: 0 6px 20px rgba(0,0,0,.25); }

@media (max-width: 820px) {
  .tb-game { flex-direction: column; }
  .tb-game__side { width: auto; padding: 0 12px 12px; }
}

/* ===== Gente (red de personas) ===== */
.gentetool .wbtool__main { overflow-y: auto; }
.gente-detail { padding: 22px; max-width: 620px; }
.gente-detail__head { display: flex; align-items: center; gap: 16px; }
.gente-detail__av { width: 76px; height: 76px; border-radius: 50%; object-fit: cover; border: 1px solid var(--line); flex: none; }
.gente-detail__av--ph { display: flex; align-items: center; justify-content: center; background: var(--bg); color: var(--ink-faint); font-size: 34px; }
.gente-detail__id { flex: 1; min-width: 0; }
.gente-detail__name { margin: 0; font-size: 21px; font-weight: 800; }
.gente-detail__sub { color: var(--ink-soft); font-size: 13px; margin-top: 2px; }
.gente-detail__loc { color: var(--ink-faint); font-size: 13px; display: flex; align-items: center; gap: 4px; margin-top: 3px; }
.gente-unfollow { display: inline-flex; align-items: center; gap: 6px; padding: 8px 13px; border: 1px solid color-mix(in srgb, #c0392b 35%, var(--line)); border-radius: 9px; background: transparent; color: #c0392b; font-weight: 600; font-size: 13px; cursor: pointer; flex: none; }
.gente-unfollow:hover { background: color-mix(in srgb, #c0392b 8%, var(--surface)); }
.gente-unfollow:disabled { opacity: .5; cursor: default; }
.gente-detail__bio { margin: 16px 0 0; color: var(--ink-soft); font-size: 14px; line-height: 1.5; }
.gente-stats { display: flex; gap: 10px; margin-top: 18px; flex-wrap: wrap; }
.gente-stat { flex: 1; min-width: 90px; text-align: center; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); }
.gente-stat b { display: block; font-size: 20px; font-weight: 800; }
.gente-stat span { font-size: 11.5px; color: var(--ink-faint); }
.gente-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 16px; }
.gente-tag { font-size: 12px; padding: 4px 10px; border-radius: 999px; background: var(--hover); color: var(--ink-soft); }

/* Gente · selector de miembros de un grupo */
.gente-picker { position: absolute; inset: 0; z-index: 30; display: flex; align-items: center; justify-content: center; background: rgba(14,17,22,.4); padding: 20px; }
.gente-picker__card { width: min(360px, 100%); max-height: 80%; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; box-shadow: 0 20px 50px rgba(0,0,0,.28); }
.gente-picker__head { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; border-bottom: 1px solid var(--line); font-weight: 700; font-size: 14px; }
.gente-picker__x { border: none; background: none; cursor: pointer; color: var(--ink-soft); font-size: 15px; }
.gente-picker__list { overflow-y: auto; padding: 6px; }
.gente-picker__row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 9px; cursor: pointer; font-size: 14px; }
.gente-picker__row:hover { background: var(--hover); }
.gente-picker__row img, .gente-picker__ph { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; flex: none; }
.gente-picker__ph { display: flex; align-items: center; justify-content: center; background: var(--bg); color: var(--ink-faint); }
.gente-picker__row input { accent-color: var(--accent); }
.gente-picker__empty { padding: 24px 14px; text-align: center; color: var(--ink-faint); font-size: 13px; }
.gente-host { display: block; }

/* Gente · grupos */
.gente-seal { color: var(--accent); font-size: 13px; vertical-align: -1px; }
.gente-grp-label, .gente-mems-label { padding: 12px 10px 4px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-soft); }
.gente-grp-label--row { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.gente-lbl-add { border: none; background: none; color: var(--ink-soft); cursor: pointer; font-size: 15px; line-height: 1; padding: 1px 5px; border-radius: 6px; }
.gente-lbl-add:hover { color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent); }
.gente-grp .wbtool__note-ico { color: var(--ink-soft); }
.gente-invites { margin: 4px 6px 8px; padding: 8px; border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--line)); border-radius: 10px; background: color-mix(in srgb, var(--accent) 6%, transparent); }
.gente-invites__t { font-size: 11px; font-weight: 700; text-transform: uppercase; color: var(--accent); margin-bottom: 4px; }
.gente-invite { display: flex; align-items: center; gap: 6px; padding: 3px 2px; font-size: 13px; }
.gente-invite__name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gente-invite__ok, .gente-invite__no { width: 22px; height: 22px; border-radius: 6px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; font-size: 11px; }
.gente-invite__ok { color: #10b981; } .gente-invite__no { color: #c0392b; }

/* detalle de grupo */
.gente-gdetail { padding: 22px; max-width: 680px; }
.gente-gdetail__head { display: flex; align-items: flex-start; gap: 14px; }
.gente-gdetail__ico { width: 60px; height: 60px; border-radius: 14px; flex: none; display: flex; align-items: center; justify-content: center; background: var(--bg); border: 1px solid var(--line); color: var(--accent); font-size: 28px; }
.gente-gdetail__id { flex: 1; min-width: 0; }
.gente-gdetail__name { margin: 0; font-size: 21px; font-weight: 800; display: flex; align-items: center; gap: 6px; }
.gente-gdetail__meta { color: var(--ink-faint); font-size: 13px; margin-top: 3px; }
.gente-typebadge { background: var(--hover); color: var(--ink-soft); padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.gente-gdetail__actions { display: flex; gap: 8px; flex-wrap: wrap; }
.gente-gdetail__desc { margin: 16px 0 0; color: var(--ink-soft); font-size: 14px; line-height: 1.5; }
.gente-mems { display: flex; flex-direction: column; gap: 4px; }
.gente-mem { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 9px; font-size: 14px; }
.gente-mem:hover { background: var(--hover); }
.gente-mem img, .gente-mem__ph { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; flex: none; }
.gente-mem__ph { display: flex; align-items: center; justify-content: center; background: var(--bg); color: var(--ink-faint); }
.gente-mem__name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gente-mem__role { font-size: 11px; color: var(--accent); font-weight: 600; }

/* solicitudes / votación */
.gente-reqs { margin-top: 16px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); }
.gente-reqs__t { font-size: 11px; font-weight: 700; text-transform: uppercase; color: var(--ink-soft); margin-bottom: 8px; }
.gente-req { display: flex; align-items: center; gap: 8px; padding: 4px 0; font-size: 14px; }
.gente-req img, .gente-req .gente-mem__ph { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; }
.gente-req__name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gente-req__tally { font-size: 12px; color: var(--ink-faint); }
.gente-req__yes, .gente-req__no { padding: 4px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); cursor: pointer; font-size: 12.5px; }
.gente-req__yes.is-on { background: #10b981; border-color: #10b981; color: #fff; }
.gente-req__no.is-on { background: #c0392b; border-color: #c0392b; color: #fff; }

/* crear grupo */
.gente-create { width: min(440px, 100%); }
.gente-create__body { padding: 14px; display: flex; flex-direction: column; gap: 10px; overflow-y: auto; }
.gente-input { width: 100%; padding: 9px 11px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); color: var(--ink); font-family: inherit; font-size: 14px; outline: none; box-sizing: border-box; }
.gente-input:focus { border-color: var(--accent); }
.gente-create__inv-label { font-size: 12px; font-weight: 700; color: var(--ink-soft); margin-top: 2px; }
.gente-create__inv { max-height: 200px; overflow-y: auto; border: 1px solid var(--line); border-radius: 9px; padding: 4px; }
.gente-create__foot { padding: 12px 14px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; }
.gente-picker__add { margin-left: auto; font-size: 12px; color: var(--accent); font-weight: 600; }

/* Gente · icono de grupo */
.gente-grp__icon { width: 22px; height: 22px; border-radius: 6px; object-fit: cover; display: block; }
.gente-gdetail__ico img { width: 100%; height: 100%; object-fit: cover; border-radius: 14px; }
.gente-gdetail__ico { overflow: hidden; }
.gente-edit-icon { display: flex; align-items: center; gap: 12px; }
.gente-edit-icon__prev { width: 56px; height: 56px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg); display: flex; align-items: center; justify-content: center; overflow: hidden; color: var(--accent); font-size: 24px; flex: none; }
.gente-edit-icon__prev img { width: 100%; height: 100%; object-fit: cover; }

/* Gente · vista de grupo: miembros (centro) + detalle (barra derecha) */
.gentetool .wbtool__main { overflow: hidden; }
.gentetool .gente-detail { flex: 1; overflow-y: auto; }
.gentetool .wbtool__empty { flex: 1; }
.gente-group { flex: 1; display: flex; min-height: 0; }
.gente-group__members { flex: 1; min-width: 0; overflow-y: auto; padding: 16px 18px; }
.gente-group__side { width: 300px; flex-shrink: 0; overflow-y: auto; border-left: 1px solid var(--line); padding: 18px; background: color-mix(in srgb, var(--surface) 96%, var(--ink) 2%); }

.gmcard-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; }
.gmcard { aspect-ratio: 1; border: 1px solid var(--line); border-radius: 16px; padding: 16px 12px; background: var(--bg); cursor: pointer; transition: border-color .12s, box-shadow .12s; display: flex; flex-direction: column; align-items: center; text-align: center; overflow: hidden; }
.gmcard:hover { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 10%, transparent); }
.gmcard__av { width: 60px; height: 60px; border-radius: 50%; object-fit: cover; flex: none; }
.gmcard__av--ph { display: flex; align-items: center; justify-content: center; background: var(--surface); color: var(--ink-faint); font-size: 28px; border: 1px solid var(--line); }
.gmcard__name { font-weight: 700; font-size: 14px; margin-top: 8px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gmcard__role { font-size: 10px; font-weight: 600; color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent); padding: 1px 7px; border-radius: 999px; margin-top: 3px; }
.gmcard__sub { font-size: 12px; color: var(--ink-soft); margin-top: 3px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gmcard__loc { font-size: 11.5px; color: var(--ink-faint); margin-top: 5px; display: flex; align-items: center; gap: 3px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gmcard__stats { margin-top: auto; display: flex; gap: 12px; padding-top: 10px; font-size: 12.5px; font-weight: 600; color: var(--ink-soft); }
.gmcard__stats span { display: inline-flex; align-items: center; gap: 4px; }
.gmcard__stats i { color: var(--accent); font-size: 15px; }

.gside__icon { width: 84px; height: 84px; border-radius: 18px; border: 1px solid var(--line); background: var(--bg); display: flex; align-items: center; justify-content: center; overflow: hidden; color: var(--accent); font-size: 38px; position: relative; }
.gside__icon img { width: 100%; height: 100%; object-fit: cover; }
.gside__icon.is-editable { cursor: pointer; }
.gside__icon-edit { position: absolute; bottom: 0; right: 0; width: 26px; height: 26px; background: var(--accent); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 13px; border-top-left-radius: 10px; }
.gside__icon.is-loading { opacity: .55; }
.gside__name { margin: 14px 0 0; font-size: 20px; font-weight: 800; display: flex; align-items: center; gap: 6px; }
.gside__name-input { margin: 14px 0 0; width: 100%; font-size: 20px; font-weight: 800; border: none; background: transparent; color: var(--ink); outline: none; padding: 2px 0; border-bottom: 1px dashed transparent; }
.gside__name-input:hover { border-bottom-color: var(--line); }
.gside__name-input:focus { border-bottom-color: var(--accent); }
.gside__meta { margin-top: 5px; color: var(--ink-faint); font-size: 13px; }
.gside__desc { margin: 12px 0 0; font-size: 13.5px; color: var(--ink-soft); line-height: 1.5; }
.gside__desc-input { margin: 12px 0 0; width: 100%; font-size: 13.5px; color: var(--ink-soft); line-height: 1.5; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); padding: 8px 10px; resize: vertical; font-family: inherit; outline: none; box-sizing: border-box; }
.gside__desc-input:focus { border-color: var(--accent); }
.gside__actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }

/* Gente · org no-miembro (sumarte) */
.gente-grp--join { opacity: .9; }
.gente-grp__joinhint { font-size: 9.5px; font-weight: 700; color: var(--accent); background: color-mix(in srgb, var(--accent) 13%, transparent); padding: 1px 6px; border-radius: 999px; margin-left: 4px; text-transform: uppercase; letter-spacing: .03em; }

/* Gente · invitación a la organización (no miembro) */
.gside__orgprompt { margin-top: 14px; padding: 12px; border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--line)); border-radius: 12px; background: color-mix(in srgb, var(--accent) 7%, transparent); font-size: 13px; color: var(--ink-soft); line-height: 1.45; }
.gside__orgprompt i { color: var(--accent); }
.gside__orgprompt b { color: var(--ink); }

/* Etiqueta "sin verificar" en el árbol */
.gente-grp__pending { font-size: 10px; font-weight: 700; color: var(--ink-faint); text-transform: uppercase; letter-spacing: .03em; }

/* Panel de verificación de dominio (detalle de organización) */
.gside__verify { margin-top: 14px; padding: 13px; border: 1px solid var(--line); border-radius: 12px; background: color-mix(in srgb, var(--ink) 3%, var(--surface)); }
.gside__verify-t { font-size: 13.5px; font-weight: 700; color: var(--ink); display: flex; align-items: center; gap: 6px; }
.gside__verify-t i { color: var(--accent); }
.gside__verify-lead { margin: 8px 0; font-size: 12.5px; color: var(--ink-soft); line-height: 1.45; }
.gside__dns { display: flex; flex-direction: column; gap: 5px; padding: 10px; border-radius: 9px; background: var(--bg); border: 1px solid var(--line); font-size: 12.5px; color: var(--ink); }
.gside__dns-k { display: inline-block; min-width: 44px; color: var(--ink-faint); font-weight: 600; margin-right: 6px; }
.gside__dns-val { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.gside__dns-val code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12px; word-break: break-all; background: color-mix(in srgb, var(--accent) 10%, transparent); padding: 2px 6px; border-radius: 6px; }
.gente-copy { border: 1px solid var(--line); background: var(--surface); color: var(--ink-soft); font-size: 11px; padding: 3px 8px; border-radius: 6px; cursor: pointer; }
.gente-copy:hover { border-color: var(--accent); color: var(--accent); }
.gside__verify [data-verify] { margin-top: 10px; }
.gside__verify-hint { margin-top: 8px; font-size: 11.5px; color: var(--ink-faint); line-height: 1.4; }

/* Modal reclamar organización */
.gente-claim__lead { margin: 0 0 4px; font-size: 13px; color: var(--ink-soft); line-height: 1.5; }
.gente-claim__err { font-size: 12.5px; color: #c0392b; }

/* Invitar a org con buscador */
.gente-orginvite { padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.gente-orginvite .gente-picker__list { max-height: 320px; overflow-y: auto; }

/* ===== Gente: layout de 3 columnas (tree · feed · integrantes) ===== */
.gentetool--3 .gente-center { flex: 1; min-width: 0; overflow-y: auto; padding: 18px 20px; }
.gentetool--3 .gente-right { width: 340px; flex-shrink: 0; border-left: 1px solid var(--line); overflow-y: auto; padding: 14px; background: color-mix(in srgb, var(--ink) 2%, var(--surface)); }
.gente-right__head { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-soft); margin-bottom: 10px; }

/* Encabezado del scope (feed) */
.gente-scope { display: flex; flex-direction: column; }
.gente-scope__head { display: flex; align-items: center; gap: 12px; }
.gente-scope__ico { position: relative; width: 46px; height: 46px; border-radius: 12px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; overflow: hidden; background: color-mix(in srgb, var(--accent) 10%, var(--surface)); border: 1px solid var(--line); font-size: 22px; color: var(--accent); }
.gente-scope__ico img { width: 100%; height: 100%; object-fit: cover; }
.gente-scope__ico.is-editable { cursor: pointer; }
.gente-scope__id { min-width: 0; flex: 1; }
.gente-scope__name { margin: 0; font-size: 19px; font-weight: 800; display: flex; align-items: center; gap: 6px; }
.gente-scope__meta { font-size: 12.5px; color: var(--ink-soft); margin-top: 2px; }
.gente-scope__actions { display: flex; gap: 8px; flex-shrink: 0; flex-wrap: wrap; }
.gente-scope__desc { margin: 12px 0 0; font-size: 13.5px; color: var(--ink-soft); line-height: 1.5; }
/* selector de acceso de la organización (Organizaciones tool) */
.orgtype { display: flex; align-items: center; gap: 10px; margin: 12px 0 0; }
.orgtype > span { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .3px; color: var(--ink-faint); }
.orgtype select { flex: 1; max-width: 380px; }

/* Feed */
.gente-scope__feed { margin-top: 16px; border-top: 1px solid var(--line); padding-top: 10px; display: flex; flex-direction: column; gap: 2px; }
.gente-feed__empty { color: var(--ink-faint); font-size: 13px; padding: 18px 2px; text-align: center; }
.feed-item { display: flex; align-items: center; gap: 11px; padding: 10px 8px; border-radius: 10px; }
.feed-item:hover { background: color-mix(in srgb, var(--ink) 3%, transparent); }
.feed-item__av { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.feed-item__av--ph { display: flex; align-items: center; justify-content: center; background: var(--hover); color: var(--ink-faint); }
.feed-item__body { flex: 1; min-width: 0; }
.feed-item__text { font-size: 13.5px; color: var(--ink); line-height: 1.4; }
.feed-item__time { font-size: 11.5px; color: var(--ink-faint); margin-top: 2px; }
.feed-item--link { cursor: pointer; }
/* Botón completar */
.feed-item__check { flex-shrink: 0; width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); color: var(--ink-faint); cursor: pointer; font-size: 16px; display: flex; align-items: center; justify-content: center; transition: all .15s; }
.feed-item__check:hover { border-color: var(--accent); color: var(--accent); }
.feed-item.is-done { opacity: .55; }
.feed-item.is-done .feed-item__text { text-decoration: line-through; }
.feed-item.is-done .feed-item__check { background: var(--accent); border-color: var(--accent); color: #fff; }

/* Botón volver (perfil de persona en el centro) */
.gente-back { background: none; border: none; color: var(--ink-soft); font-size: 13px; cursor: pointer; padding: 0 0 12px; display: inline-flex; align-items: center; gap: 5px; }
.gente-back:hover { color: var(--accent); }

/* En la columna derecha la grilla de integrantes va a 1 columna */
/* Integrantes en 2 columnas en el panel derecho */
.gente-right .gmcard-grid { grid-template-columns: 1fr 1fr; gap: 10px; }

/* Colapsar el panel derecho de Gente (perilla .side-tab vía side-tabs.js) */
.gentetool.is-detail-collapsed > .gente-right { width: 14px; pointer-events: none; overflow: hidden; }
.gentetool.is-detail-collapsed > .gente-right > * { opacity: 0; transition: opacity .16s ease; }

/* Gastos · recurrencia */
.exptool__in--recur { flex: 0 0 auto; min-width: 100px; }
.exprow__recur { font-size: 11px; font-weight: 600; color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent); padding: 1px 8px; border-radius: 999px; white-space: nowrap; }
.exprow__recur.is-off { color: var(--ink-faint); background: var(--hover); }
.exprow__x { color: var(--ink-faint); font-weight: 500; font-size: 11.5px; }
.exprow__toggle { border: none; background: none; cursor: pointer; color: var(--ink-soft); font-size: 13px; padding: 2px 4px; }
.exprow__toggle:hover { color: var(--accent); }
.exprow.is-off { opacity: .55; }
.exprow.is-off .exprow__name { text-decoration: line-through; }
.kbmodal__check { display: flex; align-items: center; gap: 7px; font-size: 13px; color: var(--ink-soft); cursor: pointer; }
.kbmodal__check input { accent-color: var(--accent); }

/* Ícono SVG a medida de un tool (ej. pecera de Mascotas): escala como un ícono de fuente */
.tool-svg-ico { width: 1em; height: 1em; display: inline-block; vertical-align: -0.15em; flex: none; }

/* Kanban · selector de color de tablero */
.kb-colorpop { position: fixed; top: 92px; left: 50%; transform: translateX(-50%); z-index: 60; display: flex; gap: 8px; padding: 11px 13px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 14px 34px rgba(0,0,0,.22); }
.kb-swatch { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--line); cursor: pointer; padding: 0; }
.kb-swatch:hover { transform: scale(1.1); }
.kb-swatch.is-on { outline: 2px solid var(--ink); outline-offset: 1px; }

/* Visor de imágenes (lightbox) — usado en el detalle de tarjetas de Kanban */
.rh-lightbox { position: fixed; inset: 0; z-index: 200; background: rgba(0,0,0,.85); display: flex; align-items: center; justify-content: center; padding: 24px; overflow: auto; }
.rh-lightbox__img { max-width: 96vw; max-height: 92vh; object-fit: contain; cursor: zoom-in; border-radius: 6px; box-shadow: 0 12px 44px rgba(0,0,0,.5); }
.rh-lightbox__img.is-zoomed { max-width: none; max-height: none; cursor: zoom-out; }
.rh-lightbox__x { position: fixed; top: 16px; right: 20px; width: 38px; height: 38px; border-radius: 50%; border: none; background: rgba(255,255,255,.16); color: #fff; font-size: 16px; cursor: pointer; }
.rh-lightbox__x:hover { background: rgba(255,255,255,.3); }
