/* V0.9.4 — minimal map-first route editor. No icon fonts or emoji. */
:root{--cockpit-bg:#f5f3ef;--cockpit-ink:#253c35;--cockpit-navy:#17372f;--cockpit-line:#e2e3dc;--cockpit-accent:#286f59;--cockpit-orange:#bd7545}
body.app-body{background:#f5f3ef}
.app-sidebar{background:#17372f}.app-side-link.active{background:#e9ece6;color:#225544}
.app-main .topbar{border-color:#e1e4de}.app-breadcrumb small{color:#8c9b90}
.app-live-dot{background:#b98b4e;box-shadow:0 0 0 4px #f7f1e6}
body[data-view="route"] .map-panel{position:relative;background:#e7ece7}
body[data-view="route"] .map-panel>.map-header{border-color:#e2e6de}
body[data-view="route"] .map-header-left strong{color:#21433a!important}
.manual-editor-toggle{font:inherit;border:1px solid #b7c9bd;background:#f3f8f4;color:#225a45;border-radius:9px;display:flex;gap:7px;align-items:center;justify-content:center;font-size:11px;line-height:1.2;font-weight:760;padding:9px 12px;cursor:pointer;white-space:nowrap}
.manual-editor-toggle:hover,.manual-editor-toggle[aria-expanded="true"]{background:#225b48;color:#fff;border-color:#225b48}
.manual-editor-toggle svg{flex:none}
.route-editor[hidden],.manual-dirty[hidden]{display:none!important}
.route-editor{position:absolute;z-index:70;top:122px;right:14px;bottom:14px;width:min(400px,calc(100% - 28px));background:#fff;border:1px solid #e2e3da;box-shadow:0 14px 45px rgba(14,39,32,.19);border-radius:14px;display:flex;flex-direction:column;min-height:0;overflow:hidden;color:#2d433b}
.route-editor-head{padding:19px 19px 5px;display:flex;justify-content:space-between;align-items:start;gap:12px}
.route-editor-head small{font-size:9px;letter-spacing:1.45px;font-weight:800;color:#a17842}
.route-editor-head h3{font-size:21px;letter-spacing:-.65px;margin:5px 0;color:#214339;font-weight:780}
.route-editor-head button{border:1px solid #e1e7dd;background:#f7f8f5;color:#50665b;border-radius:8px;width:32px;height:32px;font-size:22px;line-height:1;cursor:pointer}
.manual-summary{margin:3px 19px 11px!important;font-size:11px!important;color:#74867b!important}
.manual-dirty{background:#f6efe4;color:#876033;border-block:1px solid #ecdfcd;padding:9px 19px;font-size:11px;font-weight:720}
.manual-search-wrap{display:flex;align-items:center;gap:9px;margin:6px 15px 10px;background:#f7f9f7;border:1px solid #dfe8df;padding:0 11px;border-radius:9px;min-height:43px;color:#779084}
.manual-search-wrap input{border:0!important;background:transparent!important;box-shadow:none!important;outline:none!important;width:100%;padding:9px 0!important;font:inherit!important;color:#2e4d40;font-size:12px!important}
.manual-review{margin:0 15px 10px;background:#faf9f6;border:1px solid #ede5d9;border-radius:9px;flex:0 0 auto;max-height:160px;overflow:auto}
.manual-review summary{padding:10px 12px;font-size:11px;font-weight:750;cursor:pointer;color:#6b695d;list-style-position:inside}
#manual-warnings{padding:0 12px 10px}.manual-warning{display:flex;gap:8px;border-top:1px solid #ece8e1;padding:8px 0;font-size:11px;line-height:1.45;color:#805f3c}.manual-dot{width:6px;height:6px;flex:none;background:#bc7946;border-radius:50%;margin-top:5px}.manual-clear{font-size:11px;color:#77877a;line-height:1.45;margin:0!important}
.manual-market-list{min-height:0;flex:1 1 auto;overflow:auto;overscroll-behavior:contain;border-top:1px solid #edf0ea;scrollbar-width:thin}
.manual-market{padding:13px 17px 12px;display:grid;grid-template-columns:minmax(0,1fr) auto;column-gap:12px;row-gap:8px;border-bottom:1px solid #ecf0eb;background:#fff}
.manual-market.include{border-left:3px solid #b87f43;padding-left:14px;background:#fcfbf7}.manual-market.exclude{opacity:.76;background:#f7f7f5}
.manual-market-main{display:flex;flex-direction:column;gap:4px;min-width:0}.manual-market-main strong{font-size:12px;font-weight:750;line-height:1.3;white-space:normal;overflow-wrap:anywhere;color:#294c3f}.manual-market-main small{font-size:10px;color:#849388;line-height:1.4}.manual-state{font-size:9px;color:#9a7752;font-weight:700}
.manual-actions{display:flex;align-items:start;flex-direction:column;gap:6px}.manual-action,.manual-auto{border:1px solid #c6d5cb;border-radius:7px;background:#fff;color:#225b47;font-size:10px;line-height:1.1;font-weight:760;padding:8px;min-width:84px;cursor:pointer}.manual-action:hover{background:#edf5ef}.manual-market.include .manual-action{color:#855d40;border-color:#e5d5c4}.manual-auto{font-size:9px;color:#687b70;background:#f7f8f5;padding:6px 8px}
.manual-date-label{grid-column:1/-1;display:flex;align-items:center;justify-content:space-between;gap:12px;font-size:10px;color:#667c6f;font-weight:700}.manual-date-label select{min-width:0;max-width:182px;border:1px solid #d9dfd6;border-radius:7px;font-size:11px;color:#345b49;padding:6px;background:#fff}.bad-date{grid-column:1/-1;color:#a3533c;font-size:10px}
.manual-footer{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:12px 16px 14px;background:#fafbf8;border-top:1px solid #e2e8dd;flex:0 0 auto}
.manual-footer button{font:inherit;border-radius:8px;border:1px solid #d5ded3;background:#fff;color:#466959;padding:11px 9px;font-size:11px;font-weight:760;cursor:pointer}.manual-footer #manual-replan{background:#235c48;border-color:#235c48;color:#fff;flex:1;white-space:nowrap}.manual-footer #manual-replan:hover{background:#154536}
.catalog-choice{font:inherit;font-size:10px;border:1px solid #c4d4c7;border-radius:8px;padding:8px 9px;background:#f7faf7;color:#28634c;font-weight:760;cursor:pointer;white-space:nowrap}.catalog-choice.is-required{background:#fbf5eb;color:#846042;border-color:#e9d7bb}.catalog-choice.is-excluded{background:#faf9f6;color:#6d7973;border-color:#e1e1da}.catalog-choice:hover{filter:brightness(.97)}
.small-remove{background:transparent;border:1px solid #d2dbd4;color:#496f5f;border-radius:6px;cursor:pointer;font-size:10px;margin-top:8px;padding:5px 8px;display:inline-block}.small-remove:hover{background:#eef4ef}
.selection-summary{margin:12px 0 0;color:#45674f;font-size:12px}
.market-popup .popup-add-market{border:1px solid #d5ddd3;background:#ecf4ed;color:#225c48;border-radius:7px;padding:8px;font-weight:700;font-size:11px;cursor:pointer}
/* Winter character comes from pine, linen and a restrained brass accent, not decorations. */
.logo-shape{background:#f4eee1;color:#89693d;box-shadow:none;border-radius:11px;font-family:Georgia,serif;font-size:23px;font-weight:600}
body[data-view="route"] .map-footer{border-top:1px solid #e7e9e2}
@media(max-width:760px), (min-width:761px) and (max-width:1100px) and (orientation:portrait){
 body[data-view="route"] .map-header>.manual-editor-toggle{margin-left:auto;height:34px;padding:0 9px;font-size:0}
 .map-header>.manual-editor-toggle svg{width:17px;height:17px}
 body[data-view="route"] .map-header>.manual-editor-toggle #manual-badge{font-size:10px;max-width:89px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
 body[data-view="route"] .map-header>.planner-toggle{margin-left:0;width:39px;padding:0}
 body[data-view="route"] .map-header>.planner-toggle span{display:none}
 .route-editor{position:fixed;top:auto;bottom:calc(67px + env(safe-area-inset-bottom,0px) + 4px);left:7px;right:7px;width:auto;height:min(72dvh,640px);max-height:72dvh;border-radius:16px 16px 8px 8px;box-shadow:0 -16px 45px #11291e5a;z-index:1815}
 body[data-view="route"].manual-editor-open .planner>.controls{visibility:hidden!important;pointer-events:none!important}
 .route-editor-head{padding-top:17px}.manual-review{max-height:122px}
 .manual-footer button{font-size:10px}
 body[data-view="markets"] .app-main #markets .table-shell{overflow:auto}
}
@media(max-width:365px){body[data-view="route"] .map-header>.manual-editor-toggle #manual-badge{max-width:62px}}
/* Keep search field compact even when the result list is short. */
.route-editor .manual-search-wrap{height:45px!important;min-height:45px!important;max-height:45px!important;flex:0 0 45px!important;align-self:stretch}
.route-editor .manual-search-wrap input{height:38px!important;min-height:0!important;max-height:38px!important;flex:1 1 auto!important}


/* V0.9.6: iPad fix — controls must not inherit obsolete SVG map sizing. */
body[data-view="route"] .map-panel .manual-editor-toggle,
body[data-view="route"] .map-panel .planner-toggle{flex:0 0 auto;max-height:42px;min-height:34px;align-self:center}
body[data-view="route"] .map-panel .manual-editor-toggle svg,
body[data-view="route"] .map-panel .planner-toggle svg{display:block!important;width:18px!important;height:18px!important;min-width:18px!important;min-height:0!important;max-width:18px!important;max-height:18px!important;flex:0 0 18px!important;background:transparent!important;box-shadow:none!important;border-radius:0!important}
@media(min-width:761px) and (max-width:1199px){
  body[data-view="route"] .map-panel>.map-header{min-height:58px;max-height:76px;padding:10px 14px;gap:8px}
  body[data-view="route"] .map-header-left strong{font-size:14px!important}
  body[data-view="route"] .map-header .manual-editor-toggle{padding:8px 10px;font-size:10px}
  body[data-view="route"] .map-header .planner-toggle{padding:0 10px}
  body[data-view="route"] .map-provider-chip{font-size:10px;padding:6px 7px}
  body[data-view="route"] #route-map{min-height:220px!important}
}
