/* Decorative weather layers; search and city controls always remain above them. */
.wxbg > .wx-sky{position:absolute;inset:0;z-index:0;pointer-events:none;opacity:0;color:#f6fbff}
.wx-sky svg{position:absolute;overflow:visible;width:220px;height:160px;filter:drop-shadow(0 10px 16px #263b5714)}
.wx-sky .sky-cloud-left{left:3%;top:24px;width:190px;opacity:.8}
.wx-sky .sky-cloud-right{right:calc(16% - 122px);top:68px;width:230px}
.wx-sky .sky-rain,.wx-sky .sky-snow,.wx-sky .sky-bolt,.wx-sky .sky-wind{display:none}
.wxbg:is(.wx-cloud,.wx-rain,.wx-storm,.wx-snow,.wx-fog,.wx-partly,.wx-windy) > .wx-sky{opacity:1}
.wxbg:is(.wx-clear,.wx-partly)::before{display:block}
.wxbg.wx-partly::before{width:clamp(76px,8vw,116px);aspect-ratio:1;left:84%;top:38px;transform:translateX(-50%);border-radius:50%;background:radial-gradient(circle at 36% 32%,#fffde6,#ffdc64 72%,#ffcc45);box-shadow:0 0 44px 18px #ffd56855}
.wxbg.wx-partly > .wx-sky{color:#f6fbff}
.wxbg.wx-cloud:not(.wx-partly) > .wx-sky{color:#e8eff7}
.wxbg:is(.wx-rain,.wx-storm) > .wx-sky{color:#657e9e}
.wxbg.wx-storm > .wx-sky{color:#405574}
.wxbg:is(.wx-rain,.wx-storm) .sky-rain{display:block;stroke:#d8edff;stroke-width:4;stroke-linecap:round;fill:none}
.wxbg.wx-storm .sky-bolt{display:block;fill:#ffe7a1}
.wxbg.wx-snow > .wx-sky{color:#f5faff}
.wxbg.wx-snow .sky-snow{display:block;fill:none;stroke:#fff;stroke-width:2;stroke-linecap:round}
.wxbg.wx-fog .sky-cloud-left,.wxbg.wx-fog .sky-cloud-right{opacity:.15}
.wxbg.wx-fog .wx-sky::after{content:"";position:absolute;inset:8% -10%;background:radial-gradient(ellipse at 15% 20%,#ffffffa6,transparent 56%),radial-gradient(ellipse at 80% 68%,#ffffff80,transparent 58%);filter:blur(12px)}
.wxbg.wx-windy .sky-wind{display:block;width:180px;height:100px;left:5%;top:38px;fill:none;stroke:#f8fcff;stroke-width:4;stroke-linecap:round;opacity:.85}
.wxbg.wx-windy:not(.wx-partly) .sky-cloud-left,.wxbg.wx-windy:not(.wx-partly) .sky-cloud-right{display:none}
.wxbg.wx-night > .wx-sky{color:#7386a5}
.wxbg:is(.wx-clear,.wx-partly).wx-night::before{display:block;width:clamp(66px,7vw,98px);background:radial-gradient(circle at 35% 65%,#fffef0,#e5edff);box-shadow:none;mask-image:radial-gradient(circle at 72% 25%,transparent 0 38%,#000 39%);-webkit-mask-image:radial-gradient(circle at 72% 25%,transparent 0 38%,#000 39%)}
.wxbg.wx-night.wx-fog > .wx-sky{opacity:.4}
.weather-advice{max-width:720px;margin:9px auto 0;text-align:center;font-size:12px;line-height:1.65;color:#3b526e}
.weather-advice[hidden]{display:none}
.wxbg:is(.wx-night,.wx-rain,.wx-storm) .weather-advice,.wxbg:is(.wx-rain,.wx-storm) .weather-city-summary{color:#f0f5ff}
.bookmark-btn{display:inline-flex;align-items:center;gap:5px;flex:0 0 auto;white-space:nowrap;border:1px solid #dce2e9;border-radius:8px;background:#fff;color:#334155;padding:6px 10px;font:inherit;font-size:13px;cursor:pointer}
.bookmark-btn svg{width:15px;height:15px;fill:none;stroke:currentColor;stroke-width:1.8}
.bookmark-btn:hover{background:#fff9e7;border-color:#dcc47a;color:#70571c}
.bookmark-btn:focus-visible{outline:2px solid #2563eb;outline-offset:3px}
#bookmarkInstructions{font-size:15px;line-height:1.9;color:#334155;white-space:pre-line}
@media(max-width:1100px){.topbar{flex-wrap:wrap;gap:8px}.topnav{order:3;width:100%;justify-content:center}.topbar .brand{margin-right:auto}}
@media(max-width:720px){.bookmark-btn{order:2;margin-left:4px;font-size:12px;padding:6px 8px}.topnav{justify-content:flex-start}.pwa-btn{margin-left:0}.region-sel{margin-left:0}}
@media(max-width:600px){
 .wx-sky .sky-cloud-left{width:108px;left:-24px;top:90px;opacity:.6}
 .wx-sky .sky-cloud-right{width:132px;right:-18px;top:42px}
 .wxbg.wx-partly::before{width:58px;left:auto;right:18px;top:14px;transform:none}
 .wxbg:is(.wx-clear,.wx-partly).wx-night::before{width:58px}
 .wxbg.wx-windy .sky-wind{width:100px;left:0;top:14px}
 .weather-advice{max-width:95%;font-size:12px}
}

/* Night hero polish: preserve the weather mood without letting decoration or
   the app's warm dark theme reduce contrast around the primary search task. */
.wxbg.wx-night .hero-title h1,
html[data-theme="dark"] .wxbg.wx-night .hero-title h1{
  color:#f8fbff;
  text-shadow:0 2px 18px rgba(3,10,25,.38);
}
.wxbg.wx-night .hero-title p,
html[data-theme="dark"] .wxbg.wx-night .hero-title p{
  color:#dce8fa;
  text-shadow:0 1px 10px rgba(3,10,25,.32);
}
.wxbg.wx-night:is(.wx-cloud,.wx-rain,.wx-storm,.wx-snow,.wx-fog,.wx-partly,.wx-windy) > .wx-sky{
  color:#8298b5;
  opacity:.46;
}
.wxbg.wx-night .searchbox,
html[data-theme="dark"] .wxbg.wx-night .searchbox{
  background:rgba(7,18,38,.68);
  border-color:rgba(226,238,255,.52);
  box-shadow:0 14px 34px rgba(2,8,23,.3),inset 0 1px 0 rgba(255,255,255,.09);
  backdrop-filter:blur(10px);
  -webkit-backdrop-filter:blur(10px);
}
.wxbg.wx-night .searchbox:focus-within{
  border-color:#f5c518;
  box-shadow:0 14px 34px rgba(2,8,23,.3),0 0 0 3px rgba(245,197,24,.22);
}
.wxbg.wx-night .searchbox input,
html[data-theme="dark"] .wxbg.wx-night .searchbox input{
  background:transparent;
  color:#fff;
}
.wxbg.wx-night .searchbox input::placeholder{color:#b7c6da;opacity:1}
.wxbg.wx-night .searchbox button{
  background:#f5c518;
  color:#1b2436;
  font-weight:700;
}
.wxbg.wx-night .searchbox button:hover{background:#ffd83d}
.wxbg.wx-night .chips span,
html[data-theme="dark"] .wxbg.wx-night .chips span{
  background:rgba(8,22,45,.54);
  border-color:rgba(220,235,255,.3);
  color:#eef4ff;
  box-shadow:0 5px 16px rgba(2,8,23,.16);
  backdrop-filter:blur(8px);
  -webkit-backdrop-filter:blur(8px);
}
.wxbg.wx-night .chips span:hover{
  background:rgba(21,42,73,.74);
  border-color:rgba(255,255,255,.58);
  color:#fff;
}
.wxbg.wx-night .weather-cities .weather-city-summary{color:#d7e5f8}
.wxbg.wx-night .weather-cities .weather-city-summary[aria-pressed="true"]{
  background:rgba(255,255,255,.15);
  border-bottom-color:transparent;
  border-radius:999px;
  color:#fff;
}
.wxbg.wx-night #weatherManage,
.wxbg.wx-night #weatherDetail{
  background:rgba(255,255,255,.13);
  border-color:rgba(255,255,255,.3);
  color:#fff;
  backdrop-filter:blur(8px);
  -webkit-backdrop-filter:blur(8px);
}
.wxbg.wx-night .weather-advice{color:#dbe8fa}
@media(max-width:600px){
  .wxbg.wx-night .hero-wrap{padding-top:32px}
  .wxbg.wx-night .hero-title{margin-bottom:28px}
  .wxbg.wx-night .hero-title h1{letter-spacing:1px}
  .wxbg.wx-night .hero-title p{line-height:1.7;padding-inline:4px}
  .wxbg.wx-night > .wx-sky .sky-cloud-left{display:none}
  .wxbg.wx-night > .wx-sky .sky-cloud-right{
    width:104px;
    right:-12px;
    top:8px;
    opacity:.5;
  }
  .wxbg.wx-night .searchbox{border-radius:14px}
  .wxbg.wx-night .weather-strip{gap:9px;margin-top:15px}
  .wxbg.wx-night .weather-strip .weather-cities{gap:7px}
  .wxbg.wx-night .weather-cities .weather-city-summary{padding:7px 9px;font-size:12px}
  .wxbg.wx-night .weather-advice{margin-top:10px;color:#c9d9ef}
}

/* Mobile layout polish (2026-11-03): tighten the phone header/hero only.
   Everything here is inside max-width queries; desktop rendering is untouched. */
@media(max-width:720px){
  /* Header: two rows instead of three — brand + icon buttons on row 1,
     region selector + nav links sharing row 2. */
  .topbar{padding:8px 12px;row-gap:6px;column-gap:6px}
  .topbar .brand{order:1}
  .bookmark-btn,.topbar .bookmark-btn{order:2;margin-left:auto}
  .pwa-btn{order:2;margin-left:0}
  .theme-btn{order:2;margin-left:0}
  .region-sel{order:3;flex:0 1 auto;min-width:0;max-width:132px;margin-left:0}
  .topnav{order:3;width:auto;flex:1 1 auto;margin-top:0;padding-bottom:0;justify-content:flex-end}
  .topnav a{padding:6px 7px;font-size:13px}
  /* Hero: less air above the search box, subtitle wraps in balanced lines. */
  .hero-wrap{padding:26px 16px 20px}
  .wxbg.wx-night .hero-wrap{padding-top:26px}
  .hero-title{margin-bottom:22px}
  .wxbg.wx-night .hero-title{margin-bottom:22px}
  .hero-title h1{margin-bottom:10px}
  .hero-title p{font-size:14px;line-height:1.65;margin-bottom:18px;text-wrap:balance}
  .searchbox input{padding:13px 14px}
  .searchbox button{padding:0 20px}
  /* Weather strip: one compact block under the search box. */
  .weather-strip{margin-top:12px;gap:8px}
  .wxbg.wx-night .weather-strip{margin-top:12px;gap:8px}
  .weather-strip .weather-cities{gap:6px;padding:2px 0}
  .weather-cities .weather-city-summary{padding:6px 8px;font-size:12px}
  .wxbg.wx-night .weather-cities .weather-city-summary{padding:6px 8px;font-size:12px}
  #weatherManage,#weatherDetail{min-height:30px;padding:5px 10px;font-size:12px}
  .weather-advice{margin-top:7px}
  .wxbg.wx-night .weather-advice{margin-top:7px}
  #weatherStatus{margin-top:6px}
  /* Category chips: equal-width 4-column grid instead of uneven flex pills. */
  .chips{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;margin-top:16px;padding-bottom:4px}
  .chips::before,.chips::after{display:none}
  .chips span{text-align:center;padding:7px 2px;font-size:13px}
  /* Slightly narrower page gutters on phones. */
  .quick,.results,.navsec,.freq-wrap{padding-left:16px;padding-right:16px}
  .verify-wrap{padding-left:16px!important;padding-right:16px!important}
}
@media(max-width:600px){
  /* Crescent moon / sun: smaller, tucked into the corner, off the title. */
  .wxbg:is(.wx-clear,.wx-partly).wx-night::before{width:44px;left:auto;right:14px;top:12px;transform:none}
  .wxbg.wx-clear::before{width:46px}
}
@media(max-width:360px){
  .chips{grid-template-columns:repeat(3,1fr)}
  .topnav a{padding:6px 5px}
}
