/* AuroraCockpit V2.2.1 — mobile sky briefing.
   Adapts the informational hierarchy, not the branding, from market examples.
   All displayed percentages are derived from the existing forecast, never
   presented as calibrated aurora probability. Desktop V2.2.1 is unchanged. */
html.layout-v2 #v221NightBrief {display:none}
@media (max-width:760px), (max-width:900px) and (max-height:450px) {
  html.layout-v2 #missionPanel #v221NightBrief {
    display:block;
    grid-column:1 / -1;
    grid-row:4;
    width:100%;
    min-width:0;
    margin:14px 0 0;
    padding:14px 0 0;
    border-top:1px solid rgba(169,231,209,.18);
    color:#e9f8f1;
  }
  html.layout-v2 #v221NightBrief :is(button,a) {
    min-height:44px;
    box-sizing:border-box;
    touch-action:manipulation;
    text-decoration:none;
    cursor:pointer;
  }
  html.layout-v2 #v221NightBrief :is(button,a):focus-visible {
    outline:2px solid #c0ffe4;
    outline-offset:3px;
  }
  html.layout-v2 #v221NightBrief .v221-brief-head {
    display:flex;
    flex-wrap:wrap;
    justify-content:space-between;
    align-items:center;
    gap:7px 12px;
  }
  html.layout-v2 #v221NightBrief .v221-brief-head>div {
    display:flex;
    flex-direction:column;
    gap:3px;
    min-width:0;
  }
  html.layout-v2 #v221NightBrief .v221-brief-kicker {
    font:600 12px/1.4 var(--mono);
    letter-spacing:.06em;
    color:#91cbb6;
  }
  html.layout-v2 #v221NightBrief #v221BriefLocation {
    font:700 19px/1.2 var(--display);
    color:#eafbfa;
    overflow-wrap:anywhere;
  }
  html.layout-v2 #v221NightBrief .v221-brief-age {
    padding:5px 7px;
    border-radius:7px;
    background:rgba(129,231,196,.09);
    border:1px solid rgba(129,231,196,.18);
    color:#b7dfca;
    font:600 12px/1.2 var(--mono);
    letter-spacing:0;
    overflow-wrap:anywhere;
  }
  html.layout-v2 #v221NightBrief .v221-brief-summary {
    margin:11px 0 12px;
    color:#e0f2e9;
    font:600 15px/1.45 var(--sans);
  }
  html.layout-v2 #v221NightBrief .v221-brief-metrics {
    display:grid;
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:7px;
  }
  html.layout-v2 #v221NightBrief .v221-brief-metrics>div {
    min-width:0;
    padding:10px 8px 9px;
    border:1px solid rgba(147,220,193,.18);
    border-radius:10px;
    background:linear-gradient(145deg,rgba(8,33,38,.94),rgba(5,22,27,.93));
  }
  html.layout-v2 #v221NightBrief .v221-brief-metrics span,
  html.layout-v2 #v221NightBrief .v221-brief-best>span {
    display:block;
    color:#aecdc3;
    font:600 12px/1.35 var(--mono);
    letter-spacing:0;
    overflow-wrap:anywhere;
  }
  html.layout-v2 #v221NightBrief .v221-brief-metrics strong {
    display:block;
    margin-top:5px;
    font:700 17px/1.25 var(--display);
    color:#e2fbed;
    overflow-wrap:anywhere;
  }
  html.layout-v2 #v221NightBrief .v221-brief-best {
    display:flex;
    align-items:center;
    flex-wrap:wrap;
    justify-content:space-between;
    gap:4px 10px;
    margin:11px 0 13px;
    padding:10px 11px;
    border-left:3px solid #8be7b8;
    border-radius:0 9px 9px 0;
    background:rgba(21,65,60,.30);
  }
  html.layout-v2 #v221NightBrief .v221-brief-best>span {
    color:#a6d8c6;
  }
  html.layout-v2 #v221NightBrief .v221-brief-best strong {
    min-width:0;
    font:700 14px/1.45 var(--sans);
    color:#dcfbe8;
    overflow-wrap:anywhere;
  }
  html.layout-v2 #v221NightBrief .v221-brief-chart-head {
    display:flex;
    justify-content:space-between;
    align-items:center;
    flex-wrap:wrap;
    gap:8px;
    margin-bottom:8px;
  }
  html.layout-v2 #v221NightBrief .v221-brief-chart-head>div {
    display:flex;
    flex-direction:column;
    gap:2px;
    min-width:0;
  }
  html.layout-v2 #v221NightBrief .v221-brief-chart-head span {
    font:700 13px/1.25 var(--display);
    color:#e8f6f1;
    letter-spacing:.035em;
  }
  html.layout-v2 #v221NightBrief .v221-brief-chart-head small {
    font:500 12px/1.35 var(--sans);
    color:#aecdc3;
  }
  html.layout-v2 #v221NightBrief #v221BriefClouds {
    flex:0 0 auto;
    padding:8px 11px;
    border-radius:9px;
    border:1px solid rgba(150,229,199,.37);
    background:rgba(10,40,38,.64);
    font:700 12px/1.25 var(--display);
    color:#d7f7e6;
  }
  html.layout-v2 #v221NightBrief .v221-brief-hours {
    display:flex;
    gap:6px;
    align-items:stretch;
    overflow-x:auto;
    overscroll-behavior-x:contain;
    scrollbar-width:thin;
    padding:7px 3px 10px;
    border:1px solid rgba(159,226,201,.16);
    border-radius:11px;
    background:rgba(3,15,24,.55);
  }
  html.layout-v2 #v221NightBrief .v221-brief-hour {
    flex:1 0 37px;
    min-width:37px;
    max-width:70px;
    display:flex;
    flex-direction:column;
    align-items:center;
    gap:5px;
  }
  html.layout-v2 #v221NightBrief .v221-brief-bar-number {
    color:#c8e6d9;
    font:600 12px/1.25 var(--mono);
    white-space:nowrap;
  }
  html.layout-v2 #v221NightBrief .v221-brief-bar {
    display:flex;
    flex-direction:column;
    justify-content:flex-end;
    width:min(100%,39px);
    height:66px;
    border-radius:6px 6px 2px 2px;
    background:rgba(150,211,193,.085);
    overflow:hidden;
  }
  html.layout-v2 #v221NightBrief .v221-brief-bar>span {
    display:block;
    width:100%;
    min-height:2px;
    border-radius:5px 5px 2px 2px;
    background:linear-gradient(180deg,#8ef0bb,#378e82);
  }
  html.layout-v2 #v221NightBrief .v221-brief-hour:not([data-dark=true]) .v221-brief-bar>span {
    background:linear-gradient(180deg,#7b9c9d,#38555e);
  }
  html.layout-v2 #v221NightBrief .v221-brief-bar-time {
    color:#e0f1e9;
    font:700 12px/1.25 var(--mono);
    white-space:nowrap;
  }
  html.layout-v2 #v221NightBrief .v221-brief-placeholder {
    margin:auto;
    min-height:44px;
    padding:10px;
    font:500 13px/1.5 var(--sans);
    color:#b7ceca;
  }
  html.layout-v2 #v221NightBrief .v221-brief-foot {
    margin:7px 0 0;
    font:500 12px/1.5 var(--sans);
    color:#b3cfc2;
  }
  html.layout-v2 #v221NightBrief .v221-brief-route {
    display:flex;
    flex-wrap:wrap;
    align-items:center;
    justify-content:space-between;
    gap:7px 10px;
    padding:10px 0;
    margin:10px 0;
    border-block:1px solid rgba(149,214,184,.13);
  }
  html.layout-v2 #v221NightBrief .v221-brief-route span {
    flex:1 1 160px;
    color:#cfdfd5;
    font:500 13px/1.45 var(--sans);
  }
  html.layout-v2 #v221NightBrief #v221BriefRouteButton {
    flex:0 0 auto;
    padding:8px 10px;
    border:1px solid rgba(133,224,187,.36);
    border-radius:9px;
    color:#d9f9e3;
    background:#0b2928;
    font:700 12px/1.2 var(--display);
  }
  html.layout-v2 #v221NightBrief .v221-brief-actions {
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:8px;
    margin-top:8px;
  }
  html.layout-v2 #v221NightBrief .v221-brief-alert,
  html.layout-v2 #v221NightBrief .v221-brief-pass {
    display:flex;
    justify-content:center;
    align-items:center;
    text-align:center;
    gap:7px;
    border-radius:10px;
    padding:10px 7px;
    font:700 12px/1.25 var(--display);
    overflow-wrap:anywhere;
  }
  html.layout-v2 #v221NightBrief .v221-brief-alert {
    background:#9ff0ca;
    color:#09271b;
    border:1px solid #b6ffe3;
  }
  html.layout-v2 #v221NightBrief .v221-brief-alert svg {
    width:18px;
    height:18px;
    flex:0 0 18px;
    fill:none;
    stroke:currentColor;
    stroke-width:1.7;
    stroke-linecap:round;
    stroke-linejoin:round;
  }
  html.layout-v2 #v221NightBrief .v221-brief-pass {
    color:#e2f9ee;
    background:#14392e;
    border:1px solid #649e7f;
  }
  html.layout-v2 #v221NightBrief .v221-brief-note {
    margin:9px 0 0;
    color:#a6c9b6;
    font:500 12px/1.5 var(--sans);
  }
}
@media(max-width:350px){
  html.layout-v2 #v221NightBrief .v221-brief-metrics>div {padding:8px 5px}
  html.layout-v2 #v221NightBrief .v221-brief-metrics span {font-size:12px}
  html.layout-v2 #v221NightBrief .v221-brief-metrics strong {font-size:15px}
  html.layout-v2 #v221NightBrief .v221-brief-hour {flex-basis:39px}
}
@media(prefers-reduced-motion:reduce){
  html.layout-v2 #v221NightBrief * {scroll-behavior:auto!important;transition:none!important}
}

/* Tonight's lengthy sky briefing is a single accessible disclosure on phones.
   Preserve all live DOM targets, hourly chart updates and action buttons. */
html.layout-v2 #v221BriefDisclosure {display:none}
html.layout-v2 #v221BriefDisclosure:not([open]) #v221NightBrief {display:none!important}
@media (max-width:760px), (max-width:900px) and (max-height:450px) {
  html.layout-v2 #missionPanel #v221BriefDisclosure {
    display:block;
    grid-column:1 / -1;
    grid-row:4;
    min-width:0;
    width:100%;
    margin:12px 0 0;
    padding:0;
  }
  html.layout-v2 #v221BriefDisclosure>.v221-brief-disclosure-toggle {
    position:relative;
    display:flex;
    align-items:center;
    box-sizing:border-box;
    min-height:48px;
    width:100%;
    padding:11px 38px 11px 14px;
    border:1px solid rgba(146,216,196,.25);
    border-radius:11px;
    background:linear-gradient(120deg,rgba(19,57,51,.65),rgba(9,28,31,.78));
    color:#e1f7ee;
    font:700 14px/1.35 var(--display,system-ui);
    letter-spacing:.015em;
    cursor:pointer;
    list-style:none;
    touch-action:manipulation;
  }
  html.layout-v2 #v221BriefDisclosure>.v221-brief-disclosure-toggle::-webkit-details-marker {display:none}
  html.layout-v2 #v221BriefDisclosure>.v221-brief-disclosure-toggle:after {
    content:'';
    position:absolute;
    right:17px;
    top:calc(50% - 6px);
    width:9px;
    height:9px;
    border-right:2px solid #9bd9c4;
    border-bottom:2px solid #9bd9c4;
    transform:rotate(45deg);
  }
  html.layout-v2 #v221BriefDisclosure[open]>.v221-brief-disclosure-toggle:after {
    top:calc(50% - 2px);
    transform:rotate(225deg);
  }
  html.layout-v2 #v221BriefDisclosure>.v221-brief-disclosure-toggle:focus-visible {
    outline:2px solid #8ce7c5;
    outline-offset:2px;
  }
  html.layout-v2 #missionPanel #v221BriefDisclosure #v221NightBrief {
    margin:0;
    padding:13px 0 0;
    border-top:0;
  }
}
