/* Important theme rules live in a layer so older component colors can remain intact. */
@layer singgum-theme{
 .sg-theme-toggle{background:#1b2c3b!important;color:#efd5a0!important;border-color:#75818c!important}
 html[data-site-theme="light"] .sg-theme-toggle{background:#fff!important;color:#72521c!important;border-color:#aa956e!important}
 html[data-site-theme="light"]{color-scheme:light;background:#e7eef5}
 html[data-site-theme="light"] body{color-scheme:light!important;background:#e7eef5!important;color:#18354f!important;--bg:#e7eef5;--surface:#fff;--panel:#e9eff4;--line:#71869a;--muted:#536b7e;--text:#18354f;--gold:#925b0b;--gold-bright:#745018;--blue:#265b84;--red:#a93839;--mint:#236f5b;--cms-bg:#e7eef5;--cms-panel:#fff;--cms-panel-raised:#e6edf3;--cms-line:#71869a;--cms-text:#18354f;--cms-muted:#536b7e;--cms-gold:#925b0b;--cms-gold-bg:#f6eddb;--cms-danger:#9e2634;--cms-danger-bg:#f9e5e8;--cms-success:#236f5b}
 html[data-site-theme="light"] [data-sg-light-bg]{background-color:var(--sg-light-bg)!important}
 html[data-site-theme="light"] [data-sg-light-fg]{color:var(--sg-light-fg)!important}
 html[data-site-theme="light"] [data-sg-light-border]{border-color:var(--sg-light-border)!important}
 html[data-site-theme="light"] [data-sg-light-image]{background-image:var(--sg-light-image)!important}
 html[data-site-theme="light"] :is(input,select,textarea,dialog){color-scheme:light!important}
 html[data-site-theme="light"] dialog::backdrop{background:#17263666!important}
 /* Clear white surfaces, blue structure and gold selection accents. */
 html[data-site-theme="light"] :is(.mode-card,.cost-card,.purchase-product,.purchase-baseline,.exp-panel,.exp-character,.cms-header,.sg-nav,.sg-nav-row,.sg-desktop-menu){background:#fff!important;background-image:none!important;box-shadow:0 3px 12px #173c6012!important}
 html[data-site-theme="light"] .spec-simulator :is(.card,fieldset){background:#fff!important;background-image:none!important}
 html[data-site-theme="light"] :is(h1,h2)[data-sg-light-fg]{color:#173f64!important}
 html[data-site-theme="light"] :is(.sg-nav-brand,.purchase-heading h3,.cms-eyebrow){color:#174d7a!important}
 html[data-site-theme="light"] :is(input,select,textarea)[data-sg-light-bg]{background-color:#fff!important;color:#16334f!important;border-color:#718aa2!important}
 html[data-site-theme="light"] :is(input,textarea)::placeholder{color:#667b8f!important;opacity:1}
 html[data-site-theme="light"] :is(input,select,textarea):focus-visible{outline:2px solid #216599!important;outline-offset:2px;box-shadow:0 0 0 4px #2165991a!important}
 html[data-site-theme="light"] :is(button[role="tab"][aria-selected="true"],.purchase-scope button[aria-pressed="true"],.workflow button.active){background:#eac364!important;background-image:none!important;border-color:#89620f!important;color:#352500!important;font-weight:700!important}
 html[data-site-theme="light"] :is(button[role="tab"][aria-selected="true"],.purchase-scope button[aria-pressed="true"],.workflow button.active) :is(span,b,strong){color:#352500!important}
 html[data-site-theme="light"] .sg-desktop-menu a[aria-current="page"]{background:#204f75!important;color:#fff!important;border-color:#204f75!important}
 html[data-site-theme="light"] .sg-desktop-menu a[aria-current="page"] :is(span,small){color:#fff!important}
 /* Hover and keyboard focus need explicit colors after the light-theme scan. */
 html[data-site-theme="light"] .sg-menu-link:not([aria-current="page"]):is(:hover,:focus-visible){background:#dbeafa!important;background-image:none!important;color:#173f64!important;box-shadow:inset 0 0 0 1px #6e8da6!important}
 html[data-site-theme="light"] .sg-menu-link:not([aria-current="page"]):is(:hover,:focus-visible) :is(span,small){color:#173f64!important}
 html[data-site-theme="light"] .sg-menu-link:focus-visible{outline:2px solid #216599!important;outline-offset:2px}
 html[data-site-theme="light"] .purchase-recommendation{background:#fff8e7!important;border-color:#aa7d27!important;border-top:3px solid #bd8a26!important}
 html[data-site-theme="light"] .purchase-recommendation h4{color:#754900!important}
 html[data-site-theme="light"] .purchase-needed>div{background:#deedfa!important}
 html[data-site-theme="light"] .purchase-needed>div+div{background:#fff0cc!important}
 html[data-site-theme="light"] :is(.purchase-needed strong,.purchase-equivalent>strong){color:#154e7d!important}
 html[data-site-theme="light"] .purchase-needed>div+div strong{color:#8c5900!important}
 html[data-site-theme="light"] .purchase-baseline .diamond-summary{background:#f1f6fb!important;border-color:#718aa2!important}
 html[data-site-theme="light"] thead th{background:#dce8f3!important;color:#183c5c!important}
 html[data-site-theme="light"] .mode-card:hover{border-color:#216599!important;box-shadow:0 5px 20px #173c6026!important}

}
.sg-theme-toggle{flex:0 0 auto;min-height:40px;margin-left:auto;padding:8px 12px;border:1px solid #75818c;border-radius:6px;background:#1b2c3b;color:#efd5a0;font:700 14px/1.4 Arial,'Malgun Gothic',sans-serif;white-space:nowrap;cursor:pointer;touch-action:manipulation}
.sg-theme-toggle:focus-visible{outline:3px solid #d2a94f;outline-offset:3px}
html[data-site-theme="light"] .sg-theme-toggle{background:#fff;color:#72521c;border-color:#aa956e}
@media(max-width:600px){.sg-theme-toggle{padding:8px 9px;min-height:40px;font-size:14px}.sg-nav-row{column-gap:9px}}
@media(min-width:1024px){.sg-desktop-menu .sg-menu-head:has(>.sg-theme-toggle){gap:8px;padding:12px 10px}.sg-desktop-menu .sg-theme-toggle{padding:7px 9px;min-height:40px;font-size:14px}.sg-desktop-menu .sg-menu-head h2{white-space:nowrap}}
@layer singgum-theme{
 .sg-desktop-menu .sg-theme-toggle{background:#e7c37b!important;color:#30230c!important;border-color:#f0d495!important}
 html[data-site-theme="light"] .sg-desktop-menu .sg-theme-toggle{background:#204f75!important;color:#fff!important;border-color:#204f75!important}
}

/* Explicit skill selection states must win over automatic light-theme colors. */
@layer singgum-theme{
 html[data-site-theme="light"] .sf-flow .sf-owned-card{background:#fff!important;background-image:none!important;border-color:#8295a7!important}
 html[data-site-theme="light"] .sf-flow .sf-owned-card.selected{background:#d9ecff!important;background-image:none!important;border-color:#1564a3!important;box-shadow:inset 0 0 0 2px #1564a3!important}
 html[data-site-theme="light"] .sf-flow .sf-pick{background:transparent!important;background-image:none!important}
 html[data-site-theme="light"] .sf-flow .sf-check{display:inline-flex;align-items:center;justify-self:start;width:fit-content;min-height:26px;padding:3px 8px;border:1px dashed #60788f;border-radius:5px;background:#f1f5f9!important;color:#354f67!important;font-weight:700;line-height:1.4}
 html[data-site-theme="light"] .sf-flow .sf-owned-card.selected .sf-check{background:#155d96!important;color:#fff!important;border:1px solid #155d96}
 html[data-site-theme="light"] .sf-flow .sf-target.chosen{background:#d9ecff!important;background-image:none!important;border-color:#1564a3!important;box-shadow:inset 0 0 0 2px #1564a3!important}
 html[data-site-theme="light"] .sf-flow :is(.sf-levels button.active,.sf-grade.active,.sf-steps>button.active){background:#155d96!important;background-image:none!important;border-color:#155d96!important;color:#fff!important;box-shadow:inset 0 -3px 0 #0c3e67!important}
 html[data-site-theme="light"] .sf-flow :is(.sf-grade.active,.sf-steps>button.active) :is(span,small){color:#fff!important}
 html[data-site-theme="light"] .sf-flow .sf-steps>button.active i{background:#fff!important;color:#155d96!important;border-color:#fff!important}
 html[data-site-theme="light"] .sf-flow button:focus-visible{outline:3px solid #0b548d!important;outline-offset:3px}
}
