.theme-toggle{grid-area:theme;justify-self:end;min-height:34px;padding:7px 10px;border:1px solid #c4d5d6;border-radius:8px;background:#eff8f7;color:#552a7b;font-size:11px;line-height:1.35;white-space:nowrap}
:root[data-theme="dark"]{color-scheme:dark;--accent:#9b6bff;--paper:#0f0a17;--surface:#1a1327;--ink:#efe3fa;--muted:#a595bd;--line:#3d3053;--soft:#241a33;--accent-dark:#c6a2ff}
[data-theme="dark"] body{background:#1a1222;color:var(--ink)}
[data-theme="dark"] :is(.masthead,.sidebar,.character-card,.character-filters,.team-board,.team-preview,.team-library,.equipment-card,.equipment-toolbar,.guide-item,.portrait-viewer,.voice-card){background:#291d34;color:#e1d6eb;border-color:#4e3d5d;box-shadow:0 2px 8px #0f071644}
[data-theme="dark"] :is(.game-panel,.portrait-panel,.character-dashboard){border-image:none;background:#291d34;border-color:#3f2f4e;color:#e1d6eb}
[data-theme="dark"] :is(.portrait-stage,.portrait-viewer-viewport){background:#24192e}
[data-theme="dark"] .card-art{background:#34273f}
[data-theme="dark"] :is(input,select,button.secondary-button,.back-button,.nav-home,.category-button,.character-filter-element,.catalog-layout-button,.team-candidate,.portrait-controls button,.detail-tabs button,.portrait-viewer button,.back-to-top){background:#362643;color:#d8cde1;border-color:#5d4a6e;box-shadow:none}
[data-theme="dark"] :is(.character-filter-search,.character-filter-field select,.equipment-toolbar select,.theme-toggle){background:#362643;color:#e1d6eb;border-color:#5d4a6e}
[data-theme="dark"] .theme-toggle:hover{background:#483658}
[data-theme="dark"] :is(.brand strong,.catalog-title-wrap h1,.group-title,.card-name,.section-title,.data-card h3,.character-filter-heading h3,.equipment-group-heading h2,.guide-item h2,.guide-item h3,.voice-header h3,.comparison-item h4){color:#e6daf0}
[data-theme="dark"] :is(.description,.profile-copy,.info-table dd,.stats-table td,.voice-text dd,.comparison-summary,.effect-breakdown ul,.footer-credit-row>strong){color:#d3c8dc}
[data-theme="dark"] :is(.card-title,.card-meta,.card-id,.detail-title,.status-races,.status-note,.panel-note,.numeric-context,.numeric-note,.voice-summary,.voice-source,.voice-text dt,.voice-text.original dd,.character-filter-help,.sidebar-note p,.eyebrow,.snapshot-note,.brand-caption,.section-intro,.group-description,.filter-status,.sort-control,.character-filter-field,.character-filter-search-label,.catalog-layout-label,.portrait-caption,.portrait-viewer-help){color:#b1a8b9}
[data-theme="dark"] :is(.muted){color:#b1a8b9!important}
[data-theme="dark"] :is(.masthead-note,.count-badge,.inline-count,.theme-tag,.badge,.element-badge,.detail-tabs,.team-mode-switch,.equipment-group-count,.portrait-controls,.portrait-viewer-tools,.info-table dt,.stats-table th,.numeric-values dt,.equipment-stat,.comparison-side){background:#372844;color:#cac0d3;border-color:#564268}
[data-theme="dark"] #header-version{color:#d6cbdf}
[data-theme="dark"] :is(.alias-tag,.note-box,.skill-energy,.comparison-intro,.comparison-side.after){background:#2d1b3d;color:#d2b9e7;border-color:#543a6b}
[data-theme="dark"] :is(.editor-tag,.editor-note,.weapon-note,.equipment-enhance-badge,.equipment-highest-marker){background:#443b1f;color:#f0cf6c;border-color:#8c783d}
[data-theme="dark"] .editor-note p{color:#dcbe63}
[data-theme="dark"] :is(.numeric-block,.numeric-values dd,.equipment-empty,.boss-guide>.guide-field){background:#24182e;color:#d9cee2;border-color:#4c395c}
[data-theme="dark"] :is(.numeric-title,.numeric-effect-title,.status-value strong,.comparison-intro strong,.footer-credit-row a){color:#b283db}
[data-theme="dark"] .native-ui .status-value,[data-theme="dark"].native-ui .status-value{border-image:none;border:1px solid #5f3e7b;background:#2d1d3b;padding:10px}
[data-theme="dark"] :is(.equipment-group-heading){background:#352642;border-color:#a98d39}
[data-theme="dark"] .equipment-group-heading:hover{background:#423251}
[data-theme="dark"] :is(.equipment-state,.numeric-effect,.numeric-values dt,.numeric-values dd,.section-title,.info-table,.info-table dt,.info-table dd,.stats-table td,.data-card,.voice-header,.team-pair,.site-footer,.portrait-viewer-header){border-color:#493759}
[data-theme="dark"] :is(.app-navigation a,.breadcrumbs,.text-button){color:#c1b7c9}
[data-theme="dark"] .app-navigation a:hover{background:#402d50}
[data-theme="dark"] :is(.character-filter-element,.catalog-layout-button,.portrait-controls button,.team-mode-button,.equipment-toggle button)[aria-pressed="true"],[data-theme="dark"] .detail-tabs button[aria-selected="true"],[data-theme="dark"] .app-navigation a[aria-current="page"]{background:#3d1b5a;color:#e8cdff;border-color:#8649bb;box-shadow:none}
[data-theme="dark"] .category-button[aria-pressed="true"],[data-theme="dark"] .nav-home[aria-current="page"]{background:#3d1b5a;color:#e8cdff;border-color:#8649bb}
[data-theme="dark"] .portrait-enlarge-hint{background:#2f213be8;color:#d9cee2;border-color:#5d4a6e}
[data-theme="dark"] .team-slot-weapon,[data-theme="dark"] .team-slot-soul{background:#362643}
[data-theme="dark"] .team-slot-remove{background:#382846;color:#e2d7ec;border-color:#7a658c}

[data-theme="dark"] .hero-stat strong{color:#ffd75e}
[data-theme="dark"] .hero-stat{border-left-color:#3d3053}
[data-theme="dark"] .app-navigation a[aria-current="page"]{background:#2a1b3d;color:#f6ecff;border-bottom-color:#ffc63d}
[data-theme="dark"] .count-badge{background:#3a2a12;color:#ffd75e}
[data-theme="dark"] .catalog-list-toggle[aria-expanded="false"]{background:#5b2fa8;border-color:#7a45c9;box-shadow:0 2px 0 #3d1b6b}
[data-theme="dark"] .primary-button{background:var(--accent);border-color:var(--accent);box-shadow:none}
