/* ============ Usage Meter: extra weather scenes ============ */
.cuw-particles > .off { display: none !important; }
.cuw-spring, .cuw-rain, .cuw-night { position: absolute; inset: 0; display: none; }
.cuw-deco[data-scene="spring"] .cuw-spring,
.cuw-deco[data-scene="rain"] .cuw-rain,
.cuw-deco[data-scene="night"] .cuw-night { display: block; }

/* Anything that sits on the surface of the fill */
.cuw-surface {
  position: absolute;
  left: 0; right: 0;
  bottom: calc(var(--cuw-fill) * 100%);
  height: 0;
  transition: bottom 1.8s cubic-bezier(.2, .8, .2, 1);
}

/* ---------------- Spring (Sonnet 5.x) ---------------- */
.cuw-branch {
  position: absolute;
  top: -10px; right: -12px;
  transform-origin: 100% 0;
  animation: cuw-sway 5.5s ease-in-out infinite;
  filter: drop-shadow(0 1px 1px rgba(0,0,0,.12));
}
@keyframes cuw-sway { 0%, 100% { transform: rotate(0deg); } 50% { transform: rotate(2.4deg); } }
.cuw-branch .wood { fill: #6b4a33; }
.cuw-branch .lv   { fill: #62a84f; }
.cuw-branch .lv2  { fill: #9bd17c; }
.cuw-branch .bl   { fill: #f7b6cc; }
.cuw-branch .blc  { fill: #e0789a; }
.cuw-deco[data-theme="dark"] .cuw-branch .wood { fill: #9a7355; }
.cuw-deco[data-theme="dark"] .cuw-branch .lv   { fill: #74bd5f; }
.cuw-deco[data-theme="dark"] .cuw-branch .bl   { fill: #f3adc5; }
/* Near the limit the branch turns autumn */
.cuw-deco[data-level="high"] .cuw-branch .lv  { fill: #d98a3a; }
.cuw-deco[data-level="high"] .cuw-branch .lv2 { fill: #e8b04e; }

.cuw-leaves i {
  position: absolute;
  top: 16px;
  left: var(--x);
  opacity: 0;
  animation: cuw-leaf-fall var(--d) linear var(--delay) infinite;
}
@keyframes cuw-leaf-fall {
  0%   { transform: translate(0, 0); opacity: 0; }
  6%   { opacity: 1; }
  90%  { opacity: 1; }
  100% { transform: translate(var(--dx), calc((1 - var(--cuw-fill)) * 100cqh - 20px)); opacity: 0; }
}
.cuw-leaves b {
  display: block;
  width: var(--s);
  height: calc(var(--s) * .55);
  animation: cuw-flutter var(--sw) ease-in-out infinite alternate;
}
.cuw-leaves b.leaf { background: linear-gradient(135deg, #7cc466, #4f9a3f); border-radius: 0 100% 0 100%; }
.cuw-leaves b.leaf.light { background: linear-gradient(135deg, #bfe59a, #7cc466); }
.cuw-leaves b.petal {
  width: calc(var(--s) * .8); height: calc(var(--s) * .8);
  background: radial-gradient(circle at 30% 30%, #ffe6ee, #f4a7c0);
  border-radius: 60% 0 60% 60%;
}
.cuw-deco[data-level="high"] .cuw-leaves b.leaf { background: linear-gradient(135deg, #f0b35a, #d9772f); }
.cuw-deco[data-level="high"] .cuw-leaves b.leaf.light { background: linear-gradient(135deg, #f6d27a, #e59a3c); }
@keyframes cuw-flutter {
  from { transform: translateX(-10px) rotate(-30deg) rotateX(0deg); }
  to   { transform: translateX(12px) rotate(var(--rot)) rotateX(65deg); }
}

.cuw-flower {
  position: absolute;
  left: var(--x);
  bottom: -3px;
  width: 1.6px;
  height: var(--h);
  background: #4f8f3c;
  transform-origin: 50% 100%;
  animation: cuw-nod 3.2s ease-in-out var(--delay) infinite;
}
.cuw-flower::after {
  content: '';
  position: absolute;
  top: -6px; left: -3.4px;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: radial-gradient(circle, #f2b705 0 26%, var(--c) 30%);
  box-shadow: 0 0 0 .6px rgba(0,0,0,.08);
}
@keyframes cuw-nod { 0%, 100% { transform: rotate(-6deg); } 50% { transform: rotate(6deg); } }

/* Meadow fill */
.cuw-overlay[data-scene="spring"]                    { --c1: #d9efc9; --c2: #c5e6ae; --c3: #a9d78c; }
.cuw-overlay[data-scene="spring"][data-level="mid"]  { --c1: #eef0c2; --c2: #e2e4a0; --c3: #cfd27c; }
.cuw-overlay[data-scene="spring"][data-level="high"] { --c1: #f6dcc0; --c2: #f0c69c; --c3: #e6a874; }
.cuw-overlay[data-scene="spring"][data-theme="dark"]                    { --c1: #2e5a2a; --c2: #244a22; --c3: #1a3719; }
.cuw-overlay[data-scene="spring"][data-theme="dark"][data-level="mid"]  { --c1: #55562a; --c2: #46471f; --c3: #353614; }
.cuw-overlay[data-scene="spring"][data-theme="dark"][data-level="high"] { --c1: #6a4424; --c2: #57361b; --c3: #402712; }
.cuw-overlay[data-scene="spring"] .cuw-wave {
  height: 12px;
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='14' viewBox='0 0 240 14'%3E%3Cpath d='M0 14 L3 6 L6 14 L9 3 L12 14 L15 7 L18 14 L21 2 L24 14 L27 6 L30 14 L33 4 L36 14 L39 8 L42 14 L45 3 L48 14 L51 6 L54 14 L57 2 L60 14 L63 7 L66 14 L69 4 L72 14 L75 6 L78 14 L81 3 L84 14 L87 7 L90 14 L93 2 L96 14 L99 5 L102 14 L105 3 L108 14 L111 7 L114 14 L117 4 L120 14 L123 6 L126 14 L129 2 L132 14 L135 7 L138 14 L141 3 L144 14 L147 6 L150 14 L153 4 L156 14 L159 7 L162 14 L165 2 L168 14 L171 6 L174 14 L177 3 L180 14 L183 7 L186 14 L189 4 L192 14 L195 6 L198 14 L201 2 L204 14 L207 7 L210 14 L213 3 L216 14 L219 6 L222 14 L225 4 L228 14 L231 7 L234 14 L237 3 L240 14 Z'/%3E%3C/svg%3E");
          mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='14' viewBox='0 0 240 14'%3E%3Cpath d='M0 14 L3 6 L6 14 L9 3 L12 14 L15 7 L18 14 L21 2 L24 14 L27 6 L30 14 L33 4 L36 14 L39 8 L42 14 L45 3 L48 14 L51 6 L54 14 L57 2 L60 14 L63 7 L66 14 L69 4 L72 14 L75 6 L78 14 L81 3 L84 14 L87 7 L90 14 L93 2 L96 14 L99 5 L102 14 L105 3 L108 14 L111 7 L114 14 L117 4 L120 14 L123 6 L126 14 L129 2 L132 14 L135 7 L138 14 L141 3 L144 14 L147 6 L150 14 L153 4 L156 14 L159 7 L162 14 L165 2 L168 14 L171 6 L174 14 L177 3 L180 14 L183 7 L186 14 L189 4 L192 14 L195 6 L198 14 L201 2 L204 14 L207 7 L210 14 L213 3 L216 14 L219 6 L222 14 L225 4 L228 14 L231 7 L234 14 L237 3 L240 14 Z'/%3E%3C/svg%3E");
  -webkit-mask-size: 240px 12px; mask-size: 240px 12px;
  animation-duration: 70s !important;
}
.cuw-overlay[data-scene="spring"] .cuw-w1 { background: var(--c3); }
.cuw-overlay[data-scene="spring"] .cuw-w2 { background: var(--c2); height: 9px; -webkit-mask-size: 200px 9px; mask-size: 200px 9px; opacity: 1; }
.cuw-overlay[data-scene="spring"] .cuw-bubbles { display: none; }

/* ---------------- Rain (Haiku) ---------------- */
.cuw-clouds span {
  position: absolute;
  top: -20px;
  width: 140px; height: 40px;
  border-radius: 50%;
  background: rgba(110, 122, 140, .28);
  filter: blur(3px);
  animation: cuw-cloud 48s linear infinite;
}
.cuw-clouds span:nth-child(1) { left: -10%; animation-duration: 52s; }
.cuw-clouds span:nth-child(2) { left: 30%; width: 180px; top: -24px; animation-duration: 64s; animation-delay: -20s; }
.cuw-clouds span:nth-child(3) { left: 65%; width: 120px; animation-duration: 44s; animation-delay: -8s; }
.cuw-deco[data-theme="dark"] .cuw-clouds span { background: rgba(190, 198, 212, .16); }
.cuw-deco[data-level="high"] .cuw-clouds span { background: rgba(70, 76, 92, .38); }
@keyframes cuw-cloud { from { transform: translateX(-20cqw); } to { transform: translateX(60cqw); } }

.cuw-drops i {
  position: absolute;
  top: -26px;
  left: var(--x);
  width: 1.4px;
  height: var(--l);
  border-radius: 1px;
  background: linear-gradient(to bottom, rgba(80, 110, 150, 0), rgba(80, 110, 150, .75));
  animation: cuw-rain var(--d) linear var(--delay) infinite;
}
.cuw-deco[data-theme="dark"] .cuw-drops i { background: linear-gradient(to bottom, rgba(200, 215, 235, 0), rgba(200, 215, 235, .7)); }
@keyframes cuw-rain {
  from { transform: translate(0, 0) rotate(12deg); }
  to   { transform: translate(-22px, calc((1 - var(--cuw-fill)) * 100cqh + 22px)) rotate(12deg); }
}
.cuw-rain .cuw-surface span {
  position: absolute;
  left: var(--x);
  bottom: -3px;
  width: 14px; height: 5px;
  margin-left: -7px;
  border: 1.2px solid rgba(80, 110, 150, .6);
  border-radius: 50%;
  opacity: 0;
  animation: cuw-splash var(--d) ease-out var(--delay) infinite;
}
.cuw-deco[data-theme="dark"] .cuw-rain .cuw-surface span { border-color: rgba(200, 215, 235, .55); }
@keyframes cuw-splash { 0% { transform: scale(.2); opacity: .9; } 70% { opacity: .3; } 100% { transform: scale(1.5); opacity: 0; } }

.cuw-flash { position: absolute; inset: 0; background: #fff; opacity: 0; }
.cuw-deco[data-level="high"] .cuw-flash { animation: cuw-flash 8s linear infinite; }
.cuw-deco[data-theme="light"][data-level="high"] .cuw-flash { background: #fffbe0; }
@keyframes cuw-flash { 0%, 90%, 100% { opacity: 0; } 91% { opacity: .5; } 92% { opacity: .08; } 93.5% { opacity: .35; } 95% { opacity: 0; } }

.cuw-overlay[data-scene="rain"]                    { --c1: #dde6ef; --c2: #c9d6e3; --c3: #aebfd2; }
.cuw-overlay[data-scene="rain"][data-level="mid"]  { --c1: #d9dde6; --c2: #c3c9d6; --c3: #a8b0c2; }
.cuw-overlay[data-scene="rain"][data-level="high"] { --c1: #d6d3e0; --c2: #bdb8cc; --c3: #a09ab6; }
.cuw-overlay[data-scene="rain"][data-theme="dark"]                    { --c1: #28415a; --c2: #1f3448; --c3: #172737; }
.cuw-overlay[data-scene="rain"][data-theme="dark"][data-level="mid"]  { --c1: #333d52; --c2: #293142; --c3: #1f2533; }
.cuw-overlay[data-scene="rain"][data-theme="dark"][data-level="high"] { --c1: #3b3350; --c2: #2f2940; --c3: #231e31; }
.cuw-overlay[data-scene="rain"] .cuw-wave { height: 8px; -webkit-mask-size: 120px 8px; mask-size: 120px 8px; }
.cuw-overlay[data-scene="rain"] .cuw-w1 { animation-duration: 3.2s !important; }
.cuw-overlay[data-scene="rain"] .cuw-w2 { animation-duration: 4.4s !important; }
.cuw-overlay[data-scene="rain"] .cuw-bubbles { display: none; }

/* ---------------- Starry night (older Opus) ---------------- */
.cuw-sky {
  position: absolute;
  left: 0; right: 0; top: 0;
  bottom: calc(var(--cuw-fill) * 100%);
  overflow: hidden;
  transition: bottom 1.8s cubic-bezier(.2, .8, .2, 1);
}
.cuw-sky i {
  position: absolute;
  left: var(--x); top: var(--y);
  width: var(--s); height: var(--s);
  border-radius: 50%;
  background: #7f86c4;
  animation: cuw-twinkle var(--d) ease-in-out var(--delay) infinite alternate;
}
.cuw-deco[data-theme="dark"] .cuw-sky i { background: #fffbe8; box-shadow: 0 0 3px rgba(255, 251, 232, .8); }
@keyframes cuw-twinkle { from { opacity: .15; transform: scale(.7); } to { opacity: 1; transform: scale(1.1); } }
.cuw-shoot {
  position: absolute;
  top: 14%; left: 72%;
  width: 64px; height: 1.6px;
  background: linear-gradient(90deg, rgba(127, 134, 196, 0), #7f86c4);
  opacity: 0;
  animation: cuw-shoot 11s ease-in 3s infinite;
}
.cuw-deco[data-theme="dark"] .cuw-shoot { background: linear-gradient(90deg, rgba(255, 255, 255, 0), #fff); }
@keyframes cuw-shoot {
  0%, 86% { opacity: 0; transform: translate(0, 0) rotate(-22deg); }
  87%     { opacity: 1; }
  95%     { opacity: 0; transform: translate(-170px, 68px) rotate(-22deg); }
  100%    { opacity: 0; }
}
.cuw-moon {
  position: absolute;
  top: 10px; right: 22%;
  width: 20px; height: 20px;
  border-radius: 50%;
  box-shadow: 6px 3px 0 0 #d9ad3c;
  transform: rotate(-20deg);
  transition: box-shadow .6s;
}
.cuw-deco[data-theme="dark"] .cuw-moon { box-shadow: 6px 3px 0 0 #f4e3a1; filter: drop-shadow(0 0 6px rgba(244, 227, 161, .45)); }
/* Blood moon near the limit */
.cuw-deco[data-level="high"] .cuw-moon { box-shadow: 6px 3px 0 0 #e0634a; }
.cuw-glow {
  position: absolute;
  right: calc(22% - 10px);
  bottom: -7px;
  width: 38px; height: 4px;
  border-radius: 50%;
  background: rgba(217, 173, 60, .5);
  filter: blur(1px);
  animation: cuw-glow 2.6s ease-in-out infinite alternate;
}
.cuw-deco[data-theme="dark"] .cuw-glow { background: rgba(244, 227, 161, .5); }
.cuw-deco[data-level="high"] .cuw-glow { background: rgba(224, 99, 74, .5); }
@keyframes cuw-glow { from { transform: scaleX(.6); opacity: .5; } to { transform: scaleX(1.25); opacity: 1; } }

.cuw-overlay[data-scene="night"]                    { --c1: #e1def6; --c2: #cdc8ee; --c3: #b3acdf; }
.cuw-overlay[data-scene="night"][data-level="mid"]  { --c1: #e6d9f2; --c2: #d4c1ea; --c3: #bba2dd; }
.cuw-overlay[data-scene="night"][data-level="high"] { --c1: #efd6e2; --c2: #e2bcd0; --c3: #d09fb9; }
.cuw-overlay[data-scene="night"][data-theme="dark"]                    { --c1: #2a2770; --c2: #1f1c58; --c3: #15133f; }
.cuw-overlay[data-scene="night"][data-theme="dark"][data-level="mid"]  { --c1: #3a2468; --c2: #2d1b53; --c3: #20123b; }
.cuw-overlay[data-scene="night"][data-theme="dark"][data-level="high"] { --c1: #52224b; --c2: #411a3c; --c3: #2e112a; }
.cuw-overlay[data-scene="night"] .cuw-w1 { animation-duration: 16s !important; }
.cuw-overlay[data-scene="night"] .cuw-w2 { animation-duration: 22s !important; }
.cuw-overlay[data-scene="night"] .cuw-bubbles { display: none; }

@media (prefers-reduced-motion: reduce) {
  .cuw-branch, .cuw-leaves i, .cuw-leaves b, .cuw-flower, .cuw-clouds span, .cuw-drops i,
  .cuw-rain .cuw-surface span, .cuw-flash, .cuw-sky i, .cuw-shoot, .cuw-glow { animation: none !important; }
  .cuw-leaves, .cuw-drops, .cuw-shoot { display: none; }
}

/* ============ Compact chat boxes (e.g. Cowork's single-line composer) ============ */
.cuw-deco[data-size="compact"], .cuw-deco[data-size="tiny"] { opacity: .8; }
.cuw-deco[data-size="tiny"][data-intensity="subtle"] { opacity: .5; }

/* Rain: thin, faint clouds that don't swallow the box */
.cuw-deco[data-size="compact"] .cuw-clouds span { height: 22px; top: -14px; width: 110px; }
.cuw-deco[data-size="tiny"] .cuw-clouds span { height: 12px; top: -9px; width: 80px; background: rgba(110, 122, 140, .16); filter: blur(4px); }
.cuw-deco[data-size="tiny"][data-theme="dark"] .cuw-clouds span { background: rgba(190, 198, 212, .08); }
.cuw-deco[data-size="tiny"] .cuw-drops i { height: calc(var(--l) * .55); opacity: .7; }
.cuw-deco[data-size="tiny"] .cuw-rain .cuw-surface span { width: 9px; height: 3px; margin-left: -4.5px; }

/* Ship */
.cuw-deco[data-size="compact"] .cuw-ship { width: 42px; height: 35px; }
.cuw-deco[data-size="tiny"] .cuw-ship { width: 28px; height: 24px; }
.cuw-deco[data-size="tiny"] .cuw-ship-sail { bottom: -6px; }
.cuw-deco[data-size="tiny"] .cuw-ship-track { bottom: calc(min(var(--cuw-fill), .5) * 100%); }

/* Spring branch, leaves, flowers */
.cuw-deco[data-size="compact"] .cuw-branch { width: 120px; height: 52px; }
.cuw-deco[data-size="tiny"] .cuw-branch { width: 84px; height: 37px; top: -6px; right: -8px; }
.cuw-deco[data-size="tiny"] .cuw-leaves i { top: 6px; }
.cuw-deco[data-size="tiny"] .cuw-leaves b { width: calc(var(--s) * .65); height: calc(var(--s) * .36); }
.cuw-deco[data-size="tiny"] .cuw-leaves b.petal { width: calc(var(--s) * .55); height: calc(var(--s) * .55); }
.cuw-deco[data-size="tiny"] .cuw-flower { height: calc(var(--h) * .55); }
.cuw-deco[data-size="tiny"] .cuw-flower::after { width: 5px; height: 5px; top: -4px; left: -1.8px; }

/* Snow */
.cuw-deco[data-size="tiny"] .cuw-snow i { width: calc(var(--s) * .65); height: calc(var(--s) * .65); }

/* Night */
.cuw-deco[data-size="tiny"] .cuw-moon { width: 12px; height: 12px; top: 5px; box-shadow: 4px 2px 0 0 #d9ad3c; }
.cuw-deco[data-size="tiny"][data-theme="dark"] .cuw-moon { box-shadow: 4px 2px 0 0 #f4e3a1; }
.cuw-deco[data-size="tiny"][data-level="high"] .cuw-moon { box-shadow: 4px 2px 0 0 #e0634a; }
.cuw-deco[data-size="tiny"] .cuw-shoot { width: 36px; }

/* Waves a bit lower so they don't cover the single text line */
.cuw-overlay[data-size="tiny"] .cuw-wave { height: 9px; -webkit-mask-size: 160px 9px; mask-size: 160px 9px; }

/* ============ Summer sun ============ */
.cuw-summer { position: absolute; inset: 0; display: none; }
.cuw-deco[data-scene="summer"] .cuw-summer { display: block; }
.cuw-sun {
  position: absolute;
  top: 8px; right: 16%;
  width: 24px; height: 24px;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 40%, #fff3b0, #ffcc33 60%, #f7a823);
  box-shadow: 0 0 14px 4px rgba(255, 196, 51, .45);
  transition: background .8s, box-shadow .8s, top 1.8s;
}
.cuw-sun i {
  position: absolute;
  inset: -12px;
  border-radius: 50%;
  background: repeating-conic-gradient(rgba(255, 196, 51, .55) 0 6deg, transparent 6deg 30deg);
  -webkit-mask: radial-gradient(circle, transparent 0 15px, #000 16px 23px, transparent 24px);
          mask: radial-gradient(circle, transparent 0 15px, #000 16px 23px, transparent 24px);
  animation: cuw-spin 26s linear infinite;
}
@keyframes cuw-spin { to { transform: rotate(360deg); } }
/* Near the limit the sun sets: lower, deep orange */
.cuw-deco[data-level="high"] .cuw-sun {
  top: 30%;
  background: radial-gradient(circle at 40% 40%, #ffd3a1, #ff7a3d 60%, #e0482b);
  box-shadow: 0 0 18px 6px rgba(255, 110, 60, .45);
}
.cuw-gull { position: absolute; fill: none; stroke: #55606e; stroke-width: 1.6; stroke-linecap: round; }
.cuw-deco[data-theme="dark"] .cuw-gull { stroke: #d9dee6; }
.cuw-gull.g1 { top: 14px; animation: cuw-glide 30s linear infinite, cuw-flap .9s ease-in-out infinite alternate; }
.cuw-gull.g2 { top: 24px; animation: cuw-glide 38s linear -12s infinite, cuw-flap .7s ease-in-out infinite alternate; }
@keyframes cuw-glide { from { left: -5%; } to { left: 105%; } }
@keyframes cuw-flap { from { transform: scaleY(1); } to { transform: scaleY(.45); } }
.cuw-summer .cuw-surface span {
  position: absolute;
  left: var(--x);
  bottom: -10px;
  width: 10px; height: 2px;
  border-radius: 2px;
  background: rgba(255, 255, 255, .9);
  opacity: 0;
  animation: cuw-glint var(--d) ease-in-out var(--delay) infinite;
}
.cuw-deco[data-theme="light"] .cuw-summer .cuw-surface span { background: rgba(255, 255, 255, 1); box-shadow: 0 0 2px rgba(0, 120, 140, .4); }
@keyframes cuw-glint { 0%, 100% { opacity: 0; transform: scaleX(.3); } 50% { opacity: .9; transform: scaleX(1); } }

.cuw-overlay[data-scene="summer"]                    { --c1: #d2f4ef; --c2: #b6ebe3; --c3: #8fdcd1; }
.cuw-overlay[data-scene="summer"][data-level="mid"]  { --c1: #e2f1df; --c2: #cfe8c9; --c3: #b5dcae; }
.cuw-overlay[data-scene="summer"][data-level="high"] { --c1: #fbe1cf; --c2: #f7c9ab; --c3: #f0a985; }
.cuw-overlay[data-scene="summer"][data-theme="dark"]                    { --c1: #12605a; --c2: #0d4b47; --c3: #083634; }
.cuw-overlay[data-scene="summer"][data-theme="dark"][data-level="mid"]  { --c1: #3d5a35; --c2: #304829; --c3: #22351d; }
.cuw-overlay[data-scene="summer"][data-theme="dark"][data-level="high"] { --c1: #6b3520; --c2: #552918; --c3: #3e1d10; }
.cuw-overlay[data-scene="summer"] .cuw-bubbles { display: none; }

/* ============ Autumn (reuses the spring branch and leaves) ============ */
.cuw-deco[data-scene="autumn"] .cuw-spring { display: block; }
.cuw-deco[data-scene="autumn"] .cuw-branch .lv  { fill: #d9772f; }
.cuw-deco[data-scene="autumn"] .cuw-branch .lv2 { fill: #e8b04e; }
.cuw-deco[data-scene="autumn"] .cuw-branch .bl,
.cuw-deco[data-scene="autumn"] .cuw-branch .blc { fill: #b8462c; }
.cuw-deco[data-scene="autumn"] .cuw-leaves b.leaf { background: linear-gradient(135deg, #f0a03a, #c9561f); }
.cuw-deco[data-scene="autumn"] .cuw-leaves b.leaf.light { background: linear-gradient(135deg, #f7d070, #e09a32); }
.cuw-deco[data-scene="autumn"] .cuw-leaves b.petal { background: linear-gradient(135deg, #c44a2a, #8f2f1c); border-radius: 0 100% 0 100%; width: var(--s); height: calc(var(--s) * .55); }
.cuw-deco[data-scene="autumn"] .cuw-flower { display: none; }
/* Late autumn near the limit: the branch is nearly bare */
.cuw-deco[data-scene="autumn"][data-level="high"] .cuw-branch .lv2,
.cuw-deco[data-scene="autumn"][data-level="high"] .cuw-branch .bl,
.cuw-deco[data-scene="autumn"][data-level="high"] .cuw-branch .blc { opacity: 0; }

.cuw-overlay[data-scene="autumn"]                    { --c1: #f6e3c6; --c2: #efcfa2; --c3: #e3b47c; }
.cuw-overlay[data-scene="autumn"][data-level="mid"]  { --c1: #f4d9bb; --c2: #ecc095; --c3: #dfa36d; }
.cuw-overlay[data-scene="autumn"][data-level="high"] { --c1: #f1d0c0; --c2: #e6b39b; --c3: #d59374; }
.cuw-overlay[data-scene="autumn"][data-theme="dark"]                    { --c1: #6a4a22; --c2: #573c1b; --c3: #402c13; }
.cuw-overlay[data-scene="autumn"][data-theme="dark"][data-level="mid"]  { --c1: #6f3f1f; --c2: #5b3218; --c3: #432410; }
.cuw-overlay[data-scene="autumn"][data-theme="dark"][data-level="high"] { --c1: #6c2f1f; --c2: #582618; --c3: #401b10; }
.cuw-overlay[data-scene="autumn"] .cuw-wave {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='14' viewBox='0 0 240 14'%3E%3Cpath d='M0 10 C10 4 20 4 30 9 C38 5 48 3 58 8 C70 2 82 4 92 9 C102 5 112 5 122 10 C134 3 146 4 156 9 C166 5 176 4 186 8 C198 3 210 5 220 9 C228 6 234 6 240 10 V14 H0 Z'/%3E%3C/svg%3E");
          mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='14' viewBox='0 0 240 14'%3E%3Cpath d='M0 10 C10 4 20 4 30 9 C38 5 48 3 58 8 C70 2 82 4 92 9 C102 5 112 5 122 10 C134 3 146 4 156 9 C166 5 176 4 186 8 C198 3 210 5 220 9 C228 6 234 6 240 10 V14 H0 Z'/%3E%3C/svg%3E");
  animation-duration: 80s !important;
}
.cuw-overlay[data-scene="autumn"] .cuw-bubbles { display: none; }

/* Compact boxes */
.cuw-deco[data-size="tiny"] .cuw-sun { width: 14px; height: 14px; top: 5px; }
.cuw-deco[data-size="tiny"] .cuw-sun i { inset: -7px; -webkit-mask: radial-gradient(circle, transparent 0 9px, #000 10px 13px, transparent 14px); mask: radial-gradient(circle, transparent 0 9px, #000 10px 13px, transparent 14px); }
.cuw-deco[data-size="tiny"][data-level="high"] .cuw-sun { top: 18%; }
.cuw-deco[data-size="tiny"] .cuw-gull { display: none; }

/* ============ Live weather scenes: wind, fog, cloudy ============ */
.cuw-wind, .cuw-fog, .cuw-cloudy { position: absolute; inset: 0; display: none; }
.cuw-deco[data-scene="wind"] .cuw-wind,
.cuw-deco[data-scene="fog"] .cuw-fog,
.cuw-deco[data-scene="cloudy"] .cuw-cloudy { display: block; }

/* Thunderstorm in the real weather: lightning even when usage is low */
.cuw-deco[data-storm="true"] .cuw-flash { animation: cuw-flash 8s linear infinite; }

/* Wind */
.cuw-gusts i {
  position: absolute;
  top: var(--y);
  left: -25%;
  width: var(--w);
  height: 1.4px;
  border-radius: 2px;
  background: linear-gradient(90deg, rgba(88, 110, 130, 0), rgba(88, 110, 130, .55));
  opacity: 0;
  animation: cuw-gust var(--d) linear var(--delay) infinite;
}
.cuw-deco[data-theme="dark"] .cuw-gusts i { background: linear-gradient(90deg, rgba(220, 230, 240, 0), rgba(220, 230, 240, .5)); }
@keyframes cuw-gust {
  0%   { transform: translateX(0); opacity: 0; }
  12%  { opacity: 1; }
  88%  { opacity: 1; }
  100% { transform: translateX(165cqw); opacity: 0; }
}
.cuw-blown i {
  position: absolute;
  top: var(--y);
  left: -8%;
  opacity: 0;
  animation: cuw-blow var(--d) linear var(--delay) infinite;
}
.cuw-blown b {
  display: block;
  width: var(--s);
  height: calc(var(--s) * .55);
  border-radius: 0 100% 0 100%;
  background: linear-gradient(135deg, #9bc27a, #5f9a4a);
  animation: cuw-tumble .8s linear infinite;
}
.cuw-blown b.light { background: linear-gradient(135deg, #dccb80, #b99c47); }
.cuw-deco[data-level="high"] .cuw-blown b { background: linear-gradient(135deg, #f0b35a, #d9772f); }
@keyframes cuw-blow {
  0%   { transform: translate(0, 0); opacity: 0; }
  8%   { opacity: 1; }
  92%  { opacity: 1; }
  100% { transform: translate(118cqw, var(--dy)); opacity: 0; }
}
@keyframes cuw-tumble { to { transform: rotate(360deg); } }
.cuw-overlay[data-scene="wind"]                    { --c1: #dbe9ea; --c2: #c6dadd; --c3: #a9c4c9; }
.cuw-overlay[data-scene="wind"][data-level="mid"]  { --c1: #ece6cf; --c2: #e0d7b2; --c3: #cfc28f; }
.cuw-overlay[data-scene="wind"][data-level="high"] { --c1: #efd9d3; --c2: #e4c0b8; --c3: #d4a49a; }
.cuw-overlay[data-scene="wind"][data-theme="dark"]                    { --c1: #1f4d55; --c2: #173c42; --c3: #102c31; }
.cuw-overlay[data-scene="wind"][data-theme="dark"][data-level="mid"]  { --c1: #5a4f22; --c2: #473e19; --c3: #342d11; }
.cuw-overlay[data-scene="wind"][data-theme="dark"][data-level="high"] { --c1: #6a3128; --c2: #55261f; --c3: #3e1b16; }
.cuw-overlay[data-scene="wind"] .cuw-wave { height: 10px; -webkit-mask-size: 150px 10px; mask-size: 150px 10px; }
.cuw-overlay[data-scene="wind"] .cuw-w1 { animation-duration: 2.4s !important; }
.cuw-overlay[data-scene="wind"] .cuw-w2 { animation-duration: 3.3s !important; }
.cuw-overlay[data-scene="wind"] .cuw-bubbles { display: none; }

/* Fog: slow banks of mist over a hushed, flat surface */
.cuw-fog span {
  position: absolute;
  left: -20%;
  width: 140%;
  height: 44%;
  border-radius: 50%;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, .7) 30%, rgba(255, 255, 255, .7) 70%, rgba(255, 255, 255, 0));
  filter: blur(9px);
  opacity: .8;
  animation: cuw-mist 34s ease-in-out infinite alternate;
}
.cuw-fog span:nth-child(1) { top: 2%; }
.cuw-fog span:nth-child(2) { top: 28%; animation-duration: 44s; animation-delay: -12s; opacity: .65; }
.cuw-fog span:nth-child(3) { top: 52%; animation-duration: 38s; animation-delay: -22s; opacity: .55; }
.cuw-deco[data-theme="dark"] .cuw-fog span { background: linear-gradient(90deg, rgba(200, 208, 222, 0), rgba(200, 208, 222, .22) 30%, rgba(200, 208, 222, .22) 70%, rgba(200, 208, 222, 0)); }
@keyframes cuw-mist { from { transform: translateX(-9%); } to { transform: translateX(9%); } }
.cuw-overlay[data-scene="fog"]                    { --c1: #e6e9ec; --c2: #d6dce1; --c3: #c0c9d1; }
.cuw-overlay[data-scene="fog"][data-level="mid"]  { --c1: #ece8dc; --c2: #e0dac8; --c3: #cfc7ad; }
.cuw-overlay[data-scene="fog"][data-level="high"] { --c1: #eddfdc; --c2: #e2cdc8; --c3: #d3b6af; }
.cuw-overlay[data-scene="fog"][data-theme="dark"]                    { --c1: #3b4650; --c2: #2f3943; --c3: #232b33; }
.cuw-overlay[data-scene="fog"][data-theme="dark"][data-level="mid"]  { --c1: #4d4a3a; --c2: #3e3b2d; --c3: #2e2c21; }
.cuw-overlay[data-scene="fog"][data-theme="dark"][data-level="high"] { --c1: #594340; --c2: #47352f; --c3: #352825; }
.cuw-overlay[data-scene="fog"] .cuw-wave { height: 8px; -webkit-mask-size: 200px 8px; mask-size: 200px 8px; }
.cuw-overlay[data-scene="fog"] .cuw-w1 { animation-duration: 60s !important; }
.cuw-overlay[data-scene="fog"] .cuw-w2 { animation-duration: 80s !important; }
.cuw-overlay[data-scene="fog"] .cuw-bubbles { display: none; }

/* Cloudy: soft clouds drifting, calm water */
.cuw-clouds--soft span { top: -16px; height: 34px; background: rgba(128, 140, 158, .24); }
.cuw-clouds--soft span:nth-child(4) { left: 82%; width: 150px; top: -12px; animation-duration: 58s; animation-delay: -30s; }
.cuw-deco[data-theme="dark"] .cuw-clouds--soft span { background: rgba(200, 208, 222, .14); }
.cuw-overlay[data-scene="cloudy"]                    { --c1: #e3ebf2; --c2: #d2dee9; --c3: #b9cbdc; }
.cuw-overlay[data-scene="cloudy"][data-level="mid"]  { --c1: #ece8dc; --c2: #e0dac8; --c3: #cfc7ad; }
.cuw-overlay[data-scene="cloudy"][data-level="high"] { --c1: #eddfdc; --c2: #e2cdc8; --c3: #d3b6af; }
.cuw-overlay[data-scene="cloudy"][data-theme="dark"]                    { --c1: #2e475f; --c2: #243a4e; --c3: #1a2b3a; }
.cuw-overlay[data-scene="cloudy"][data-theme="dark"][data-level="mid"]  { --c1: #4a4632; --c2: #3b3827; --c3: #2c2a1d; }
.cuw-overlay[data-scene="cloudy"][data-theme="dark"][data-level="high"] { --c1: #5a403c; --c2: #483330; --c3: #352624; }
.cuw-overlay[data-scene="cloudy"] .cuw-w1 { animation-duration: 12s !important; }
.cuw-overlay[data-scene="cloudy"] .cuw-bubbles { display: none; }

/* Compact boxes */
.cuw-deco[data-size="tiny"] .cuw-blown { display: none; }
.cuw-deco[data-size="tiny"] .cuw-fog span { height: 60%; }

@media (prefers-reduced-motion: reduce) {
  .cuw-gusts i, .cuw-blown i, .cuw-blown b, .cuw-fog span, .cuw-clouds--soft span { animation: none !important; }
  .cuw-gusts, .cuw-blown { display: none; }
}

/* ============ In-chat weather menu ============ */
.cuw-menu {
  all: initial;
  position: absolute;
  right: 10px;
  bottom: calc(100% + 34px);
  z-index: 50;
  width: 290px;
  box-sizing: border-box;
  padding: 10px;
  border-radius: 14px;
  background: #ffffff;
  color: #1f1e1b;
  border: 1px solid #e3e1da;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .14);
  font: 13px/1.35 system-ui, -apple-system, "Segoe UI", sans-serif;
  display: block;
}
.cuw-menu[hidden] { display: none; }
.cuw-menu.cuw-inside { bottom: auto; top: 36px; }
.cuw-menu.cuw-below { bottom: auto; top: calc(100% + 8px); }
.cuw-menu[data-theme="dark"] { background: #2a2a28; color: #eeece6; border-color: #3d3c38; box-shadow: 0 10px 30px rgba(0, 0, 0, .5); }
.cuw-menu * { box-sizing: border-box; font: inherit; color: inherit; }
.cuw-menu-h { font-weight: 650; padding: 2px 4px 8px; }
.cuw-menu-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.cuw-menu-item {
  all: unset;
  display: flex; align-items: center; gap: 8px;
  padding: 7px 9px;
  border-radius: 9px;
  border: 1px solid #e6e4dc;
  cursor: pointer;
}
.cuw-menu[data-theme="dark"] .cuw-menu-item { border-color: #3d3c38; }
.cuw-menu-item:hover { background: rgba(127, 127, 127, .1); }
.cuw-menu-item:focus-visible { outline: 2px solid currentColor; outline-offset: 1px; }
.cuw-menu-item.on { border-color: currentColor; background: rgba(127, 127, 127, .13); font-weight: 600; }
.cuw-menu-item .i { display: inline-flex; width: 18px; height: 18px; font-size: 18px; line-height: 0; flex: none; }
.cuw-menu-item .i svg { display: block; width: 1em; height: 1em; }
.cuw-menu-p { padding: 0 4px 8px; font-size: 12px; opacity: .75; }
.cuw-menu-live { margin-bottom: 6px; }
.cuw-menu-live .n { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cuw-menu-foot { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; padding: 10px 4px 2px; font-size: 12px; opacity: .9; }
.cuw-menu-foot button { all: unset; cursor: pointer; color: #a24b2a; font-size: 12px; }
.cuw-menu[data-theme="dark"] .cuw-menu-foot button { color: #f0a98c; }
.cuw-menu-foot button:hover { text-decoration: underline; }
.cuw-menu-foot button:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; border-radius: 3px; }
.cuw-menu-foot .cuw-cycle { margin-left: auto; display: inline-flex; align-items: center; gap: 5px; color: inherit; opacity: .8; }
.cuw-mi { display: inline-flex; font-size: 12px; line-height: 0; }
.cuw-mi svg { display: block; width: 1em; height: 1em; }

/* ============ Usage alert (in-page toast) ============ */
.cuw-toast {
  all: initial;
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 2147483000;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  width: min(340px, calc(100vw - 32px));
  box-sizing: border-box;
  padding: 11px 10px 11px 12px;
  border-radius: 12px;
  background: #fffdf8;
  color: #1f1e1b;
  border: 1px solid #e3e1da;
  border-left: 4px solid #d98e04;
  box-shadow: 0 10px 28px rgba(0, 0, 0, .16);
  font: 13px/1.4 system-ui, -apple-system, "Segoe UI", sans-serif;
  animation: cuw-toast-in .35s cubic-bezier(.2, .8, .2, 1);
}
.cuw-toast[data-strong="true"] { border-left-color: #d6453d; }
.cuw-toast[data-theme="dark"] { background: #2a2927; color: #eeece6; border-color: #3d3c38; border-left-color: #e0a22c; box-shadow: 0 10px 28px rgba(0, 0, 0, .5); }
.cuw-toast[data-theme="dark"][data-strong="true"] { border-left-color: #ef6b62; }
.cuw-toast * { box-sizing: border-box; font: inherit; color: inherit; }
.cuw-toast-i { display: inline-flex; font-size: 18px; line-height: 0; margin-top: 1px; flex: none; }
.cuw-toast-i svg { display: block; width: 1em; height: 1em; }
.cuw-toast-b { flex: 1; min-width: 0; display: grid; gap: 1px; }
.cuw-toast-b b { font-weight: 650; }
.cuw-toast-b span { opacity: .75; font-size: 12px; }
.cuw-toast-x { all: unset; display: inline-flex; font-size: 14px; padding: 4px; border-radius: 6px; cursor: pointer; opacity: .6; flex: none; }
.cuw-toast-x:hover { opacity: 1; background: rgba(127, 127, 127, .16); }
.cuw-toast-x:focus-visible { outline: 2px solid currentColor; opacity: 1; }
.cuw-toast-x svg { display: block; width: 1em; height: 1em; }
@keyframes cuw-toast-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .cuw-toast { animation: none; } }

@media (prefers-reduced-motion: reduce) {
  .cuw-sun i, .cuw-gull, .cuw-summer .cuw-surface span { animation: none !important; }
}
