@font-face {
  font-family: "Martian Mono";
  src: url("type/MartianMono.ttf") format("truetype");
  font-weight: 100 800;
  font-stretch: 75% 112.5%;
  font-display: swap;
}
:root {
  color-scheme: dark;
  --violet: #302268;
  --navy: #17264c;
  --board: #354e84;
  --yellow: #ffff89;
  --white: #fffdf5;
  --pale: #dce8fa;
  --line: #7891bc;
  --type: "Martian Mono", Menlo, "Courier New", monospace;
  --shadow: 2px 2px 0 #101a34;
  font: 16px var(--type);
  font-variation-settings: "wdth" 82;
  color: var(--white);
  background: #241c52;
}
* { box-sizing: border-box; }
body { margin: 0; background: linear-gradient(135deg,#3d2c76,#2b205f 57%,#21194f); }
[hidden] { display: none !important; }
h1,h2,h3,p,dl,dd { margin: 0; }
button,select,input,a { touch-action: manipulation; }
button,select,.wide-action {
  font: 550 1rem/1.25 var(--type); font-variation-settings: "wdth" 82; letter-spacing: -.045em;
  min-height: 46px; border: 1px solid #8294c4; border-radius: 2px; padding: 8px 14px;
  background: #283a6b; color: var(--white); cursor: pointer;
}
button:focus, select:focus, input:focus, a:focus { outline: 3px solid #fff6a0; outline-offset: 2px; }
button:focus:not(:focus-visible), a:focus:not(:focus-visible) { outline: none; }
button:active, .wide-action:active { background: #3c5287; }
button:disabled,input:disabled { opacity: .55; cursor: default; }
a { color: #fff7a8; }
.sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

#screen {
  --dx: 0px; --dy: 0px;
  min-height: 100vh; max-width: 1600px; margin: auto;
  padding: clamp(13px,2.6vh,28px) clamp(15px,2.85vw,48px) clamp(12px,2vh,24px);
  display: flex; flex-direction: column; gap: clamp(7px,1.3vh,16px);
  position: relative;
}
#screen.quiet > * { transform:translate(var(--dx),var(--dy)); }
@media (min-width:730px) and (orientation:landscape) and (min-height:520px) {
  #screen { height: 100vh; height: var(--viewport-height,100vh); min-height: 0; }
}
@media (min-width:1600px) { body { background-color: #201748; } }
.mast { position: relative; display: flex; align-items: center; gap: clamp(10px,2vw,27px); flex: none;
  min-height: clamp(70px,12.5vh,126px); isolation: isolate; }
.mast-flare { z-index: -1; position: absolute; left: 1.7%; right: 18.7%; top: 0; bottom: 0;
  background: linear-gradient(180deg,#f6ab69 0%,#d77f51 14%,#a35f64 38%,#66466b 64%,#42316c 82%,#35296b 100%);
  clip-path: polygon(0 0,100% 0,calc(100% - 48px) 100%,0 100%);
}
.mast-flare::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 9px;
  background: repeating-linear-gradient(0deg,#29205c 0 2px,transparent 2px 4px); }
.ident {
  margin-left: 0; align-self: center; width: clamp(79px,10.4vw,139px); height: clamp(58px,9.5vh,100px); flex: none;
  border: 2px solid #c5cde1; border-left: 4px solid #e8ecfa;
  box-shadow: 3px 3px 0 #22204a,inset 0 0 0 2px #26345d;
  background: linear-gradient(158deg,#4c67a0 0%,#2c407f 58%,#1d285e);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.ident span { font: italic 800 clamp(29px,4.5vw,58px)/.99 var(--type); letter-spacing: -.115em; padding-right: .1em;
  color: #fffde5; text-shadow: 2px 2px #152246; }
.ident small { font: 650 clamp(10px,1.3vw,17px)/1.15 var(--type); font-variation-settings: "wdth" 90;
  letter-spacing: .12em; border-top: 3px solid #f3b76d; margin-top: .25em; padding-top: .23em; }
.mast h1 { font-size: clamp(29px,4.45vw,72px); line-height: 1.1; color: var(--yellow); font-weight: 650; letter-spacing: -.073em;
  text-shadow: 3px 3px #241b35; max-width: 58%; }
.clockline { margin-left: auto; text-align: right; flex: none; text-shadow: var(--shadow); }
#clock { font-size: clamp(23px,2.9vw,44px); white-space: nowrap; line-height: 1.15; font-weight: 560; }
#date { margin-top: 6px; font-size: clamp(14px,1.55vw,23px); letter-spacing: -.035em; color: #f1eafd; }
#stage { flex: 1; min-height: 0; display: grid; grid-template: minmax(0,1fr) / minmax(0,1fr); }
.board {
  min-height: 0; min-width: 0; display: flex; flex-direction: column;
  background: linear-gradient(155deg,#3e5a8e 0%,#344f85 52%,#2b447a 100%);
  border: 2px solid; border-color: #8299ba #223762 #20335e #758caa;
  box-shadow: 3px 3px 0 #231c50,inset 0 0 0 2px rgba(255,255,255,.035);
  padding: clamp(15px,2.9vh,37px) clamp(16px,3.15vw,53px);
}
.board-heading { display: flex; justify-content: space-between; align-items: center; gap: 14px; }
.locator { font-weight: 500; font-size: clamp(14px,1.55vw,21px); color: var(--pale); line-height: 1.3; letter-spacing: .015em; }
.board h2 { font-size: clamp(26px,3.7vw,57px); font-weight: 630; line-height: 1.18; letter-spacing: -.06em; color: var(--yellow); text-shadow: var(--shadow); }
.locator + h2 { margin-top: 5px; }
.update { font-size: clamp(14px,1.5vw,21px); line-height: 1.4; text-align: right; max-width: 42%; color: var(--pale); }
.stale { color: #fff39b !important; font-weight: 650; }
.current-body { flex: 1; display: grid; grid-template-columns: 1.04fr 1fr; align-items: center; min-height: 0; gap: 3%; }
.reading { min-width: 0; text-align: center; }
.temp-pair { display: flex; align-items: center; justify-content: center; gap: 2%; }
#nowIcon { display: block; width: clamp(75px,16vw,235px); min-width: 0; }
.wxicon { display: block; width: 100%; height: auto; }
.temperature { font-size: clamp(75px,11vw,175px); font-weight: 440; line-height: 1.1; letter-spacing: -.115em; text-shadow: 3px 4px #152344; }
.temperature sup { font-size: .58em; vertical-align: top; line-height: 1.17; letter-spacing: -.1em; }
#condition { margin: 8px 0 0; font-size: clamp(24px,3.25vw,52px); font-weight: 580; line-height: 1.18; letter-spacing: -.06em; text-shadow: var(--shadow); }
.measurements { padding-left: 7%; border-left: 1px solid #7d95bb; line-height: 1.2; }
.measurements div { display: flex; align-items: baseline; gap: 9px; justify-content: space-between; padding: clamp(7px,1.7vh,20px) 0; border-bottom: 1px solid rgba(199,216,244,.27); }
.measurements div:last-child { border: 0; }
.measurements dt { font-size: clamp(17px,2.14vw,34px); color: #e4edf8; }
.measurements dd { font-size: clamp(19px,2.58vw,40px); font-weight: 560; letter-spacing: -.075em; white-space: nowrap; text-shadow: var(--shadow); }
.lower { display: flex; align-items: stretch; min-height: clamp(60px,10vh,115px); flex: none;
  background: linear-gradient(105deg,#202e5c,#242e59 70%,#252650); border-top: 2px solid #9d95af; border-bottom: 2px solid #151d42; }
.lower-tag { display: flex; align-items: center; padding: 8px clamp(14px,2vw,30px); flex: none; color: var(--yellow);
  background: linear-gradient(150deg,#454175,#313363); border-right: 3px double #8d86ac; font-weight: 620; font-size: clamp(15px,1.8vw,25px); }
#lowerText { align-self: center; padding: 8px clamp(12px,2.1vw,32px); font-size: clamp(18px,2.45vw,37px); line-height: 1.3; letter-spacing: -.06em; text-shadow: var(--shadow); }
.tuning { display: flex; align-items: stretch; justify-content: space-between; flex: none; gap: 12px; }
.tuning nav,.tools { display: flex; gap: 5px; }
@media (min-width:730px) and (orientation:landscape) {
  .tuning nav { flex: 1; max-width: 76%; }
  .tuning nav button { flex: 1; }
}
.tuning button,#idleBar button { font-size: clamp(15px,1.65vw,23px); min-height: 46px; padding: 8px clamp(10px,1.45vw,23px); background: #292653; border-color: #77779b; }
.tuning button[aria-current="page"] { border-color: #fff49b; color: #201c42; background: #ffeda0; box-shadow: inset 0 -3px #ddb05e; }
#idleBar { display: flex; gap:8px; justify-content: flex-end; }
#idleBar button { background: #28264f; color: #e3e3ef; }
#idleBar #quickDashboard,.tuning .return-tv { background:#ffeda0; border-color:#fff49b; color:#211c42; box-shadow:inset 0 -3px #ddb05e; }
#screen.quiet #mapOptions,#screen.quiet #radarPause { display:none; }
#dialogAlert { flex:none; color:#fff3bd; background:#732b36; border:2px solid #ffcd9a; }
.signal { flex: none; }
.signal-button { display: flex; width: 100%; gap: clamp(9px,1.4vw,20px); align-items: center; text-align: left; border: 2px solid #e4c479;
  padding: 7px clamp(10px,1.7vw,24px); min-height: 54px; background: #554323; }
.signal[data-level="warning"] .signal-button { background: #80242f; border-color: #ffd3b5; }
.signal[data-level="watch"] .signal-button { background: #62440e; border-color: #ffda73; }
.signal[data-level="checking"] .signal-button,.signal[data-level="unavailable"] .signal-button { background: #34354e; border-color: #c8b996; }
.signal-symbol { flex: none; border: 2px solid currentColor; color: #ffe5a1; width: 29px; line-height: 27px; text-align: center; font-weight: 750; }
.signal-text { flex: 1; min-width: 0; }
.signal-text strong { display: block; font-size: clamp(21px,2.9vw,43px); line-height: 1.18; letter-spacing: -.06em; }
.signal-text > span { display:block; color: #fff4da; margin-top: 3px; font-size: clamp(14px,1.55vw,23px); line-height: 1.3; }
.signal-action { font-size: clamp(16px,1.8vw,25px); text-decoration: underline; text-underline-offset: 3px; }
.signal[data-level="checking"] .signal-text strong,.signal[data-level="unavailable"] .signal-text strong { font-size: clamp(18px,2.15vw,30px); }
.empty { align-self: center; justify-self: center; text-align: center; grid-column: 1/-1; color: var(--pale); font-size: clamp(18px,2.2vw,30px); }
.hour-grid,.day-grid { flex: 1; min-height: 0; display: grid; gap: clamp(4px,.75vw,12px); margin-top: clamp(12px,2.7vh,32px); }
.hour-grid { grid-template: repeat(2,minmax(0,1fr)) / repeat(4,minmax(0,1fr)); }
.hour { display: flex; flex-direction: column; justify-content: center; align-items: center; border-top: 2px solid #8fa5c2; background: linear-gradient(135deg,#3c5890,#2b4172); min-width: 0; }
.hour time,.day-name { color: var(--yellow); font-weight: 630; font-size: clamp(17px,2.25vw,32px); text-shadow: var(--shadow); }
.hour-temps { display: flex; gap: 8px; align-items: center; justify-content: center; }
.hour-temps .wxicon { width: clamp(40px,5.5vw,86px); }
.hour-temps b { font-weight: 580; font-size: clamp(28px,4.05vw,61px); letter-spacing: -.1em; text-shadow: var(--shadow); }
.hour-pop,.daily-pop { color: #e0edff; font-size: clamp(14px,1.64vw,24px); }
.day-grid { grid-template-columns: repeat(5,minmax(0,1fr)); }
.day { display: flex; flex-direction: column; align-items: center; justify-content: space-evenly; min-width: 0; text-align: center; padding: 5px 4px; gap: 3px;
  border-top: 2px solid #9dafce; border-bottom: 2px solid #213361; background: linear-gradient(180deg,#4f67a0 0%,#3c548e 35%,#324985 75%,#2b4080); }
.day-name { text-transform: uppercase; }
.day-icon { display: grid; place-items: center; width: 100%; min-height: 0; flex: 0 1 34%; background: linear-gradient(0deg,#2f4996 12.5%,#40579c 12.5%,#40579c 25%,#4d65a8 25%,#4d65a8 37.5%,#5a73b3 37.5%,#5a73b3 50%,#6881ba 50%,#6881ba 62.5%,#748abe 62.5%,#748abe 75%,#8095c4 75%,#8095c4 87.5%,#8a9fca 87.5%); }
.day-icon .wxicon { width: clamp(50px,8.7vw,115px); max-height: 100%; }
.day-cond { font-weight: 530; font-size: clamp(16px,1.95vw,28px); line-height: 1.18; letter-spacing: -.06em; }
.day-temps { font-size: clamp(18px,2.55vw,36px); line-height: 1.22; text-shadow: var(--shadow); }
.day-temps span { display: block; }
.day-temps b { color: var(--yellow); font-weight: 640; }
/* The radar cutaway fills a widescreen geographic frame, as on a local newscast. */
.radar { padding:0; gap:0; background:#1a2435; }
.map-stage { flex:1; min-height:0; display:grid; place-items:center; overflow:hidden; background:#192334; }
.map-viewport { position:relative; overflow:hidden; max-width:100%; }
.map-frame,.map-frame img,.map-frame svg { width:100%; height:100%; position:absolute; inset:0; }
.map-frame[data-tone="light"] #mapBase { filter:brightness(1.40) saturate(.95); }
.map-frame[data-product="precip"] #overlay { opacity:.85; }
.map-plate { position:absolute; left:1.75%; top:3%; pointer-events:none; font-family:-apple-system,BlinkMacSystemFont,Arial,sans-serif; color:#fff; max-width:64%; box-shadow:1px 2px 3px #10162070; }
.plate-title { display:flex; background:linear-gradient(100deg,#24355b,#253c5beb); align-items:stretch; border-top:2px solid #e9b270; }
.plate-call { padding:4px 8px; display:flex; align-items:center; background:linear-gradient(142deg,#546fa6,#243d74); color:#fff9dd; font:bold italic clamp(19px,2.6vw,38px)/1 Arial,sans-serif; letter-spacing:-.09em; text-shadow:1px 1px #13253e; }
.plate-title > div { padding:3px 11px 4px 8px; }
#radarArea { font:bold clamp(12px,1.48vw,20px)/1.15 -apple-system,BlinkMacSystemFont,Arial,sans-serif; letter-spacing:.015em; }
#radarPage #radarKind { margin:0; color:#fff; font:bold clamp(17px,2.05vw,28px)/1.04 -apple-system,BlinkMacSystemFont,Arial,sans-serif; letter-spacing:-.02em; text-shadow:1px 1px #172033; }
.map-time { background:rgba(12,16,22,.88); padding:3px 7px; font:650 clamp(14px,1.59vw,22px)/1.18 -apple-system,BlinkMacSystemFont,Arial,sans-serif; }
.map-note { position:absolute; left:8px; right:8px; bottom:8px; margin:auto; width:fit-content; max-width:calc(100% - 16px); background:#172334; border:1px solid #bccbda; padding:6px 10px; text-align:center; font-size:clamp(14px,1.7vw,23px); }
.map-foot { flex:none; display:flex; align-items:center; justify-content:space-between; gap:6px 12px; padding:3px 10px; min-height:36px; background:#253652; border-top:1px solid #70879d; }
.radar-actions { display:flex; gap:6px; flex:none; }
.legend { display:flex; flex-wrap:wrap; align-items:center; gap:4px 12px; color:#edf3fa; font:600 clamp(14px,1.56vw,21px)/1.17 -apple-system,BlinkMacSystemFont,Arial,sans-serif; }
.legend i { display:inline-block; width:13px; height:11px; border:1px solid #d1d8e4; margin-right:4px; }
.legend img { width:185px; max-width:65%; }
#screen[data-view="radar"] #lower,#screen[data-view="future"] #lower,#screen[data-view="cam"] #lower { display:none; }
#screen.quiet .radar-actions { display:none; }
#screen[data-view="radar"] .radar .map-stage,#screen[data-view="future"] .radar .map-stage { background:linear-gradient(135deg,#222d3f,#182334); }
#screen[data-view="dashboard"] #stage { grid-template: minmax(0,.92fr) minmax(0,1.08fr)/minmax(0,1.35fr) minmax(0,1fr); gap: 9px; }
#screen[data-view="dashboard"] .radar { grid-area: 1 / 1 / 3 / 2; }
#screen[data-view="dashboard"] .current { grid-area: 1 / 2; }
#screen[data-view="dashboard"] .outlook { grid-area: 2 / 2; }
#screen[data-view="dashboard"] .board { padding: 9px 12px; }
#screen[data-view="dashboard"] .board h2 { font-size: clamp(18px,2.25vw,32px); margin: 0; }
#screen[data-view="dashboard"] .board .locator { display: none; }
#screen[data-view="dashboard"] .current .board-heading { display: block; }
#screen[data-view="dashboard"] .update { font-size: 14px; max-width: none; text-align: left; }
#screen[data-view="dashboard"] .current-body { grid-template-columns: .95fr 1.05fr; gap: 8px; }
#screen[data-view="dashboard"] .temperature { font-size: clamp(40px,5.2vw,80px); }
#screen[data-view="dashboard"] #nowIcon { width: 40%; }
#screen[data-view="dashboard"] #condition { font-size: clamp(15px,1.75vw,24px); margin: 4px 0 0; }
#screen[data-view="dashboard"] .measurements { padding-left: 5px; }
#screen[data-view="dashboard"] .measurements div { padding: 4px 0; gap: 2px; }
#screen[data-view="dashboard"] .measurements dt,#screen[data-view="dashboard"] .measurements dd { font-size: clamp(14px,1.45vw,21px); }
#screen[data-view="dashboard"] .outlook .update { display: none; }
.dash-switch { display:none; }
#screen[data-view="dashboard"] .dash-switch { display:inline-block; font-size:15px; min-width:94px; padding:4px 8px; }
#screen[data-view="dashboard"] .day-grid { grid-template:repeat(5,minmax(0,1fr)) / 1fr; gap:0; margin-top:4px; }
#screen[data-view="dashboard"] .day { display:grid; grid-template-columns:.8fr .45fr 1.55fr 1.05fr; grid-template-rows:1fr; gap:4px; padding:0 4px; text-align:left; border-top:1px solid #8196ba; border-bottom:0; background:none; }
#screen[data-view="dashboard"] .day-name { font-size:14px; }
#screen[data-view="dashboard"] .day-icon { height:auto; min-height:0; background:none; }
#screen[data-view="dashboard"] .day-icon .wxicon { width:23px; height:18px; }
#screen[data-view="dashboard"] .day-cond { display:none; }
#screen[data-view="dashboard"] .day-temps { grid-area:auto; display:flex; gap:6px; font-size:14px; white-space:nowrap; }
#screen[data-view="dashboard"] .daily-pop { grid-area:auto; font-size:14px; text-align:right; }
#screen[data-view="dashboard"] .hour-grid { margin-top: 6px; gap: 3px; }
#screen[data-view="dashboard"] .hour { border-top-width: 1px; }
#screen[data-view="dashboard"] .hour time,#screen[data-view="dashboard"] .hour-pop { font-size: 14px; }
#screen[data-view="dashboard"] .hour-pop .pop-label { display:none; }
#screen[data-view="dashboard"] .hour-temps { gap: 3px; }
#screen[data-view="dashboard"] .hour-temps b { font-size: clamp(18px,2vw,29px); }
#screen[data-view="dashboard"] .hour-temps .wxicon { width: clamp(18px,2.65vw,42px); }
#screen[data-view="dashboard"] .radar { padding:0; }
#screen[data-view="dashboard"] #radarArea { font-size:12px; }
#screen[data-view="dashboard"] .plate-title > div { padding:2px 6px; }
#screen[data-view="dashboard"] #radarKind { font-size:16px; }
#screen[data-view="dashboard"] .plate-call { font-size:19px; padding:3px 5px; }
#screen[data-view="dashboard"] .map-time { font-size:14px; }
#screen[data-view="dashboard"] .map-foot { flex-wrap:wrap; }
#screen[data-view="dashboard"] .legend { gap:3px 8px; font-size:14px; }
#screen[data-view="dashboard"] .radar-actions button { font-size:14px; padding:5px 7px; }
@media (min-width:730px) and (orientation:landscape) {
  #screen[data-view="dashboard"] .map-stage { background:#263345; }
}

.shade { position: fixed; inset: 0; z-index: 5; display: flex; align-items: center; justify-content: center; padding: 14px; background: rgba(11,12,34,.82); }
.dialog { display: flex; flex-direction: column; width: 670px; max-width: 100%; max-height: 94%; background: #304777; border: 2px solid #99accb; box-shadow: 5px 5px #171631; }
.dialog > header { flex: none; display: flex; justify-content: space-between; align-items: center; gap: 9px; padding: 10px 16px; background: #302460; border-bottom: 2px solid #d3a278; }
.dialog h2 { font-size: clamp(22px,3vw,36px); color: var(--yellow); text-shadow: var(--shadow); letter-spacing: -.06em; }
.dialog-body { padding: 17px 20px; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.dialog .wide-action { display: block; width: 100%; margin: 8px 0; text-align: center; line-height: 1.45; }
.dialog .primary { background: #fff09f; color: #262142; }
.help,.credits { font-size: 16px; line-height: 1.55; color: #e0e8fc; }
.help { margin: 5px 0 15px; }
.credits { display:inline-flex; align-items:center; min-height:46px; }
.setting { display:flex; gap: 15px; justify-content: space-between; align-items: center; min-height: 63px; padding: 6px 0; border-top: 1px solid #7288ab; font-size: 18px; }
.setting small { display:block; font-size:14px; line-height:1.5; color: var(--pale); }
.setting select { max-width: 58%; }
.setting input[type="range"] { width: 52%; min-height: 44px; }
.setting input[type="checkbox"] { width: 29px; height: 29px; flex:none; accent-color: #fff0a2; }
.alert-status { font-size: 18px; line-height: 1.5; }
.alert-story { margin: 14px 0 24px; padding-top: 14px; border-top: 2px solid #aab4cf; }
.alert-story h3 { color: #fff398; font-size: 24px; margin-bottom: 6px; }
.alert-story p { font: 19px/1.45 -apple-system,BlinkMacSystemFont,Arial,sans-serif; margin: 8px 0; white-space: pre-line; overflow-wrap: anywhere; }
.alert-story .issued { font-size: 17px; color: #edf2fa; }
.alert-story .instructions { border-left: 4px solid #ffe287; padding-left: 11px; }
.alert-story summary { cursor:pointer; min-height:46px; padding:12px 2px; }
#night { position: fixed; inset: 0; background: #060910; }
#nightWake { width: 100%; height: 100%; padding: 0; display: block; border: 0; background: transparent; }
.night-block { position:absolute; width: 45%; display:flex; flex-direction:column; gap: 9px; color:#a8b5ce; text-align:center; }
.night-city,.wake-hint,#nightStamp { font-size: clamp(14px,1.8vw,24px); }
#nightTime { font-size:clamp(30px,5.4vw,84px); font-weight:480; letter-spacing:-.08em; }
#nightWeather { font-size:clamp(17px,2.5vw,36px); }
.fatal { position: fixed; left: 5%; right: 5%; top: 40%; background: #50324b; border: 2px solid white; padding: 25px; }
@media (min-width:730px) and (max-height:650px) and (orientation:landscape) {
  #screen { gap: 6px; padding-top: 9px; padding-bottom: 9px; }
  .mast { min-height: 64px; } .ident { height: 55px; }
  .board { padding-top: 12px; padding-bottom: 12px; }
  .hour-grid,.day-grid { margin-top: 8px; }
  .lower { min-height: 52px; }
  .day-icon .wxicon { width: 58px; }
  #screen[data-view="dashboard"] .measurements div { padding: 2px 0; }
  #screen[data-view="dashboard"] .measurements div:nth-child(3) { display:none; }
}
@media (max-width:729px), (orientation:portrait), (max-height:519px) {
  #screen { gap: 8px; min-height: 100vh; padding: 12px; }
  .mast { flex-wrap: wrap; gap: 8px 13px; min-height: 76px; }
  .mast-flare { right: 12%; } .ident { width: 68px; height: 54px; }
  .ident span { font-size: 29px; } .ident small { font-size: 9px; }
  .mast h1 { font-size: clamp(21px,4.65vw,38px); max-width: 53%; }
  .clockline { font-size: 14px; } #clock { font-size: clamp(16px,3.2vw,27px); } #date { font-size: 13px; margin-top: 3px; }
  #stage { flex: auto; } .board { padding: 15px; }
  .current-body { grid-template-columns: 1fr; gap: 16px; padding: 18px 0 6px; }
  .measurements { padding: 0; border: 0; } .measurements div { padding: 8px 0; }
  .hour-grid { grid-template-columns: repeat(2,minmax(0,1fr)); grid-template-rows: auto; gap: 6px; }
  .hour { min-height: 87px; }
  .day-grid { grid-template-columns: 1fr; }
  .day { display: grid; grid-template-columns: 1fr .8fr 1.4fr 1fr; padding: 6px; border-bottom: 0; }
  .day-icon { height: 56px; } .day-icon .wxicon { width: 52px; } .daily-pop { grid-column:3; }
  .day-temps { grid-column:4; grid-row:1/3; }
  .map-stage { min-height: 240px; height: clamp(240px,65vw,480px); flex: none; }
  .tuning { flex-wrap: wrap; gap: 6px; } .tuning nav { flex-wrap: wrap; gap: 4px; } .tools { margin-left: auto; }
  .lower-tag { font-size: 14px; padding: 8px; } #lowerText { padding: 8px; }
  #screen[data-view="dashboard"] #stage { display:flex; flex-direction:column; }
  #screen[data-view="dashboard"] .current { order:-1; }
  .night-block { width: 59%; } #nightTime { font-size: clamp(28px,7vw,58px); }
}
@media (max-width:520px) {
  .mast { min-height: 93px; } .mast h1 { max-width: calc(100% - 84px); }
  .clockline { flex-basis:100%; display: flex; flex-direction: row-reverse; align-items:center; justify-content: space-between; }
  .mast-flare { bottom:26px; right: 0; }
  .dialog-body { padding: 11px 13px; } .setting { font-size: 16px; }
}
@media (prefers-reduced-motion:reduce) { * { scroll-behavior: auto; } }


/* Warning takeover: one big red panel, the whole panel is the button back to the dashboard. */
#screen[data-view="warn"] .signal,#screen[data-view="warn"] #lower { display:none; }
.warn { padding:0; border-color:#ffd3b5 #5c1420 #5c1420 #ffd3b5; background:#8f1f2c; }
.warn-tap { flex:1; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:clamp(10px,2.4vh,26px);
  width:100%; border:0; border-radius:0; padding:clamp(14px,3vh,34px) clamp(16px,3vw,48px); text-align:center; color:#fff;
  background:repeating-linear-gradient(0deg,rgba(0,0,0,.06) 0 2px,transparent 2px 4px),linear-gradient(160deg,#b12a38,#8a1d2b 60%,#6f1625); }
.warn-tap:active { background:#7a1a27; }
.warn-kicker { font-size:clamp(20px,2.9vw,42px); font-weight:650; color:#ffe9a8; letter-spacing:-.04em; }
#warnEvent { display:block; font-size:clamp(46px,7.4vw,112px); font-weight:720; line-height:1.02; letter-spacing:-.075em; color:#fffbe8; text-shadow:4px 4px 0 #3a0a14; }
.warn-do { font-size:clamp(26px,3.9vw,58px); font-weight:620; line-height:1.18; letter-spacing:-.06em; max-width:92%; text-shadow:var(--shadow); }
.warn-until { font-size:clamp(26px,3.6vw,54px); font-weight:620; color:#ffe9a8; letter-spacing:-.06em; text-shadow:var(--shadow); }
.warn-hint { margin-top:clamp(4px,1vh,12px); font-size:clamp(17px,2vw,27px); padding:8px 18px; border:2px solid #ffd3b5; background:rgba(40,8,16,.45); }
/* Lost connection: dim the weather and say so in large type. */
.offline { flex:none; display:flex; flex-direction:column; gap:2px; padding:10px clamp(12px,2vw,26px); background:#4a4a5c; border:2px solid #f1e3a6; }
.offline strong { font-size:clamp(22px,3vw,44px); line-height:1.15; letter-spacing:-.06em; color:#fff3b0; }
.offline span { font-size:clamp(17px,2.1vw,30px); line-height:1.25; letter-spacing:-.05em; }
#screen.stalled #stage,#screen.stalled #lower { opacity:.45; filter:grayscale(.7); }
/* Radar at TV size: a color key and scan time that read across the room. */
#screen[data-view="radar"] .legend,#screen[data-view="future"] .legend { font-size:clamp(17px,2vw,26px); gap:6px 20px; }
#screen[data-view="radar"] .legend i,#screen[data-view="future"] .legend i { width:20px; height:17px; }
#screen[data-view="radar"] .map-foot,#screen[data-view="future"] .map-foot { min-height:46px; }
#screen[data-view="radar"] .map-time,#screen[data-view="future"] .map-time { font-size:clamp(17px,2vw,26px); }
#screen.stalled .signal[data-level="unavailable"],#screen.stalled .signal[data-level="checking"] { display:none; }
#screen.stalled .board { overflow:hidden; }
#screen.stalled .measurements div { padding-top:clamp(4px,1vh,12px); padding-bottom:clamp(4px,1vh,12px); }
#screen[data-view="dashboard"] .offline { padding:5px 14px; }
#screen[data-view="dashboard"] .offline strong { font-size:clamp(18px,2.2vw,30px); }
#screen[data-view="dashboard"] .offline span { display:none; }

/* Cameras: a refreshing photo or a live YouTube stream, whole picture shown, source credited. */
.cam { padding:0; background:#0d1320; }
.cam-stage { position:relative; flex:1; min-height:0; overflow:hidden; background:#0d1320; cursor:pointer; }
.cam-stage img,.cam-stage .cam-frame { position:absolute; inset:0; width:100%; height:100%; object-fit:contain; background:#0d1320; border:0; }
.cam-stage img[hidden] { display:none; }
.cam-stage .cam-frame { pointer-events:none; }
.cam-plate { left:1.5%; top:2.5%; }
#camRoute { font:bold clamp(13px,1.6vw,22px)/1.15 -apple-system,BlinkMacSystemFont,Arial,sans-serif; }
#camName { margin:0; color:#fff; font:bold clamp(18px,2.4vw,32px)/1.05 -apple-system,BlinkMacSystemFont,Arial,sans-serif; letter-spacing:-.02em; }
.cam .map-time { font-size:clamp(16px,1.9vw,25px); }
.cam .map-time.live { color:#ff6b6b; }
.cam-credit { position:absolute; right:8px; bottom:6px; margin:0; padding:3px 8px; background:rgba(10,14,22,.8); color:#e8eef7;
  font:600 clamp(12px,1.4vw,17px)/1.2 -apple-system,BlinkMacSystemFont,Arial,sans-serif; }
/* Header follows the real sky. Darker lower half keeps the yellow title readable. */
#screen[data-sky="dawn"] .mast-flare { background: linear-gradient(180deg,#ffc3a0 0%,#f19aa6 18%,#b26f9c 42%,#6d4c8c 68%,#3f3478 100%); }
#screen[data-sky="day"] .mast-flare { background: linear-gradient(180deg,#9fd8ff 0%,#5ea9e6 18%,#3a78c2 42%,#2c579f 68%,#25427f 100%); }
#screen[data-sky="cloudy"] .mast-flare { background: linear-gradient(180deg,#c3cad6 0%,#97a2b4 18%,#6c7890 42%,#4e5873 68%,#3a4160 100%); }
#screen[data-sky="storm"] .mast-flare { background: linear-gradient(180deg,#7d8494 0%,#5b6274 22%,#424859 50%,#30354a 78%,#262a3e 100%); }
#screen[data-sky="night"] .mast-flare { background: linear-gradient(180deg,#3c4f96 0%,#2f3f84 22%,#273370 50%,#202a5e 78%,#1c2453 100%); }
#screen.takeover .mast-flare { background: linear-gradient(180deg,#ff8a6a 0%,#d8424a 22%,#9e2333 55%,#6b1a2c 82%,#4a1426 100%); }

/* Regional temps: numbers sit on the plain map; the radar labels layer is left off so names don't double up. */
#tempMarks text { font-family:-apple-system,BlinkMacSystemFont,Arial,sans-serif; }
.temps .map-plate p { font:bold clamp(12px,1.48vw,20px)/1.15 -apple-system,BlinkMacSystemFont,Arial,sans-serif; letter-spacing:.015em; }
.temps .map-plate h2 { margin:0; color:#fff; font:bold clamp(17px,2.05vw,28px)/1.04 -apple-system,BlinkMacSystemFont,Arial,sans-serif; letter-spacing:-.02em; text-shadow:1px 1px #172033; }
