/* Readable type, labeled filters and the persistent sun/moon control. */
.theme-toggle { display: inline-flex; gap: 4px; align-items: center; padding: 5px; min-height: 42px; border: 1px solid #755362; background: #30212b; color: #c4a8b0; border-radius: 25px; flex-shrink: 0; box-shadow: inset 0 1px #ffffff06; }
.theme-toggle > span:not(.theme-label) { display: grid; place-items: center; width: 31px; height: 31px; border-radius: 50%; }
.theme-toggle svg { width: 18px; height: 18px; }
.theme-toggle .theme-moon { color: #f4dfbc; background: #673849; box-shadow: 0 2px 8px #08040b33; }
.theme-toggle .theme-label { font-size: 11px; color: #d8c2bb; margin: 0 9px 0 5px; min-width: 25px; }
:root[data-theme="light"] .theme-toggle .theme-moon { background: transparent; box-shadow: none; color: #93727c; }
:root[data-theme="light"] .theme-toggle .theme-sun { color: #fff3dc; background: #8b3d51; box-shadow: 0 2px 7px #77465533; }
:root[data-theme="light"] .theme-toggle { background: #f4e8e0; border-color: #c8a9b0; }
:root[data-theme="light"] .theme-toggle .theme-label { color: #69404e; }
.sd-filters { display: grid; grid-template-columns: minmax(220px,1.8fr) repeat(3,minmax(140px,1fr)); gap: 14px; align-items: end; padding: 20px; border: 1px solid #634650; border-radius: 12px; background: linear-gradient(120deg,#3f2a342c,#251e27); margin: 22px 0 18px; }
.filter-caption { display: block; font: 600 12px/1.6 var(--sans); color: #c3a9aa; margin: 0 0 8px; letter-spacing: .1px; }
.sd-search-field, .sd-select-field { min-width: 0; display: block; }
.sd-search-field .search-box { width: 100%; max-width: none; margin: 0; height: 48px; border: 1px solid #77535f; background: #201921; border-radius: 9px; padding: 0 14px; }
.sd-search-field input { font-size: 14px; color: #f1e1d4; }
.sd-search-field input::placeholder { color: #a88c94; }
.sd-select-wrap { display: block; position: relative; min-width: 0; width: 100%; }
.sd-select-wrap::after { content: ''; position: absolute; right: 17px; top: 19px; height: 7px; width: 7px; border-right: 1.5px solid #c39b9c; border-bottom: 1.5px solid #c39b9c; transform: rotate(45deg); pointer-events: none; }
.sd-select-wrap select, .dg-finder .sd-select-wrap select, .dg-plan-controls .sd-select-wrap select { width: 100%; min-width: 0; min-height: 48px; height: 48px; margin: 0; padding: 10px 38px 10px 14px; appearance: none; -webkit-appearance: none; border: 1px solid #77535f; border-radius: 9px; background: #201921; color: #edddd2; font-size: 13px; line-height: 1.5; cursor: pointer; }
.sd-select-wrap select:hover, .sd-search-field .search-box:focus-within { border-color: #b8828e; background: #2e1f29; }
.sd-select-wrap select:focus-visible { outline-offset: 3px; }
.dg-filter-fields { gap: 15px; }
.dg-finder .dg-step-label, .dg-workshop .dg-step-label { font-size: 11px; letter-spacing: 1px; }
.dg-finder .dg-filter-tip { font-size: 12px; line-height: 1.9; color: #c4a6ab; padding-top: 14px; border-top: 1px solid #63465066; }
.dg-finder .dg-collection-toggle label, .dg-finder .dg-collection-toggle .small-link { font-size: 12px; }
.dg-plan-controls > .sd-select-field { min-width: 240px; }
.dg-plan-controls .filter-caption { font-size: 12px; }
.dg-plan-controls .dg-plan-owned { font-size: 12px; line-height: 1.8; }
.dg-plan-controls > .small-link { font-size: 12px; }
.tabs button, .tabs button span { font-size: 13px; }
.tabs { gap: 28px; }
.elements { gap: 9px; }
.element-filter { min-height: 37px; font-size: 12px; padding: 7px 12px; }
.element-filter .element { width: 15px; height: 15px; }
.count-label { font-size: 12px; color: #bda6ad; }
.character-grid { grid-template-columns: repeat(auto-fill,minmax(170px,1fr)); gap: 17px; }
.char-portrait { height: 171px; }
.card-info { padding: 16px 13px; }
.card-info h3 { font-size: 14px; line-height: 1.5; }
.card-info p { font-size: 11px; line-height: 1.7; margin-top: 6px; }
.card-info .badge { font-size: 11px; line-height: 1.5; }
.card-info .stars { font-size: 10px; }
.dg-mini-tier { font-size: 12px; top: 17px; }
.favorite-button { width: 29px; height: 29px; }
.favorite-button svg { width: 15px; height: 15px; }
.dg-card-team { font-size: 11px; padding: 10px 12px; gap: 6px; }
.dg-card-team span { font-size: 10px; }
.dg-card-team svg { width: 14px; height: 14px; }
.more-row .button { font-size: 13px; min-height: 46px; padding: 12px 25px; }
.dg-kicker { font-size: 10px; line-height: 1.7; letter-spacing: 1px; }
.section-header p, .dg-section-top p, .dg-launchpad p { font-size: 13px; line-height: 1.9; }
.dg-quick-pick > span { font-size: 12px; }
.dg-quick-pick > small { font-size: 11px; line-height: 1.6; }
.sd-edition { font-size: 10px; letter-spacing: 1.4px; }
.sd-signature div > span { font-size: 11px; line-height: 1.8; }
.sd-statbar > div > span { font-size: 10px; line-height: 1.6; }
.sd-character-label > span { font-size: 10px; line-height: 1.7; }
.sd-character-label small { font-size: 12px; }
.sd-statbar .dg-data-chip { font-size: 10px; }
.dg-team-modes small, .dg-mode-number { font-size: 12px; }
.dg-library-intro p, .dg-draft-link small { font-size: 12px; }
.dg-team-tag, .dg-team-cost { font-size: 11px; }
.team-member b, .dg-plan-example .team-member b { font-size: 12px; line-height: 1.6; }
.team-member small, .dg-plan-example .team-member small { font-size: 11px; line-height: 1.6; }
.dg-workshop .dg-plan-slot-role { font-size: 11px; line-height: 1.6; white-space: normal; }
.dg-plan-rolebar strong { font-size: 12px; }
.dg-plan-rolebar small { font-size: 11px; }
.dg-plan-candidate-top small, .dg-plan-candidate-evidence { font-size: 12px; line-height: 1.8; }
.dg-plan-match, .dg-plan-example-head .dg-team-tag, .dg-plan-example-delta p > span { font-size: 11px; }
.dg-plan-main .section-header .dg-kicker { font-size: 10px; }
.dg-plan-tips > .dg-kicker, .dg-plan-tips article small, .dg-plan-tip-number { font-size: 10px; line-height: 1.7; }
.dg-plan-tip-limit, .dg-plan-tips article .small-link { font-size: 12px; }
.dg-coach-controls label, .dg-coach-controls .dg-coach-owned { font-size: 12px; }
.dg-coach-controls select { font-size: 13px; min-height: 44px; }
.dg-coach-findings p, .dg-coach-findings strong, .dg-coach-clear p { font-size: 13px; }
.dg-coach-reasons { font-size: 12px; }
.dg-coach-example, .dg-coach-limit, .dg-coach-assumptions { font-size: 11px; line-height: 1.9; }
.dg-coach-card-top > span, .dg-coach-card-top small, .dg-coach-person > span { font-size: 10px; }
.dg-coach-person > strong { font-size: 13px; }
.dg-coach-card-bottom .button, .dg-coach-card-bottom .small-link { font-size: 12px; }
.dg-tier-footnote, .dg-tier-options > span, .dg-tier-options label { font-size: 12px; }
.dg-tier-character strong { font-size: 10px; line-height: 1.6; }
.dg-tier-label small { font-size: 9px; }
.dg-tier-options select { min-height: 44px; }
.dg-compare-portraits strong, .dg-compare-hole small { font-size: 11px; }
.dg-compare-column dt, .dg-compare-facts > span, .dg-compare-diff span { font-size: 11px; }
.dg-compare-column dd { font-size: 13px; }
.source-line, .skill-stat, .side-info, .equipment-row small { font-size: 12px; line-height: 1.9; }
.panel-heading span { font-size: 11px; }
.item-card .item-effect, .item-card .item-stat, .item-card .en-name { font-size: 12px; line-height: 1.9; }
.pick-character span { font-size: 12px; }
.pick-character > small, .dg-plan-pick-card > small { font-size: 11px; }
.modal-body > p { font-size: 13px; }
footer > p, footer .text-button { font-size: 12px; }
footer > small { font-size: 11px; line-height: 1.8; }
@media(max-width:1000px) {
  .sd-filters { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .sd-search-field { grid-column: 1/-1; }
  .dg-coach-suggestion { grid-template-columns: 230px minmax(0,1fr); }
}
@media(max-width:820px) {
  .theme-toggle { order: 2; margin-left: auto; }
  .theme-toggle .theme-label { display: none; }
  .theme-toggle > span:not(.theme-label) { height: 28px; width: 28px; }
  .theme-toggle { min-height: 38px; padding: 4px; }
  .header-inner nav { order: 3; }
}
@media(max-width:560px) {
  .sd-filters { padding: 16px 13px; grid-template-columns: 1fr 1fr; gap: 14px 11px; border-radius: 10px; }
  .sd-filters > .sd-select-field:last-child { grid-column: 1/-1; }
  .sd-select-wrap select, .dg-finder .sd-select-wrap select, .dg-plan-controls .sd-select-wrap select { font-size: 13px; }
  .character-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 13px; }
  .char-portrait { height: 148px; }
  .card-info { padding: 13px 11px; }
  .card-info h3 { font-size: 13px; }
  .card-info p, .card-info .badge { font-size: 11px; }
  .dg-mini-tier { font-size: 11px; top: 15px; right: 9px; }
  .dg-card-team { font-size: 10px; padding: 10px 9px; }
  .tabs { gap: 23px; }
  .tabs button, .tabs button span { font-size: 12px; }
  .element-filter { min-height: 35px; font-size: 11px; padding: 6px 9px; }
  .count-label { width: 100%; margin: 7px 0 2px; }
  .dg-quick-pick > span { font-size: 10px; }
  .dg-quick-pick > small { font-size: 10px; }
  .sd-edition { font-size: 9px; letter-spacing: 1px; }
  .sd-signature div > span { font-size: 10px; }
  .sd-statbar > div > span { font-size: 8px; letter-spacing: .2px; }
  .sd-character-label > span { font-size: 8px; }
  .sd-character-label small { font-size: 10px; }
  .dg-team-modes small { font-size: 11px; }
  .dg-library-intro p, .dg-draft-link small { font-size: 11px; }
  .dg-plan-controls > .sd-select-field { min-width: 0; width: 100%; }
  .dg-workshop .dg-plan-slot-role { font-size: 10px; min-height: 16px; }
  .dg-plan-rolebar strong { font-size: 11px; }
  .dg-plan-rolebar small { font-size: 10px; }
  .team-member small, .dg-plan-example .team-member small { font-size: 10px; }
  .dg-plan-example-actions .button { font-size: 11px; }
  .dg-coach-suggestion { display: flex; }
  .dg-tier-footnote, .dg-tier-options label { font-size: 11px; }
  .source-line, .side-info, .equipment-row small { font-size: 11px; }
  .dg-guide-members small { font-size: 10px; }
  .dg-compare-column dd { font-size: 12px; }
  .dg-compare-portraits strong { font-size: 10px; }
  footer { align-items: flex-start; }
  footer > small { font-size: 10px; }
}
body[data-view="characters"] #character-section, body[data-view="favorites"] #character-section { padding-top: 14px; }
.element-filter:not(.active) { color: var(--element-color,var(--muted)); }
.filter-bar .select { font-size: 13px; min-height: 46px; border-radius: 9px; }
.dg-collection-toggle input, .dg-plan-owned input, .dg-plan-keep input, .dg-coach-owned input { width: 16px; height: 16px; accent-color: #a1596c; }
.dg-plan-version { font-size: 11px; line-height: 1.7; letter-spacing: .8px; }
.breadcrumbs { font-size: 12px; line-height: 1.8; }
.detail-meta { font-size: 12px; line-height: 1.8; }
.brand small { font-size: 8px; line-height: 1.6; letter-spacing: 2px; }
@media(max-width:560px) {
  .dg-plan-version { font-size: 10px; }
  .breadcrumbs, .detail-meta { font-size: 11px; }
  .brand small { font-size: 7px; }
  footer > small { font-size: 11px; }
}
.dg-tier-label small { font-size: 11px; line-height: 1.5; opacity: 1; }
.dg-tier-card-actions :is(a,button) { display: grid; place-items: center; min-width: 25px; min-height: 25px; }
@media(max-width:560px) { .dg-tier-card-actions :is(a,button) { min-height: 30px; } }
