/* MWX Mobile Homepage A - scope ALL changes to index.php and <=920px.
   No Saratoga globals are overridden at desktop sizes.
   CSS is activated only AFTER the matching JS has built the live mobile mirror. */
#mwx-compact-mobile { display:none; }
@media screen and (max-width:920px) {
 html.mwx-compact-ready, html.mwx-compact-ready body { overflow-x:hidden!important; max-width:100%!important; }
 html.mwx-compact-ready body { font-size:12px!important; -webkit-text-size-adjust:100%; background:#10161b!important; }
 html.mwx-compact-ready body #page {
    width:100%!important;max-width:100%!important;min-width:0!important;
    margin:0 auto!important;padding:0!important;box-sizing:border-box!important;border:0!important;
    background:#141b20!important;color:#eef1f4!important;
 }
 html.mwx-compact-ready body #header {height:auto!important;min-height:0!important;max-width:100%!important;box-sizing:border-box!important;overflow:hidden!important;background:#1f252a!important;}
 html.mwx-compact-ready body #header > a,
 html.mwx-compact-ready body #header .headerTemp,
 html.mwx-compact-ready body #header .subHeader,
 html.mwx-compact-ready body #header .subHeaderRight {display:none!important;}
 html.mwx-compact-ready body #header .subHeaderForecast {
   position:static!important;display:flex!important;flex-wrap:wrap!important;
   gap:5px 10px!important;justify-content:space-between!important;align-items:center!important;
   float:none!important;clear:both!important;width:100%!important;min-width:0!important;
   max-width:100%!important;box-sizing:border-box!important;min-height:0!important;height:auto!important;
   padding:7px 9px!important;margin:0!important;line-height:1.3!important;
 }
 html.mwx-compact-ready body #header .subHeaderForecast .mwxThemeSwitcher,
 html.mwx-compact-ready body #header .station-status,
 html.mwx-compact-ready body #header .site-strip-title {position:static!important;transform:none!important;float:none!important;margin:0!important;height:auto!important;line-height:1.3!important;}
 html.mwx-compact-ready body #header .site-strip-title {
    order:-1!important;flex:1 1 100%!important;text-align:center!important;font:bold 15px/1.35 Georgia,serif!important;
    letter-spacing:0!important;white-space:normal!important;max-width:100%!important;color:#e7c46b!important;
 }
 html.mwx-compact-ready body #header .station-status {font-size:11px!important;max-width:50%!important;}
 html.mwx-compact-ready body #header .subHeaderForecast .mwxThemeSwitcher {max-width:48%!important;}
 html.mwx-compact-ready body #header .subHeaderForecast .bom-warning-ticker,
 html.mwx-compact-ready body #header .subHeaderForecast .bom-no-warnings,
 html.mwx-compact-ready body #header .subHeaderForecast .warning-title-row {
    order:5!important;flex:1 1 100%!important;min-width:0!important;max-width:100%!important;
    box-sizing:border-box!important;width:100%!important;margin:0!important;height:auto!important;
    text-align:center!important;font-size:11px!important;white-space:normal!important;line-height:1.4!important;
 }
 html.mwx-compact-ready body .leftSideBar {display:none!important;}
 html.mwx-compact-ready body #main-copy {display:none!important;}
 html.mwx-compact-ready body #mwx-compact-mobile {display:block!important;max-width:100%!important;box-sizing:border-box!important;}
 html.mwx-compact-ready body #footer {margin:0!important;width:100%!important;box-sizing:border-box!important;padding:9px 6px!important;font-size:10px!important;}
 /* A design: compact, familiar Saratoga gold, dark slate; never scale the page. */
 #mwx-compact-mobile {--mx-gold:#e0b957;--mx-muted:#b8c3ca;--mx-line:#475159;--mx-card:#2e353a;color:#edf0f2!important;background:#141b20!important;
    padding:7px 8px 15px!important;font:12px/1.35 system-ui,-apple-system,Segoe UI,Arial,sans-serif!important; }
 #mwx-compact-mobile * { box-sizing:border-box; }
 #mwx-compact-mobile .mx-top {display:flex;align-items:center;justify-content:space-between;gap:7px;border:1px solid #434a50;background:#242b30;border-radius:6px;padding:6px 8px;margin-bottom:7px;}
 #mwx-compact-mobile .mx-menu-toggle {cursor:pointer;color:#f2cf83!important;background:#383a39!important;border:1px solid #665b45;border-radius:5px;font:700 12px/1.2 inherit;padding:7px 10px;min-width:76px;min-height:32px;}
 #mwx-compact-mobile .mx-menu-toggle:focus-visible,#mwx-compact-mobile select:focus-visible {outline:2px solid #e0b957;outline-offset:1px;}
 #mwx-compact-mobile .mx-top-note {color:var(--mx-muted);font-size:10px;text-align:right;white-space:normal;}
 #mwx-compact-mobile .mx-nav[hidden] {display:none!important;}
 #mwx-compact-mobile .mx-nav {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:5px;border:1px solid var(--mx-line);border-radius:6px;padding:7px;background:#252b30;margin:0 0 7px;}
 #mwx-compact-mobile .mx-nav a {display:block;background:#353a3d;border:1px solid #50565a;border-radius:4px;text-decoration:none!important;color:#f1d285!important;font-size:12px;line-height:1.3;padding:8px 6px;}
 #mwx-compact-mobile .mx-section {margin:9px 0 0;}
 #mwx-compact-mobile .mx-sectline {display:flex;align-items:center;justify-content:space-between;margin:0 1px 5px;gap:9px;}
 #mwx-compact-mobile .mx-heading {font-size:12px;line-height:1.3;font-weight:760;color:var(--mx-gold);}
 #mwx-compact-mobile .mx-caption {font-size:10px;line-height:1.3;color:#a7b2bb;}
 #mwx-compact-mobile .mx-card {border:1px solid #50565c;background:var(--mx-card);border-radius:7px;overflow:hidden;color:#eef1f4!important;}
 #mwx-compact-mobile .mx-hero {display:flex;align-items:center;justify-content:space-between;min-height:92px;padding:9px 15px;}
 #mwx-compact-mobile .mx-cond {font-size:14px;font-weight:760;color:#e5f0f7;line-height:1.4;}
 #mwx-compact-mobile .mx-temp {font-size:31px;font-weight:780;line-height:1.1;color:#f4f6f7;margin:3px 0;letter-spacing:-.8px;}
 #mwx-compact-mobile .mx-feels {color:#bac7cf;font-size:11px;line-height:1.4;}
 #mwx-compact-mobile .mx-icon {width:56px;height:62px;object-fit:contain;max-width:27%;flex:none;}
 #mwx-compact-mobile .mx-metrics {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px;}
 #mwx-compact-mobile .mx-metric {padding:9px 11px;min-height:70px;}
 #mwx-compact-mobile .mx-lbl {font-size:10px;line-height:1.3;color:#bdc6cd;}
 #mwx-compact-mobile .mx-val {font-size:17px;line-height:1.25;font-weight:750;margin-top:4px;overflow-wrap:anywhere;}
 #mwx-compact-mobile .mx-hint {font-size:10px;line-height:1.35;color:#aebac3;margin-top:3px;overflow-wrap:anywhere;}
 #mwx-compact-mobile .mx-cloud {display:grid;grid-template-columns:minmax(0,1fr) 118px;gap:10px;padding:9px 12px;align-items:center;min-height:225px;}
 #mwx-compact-mobile .mx-cloud-copy {align-self:stretch;display:flex;flex-direction:column;justify-content:space-around;gap:7px;min-width:0;}
 #mwx-compact-mobile .mx-cloud-copy .mx-hint {font-size:11px;}
 #mwx-compact-mobile #mx-cloud-frame {display:block;width:118px!important;height:211px!important;min-width:0;max-width:100%;border:0!important;border-radius:9px;transform:none!important;background:#12243a;}
 #mwx-compact-mobile .mx-sky-type {font-weight:700;color:#d9e8f4;font-size:13px;}
 #mwx-compact-mobile .mx-risk-grid {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px;}
 #mwx-compact-mobile .mx-risk {padding:9px 9px 10px;min-height:105px;}
 #mwx-compact-mobile .mx-risk label {display:block;font-size:11px;font-weight:720;color:var(--mx-gold);}
 #mwx-compact-mobile .mx-risk select {width:100%;margin:5px 0 3px;background:#222a30;color:#ece8da;border:1px solid #57616b;border-radius:4px;padding:4px 3px;min-height:28px;font:11px system-ui, sans-serif;}
 #mwx-compact-mobile .mx-risk-main {font-size:16px;line-height:1.15;font-weight:780;margin:5px 0 1px;overflow-wrap:anywhere;}
 #mwx-compact-mobile .mx-risk-main[data-tone="marginal"] {color:#83c3ed;}
 #mwx-compact-mobile .mx-risk-main[data-tone="quiet"] {color:#93d58c;}
 #mwx-compact-mobile .mx-risk-main[data-tone="possible"] {color:#e8d16b;}
 #mwx-compact-mobile .mx-risk-main[data-tone="likely"] {color:#efad6e;}
 #mwx-compact-mobile .mx-risk-main[data-tone="high"] {color:#e88076;}
 #mwx-compact-mobile .mx-risk-main[data-tone="severe"] {color:#ba97dc;}
 #mwx-compact-mobile .mx-risk-small {font-size:11px;color:#e2e6e8;line-height:1.3;overflow-wrap:anywhere;}
 #mwx-compact-mobile .mx-risk-note {font-size:10px;color:#abb8c1;margin-top:4px;line-height:1.3;overflow-wrap:anywhere;}
 #mwx-compact-mobile .mx-risk-note-row{display:block;}
 #mwx-compact-mobile .mx-risk-note-row+.mx-risk-note-row{border-top:1px solid #576169;margin-top:5px;padding-top:4px;}
 #mwx-compact-mobile .mx-risk-main[data-tone="unknown"] {color:#c0c7cd;}
 #mwx-compact-mobile .mx-summary-metrics .mx-metric {min-height:72px;}
 #mwx-compact-mobile .mx-summary-metrics .mx-hint span {font-weight:650;color:#dbe3e8;}
 #mwx-compact-mobile .mx-bom {padding:8px;max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch;}
 #mwx-compact-mobile .mx-bom .bom12-wrap {max-width:100%!important;margin:auto!important;}
 #mwx-compact-mobile .mx-bom .bom12-grid {max-width:100%!important;width:100%!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;}
 #mwx-compact-mobile .mx-bom .bom12-slot {padding:3px 1px!important;grid-template-columns:35px 32px 30px minmax(0,1fr)!important;}
 #mwx-compact-mobile .mx-bom .bom12-slot:nth-child(-n+4)>* {transform:none!important;}
 #mwx-compact-mobile .mx-bom .bom12-time {font-size:9px!important;}
 #mwx-compact-mobile .mx-bom .bom12-temp {font-size:12px!important;}
 #mwx-compact-mobile .mx-bom .bom12-detail {font-size:10px!important;white-space:normal!important;}
 #mwx-compact-mobile .mx-bottom {text-align:center;margin-top:12px;color:#b8c4ce;font-size:11px;}
 #mwx-compact-mobile .mx-bottom a {color:#edd18b!important;text-decoration:underline!important;}
}
@media screen and (max-width:350px) {
 #mwx-compact-mobile .mx-val {font-size:15px;}
 #mwx-compact-mobile .mx-cloud {grid-template-columns:minmax(0,1fr) 104px;gap:7px;}
 #mwx-compact-mobile #mx-cloud-frame {width:104px!important;height:186px!important;}
 #mwx-compact-mobile .mx-bom .bom12-grid {grid-template-columns:minmax(0,1fr)!important;grid-template-rows:none!important;grid-auto-flow:row!important;}
 #mwx-compact-mobile .mx-bom .bom12-slot {border-left:0!important;border-bottom:1px solid #777!important;}
}
@media screen and (min-width:921px) { html body #mwx-compact-mobile {display:none!important;} }

/* V2.2: mobile-header layout only.
   Give the title, controls and live warning status predictable rows.
   This overrides the original absolute-positioned Saratoga header widgets
   without moving or duplicating the live elements. */
@media screen and (max-width:920px) {
 html.mwx-compact-ready body #header .subHeaderForecast {
    display:grid!important;
    grid-template-columns:minmax(0,1fr) max-content!important;
    grid-template-rows:auto auto auto!important;
    column-gap:9px!important; row-gap:8px!important;
    align-items:center!important; justify-items:stretch!important;
    padding:9px 10px 10px!important;
 }
 html.mwx-compact-ready body #header .subHeaderForecast > .site-strip-title {
    grid-column:1/-1!important;grid-row:1!important;
    width:100%!important;min-width:0!important;max-width:100%!important;
    justify-self:stretch!important;text-align:center!important;
    padding:0 4px 2px!important;
    order:0!important;
 }
 html.mwx-compact-ready body #header .subHeaderForecast > .mwxThemeSwitcher {
    grid-column:1!important;grid-row:2!important;
    width:100%!important;max-width:168px!important;min-width:0!important;
    height:auto!important;min-height:27px!important;
    justify-self:start!important;align-self:center!important;
    order:0!important;
 }
 html.mwx-compact-ready body #header .subHeaderForecast > .mwxThemeSwitcher form,
 html.mwx-compact-ready body #header .subHeaderForecast > .mwxThemeSwitcher .mwxThemeSelectRow {
    width:100%!important;max-width:100%!important;box-sizing:border-box!important;
 }
 html.mwx-compact-ready body #header .subHeaderForecast > .mwxThemeSwitcher select {
    display:block!important;width:100%!important;min-width:0!important;max-width:100%!important;
    font-size:11px!important;height:29px!important;
 }
 html.mwx-compact-ready body #header .subHeaderForecast > .station-status {
    grid-column:2!important;grid-row:2!important;
    justify-self:end!important;align-self:center!important;
    width:max-content!important;max-width:100%!important;
    display:flex!important;align-items:center!important;gap:4px!important;
    font:11px/1.3 Arial,Verdana,sans-serif!important;
    white-space:nowrap!important;text-align:right!important;
    order:0!important;
 }
 html.mwx-compact-ready body #header .subHeaderForecast > .station-status .station-status-dot {
    margin:0 2px 0 0!important;flex:none!important;
 }
 html.mwx-compact-ready body #header .subHeaderForecast > .bom-no-warnings,
 html.mwx-compact-ready body #header .subHeaderForecast > .bom-warning-ticker,
 html.mwx-compact-ready body #header .subHeaderForecast > .warning-title-row {
    grid-column:1/-1!important;grid-row:3!important;
    width:100%!important;min-width:0!important;max-width:100%!important;
    justify-self:stretch!important;align-self:stretch!important;
    box-sizing:border-box!important;order:0!important;
    padding:6px 9px!important;text-align:center!important;
    line-height:1.35!important;
 }
 html.mwx-compact-ready body #header .subHeaderForecast > .bom-no-warnings {
    background:#273036!important;border:1px solid #465158!important;
    border-radius:5px!important;color:#c8d2da!important;
 }
}

/* V2.4: centre the existing live V26 cloud artwork below a compact header.
   Removes the large, empty left column left behind by V2.3 text cleanup.
   Homepage mobile only; desktop and V26 rendering logic unchanged. */
@media screen and (max-width:920px) {
 #mwx-compact-mobile .mx-cloud {
    display:flex;flex-direction:column;align-items:stretch;justify-content:flex-start;
    min-height:0;gap:9px;padding:10px 12px 12px;
 }
 #mwx-compact-mobile .mx-cloud-copy {
    display:flex;flex-direction:row;justify-content:space-between;align-items:center;
    flex:0 0 auto;align-self:stretch;min-width:0;gap:8px;
 }
 #mwx-compact-mobile .mx-cloud .mx-sky-type {
    font-size:12px;line-height:1.25;white-space:normal;text-align:right;
    padding:4px 9px;background:#263640;border:1px solid #50616a;border-radius:12px;
 }
 #mwx-compact-mobile #mx-cloud-holder {
    display:flex;align-items:center;justify-content:center;width:100%;min-width:0;
    padding:1px 0 0;
 }
 #mwx-compact-mobile #mx-cloud-frame {
    display:block;width:148px!important;height:265px!important;
    max-width:100%;min-width:0;border:0!important;border-radius:10px;
    transform:none!important;background:#12243a;
 }
}
@media screen and (max-width:350px) {
 #mwx-compact-mobile #mx-cloud-frame {width:132px!important;height:236px!important;}
}

/* V2.6: equal-weight rainfall totals. Each label precedes its value.
   Restrict to compact mobile rainfall card; original dashboard stays unchanged. */
@media screen and (max-width:920px) {
 #mwx-compact-mobile .mx-rain-totals .mx-rain-lines {
   display:flex;flex-direction:column;gap:0;margin-top:5px;
 }
 #mwx-compact-mobile .mx-rain-totals .mx-rain-line {
   display:flex;align-items:baseline;justify-content:space-between;
   gap:5px;padding:4px 0;min-width:0;
 }
 #mwx-compact-mobile .mx-rain-totals .mx-rain-line+.mx-rain-line {
   border-top:1px solid rgba(196,206,212,.17);
 }
 #mwx-compact-mobile .mx-rain-totals .mx-rain-label {
   color:#bec8cf;font-size:10.5px;line-height:1.25;
   flex:1 1 auto;min-width:0;
 }
 #mwx-compact-mobile .mx-rain-totals .mx-rain-value {
   color:#eef1f4;font-size:11.5px;line-height:1.25;font-weight:700;
   flex:0 1 auto;white-space:nowrap;text-align:right;min-width:0;
 }
}
@media screen and (max-width:350px) {
 #mwx-compact-mobile .mx-rain-totals .mx-rain-label {font-size:10px;}
 #mwx-compact-mobile .mx-rain-totals .mx-rain-value {font-size:10.5px;}
}
