/* Consistent optical and hit areas for the two themes and the settings navigation. */
.ui-icon { display:inline-block; position:relative; flex:0 0 auto; width:18px; height:18px; box-sizing:border-box; color:inherit; }
.theme-switch button { display:grid; place-items:center; flex:0 0 34px; width:34px; height:34px; padding:0; border-radius:50%; }
.theme-switch .ui-icon { width:18px; height:18px; }
.icon-sun { border-radius:50%; background:repeating-conic-gradient(from -5deg,currentColor 0 10deg,transparent 10deg 45deg); mask:radial-gradient(circle,transparent 0 52%,#000 54%); }
.theme-switch [data-theme-choice=light] { position:relative; }
.theme-switch [data-theme-choice=light]::after { content:""; position:absolute; inset:0; margin:auto; width:9px; height:9px; border-radius:50%; background:currentColor; pointer-events:none; }
.icon-moon { border-radius:50%; background:currentColor; mask:radial-gradient(circle at 74% 24%,transparent 0 48%,#000 51%); }
.settings-layout { grid-template-columns:minmax(144px,22%) minmax(0,1fr); }
.settings-nav button span { min-width:0; overflow-wrap:anywhere; }
.settings-nav { padding-inline:0 12px; border-right:0; border-inline-end:1px solid var(--edge); }
.settings-nav button { text-align:start; gap:9px; }
.settings-nav .ui-icon { width:18px; height:18px; }
.icon-settings { background:currentColor; clip-path:polygon(39% 2%,60% 2%,63% 13%,71% 16%,81% 10%,94% 24%,89% 35%,92% 42%,100% 45%,100% 58%,89% 64%,87% 71%,92% 81%,78% 93%,69% 87%,61% 90%,56% 99%,42% 99%,37% 88%,29% 85%,19% 91%,7% 78%,12% 67%,9% 59%,0 55%,0 41%,12% 37%,14% 28%,9% 19%,22% 7%,33% 13%,39% 10%); mask:radial-gradient(circle,transparent 0 31%,black 33%); }
.icon-location { border:1.6px solid currentColor; border-radius:50%; }
.icon-location::before { content:""; position:absolute; inset:0; margin:auto; width:6px; height:6px; border-radius:50%; background:currentColor; }
.icon-appearance,.icon-info { border:1.6px solid currentColor; border-radius:50%; }
.icon-appearance { background:linear-gradient(90deg,currentColor 50%,transparent 50%); }
.icon-info::before,.icon-info::after { content:""; position:absolute; left:50%; transform:translateX(-50%); background:currentColor; border-radius:2px; }
.icon-info::before { width:2px; height:6px; top:7px; }
.icon-info::after { width:2.5px; height:2.5px; top:3px; }
.settings-content { padding-inline:20px 14px; scrollbar-gutter:stable; }
.settings-dialog { container:settings-window / inline-size; }
.device-reset,.device-zone { margin-block:12px 2px; }
#appearance-settings .setting-row { margin-bottom:12px; padding-bottom:12px; border-bottom:1px solid var(--edge); }
.clock-side { align-items:center; justify-content:center; gap:2px; }
.time-line { direction:ltr; justify-content:flex-start; }
#meridiem { font:600 clamp(.77rem,1.05vw,.93rem)/1.18 var(--sans); letter-spacing:.025em; }
#seconds { font-variant-numeric:tabular-nums; }
.location-tabs { flex-wrap:wrap; }
.sort-row { padding-block:8px; font-size:.86rem; color:var(--muted); }
.sort-row select { width:auto; max-width:68%; }
#letter-index { display:flex; flex-wrap:wrap; gap:3px; padding-block:6px; }
#letter-index button { min-width:24px; min-height:25px; padding:1px 4px; color:var(--ink); background:var(--wash); border:1px solid var(--edge); border-radius:5px; font-size:.8rem; }
.cities-list .choice-row { display:flex; align-items:stretch; border-top:1px solid var(--edge); }
.cities-list .choice-row button { min-width:0; border:0; text-align:start; }
.cities-list .choice-row .place-option { flex:1 1 auto; }
.cities-list .choice-row .pin-place { display:grid; place-items:center; align-self:center; flex:0 0 32px; width:32px; min-height:34px; border-radius:7px; padding:1px; color:var(--muted); font:1.35rem/1 system-ui,sans-serif; }
.cities-list .pin-place[aria-pressed=true] { color:var(--accent); }
.cities-list .letter-heading { font:600 .85rem/1.3 var(--sans); color:var(--accent); margin:12px 0 4px; padding-inline:5px; }
.cities-list .choice-copy small:empty { display:none; }
.window-edge { position:absolute; z-index:3; touch-action:none; user-select:none; }
.edge-n,.edge-s { left:10px; right:10px; height:6px; }
.edge-n { top:0; cursor:n-resize; }.edge-s { bottom:0; cursor:s-resize; }
.edge-w,.edge-e { top:10px; bottom:10px; width:6px; }
.edge-w { left:0; cursor:w-resize; }.edge-e { right:0; cursor:e-resize; }
.edge-nw,.edge-ne,.edge-se,.edge-sw { width:14px; height:14px; }
.edge-nw { top:0; left:0; cursor:nw-resize; }.edge-ne { top:0; right:0; cursor:ne-resize; }
.edge-se { right:1px; bottom:1px; cursor:se-resize; }.edge-sw { left:0; bottom:0; cursor:sw-resize; }
@media (any-pointer:fine) { .edge-se::after { content:""; position:absolute; right:2px; bottom:2px; width:9px; height:9px; background:repeating-linear-gradient(135deg,transparent 0 2px,var(--muted) 2px 3px,transparent 3px 4px); clip-path:polygon(100% 0,100% 100%,0 100%); opacity:.65; } }
dialog .dialog-head { cursor:move; user-select:none; touch-action:none; }
.dialog-head h2 { min-width:0; flex:1; }
dialog[data-positioned] { position:fixed; inset:auto; margin:0; max-width:calc(100vw - 12px); max-height:calc(100dvh - 12px); }
.restore-window { display:none; width:30px; height:30px; padding:0; border:0; background:transparent; color:var(--muted); border-radius:6px; cursor:pointer; }
dialog[data-positioned] .restore-window { display:grid; place-items:center; }
.restore-window::after { content:""; width:12px; height:9px; border:1.4px solid currentColor; box-shadow:2px -2px 0 -1px var(--surface),2px -2px 0 0 currentColor; }
.restore-window:hover { background:var(--wash); }
html[dir=rtl] .clock-copy,html[dir=rtl] .clock-footer { direction:ltr; text-align:left; }
html[dir=rtl] .clock-label,html[dir=rtl] .clock-date,html[dir=rtl] .postal-line { width:fit-content; direction:rtl; }
html[dir=rtl] .source,html[dir=rtl] .weather-facts { text-align:start; }
@container settings-window (max-width:540px) {
  .settings-layout { grid-template-columns:70px minmax(0,1fr); }
  .settings-nav { padding:10px 0; padding-inline-end:5px; }
  .settings-nav button { display:grid; justify-items:center; align-content:center; text-align:center; padding:7px 2px; gap:3px; font-size:.83rem; }
  .settings-content { padding-inline:10px 8px; }
  .location-tabs button { flex:1 1 40%; min-width:0; white-space:normal; }
  .setting-row select { max-width:100%; }
}
@container settings-window (max-width:400px) {
  .setting-row:not(.check-row) { display:grid; grid-template-columns:minmax(0,1fr); gap:5px; padding-block:8px; }
  .setting-row select { width:100%; }
  .check-row small { overflow-wrap:anywhere; }
  .choice-copy { gap:1px; }
  .cities-list button { gap:6px; }
}
