:root{--green:#163d36;--accent:#d6ee9a;--ink:#243d37;--muted:#71817b}*{box-sizing:border-box}body{margin:0;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","Noto Sans JP",sans-serif;color:var(--ink);background:#f6f7f2}header{height:82px;background:var(--green);color:white;display:flex;align-items:center;justify-content:space-between;padding:0 30px;gap:16px}.brand{display:flex;gap:14px;font-size:27px;align-items:center}.brand span{font-size:19px;font-weight:650}.brand small{display:block;font-size:11px;font-weight:400;margin-top:5px;color:#afc7be}.upload{background:var(--accent);color:var(--green);padding:13px 21px;border-radius:8px;font-weight:650;cursor:pointer}.upload input{display:none}main{display:grid;grid-template-columns:320px 1fr;height:calc(100dvh - 82px);min-height:570px}aside{overflow:auto;padding:28px 24px;background:#fff;border-right:1px solid #dde4dc}.eyebrow{font-size:10px;letter-spacing:2px;color:var(--muted)}h1{font-size:26px;font-weight:600;margin:12px 0}h2{font-size:13px;margin:0 0 13px}p{line-height:1.7}.muted{color:var(--muted);font-size:12px}.fileinfo{background:#f0f4ec;border-radius:9px;padding:16px;margin:23px 0;font-size:14px;overflow-wrap:anywhere}#stats{font-size:12px;margin-top:8px;color:var(--muted)}section{padding:20px 0;border-top:1px solid #edf0ea}button,input,select{font:inherit}button{background:var(--green);color:white;border:0;border-radius:7px;min-height:44px;padding:10px 14px;cursor:pointer;font-size:13px}button:hover{filter:brightness(1.12)}button:focus-visible,input:focus-visible{outline:3px solid #9cb956;outline-offset:2px}input:not([type=checkbox]),select{border:1px solid #d7dfd6;border-radius:7px;padding:11px;font-size:14px;width:100%;min-width:0;background:white;color:var(--ink)}.row{display:flex;gap:7px}#measureform label{display:block;font-size:11px;color:var(--muted);margin-bottom:10px}#measureform input{display:block;margin-top:5px}.full{width:100%}.textbtn{padding:7px 0;min-height:32px;background:none;color:#56715b;font-size:11px}.modes{display:flex;background:#f0f3ed;padding:4px;border-radius:8px;gap:2px}.modes button{flex:1;background:transparent;color:var(--muted);padding:8px}.modes button.active{background:white;color:var(--green);box-shadow:0 1px 5px #0001}.display label{display:block;font-size:12px;margin:12px 0}.display input{accent-color:var(--green);width:17px;height:17px;vertical-align:middle}.display select{width:90px;margin-left:10px}.footnote{font-size:10px;color:var(--muted);line-height:1.9}article{min-width:0;display:flex;flex-direction:column;padding:20px;gap:10px}.mapbar{display:flex;align-items:center;justify-content:space-between;gap:10px;font-size:12px}.mapbar button{background:white;color:var(--green);border:1px solid #dae1d7;margin-left:4px}.mapbar button:first-child,.mapbar button:nth-child(2){width:44px;font-size:19px}#map{position:relative;flex:1;min-height:350px;overflow:hidden;border-radius:13px;border:1px solid #d9e1d5;background:#f5f7ef}canvas{display:block;width:100%;height:100%;touch-action:none}.north{position:absolute;right:23px;top:24px;font-size:18px;text-align:center;pointer-events:none}.badge{position:absolute;left:20px;top:20px;color:var(--muted);font-size:11px;pointer-events:none}.result{position:absolute;bottom:23px;left:50%;transform:translateX(-50%);background:#fffef9;box-shadow:0 5px 25px #203c3020;border:1px solid #e1e6dc;border-radius:12px;padding:16px 30px;min-width:260px;max-width:85%;text-align:center;pointer-events:none}.result span{font-size:11px;color:var(--muted);overflow-wrap:anywhere}.result strong{display:block;font-size:34px;font-weight:550;margin-top:7px;letter-spacing:-1px}.result small{font-size:15px;color:var(--muted)}#coords{font-size:10px;margin-top:5px;color:var(--muted)}.scale{position:absolute;bottom:18px;left:18px;border-bottom:2px solid #60776c;font-size:10px;text-align:center;pointer-events:none}.bottom{font-size:10px;color:var(--muted)}#message{font-size:12px;color:#93613a;white-space:pre-line}#message:empty{display:none}#matches{display:flex;flex-wrap:wrap;gap:5px;margin-top:7px}#matches button{font-size:11px;background:#edf3e3;color:var(--green);min-height:35px}@media(max-width:900px){main{grid-template-columns:270px 1fr}aside{padding:23px 18px}article{padding:14px}.result{padding:13px 18px;min-width:220px}.scale{bottom:150px}}@media(max-width:640px), (max-height:500px) and (pointer:coarse){header{height:72px;padding:0 15px}.brand span{font-size:16px}.brand small{font-size:9px}.upload{padding:12px;font-size:12px}main{height:auto;display:flex;flex-direction:column;min-height:0}article{order:-1;height:65dvh;min-height:480px}aside{overflow:visible;display:grid;grid-template-columns:1fr 1fr;gap:15px;padding:20px}aside>h1,aside>.eyebrow,aside>.muted,aside>.fileinfo,aside>.footnote{grid-column:1/-1;margin:0}section{padding:15px 0}.mapbar{font-size:11px}.result strong{font-size:28px}.bottom{font-size:9px}}

.setting{margin:10px 0;font-size:12px}.setting input[type=color]{width:55px;height:44px;padding:4px}.setting select{font-size:12px}#parcel{margin-top:8px}

/* Keep the canvas pixel buffer from affecting flex layout. */
article{min-height:0}.mapbar,.bottom,#message{flex-shrink:0}#map{flex:1 1 0;min-width:0}canvas{position:absolute;inset:0}#zoomlevel{font-size:11px;min-width:48px;display:inline-block;text-align:center}.mapbar>div{display:flex;align-items:center}.setting button{white-space:nowrap}

[hidden]{display:none!important}.segment-row{font-size:12px;margin:9px 0;overflow-wrap:anywhere}.result #distance{font-size:27px}.result{max-height:45%;overflow:auto}.setting select{margin-top:7px}#undo{margin-right:14px}

#markerwidth,#markertransparency{padding:0;accent-color:#b58b2c}#markercolor{width:65px;height:40px;padding:3px}label.setting{display:block}.setting output{float:right;color:#71817b}.result{pointer-events:auto}#markerstatus{overflow-wrap:anywhere}

.scale{bottom:19px!important;left:16px;color:#344d59;background:rgba(255,255,255,.74);border-color:rgba(52,77,89,.65);padding:3px 2px;border-radius:3px 3px 0 0}.result{bottom:75px}.attribution{position:absolute;right:12px;bottom:10px;max-width:calc(100% - 150px);font-size:9px;background:rgba(255,255,255,.82);padding:4px 6px;border-radius:4px;text-align:right}.attribution a{color:#455866}.attribution span{display:block;font-size:8px}.gridstatus{position:absolute;left:15px;top:44px;font-size:10px;background:rgba(255,255,255,.7);padding:3px;color:#5a6a72;pointer-events:none}#bgopacity{padding:0}#offlinestatus{overflow-wrap:anywhere}#downloadmap:disabled{opacity:.5}#savedareas{margin-top:8px}.mapbar #status{overflow-wrap:anywhere;min-width:0}.mapbar>div{flex-shrink:0}

/* The drawing and daily tools share one viewport; settings open separately on phones. */
.tool-dock{flex-shrink:0;background:#fff;border:1px solid #dce4dc;border-radius:10px;padding:6px}.tool-row{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:3px}.tool-row button{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;background:#f3f5ef;color:#39544c;padding:6px 2px;min-height:48px;font-size:10px}.tool-row svg{width:21px;height:21px}.tool-row .gear{font-size:21px;line-height:21px}.tool-row button.active{background:#163d36;color:white;box-shadow:inset 0 0 0 2px #d6ee9a}.measure-row{display:flex;gap:5px;align-items:center;padding-top:5px}.measure-row button{padding:6px 12px;min-height:36px;font-size:12px}.measure-row button:disabled{opacity:.4}.measure-row span{font-size:11px;margin-right:auto}.result{position:static;transform:none;min-width:0;max-width:none;width:auto;max-height:85px;overflow:auto;border:0;border-radius:0;box-shadow:none;padding:5px 2px 0;text-align:left;background:transparent;color:#be1f63;display:flex;align-items:center;gap:8px;flex-wrap:wrap}.result #distance{font-size:16px;letter-spacing:0;margin:0}.result #resultlabel{font-size:10px}.result #coords{font-size:9px;margin:0}.segment-row{display:inline-block;margin:0 8px 0 0;font-size:11px}#markeroptions{display:flex;align-items:center;gap:8px;flex-wrap:wrap;padding-top:6px}#markeroptions .setting{margin:0;font-size:10px;flex:1;min-width:65px}#markeroptions input[type=range]{height:20px}#markeroptions #markercolor{width:38px;height:30px}#markeroptions #markerundo{font-size:10px}#settingsclose{display:none}article{gap:7px}#map{min-height:150px}.bottom{display:none}.north{right:12px;top:12px}.badge{left:12px;top:12px}.gridstatus{top:32px}
@media(max-width:640px), (max-height:500px) and (pointer:coarse){body{height:100dvh;overflow:hidden}header{height:56px}.brand small{display:none}.brand span{font-size:14px}.upload{padding:10px;font-size:11px}main{height:calc(100dvh - 56px);min-height:0;display:block}article{height:100%;min-height:0;padding:8px;padding-bottom:max(8px,env(safe-area-inset-bottom))}.mapbar button{min-height:36px;padding:5px 8px}.mapbar button:first-child,.mapbar button:nth-child(2){width:36px}.mapbar #status{font-size:10px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}aside{display:none}.settings-open aside{display:block;position:fixed;inset:56px 0 0;z-index:20;overflow:auto;background:#fff;padding:12px 18px calc(20px + env(safe-area-inset-bottom))}.settings-open #settingsclose{display:block;position:sticky;top:0;z-index:2;width:100%;margin-bottom:14px}aside>h1,aside>.eyebrow,aside>.muted{display:none}.result{padding:4px 0}.mapbar{gap:4px}#message{font-size:10px;margin:0;max-height:32px;overflow:auto}.tool-row button{font-size:10px}.measure-row button{min-height:36px}.fileinfo{margin:8px 0}}

.preset-row{display:grid;grid-template-columns:repeat(4,1fr);gap:5px;width:100%}.preset-row button{min-height:34px;font-size:11px;padding:4px 2px;color:#24483f;border:2px solid transparent}.preset-row button.active{outline:2px solid #163d36;outline-offset:1px}.preset-row #savepreset{color:white}#presetstatus{font-size:10px;width:100%}#presetstatus:empty{display:none}

.labelstatus{position:absolute;left:12px;top:57px;max-width:calc(100% - 60px);font-size:9px;color:#60716b;background:rgba(255,255,255,.75);pointer-events:none;padding:2px 4px;border-radius:3px}.labelstatus:empty{display:none}

.scale{white-space:nowrap;overflow:visible}


@media(max-height:500px) and (pointer:coarse){header{display:none}main{height:100dvh}.settings-open aside{inset:0}#map{min-height:60px}.tool-row button{flex-direction:row;min-height:32px}.tool-row svg{width:18px;height:18px}.measure-row button{min-height:30px}.mapbar button{min-height:30px}#markeroptions{padding-top:4px;gap:4px}.preset-row button{min-height:28px}}

@media(max-height:500px) and (pointer:coarse){header{display:flex;height:36px;padding:0 8px}.brand{font-size:18px}.upload{padding:5px 10px}main{height:calc(100dvh - 36px)}.settings-open aside{inset:36px 0 0}article{padding:4px;gap:4px}.tool-dock{padding:4px}}


.file-actions{display:flex;align-items:center;gap:6px;flex-shrink:0;white-space:nowrap}.file-actions button{background:#d6ee9a;color:#163d36;font-weight:650;padding:10px 14px;min-height:44px}.file-actions .upload{min-height:44px;display:flex;align-items:center}.brand{min-width:0}@media(max-width:640px), (max-height:500px) and (pointer:coarse){.brand{gap:6px}.brand span{font-size:12px}.file-actions .upload,.file-actions button{padding:8px 12px;font-size:12px}header{gap:8px;padding:0 10px}}@media(max-height:500px) and (pointer:coarse){.file-actions .upload,.file-actions button{min-height:30px;padding:4px 12px}}

.tool-dock{position:relative}#pointchoices{position:absolute;bottom:calc(100% + 5px);left:0;right:0;z-index:5;background:#fff;border:1px solid #aabcb2;box-shadow:0 3px 12px #163d3620;border-radius:8px;padding:5px}.choicehead{display:flex;align-items:center;justify-content:space-between;gap:5px;font-size:11px}.choicehead button{font-size:11px;min-height:30px;padding:4px 8px;background:#edf2ea;color:#163d36}#choiceitems{display:grid;grid-template-columns:1fr 1fr;gap:4px;max-height:88px;overflow:auto;overscroll-behavior:contain}#choiceitems button{min-height:40px;text-align:left;background:#edf3ed;color:#163d36;font-size:11px;padding:6px;overflow-wrap:anywhere}#choiceitems button:disabled{opacity:.45}

#canvas{-webkit-touch-callout:none;user-select:none;-webkit-user-select:none}.measure-row #selectionstatus{font-size:10px}
.gps-quick{position:absolute;right:8px;top:8px;display:flex;gap:5px;z-index:3}.gps-quick button{border-radius:24px;background:rgba(255,255,255,.94);color:#24483e;border:1px solid #ccd9d3;min-height:40px;padding:7px 12px;font-size:12px;box-shadow:0 1px 4px #0002}.gps-quick button.active{background:#163d36;color:#fff;border-color:#d6ee9a}#map .north{top:64px}#gpsquickstatus{position:absolute;top:52px;right:8px;max-width:calc(100% - 90px);font-size:10px;background:#fffffff0;border-radius:6px;padding:5px 7px;z-index:3;pointer-events:none}#markerclear{color:#a23030;min-height:36px}#choiceitems button{min-height:40px}
#pointchoices[data-kind="stake"] #choiceitems{grid-template-columns:repeat(4,minmax(0,1fr));max-height:none;overflow:visible}#pointchoices[data-kind="stake"] #choiceitems button{padding:7px 3px;font-size:12px}
.map-layer-control{position:absolute;left:8px;top:8px;z-index:3;width:min(160px,calc(100% - 182px));font-size:9px;color:#36534a;background:#fffffff0;border-radius:8px;padding:4px 6px}.map-layer-control select{width:100%;min-height:30px;font-size:11px;padding:4px 15px 4px 2px;margin:0;border:0;background:transparent;color:#24483e}.gridstatus{top:65px}#pointchoices[data-kind="stake"] #choiceitems button{overflow-wrap:anywhere}
.gps-quick{gap:3px;right:6px;top:6px}.gps-quick button{min-height:30px;padding:3px 6px;font-size:11px;border-radius:16px;box-shadow:0 1px 2px #0001}.map-layer-control{width:min(180px,calc(100% - 145px))}#gpsquickstatus{top:42px}

#holdguide{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);z-index:8;pointer-events:none;background:rgba(255,255,255,.92);border:1px solid #b9c7c0;border-radius:12px;padding:8px 12px;display:grid;grid-template-columns:1fr 1fr;gap:6px;font-size:12px;max-width:95%;width:255px;box-shadow:0 2px 12px #0002}#holdguide>div{padding:5px;border-radius:5px;font-weight:bold}.hold-up{grid-column:1;color:#0284c7}.hold-right{grid-column:2;grid-row:2;color:#dc2626}.hold-down{grid-column:1;grid-row:3;color:#15803d}#holdguidestatus{grid-column:1/-1;font-size:10px;color:#334155}#holdguide[data-direction="restored"] .hold-up{background:#bae6fd}#holdguide[data-direction="existing"] .hold-down{background:#bbf7d0}#holdguide[data-direction="needsRestore"] .hold-right{background:#fecaca}

.quick-tools{display:flex;align-items:center;gap:6px;padding-bottom:5px}.quick-tools button{display:inline-flex;align-items:center;justify-content:center;gap:4px;min-height:32px;padding:4px 10px;font-size:11px;background:#edf3ed;color:#24483e;border:1px solid #d7e2d9}.quick-tools svg{width:17px;height:17px}.quick-tools button.active{background:#163d36;color:white;border-color:#9bb970}.quick-tools #gpsstop{margin-left:auto;font-size:10px}#searchpanel{position:absolute;bottom:calc(100% + 5px);left:0;right:0;z-index:6;padding:10px;background:#fff;border:1px solid #aabcb2;border-radius:10px;box-shadow:0 3px 12px #163d3620;max-height:min(230px,45dvh);overflow:auto;overscroll-behavior:contain}.searchhead{display:flex;justify-content:space-between;align-items:center;margin-bottom:7px;font-size:12px}.searchhead button{min-height:28px;padding:4px 8px;font-size:11px;background:#edf3ed;color:#24483e}#searchpanel input{font-size:16px;min-height:38px;padding:7px}#searchpanel form button{min-height:38px;padding:6px 12px}#searchfeedback{font-size:11px;margin:5px 0 0;color:#93613a}#searchfeedback:empty{display:none}@media(max-height:500px) and (pointer:coarse){.quick-tools{padding-bottom:3px}.quick-tools button{min-height:27px;padding:3px 8px}#searchpanel{max-height:45dvh}}
/* Full drawing-area gesture guide; all pointer events stay with the canvas. */
#holdguide{inset:0;left:0;top:0;transform:none;width:100%;height:100%;max-width:none;display:block;padding:0;border:0;border-radius:0;box-shadow:none;overflow:hidden;background:linear-gradient(180deg,rgba(56,189,248,.11),transparent 35%,transparent 65%,rgba(34,197,94,.11))}
#holdguide>div{position:absolute;display:flex;align-items:center;justify-content:center;gap:8px;padding:10px;border-radius:14px;font-size:clamp(19px,4.5vw,28px);font-weight:700;text-shadow:0 1px 3px #fff,0 0 8px #fff;background:transparent}
#holdguide .hold-up{top:12%;left:8%;right:8%;color:rgba(2,132,199,.8)}
#holdguide .hold-down{bottom:10%;left:8%;right:8%;color:rgba(21,128,61,.8)}
#holdguide .hold-right{right:3%;top:43%;color:rgba(220,38,38,.8);background:rgba(254,202,202,.2)}
#holdguide[data-direction="restored"] .hold-up{background:rgba(186,230,253,.48);color:#0284c7}
#holdguide[data-direction="existing"] .hold-down{background:rgba(187,247,208,.48);color:#15803d}
#holdguide[data-direction="needsRestore"] .hold-right{background:rgba(254,202,202,.48);color:#dc2626}
#holdguidestatus{position:absolute;left:4%;right:4%;bottom:2%;text-align:center;font-size:11px;color:#475569;text-shadow:0 1px 3px #fff}
@media(max-height:500px){#holdguide .hold-up{top:3%}#holdguide .hold-down{bottom:9%}#holdguide>div{font-size:18px;padding:5px}#holdguide .hold-right{top:39%}}

#referencefilename{font-size:11px;overflow-wrap:anywhere;margin:4px 0 7px}#referencemessage{font-size:11px;line-height:1.5;margin:7px 0;color:#60716b}.quick-tools{gap:4px}.quick-tools button{padding-left:7px;padding-right:7px;white-space:nowrap}.quick-tools #referenceopen{font-size:10px}

.file-actions{position:relative}#filemenu{position:absolute;right:0;top:calc(100% + 7px);z-index:30;width:300px;max-width:calc(100vw - 20px);max-height:70dvh;overflow:auto;white-space:normal;padding:10px;background:#fff;color:#24483e;border:1px solid #afc3b7;border-radius:10px;box-shadow:0 4px 18px #0002}#filemenu>button{display:block;width:100%;text-align:left;margin:5px 0;background:#edf3ed;color:#24483e;font-size:13px;padding:8px 10px}#filemenu small{display:block;font-size:10px;font-weight:normal;margin-top:3px}#filemenu .searchhead button{min-height:28px;font-size:10px;padding:3px 6px}#filemenu .filemenu-reference{margin-top:8px;border-top:1px solid #e1e8e0;padding-top:7px;font-size:10px;overflow-wrap:anywhere}#filemenu #referenceremove{min-height:26px;font-size:10px;padding:4px 7px;margin-top:4px;background:#edf3ed}#filemenu #referenceremove:disabled{opacity:.4}#filemenu input[type=file]{display:none}#referenceopen{min-width:68px}

.layer-tools{display:flex;gap:5px;align-items:center;padding-bottom:5px}.layer-tools button{min-height:29px;padding:4px 9px;font-size:11px;background:#edf3ed;color:#365047;border:1px solid #d3dfd5}.layer-tools button.active{background:#163d36;color:#fff}.layer-tools button:disabled{opacity:.45}.layer-tools span{font-size:9px;color:#71817b}#filemenu #secondaryremove{min-height:26px;font-size:10px;padding:4px 7px;margin-top:4px;background:#edf3ed}#secondaryfilename{display:block;font-size:10px;overflow-wrap:anywhere}@media(max-height:500px) and (pointer:coarse){.layer-tools{padding-bottom:3px}.layer-tools button{min-height:25px;padding:3px 8px}}
/* Wide screens start with the full-width drawing; settings remain reversible. */
@media(min-width:641px) and (min-height:501px){main{grid-template-columns:minmax(0,1fr)}main>aside{display:none}main>article{min-width:0}.settings-open main{grid-template-columns:320px minmax(0,1fr)}.settings-open main>aside{display:block}.settings-open #settingsclose{display:block;width:100%;position:sticky;top:0;z-index:2;margin-bottom:12px;background:#163d36;color:#fff}.settings-open aside{min-width:0}}

/* CSS fullscreen also works on iPhone/iPad without the Fullscreen API. */
#fullscreen{font-size:11px;white-space:nowrap;padding:5px 8px}#fullscreen[aria-pressed="true"]{background:#163d36;color:#fff}.mapbar>div:last-child{display:flex;align-items:center;gap:3px;flex-shrink:0}.mapbar #status{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
body.drawing-fullscreen{height:100dvh;overflow:hidden}body.drawing-fullscreen>header{display:none}body.drawing-fullscreen main{display:block;height:100dvh;min-height:0}body.drawing-fullscreen main>article{height:100%;min-height:0;padding:4px;padding-top:max(4px,env(safe-area-inset-top));padding-right:max(4px,env(safe-area-inset-right));padding-bottom:max(4px,env(safe-area-inset-bottom));padding-left:max(4px,env(safe-area-inset-left));gap:4px}body.drawing-fullscreen #map{min-height:40px}body.drawing-fullscreen main>aside{display:none}body.drawing-fullscreen.settings-open main>aside{display:block;position:fixed;inset:0 auto 0 0;width:min(360px,100vw);height:100dvh;min-width:0;z-index:40;overflow:auto;background:white;padding:12px 16px max(20px,env(safe-area-inset-bottom));box-shadow:8px 0 24px #0003}body.drawing-fullscreen.settings-open #settingsclose{display:block;position:sticky;top:0;width:100%;z-index:2;background:#163d36;color:white;margin-bottom:12px}
@media(max-width:390px){.mapbar{gap:2px}.mapbar>div:last-child{gap:1px}.mapbar button{margin-left:0;padding-left:5px;padding-right:5px}.mapbar #zoomlevel{font-size:9px}#fullscreen{font-size:10px;padding:4px 6px}}

/* Keep map tools at the top in both regular and fullscreen views. */
.map-transparency{display:flex;align-items:center;gap:6px;flex-shrink:0;min-height:26px;font-size:10px;color:#496157}.map-transparency input[type=range]{width:110px;min-width:60px;padding:0;height:20px;accent-color:#456e60}.map-transparency output{min-width:29px;font-size:10px}
body main>article{display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:auto auto auto auto minmax(0,1fr);gap:3px}
body .mapbar{grid-column:1;grid-row:1;min-width:0}
body .tool-dock{grid-column:1;grid-row:2;display:flex;flex-wrap:wrap;align-items:center;gap:4px 8px;padding:4px;min-width:0;z-index:8}
body .map-transparency{grid-column:1;grid-row:3;min-height:22px}
body #message{grid-column:1;grid-row:4;margin:0;max-height:28px;overflow:auto;font-size:10px}
body #map{grid-column:1;grid-row:5;height:100%;min-height:0}
body .layer-tools,body .quick-tools{padding:0;gap:3px;flex-wrap:wrap}
body .layer-tools span{display:none}
body .layer-tools button,body .quick-tools button{min-height:32px;padding:3px 7px;font-size:10px}
body .tool-row{display:flex;gap:3px;flex-wrap:wrap}
body .tool-row button{flex-direction:row;min-height:34px;padding:4px 7px;font-size:10px;gap:3px}
body .tool-row svg{width:17px;height:17px}body .tool-row .gear{font-size:17px;line-height:17px}
body .measure-row{padding:0}body .measure-row span{font-size:10px}
body .result{padding:0;max-height:40px;font-size:10px}body .result #distance{font-size:13px}
body #searchpanel,body #pointchoices,body #markeroptions{position:absolute;top:calc(100% + 4px);bottom:auto;left:0;right:auto;width:min(440px,100%);max-height:min(300px,calc(100dvh - 190px));overflow:auto;overscroll-behavior:contain;background:white;border:1px solid #aabcb2;border-radius:8px;padding:8px;box-shadow:0 3px 12px #163d3620;z-index:10}
body #searchpanel{z-index:12}body #pointchoices{z-index:13}body #markeroptions{left:auto;right:0}
body #pointchoices[data-kind="stake"] #choiceitems{max-height:160px;overflow:auto}
@media(min-width:900px){body main>article{grid-template-columns:minmax(0,1fr) auto;grid-template-rows:auto auto auto minmax(0,1fr)}body .mapbar{grid-column:2;grid-row:1;align-self:start}body .mapbar #status{display:none}body .mapbar button{min-height:34px;padding:4px 7px}body .tool-dock{grid-column:1;grid-row:1}body .map-transparency{grid-column:1 / -1;grid-row:2}body #message{grid-column:1 / -1;grid-row:3}body #map{grid-column:1 / -1;grid-row:4}}

#selectionclear{position:absolute;z-index:14;width:96px;min-height:36px;padding:6px;font-size:12px;background:#fff;color:#9f2455;border:1px solid #c77594;box-shadow:0 2px 8px #0002;white-space:nowrap}

body.drawing-fullscreen,body.drawing-fullscreen #map{overscroll-behavior:none}body.drawing-fullscreen canvas{touch-action:none}#fullscreen{white-space:nowrap;flex-shrink:0}
@media(max-width:390px){#fullscreen{font-size:10px;padding-left:4px;padding-right:4px}.mapbar #zoomlevel{min-width:36px}.mapbar #fit{font-size:10px;padding-left:4px;padding-right:4px}}

.map-transparency{position:relative;z-index:9}.map-transparency #maptoggle,.map-transparency #mapmenubutton{min-height:30px;padding:4px 8px;font-size:11px;white-space:nowrap;touch-action:none;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none}.map-transparency #mapmenubutton{padding:4px 7px}.map-transparency #maptoggle[aria-pressed="false"]{background:#edf3ed;color:#345448}#mapmenu{position:absolute;top:calc(100% + 4px);left:0;width:min(320px,calc(100vw - 24px));padding:10px;background:white;border:1px solid #aabcb2;border-radius:8px;box-shadow:0 3px 12px #163d3620;z-index:20;max-height:45dvh;overflow:auto}#mapmenu select{font-size:13px;padding:8px}.gridstatus{top:8px}@media(max-width:390px){.map-transparency{gap:4px}.map-transparency input[type=range]{width:90px}}

#eraseroptions{display:flex;align-items:center;gap:7px;width:min(420px,100%);font-size:11px;flex-wrap:wrap}#eraseroptions input{width:120px;padding:0;height:24px}#erasersizevalue{min-width:36px}.eraser-preview-box{width:82px;height:82px;display:flex;align-items:center;justify-content:center}#eraserpreview,#erasercursor{box-sizing:border-box;border:1.5px solid #9a4765;border-radius:50%;background:rgba(225,102,145,.10)}#eraserpreview{display:block}#erasercursor{position:absolute;transform:translate(-50%,-50%);z-index:7;pointer-events:none}#eraseroptions{position:absolute;top:calc(100% + 4px);right:0;z-index:10;background:white;border:1px solid #aabcb2;border-radius:8px;padding:6px;box-shadow:0 3px 12px #163d3620}

#holdguide .hold-left{position:absolute;left:4%;top:43%;color:#64748b;background:rgba(226,232,240,.48)}#holdguide[data-direction="clear"] .hold-left{color:#334155;background:rgba(148,163,184,.48)}body #pointchoices[data-kind="stake"]{overscroll-behavior:contain}body #pointchoices[data-kind="stake"] #choiceitems{max-height:none}

#selectionclear{width:120px;min-height:44px;padding:8px;font-size:15px;font-weight:700;background:#be185d;color:#fff;border:2px solid #fff;box-shadow:0 3px 12px #6b123b55}

body #pointchoices[data-kind="candidates"] #choiceitems{grid-template-columns:minmax(0,1fr);max-height:none;overflow:visible}body #pointchoices[data-kind="candidates"] #choiceitems button{font-size:16.5px;line-height:1.4;min-height:48px;padding:8px;font-weight:600;word-break:break-word}body #pointchoices[data-kind="candidates"] #choiceitems button:disabled{opacity:1;border-style:dashed!important;cursor:default}#holdguide>div{font-size:clamp(38px,9vw,56px);line-height:1.05;padding:5px;gap:2px}#holdguide .hold-left,#holdguide .hold-right{display:flex;flex-direction:column;text-align:center;top:50%;transform:translateY(-50%);max-width:44%;overflow-wrap:anywhere}#holdguide .hold-left{left:1%}#holdguide .hold-right{right:1%}#holdguide .hold-up{top:3%}#holdguide .hold-down{bottom:4%}@media(max-height:500px){#holdguide>div{font-size:38px;padding:2px}#holdguide .hold-up{top:0}#holdguide .hold-down{bottom:0}#holdguidestatus{display:none}}

/* The gesture guide uses the viewport, including when the map itself is short. */
#holdguide{position:fixed;inset:0;left:0;top:0;transform:none;width:100vw;height:100dvh;max-width:none;z-index:100;pointer-events:none}#holdguide .hold-up{top:max(8px,env(safe-area-inset-top))}#holdguide .hold-down{bottom:max(8px,env(safe-area-inset-bottom))}#holdguide .hold-left{left:max(8px,env(safe-area-inset-left))}#holdguide .hold-right{right:max(8px,env(safe-area-inset-right))}

/* Keep all four directions together beside the initial finger position. */
#holdguide{position:fixed;inset:auto;transform:none;width:min(344px,calc(100vw - 16px));height:auto;max-width:none;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;padding:7px;z-index:100;pointer-events:none;background:rgba(255,255,255,.88);border:1px solid #b6c7be;border-radius:12px;box-shadow:0 3px 16px #0002;overflow:hidden}
#holdguide>div,#holdguide .hold-up,#holdguide .hold-down,#holdguide .hold-left,#holdguide .hold-right{position:static;inset:auto;transform:none;max-width:none;width:auto;min-width:0;display:flex;flex-direction:row;align-items:center;justify-content:center;gap:2px;font-size:clamp(24px,7.5vw,30px);line-height:1.25;padding:8px 2px;overflow-wrap:normal;white-space:nowrap;text-align:center;border-radius:7px;text-shadow:none}
#holdguide .hold-up{grid-column:1;grid-row:1}#holdguide .hold-right{grid-column:2;grid-row:1}#holdguide .hold-down{grid-column:1;grid-row:2}#holdguide .hold-left{grid-column:2;grid-row:2}#holdguidestatus{display:none}

body #pointchoices[data-kind="stake"] #choiceitems button{font-size:18px;line-height:1.3;min-height:60px;padding:10px 6px}body #pointchoices[data-kind="stake"] .choicehead{font-size:15px}body #pointchoices[data-kind="stake"] #choiceitems{gap:6px;grid-template-columns:repeat(4,minmax(0,1fr))}@media(max-width:400px){body #pointchoices[data-kind="stake"] #choiceitems{grid-template-columns:repeat(3,minmax(0,1fr))}}

/* Direction labels match the actual swipe compass. */
#holdguide{grid-template-columns:minmax(0,1fr) 16px minmax(0,1fr);grid-template-rows:auto auto auto;gap:2px}#holdguide .hold-up{grid-column:1 / -1;grid-row:1}#holdguide .hold-left{grid-column:1;grid-row:2}#holdguide .hold-right{grid-column:3;grid-row:2}#holdguide .hold-down{grid-column:1 / -1;grid-row:3}#holdguide .hold-left,#holdguide .hold-right{font-size:clamp(22px,6.5vw,28px)}

header .file-actions #clearchecks{background:#b42335;color:#fff;border:1px solid #8c1827;font-weight:700;font-size:13px;padding:8px 10px;white-space:normal}header .file-actions{flex-wrap:wrap}

#markerhistory{display:flex;gap:6px;align-items:center;flex-wrap:wrap}#markerhistory[hidden]{display:none}#markerhistory button{min-height:36px;padding:6px 10px;font-size:13px}#markerhistory button:disabled{opacity:.4}

#mergepanel{position:fixed;inset:0;z-index:10000;background:#163d36aa;overflow:auto;padding:16px}#mergepanel[hidden]{display:none}.merge-card{max-width:760px;margin:auto;background:#fff;border-radius:12px;padding:18px}.merge-row{border:1px solid #c9d8d2;border-radius:8px;padding:12px;margin:10px 0}.merge-row p{white-space:pre-wrap;font-size:14px}.merge-row select{width:100%;min-height:44px}#mergepanel button{margin:4px;min-height:44px}#mergeerror{color:#a51d35}#mergeapply:disabled{opacity:.4}

#exportnamedialog{position:fixed;inset:0;z-index:10010;background:#163d36aa;display:grid;place-items:center;padding:14px;overflow:auto}#exportnamedialog[hidden]{display:none}#exportnameform{background:white;padding:20px;border-radius:12px;width:min(480px,100%);max-height:90dvh;overflow:auto}#exportnameform h2{font-size:20px}#exportnameform input{width:100%;font-size:20px;min-height:44px}#exportnameform button{min-height:44px;margin:4px}#exportnameerror{color:#b42335}.worker-history-row{display:flex;gap:4px;margin:6px 0}.worker-history-row input{min-width:0;width:100%}.worker-history-row button{white-space:nowrap;padding:6px}
#dbdialog{position:fixed;inset:0;z-index:12000;background:#0006;display:flex;align-items:center;justify-content:center;padding:12px}#dbdialog[hidden]{display:none}.db-card{background:white;border-radius:16px;padding:18px;max-width:620px;width:100%;max-height:90dvh;overflow:auto}#dblist{display:grid;gap:6px;margin:12px 0}#dblist button{text-align:left;overflow-wrap:anywhere}#dbpath{overflow-wrap:anywhere}#dbhint{display:block;font-size:12px;color:#66756f}#dbopen:disabled{background:#ddd;color:#777;cursor:not-allowed}#dbkey,#dbredirect{width:100%;box-sizing:border-box}#exporthistorysettings{margin:12px 0}#exportnamedialog form{max-height:90dvh;overflow:auto}
/* Dropbox picker: fixed controls, one independent touch scroll region. */
body.dropbox-modal-open{overflow:hidden!important;overscroll-behavior:none}#dbdialog{height:100dvh;overflow:hidden;overscroll-behavior:none;padding:16px;background:#182a394d}#dbdialog .db-card{display:flex;flex-direction:column;width:min(850px,100%);height:min(760px,92dvh);max-height:92dvh;min-height:0;overflow:hidden;padding:0;background:#f7f8fa;border:1px solid #d5dbe2;border-radius:18px;box-shadow:0 16px 60px #0003;touch-action:pan-y}#dbdialog .db-toolbar,#dbdialog .db-nav{display:flex;align-items:center;gap:8px;flex-shrink:0;padding:10px 16px}#dbdialog .db-toolbar{justify-content:space-between;border-bottom:1px solid #dde2e7}#dbdialog h2{margin:0;font-size:21px;color:#243746}#dbdialog button{background:#eef3f9;color:#176ab8;font-size:16px;border-radius:8px;touch-action:pan-y}#dbdialog button:disabled{opacity:.4}#dbdialog #dbpath{flex-shrink:0;margin:0;padding:4px 16px 8px;font-size:13px;max-height:62px;overflow:auto;color:#586876}#dbdialog #dbnotice{flex-shrink:0;margin:0;padding:0 16px;font-size:13px;color:#805521}#dbscroll{flex:1;min-height:0;overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;touch-action:pan-y;-webkit-overflow-scrolling:touch;background:white;border-top:1px solid #dde2e7}#dbdialog #dblist{display:block;margin:0;padding:0 16px}#dbdialog #dblist button{display:flex;align-items:center;gap:12px;width:100%;min-height:58px;border-radius:0;border-bottom:1px solid #e4e8ed;background:white;color:#253849;text-align:left;font-size:17px;padding:10px 4px}#dbdialog .db-icon{font-size:27px;color:#2c97d6;flex-shrink:0}#dbdialog .db-name{flex:1;min-width:0;overflow-wrap:anywhere}#dbdialog .db-detail{font-size:13px;color:#7a8896;flex-shrink:0}#dbdialog #dbsavehere{flex-shrink:0;margin:10px 16px;background:#147ada;color:white}#dbdialog #dbmore{margin:12px}#dbdialog [hidden]{display:none!important}@media(max-width:600px){#dbdialog{padding:6px}#dbdialog .db-card{height:96dvh;max-height:96dvh}#dbdialog .db-detail{font-size:11px}#dbdialog .db-nav{padding:8px}#dbdialog #dblist button{font-size:16px}}

/* Device notice belongs to the fixed GPS controls, never the map position. */
#gpsdevicenote{position:absolute;right:0;bottom:calc(100% + 5px);width:max-content;max-width:calc(100vw - 28px);font-size:11px;line-height:1.4;text-align:right;color:#805b20;background:rgba(255,255,255,.9);border-radius:4px;padding:2px 5px;pointer-events:none}.gps-quick.has-device-note{top:48px}.gps-quick.has-device-note~#gpsquickstatus{top:84px}.gps-quick.has-device-note~.north{top:110px}

/* Three ordered rows of stake choices, including on phones. */
body #pointchoices[data-kind="stake"] #choiceitems{grid-template-columns:repeat(4,minmax(0,1fr))}
body #pointchoices[data-kind="stake"] #choiceitems button{font-size:clamp(14px,3.6vw,18px)}
#choiceitems button[data-stake-group="pin"]{background:#dcecff;color:#174c84}
#choiceitems button[data-stake-group="plastic"]{background:#dcf5e3;color:#226137}
#choiceitems button[data-stake-group="plate"]{background:#ede2fa;color:#653c8b}
#choiceitems button[data-stake-group="bronze"]{background:#fff0c8;color:#785614}
#choiceitems button[data-stake-group="concrete"]{background:#e1e7ed;color:#384b60}
#choiceitems button[data-stake-group="marking"]{background:#fce0ec;color:#922b58}
#choiceitems button[data-stake-group="other"]{background:#f2eee5;color:#605848}
#dbdialog .db-nav{flex-wrap:wrap}#dbnewform{display:flex;align-items:end;gap:8px;padding:8px 16px;flex-shrink:0}#dbnewform label{flex:1;min-width:0;font-size:14px}#dbnewname{display:block;width:100%;box-sizing:border-box;font-size:17px;padding:9px}#dbdialog #dbmore{font-size:13px;color:#657786;text-align:center}@media(max-width:600px){#dbdialog .db-nav button{font-size:14px;padding:8px}#dbnewform{flex-wrap:wrap}#dbnewform label{flex-basis:100%}}

/* Version is part of the always-visible drawing controls. */
#appversion{display:inline-block;flex:0 0 auto;white-space:nowrap;font:600 10px/1.2 system-ui,sans-serif;color:#496157;letter-spacing:0;padding:0 2px}body .mapbar>div{flex-wrap:nowrap;white-space:nowrap}body .mapbar #status{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}

/* Give the tablet tool row the full width; zoom shares the existing map row. */
@media(min-width:900px){body .tool-dock{grid-column:1 / -1;grid-row:1;flex-wrap:nowrap;gap:4px}body .tool-dock .layer-tools,body .tool-dock .quick-tools,body .tool-dock .tool-row{flex-wrap:nowrap;gap:3px;flex-shrink:0}body .tool-dock .layer-tools button,body .tool-dock .quick-tools button,body .tool-dock .tool-row button{white-space:nowrap;padding-left:5px;padding-right:5px}body .tool-dock .measure-row{white-space:nowrap;margin-left:auto}body .mapbar{grid-column:2;grid-row:2;align-self:center}body .map-transparency{grid-column:1;grid-row:2}body #markerhistory{position:absolute;top:calc(100% + 4px);right:0;background:#fff;padding:6px;border:1px solid #aabcb2;border-radius:8px;z-index:11}body .tool-dock{position:relative}}

#dbdialog #dbrecent{flex-shrink:0;margin:0;padding:8px 16px;background:#edf3f8;border:0}#dbrecent h3{margin:0 0 3px;font-size:14px;color:#243746}#dbrecent small{font-size:11px;color:#586876}#dbrecentlist{display:flex;gap:6px;overflow-x:auto;padding-top:6px;max-height:80px}#dbdialog #dbrecentlist button{flex:0 0 auto;max-width:260px;min-height:40px;padding:6px 10px;text-align:left;font-size:13px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}

#dbdialog .db-import-status{font-size:12px;font-weight:bold;flex-shrink:0}#dbdialog .db-import-imported{color:#c62525}#dbdialog .db-import-updated{color:#b46100}#dbdialog .db-import-unknown{color:#68727a}

/* Related tools share a color; compact two-line states keep the single row. */
body .tool-dock .placement-category{background:#e6eef4;border-bottom:2px solid #4c718c}
body .tool-dock #placementopen,body .tool-dock #placementdeletetoggle,body .tool-dock #placementmovetoggle,body .tool-dock #placementgrouptoggle{height:32px;min-height:32px;min-width:64px;max-width:82px;padding:2px 5px;line-height:1.15;font-size:10px;white-space:pre-line;text-align:center;background:#e6eef4;color:#285873;border:1px solid #a9bfce;box-shadow:none}
body .tool-dock #placementgrouptoggle{font-size:8.5px;width:71px;min-width:71px;max-width:71px;padding-left:0;padding-right:0}
body .tool-dock #placementdeletetoggle[aria-pressed="true"],body .tool-dock #placementmovetoggle[aria-pressed="true"],body .tool-dock #placementgrouptoggle[aria-pressed="true"]{background:#285873;color:#fff;border-color:#285873;box-shadow:inset 0 -2px #c9dfed}
body .tool-dock #stakeprompt,body .tool-dock #stakepromptrestored{background:#ece7f4;color:#574575;border:1px solid #c7b9dc}
body .tool-dock #stakeprompt[aria-pressed="true"],body .tool-dock #stakepromptrestored[aria-pressed="true"]{background:#64517d;color:#fff;border-color:#64517d}
body .tool-dock button[data-mode="point"],body .tool-dock button[data-mode="free"]{background:#e3f0e9;color:#295d47;border:1px solid #afcbb9}
body .tool-dock button[data-mode="point"].active,body .tool-dock button[data-mode="free"].active{background:#295d47;color:#fff;box-shadow:inset 0 0 0 2px #c6e6d2}
body .tool-dock button[data-mode="marker"]{background:#fff0cb;color:#785815;border:1px solid #d8bf7b}
body .tool-dock button[data-mode="marker"].active{background:#785815;color:#fff;box-shadow:inset 0 0 0 2px #ffe2a0}
body .tool-dock button[data-mode="eraser"]{background:#f5e2d9;color:#854d35;border:1px solid #d5ac98}
body .tool-dock button[data-mode="eraser"].active{background:#854d35;color:#fff;box-shadow:inset 0 0 0 2px #f3c9b5}

/* Distance instructions occupy the existing gap after transparency controls. */
body .map-transparency{min-width:0;overflow:visible}
body .map-transparency>button,body .map-transparency>label,body .map-transparency>output{flex-shrink:0}
body #measurementguide{flex:1 1 0;min-width:0;width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px;font-weight:650;color:#bf256b;padding-left:6px}
body #measurementguide[hidden]{display:none}
@media(max-width:640px){body #measurementguide{font-size:10px;padding-left:2px}body .map-transparency input[type=range]{width:80px;min-width:45px;flex-shrink:1}}

body .tool-dock button[data-mode="point"]{height:32px;min-height:32px;padding-top:2px;padding-bottom:2px;line-height:1.15}body .tool-dock button[data-mode="point"] span{white-space:nowrap;font-size:10px;line-height:1.15}

/* The complete offline guide opens from settings without changing the map. */
.help-settings #helpopen{width:100%;min-height:44px;font-size:15px}
#helpdialog{width:min(780px,calc(100vw - 24px));max-width:none;height:min(850px,calc(100dvh - 24px));max-height:calc(100dvh - 24px);padding:0;border:1px solid #aabeb3;border-radius:14px;color:#243d37;background:#fff;box-shadow:0 12px 50px #0004;overflow:hidden}
#helpdialog::backdrop{background:#142d255e}
#helpdialog .help-card{display:flex;flex-direction:column;height:100%;min-height:0}
#helpdialog .help-header{height:auto;min-height:64px;padding:10px 16px;display:flex;justify-content:space-between;gap:12px;background:#edf3ee;color:#163d36;flex-shrink:0}
#helpdialog h2{margin:0;font-size:19px}#helpclose{min-height:44px;flex-shrink:0;background:#fff;color:#163d36;border:1px solid #aabeb3}
#helpcontent{overflow:auto;overscroll-behavior:contain;min-height:0;padding:12px 22px 28px;font-size:15px;line-height:1.8;scroll-padding-top:12px}
#helpcontent p{margin:10px 0;line-height:1.8}#helpcontent h3{font-size:16px;margin:14px 0 8px}#helpcontent a{color:#176993;text-underline-offset:3px;overflow-wrap:anywhere}#helpcontent li{margin:8px 0}#helpcontent ul,#helpcontent ol{padding-left:24px}
#helpcontent pre{white-space:pre-wrap;overflow-wrap:anywhere;background:#f1f4f0;padding:10px;border-radius:6px;font-size:12px}
#helpcontent .help-toc{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:5px 12px;margin-bottom:18px}#helpcontent .help-toc a{display:flex;align-items:center;min-height:44px;padding:6px 10px;border:1px solid #d4dfd8;border-radius:6px;line-height:1.5;text-decoration:none;background:#f7faf7}
#helpcontent .help-section{border:1px solid #d4dfd8;border-radius:8px;margin:10px 0;padding:0;scroll-margin-top:12px}
#helpcontent summary{min-height:48px;padding:12px 14px;cursor:pointer;font-weight:650;line-height:1.5;background:#f3f7f3;border-radius:8px}
#helpcontent .help-section-body{padding:0 16px 10px}#helpcontent .help-intro{color:#51665b;font-size:13px}
@media(max-width:600px){#helpdialog{width:calc(100vw - 12px);height:calc(100dvh - 12px);max-height:calc(100dvh - 12px);border-radius:10px}#helpdialog .help-header{padding:8px 12px}#helpdialog h2{font-size:16px}#helpcontent{padding:8px 12px 24px;font-size:14px}#helpcontent .help-toc{grid-template-columns:1fr}#helpcontent .help-section-body{padding:0 12px 8px}}

/* All button labels, including dynamically added controls, are not copy targets. */
button,button *,[role="button"],[role="button"] *,input[type="button"],input[type="submit"],input[type="reset"]{-webkit-user-select:none!important;user-select:none!important;-webkit-touch-callout:none!important}

/* Keep location controls at top left, with grid information below. */
#map .gps-quick{left:8px;right:auto;top:6px}
#map .gridstatus{left:8px;top:42px}
#map #gpsquickstatus{left:8px;right:auto;top:68px;max-width:calc(100% - 72px)}
#map .north{top:12px}
#map #gpsdevicenote{left:0;right:auto;text-align:left}
#map .gps-quick.has-device-note{top:48px}
#map .gps-quick.has-device-note~.gridstatus{top:84px}
#map .gps-quick.has-device-note~#gpsquickstatus{top:110px}

#operation-feedback{position:fixed;z-index:14000;pointer-events:none!important;user-select:none;-webkit-user-select:none;color:#0059bd;background:rgba(255,255,255,.96);border:1px solid rgba(0,89,189,.25);box-shadow:0 2px 8px #1233;border-radius:7px;padding:8px 11px;font-size:14px;font-weight:600;line-height:1.45;overflow-wrap:anywhere;max-height:calc(100dvh - 16px);overflow:hidden}#operation-feedback[hidden]{display:none!important}

#layerlabelmenu,#referencelabelmenu{position:fixed;z-index:11001;display:flex;flex-direction:column;gap:7px;width:200px;max-width:calc(100vw - 16px);max-height:calc(100dvh - 16px);overflow:auto;background:#fff;border:1px solid #9bb3a9;border-radius:9px;padding:10px;box-shadow:0 4px 16px #163d3633}#layerlabelmenu[hidden],#referencelabelmenu[hidden]{display:none}#layerlabelmenu strong,#referencelabelmenu strong{font-size:13px}#layerlabelmenu button,#referencelabelmenu button{min-height:40px}#layerlabelmenu button[aria-pressed="false"],#referencelabelmenu button[aria-pressed="false"]{background:#edf3ed;color:#35574b}

/* Compact navigation with the persistent message between opacity and zoom. */
body .viewer-navigation{grid-column:1 / -1;grid-row:2;display:flex;align-items:center;gap:5px;min-width:0}
body .viewer-navigation .map-transparency{flex:0 1 auto;min-width:0}
body .viewer-navigation #message{display:block;flex:1 1 0;min-width:25px;max-height:32px;overflow:auto;margin:0;color:#c62828;font-size:12px;line-height:16px}
body .viewer-navigation .mapbar{flex:0 0 auto;min-width:0}
body #markerhistory{display:none!important}
/* Below 900px the tool row and the navigation row (with the shared cancel) must not share a grid row. */
@media(max-width:899px){body .tool-dock{grid-row:1}body .viewer-navigation{grid-row:2}}
#parcelvisibilityconfirm{position:fixed;z-index:12000;width:240px;max-width:calc(100vw - 16px);padding:10px;background:#fff;border:1px solid #9bb3a9;border-radius:7px;box-shadow:0 2px 8px #163d3626;color:#163d36}
#parcelvisibilityconfirm[hidden]{display:none}
#parcelvisibilityconfirm p{margin:0 0 8px;font-size:12px;line-height:1.5;overflow-wrap:anywhere}
#parcelvisibilityconfirm>div{display:flex;gap:6px}
#parcelvisibilityconfirm button{width:84px;height:32px;min-height:32px;padding:3px 8px;font-size:12px}
#parcelvisibilityyes{background:#245747;color:#fff;border-color:#245747}
body #placementdeletetoggle{font-size:10px;white-space:pre-line}

/* Expanded operations share the SIMA menu's touch size without moving navigation. */
body #placementmodebar{position:absolute;z-index:6;gap:7px;padding:5px 7px;border:1px solid #9bb3a9;border-radius:9px;background:#fff;max-height:54px;overflow-y:hidden;box-shadow:0 2px 8px #163d3620;touch-action:pan-x}
body #placementmodebar button,body #layerlabelmenu button,body #referencelabelmenu button{min-height:40px;height:40px;padding:6px 10px;border-radius:7px;font-size:12px;line-height:1.2;border:1px solid #9bb3a9}
body #placementmodebar button{min-width:64px;margin:0;background:#fff;color:#163d36}
body #placementmodebar>span{font-size:12px}
#map #parcel-quick{position:absolute;left:8px;top:64px;z-index:4;display:flex;flex-direction:column;align-items:stretch;width:max-content;gap:7px;max-width:calc(100% - 24px);overflow-x:auto}
#map #parcel-quick button{min-height:40px;height:40px;padding:6px 10px;border-radius:7px;font-size:12px;border:1px solid #9bb3a9;background:#e3f0e9;color:#245b47;white-space:nowrap;flex-shrink:0}
#map #parcel-quick button[aria-pressed=true]{box-shadow:inset 0 0 0 1px #456e60;font-weight:650}
#map:has(.gps-quick.has-device-note) #parcel-quick{top:106px}
#map #gpsquickstatus{top:152px}
#map .gps-quick.has-device-note~#gpsquickstatus{top:194px}

#map #gridstatus{pointer-events:auto;cursor:pointer;touch-action:none;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none;min-height:20px;line-height:20px}
#map #gridstatus:focus-visible{outline:2px solid #0066ff;outline-offset:2px}

#map #gridstatus{box-sizing:border-box;height:20px;padding:0 5px}
#newparcel-root .parcel-panel{top:164px;max-height:calc((100% - 176px) / var(--ui-scale))}

/* Fixed navigation status and a single arbitrary-coordinate menu. */
#map #viewer-version{position:absolute;left:8px;bottom:7px;z-index:4;display:flex;align-items:center;gap:0;color:#496157;background:#fffffff0;border-radius:4px;padding:3px 5px;font:600 10px/1.2 system-ui,sans-serif;pointer-events:none}
#viewer-version #parcelreviewbadge{margin-left:7px}
#map .scale{bottom:32px!important}
#map #viewer-mesh{position:absolute;left:8px;top:42px;display:flex;align-items:center;gap:5px;z-index:4}
#map #viewer-mesh #gridstatus{position:static}
#map #viewer-mesh #zoomlevel{font-size:11px;min-width:35px;color:#496157;background:#ffffffc9;border-radius:3px;line-height:20px}
#map:has(.gps-quick.has-device-note) #viewer-mesh{top:84px}
#currentmode{display:inline-block;min-width:82px;text-align:center;font-size:12px;font-weight:650;color:#245b47;white-space:nowrap;padding:0 4px}
#placementmenu{position:fixed;z-index:11001;display:flex;flex-direction:column;gap:7px;width:200px;max-width:calc(100vw - 16px);max-height:calc(100dvh - 16px);overflow:auto;box-sizing:border-box;background:#fff;border:1px solid #9bb3a9;border-radius:9px;padding:10px;box-shadow:0 4px 16px #163d3633}
#placementmenu[hidden]{display:none}
body #placementmenu button{flex:0 0 auto;width:100%;min-height:40px;height:40px;padding:6px 10px;border-radius:7px;font-size:12px;line-height:1.2;border:1px solid #9bb3a9;white-space:normal}
body #placementmenu button[aria-pressed=true]{box-shadow:inset 0 0 0 2px #ef6c00;background:#fff0da;color:#853800}
@media(max-width:600px){#currentmode{font-size:10px;min-width:66px;padding:0 2px}}

/* Confirmation release 0.98: stronger status, map controls and shared cancel. */
body #currentmode{color:#c62828;font-weight:800;font-size:16px;min-width:100px}
#map .gps-quick #fit{margin:0;white-space:nowrap}
#map #fullscreen{position:absolute;left:8px;bottom:33px;z-index:10;height:32px;min-height:32px;margin:0;border-radius:7px;touch-action:none;user-select:none;-webkit-touch-callout:none}
#map #scale.scale{left:50%;bottom:8px!important;transform:translateX(-50%)}
#workcancel{min-height:32px;height:32px;padding:4px 9px;border-radius:7px;background:#fff1ee;color:#a92323;border:1px solid #d49b91;font-size:12px;font-weight:700}
#workcancelconfirm{position:fixed;z-index:16000;left:50%;top:40%;transform:translate(-50%,-50%);width:250px;max-width:calc(100vw - 24px);box-sizing:border-box;background:#fff;border:1px solid #9bb3a9;border-radius:9px;padding:12px;box-shadow:0 4px 20px #163d3640;color:#163d36}
#workcancelconfirm[hidden]{display:none}#workcancelconfirm p{font-size:14px;margin:0 0 10px}#workcancelconfirm>div{display:flex;gap:8px}#workcancelconfirm button{min-height:36px;width:90px;font-size:13px}
@media(max-width:600px){body #currentmode{font-size:14px;min-width:86px}}
#workcancelconfirm{inset:0;left:0;top:0;transform:none;width:auto;max-width:none;background:#0002;border:0;border-radius:0;padding:0;box-shadow:none;display:flex;align-items:center;justify-content:center}
#workcancelconfirm[hidden]{display:none}
#workcancelconfirm .workcancel-card{width:270px;max-width:calc(100vw - 24px);box-sizing:border-box;padding:14px;background:#fff;border:1px solid #9bb3a9;border-radius:9px;box-shadow:0 4px 20px #163d3640}
#workcancelconfirm .workcancel-card>div{display:flex;gap:8px}
#simaconfirm{position:fixed;inset:0;z-index:16000;background:#0002;display:flex;align-items:center;justify-content:center;color:#163d36}
#simaconfirm .sima-confirm-card{width:300px;max-width:calc(100vw - 24px);max-height:calc(100dvh - 24px);overflow:auto;box-sizing:border-box;padding:14px;background:#fff;border:1px solid #9bb3a9;border-radius:9px;box-shadow:0 4px 20px #163d3640}
#simaconfirm p{font-size:14px;margin:0 0 10px;white-space:pre-line;overflow-wrap:anywhere}#simaconfirm .sima-confirm-card>div{display:flex;gap:8px}#simaconfirm button{min-height:36px;width:90px;font-size:13px}

button[data-shared-cancel="true"]{display:none!important}
#placement-geometry{position:absolute;inset:0;width:100%;height:100%;z-index:1;pointer-events:none}
#publicmap-workspace{position:relative;grid-column:1 / -1;grid-row:5;display:flex;min-width:0;min-height:0;height:100%;overflow:hidden;gap:0}
body #publicmap-workspace #map{flex:1 1 0;min-width:0;min-height:0;height:100%;width:100%}
#publicmapbutton{position:absolute;left:8px;bottom:72px;z-index:12;min-height:32px;height:32px;padding:4px 12px;border-radius:7px;font-size:12px;background:#e8eff7;color:#244f74;border:1px solid #98b0c6}
#publicmapbutton[aria-pressed=true]{background:#245b78;color:#fff;border-color:#245b78}
#publicmap-panel{display:flex;flex:0 0 50%;flex-direction:column;min-width:0;min-height:0;max-width:50%;height:100%;padding:0;margin:0;border:1px solid #a8b9c3;border-radius:9px 0 0 9px;background:#e6e9eb;overflow:hidden;box-sizing:border-box}
#publicmap-panel[hidden]{display:none}
.publicmap-toolbar{flex:0 0 auto;display:flex;align-items:center;gap:5px;flex-wrap:wrap;padding:6px;background:#f7fafc;border-bottom:1px solid #bccbd3}
.publicmap-toolbar strong{font-size:13px;color:#244f74}.publicmap-toolbar button{min-height:32px;height:32px;padding:4px 8px;border-radius:6px;font-size:11px;background:#fff;color:#244f74;border:1px solid #afc1cd}
.publicmap-toolbar button:disabled{opacity:.4}.publicmap-navigation{display:flex;align-items:center;gap:5px;flex-wrap:nowrap;margin-left:auto;font-size:11px;color:#244f74}
#publicmapname{font-size:11px;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#425563}
#publicmapstatus{flex:0 0 auto;margin:0;padding:5px 7px;background:#f6f8fa;font-size:11px;line-height:1.4;color:#425563}
#publicmapviewport{position:relative;flex:1 1 0;min-width:0;min-height:0;overflow:auto;touch-action:none;overscroll-behavior:contain;padding:12px;box-sizing:border-box}
#publicmapsheet{position:relative;min-height:1px;background:#fff;box-shadow:0 1px 5px #2335;margin:0 auto}
#publicmapsheet canvas{position:static;display:block;max-width:none;touch-action:none}
#publicmapgestures{position:absolute;inset:0;z-index:10;touch-action:none;cursor:grab}
#publicmapgestures[hidden]{display:none}
body.publicmap-mode .tool-dock button,body.publicmap-mode .viewer-navigation button:not(#workcancel),body.publicmap-mode #map button{opacity:.45;pointer-events:none}
body.publicmap-mode #map .gps-quick,body.publicmap-mode #parcel-quick,body.publicmap-mode #newparcel-root .left-mode-controls{pointer-events:none}
body.publicmap-mode #publicmapbutton,body.publicmap-mode #registryinfobutton,body.publicmap-mode #attendanceplanbutton{pointer-events:auto;opacity:1}
body.publicmap-mode #map{border-radius:0 9px 9px 0}
@media(min-width:900px){#publicmap-workspace{grid-row:4}}

.document-placeholder-button{position:absolute;left:8px;z-index:12;min-height:32px;height:32px;padding:4px 12px;border-radius:7px;font-size:12px;background:#e8eff7;color:#244f74;border:1px solid #98b0c6}
#registryinfobutton{bottom:110px}
#attendanceplanbutton{bottom:148px}

/* 方位は地番一覧の横。図面を覆う背景を付けない。 */
#map #parcel-quick{display:grid;grid-template-columns:max-content 32px;align-items:start;overflow:visible;column-gap:8px}
#map #parcel-quick button{grid-column:1}
#map #parcel-quick .north{position:static;grid-column:2;grid-row:1;width:32px;height:40px;margin:0;padding:0;background:transparent;border:0;color:#111;line-height:1}
#map .attribution{right:2px;bottom:2px;max-width:calc(100% - 100px);padding:1px 2px;border-radius:1px;font-size:8px;line-height:1.1}
#map .attribution span{font-size:8px;line-height:1.1}

#survey-geometry{position:absolute;inset:0;width:100%;height:100%;z-index:2;pointer-events:none}

/* 凡例と出典を一緒に右下へ配置し、出典の高さに追従する。 */
#mapcredits{position:absolute;right:2px;bottom:2px;z-index:9;display:flex;flex-direction:column;align-items:flex-end;gap:4px;max-width:calc(100% - 100px);pointer-events:none}
#map #mapcredits .attribution{position:static;max-width:100%;margin:0}
#mapcredits .attribution a{pointer-events:auto}
#maplegend{padding:4px 5px;background:rgba(255,255,255,.82);border-radius:2px;font-size:10px;line-height:1.3;color:#344054}
#maplegend>div{display:flex;align-items:center;gap:6px;white-space:nowrap}
#maplegend>div+div{margin-top:3px}
.legend-line{display:block;width:22px;flex:0 0 22px;border-top:2px solid}
.legend-new{border-color:#df2688}
.legend-arbitrary{border-color:#c87932}
.legend-reference{border-color:rgba(35,85,62,.55)}
.legend-sima{display:flex;border:0;gap:2px}
.legend-sima i{display:block;flex:1;border-top:2px solid #202d28}
.legend-sima i+i{border-color:#788780}

#workcancel:disabled{background:#edf0ef;color:#99a19d;border-color:#d4d9d6;cursor:default;opacity:1;filter:none}
/* 凡例は小さくし、出典表示の幅に揃える。 */
#mapcredits{display:grid;grid-template-columns:max-content;gap:3px}
#maplegend{width:0;min-width:100%;padding:3px;font-size:8px;line-height:1.2}
#maplegend>div{gap:4px}
#maplegend>div+div{margin-top:2px}
#maplegend .legend-line{width:16px;flex-basis:16px}
#mapcredits:has(#attribution[hidden]) #maplegend{width:max-content;min-width:0}

/* 立会予定・登記情報・公図はツール行の右端に、同じ行のボタンと同じ寸法（横幅は消しゴムと同じ72px）で並べる。 */
body .tool-dock .document-tools{display:flex;align-items:center;gap:3px;flex-shrink:0;margin-left:auto}
/* 1002px以下のツール欄は2段構成（1段目：SIMA〜杭種、2段目：距離計測〜公図）。各段は1行で、折り返しや横スクロールは使わない。 */
.tool-dock .tool-row-break{display:none}
@media(max-width:1002px){body .tool-dock .tool-row-break{display:block;flex:0 0 100%;width:100%;height:0;margin:-4px 0 0;padding:0}}
@media(min-width:900px) and (max-width:1002px){html body .tool-dock{flex-wrap:wrap;row-gap:4px}html body .tool-dock .placement-toolbar-scroll{display:contents}}
/* 任意座標ボタンも消しゴムと同じ横幅。横の区分表示（－－－）は表示しない。 */
body .tool-dock .layer-tools .placement-category{display:none!important}
/* 検索は立会予定の左へ移動。見た目は従来の検索ボタンのまま、高さは同じ行のボタンに合わせる。 */
body .tool-dock .document-tools #searchopen{display:inline-flex;align-items:center;justify-content:center;gap:4px;height:34px;min-height:34px;padding:4px 5px;font-size:10px;border-radius:7px;background:#edf3ed;color:#24483e;border:1px solid #d7e2d9;white-space:nowrap;box-sizing:border-box}
body .tool-dock .document-tools #searchopen svg{width:17px;height:17px;flex:0 0 17px}
body .tool-dock #placementmenuopen{width:72px;min-width:72px;max-width:72px;padding-left:5px;padding-right:5px;box-sizing:border-box;white-space:nowrap}
body .tool-dock .document-tools #attendanceplanbutton,body .tool-dock .document-tools #registryinfobutton,body .tool-dock .document-tools #publicmapbutton{position:static;left:auto;bottom:auto;width:72px;min-width:72px;max-width:72px;height:34px;min-height:34px;padding:4px 5px;font-size:10px;border-radius:7px;white-space:nowrap;z-index:auto;box-sizing:border-box}
/* 900px未満は消しゴムの左右余白が7px（幅76px）になるため、同じ幅にそろえる。 */
@media(max-width:899px){body .tool-dock #placementmenuopen,body .tool-dock .document-tools #attendanceplanbutton,body .tool-dock .document-tools #registryinfobutton,body .tool-dock .document-tools #publicmapbutton{width:76px;min-width:76px;max-width:76px;padding-left:7px;padding-right:7px}body .tool-dock .document-tools #searchopen{padding-left:7px;padding-right:7px}}
/* ツール行は常に1段。収まらない幅では、高さ・文字の大きさを保ったまま左右の余白と間隔だけを縮める。
   消しゴムに合わせる横幅（任意座標・立会予定・登記情報・公図）も、消しゴムの縮小に合わせて変える。 */
@media(min-width:1056px) and (max-width:1129px){
 body .tool-dock .placement-toolbar-scroll{gap:4px}body .tool-dock .layer-tools,body .tool-dock .quick-tools,body .tool-dock .tool-row,body .tool-dock .document-tools{gap:2px}
 body .tool-dock .layer-tools button,body .tool-dock .quick-tools button,body .tool-dock .tool-row button,body .tool-dock .document-tools button,body .tool-dock #placementmenuopen,body .tool-dock .document-tools #searchopen,body .tool-dock .document-tools #attendanceplanbutton,body .tool-dock .document-tools #registryinfobutton,body .tool-dock .document-tools #publicmapbutton{padding-left:3px;padding-right:3px}
 body .tool-dock #placementmenuopen,body .tool-dock .document-tools #attendanceplanbutton,body .tool-dock .document-tools #registryinfobutton,body .tool-dock .document-tools #publicmapbutton{width:68px;min-width:68px;max-width:68px}}
@media(min-width:1025px) and (max-width:1055px){
 body .tool-dock .placement-toolbar-scroll{gap:3px}body .tool-dock .layer-tools,body .tool-dock .quick-tools,body .tool-dock .tool-row,body .tool-dock .document-tools{gap:2px}
 body .tool-dock .layer-tools button,body .tool-dock .quick-tools button,body .tool-dock .tool-row button,body .tool-dock .document-tools button,body .tool-dock #placementmenuopen,body .tool-dock .document-tools #searchopen,body .tool-dock .document-tools #attendanceplanbutton,body .tool-dock .document-tools #registryinfobutton,body .tool-dock .document-tools #publicmapbutton{padding-left:2px;padding-right:2px}
 body .tool-dock #placementmenuopen,body .tool-dock .document-tools #attendanceplanbutton,body .tool-dock .document-tools #registryinfobutton,body .tool-dock .document-tools #publicmapbutton{width:66px;min-width:66px;max-width:66px}}
/* 2段構成の2段目（距離計測〜公図）はスタンプ追加後も1行：767px以下は左右の余白3px、消しゴムに合わせる幅も68px。 */
@media(max-width:767px){
 body .tool-dock .quick-tools button,body .tool-dock .tool-row button,body .tool-dock .document-tools button,body .tool-dock #placementmenuopen,body .tool-dock .document-tools #searchopen,body .tool-dock .document-tools #attendanceplanbutton,body .tool-dock .document-tools #registryinfobutton,body .tool-dock .document-tools #publicmapbutton{padding-left:3px;padding-right:3px}
 body .tool-dock #placementmenuopen,body .tool-dock .document-tools #attendanceplanbutton,body .tool-dock .document-tools #registryinfobutton,body .tool-dock .document-tools #publicmapbutton{width:68px;min-width:68px;max-width:68px}}
/* 選択状況は右下の凡例の上に、凡例と同じ幅・不透明の背景で表示する。 */
#mapcredits .map-selection-summary{width:0;min-width:100%;box-sizing:border-box;padding:3px;margin:0;background:#fff;border-radius:2px;line-height:1.2;color:#243d37;pointer-events:none}
#mapcredits .map-selection-summary span{margin:0;font-size:10px;white-space:normal}

/* 左側の地番操作・文書ボタンの横幅を統一。 */
#map #parcel-quick button,#attendanceplanbutton,#registryinfobutton,#publicmapbutton{width:84px;min-width:84px;max-width:84px;box-sizing:border-box;padding-left:6px;padding-right:6px;text-align:center}
#attendanceplanbutton,#registryinfobutton,#publicmapbutton{left:9px}

#map #parcel-quick button{height:32px;min-height:32px;padding-top:4px;padding-bottom:4px}
/* 登記情報・立会予定：押している間は公図と同じ配色。左側の欄（準備中の表示）は図面の左に重ね、右側の図面操作は妨げない。 */
body .tool-dock .document-tools #registryinfobutton[aria-pressed=true],body .tool-dock .document-tools #attendanceplanbutton[aria-pressed=true]{background:#245b78;color:#fff;border-color:#245b78}
#documentpanel{position:absolute;left:0;top:0;bottom:0;width:min(46%,420px);z-index:7;box-sizing:border-box;padding:12px 14px;background:#fffffff2;border-right:1px solid #c9d6ce;color:#243d37;overflow:auto}
#documentpanel[hidden]{display:none}
#documentpanel strong{display:block;font-size:14px;margin-bottom:8px}
#documentpanel p{margin:0;font-size:12px;line-height:1.6}/* 左下：上が設定、下が全画面／全画面解除。同じ幅・高さ、背景は白、枠線と文字は従来の全画面ボタンの背景色。 */
#map #settingsopen{position:absolute;left:8px;bottom:71px;z-index:10;display:inline-flex;align-items:center;justify-content:center;gap:3px;margin:0;touch-action:none;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none}
html body #map #fullscreen,html body #map #fullscreen[aria-pressed="true"],html body #map #settingsopen{width:72px;min-width:72px;max-width:72px;height:32px;min-height:32px;padding:0 4px;box-sizing:border-box;background:#fff;color:#163d36;border:1px solid #163d36;border-radius:7px;font-size:11px;line-height:1}
html body #map #settingsopen .gear{font-size:12px}/* スタンプ：マーカーと同じ位置に出す設定欄。文字（交点・復元・再立会・要協議・使った自由入力・他）、色、大きさを選ぶ。 */
body #stampoptions{position:absolute;top:calc(100% + 4px);bottom:auto;left:auto;right:0;width:min(440px,100%);max-height:min(300px,calc(100dvh - 190px));overflow:auto;overscroll-behavior:contain;background:white;border:1px solid #aabcb2;border-radius:8px;padding:8px;box-shadow:0 3px 12px #163d3620;z-index:10;display:flex;flex-direction:column;gap:6px}
body #stampoptions[hidden]{display:none}
#stampoptions .stamp-group{display:flex;align-items:center;gap:6px}
#stampoptions .stamp-label{flex:0 0 46px;font-size:10px;color:#566b63}
#stampoptions .stamp-row{display:flex;flex-wrap:wrap;gap:4px}
#stampoptions .stamp-row button{min-height:30px;padding:3px 8px;font-size:11px;border:1px solid #b8cbbf;border-radius:7px;background:#fff;color:#24483e}
#stampoptions .stamp-row button[aria-pressed=true]{box-shadow:inset 0 0 0 2px currentColor;font-weight:700;background:#f3f7f2}
#stampoptions .stamp-row button[data-custom=true]{border-style:dashed}
#stampoptions #stamptext{flex:1;min-width:0;height:30px;font-size:13px;padding:2px 6px}
#stampoptions #stampstatus{font-size:10px;color:#566b63}
/* スタンプ追加後の1段表示：1003〜1024pxは左右の余白1px（消しゴムに合わせる幅も64px）。高さ・文字の大きさは変えない。 */
@media(min-width:1003px) and (max-width:1024px){
 body .tool-dock .placement-toolbar-scroll{gap:3px}body .tool-dock .layer-tools,body .tool-dock .quick-tools,body .tool-dock .tool-row,body .tool-dock .document-tools{gap:2px}
 body .tool-dock .layer-tools button,body .tool-dock .quick-tools button,body .tool-dock .tool-row button,body .tool-dock .document-tools button,body .tool-dock #placementmenuopen,body .tool-dock .document-tools #searchopen,body .tool-dock .document-tools #attendanceplanbutton,body .tool-dock .document-tools #registryinfobutton,body .tool-dock .document-tools #publicmapbutton{padding-left:1px;padding-right:1px}
 body .tool-dock #placementmenuopen,body .tool-dock .document-tools #attendanceplanbutton,body .tool-dock .document-tools #registryinfobutton,body .tool-dock .document-tools #publicmapbutton{width:64px;min-width:64px;max-width:64px}}
/* 新点地番一覧・地番名変更の入れ物の、ボタンの右の空いた透明な部分は、タッチを下の図面へ通す。ボタンは従来どおり押せる（方位の記号はもともとタッチを受けない）。公図モードのロックは変えない。 */
#parcel-quick{pointer-events:none}
body:not(.publicmap-mode) #parcel-quick>:not(.north){pointer-events:auto}/* 公図モードの操作感（2026-10-21）：公図の上部の操作欄・案内では、2本指・すばやい2回のタッチで画面全体が拡大しない（iPad）。ボタンは押せる。 */
#publicmap-panel .publicmap-toolbar,#publicmapstatus{touch-action:pan-x}
#publicmapbutton,#publicmap-panel button{touch-action:manipulation}

/* 新点地番一覧の付近（2026-10-21 ユーザー指定）：
   一覧は「新点地番一覧」ボタンの右（方位の記号の右）から出し、「地番名変更」と重ねない。一覧の上の線は、一覧の枠が透明なまま
   ボタンの位置から始まっていたため、ボタンの横に出ていた線（一覧の上端の線）。白い背景の枠にして、一覧の範囲を分かるようにする。
   一覧・地番名変更を開いている間は、2つのボタンを新点の図（タッチを受ける透明な面）より前に出し、押せるようにする（新点MODE の間は今までどおり）。 */
#newparcel-root .parcel-panel{left:calc(140px / var(--ui-scale))!important;top:calc(64px / var(--ui-scale))!important;max-height:calc((100% - 76px) / var(--ui-scale))!important;max-width:calc((100% - 152px) / var(--ui-scale))!important;background:#fffffff2!important;border:1px solid #c8d7d1!important;border-radius:8px;padding:6px;box-sizing:border-box}
#map:has(.gps-quick.has-device-note) #newparcel-root .parcel-panel{top:calc(106px / var(--ui-scale))!important;max-height:calc((100% - 118px) / var(--ui-scale))!important}
#map:has(#np-parcellist[aria-pressed=true]) #parcel-quick,#map:has(#np-parceledit[aria-pressed=true]) #parcel-quick{z-index:10}
/* 2026-10-21 K037：設定の中の「チェック一括解除」（上部のときと同じ色）。K036：「開く」のメニュー中は、ほかのメニューボタンを薄く。 */
#settingspanel #clearchecks{background:#b42335;color:#fff;border:1px solid #8c1827;font-weight:700}
body.filemenu-open button:not(#openfiles):not(#filemenu button):not(#simaconfirm button):not(dialog button):not([data-sima-modal] button):not([role=dialog] button):not([aria-modal=true] button){opacity:.45}

/* 2026-10-21 みずきの指定：「登記情報」「立会予定」は、図上に表示しているとき（長押しで切り替え、map-layer-on）は SIMA1 などと同じ濃い塗り（#163d36）に白文字。図上の表示が OFF なら、もとの色（パネルを開いている間の青を含む）。 */
body #registryinfobutton.map-layer-on,body #attendanceplanbutton.map-layer-on,body .tool-dock .document-tools #registryinfobutton.map-layer-on,body .tool-dock .document-tools #attendanceplanbutton.map-layer-on{background:#163d36;color:#fff;border-color:#163d36}

/* 2026-10-22 みずきの指定：設定の画面は右側に出す（以前は左）。設定ボタンは全画面でないときは右上の「新規」の左（ボタン1つ分あける）、短く押して開く。 */
.settings-open main:has(>aside){grid-template-columns:minmax(0,1fr) 320px}.settings-open main>aside{order:2;border-right:0;border-left:1px solid #dde4dc}body.drawing-fullscreen.settings-open main>aside{inset:0 0 0 auto;box-shadow:-8px 0 24px #0003}header .file-actions #settingsopen.in-header{position:static;left:auto;bottom:auto;align-self:center;flex:0 0 auto}
#settingsopen[hidden]{display:none!important}
/* K060（2026-10-22 みずきの指定・依頼10）：アプリの表示全体（図面・公図PDF・登記・予定・詳細など）で、端末標準の文字の選択・コピー（長押しの吹き出し）を止める。
   文字入力の欄（input・textarea・select・contenteditable）は今までどおり選択・入力・修正できるようにする（iPad の Safari で親の指定が入力を止めないよう、欄には text を明示）。アプリ独自の長押し・選択の操作は、文字の選択とは別の処理なので変わらない。 */
html,body,body *{-webkit-user-select:none;user-select:none;-webkit-touch-callout:none}
input,textarea,select,[contenteditable]:not([contenteditable=false]),[contenteditable]:not([contenteditable=false]) *{-webkit-user-select:text;user-select:text;-webkit-touch-callout:default}
