#customDistrictsBtn { border: 1px dashed rgba(46,204,113,.5); color: #2ecc71; }
.map-builder-toolbar { max-width: 800px; box-sizing: border-box; margin: 12px 0; padding: 16px; border: 1px solid #2b6655; border-radius: 12px; background: #111c2c; color: #e2e8f0; scroll-margin-top: 150px; }
.map-builder-toolbar[hidden], #builder-fields[hidden] { display: none !important; }
.builder-row { display: flex; flex-wrap: wrap; align-items: end; gap: 10px; margin: 10px 0; }
.builder-row label { display: flex; flex-direction: column; gap: 5px; font-size: 12px; color: #cbd5e1; }
.builder-row input, .builder-row select { box-sizing: border-box; padding: 8px; border: 1px solid #3d526c; border-radius: 6px; color: #f8fafc; background: #0b1424; max-width: 100%; }
.builder-row input[type=number] { width: 100px; }
.builder-row input[type=color] { width: 50px; height: 36px; padding: 3px; }
.builder-row input[type=checkbox] { width: auto; }
#builder-active-district { width: 100%; }
.builder-grow { flex: 1 1 190px; min-width: 0; }
.builder-row button, .builder-actions button { padding: 8px 10px; border-radius: 6px; border: 1px solid #3d526c; background: #1d3046; color: #f1f5f9; cursor: pointer; font-size: 12px; }
.map-builder-toolbar button:hover { background: #294461; }
.builder-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
#builder-save { background: #18794e; border-color: #2ecc71; font-weight: 700; }
.builder-pill { display: inline-block; padding: 7px 10px; border-radius: 8px; background: #0a1422; color: #8ee4bd; font-size: 12px; line-height: 1.6; }
.builder-toast { max-width: 800px; font-size: 12px; line-height: 1.6; color: #a9d9c5; margin: 8px 0; }
#custom-district-status { max-width: 800px; color: #8ee4bd; font-size: 12px; margin: 8px 0; }
#map-tooltip { max-width: min(320px, calc(100vw - 44px)) !important; }
.map-rich-tooltip { width: 296px; max-width: calc(100vw - 44px); }
.map-rich-details { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 10px; color: #8ea1d9; padding-bottom: 5px; margin-bottom: 6px; border-bottom: 1px solid #ffffff1a; }
.map-rich-assignment { flex-basis: 100%; border-left: 3px solid; padding-left: 6px; color: #cdd8ff; }
.map-rich-party { margin: 2px 0; padding: 2px; display: flex; align-items: center; gap: 8px; font-size: 11px; }
.map-rich-party.is-selected { background: #ffffff1a; border-radius: 4px; color: #fff; font-weight: bold; }
.map-rich-avatar { width: 22px; height: 22px; border-radius: 50%; color: white; font-weight: bold; font-size: 9px; display: grid; place-items: center; flex-shrink: 0; }
.map-rich-party-body { flex: 1; min-width: 0; }
.map-rich-party-heading { margin-bottom: 1px; display: flex; justify-content: space-between; align-items: center; gap: 6px; }
.map-rich-party-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.map-rich-seats { color: #4ade80; font-weight: bold; flex-shrink: 0; }
.map-rich-votes { color: #cdd8ff; font-size: 10px; flex-shrink: 0; }
.map-rich-support { display: flex; align-items: center; gap: 6px; }
.map-rich-track { flex: 1; height: 6px; background: #1a2447; border-radius: 3px; overflow: hidden; }
.map-rich-bar { height: 100%; }
.map-rich-percent { min-width: 35px; text-align: right; color: #cdd8ff; font-family: monospace; }
.map-rich-margin { margin-bottom: 8px; padding: 6px; background: #ffffff14; border: 1px solid #3a4d8a; border-radius: 6px; font-size: 12px; text-align: center; }
.map-rich-margin strong { color: #f0b429; }
.map-rich-contenders { font-size: 10px; color: #cdd8ff; }
.map-rich-note { margin-top: 6px; padding-top: 4px; border-top: 1px solid #ffffff26; font-size: 10px; color: #8ea1d9; text-align: center; }
#map-custom-sejm { width: 100%; height: auto; display: none; }
#map-custom-sejm path { stroke: #2a3766; stroke-width: 4px; stroke-linejoin: round; stroke-linecap: round; cursor: pointer; transition: all 0.25s ease; }
#map-custom-sejm path:focus { outline: none; }
.sejm-map-building #poland-map path { cursor: crosshair !important; transition: fill .1s; }
.sejm-map-building #map-controls { opacity: .45; pointer-events: none; }
.sejm-map-building #map-zoom-reset-btn { display: none !important; }
@media (max-width: 600px) { .map-builder-toolbar { padding: 12px; } .builder-row { gap: 8px; } .builder-actions button { flex: 1 1 140px; } }
