:root{--surface:#fffefa;--soft:#eef2e6;--quote:#4b6247;--art-bg:#e9eddf;--subtle:#6b7963}
html[data-theme=dark]{--paper:#171c20;--surface:#22292d;--ink:#e4e8e1;--green:#345c4e;--muted:#afbbb2;--line:#414b4f;--sage:#2a3634;--soft:#2d3d34;--gold:#d4b46f;--quote:#d3ddbf;--art-bg:#293533;--subtle:#b0bbaf;color-scheme:dark}
html[data-deck=gilded]{--green:#66502c;--soft:#f2ead9;--quote:#735a30;--art-bg:#eee7d7}
html[data-deck=deviant]{--green:#554567;--soft:#ebe6f0;--quote:#695279;--art-bg:#e5dfeb}
html[data-deck=cat]{--green:#815345;--soft:#f5e8e1;--quote:#865d4e;--art-bg:#f3e8dd}
html[data-theme=dark][data-deck=gilded]{--green:#65512e;--soft:#3c3425;--quote:#ead3a4;--art-bg:#363024}
html[data-theme=dark][data-deck=deviant]{--green:#59446c;--soft:#372d43;--quote:#ddc7ed;--art-bg:#302a3b}
html[data-theme=dark][data-deck=cat]{--green:#744b40;--soft:#443229;--quote:#efd0bd;--art-bg:#3d3029}
.header-tools{display:flex;align-items:center;gap:10px}.tool-button{display:flex;align-items:center;justify-content:center;gap:8px;min-width:44px;min-height:44px;padding:5px 12px;border:1px solid var(--line);border-radius:6px;font-size:12px}.tool-button>span:first-child{font-size:23px;line-height:1}.tool-button:hover{background:var(--sage)}.tool-button[aria-pressed=true]{background:var(--sage)}
.detail,.search-wrap,.rank-button{background:var(--surface)}.art-area{background:var(--art-bg)}.orientation,.key-table{background:var(--sage)}.orientation button[aria-pressed=true]{background:var(--surface);color:var(--ink)}.rank-button:hover,.suit-button:hover,.recent-card:hover,.search-result:hover{background:var(--sage)}.rank-button[aria-pressed=true]{border-color:var(--green);background:var(--soft);color:var(--ink)}.suit-button[aria-pressed=true]{background:var(--green);color:#fff}.suit-button[aria-pressed=true] kbd{color:#fff;border-color:#ffffff66}.suit-button kbd{color:var(--ink);border-color:var(--line)}.keyword{background:var(--soft);border-color:var(--line);color:var(--ink)}.meaning,.symbol-item p,.card-theme,.symbol-note,.step-label,.eyebrow,.symbol-index,.card-controls,.shortcut-box p,.shortcut-box .eyebrow,.text-button,.result-count,.empty,.search-result small,footer,.muted,dd,#rank-count,.major .rank-button span:first-child{color:var(--subtle)}blockquote{color:var(--quote)}.recent-card{background:var(--surface)}kbd{background:var(--surface);color:var(--ink);border-color:var(--line)}figcaption,figcaption small{color:var(--subtle)}.reading-phrase .eyebrow{color:var(--subtle)}.search-wrap input::placeholder{color:var(--muted)}.meaning-basis{font-size:10px;letter-spacing:.4px;margin:-10px 0 14px;color:var(--subtle)}.symbol-grid.two{grid-template-columns:repeat(2,minmax(0,1fr))}.dialog-close{color:var(--ink)}dialog{background:var(--paper)}.setting-label{font-weight:600;display:block;font-size:13px;margin:24px 0 8px}#settings-dialog select{display:block;width:100%;min-width:0;min-height:46px;padding:9px 12px;background:var(--surface);color:var(--ink);border:1px solid var(--line);border-radius:6px;font:inherit;font-size:14px}.setting-description{color:var(--subtle);font-size:12px;margin:10px 0}#settings-dialog .settings-help{display:block;min-height:44px;margin:15px 0 4px;padding:6px 0;font-size:13px;text-decoration:underline;text-underline-offset:4px}#deck-source{font-size:12px;display:inline-flex;align-items:center;min-height:44px}.number-seal{border-color:var(--line);color:var(--subtle)}.card-controls button:hover{color:var(--ink)}html[data-theme=dark] #zoom-dialog{background:var(--surface)}
@media(max-width:570px){.header-tools{gap:6px}.tool-button{padding:5px;min-width:44px}.tool-label{display:none}.symbol-grid.two{grid-template-columns:1fr}.meaning-basis{font-size:11px}.topbar{gap:8px}.brand{min-width:0}.brandmark{font-size:34px}.setting-description{line-height:1.8}.card-theme{margin-bottom:18px}}
@media(max-width:360px){.topbar{padding:0 14px}.brand{font-size:21px;gap:7px;letter-spacing:-.8px}.brand i{font-size:18px}.brandmark{font-size:29px}.header-tools{gap:4px}.tool-button{width:40px;min-width:40px}.tool-button>span:first-child{font-size:23px}}
html[data-theme=dark] .brandmark{color:var(--quote)}
