/* Theme tokens only; approved artwork is mapped separately in skin-backgrounds.css. */
:root[data-skin-theme]{--bg:#10151d;--text:#e2e7ec;--muted:#b5bdca;--field:#10151d;--field-line:#7d8ba0;--line:#66758b;--accent:#a9cfff;--primary:#edf1f7;--primary-text:#11151c;--hover:#2a3545;--soft:#252c37;--soft-2:#141a22;--selected:#233750;--panel-alpha:.95;--nav-alpha:.97;--title-alpha:.92}
:root[data-skin-theme="sibiji-taegeuk-01"]{--panel-rgb:16,50,57;--text:#f1ebdd;--muted:#b7c9c5;--field:#09262d;--primary:#d0ae69;--primary-text:#10272b;--line:#718d87;--field-line:#718d87;--accent:#e7c57f;--selected:#23494c;--soft:#173c41;--hover:#285057}
:root[data-skin-theme="sibiji-ilwol-obongdo-01"]{--panel-rgb:29,34,30}
:root[data-skin-theme="sibiji-sibijangmun-01"]{--panel-rgb:36,31,22}
:root[data-skin-theme="sibiji-ojoryongbo-01"]{--panel-rgb:43,20,19}
:root[data-skin-theme]{--panel:rgba(var(--panel-rgb),var(--panel-alpha))}
:root[data-skin-theme] body{isolation:isolate}
:root[data-skin-theme] :is(#rulePage,#storePage,#modePage){background:transparent}
:root[data-skin-theme] .topbar{background:rgba(var(--panel-rgb),var(--nav-alpha))}
:root[data-skin-theme] :is(.profile-heading,.section-heading,.rule-header){color:var(--text)}
:root[data-skin-theme] :is(.primary-btn,.mode-primary,#referralForm button){background:var(--primary);color:var(--primary-text)}
:root[data-skin-theme] :is(.primary-btn,.mode-primary,#referralForm button):hover:not(:disabled){background:var(--primary);filter:brightness(1.08)}
:root[data-skin-theme] .theme-option:has(input:checked){background:var(--selected);color:var(--text);border-color:var(--accent)}
:root[data-skin-theme] :is(.search-box,.profile-panel,.mode-intro,.turn-panel,.room-sidebar>section,.host-controls,.mode-reference,.bet-settings){color:var(--text)}
:root[data-skin-theme] :is(.rule-details,.store-empty){background:var(--panel);border-radius:16px;padding:20px}
:root[data-skin-theme] #rewardCode{background:var(--field);color:var(--text);border-color:var(--field-line)}
:root[data-skin-theme] :is(input,textarea)::placeholder{color:var(--muted);opacity:1}
:root[data-skin-theme] :is(button,a,input,select,textarea,summary):focus-visible{outline:2px solid var(--accent);outline-offset:3px}
:root[data-skin-theme] :is(.theme-option span,#ownedSkinList li){overflow-wrap:anywhere;min-width:0}
:root[data-skin-theme] .theme-option{min-width:0}

/* Text stays transparent; opacity belongs to real panels and controls. */
:root[data-skin-theme]{--hero-ink:#fff9ed;--hero-edge:#103b42}
:root[data-skin-theme] .hero-inner> :is(h1,.tagline,.suit-mark){background:transparent;border:0;border-radius:0;padding:0;color:var(--hero-ink);opacity:1}
:root[data-skin-theme] .quick-links{width:fit-content;max-width:100%;margin-left:auto;margin-right:auto;padding:5px 18px;border-radius:999px;background:radial-gradient(ellipse farthest-side,rgba(7,30,35,.60) 0%,rgba(7,30,35,.50) 75%,rgba(7,30,35,.15) 95%,transparent 100%);color:var(--hero-ink);text-shadow:0 1px 2px var(--hero-edge)}
:root[data-skin-theme] .quick-links button{color:var(--hero-ink);opacity:1;font-size:16px;font-weight:700;line-height:1.6;text-shadow:0 1px 2px var(--hero-edge),0 0 1px var(--hero-edge)}
:root[data-skin-theme] .quick-links button:hover{color:#fff;text-decoration:underline;text-underline-offset:4px}
:root[data-skin-theme] :is(.room-last,.mode-note){background:var(--panel);border-radius:12px;padding:12px}

/* Artwork-facing text only. Keep these leaf/transparent-navigation selectors
   out of panels, controls, tables, dialogs and the opaque common topbar.
   Shared ink/edge tokens match the home hero; small text has NO text stroke. */
:root[data-skin-theme] :is(.artwork-title,.hero-inner>h1,.profile-heading>h1,.mode-title,.store-heading>h1,:where(#rulePage) .rule-header h1){
 color:var(--hero-ink);paint-order:stroke fill;-webkit-text-stroke:.65px var(--hero-edge);
 text-shadow:0 1px 2px var(--hero-edge),0 3px 8px rgba(8,30,35,.3);
}
:root[data-skin-theme] :is(.artwork-copy,.artwork-status,.artwork-icon,.hero-inner>.suit-mark,
 .profile-heading>p,.store-heading>p,.mode-lead,
 .profile-nav>a,.profile-nav>button:not(:disabled),.mode-nav>a,.mode-nav>span,
 .store-nav>a,.rule-nav>a,.rule-nav>span:not(:where(#ruleStar)),.rule-nav>.mode-link:not(:disabled),
 .room-topline>span,:where(#rulePage) .rule-version,:where(#rulePage) .rule-meta>span,:where(#rulePage) .rule-goal,
 :where(#rulePage) .rule-visual>h2,
:where(#rulePage) .rule-footer>span,:where(#rulePage) .rule-footer>a){
 color:var(--hero-ink);-webkit-text-stroke:0;
 text-shadow:0 1px 2px var(--hero-edge),0 -1px 1px var(--hero-edge),1px 0 1px var(--hero-edge),-1px 0 1px var(--hero-edge);
}
:root[data-skin-theme] :is(.profile-heading>p,.store-heading>p,.mode-lead,
 .profile-nav>a,.profile-nav>button:not(:disabled),.mode-nav>a,.mode-nav>span,.store-nav>a,
 .rule-nav>a,.rule-nav>span:not(:where(#ruleStar)),.rule-nav>.mode-link:not(:disabled),.room-topline>span,
 :where(#rulePage) .rule-version,:where(#rulePage) .rule-meta>span,:where(#rulePage) .rule-footer>span,:where(#rulePage) .rule-footer>a){font-weight:600}
/* Status meaning overrides neutral artwork ink; retain disabled control rules. */
:root[data-skin-theme] .room-topline>#roomSync.sync-error{color:var(--error)}
:root[data-skin-theme] #profileLoadStatus.artwork-status[role=alert]{color:var(--error)}
:root[data-skin-theme] :where(#rulePage) .rule-suit.red{color:#ff9b9b}
/* Panel notes stay ordinary text. These existing surfaces are already 95% opaque. */
:root[data-skin-theme] :is(.mode-note,.room-last){background:var(--panel);color:var(--muted);text-shadow:none;-webkit-text-stroke:0}

/* Approved artwork themes: only semantic rule panels receive this surface.
   95% background opacity never changes text, cards or controls opacity. */
:root[data-skin-theme] .rule-content-panel{background:var(--panel);border-color:var(--line)}
