/* t508 · barra superior fija por áreas (UTF-8). Revertir: ver nav_t508.py */
html.t508{overflow-x:hidden}
html.t508 body{padding-top:calc(var(--t5h,54px) + env(safe-area-inset-top,0px))!important;overflow-x:hidden!important;max-width:100vw;padding-bottom:16px!important}
html.t508 #barraTareasActivasGlobal,html.t508 #dockNavegacionMaestra,html.t508 #top_quick_bar_f33,html.t508 nav.nav,
html.t508 body>header,html.t508 .status-strip,html.t508 .nav-tabs{display:none!important}
html.t508 img,html.t508 video,html.t508 iframe,html.t508 table{max-width:100%}
html.t508 pre{white-space:pre-wrap;word-break:break-word}
html.t508-solo .sec,html.t508-solo [id^="view_"]{display:none!important}
#t508bar{position:fixed;top:0;left:0;right:0;z-index:9990;display:flex;align-items:center;height:auto;max-height:132px;min-height:54px;padding-top:env(safe-area-inset-top,0px);
 background:rgba(8,12,22,.97);border-bottom:1px solid #22314d;box-shadow:0 2px 10px #0008;font-family:system-ui,-apple-system,"Segoe UI",sans-serif;box-sizing:border-box;overflow:visible}
html.t508{--t5h:72px}
#t508bar .t5s{flex:1 1 auto;min-width:0;display:grid;grid-auto-flow:column;grid-template-rows:auto auto;grid-auto-columns:max-content;gap:2px;overflow-x:auto;overflow-y:hidden;scrollbar-width:thin;scrollbar-color:#94a3b8 #0b1220;padding:0 4px;max-height:120px;-webkit-overflow-scrolling:touch}
#t508bar .t5s::-webkit-scrollbar{display:block;height:8px}
#t508bar .t5s::-webkit-scrollbar-thumb{background:#64748b;border-radius:4px}
#t508bar button{font-family:inherit}
#t508bar .t5a{flex:0 0 auto;min-width:52px;background:none;border:0;color:#a8b3c7;display:flex;flex-direction:column;align-items:center;justify-content:center;
 font-size:10.5px;font-weight:700;padding:2px 6px;border-radius:9px;cursor:pointer;line-height:1.1;margin:2px 0;align-self:center;height:auto;max-height:72px}
#t508bar .t5a .i{font-size:19px;line-height:22px}
#t508bar .t5a:hover{background:#16213a;color:#fff}
#t508bar .t5a.on{background:#1d4ed8;color:#fff}
#t508tk{flex:0 0 auto;display:flex;flex-direction:column;align-items:center;justify-content:center;min-width:58px;margin:5px 6px 5px 2px;border-radius:10px;
 border:1px solid #334155;background:#0f172a;color:#86efac;font-size:10.5px;font-weight:800;cursor:pointer;padding:0 6px;position:relative}
#t508tk .n{font-size:15px;line-height:17px}
#t508tk.act{border-color:#f59e0b;color:#fde68a;background:#3a2a06}
#t508tk .p{position:absolute;left:0;bottom:0;height:3px;background:#f59e0b;border-radius:0 0 0 10px}
#t508head{display:flex;align-items:center;gap:6px;padding:5px 8px;background:#0b1220;border-bottom:1px solid #1e293b;font-family:system-ui,sans-serif;max-width:100vw;box-sizing:border-box}
#t508head .t5nav{flex:0 0 auto;background:#1e293b;color:#e2e8f0;border:1px solid #334155;border-radius:8px;padding:5px 8px;font-size:12px;font-weight:800;cursor:pointer;white-space:nowrap}
#t508head .t5ttl{flex:0 0 auto;color:#7dd3fc;font-weight:900;font-size:13px;white-space:nowrap}
#t508head .t5chips{flex:1 1 auto;min-width:0;display:flex;gap:5px;overflow-x:auto;scrollbar-width:thin}
.t5c{flex:0 0 auto;background:#172036;color:#e2e8f0;border:1px solid #2b3b5c;border-radius:8px;padding:5px 9px;font-size:12px;font-weight:700;cursor:pointer;white-space:nowrap;text-decoration:none;font-family:system-ui,sans-serif}
.t5c:hover{border-color:#60a5fa;color:#fff}
.t5c.plan{opacity:.55;border-style:dashed}
.t5c.auto{border-color:#3f3f46;color:#cbd5e1}
#t508grid{display:none;padding:10px;font-family:system-ui,sans-serif}
html.t508-solo #t508grid,#t508grid.open{display:block}
#t508grid h4{margin:10px 2px 6px;color:#94a3b8;font-size:12px;text-transform:uppercase;letter-spacing:.05em}
#t508grid .g{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:8px}
#t508grid .g .t5c{white-space:normal;text-align:left;padding:10px;font-size:13px;min-height:44px}
#t508frame{display:none;width:100%;border:0;background:#0b0d13}
html.t508-frame #t508frame{display:block}
/* t1318: el iframe ocupa solo el hueco visible bajo las barras. Si sobresalía, el lightbox (position:fixed) cortaba los botones en 720p. */
html.t508.t508-frame,html.t508.t508-frame body{overflow:hidden!important;max-height:100%;max-height:100dvh;max-height:100svh}
html.t508.t508-frame body{padding-bottom:0!important}
html.t508.t508-frame #t508frame{
 position:fixed!important;left:0;right:0;width:100%;
 top:calc(var(--t5h,54px) + env(safe-area-inset-top,0px))!important;
 bottom:0!important;
 height:calc(100dvh - var(--t5h,54px) - env(safe-area-inset-top,0px))!important;
 max-height:calc(100dvh - var(--t5h,54px) - env(safe-area-inset-top,0px))!important;
 border:0;background:#0b0d13}
html.t508.t508-frame.s662:not(.t1258pleg) #t508frame{
 top:calc(var(--t5h,54px) + var(--t662h,46px) + env(safe-area-inset-top,0px))!important;
 height:calc(100dvh - var(--t5h,54px) - var(--t662h,46px) - env(safe-area-inset-top,0px))!important;
 max-height:calc(100dvh - var(--t5h,54px) - var(--t662h,46px) - env(safe-area-inset-top,0px))!important}
@media (max-width:820px){
 html.t508.t508-frame #t508frame{
  bottom:calc(46px + env(safe-area-inset-bottom,0px))!important;
  height:calc(100dvh - var(--t5h,54px) - env(safe-area-inset-top,0px) - 46px - env(safe-area-inset-bottom,0px))!important;
  max-height:calc(100dvh - var(--t5h,54px) - env(safe-area-inset-top,0px) - 46px - env(safe-area-inset-bottom,0px))!important}
 html.t508.t508-frame.s662:not(.t1258pleg) #t508frame{
  height:calc(100dvh - var(--t5h,54px) - var(--t662h,46px) - env(safe-area-inset-top,0px) - 46px - env(safe-area-inset-bottom,0px))!important;
  max-height:calc(100dvh - var(--t5h,54px) - var(--t662h,46px) - env(safe-area-inset-top,0px) - 46px - env(safe-area-inset-bottom,0px))!important}
}
html.t508-frame #t508grid{display:none!important}
html.t508-frame #t810sec,html.t508-frame #t815papelera_banner{display:none!important}
html:not(.t508-a-galeria) #t810sec{display:none!important}
html.t508 #t588fab{display:none!important}
.t832park{display:none!important}
#t508tasks{display:none;padding:8px 10px;font-family:system-ui,sans-serif}
html.t508-a-tareas #t508tasks{display:block}
.t5task{background:#0f172a;border:1px solid #334155;border-radius:10px;padding:9px 10px;margin-bottom:8px;color:#e2e8f0;font-size:12.5px}
.t5task b{color:#fde68a}
.t5bar{height:8px;background:#1e293b;border-radius:6px;overflow:hidden;margin:6px 0}
.t5bar i{display:block;height:100%;background:linear-gradient(90deg,#f59e0b,#22c55e)}
#t508mbar{position:fixed;left:50%;transform:translateX(-50%);bottom:calc(12px + env(safe-area-inset-bottom,0px));z-index:2147483647;display:none;gap:6px;
 background:rgba(2,6,23,.92);border:1px solid #475569;border-radius:999px;padding:5px;box-shadow:0 4px 18px #000c;font-family:system-ui,sans-serif}
#t508mbar button{background:#1e293b;color:#fff;border:1px solid #64748b;border-radius:999px;padding:7px 14px;font-size:13px;font-weight:800;cursor:pointer}
#t508mbar button.x{background:#7f1d1d;border-color:#ef4444}
#t508dlg{position:fixed;inset:0;z-index:2147483640;background:rgba(0,0,0,.82);display:none;align-items:flex-start;justify-content:center;overflow:auto;font-family:system-ui,sans-serif}
#t508dlg .bx{background:#0f172a;color:#e2e8f0;border:1px solid #334155;border-radius:12px;margin:max(12px,env(safe-area-inset-top)) 8px 70px;width:min(980px,96vw);padding:12px;box-sizing:border-box}
#t508dlg .hd{display:flex;gap:6px;align-items:center;margin-bottom:8px}
#t508dlg .hd b{flex:1;color:#7dd3fc;font-size:14px}
#t508dlg .pk{display:grid;grid-template-columns:repeat(auto-fill,minmax(96px,1fr));gap:6px}
#t508dlg .pk img{width:100%;aspect-ratio:3/4;object-fit:cover;border-radius:8px;cursor:pointer;border:2px solid transparent}
#t508dlg .pk img:hover{border-color:#a78bfa}
#t508dlg .kv{font-size:12px;line-height:1.45}
#t508dlg .kv details{margin:3px 0 3px 8px}
#t508dlg .kv summary{cursor:pointer;color:#93c5fd}
#t508dlg .kv .k{color:#94a3b8}
#t508dlg input,#t508dlg select,#t508dlg textarea{background:#020617;color:#e2e8f0;border:1px solid #334155;border-radius:7px;padding:6px;width:100%;box-sizing:border-box;margin:3px 0 8px}
html.t508 #fiel-fab{bottom:calc(64px + env(safe-area-inset-bottom,0px))!important}
@media (min-width:900px){#t508bar .t5a{min-width:64px;font-size:11.5px}#t508bar .t5a .i{font-size:20px}}
/* t510 · móvil: sin cortes laterales + zoom con los dedos + Ajustar */
html.t508,html.t508 body{max-width:100%;overflow-wrap:break-word}
html.t508 body *:not(#t508bar){box-sizing:border-box}
html.t508 img,html.t508 video,html.t508 canvas,html.t508 svg,html.t508 iframe:not(#t508frame){max-width:100%;height:auto}
html.t508 input,html.t508 select,html.t508 textarea,html.t508 button{max-width:100%}
@media (max-width:820px){
 html.t508 body div,html.t508 body section,html.t508 body article,html.t508 body form,html.t508 body fieldset,html.t508 body main,html.t508 body aside,html.t508 body details,html.t508 body ul,html.t508 body ol,html.t508 body p,html.t508 body label{max-width:100%;min-width:0}
 html.t508 body [style*="width:"]:not(img):not(#t508bar):not(.t5bar i):not([style*="%"]){max-width:100%}
 html.t508 body [style*="grid"]>*,html.t508 body .grid>*{min-width:0}
 html.t508 body [style*="display:flex"],html.t508 body [style*="display: flex"],html.t508 .view-toggle,html.t508 .toolbar,html.t508 .row,html.t508 .actions{flex-wrap:wrap}
 html.t508 body table{display:block;overflow-x:auto;-webkit-overflow-scrolling:touch;max-width:100%}
 html.t508 body pre,html.t508 body code{max-width:100%;overflow-x:auto}
 html.t508 [role=dialog],html.t508 .modal,html.t508 .modal-content,html.t508 [id*="modal" i]>div,html.t508 [id*="lightbox" i]>*{max-width:100vw}
}
#t510fit{position:fixed;right:8px;bottom:calc(10px + env(safe-area-inset-bottom,0px));z-index:2147483646;background:rgba(15,23,42,.92);color:#e2e8f0;border:1px solid #475569;border-radius:999px;padding:7px 11px;font:800 12px system-ui,sans-serif;box-shadow:0 3px 12px #000a;cursor:pointer}
html.t510-fit body img:not(#t508bar img){max-width:100%!important;max-height:calc(100dvh - 120px)!important;object-fit:contain!important;height:auto}
html.t510-fit body .lightbox img,html.t510-fit body [id*="lightbox" i] img{max-height:calc(100dvh - 40px)!important}

/* t514 — sin texto vertical: los botones nunca parten letra a letra + Modelos en rejilla */
html.t508,html.t508 body{overflow-wrap:break-word!important}
html.t508 button,html.t508 .btn,html.t508 .pill,html.t508 .subtab,html.t508 .mbtn-mini,html.t508 a.btn{overflow-wrap:normal!important;word-break:normal!important;hyphens:none}
html.t508 .t514w{min-width:min(8.5em,100%)!important}
#mod_rama_pills{display:flex!important;flex-wrap:nowrap!important;overflow-x:auto;gap:6px;padding-bottom:4px;scrollbar-width:none;-webkit-overflow-scrolling:touch}
#mod_rama_pills::-webkit-scrollbar{display:none}
#mod_rama_pills>*{flex:0 0 auto!important;white-space:nowrap!important;min-width:auto!important;width:auto!important}
#t514card{display:flex;gap:10px;align-items:flex-start;background:#0b1220;border:1px solid #334155;border-radius:12px;padding:8px;margin-top:8px}
#t514card>a{flex:0 0 76px}
#t514card img{width:76px!important;height:104px!important;object-fit:cover;border-radius:10px;border:2px solid #a855f7;background:#020617;display:block}
#t514card #mod_tab_meta{flex:1;min-width:0;font-size:12px;margin:0!important;line-height:1.45}
#t514acc{margin-top:10px;display:grid;gap:10px}
.t514sec{background:#0b1220;border:1px solid #1e293b;border-radius:12px;padding:8px}
.t514h{font:800 12px system-ui,sans-serif;color:#94a3b8;margin:0 0 6px 2px}
.t514g{display:grid;grid-template-columns:repeat(auto-fill,minmax(96px,1fr));gap:6px}
#t514acc .t514b{flex:none!important;width:100%!important;min-width:0!important;max-width:none!important;margin:0!important;padding:8px 5px!important;min-height:58px;display:flex!important;flex-direction:column;align-items:center;justify-content:center;gap:3px;border-radius:10px!important;line-height:1.15!important;white-space:normal!important;text-align:center}
#t514acc .t514b .i{font-size:18px;line-height:1}
#t514acc .t514b .l{font-size:11.5px;font-weight:800;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
#t514dock{display:none}
@media (max-width:820px){
 html.t508 body{padding-bottom:calc(60px + env(safe-area-inset-bottom,0px))!important}
 #t514dock{display:block;position:fixed;left:0;right:0;bottom:0;height:calc(46px + env(safe-area-inset-bottom,0px));background:rgba(2,6,23,.97);border-top:1px solid #1e293b;z-index:9000;pointer-events:none}
 #t510fit{bottom:calc(7px + env(safe-area-inset-bottom,0px))!important;padding:6px 10px!important;font-size:11.5px!important}
 html.t508 #fiel-fab{bottom:calc(5px + env(safe-area-inset-bottom,0px))!important;z-index:9001!important}
}
