/* drawer (V1.9.8): one bottom tool drawer replaces the dock bar + floating map buttons */
body.td-on #dk{position:fixed!important;left:-9999px!important;bottom:auto!important;top:-9999px!important;opacity:0;pointer-events:none}
body.td-on #wt-ctl,body.td-on .maplibregl-ctrl-zoom-in,body.td-on .maplibregl-ctrl-zoom-out,body.td-on .maplibregl-ctrl-compass,body.td-on .leaflet-control-zoom{display:none!important}
#td{display:none;position:fixed;left:0;right:0;bottom:0;z-index:2070;color:#eef1e4;font-family:inherit;transform:translateY(calc(100% - var(--td-peek)));transition:transform .26s cubic-bezier(.2,.8,.2,1);--td-peek:calc(30px + env(safe-area-inset-bottom,0px));touch-action:none}
body.td-show #td{display:block}
#td.open{transform:translateY(0)}
#td.drag{transition:none}
#td .td-box{max-width:760px;margin:0 auto;background:linear-gradient(180deg,#0f1a11fa,#070c08fc);border:1px solid #9ccc6555;border-bottom:0;border-radius:18px 18px 0 0;box-shadow:0 -6px 24px #0008;max-height:78vh;display:flex;flex-direction:column}
#td-h{display:flex;align-items:center;justify-content:center;gap:8px;width:100%;height:30px;background:none;border:0;color:#cfe8b0;font:600 11px/1 inherit;letter-spacing:.08em;cursor:grab;padding:0}
#td-h i{display:block;width:44px;height:5px;border-radius:3px;background:#9ccc65}
#td-h:focus-visible{outline:2px solid #ffd54f;outline-offset:-3px}
#td .td-body{overflow:auto;padding:2px 12px calc(12px + env(safe-area-inset-bottom,0px));touch-action:pan-y}
#td h4{margin:10px 2px 6px;font-size:11px;letter-spacing:.12em;color:#9ccc65;text-transform:uppercase}
#td .td-g{display:grid;grid-template-columns:repeat(auto-fill,minmax(76px,1fr));gap:6px}
#td .td-g button{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;min-height:68px;padding:6px 4px;border-radius:12px;border:1px solid #ffffff1f;background:#ffffff0d;color:#eef1e4;font:600 11.5px/1.15 inherit;text-align:center;cursor:pointer}
#td .td-g button:active,#td .td-g button.on{background:#9ccc6533;border-color:#9ccc65}
#td .td-g button:focus-visible{outline:2px solid #ffd54f}
#td .td-g svg{width:28px;height:28px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
#td .td-g .em{font-size:26px;line-height:28px}
#td-edge{display:none;position:fixed;left:0;right:0;bottom:0;height:calc(18px + env(safe-area-inset-bottom,0px));z-index:2065;touch-action:none}
body.td-show #td-edge{display:block}
#td-scrim{display:none;position:fixed;inset:0;z-index:2066;background:#0004}
body.td-open #td-scrim{display:block}
body.td-on .maplibregl-ctrl-bottom-right,body.td-on .maplibregl-ctrl-bottom-left,body.td-on .leaflet-bottom{margin-bottom:calc(30px + env(safe-area-inset-bottom,0px))!important}
/* V1.9.11 sighting log */
.sl-box{margin:8px 0;padding:8px;border:1px solid #ffb30055;border-radius:10px;background:#ffb3000d}
.sl-box .sl-log{width:100%;min-height:46px;font-size:16px}
.sl-hist{margin-top:8px}.sl-stats{display:flex;gap:12px;margin:4px 0;font-size:15px}.sl-stats b{color:#ffd54f;font-size:18px}
.sl-row{display:flex;align-items:center;gap:6px;padding:4px 0;border-top:1px solid #ffffff14;font-size:13px}.sl-row span{flex:1}
.sl-row button{min-width:44px;min-height:36px;border-radius:8px;border:1px solid #ffffff33;background:#222b22;color:#eef1e4}
#sl-form{position:fixed;inset:0;z-index:3000;background:#0008;display:flex;align-items:flex-end;justify-content:center}
#sl-form .sl-card{width:100%;max-width:480px;background:#161d16;color:#eef1e4;border-radius:16px 16px 0 0;padding:12px 14px calc(14px + env(safe-area-inset-bottom));border-top:2px solid #ffb300}
.sl-hd{display:flex;justify-content:space-between;align-items:center;font-size:18px}.sl-hd button{background:none;border:0;color:#eef1e4;font-size:28px;min-width:44px;min-height:44px}
.sl-step{display:flex;align-items:center;gap:10px;margin:6px 0}.sl-step span{flex:1;font-size:17px;font-weight:700}
.sl-step button{width:56px;height:52px;font-size:26px;border-radius:12px;border:1px solid #ffb30088;background:#2a2f1f;color:#ffd54f}
.sl-step output{min-width:40px;text-align:center;font-size:24px;font-weight:800}
.sl-f{display:block;margin:6px 0;font-size:13px}.sl-f input,.sl-f select{display:block;width:100%;min-height:42px;font-size:16px;margin-top:2px}
.sl-row2{display:flex;gap:10px}.sl-row2 .sl-f{flex:1}.sl-btns{display:flex;gap:10px;margin-top:8px}.sl-btns .btn{flex:1;min-height:48px}
.badge.slc{background:#2e7d32;color:#fff}

/* V1.9.11: an UNDO bar must sit above an open sheet (3D sheets are z 2100) */
#toast.act{z-index:2300}
