/* App-owned layer controls, identical on standalone and hosted pages. */
@layer shorelysafe-unified {
  html body[data-shorelysafe-ui] :is(#rightRail,#mobileRailMount,#leftPanel) section.nww-layers-card.layers-card {
    padding:12px !important;
  }
  html body[data-shorelysafe-ui] :is(#rightRail,#mobileRailMount,#leftPanel) section.nww-layers-card.layers-card .rail-head {
    margin:0 0 6px !important;
  }
  html body[data-shorelysafe-ui] :is(#rightRail,#mobileRailMount,#leftPanel) section.nww-layers-card.layers-card .layer-list {
    display:grid !important;
    grid-template-columns:minmax(0,1fr) !important;
    gap:0 !important;
  }
  html body[data-shorelysafe-ui] :is(#rightRail,#mobileRailMount,#leftPanel) section.nww-layers-card.layers-card .layer-item {
    display:grid !important;
    grid-template-columns:minmax(0,1fr) 36px !important;
    grid-column:1 / -1 !important;
    align-items:center !important;
    gap:12px !important;
    height:auto !important;
    min-height:34px !important;
    max-height:none !important;
    padding:6px 6px !important;
    margin:0 !important;
    border:0 !important;
    border-bottom:1px solid rgba(191,219,254,.10) !important;
    border-radius:0 !important;
    background:transparent !important;
    box-shadow:none !important;
    overflow:visible !important;
  }
  html body[data-shorelysafe-ui] :is(#rightRail,#mobileRailMount,#leftPanel) section.nww-layers-card.layers-card .layer-item:last-child {
    border-bottom:0 !important;
  }
  html body[data-shorelysafe-ui] :is(#rightRail,#mobileRailMount,#leftPanel) section.nww-layers-card.layers-card .layer-meta {
    grid-area:1 / 1 !important;
    min-width:0 !important;
    gap:2px !important;
  }
  html body[data-shorelysafe-ui] :is(#rightRail,#mobileRailMount,#leftPanel) section.nww-layers-card.layers-card .layer-name {
    font-size:12px !important;
    font-weight:650 !important;
    line-height:1.25 !important;
    letter-spacing:0 !important;
    white-space:normal !important;
    word-break:normal !important;
    overflow-wrap:normal !important;
  }
  html body[data-shorelysafe-ui] :is(#rightRail,#mobileRailMount,#leftPanel) section.nww-layers-card.layers-card .nww-layer-detail {
    color:#b6c4d6;
    font-size:10px;
    font-weight:450;
    line-height:1.3;
  }
  html body[data-shorelysafe-ui] :is(#rightRail,#mobileRailMount,#leftPanel) section.nww-layers-card.layers-card .toggle {
    grid-area:1 / 2 !important;
    justify-self:end !important;
    width:36px !important;
    min-width:36px !important;
    height:22px !important;
    min-height:22px !important;
    flex:none !important;
    margin:0 !important;
    border:0 !important;
    border-radius:999px !important;
    background:rgba(148,163,184,.36) !important;
  }
  html body[data-shorelysafe-ui] :is(#rightRail,#mobileRailMount,#leftPanel) section.nww-layers-card.layers-card .toggle::before {
    content:"";
    position:absolute;
    inset:-6px;
  }
  html body[data-shorelysafe-ui] :is(#rightRail,#mobileRailMount,#leftPanel) section.nww-layers-card.layers-card .toggle::after {
    width:16px !important;
    height:16px !important;
    top:3px !important;
    left:3px !important;
    transform:none !important;
  }
  html body[data-shorelysafe-ui] :is(#rightRail,#mobileRailMount,#leftPanel) section.nww-layers-card.layers-card .toggle.on {
    background:var(--nw-ui-blue,#60a5fa) !important;
  }
  html body[data-shorelysafe-ui] :is(#rightRail,#mobileRailMount,#leftPanel) section.nww-layers-card.layers-card .toggle.on::after {
    left:17px !important;
  }
  html body[data-shorelysafe-ui] :is(#rightRail,#mobileRailMount,#leftPanel) section.nww-layers-card.layers-card .toggle:focus-visible {
    outline:2px solid #bfdbfe !important;
    outline-offset:3px !important;
  }
  @media (min-width:901px) and (min-height:561px) and (max-height:760px), (min-width:901px) and (pointer:fine) and (max-height:760px), (min-width:901px) and (pointer:none) and (max-height:760px) {
    html body[data-shorelysafe-ui] :is(#rightRail,#mobileRailMount,#leftPanel) section.nww-layers-card.layers-card { padding:9px !important; }
    html body[data-shorelysafe-ui] :is(#rightRail,#mobileRailMount,#leftPanel) section.nww-layers-card.layers-card .layer-item { min-height:26px !important; padding:1px 6px !important; }
    html body[data-shorelysafe-ui] :is(#rightRail,#mobileRailMount,#leftPanel) section.nww-layers-card.layers-card .layer-name { font-size:11px !important; }
    html body[data-shorelysafe-ui] :is(#rightRail,#mobileRailMount,#leftPanel) section.nww-layers-card.layers-card .toggle::before { inset:-2px -6px; }
  }
  @media (max-width:900px), (max-height:560px) and (pointer:coarse) {
    html[data-nww-mobile-layout] body[data-shorelysafe-ui] #leftPanel section.nww-layers-card.layers-card { padding:12px !important; }
    html[data-nww-mobile-layout] body[data-shorelysafe-ui] #leftPanel section.nww-layers-card.layers-card .layer-item { min-height:48px !important; padding:8px 6px !important; }
    html[data-nww-mobile-layout] body[data-shorelysafe-ui] #leftPanel section.nww-layers-card.layers-card .layer-name { font-size:15px !important; }
    html[data-nww-mobile-layout] body[data-shorelysafe-ui] #leftPanel section.nww-layers-card.layers-card .nww-layer-detail { font-size:12px; }
    html[data-nww-mobile-layout] body[data-shorelysafe-ui] #leftPanel section.nww-layers-card.layers-card .toggle::before { inset:-13px -6px; }
  }
}
