#tiempo-oficio {
  --of-texto:#202e2b; color-scheme:light; color:var(--of-texto); background:var(--of-papel);
  width:min(580px,calc(100vw - 24px)); max-width:none; max-height:calc(100dvh - 24px);
  box-sizing:border-box; overflow:auto; overscroll-behavior:contain; padding:0; margin:auto; border:2px solid var(--of-texto);
  border-radius:6px; box-shadow:0 15px 70px #0c1719a8; font:16px/1.3 system-ui,sans-serif;
}
#tiempo-oficio::backdrop{background:#13201ee0}
#tiempo-oficio *{box-sizing:border-box}
#tiempo-oficio button{
  min-height:44px; min-width:0; margin:0; padding:7px 11px; color:var(--of-texto); background:#fff8e9;
  border:1px solid var(--of-texto); border-radius:3px; font:650 15px/1.2 system-ui,sans-serif; cursor:pointer;
  touch-action:manipulation;-webkit-user-select:none;user-select:none;
}
#tiempo-oficio button:active{transform:translateY(1px)}
#tiempo-oficio button:disabled{opacity:.58;cursor:default}
#tiempo-oficio button:focus-visible{outline:3px solid #d8522e;outline-offset:2px}
#tiempo-oficio .of-cab{height:auto;position:static;background:var(--of-papel);color:var(--of-texto);display:flex;align-items:center;gap:12px;padding:16px 20px 12px;border-bottom:2px solid var(--of-tinta)}
#tiempo-oficio .of-cab .of-nivel{color:var(--of-tinta)}
#tiempo-oficio .of-grabado{width:50px;height:50px;flex:0 0 auto}
#tiempo-oficio .of-titular{flex:1}
#tiempo-oficio .of-nivel,#tiempo-oficio .of-pie span{font:650 11px/1.28 ui-monospace,monospace;letter-spacing:.035em}
#tiempo-oficio h2,#tiempo-oficio h3{margin:3px 0 0;color:var(--of-texto);font:700 clamp(22px,4.5vw,33px)/1.02 Georgia,serif;letter-spacing:-.045em}
#tiempo-oficio .of-salir{font-size:13px;padding:6px 11px}
#tiempo-oficio .of-encargo{margin:0;padding:12px 20px 0;color:var(--of-tinta);font:600 17px/1.25 Georgia,serif}
#tiempo-oficio .of-panel{padding:8px 20px 0}
#tiempo-oficio .of-guia{margin:0 0 11px;font-size:14px;line-height:1.35}
#tiempo-oficio .of-mesa{padding:12px;border:1px solid #5c655a75;background:repeating-linear-gradient(0deg,#ffffff28 0 2px,transparent 2px 5px)}
#tiempo-oficio .of-dato{margin:0 auto 10px;padding-bottom:7px;border-bottom:1px dotted var(--of-tinta);color:var(--of-tinta);font:750 13px/1.3 ui-monospace,monospace}
#tiempo-oficio .of-tablero,#tiempo-oficio .of-mapa{display:grid;grid-template-columns:repeat(var(--of-columnas),minmax(0,1fr));gap:5px}
#tiempo-oficio .of-tablero{position:relative;width:100%;margin:0 auto}
#tiempo-oficio .of-tablero button{position:relative}
#tiempo-oficio button.actual,#tiempo-oficio button.principal,#tiempo-oficio button.tinta,#tiempo-oficio button.regada{background:var(--of-tinta);color:#fff;opacity:1}
#tiempo-oficio button.cerca{box-shadow:inset 0 0 0 2px var(--of-tinta)}
#tiempo-oficio .of-red{max-width:330px;grid-template-rows:repeat(3,55px);gap:0;align-items:center;justify-items:center}
#tiempo-oficio .of-red button{width:44px;border-radius:50%;padding:3px;border:4px double var(--of-tinta)}
#tiempo-oficio .of-cabos{position:absolute;inset:0;width:100%;height:100%;pointer-events:none}
#tiempo-oficio .of-mosaico,#tiempo-oficio .of-vias,#tiempo-oficio .of-azoteas{max-width:320px}
#tiempo-oficio .of-mosaico button{font:700 22px Georgia,serif;border:3px double var(--of-tinta)}
#tiempo-oficio .b0,#tiempo-oficio .b3{background:#f7cb8b}
#tiempo-oficio .b1,#tiempo-oficio .b4{background:#c7d9b8}
#tiempo-oficio .b2{background:#efb3a4}
#tiempo-oficio .of-vias button{font:700 19px ui-monospace,monospace}
#tiempo-oficio .of-apartadero button{text-align:left;font-family:ui-monospace,monospace;white-space:pre-wrap}
#tiempo-oficio .of-cartel{max-width:300px;align-items:center}
#tiempo-oficio .of-cartel button{font-size:21px;padding:2px}
#tiempo-oficio .of-pista{text-align:center;color:var(--of-tinta);font:700 16px ui-monospace,monospace}
#tiempo-oficio .of-instrumento{display:block;margin:0 auto 4px;max-width:100%;height:75px}
#tiempo-oficio .of-detalle{font:650 13px/1.4 ui-monospace,monospace;margin:8px 0;overflow-wrap:anywhere}
#tiempo-oficio .of-muestra{display:flex;flex-wrap:wrap;gap:5px;margin:4px 0 10px}
#tiempo-oficio .of-muestra span{border:1px dotted var(--of-tinta);padding:3px 6px;font:650 13px ui-monospace,monospace}
#tiempo-oficio .of-mapa{max-width:285px;margin:0 auto 12px;gap:2px}
#tiempo-oficio .of-mapa span{display:grid;place-items:center;min-height:31px;background:#f7f4e4;border:1px solid #66756e;color:#58655c;font:700 16px ui-monospace,monospace}
#tiempo-oficio .of-mapa .obst{color:#eef0da;background:repeating-linear-gradient(45deg,#52665c 0 3px,#758878 4px 6px)}
#tiempo-oficio .of-mapa .figura,#tiempo-oficio .of-mapa .caja{color:white;background:var(--of-tinta)}
#tiempo-oficio .of-mapa .meta{background:#ffe297;color:#33252c}
#tiempo-oficio .of-pernos{display:grid;grid-template-columns:repeat(9,minmax(0,1fr));gap:3px;margin:16px 0 12px;align-items:center}
#tiempo-oficio .of-pernos span{height:43px;border-bottom:4px solid #9f7856;text-align:center;padding:4px 0;background:linear-gradient(90deg,transparent 42%,#bf9c68 43% 56%,transparent 57%);font:bold 13px ui-monospace,monospace}
#tiempo-oficio .of-pernos .obj{background-color:#f0be55;border-bottom-color:var(--of-tinta)}
#tiempo-oficio .of-pernos .pos{outline:4px solid var(--of-tinta);outline-offset:-4px;border-radius:50%}
#tiempo-oficio .of-secundarios{display:flex;gap:6px;justify-content:center;flex-wrap:wrap;margin-top:10px}
#tiempo-oficio .of-aviso{margin:6px 0;min-height:1em;font-size:13px;font-weight:600;color:var(--of-tinta)}
#tiempo-oficio .of-pie{display:flex;align-items:center;justify-content:space-between;padding:6px 20px 10px;border-top:1px dotted var(--of-tinta)}
#tiempo-oficio .of-pie button{font-size:12px;background:transparent}
#tiempo-oficio .of-sello{padding:14px 2px 18px}
#tiempo-oficio .of-sello strong{display:block;color:var(--of-tinta);font:700 28px ui-monospace,monospace;margin-top:9px}
#tiempo-oficio .of-sello p{font-size:14px}
#tiempo-oficio[data-fase=hecha] .of-pie{display:none}
@media(max-width:540px){
 #tiempo-oficio .of-cab{padding:10px 11px;gap:8px}
 #tiempo-oficio .of-grabado{width:41px;height:41px}
 #tiempo-oficio .of-encargo{padding:10px 11px 0;font-size:16px}
 #tiempo-oficio .of-panel{padding:7px 11px 0}
 #tiempo-oficio .of-mesa{padding:9px}
 #tiempo-oficio .of-pie{padding:5px 11px}
}
@media(max-height:520px){#tiempo-oficio{max-height:98dvh}#tiempo-oficio .of-cab{padding-block:6px}#tiempo-oficio .of-grabado{width:35px;height:35px}}
#tiempo-oficio .of-mapa span.figura:has(.of-perrobot){position:relative;min-height:37px}
#tiempo-oficio canvas.of-perrobot{display:block;width:calc(100% - 8px);height:37px}
#tiempo-oficio .figura small{position:absolute;right:2px;bottom:1px;font:700 10px ui-monospace,monospace;color:#f4f5bd}
