:root {
    --season-accent: #4389bd;
    --season-accent-strong: #2563eb;
    --season-soft: #eff6ff;
    --season-soft-2: #dbeafe;
    --season-border: #dbe7f3;
    --season-glow: rgba(191, 219, 254, .48);
    --season-shadow: rgba(37, 99, 235, .08);
}
:root[data-theme="spring"] { --season-accent:#db6f91;--season-accent-strong:#c94f78;--season-soft:#fff3f6;--season-soft-2:#f9dce5;--season-border:#f2d5de;--season-glow:rgba(251,207,220,.48);--season-shadow:rgba(201,79,120,.08) }
:root[data-theme="summer"] { --season-accent:#55a276;--season-accent-strong:#37865a;--season-soft:#f1faf4;--season-soft-2:#d9efdf;--season-border:#d3e9da;--season-glow:rgba(190,229,201,.48);--season-shadow:rgba(55,134,90,.08) }
:root[data-theme="autumn"] { --season-accent:#df7b3e;--season-accent-strong:#c9632c;--season-soft:#fff6ef;--season-soft-2:#f8dfcf;--season-border:#f0d8c9;--season-glow:rgba(247,205,172,.5);--season-shadow:rgba(201,99,44,.09) }
:root[data-theme="winter"] { --season-accent:#538fc1;--season-accent-strong:#3477ae;--season-soft:#f1f7fc;--season-soft-2:#d9e9f6;--season-border:#d2e3f0;--season-glow:rgba(190,216,238,.52);--season-shadow:rgba(52,119,174,.08) }
:root[data-theme="spring"] { --season-branch:url("assets/themes/spring-branch-v3.png");--season-particle:"✿" }
:root[data-theme="summer"] { --season-branch:url("assets/themes/summer-branch-v3.png");--season-particle:"❧" }
:root[data-theme="autumn"] { --season-branch:url("assets/themes/autumn-branch-v3.png");--season-particle:"◆" }
:root[data-theme="winter"] { --season-branch:url("assets/themes/winter-branch-v3.png");--season-particle:"❄" }

html,body { transition:background-color .28s,color .2s }
html[data-theme]:not([data-theme="default"]) body {
    background-color:#fff !important;
    background-image:radial-gradient(circle at 9% 22%,var(--season-soft-2) 0 2px,transparent 3px),radial-gradient(circle at 91% 31%,var(--season-soft-2) 0 2px,transparent 3px),radial-gradient(circle at 17% 72%,var(--season-soft-2) 0 1.5px,transparent 2.5px),radial-gradient(circle at 84% 78%,var(--season-soft-2) 0 1.5px,transparent 2.5px),radial-gradient(ellipse 72% 44% at 50% -8%,var(--season-glow),transparent 72%),linear-gradient(180deg,#fff 0%,var(--season-soft) 58%,#fff 100%) !important;
}
html[data-theme]:not([data-theme="default"])::before,
html[data-theme]:not([data-theme="default"])::after { position:fixed;z-index:0;color:var(--season-accent);font-family:Georgia,serif;font-size:25px;line-height:1;opacity:.24;pointer-events:none }
html[data-theme]:not([data-theme="default"])::before { content:"❧";top:17px;left:20px;transform:rotate(-24deg) }
html[data-theme]:not([data-theme="default"])::after { content:"❧";right:22px;bottom:18px;transform:rotate(154deg) }
html[data-theme="spring"]::before,html[data-theme="spring"]::after { content:"❀" }
html[data-theme="winter"]::before,html[data-theme="winter"]::after { content:"❄" }
body>* { position:relative }
.season-particles { position:fixed;inset:0;z-index:55;overflow:hidden;pointer-events:none }
.season-particles i { position:absolute;top:-7vh;left:var(--particle-x);width:7px;height:11px;border-radius:80% 20% 75% 25%;background:var(--season-accent);opacity:0;transform:rotate(20deg);animation:season-drift var(--particle-speed) linear var(--particle-delay) infinite }
:root[data-theme="default"] .season-particles { display:none }
.season-particles i:nth-child(1){--particle-x:42%;--particle-speed:13s;--particle-delay:-5s}.season-particles i:nth-child(2){--particle-x:55%;--particle-speed:17s;--particle-delay:-12s}.season-particles i:nth-child(3){--particle-x:68%;--particle-speed:15s;--particle-delay:-2s}.season-particles i:nth-child(4){--particle-x:82%;--particle-speed:19s;--particle-delay:-15s}.season-particles i:nth-child(5){--particle-x:96%;--particle-speed:14s;--particle-delay:-8s}.season-particles i:nth-child(6){--particle-x:35%;--particle-speed:18s;--particle-delay:-3s}.season-particles i:nth-child(7){--particle-x:48%;--particle-speed:16s;--particle-delay:-13s}.season-particles i:nth-child(8){--particle-x:61%;--particle-speed:20s;--particle-delay:-7s}.season-particles i:nth-child(9){--particle-x:74%;--particle-speed:15s;--particle-delay:-10s}.season-particles i:nth-child(10){--particle-x:88%;--particle-speed:18s;--particle-delay:-1s}.season-particles i:nth-child(11){--particle-x:99%;--particle-speed:21s;--particle-delay:-18s}.season-particles i:nth-child(12){--particle-x:79%;--particle-speed:22s;--particle-delay:-16s}
.season-particles i{--particle-mid:-50vh;--particle-drift:-105vh}
:root[data-theme="spring"] .season-particles i { background:#efadc0;box-shadow:3px 2px 0 -1px #f7cad5 }
:root[data-theme="summer"] .season-particles i { width:6px;height:12px;border-radius:100% 0 100% 0;background:#8dbc7b }
:root[data-theme="autumn"] .season-particles i { width:9px;height:9px;border-radius:1px;background:#e98b4f;clip-path:polygon(50% 0,65% 30%,100% 35%,74% 57%,82% 100%,50% 77%,18% 100%,26% 57%,0 35%,35% 30%) }
:root[data-theme="winter"] .season-particles i { width:6px;height:6px;border-radius:50%;background:#b8d7ec;box-shadow:0 0 0 2px rgba(255,255,255,.7) }
@keyframes season-drift { 0%{opacity:0;transform:translate3d(0,-8vh,0) rotate(0deg)}10%{opacity:.42}48%{transform:translate3d(var(--particle-mid),48vh,0) rotate(190deg)}88%{opacity:.34}100%{opacity:0;transform:translate3d(var(--particle-drift),105vh,0) rotate(390deg)} }
html[data-theme]:not([data-theme="default"]) nav,
html[data-theme]:not([data-theme="default"]) header {
    position:relative;
    background-color:#fff !important;
    background-image:none !important;
}
html[data-theme]:not([data-theme="default"]) .directory {
    position:relative;
    overflow:visible;
    background-color:#fff !important;
    background-image:none !important;
}
html[data-theme]:not([data-theme="default"]) .directory .category-list { overflow:hidden;border-radius:0 0 19px 19px;background:#fff }
html[data-theme]:not([data-theme="default"]) main.card {
    background-color:#fff !important;
    position:relative;
    background-image:none !important;
}
html[data-theme]:not([data-theme="default"]) nav::before,
html[data-theme]:not([data-theme="default"]) header::before,
html[data-theme]:not([data-theme="default"]) .directory::before,
html[data-theme]:not([data-theme="default"]) main.card::before,
html[data-theme]:not([data-theme="default"]) nav::after,
html[data-theme]:not([data-theme="default"]) header::after,
html[data-theme]:not([data-theme="default"]) .directory::after,
html[data-theme]:not([data-theme="default"]) main.card::after { content:"";position:absolute;z-index:2;width:320px;height:92px;background:var(--season-branch) left top/320px auto no-repeat;opacity:.88;pointer-events:none }
html[data-theme]:not([data-theme="default"]) nav::before,
html[data-theme]:not([data-theme="default"]) header::before,
html[data-theme]:not([data-theme="default"]) .directory::before,
html[data-theme]:not([data-theme="default"]) main.card::before { top:-34px;left:-2px }
html[data-theme]:not([data-theme="default"]) header::before { top:-18px;left:auto;right:-2px;width:220px;height:68px;background-size:220px auto;transform:scaleX(-1);transform-origin:center }
html[data-theme]:not([data-theme="default"]) nav::after,
html[data-theme]:not([data-theme="default"]) header::after,
html[data-theme]:not([data-theme="default"]) .directory::after,
html[data-theme]:not([data-theme="default"]) main.card::after { right:-2px;bottom:-34px;transform:rotate(180deg) }
html[data-theme]:not([data-theme="default"]) header::after,
html[data-theme]:not([data-theme="default"]) main.card::after { display:none }
html[data-theme]:not([data-theme="default"]) main.card::before { display:none;left:auto;right:-2px }
html[data-theme]:not([data-theme="default"]) nav>* ,
html[data-theme]:not([data-theme="default"]) header>* ,
html[data-theme]:not([data-theme="default"]) .directory>* ,
html[data-theme]:not([data-theme="default"]) main.card>* { position:relative;z-index:1 }
html[data-theme]:not([data-theme="default"]) .directory-head,
html[data-theme]:not([data-theme="default"]) main.card>h1,
html[data-theme]:not([data-theme="default"]) main.card>.subtitle { position:relative;z-index:1 }
html[data-theme]:not([data-theme="default"]) .directory { box-shadow:0 12px 34px var(--season-shadow) !important }
html[data-theme]:not([data-theme="default"]) .hero { position:relative }
html[data-theme]:not([data-theme="default"]) .hero::before,
html[data-theme]:not([data-theme="default"]) .hero::after { content:var(--season-particle);position:absolute;color:var(--season-accent);font-family:Georgia,serif;opacity:.34;pointer-events:none }
html[data-theme]:not([data-theme="default"]) .hero::before { left:8%;top:22%;font-size:13px;transform:rotate(-18deg) }
html[data-theme]:not([data-theme="default"]) .hero::after { right:9%;bottom:18%;font-size:10px;transform:rotate(24deg) }
html[data-theme="spring"] .brand-tagline::after { background:#edb8c7 }
html[data-theme="summer"] .brand-tagline::after { background:#a9ca91 }
html[data-theme="autumn"] .brand-tagline::after { background:#efb17e }
html[data-theme="winter"] .brand-tagline::after { background:#b6d2e6 }
html[data-theme]:not([data-theme="default"]) nav,
html[data-theme]:not([data-theme="default"]) header,
html[data-theme]:not([data-theme="default"]) .directory,
html[data-theme]:not([data-theme="default"]) .card { border-color:var(--season-border) !important }
html[data-theme]:not([data-theme="default"]) .hero-accent,
html[data-theme]:not([data-theme="default"]) .directory-kicker,
html[data-theme]:not([data-theme="default"]) .reply-toggle,
html[data-theme]:not([data-theme="default"]) .logo { color:var(--season-accent-strong) !important }
html[data-theme]:not([data-theme="default"]) .hero-accent::after { background:linear-gradient(90deg,var(--season-accent),var(--season-soft-2)) !important }
html[data-theme]:not([data-theme="default"]) .category-row:hover,
html[data-theme]:not([data-theme="default"]) :is(.primary,.primary-category),
html[data-theme]:not([data-theme="default"]) :is(.cat-filter.active,.subcategory-filter.is-active) { border-color:var(--season-border) !important;background:var(--season-soft) !important;color:var(--season-accent-strong) !important }
html[data-theme]:not([data-theme="default"]) :is(.cat-filter,.subcategory-filter):hover { background:var(--season-soft) !important;color:var(--season-accent-strong) !important }
html[data-theme]:not([data-theme="default"]) :is(.memo-refresh,.mobile-nav-toggle) { border-color:var(--season-border) !important;background:var(--season-soft) !important;color:var(--season-accent-strong) !important;box-shadow:0 2px 8px var(--season-shadow) !important }
html[data-theme]:not([data-theme="default"]) :is(.memo-refresh,.mobile-nav-toggle):hover,
html[data-theme]:not([data-theme="default"]) :is(.memo-refresh,.mobile-nav-toggle):active { background:var(--season-soft-2) !important;color:var(--season-accent-strong) !important }
html[data-theme]:not([data-theme="default"]) :is(.memo-search,.search) { border-color:color-mix(in srgb,var(--season-border) 55%,white) !important;background:color-mix(in srgb,var(--season-soft) 58%,white) !important;box-shadow:inset 0 1px 0 rgba(255,255,255,.92) !important }
html[data-theme]:not([data-theme="default"]) :is(.memo-search,.search):focus-within { border-color:color-mix(in srgb,var(--season-accent) 45%,white) !important;background:#fff !important;box-shadow:0 0 0 3px color-mix(in srgb,var(--season-glow) 42%,transparent) !important }
html[data-theme]:not([data-theme="default"]) :is(.memo-search-icon,.search svg) { stroke:color-mix(in srgb,var(--season-accent-strong) 58%,#91a0b1) !important }
html[data-theme]:not([data-theme="default"]) :is(.page-download,.toc .download-link) { border-color:color-mix(in srgb,var(--season-border) 58%,white) !important;background:color-mix(in srgb,var(--season-soft) 52%,white) !important;color:color-mix(in srgb,var(--season-accent-strong) 68%,#475569) !important }
html[data-theme]:not([data-theme="default"]) :is(.page-download,.toc .download-link):hover { border-color:var(--season-border) !important;background:var(--season-soft) !important;color:var(--season-accent-strong) !important }
html[data-theme]:not([data-theme="default"]) :is(.page-download,.toc .download-link) :is(svg,.download-icon) { stroke:var(--season-accent) !important;color:var(--season-accent) !important }
html[data-theme]:not([data-theme="default"]) .category-row .icon,
html[data-theme]:not([data-theme="default"]) :is(.primary-icon,.primary-category-icon) { background:var(--season-soft) !important }
html[data-theme]:not([data-theme="default"]) .card-arrow,
html[data-theme]:not([data-theme="default"]) .category-meta-number { color:var(--season-accent-strong) !important }
body :is(.memo-submit,.submit,.subcategory-add,.cat-add,.memo-edit-save,.edit-form .save,.nickname-save,.primary-button,.session-expired-card a) { border:1px solid var(--season-border) !important;background:var(--season-soft-2) !important;color:var(--season-accent-strong) !important;box-shadow:0 2px 5px var(--season-shadow) !important }
body :is(.memo-submit,.submit,.subcategory-add,.cat-add,.memo-edit-save,.edit-form .save,.nickname-save,.primary-button,.session-expired-card a):hover { background:var(--season-soft) !important;box-shadow:0 1px 3px var(--season-shadow) !important }
body :is(.memo-submit,.submit,.subcategory-add,.cat-add,.memo-edit-save,.edit-form .save,.nickname-save,.primary-button,.session-expired-card a):active { background:var(--season-border) !important;box-shadow:none !important }
body :is(.memo-submit,.submit,.subcategory-add,.cat-add,.memo-edit-save,.edit-form .save,.nickname-save,.primary-button,.session-expired-card a):disabled { border-color:#e5ebef !important;background:#eef2f4 !important;color:#96a1a9 !important;box-shadow:none !important }
html[data-theme]:not([data-theme="default"]) .memo-body { border-color:var(--season-border) !important }
html[data-theme]:not([data-theme="default"]) .memo-list > .memo-item > .memo-body { box-shadow:0 5px 18px var(--season-shadow) !important }
html[data-theme]:not([data-theme="default"]) .memo-list::-webkit-scrollbar-thumb { background:var(--season-soft-2) !important }
html[data-theme]:not([data-theme="default"]) .chat-form { --chat-fill:color-mix(in srgb,var(--season-soft) 48%,white) }

.theme-menu { position:relative;margin-right:8px }
nav:has(.theme-panel) { z-index:80 }
.theme-toggle { width:36px;height:36px;display:grid;place-items:center;border:1px solid #dbe4f0;border-radius:50%;background:rgba(255,255,255,.82);color:var(--season-accent-strong);cursor:pointer;box-shadow:0 3px 10px rgba(30,41,59,.045);transition:.18s }
.theme-toggle:hover { transform:translateY(-1px);border-color:var(--season-accent);background:var(--season-soft);box-shadow:0 7px 16px var(--season-shadow) }
.theme-toggle svg { width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round }
.theme-panel { position:absolute;z-index:100;top:44px;right:0;width:190px;padding:9px;border:1px solid var(--season-border);border-radius:15px;background:rgba(255,255,255,.98);box-shadow:0 16px 42px rgba(30,41,59,.14);touch-action:manipulation }
.theme-panel[hidden] { display:none }
.theme-panel-title { padding:5px 7px 8px;color:#8491a3;font-size:10px;font-weight:700;letter-spacing:.1em }
.theme-options { display:grid;gap:3px }
.theme-option { min-height:36px;display:flex;align-items:center;gap:9px;padding:7px 9px;border:0;border-radius:9px;background:transparent;color:#526078;font:inherit;font-size:12px;text-align:left;cursor:pointer }
.theme-option:hover,.theme-option.is-active { background:var(--season-soft);color:var(--season-accent-strong);font-weight:700 }
.theme-swatch { width:16px;height:16px;flex:0 0 auto;border:5px solid #fff;border-radius:50%;box-shadow:0 0 0 1px #dce4ed;background:#78a9cf }
.theme-option[data-theme-value="spring"] .theme-swatch { background:#e48aa5 }.theme-option[data-theme-value="summer"] .theme-swatch { background:#6eb18a }.theme-option[data-theme-value="autumn"] .theme-swatch { background:#e78b50 }.theme-option[data-theme-value="winter"] .theme-swatch { background:#6a9fc9 }

@media(max-width:640px){html[data-theme]:not([data-theme="default"])::before,html[data-theme]:not([data-theme="default"])::after{font-size:18px;opacity:.18}html[data-theme]:not([data-theme="default"]) nav::before,html[data-theme]:not([data-theme="default"]) .directory::before,html[data-theme]:not([data-theme="default"]) nav::after,html[data-theme]:not([data-theme="default"]) .directory::after{width:240px;height:72px;background-size:240px auto}html[data-theme]:not([data-theme="default"]) nav::before,html[data-theme]:not([data-theme="default"]) .directory::before{top:-25px}html[data-theme]:not([data-theme="default"]) nav::after,html[data-theme]:not([data-theme="default"]) .directory::after{bottom:-25px}.theme-menu{margin-right:6px}.theme-panel{position:fixed;top:68px;right:14px;width:180px;max-height:calc(100dvh - 82px);overflow-y:auto}.theme-option{min-height:44px}}
@media(max-width:720px){html body::after{display:none !important}html body :is(.composer,.memo-composer){z-index:60 !important}}
@media(prefers-reduced-motion:reduce){.season-particles i{animation:none;display:none}}
