/* Eight small worlds, layered over the existing brightness/style preference. */
:root[data-season="pepero"][data-season] {
  --bg: #23151C;
  --surface: #302029;
  --surface-2: #3C2932;
  --border: #503640;
  --border-strong: #79545D;
  --primary: #EFA9B3;
  --primary-strong: #FFD0CA;
  --season-secondary: #D7AB77;
  --text: #FFF0E8;
  --text-secondary: #DFC9C9;
  --text-muted: #BAA0AD;
  --field: #1D1017;
}
:root[data-season="autumn"][data-season] {
  --bg: #211A16;
  --surface: #2D231C;
  --surface-2: #392D23;
  --border: #514031;
  --border-strong: #806046;
  --primary: #E8AD6A;
  --primary-strong: #F4CD98;
  --season-secondary: #B8C794;
  --text: #FFF2DF;
  --text-secondary: #D9C9B5;
  --text-muted: #B7A38F;
  --field: #1B1512;
}
:root[data-season="snow"][data-season] {
  --bg: #111E31;
  --surface: #1B2A40;
  --surface-2: #253650;
  --border: #344963;
  --border-strong: #597591;
  --primary: #A6D8F1;
  --primary-strong: #D4EBFB;
  --season-secondary: #C2C5EE;
  --text: #F0F6FF;
  --text-secondary: #C5D3E5;
  --text-muted: #9EADC5;
  --field: #0E192A;
}
:root[data-season="christmas"][data-season] {
  --bg: #101F1C;
  --surface: #192C26;
  --surface-2: #233A30;
  --border: #365344;
  --border-strong: #5D7F65;
  --primary: #EAC681;
  --primary-strong: #FFE2AA;
  --season-secondary: #E3A1A1;
  --text: #F9F4E4;
  --text-secondary: #CBD9C5;
  --text-muted: #A1B8AA;
  --field: #0C1916;
}
:root[data-season="newyear"][data-season] {
  --bg: #181C32;
  --surface: #232840;
  --surface-2: #30364F;
  --border: #454C68;
  --border-strong: #717898;
  --primary: #F2BC9D;
  --primary-strong: #FFDAC0;
  --season-secondary: #ACBCE9;
  --text: #F9F0ED;
  --text-secondary: #D5CEE1;
  --text-muted: #B1ABC5;
  --field: #14172B;
}
:root[data-season="bungeoppang"][data-season] {
  --bg: #251C18;
  --surface: #33271F;
  --surface-2: #423328;
  --border: #5A4433;
  --border-strong: #88664A;
  --primary: #EBC08A;
  --primary-strong: #FFDEB1;
  --season-secondary: #C9B79E;
  --text: #FFF4DF;
  --text-secondary: #DFCCB4;
  --text-muted: #BFA78E;
  --field: #1F1713;
}
:root[data-season="seollal"][data-season] {
  --bg: #211B2B;
  --surface: #2D2638;
  --surface-2: #3B3048;
  --border: #51425E;
  --border-strong: #7B6888;
  --primary: #BDD7BF;
  --primary-strong: #DDEDD5;
  --season-secondary: #E7B2C5;
  --text: #FAF1ED;
  --text-secondary: #D9CDDF;
  --text-muted: #B5A3BE;
  --field: #1A1624;
}
:root[data-season="sakura"][data-season] {
  --bg: #261B2C;
  --surface: #342638;
  --surface-2: #443249;
  --border: #59435E;
  --border-strong: #86698A;
  --primary: #F2B8CF;
  --primary-strong: #FFDFE8;
  --season-secondary: #B7D7CB;
  --text: #FFF0F5;
  --text-secondary: #E4CDDD;
  --text-muted: #C0A6BA;
  --field: #201624;
}

:root[data-season][data-season]:not([data-season="halloween"]) {
  color-scheme: dark;
  --primary-soft: var(--surface-2);
  --link-color: var(--primary-strong);
  --button-primary-bg: var(--primary);
  --button-primary-hover: var(--primary-strong);
  --button-primary-fg: var(--bg);
  --on-solid: var(--bg);
  --text-disabled: var(--text-muted);
  --success: #A3DEB6;
  --success-soft: #203C30;
  --warning: #F6CF8D;
  --warning-soft: #443423;
  --danger: #FFA6B1;
  --danger-soft: #482A36;
  --info: #AFCFEF;
  --info-soft: #25384C;
  --editor-bg: var(--field);
  --editor-fg: var(--text);
  --editor-accent: var(--primary-strong);
  --field-border: var(--border-strong);
  --overlay: rgba(8, 8, 15, .68);
  --overlay-strong: rgba(8, 8, 15, .85);
  --shadow-2: 0 2px 8px #00000030;
  --shadow-3: 0 12px 32px #00000050;
}
:root[data-season]:not([data-season="halloween"]) body {
  background-image: radial-gradient(ellipse at 90% 0, color-mix(in srgb, var(--season-secondary) 8%, transparent), transparent 45%);
  background-attachment: fixed;
  background-repeat: no-repeat;
}
:root[data-season]:not([data-season="halloween"]) .sidebar {
  background-image: radial-gradient(ellipse at 0 0, color-mix(in srgb, var(--primary) 8%, transparent), transparent 50%);
}
:root[data-season]:not([data-season="halloween"]) .brand-logo-light { display: none; }
:root[data-season]:not([data-season="halloween"]) .brand-logo-dark { display: block; }
:root[data-season]:not([data-season="halloween"]) .sidebar .nav-item.active {
  background: linear-gradient(105deg, color-mix(in srgb, var(--primary) 22%, var(--surface)), var(--surface-2));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--primary) 22%, transparent);
}
:root[data-season]:not([data-season="halloween"]) .home-panel {
  border-color: var(--border);
  box-shadow: inset 0 1px 0 color-mix(in srgb, var(--primary) 7%, transparent);
}
/* Older controls use white labels instead of the shared foreground token. */
:root[data-season]:not([data-season="halloween"]) :is(.fb-thumb-del, .fb-item-thumb-more, .fb-zoom, .set-switch-track, .chat-empty-hero-icon) { --on-solid: #FFFFFF; }
:root[data-season]:not([data-season="halloween"]) :is(.ls-go, .ls-pg.is-on, .ls-fcount, .js-go, .js-pg.is-on, .js-fcount, .lv-pop-go, .lv-field-btn, .rv-tab.is-on .rv-count, .rv-msg.is-user .rv-msg-body, .rv-chat-send, .guard-modal-ok, .shop-tag, .cel-banner-tag, .adm-group-n, button.adm-surveys-count[aria-expanded="true"]) { color: var(--on-solid); }
:root[data-season]:not([data-season="halloween"]) .btn-full-analyze-sub { color: var(--bg); }
:root[data-season]:not([data-season="halloween"]) .btn-full-analyze .mode-chip:not(.mode-chip-done):not(.mode-chip-error) { color: var(--on-solid); }
:root[data-season]:not([data-season="halloween"]) .notice-text a.notice-cta { color: var(--on-solid) !important; }

/* One anchored discovery button. Its X position and 44px target never change. */
.halloween-drop[hidden], .season-icon[hidden] { display: none !important; }
:root:not([data-season-current="halloween"]) .halloween-pumpkin { display: none; }
/* The pumpkin's landing shadow otherwise adds a second gray rim below each icon. */
:root:not([data-season-current="halloween"]) .halloween-drop::after { display: none; }
.season-icon { display: block; width: 36px; height: 36px; object-fit: contain; }
:root[data-season]:not([data-season="halloween"]) .season-icon { filter: drop-shadow(0 0 7px color-mix(in srgb, var(--primary) 35%, transparent)); }
:root:not([data-season-current="halloween"]) .halloween-drop.is-revealed .halloween-toggle { animation: season-reveal 520ms cubic-bezier(.2, .7, .25, 1) both; }
:root[data-season-current="autumn"] .halloween-drop.is-revealed .season-icon { animation: season-leaf 850ms ease-out both; }
:root[data-season-current="snow"] .halloween-drop.is-revealed .season-icon { animation: season-snowflake 700ms ease-out both; }
:root[data-season-current="pepero"] .halloween-drop.is-revealed .season-icon { animation: season-unfold 620ms cubic-bezier(.2, .8, .3, 1.2) both; }
:root[data-season-current="christmas"] .halloween-drop.is-revealed .season-icon,
:root[data-season-current="sakura"] .halloween-drop.is-revealed .season-icon { animation: season-bloom 700ms cubic-bezier(.2, .8, .3, 1.1) both; }
:root[data-season-current="bungeoppang"] .halloween-drop.is-revealed .season-icon { animation: season-wiggle 700ms ease-out both; }
:root[data-season-current="seollal"] .halloween-drop.is-revealed .season-icon { animation: season-pouch 700ms ease-out both; }
:root .halloween-drop.is-restored .halloween-toggle,
:root .halloween-drop.is-restored .season-icon { animation: none !important; }
@keyframes season-reveal { from { transform: translateY(-33px); } to { transform: translateY(var(--halloween-rest-y)); } }
@keyframes season-leaf { 0% { transform: rotate(-40deg); } 50% { transform: rotate(15deg); } 100% { transform: rotate(0); } }
@keyframes season-snowflake { from { transform: rotate(-90deg) scale(.7); } to { transform: rotate(0) scale(1); } }
@keyframes season-unfold { from { transform: scaleX(.4); } to { transform: scaleX(1); } }
@keyframes season-bloom { 0% { transform: scale(.35); } 70% { transform: scale(1.08); } 100% { transform: scale(1); } }
@keyframes season-wiggle { 0%, 100% { transform: rotate(0); } 40% { transform: rotate(14deg); } 70% { transform: rotate(-8deg); } }
@keyframes season-pouch { 0% { transform: scaleY(.5); transform-origin: 50% 0; } 65% { transform: scaleY(1.1); } 100% { transform: scaleY(1); } }

/* The scene is its own quiet, bounded space; work controls remain unobscured. */
.season-scene, .season-sidebar-decor { display: none; }
.season-scene, .season-scene *, .season-sidebar-decor, .season-sidebar-decor * { pointer-events: none; user-select: none; }
:root[data-season]:not([data-season="halloween"]) .season-scene {
  display: flex;
  position: relative;
  align-items: center;
  isolation: isolate;
  min-height: 232px;
  margin: 0 0 28px;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--primary) 38%, var(--surface));
  border-radius: 22px;
  background:
    radial-gradient(ellipse at 78% 30%, color-mix(in srgb, var(--season-secondary) 17%, transparent), transparent 60%),
    radial-gradient(ellipse at 72% 110%, color-mix(in srgb, var(--primary) 9%, transparent), transparent 54%),
    linear-gradient(115deg, var(--surface), var(--bg));
  box-shadow: 0 18px 44px #00000025, inset 0 1px 0 color-mix(in srgb, var(--primary) 22%, transparent), inset 0 -28px 60px #00000010;
}
.season-scene::before {
  content: '';
  position: absolute;
  inset: 0;
  opacity: .055;
  mix-blend-mode: soft-light;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Cpath fill='%23fff' filter='url(%23n)' d='M0 0h160v160H0z'/%3E%3C/svg%3E");
}
.season-scene::after {
  content: '';
  position: absolute;
  inset: 9px;
  border: 1px solid color-mix(in srgb, var(--primary) 12%, transparent);
  border-radius: 17px;
  z-index: 3;
}
.season-scene-halo { position: absolute; inset: 0; background: radial-gradient(ellipse at 78% 55%, color-mix(in srgb, var(--primary) 16%, transparent), transparent 60%); animation: season-atmosphere 7s ease-in-out infinite alternate; }
@keyframes season-atmosphere { from { opacity: .35; transform: translateX(-8px); } to { opacity: 1; transform: translateX(8px); } }
.season-scene-copy { position: relative; z-index: 2; flex: 0 0 43%; padding: 20px 0 22px 38px; box-sizing: border-box; }
.season-scene-eyebrow { display: flex; align-items: center; gap: 9px; margin-bottom: 9px; font-size: 8px; font-weight: 600; line-height: 1.5; letter-spacing: .17em; color: var(--primary); }
.season-scene-emblem { display: grid; place-items: center; width: 24px; height: 24px; flex-shrink: 0; border: 1px solid color-mix(in srgb, var(--primary) 25%, transparent); border-radius: 50%; background: radial-gradient(circle at 40% 30%, color-mix(in srgb, var(--primary) 13%, transparent), transparent 80%); box-shadow: inset 0 0 0 3px color-mix(in srgb, var(--primary) 3%, transparent); }
.season-scene-emblem img { display: block; width: 17px; height: 17px; object-fit: contain; }
.season-scene-title { margin: 0; color: var(--text); font: 400 clamp(30px, 3.2vw, 43px)/1.02 Georgia, 'Times New Roman', serif; letter-spacing: -.045em; }
.season-scene-title > span { display: block; }
.season-scene-title em { display: block; margin-top: 2px; font-size: 1.12em; font-weight: 400; color: var(--primary-strong); text-shadow: 0 0 30px color-mix(in srgb, var(--primary) 16%, transparent); }
.season-scene-caption { margin: 11px 0 0; max-width: 340px; color: var(--text-secondary); font-size: 12px; line-height: 1.6; word-break: keep-all; }
.season-scene-rule { display: block; position: relative; width: 56px; height: 1px; margin-top: 12px; background: linear-gradient(90deg, var(--primary), transparent); opacity: .65; }
.season-scene-rule::after { content: ''; position: absolute; width: 3px; height: 3px; top: -1px; left: 0; transform: rotate(45deg); background: var(--primary); }
.season-scene-art { position: absolute; right: 0; bottom: 3px; width: 58%; height: calc(100% - 6px); object-fit: contain; object-position: center; }
.season-scene-date { display: flex; align-items: center; gap: 12px; position: absolute; z-index: 4; bottom: 17px; right: 22px; color: var(--primary); font: 9px/1.5 Georgia, serif; letter-spacing: .17em; padding: 2px 0 2px 20px; background: linear-gradient(90deg, transparent, var(--bg) 30%); }
.season-sidebar-decor { flex-shrink: 0; height: 108px; margin: auto 0 12px; overflow: hidden; }
.season-sidebar-decor span { display: block; position: relative; z-index: 1; color: var(--text-secondary); font: italic 12px/1.4 Georgia, serif; text-align: center; }
.season-sidebar-decor img { display: block; width: 100%; height: 92px; object-fit: contain; }
@media (min-width: 769px) and (min-height: 900px) {
  :root[data-season="halloween"] .sidebar .halloween-sidebar-decor ~ .footer { margin-top: 0; }
}
@media (min-width: 769px) and (min-height: 1050px) {
  :root[data-season]:not([data-season="halloween"]) .season-sidebar-decor { display: block; }
  :root[data-season]:not([data-season="halloween"]) .season-sidebar-decor + .footer { margin-top: 0; }
}

/* Staggered foreground and background motion stays inside the artwork area. */
.season-particles { position: absolute; inset: 20px 2% 18px 48%; z-index: 3; overflow: hidden; --season-fall-distance: 220px; }
.season-particles i { position: absolute; opacity: 0; top: -14px; left: calc(2% + var(--i) * 4%); width: 3px; height: 3px; background: var(--primary-strong); border-radius: 50%; animation: season-drift calc(6s + var(--i) * .17s) calc(var(--i) * -.83s) linear infinite; }
.season-particles i:nth-child(3n) { width: 2px; height: 2px; animation-duration: calc(9s + var(--i) * .1s); }
:root:is([data-season="snow"], [data-season="christmas"]) .season-particles i:nth-child(4n) { width: 6px; height: 6px; clip-path: polygon(50% 0, 60% 35%, 95% 25%, 72% 50%, 95% 75%, 60% 65%, 50% 100%, 40% 65%, 5% 75%, 28% 50%, 5% 25%, 40% 35%); }
:root[data-season="autumn"] .season-particles i { width: 7px; height: 10px; border-radius: 80% 0 80% 0; background: var(--primary); animation-name: season-petal; }
:root[data-season="autumn"] .season-particles i:nth-child(3n) { background: #D98B68; width: 5px; height: 7px; }
:root[data-season="sakura"] .season-particles i { width: 7px; height: 10px; border-radius: 80% 10% 70% 20%; background: #F8C6DE; animation-name: season-petal; }
:root[data-season="sakura"] .season-particles i:nth-child(3n) { background: #FFE8EF; width: 5px; height: 7px; }
:root:is([data-season="autumn"], [data-season="sakura"]) .season-particles i:nth-child(n + 19) { display: none; }
:root:is([data-season="pepero"], [data-season="seollal"]) .season-particles i { top: calc(8% + var(--i) * 6%); left: calc(5% + var(--i) * 6%); width: 6px; height: 6px; border-radius: 0; clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%); animation: season-glimmer calc(3.2s + var(--i) * .19s) calc(var(--i) * -.7s) ease-in-out infinite; }
:root:is([data-season="pepero"], [data-season="seollal"]) .season-particles i:nth-child(n + 15) { display: none; }
:root:is([data-season="bungeoppang"], [data-season="newyear"]) .season-particles { display: none; }
:root[data-season="newyear"].season-celebrate .season-scene-halo { animation: season-dawn 2400ms ease-out both; }
@keyframes season-drift { 0% { opacity: 0; transform: translate(0, 0); } 12% { opacity: .8; } 50% { transform: translate(-12px, calc(var(--season-fall-distance) * .48)); } 84% { opacity: .6; } 100% { opacity: 0; transform: translate(25px, var(--season-fall-distance)); } }
@keyframes season-petal { 0% { opacity: 0; transform: translate(0, 0) rotate(-20deg); } 12% { opacity: .85; } 48% { transform: translate(-24px, calc(var(--season-fall-distance) * .45)) rotate(110deg); } 82% { opacity: .65; } 100% { opacity: 0; transform: translate(30px, var(--season-fall-distance)) rotate(280deg); } }
@keyframes season-glimmer { 0%, 100% { opacity: .08; transform: translateY(5px) scale(.65) rotate(0); } 45% { opacity: .9; transform: translateY(-5px) scale(1.25) rotate(45deg); } }
@keyframes season-dawn { from { opacity: 0; background-color: #F4C6A036; } to { opacity: 1; background-color: transparent; } }

.season-garland { display: none; position: absolute; z-index: 3; top: -11px; left: 4%; width: 92%; height: 38px; border-bottom: 1px solid #A28E5755; border-radius: 0 0 50% 50%; }
:root[data-season="christmas"] .season-garland { display: flex; align-items: flex-end; justify-content: space-around; }
.season-garland i { width: 4px; height: 7px; margin-bottom: -4px; border-radius: 2px 2px 50% 50%; background: #F5D99D; box-shadow: 0 0 6px #FFD68A80, 0 0 14px #FFD68A30; }
.season-garland i:nth-child(3n) { background: #EAB0A9; box-shadow: 0 0 8px #D2716550; }
.season-garland i:nth-child(3n + 1) { background: #CDE5BD; box-shadow: 0 0 8px #A2C98350; }
.season-garland i { animation: season-light calc(2.8s + var(--i) * .09s) calc(var(--i) * -.45s) ease-in-out infinite; }
@keyframes season-light { 0%, 100% { opacity: .3; } 50% { opacity: 1; } }
.season-extra-gift { display: none; position: relative; flex-shrink: 0; width: 16px; height: 16px; border-radius: 2px; background: #B56770; box-shadow: 0 2px 7px #0004; }
:root[data-season="christmas"].season-christmas-eve .season-extra-gift { display: block; }
.season-extra-gift::before { content: ''; position: absolute; top: 0; left: 6px; width: 4px; height: 100%; background: #EBD49E; }
.season-extra-gift::after { content: ''; position: absolute; left: -1px; top: -2px; width: 18px; height: 4px; border-radius: 1px; background: #D58E91; }
.season-extra-gift i { position: absolute; width: 9px; height: 5px; top: -7px; left: 3px; border: 1px solid #EBD49E; border-radius: 50%; }

@media (max-width: 1100px) and (min-width: 641px) {
  .season-scene-copy { padding-left: 26px; flex-basis: 49%; }
  .season-scene-eyebrow { font-size: 8px; letter-spacing: .12em; }
  .season-scene-emblem { width: 22px; height: 22px; }
  .season-scene-emblem img { width: 16px; height: 16px; }
  .season-scene-title { font-size: 30px; }
  .season-scene-caption { font-size: 11px; }
  .season-scene-art { width: 54%; right: -2%; }
}
@media (max-width: 768px) {
  :root[data-season]:not([data-season="halloween"]) .mobile-header { border-bottom-color: var(--border-strong); }
  :root[data-season]:not([data-season="halloween"]) .mobile-bottom-nav { background: linear-gradient(0deg, var(--surface), var(--surface-2)); border-top-color: var(--border-strong); }
}
@media (max-width: 640px) {
  :root[data-season]:not([data-season="halloween"]) .season-scene { display: flex; flex-direction: column; min-height: 0; border-radius: 18px; margin-bottom: 24px; }
  .season-scene-copy { align-self: stretch; flex: none; padding: 20px 20px 0; text-align: center; }
  .season-scene-eyebrow { justify-content: center; gap: 8px; font-size: 8px; letter-spacing: .14em; margin-bottom: 8px; }
  .season-scene-emblem { width: 20px; height: 20px; }
  .season-scene-emblem img { width: 15px; height: 15px; }
  .season-scene-title { font-size: 31px; line-height: 1; }
  .season-scene-title > span, .season-scene-title em { display: inline; font-size: 1em; }
  .season-scene-title em::before { content: ' '; }
  .season-scene-caption { max-width: none; font-size: 11px; margin-top: 10px; }
  .season-scene-rule { display: none; }
  .season-scene-art { position: relative; right: auto; bottom: auto; width: 100%; height: 152px; margin: 0; object-position: center; }
  .season-scene-date { font-size: 8px; right: 12px; bottom: 9px; }
  .season-scene::after { inset: 7px; border-radius: 14px; }
  .season-garland { top: -23px; }
  .season-particles { inset: 42% 4% 18px; --season-fall-distance: 170px; }
}
@media (max-width: 360px) { .season-scene-title { font-size: 26px; } }
@media (prefers-reduced-motion: reduce) {
  :root .halloween-drop.is-revealed .halloween-toggle,
  :root .halloween-drop.is-revealed .season-icon,
  .season-scene * { animation: none !important; transition: none !important; }
  .season-particles { display: none; }
}
@media print {
  .season-scene, .season-sidebar-decor, .halloween-drop { display: none !important; }
}
