/* Adopted MAP fit layout. Every rule is scoped to the ordinary map surface. */
.map-fit.v4{--fit-nav:64px;height:100dvh;min-height:0;display:grid;grid-template-rows:auto minmax(0,1fr) var(--fit-nav);overflow:hidden;padding:0}
.map-fit.cloth-ui .common-header{position:static}
.map-fit.cloth-ui .topbar{min-height:42px;height:42px;padding:3px 16px;gap:16px;flex-wrap:nowrap}
.map-fit .brand{font-size:21px}.map-fit .brand small,.map-fit .day-display small,.map-fit .weather-summary small{display:none}
.map-fit .day-number{font-size:23px}.map-fit .header-actions{margin-left:auto}
.map-fit.cloth-ui .resourcebar{padding:3px 16px;min-height:36px;gap:6px;flex-wrap:nowrap;overflow:auto}
.map-fit.cloth-ui .resource{min-height:34px;font-size:13px;padding:3px 10px;flex-shrink:0}
.map-fit.cloth-ui .workspace{height:100%;min-height:0;overflow:hidden;display:grid;grid-template-columns:minmax(0,1fr) 350px;grid-template-rows:minmax(0,1fr) 188px;gap:10px;padding:10px}
.map-fit.cloth-ui #main-content{grid-column:1;grid-row:1;height:100%;min-height:0;padding:10px;overflow:hidden;display:flex;flex-direction:column}
.map-fit .content-grid.view-map,.map-fit.cloth-ui .view-map .exploration-main{flex:1;min-height:0;min-width:0;width:100%;display:flex;flex-direction:column}
.map-fit .map-section{flex:1;min-height:0;display:flex;flex-direction:column;padding:0;margin:0;gap:5px}
.map-fit.cloth-ui .view-map .section-heading{margin:0;min-height:30px;flex-shrink:0}
.map-fit .section-heading h1{font-size:20px}.map-fit .section-heading .eyebrow,.map-fit .screen-instruction{display:none}
.map-fit.cloth-ui .view-map .map-controls{margin:0;gap:6px;min-height:44px;height:auto;flex-wrap:wrap;flex-shrink:0}
.map-fit.cloth-ui .view-map .map-controls button{min-height:32px;padding:3px 10px}
.map-fit.cloth-ui .view-map .map-viewport{flex:1;min-height:0;height:auto;max-height:none;width:100%;max-width:none;margin:0;padding:0;aspect-ratio:auto}
.map-fit .map-scroll-hint{margin:0;font-size:12px;line-height:18px;flex-shrink:0}
.map-fit.cloth-ui .view-map .mobile-locations{display:flex;flex-wrap:nowrap;overflow:auto;gap:4px;height:34px;min-height:34px;padding:0;margin:0;flex-shrink:0;align-items:center}
.map-fit .mobile-locations button{flex:none;min-height:32px;padding:4px 10px;font-size:12px}
.map-fit.cloth-ui .view-map .map-bottom,.map-fit.cloth-ui .view-map .nui-suggestions{display:none!important;margin:0}
/* Keep warnings and completed work reachable without displacing the whole map. */
.map-fit #main-content>.nui-memos,.map-fit #main-content>.completion-note{flex:0 1 auto;max-height:24%;overflow:auto;margin:0 0 4px}
.map-fit.cloth-ui .companion-sidebar{grid-column:1;grid-row:2;max-height:none;min-height:0;height:188px;display:grid;grid-template-columns:minmax(0,1fr) 190px;gap:8px;padding:8px;overflow:hidden}
.map-fit .companion-sidebar>h2{display:none}
.map-fit.cloth-ui .companion-list{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));grid-auto-flow:column;grid-auto-columns:minmax(150px,1fr);gap:6px;overflow:auto;max-height:none;min-width:0;align-content:stretch;scrollbar-gutter:auto}
.map-fit.cloth-ui.has-guest .companion-list{grid-template-columns:repeat(4,minmax(140px,1fr));grid-auto-flow:column}
.map-fit.cloth-ui .companion-card{min-width:0;flex-basis:auto;padding:5px;margin:0;display:flex;flex-direction:column;gap:3px}
.map-fit.cloth-ui .order-nui{display:grid;grid-template-columns:34px minmax(0,1fr);padding:0;gap:3px;min-height:0;max-height:72px;flex:1 1 auto;overflow:auto}
.map-fit.cloth-ui .order-nui>.nui{width:34px!important;height:39px!important;min-width:0;grid-row:1}
.map-fit.cloth-ui .order-nui>span:first-of-type{display:flex;flex-direction:column;gap:1px;align-items:flex-start;min-width:0}
.map-fit.cloth-ui .order-nui b{font-size:13px;line-height:16px}
.map-fit.cloth-ui .order-nui .activity-badge{font-size:11px;line-height:14px;margin:0}
.map-fit.cloth-ui .order-work{grid-column:1/-1;font-size:11px;line-height:14px;max-height:28px;overflow:auto}
.map-fit.cloth-ui .crew-warning{font-size:11px;line-height:14px;grid-column:1/-1}
.map-fit.cloth-ui .crew-vitals{display:grid;grid-template-columns:1fr 1fr;padding:2px;gap:3px 8px}
.map-fit.cloth-ui .crew-vital{display:grid;grid-template-columns:1fr auto;gap:1px 4px;font-size:11px;padding:0;background:none;min-width:0}
.map-fit.cloth-ui .crew-vital b{font-size:12px}
.map-fit.cloth-ui .crew-vital meter{grid-column:1/-1;width:100%;height:8px;accent-color:#718e55}
.map-fit.cloth-ui .crew-vital[data-stat=wet] meter{accent-color:#659bb1}
.map-fit.cloth-ui .crew-vital meter::-webkit-meter-bar{background:#e4e4d5;border:0;border-radius:4px}
.map-fit.cloth-ui .crew-vital meter::-webkit-meter-optimum-value{background:#718e55}
.map-fit.cloth-ui .crew-vital[data-stat=wet] meter::-webkit-meter-optimum-value{background:#659bb1}
.map-fit.cloth-ui .crew-vital.needs-care{color:#833e2c}
.map-fit.cloth-ui .crew-vital.needs-care meter{outline:1px dashed #833e2c;outline-offset:1px}
.map-fit.cloth-ui .vitals-scale{grid-column:1/-1;font-size:10px;line-height:12px}
.map-fit.cloth-ui .companion-details{font-size:11px;line-height:16px;min-height:26px;padding:2px;margin-top:auto;flex-shrink:0}
.map-fit .mobile-crew-status{display:none}
.map-fit .advance-panel{align-self:center;padding:0;margin:0;border:0}
.map-fit .advance-panel>b,.map-fit .advance-panel>small{font-size:11px}
.map-fit .advance{font-size:13px;min-height:44px}
.map-fit.cloth-ui .inspector{grid-column:2;grid-row:1/3;position:static;display:flex;flex-direction:column;width:auto;min-height:0;height:100%;max-height:none;overflow:hidden;padding:12px;border-radius:12px;transform:none}
.map-fit .fit-inspector-content{flex:1;min-height:0;overflow:auto;padding:2px 3px;overscroll-behavior:contain}
.map-fit .fit-confirm{flex:none;background:#fff9eb;border-top:1px solid #c6b696;padding:10px 2px 0}
.map-fit .fit-confirm button{min-height:44px}
.map-fit .fit-confirm .draft-status{font-size:12px;line-height:1.4;margin:6px 0}
.map-fit .inspector h2{font-size:21px;margin:4px 0}
.map-fit.cloth-ui .inspector p{font-size:14px;line-height:1.5;margin:4px 0}
.map-fit.cloth-ui .inspector details{margin:3px 0;font-size:13px}
.map-fit.cloth-ui .inspector summary{cursor:pointer;min-height:28px;padding:3px 0}
.map-fit .inspector .environment-note{font-size:12px}
.map-fit.cloth-ui .inspector .action-grid{gap:5px;margin:4px 0}
.map-fit.cloth-ui .inspector .action-tile{min-height:40px;padding:5px;font-size:14px}
.map-fit.cloth-ui .inspector .text-button{font-size:12px;min-height:28px;padding:2px 0}
.map-fit.cloth-ui .inspector select.sr-only{min-height:1px;height:1px}
.map-fit .inspector .sheet-close,.map-fit .sheet-toggle{display:none}
.map-fit.cloth-ui .bottom-nav{position:static;grid-row:3;transform:none;width:100%;max-width:none;height:var(--fit-nav);margin:0;border-radius:0;z-index:20;padding:4px 12px}
.map-fit .bottom-nav button{min-height:44px}
.map-fit .map-conditions-inline{display:flex;align-items:center;gap:12px;margin-left:auto;padding:4px 10px;color:#365c67;background:#e9f1ee;border:1px solid #c6d7cf;border-radius:8px;font-size:12px}
.map-fit .conditions-label{font-weight:700;white-space:nowrap}
.map-fit .condition-period{display:flex;gap:7px;align-items:center}
.map-fit .condition-period b{font-size:12px;white-space:nowrap}.map-fit .condition-period small{font-size:11px}
.map-fit .condition-period.current{border-bottom:2px solid #647d5b}.map-fit .condition-period.current b{color:#315a3e}
@media(max-width:1100px){
 .map-fit .map-conditions-inline{margin-left:0;flex-basis:100%;justify-content:space-between;gap:5px}
 .map-fit .condition-period{flex-direction:column;gap:0;align-items:flex-start}
}
@media(max-width:900px){
 .map-fit.v4{--fit-nav:calc(60px + env(safe-area-inset-bottom,0px))}
 .map-fit.cloth-ui .topbar{height:42px;min-height:42px;padding:2px 10px;gap:10px}
 .map-fit.cloth-ui .topbar .brand{font-size:18px;min-width:0}
 .map-fit .brand-mark,.map-fit .header-actions{display:none}
 .map-fit .weather-summary{min-width:0}
 .map-fit.cloth-ui .resourcebar{padding:3px 8px}
 .map-fit.cloth-ui .workspace{grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(0,1fr) 210px;padding:6px;gap:6px}
 .map-fit.cloth-ui #main-content{padding:6px;min-height:0;flex:1}
 .map-fit.cloth-ui .companion-sidebar{grid-row:2;grid-template-columns:minmax(0,1fr);grid-template-rows:48px minmax(0,1fr) 38px;height:210px;padding:5px;gap:3px}
 .map-fit.cloth-ui .companion-list,.map-fit.cloth-ui.has-guest .companion-list{grid-template-columns:repeat(3,minmax(0,1fr));grid-auto-columns:110px;height:48px;overflow-x:auto;overflow-y:hidden;scroll-snap-type:x proximity;padding:0}
 .map-fit.cloth-ui.has-guest .companion-list{grid-template-columns:repeat(4,minmax(90px,1fr))}
 .map-fit.cloth-ui .companion-card{height:48px;padding:3px;display:block}
 .map-fit.cloth-ui .companion-card .crew-vitals,.map-fit.cloth-ui .companion-card .companion-details,.map-fit.cloth-ui .companion-card .order-work,.map-fit.cloth-ui .companion-card .crew-warning{display:none}
 .map-fit.cloth-ui .order-nui{height:40px;min-height:40px;grid-template-columns:25px minmax(0,1fr);gap:2px}
 .map-fit.cloth-ui .order-nui>.nui{width:25px!important;height:30px!important;min-width:0;grid-row:1}
 .map-fit.cloth-ui .order-nui b{font-size:11px;line-height:13px}
 .map-fit.cloth-ui .order-nui .activity-badge{font-size:10px;padding:0 3px}
 .map-fit .mobile-crew-status{display:grid;grid-template-columns:1fr auto;gap:2px 6px;padding:2px 6px;background:#f7f4e8;border-radius:6px;overflow:auto;min-height:0;align-content:start}
 .map-fit .mobile-crew-status p{grid-column:1/-1;margin:0;font-size:11px;line-height:16px}
 .map-fit.cloth-ui .mobile-crew-status .crew-vitals{grid-column:1/-1;grid-template-columns:repeat(4,minmax(0,1fr));gap:5px}
 .map-fit.cloth-ui .mobile-crew-status .crew-warning{font-size:11px;line-height:14px}
 .map-fit.cloth-ui .mobile-crew-status .companion-details{grid-column:1/-1;justify-self:end;font-size:11px;min-height:26px;height:26px}
 .map-fit.cloth-ui .mobile-crew-status .vitals-scale{display:none}
 .map-fit .advance-panel{display:flex;gap:6px;align-items:center;min-width:0}
 .map-fit .advance-panel>b,.map-fit .advance-panel>small{display:none}
 .map-fit.cloth-ui .advance-panel .advance{min-height:38px;width:100%;max-width:none;margin:0;font-size:13px;padding:4px}
 .map-fit .map-scroll-hint{display:none}
 .map-fit .section-heading h1{font-size:18px}.map-fit .chip{font-size:11px}
 .map-fit.cloth-ui .inspector{display:none}
 .map-fit.cloth-ui .inspector.is-open{display:flex;position:fixed;inset:auto 6px calc(var(--fit-nav) + 6px);max-height:70dvh;height:70dvh;width:auto;z-index:55;box-shadow:0 0 0 100vmax #302a2250;padding:12px}
 .map-fit .inspector .sheet-close{display:block;flex:none;position:static;min-height:40px;margin:0 0 4px;box-shadow:none}
 .map-fit.cloth-ui .sheet-toggle{display:block;position:fixed;right:12px;bottom:calc(var(--fit-nav) + 250px);left:auto;width:auto;font-size:12px;min-height:38px;z-index:22;margin:0;padding:8px 12px}
 .map-fit.sheet-open .sheet-toggle{display:none}
 .map-fit.cloth-ui .bottom-nav{padding:3px 3px calc(3px + env(safe-area-inset-bottom,0px))}
 .map-fit .bottom-nav b{font-size:11px}
}

/* Adopted ocean surround; decorative background only, outside original map coordinates. */
.map-fit.cloth-ui .view-map .map-viewport{background-color:#84adc0;background-image:url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI0NDAiIGhlaWdodD0iMjgwIiB2aWV3Qm94PSIwIDAgNDQwIDI4MCI+CjxkZWZzPjxwYXR0ZXJuIGlkPSJyIiB3aWR0aD0iODgiIGhlaWdodD0iNTYiIHBhdHRlcm5Vbml0cz0idXNlclNwYWNlT25Vc2UiPjxwYXRoIGQ9Ik03IDIwcTEwIDUgMjAgMG0yOCAyNHE4IDQgMTYgMCIgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjZDdlOGU0IiBzdHJva2Utb3BhY2l0eT0iLjM2IiBzdHJva2Utd2lkdGg9IjEuNSIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIi8+PC9wYXR0ZXJuPjxyYWRpYWxHcmFkaWVudCBpZD0iZyI+PHN0b3Agc3RvcC1jb2xvcj0iI2JhZDlkNiIgc3RvcC1vcGFjaXR5PSIuMyIvPjxzdG9wIG9mZnNldD0iMSIgc3RvcC1jb2xvcj0iIzg0YWRjMCIgc3RvcC1vcGFjaXR5PSIwIi8+PC9yYWRpYWxHcmFkaWVudD48L2RlZnM+CjxyZWN0IHdpZHRoPSI0NDAiIGhlaWdodD0iMjgwIiBmaWxsPSIjODRhZGMwIi8+PGVsbGlwc2UgY3g9IjIyMCIgY3k9IjE0MCIgcng9IjIxNSIgcnk9IjE0MCIgZmlsbD0idXJsKCNnKSIvPjxyZWN0IHdpZHRoPSI0NDAiIGhlaWdodD0iMjgwIiBmaWxsPSJ1cmwoI3IpIi8+CjxnIGZpbGw9Im5vbmUiIHN0cm9rZT0iI2VkZjNlNyIgc3Ryb2tlLW9wYWNpdHk9Ii41NSIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiPjxwYXRoIGQ9Ik0xMTIgODlxNy03IDE0IDBxNy03IDE0IDBNMzI2IDIxMHE1LTUgMTAgMHE1LTUgMTAgMCIvPjwvZz48L3N2Zz4NCg==');background-repeat:repeat;background-size:440px 280px}
/* Integrate the current operation guidance added by the concurrent production update. */
.map-fit.cloth-ui .companion-sidebar{grid-template-rows:minmax(0,1fr)}
.map-fit.cloth-ui .companion-list{grid-column:1;grid-row:1}
.map-fit.cloth-ui .advance-panel{grid-column:2;grid-row:1}
.map-fit.cloth-ui .advance-panel>.operation-target{font-size:11px;line-height:16px;margin:4px 0}
.map-fit.cloth-ui .order-nui>span:first-of-type{flex-flow:row wrap;gap:1px 3px}
.map-fit.cloth-ui .order-nui b{width:100%}
.map-fit.cloth-ui .order-nui .operation-badge{font-size:10px;line-height:14px}
@media(max-width:900px){
 .map-fit.cloth-ui .companion-sidebar{grid-template-rows:48px minmax(0,1fr) 38px}
 .map-fit.cloth-ui .advance-panel{grid-column:1;grid-row:3}
 .map-fit.cloth-ui .mobile-crew-status{grid-column:1;grid-row:2}
 .map-fit.cloth-ui .advance-panel>.operation-target{display:none}
.map-fit.cloth-ui .order-nui .operation-badge{font-size:9px;line-height:12px}
}

/* Live-browser follow-up: do not cover map destinations or clip the current plan. */
@media(min-width:901px){
 .map-fit.cloth-ui .workspace{grid-template-rows:minmax(0,1fr) 206px}
 .map-fit.cloth-ui .companion-sidebar{height:206px;grid-template-rows:minmax(0,1fr)}
 .map-fit.cloth-ui .companion-list{grid-row:1}
 .map-fit.cloth-ui .advance-panel{grid-row:1}
 .map-fit.cloth-ui .order-nui{flex:0 0 auto;max-height:none;overflow:visible}
 .map-fit.cloth-ui .order-work{max-height:none;overflow:visible;line-height:1.4}
 .map-fit.cloth-ui .companion-card{overflow:auto}
}
@media(max-width:900px){
 .map-fit.cloth-ui .workspace{grid-template-rows:minmax(0,1fr) 40px 210px;gap:4px}
 .map-fit.cloth-ui .companion-sidebar{grid-row:3}
 .map-fit.cloth-ui .sheet-toggle{position:static;grid-column:1;grid-row:2;transform:none;width:auto;min-height:40px;height:auto;margin:0;box-shadow:none;font-size:13px}
 .map-fit .condition-period b,.map-fit .condition-period small{font-size:12px}
}
@media(max-height:600px){
 .map-fit.cloth-ui .workspace{overflow:auto;grid-template-rows:minmax(340px,1fr) 206px}
 .map-fit.cloth-ui .inspector{position:sticky;top:0;max-height:calc(100dvh - 150px)}
}
@media(max-width:900px) and (max-height:600px){
 .map-fit.cloth-ui .workspace{grid-template-rows:minmax(340px,1fr) 40px 210px}
 .map-fit.cloth-ui .inspector{position:fixed}
}
