/* Resource library and parsing are two states of the same production stage. */
.aw-header{background:#252525;border-bottom:0;gap:14px;padding-right:24px}
.aw-header .native-project-name{max-width:300px;font-size:13px}
.aw-header .native-view-tabs{border:1px solid #4a4a4a;border-radius:24px;padding:3px;gap:2px}
.aw-header .native-view-tabs .btn{height:27px;padding:0 12px;border-radius:20px;font-size:12px;gap:5px}
.aw-header .native-view-tabs .active{background:#414141;color:#fff}
.aw-setting{border:0;background:none;color:#ddd;display:flex;align-items:center;gap:6px;font-size:12px;padding:7px 3px}
.aw-setting span{max-width:220px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.aw-header-divider{height:16px;width:1px;background:#494949}
.native-assets.aw-page{padding:24px 132px 0!important;position:relative;background:#252525;min-height:0;isolation:isolate}
.aw-page .native-assets-content{max-width:1680px;width:100%;margin:0 auto;padding-bottom:90px}
.aw-page .native-page-heading{display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid #3c3c3c;padding:0 0 17px;margin:0 0 19px}
.aw-page .native-page-heading h1{font-size:28px;line-height:1.4;font-family:'Songti SC','Noto Serif SC',serif;font-weight:500;margin:0}
.aw-page .native-page-heading>span{font-size:12px;color:#969696}
.aw-page .native-assets-toolbar{gap:18px;margin-bottom:30px;flex-wrap:wrap}
.aw-page .asset-tabs{gap:16px;min-width:410px;flex:1 1 420px;scrollbar-width:none}
.aw-page .asset-tab{font-size:13px;padding:10px 6px 13px;gap:5px;min-height:40px}
.aw-page .aw-filters{display:flex;gap:10px;align-items:center;margin-left:auto;min-width:0}
.aw-page .compact-search{width:clamp(160px,16vw,288px);height:36px;border-color:#646464;background:#383838}
.aw-page .compact-search input{width:100%;outline:0;font-size:12px;min-width:0}
.aw-episode-select{border:1px solid #646464;border-radius:22px;background:#303030;color:#eee;width:100px;height:34px;padding:0 12px;font-size:12px;cursor:pointer}
.aw-display-menu>summary{display:flex;align-items:center;justify-content:center;width:30px;height:34px;cursor:pointer;list-style:none}
.aw-display-menu>summary::-webkit-details-marker{display:none}
.aw-display-menu .native-menu-panel{top:38px;bottom:auto;right:0;min-width:160px;background:#303030;z-index:10}
.aw-display-menu .native-menu-panel button{display:block;width:100%;text-align:left;font-size:13px;border:0;background:none;color:#ddd;padding:10px;border-radius:7px}
.aw-display-menu .native-menu-panel button:hover{background:#444}
.aw-library-intro{display:flex;justify-content:space-between;align-items:center;gap:20px;margin:0 16px 26px}
.aw-library-intro h2{font-size:14px;line-height:1.5;font-weight:500;margin:0 0 5px}
.aw-library-intro p{color:#aaa;font-size:12px;margin:0;line-height:1.6}
.aw-library-intro .btn{border-radius:24px;flex:none;font-size:12px;min-height:34px}
.aw-page .asset-grid{grid-template-columns:repeat(auto-fill,minmax(174px,1fr));gap:12px}
.aw-page .asset-card{position:relative;min-width:0;max-width:none;padding:4px 4px 0;border:1px solid #555;border-radius:21px;background:transparent;align-self:stretch}
.aw-page .asset-thumb,.aw-page .asset-thumb.landscape{height:auto;aspect-ratio:4/5;background:#303030;border-radius:16px}
.aw-page .asset-thumb>.icon{width:30px;height:30px;color:#6b6b6b}
.aw-page .asset-card-info{padding:10px 15px 12px;min-height:58px}
.aw-page .asset-card-info h3{font-size:14px;font-weight:500;margin:0 0 7px}
.aw-page .asset-card-info>span{font-size:12px;color:#8c8c8c}
.aw-page .asset-card[hidden]{display:none!important}
.aw-no-match{text-align:center;padding:35px;color:#999;font-size:13px}
.aw-step-bar{position:sticky;bottom:18px;align-self:center;margin:auto auto 18px;display:flex;align-items:center;gap:12px;max-width:calc(100% - 24px);width:max-content;min-height:56px;border-radius:34px;padding:10px 16px;background:#070707;box-shadow:0 6px 25px #0002;z-index:4;flex-shrink:0}
.aw-step-message{display:flex;align-items:center;gap:10px;font-size:12px;line-height:1.6;min-width:0}
.aw-step-message img{width:25px;height:25px;object-fit:contain;flex:none}
.aw-step-bar .btn{border-radius:22px;flex:none;min-height:32px;font-size:12px;padding:6px 14px}
.aw-step-bar .btn:disabled{background:#919191;color:#555;opacity:.8;cursor:not-allowed}
.aw-step-bar .btn.ghost{color:#ddd}
.aw-step-loading{min-width:min(665px,100%);background:transparent;border:1px solid #3c3c3c;box-shadow:none;padding:11px 16px 11px 28px}
.aw-step-loading .aw-step-message{flex:1}
.aw-step-loading .btn:last-child{border:1px solid #494949}
.aw-parsing .aw-parse-center{flex:1;min-height:230px;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:30px 0 70px;text-align:center}
.aw-parse-center h1{font-family:inherit;font-size:16px;font-weight:500;margin:18px 0 12px;line-height:1.6}
.aw-parse-center p,.aw-parse-center>span{font-size:12px;color:#999;line-height:1.8;margin:0}
.aw-parse-center>span{margin-top:10px;color:#bbb}
.aw-parse-emblem{width:62px;height:62px;position:relative;display:grid;place-items:center;border-radius:50%;background:#303030}
.aw-parse-emblem img{width:40px;height:40px;object-fit:contain}
.aw-parse-emblem i{position:absolute;inset:-3px;border:2px solid #454545;border-top-color:#c9c0eb;border-radius:50%;animation:aw-spin 1.3s linear infinite}
@keyframes aw-spin{to{transform:rotate(360deg)}}
@media(prefers-reduced-motion:reduce){.aw-parse-emblem i{animation:none}}
@media(max-width:1200px){.native-assets.aw-page{padding-left:32px!important;padding-right:32px!important}.aw-page .native-assets-toolbar{gap:10px}.aw-page .asset-tabs{min-width:360px}.aw-page .compact-search{width:165px}.aw-step-message{font-size:11px}}
@media(max-width:850px){.aw-page .aw-filters{width:100%}.aw-page .compact-search{flex:1}.aw-header .native-project-name{max-width:160px}.aw-setting span{max-width:100px}.aw-step-bar{gap:5px}.aw-step-message img{display:none}}
/* Batch selection stays in the resource list, matching the observed reference flow. */
.aib-actions{display:flex;align-items:center;gap:8px;flex:none}
.aib-selection-title{font-size:14px;color:#ddd}
.aw-page .asset-card.aib-selectable{position:relative;cursor:pointer}
.aw-page .asset-card.aib-selected{border-color:#eee;box-shadow:0 0 0 1px #eee}
.aib-checkbox{position:absolute;top:15px;right:15px;width:21px;height:21px;border:1px solid #999;border-radius:6px;background:#202020;display:grid;place-items:center;z-index:2;color:#111}
.aib-selected .aib-checkbox{background:#fff;border-color:#fff}
.aib-checkbox .icon{width:15px;height:15px}
.aib-selectable .native-asset-main:disabled{opacity:.4;cursor:not-allowed}
/* The existing thumbnail border adds 1px to the reference's 12px visual inset. */
.aw-main-badge{position:absolute;left:11px;top:11px;background:#d3fedf;color:#000;border-radius:999px;padding:4px 12px;font:500 10px/15px 'PingFang SC',-apple-system,system-ui,'Segoe UI',Roboto,sans-serif}
.aib-job-state{position:absolute;inset:4px 4px auto;aspect-ratio:4/5;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;border:0;border-radius:16px;background:#666a6b;color:#fff;font-size:13px;z-index:3}
.aib-job-state i{width:26px;height:26px;border:3px dotted #d5d5d5;border-top-color:transparent;border-radius:50%;animation:aw-spin 1s linear infinite}
.aib-job-state button{border:1px solid #babdbd;border-radius:20px;background:transparent;color:#fff;font-size:12px;padding:3px 14px;cursor:pointer}
.aib-job-state button:disabled{opacity:.5;cursor:wait}
.aib-failed{cursor:pointer;color:#e7c8a0;background:#353333}
.aib-batch-progress{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:-8px 0 18px;padding:10px 15px;background:#303030;border:1px solid #494949;border-radius:12px;font-size:13px;color:#ddd}
.aib-batch-progress>span{display:flex;align-items:center;gap:8px}
.aib-batch-progress>button:disabled{display:none}
.aib-preview-list{margin-top:18px;display:grid;gap:8px;max-height:42vh;overflow:auto}
.aib-preview-list details{border:1px solid #414141;border-radius:12px;background:#272727}
.aib-preview-list summary{list-style:none;display:flex;align-items:center;gap:10px;cursor:pointer;padding:13px 16px;font-size:14px}
.aib-preview-list summary span{flex:1}.aib-preview-list summary small{color:#999}
.aib-preview-list summary::-webkit-details-marker{display:none}
.aib-preview-list p{white-space:pre-wrap;overflow-wrap:anywhere;padding:0 16px 16px;margin:0;font-size:13px;color:#aaa;line-height:1.8}
.aib-confirm-modal{width:min(620px,calc(100vw - 40px));background:#252525;border:1px solid #454545;border-radius:24px}
@media(max-width:900px){.aw-library-intro{margin-left:0;margin-right:0;flex-wrap:wrap}.aib-actions{margin-left:auto}}

.aib-model-settings{display:flex;gap:10px;align-items:center;flex-wrap:wrap}.aib-model-settings label{display:flex;align-items:center;gap:6px;color:#aaa;font-size:12px}.aib-model-settings select{height:34px;max-width:240px;border:1px solid #555;border-radius:8px;background:#292929;color:#ddd;padding:4px 8px}.aib-model-settings select:disabled{opacity:.55}@media(max-width:560px){.aib-model-settings{width:100%}.aib-model-settings select{max-width:200px}.aib-actions{flex-wrap:wrap}}
