/* User-selectable cosmic day/night themes; appended last to override older styles */
.theme-toggle{display:inline-flex;align-items:center;gap:8px;border:1px solid #a17cf555;border-radius:999px;padding:10px 13px;background:#a17cf51e;color:#f8e9ff;white-space:nowrap;font-size:12px;font-weight:700;transition:background .25s,box-shadow .25s,transform .25s}.theme-toggle:hover{box-shadow:0 0 20px #a17cf533;transform:translateY(-1px)}.theme-icon{width:19px;height:19px;flex-shrink:0}.theme-moon{display:none}html[data-theme=light] .theme-sun{display:none}html[data-theme=light] .theme-moon{display:block}
html[data-theme=light]{color-scheme:light;--bg:#f7f3fc;--panel:#fffaff;--purple:#7751c4;--pink:#bc468d;--blue:#347cba;--muted:#70617f;--line:#d5c6e5;--mint:#287b6c}
html[data-theme=light] body{background:#f7f3fc!important;color:#302244!important}
html[data-theme=light] .ambient{background:radial-gradient(ellipse at 85% 2%,#f6d8ef 0,transparent 40%),radial-gradient(ellipse at 12% 60%,#e6dfff 0,transparent 45%),#f7f3fc!important}
html[data-theme=light] .sidebar{background:#ffffffec!important;border-color:#e6d9f1!important;color:#38254e!important}
html[data-theme=light] nav button{color:#66517d!important}html[data-theme=light] nav button.active,html[data-theme=light] nav button:hover{background:#e9dafa!important;color:#513379!important}
html[data-theme=light] .card,html[data-theme=light] .modal,html[data-theme=light] .gate,html[data-theme=light] .duel-card,html[data-theme=light] [class*=panel],html[data-theme=light] [class*=glass]{background-color:#fffaffed!important;color:#332349!important;border-color:#dfd0ee!important;box-shadow:0 12px 35px #69538b12!important}
html[data-theme=light] input,html[data-theme=light] select,html[data-theme=light] textarea{background:#fff!important;color:#332349!important;border-color:#d8c8e7!important}
html[data-theme=light] .pill,html[data-theme=light] .theme-toggle{background:#eee3fa!important;color:#513379!important;border-color:#d4bde9!important}
html[data-theme=light] .muted,html[data-theme=light] .hint,html[data-theme=light] small{color:#746487!important}
html[data-theme=light] h1,html[data-theme=light] h2,html[data-theme=light] h3,html[data-theme=light] p,html[data-theme=light] label{color:inherit}
html[data-theme=light] .eyebrow{color:#8b54b2!important}
html[data-theme=light] .topbar{color:#38254e}
html[data-theme=light] button:not(.btn):not(.theme-toggle):not(.active){border-color:#d5c6e5}
html[data-theme=light] .brandmark{color:#22132e}
@media(max-width:600px){.theme-toggle{padding:9px}.theme-toggle span{display:none}.theme-icon{width:21px;height:21px}}
@media(prefers-reduced-motion:reduce){.theme-toggle{transition:none}}
