.seasonal-decor {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  opacity: var(--seasonal-opacity, .55);
}
.seasonal-decor[data-surface="cabinet"] {
  right: auto;
  left: 50%;
  width: min(560px, 100%);
  transform: translateX(-50%);
}
.seasonal-wash { position: absolute; inset: 0; }
.seasonal-wash--winter {
  background: radial-gradient(ellipse at 82% 12%, rgba(64, 125, 174, .17), transparent 55%),
    linear-gradient(180deg, rgba(21, 57, 94, .1), transparent 70%);
}
.seasonal-wash--halloween {
  background: radial-gradient(ellipse at 94% 13%, rgba(122, 64, 34, .09), transparent 49%);
}
.seasonal-flake, .seasonal-leaf { position: absolute; left: var(--x); top: -25px; }
.seasonal-flake {
  width: var(--size); height: var(--size); color: #d9edff; opacity: .5;
  filter: drop-shadow(0 0 4px rgba(178, 224, 255, .35));
  animation: seasonal-snow var(--duration) linear var(--delay) infinite;
}
.seasonal-flake svg { display: block; width: 100%; height: 100%; }
.seasonal-leaf {
  top: -10%; width: var(--size); height: auto; opacity: .72;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .25));
  animation: seasonal-leaves var(--duration) linear var(--delay) infinite;
}
.seasonal-decor--still :is(.seasonal-flake, .seasonal-leaf) { animation: none !important; top: var(--still-y); opacity: .5; }
@keyframes seasonal-snow {
  from { transform: translate3d(0, -5vh, 0) rotate(0); opacity: 0; }
  15%, 85% { opacity: .5; }
  to { transform: translate3d(22px, 110vh, 0) rotate(85deg); opacity: 0; }
}
@keyframes seasonal-leaves {
  from { transform: translate3d(0, -5vh, 0) rotate(-25deg); opacity: 0; }
  16%, 84% { opacity: .7; }
  to { transform: translate3d(42px, 112vh, 0) rotate(155deg); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .seasonal-decor :is(.seasonal-flake, .seasonal-leaf) { animation: none !important; top: var(--still-y); opacity: .5; }
}

/* Seasonal trim follows the actual rounded control edge. */
:root[data-season="winter"][data-season-drifts="on"] [data-seasonal-surface="on"],
:root[data-season="halloween"][data-season-webs="on"] [data-seasonal-web="on"] { isolation: isolate; }
.seasonal-surface__trim { position: absolute; display: none !important; z-index: 2; pointer-events: none; overflow: hidden; border-radius: inherit; }
.seasonal-surface__trim svg { display: block; width: 100% !important; height: 100% !important; }
/* The translucent body is ice; existing control borders keep their theme color. */
:root:is([data-season="winter"][data-season-drifts="on"],[data-season="halloween"][data-season-webs="on"]) [data-seasonal-positioned="on"] { position: relative; }
:root[data-season="winter"][data-season-drifts="on"] [data-seasonal-surface="on"] > .seasonal-surface__trim--ice,
.seasonal-preview[data-season="winter"][data-season-drifts="on"] .seasonal-surface__trim--ice {
 display: block !important; inset: 1px; width: auto; height: auto;
 opacity: calc(.28 + var(--seasonal-strength, .55) * .28);
 background: radial-gradient(ellipse 30% 120% at 0% 15%,rgba(199,232,251,.16),transparent 85%),
   radial-gradient(ellipse 38% 100% at 100% 90%,rgba(164,213,244,.13),transparent 92%),
   linear-gradient(116deg,rgba(190,229,251,.11),rgba(75,139,184,.05) 40%,rgba(155,209,239,.1));
}
:root[data-season="winter"][data-season-drifts="on"] [data-seasonal-kind="control"] > .seasonal-surface__trim--ice,
.seasonal-preview[data-season="winter"][data-season-drifts="on"] .seasonal-surface__trim--ice {
 opacity: calc(.48 + var(--seasonal-strength, .55) * .44);
 background: radial-gradient(ellipse 30% 120% at 0% 15%,rgba(199,232,251,.3),transparent 85%),
   radial-gradient(ellipse 38% 100% at 100% 90%,rgba(164,213,244,.23),transparent 92%),
   linear-gradient(116deg,rgba(190,229,251,.21) 0%,rgba(75,139,184,.1) 28%,rgba(20,66,105,.13) 48%,rgba(155,209,239,.18) 78%,rgba(220,241,255,.17));
 box-shadow: inset 0 5px 14px rgba(204,237,255,.12),inset 0 -8px 13px rgba(102,175,222,.12);
}
:root[data-season="winter"][data-season-drifts="on"] .seasonal-surface__trim--ice::before,
.seasonal-preview[data-season="winter"][data-season-drifts="on"] .seasonal-surface__trim--ice::before,
:root[data-season="winter"][data-season-drifts="on"] .seasonal-surface__trim--ice::after,
.seasonal-preview[data-season="winter"][data-season-drifts="on"] .seasonal-surface__trim--ice::after {
 content: ""; position: absolute; inset: 0; opacity: .55;
 background: linear-gradient(140deg,rgba(222,246,255,.21),rgba(128,189,229,.035) 72%,transparent);
}
:root[data-season="winter"][data-season-drifts="on"] .seasonal-surface__trim--ice::before,
.seasonal-preview[data-season="winter"][data-season-drifts="on"] .seasonal-surface__trim--ice::before { clip-path: polygon(0 0,24% 0,17% 13%,8% 18%,0 50%); }
:root[data-season="winter"][data-season-drifts="on"] .seasonal-surface__trim--ice::after,
.seasonal-preview[data-season="winter"][data-season-drifts="on"] .seasonal-surface__trim--ice::after { clip-path: polygon(100% 100%,76% 100%,84% 86%,93% 79%,100% 49%); background: linear-gradient(320deg,rgba(222,246,255,.18),rgba(128,189,229,.025) 72%,transparent); }
.seasonal-ice-cracks { position: absolute; inset: 0; fill: none; stroke-linecap: round; stroke-linejoin: round; opacity: .88; }
.seasonal-ice-cracks path { vector-effect: non-scaling-stroke; }
.seasonal-ice-cracks__main { stroke: #e2f6ff; stroke-width: .85; filter: drop-shadow(0 1px 0 rgba(18, 62, 93, .8)); }
.seasonal-ice-cracks__branch { stroke: #c6e8fa; stroke-width: .6; opacity: .72; }
:root[data-season="halloween"][data-season-webs="on"] [data-seasonal-web-trim="on"] > .seasonal-surface__trim--web,
.seasonal-preview[data-season="halloween"][data-season-webs="on"] .seasonal-surface__trim--web {
 display: block !important; top: 0; right: 0; width: min(42px, 100%); height: min(42px, 100%);
 opacity: calc(.35 + var(--seasonal-strength, .55) * .55);
 filter: drop-shadow(0 0 3px rgba(241,123,39,.42)) saturate(1.35);
}
:root[data-season="halloween"][data-season-webs="on"] [data-seasonal-web-trim="on"]:not([data-seasonal-original="on"]) > .seasonal-surface__trim--web {
 width: min(28px, 100%); height: min(28px, 100%); opacity: calc(.28 + var(--seasonal-strength, .55) * .34);
}
:root[data-season="halloween"][data-season-webs="on"] #app .bottom-nav > .seasonal-surface__trim--web { right: -5px; top: -5px; }
:root[data-season="halloween"][data-season-webs="on"] [data-seasonal-slot="first"] > .seasonal-surface__trim--web,
.seasonal-preview[data-season="halloween"][data-season-webs="on"] .seasonal-preview__button:nth-of-type(3) .seasonal-surface__trim--web { right: auto; left: 0; transform: scaleX(-1); }
:root[data-season="halloween"][data-season-webs="on"] [data-seasonal-slot="second"] > .seasonal-surface__trim--web,
.seasonal-preview[data-season="halloween"][data-season-webs="on"] .seasonal-preview__button:nth-of-type(4) .seasonal-surface__trim--web { top: auto; bottom: 0; transform: scaleY(-1); }
:root[data-season="halloween"][data-season-webs="on"] [data-seasonal-web="on"] {
 border-color: color-mix(in srgb, var(--line, #6b6057) 58%, #c8793e) !important;
 box-shadow: inset 0 1px 0 rgba(241,137,63,.18), inset 0 0 18px rgba(201,107,43,.06), 0 0 13px rgba(202,106,44,.07);
}
:root[data-season="halloween"][data-season-webs="on"] [data-seasonal-web="on"]:not([data-seasonal-original="on"]) {
 border-color: color-mix(in srgb, var(--line, #6b6057) 82%, #c8793e) !important;
 box-shadow: inset 0 1px 0 rgba(241,137,63,.09),0 0 11px rgba(202,106,44,.045);
}
:root[data-season="halloween"][data-season-webs="on"] #app .bottom-nav { background-image: linear-gradient(105deg,rgba(143,72,32,.12),transparent 30%,transparent 70%,rgba(143,72,32,.1)); }
:root[data-frames="off"] [data-seasonal-surface="on"] { border-color: transparent !important; }
.seasonal-spider { display: none; }
:root[data-season="halloween"][data-season-webs="on"][data-season-spider="on"] .runtime-layout-item[data-runtime-id="subscription_switcher"] .subscription-switcher__trigger { overflow: visible; }
:root[data-season="halloween"][data-season-webs="on"][data-season-spider="on"] .subscription-switcher__trigger .seasonal-spider,
.seasonal-preview[data-season="halloween"][data-season-webs="on"][data-season-spider="on"] .seasonal-spider {
 position: absolute; z-index: 3; display: block; top: 17px; right: 4px; width: 19px; height: 29px;
 color: #b57845; opacity: calc(var(--seasonal-strength, .55) * .8); pointer-events: none;
}
.seasonal-spider svg { display: block; width: 100%; height: 100%; }
.seasonal-preview {
  position: relative;
  isolation: isolate;
  display: grid;
  justify-items: center;
  align-content: start;
  gap: 9px;
  height: 278px;
  padding: 13px 20px 11px;
  overflow: hidden;
  border: 1px solid var(--line, var(--border, #343d49));
  border-radius: 18px;
  background: linear-gradient(150deg, #101c2a, #080d15 75%);
  color: #f5f8ff;
  --seasonal-strength: .8;
}
.seasonal-preview::before {
  content: "";
  position: absolute;
  inset: -30%;
  z-index: -1;
  background: linear-gradient(90deg, transparent 97%, rgba(115, 171, 213, .1) 98%),
    linear-gradient(transparent 97%, rgba(115, 171, 213, .1) 98%);
  background-size: 42px 42px;
  transform: rotate(-9deg);
}
.seasonal-preview[data-season="halloween"] { background: linear-gradient(150deg, #131922, #0a0d12 75%); }
.seasonal-preview[data-season="halloween"] :is(.seasonal-preview__switcher, .seasonal-preview__button, .seasonal-preview__nav) { border-color: rgba(204, 138, 84, .45); }
.seasonal-preview__switcher, .seasonal-preview__button, .seasonal-preview__nav {
  position: relative;
  z-index: 1;
  border: 1px solid rgba(193, 216, 235, .35);
  background: rgba(17, 25, 35, .7);
  box-shadow: 0 7px 18px rgba(0, 0, 0, .2);
  backdrop-filter: blur(8px);
}
.seasonal-preview__switcher { display: flex; align-items: center; justify-content: center; gap: 8px; width: 134px; min-height: 34px; border-radius: 999px; font-size: 12px; font-weight: 750; }
.seasonal-preview__switcher > span:not(.seasonal-spider) { color: #a7d7f2; }
.seasonal-preview__details { z-index: 1; display: flex; justify-content: space-between; align-items: center; width: 100%; margin-top: 14px; padding: 0 4px; color: #f0f5fb; }
.seasonal-preview__details strong { font-size: 15px; }
.seasonal-preview__details small { color: #b5c8d6; font-size: 10px; }
.seasonal-preview__button { display: grid; place-items: center; width: 100%; min-height: 38px; border-radius: 13px; font-size: 12px; font-weight: 700; }
.seasonal-preview__nav { display: flex; align-items: center; justify-content: space-around; width: 90%; min-height: 40px; margin-top: 8px; border-radius: 999px; color: #add4eb; font-size: 18px; }
.seasonal-decor--preview { position: absolute; z-index: 0; }
.seasonal-decor--preview .seasonal-flake { max-width: 12px; }
.seasonal-decor--preview .seasonal-leaf { max-width: 15px; }

.admin-seasonal-editor { display: grid; gap: 13px; padding: 15px; border: 1px solid var(--line, var(--border)); border-radius: 18px; background: var(--surface); box-shadow: 0 12px 28px rgba(0, 0, 0, .13); }
/* The generic first-section rule removes border-top; these are standalone cards. */
.appearance-settings > .admin-editor__section.admin-theme-library { border-top: 1px solid var(--line-soft); }
.appearance-panel > .admin-editor__section.admin-seasonal-editor { border-top: 1px solid var(--line, var(--border)); }
.appearance-tabs { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.appearance-tabs > button { min-width: 0; padding-inline: 5px; font-size: 11px; }
:root[data-glass="on"] .admin-seasonal-editor { background: var(--glass-background) !important; background-image: var(--glass-texture) !important; border-color: var(--glass-border) !important; box-shadow: var(--glass-surface-shadow) !important; backdrop-filter: var(--glass-backdrop); -webkit-backdrop-filter: var(--glass-backdrop); }
.admin-seasonal-editor__header { display: flex; align-items: center; gap: 10px; }
.admin-seasonal-editor[data-seasonal-edit-mode="winter"] { --seasonal-header-color: #9acdf2; }
.admin-seasonal-editor[data-seasonal-edit-mode="halloween"] { --seasonal-header-color: #db9459; }
.admin-seasonal-editor__icon { display: grid; place-items: center; flex: 0 0 30px; width: 30px; height: 30px; border-radius: 10px; background: color-mix(in srgb,var(--seasonal-header-color, var(--accent)) 14%,var(--control-bg, var(--surface))); color: var(--seasonal-header-color, var(--accent)); }
.admin-seasonal-editor__icon svg, .admin-seasonal-editor__icon .app-svg-icon { width: 17px; height: 17px; }
.admin-seasonal-editor h3 { margin: 0; font-size: 14px; color: var(--text); text-transform: none; }
.admin-seasonal-modes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.admin-seasonal-mode { --mode-accent: var(--accent); position: relative; display: grid; grid-template-rows: 30px auto; align-content: start; gap: 8px; min-width: 0; min-height: 92px; padding: 10px; overflow: hidden; border: 1px solid var(--line, var(--border)); border-radius: 14px; background: linear-gradient(150deg,color-mix(in srgb,var(--mode-accent) 5%,var(--control-bg, var(--surface))),var(--control-bg, var(--surface))); color: var(--text); font: inherit; text-align: left; cursor: pointer; box-shadow: inset 0 1px rgba(255,255,255,.035); transition: background .22s,border-color .22s,box-shadow .22s,transform .22s; }
.admin-seasonal-mode[data-value="winter"] { --mode-accent: #9acdf2; }
.admin-seasonal-mode[data-value="halloween"] { --mode-accent: #db9459; }
.admin-seasonal-mode:hover { transform: translateY(-2px); border-color: color-mix(in srgb,var(--mode-accent) 55%,var(--line, var(--border))); }
.admin-seasonal-mode:focus-visible { outline: 2px solid var(--mode-accent); outline-offset: 2px; }
.admin-seasonal-mode.is-selected { border-color: var(--mode-accent); background: linear-gradient(145deg,color-mix(in srgb,var(--mode-accent) 16%,var(--control-bg, var(--surface))),var(--control-bg, var(--surface)) 76%); box-shadow: inset 0 1px rgba(255,255,255,.085),0 0 0 1px color-mix(in srgb,var(--mode-accent) 20%,transparent),0 7px 20px color-mix(in srgb,var(--mode-accent) 9%,transparent); }
.admin-seasonal-mode.is-selected::after { content:""; position:absolute; top:12px; right:12px; width:5px; height:5px; border-radius:50%; background:var(--mode-accent); box-shadow:0 0 8px var(--mode-accent); }
.admin-seasonal-mode__mark { display:grid; place-items:center; width:30px; height:30px; border-radius:9px; background:color-mix(in srgb,var(--mode-accent) 13%,var(--control-bg, var(--surface))); color:var(--mode-accent); }
.admin-seasonal-mode__mark svg { display:block; width:19px; height:19px; }
.admin-seasonal-mode__copy { display:grid; gap:3px; min-width:0; }
.admin-seasonal-mode strong { font-size:11px; line-height:1.18; }
.admin-seasonal-mode small { color:var(--muted); font-size:9px; line-height:1.25; }
.admin-seasonal-options { display: grid; gap: 8px; }
.admin-seasonal-options .admin-toggle { margin: 0; }
@media (max-width: 380px) { .admin-seasonal-mode { padding:8px; min-height:88px; } .admin-seasonal-mode small { font-size:8.5px; } }
:root[data-frames="off"] .admin-seasonal-editor, :root[data-frames="off"] .admin-seasonal-mode { border-color: transparent !important; }
