/* AuroraCockpit V2.2.1 — Cloud Deck desktop usability correction.
   Presentation only. Retain every layer, toggle, map gesture, forecast frame
   and actual weather source. Keep embedded mobile Cloud Deck unchanged.
   Desktop breakpoint is the complement of layout-v2.js cloudResponsive. */
@media (min-width:901px), (min-width:761px) and (min-height:451px) {
  /* Restore a predictable document-flow layout even in native immersive mode. */
  html.layout-v2 #cloudsView #cloudDeckDialog .cloud-deck-shell {
    position:relative!important;
    display:block!important;
    height:auto!important;
    max-height:none!important;
    overflow:visible!important;
    padding:22px clamp(14px,2.1vw,30px) 25px!important;
  }
  html.layout-v2 #cloudsView #cloudDeckDialog .cloud-deck-header {
    position:relative!important;
    inset:auto!important;
    display:flex!important;
    align-items:center!important;
    flex-wrap:wrap!important;
    gap:12px!important;
    padding:0 0 18px!important;
    margin:0!important;
    pointer-events:auto!important;
    background:transparent!important;
    border-bottom:1px solid rgba(154,222,205,.17)!important;
  }
  html.layout-v2 #cloudsView #cloudDeckDialog .cloud-deck-heading {
    flex:1 1 380px!important;
    min-width:0!important;
    max-width:none!important;
    margin:0!important;
    padding:0!important;
    background:transparent!important;
    border:0!important;
    box-shadow:none!important;
    backdrop-filter:none!important;
  }
  html.layout-v2 #cloudsView #cloudDeckDialog .cloud-deck-heading p {
    font:600 12px/1.4 var(--mono)!important;
    color:#a3cfc3!important;
    letter-spacing:.06em!important;
  }
  html.layout-v2 #cloudsView #cloudDeckDialog .cloud-deck-heading h2 {
    font:700 clamp(28px,2.6vw,38px)/1.12 var(--display)!important;
    margin:5px 0!important;
    color:#f1fff9!important;
  }
  html.layout-v2 #cloudsView #cloudDeckDialog .cloud-deck-heading>span {
    font:500 14px/1.45 var(--sans)!important;
    color:#cee4dc!important;
    white-space:normal!important;
    overflow-wrap:anywhere!important;
  }
  html.layout-v2 #cloudsView #cloudDeckDialog .cloud-deck-header-status {
    position:relative!important;
    display:flex!important;
    align-items:center!important;
    justify-content:flex-end!important;
    flex:0 1 auto!important;
    flex-wrap:wrap!important;
    gap:8px!important;
    pointer-events:auto!important;
  }
  /* Native immersive/analysis switch conflicts with inline layout. The
     V2.2.1 accessible panel disclosure replaces it only on desktop. */
  html.layout-v2 #cloudsView #cloudDeckDialog #cloudImmersiveToggle {display:none!important}
  html.layout-v2 #cloudsView #cloudDeckDialog .v221-cloud-analysis-toggle {
    display:inline-flex!important;
    min-height:44px!important;
    align-items:center!important;
    justify-content:center!important;
    gap:7px!important;
    padding:8px 13px!important;
    border:1px solid rgba(158,230,209,.34)!important;
    border-radius:9px!important;
    background:rgba(21,54,54,.72)!important;
    color:#ddfff1!important;
    font:700 13px/1.3 var(--display)!important;
    cursor:pointer!important;
    white-space:nowrap!important;
  }
  html.layout-v2 #cloudsView #cloudDeckDialog .v221-cloud-analysis-toggle:hover,
  html.layout-v2 #cloudsView #cloudDeckDialog .v221-cloud-analysis-toggle[aria-expanded="true"] {
    border-color:rgba(137,245,214,.67)!important;
    background:#16463d!important;
  }
  html.layout-v2 #cloudsView #cloudDeckDialog .cloud-deck-controls {
    position:relative!important;
    inset:auto!important;
    display:grid!important;
    grid-template-columns:minmax(0,1fr) minmax(170px,215px) auto!important;
    align-items:stretch!important;
    width:100%!important;
    max-width:none!important;
    margin:0!important;
    padding:14px 0!important;
    gap:10px!important;
    border-bottom:1px solid rgba(154,222,205,.13)!important;
    background:transparent!important;
    overflow:visible!important;
    pointer-events:auto!important;
  }
  html.layout-v2 #cloudsView #cloudDeckDialog .cloud-layer-tabs {
    display:grid!important;
    grid-template-columns:repeat(4,minmax(0,1fr))!important;
    flex:initial!important;
    width:100%!important;
    max-width:none!important;
    min-width:0!important;
    padding:0!important;
    gap:7px!important;
    background:transparent!important;
    border:0!important;
  }
  html.layout-v2 #cloudsView #cloudDeckDialog .cloud-layer-tabs button {
    min-width:0!important;
    min-height:46px!important;
    padding:8px 10px!important;
  }
  html.layout-v2 #cloudsView #cloudDeckDialog .cloud-layer-tabs :is(span,small) {
    font-size:13px!important;
    line-height:1.4!important;
  }
  html.layout-v2 #cloudsView #cloudDeckDialog .cloud-layer-tabs small {display:none!important}
  html.layout-v2 #cloudsView #cloudDeckDialog .cloud-model-control {
    display:flex!important;
    flex-direction:column!important;
    justify-content:center!important;
    min-width:0!important;
    width:100%!important;
    min-height:46px!important;
    padding:5px 10px!important;
    margin:0!important;
    background:rgba(8,32,34,.75)!important;
  }
  html.layout-v2 #cloudsView #cloudDeckDialog .cloud-model-control label {
    font:600 12px/1.25 var(--mono)!important;
    color:#a9cec4!important;
  }
  html.layout-v2 #cloudsView #cloudDeckDialog .cloud-model-control select {
    width:100%!important;
    min-width:0!important;
    height:25px!important;
    margin:3px 0 0!important;
    font:600 13px/1.35 var(--sans)!important;
    color:#f0fff9!important;
  }
  html.layout-v2 #cloudsView #cloudDeckDialog .cloud-refresh-button {
    position:relative!important;
    min-width:50px!important;
    min-height:46px!important;
    width:auto!important;
    padding:8px 12px!important;
    margin:0!important;
    background:rgba(16,52,48,.72)!important;
  }
  html.layout-v2 #cloudsView #cloudDeckDialog .cloud-refresh-button span {
    font:700 12px/1.2 var(--display)!important;
    display:inline!important;
  }

  /* Large map first. Side analysis is revealed when requested. */
  html.layout-v2 #cloudsView #cloudDeckDialog .cloud-deck-main {
    position:relative!important;
    inset:auto!important;
    display:grid!important;
    grid-template-columns:minmax(0,1fr)!important;
    grid-template-rows:auto auto!important;
    align-content:start!important;
    align-items:stretch!important;
    gap:11px!important;
    width:100%!important;
    min-width:0!important;
    height:auto!important;
    min-height:0!important;
    padding:14px 0 8px!important;
    overflow:visible!important;
    transform:none!important;
  }
  /* A compact information/overlay bar OUTSIDE the map image. */
  html.layout-v2 #cloudsView #cloudDeckDialog .cloud-map-topline {
    position:relative!important;
    inset:auto!important;
    top:auto!important;
    left:auto!important;
    right:auto!important;
    bottom:auto!important;
    display:flex!important;
    grid-column:1 / -1!important;
    grid-row:1!important;
    flex-wrap:wrap!important;
    align-items:center!important;
    justify-content:flex-start!important;
    gap:7px!important;
    width:100%!important;
    max-width:100%!important;
    min-height:49px!important;
    height:auto!important;
    max-height:none!important;
    margin:0!important;
    padding:7px 10px!important;
    border:1px solid rgba(158,227,207,.18)!important;
    border-radius:10px!important;
    background:rgba(6,25,29,.88)!important;
    box-shadow:none!important;
    overflow:visible!important;
    pointer-events:auto!important;
    transform:none!important;
    backdrop-filter:none!important;
    z-index:1!important;
  }
  html.layout-v2 #cloudsView #cloudDeckDialog .cloud-map-topline>span {
    display:none!important;
    flex:0 1 auto!important;
    width:auto!important;
    min-width:0!important;
    max-width:100%!important;
    min-height:30px!important;
    margin:0!important;
    padding:6px 9px!important;
    border-radius:7px!important;
    font:600 12px/1.3 var(--mono)!important;
    color:#cfebe2!important;
    letter-spacing:0!important;
    white-space:normal!important;
    overflow-wrap:anywhere!important;
    background:rgba(21,55,55,.40)!important;
  }
  html.layout-v2 #cloudsView #cloudDeckDialog .cloud-map-topline>#cloudMapModel,
  html.layout-v2 #cloudsView #cloudDeckDialog .cloud-map-topline>#cloudMapHour,
  html.layout-v2 #cloudsView #cloudDeckDialog .cloud-map-topline>#cloudObservationContext {
    display:inline-flex!important;
    align-items:center!important;
  }
  /* The layer title is already in the four forecast selectors above. */
  html.layout-v2 #cloudsView #cloudDeckDialog .cloud-map-topline>#cloudMapLayer,
  html.layout-v2 #cloudsView #cloudDeckDialog .cloud-map-topline>#cloudFrameContext,
  html.layout-v2 #cloudsView #cloudDeckDialog .cloud-map-topline>#cloudRunContext {
    display:none!important;
  }
  html.layout-v2 #cloudsView #cloudDeckDialog .v2-cloud-map-options {
    display:inline-flex!important;
    align-items:center!important;
    justify-content:center!important;
    flex:0 0 auto!important;
    min-width:98px!important;
    min-height:40px!important;
    margin:0 0 0 auto!important;
    padding:8px 12px!important;
    border:1px solid rgba(146,225,205,.35)!important;
    border-radius:8px!important;
    background:rgba(25,65,63,.68)!important;
    color:#edfff9!important;
    font:700 12px/1.25 var(--display)!important;
    letter-spacing:.015em!important;
    cursor:pointer!important;
  }
  html.layout-v2 #cloudsView #cloudDeckDialog .v2-cloud-map-options:hover,
  html.layout-v2 #cloudsView #cloudDeckDialog .v2-cloud-map-options[aria-expanded="true"] {
    border-color:#90e8c7!important;
    background:#195349!important;
  }
  html.layout-v2 #cloudsView #cloudDeckDialog .cloud-map-topline .cloud-overlay-toggle {
    display:none!important;
    flex:0 0 auto!important;
    min-height:38px!important;
    padding:6px 10px!important;
    border-radius:7px!important;
    font:600 12px/1.3 var(--sans)!important;
    letter-spacing:0!important;
  }
  html.layout-v2 #cloudsView #cloudDeckDialog.v2-cloud-options-open .cloud-map-topline .cloud-overlay-toggle:not([hidden]){
    display:inline-flex!important;
    align-items:center!important;
  }
  html.layout-v2 #cloudsView #cloudDeckDialog .cloud-map-topline .cloud-overlay-toggle[hidden]{display:none!important}
  html.layout-v2 #cloudsView #cloudDeckDialog.v2-cloud-options-open .cloud-map-topline>#cloudRunContext {
    display:inline-flex!important;
  }

  html.layout-v2 #cloudsView #cloudDeckDialog .cloud-map-wrap {
    position:relative!important;
    inset:auto!important;
    display:block!important;
    grid-column:1!important;
    grid-row:2!important;
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    height:clamp(750px,79dvh,1020px)!important;
    min-height:750px!important;
    max-height:none!important;
    margin:0!important;
    border:1px solid rgba(151,231,211,.24)!important;
    border-radius:13px!important;
    overflow:hidden!important;
    box-shadow:0 12px 32px rgba(0,0,0,.23)!important;
  }
  /* Keep the actual projection, weather & cloud raster operations intact.
     Remove duplicated overlay menus from the map tool rail only. */
  html.layout-v2 #cloudsView #cloudDeckDialog .cloud-immersive-rail {
    position:absolute!important;
    inset:18px 14px auto auto!important;
    display:flex!important;
    flex-direction:column!important;
    gap:7px!important;
    width:44px!important;
    z-index:12!important;
    pointer-events:auto!important;
    transform:none!important;
  }
  html.layout-v2 #cloudsView #cloudDeckDialog .cloud-immersive-rail>button {
    display:grid!important;
    place-items:center!important;
    width:44px!important;
    height:44px!important;
    min-height:44px!important;
    border-radius:9px!important;
    background:rgba(5,28,33,.92)!important;
  }
  html.layout-v2 #cloudsView #cloudDeckDialog .cloud-immersive-rail :is(#cloudOverlayMenuToggle,#cloudInfoToggle){
    display:none!important;
  }
  html.layout-v2 #cloudsView #cloudDeckDialog .cloud-map .maplibregl-ctrl-top-right{display:none!important}
  html.layout-v2 #cloudsView #cloudDeckDialog .cloud-point-readout {
    position:absolute!important;
    left:12px!important;
    bottom:32px!important;
    max-width:calc(100% - 78px)!important;
    padding:9px 11px!important;
    background:rgba(5,25,29,.88)!important;
  }
  html.layout-v2 #cloudsView #cloudDeckDialog .cloud-point-readout span,
  html.layout-v2 #cloudsView #cloudDeckDialog .cloud-point-readout small{font-size:12px!important}
  html.layout-v2 #cloudsView #cloudDeckDialog .cloud-map-legend {
    left:0!important;
    right:0!important;
    bottom:0!important;
    width:100%!important;
    max-width:none!important;
    padding:8px 13px!important;
    background:rgba(5,24,29,.93)!important;
  }
  html.layout-v2 #cloudsView #cloudDeckDialog .cloud-map-legend span{
    font:600 12px/1.2 var(--sans)!important;
    color:#d0e7dd!important;
  }
  /* Analysis remains accessible, but isn't allowed to take permanent map
     width before the user asks for it. The menu is outside the map. */
  html.layout-v2 #cloudsView #cloudDeckDialog .cloud-deck-side {
    display:none!important;
    position:relative!important;
    inset:auto!important;
    transform:none!important;
    opacity:1!important;
    visibility:visible!important;
    pointer-events:auto!important;
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    height:auto!important;
    max-height:none!important;
    overflow:visible!important;
    margin:0!important;
    padding:0!important;
    border:0!important;
    box-shadow:none!important;
    background:none!important;
  }
  html.layout-v2 #cloudsView #cloudDeckDialog.v221-cloud-analysis-open .cloud-deck-side {
    display:grid!important;
    grid-column:1!important;
    grid-row:3!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:11px!important;
    align-content:start!important;
  }
  html.layout-v2 #cloudsView #cloudDeckDialog .cloud-side-card {
    min-width:0!important;
    padding:15px!important;
    border-radius:11px!important;
  }
  html.layout-v2 #cloudsView #cloudDeckDialog .cloud-side-card-heading{gap:8px!important;flex-wrap:wrap!important}
  html.layout-v2 #cloudsView #cloudDeckDialog .cloud-side-card-heading :is(span,strong) {
    font:600 12px/1.4 var(--mono)!important;
    color:#b9dfd0!important;
    letter-spacing:0!important;
  }
  html.layout-v2 #cloudsView #cloudDeckDialog .cloud-point-grid span,
  html.layout-v2 #cloudsView #cloudDeckDialog .cloud-point-grid small,
  html.layout-v2 #cloudsView #cloudDeckDialog .cloud-observation-compare :is(span,small),
  html.layout-v2 #cloudsView #cloudDeckDialog .cloud-field-meta :is(span,b) {
    font:600 12px/1.4 var(--mono)!important;
    color:#bbd6cc!important;
    letter-spacing:0!important;
    overflow-wrap:anywhere!important;
  }
  html.layout-v2 #cloudsView #cloudDeckDialog .cloud-point-grid strong,
  html.layout-v2 #cloudsView #cloudDeckDialog .cloud-observation-compare strong {
    font:700 21px/1.18 var(--mono)!important;
    color:#f0fff9!important;
  }
  html.layout-v2 #cloudsView #cloudDeckDialog .cloud-side-card :is(p,.cloud-data-credit){
    font:500 14px/1.5 var(--sans)!important;
    color:#cde3d9!important;
  }
  html.layout-v2 #cloudsView #cloudDeckDialog .cloud-deck-safety {
    grid-column:1 / -1;
    font:500 13px/1.5 var(--sans)!important;
    color:#dbd8ba!important;
  }
  html.layout-v2 #cloudsView #cloudDeckDialog .cloud-timeline-shell {
    position:relative!important;
    inset:auto!important;
    display:block!important;
    width:100%!important;
    height:auto!important;
    max-height:none!important;
    padding:17px 0 9px!important;
    margin:8px 0 0!important;
    border-top:1px solid rgba(151,227,208,.15)!important;
    background:transparent!important;
  }
  html.layout-v2 #cloudsView #cloudDeckDialog .cloud-timeline-heading :is(span,strong),
  html.layout-v2 #cloudsView #cloudDeckDialog .cloud-play-button b,
  html.layout-v2 #cloudsView #cloudDeckDialog .cloud-play-state,
  html.layout-v2 #cloudsView #cloudDeckDialog .cloud-scrubber-meta :is(span,strong),
  html.layout-v2 #cloudsView #cloudDeckDialog .cloud-hour strong {
    font-size:12px!important;
    line-height:1.4!important;
    color:#c1dfd5!important;
    letter-spacing:0!important;
  }
  html.layout-v2 #cloudsView #cloudDeckDialog .cloud-hour span{
    font-size:16px!important;
    line-height:1.2!important;
    color:#e9fbf5!important;
  }
  html.layout-v2 #cloudsView #cloudDeckDialog .cloud-hour {
    min-height:64px!important;
    flex-basis:83px!important;
    padding:9px 10px!important;
  }
  html.layout-v2 #cloudsView #cloudDeckDialog .cloud-play-button {
    min-height:44px!important;
    padding:7px 14px!important;
  }
}
/* Preserve the mobile-first embedded view and all existing iPhone touch targets. */
@media (max-width:760px), (max-width:900px) and (max-height:450px) {
  html.layout-v2 #cloudsView #cloudDeckDialog .v221-cloud-analysis-toggle{display:none!important}
}
@media (prefers-reduced-motion:reduce) {
  html.layout-v2 #cloudsView #cloudDeckDialog :is(.v221-cloud-analysis-toggle,.v2-cloud-map-options){transition:none!important}
}

/* V2.2.1 desktop overlap correction 2026-10-27.
   The original immersive Cloud Deck fixes every header button at 38px.
   The new text buttons must never inherit that geometry. The map metadata
   must wrap from the LEFT, leaving the overlay disclosure on the right. */
@media (min-width:901px), (min-width:761px) and (min-height:451px) {
  html.layout-v2 #cloudsView #cloudDeckDialog .cloud-deck-header {
    height:auto!important;
    min-height:0!important;
    align-items:center!important;
    column-gap:16px!important;
    row-gap:12px!important;
  }
  html.layout-v2 #cloudsView #cloudDeckDialog .cloud-deck-header-status {
    position:relative!important;
    display:flex!important;
    flex:0 1 auto!important;
    flex-wrap:wrap!important;
    justify-content:flex-end!important;
    align-items:center!important;
    align-content:center!important;
    gap:9px!important;
    width:auto!important;
    min-width:0!important;
    max-width:100%!important;
    height:auto!important;
    overflow:visible!important;
  }
  html.layout-v2 #cloudsView #cloudDeckDialog .cloud-deck-header-status>span {
    position:relative!important;
    display:inline-flex!important;
    align-items:center!important;
    flex:0 0 auto!important;
    width:auto!important;
    max-width:100%!important;
    height:auto!important;
    min-height:40px!important;
    padding:8px 11px!important;
    font:600 12px/1.35 var(--mono)!important;
    letter-spacing:.01em!important;
    color:#bbe7dc!important;
    white-space:normal!important;
  }
  html.layout-v2 #cloudsView #cloudDeckDialog .cloud-deck-header-status>#v2CloudsBack,
  html.layout-v2 #cloudsView #cloudDeckDialog .cloud-deck-header-status>#v221CloudAnalysisToggle {
    position:relative!important;
    display:inline-flex!important;
    align-items:center!important;
    justify-content:center!important;
    flex:0 0 auto!important;
    width:auto!important;
    height:auto!important;
    min-height:44px!important;
    max-width:100%!important;
    min-width:112px!important;
    padding:10px 14px!important;
    margin:0!important;
    overflow:visible!important;
    white-space:nowrap!important;
    font:700 13px/1.3 var(--display)!important;
    box-sizing:border-box!important;
    text-align:center!important;
  }
  html.layout-v2 #cloudsView #cloudDeckDialog .cloud-deck-header-status>#v221CloudAnalysisToggle {
    min-width:155px!important;
  }
  html.layout-v2 #cloudsView #cloudDeckDialog .cloud-map-topline {
    display:flex!important;
    align-items:center!important;
    justify-content:flex-start!important;
    flex-wrap:wrap!important;
    align-content:center!important;
    column-gap:8px!important;
    row-gap:8px!important;
    height:auto!important;
    min-height:55px!important;
    padding:9px 11px!important;
    overflow:visible!important;
    box-sizing:border-box!important;
  }
  /* Status goes first. The overlay menu is its own right-aligned control,
     not the first auto-margin item pushing all labels to the right. */
  html.layout-v2 #cloudsView #cloudDeckDialog .cloud-map-topline>span {
    order:1!important;
    flex:0 1 auto!important;
    min-width:0!important;
    max-width:100%!important;
    margin:0!important;
    overflow-wrap:anywhere!important;
    box-sizing:border-box!important;
  }
  html.layout-v2 #cloudsView #cloudDeckDialog .cloud-map-topline>#v2CloudMapOptions {
    order:2!important;
    flex:0 0 auto!important;
    width:auto!important;
    max-width:100%!important;
    min-width:112px!important;
    min-height:44px!important;
    margin:0 0 0 auto!important;
    box-sizing:border-box!important;
    white-space:nowrap!important;
  }
  html.layout-v2 #cloudsView #cloudDeckDialog.v2-cloud-options-open .cloud-map-topline::after {
    content:"";
    display:block;
    flex:0 0 100%;
    height:0;
    order:3;
  }
  html.layout-v2 #cloudsView #cloudDeckDialog .cloud-map-topline .cloud-overlay-toggle {
    order:4!important;
    flex:0 0 auto!important;
    min-height:40px!important;
    white-space:normal!important;
    max-width:100%!important;
    box-sizing:border-box!important;
  }
  /* Desktop already has an explicit model/status bar; avoid two overlapping
     copies of the immersive map status chips. */
  html.layout-v2 #cloudsView #cloudDeckDialog .cloud-immersive-mobile-status {
    display:none!important;
  }
  html.layout-v2 #cloudsView #cloudDeckDialog .cloud-map-legend {
    position:absolute!important;
    top:auto!important;
    bottom:0!important;
    left:0!important;
    right:0!important;
    width:100%!important;
    height:auto!important;
    display:grid!important;
    grid-template-columns:auto minmax(72px,1fr) auto!important;
    align-items:center!important;
    gap:10px!important;
    padding:10px 14px!important;
    border-radius:0!important;
    z-index:6!important;
    pointer-events:none!important;
  }
  html.layout-v2 #cloudsView #cloudDeckDialog .cloud-precip-legend:not([hidden]) {
    position:absolute!important;
    top:auto!important;
    bottom:55px!important;
    left:auto!important;
    right:13px!important;
    max-width:calc(100% - 26px)!important;
    z-index:6!important;
  }
  html.layout-v2 #cloudsView #cloudDeckDialog .cloud-map .maplibregl-ctrl-attrib {
    bottom:48px!important;
  }
  html.layout-v2 #cloudsView #cloudDeckDialog .cloud-point-readout {
    bottom:62px!important;
  }
}
/* At compact desktop widths, separate action buttons from the title row.
   They remain side by side and fully readable instead of overlapping. */
@media (min-width:761px) and (max-width:1120px) and (min-height:451px) {
  html.layout-v2 #cloudsView #cloudDeckDialog .cloud-deck-heading {
    flex:1 1 100%!important;
  }
  html.layout-v2 #cloudsView #cloudDeckDialog .cloud-deck-header-status {
    flex:1 1 100%!important;
    justify-content:flex-start!important;
  }
}
