.port-head {padding:clamp(1.2rem,3.5vw,2.7rem) 0;background:#eaf3f3;border-block:1px solid #c6d8db}
.port-place {display:flex;align-items:center;gap:.65rem;margin-bottom:.65rem}
.port-place img {object-fit:contain;width:2rem;height:2rem}
.port-place a {font-weight:650;text-decoration:none}
.port-head h1 {font-size:clamp(2.4rem,5.5vw,4rem)}
.port-head p {margin-top:.4rem;color:#42606b}
.port-content {padding-block:clamp(1rem,3vw,2rem) 2rem}
.port-grid {display:grid;grid-template-columns:minmax(0,1.6fr) minmax(17rem,1fr);gap:clamp(.8rem,2vw,1.6rem);align-items:start}
.port-list,.port-map-box,.ports-empty {min-width:0;border:1px solid #c1d1d5;border-radius:.6rem;background:#fff}
.port-map-box {overflow:hidden}
#port-map {height:clamp(30.7rem,67vh,50.7rem);background:#d5e8ef;isolation:isolate}
.port-map-caption {display:flex;align-items:center;justify-content:space-between;gap:.45rem;flex-wrap:wrap;padding:.25rem .8rem;font-size:.88rem;color:#315264}
.port-map-caption i {display:inline-block;width:1.2rem;height:.65rem;border:2px solid #2b7268;background:#d8e9df;vertical-align:middle;margin-right:.18rem}
.port-map-caption button,.port-actions button {border:0;background:none;color:#075572;cursor:pointer;font:inherit;text-decoration:underline;text-underline-offset:.2em;padding:0;min-height:44px}
.port-map-caption button:focus-visible,.port-actions button:focus-visible {outline:3px solid #d0780a;outline-offset:2px}
.port-list h2,.ports-empty h2 {font-size:1.65rem}
.port-list h2 {padding:1rem 1.1rem;border-bottom:1px solid #d2dde0}
.port-list ol {list-style:none;padding:0;margin:0;max-height:32rem;overflow:auto}
.port-item {display:grid;grid-template-columns:1.85rem minmax(0,1fr);gap:.7rem;padding:.8rem 1rem .35rem;overflow-wrap:anywhere}
.port-item+.port-item {border-top:1px solid #dce5e7}
.port-item.selected {background:#edf6f4}
.port-item h3 {font-size:1.07rem}
.port-item p {font-size:.91rem;color:#3a5662;margin-top:.18rem}
.port-item .port-areas {font-size:.85rem}
.port-key,.port-pin {display:grid;place-items:center;border-radius:50%;font:700 .88rem/1 system-ui;color:white;background:#075877}
.port-key {height:1.75rem;width:1.75rem}
.port-pin {width:100%;height:100%;border:2px solid white;box-shadow:0 1px 5px #203d4773}
.port-map-marker:focus-visible .port-pin,.port-map-marker:hover .port-pin {background:#153542}
.port-actions {display:flex;align-items:center;flex-wrap:wrap;gap:0 1.1rem;font-size:.9rem;font-weight:600}
.port-actions a {display:inline-flex;align-items:center;min-height:44px}
.port-source {margin-top:1rem;font-size:.9rem;color:#415d67}
.ports-empty {padding:1.2rem}
.ports-empty p {margin-top:.65rem}
.port-grid:has(.port-map-box[hidden]) {display:block}
.port-map-box[hidden],.port-locate[hidden] {display:none}
#port-map .leaflet-control-zoom a {width:37px;height:37px;line-height:37px}
#port-map .leaflet-popup-content {font:1rem/1.45 system-ui}
.port-nameplate {
  position:absolute;visibility:hidden;display:block;width:max-content;max-width:11rem;
  overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding:2px 5px;
  border:1px solid #b4cbcc;border-radius:4px;background:#fffffff5;color:#173d47;
  font:650 12px/1.3 system-ui,sans-serif;box-shadow:0 1px 3px #1d3a401c;
}
.port-more summary {width:fit-content;cursor:pointer;color:#075572;font-size:.9rem;font-weight:600;padding:.25rem 0 .5rem}
.port-more[open] summary {padding-bottom:.15rem}
.port-info {color:#183e49;font:400 .91rem/1.35 system-ui,sans-serif;overflow-wrap:anywhere}
.port-more .port-info {padding-bottom:.55rem}
.port-meta {font-size:.83rem;color:#46606c}
.port-phones {margin:.4rem 0 .1rem}
.port-phones div + div {margin-top:.3rem}
.port-phones dt {font-size:.78rem;font-weight:650;color:#425961}
.port-phones dd {margin:0}
.port-phones a {font-weight:600}
.port-phones a[href^="tel:"] {display:inline-block;white-space:nowrap}
.port-info .port-duty-source {font-size:.8rem}
#port-map .leaflet-popup-content {margin:12px 23px 13px 16px;overflow-wrap:anywhere}
#port-map .port-popup-title {display:block;font-size:1.06rem;line-height:1.25;margin-bottom:.2rem}
#port-map .port-address {margin:0 0 .25rem;font-size:.85rem;line-height:1.35}
#port-map .port-register {display:inline-block;margin-top:.35rem;font-size:.86rem}
#port-map .leaflet-popup-scrolled {border:0;overscroll-behavior:contain}
@media(max-width:740px) {
 .port-grid {grid-template-columns:1fr}
 #port-map {height:clamp(24rem,63svh,32rem)}
 .port-list ol {max-height:none}
 .port-content,.port-head .wrap {width:calc(100% - 1.5rem)}
}

.port-location-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .25rem .75rem;
  padding: .45rem .75rem;
  border-bottom: 1px solid #c1d1d5;
}
.port-location-tools button, .port-location-tools a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font: 600 1rem/1.25 system-ui, sans-serif;
}
.port-location-tools button {
  border: 1px solid #075877;
  border-radius: .4rem;
  padding: .4rem .85rem;
  color: white;
  background: #075877;
  cursor: pointer;
}
.port-location-tools button:disabled { opacity: .75; cursor: wait; }
.port-location-tools [hidden] { display: none; }
#port-location-status { flex-basis: 100%; margin: 0; font-size: .94rem; line-height: 1.4; }
#port-location-status:empty { display: none; }
.port-device-dot { border: 3px solid white; border-radius: 50%; background: #146bd4; box-shadow: 0 0 0 1px #174d80; }

.port-lists {min-width:0;display:grid;gap:.7rem}
.port-list[hidden],.port-item[hidden],.port-boundary[hidden] {display:none}
.port-filter {display:flex;align-items:center;flex-wrap:wrap;gap:.25rem .45rem;color:#314e5a;font-size:.9rem}
.port-filter select {max-width:100%;font:600 1rem/1.3 system-ui;padding:.35rem .4rem;border:1px solid #75939b;border-radius:.4rem;min-height:44px;background:white;color:#153c4b}
.rescue-kind {display:block;margin:.1rem 0;color:#7a3c14;font-weight:650;font-size:.84rem}
[data-kind="safe"]>.port-key,.port-pin[data-kind="safe"] {background:#13685b;border-radius:.38rem}
[data-kind="rescue"]>.port-key,.port-pin[data-kind="rescue"] {background:#a7491d;border-radius:.38rem}
[data-kind="trossi"]>.port-key,.port-pin[data-kind="trossi"] {background:#80395d;border-radius:.38rem}
[data-kind="archive"]>.port-key,.port-pin[data-kind="archive"] {background:#626a70;border-radius:.38rem}
.port-item .port-info p,#port-map .port-info p {margin:.22rem 0;font-size:.88rem;line-height:1.35}
.rescue-sources {font-size:.84rem;line-height:1.45}
.rescue-contacts {font-size:1rem;margin:.8rem 0}
.port-head p a {font-size:.96rem}
.port-head h1 {overflow-wrap:anywhere}

.rescue-unmapped {margin-top:1rem;color:#294b58}
.rescue-unmapped summary {cursor:pointer;padding:.4rem 0;font-weight:600}
.rescue-unmapped ul {padding-left:1.3rem}
.rescue-contacts {margin:0 0 .25rem}
.rescue-contacts + p {font-size:.9rem;margin:0 0 .75rem}
@media(min-width:741px) {
  .port-lists {max-height:clamp(29rem,60vh,45rem);overflow:auto;align-content:start}
  .port-lists .port-list ol {max-height:none;overflow:visible}
}

.rescue-legend {display:flex;flex-wrap:wrap;gap:.3rem .8rem;padding:.55rem .75rem .1rem;color:#284852;font-size:.88rem}
.rescue-legend span {display:inline-flex;align-items:center;gap:.3rem}
.rescue-legend [hidden] {display:none}
.rescue-legend .port-key {height:1.25rem;width:1.25rem;font-size:.76rem}

.port-name-search {display:grid;gap:.25rem;margin-bottom:.75rem;max-width:29rem;font-size:.9rem;font-weight:650}
.port-name-search input {width:100%;font-size:1rem}
#port-search-status {margin:.15rem 0 0;color:#425961;font-weight:400}
#port-search-status:empty {display:none}
#port-results {list-style:none;padding:0;margin:0;max-height:min(14rem,32dvh);overflow-y:auto;border:1px solid #a7bfc5;border-radius:.4rem;background:white}
#port-results li + li {border-top:1px solid #dce5e7}
#port-results button {display:block;width:100%;min-height:44px;padding:.5rem .75rem;border:0;background:white;color:#075572;text-align:left;font:600 1rem/1.3 system-ui;cursor:pointer;overflow-wrap:anywhere}
#port-results button:hover,#port-results button:focus-visible {background:#edf6f4}
#port-results button:focus-visible {outline:2px solid #075572;outline-offset:-2px}
.port-business {margin:.4rem 0}
.port-business summary {width:fit-content;cursor:pointer;color:#075572;text-decoration:underline;text-underline-offset:.2em;padding:.4rem 0;font-weight:650}
.port-business ul {margin:.15rem 0;padding-left:1.15rem}
.port-business li + li {margin-top:.4rem}
.port-business small {display:block;color:#425961;font-size:.85rem}
#port-map .port-register {margin:0 0 .4rem;font-size:.9rem;font-weight:650}
.port-phones dd {line-height:1.4}
.port-phones dt {font-size:.8125rem}
.port-more > summary {display:list-item;min-height:44px;padding-block:.6rem}

.port-mobile-detail {display:none}
@media(max-width:740px) {
  #port-map .leaflet-popup-pane {display:none}
  .port-mobile-detail:not([hidden]) {display:block;border-top:2px solid #147262;padding:.65rem .85rem;background:#f6fbfa;overflow-wrap:anywhere}
  .port-detail-close {float:right;min-height:44px;border:0;background:transparent;color:#075572;text-decoration:underline;font:600 .9rem/1.2 system-ui;cursor:pointer}
  .port-detail-body .port-popup-title {display:block;font-size:1.1rem}
  .port-detail-body .port-register {display:inline-flex;align-items:center;min-height:44px;font-weight:650}
  .port-detail-body .port-phones {margin-top:0}
  .port-detail-body .port-address {font-size:.85rem;color:#46606c}
  .port-detail-body .port-business summary {min-height:44px}
}
[data-kind="camera"]>.port-key,.port-pin[data-kind="camera"] {background:#674080;border-radius:.4rem}
.camera-directory {padding-block:1rem 2rem;display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,17rem),1fr));gap:1rem}
.camera-directory section {min-width:0;border-top:1px solid #bfd1d6;padding-top:.7rem}
.camera-directory h2 {font-size:1.35rem;margin:0 0 .35rem}
.camera-directory ul {list-style:none;margin:0;padding:0}
.camera-directory li {display:flex;justify-content:space-between;align-items:baseline;flex-wrap:wrap;gap:0 .4rem;padding:.35rem 0}
.camera-directory small {color:#465c67}
