/* OL110SV v0.7.4 – common outer frame. Page-specific CSS must not widen it. */
:root { --portal-width: 1220px; --portal-gutter: 24px; }
body #content-scroll > main {
  box-sizing: border-box !important;
  width: 100% !important;
  max-width: var(--portal-width) !important;
  min-width: 0 !important;
  margin-inline: auto !important;
  padding-inline: var(--portal-gutter) !important;
}
/* Constrain the two outer map blocks, not Leaflet, its panels or fullscreen root. */
body.page-map #content-scroll > main > :is(.sectionhead,.panel):not(:fullscreen) {
  box-sizing: border-box !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  margin-inline: 0 !important;
}
body #content-scroll { scrollbar-gutter: stable; }
@media (max-width: 520px) { :root { --portal-gutter: 12px; } }

/* v0.7.5: compact map INSIDE the common frame; fullscreen keeps its own width. */
@media (min-width:850px) and (min-height:520px) {
  .page-map #club-qso-map .cm-work { --cm-left:185px; --cm-right:190px; }
  .page-map #club-qso-map:fullscreen .cm-work { --cm-left:220px; --cm-right:230px; }
}
@media (min-width:850px) and (max-width:1000px) and (min-height:520px) {
  .page-map #club-qso-map:not(:fullscreen) .cm-work { --cm-left:170px; --cm-right:175px; }
}
.page-map #club-qso-map .cm-legend { gap:3px 7px; padding:3px 6px; line-height:1.35; }
.page-map #club-qso-map .cm-legend .cm-map-hint { flex:1 1 190px; }
.page-map #club-qso-map .cm-status-row { display:flex; flex-wrap:wrap; align-items:baseline; justify-content:space-between; gap:0 10px; padding:3px 6px; background:#faf9f2; }
.page-map #club-qso-map .cm-status-row > #cm-status,
.page-map #club-qso-map .cm-status-row > #cm-cty-status { padding:0; min-width:0; line-height:1.35; overflow-wrap:anywhere; }
.page-map #club-qso-map .cm-status-row > #cm-status { margin-left:auto; }

/* v0.7.6: no shared footer. Map and live views use the freed height.
   Keep the shared width, mobile scrolling and the dedicated map fullscreen intact. */
@media (min-width:850px) and (min-height:700px) {
  body.page-map #content-scroll {
    display:flex;
    flex-direction:column;
    min-height:0;
    overflow:auto;
  }
  body.page-map #content-scroll > main {
    flex:1 0 auto;
    display:flex;
    flex-direction:column;
    min-height:100%;
    height:auto;
  }
  body.page-map #content-scroll > main > .sectionhead { flex:0 0 auto; }
  body.page-map #content-scroll > main > .panel {
    flex:1 1 auto;
    display:flex;
    flex-direction:column;
    min-height:0;
    height:auto;
  }
  body.page-map #club-qso-map:not(:fullscreen) {
    flex:1 1 auto;
    display:flex;
    flex-direction:column;
    min-height:0;
    height:auto;
  }
  body.page-map #club-qso-map:not(:fullscreen) .cm-work {
    flex:1 1 auto;
    min-height:0;
    height:auto;
  }
  body.page-map #club-qso-map:not(:fullscreen) .cm-map-col {
    display:flex;
    flex-direction:column;
    min-height:0;
  }
  body.page-map #club-qso-map:not(:fullscreen) #cm-map {
    flex:1 1 240px;
    height:auto;
    min-height:240px;
  }
  body.page-map #club-qso-map:not(:fullscreen) :is(.cm-top,.cm-foot,.cm-legend,.cm-status-row) {
    flex:0 0 auto;
  }
}

/* v0.8.0: the public pages use the same outer alignment. Do not change map fullscreen or member workspace. */
body:is(.page-stats,.page-log) #content-scroll>main>.sectionhead,
body:is(.page-stats,.page-log) #content-scroll>main>.panel{
  box-sizing:border-box;width:100%;max-width:100%;margin-inline:0;min-width:0;
}

/* v0.8.2: History owns its scroll, not the outer shell. */
@media (min-width:850px) and (min-height:600px) {
 body.page-history #content-scroll { display:flex; flex-direction:column; min-height:0; overflow:hidden; scrollbar-gutter:stable; }
 body.page-history #content-scroll > main { flex:1 1 0; display:flex; flex-direction:column; height:100%; min-height:0; max-height:100%; overflow:hidden; }
 body.page-history #content-scroll > main > .sectionhead { flex:0 0 auto; }
 body.page-history #content-scroll > main > .panel { flex:1 1 0; min-height:0; max-height:none; overflow:auto; overscroll-behavior:contain; scrollbar-gutter:stable; }
}
