/* DISTRICT / PHOENICIA CITY PLANNER. Scoped stylesheet; original site CSS untouched. */
.planner-top,.planner-wrap,.planner-wrap+.foot{max-width:1560px}
.planner-wrap{gap:15px}
.planner-intro .panel-body{padding:19px 24px}
.intro-inner{display:flex;align-items:center;justify-content:space-between;gap:24px}
.intro-inner h1{font-size:clamp(25px,3vw,43px);line-height:1.1;margin:0 0 12px;letter-spacing:.07em}
.intro-copy{color:var(--dim);max-width:78ch;line-height:1.6;margin:0;font-size:14px}
.eyebrow{font-size:10px;color:#80ca9d;margin:0 0 11px}
.privacy-pill{display:flex;align-items:center;gap:8px;border:1px solid #24603e;border-radius:9px;background:#071e11;padding:11px 15px;white-space:nowrap;font-size:12px}
.privacy-pill small{font-size:9px;color:#80ca9d}.privacy-light{width:8px;height:8px;display:inline-block;background:#7cf2a8;box-shadow:0 0 10px #7cf2a8;border-radius:50%}
.planner-actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap}.planner-actions .btn{cursor:pointer;border-radius:8px;font-family:ui-monospace,monospace;letter-spacing:.04em;font-size:11px;min-height:37px}.planner-actions .btn-primary{border-color:#398557}.planner-actions .btn-danger{color:#d9a396;border-color:#563c35}.upload-control{position:relative;overflow:hidden}.upload-control input{position:absolute;left:-9999px}.status{margin-left:auto;font-size:10px;color:#7fc9a1}
.planner-summary{display:grid;grid-template-columns:repeat(5,1fr);gap:8px}.planner-summary>div{padding:12px 15px;background:#07140e;border:1px solid #183322;border-radius:9px;display:flex;justify-content:space-between;gap:9px;align-items:center}.planner-summary span{font-size:10px;color:#8abca0}.planner-summary strong{font-size:20px;font-weight:650}
.planner-layout{display:grid;grid-template-columns:minmax(0,1fr) 352px;gap:14px;align-items:start}.map-heading{display:flex;justify-content:space-between;gap:10px}.map-tools{display:flex;align-items:center;justify-content:space-between;gap:10px;background:#050e09;border-bottom:1px solid #173622;padding:8px 11px}.tool-choice{display:flex;flex-wrap:wrap;gap:5px}.tool,.view-tools button{font:10px ui-monospace,monospace;letter-spacing:.03em;color:#8ed7b1;background:#091c12;border:1px solid #244934;border-radius:5px;padding:8px 10px;cursor:pointer;min-height:31px}.tool.active{background:#1e4730;color:#e1ffe8;border-color:#57b780;box-shadow:inset 0 0 10px #245d3a}.tool:hover,.view-tools button:hover{border-color:#84eba4}.view-tools{display:flex;gap:4px}.view-tools button{min-width:31px}
.map-viewport{position:relative;background:radial-gradient(ellipse at 50% 48%,#081b10 0%,#030a06 68%,#000 100%);height:min(72vh,790px);min-height:520px;overflow:hidden;touch-action:none;cursor:grab}.map-viewport:active{cursor:grabbing}.map-viewport:after{content:"";pointer-events:none;position:absolute;inset:0;background:repeating-linear-gradient(0deg,rgba(0,0,0,.15) 0 1px,transparent 2px 5px),radial-gradient(ellipse at center,transparent 52%,rgba(0,0,0,.35) 100%)}
#cityMap{display:block;width:100%;height:100%;--hex-border:#276744;--hex-bg:#06190e;--hex-central:#132d25;--hex-selected:#acffc5;--map-label:#9debb7;user-select:none}
#cityMap .hex{fill:var(--hex-bg);stroke:var(--hex-border);stroke-width:1.1;cursor:pointer;transition:fill .14s}
#cityMap .hex:hover{fill:#163f29;stroke:#a0f1bf;stroke-width:1.7}
#cityMap .hex.reserved{fill:var(--hex-central);stroke:#5b9e80;stroke-dasharray:3 2}
#cityMap .hex.kind-hab{fill:#0f4934;stroke:#71c89a}
#cityMap .hex.kind-ind{fill:#343a1f;stroke:#8c9b4e}
#cityMap .hex.kind-fod{fill:#274427;stroke:#729c65}
#cityMap .hex.kind-com{fill:#18374a;stroke:#63a6bc}
#cityMap .hex.kind-mak{fill:#3c283a;stroke:#a275a6}
#cityMap .hex.contested{stroke:#e4b26b;stroke-width:3;stroke-dasharray:6 2}
#cityMap .hex.selected{stroke:var(--hex-selected);stroke-width:3}
#cityMap .hex.claimed{stroke-opacity:1}
#cityMap .hex-tag{font:10px ui-monospace,monospace;pointer-events:none;fill:var(--map-label);text-anchor:middle;opacity:.84}
#cityMap .hex-kind{font:8px ui-monospace,monospace;pointer-events:none;fill:#e7edbe;text-anchor:middle;font-weight:800}
#cityMap .line-route{stroke-width:4.3;fill:none;stroke-linecap:round;stroke-linejoin:round;pointer-events:none;opacity:.9}
#cityMap .line-route.goods{stroke-dasharray:5 4;stroke-width:4.7}
#cityMap .line-route.active{stroke-width:7;opacity:1}
#cityMap .route-tag{font:bold 8px ui-monospace,monospace;fill:#050e09;pointer-events:none;text-anchor:middle}
#cityMap .station{fill:#edffe9;stroke:#2aa8ad;stroke-width:2;cursor:pointer}
#cityMap .shield-tower{fill:#b8fff0;stroke:#6bc6a5;stroke-width:1.5;cursor:pointer}
#cityMap .junction-pick{fill:#1b4c30;stroke:#68c496;stroke-width:.9;opacity:.6;cursor:crosshair}
#cityMap .junction-pick:hover{fill:#d4ffde;opacity:1;stroke:#efffea;stroke-width:2}
#cityMap .junction-pick.selected{fill:#fbe18a;stroke:#ffecab;opacity:1}
#cityMap .claim-line{stroke:#4bdc8b;stroke-width:1.8;stroke-dasharray:4 3;pointer-events:none;opacity:.65}
.map-corner{position:absolute;bottom:12px;left:15px;color:#78ac89;font-size:10px;line-height:1.6;pointer-events:none;z-index:1;text-shadow:0 1px #000}
.map-footer{padding:12px 15px;background:#06110b}.layer-switches{display:flex;flex-wrap:wrap;gap:14px}.layer-switches label{font-size:11px;letter-spacing:.02em;cursor:pointer;color:#a4d8b8}.layer-switches input{accent-color:#61d68c}.microcopy{color:#7ba68b;font-size:11px;line-height:1.55;margin:9px 0 0}
.editor-inner{padding:13px;display:flex;flex-direction:column;gap:13px;max-height:1000px;overflow:auto}.editor-section{border:1px solid #183824;background:#07160d;border-radius:9px;padding:13px;display:flex;flex-direction:column;gap:8px}.editor-section[hidden]{display:none}.editor-section h2,.editor-section h3{margin:0}.section-title{font-size:11px;color:#caffd8}.editor-section label:not(.check-label){font:10px ui-monospace,monospace;letter-spacing:.06em;color:#91c5a2}.hint{color:#67927a}
.editor-section input:not([type="checkbox"]),.editor-section select,.editor-section textarea{width:100%;background:#020b05;color:#d6ffdf;border:1px solid #275137;border-radius:5px;padding:9px 9px;min-width:0;font:12px ui-monospace,monospace;outline-color:#7eda9b}.editor-section textarea{resize:vertical;min-height:65px}.editor-section input::placeholder{color:#648a72}.inline-add{display:flex;gap:7px}.inline-add input{flex:1}.inline-add button,.primary-button,.muted-button,.tiny-button{background:#17462b;color:#e2ffe5;border:1px solid #418f5a;border-radius:5px;cursor:pointer;padding:8px 11px;font:11px ui-monospace,monospace;letter-spacing:.03em}.muted-button{background:#0b2516;border-color:#366344}.tiny-button{padding:4px 6px;font-size:10px}.tiny-button.danger{border-color:#734039;color:#eab1a7;background:#271410}.roster{display:flex;flex-direction:column;gap:6px}.roster-item{display:flex;justify-content:space-between;gap:8px;align-items:center;padding:7px 8px;border:1px solid #244a31;background:#081e12;border-radius:6px;font-size:12px}.roster-item small{font-size:10px;color:#82b594}.roster-item button{flex-shrink:0}.route-chip{border-left:4px solid var(--route-color,#a7ffac)}.route-chip.active{background:#173c27;border-color:#5ad98a}.route-select{background:transparent;border:0;color:#c0f6d1;cursor:pointer;text-align:left;font:12px ui-monospace,monospace;padding:3px}.selection-subtitle{color:#a9edbb;font-size:10px;font-family:ui-monospace,monospace}.selected-title{margin:0 0 2px;font:20px ui-monospace,monospace;color:#d2ffdf}.inline-pair{display:grid;grid-template-columns:1fr 1fr;gap:8px}.selection-buttons{display:flex;gap:7px;flex-wrap:wrap}.check-label{display:flex;align-items:center;gap:7px;color:#b9eac9;font-size:12px}.check-label input{accent-color:#65d99a}.pill{display:inline-block;padding:3px 6px;font:10px ui-monospace,monospace;background:#163a25;border:1px solid #26563b;border-radius:4px;color:#b8f5c9}.warn-pill{border-color:#b88b51;background:#312413;color:#ffe0ac}.link-row{display:flex;justify-content:space-between;align-items:center;padding:7px 8px;border:1px solid #245036;border-radius:4px;color:#c3f3d1;font-size:11px}.empty-note{color:#649477;font-size:11px}.reference-links a{font-size:11px;color:#a2e5b7;text-decoration:none;padding:4px 0}.reference-links a:hover{text-decoration:underline}
.instructions-panel .panel-body{padding:17px}.notes-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:18px}.notes-grid h3{font:11px ui-monospace,monospace;color:#caffda;margin:0 0 6px}.notes-grid p{font-size:12px;line-height:1.65;color:#88bc9b;margin:0}
.print-only{display:none}
@media(max-width:1150px){.planner-layout{grid-template-columns:minmax(0,1fr) 320px}.notes-grid{grid-template-columns:repeat(2,1fr)}}
@media(max-width:900px){.planner-layout{grid-template-columns:1fr}.editor-inner{max-height:none}.map-viewport{height:600px}.privacy-pill{white-space:normal}.planner-summary{grid-template-columns:repeat(3,1fr)}}
@media(max-width:600px){.hide-mobile{display:none}.intro-inner{flex-direction:column;align-items:flex-start}.planner-summary{grid-template-columns:repeat(2,1fr)}.planner-summary span{font-size:9px}.map-viewport{height:440px;min-height:360px}.map-heading{flex-direction:column}.map-tools{align-items:flex-start;flex-direction:column}.tool{font-size:9px;padding:7px}.status{width:100%}.notes-grid{grid-template-columns:1fr}}
@media print{
  @page{size:A4 landscape;margin:11mm}
  html,body{height:auto!important;background:#fff!important;color:#000!important;-webkit-print-color-adjust:exact;print-color-adjust:exact}
  .bg-noise,.top,.planner-intro,.planner-actions,.planner-summary,.map-tools,.map-footer,.editor-panel,.instructions-panel,.foot,.map-corner{display:none!important}
  .planner-wrap{display:block;padding:0;margin:0;max-width:none}.planner-layout{display:block}.planner-map-panel{border:0;box-shadow:none;overflow:visible;background:white}.planner-map-panel .panel-head{color:#111!important;background:white;border:0;padding:0 0 5px;font-weight:bold}.planner-map-panel .panel-head .dim{color:#444!important}
  .map-viewport{height:165mm;min-height:0;background:white!important;overflow:hidden!important;page-break-after:always}
  .map-viewport:after{display:none}
  #cityMap{--hex-border:#5d665f;--hex-bg:#fff;--hex-central:#eee;--hex-selected:#222;--map-label:#111}
  #cityMap .hex.kind-hab{fill:#cde7d8;stroke:#17412b}
  #cityMap .hex.kind-ind{fill:#eeeed2;stroke:#6b703e}
  #cityMap .hex.kind-fod{fill:#e5f2dd;stroke:#47723d}
  #cityMap .hex.kind-com{fill:#dcebf2;stroke:#36617b}
  #cityMap .hex.kind-mak{fill:#efe1ee;stroke:#704e73}
  #cityMap .hex-tag{fill:#111}#cityMap .hex-kind{fill:#222}
  #cityMap .hex.contested{stroke:#8b4d07}
  .print-only{display:block!important;page-break-before:always;font:11px Arial,sans-serif;color:#000}
  .print-only h2{font:22px Arial;margin:0 0 14px}.print-table{border-collapse:collapse;width:100%}.print-table th,.print-table td{border:1px solid #888;padding:5px;text-align:left}.print-table th{background:#eee}
}

.planner-intro>.panel-head,.editor-panel>.panel-head{display:flex;justify-content:space-between;gap:12px;flex-wrap:wrap}
.status.error{color:#f0a997}

#cityMap .shield-segment{stroke:#76dfb5;stroke-width:3.7;stroke-linecap:round;fill:none;pointer-events:none;filter:drop-shadow(0 0 2px #45b888)}
.facility-counts{display:grid;grid-template-columns:1fr auto;gap:7px 8px;font:11px ui-monospace,monospace;color:#92c7a4}.facility-counts strong{color:#dbffde;text-align:right}
@media print{#cityMap .shield-segment{stroke:#222;stroke-width:2;filter:none}}

.gang-number{display:inline-block;font:10px ui-monospace,monospace;color:#101a12;background:var(--gang-colour);padding:3px 5px;border-radius:3px;font-weight:700;margin-right:5px}

/* Author world overlay in campaign mode */
#cityMap .hex.no-claim{fill:#302b18;stroke:#baa75a;stroke-width:1.45}
#cityMap .hex.closed{fill:#31231d;stroke:#ac7959;stroke-dasharray:3 2}
#cityMap .official-name{font:7px ui-monospace,monospace;text-anchor:middle;fill:#ffe9a8;pointer-events:none}
[hidden]{display:none!important}
#officialState{padding:9px 13px;margin:0;border:1px solid #345b39;background:#0b2415;color:#bfe8c7;border-radius:6px;font-family:ui-monospace,monospace}
@media print{#cityMap .hex.no-claim{fill:#f7f0d6}#cityMap .hex.closed{fill:#e6e6e6}#cityMap .official-name{fill:#444}#officialState{display:none}}

/* BUILD 04 — Campaign territory key. Gang-controlled hexes take gang-selected colours. */
#cityMap .hex.gang-owned{fill:var(--gang-fill,#336344);stroke:#b2e0b2;stroke-width:1.35}
#cityMap .hex.gang-owned:hover{fill:var(--gang-fill,#336344);filter:brightness(1.2)}
#cityMap .hex.gang-owned.selected{stroke:#fffad1;stroke-width:3}
#cityMap .hex-kind{font:700 11px ui-monospace,monospace;fill:#f4fff5;stroke:rgba(0,0,0,.8);stroke-width:.9px;paint-order:stroke;letter-spacing:.25px}
#cityMap .hex-install{font:700 7.5px ui-monospace,monospace;fill:#fffde7;stroke:#101a12;stroke-width:1px;paint-order:stroke;text-anchor:middle;pointer-events:none}
#cityMap .hex-tag{font-size:6.4px;opacity:.7}
#cityMap .centre-label{font-size:7.8px}
#cityMap .hex.no-claim{fill:#393823;stroke:#b6a15b}
#cityMap .hex.closed,#cityMap .hex.reserved{fill:#272c30;stroke:#77818a}
#cityMap .hex.gang-owned.contested{stroke:#ffe59d;stroke-width:3;stroke-dasharray:5 2}
.gang-colour-picker{width:30px;flex-shrink:0;display:flex;align-items:center;justify-content:center}
.editor-section input[type="color"][data-gang-colour]{width:27px;height:28px;border:1px solid #91c5a2;padding:2px;cursor:pointer;background:transparent}
.upgrade-add{border:1px solid #34533e;padding:8px;border-radius:5px;display:grid;grid-template-columns:100px 1fr;gap:6px}
.upgrade-add>button{grid-column:span 2}
.upgrade-add>div{min-width:0}
.map-legend{border-bottom:1px solid #244333;padding-bottom:12px;margin-bottom:11px;display:flex;flex-direction:column;gap:10px;color:#b9e6c4;font:10px ui-monospace,monospace}
.map-legend-title{font-size:10px;font-weight:700;color:#d4ffde;letter-spacing:.08em}
.map-legend-title small{font-size:9px;font-weight:400;color:#93ae9c}
.legend-status,.legend-facilities,.rail-legend{display:flex;gap:9px 15px;flex-wrap:wrap;align-items:center}
.legend-status span,.legend-facilities span,.key-pair{display:inline-flex;align-items:center;gap:6px;white-space:nowrap}
.zone-mark{width:13px;height:12px;display:inline-block;transform:skew(-20deg);border:1px solid #6ea887;background:#102b20}
.zone-mark.battle{background:#393823;border-color:#b6a15b}
.zone-mark.restricted{background:#272c30;border-color:#77818a}
.zone-mark.gang{background:linear-gradient(90deg,#8c71ce 0 50%,#c88f4d 50%);border-color:#c3d7bb}
.facility-dot{width:9px;height:9px;display:inline-block;border-radius:50%;background:var(--dot);border:1px solid var(--dot)}
.facility-dot.hollow{background:#06150c;border-width:2px}
.facility-dot.diamond{border-radius:0;transform:rotate(45deg)}
.node-mark{width:11px;height:11px;display:inline-block;background:#edffe9;border:2px solid #2aa8ad;border-radius:50%}
.node-mark.tower{background:#b8fff0;border:2px solid #6bc6a5;border-radius:0;transform:rotate(45deg) scale(.85)}
.rail-swatch{display:inline-block;width:29px;height:0;border-top:4px solid var(--key-colour);border-radius:2px}
.rail-swatch.goods{border-top-style:dashed}
.key-pair small{font-size:9px;color:#8aa996}
.map-legend-note{color:#88bda0;font-size:9px;line-height:1.5}
@media print{
  #cityMap .hex.gang-owned{fill:color-mix(in srgb,var(--gang-fill),white 65%);stroke:#23382c}
  #cityMap .hex-kind,#cityMap .hex-install{fill:#111;stroke:none}
  .map-legend{display:flex!important;color:#111!important;gap:5px;font-size:8px;margin:2mm 0}
  .map-legend-title,.map-legend-note{color:#111!important}
  .legend-status,.legend-facilities,.rail-legend{gap:4px 9px}
  .map-viewport{height:155mm}
}
@media print{
  /* Keep the route/infrastructure key WITH the paper map; hide edit controls only. */
  .map-footer{display:block!important;background:#fff!important;padding:3mm 0 0!important}
  .map-footer .layer-switches,.map-footer>p{display:none!important}
  .map-viewport{height:134mm!important;page-break-after:auto!important}
}
