/* ===========================================================================
   다크 모드 — html[data-theme="dark"] 일 때만 적용 (icons.js가 설정/토글)
   "자동 생성" 구간: styles.css / sdvx.css / 각 페이지 <style>의 밝은 배경·어두운 글자·연한 테두리를
   다크용 색으로 바꾼 덮어쓰기 규칙. 맨 아래 "손질" 구간은 직접 다듬은 부분.
   =========================================================================== */
html[data-theme="dark"] { color-scheme: dark; }
/* ── styles.css ── */
html[data-theme="dark"] body{background:#181925}
html[data-theme="dark"] .login-container{background:#222332}
html[data-theme="dark"] input{border:1px solid #804258}
html[data-theme="dark"] input:focus{border-color:#8d4967}
html[data-theme="dark"] .modal-box{background:#222332}
html[data-theme="dark"] .modal-box h3{color:#dfe0e9}
html[data-theme="dark"] .modal-box ol{color:#c3c4d5}
html[data-theme="dark"] .bookmarklet-box{background:#271b3e}
html[data-theme="dark"] .bookmarklet-code-input{border:1px solid #4f5272;background:#222332;color:#b4b6cb}
html[data-theme="dark"] .bookmarklet-copy-msg{color:#98e1ae}
html[data-theme="dark"] .share-url-box input{border:1px solid #4f5272;background:#1a1b26}
html[data-theme="dark"] .share-section + .share-section{border-top:1px solid #383a50}
html[data-theme="dark"] .level-range-picker input[type="number"]{border:1px solid #4f5272}
html[data-theme="dark"] .level-summary-checkbox{background:#181925;border:1px solid #4f5272}
html[data-theme="dark"] .level-summary-checkbox.checked{background:#321a3d;color:#cf90ea}
html[data-theme="dark"] .toggle-label{color:#d2d3e0}
html[data-theme="dark"] .slider:before{background-color:#222332}
html[data-theme="dark"] input:checked + .slider{background-color:#4e3276}
html[data-theme="dark"] .tab-link{background-color:#181925;color:#d2d3e0}
html[data-theme="dark"] .tab-link:hover{color:#eaeaf0}
html[data-theme="dark"] .tab-link.active{background-color:#3d405c;color:#eaeaf0}
html[data-theme="dark"] .title-text{background:#222332;color:#eaeaf0}
html[data-theme="dark"] .right-title-line{background:#303248}
html[data-theme="dark"] .left-title-line{background:#303248}
html[data-theme="dark"] .sort-controls label{color:#d2d3e0}
html[data-theme="dark"] .sort-controls select{border:1px solid #4f5272}
html[data-theme="dark"] .sort-order-btn{border:1px solid #4f5272;background-color:#181925;color:#eaeaf0}
html[data-theme="dark"] .search-container input{border:1px solid #4f5272}
html[data-theme="dark"] .record-block{background:#222332}
html[data-theme="dark"] .record-block:hover{background:#181925}
html[data-theme="dark"] .remaster-constant-box{background:#e4d4ff;color:#4a2a86;text-shadow:none}
html[data-theme="dark"] .record-song-name{color:#d2d3e0}
html[data-theme="dark"] .record-song-score{color:#b17aff}
html[data-theme="dark"] .record-rank{color:#d2d3e0}
html[data-theme="dark"] .sega-credentials-section{border:1px solid #4f5272;background-color:#1a1b26}
html[data-theme="dark"] .form-group input{border:1px solid #4f5272}
html[data-theme="dark"] .history-block{background:#222332}
html[data-theme="dark"] .history-block:hover{background:#181925}
html[data-theme="dark"] .history-changes{color:#d2d3e0}
html[data-theme="dark"] #sega-credentials-message{color:#d2d3e0}
html[data-theme="dark"] .friend-add-section,
html[data-theme="dark"] .friend-requests-section,
html[data-theme="dark"] .friend-list-section{background:#222332}
html[data-theme="dark"] .my-id-display strong{color:#d2d3e0}
html[data-theme="dark"] .friend-add-section input{border:1px solid #4f5272}
html[data-theme="dark"] .incoming-request,
html[data-theme="dark"] .friend-item{background:#1a1b26}
html[data-theme="dark"] .record-toggle-label{color:#d2d3e0}
html[data-theme="dark"] .record-slider:before{background-color:#222332}
html[data-theme="dark"] .set-sort-row label{color:#a5a7c0}
html[data-theme="dark"] .challenge-subtab-menu{border-bottom:1px solid #383a50}
html[data-theme="dark"] .challenge-subtab-link{background:#181925;color:#b4b6cb}
html[data-theme="dark"] .challenge-subtab-link.active{background:#ff77b2;color:#fff}
html[data-theme="dark"] .challenge-form-box{background:#222332}
html[data-theme="dark"] .challenge-form-row label{color:#b4b6cb}
html[data-theme="dark"] .challenge-form-row input[type="text"],
html[data-theme="dark"] .challenge-form-row input[type="number"]{border:1px solid #4f5272}
html[data-theme="dark"] .challenge-form-row select{border:1px solid #4f5272}
html[data-theme="dark"] .song-pick-block.is-selected{border-color:#8d4967;background:#3f1b29}
html[data-theme="dark"] .song-picked-info{background:#3f1b2a;color:#b4b6cb}
html[data-theme="dark"] .song-picked-info .picked-song-name{color:#d2d3e0}
html[data-theme="dark"] .grade-preset-btn{background:#181925;color:#d2d3e0}
html[data-theme="dark"] .grade-preset-btn:hover{background:#5f283c}
html[data-theme="dark"] .diff-filter-btn{background:#181925}
html[data-theme="dark"] .diff-filter-btn.advanced-diff-filter{color:#ffd97a}
html[data-theme="dark"] .diff-filter-btn.remaster-diff-filter.is-active{border-color:#e4d4ff}
html[data-theme="dark"] .assignee-checkbox{background:#181925}
html[data-theme="dark"] .challenge-card{background:#222332;border-left:4px solid #4f5272}
html[data-theme="dark"] .challenge-badge.done{background:#1a3d20;color:#98e1a9}
html[data-theme="dark"] .challenge-badge.pending{background:#181925}
html[data-theme="dark"] .challenge-target-line,
html[data-theme="dark"] .challenge-current-line{color:#b4b6cb}
html[data-theme="dark"] .challenge-cond{background:#281a3d}
html[data-theme="dark"] .challenge-subheading{color:#b4b6cb}
html[data-theme="dark"] .set-wizard-active-header{background:#3f1b2a}
html[data-theme="dark"] .secondary-btn{background:#3d405c !important;color:#b4b6cb !important}
html[data-theme="dark"] .admin-set-card{background:#222332}
html[data-theme="dark"] .admin-set-item-row{background:#1a1b26}
html[data-theme="dark"] .set-progress-table th,
html[data-theme="dark"] .set-progress-table td{border-bottom:1px solid #34364b}
html[data-theme="dark"] .set-progress-table td.is-done{background:#1a3d20}
html[data-theme="dark"] .set-progress-table td.is-done .set-progress-ach{color:#98e1a9}
html[data-theme="dark"] .admin-set-assignee-chip{background:#181925}
html[data-theme="dark"] .admin-set-inline-panel{background:#3f1b2a}
html[data-theme="dark"] .inline-add-target-row input,
html[data-theme="dark"] .inline-add-target-row select{border:1px solid #4f5272}
html[data-theme="dark"] .my-hw-set-card{background:#222332}
html[data-theme="dark"] .admin-view-toggle-btn{background:#181925;color:#a5a7c0}
html[data-theme="dark"] .admin-person-card{background:#222332}
html[data-theme="dark"] .admin-person-header{border-bottom:1px solid #383a50}
html[data-theme="dark"] .admin-person-set-block:not(:first-of-type){border-top:1px dashed #383a50}
html[data-theme="dark"] .admin-person-set-progress{background:#2b1b3f}
html[data-theme="dark"] .free-goals-person-chip{background:#181925;color:#b4b6cb}
html[data-theme="dark"] .level-achievement{background:#222332}
html[data-theme="dark"] .level-title{color:#dfe0e9}
html[data-theme="dark"] .achv-bar-label{color:#a5a7c0}
html[data-theme="dark"] .achievement-bar{background:#181925}
html[data-theme="dark"] .achievement-bar .progress-text{color:#d2d3e0}
html[data-theme="dark"] .toggle-thresholds{background:#181925;color:#a5a7c0}
html[data-theme="dark"] .toggle-thresholds:hover{background:#303248}
html[data-theme="dark"] .achv-detail-list{border-top:1px dashed #383a50}
html[data-theme="dark"] .filter-toggle-btn{background:#181925;color:#b4b6cb}
html[data-theme="dark"] .filter-toggle-btn:hover{background:#303248}
html[data-theme="dark"] .filter-toggle-btn.active{background:#44285f;color:#cf90ea}
html[data-theme="dark"] .record-filter-body{background:#222332}
html[data-theme="dark"] .filter-group-title{color:#b4b6cb}
html[data-theme="dark"] .filter-checkbox{background:#181925;border:1px solid #4f5272}
html[data-theme="dark"] .filter-checkbox.checked{background:#321a3d;color:#cf90ea}
html[data-theme="dark"] .filter-range-input{border:1px solid #4f5272}
html[data-theme="dark"] .filter-select{border:1px solid #4f5272}
html[data-theme="dark"] .admin-set-assignee-chip.is-pending{background:#3d321a;color:#ffd27a}
html[data-theme="dark"] .pending-hw-request-card{background:#3f331b;border:1px solid #8d7a49}
html[data-theme="dark"] .pending-hw-request-card .hw-set-body{border-top:1px dashed #8d7b49}
html[data-theme="dark"] .song-list-view-btn{background:#181925;color:#a5a7c0}
html[data-theme="dark"] .achv-switch{background:#232834}
html[data-theme="dark"] .achv-switch button{color:#9da0bb}
html[data-theme="dark"] .achv-switch button.active{background:#222332;color:#dfe0e9}
html[data-theme="dark"] .achv-filter-label,
html[data-theme="dark"] .achv-minconst{color:#9da0bb}
html[data-theme="dark"] .achv-fchip{border:1px solid #4f5272;background:#222332;color:#9da0bb}
html[data-theme="dark"] .achv-minconst select{border:1px solid #4f5272}
html[data-theme="dark"] .achv-legend{color:#9da0bb}
html[data-theme="dark"] .achv-legend-group b{color:#d2d3e0}
html[data-theme="dark"] .achv-group{background:#222332;border-bottom:1px solid #3d4558}
html[data-theme="dark"] .achv-group-head.has-children:hover{background:#1f263a}
html[data-theme="dark"] .achv-g-label{color:#dfe0e9}
html[data-theme="dark"] .achv-g-avg{color:#d2d3e0}
html[data-theme="dark"] .achv-children{background:#1b273e;border-top:1px solid #3d4558}
html[data-theme="dark"] .achv-ct-block{background:#222332;border-bottom:1px solid #3d4558}
html[data-theme="dark"] .achv-ct-const{color:#dfe0e9}
html[data-theme="dark"] .achv-tile.d-re_master{border-color:#e4d4ff}
html[data-theme="dark"] .achv-switch button{color:#9da0bb}
html[data-theme="dark"] .achv-switch button.active,
html[data-theme="dark"] .achv-switch button.active:hover{background:#222332;color:#dfe0e9}
html[data-theme="dark"] .achv-fchip{background:#222332;color:#9da0bb}
html[data-theme="dark"] .achv-fchip:hover{background:#232634}
html[data-theme="dark"] .achv-minconst select,
html[data-theme="dark"] .achv-minconst input{border:1px solid #4f5272}
html[data-theme="dark"] .achv-tile .sx-dot{border:1px solid #2a2b3c}
html[data-theme="dark"] .tool-shots img{border:1px solid #4f5272}
html[data-theme="dark"] .tool-shots figcaption{color:#a5a7c0}
html[data-theme="dark"] .ns-type{background:#222332;color:#eaeaf0}
html[data-theme="dark"] .ns-diff-remaster,
html[data-theme="dark"] .ns-diff-re_master{background:#e4d4ff;color:#4a2a86}
html[data-theme="dark"] .record-dx{color:#b4b6cb}
html[data-theme="dark"] .set-edit-meta input,
html[data-theme="dark"] .set-edit-box .song-search-input{border:1px solid #4f5272}
html[data-theme="dark"] .set-edit-section-title{color:#c3c4d5}
html[data-theme="dark"] .set-edit-bulk{background:#3f1b2a}
html[data-theme="dark"] .se-row{border:1px solid #554572;background:#222332}
html[data-theme="dark"] .se-song-name{color:#e1e2ea}
html[data-theme="dark"] .se-row-targets input,
html[data-theme="dark"] .se-row-targets select{border:1px solid #4f5272}
html[data-theme="dark"] .set-edit-box .grade-preset-btn{background:#181925;color:#d2d3e0}
html[data-theme="dark"] .set-edit-box .grade-preset-btn:hover{background:#5f283c}
html[data-theme="dark"] .set-edit-box .diff-filter-btn:not(.is-active){background:#181925}
html[data-theme="dark"] .set-edit-box .challenge-grade-presets{color:#a5a7c0}
html[data-theme="dark"] .te-name{border:1px solid #4f5272}
html[data-theme="dark"] .te-tier{border:1px solid #554572;background:#222332}
html[data-theme="dark"] .te-tier-head{background:#271b3e}
html[data-theme="dark"] .te-tier-head input[type=color]{border:1px solid #4f5272;background:#222332}
html[data-theme="dark"] .te-tier-head .te-tname{border:1px solid #4f5272}
html[data-theme="dark"] .te-chip.d-re_master{border-color:#e4d4ff}
html[data-theme="dark"] .te-add-row{color:#b4b6cb}
html[data-theme="dark"] .te-add-row input,
html[data-theme="dark"] .te-add-row select{border:1px solid #4f5272}
html[data-theme="dark"] .te-selbar{background:#1a253d;color:#9ab1df}
html[data-theme="dark"] .te-selbar select{border:1px solid #495f8d}
html[data-theme="dark"] .te-level-edit .te-lname{border:1px solid #4f5272}
html[data-theme="dark"] .tier-edit-box .achv-fchip{background:#222332;color:#9da0bb}
html[data-theme="dark"] .tier-edit-box .achv-fchip.te-add-level{background:#1f2637}
html[data-theme="dark"] .te-chips.drop-end{background:#1a253d}
html[data-theme="dark"] .te-hide-placed{color:#b4b6cb}
html[data-theme="dark"] .tier-edit-box .te-hide-placed{color:#b4b6cb}
html[data-theme="dark"] .achv-checkbar{background:#3f1b1b;border:1px solid #8d4949;color:#dc9d9d}
html[data-theme="dark"] .achv-checkbar input[type=number]{border:1px solid #884f4f}
html[data-theme="dark"] .achv-checkbar select{border:1px solid #884f4f}
html[data-theme="dark"] .achv-ck-summary{color:#9a9db9}
html[data-theme="dark"] .te-check{background:#3f1b1b;border:1px solid #8d4949;color:#dc9d9d}
html[data-theme="dark"] .te-check input[type=number]{border:1px solid #884f4f}
html[data-theme="dark"] .te-check select{border:1px solid #884f4f}
html[data-theme="dark"] .achv-ck-add2{background:#222332}
html[data-theme="dark"] .achv-ck-row2{border-top:1px dashed #8d4949}
html[data-theme="dark"] .achv-checkbar input[type=color]{border:1px solid #884f4f;background:#222332}
html[data-theme="dark"] .ck-dot{border:1.5px solid #2a2b3c}
html[data-theme="dark"] .achv-sortopt{color:#9da0bb}
html[data-theme="dark"] .tier-img-row select{border:1px solid #4f5272}
html[data-theme="dark"] .ic.ok{color:#95e4b7}
html[data-theme="dark"] .tab-link{color:#a4a6c0}
html[data-theme="dark"] .tab-link:hover{background:#1d2339;color:#e1e2ea}
html[data-theme="dark"] input[type=checkbox]:not(.toggle-switch input){background:#222332;border:1.6px solid #5a627d}
html[data-theme="dark"] input[type=checkbox]:not(.toggle-switch input)::after{background:center / contain no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='#222332' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E")}
html[data-theme="dark"] .filter-checkbox:hover{border-color:#6e498d}
html[data-theme="dark"] .achv-sortopt{border:1px solid #4d5772;background:#222332}
html[data-theme="dark"] .achv-sortopt:hover{border-color:#6e498d}
html[data-theme="dark"] button.achv-ck-add2,
html[data-theme="dark"] #achvCheckBar button.achv-ck-add2,
html[data-theme="dark"] #sxCheckBar button.achv-ck-add2{background:#222332 !important}
html[data-theme="dark"] button.achv-ck-add2:hover{background:#3f1b1b !important}
html[data-theme="dark"] .filter-checkbox,
html[data-theme="dark"] .achv-sortopt{background:#222332;border:1px solid #4f5272;color:#9da0bb}
html[data-theme="dark"] .filter-checkbox:hover,
html[data-theme="dark"] .achv-sortopt:hover{background:#232634;border-color:#4f5272}
html[data-theme="dark"] .filter-checkbox:has(input:focus-visible),
html[data-theme="dark"] .achv-sortopt:has(input:focus-visible){outline:2px solid #67498d}
html[data-theme="dark"] .admin-set-delete-btn,
html[data-theme="dark"] .my-hw-set-delete-btn,
html[data-theme="dark"] .admin-set-item-del-btn,
html[data-theme="dark"] .challenge-del-btn,
html[data-theme="dark"] .delete-btn{background:#3f1b1b !important;border:1px solid #8d494c !important}
html[data-theme="dark"] .admin-set-share-btn{background:#1b273f !important;border:1px solid #49628d !important}
html[data-theme="dark"] .song-cart-remove-btn{background:#3f1b1b !important;border:1px solid #8d494c !important}
html[data-theme="dark"] .record-side-card,
html[data-theme="dark"] .record-side .record-filter-body{background:#222332}
html[data-theme="dark"] .record-search input{border:1px solid #4d5772;background:#1f263a}
html[data-theme="dark"] .record-search input:focus{border-color:#67498d;background:#222332}
html[data-theme="dark"] .record-sort-row select{border:1px solid #4d5772;background:#1f263a;color:#dfe0e9}
html[data-theme="dark"] .record-side .sort-order-btn{border:1px solid #4d5772 !important;background:#1f263a !important;color:#dfe0e9 !important}
html[data-theme="dark"] .record-side .sort-order-btn:hover{background:#44285f !important;border-color:#6e498d !important}
html[data-theme="dark"] .record-played-row{color:#d2d3e0}
html[data-theme="dark"] .record-side .filter-range-input{border:1px solid #4d5772}
html[data-theme="dark"] .admin-set-copy-btn{background:#271a3d !important;border:1px solid #65498d !important}
html[data-theme="dark"] .share-kind-sel{color:#dfe0e9;background:#1f263a;border:1px solid #4d5772}
html[data-theme="dark"] .share-kind-sel:focus{border-color:#67498d}

/* ── sdvx.css ── */
html[data-theme="dark"] .sdvx-rating-card-vf{color:#e8e9ef}
html[data-theme="dark"] .sdvx-clear-complete{color:#a2d7b8}
html[data-theme="dark"] .sdvx-clear-puc{color:#e8e9ef}
html[data-theme="dark"] .sdvx-vf-badge{color:#e8e9ef}
html[data-theme="dark"] .diff-filter-btn.sdvx-adv-diff-filter{color:#ffdc7a}

/* ── custom-input.html (inline) ── */
html[data-theme="dark"] .lang-btn.active{color:#eaeaf0}
html[data-theme="dark"] .art-modal-desc{color:#a5a7c0}
html[data-theme="dark"] .art-close-btn{border:1px solid #2a2b3c22}
html[data-theme="dark"] .art-notfound{color:#a5a7c0}
html[data-theme="dark"] .th-crit{background:#5f5928;color:#eaeaf0}
html[data-theme="dark"] .th-perf{color:#eaeaf0}
html[data-theme="dark"] .th-great{background:#763254;color:#eaeaf0}
html[data-theme="dark"] .th-good{color:#eaeaf0}
html[data-theme="dark"] .btn-apply{color:#eaeaf0}
html[data-theme="dark"] .btn-save{color:#eaeaf0}

/* ── 손질 ── */
html[data-theme="dark"] body { background: #0f1017 !important; color: #e6e8f0; }
html[data-theme="dark"] input:not([type=checkbox]):not([type=radio]):not([type=color]):not([type=range]),
html[data-theme="dark"] select, html[data-theme="dark"] textarea {
  background-color: #181a28; color: #e6e8f0; border-color: #3a3d58;
}
html[data-theme="dark"] input::placeholder, html[data-theme="dark"] textarea::placeholder { color: #7d8099; }
html[data-theme="dark"] input:focus, html[data-theme="dark"] select:focus, html[data-theme="dark"] textarea:focus { border-color: #9d63f0; }
html[data-theme="dark"] option { background: #1c1e2e; color: #e6e8f0; }
html[data-theme="dark"] hr { border-color: #2c2e44; }
html[data-theme="dark"] .achievement-container { --achv-empty: #2b2e44; }
html[data-theme="dark"] ::-webkit-scrollbar { width: 10px; height: 10px; }
html[data-theme="dark"] ::-webkit-scrollbar-thumb { background: #3a3d58; border-radius: 8px; }
html[data-theme="dark"] ::-webkit-scrollbar-track { background: #14151f; }

/* 레이팅 탭 숫자: 회색(#888)이라 어두운 배경에서 흐려 보이던 것을 밝게 */
html[data-theme="dark"] .rating-summary,
html[data-theme="dark"] .rating-summary-box { color: #f1f2f8 !important; }
html[data-theme="dark"] .record-rate { color: #e3e4ee; }

/* 세부기록 목록 체크박스 — 어두운 배경에서 잘 보이게 */
html[data-theme="dark"] .note-sel-cb,html[data-theme="dark"] #noteSelAll{background:#111220 !important;border:1.6px solid #a9b1d6 !important;box-sizing:border-box !important;width:18px !important;height:18px !important;box-shadow:none !important}
html[data-theme="dark"] .note-sel-cb:checked,html[data-theme="dark"] #noteSelAll:checked{background:linear-gradient(135deg,#ff77b2,#9d63f0) !important;border-color:transparent !important;box-shadow:none !important}
html[data-theme="dark"] .note-sel-cb:checked::after,html[data-theme="dark"] #noteSelAll:checked::after{background:center / contain no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E")}

/* 히스토리 서브탭 / 레이팅 성장 그래프 */
html[data-theme="dark"] .hist-subtab-link{background:#222332;color:#b4b6cb}
html[data-theme="dark"] .hist-subtab-link.active{background:#ff77b2;color:#fff}
html[data-theme="dark"] .growth-box{background:#222332}
html[data-theme="dark"] .growth-title{color:#eaeaf0}
html[data-theme="dark"] .growth-xsw{background:#181925}
html[data-theme="dark"] .growth-xbtn{color:#a4a7bd}
html[data-theme="dark"] .growth-xbtn.active{background:#44285f;color:#cf90ea;box-shadow:none}
html[data-theme="dark"] .growth-chart .g-grid{stroke:#3a3d55}
html[data-theme="dark"] .growth-chart .g-axis{fill:#9a9db5}
html[data-theme="dark"] .growth-chart .g-dot{fill:#222332}
html[data-theme="dark"] .growth-chart .g-hover{stroke:#222332}
html[data-theme="dark"] .growth-info{color:#c3c5d6}
html[data-theme="dark"] .growth-info b{color:#cf90ea}
html[data-theme="dark"] .achvh-controls select{border:1px solid #4d5772;background:#1f263a;color:#dfe0e9}
html[data-theme="dark"] .achvh-chip{color:#c3c5d6}
html[data-theme="dark"] .achvh-chip.on{color:#fff}
html[data-theme="dark"] .achvh-table th,html[data-theme="dark"] .achvh-table td{border-bottom-color:#33364d}
html[data-theme="dark"] .achvh-table th{color:#9a9db5}
html[data-theme="dark"] .achvh-up{color:#5fe3a1}

/* 버전 플레이트 */
html[data-theme="dark"] .plate-card{background:#222332}
html[data-theme="dark"] .plate-vname,html[data-theme="dark"] .plate-kname{color:#eaeaf0}
html[data-theme="dark"] .plate-row{border-top-color:#33364d}
html[data-theme="dark"] .plate-bar{background:#33364d}
html[data-theme="dark"] .plate-count{color:#b4b6cb}
html[data-theme="dark"] .plate-done .plate-count{color:#5fe3a1}
html[data-theme="dark"] .plate-left-item{border-bottom-color:#33364d}
html[data-theme="dark"] .plate-left-name{color:#d2d3e0}
html[data-theme="dark"] .plate-section{color:#eaeaf0}
html[data-theme="dark"] .plate-bar .achv-seg-empty{background:#33364d}
html[data-theme="dark"] .plate-diff-name,html[data-theme="dark"] .plate-diff-count{color:#b4b6cb}
html[data-theme="dark"] .plate-total-jump{color:#b9a8ff}
html[data-theme="dark"] .plate-filter-note{background:#2a2550;color:#d5ccff}
html[data-theme="dark"] .record-result-count{color:#b9a8ff}

/* 다크모드: 눌림/호버 때 글자가 배경에 묻히지 않게 */
html[data-theme="dark"] button:hover:not(:disabled),
html[data-theme="dark"] button:active:not(:disabled){color:#fff}
html[data-theme="dark"] .achv-switch button:hover:not(.active){background:#2c3142;color:#eaeaf0}
html[data-theme="dark"] .secondary-btn:hover,
html[data-theme="dark"] .secondary-btn:active{background:#4c5073 !important;color:#fff !important}
html[data-theme="dark"] .achv-fchip:active,
html[data-theme="dark"] .filter-toggle-btn:active{color:#fff}

/* 다크모드: 체크박스가 체크되면 색이 채워지게 (숙제 수정/삭제 등 모든 체크박스) */
html[data-theme="dark"] input[type=checkbox]:not(.toggle-switch input):checked{
  background:linear-gradient(135deg,#ff77b2,#9d63f0) !important;border-color:transparent !important;box-shadow:none !important}
html[data-theme="dark"] input[type=checkbox]:not(.toggle-switch input):checked::after{
  background:center / contain no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E")}

/* S-레이팅 탭 */
html[data-theme="dark"] .srating-label{color:#9da0bb}
html[data-theme="dark"] .srating-total{color:#ffb84d}
html[data-theme="dark"] .srating-sub,html[data-theme="dark"] .srating-desc{color:#9da0bb}
html[data-theme="dark"] .srating-btn{background:#232834;color:#dfe0e9;border-color:#3a3f55}
html[data-theme="dark"] .srating-btn:hover{background:#2c3242}

/* 레이팅 포텐셜 */
html[data-theme="dark"] .record-pot-row{color:#b9bccd}
html[data-theme="dark"] .record-pot-gap{color:#8b8fa6}
html[data-theme="dark"] .record-pot-target.is-ap{color:#ffc94d}
html[data-theme="dark"] .record-pot-gain{color:#5fd68a}

/* 선택된(active/checked) 상태가 다크모드 기본 배경에 덮여서 안 보이던 것들 */
html[data-theme="dark"] .admin-view-toggle-btn.active,
html[data-theme="dark"] .free-goals-person-chip.active,
html[data-theme="dark"] .song-list-view-btn.active{background:#9d63f0;color:#fff}
html[data-theme="dark"] .free-goals-person-chip.active .free-goals-person-count{background:rgba(255,255,255,.25)}
html[data-theme="dark"] .achv-fchip.active,
html[data-theme="dark"] .achv-fchip.active:hover,
html[data-theme="dark"] .tier-edit-box .achv-fchip.active,
html[data-theme="dark"] .filter-checkbox:has(input:checked),
html[data-theme="dark"] .filter-checkbox.checked,
html[data-theme="dark"] .achv-sortopt:has(input:checked){background:#44285f;color:#cf90ea;border-color:#8a5bb0;font-weight:700}
html[data-theme="dark"] .filter-checkbox:has(input:checked):hover,
html[data-theme="dark"] .achv-sortopt:has(input:checked):hover{background:#52306f}
html[data-theme="dark"] .friend-search{background:#181925;color:#eaeaf0;border-color:#4f5272}
html[data-theme="dark"] .friend-search-empty{color:#9da0bb}
