.kifu-source-overlay{position:fixed;inset:0;z-index:20000;background:rgba(0,0,0,.45);display:flex;align-items:center;justify-content:center;padding:12px;color:var(--ink);box-sizing:border-box}
.kifu-source-dialog{width:min(680px,100%);max-height:90dvh;overflow:auto;border:1px solid var(--paper3);border-radius:12px;background:var(--paper);padding:20px;box-sizing:border-box}.kifu-source-dialog header,.kifu-source-dialog footer,.kifu-source-heading{display:flex;gap:12px;align-items:center;justify-content:space-between}.kifu-source-dialog h2{margin:0;font-size:20px}.kifu-source-dialog h3{margin:0;font-size:15px}.kifu-source-dialog button{min-height:42px;border:1px solid var(--paper3);background:var(--paper2);color:var(--ink);border-radius:7px;padding:8px 12px;cursor:pointer}.kifu-source-dialog button:disabled{opacity:.5;cursor:wait}.kifu-source-menu{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:18px 0}.kifu-source-menu button{display:flex;align-items:center;gap:12px;min-height:74px;text-align:left}.kifu-source-menu b{color:var(--gold);font-size:18px}.kifu-source-menu i{margin-left:auto;font-style:normal}.kifu-source-dialog [hidden]{display:none!important}.kifu-source-dialog label{display:grid;gap:7px;margin:16px 0;color:var(--ink2)}.kifu-source-dialog input,.kifu-source-dialog textarea{box-sizing:border-box;width:100%;padding:10px;min-width:0;border:1px solid var(--paper3);border-radius:6px;background:var(--paper2);color:var(--ink);font:inherit}.kifu-source-error{color:var(--red,#bb4939);font-size:13px;line-height:1.6}.kifu-source-heading{margin:16px 0}.kifu-source-row{display:flex;align-items:center;gap:10px;padding:12px 0;border-bottom:1px solid var(--paper3)}.kifu-source-row>div{flex:1;min-width:0}.kifu-source-dialog strong,.kifu-source-dialog small{display:block;overflow-wrap:anywhere}.kifu-source-dialog small{margin-top:5px;color:var(--ink3);font-size:12px}.kifu-fox-game{display:block;width:100%;text-align:left;margin-top:8px}.kifu-source-dialog footer{margin-top:16px;flex-wrap:wrap}
html[data-theme] #profile-import-preview{display:flex;align-items:stretch;flex-direction:column;position:relative;padding:14px 16px;gap:12px}#profile-import-preview .profile-import-summary{padding-right:84px;min-width:0}#profile-import-preview .profile-import-summary strong{white-space:normal;overflow-wrap:anywhere}#profile-import-preview .profile-import-summary span{overflow-wrap:anywhere;line-height:1.6}#profile-import-preview .profile-import-actions{display:flex;gap:10px;align-items:end;flex-wrap:wrap}#profile-import-preview .profile-import-actions label{display:flex;flex-direction:column;gap:5px;white-space:nowrap}#profile-import-preview .profile-import-actions select{min-height:40px;margin:0;min-width:90px}#profile-import-preview .profile-import-actions button{min-height:40px;white-space:normal;line-height:1.4;height:auto}#profile-import-preview>button{position:absolute;right:12px;top:12px;padding:4px 8px;min-height:28px;width:auto}#profile-import-preview>small{display:block;line-height:1.7;white-space:normal}#profile-import-preview .profile-import-actions .modal-btn{min-width:0}#profile-import-preview progress{width:100%}
.kifu-legacy-source{display:none!important}.unified-import-bar{display:flex;align-items:center;gap:12px;flex-wrap:wrap}.unified-import-bar button{min-height:42px}.unified-import-bar>small{color:var(--ink3)}
#kifu-modal.review-unified-source #kifu-filters,#kifu-modal.review-unified-source #kifu-list{display:none!important}
.voice-review-source-layout:has(.kifu-legacy-source){grid-template-columns:1fr 1fr}.fairplay-source-panel:has(.kifu-legacy-source){min-width:0}.fairplay-source-panel .kifu-legacy-source{display:none!important}
@media(max-width:600px){.kifu-source-dialog{padding:16px}.kifu-source-menu{grid-template-columns:1fr}.kifu-source-menu button{min-height:56px}.kifu-source-row{flex-wrap:wrap}.kifu-source-row>div{flex-basis:65%}#profile-import-preview .profile-import-actions{display:grid;grid-template-columns:1fr 1fr}#profile-import-preview .profile-import-actions>.modal-btn{grid-column:1/-1}#profile-import-preview .profile-import-actions label{min-width:0}#profile-import-preview .profile-import-actions select{width:100%}}
@media(max-width:700px){.voice-review-source-layout:has(.kifu-legacy-source){grid-template-columns:1fr}}

/* Header stays outside the scrollable import content. */
.kifu-source-dialog{display:flex;flex-direction:column;overflow:hidden}
.kifu-source-dialog>header{flex:0 0 auto;padding-bottom:12px}
.kifu-source-body{min-height:0;overflow-y:auto;overscroll-behavior:contain}
