/* The clock face is one unbroken line; seconds sit on its baseline at a quieter scale. */
#stage:has(#wall-clock:not([hidden])) { padding: 0; }
.wall-face {
  position: relative; isolation: isolate; overflow: hidden; display: grid; place-items: center;
  width: 100%; height: 100%; container-type: size; background: #000; color: #f4f5ed; outline: none;
}
.wall-face[data-backdrop=graphite] {
  background: radial-gradient(ellipse at 52% 26%, #42474a 0%, #25282b 48%, #101215 100%);
}
.wall-face:is([data-backdrop=daylight],[data-backdrop=weather]) {
  --atmosphere: linear-gradient(180deg, #3c615928, #323c4a2b 45%, #0918208c);
  background: #25333d;
}
.wall-face:is([data-backdrop=daylight],[data-backdrop=weather])::before,
.wall-face:is([data-backdrop=daylight],[data-backdrop=weather])::after {
  content: ''; position: absolute; z-index: -1; inset: 0; pointer-events: none;
}
.wall-face:is([data-backdrop=daylight],[data-backdrop=weather])::before {
  background: center 59% / cover no-repeat url('./scenes/horizon.jpg');
  filter: var(--scene-filter, saturate(.78) brightness(.78));
}
.wall-face:is([data-backdrop=daylight],[data-backdrop=weather])::after {
  background: var(--weather-wash, linear-gradient(transparent,transparent)), var(--atmosphere);
}
.wall-face[data-light=dawn] { --scene-filter: sepia(.26) saturate(.9) brightness(.77); }
.wall-face:is([data-backdrop=daylight],[data-backdrop=weather])[data-light=dawn] { --atmosphere: linear-gradient(165deg,#7e525a54,#f1b68a40 55%,#382a458a); }
.wall-face[data-light=dusk] { --scene-filter: sepia(.35) saturate(.95) brightness(.64); }
.wall-face:is([data-backdrop=daylight],[data-backdrop=weather])[data-light=dusk] { --atmosphere: linear-gradient(160deg,#59518572,#c767584d 52%,#1b2036a6); }
.wall-face[data-light=night] { --scene-filter: grayscale(.35) saturate(.6) brightness(.38); }
.wall-face:is([data-backdrop=daylight],[data-backdrop=weather])[data-light=night] { --atmosphere: linear-gradient(165deg,#08173598,#102e493d 56%,#060c1eab); }
.wall-face[data-backdrop=weather][data-condition=cloud] { --weather-wash: linear-gradient(160deg,#5c697b92,#98a3b43d); }
.wall-face[data-backdrop=weather][data-condition=rain] { --weather-wash: linear-gradient(155deg,#193040b8,#59758182); }
.wall-face[data-backdrop=weather][data-condition=snow] { --weather-wash: linear-gradient(175deg,#9eaeb9aa,#d4dfe288); }
.wall-face[data-backdrop=weather][data-condition=storm] { --weather-wash: linear-gradient(155deg,#252436db,#403c518f); }
.wall-face[data-backdrop=weather][data-condition=fog] { --weather-wash: linear-gradient(170deg,#a7b0b79c,#bec7cc98 60%,#6b798b66); }
.wall-digits {
  display: inline-flex; align-items: baseline; justify-content: center; white-space: nowrap;
  font: 600 min(34cqw,68cqh)/.95 var(--clock-font); letter-spacing: -.067em;
  font-variant-numeric: tabular-nums lining-nums;
}
.wall-digits:has(.wall-seconds:not([hidden])) { font-size: min(28cqw,68cqh); }
.wall-seconds { margin-inline-start: .24em; font-size: .37em; letter-spacing: -.04em; opacity: .8; }
.wall-face:not([data-backdrop=black]) .wall-digits { text-shadow: 0 .014em .14em #10131688; }
html:not([data-palette=original]) .wall-face { color: var(--camera-ink); }
#toggle-clock[aria-pressed=true] { color: var(--mint); background: #25342a; }
.settings-preview:has(#preview-wall:not([hidden])) { overflow: hidden; }
#preview-wall { width: min(49%,170px); height: 48px; border-radius: 5px; }
.face-mode, #wall-options { padding-bottom: 14px !important; }
.backdrop-options { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); }
.backdrop-options label { gap: 6px; padding: 8px 3px; font-size: 11px; }
.backdrop-options i { width: 22px; height: 13px; border-radius: 3px; border: 1px solid #ffffff40; }
.swatch-black { background: #000; }.swatch-graphite { background: linear-gradient(145deg,#555b60,#1a1d20); }
.swatch-daylight { background: linear-gradient(#879daa 44%,#b49175 55%,#495d5d); }
.swatch-weather { background: linear-gradient(#70808e 35%,#a7aeb4 56%,#36434d); }
#weather-options { padding-top: 12px; font-size: 13px; }
#weather-place { margin: 3px 0 8px; }
.place-search { display: flex; gap: 6px; }
.place-search input { min-width: 0; flex: 1; color: var(--text); background: #1c211d; border: 1px solid #465148; padding: 6px 8px; border-radius: 5px; }
#weather-options button { background: #232c26; color: var(--text); border: 1px solid #425046; border-radius: 5px; padding: 5px 8px; }
#locate-place { margin-top: 7px; }
#weather-feedback, #place-results { margin: 6px 0 0; }
#place-results { padding: 0; list-style: none; display: grid; gap: 4px; }
#weather-feedback:empty, #place-results:empty { display: none; }
#place-results button { width: 100%; text-align: start; }

.weather-credit, #forecast-status { margin: 8px 0 0; color: var(--muted); font-size: 11px; line-height: 1.4; }
.weather-credit a, #active-weather-credit { color: inherit; text-underline-offset: 2px; }
#active-weather-credit { bottom: max(14px, env(safe-area-inset-bottom)); right: max(16px, env(safe-area-inset-right)); border-radius: 4px; padding: 4px 7px; font-size: 11px; background: #101211c9; }
html[data-controls=visible] #active-weather-credit { pointer-events: auto; }
#forecast-status:empty { display: none; }
