.sw-character-import .sw-import-body{min-width:0}
.sw-character-import [hidden]{display:none!important}
.sw-import-original{margin:16px 0}.sw-import-original img{display:block;max-width:100%;max-height:420px;object-fit:contain;background:var(--field);border:1px solid var(--line)}.sw-import-original img[hidden]{display:none}.sw-import-original figcaption{margin-top:7px;font-size:12px;color:var(--muted);overflow-wrap:anywhere}
.sw-import-original-open{display:inline-flex;align-items:center;min-height:44px;margin-top:4px;color:var(--accent,#edc36b);text-decoration:underline;overflow-wrap:anywhere}.sw-import-original-open:focus-visible{outline:2px solid var(--accent,#edc36b);outline-offset:3px}
.sw-import-setup{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px 16px}.sw-import-setup label{min-width:0}.sw-import-setup input,.sw-import-setup select{width:100%}
.sw-import-map-row{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.4fr) minmax(0,1fr);gap:8px 12px;align-items:center;padding:12px 0;border-bottom:1px solid var(--line)}.sw-import-map-row>strong{overflow-wrap:anywhere}.sw-import-map-row label{min-width:0;font-size:12px}.sw-import-map-row select{width:100%;font-size:13px}
.sw-import-check{display:flex!important;align-items:flex-start;gap:8px;margin:12px 0;line-height:1.5}.sw-import-check input{width:auto!important;flex:0 0 auto;margin-top:4px}
.sw-import-manual-group{margin:15px 0}.sw-import-manual-row{display:flex;flex-wrap:wrap;gap:8px 12px;align-items:flex-end;padding:12px 0;border-bottom:1px solid var(--line)}.sw-import-manual-row>.form-label{flex:1 1 140px;min-width:0}.sw-import-manual-row>.form-label:first-child{flex-basis:230px}.sw-import-manual-row input,.sw-import-manual-row select{width:100%}.sw-import-manual-row>.sw-import-check{flex:0 0 auto}.sw-import-manual-group>button{margin-top:10px}
.sw-import-counts{font-weight:600;margin:16px 0}.sw-import-final{border-top:1px solid var(--line);padding-top:14px;margin-top:16px}.sw-import-final textarea{width:100%}.sw-import-final>button{margin-top:12px}
@media(max-width:620px){.sw-import-setup,.sw-import-map-row{grid-template-columns:1fr}.sw-import-map-row{gap:6px}.sw-import-map-row>strong{margin-top:3px}.sw-import-original img{max-height:300px}.sw-character-import table{font-size:12px}}

.sw-import-ocr-note{flex-basis:100%;font-size:12px;color:var(--warning,#f0bd75);margin:4px 0}.sw-import-ocr-text{white-space:pre-wrap;overflow:auto;max-height:260px;font-size:12px}

.sw-import-specialization-suggestions{grid-column:1/-1;padding:8px 12px;border-left:3px solid var(--accent);background:var(--field);min-width:0}.sw-import-specialization-suggestions:empty{display:none}.sw-import-specialization-suggestions p{margin:0 0 8px}.sw-import-specialization-suggestions button{white-space:normal;text-align:left}

.sw-import-row-editor{margin:20px 0}
.sw-import-selection-group{margin:18px 0}
.sw-import-selection-row{margin:10px 0;padding:14px;border:1px solid var(--line,#30475c);border-radius:10px;background:var(--field,#102536);min-width:0}
.sw-import-selection-controls{display:grid;grid-template-columns:minmax(180px,2fr) minmax(110px,1fr);gap:12px;align-items:start}
.sw-import-selection-controls>div:empty{display:none}
.sw-import-selection-controls>div:not(:empty){grid-column:1/-1}
.sw-import-selection-row select,.sw-import-selection-row input{width:100%;min-width:0}
.sw-import-selection-row .form-label{margin:0;min-width:0;display:flex;flex-direction:column;gap:6px}
.sw-import-selection-meta{display:flex;align-items:center;flex-wrap:wrap;gap:6px;margin-top:10px}
.sw-import-selection-meta:empty{display:none}
.sw-import-catalogue-badge,.sw-import-source-badge{display:inline-flex;align-items:center;font-size:12px;border:1px solid var(--line,#30475c);border-radius:999px;padding:3px 9px;line-height:1.5}
.sw-import-catalogue-badge{color:var(--accent,#edc36b)}
.sw-import-source-badge,.sw-import-source-label{color:var(--muted,#b4c6d6)}
.sw-import-source-label{font-size:12px;margin:8px 0;overflow-wrap:anywhere}
.sw-import-specialization-label{font-size:13px}
.sw-import-source-details{margin:8px 0;font-size:13px}
.sw-import-source-details summary{cursor:pointer;color:var(--muted,#b4c6d6)}
.sw-import-source-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;padding:12px 0}
.sw-import-inline-suggestions{margin:8px 0;padding:10px 0;border-top:1px solid var(--line,#30475c)}
.sw-import-inline-suggestions p{margin:0 0 8px}
.sw-import-row-actions{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:8px;margin-top:12px;padding-top:12px;border-top:1px solid var(--line,#30475c)}
.sw-import-row-actions [data-source-action="remove"]{color:var(--destructive,#ffb4ae)}
.sw-import-row-error{border-color:var(--destructive,#ffb4ae)}
.sw-import-selection-row [aria-invalid="true"]{border:2px solid var(--destructive,#ffb4ae);box-shadow:0 0 0 1px rgba(255,180,174,.16)}
.sw-import-field-error{display:block;color:var(--destructive,#ffb4ae);font-size:12px;font-weight:500;line-height:1.45;margin-top:2px}
.sw-import-owner-note{font-size:13px;color:var(--muted,#b4c6d6)}
.sw-import-custom-flags{display:flex;gap:14px;flex-wrap:wrap;margin-top:8px}.sw-import-inline-check{display:flex!important;gap:7px;align-items:center;font-size:13px}.sw-import-inline-check input{width:auto!important;margin:0}.sw-import-notes{font-size:12px;margin:8px 0;color:var(--muted,#b4c6d6)}.sw-import-notes summary{cursor:pointer}.sw-import-source-review>h4{margin-bottom:10px}.sw-import-source-review>.text-small{margin:6px 0}.sw-import-source-review .sw-import-check{margin:8px 0;line-height:1.4}
.sw-import-custom-declaration{display:grid;gap:12px;min-width:0;margin:14px 0}.sw-import-custom-declaration .form-label{display:flex;flex-direction:column;gap:6px;min-width:0}.sw-import-custom-declaration select,.sw-import-custom-declaration textarea{box-sizing:border-box;width:100%;min-width:0}.sw-import-custom-declaration textarea{min-height:100px;resize:vertical;white-space:pre-wrap}.sw-import-custom-scope{min-width:0;font-size:13px}.sw-import-custom-scope summary{cursor:pointer;line-height:1.5;padding:5px 0;color:var(--text,#e6f0f8);overflow-wrap:anywhere}.sw-import-custom-scope[open] summary{margin-bottom:8px}.sw-import-custom-scope>.text-small{display:block;margin-top:6px}.sw-import-required-marker{font-size:11px;font-weight:600;color:var(--muted,#b4c6d6)}.sw-import-custom-dialog .sw-import-required-marker{grid-column:1/-1}.sw-import-custom-name>.form-label{margin-top:10px}.sw-import-custom-declaration [aria-invalid="true"]{border:2px solid var(--destructive,#ffb4ae);box-shadow:0 0 0 1px rgba(255,180,174,.16)}
.sw-external-main [hidden]{display:none!important}
.sw-import-final-checks{min-width:0;margin:18px 0 10px;padding:12px 14px;border:1px solid var(--line,#30475c);border-radius:8px}.sw-import-final-checks legend{padding:0 5px;font-weight:600}.sw-import-review-reset{color:var(--accent,#edc36b)}.sw-import-review-reset:empty{margin:0}
.sw-import-section-hint{font-size:12px;font-weight:400;color:var(--muted,#b4c6d6)}
.sw-import-required>input,.sw-import-required>select,.sw-import-final-checks.sw-import-required{border:2px solid var(--destructive,#ffb4ae);box-shadow:0 0 0 1px rgba(255,180,174,.16)}
.sw-import-requirements{margin:16px 0;padding:14px 16px;border:1px solid var(--destructive,#ffb4ae);border-radius:10px;background:var(--field,#102536)}
.sw-import-requirements h4{margin:0 0 8px}.sw-import-requirements ul{margin:0;padding-left:20px}.sw-import-requirements .btn{padding:5px 0;min-height:32px;border:0;background:transparent;color:var(--destructive,#ffb4ae);text-align:left;white-space:normal;text-decoration:underline}.sw-import-requirements .btn:focus-visible{outline:2px solid var(--accent,#edc36b);outline-offset:3px}
.sw-import-custom-dialog,.sw-import-reference-dialog{width:min(620px,calc(100vw - 32px));box-sizing:border-box;max-height:90dvh;overflow:auto;padding:24px;color:var(--text,#e6f0f8);background:var(--panel,#102536);border:1px solid var(--line,#496779);border-radius:14px}
.sw-import-custom-dialog::backdrop,.sw-import-reference-dialog::backdrop{background:rgba(0,8,16,.72)}
.sw-import-custom-dialog [hidden],.sw-import-reference-dialog [hidden]{display:none!important}
.sw-import-custom-dialog h3,.sw-import-reference-dialog h3{margin:0 0 18px}dialog.sw-import-custom-dialog>.form-label{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:7px 10px;margin:14px 0}dialog.sw-import-custom-dialog>.form-label>input,dialog.sw-import-custom-dialog>.form-label>select{grid-column:1;grid-row:2;width:100%;min-width:0}dialog.sw-import-custom-dialog>.form-label>.sw-import-help{grid-column:2;grid-row:2;align-self:center}dialog.sw-import-custom-dialog>.form-label>.sw-import-field-error{grid-column:1/-1}
.sw-import-custom-dialog .sw-import-custom-flags{padding:10px 14px;border:1px solid var(--line,#496779);border-radius:8px}.sw-import-custom-dialog .sw-import-custom-flags legend{font-size:13px;padding:0 5px}.sw-import-custom-dialog .sw-file-actions{display:flex;flex-wrap:wrap;gap:10px;margin-top:18px}.sw-import-custom-dialog .sw-file-actions .btn{white-space:normal}
.sw-import-help{width:28px;height:28px;min-height:28px;padding:0!important;border-radius:50%;font-size:18px;line-height:1}.sw-import-reference-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px 20px;list-style:none;padding:0;margin:18px 0}.sw-import-reference-list li{min-width:0;overflow-wrap:anywhere}.sw-import-reference-list strong,.sw-import-reference-list span{display:block}.sw-import-reference-list span{margin-top:4px;line-height:1.5;color:var(--muted,#b4c6d6)}
@media(max-width:520px){.sw-import-custom-dialog,.sw-import-reference-dialog{padding:18px;width:calc(100vw - 24px)}.sw-import-reference-list{grid-template-columns:1fr}.sw-import-custom-dialog input,.sw-import-custom-dialog select,.sw-import-custom-declaration textarea{font-size:16px}}
@media(max-width:520px){.sw-import-selection-controls,.sw-import-source-fields{grid-template-columns:minmax(0,1fr)}.sw-import-selection-row{padding:12px}.sw-import-selection-row select,.sw-import-selection-row input{font-size:16px}.sw-import-selection-controls>div:not(:empty){grid-column:1}}
