:root{--blue:#1669e8;--navy:#0a2751;--green:#16804b;--muted:#69798e;--line:#e3e9f0;--bg:#f7faff;--shadow:0 5px 20px #142b501c;font-family:system-ui,-apple-system,'Apple SD Gothic Neo','Malgun Gothic',sans-serif;color:#19314d;font-synthesis:none}
*{box-sizing:border-box}html,body{height:100%;height:100dvh;margin:0;overflow:hidden;background:var(--bg)}body{font-size:14px}button,input,select,textarea{font:inherit}button{cursor:pointer;-webkit-tap-highlight-color:transparent}button:disabled{opacity:.55;cursor:not-allowed}button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:3px solid #93bafd;outline-offset:2px}button svg,.brand-icon svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}.svg-sprite{position:absolute;width:0;height:0;overflow:hidden}.hidden{display:none!important}.full{width:100%}.compact{padding:8px 11px;min-height:36px}.large{min-height:51px;font-size:16px}.primary,.secondary,.danger-quiet{border:0;border-radius:11px;font-weight:800;display:inline-flex;align-items:center;justify-content:center;gap:6px;padding:11px 13px}.primary{background:var(--blue);color:#fff}.secondary{background:#edf3fc;color:#27507e}.danger-quiet{background:#fff0ec;color:#a13726}.primary:active,.secondary:active,.danger-quiet:active{transform:translateY(1px)}
.auth-screen{height:100%;display:grid;place-items:center;padding:18px;overflow:auto;background:radial-gradient(ellipse at 20% 10%,#deedff,transparent 50%),#f6f9ff}.auth-panel{width:min(390px,100%);background:#fff;padding:28px;border-radius:22px;box-shadow:0 16px 45px #25446a17;border:1px solid #e8eef8;display:flex;flex-direction:column}.brand-lockup{display:flex;align-items:center;gap:11px}.brand-icon{display:grid;place-items:center;width:52px;height:52px;background:var(--blue);color:white;border-radius:15px}.brand-icon svg{width:28px;height:28px}.brand-lockup strong{font-size:27px;letter-spacing:-1px;display:block;color:var(--navy)}.brand-lockup span{font-size:12px;color:var(--muted)}h1{font-size:25px;margin:23px 0 5px}.auth-panel>p{color:var(--muted);line-height:1.6;margin:0 0 18px;font-size:13px}.auth-panel label,.form-fields label,.drawer label{font-weight:750;font-size:12px;margin:11px 0 6px;color:#36516f}.auth-panel label small,.form-fields label small{font-weight:500;color:#8591a1}.auth-panel input,.form-fields input,.form-fields textarea,.form-fields select,.drawer input{border:1px solid #d5e1f0;background:#fff;border-radius:10px;width:100%;padding:12px;min-height:44px;color:#19314d}.auth-panel .primary{margin-top:22px}.auth-panel .auth-hint{font-size:11px;line-height:1.6;margin:14px 0 0;color:#8091a5}
.app{position:relative;width:100%;height:100%;height:100dvh;overflow:hidden}.page{position:absolute;inset:0}.map-page{background:#e1e8ed}.map-canvas{position:absolute;inset:0;width:100%;height:100%}.map-canvas img{max-width:none}.map-placeholder{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;color:#657c93;background:linear-gradient(155deg,#e7f0ea,#ecf4fa)}.map-placeholder svg{width:45px;height:45px;color:#aac0cb}.map-placeholder strong{font-size:16px}.map-placeholder span{font-size:12px;text-align:center;max-width:250px;line-height:1.6}
.top-bar{position:absolute;z-index:12;top:calc(6px + env(safe-area-inset-top));left:calc(7px + env(safe-area-inset-left));right:calc(7px + env(safe-area-inset-right));display:flex;gap:5px;align-items:center;pointer-events:none;height:36px}.top-bar>*{pointer-events:auto}.mini-brand{background:#fff;color:#0f3d80;font-weight:1000;font-size:15px;letter-spacing:-.4px;padding:7px 10px;border-radius:10px;box-shadow:var(--shadow)}.chip{height:32px;background:#fff;border:0;border-radius:10px;display:flex;align-items:center;gap:3px;padding:5px 9px;color:#153b6a;font-size:12px;font-weight:850;box-shadow:var(--shadow)}.chip svg{width:13px;height:13px}.save-indicator{background:#fffd;color:#268153;padding:6px 8px;border-radius:9px;font-size:10px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:130px;box-shadow:var(--shadow)}.save-indicator.error{color:#ab4937}.menu-toggle{margin-left:auto}.icon-button{border:0;background:#fff;width:35px;height:35px;display:grid;place-items:center;border-radius:11px;box-shadow:var(--shadow);font-size:18px;color:#365578}.icon-button svg{width:19px;height:19px}
.map-tools{position:absolute;z-index:9;right:calc(9px + env(safe-area-inset-right));top:calc(64px + env(safe-area-inset-top));display:flex;flex-direction:column;gap:8px}.map-tool{height:40px;width:40px;border-radius:13px;border:1px solid #e4eaf2;background:white;box-shadow:var(--shadow);color:#2762a4;display:grid;place-items:center}.map-tool.active{color:white;background:var(--blue)}.map-tool svg{width:21px;height:21px}.target-strip{position:absolute;top:calc(51px + env(safe-area-inset-top));left:calc(9px + env(safe-area-inset-left));max-width:calc(100% - 75px);z-index:8;box-shadow:var(--shadow);border-radius:11px;background:#fffe;padding:9px 11px;display:flex;gap:5px;flex-direction:column;font-size:12px}.target-strip strong{font-size:12px}.target-strip span{font-size:10px;color:#586b81}.map-hint{position:absolute;z-index:10;left:50%;transform:translateX(-50%);top:calc(107px + env(safe-area-inset-top));padding:9px 13px;background:#0c3263;color:#fff;border-radius:12px;white-space:nowrap;font-size:12px;box-shadow:var(--shadow)}.stop-card{position:absolute;z-index:10;left:calc(8px + env(safe-area-inset-left));right:calc(8px + env(safe-area-inset-right));bottom:calc(54px + env(safe-area-inset-bottom));border-radius:14px;background:#fff;padding:11px;box-shadow:0 4px 23px #1226403c;max-width:550px;margin-inline:auto}.stop-card-head{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:4px}.stop-card h3{font-size:14px;margin:0;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.stop-card p{margin:0 0 8px;font-size:11px;color:#69788b;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.stop-card-buttons{display:flex;gap:6px;align-items:center;flex-wrap:wrap}.stop-card-buttons button{flex:1;font-size:12px;min-width:55px;padding:9px 7px}.stop-card select{font-size:12px;padding:7px;border:1px solid var(--line);border-radius:9px;max-width:90px}.stop-pin{min-width:30px;height:30px;border:2px solid #fff;box-shadow:0 2px 8px #1527437e;border-radius:12px 12px 12px 2px;background:#186be8;color:white;transform:rotate(-45deg);display:grid;place-items:center;font:900 13px system-ui}.stop-pin span{transform:rotate(45deg)}.stop-pin.done{background:#169056}.stop-pin.active{background:#ec4d46}.gps-pin{height:20px;width:20px;background:#2d7fff;border:4px solid white;border-radius:50%;box-shadow:0 0 0 8px #2378df3a,0 2px 8px #2539595c}
.mode-nav{position:absolute;z-index:11;left:0;right:0;bottom:0;padding-bottom:env(safe-area-inset-bottom);height:calc(45px + env(safe-area-inset-bottom));background:#fffe;border-top:1px solid #e4eaf1;display:flex;align-items:center;justify-content:center;gap:8px;box-shadow:0 -2px 12px #20304315}.nav-option{display:flex;align-items:center;justify-content:center;gap:6px;width:105px;height:35px;border:0;background:transparent;color:#6a7a8e;font-weight:750;border-radius:10px;font-size:12px}.nav-option.active{background:#e6f0ff;color:var(--blue)}.nav-option svg{width:19px;height:19px}
.list-page{padding-top:calc(48px + env(safe-area-inset-top));padding-bottom:calc(48px + env(safe-area-inset-bottom));overflow-y:auto;overscroll-behavior:contain;background:#fff;max-width:100%}.list-heading,.round-row,.summary,.list-actions,.filters,.stop-list,.list-footnote{max-width:770px;margin-inline:auto}.list-heading{display:flex;align-items:center;justify-content:space-between;padding:5px 15px 8px}.list-heading h2{margin:0;font-size:22px;letter-spacing:-.7px}.list-heading span{font-size:11px;color:#7b8797}.round-row{display:flex;gap:6px;padding:0 14px 11px;align-items:center}.round-tabs{display:flex;gap:6px;overflow:auto;scrollbar-width:none;flex:1}.round-tab{border:1px solid #d6e1ef;border-radius:12px;background:#f2f6fd;padding:10px 14px;font-size:13px;font-weight:800;white-space:nowrap;color:#5b6c81}.round-tab.active{background:#176be8;border-color:#176be8;color:#fff}.round-plus{flex-shrink:0;display:grid;place-items:center;width:39px;height:39px;background:#dcf6e8;color:#157f4c;border:0;border-radius:12px}.summary{display:flex;gap:6px;padding:0 14px 11px}.sum-pill{flex:1;padding:8px 4px;text-align:center;border-radius:9px;background:#f0f5ff;color:#3861a4;font-size:12px;font-weight:800}.sum-pill.done{background:#e6f7ed;color:#19844d}.sum-pill.failed{background:#fff0ef;color:#b14c41}.list-actions{padding:0 14px 10px;display:flex;gap:7px;flex-wrap:wrap}.list-actions button{flex:1;min-width:95px}.list-actions button svg{width:16px;height:16px}.filters{padding:0 14px 9px;display:flex;gap:6px}.filter{border:0;background:#f1f4f8;color:#60728b;padding:7px 14px;border-radius:30px;font-weight:800;font-size:12px}.filter.active{background:#133b76;color:#fff}.stop-list{padding:0 10px 12px}.stop-row{display:flex;align-items:center;gap:6px;background:#fff;border:1px solid #e4eaf1;border-radius:12px;padding:9px 7px;margin:5px 0;min-height:67px}.stop-row.is-done{background:#f7fbf9;border-color:#d7eddf}.stop-row.dragging{opacity:.55}.order-controls{width:26px;flex-shrink:0;display:flex;flex-direction:column;gap:1px}.order-controls button{border:0;background:#f0f4f9;border-radius:5px;width:26px;height:23px;color:#66809f;font-size:14px;font-weight:1000}.order-controls .grab{color:#a2acc0;font-size:10px;cursor:grab}.stop-number{width:25px;height:28px;display:grid;place-items:center;background:#e6efff;color:#1f5eb3;font-size:13px;border-radius:8px;font-weight:900;flex-shrink:0}.stop-row.is-done .stop-number{background:#d9f0e0;color:#16824b}.stop-details{flex:1;min-width:0;cursor:pointer}.stop-details strong,.stop-details small{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.stop-details strong{font-size:14px}.stop-details small{font-size:11px;color:#758599;margin-top:3px}.stop-sub{font-size:10px;color:#5e88ae;margin-top:3px}.stop-actions{display:flex;align-items:center;gap:4px;flex-shrink:0}.stop-actions button{border:0;border-radius:8px;padding:8px 9px;font-size:11px;font-weight:900}.action-start{background:#e2efff;color:#1765bb}.action-done{background:#dff5e8;color:#11804a}.action-more{background:#f3f5f8;color:#62738b}.empty-state{text-align:center;padding:38px 15px;color:#7a8ca2}.empty-state svg{width:44px;height:44px;color:#b1c1d2;margin-bottom:10px}.empty-state strong{display:block;color:#4b607c;font-size:16px}.list-footnote{padding:2px 18px 16px;color:#91a0b1;font-size:11px;line-height:1.5}
.drawer-scrim{position:fixed;z-index:19;inset:0;background:#12243868}.drawer{position:fixed;z-index:20;top:0;right:0;bottom:0;width:min(360px,100vw);background:#fff;box-shadow:-10px 0 35px #1d294b30;padding:18px;overflow:auto;display:flex;flex-direction:column}.drawer-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:15px}.drawer-head h2{font-size:20px}.drawer-head button{box-shadow:none}.drawer input{width:100%}.drawer-value{padding:12px;background:#f2f6fc;border-radius:9px;overflow-wrap:anywhere;color:#43617e;font-size:12px}.drawer-stack{display:flex;flex-direction:column;gap:8px;margin-top:20px}.drawer-note{margin-top:20px;font-size:11px;line-height:1.7;color:#8594a6}
.stop-dialog{width:min(460px,calc(100vw - 24px));border:0;border-radius:18px;box-shadow:0 15px 55px #1c345466;padding:0;max-height:calc(100dvh - 32px);overflow:hidden}.stop-dialog::backdrop{background:#0b203a91}.stop-dialog form{display:flex;flex-direction:column;max-height:calc(100dvh - 32px)}.dialog-header{padding:15px 16px 5px;display:flex;align-items:center;justify-content:space-between}.dialog-header h2{font-size:19px;margin:0}.dialog-header button{box-shadow:none}.form-fields{padding:7px 16px;overflow-y:auto;display:flex;flex-direction:column}.form-fields label{margin-top:10px}.form-fields input,.form-fields select,.form-fields textarea{padding:10px;min-height:39px}.form-fields textarea{resize:vertical}.address-field{display:flex;gap:6px}.address-field input{min-width:0;flex:1}.address-field button{white-space:nowrap;min-width:85px;padding:7px}.coords{display:flex;gap:10px}.coords div{flex:1;min-width:0;display:flex;flex-direction:column}.check-row{display:flex;align-items:center;gap:7px}.check-row input{width:18px;height:18px;min-height:0}.dialog-actions{padding:14px 16px;display:flex;justify-content:flex-end;gap:8px;background:#f9fbfd;border-top:1px solid var(--line)}.dialog-actions button{min-width:95px}.toast{position:fixed;z-index:50;left:50%;transform:translateX(-50%);bottom:calc(65px + env(safe-area-inset-bottom));background:#183b60;color:#fff;padding:11px 15px;border-radius:13px;box-shadow:var(--shadow);font-size:12px;max-width:calc(100vw - 20px);line-height:1.45;text-align:center}
@media(min-width:950px){.list-page{background:#f9fbff}.stop-list{padding:0 14px}.list-heading{padding-top:12px}.stop-row{padding:12px}.stop-actions button{font-size:12px;padding:11px 13px}.stop-details strong{font-size:15px}}
@media(max-width:375px){.save-indicator{display:none}.mini-brand{font-size:13px}.stop-actions button{padding:7px 6px}.list-heading h2{font-size:19px}.stop-row{gap:4px}.stop-details strong{font-size:12px}}
/* Landscape: move the slim two-mode navigation to the right and hide the header's clutter. */
@media(orientation:landscape){
 .app[data-view="map"] .mode-nav{top:0;bottom:0;left:auto;right:0;width:calc(46px + env(safe-area-inset-right));height:100%;padding:0 env(safe-area-inset-right) 0 0;border-top:0;border-left:1px solid #e4eaf1;flex-direction:column;gap:8px}.app[data-view="map"] .nav-option{width:42px;height:51px;display:flex;flex-direction:column;gap:2px;font-size:9px}.app[data-view="map"] .nav-option svg{width:17px;height:17px}
 .app[data-view="map"] .top-bar{top:calc(4px + env(safe-area-inset-top));right:calc(55px + env(safe-area-inset-right));height:30px}.app[data-view="map"] .mini-brand,.app[data-view="map"] .save-indicator{display:none}.app[data-view="map"] .chip{height:29px;opacity:.88}.app[data-view="map"] .menu-toggle{height:30px;width:31px}
 .app[data-view="map"] .map-tools{right:calc(53px + env(safe-area-inset-right));top:calc(44px + env(safe-area-inset-top))}.app[data-view="map"] .map-tool{height:33px;width:33px;border-radius:10px}.app[data-view="map"] .map-tool svg{width:17px;height:17px}
 .app[data-view="map"] .target-strip{top:calc(40px + env(safe-area-inset-top));max-width:50%;padding:6px 9px}.app[data-view="map"] .stop-card{bottom:calc(5px + env(safe-area-inset-bottom));right:calc(53px + env(safe-area-inset-right));padding:7px 9px}.app[data-view="map"] .stop-card p{margin-bottom:5px}.app[data-view="map"] .stop-card-buttons button{padding:7px}
}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important;transition:none!important}}

.simple-dialog{width:min(350px,calc(100vw - 24px));border:0;border-radius:17px;padding:8px;background:#fff;box-shadow:0 14px 45px #1b304a70}.simple-dialog::backdrop{background:#081d346b}.simple-actions{display:flex;flex-direction:column;gap:7px;padding:9px}.simple-actions button{min-height:43px;font-size:14px}.simple-actions a{display:block;text-align:center;background:#e8f2ff;border-radius:10px;padding:13px;color:#1258ab;text-decoration:none;font-weight:800;overflow-wrap:anywhere}
/* Prominent but compact add-stop action; the map remains the primary surface. */
.map-add-fab{position:absolute;z-index:10;right:calc(10px + env(safe-area-inset-right));bottom:calc(57px + env(safe-area-inset-bottom));height:44px;padding:0 15px;border:0;border-radius:15px;background:var(--blue);color:#fff;box-shadow:0 4px 17px #164f9e54;display:flex;align-items:center;justify-content:center;gap:7px;font-size:13px;font-weight:900;white-space:nowrap}
.map-add-fab svg{width:20px;height:20px;stroke-width:2.4}.map-add-fab:focus-visible{outline:3px solid #99bfff;outline-offset:2px}.map-add-fab.active{background:#153c72}
.map-page:has(.stop-card:not(.hidden)) .map-add-fab{bottom:calc(180px + env(safe-area-inset-bottom))}
@media(orientation:landscape){.app[data-view="map"] .map-add-fab{right:calc(55px + env(safe-area-inset-right));bottom:calc(12px + env(safe-area-inset-bottom));height:39px;border-radius:12px;padding:0 11px;font-size:12px}.app[data-view="map"] .map-page:has(.stop-card:not(.hidden)) .map-add-fab{bottom:calc(12px + env(safe-area-inset-bottom))}}

/* A visible temporary pin while editing positions; it is not saved until confirmed. */
.draft-pin{width:36px;height:36px;display:grid;place-items:center;border:3px solid #fff;border-radius:50% 50% 50% 9px;transform:rotate(-45deg);background:#f17828;color:#fff;box-shadow:0 3px 11px #7a3a1888;font-size:22px;font-weight:900;line-height:1}
.draft-pin span{display:block;transform:rotate(45deg)}
.map-hint{white-space:normal;max-width:calc(100vw - 28px);min-width:190px;width:max-content;line-height:1.45;text-align:center}

/* Inspect a pressed point without covering the delivery add action. */
.inspect-pin{height:26px;width:26px;border:3px solid #fff;border-radius:50% 50% 50% 5px;transform:rotate(-45deg);display:grid;place-items:center;background:#127d99;color:#fff;font-size:13px;box-shadow:0 2px 8px #17314975}
.map-address-card{position:absolute;z-index:12;left:calc(9px + env(safe-area-inset-left));right:calc(9px + env(safe-area-inset-right));bottom:calc(111px + env(safe-area-inset-bottom));max-width:490px;margin-inline:auto;max-height:calc(100dvh - 148px);overflow:auto;padding:12px 14px;background:#fff;box-shadow:0 8px 30px #182e4d42;border:1px solid #d9e8f3;border-radius:16px;line-height:1.45}
.map-address-heading{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:5px;color:#193e69;font-size:13px}
.map-address-heading button{border:0;background:#f0f4fa;width:25px;height:25px;border-radius:8px;color:#54708f;flex-shrink:0}
.map-address-road,.map-address-jibun,.map-address-coords{font-size:12px;margin:5px 0;overflow-wrap:anywhere}
.map-address-road{font-weight:750;color:#15365b}.map-address-jibun{color:#59708a}.map-address-coords{color:#31779a;font-variant-numeric:tabular-nums}
.map-address-card .primary{width:100%;margin-top:7px;min-height:36px}
@media(orientation:landscape){.app[data-view="map"] .map-address-card{right:calc(54px + env(safe-area-inset-right));bottom:calc(58px + env(safe-area-inset-bottom));max-height:calc(100dvh - 95px)}}

/* Live address search floats at the lower-right, above the map/list switch. */
.map-search-panel{position:absolute;z-index:11;right:calc(10px + env(safe-area-inset-right));bottom:calc(56px + env(safe-area-inset-bottom));width:min(365px,calc(100vw - 20px));display:flex;flex-direction:column;gap:6px}
.map-search-row{display:flex;align-items:center;gap:7px;height:46px;border:1px solid #d1e0f1;border-radius:13px;padding:0 10px;background:#fff;box-shadow:0 4px 18px #142b5033}
.map-search-row>svg{width:19px;height:19px;flex-shrink:0;color:#246fe9;stroke-width:2.4}
.map-search-row input{min-width:0;flex:1;height:100%;padding:0 3px;border:0;background:transparent;outline:0;color:#16385b;font-size:13px}
.map-search-row input:focus-visible{outline:0}
.map-search-row button{flex-shrink:0;width:28px;height:28px;display:grid;place-items:center;border:0;border-radius:9px;background:#edf3fc;color:#506c8c}
.map-search-results{max-height:min(215px,30dvh);overflow-y:auto;overscroll-behavior:contain;background:#fff;border:1px solid #d6e4f1;border-radius:13px;box-shadow:0 3px 18px #142b5028;display:flex;flex-direction:column;padding:5px}
.map-search-result{display:flex;flex-direction:column;align-items:stretch;gap:3px;padding:10px 11px;text-align:left;color:#1b3c61;border:0;border-radius:9px;background:#fff}
.map-search-result+ .map-search-result{border-top:1px solid #eef2f7}
.map-search-result:active,.map-search-result:hover{background:#edf5ff}
.map-search-result strong{font-size:12px;overflow-wrap:anywhere;line-height:1.45}
.map-search-result small{font-size:10px;color:#7b8fa8;overflow-wrap:anywhere}
.map-search-message{padding:12px;color:#657d96;font-size:12px;line-height:1.5}
.map-center-actions{background:#fff;border:1px solid #d3e2f1;border-radius:13px;box-shadow:0 4px 15px #142b5023;padding:10px;display:flex;flex-direction:column;gap:7px}
.map-center-text{font-size:11px;color:#4e6988;overflow-wrap:anywhere;text-align:center;font-variant-numeric:tabular-nums}
.map-center-buttons{display:flex;gap:7px}
.map-center-buttons button{flex:1;min-width:0;padding:9px 6px;font-size:12px}
.map-center-pin{position:absolute;z-index:8;pointer-events:none;top:50%;left:50%;width:38px;height:38px;transform:translate(-50%,-100%);filter:drop-shadow(0 4px 4px #15274388)}
.map-center-pin-shape{position:absolute;inset:1px;border:3px solid white;border-radius:50% 50% 50% 8px;background:#f07928;transform:rotate(-45deg);display:grid;place-items:center}
.map-center-pin-dot{width:13px;height:13px;border-radius:50%;background:#fff;box-shadow:0 0 0 3px #f9aa4c4d}
@media(orientation:landscape){.app[data-view="map"] .map-search-panel{right:calc(55px + env(safe-area-inset-right));bottom:calc(8px + env(safe-area-inset-bottom));width:min(310px,calc(100vw - 75px))}.app[data-view="map"] .map-search-row{height:40px}.app[data-view="map"] .map-search-results{max-height:min(120px,27dvh)}.app[data-view="map"] .map-center-actions{padding:7px}.app[data-view="map"] .map-center-buttons button{min-height:33px}}

/* Address search belongs below the top toolbar, not above bottom navigation. */
.map-search-panel{top:calc(50px + env(safe-area-inset-top));bottom:auto;left:calc(9px + env(safe-area-inset-left));right:calc(55px + env(safe-area-inset-right));width:auto;max-width:460px}
.map-search-panel .map-search-row{order:0}
.map-search-panel .map-search-results{order:1}
.map-search-panel .map-center-actions{order:2}
.target-strip{top:calc(109px + env(safe-area-inset-top));left:calc(9px + env(safe-area-inset-left));max-width:min(365px,calc(100% - 78px));z-index:8}
.target-strip .target-distance{font-weight:850;font-size:14px;color:#194a87;font-variant-numeric:tabular-nums}
.target-strip .target-accuracy{font-size:10px;color:#65809d}
.target-strip .target-route-note{font-size:10px;color:#975829;line-height:1.4}
@media(orientation:landscape){
 .app[data-view="map"] .map-search-panel{top:calc(40px + env(safe-area-inset-top));bottom:auto;left:calc(8px + env(safe-area-inset-left));right:auto;width:min(310px,calc(100vw - 120px));max-width:none}
 .app[data-view="map"] .target-strip{top:calc(93px + env(safe-area-inset-top));left:calc(9px + env(safe-area-inset-left));max-width:min(290px,calc(100vw - 120px));padding:7px 9px}
}

/* Compact round selector under pencil; active number indicates the current load. */
.map-round-picker{display:flex;flex-direction:column;align-items:center;gap:5px;max-height:min(45dvh,280px);overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin;padding:1px}
.map-round-tab{flex-shrink:0;height:36px;width:36px;border-radius:11px;border:1px solid #dae4ef;background:#fff;color:#3c628e;box-shadow:0 2px 10px #142b5022;font-size:13px;font-weight:850;display:grid;place-items:center}
.map-round-tab.active{color:#fff;background:#176be8;border-color:#176be8}
.map-round-tab:focus-visible{outline:3px solid #99bfff;outline-offset:2px}
.target-strip .target-route-error{font-size:11px;line-height:1.45;color:#ab4c35}
@media(orientation:landscape){
 .app[data-view="map"] .map-round-tab{height:30px;width:30px;border-radius:9px;font-size:11px}
 .app[data-view="map"] .map-round-picker{max-height:min(40dvh,170px)}
}

/* DSD top-address-and-menu refinement: search shares top row with menu icon. */
.map-search-panel{top:calc(6px + env(safe-area-inset-top));left:calc(7px + env(safe-area-inset-left));right:calc(52px + env(safe-area-inset-right));bottom:auto;max-width:none;width:auto}
.map-search-row{height:36px;border-radius:11px}
.map-search-results{max-height:min(235px,35dvh)}
.target-strip{top:calc(52px + env(safe-area-inset-top));left:calc(8px + env(safe-area-inset-left));max-width:calc(100% - 74px)}
.drawer-status-row{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:12px 11px;background:#f2f6fc;border-radius:11px;margin:1px 0 10px;font-size:12px;color:#52677f;font-weight:750}
.drawer-save-indicator{display:inline-flex;align-items:center;white-space:nowrap;border-radius:8px;padding:6px 9px;background:#e4f7ec;color:#16804b;font-weight:850;font-size:12px}
.drawer-save-indicator.error{background:#fff0eb;color:#b04736}
@media(orientation:landscape){
 .app[data-view="map"] .map-search-panel{top:calc(4px + env(safe-area-inset-top));left:calc(6px + env(safe-area-inset-left));right:auto;width:min(360px,calc(100vw - 118px));max-width:none}
 .app[data-view="map"] .map-search-row{height:34px}
 .app[data-view="map"] .target-strip{top:calc(44px + env(safe-area-inset-top));left:calc(8px + env(safe-area-inset-left));max-width:min(360px,calc(100vw - 115px))}
}

/* List layout: rounds alongside the top-right menu, no redundant page heading. */
.app[data-view="list"] .list-page{
  padding-top:calc(6px + env(safe-area-inset-top));
  padding-bottom:calc(110px + env(safe-area-inset-bottom));
}
.list-page .round-row{
  display:flex;
  align-items:center;
  justify-content:flex-start;
  gap:7px;
  padding:0 calc(55px + env(safe-area-inset-right)) 7px calc(10px + env(safe-area-inset-left));
}
.list-page .round-tabs{
  flex:0 1 auto;
  min-width:0;
  max-width:calc(100% - 46px);
}
.list-page .round-tab{min-height:38px}
.list-page .list-date{
  max-width:770px;
  margin:0 auto;
  padding:0 14px 11px;
  font-size:11px;
  color:#7b8797;
}
.list-page .list-add-fab{
  position:fixed;
  z-index:10;
  right:calc(12px + env(safe-area-inset-right));
  bottom:calc(58px + env(safe-area-inset-bottom));
  min-height:47px;
  padding:0 17px;
  border-radius:14px;
  box-shadow:0 5px 18px #164f9e54;
  font-size:14px;
  white-space:nowrap;
}
.list-page .list-add-fab svg{width:20px;height:20px;stroke-width:2.4}

/* Center home location: initial map viewport only, not a route origin. */
.home-dialog{width:min(430px,calc(100vw - 24px));padding:8px;max-height:calc(100dvh - 24px);overflow:auto}
.home-dialog form{display:flex;flex-direction:column}
.home-fields{padding:4px 12px 12px;display:flex;flex-direction:column;gap:8px}
.home-fields label{font-weight:800;font-size:12px;color:#36516f}
.home-fields input{width:100%;min-height:43px;padding:10px;border:1px solid #d5e1f0;border-radius:10px;min-width:0}
.home-help{font-size:12px;line-height:1.55;color:#667b91;margin:5px 0}
.home-tools{display:flex;gap:6px;flex-wrap:wrap}
.home-tools button{flex:1 1 115px;padding:9px 7px;font-size:12px}
.home-coords{font-variant-numeric:tabular-nums;font-size:12px;color:#24568c;background:#f0f5fc;padding:10px;border-radius:9px;margin:2px 0}
.home-actions{gap:7px;flex-wrap:wrap}
.home-actions button{flex:1;min-width:65px}
.home-location-summary{margin:-3px 0 10px;line-height:1.45;font-size:11px}
.home-pin{width:34px;height:34px;display:grid;place-items:center;color:#fff;font-weight:900;font-size:23px;background:#197a54;border:3px solid #fff;border-radius:50% 50% 50% 7px;transform:rotate(-45deg);box-shadow:0 3px 10px #153a2760}
.home-pin::first-letter{transform:rotate(45deg)}

/* Company-specific original Excel upload selector */
.import-company-select{appearance:auto;-webkit-appearance:menulist;min-width:0;max-width:100%;padding:8px 10px;min-height:36px;border:0;border-radius:11px;font-size:13px;font-weight:800;color:#27507e;background:#edf3fc;cursor:pointer}
.import-company-select option{color:#19314d;background:#fff}
