@font-face{font-family:YSConsoleWenkai;src:url('/ys-console-theme/assets/font-wenkai.ttf') format('truetype');font-weight:400;font-style:normal;font-display:swap}
@font-face{font-family:YSConsoleArt;src:url('/ys-console-theme/assets/cormorant.ttf') format('truetype');font-weight:500;font-style:italic;font-display:swap}
html:not(.dark) body.ys-console-active{
  --ys-paper:#f6f4ec;--ys-card:#fffdf7;--ys-ink:#304738;--ys-line:#e0e3d5;--ys-muted:#717a66;
  background:var(--ys-paper);color:var(--ys-ink);
}
html:not(.dark) .ys-console-theme .bg-mesh-gradient{background:radial-gradient(ellipse at 85% 0%,#d6dfc445,transparent 49%),url('/ys-console-theme/assets/paper.svg')}
.ys-console-leaf{position:absolute;right:-44px;top:42px;width:300px;height:410px;object-fit:contain;opacity:.09;transform-origin:50% 85%;animation:ys-console-sway 18s ease-in-out infinite;pointer-events:none}
html:not(.dark) .ys-console-theme .sidebar{background:#edefe3;border-right:1px solid #dce1d1;box-shadow:none}
html:not(.dark) .ys-console-theme .sidebar-header{border-color:var(--ys-line)}
html:not(.dark) .ys-console-theme .sidebar-logo{background:url('/welcome/mark.svg') center/contain no-repeat;box-shadow:none;border-radius:10px}
html:not(.dark) .ys-console-theme .sidebar-logo img{opacity:0}
html:not(.dark) .ys-console-theme .sidebar-brand-title{font:italic 500 25px/1.15 YSConsoleArt,Georgia,serif;color:var(--ys-ink);letter-spacing:-.4px}
html:not(.dark) .ys-console-theme .sidebar-link{color:#65725b;border-radius:8px;transition:background-color .18s,color .18s,transform .2s}
html:not(.dark) .ys-console-theme .sidebar-link:hover{background:#e2e7d5;color:#324d36;transform:translateX(2px)}
html:not(.dark) .ys-console-theme .sidebar-link-active{background:#dce5cc;color:#425f34;box-shadow:inset 3px 0 #8b9d71}
html:not(.dark) .ys-console-theme .sidebar-link-active svg{color:#556f43}
html:not(.dark) .ys-console-theme header.glass{background:#f6f4edf5;border-color:var(--ys-line);box-shadow:none;backdrop-filter:blur(10px)}
html:not(.dark) .ys-console-theme header h1{font:400 25px/1.25 YSConsoleWenkai,serif;letter-spacing:1px;color:var(--ys-ink)}
html:not(.dark) .ys-console-theme header p{font-size:11px;color:var(--ys-muted)}
html:not(.dark) body.ys-console-active :is(.card,.card-glass,.stat-card){background:var(--ys-card);border:1px solid var(--ys-line);border-radius:13px;box-shadow:0 3px 8px #40503406;transition:border-color .2s,box-shadow .2s}
html:not(.dark) .ys-console-theme .card:hover{border-color:#cfd7bf}
html:not(.dark) .ys-console-theme main{animation:ys-console-enter .4s ease-out both}
html:not(.dark) .ys-console-theme main :is(h2,h3){font-family:YSConsoleWenkai,serif;font-weight:400;letter-spacing:.4px}
html:not(.dark) .ys-console-theme main .card :is(h2,h3){font-size:19px}
html:not(.dark) body.ys-console-active :is(.text-gray-900,.text-gray-800,.text-gray-700){color:var(--ys-ink)}
html:not(.dark) body.ys-console-active :is(.text-gray-500,.text-gray-600){color:var(--ys-muted)}
html:not(.dark) body.ys-console-active :is(.text-primary-500,.text-primary-600,.text-primary-700,.text-primary-800){color:#547141}
html:not(.dark) body.ys-console-active :is(.bg-primary-50,.bg-primary-100){background-color:#e8eddd}
html:not(.dark) body.ys-console-active :is(.bg-gray-50,.bg-gray-100){background-color:#f1f2e9}
html:not(.dark) body.ys-console-active .bg-white{background-color:var(--ys-card)}
html:not(.dark) body.ys-console-active :is(.border-gray-100,.border-gray-200,.border-gray-300){border-color:var(--ys-line)}
html:not(.dark) body.ys-console-active .btn-primary{background:#365742;border:1px solid #365742;color:#fffdf5;box-shadow:0 3px 0 #36574210;border-radius:8px;transition:background-color .2s,box-shadow .2s}
html:not(.dark) body.ys-console-active .btn-primary:not(:disabled):hover{background:#496849;box-shadow:0 4px 12px #3657421c}
html:not(.dark) body.ys-console-active .btn-secondary{background:#fffdf7;color:#576b49;border-color:#dce1d1;box-shadow:none;border-radius:8px}
html:not(.dark) body.ys-console-active .btn-ghost{color:#617653}
html:not(.dark) body.ys-console-active .btn-ghost:hover{background:#e8eddd}
html:not(.dark) body.ys-console-active :is(input:not([type=checkbox]):not([type=radio]),select,textarea,.input){background-color:#fffef9;border-color:#dce1d1;color:var(--ys-ink)}
html:not(.dark) body.ys-console-active :is(input,select,textarea,.input):focus{border-color:#91a37c;--tw-ring-color:#91a37c35}
html:not(.dark) body.ys-console-active input.input-error{border-color:#c65f53}
html:not(.dark) body.ys-console-active :is(button,a):focus-visible{outline:2px solid #839a6c;outline-offset:3px}
html:not(.dark) body.ys-console-active :is(header,[data-testid="profile-shell"]) :is(.from-primary-500,.to-primary-600){background-image:none;background-color:#718663}
html:not(.dark) .ys-console-theme [data-testid="profile-shell"]>.relative:first-child{background:#ecf0e2;border-color:#d6dfc6}
html:not(.dark) body.ys-console-active :is(.shadow-glow,.shadow-primary-500\/30){box-shadow:none}
html:not(.dark) body.ys-console-active table{background:var(--ys-card)}
html:not(.dark) body.ys-console-active thead{background:#f0f2e8}
html:not(.dark) body.ys-console-active td{border-color:var(--ys-line)}
html:not(.dark) body.ys-console-active table .sticky-header-cell{background:#f0f2e8}
html:not(.dark) body.ys-console-active table td.sticky-col{background:var(--ys-card)}
html:not(.dark) body.ys-console-active tbody tr:hover{background:#eef1e677}
html:not(.dark) .ys-console-theme ::selection{background:#dbe5c9;color:#2e4739}

.ys-console-welcome{position:relative;isolation:isolate;overflow:hidden;padding:19px 26px;margin-bottom:23px;border:1px solid #dce2cd;border-radius:13px;background:#eceede;min-height:126px;color:#40563a}
.ys-console-welcome::before{content:"";position:absolute;inset:0;background:url('/ys-console-theme/assets/paper.svg');z-index:-1;pointer-events:none}
.ys-console-welcome>div>span{display:block;font:italic 500 19px/1.1 YSConsoleArt,Georgia,serif;color:#8a9275}
.ys-console-welcome p{font:400 30px/1.45 YSConsoleWenkai,serif;letter-spacing:1.5px;margin-top:3px}
.ys-console-welcome small{display:block;font-size:11px;letter-spacing:1px;color:#7d886d;margin-top:4px}
.ys-console-welcome>img{position:absolute;width:160px;height:190px;object-fit:contain;right:30px;top:-40px;opacity:.53;transform:rotate(-12deg);pointer-events:none}
.ys-console-welcome>em{position:absolute;right:207px;top:38px;font:italic 500 23px/1.1 YSConsoleArt,Georgia,serif;color:#929c7b;transform:rotate(-6deg)}
.ys-console-signature{margin:30px 18px 18px;padding:20px 0 10px;border-top:1px solid #b4c09e55;pointer-events:none}
.ys-console-signature span{font:italic 500 28px/1 YSConsoleArt,Georgia,serif;color:#8d9b7b}
.ys-console-signature small{display:block;margin-top:13px;font-size:8px;letter-spacing:1.8px;color:#8a957c}
.ys-console-theme .sidebar{isolation:isolate}
html:not(.dark) .ys-console-theme .sidebar{background-image:url('/ys-console-theme/assets/paper.svg')}
html:not(.dark) .ys-console-theme .sidebar-header{position:relative}
html:not(.dark) .ys-console-theme .sidebar-header::after{content:"";position:absolute;left:24px;bottom:-1px;width:47px;height:2px;background:#a9b592;border-radius:2px;pointer-events:none}
.ys-console-sidebar-ornament{position:absolute;inset:0;z-index:-1;overflow:hidden;pointer-events:none;user-select:none}
.ys-console-sidebar-ornament>img{position:absolute;right:-103px;bottom:63px;width:286px;height:360px;object-fit:contain;opacity:.11;transform-origin:50% 88%;animation:ys-sidebar-branch 19s ease-in-out infinite}
.ys-console-signature{position:relative;isolation:isolate;min-height:139px;margin-top:29px;padding-top:23px}
.ys-console-sidebar-sprig{position:absolute;width:99px;height:136px;right:-7px;top:0;opacity:.42;object-fit:contain;transform-origin:50% 88%;animation:ys-signature-branch 16s ease-in-out infinite;z-index:-1;pointer-events:none}
.ys-console-signature span{position:relative;z-index:1;color:#7e906d}
.ys-console-signature small{position:relative;z-index:1;font-size:7.5px;letter-spacing:1.6px}
.ys-console-topbar-decoration{position:absolute;top:0;height:63px;display:flex;align-items:center;justify-content:center;gap:10px;transform:translateX(-50%);pointer-events:none;user-select:none;overflow:hidden}
.ys-console-topbar-decoration[hidden]{display:none}
.ys-console-topbar-decoration>span{font:italic 500 20px/1.1 YSConsoleArt,Georgia,serif;white-space:nowrap;color:#8c9b7b}
.ys-console-topbar-decoration>img{width:38px;height:53px;object-fit:contain;opacity:.66;transform-origin:50% 84%;animation:ys-topbar-branch 14s ease-in-out infinite}
.ys-console-topbar-decoration>i{height:1px;flex:1;min-width:10px;background:linear-gradient(90deg,transparent,#a4b18c77)}
.ys-console-topbar-decoration>i:last-child{background:linear-gradient(90deg,#a4b18c77,transparent)}
.ys-console-topbar-decoration[data-size="sprig"]{gap:0}
.ys-console-topbar-decoration[data-size="sprig"]>span,.ys-console-topbar-decoration[data-size="sprig"]>i{display:none}
.ys-console-topbar-decoration[data-size="sprig"]>img{width:45px;height:56px;opacity:.48}
html:not(.dark) .ys-console-theme header.glass::after{content:"";position:absolute;bottom:-1px;left:18%;width:52%;height:1px;background:linear-gradient(90deg,transparent,#9dab7d66,transparent);pointer-events:none}
.sidebar.w-\[72px\] .ys-console-sidebar-ornament{opacity:.5}
.sidebar.w-\[72px\] .ys-console-sidebar-ornament>img{width:185px;right:-94px;bottom:78px}
.sidebar.w-\[72px\] .ys-console-signature{display:none}
.dark :is(.ys-console-welcome,.ys-console-signature,.ys-console-leaf,.ys-console-sidebar-ornament,.ys-console-topbar-decoration){display:none}
@keyframes ys-console-sway{0%,100%{transform:rotate(-8deg)}50%{transform:rotate(-4deg)}}
@keyframes ys-sidebar-branch{0%,100%{transform:rotate(-19deg)}50%{transform:rotate(-15deg)}}
@keyframes ys-signature-branch{0%,100%{transform:rotate(8deg)}50%{transform:rotate(13deg)}}
@keyframes ys-topbar-branch{0%,100%{transform:rotate(-14deg)}50%{transform:rotate(-7deg)}}
@keyframes ys-console-enter{from{opacity:0;transform:translateY(5px)}to{opacity:1;transform:none}}
@media(max-width:700px){.ys-console-welcome{padding:17px 19px;min-height:118px;margin-bottom:18px}.ys-console-welcome p{font-size:25px;position:relative;z-index:1}.ys-console-welcome>div>span{font-size:17px}.ys-console-welcome small{font-size:10px;letter-spacing:.2px}.ys-console-welcome>img{right:-32px;top:2px;width:120px;height:135px;opacity:.22}.ys-console-welcome>em{display:none}.ys-console-leaf{width:190px;right:-75px;opacity:.07}html:not(.dark) .ys-console-theme header h1{font-size:22px}}
@media(prefers-reduced-motion:reduce){.ys-console-leaf,.ys-console-sidebar-ornament>img,.ys-console-sidebar-sprig,.ys-console-topbar-decoration>img,html:not(.dark) .ys-console-theme main{animation:none}html:not(.dark) body.ys-console-active :is(.sidebar-link,.btn-primary,.card){transition:none}}

/* User redemption: a quiet botanical balance card, with the original data and form. */
html:not(.dark) .ys-console-theme[data-ys-console-page="/redeem"] main .card>.bg-gradient-to-br{
  position:relative;isolation:isolate;overflow:hidden;background:linear-gradient(125deg,#e6ecd9,#f1f2e5);color:#344d38;
}
html:not(.dark) .ys-console-theme[data-ys-console-page="/redeem"] main .card>.bg-gradient-to-br::after{
  content:"";position:absolute;right:-25px;bottom:-54px;width:220px;height:290px;background:url('/ys-console-theme/assets/branch.svg') center/contain no-repeat;opacity:.21;z-index:-1;pointer-events:none;transform:rotate(-15deg);
}
html:not(.dark) .ys-console-theme[data-ys-console-page="/redeem"] main .card>.bg-gradient-to-br .text-white{color:#34513c}
html:not(.dark) .ys-console-theme[data-ys-console-page="/redeem"] main .card>.bg-gradient-to-br .text-primary-100{color:#657757}
html:not(.dark) .ys-console-theme[data-ys-console-page="/redeem"] main .card>.bg-gradient-to-br .bg-white\/20{background:#fbfcf3b3;border:1px solid #cfd8bf;box-shadow:none}

/* Native shared surfaces, including portals outside the application shell. */
html:not(.dark) body.ys-console-active .modal-content{background:#fffdf7;border:1px solid #dce1d1;border-radius:15px;box-shadow:0 24px 75px #21392830}
html:not(.dark) body.ys-console-active .modal-header{background:#f1f3e8;border-color:#dce1d1;border-radius:14px 14px 0 0}
html:not(.dark) body.ys-console-active .modal-title{font-family:YSConsoleWenkai,serif;font-size:22px;font-weight:400;color:#304738}
html:not(.dark) body.ys-console-active .modal-footer{background:#f6f6ee;border-color:#dce1d1;border-radius:0 0 14px 14px}
html:not(.dark) body.ys-console-active :is(.bg-primary-500,.bg-primary-600){background-color:#54714a}
html:not(.dark) body.ys-console-active :is(.border-primary-200,.border-primary-300){border-color:#ccd7ba}
html:not(.dark) body.ys-console-active :is(.bg-primary-50\/50,.bg-primary-50\/80){background-color:#eaf0dfb3}
html:not(.dark) body.ys-console-active .input-label{color:#40523c}
html:not(.dark) body.ys-console-active input[type="checkbox"],html:not(.dark) body.ys-console-active input[type="radio"]{accent-color:#5e7b4e;color:#5e7b4e}
html:not(.dark) .ys-console-theme .settings-tabs-shell{background:#f4f5ebed;border-color:#dce2ce;box-shadow:0 5px 18px #4050340c;border-radius:12px}
html:not(.dark) .ys-console-theme .settings-tab{color:#64735a}
html:not(.dark) .ys-console-theme .settings-tab::before{background:#e9efdc}
html:not(.dark) .ys-console-theme .settings-tab-active{background:#e1e9d2;border-color:#c4d1b1;color:#3e5c34;box-shadow:0 2px 5px #42573509}
html:not(.dark) .ys-console-theme .settings-tab-active::after{background:linear-gradient(90deg,#8b9f70,#b8c49f)}
html:not(.dark) .ys-console-theme .settings-tab-active .settings-tab-icon{background:#d4dfc0;color:#4e693e}
html:not(.dark) .ys-console-theme .sidebar-nav{scrollbar-color:#bbc7a8 transparent}
html:not(.dark) .ys-console-theme .sidebar-nav::-webkit-scrollbar-thumb{background:#bbc7a8}
@media(max-width:480px){html:not(.dark) .ys-console-theme[data-ys-console-page="/redeem"] main .card>.bg-gradient-to-br::after{right:-56px;opacity:.15}}

/* Dark botanical console. Keep every light-mode rule above byte-for-byte intact. */
html.dark body.ys-console-active{
  color-scheme:dark;--ys-paper:#1d251e;--ys-card:#252e24;--ys-sidebar:#222b22;--ys-ink:#e2e8d8;--ys-muted:#bbc5ad;--ys-line:#414a39;--ys-soft:#2c3829;--ys-hover:#35432f;--ys-accent:#bdd3a1;--ys-selected:#3c4c32;--ys-accent-line:#61764b;--ys-button:#3d6044;--ys-button-hover:#496f4f;
  background:var(--ys-paper);color:var(--ys-ink);
}
html.dark .ys-console-theme .bg-mesh-gradient{background:radial-gradient(ellipse at 85% 0%,#74866012,transparent 49%),var(--ys-paper)}
html.dark .ys-console-theme .sidebar{background:var(--ys-sidebar);border-right:1px solid var(--ys-line);box-shadow:none}
html.dark .ys-console-theme .sidebar-header{position:relative;border-color:var(--ys-line)}
html.dark .ys-console-theme .sidebar-header::after{content:"";position:absolute;left:24px;bottom:-1px;width:47px;height:2px;background:#83966c;border-radius:2px;pointer-events:none}
html.dark .ys-console-theme .sidebar-logo{background:url('/welcome/mark.svg') center/contain no-repeat;box-shadow:none;border-radius:10px}
html.dark .ys-console-theme .sidebar-logo img{opacity:0}
html.dark .ys-console-theme .sidebar-brand-title{font:italic 500 25px/1.15 YSConsoleArt,Georgia,serif;color:var(--ys-ink);letter-spacing:-.4px}
html.dark .ys-console-theme .sidebar-link{color:var(--ys-muted);border-radius:8px;transition:background-color .18s,color .18s,transform .2s}
html.dark .ys-console-theme .sidebar-link:hover{background:var(--ys-hover);color:var(--ys-ink);transform:translateX(2px)}
html.dark .ys-console-theme .sidebar-link-active{background:var(--ys-selected);color:var(--ys-accent);box-shadow:inset 3px 0 #95ad79}
html.dark .ys-console-theme .sidebar-link-active svg{color:var(--ys-accent)}
html.dark .ys-console-theme header.glass{background:#1d251ef5;border-color:var(--ys-line);box-shadow:none;backdrop-filter:blur(10px)}
html.dark .ys-console-theme header h1{font:400 25px/1.25 YSConsoleWenkai,serif;letter-spacing:1px;color:var(--ys-ink)}
html.dark .ys-console-theme header p{font-size:11px;color:var(--ys-muted)}
html.dark .ys-console-theme header.glass::after{content:"";position:absolute;bottom:-1px;left:18%;width:52%;height:1px;background:linear-gradient(90deg,transparent,#91a67244,transparent);pointer-events:none}
html.dark .ys-console-theme main :is(h2,h3){font-family:YSConsoleWenkai,serif;font-weight:400;letter-spacing:.4px}
html.dark .ys-console-theme main .card :is(h2,h3){font-size:19px}

/* Neutral utilities include the application's explicit dark variants. Semantic hues stay native. */
html.dark body.ys-console-active :is(.text-gray-900,.text-gray-800,.text-gray-700):not([class*="dark:text-"]),
html.dark body.ys-console-active :is(.dark\:text-white,.dark\:text-gray-50,.dark\:text-gray-100,.dark\:text-gray-200,.dark\:text-gray-300,.dark\:text-dark-100,.dark\:text-dark-200){color:var(--ys-ink)}
html.dark body.ys-console-active :is(.text-gray-400,.text-gray-500,.text-gray-600):not([class*="dark:text-"]),
html.dark body.ys-console-active :is(.dark\:text-gray-400,.dark\:text-gray-500,.dark\:text-gray-600,.dark\:text-dark-300,.dark\:text-dark-400,.dark\:text-dark-500){color:var(--ys-muted)}
html.dark body.ys-console-active :is(.bg-white,.bg-white\/70,.bg-white\/80):not([class*="dark:bg-"]),
html.dark body.ys-console-active :is(.dark\:bg-dark-800,.dark\:bg-dark-800\/50,.dark\:bg-dark-800\/70,.dark\:bg-dark-800\/80,.dark\:bg-gray-800){background-color:var(--ys-card)}
html.dark body.ys-console-active :is(.bg-gray-50,.bg-gray-100):not([class*="dark:bg-"]),
html.dark body.ys-console-active :is(.dark\:bg-dark-700,.dark\:bg-dark-700\/50,.dark\:bg-gray-700){background-color:var(--ys-soft)}
html.dark body.ys-console-active :is(.dark\:bg-dark-900,.dark\:bg-dark-900\/40,.dark\:bg-dark-950,.dark\:bg-gray-900,.dark\:bg-gray-950){background-color:var(--ys-paper)}
html.dark body.ys-console-active :is(.dark\:bg-dark-600,.dark\:bg-dark-600\/50,.dark\:bg-dark-600\/70){background-color:#48533e}
html.dark body.ys-console-active :is(.border-gray-100,.border-gray-200,.border-gray-300):not([class*="dark:border-"]),
html.dark body.ys-console-active :is(.dark\:border-dark-600,.dark\:border-dark-700,.dark\:border-dark-700\/50,.dark\:border-dark-800,.dark\:border-gray-600,.dark\:border-gray-700,.dark\:border-gray-800){border-color:var(--ys-line)}
html.dark body.ys-console-active :is(.dark\:divide-dark-700,.dark\:divide-dark-700\/50,.dark\:divide-gray-700)>:not([hidden])~:not([hidden]){border-color:var(--ys-line)}
html.dark body.ys-console-active :is(.dark\:hover\:bg-dark-700,.dark\:hover\:bg-dark-700\/50,.dark\:hover\:bg-dark-800,.dark\:hover\:bg-gray-700):hover{background-color:var(--ys-hover)}
html.dark body.ys-console-active :is(.dark\:hover\:text-gray-200,.dark\:hover\:text-gray-300,.dark\:hover\:text-dark-200,.dark\:hover\:text-dark-300):hover{color:var(--ys-ink)}
html.dark body.ys-console-active :is(.card,.card-glass,.stat-card,.glass-card){border-radius:13px;box-shadow:0 3px 10px #00000012;transition:border-color .2s,box-shadow .2s}
html.dark body.ys-console-active :is(.card,.card-glass,.stat-card,.glass-card):not([class*="bg-red-"],[class*="bg-rose-"],[class*="bg-amber-"],[class*="bg-orange-"],[class*="bg-yellow-"],[class*="bg-green-"],[class*="bg-emerald-"]){background:var(--ys-card)}
html.dark body.ys-console-active :is(.card,.card-glass,.stat-card,.glass-card):where(:not([class*="border-red-"],[class*="border-rose-"],[class*="border-amber-"],[class*="border-orange-"],[class*="border-yellow-"],[class*="border-green-"],[class*="border-emerald-"])){border:1px solid var(--ys-line)}
html.dark .ys-console-theme .card:where(:not([class*="border-red-"],[class*="border-rose-"],[class*="border-amber-"],[class*="border-orange-"],[class*="border-yellow-"],[class*="border-green-"],[class*="border-emerald-"])):hover{border-color:#526247}
html.dark body.ys-console-active :is(.card-header,.card-footer){border-color:var(--ys-line)}
html.dark body.ys-console-active :is(.stat-label,.input-label,.input-hint,.page-description,.empty-description){color:var(--ys-muted)}
html.dark body.ys-console-active :is(.stat-value,.page-title,.empty-title){color:var(--ys-ink)}
html.dark body.ys-console-active :is(.stat-icon-primary,.badge-primary){background:var(--ys-selected);color:var(--ys-accent)}
html.dark body.ys-console-active .badge-gray{background:var(--ys-soft);color:var(--ys-muted)}

/* Match brand controls without changing warning, danger, success, or chart-series colors. */
html.dark body.ys-console-active :is(a,button,label,input,select,textarea,.input-label,.select-option-selected):is(.text-primary-500,.text-primary-600,.text-primary-700,.text-primary-800,.dark\:text-primary-300,.dark\:text-primary-400){color:var(--ys-accent)}
html.dark body.ys-console-active :is(button,a,[role="switch"]):is(.bg-primary-500,.bg-primary-600){background-color:var(--ys-button);color:#f0f5e8}
html.dark body.ys-console-active :is(button,a,[role="switch"]):is(.bg-primary-500,.bg-primary-600):not(:disabled):hover{background-color:var(--ys-button-hover)}
html.dark body.ys-console-active :is(button,[role="switch"])>span.bg-white.rounded-full.pointer-events-none{background-color:var(--ys-ink)}
html.dark body.ys-console-active .btn-primary{background:var(--ys-button);border:1px solid #678357;color:#f0f5e8;box-shadow:0 3px 0 #00000012;border-radius:8px;transition:background-color .2s,box-shadow .2s}
html.dark body.ys-console-active .btn-primary:not(:disabled):hover{background:var(--ys-button-hover);box-shadow:0 4px 12px #00000024}
html.dark body.ys-console-active .btn-secondary{background:var(--ys-card);border-color:var(--ys-accent-line);box-shadow:none;border-radius:8px}
html.dark body.ys-console-active :is(.btn-secondary,.btn-ghost):not([class*="text-red-"],[class*="text-rose-"],[class*="text-amber-"],[class*="text-orange-"],[class*="text-yellow-"],[class*="text-emerald-"],[class*="text-green-"]){color:var(--ys-accent)}
html.dark body.ys-console-active :is(.btn-secondary,.btn-ghost):not(:disabled):hover{background:var(--ys-hover)}
html.dark body.ys-console-active :is(.btn-primary,.btn-secondary,.btn-ghost):disabled{opacity:.5;box-shadow:none;cursor:not-allowed}
html.dark body.ys-console-active :is(button,a):focus-visible{outline:2px solid var(--ys-accent);outline-offset:3px;--tw-ring-color:#bdd3a155;--tw-ring-offset-color:var(--ys-paper)}
html.dark body.ys-console-active :is(.shadow-glow,.shadow-primary-500\/30){box-shadow:none}
html.dark body.ys-console-active :where(input:not([type=checkbox]):not([type=radio]),select,textarea,.input,.select-trigger){background-color:var(--ys-card);color:var(--ys-ink);color-scheme:dark}
html.dark body.ys-console-active :where(input:not([type=checkbox]):not([type=radio]),select,textarea,.input,.select-trigger):where(:not(.input-error,.select-trigger-error,[aria-invalid="true"])):where(:not([class*="border-red-"],[class*="border-rose-"],[class*="border-amber-"],[class*="border-orange-"],[class*="border-yellow-"],[class*="border-green-"],[class*="border-emerald-"])){border-color:var(--ys-accent-line)}
html.dark body.ys-console-active :is(.select-trigger,.date-picker-trigger){background-color:var(--ys-card);color:var(--ys-ink);color-scheme:dark}
html.dark body.ys-console-active :is(.select-trigger,.date-picker-trigger):where(:not(.input-error,.select-trigger-error,[aria-invalid="true"],[class*="border-red-"],[class*="border-rose-"],[class*="border-amber-"],[class*="border-orange-"],[class*="border-yellow-"],[class*="border-green-"],[class*="border-emerald-"])){border-color:var(--ys-accent-line)}
html.dark body.ys-console-active :is(.select-trigger,.date-picker-trigger):where(:not(.input-error,.select-trigger-error,[aria-invalid="true"],[class*="border-red-"],[class*="border-rose-"],[class*="border-amber-"],[class*="border-orange-"],[class*="border-yellow-"],[class*="border-green-"],[class*="border-emerald-"])):hover{border-color:var(--ys-accent-line)}
html.dark body.ys-console-active :is(input,textarea)::placeholder{color:#9da98f;opacity:1}
html.dark body.ys-console-active :is(input,select,textarea,.input,.select-trigger,.date-picker-trigger):where(:not(.input-error,.select-trigger-error,[aria-invalid="true"])):where(:not([class*="border-red-"],[class*="border-rose-"],[class*="border-amber-"],[class*="border-orange-"],[class*="border-yellow-"],[class*="border-green-"],[class*="border-emerald-"])):focus,
html.dark body.ys-console-active :is(.select-trigger.select-trigger-open,.date-picker-trigger.date-picker-trigger-open):where(:not(.input-error,.select-trigger-error,[aria-invalid="true"])):where(:not([class*="border-red-"],[class*="border-rose-"],[class*="border-amber-"],[class*="border-orange-"],[class*="border-yellow-"],[class*="border-green-"],[class*="border-emerald-"])){border-color:var(--ys-accent);--tw-ring-color:#bdd3a138;--tw-ring-offset-color:var(--ys-paper)}
html.dark body.ys-console-active :is(.input-error,.select-trigger-error,[aria-invalid="true"]){border-color:#e3948a;--tw-ring-color:#e3948a38}
html.dark body.ys-console-active :is(input,select,textarea,.input):disabled,
html.dark body.ys-console-active .select-trigger-disabled{background-color:var(--ys-paper);color:#99a38e;cursor:not-allowed}
html.dark body.ys-console-active :is(input[type="checkbox"],input[type="radio"]){accent-color:#9db580;color:#9db580;--tw-ring-color:#bdd3a155;--tw-ring-offset-color:var(--ys-card)}
html.dark body.ys-console-active .select-dropdown-portal{background:var(--ys-card);border-color:var(--ys-line);box-shadow:0 12px 30px #00000035}
html.dark body.ys-console-active .select-dropdown-portal .select-search{border-color:var(--ys-line)}
html.dark body.ys-console-active .select-dropdown-portal .select-search-input{background:transparent;border-color:transparent}
html.dark body.ys-console-active :is(.select-icon,.select-clear,.select-empty){color:var(--ys-muted)}
html.dark body.ys-console-active .select-dropdown-portal .select-option{color:var(--ys-ink)}
html.dark body.ys-console-active .select-dropdown-portal :is(.select-option:hover,.select-option-focused){background:var(--ys-hover)}
html.dark body.ys-console-active .select-dropdown-portal .select-option-selected{background:var(--ys-selected);color:var(--ys-accent)}
html.dark body.ys-console-active .select-dropdown-portal .select-option-group{background:var(--ys-paper);color:var(--ys-muted)}
html.dark body.ys-console-active .select-dropdown-portal .select-option-disabled{opacity:.4}

/* Date range controls are native scoped components, including their open states. */
html.dark body.ys-console-active :is(.date-picker-icon,.date-picker-chevron,.date-picker-label,.date-picker-separator){color:var(--ys-muted)}
html.dark body.ys-console-active .date-picker-dropdown{background:var(--ys-card);color:var(--ys-ink);border-color:var(--ys-line);box-shadow:0 12px 30px #00000035}
html.dark body.ys-console-active .date-picker-preset{color:var(--ys-muted)}
html.dark body.ys-console-active .date-picker-preset:not(:disabled):hover{background:var(--ys-hover);color:var(--ys-ink)}
html.dark body.ys-console-active .date-picker-preset-active,
html.dark body.ys-console-active .date-picker-preset-active:not(:disabled):hover{background:var(--ys-selected);color:var(--ys-accent)}
html.dark body.ys-console-active .date-picker-divider{border-color:var(--ys-line)}
html.dark body.ys-console-active .date-picker-input{background-color:var(--ys-soft);color:var(--ys-ink);border-color:var(--ys-accent-line);color-scheme:dark}
html.dark body.ys-console-active .date-picker-input:focus{border-color:var(--ys-accent);--tw-ring-color:#bdd3a138;--tw-ring-offset-color:var(--ys-card)}
html.dark body.ys-console-active .date-picker-input:disabled{background-color:var(--ys-paper);color:#99a38e}
html.dark body.ys-console-active .date-picker-input::-webkit-calendar-picker-indicator{filter:none}
html.dark body.ys-console-active .date-picker-actions{background:var(--ys-card)}
html.dark body.ys-console-active .date-picker-apply{background:var(--ys-button);color:#f0f5e8}
html.dark body.ys-console-active .date-picker-apply:not(:disabled):hover{background:var(--ys-button-hover)}
html.dark body.ys-console-active :is(.date-picker-preset,.date-picker-apply):disabled{opacity:.5;cursor:not-allowed}

/* Tables and body-level portals share the same opaque surfaces. */
html.dark body.ys-console-active table{background:var(--ys-card)}
html.dark body.ys-console-active :is(thead,.table-header){background:var(--ys-soft);color:var(--ys-muted)}
html.dark body.ys-console-active :is(th,td){border-color:var(--ys-line)}
html.dark body.ys-console-active table .sticky-header-cell{background:var(--ys-soft)}
html.dark body.ys-console-active table td.sticky-col{background:var(--ys-card)}
html.dark body.ys-console-active tbody tr:hover,
html.dark body.ys-console-active tbody tr:hover td.sticky-col{background:var(--ys-hover)}
html.dark body.ys-console-active .modal-content{background:var(--ys-card);border:1px solid var(--ys-line);border-radius:15px;box-shadow:0 24px 75px #00000066}
html.dark body.ys-console-active .modal-header{background:var(--ys-soft);border-color:var(--ys-line);border-radius:14px 14px 0 0}
html.dark body.ys-console-active .modal-title{font-family:YSConsoleWenkai,serif;font-size:22px;font-weight:400;color:var(--ys-ink)}
html.dark body.ys-console-active .modal-footer{background:var(--ys-sidebar);border-color:var(--ys-line);border-radius:0 0 14px 14px}
html.dark body.ys-console-active :is(.dropdown-menu,.popover-content){background:var(--ys-card);border-color:var(--ys-line);color:var(--ys-ink)}
html.dark .ys-console-theme .settings-tabs-shell{background:#222b22ed;border-color:var(--ys-line);box-shadow:0 5px 18px #00000016;border-radius:12px}
html.dark .ys-console-theme .settings-tab{color:var(--ys-muted)}
html.dark .ys-console-theme .settings-tab::before{background:var(--ys-hover)}
html.dark .ys-console-theme .settings-tab-active{background:var(--ys-selected);border-color:var(--ys-accent-line);color:var(--ys-accent);box-shadow:0 2px 5px #00000015}
html.dark .ys-console-theme .settings-tab-active::after{background:linear-gradient(90deg,#91a96e,#b8c99f)}
html.dark .ys-console-theme .settings-tab-active .settings-tab-icon{background:#4b5e3d;color:#d2e3b9}
html.dark .ys-console-theme :is(header,[data-testid="profile-shell"]) :is(.from-primary-500,.to-primary-600){background-image:none;background-color:var(--ys-button);color:#f0f5e8}
html.dark .ys-console-theme [data-testid="profile-shell"]>.relative:first-child{background:var(--ys-soft);border-color:var(--ys-line)}
html.dark .ys-console-theme ::selection{background:#526840;color:#f0f5e8}
html.dark .ys-console-theme .sidebar-nav{scrollbar-color:#687a55 transparent}
html.dark .ys-console-theme .sidebar-nav::-webkit-scrollbar-thumb{background:#687a55}

/* Restore the existing decoration softly; preserve collapsed/hidden layout decisions. */
html.dark .ys-console-theme :is(.ys-console-welcome,.ys-console-leaf,.ys-console-sidebar-ornament){display:block}
html.dark .ys-console-theme .sidebar:not(.w-\[72px\]) .ys-console-signature{display:block}
html.dark .ys-console-theme .ys-console-topbar-decoration:not([hidden]){display:flex}
html.dark .ys-console-theme .ys-console-leaf{opacity:.08;filter:brightness(1.65) saturate(.6)}
html.dark .ys-console-theme .ys-console-sidebar-ornament>img{opacity:.1;filter:brightness(1.65) saturate(.6)}
html.dark .ys-console-theme .ys-console-sidebar-sprig{opacity:.27;filter:brightness(1.4) saturate(.65)}
html.dark .ys-console-theme .ys-console-welcome{border-color:#46553a;background:#2b3728;color:var(--ys-ink)}
html.dark .ys-console-theme .ys-console-welcome::before{opacity:.08}
html.dark .ys-console-theme .ys-console-welcome>div>span{color:#a5b58f}
html.dark .ys-console-theme .ys-console-welcome small{color:var(--ys-muted)}
html.dark .ys-console-theme .ys-console-welcome>img{opacity:.3;filter:brightness(1.25) saturate(.6)}
html.dark .ys-console-theme .ys-console-welcome>em{color:#a1b38b}
html.dark .ys-console-theme .ys-console-signature{border-color:#788b5d44}
html.dark .ys-console-theme .ys-console-signature span{color:#a0b189}
html.dark .ys-console-theme .ys-console-signature small{color:#9ead8c}
html.dark .ys-console-theme .ys-console-topbar-decoration>span{color:#a2b28e}
html.dark .ys-console-theme .ys-console-topbar-decoration>img{opacity:.4;filter:brightness(1.4) saturate(.6)}
html.dark .ys-console-theme .ys-console-topbar-decoration>i{background:linear-gradient(90deg,transparent,#91a47255)}
html.dark .ys-console-theme .ys-console-topbar-decoration>i:last-child{background:linear-gradient(90deg,#91a47255,transparent)}
html.dark .ys-console-theme .ys-console-topbar-decoration[data-size="sprig"]>img{opacity:.3}

/* Redemption balance remains a branded surface, distinct from success/warning notices. */
html.dark .ys-console-theme[data-ys-console-page="/redeem"] main .card>.bg-gradient-to-br{position:relative;isolation:isolate;overflow:hidden;background:linear-gradient(125deg,#35462c,#263324);color:var(--ys-ink)}
html.dark .ys-console-theme[data-ys-console-page="/redeem"] main .card>.bg-gradient-to-br::after{content:"";position:absolute;right:-25px;bottom:-54px;width:220px;height:290px;background:url('/ys-console-theme/assets/branch.svg') center/contain no-repeat;opacity:.16;filter:brightness(1.45) saturate(.6);z-index:-1;pointer-events:none;transform:rotate(-15deg)}
html.dark .ys-console-theme[data-ys-console-page="/redeem"] main .card>.bg-gradient-to-br .text-white{color:#e5eedc}
html.dark .ys-console-theme[data-ys-console-page="/redeem"] main .card>.bg-gradient-to-br .text-primary-100{color:#c1d0ad}
html.dark .ys-console-theme[data-ys-console-page="/redeem"] main .card>.bg-gradient-to-br .bg-white\/20{background:#52644266;border:1px solid #71835b;box-shadow:none}
@media(max-width:700px){
  html.dark .ys-console-theme header h1{font-size:22px}
  html.dark .ys-console-theme .ys-console-welcome>img{opacity:.18}
  html.dark .ys-console-theme .ys-console-leaf{opacity:.06}
}
@media(max-width:480px){html.dark .ys-console-theme[data-ys-console-page="/redeem"] main .card>.bg-gradient-to-br::after{right:-56px;opacity:.12}}
@media(prefers-reduced-motion:reduce){
  html.dark .ys-console-theme :is(.ys-console-leaf,.ys-console-sidebar-ornament>img,.ys-console-sidebar-sprig,.ys-console-topbar-decoration>img,main){animation:none}
  html.dark body.ys-console-active :is(.sidebar-link,.btn-primary,.btn-secondary,.btn-ghost,.card,.card-glass,.stat-card,.glass-card){transition:none}
}

/* Keep the filter-anchored date panel inside small screens in either theme. */
@media(max-width:480px){
  body.ys-console-active .ys-console-theme .card:has(.date-picker-trigger){position:relative}
  body.ys-console-active .ys-console-theme .card .relative:has(>.date-picker-trigger){position:static}
  body.ys-console-active .ys-console-theme .card .date-picker-dropdown{top:100%;left:12px;right:12px;bottom:auto;width:auto;min-width:0}
  body.ys-console-active .ys-console-theme .date-picker-field{min-width:0}
  body.ys-console-active .ys-console-theme .date-picker-input{min-width:0;max-width:100%}
}
@media(max-width:360px){
  body.ys-console-active .ys-console-theme .date-picker-custom{flex-direction:column;align-items:stretch}
  body.ys-console-active .ys-console-theme .date-picker-separator{display:none}
}