/* Duskline brand layer: weather remains legible first, atmosphere supports it. */
:root {
  --duskline-ink: #eaf3ff;
  --duskline-muted: #9eb2cb;
  --duskline-accent: #7dd3fc;
  --duskline-glow: #a78bfa;
  --duskline-night: #08111f;
  --duskline-panel: rgba(11, 26, 47, .72);
}
body.duskline { background: var(--duskline-night); color: var(--duskline-ink); }
body.duskline.weather-sky-light { background: #eef5fb; color: #15263b; }
body.duskline .gallery-app-bar { background: linear-gradient(180deg, rgba(8,17,31,.98), rgba(8,17,31,.76)); border-bottom-color: rgba(125,211,252,.16); }
body.duskline.weather-sky-light .gallery-app-bar { background: rgba(246,250,255,.88); border-bottom-color: rgba(31,74,109,.15); box-shadow: 0 8px 24px rgba(31,74,109,.08); }
body.duskline .duskline-header { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-inline: clamp(20px, 4vw, 56px); }
body.duskline .duskline-brand { display: inline-flex; align-items: center; gap: 11px; color: var(--duskline-ink); font: 700 clamp(1.15rem, 2vw, 1.45rem)/1 'Public Sans', sans-serif; letter-spacing: .1em; text-decoration: none; text-transform: lowercase; }
body.duskline.weather-sky-light .duskline-brand { color: #15263b; }
body.duskline .duskline-logo { width: 34px; height: 34px; border-radius: 10px; object-fit: cover; box-shadow: 0 0 0 1px rgba(255,255,255,.2), 0 5px 18px rgba(125,211,252,.2); }
body.duskline .duskline-language-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
body.duskline #dusklineLanguage {
  appearance: none;
  -webkit-appearance: none;
  width: clamp(148px, 22vw, 228px);
  min-height: 40px;
  padding: 0 38px 0 14px;
  border: 1px solid rgba(125,211,252,.3);
  border-radius: 12px;
  background-color: rgba(8,17,31,.9);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23eaf3ff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 13px center;
  color: var(--duskline-ink);
  font: 600 16px/1.1 'Public Sans', sans-serif;
  letter-spacing: .01em;
  cursor: pointer;
  color-scheme: dark;
}
body.duskline #dusklineLanguage:hover { border-color: var(--duskline-accent); }
body.duskline #dusklineLanguage:focus-visible { outline: 3px solid rgba(125,211,252,.42); outline-offset: 3px; }
body.duskline.weather-sky-light #dusklineLanguage {
  background-color: rgba(255,255,255,.9);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2315263b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  color: #15263b;
  border-color: rgba(31,74,109,.24);
  color-scheme: light;
}
html[dir="rtl"] body.duskline #dusklineLanguage { padding: 0 14px 0 38px; background-position: left 13px center; }
body.duskline .gallery-app-mark { color: var(--duskline-accent); }
body.duskline .weather-root.tools-page { width: min(1180px, calc(100% - 48px)); max-width: none; margin-inline: auto; }
body.duskline .weather-page { max-width: none; width: 100%; }
body.page-tools .weather-root.tools-page { max-width: min(1160px, 100%); }
body.duskline .weather-start {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  margin: 8px 0 28px;
  padding: clamp(20px, 3vw, 32px);
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 24px;
  background: linear-gradient(120deg, rgba(52, 92, 139, .42), rgba(12, 27, 48, .48));
  box-shadow: 0 16px 48px rgba(4, 15, 32, .16), inset 0 1px rgba(255, 255, 255, .12);
  backdrop-filter: blur(20px);
}
body.duskline .weather-start[hidden] { display: none; }
body.duskline .weather-start-mark { color: #ffe2ab; font-size: 31px; line-height: 1; }
body.duskline .weather-start-copy h3 { margin: 0 0 5px; color: #fff; font: 650 clamp(1.2rem, 2vw, 1.55rem)/1.2 var(--ff-display); }
body.duskline .weather-start-copy p { margin: 0; color: rgba(255,255,255,.82); font-size: 14px; line-height: 1.45; }
body.duskline .weather-start-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
body.duskline .weather-start-actions .weather-btn:first-child { background: rgba(255,255,255,.94); color: #173450; border-color: transparent; }
body.duskline .weather-more {
  display: block;
  margin: 20px auto 2px;
  min-height: 44px;
  padding: 8px 20px;
  border: 1px solid rgba(255,255,255,.3);
  border-radius: 999px;
  background: rgba(13,33,58,.24);
  color: #fff;
  font: 650 14px/1.2 var(--ff-body);
  cursor: pointer;
}
body.duskline .weather-more[hidden] { display: none; }
body.duskline .weather-more:hover { background: rgba(255,255,255,.16); }
body.duskline .weather-more:focus-visible { outline: 3px solid currentColor; outline-offset: 3px; }
body.duskline .weather-btn-icon { min-width: 44px; width: 44px; min-height: 44px; height: 44px; }
body.duskline .weather-btn-pill.weather-location-button {
  box-sizing: border-box;
  min-width: 44px !important; width: 44px !important;
  min-height: 44px !important; height: 44px !important;
  padding: 0 !important;
  aspect-ratio: 1 / 1;
  border-radius: 50% !important;
}
body.duskline .weather-row-save { min-width: 44px; width: 44px; min-height: 44px; height: 44px; }
body.duskline .weather-mod-label { font-size: 12px; opacity: .86; }
body.duskline .weather-mod-sub { opacity: .95; }
body.duskline .weather-detail-insight {
  display: block;
  max-width: min(760px, 100%);
  margin: 12px auto 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: inherit;
  font: 500 14px/1.4 var(--ff-body);
  text-shadow: 0 1px 3px rgba(0,0,0,.4);
}
.weather-toast {
  position: fixed;
  z-index: 11000;
  top: calc(14px + env(safe-area-inset-top));
  left: 50%;
  max-width: min(360px, calc(100vw - 32px));
  padding: 12px 18px;
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 16px;
  background: rgba(18, 31, 49, .96);
  color: #f6faff;
  box-shadow: 0 12px 36px rgba(4,13,27,.28);
  font: 600 13px/1.35 var(--ff-body);
  text-align: center;
  opacity: 0;
  transform: translate(-50%, -10px);
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
}
.weather-toast.is-visible { opacity: 1; transform: translate(-50%, 0); }
.weather-toast[data-kind="error"] { border-color: rgba(255,127,127,.5); }
@media (prefers-reduced-motion: reduce) {
  .weather-toast { transition: none; }
}
@media (max-width: 640px) {
  body.duskline .gallery-app-footer-copy { flex: 0 1 auto; }
}
body.duskline .weather-suggest .s-group {
  padding: 10px 15px 5px;
  color: rgba(255,255,255,.68);
  font: 700 11px/1.2 var(--ff-body);
  letter-spacing: .07em;
  text-transform: uppercase;
}
body.duskline.weather-sky-light .weather-suggest .s-group { color: #31516b; }
body.duskline .weather-chart-wrap:focus-visible { outline: 3px solid currentColor; outline-offset: 4px; border-radius: 12px; }
body.duskline.weather-sky-light .weather-start { background: linear-gradient(120deg, rgba(255,255,255,.7), rgba(220,235,250,.66)); border-color: rgba(25,67,102,.18); box-shadow: 0 16px 48px rgba(31,74,109,.1); }
body.duskline.weather-sky-light .weather-start-copy h3 { color: #16344f; }
body.duskline.weather-sky-light .weather-start-copy p { color: #31516b; }
body.duskline.weather-sky-light .weather-start-mark { color: #9a5d1c; }
body.duskline.weather-sky-light .weather-start-actions .weather-btn:first-child { background: #163f67; color: #fff; }
body.duskline.weather-sky-light .weather-more { color: #16344f; border-color: rgba(25,67,102,.27); background: rgba(255,255,255,.5); }
body.duskline.weather-sky-light .weather-my-sky-empty { background: rgba(255,255,255,.58); border-color: rgba(25,67,102,.2); }
body.duskline.weather-sky-light .weather-my-sky-empty p { color: #244966; }
body.duskline.weather-sky-light .weather-my-sky-empty-mark { color: #9a5d1c; }
@media (min-width: 760px) {
  body.duskline #weatherList, body.duskline #weatherFavoritesList { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: stretch; }
  body.duskline .weather-region-heading { grid-column: 1 / -1; }
}
@media (min-width: 1120px) {
  body.duskline #weatherMajorsBlock:not(.is-preview) #weatherList { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  body.duskline .weather-start { grid-template-columns: auto 1fr; gap: 10px 14px; }
  body.duskline .weather-start-actions { grid-column: 1 / -1; justify-content: stretch; }
  body.duskline .weather-start-actions .weather-btn { flex: 1 1 160px; }
}
body.duskline .weather-shell { background: transparent; border: 0; box-shadow: none; }
body.duskline .weather-mod {
  background: linear-gradient(180deg, rgba(16, 32, 58, 0.42), rgba(10, 20, 38, 0.32)) !important;
  border-color: rgba(255, 255, 255, 0.18) !important;
  backdrop-filter: blur(36px) saturate(155%) !important;
  -webkit-backdrop-filter: blur(36px) saturate(155%) !important;
}
body.duskline .weather-detail.wx-mods-light .weather-mod {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.46), rgba(255, 255, 255, 0.26)) !important;
  border-color: rgba(255, 255, 255, 0.55) !important;
  backdrop-filter: blur(36px) saturate(165%) !important;
  -webkit-backdrop-filter: blur(36px) saturate(165%) !important;
  box-shadow: 0 10px 28px rgba(18, 42, 72, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.72);
}
/* Reapply the low-GPU phone blur after the brand skin's higher-specificity glass rules. */
html[data-mobile-lite="true"] body.duskline .weather-detail .weather-mod {
  backdrop-filter: blur(20px) saturate(145%) !important;
  -webkit-backdrop-filter: blur(20px) saturate(145%) !important;
}
html[data-mobile-lite="true"] body.duskline .weather-detail.wx-mods-light .weather-mod {
  backdrop-filter: blur(20px) saturate(150%) !important;
  -webkit-backdrop-filter: blur(20px) saturate(150%) !important;
}
html.has-fine-pointer body.duskline .weather-mod:hover {
  background: linear-gradient(180deg, rgba(20, 38, 66, 0.52), rgba(12, 24, 44, 0.4)) !important;
  border-color: rgba(255, 255, 255, 0.28) !important;
}
html.has-fine-pointer body.duskline .weather-detail.wx-mods-light .weather-mod:hover {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.56), rgba(255, 255, 255, 0.34)) !important;
  border-color: rgba(255, 255, 255, 0.7) !important;
}
@media (hover: hover) {
  body.duskline .weather-mod:hover {
    background: linear-gradient(180deg, rgba(20, 38, 66, 0.52), rgba(12, 24, 44, 0.4)) !important;
    border-color: rgba(255, 255, 255, 0.28) !important;
  }
  body.duskline .weather-detail.wx-mods-light .weather-mod:hover {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.56), rgba(255, 255, 255, 0.34)) !important;
    border-color: rgba(255, 255, 255, 0.7) !important;
  }
}
html[data-motion-effective="off"] body.duskline .weather-mod {
  background: rgba(14, 26, 44, 0.88) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}
html[data-motion-effective="off"] body.duskline .weather-detail.wx-mods-light .weather-mod {
  background: rgba(232, 238, 246, 0.92) !important;
}
body.duskline .weather-row--loading { background: linear-gradient(135deg, rgba(34,58,86,.82), rgba(17,31,50,.82)); }
body.duskline .weather-row-temp--loading { color: transparent; letter-spacing: 0; }
body.duskline .weather-btn:hover, body.duskline .weather-btn:focus-visible { color: var(--duskline-accent); border-color: var(--duskline-accent); }
body.duskline .weather-search { background: rgba(8,17,31,.72); border-color: rgba(125,211,252,.24); color: var(--duskline-ink); }
body.duskline.weather-sky-light .weather-search { background: rgba(255,255,255,.72); border-color: rgba(31,74,109,.22); color: #15263b; }
body.duskline.weather-sky-light .weather-search-clear { background: rgba(21,38,59,.12); color: #15263b; }
body.duskline.weather-sky-light .weather-suggest {
  background: rgba(255,255,255,.96);
  border-color: rgba(31,74,109,.16);
  box-shadow: 0 16px 40px rgba(31,74,109,.14);
}
body.duskline.weather-sky-light .weather-suggest button { color: #15263b; }
body.duskline.weather-sky-light .weather-suggest .s-meta,
body.duskline.weather-sky-light .weather-suggest .s-empty { color: rgba(21,38,59,.55); }
body.duskline.weather-sky-light .weather-suggest .s-add { color: #16344f; background: rgba(31,74,109,.08); border-color: rgba(31,74,109,.18); }
body.duskline.weather-sky-light .weather-suggest .s-add[aria-pressed="true"] { color: #176b32; }
body.duskline.weather-sky-light .weather-suggest .s-loading { color: #31516b; --wx-content: #31516b; }
body.duskline.weather-sky-light .weather-suggest button.is-active,
body.duskline.weather-sky-light .weather-suggest button:hover,
body.duskline.weather-sky-light .weather-suggest button:focus-visible { background: rgba(31,74,109,.08); }
body.duskline .weather-attribution { color: var(--duskline-muted); }
body.duskline .gallery-app-footer { border-top-color: rgba(125,211,252,.14); }
html[dir="rtl"] body.duskline { text-align: right; }
body.duskline .weather-root, body.duskline .weather-page { isolation: auto; }
body.duskline .weather-page-sky { z-index: 0; }
body.duskline .weather-shell { position: relative; z-index: 3; }
body.duskline .weather-list, body.duskline .weather-row { position: relative; z-index: 3; }
body.duskline .weather-list li { animation: none !important; }
body.duskline .weather-region-heading { margin: 24px 4px 8px; color: rgba(234,243,255,.72); font: 700 .72rem/1.2 'Public Sans', sans-serif; letter-spacing: .14em; text-transform: uppercase; list-style: none; }
body.duskline .weather-detail-back,
body.duskline .weather-detail-bar #weatherDetailBack {
  width: 44px !important;
  min-width: 44px !important;
  height: 44px !important;
  min-height: 44px !important;
  padding: 0 !important;
  border-radius: 50% !important;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
}
body.duskline .weather-detail-bar #weatherDetailBack { flex: 0 0 44px !important; }
body.duskline.weather-sky-light .duskline-header { color: #15263b; }
body.duskline.weather-sky-light .duskline-brand .duskline-logo { box-shadow: 0 0 0 1px rgba(21,38,59,.18), 0 5px 18px rgba(31,74,109,.14); }
body.duskline.weather-sky-light .weather-btn { background: rgba(255,255,255,.68); border-color: rgba(31,74,109,.2); color: #15263b; }
body.duskline.weather-sky-light .weather-search::placeholder { color: rgba(21,38,59,.55); }
body.duskline.weather-sky-light .weather-search-icon { color: rgba(21,38,59,.55); }
body.duskline.weather-sky-light .weather-region-heading,
body.duskline.weather-sky-light .weather-section-label { color: #1a3348 !important; }
body.duskline.weather-sky-light .weather-updated { color: rgba(26, 51, 72, 0.72) !important; }
body.duskline.weather-sky-light .weather-row { color: #fff; }
body.duskline.weather-sky-light .weather-row-meta,
body.duskline.weather-sky-light .weather-row-updated { color: rgba(234,243,255,.72); }
body.duskline.weather-sky-light .weather-detail-loading-panel { color: var(--wx-content, #fff); }
/* Weather rows use atmospheric dark cards in both appearance modes. Keep
   secondary metadata bright enough against those cards, even when the page
   canvas is light. */
body.duskline.weather-sky-light .weather-row-city,
body.duskline.weather-sky-light .weather-row-meta,
body.duskline.weather-sky-light .weather-row-cond,
body.duskline.weather-sky-light .weather-row-insight,
body.duskline.weather-sky-light .weather-row-hl,
body.duskline.weather-sky-light .weather-row-updated { color: rgba(255,255,255,.92) !important; text-shadow: 0 1px 3px rgba(0,0,0,.48); }
body.duskline.weather-sky-light .weather-row-updated { color: rgba(255,255,255,.72) !important; }
/* Text is selected from the actual city/detail sky luminance by sky.js. */
body.duskline .weather-row-city,
body.duskline .weather-row-meta,
body.duskline .weather-row-cond,
body.duskline .weather-row-insight,
body.duskline .weather-row-hl,
body.duskline .weather-row-updated,
body.duskline .weather-row-temp { color: var(--wx-content, #fff) !important; text-shadow: 0 1px 3px var(--wx-content-shadow, rgba(0,0,0,.48)); }
body.duskline .weather-detail-hero,
body.duskline .weather-detail-hero h2,
body.duskline .weather-detail-cond,
body.duskline .weather-detail-hl,
body.duskline .weather-detail-updated,
body.duskline .weather-mod,
body.duskline .weather-mod-label,
body.duskline .weather-mod-value,
body.duskline .weather-mod-sub { color: var(--wx-mod-ink, var(--wx-content, #fff)) !important; text-shadow: var(--wx-mod-shadow, 0 1px 3px var(--wx-content-shadow, rgba(0,0,0,.4))); }
body.duskline .weather-detail-hero .weather-detail-loading,
body.duskline .weather-detail-loading-panel { color: var(--wx-content-muted, rgba(255,255,255,.72)) !important; }
body.duskline .weather-hourly,
body.duskline .weather-hourly-item,
body.duskline .weather-hourly-item .t,
body.duskline .weather-hourly-item .p,
body.duskline .weather-daily,
body.duskline .weather-daily-row,
body.duskline .weather-daily-day,
body.duskline .weather-daily-hi,
body.duskline .weather-daily-lo,
body.duskline .wx-sun-mod-hero,
body.duskline .wx-sun-mod-hero-label,
body.duskline .wx-sun-mod-hero-time,
body.duskline .wx-sun-mod-secondary,
body.duskline .wx-sun-tile-remain,
body.duskline .wx-sun-tile-stat,
body.duskline .wx-sun-tile-stat span,
body.duskline .wx-sun-tile-stat strong { color: var(--wx-mod-ink, var(--wx-content, #fff)) !important; text-shadow: var(--wx-mod-shadow, 0 1px 3px var(--wx-content-shadow, rgba(0,0,0,.4))); }
/* Hero and list rows sit on the sky gradient — always light type. */
body.duskline .weather-row-city,
body.duskline .weather-row-meta,
body.duskline .weather-row-cond,
body.duskline .weather-row-hl,
body.duskline .weather-row-updated,
body.duskline .weather-row-temp,
body.duskline .weather-detail-hero,
body.duskline .weather-detail-hero h2,
body.duskline .weather-detail-temp,
body.duskline .weather-detail-cond,
body.duskline .weather-detail-hl,
body.duskline .weather-detail-updated { color: #fff !important; text-shadow: 0 1px 3px rgba(0,0,0,.52) !important; }
/* Module type follows the city's tile (dark ink on day frost, light on night glass). */
body.duskline .weather-mod,
body.duskline .weather-mod-label,
body.duskline .weather-mod-value,
body.duskline .weather-mod-sub,
body.duskline .weather-hourly,
body.duskline .weather-hourly-item,
body.duskline .weather-daily,
body.duskline .weather-daily-row,
body.duskline .weather-daily-day,
body.duskline .weather-daily-hi,
body.duskline .weather-daily-lo,
body.duskline .wx-sun-mod-hero,
body.duskline .wx-sun-mod-hero-label,
body.duskline .wx-sun-mod-hero-time,
body.duskline .wx-sun-mod-secondary,
body.duskline .wx-sun-tile-remain,
body.duskline .wx-sun-tile-stat,
body.duskline .wx-sun-tile-stat strong { color: var(--wx-mod-ink, #fff) !important; text-shadow: var(--wx-mod-shadow, 0 1px 3px rgba(0,0,0,.52)) !important; }
body.duskline .weather-mod-label,
body.duskline .weather-mod-sub,
body.duskline .wx-sun-mod-hero-label,
body.duskline .wx-sun-mod-secondary,
body.duskline .wx-sun-tile-remain,
body.duskline .wx-sun-tile-stat span { color: var(--wx-mod-muted, var(--wx-mod-ink, #fff)) !important; }
body.duskline .weather-detail-hero .weather-detail-loading,
body.duskline .weather-detail-loading-panel { color: rgba(255,255,255,.78) !important; }
body.duskline .weather-region-heading:first-child { margin-top: 4px; }
body.duskline #weatherError[hidden], body.duskline #weatherSuggest[hidden] { display: none !important; }
body.duskline .gallery-app-footer { background: var(--duskline-night); }
/* Keep the established footer geometry. Duskline only supplies readable
   theme-aware ink; the footer remains part of the page flow. */
body.page-tools.duskline:has(.weather-root) .gallery-app-footer { background-color: transparent !important; }
body.page-tools.duskline:has(.weather-root) .gallery-app-footer .gallery-app-footer-copy,
body.page-tools.duskline:has(.weather-root) .gallery-app-footer .footer-legal-links a { color: rgba(234,243,255,.72) !important; }
body.duskline.weather-sky-light .gallery-app-footer .gallery-app-footer-copy,
body.duskline.weather-sky-light .gallery-app-footer .footer-legal-links a { color: rgba(21,38,59,.66) !important; }
/* Weather list canvas is atmospheric even in OS light — keep footer ink light. */
body.page-tools.duskline.weather-sky-light:has(.weather-root) .gallery-app-footer {
  background-color: transparent !important;
  color: rgba(234,243,255,.78) !important;
  border-top-color: rgba(234,243,255,.16) !important;
}
body.page-tools.duskline.weather-sky-light:has(.weather-root) .gallery-app-footer .gallery-app-footer-copy,
body.page-tools.duskline.weather-sky-light:has(.weather-root) .gallery-app-footer .footer-legal-links a { color: rgba(234,243,255,.72) !important; }
body.page-tools.duskline.weather-sky-light:has(.weather-root) .gallery-app-footer .footer-legal-links { border-top-color: rgba(234,243,255,.16) !important; }
body.duskline #weatherRefresh,
body.duskline #weatherDetailRefresh { appearance: none; -webkit-appearance: none; flex: 0 0 40px !important; width: 40px !important; min-width: 40px !important; height: 40px !important; min-height: 40px !important; padding: 0 !important; border-radius: 50% !important; }
body.duskline #weatherRefresh svg,
body.duskline #weatherDetailRefresh svg { width: 17px; height: 17px; stroke-width: 1.8; }
body.page-tools.duskline.weather-sky-light:has(.weather-root) .gallery-app-footer { color: rgba(234,243,255,.78) !important; background-color: transparent !important; }
body.page-tools.duskline.weather-sky-light:has(.weather-root) .gallery-app-footer-copy,
body.page-tools.duskline.weather-sky-light:has(.weather-root) .footer-legal-links a { color: rgba(234,243,255,.72) !important; }
body.page-tools.duskline.wx-page-canvas-light:has(.weather-root) .gallery-app-footer {
  color: #1a3348 !important;
  border-top-color: rgba(26, 51, 72, 0.18) !important;
}
body.page-tools.duskline.wx-page-canvas-light:has(.weather-root) .gallery-app-footer-copy,
body.page-tools.duskline.wx-page-canvas-light:has(.weather-root) .footer-legal-links a,
body.page-tools.duskline.wx-page-canvas-light:has(.weather-root) .gallery-app-footer .gallery-app-footer-copy,
body.page-tools.duskline.wx-page-canvas-light:has(.weather-root) .gallery-app-footer .footer-legal-links a {
  color: #1a3348 !important;
}
body.duskline.wx-page-canvas-light .weather-attribution {
  color: rgba(26, 51, 72, 0.7) !important;
}
body.duskline .weather-detail-attrib { color: #fff !important; text-shadow: 0 1px 3px rgba(0,0,0,.52) !important; }
body.duskline .weather-daily-pop { color: var(--wx-mod-ink, #fff) !important; text-shadow: var(--wx-mod-shadow, 0 1px 3px rgba(0,0,0,.52)) !important; }
body.duskline .legal-page { max-width: 760px; margin: 0 auto; padding: 116px 24px 80px; color: var(--duskline-ink); }
body.duskline .legal-back { margin: 0 0 48px; }
body.duskline .legal-eyebrow { margin: 0 0 14px; color: var(--duskline-accent); font: 700 .72rem/1 'Public Sans', sans-serif; letter-spacing: .16em; }
body.duskline .legal-intro { max-width: 600px; color: var(--duskline-ink); font-size: 1.15rem; line-height: 1.6; }
body.duskline .legal-updated { color: var(--duskline-muted); font-size: .85rem; }
body.duskline .legal-page h1 { margin: 0 0 28px; font: 700 clamp(2rem, 5vw, 3.5rem)/1.05 'Public Sans', sans-serif; letter-spacing: -.04em; }
body.duskline .legal-page h2 { margin: 34px 0 10px; font: 700 1.15rem/1.3 'Public Sans', sans-serif; }
body.duskline .legal-page p { color: var(--duskline-muted); line-height: 1.75; }
body.duskline .legal-page a { color: var(--duskline-accent); }
body.duskline .legal-topbar { position: fixed; inset: 0 0 auto; z-index: 10; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px clamp(20px, 4vw, 56px); background: rgba(8,17,31,.88); border-bottom: 1px solid rgba(125,211,252,.14); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); }
body.duskline .legal-brand { display: inline-flex; align-items: center; gap: 10px; color: var(--duskline-ink); font: 700 1.05rem/1 'Public Sans', sans-serif; letter-spacing: .12em; text-decoration: none; text-transform: lowercase; }
body.duskline .legal-brand img { width: 30px; height: 30px; border-radius: 9px; object-fit: cover; }
body.duskline .legal-topbar .nav-actions { display: flex; align-items: center; flex-shrink: 0; }
body.duskline .legal-site-footer {
  border-top: 1px solid rgba(125,211,252,.14);
  background: transparent;
  padding: 28px clamp(20px, 4vw, 56px) 40px;
}
body.duskline .legal-footer-home { color: var(--duskline-ink); }
body.duskline .legal-footer-nav a { color: var(--duskline-muted); text-transform: none; letter-spacing: -0.01em; }
body.duskline .legal-footer-nav a:hover,
body.duskline .legal-footer-nav a[aria-current="page"] { color: var(--duskline-accent); }
body.duskline.weather-detail-open .weather-detail-loading-panel,
body.duskline .weather-detail-loading-panel { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; min-height: 180px; color: var(--duskline-ink); }
body.duskline .weather-detail-loading { margin-top: 12px; color: var(--duskline-muted); font-size: 1rem; }
body.duskline.weather-sky-light .legal-topbar { background: rgba(246,250,255,.9); border-bottom-color: rgba(31,74,109,.15); }
body.duskline.weather-sky-light .legal-brand { color: #15263b; }
html[data-theme="minimal"] body.duskline:not(.weather-sky-light) .legal-topbar { background: rgba(246,250,255,.9); border-bottom-color: rgba(31,74,109,.15); }
html[data-theme="minimal"] body.duskline:not(.weather-sky-light) .legal-brand { color: #15263b; }
html[data-theme="minimal"] body.page-legal.duskline .legal-site-footer { border-top-color: rgba(31,74,109,.15); }
html[data-theme="minimal"] body.page-legal.duskline .legal-footer-home { color: #10243e; }
html[data-theme="minimal"] body.page-legal.duskline .legal-footer-nav a { color: #3d5570; }
html[data-theme="minimal"] body.page-legal.duskline .legal-footer-nav a:hover,
html[data-theme="minimal"] body.page-legal.duskline .legal-footer-nav a[aria-current="page"] { color: #0b6bcb; }
/* Legal reading surface follows OS light appearance (header + body together). */
html[data-theme="minimal"] body.page-legal.duskline {
  background: #eef5fb;
  color: #15263b;
}
html[data-theme="minimal"] body.page-legal.duskline .legal-page,
html[data-theme="minimal"] body.page-legal.duskline .legal-page h1,
html[data-theme="minimal"] body.page-legal.duskline .legal-page h2,
html[data-theme="minimal"] body.page-legal.duskline .legal-intro {
  color: #10243e;
}
html[data-theme="minimal"] body.page-legal.duskline .legal-page p,
html[data-theme="minimal"] body.page-legal.duskline .legal-updated {
  color: #3d5570;
}
html[data-theme="minimal"] body.page-legal.duskline .legal-eyebrow { color: #1b6a9a; }
html[data-theme="minimal"] body.page-legal.duskline .legal-page a { color: #0b6bcb; }
html[data-theme="minimal"] body.page-legal.duskline .legal-topbar {
  background: rgba(246,250,255,.92);
  border-bottom-color: rgba(31,74,109,.15);
}
html[data-theme="minimal"] body.duskline:not(.weather-sky-light) .gallery-app-bar { background: rgba(246,250,255,.9); border-bottom-color: rgba(31,74,109,.15); box-shadow: 0 8px 24px rgba(31,74,109,.08); }
html[data-theme="minimal"] body.duskline:not(.weather-sky-light) .duskline-brand { color: #15263b; }
html[data-theme="minimal"] body.duskline:not(.weather-sky-light) #dusklineLanguage { background: rgba(255,255,255,.86); color: #15263b; border-color: rgba(31,74,109,.2); }
html[data-theme="minimal"] body.duskline:not(.weather-sky-light) .weather-search { background: rgba(255,255,255,.72); border-color: rgba(31,74,109,.22); color: #15263b; }
html[dir="rtl"] body.duskline .weather-detail-back svg { transform: scaleX(-1); }
/* Keep the compact language control consistent even when the shared theme
   layer applies a background shorthand later in the cascade. */
html[data-theme="minimal"] body.duskline #dusklineLanguage {
  appearance: none;
  -webkit-appearance: none;
  min-height: 40px;
  border-radius: 12px;
  padding-inline: 14px 38px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2315263b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 13px center;
  color-scheme: light;
}
html[dir="rtl"] body.duskline #dusklineLanguage { padding-inline: 38px 14px; background-position: left 13px center; }
@media (max-width: 640px) { body.duskline .duskline-header { padding-inline: 16px; } body.duskline .weather-root.tools-page { width: min(100% - 24px, 1180px); } }

/* Budget the narrow header explicitly; the wordmark must never flex-shrink
   underneath the language picker. Keep both controls and the full brand. */
body.duskline .duskline-brand { flex-shrink: 0; }
body.duskline .duskline-header .nav-actions { min-width: 0; }
@media (max-width: 400px) {
  body.duskline .duskline-header { gap: 12px; padding-inline: max(16px, env(safe-area-inset-left)) max(16px, env(safe-area-inset-right)); }
  body.duskline #dusklineLanguage { width: clamp(112px, 38vw, 148px); max-width: 100%; }
}
