/* Wetter module + Home widget. Accent only through the design tokens
   (fallbacks keep it intact before tokens.css loads). Animation: transform /
   opacity only, off under prefers-reduced-motion. No backdrop-filter. */
.wx, .wx-w {
  --wx-a: var(--accent, #6d5bff);
  --wx-soft: var(--accent-soft, color-mix(in srgb, var(--wx-a) 16%, transparent));
  --wx-glow: var(--accent-glow, color-mix(in srgb, var(--wx-a) 40%, transparent));
  --wx-glass: var(--glass, var(--surface, rgba(22, 20, 34, .62)));
  --wx-sun: #ffc24b; --wx-rain: #7cc4ff; --wx-moon: #cdd5ff;
}
.wx { position: relative; padding-bottom: 28px; }
.wx-ptr { position: absolute; left: 50%; top: -6px; width: 28px; height: 28px; margin-left: -14px; opacity: 0; pointer-events: none; color: var(--text-2); will-change: transform, opacity; }
.wx-ptr svg { width: 100%; height: 100%; }

/* places */
.wx-places { display: flex; gap: 8px; overflow-x: auto; padding: 4px 0 12px; scrollbar-width: none; margin: 0 -2px; }
.wx-places::-webkit-scrollbar, .wx-hours::-webkit-scrollbar { display: none; }
.wx-chip { flex: none; min-height: 38px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line-2, var(--line)); background: var(--wx-glass); color: var(--text-2); font: 600 14px/1 inherit; font-family: inherit; cursor: pointer; white-space: nowrap; }
.wx-chip.on { background: var(--wx-soft); border-color: color-mix(in srgb, var(--wx-a) 55%, transparent); color: var(--text); }
.wx-add { padding: 0 11px; display: grid; place-items: center; }
.wx-add svg { width: 18px; height: 18px; }

/* hero */
.wx-hero { position: relative; overflow: hidden; border-radius: 28px; padding: 18px 20px 18px; border: 1px solid var(--line); background: var(--wx-glass); isolation: isolate; }
.wx-hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background:
  radial-gradient(120% 90% at 100% 0%, var(--wx-tone, transparent), transparent 62%),
  linear-gradient(160deg, color-mix(in srgb, var(--wx-a) 34%, transparent), color-mix(in srgb, var(--wx-a) 6%, transparent) 70%); }
.wx-hero[data-tone="clear-day"] { --wx-tone: rgba(255, 194, 75, .30); }
.wx-hero[data-tone="clear-night"], .wx-hero[data-tone="partly-night"] { --wx-tone: rgba(80, 90, 200, .30); }
.wx-hero[data-tone="partly-day"] { --wx-tone: rgba(255, 194, 75, .16); }
.wx-hero[data-tone="rain"], .wx-hero[data-tone="drizzle"] { --wx-tone: rgba(80, 160, 255, .28); }
.wx-hero[data-tone="thunder"] { --wx-tone: rgba(255, 194, 75, .20); }
.wx-hero[data-tone="snow"] { --wx-tone: rgba(190, 220, 255, .30); }
.wx-hero[data-tone="cloudy"], .wx-hero[data-tone="fog"] { --wx-tone: rgba(160, 165, 185, .22); }
.wx-hero-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.wx-place { font-weight: 700; font-size: 17px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wx-place small { font-weight: 500; color: var(--text-3); margin-left: 8px; font-size: 13px; }
.wx-refresh { width: 40px; height: 40px; margin: -6px -8px -6px 0; display: grid; place-items: center; border: 0; background: none; color: var(--text-2); cursor: pointer; border-radius: 50%; }
.wx-refresh svg { width: 20px; height: 20px; }
.wx-refresh.spin svg { animation: wx-rot 1s linear infinite; }
.wx-hero-main { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 6px; }
.wx-temp { font: 500 76px/1 var(--display, inherit); letter-spacing: -.04em; }
.wx-cond { font-size: 17px; color: var(--text); margin-top: 4px; font-weight: 600; }
.wx-big { width: 112px; height: 112px; flex: none; }
.wx-hero-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 10px; color: var(--text-2); font-size: 14px; }
.wx-rainline { display: flex; align-items: center; gap: 8px; margin-top: 12px; padding: 9px 13px; border-radius: 14px; background: color-mix(in srgb, var(--wx-rain) 14%, transparent); font-size: 14.5px; font-weight: 600; }
.wx-rainline.none { background: var(--surface-2, rgba(255,255,255,.06)); color: var(--text-2); font-weight: 500; }
.wx-rainline svg { width: 17px; height: 17px; flex: none; color: var(--wx-rain); }
.wx-banner { margin: 0 0 12px; padding: 10px 14px; border-radius: 14px; background: color-mix(in srgb, #f5a524 16%, transparent); color: var(--text); font-size: 13.5px; }

/* hints */
.wx-hints { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.wx-hint { padding: 8px 13px; border-radius: 999px; background: var(--wx-soft); font-size: 13.5px; font-weight: 600; }

/* sections */
.wx-sec { margin-top: 22px; }
.wx-h { margin: 0 0 10px; font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--text-3); }
.wx-card { border-radius: 22px; border: 1px solid var(--line); background: var(--wx-glass); padding: 6px 16px; }
.wx-s { font-size: 12.5px; color: var(--text-3); }
.wx-hours { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 0 16px 4px; scroll-snap-type: x proximity; }
.wx-hr { flex: none; width: 62px; padding: 12px 0 10px; border-radius: 18px; border: 1px solid var(--line); background: var(--wx-glass); display: flex; flex-direction: column; align-items: center; gap: 6px; scroll-snap-align: start; }
.wx-hr.now { border-color: color-mix(in srgb, var(--wx-a) 55%, transparent); background: var(--wx-soft); }
.wx-hl { font-size: 12px; color: var(--text-2); }
.wx-hr b { font-size: 16px; font-weight: 700; }
.wx-hp { font-size: 11.5px; color: var(--wx-rain); font-weight: 600; }
.wx-hp.off { opacity: .35; }
.wx-h-ico { width: 30px; height: 30px; }

/* days */
.wx-days { padding: 4px 14px; }
.wx-day { display: grid; grid-template-columns: 46px 30px 34px 30px 1fr 30px; align-items: center; gap: 8px; padding: 9px 0; border-top: 1px solid var(--line); font-size: 15px; }
.wx-day:first-child { border-top: 0; }
.wx-dn { font-weight: 600; }
.wx-d-ico { width: 28px; height: 28px; }
.wx-dp { font-size: 11.5px; color: var(--wx-rain); font-weight: 600; }
.wx-dp i { font-style: normal; }
.wx-dmin { text-align: right; color: var(--text-3); }
.wx-dmax { text-align: right; font-weight: 700; }
.wx-bar { position: relative; height: 5px; border-radius: 3px; background: var(--line-2, rgba(255,255,255,.12)); overflow: hidden; }
.wx-bar i { position: absolute; top: 0; bottom: 0; border-radius: 3px; background: linear-gradient(90deg, var(--wx-rain), var(--wx-a) 55%, var(--wx-sun)); }

/* details */
.wx-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.wx-cell { display: flex; flex-direction: column; gap: 3px; padding: 14px 16px; border-radius: 20px; border: 1px solid var(--line); background: var(--wx-glass); min-width: 0; }
.wx-k { font-size: 12.5px; color: var(--text-3); font-weight: 600; }
.wx-v { font: 600 24px/1.15 var(--display, inherit); letter-spacing: -.01em; }
.wx-v i { font: 500 13px var(--font, inherit); font-style: normal; color: var(--text-3); letter-spacing: 0; }

/* air */
.wx-air { padding: 14px 16px; }
.wx-aqi { display: flex; align-items: center; gap: 14px; }
.wx-aqi > div { display: flex; flex-direction: column; }
.wx-aqi-n { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; font-size: 22px; background: var(--wx-soft); }
.wx-aqi-n.l0, .wx-aqi-n.l1 { background: color-mix(in srgb, #3ccf8e 22%, transparent); }
.wx-aqi-n.l2 { background: color-mix(in srgb, #f5c524 24%, transparent); }
.wx-aqi-n.l3, .wx-aqi-n.l4, .wx-aqi-n.l5 { background: color-mix(in srgb, #f5503c 26%, transparent); }
.wx-aqi-bar { position: relative; height: 6px; border-radius: 3px; margin: 14px 0 4px; background: linear-gradient(90deg, #3ccf8e, #f5c524 50%, #f5503c); opacity: .85; }
.wx-aqi-bar i { position: absolute; top: -3px; width: 12px; height: 12px; margin-left: -6px; border-radius: 50%; background: var(--text); border: 2px solid var(--bg, #06050b); }
.wx-pollen { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.wx-pol { font-size: 13px; padding: 6px 11px; border-radius: 999px; background: var(--surface-2, rgba(255,255,255,.06)); }
.wx-pol.l3, .wx-pol.l4 { background: color-mix(in srgb, #f5503c 22%, transparent); }
.wx-pol.l2 { background: color-mix(in srgb, #f5c524 22%, transparent); }
.wx-air .wx-s + .wx-s, .wx-air > .wx-s { margin: 12px 0 0; }
.wx-foot { text-align: center; margin-top: 22px; line-height: 1.7; }
.wx-foot a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }

/* skeleton */
.wx-sk { border-radius: 12px; background: var(--surface-2, rgba(255,255,255,.07)); animation: wx-pulse 1.4s ease-in-out infinite; }
.wx-sk-line { height: 14px; margin: 10px 0; }
.wx-sk-huge { height: 76px; width: 55%; margin: 14px 0; border-radius: 18px; }
.wx-sk-big { height: 40px; width: 40%; margin: 6px 0; }
.wx-sk-row { height: 96px; margin-top: 16px; border-radius: 18px; }
.wx-sk-card { height: 220px; margin-top: 16px; border-radius: 22px; }
.wx-error { padding: 40px 12px; }
.wx-error .btn { margin-top: 12px; }

/* sheet */
.wx-prow .icon-btn { flex: none; }
.wx-msg { margin: 10px 2px 0; }
.wx-res { margin-top: 10px; }

/* icons */
.wx-ico { display: block; overflow: visible; }
.wx-ico .wx-cloud { fill: color-mix(in srgb, currentColor 9%, transparent); }
.wx-ico .wx-cloud.back { opacity: .5; fill: none; }
.wx-ico .wx-sun, .wx-ico .wx-bolt { stroke: var(--wx-sun); }
.wx-ico .wx-moon { stroke: var(--wx-moon); fill: color-mix(in srgb, var(--wx-moon) 12%, transparent); }
.wx-ico .wx-drop, .wx-ico .wx-flake { stroke: var(--wx-rain); }
.wx-ico .wx-fog { opacity: .75; }
.wx-rays { transform-box: view-box; animation: wx-rot 48s linear infinite; }
.wx-drop { animation: wx-fall 1.5s ease-in infinite; }
.wx-flake { animation: wx-snow 3s ease-in-out infinite; }
.wx-bolt { animation: wx-flash 3.2s ease-in-out infinite; }
.wx-fog { animation: wx-slide 6s ease-in-out infinite alternate; }
.wx-fog.b { animation-duration: 8s; animation-direction: alternate-reverse; }
.wx-cloud.back { animation: wx-slide 9s ease-in-out infinite alternate; }
.wx-moon { animation: wx-bob 6s ease-in-out infinite alternate; }
.wx-ico.still * { animation: none !important; }
@keyframes wx-rot { to { transform: rotate(360deg); } }
@keyframes wx-fall { 0% { transform: translateY(-3px); opacity: 0; } 25% { opacity: 1; } 100% { transform: translateY(6px); opacity: 0; } }
@keyframes wx-snow { 0%, 100% { transform: translateY(-2px); opacity: .5; } 50% { transform: translateY(3px); opacity: 1; } }
@keyframes wx-flash { 0%, 62%, 100% { opacity: 1; } 66% { opacity: .15; } 70% { opacity: 1; } 74% { opacity: .25; } }
@keyframes wx-slide { from { transform: translateX(-2px); } to { transform: translateX(2.5px); } }
@keyframes wx-bob { from { transform: translateY(0); } to { transform: translateY(-1.5px); } }
@keyframes wx-pulse { 50% { opacity: .55; } }
.wx-ico .wx-drop, .wx-ico .wx-flake, .wx-ico .wx-fog, .wx-ico .wx-cloud.back, .wx-ico .wx-moon, .wx-ico .wx-bolt { transform-box: fill-box; }
@media (prefers-reduced-motion: reduce) {
  .wx *, .wx-w * { animation: none !important; }
}

/* Home widget */
.w-wetter .wx-w { display: flex; flex-direction: column; gap: 6px; width: 100%; text-align: left; }
.wx-w-main { display: flex; flex-direction: column; gap: 2px; }
.wx-w-temp { display: flex; align-items: center; justify-content: space-between; }
.wx-w-t { font: 500 44px/1 var(--display, inherit); letter-spacing: -.03em; }
.wx-w-ico { width: 60px; height: 60px; margin: -8px -2px -8px 0; }
.wx-w-cond { font-size: 13.5px; font-weight: 600; color: var(--text); }
.wx-w-cond span { font-weight: 500; color: var(--text-2); }
.wx-w-meta { display: flex; gap: 12px; font-size: 12.5px; color: var(--text-2); }
.wx-w-meta b { font-weight: 600; color: var(--text-3); margin-right: 3px; }
.wx-w-pop { margin-left: auto; color: var(--wx-rain); display: inline-flex; align-items: center; gap: 3px; }
.wx-w-pop b { display: inline-flex; margin: 0; color: inherit; }
.wx-w-pop svg { width: 13px; height: 13px; }
.wx-spark { display: block; width: 100%; height: 38px; margin-top: 2px; overflow: visible; }
.wx-sp-line { fill: none; stroke: color-mix(in srgb, var(--wx-a) 65%, #fff); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.wx-sp-bar { fill: var(--wx-rain); opacity: .4; }
.wx-w-note { font-size: 12.5px; font-weight: 600; color: var(--wx-rain); }
.w-wetter { position: relative; overflow: hidden; }
.w-wetter::before { content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none; background: linear-gradient(150deg, color-mix(in srgb, var(--accent, #6d5bff) 22%, transparent), transparent 65%); }
.w-wetter > * { position: relative; z-index: 1; }

@media (min-width: 900px) {
  .wx { max-width: 760px; margin: 0 auto; }
  .wx-grid { grid-template-columns: repeat(4, 1fr); }
  .wx-temp { font-size: 92px; }
  .wx-big { width: 132px; height: 132px; }
}
