/* Plano de avance de obra · pensado para usar al sol, con guantes, en móvil o iPad */
:root{
  /* Row by Row: amarillo y negro del logo. Los colores de cada trabajo (hincada, predrilling…) no cambian. */
  --brand:#fec400; --brand-ink:#111111;
  --bg:#f5f4ef; --surface:#ffffff; --ink:#111111; --muted:#5c5a54; --line:#d6d3c8;
  --row:#fbfbf8; --row-stroke:#7f7c74; --rev:#3b6ea8; --focus:#111111; --fence:#3d7a1f; --warn:#c2410c; --box:#d42020;
  --f-display:"Barlow Condensed","Arial Narrow",Arial,sans-serif;
  --f-body:"Barlow","Segoe UI",Roboto,Arial,sans-serif;
  color-scheme:light;
}
html:not([data-theme="light"]){
  --bg:#121212; --surface:#1d1d1c; --ink:#f5f5f2; --muted:#aaa8a1; --line:#383733;
  --row:#2a2a28; --row-stroke:#8f8d86; --rev:#78a6dc; --focus:#fec400; --fence:#7cbf55; --warn:#fb923c; --box:#ff5a5a; color-scheme:dark}
*{box-sizing:border-box}
[hidden]{display:none!important}
html,body{height:100%;margin:0}
body{-webkit-text-size-adjust:100%;text-size-adjust:100%;background:var(--bg);color:var(--ink);font-family:var(--f-body);font-size:15px;padding-top:env(safe-area-inset-top,0px);padding-bottom:env(safe-area-inset-bottom,0px)}
.wrap{padding-left:max(16px,env(safe-area-inset-left,0px));padding-right:max(16px,env(safe-area-inset-right,0px))}
h1{font-family:var(--f-display);font-weight:700;font-size:26px;margin:0;line-height:1;text-wrap:balance}
h1 small{display:block;font-family:var(--f-body);font-weight:600;font-size:13px;letter-spacing:.05em;text-transform:uppercase;color:var(--muted);margin-bottom:4px;-webkit-font-smoothing:antialiased;text-rendering:geometricPrecision}
h2{font-family:var(--f-display);font-size:28px;margin:0}
button{font:inherit;cursor:pointer;color:var(--ink)}
button:disabled{opacity:.5;cursor:default}
.btn{background:var(--bg);border:1px solid var(--line);border-radius:8px;padding:8px 12px;font-weight:600}
.btn.primary{background:var(--brand);color:var(--brand-ink);border-color:var(--brand);font-weight:700}
.btn.big{padding:12px 16px;font-size:17px}
.btn.danger{color:var(--warn)}
.link{background:none;border:0;color:var(--focus);padding:6px 0;font-weight:600;text-decoration:underline}
button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:3px solid var(--focus);outline-offset:2px}
input,textarea,select{font:inherit;font-size:16px;padding:10px 11px;border:1px solid var(--line);border-radius:8px;background:var(--bg);color:var(--ink);width:100%}
.note{font-size:13px;color:var(--muted)} .note.legal{margin-top:1.4em;font-size:11px;line-height:1.4;text-align:center;opacity:.8} .note.warn{color:var(--warn);font-weight:600}
.help{font-size:13px;color:var(--muted);line-height:1.45;max-width:65ch;margin:0}
.row{display:flex;gap:10px;flex-wrap:wrap;align-items:center}

.screen{min-height:100%}
.center{display:flex;align-items:center;justify-content:center;padding-block:24px}
.card{background:var(--surface);border:1px solid var(--line);border-radius:14px;padding:22px;width:100%;max-width:420px;display:flex;flex-direction:column;gap:16px}
.form{display:flex;flex-direction:column;gap:12px}
.form label{display:flex;flex-direction:column;gap:5px;font-weight:600}

.bar{display:flex;align-items:center;gap:10px;flex-wrap:wrap;padding-block:14px}
.acts{display:flex;gap:6px;margin-left:auto;flex-wrap:wrap;min-width:0}
.acts input{width:110px}
.grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:12px;padding-bottom:24px}
.obra{background:var(--surface);border:1px solid var(--line);border-radius:12px;display:flex;align-items:stretch;overflow:hidden}
.obra-main{flex:1;background:none;border:0;padding:14px 16px;text-align:left;display:flex;flex-direction:column;gap:6px;min-width:0}
.obra-opt{margin:10px;align-self:center}
.team h3{font-family:var(--f-display);font-size:20px;margin:10px 0 0}
.obra b{font-family:var(--f-display);font-size:22px}
.obra span{font-size:13px;color:var(--muted)}

/* plano */
.plano{height:100%;display:flex;flex-direction:column;overflow:hidden}
.ph{background:var(--surface);border-bottom:1px solid var(--line);padding-block:10px;display:flex;flex-direction:column;gap:8px;flex:none}
.top{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.modes{display:flex;gap:6px;overflow-x:auto;padding-bottom:2px}
.mode{flex:none;border:2px solid var(--line);background:var(--bg);border-radius:999px;padding:7px 14px;font-weight:600;font-size:14px}
.mode[aria-pressed="true"]{border-color:var(--ink);background:var(--ink);color:var(--surface)}
.dot{display:inline-block;width:10px;height:10px;border-radius:50%;margin-right:6px}
.stats{display:grid;grid-template-columns:repeat(auto-fit,minmax(140px,1fr));gap:8px}
.stat{display:flex;flex-direction:column;gap:1px;padding:6px 10px;border-radius:8px;background:var(--bg);min-width:0;border-left:4px solid var(--line)}
.stat b{font-family:var(--f-display);font-size:23px;font-weight:700;line-height:1.05;font-variant-numeric:tabular-nums}
.stat span{font-size:11px;letter-spacing:.06em;text-transform:uppercase;color:var(--muted)}
.stat em{font-style:normal;font-size:12px;color:var(--muted);font-variant-numeric:tabular-nums}
.mapwrap{position:relative;flex:1;min-height:0}
#map{width:100%;height:100%;display:block;touch-action:none;user-select:none;-webkit-user-select:none}
.it{stroke:var(--row-stroke);stroke-width:.4;fill:var(--row)}
.it.sel{stroke:var(--focus)!important;stroke-width:1.4!important;stroke-dasharray:none!important}
.lbl{font-family:var(--f-display);font-weight:600;fill:var(--ink);pointer-events:none}
.glbl{font-family:var(--f-display);font-weight:700;fill:var(--ink);pointer-events:none}
.link-l{stroke:var(--row-stroke);stroke-width:.5;pointer-events:none}
.grp{fill:none;stroke:var(--muted);stroke-width:.5;stroke-dasharray:3 2;pointer-events:none}
.fence{fill:none;stroke:var(--fence);stroke-width:.7;stroke-linecap:round;pointer-events:none}
.fpost{fill:var(--fence);pointer-events:none}
.road{fill:none;stroke:#b5ad9c;stroke-width:.25;pointer-events:none}
.pwr{fill:none;stroke:#d9b400;stroke-width:.35;stroke-dasharray:2 1.5;pointer-events:none}
.ct{fill:#f3d7d7;stroke:#c0392b;stroke-width:.3;pointer-events:none}
.ctl{fill:#c0392b;font-weight:700;pointer-events:none}
.mod{fill:none;stroke-width:.13;pointer-events:none}
.ctx{fill:url(#hatch);stroke:#9aa0a6;stroke-width:.25;pointer-events:none}
.hatch-bg{fill:#e3e5e2}
.hatch-ln{stroke:#9aa0a6;stroke-width:.5}
.box{fill:var(--box);pointer-events:none}
.pin{pointer-events:none}
.tools{position:absolute;right:max(12px,env(safe-area-inset-right,0px));bottom:12px;display:flex;flex-direction:column;gap:8px}
.tools button{width:48px;height:48px;border-radius:12px;background:var(--surface);border:1px solid var(--line);font-size:22px;font-weight:700;box-shadow:0 2px 6px rgba(0,0,0,.15)}
.legend{position:absolute;left:max(12px,env(safe-area-inset-left,0px));bottom:12px;background:var(--surface);border:1px solid var(--line);border-radius:10px;padding:8px 10px;display:flex;flex-direction:column;gap:5px;font-size:12px}
.legend i{display:inline-block;width:14px;height:10px;border-radius:2px;margin-right:6px;vertical-align:-1px;border:1.5px solid}
.toast{position:absolute;left:50%;top:12px;transform:translateX(-50%);background:var(--ink);color:var(--surface);padding:8px 14px;border-radius:999px;font-weight:600;font-size:14px;box-shadow:0 4px 12px rgba(0,0,0,.25);max-width:90%;text-align:center}

.sheet{position:fixed;left:0;right:0;bottom:0;z-index:20;background:var(--surface);border-top:1px solid var(--line);border-radius:16px 16px 0 0;box-shadow:0 -6px 24px rgba(0,0,0,.18);padding-block:14px calc(14px + env(safe-area-inset-bottom,0px));max-height:80%;overflow:auto;display:flex;flex-direction:column;gap:12px}
.sheet-head{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.sheet-head h2{font-size:30px;font-variant-numeric:tabular-nums}
.sheet-head .x{margin-left:auto}
#shBody{display:flex;flex-direction:column;gap:8px}
.rowctl{display:grid;grid-template-columns:72px repeat(var(--n),minmax(0,1fr));gap:6px;align-items:center}
.rowctl b{font-family:var(--f-display);font-size:18px}
.stg{height:52px;border-radius:10px;border:2px solid var(--line);background:var(--bg);font-weight:700;font-size:14px;padding:0 4px;min-width:0}
.halfbox{display:flex;gap:4px;min-width:0}
.halfbox .stg{flex:1;padding:0 2px}
.posts{display:grid;grid-template-columns:repeat(var(--n,10),minmax(0,1fr));gap:6px}
.post.motor{border-width:3px;border-style:double}
.post{height:58px;border-radius:10px;border:2px solid var(--line);background:var(--bg);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;font-weight:700;min-width:0;padding:0}
.post small{font-weight:500;font-size:10px;letter-spacing:.04em;text-transform:uppercase;color:var(--muted)}
.chk{display:flex;align-items:center;gap:8px;font-weight:600;padding:8px 12px;border:1px solid var(--line);border-radius:8px;background:var(--bg);width:max-content}
.chk input{width:20px;height:20px}

.panel{position:fixed;inset:0;z-index:30;background:var(--surface);overflow:auto;padding-block:calc(16px + env(safe-area-inset-top,0px)) 24px;display:flex;flex-direction:column;gap:12px}
.panel pre{white-space:pre-wrap;font-family:ui-monospace,Menlo,Consolas,monospace;font-size:13px;background:var(--bg);border:1px solid var(--line);border-radius:8px;padding:12px;margin:0;overflow-x:auto}
.prices{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:10px;max-width:640px}
.prices label{display:flex;flex-direction:column;gap:4px;font-weight:600}
.team{display:flex;flex-direction:column;gap:6px;max-width:640px}
.team li{display:flex;flex-wrap:wrap;align-items:center;gap:10px;padding:8px 10px;border:1px solid var(--line);border-radius:8px;background:var(--bg)}
.team ul{list-style:none;padding:0;margin:0;display:flex;flex-direction:column;gap:6px}
.team li span{flex:1;min-width:0;overflow-wrap:anywhere}
@media (max-width:640px){
  .acts{margin-left:0;width:100%} .acts input{flex:1}
  .legend{display:none}
  .rowctl{grid-template-columns:52px repeat(var(--n),minmax(0,1fr))} .stg{font-size:12px}
  .posts{grid-template-columns:repeat(5,minmax(0,1fr))}
}
@media (prefers-reduced-motion:no-preference){.sheet{animation:up .18s ease-out}@keyframes up{from{transform:translateY(30px);opacity:.6}}}

.hp{fill:var(--row);stroke:var(--row-stroke);stroke-width:.2;cursor:pointer}
.hp.motor{stroke-width:.45}
.types{display:grid;grid-template-columns:repeat(auto-fit,minmax(110px,1fr));gap:6px}
.post.picked{outline:3px solid var(--focus);outline-offset:2px}
.zbox{fill:var(--focus);fill-opacity:.12;stroke:var(--focus);stroke-width:.6;stroke-dasharray:3 2;pointer-events:none}
.tools button[aria-pressed="true"]{background:var(--ink);color:var(--surface)}
.toast{pointer-events:auto;display:flex;align-items:center;gap:10px;z-index:5}
.toast-btn{background:var(--surface);color:var(--ink);border:0;border-radius:999px;padding:4px 12px;font-weight:700}
.badge{position:absolute;left:50%;bottom:14px;transform:translateX(-50%);background:var(--surface);border:3px solid var(--ink);border-radius:999px;padding:6px 8px 6px 14px;display:flex;gap:10px;align-items:center;font-weight:700;box-shadow:0 2px 8px rgba(0,0,0,.2);z-index:4}
.badge button{border:0;background:var(--ink);color:var(--surface);border-radius:999px;padding:6px 12px;font-weight:700}
@media (max-width:640px){
  h1{font-size:22px}
  .ph{gap:6px;padding-block:8px}
  .stats{display:flex;overflow-x:auto;gap:6px;padding-bottom:2px}
  .stat{flex:none;min-width:120px;padding:4px 8px}
  .stat b{font-size:18px}
  .stat em{display:none}
  #pStatus:not(.warn){display:none}
  .sheet{max-height:66%}
  .sheet-head h2{font-size:24px}
  #shHelp{font-size:11.5px}
  .post{height:50px}
  .badge{bottom:12px;left:12px;transform:none}
}
.sheet-head{flex-wrap:nowrap}
#shInfo{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.toast{width:max-content;max-width:92%}
.halfbox{grid-column:span 3}
.halfbox .stg:last-child{flex:1.4}
.halfbox::before{content:attr(data-label);display:none}
@media (max-width:640px){
  .rowctl{grid-template-columns:repeat(var(--n),minmax(0,1fr))!important}
  .rowctl b{grid-column:1/-1;font-size:16px}
}

body{touch-action:manipulation}
.mapwrap{touch-action:none}
.post:disabled{opacity:1;cursor:not-allowed}
#fSum{margin:8px 0 14px}

#eqCarp{border:1px solid var(--line);border-radius:8px;padding:8px 12px;display:flex;flex-wrap:wrap;gap:6px 16px}
#eqCarp legend{font-size:13px;color:var(--muted);padding:0 4px}

.ring{fill:none;stroke-width:.35;pointer-events:none}
.layers{margin-bottom:4px}
.mode.layer[aria-pressed="true"]{background:var(--ink);color:var(--bg)}
.xref{margin:6px 0;padding:6px 8px;border-left:3px solid #0f8b8d;background:var(--surface)}
.post.falta{box-shadow:0 0 0 2px #c0392b inset}

.pnote{display:flex;flex-direction:column;gap:4px;font-size:.85rem;margin:8px 0}.pnote input{font:inherit;padding:8px;border:1px solid var(--line,#ccc);border-radius:8px;background:var(--bg2,#fff);color:inherit}
.hp.motor{fill:#f5a623;stroke:#b86e00;stroke-width:.35}
.mot{fill:#f5a623;stroke:#b86e00;stroke-width:.15;pointer-events:none}
.rowctl.wrap{display:flex;flex-wrap:wrap;gap:6px}
.rowctl.wrap b{width:100%;font-size:16px}
.rowctl.wrap .stg{flex:1 1 calc(25% - 6px);height:auto;min-height:44px;padding:6px 4px;font-size:13px;line-height:1.15}
@media (max-width:520px){.rowctl.wrap .stg{flex-basis:calc(33% - 6px);font-size:12px}}
/* en obra */
.sheet-head .nav{min-width:52px;font-size:20px;padding:0 10px}
.bigrow{margin:10px 0}
.bigok{width:100%;min-height:64px;font-size:20px;font-weight:800;background:#1f8a4c;color:#fff;border-color:#1f8a4c}
.who{color:var(--muted,#667)}
.fotos{display:flex;gap:8px;align-items:center;flex-wrap:wrap;margin:8px 0}
.foto-btn{cursor:pointer}
.thumbs{display:flex;gap:6px;flex-wrap:wrap}
.thumb{position:relative;width:64px;height:64px;padding:0;border:1px solid var(--line);border-radius:8px;overflow:hidden;background:none}
.thumb img{width:100%;height:100%;object-fit:cover;display:block}
.thumb small{position:absolute;left:2px;bottom:2px;background:#000a;color:#fff;font-size:10px;padding:0 3px;border-radius:3px}
.fotobig{max-width:100%;max-height:70vh;display:block;margin:0 auto 8px;border-radius:8px}
.gps-dot{fill:#1a73e8;stroke:#fff;stroke-width:.8;pointer-events:none}
.gps-acc{fill:#1a73e822;stroke:#1a73e8;stroke-width:.3;pointer-events:none}
.it.here{stroke:#1a73e8!important;stroke-width:1.6!important;stroke-dasharray:3 1.5!important}
.gpsbadge,.netbadge{position:absolute;left:50%;transform:translateX(-50%);z-index:5;background:var(--bg,#fff);border:2px solid #1a73e8;border-radius:12px;padding:8px 12px;font-weight:700;font-size:14px;display:flex;gap:10px;align-items:center;max-width:calc(100% - 24px);box-shadow:0 2px 8px #0003}
.gpsbadge{top:8px}
.gpsbadge button{min-height:40px;padding:0 14px;border-radius:10px;border:1px solid #1a73e8;background:#1a73e8;color:#fff;font-weight:700}
.netbadge{bottom:12px;border-color:#b7791f}
.netbadge.off{border-color:#c0392b;background:#fff3f0;color:#7a1d10}
.netbadge.ok{border-color:#1f8a4c;color:#1f8a4c}
.gpsbadge[hidden],.netbadge[hidden]{display:none}
/* modo obra: todo más grande para guantes */
body.big .sheet .btn,body.big .sheet .mode{min-height:56px;font-size:18px}
body.big .post{min-height:76px;font-size:20px}
body.big .post small{font-size:15px}
body.big .stg{min-height:64px;font-size:17px}
body.big .rowctl.wrap .stg{min-height:60px;font-size:16px}
body.big .tools button{width:54px;height:54px;font-size:24px}
body.big .sheet-head h2{font-size:34px}
body.big .sheet-head .nav{min-width:70px;min-height:60px;font-size:28px}
body.big .bigok{min-height:84px;font-size:24px}
body.big .thumb{width:84px;height:84px}
.oth-l{font-weight:800;paint-order:stroke;stroke:#fff;stroke-width:.8px;pointer-events:none}
.oth circle{pointer-events:none}
.it.there{stroke:#d9480f!important;stroke-width:1.4!important;stroke-dasharray:1.5 1!important}
.othbadge{position:absolute;left:8px;bottom:12px;z-index:5;background:var(--bg,#fff);border:2px solid #d9480f;border-radius:10px;padding:6px 10px;font-weight:700;font-size:13px;max-width:calc(100% - 90px)}
.othbadge[hidden]{display:none}
body.big .othbadge{font-size:16px}
/* v25 ajustes móvil */
.sheet-head h2{min-width:0;flex-shrink:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.sheet-head .x,.sheet-head .nav{flex-shrink:0}
.post small{white-space:normal;text-align:center;line-height:1.1;letter-spacing:0;padding:0 2px;overflow-wrap:anywhere}
body:has(#gpsBadge:not([hidden])) .toast{top:auto;bottom:96px}
@media (max-width:640px){
  body.big .sheet-head{gap:6px}
  body.big .sheet-head h2{font-size:26px}
  body.big .sheet-head .nav{min-width:54px;min-height:56px;font-size:24px;padding:0 6px}
  body.big .post small{font-size:11px}
  body.big #shInfo{display:none}
}

/* cabecera compacta en el móvil */
#pMore{display:none}
@media (max-width:640px){
  .ph{gap:5px;padding-block:6px}
  .ph .top{gap:6px}
  .ph .top > .btn{min-height:36px;padding:0 10px;font-size:14px}
  #pTitle{font-size:18px;line-height:1.15;flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .ph .acts{flex-wrap:wrap;gap:5px}
  .ph .acts input{min-height:40px;font-size:16px;flex:1;min-width:120px;width:auto}
  .ph .acts .btn{min-height:40px;padding:0 12px;font-size:15px}
  #pMore:not([hidden]){display:inline-flex;align-items:center;font-size:20px;font-weight:800}
  .ph .acts .more{display:none}
  .ph .acts.open .more:not([hidden]){display:inline-flex;align-items:center}
  .ph .modes{gap:5px}
  .ph .mode{padding:4px 10px;font-size:13px}
  .ph .stats{gap:5px}
  .ph .stat{min-width:0;padding:3px 8px;border-left-width:3px}
  .ph .stat b{font-size:16px}
  .ph .stat span{font-size:9.5px;letter-spacing:.03em}
}

.dirbtn{display:flex;flex-direction:column;align-items:flex-start;gap:2px;width:100%;min-height:72px;padding:10px 14px;margin:6px 0;text-align:left}
.dirbtn b{font-size:22px}
.dirbtn span{font-size:15px;color:var(--muted);font-variant-numeric:tabular-nums}
.fotorow{display:flex;align-items:center;gap:10px;width:100%;padding:6px;margin:4px 0;border:1px solid var(--line);border-radius:10px;background:var(--bg);text-align:left}
.fotorow img{width:64px;height:64px;object-fit:cover;border-radius:8px;flex:none}
.fotorow span{display:flex;flex-direction:column;gap:2px}
.fotorow b{font-size:16px}
.fotorow em{font-style:normal;color:var(--muted);font-size:13px}
a.btn{text-decoration:none;color:inherit;display:inline-flex;align-items:center}
/* medidas de cada hinca */
.post{position:relative}
.post.hasnote::after{content:"";position:absolute;top:3px;right:3px;width:8px;height:8px;border-radius:3px;background:#f2c230}
.post.hasm::before{content:"";position:absolute;bottom:3px;right:3px;width:7px;height:7px;border-radius:50%;background:#2c6fb0}
.meas{border:1px solid var(--line);border-radius:12px;padding:10px;margin:8px 0;display:flex;flex-direction:column;gap:8px;background:var(--bg)}
.meas-h{display:flex;justify-content:space-between;align-items:baseline;gap:4px 8px;flex-wrap:wrap;border:none;background:transparent;padding:0;font:inherit;color:inherit;text-align:left;min-height:40px;width:100%;cursor:pointer}
.meas-h b{flex:1}
.meas-h i{font-style:normal;font-size:13px;font-weight:700;color:var(--focus)}
.meas-h span{flex-basis:100%;font-size:12px;color:var(--muted);font-weight:600}
.meas.shut{padding:6px 10px;gap:0}
.meas.shut .meas-h span{font-size:13px;color:var(--ink);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.meas-g{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}
.meas-g label,.meas-n,.meas-yn{display:flex;flex-direction:column;justify-content:flex-end;gap:4px;font-size:13px;font-weight:600}
.meas-g input{height:46px;border-radius:10px;border:1.5px solid var(--line);padding:0 10px;font:inherit;font-size:17px;font-weight:600;min-width:0;background:var(--surface);color:inherit}
.meas-g input.calc{border-color:#8fb2e0;background:#e4eef9;color:#174a95;font-weight:700}
html:not([data-theme="light"]) .meas-g input.calc{background:#1d3550;color:#cfe0f7;border-color:#3d6694}html:not([data-theme="light"]) .yn.good{color:#7fd1a3}html:not([data-theme="light"]) .yn.bad{color:#f19a90}html:not([data-theme="light"]) .yn.good[aria-pressed="true"]{background:#16382a}html:not([data-theme="light"]) .yn.bad[aria-pressed="true"]{background:#47201c}html:not([data-theme="light"]) .meas-i.up{color:#f0b574}html:not([data-theme="light"]) .meas-i.down{color:#8fb8f0}html:not([data-theme="light"]) .meas-i.ok{color:#7fd1a3}
.meas-t{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.meas-i{margin:0;flex:1;min-width:160px;font-size:13px;font-weight:600;color:var(--muted)}
.meas-i.up{color:#8a4a08}.meas-i.down{color:#174a95}.meas-i.ok{color:#14532f}
.btn.sm{min-height:36px;padding:0 10px;font-size:13px}
.meas-g2{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.meas-yn>div{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:4px}
.yn{height:44px;border-radius:10px;border:1.5px solid var(--line);background:var(--surface);font:inherit;font-weight:700;font-size:15px}
.yn.good{color:#14532f}.yn.bad{color:#8e2a20}
.yn.good[aria-pressed="true"]{border:2.5px solid #1f7a4d;background:#e7f2ec}
.yn.bad[aria-pressed="true"]{border:2.5px solid #a3261c;background:#fbe9e7}
.meas-n textarea{border-radius:10px;border:1.5px solid #e2c35a;background:#fff9e3;padding:8px 10px;font:inherit;font-size:15px;resize:vertical;color:#14181c}
.meas{max-width:760px}
.inv{fill:#fde9c8;stroke:#b45309;stroke-width:.3;pointer-events:none}
.invl{fill:#8a3f06;font-weight:700;pointer-events:none}
.meas-i.bad{color:#a3261c;font-weight:800}
html:not([data-theme="light"]) .meas-i.bad{color:#ff8a7a}
.glbl.in{font-weight:700;letter-spacing:.02em;paint-order:stroke;stroke:var(--row);stroke-width:.28px;stroke-linejoin:round}
.perm{flex-basis:100%;display:flex;flex-direction:column;gap:8px;border:1px solid var(--line);border-radius:12px;padding:10px;margin-top:6px;background:var(--bg)}
.perm fieldset{border:1px solid var(--line);border-radius:10px;padding:6px 10px;display:flex;flex-wrap:wrap;gap:4px 14px}
.perm legend{font-weight:700;padding:0 4px}
.perm label{display:flex;flex-direction:column;gap:4px;font-weight:600;font-size:14px}
.perm label.chk{flex-direction:row;align-items:center;font-weight:500}
html:not([data-theme="light"]) .meas-n textarea{background:#2a2614;border-color:#8a6d1f;color:#f3ead0}
.updbox{display:flex;flex-wrap:wrap;align-items:center;gap:10px;padding:12px 14px;border-radius:12px;border:2px solid var(--focus);background:var(--surface);margin:8px 0}.updbox p{margin:0;flex:1;min-width:220px;font-weight:600}
/* pulido: botones fáciles de pulsar con guantes */
.btn.nav{min-width:52px;min-height:44px;font-size:20px;display:inline-flex;align-items:center;justify-content:center}
.mode{min-height:40px;display:inline-flex;align-items:center;gap:6px}
@media (max-width:700px){.ph .mode{min-height:40px;padding:6px 12px;font-size:14px}}

/* recuadros de arriba que resaltan en el plano */
.stat.click{font:inherit;text-align:left;cursor:pointer;color:inherit}
.stat.click:hover{filter:brightness(1.08)}
.stat.click[aria-pressed="true"]{outline:3px solid #2f7df6;outline-offset:-1px;box-shadow:0 0 0 4px #fec40040}
#map.hlon .it{opacity:.18}
#map.hlon .glbl{opacity:.45}
#map.hlon .it.hl{opacity:1;fill:#2f7df6!important;fill-opacity:.5!important;stroke:#2f7df6!important;stroke-width:1.3!important;stroke-dasharray:none!important}
#map.hlon .hp{opacity:.3}
#map.hlon .hp.hl{opacity:1;fill:#2f7df6!important;stroke:#ffffff!important;stroke-width:.35!important}
.stat.click{border:0;border-left:4px solid var(--line)}
/* Dos filas de marcas en la hinca: predrilling y hinca */
.note.tyttl{margin:.7em 0 .25em;font-weight:700;letter-spacing:.04em;text-transform:uppercase;font-size:12px;color:var(--ink)}
.stg.on{outline:3px solid var(--ink);outline-offset:1px;font-weight:700}
.stg.on::before{content:"✓ "}

.tools button.undo{position:relative;font-size:22px;background:#fff3cd;border-color:#c98a12;color:#5c3d00}
.tools button.undo[hidden]{display:none}
.tools button.undo.armed{background:#c98a12;color:#fff}
.tools button.undo small{position:absolute;top:-6px;right:-6px;background:#c98a12;color:#fff;border-radius:999px;font-size:11px;min-width:18px;height:18px;line-height:18px;padding:0 4px;font-weight:700}
.sheet-head .btn.undo{background:#fff3cd;border-color:#c98a12;color:#5c3d00;font-weight:700}
.sheet-head .btn.undo[hidden]{display:none}
.sheet-head .btn.undo.armed{background:#c98a12;color:#fff}

/* ===================== v37 · diseño nuevo: más limpio, ficha compacta, plano a la vista ===================== */
:root{--r:12px;--sh:0 1px 2px rgba(0,0,0,.06),0 6px 18px rgba(0,0,0,.08);--acc:#fec400}
html:not([data-theme="light"]){--sh:0 1px 2px rgba(0,0,0,.35),0 8px 22px rgba(0,0,0,.35)}
.btn{border-radius:10px;transition:background .12s,border-color .12s,transform .06s}
.btn:active{transform:translateY(1px)}
.card,.obra{border-radius:16px;box-shadow:var(--sh)}
/* cabecera del plano */
.ph{gap:8px;padding-block:10px 8px}
.ph .top{gap:8px}
#pTitle{font-size:22px}
.sync{display:inline-flex;align-items:center;gap:4px;font-size:12px;font-weight:700;letter-spacing:.02em;padding:4px 10px;border-radius:999px;border:1px solid transparent;white-space:nowrap}
.sync.ok{background:#e4f4ea;color:#166534;border-color:#9bd3b3}
.sync.busy{background:#fff4d6;color:#8a5a00;border-color:#f0c36d}
.sync.off{background:#fde4e1;color:#8e2a20;border-color:#f0a097}
html:not([data-theme="light"]) .sync.ok{background:#17352a;color:#8fe0b1;border-color:#2c6b4c}
html:not([data-theme="light"]) .sync.busy{background:#3a2e10;color:#ffd27a;border-color:#7a5a16}
html:not([data-theme="light"]) .sync.off{background:#44201c;color:#ffb3a8;border-color:#8a3a30}
/* pestañas (capas) como selector de segmentos */
.modes.layers{display:inline-flex;gap:0;background:var(--bg);border:1px solid var(--line);border-radius:999px;padding:3px;overflow-x:auto;max-width:100%}
.mode.layer{border:0;background:transparent;border-radius:999px;padding:7px 16px;font-weight:700;letter-spacing:.01em;color:var(--muted)}
.mode.layer[aria-pressed="true"]{background:var(--ink);color:var(--bg);box-shadow:0 1px 3px rgba(0,0,0,.2)}
.mode:not(.layer){border-width:1.5px;font-weight:600}
.mode:not(.layer)[aria-pressed="true"]{box-shadow:0 1px 3px rgba(0,0,0,.2)}
/* recuadros de números: compactos y claros */
.stats{display:flex;gap:8px;overflow-x:auto;padding-bottom:4px;scroll-snap-type:x proximity}
.stat{flex:0 0 auto;min-width:132px;max-width:230px;padding:7px 11px 7px 12px;border-radius:12px;border-left-width:5px;background:var(--bg);box-shadow:inset 0 0 0 1px var(--line);scroll-snap-align:start;gap:0}
.stat b{font-size:24px;line-height:1}
.stat span{font-size:10.5px;letter-spacing:.05em;margin-top:3px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.stat em{font-size:11.5px;margin-top:1px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.stat.click[aria-pressed="true"]{outline:2.5px solid var(--acc);box-shadow:0 0 0 4px #fec40040}
@media (max-width:640px){
  .ph .stats{gap:6px}
  .ph .stat{min-width:112px;padding:5px 8px 5px 9px;border-left-width:4px}
  .ph .stat b{font-size:19px}
  .ph .stat span{font-size:9px}
  .ph .stat em{display:block;font-size:10px}
}
/* ficha de fila: baja y compacta, el plano queda a la vista */
.sheet{max-height:46%;gap:8px;padding-block:8px calc(10px + env(safe-area-inset-bottom,0px));border-radius:18px 18px 0 0;box-shadow:0 -8px 30px rgba(0,0,0,.22)}
.sheet::before{content:"";display:block;width:40px;height:4px;border-radius:2px;background:var(--line);margin:0 auto -2px}
.sheet.tall{max-height:88%}
@media (max-width:640px){.sheet{max-height:56%}.sheet.tall{max-height:90%}}
.sheet-head{gap:8px}
.sheet-head h2{font-size:24px}
.sheet-head .nav{min-width:44px;min-height:38px;font-size:17px}
.sheet-head .nav.tall{font-size:20px;font-weight:800}
#shInfo{font-size:12px}
.saved{font-size:11.5px;font-weight:700;color:#166534;white-space:nowrap;flex-shrink:0}
.saved:empty{display:none}
html:not([data-theme="light"]) .saved{color:#8fe0b1}
#shBody{gap:6px}
.note.tyttl{margin:.35em 0 .1em;font-size:11px}
.posts{gap:5px}
.post{height:46px;border-radius:10px;gap:1px;border-width:1.5px}
.post small{font-size:9px;line-height:1.05}
.post.picked{outline-width:2.5px;outline-offset:1.5px}
.post.motor{border-width:2.5px}
.types{grid-template-columns:repeat(auto-fit,minmax(104px,1fr));gap:5px}
.stg{height:40px;border-radius:10px;font-size:13px;border-width:1.5px}
.stg.on{outline-width:2.5px}
.sheet .row{gap:6px}
.sheet .row .btn{padding:6px 10px;font-size:13px}
.row.req{padding:6px 8px;border-radius:10px;background:var(--bg);border:1px dashed #2c6fb0}
.row.req .note{flex:1;min-width:160px}
.xref{margin:2px 0;padding:5px 8px;font-size:12.5px}
.more{border:1px solid var(--line);border-radius:12px;padding:0 10px;background:var(--bg)}
.more summary{cursor:pointer;font-weight:700;font-size:13px;color:var(--muted);padding:9px 0;list-style:none;display:flex;align-items:center;gap:8px}
.more summary::before{content:"▸";font-size:12px;transition:transform .15s}
.more[open] summary::before{transform:rotate(90deg)}
.more summary::-webkit-details-marker{display:none}
.more textarea,.more .fotos,.more .help{margin:0 0 10px}
.more #shNote{min-height:74px;resize:vertical}
.pnote textarea{font:inherit;font-size:15px;padding:8px 10px;border:1.5px solid #e2c35a;border-radius:10px;background:#fff9e3;color:#14181c;resize:vertical;min-height:64px}
html:not([data-theme="light"]) .pnote textarea{background:#2a2614;border-color:#8a6d1f;color:#f3ead0}
.meas{margin:4px 0;padding:8px 10px;gap:6px;border-radius:12px}
.meas.shut{padding:4px 10px}
.meas-h{min-height:34px}
.meas-g input{height:40px;font-size:16px}
.thumb{border-radius:10px}
.thumb i{position:absolute;right:3px;top:3px;font-style:normal;font-size:11px;line-height:16px;min-width:16px;text-align:center;border-radius:999px;background:#1f8a4c;color:#fff;font-weight:800}
.thumb.up i{background:#b7791f}
.thumb.up img{opacity:.55}
.reqlist{list-style:none;padding:0;margin:8px 0;display:flex;flex-direction:column;gap:6px;max-width:640px}
.reqlist li{padding:8px 10px;border:1px solid var(--line);border-radius:10px;background:var(--bg);font-size:14px}
.reqlist b{font-family:var(--f-display);font-size:17px;margin-right:6px}
.tools button{border-radius:14px;box-shadow:var(--sh)}
.legend{border-radius:12px;box-shadow:var(--sh)}
.toast{border-radius:14px}
/* modo obra (guantes) sigue siendo grande */
body.big .post{min-height:66px}
body.big .stg{min-height:56px}
body.big .sheet{max-height:60%}
.twocol{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.7fr);gap:6px 12px;align-items:start}
.twocol>div{min-width:0}
@media (max-width:760px){.twocol{grid-template-columns:1fr}}
/* móvil: con la ficha abierta, la cabecera se encoge para que se vea el plano */
@media (max-width:640px){
  body.shopen .ph .modes:not(.layers),body.shopen .ph .stats,body.shopen #pStatus{display:none}
  body.shopen .legend{display:none}
}
/* v39: fotos bajo demanda */
.thumbs .seefotos{font-size:.85rem;padding:.35rem .7rem}
.thumbs .nofotos{font-size:.8rem;color:#6b7280;align-self:center}

/* v41: hincas C/H bien visibles (borde oscuro y H blanca grande) */
#map .hp.pk{stroke:#0d1f14!important;stroke-width:.22!important}
#map .hp.pk.motor{stroke:#5a3300!important;stroke-width:.3!important}
.hq-t{fill:#fff;font-weight:900;font-family:Arial,Helvetica,sans-serif;pointer-events:none;paint-order:stroke;stroke:#0d1f14;stroke-width:.28px}
#map.hlon .hq-t{opacity:.3}

/* ===== Revisión (revisor externo) ===== */
.revbox { margin-top: 12px; padding: 10px 12px; border: 2px solid #e0313155; border-radius: 12px; background: #e0313110; }
.revbox .revst { font-weight: 600; font-size: 1.05rem; margin: 4px 0 8px; }
.revbox .revst.ko { color: #e03131; }
.revbox .revst.fx { color: #f08c00; }
.revbox .revst.ok { color: #2f9e44; }
.revbox .revbtns .btn.big { font-size: 1.1rem; padding: 12px 18px; min-height: 52px; font-weight: 700; flex: 1 1 140px; }
.revbox .revposts .post { min-height: 44px; font-weight: 700; }
.revbox textarea { width: 100%; }

/* Mesas: aviso del lado abierto del perfil W de las hincas */
.abre{margin:2px 0 8px;padding:8px 10px;border-radius:10px;background:#f5a62326;border:2px solid #f5a623;color:var(--ink);font-weight:700;font-size:15px}

/* --- Row by Row: logotipo y detalles de marca --- */
.brandh{margin:0 0 2px;line-height:0}
.brandh .logo{width:100%;max-width:300px;height:auto}
.brandsub{margin:0;font-size:14px;font-weight:600;color:var(--muted)}
.only-light{display:none}
html[data-theme="light"] .only-light{display:inline-block} html[data-theme="light"] .only-dark{display:none}
.brandico{width:40px;height:40px;border-radius:10px;flex:none}
#vLogin .card{border-top:6px solid var(--brand)}
.bar{border-bottom:3px solid var(--brand)}
