:root{--ink:#161616;--muted:#777;--paper:#f5f5f2;--card:#fff;--yellow:#ffd83d;--pink:#ff8faa;--teal:#46d2c6;--line:#e7e7e1;--soft:#efefe9;--danger:#ff6262;--shadow:0 18px 50px rgba(20,20,20,.08)}*{box-sizing:border-box}html{scroll-behavior:smooth}body{margin:0;background:var(--paper);color:var(--ink);font-family:-apple-system,BlinkMacSystemFont,"PingFang SC","Microsoft YaHei",Arial,sans-serif}.topbar{height:76px;display:flex;align-items:center;justify-content:space-between;padding:0 max(24px,calc((100vw - 1180px)/2));background:rgba(245,245,242,.9);backdrop-filter:blur(14px);position:sticky;top:0;z-index:20;border-bottom:1px solid rgba(0,0,0,.05)}.topbar nav{display:flex;gap:24px}.topbar a{text-decoration:none;color:var(--ink);font-weight:700}.brand-lock{display:flex;align-items:center;gap:11px;text-decoration:none;color:var(--ink)}.brand-lock b{font-size:20px;letter-spacing:.5px}.brand-lock small{display:block;font-size:9px;letter-spacing:1.3px;color:#8a8a84}.brand-lock.compact small{display:none}.logo-die{width:34px;height:34px;display:grid;place-items:center;background:var(--yellow);border-radius:10px;transform:rotate(8deg);box-shadow:4px 4px 0 var(--ink)}.shell{max-width:1180px;margin:auto;padding:36px 24px 80px}.hero{min-height:370px;border-radius:38px;background:var(--ink);color:#fff;padding:58px;display:flex;align-items:center;justify-content:space-between;overflow:hidden;position:relative}.hero:before{content:"";position:absolute;width:260px;height:260px;border:70px solid var(--pink);border-radius:50%;right:-50px;top:-120px;opacity:.9}.hero h1{font-size:clamp(38px,6vw,72px);line-height:1.04;margin:12px 0 20px;letter-spacing:-3px;position:relative}.hero h1 em{font-style:normal;color:var(--yellow)}.hero p{color:#c9c9c6;font-size:16px;max-width:580px}.kicker,.eyebrow{font-size:11px;letter-spacing:2.2px;font-weight:900;color:#7f7f78}.hero .kicker{color:var(--teal)}.hero-toy{width:210px;height:210px;background:var(--yellow);border-radius:50% 45% 54% 48%;display:flex;align-items:center;justify-content:center;gap:10px;color:var(--ink);font-weight:900;transform:rotate(8deg);z-index:2;box-shadow:14px 14px 0 var(--teal)}.toy-orb{font-size:74px;line-height:1}.search-panel{margin:-28px 40px 50px;position:relative;z-index:4;background:#fff;border-radius:24px;padding:16px;display:grid;grid-template-columns:1fr auto;gap:12px;box-shadow:var(--shadow)}.search-panel div{background:#f2f2ef;border-radius:16px;padding:10px 16px}.search-panel small{display:block;color:#888;font-weight:700}.search-panel input{border:0;background:transparent;outline:0;width:100%;font-size:18px;padding:6px 0 2px}.btn{border:0;border-radius:15px;padding:13px 20px;font-weight:900;font-size:15px;cursor:pointer;text-decoration:none;color:var(--ink);display:inline-flex;align-items:center;justify-content:center;gap:8px}.btn.primary{background:var(--yellow);box-shadow:0 5px 0 #e4bb19}.btn.dark{background:var(--ink);color:#fff}.btn.teal{background:var(--teal)}.btn.big{width:100%;padding:18px;font-size:18px;margin-top:16px}.btn.mini{padding:8px 13px;background:var(--yellow)}.btn:disabled{opacity:.5;cursor:not-allowed}.section-head,.admin-head{display:flex;align-items:flex-end;justify-content:space-between;margin:34px 0 18px}.section-head h2,.admin-head h1{margin:5px 0 0;font-size:34px}.count-badge{background:#fff;border:1px solid var(--line);padding:8px 12px;border-radius:999px;font-size:12px;font-weight:800}.series-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:20px}.series-card{background:#fff;border-radius:26px;text-decoration:none;color:var(--ink);overflow:hidden;transition:.2s;box-shadow:0 1px 0 rgba(0,0,0,.05)}.series-card:hover{transform:translateY(-5px);box-shadow:var(--shadow)}.cover{aspect-ratio:1.2;position:relative;background:#ecece6;overflow:hidden}.cover img{width:100%;height:100%;object-fit:cover}.cover-placeholder{height:100%;display:grid;place-items:center;font-size:54px;font-weight:1000;color:#c4c4bc}.start-chip{position:absolute;right:14px;bottom:14px;background:var(--yellow);padding:9px 13px;border-radius:999px;font-size:12px;font-weight:900}.series-info{padding:20px}.series-info small{color:#999;font-weight:800}.series-info h3{font-size:20px;margin:6px 0 14px}.tags{display:flex;gap:7px;flex-wrap:wrap}.tags span{background:#f0f0ec;padding:6px 9px;border-radius:8px;font-size:11px;font-weight:800}.tags .hot{background:#ffe0e7;color:#cf3a61}.empty-card{grid-column:1/-1;background:#fff;border-radius:24px;padding:50px;text-align:center;border:1px dashed #ccc}.empty-icon,.add-plus{font-size:46px;font-weight:200;color:#aaa}.series-banner{display:flex;align-items:center;gap:18px;padding:22px 0 30px}.series-banner h1{margin:3px 0;font-size:30px}.series-banner p{margin:0;color:#777}.mini-cover{width:84px;height:84px;border-radius:24px;background:#fff;display:grid;place-items:center;overflow:hidden;font-weight:900}.mini-cover img{width:100%;height:100%;object-fit:cover}.upload-stage,.clue-stage,.model-stage,.result-stage{background:#fff;border-radius:28px;padding:26px;margin-bottom:18px;position:relative}.stage-no{position:absolute;top:20px;right:24px;font-size:54px;font-weight:1000;color:#f0f0eb;line-height:1}.stage-title{margin-bottom:20px;position:relative;z-index:2}.stage-title span{font-size:22px;font-weight:900}.stage-title small{display:block;color:#888;margin-top:4px}.upload-drop{height:280px;border:2px dashed #d7d7d0;border-radius:22px;display:grid;place-items:center;overflow:hidden;cursor:pointer;background:#fafaf8}.upload-drop input{display:none}.upload-drop div{text-align:center}.upload-drop b{display:grid;margin:auto;width:58px;height:58px;place-items:center;border-radius:18px;background:var(--yellow);font-size:32px}.upload-drop strong,.upload-drop small{display:block;margin-top:8px}.upload-drop small{color:#999}.upload-drop img{width:100%;height:100%;object-fit:contain}.ocr-row{display:flex;align-items:center;gap:14px;margin-top:14px}.muted{color:#888}.box-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:12px}.box-clue{min-height:156px;text-align:left;border:1px solid var(--line);background:#fafaf8;border-radius:18px;padding:14px;position:relative;cursor:pointer}.box-clue.has{background:#fffbea;border-color:#f1df83}.box-clue.sold{background:#f5f5f3;color:#aaa}.box-no{font-size:12px;color:#aaa;font-weight:900}.box-clue small{display:block;color:#ff6680;font-weight:900;text-align:center;margin:8px 0}.box-empty{height:105px;display:grid;place-items:center;color:#bbb}.chips{display:flex;flex-direction:column;gap:6px}.chips span{background:#fff;border:1px solid #eee;padding:6px 8px;border-radius:9px;font-size:12px}.sold-stamp{position:absolute;inset:0;display:grid;place-items:center;font-size:20px;font-weight:900;color:#bbb}.mode-cards{display:grid;grid-template-columns:1fr 1fr;gap:12px}.mode-cards label{cursor:pointer}.mode-cards input{display:none}.mode-cards span{display:block;border:2px solid #ecece7;border-radius:18px;padding:17px}.mode-cards input:checked+span{border-color:var(--ink);box-shadow:inset 0 0 0 2px var(--yellow)}.mode-cards small{display:block;color:#888;margin-top:5px;line-height:1.5}.honesty{border-radius:18px;padding:16px 18px;margin-bottom:16px;display:flex;gap:12px;align-items:center}.honesty b{white-space:nowrap}.honesty.weak{background:#fff1f1}.honesty.mid{background:#fff9df}.honesty.strong{background:#e9fbf7}.result-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:14px}.result-card{border:1px solid var(--line);border-radius:20px;padding:17px}.result-card.sold{opacity:.5}.result-top{display:flex;justify-content:space-between}.result-top span{font-weight:900;color:#999}.result-top b{font-size:20px}.pick{display:flex;align-items:center;gap:12px;margin:16px 0}.pick img{width:70px;height:70px;border-radius:16px;object-fit:cover;background:#eee}.pick small{display:block;color:#999}.pick strong{font-size:18px}.prob-list>div,.hidden-bars>div{display:grid;grid-template-columns:100px 1fr 54px;gap:8px;align-items:center;font-size:11px;margin:8px 0}.prob-list i,.hidden-bars i{height:7px;background:#eee;border-radius:99px;overflow:hidden}.prob-list em,.hidden-bars em{display:block;height:100%;background:var(--yellow);border-radius:99px}.prob-list b,.hidden-bars b{text-align:right}.hidden-panel{margin-top:16px;background:var(--ink);color:#fff;border-radius:22px;padding:22px;display:grid;grid-template-columns:1fr 1.3fr;gap:24px}.hidden-panel p{color:#bbb}.hidden-panel .eyebrow{color:var(--pink)}.hidden-bars i{background:#333}.hidden-bars em{background:var(--pink)}.result-actions{margin-top:18px;display:flex;align-items:center;gap:15px}.modal[hidden]{display:none}.modal{position:fixed;inset:0;background:rgba(0,0,0,.42);z-index:100;display:grid;place-items:center;padding:20px}.modal-card{width:min(700px,100%);max-height:88vh;overflow:auto;background:#fff;border-radius:28px;padding:26px;position:relative}.modal-x{position:absolute;right:18px;top:14px;border:0;background:transparent;font-size:30px;cursor:pointer}.sold-switch,.choice-item{display:flex;align-items:center;gap:10px}.sold-switch{background:#f4f4f0;padding:12px;border-radius:12px;margin:14px 0}.item-choices{display:grid;grid-template-columns:repeat(2,1fr);gap:9px}.choice-item input{display:none}.choice-item span{width:100%;border:2px solid #eee;padding:10px;border-radius:14px;display:flex;align-items:center;gap:8px}.choice-item input:checked+span{border-color:var(--ink);background:#fff8d4}.choice-item img{width:40px;height:40px;border-radius:9px;object-fit:cover}.modal-actions{margin-top:20px}.install-body{min-height:100vh;display:grid;place-items:center;padding:20px;background:radial-gradient(circle at 15% 15%,#ffe5ec 0,transparent 26%),radial-gradient(circle at 85% 75%,#dffaf5 0,transparent 30%),var(--paper)}.install-card{width:min(720px,100%);background:#fff;padding:38px;border-radius:30px;box-shadow:var(--shadow)}.install-card h1{font-size:38px;margin-bottom:5px}.form-grid,.admin-form{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin-top:24px}.form-grid label,.admin-form label,.form-stack label{font-weight:800;font-size:13px}.form-grid input,.admin-form input,.admin-form select,.form-stack input,.item-admin-card input,.item-admin-card select{width:100%;border:1px solid #ddd;border-radius:12px;padding:12px;background:#fafaf8;margin-top:6px;font:inherit}.full{grid-column:1/-1}.divider{height:1px;background:#eee}.alert{padding:12px 15px;border-radius:12px;margin:15px 0}.alert.danger{background:#ffeaea;color:#a22222}.alert.good{background:#e8fbf5;color:#177454}.form-stack{display:flex;flex-direction:column;gap:15px}.text-link{color:#777;text-align:center}.admin-shell{max-width:1220px;margin:auto;padding:36px 24px 80px}.admin-shell.narrow{max-width:820px}.admin-head p{color:#777;margin:6px 0}.admin-table-wrap{background:#fff;border-radius:24px;overflow:hidden}.admin-table{width:100%;border-collapse:collapse}.admin-table th,.admin-table td{text-align:left;padding:16px;border-bottom:1px solid #eee}.admin-table th{font-size:11px;color:#999;letter-spacing:1px}.table-series{display:flex;align-items:center;gap:12px}.table-series .thumb{width:50px;height:50px;border-radius:13px;background:#eee;display:grid;place-items:center;overflow:hidden;font-size:10px}.thumb img{width:100%;height:100%;object-fit:cover}.table-series small{display:block;color:#999;margin-top:3px}.status{padding:5px 8px;border-radius:99px;font-size:11px}.status.on{background:#def8ee;color:#15745e}.status.off{background:#eee;color:#888}.row-actions{display:flex;gap:12px}.row-actions a{color:#222}.checkline{display:flex!important;align-items:center;gap:10px;background:#fafaf8;border-radius:12px;padding:11px}.checkline input{width:auto!important;margin:0!important}.item-admin-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:14px}.item-admin-card{background:#fff;border-radius:20px;padding:14px;display:flex;flex-direction:column;gap:8px}.item-image{height:180px;border-radius:14px;background:#f1f1ed;display:grid;place-items:center;overflow:hidden;color:#bbb}.item-image img{width:100%;height:100%;object-fit:cover}.two-cols{display:grid;grid-template-columns:1fr 90px;gap:8px}.card-actions{display:flex;align-items:center;justify-content:space-between}.text-danger{border:0;background:transparent;color:#d33;cursor:pointer}.add-card{border:2px dashed #ddd;justify-content:center}.page-title{padding:30px 0}.page-title h1{font-size:48px;margin:6px 0}.page-title p{color:#777;max-width:720px}.stats{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;margin-bottom:20px}.stats div{background:#fff;padding:22px;border-radius:18px}.stats b{display:block;font-size:32px}.stats span{color:#888;font-size:12px}.history-list{display:flex;flex-direction:column;gap:10px}.history-card{background:#fff;border-radius:18px;padding:18px;display:flex;align-items:center;justify-content:space-between}.history-card small,.history-card p{color:#888;margin:0}.history-card h3{margin:4px 0}.verify-badge{background:#eee;padding:7px 10px;border-radius:99px;font-size:11px}.verify-badge.ok{background:#def8ee;color:#176b57}footer{text-align:center;color:#999;padding:30px;font-size:11px}.back-link{font-weight:800}.modal-open{overflow:hidden}@media(max-width:850px){.series-grid{grid-template-columns:repeat(2,1fr)}.hero{padding:38px;min-height:320px}.hero-toy{width:140px;height:140px}.item-admin-grid{grid-template-columns:repeat(2,1fr)}}@media(max-width:600px){.topbar{height:62px;padding:0 16px}.topbar nav{gap:12px}.topbar nav a:first-child{display:none}.shell,.admin-shell{padding:20px 14px 60px}.hero{border-radius:26px;padding:30px 24px;min-height:330px}.hero h1{letter-spacing:-1.5px}.hero-toy{position:absolute;right:-45px;bottom:-30px;opacity:.5}.search-panel{margin:-18px 10px 35px;grid-template-columns:1fr;padding:11px}.series-grid{grid-template-columns:1fr}.series-card{display:grid;grid-template-columns:120px 1fr}.cover{aspect-ratio:auto;height:150px}.start-chip{display:none}.series-info{padding:16px}.analysis-shell{padding-top:8px}.series-banner h1{font-size:22px}.mini-cover{width:68px;height:68px}.upload-stage,.clue-stage,.model-stage,.result-stage{border-radius:22px;padding:20px}.upload-drop{height:220px}.box-grid{grid-template-columns:repeat(2,1fr)}.box-clue{min-height:140px}.mode-cards{grid-template-columns:1fr}.result-grid{grid-template-columns:1fr}.hidden-panel{grid-template-columns:1fr}.item-choices{grid-template-columns:1fr}.ocr-row{align-items:flex-start;flex-direction:column}.form-grid,.admin-form{grid-template-columns:1fr}.full{grid-column:auto}.admin-head{align-items:flex-start;gap:14px}.admin-table-wrap{overflow:auto}.admin-table{min-width:720px}.item-admin-grid{grid-template-columns:1fr}.stats{grid-template-columns:1fr 1fr}.stats div:last-child{grid-column:1/-1}.page-title h1{font-size:38px}}

/* V2.3: front filters + remote image downloader */
.library-tools{margin:-28px 20px 36px;position:relative;z-index:4}.search-panel.v2-filter{margin:0;display:grid;grid-template-columns:minmax(0,1fr) 150px auto;align-items:end;gap:12px}.search-panel.v2-filter .search-grow{min-width:0}.sort-select small,.search-panel small{display:block;color:#999;font-size:10px;font-weight:900;letter-spacing:.8px;margin:0 0 6px}.sort-select select{width:100%;height:46px;border:0;background:#f3f3ef;border-radius:12px;padding:0 12px;font:inherit;font-weight:800}.brand-filter{display:flex;align-items:center;gap:12px;padding:12px 6px 0}.brand-filter>span{flex:0 0 auto;color:#999;font-size:11px;font-weight:900}.brand-scroll{display:flex;gap:8px;overflow:auto;padding:2px 2px 7px;scrollbar-width:none}.brand-scroll::-webkit-scrollbar{display:none}.filter-chip{flex:0 0 auto;text-decoration:none;color:#666;background:#fff;border:1px solid #e9e9e4;border-radius:999px;padding:8px 13px;font-size:12px;font-weight:800}.filter-chip.active{background:var(--ink);color:#fff;border-color:var(--ink);box-shadow:0 5px 14px rgba(0,0,0,.12)}.last-used{display:block!important;margin-top:9px;color:#aaa!important;font-size:10px!important}
.image-source{display:grid;grid-template-columns:180px 1fr;gap:18px;background:#fff;border:1px solid var(--line);border-radius:18px;padding:15px}.image-source-preview{min-height:150px;background:#f3f3ef;border-radius:14px;display:grid;place-items:center;overflow:hidden;color:#aaa;font-size:11px;font-weight:900;letter-spacing:.8px}.image-source-preview img{width:100%;height:100%;object-fit:cover}.image-source-fields{display:flex;flex-direction:column;gap:12px;justify-content:center}.image-source-fields label{display:block}.image-source-fields label small{color:#999;font-weight:600}.url-fetch-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px;align-items:center;margin-top:6px}.url-fetch-row input{margin-top:0!important}.url-fetch-row.compact{grid-template-columns:minmax(0,1fr) 68px}.fetch-status{font-size:11px;line-height:1.45}.fetch-status.tiny,.tiny{font-size:10px}.item-admin-card .url-fetch-row .btn{height:42px}.item-admin-card code,.admin-head code{background:#f1f1ed;border-radius:6px;padding:2px 5px;font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:.9em}.add-card .add-plus.image-source-preview{height:180px;min-height:180px;padding:0}.add-card .add-plus.image-source-preview img{width:100%;height:100%;object-fit:cover}.remote-preview-empty{display:grid;place-items:center;width:100%;height:100%}
@media(max-width:760px){.library-tools{margin:-18px 7px 28px}.search-panel.v2-filter{grid-template-columns:1fr 120px}.search-panel.v2-filter .btn{grid-column:1/-1}.brand-filter{align-items:flex-start;flex-direction:column;gap:7px;padding-top:10px}.brand-scroll{width:100%}.image-source{grid-template-columns:110px 1fr}.image-source-preview{min-height:110px}.url-fetch-row{grid-template-columns:1fr}.url-fetch-row .btn{width:100%}}
@media(max-width:480px){.search-panel.v2-filter{grid-template-columns:1fr}.search-panel.v2-filter .btn{grid-column:auto}.image-source{grid-template-columns:1fr}.image-source-preview{height:190px}.url-fetch-row.compact{grid-template-columns:minmax(0,1fr) 64px}}

/* V2.4: polished rounded filters + no native sort select */
.library-tools{margin:-28px 20px 36px;position:relative;z-index:4}
.search-panel.v2-filter{margin:0;display:grid;grid-template-columns:minmax(0,1fr) 150px;align-items:end;gap:12px}
.search-panel.v2-filter .search-grow{min-width:0}
.search-panel.v2-filter .search-submit{height:54px;border-radius:18px}
.filter-toolbar{display:flex;align-items:flex-end;justify-content:space-between;gap:18px;padding:16px 4px 0}
.brand-filter,.sort-filter{display:flex;align-items:center;gap:10px;min-width:0;padding:0}
.brand-filter{flex:1}
.filter-label{flex:0 0 auto;color:#8a8a84;font-size:11px;font-weight:900;letter-spacing:.5px}
.brand-scroll{display:flex;gap:8px;overflow:auto;padding:3px 2px 7px;scrollbar-width:none;min-width:0}
.brand-scroll::-webkit-scrollbar{display:none}
.filter-chip,.sort-chip{display:inline-flex;align-items:center;justify-content:center;min-height:38px;flex:0 0 auto;text-decoration:none!important;color:#555;background:rgba(255,255,255,.88);border:1px solid #e3e3dc;border-radius:999px;padding:8px 15px;font-size:12px;font-weight:850;line-height:1;box-shadow:0 2px 8px rgba(0,0,0,.035);transition:transform .16s ease,box-shadow .16s ease,background .16s ease,color .16s ease,border-color .16s ease}
.filter-chip:hover,.sort-chip:hover{transform:translateY(-1px);box-shadow:0 5px 14px rgba(0,0,0,.08);border-color:#d6d6ce}
.filter-chip.active{background:var(--ink);color:#fff;border-color:var(--ink);box-shadow:0 7px 18px rgba(0,0,0,.14)}
.sort-filter{flex:0 0 auto}
.sort-pills{display:flex;align-items:center;gap:4px;background:#e9e9e4;border-radius:999px;padding:4px}
.sort-chip{min-height:34px;border:0;background:transparent;box-shadow:none;padding:8px 13px;color:#777}
.sort-chip:hover{transform:none;box-shadow:none;background:rgba(255,255,255,.55)}
.sort-chip.active{background:#fff;color:var(--ink);box-shadow:0 3px 10px rgba(0,0,0,.08)}
@media(max-width:760px){
  .search-panel.v2-filter{grid-template-columns:1fr 110px}
  .filter-toolbar{align-items:stretch;flex-direction:column;gap:10px;padding-top:12px}
  .brand-filter{align-items:flex-start;flex-direction:column;gap:7px;width:100%}
  .brand-scroll{width:100%}
  .sort-filter{width:100%;justify-content:space-between}
  .sort-pills{margin-left:auto}
}
@media(max-width:480px){
  .search-panel.v2-filter{grid-template-columns:1fr}
  .search-panel.v2-filter .search-submit{width:100%}
  .filter-chip{min-height:36px;padding:8px 13px}
}

/* V2.5: fixed admin image preview sizes */
.item-admin-card .item-image,
.item-admin-card .image-source-preview,
.add-card .add-plus.image-source-preview{
  width:160px;
  height:160px;
  min-height:160px;
  max-height:160px;
  margin:0 auto 4px;
  flex:0 0 160px;
  background:#f3f3ef;
}
.item-admin-card .item-image img,
.item-admin-card .image-source-preview img,
.add-card .add-plus.image-source-preview img{
  display:block;
  width:160px!important;
  height:160px!important;
  max-width:160px!important;
  max-height:160px!important;
  object-fit:contain!important;
  object-position:center;
}
.image-source > .image-source-preview{
  width:180px;
  height:180px;
  min-height:180px;
  max-height:180px;
  align-self:start;
}
.image-source > .image-source-preview img{
  display:block;
  width:180px!important;
  height:180px!important;
  max-width:180px!important;
  max-height:180px!important;
  object-fit:contain!important;
  object-position:center;
}
@media(max-width:600px){
  .item-admin-card .item-image,
  .item-admin-card .image-source-preview,
  .add-card .add-plus.image-source-preview{
    width:136px;
    height:136px;
    min-height:136px;
    max-height:136px;
    flex-basis:136px;
  }
  .item-admin-card .item-image img,
  .item-admin-card .image-source-preview img,
  .add-card .add-plus.image-source-preview img{
    width:136px!important;
    height:136px!important;
    max-width:136px!important;
    max-height:136px!important;
  }
  .image-source > .image-source-preview{
    width:140px;
    height:140px;
    min-height:140px;
    max-height:140px;
    margin:0 auto;
  }
  .image-source > .image-source-preview img{
    width:140px!important;
    height:140px!important;
    max-width:140px!important;
    max-height:140px!important;
  }
}

/* V2.6: confirmed-box hard constraints + polished admin file picker */
.box-clue.confirmed{background:#edf9f5;border-color:#79d8bd;box-shadow:inset 0 0 0 1px rgba(70,210,198,.18)}
.confirmed-badge{display:inline-flex;align-items:center;gap:5px;margin-top:10px;padding:5px 8px;border-radius:999px;background:#d9f6ed;color:#15745e;font-size:10px;font-weight:900}
.confirmed-clue{display:flex;align-items:center;gap:10px;margin-top:12px}
.confirmed-clue img{width:52px;height:52px;border-radius:12px;object-fit:contain;background:#fff}
.confirmed-clue strong{font-size:15px}
.sold-clue-count{position:absolute;left:14px;right:14px;bottom:12px;text-align:center;font-size:10px;color:#aaa;font-weight:700}

.modal-help{padding-right:32px}
.box-status-tabs{display:grid;grid-template-columns:repeat(3,1fr);gap:6px;padding:5px;background:#f0f0ec;border-radius:16px;margin:16px 0}
.box-status-tabs label{cursor:pointer}
.box-status-tabs input{display:none}
.box-status-tabs span{display:flex;min-height:42px;align-items:center;justify-content:center;border-radius:12px;font-weight:900;font-size:13px;color:#777;transition:.15s}
.box-status-tabs input:checked+span{background:#fff;color:var(--ink);box-shadow:0 3px 10px rgba(0,0,0,.08)}
.box-status-tabs label:last-child input:checked+span{background:#ddf8ef;color:#136b57}
.modal-section{margin-top:14px}
.modal-section[hidden]{display:none}
.modal-section-head{display:flex;justify-content:space-between;align-items:flex-end;gap:14px;margin-bottom:10px}
.modal-section-head b{font-size:14px}
.modal-section-head small{font-size:10px;color:#999;text-align:right}
.choice-item span{position:relative}
.choice-item span em{margin-left:auto;font-size:9px;font-style:normal;color:#a64b68;background:#ffe7ee;padding:3px 6px;border-radius:99px}
.confirm-choices{display:grid;grid-template-columns:repeat(3,1fr);gap:9px}
.confirm-item{cursor:pointer}
.confirm-item input{display:none}
.confirm-item>span{min-height:118px;border:2px solid #eee;border-radius:16px;padding:10px;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;gap:5px;background:#fff;transition:.15s}
.confirm-item input:checked+span{border-color:var(--ink);background:#fff8d4;box-shadow:inset 0 0 0 2px var(--yellow)}
.confirm-item img,.confirm-placeholder{width:58px;height:58px;border-radius:13px;object-fit:contain;background:#f4f4ef;display:grid;place-items:center;font-style:normal;font-size:10px;color:#aaa}
.confirm-item b{font-size:12px;line-height:1.25}
.confirm-item small,.confirm-item em{font-size:9px;color:#999;font-style:normal}
.confirm-item em{color:#c43b65;background:#ffe5ed;padding:3px 6px;border-radius:99px}
.modal-conflict{margin-top:14px;padding:11px 13px;border-radius:12px;background:#fff0f0;color:#a62d2d;font-size:12px;line-height:1.5}
.modal-conflict[hidden]{display:none}

.competition-summary{display:flex;align-items:flex-start;gap:12px;padding:15px 18px;margin:-5px 0 16px;border-radius:18px;background:#f4f1ff;color:#51457b;font-size:12px;line-height:1.55}
.competition-summary b{white-space:nowrap;color:#30294c}
.competition-note{margin-top:12px;padding:9px 11px;border-radius:11px;background:#f5f1ff;color:#5b4b86;font-size:10px;line-height:1.45}
.result-card.confirmed-result{border-color:#7ad7bd;background:#f7fffc}
.confirmed-result-label{font-size:12px!important;color:#15745e;background:#dff8ef;border-radius:99px;padding:5px 8px}
.confirmed-pick{margin-bottom:10px}
.confirmed-explain{font-size:10px;color:#6e817a;line-height:1.5;padding:9px 10px;background:#eaf9f4;border-radius:10px}
.result-edit-btn{width:100%;margin-top:13px;border:0;background:#f1f1ed;border-radius:11px;padding:9px 10px;font:inherit;font-size:11px;font-weight:850;cursor:pointer;color:#555}
.result-edit-btn:hover{background:#e8e8e2}

.custom-file-field{position:relative;display:flex!important;align-items:center;min-height:54px;border:1px solid #d9d9d2;border-radius:15px;background:#fafaf8;overflow:hidden;cursor:pointer;width:100%;margin-top:7px;font-weight:700!important}
.custom-file-input{position:absolute!important;width:1px!important;height:1px!important;opacity:0!important;pointer-events:none!important;margin:0!important;padding:0!important;border:0!important}
.custom-file-button{flex:0 0 auto;display:inline-flex;align-items:center;justify-content:center;align-self:stretch;padding:0 18px;background:var(--ink);color:#fff;font-size:12px;font-weight:900}
.custom-file-name{min-width:0;flex:1;padding:0 14px;color:#999;font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.custom-file-name.selected{color:#177454;font-weight:850}
.custom-file-field:hover{border-color:#bdbdb5}
.compact-file{min-height:45px;margin-top:2px}
.compact-file .custom-file-button{padding:0 13px;font-size:11px}
.compact-file .custom-file-name{font-size:10px;padding:0 10px}
.local-upload-block{display:block}
.upload-label{display:block;font-size:13px;font-weight:800;margin-bottom:2px}

@media(max-width:600px){
  .confirm-choices{grid-template-columns:repeat(2,1fr)}
  .modal-section-head{align-items:flex-start;flex-direction:column;gap:3px}
  .modal-section-head small{text-align:left}
  .competition-summary{flex-direction:column;gap:4px}
  .custom-file-button{padding:0 14px}
}

/* V2.8 retained from V2.7: inner modal scrolling + drag/paste screenshot uploader + verification refill */
.box-edit-modal{
  width:min(820px,100%);
  max-height:min(88vh,860px);
  padding:0;
  overflow:hidden;
  display:flex;
  flex-direction:column;
}
.modal-fixed-head{flex:0 0 auto;padding:26px 26px 0;background:#fff;position:relative;z-index:2}
.modal-scroll-body{flex:1 1 auto;min-height:0;overflow-y:auto;overscroll-behavior:contain;padding:0 18px 12px 26px;margin-right:7px;scrollbar-width:thin;scrollbar-color:#c7c7c0 transparent}
.modal-scroll-body::-webkit-scrollbar{width:7px}
.modal-scroll-body::-webkit-scrollbar-track{background:transparent}
.modal-scroll-body::-webkit-scrollbar-thumb{background:#c7c7c0;border-radius:999px}
.modal-scroll-body::-webkit-scrollbar-thumb:hover{background:#aaa}
.modal-fixed-actions{flex:0 0 auto;margin:0;padding:14px 26px 22px;background:#fff;border-top:1px solid #eeeeea;position:relative;z-index:2}
.modal-fixed-actions .btn{width:100%}
.box-edit-modal .modal-x{z-index:4;right:22px;top:17px}

.upload-drop{position:relative;transition:border-color .18s ease,background .18s ease,box-shadow .18s ease,transform .18s ease;outline:none}
.upload-drop:focus-visible{box-shadow:0 0 0 4px rgba(255,216,61,.24);border-color:#d4b018}
.upload-prompt{text-align:center;padding:22px}
.upload-prompt em{display:block;margin-top:10px;color:#b0b0a8;font-style:normal;font-size:10px;font-weight:750}
.upload-selected{width:100%;height:100%;display:grid!important;grid-template-columns:minmax(0,1fr) 230px;align-items:center;gap:18px;padding:18px;text-align:left!important}
.upload-selected[hidden]{display:none!important}
.upload-selected img{width:100%!important;height:100%!important;min-height:0;object-fit:contain!important;border-radius:16px;background:#f1f1ed}
.upload-selected>div{text-align:left!important;padding:14px}
.upload-selected b,.upload-selected span,.upload-selected small{display:block}
.upload-selected b{font-size:16px}
.upload-selected span{margin-top:7px;font-size:12px;font-weight:800;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.upload-selected small{margin-top:8px!important;line-height:1.55}
.drop-mask{position:absolute;inset:12px;z-index:5;border:2px dashed #161616;border-radius:17px;background:rgba(255,216,61,.94);display:none!important;place-items:center;text-align:center!important;font-size:20px;font-weight:950;pointer-events:none}
.upload-drop.dragging{border-color:var(--ink);background:#fff9d7;box-shadow:0 12px 30px rgba(0,0,0,.08);transform:translateY(-2px)}
.upload-drop.dragging .drop-mask{display:grid!important}

.history-card-main{min-width:0}
.history-actions{display:flex;align-items:center;gap:9px;flex-wrap:wrap;justify-content:flex-end}
.verify-action{display:inline-flex;align-items:center;justify-content:center;padding:8px 12px;border-radius:999px;background:var(--yellow);color:var(--ink);font-size:11px;font-weight:900;text-decoration:none;white-space:nowrap}
.verify-action:hover{filter:brightness(.98)}
.verify-badge.partial{background:#fff4c9;color:#806400}
.verify-badge.done{background:#def8ee;color:#176b57}

.actual-shell{max-width:980px}
.actual-summary{display:flex;align-items:center;gap:14px;background:#fff;border-radius:22px;padding:18px;margin-bottom:16px}
.actual-summary .mini-cover{flex:0 0 auto}
.actual-summary h2{margin:2px 0 5px;font-size:22px}
.actual-summary p{margin:0;color:#888;font-size:12px}
.actual-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:14px}
.actual-card{background:#fff;border:1px solid var(--line);border-radius:22px;padding:16px}
.actual-card-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px}
.actual-card-head b{font-size:16px}
.actual-prediction{font-size:11px;color:#777;background:#f5f5f1;border-radius:11px;padding:9px 10px;margin-bottom:11px;line-height:1.45}
.actual-prediction strong{color:var(--ink)}
.actual-choices{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}
.actual-choice{cursor:pointer}
.actual-choice input{display:none}
.actual-choice span{min-height:98px;border:2px solid #eee;border-radius:14px;padding:8px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;text-align:center;background:#fff}
.actual-choice input:checked+span{border-color:var(--ink);background:#fff8d4;box-shadow:inset 0 0 0 2px var(--yellow)}
.actual-choice img,.actual-choice .actual-placeholder{width:48px;height:48px;border-radius:11px;object-fit:contain;background:#f2f2ee;display:grid;place-items:center;font-size:9px;color:#aaa}
.actual-choice b{font-size:10px;line-height:1.2}
.actual-choice em{font-size:8px;font-style:normal;color:#c43b65;background:#ffe5ed;padding:2px 5px;border-radius:99px}
.actual-clear{display:inline-flex;border:0;background:#f1f1ed;color:#777;border-radius:999px;padding:6px 9px;font-size:10px;font-weight:800;cursor:pointer}
.actual-savebar{position:sticky;bottom:14px;z-index:5;margin-top:18px;background:rgba(255,255,255,.94);backdrop-filter:blur(12px);border:1px solid #ecece6;border-radius:18px;padding:12px;display:flex;align-items:center;gap:12px;box-shadow:0 12px 32px rgba(0,0,0,.09)}
.actual-savebar .btn{min-width:180px}
.actual-savebar span{font-size:11px;color:#777}

@media(max-width:700px){
  .box-edit-modal{max-height:92vh;border-radius:24px}
  .modal-fixed-head{padding:22px 18px 0}
  .modal-scroll-body{padding:0 10px 10px 18px;margin-right:4px}
  .modal-fixed-actions{padding:12px 18px 18px}
  .upload-selected{grid-template-columns:1fr;padding:12px;gap:8px}
  .upload-selected img{min-height:140px;max-height:190px}
  .upload-selected>div{text-align:center!important;padding:6px 10px 10px}
  .actual-grid{grid-template-columns:1fr}
  .actual-choices{grid-template-columns:repeat(3,1fr)}
  .history-card{align-items:flex-start;gap:14px}
  .history-actions{align-items:flex-end;flex-direction:column}
}
@media(max-width:460px){
  .actual-choices{grid-template-columns:repeat(2,1fr)}
  .actual-savebar{align-items:stretch;flex-direction:column}
  .actual-savebar .btn{width:100%;min-width:0}
}

/* V2.8: target pick + multi screenshot merge + full-case view + next-shake advice */
.target-stage{background:#fff;border-radius:28px;padding:26px;margin-bottom:18px;position:relative}
.target-choices{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:10px}
.target-choice{cursor:pointer;min-width:0}
.target-choice input{display:none}
.target-choice>span{height:100%;min-height:126px;border:2px solid #ecece7;border-radius:18px;padding:10px 8px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;text-align:center;background:#fafaf8;transition:.15s}
.target-choice input:checked+span{border-color:var(--ink);background:#fff8d4;box-shadow:inset 0 0 0 2px var(--yellow);transform:translateY(-1px)}
.target-choice img,.target-choice i{width:62px;height:62px;object-fit:contain;border-radius:15px;background:#f0f0eb;display:grid;place-items:center;font-style:normal;font-weight:900;color:#aaa}
.target-choice b{font-size:11px;line-height:1.25;max-width:100%;overflow:hidden;text-overflow:ellipsis}
.target-choice small{font-size:9px;color:#999}
.target-choice .hidden-target-tag{color:#bd3d63;background:#ffe6ee;border-radius:99px;padding:3px 6px}
.target-none>span{background:#f4f4f0}
.target-none i{font-size:24px;background:#e9e9e3}
.target-hint{font-size:11px;margin-top:12px;padding:10px 12px;background:#f7f7f3;border-radius:12px}

.multi-upload-selected{grid-template-columns:minmax(0,1fr) 230px!important;align-items:stretch!important;padding:14px!important}
.screenshot-list{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;text-align:left!important;max-height:240px;overflow:auto;padding:2px 5px 2px 2px;scrollbar-width:thin}
.shot-card{position:relative;display:grid;grid-template-columns:68px minmax(0,1fr);gap:9px;align-items:center;background:#f3f3ef;border:1px solid #e7e7e1;border-radius:14px;padding:8px;min-width:0}
.shot-card.processed{background:#eefaf6;border-color:#d1eee5}
.shot-card>img{width:68px!important;height:68px!important;min-height:0!important;object-fit:cover!important;border-radius:10px!important;background:#e8e8e3!important}
.shot-card>div{min-width:0;padding:0!important;text-align:left!important}
.shot-card b,.shot-card span,.shot-card small{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.shot-card b{font-size:11px!important}.shot-card span{font-size:9px!important;color:#777;margin-top:3px!important}.shot-card small{font-size:9px!important;color:#4d8f7e;margin-top:4px!important}
.shot-remove{position:absolute;right:5px;top:5px;width:21px;height:21px;border:0;border-radius:50%;background:rgba(22,22,22,.78);color:#fff;font-size:15px;line-height:1;cursor:pointer;display:grid;place-items:center}
.shot-remove:disabled{opacity:.22;cursor:not-allowed}
.upload-summary{display:flex;flex-direction:column;justify-content:center;align-items:flex-start;text-align:left!important;background:#fafaf7;border-radius:16px;padding:18px!important}
.upload-summary b{display:block!important;width:auto!important;height:auto!important;margin:0!important;background:transparent!important;font-size:16px!important}
.upload-summary small{line-height:1.55;margin-top:7px!important}
.mini-link{margin-top:13px;border:0;border-radius:999px;padding:8px 11px;background:var(--yellow);font:inherit;font-size:10px;font-weight:900;cursor:pointer}

.target-panel,.shake-panel,.combo-panel{margin:0 0 16px;border-radius:22px;padding:20px;background:#fafaf7;border:1px solid var(--line)}
.target-panel{display:grid;grid-template-columns:minmax(0,.9fr) minmax(320px,1.1fr);gap:22px;background:linear-gradient(135deg,#fff8d8,#fff 68%);border-color:#eadb8b}
.target-panel.target-locked{grid-template-columns:1fr auto;align-items:center;background:#eafaf5;border-color:#bce7d9}
.target-panel.target-locked>img{width:92px;height:92px;object-fit:contain;border-radius:20px;background:#fff}
.target-panel.target-warning{display:block;background:#fff3f3;border-color:#f0cccc}
.target-title h3,.shake-panel h3,.combo-panel h3{font-size:22px;margin:4px 0 7px}.target-title p,.shake-panel p,.combo-panel p{margin:0;color:#777;font-size:11px;line-height:1.6}
.target-heading{display:flex;align-items:center;gap:12px;margin-top:5px}.target-heading img{width:72px;height:72px;border-radius:17px;object-fit:contain;background:#fff}.target-heading small{font-size:10px;color:#999}.target-heading h3{margin:2px 0 0}
.target-ranking{display:flex;flex-direction:column;gap:8px;justify-content:center}.target-rank{display:grid;grid-template-columns:44px 48px 1fr 50px;gap:8px;align-items:center;font-size:10px}.target-rank>span{color:#999}.target-rank>i{height:8px;background:#ecece7;border-radius:99px;overflow:hidden}.target-rank>i em{display:block;height:100%;background:var(--yellow);border-radius:99px}.target-rank>strong{text-align:right}.target-rank.top b{font-size:15px}.target-rank.top>span{color:#9a7200;font-weight:900}

.combo-panel{background:#fff}.combo-head{display:flex;justify-content:space-between;align-items:flex-start;gap:20px;margin-bottom:14px}.combo-head>div{max-width:760px}.combo-head>b{background:var(--ink);color:#fff;padding:8px 11px;border-radius:999px;white-space:nowrap;font-size:11px}.combo-list{display:flex;flex-direction:column;gap:9px}.combo-row{border:1px solid #ecece7;border-radius:16px;padding:12px}.combo-row>span{display:block;font-size:10px;font-weight:900;color:#8e8e87;margin-bottom:9px}.combo-row>div{display:flex;gap:8px;overflow-x:auto;padding-bottom:3px}.combo-row em{font-style:normal;min-width:94px;max-width:112px;background:#f7f7f3;border-radius:12px;padding:7px;display:grid;grid-template-columns:30px 1fr;grid-template-rows:auto auto;column-gap:6px;align-items:center}.combo-row em small{grid-column:1/-1;font-size:8px;color:#999}.combo-row em img{width:30px;height:30px;border-radius:8px;object-fit:contain;background:#fff}.combo-row em b{font-size:9px;line-height:1.2}

.shake-panel{display:grid;grid-template-columns:1fr 190px;gap:20px;align-items:center;background:#f0fbf8;border-color:#c9eae2}.shake-panel small{display:block;margin-top:8px;color:#78918b;font-size:9px;line-height:1.5}.shake-metric{height:100%;min-height:112px;border-radius:18px;background:var(--ink);color:#fff;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;padding:15px}.shake-metric b{font-size:28px;color:var(--teal)}.shake-metric span{font-size:9px;color:#bbb;line-height:1.4;margin-top:4px}

@media(max-width:900px){
  .target-choices{grid-template-columns:repeat(4,minmax(0,1fr))}
  .screenshot-list{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:700px){
  .target-stage{border-radius:22px;padding:20px}
  .target-choices{grid-template-columns:repeat(3,minmax(0,1fr))}
  .target-choice>span{min-height:112px}.target-choice img,.target-choice i{width:54px;height:54px}
  .multi-upload-selected{grid-template-columns:1fr!important;overflow:auto}
  .screenshot-list{max-height:190px}
  .upload-summary{padding:10px 12px!important;align-items:center;text-align:center!important}
  .target-panel,.shake-panel{grid-template-columns:1fr}
  .shake-metric{min-height:88px}
  .combo-head{flex-direction:column;gap:8px}
}
@media(max-width:460px){
  .target-choices{grid-template-columns:repeat(2,minmax(0,1fr))}
  .screenshot-list{grid-template-columns:1fr}
  .target-ranking{margin-top:4px}.target-rank{grid-template-columns:40px 44px 1fr 45px}
}

/* V2.9: unified BOX LAB action controls — no browser-looking/raw buttons */
button,.btn,.action-btn,.top-action-link,.danger-action-btn,.mini-link,.result-edit-btn,.actual-clear,.modal-x,.shot-remove{
  -webkit-appearance:none;appearance:none;font-family:inherit;outline:none;
  transition:transform .16s ease,box-shadow .16s ease,background .16s ease,border-color .16s ease,color .16s ease,opacity .16s ease;
}
button:focus-visible,.btn:focus-visible,.action-btn:focus-visible,.top-action-link:focus-visible,.danger-action-btn:focus-visible,.mini-link:focus-visible,.result-edit-btn:focus-visible,.actual-clear:focus-visible,.modal-x:focus-visible,.shot-remove:focus-visible{
  box-shadow:0 0 0 4px rgba(255,216,61,.34)!important;
}
.btn:hover:not(:disabled),.action-btn:hover,.top-action-link:hover,.danger-action-btn:hover,.mini-link:hover,.result-edit-btn:hover,.actual-clear:hover,.modal-x:hover:not(:disabled){transform:translateY(-1px)}
.btn:active:not(:disabled),.action-btn:active,.top-action-link:active,.danger-action-btn:active,.mini-link:active,.result-edit-btn:active,.actual-clear:active,.modal-x:active:not(:disabled){transform:translateY(1px)}
.btn{min-height:44px;border-radius:14px;box-shadow:none}
.btn.primary{background:var(--yellow);box-shadow:0 4px 0 #e2bc1e}
.btn.primary:hover:not(:disabled){background:#ffe05f;box-shadow:0 5px 0 #e2bc1e,0 10px 22px rgba(213,169,0,.15)}
.btn.dark:hover:not(:disabled){background:#2b2b2b;box-shadow:0 8px 20px rgba(0,0,0,.13)}
.btn.teal:hover:not(:disabled){background:#58ddd1;box-shadow:0 8px 20px rgba(70,210,198,.18)}
.btn.mini{min-height:38px;border-radius:12px;padding:8px 14px;box-shadow:none}

/* Series table operation buttons */
.row-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.row-actions a.action-btn{display:inline-flex;align-items:center;justify-content:center;min-height:38px;padding:0 16px;border-radius:12px;text-decoration:none;font-size:12px;font-weight:900;white-space:nowrap;border:1px solid transparent}
.action-edit,.action-items{background:var(--yellow);color:var(--ink);border-color:transparent!important;box-shadow:0 3px 0 #e4bc20}
.action-edit:hover,.action-items:hover{background:#ffe05d;border-color:transparent!important;box-shadow:0 4px 0 #e4bc20,0 8px 18px rgba(210,165,0,.13)}

/* Admin top navigation/actions */
.topbar.admin .admin-nav{display:flex;align-items:center;gap:7px}
.topbar.admin .admin-nav a,.top-action-link{display:inline-flex;align-items:center;justify-content:center;min-height:36px;padding:0 13px;border-radius:11px;background:#fff;border:1px solid #e5e5df;text-decoration:none!important;color:var(--ink)!important;font-size:11px;font-weight:850;box-shadow:0 2px 8px rgba(20,20,20,.035)}
.topbar.admin .admin-nav a:hover,.top-action-link:hover{background:#fff8d6;border-color:#ead575;box-shadow:0 5px 14px rgba(20,20,20,.06)}
.topbar.admin .admin-nav .nav-danger{color:#c84545!important;background:#fff6f6;border-color:#f2dada}
.topbar.admin .admin-nav .nav-danger:hover{background:#ffeaea;border-color:#edbaba}
.back-link{display:inline-flex;align-items:center;min-height:36px;padding:0 12px;border-radius:11px;background:#ecece7!important;border:1px solid #e0e0da;color:#444!important;text-decoration:none!important;font-size:11px!important;font-weight:850!important}
.back-link:hover{background:#e4e4de!important;transform:translateY(-1px)}

/* Destructive actions are styled buttons, never naked red text */
.danger-action-btn,.text-danger{display:inline-flex;align-items:center;justify-content:center;min-height:38px;padding:0 14px;border:1px solid #f2cdcd!important;border-radius:12px!important;background:#fff3f3!important;color:#d54444!important;font:inherit;font-size:11px!important;font-weight:900!important;cursor:pointer;text-decoration:none!important}
.danger-action-btn:hover,.text-danger:hover{background:#ffe7e7!important;border-color:#eeb8b8!important;box-shadow:0 7px 16px rgba(218,68,68,.08)}

/* Secondary utility controls */
.result-edit-btn{min-height:39px;border:1px solid #e4e4de;background:#f4f4ef;border-radius:12px;color:#4b4b47}
.result-edit-btn:hover{background:#ecece6;border-color:#d9d9d1;box-shadow:0 6px 14px rgba(20,20,20,.05)}
.mini-link{border:1px solid #e7c62f;box-shadow:0 3px 0 #e4bc20}
.actual-clear{border:1px solid #e3e3dd;background:#f3f3ef}
.actual-clear:hover{background:#e9e9e3}
.modal-x{right:18px;top:14px;width:42px;height:42px;display:grid;place-items:center;border:1px solid #e7e7e1!important;border-radius:50%;background:#f5f5f1!important;font-size:23px;line-height:1;color:#333}
.modal-x:hover{background:#ecece6!important;box-shadow:0 7px 18px rgba(0,0,0,.07)}
.shot-remove{border:1px solid rgba(255,255,255,.18)}

/* Keep forms from inheriting browser bevels */
input[type="file"]::file-selector-button{-webkit-appearance:none;appearance:none;border:0;border-radius:10px;background:var(--ink);color:#fff;padding:9px 13px;font-family:inherit;font-weight:850;cursor:pointer}

@media(max-width:760px){
  .row-actions{flex-wrap:nowrap}
  .row-actions a.action-btn{padding:0 12px;min-height:36px}
  .topbar.admin .admin-nav{gap:4px;overflow-x:auto;max-width:70vw;scrollbar-width:none}
  .topbar.admin .admin-nav::-webkit-scrollbar{display:none}
  .topbar.admin .admin-nav a{white-space:nowrap;padding:0 10px}
  .top-action-link{padding:0 10px;white-space:nowrap}
}

/* V3.0 — analysis history cleanup: no backfill actions, no raw table controls */
.analysis-record-list{display:flex;flex-direction:column;gap:12px}
.analysis-record-card{display:grid;grid-template-columns:74px minmax(0,1fr);gap:18px;align-items:center;background:#fff;border:1px solid #ecece7;border-radius:22px;padding:20px 22px;box-shadow:0 1px 0 rgba(0,0,0,.025)}
.analysis-record-card:hover{border-color:#dfdfd8;box-shadow:0 10px 28px rgba(20,20,20,.055)}
.analysis-record-id{width:54px;height:54px;border-radius:16px;background:#f2f2ed;display:grid;place-items:center;font-weight:950;font-size:14px;color:#777}
.analysis-record-main{min-width:0}
.analysis-record-title{font-size:18px;font-weight:950;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.analysis-record-time{font-size:11px;color:#999;margin-top:4px}
.analysis-record-badges{display:flex;align-items:center;gap:7px;flex-wrap:wrap;margin-top:12px}
.record-pill{display:inline-flex;align-items:center;min-height:30px;padding:0 11px;border-radius:999px;background:#f2f2ed;color:#666;font-size:11px;font-weight:850;line-height:1;white-space:nowrap;border:1px solid transparent}
.record-pill.model{background:#fff4bd;color:#775d00;border-color:#f1dc78}
.record-pill.target{background:#eaf8f6;color:#1a766b;border-color:#caeee9}
.record-pill.confirmed{background:#def8ee;color:#176b57;border-color:#c9eee3}
.record-pill.quiet{background:#efefec;color:#898983}
.history-card-v3{justify-content:flex-start;gap:16px;padding:20px;border:1px solid #ecece7}
.history-cover-mini{width:64px;height:64px;border-radius:17px;background:#f1f1ed;display:grid;place-items:center;overflow:hidden;flex:0 0 auto;color:#aaa;font-size:10px;font-weight:900}
.history-cover-mini img{width:100%;height:100%;object-fit:cover}
.history-card-v3 .history-card-main{flex:1}
.history-card-v3 .history-card-main h3{font-size:17px}

@media(max-width:600px){
  .analysis-record-card{grid-template-columns:48px minmax(0,1fr);gap:12px;padding:16px;border-radius:18px}
  .analysis-record-id{width:44px;height:44px;border-radius:13px;font-size:12px}
  .analysis-record-title{font-size:16px}
  .record-pill{min-height:28px;padding:0 9px;font-size:10px}
  .history-card-v3{align-items:flex-start;flex-direction:row}
  .history-cover-mini{width:54px;height:54px;border-radius:14px}
}

/* V4.2: search field + button exact vertical alignment */
.search-panel.v2-filter{
  align-items:stretch;
}
.search-panel.v2-filter .search-grow{
  min-height:78px;
  display:flex;
  flex-direction:column;
  justify-content:center;
}
.search-panel.v2-filter .search-submit{
  height:auto;
  min-height:78px;
  align-self:stretch;
  margin:0;
}
@media(max-width:480px){
  .search-panel.v2-filter .search-grow,
  .search-panel.v2-filter .search-submit{
    min-height:70px;
  }
}

/* V3.4 — bulk item editor + equal-probability gamble animation */
.bulk-name-tool{display:grid;grid-template-columns:minmax(240px,.8fr) minmax(320px,1.2fr) auto;gap:16px;align-items:center;background:#161616;color:#fff;border-radius:24px;padding:22px;margin:18px 0 20px;box-shadow:0 14px 34px rgba(20,20,20,.08)}
.bulk-name-tool h2{margin:4px 0 5px;font-size:23px}.bulk-name-tool p{margin:0;color:#aaa;font-size:12px;line-height:1.6}.bulk-name-tool textarea{width:100%;min-height:112px;resize:vertical;border:1px solid #333;border-radius:16px;background:#252525;color:#fff;padding:13px 14px;font:inherit;outline:none}.bulk-name-tool textarea:focus{border-color:var(--yellow);box-shadow:0 0 0 4px rgba(255,216,61,.14)}
.bulk-item-grid{align-items:stretch}.bulk-item-card{position:relative;border:1px solid #e9e9e3;box-shadow:0 1px 0 rgba(0,0,0,.025);transition:.18s}.bulk-item-card:hover{border-color:#deded5;box-shadow:0 12px 28px rgba(20,20,20,.055)}.bulk-card-head{display:flex;align-items:center;justify-content:space-between;gap:8px;min-height:28px}.bulk-card-head em{font-style:normal;font-size:9px;color:#a26c00;background:#fff4c2;border-radius:999px;padding:5px 7px}.slot-type{display:inline-flex;align-items:center;min-height:27px;padding:0 9px;border-radius:999px;background:#eef8f6;color:#1b776d;font-size:10px;font-weight:950;letter-spacing:.4px}.slot-type.hidden{background:#ffe6ec;color:#c64869}.bulk-field{display:block;font-size:11px;font-weight:850;color:#65655f}.bulk-field>span{display:flex;align-items:center;justify-content:space-between;gap:8px}.bulk-field small{font-size:9px;color:#aaa;font-weight:700}.bulk-item-card.pending-delete{opacity:.48;filter:grayscale(.7);border-color:#efb8b8;background:#fff8f8}.bulk-item-card.pending-delete:after{content:"等待删除";position:absolute;inset:0;display:grid;place-items:center;background:rgba(255,255,255,.72);border-radius:20px;font-size:18px;font-weight:1000;color:#d14d4d;pointer-events:none}.bulk-item-card.pending-delete .mark-delete-btn{position:relative;z-index:2;opacity:1;filter:none;background:#fff!important}
.bulk-save-bar{position:sticky;bottom:14px;z-index:15;margin-top:20px;background:rgba(22,22,22,.94);backdrop-filter:blur(12px);color:#fff;border-radius:20px;padding:13px 15px 13px 18px;display:flex;align-items:center;justify-content:space-between;gap:16px;box-shadow:0 14px 38px rgba(0,0,0,.18)}.bulk-save-bar>div{display:flex;flex-direction:column;gap:2px}.bulk-save-bar b{font-size:14px}.bulk-save-bar span{font-size:10px;color:#aaa}.btn.big-inline{min-height:50px;padding:0 24px;font-size:14px;white-space:nowrap}
.alert.success{background:#e8fbf5;color:#177454}

.tie-gamble{margin-top:14px;background:#fff8d7;border:1px solid #f0dc7b;border-radius:17px;padding:13px;display:grid;grid-template-columns:minmax(0,1fr) auto;gap:9px 12px;align-items:center}.tie-gamble>div{display:flex;flex-direction:column;gap:3px}.tie-gamble b{font-size:12px}.tie-gamble span{font-size:10px;color:#786c38;line-height:1.45}.tie-gamble>small{grid-column:1/-1;font-size:9px;color:#9c8f5c}.gamble-btn{background:var(--yellow)!important;box-shadow:0 4px 0 #dfb812!important;min-height:40px!important;padding:0 14px!important;border-radius:13px!important;white-space:nowrap}.gamble-btn:hover:not(:disabled){background:#ffe66f!important;box-shadow:0 5px 0 #dfb812,0 10px 22px rgba(218,174,0,.16)!important}.gamble-btn:disabled{opacity:1!important;cursor:wait!important}
.competition-summary{display:flex!important;flex-direction:column!important;align-items:stretch!important;gap:9px!important}.competition-summary>small{font-size:9px;color:#8b7650;line-height:1.5}.competition-rows{display:flex;flex-direction:column;gap:7px}.competition-row{display:flex;align-items:center;justify-content:space-between;gap:12px;background:rgba(255,255,255,.58);border-radius:13px;padding:9px 10px}.competition-row>div{display:flex;flex-direction:column;gap:2px}.competition-row strong{font-size:11px}.competition-row span{font-size:10px;color:#7c735c}
.result-card{transition:transform .18s ease,border-color .18s ease,box-shadow .18s ease,background .18s ease}.result-card.gamble-active{transform:translateY(-5px) scale(1.018);border-color:#f2c91f;background:#fffdf2;box-shadow:0 13px 34px rgba(233,185,0,.2)}.result-card.gamble-winner{border-color:var(--ink);background:#fff7c9;animation:gambleWinner .65s cubic-bezier(.2,.8,.2,1) 2;box-shadow:0 18px 42px rgba(255,207,32,.3)}@keyframes gambleWinner{0%{transform:scale(1)}45%{transform:scale(1.045) rotate(-.5deg)}100%{transform:scale(1)}}
.gamble-toast{position:fixed;left:50%;bottom:28px;z-index:220;transform:translate(-50%,30px) scale(.96);opacity:0;pointer-events:none;background:#161616;color:#fff;border-radius:20px;padding:13px 24px;min-width:250px;text-align:center;box-shadow:0 18px 45px rgba(0,0,0,.24);transition:.24s ease}.gamble-toast.show{transform:translate(-50%,0) scale(1);opacity:1}.gamble-toast small,.gamble-toast span{display:block;color:#aaa;font-size:9px}.gamble-toast b{display:block;color:var(--yellow);font-size:22px;margin:3px 0}

@media(max-width:900px){.bulk-name-tool{grid-template-columns:1fr 1fr}.bulk-name-tool .btn{grid-column:1/-1}.bulk-item-grid{grid-template-columns:repeat(2,1fr)}}
@media(max-width:600px){.bulk-name-tool{grid-template-columns:1fr;padding:17px;border-radius:20px}.bulk-name-tool .btn{grid-column:auto}.bulk-item-grid{grid-template-columns:1fr}.bulk-save-bar{bottom:8px;border-radius:17px;padding:10px;align-items:stretch;flex-direction:column}.bulk-save-bar>div{text-align:center}.btn.big-inline{width:100%}.tie-gamble{grid-template-columns:1fr}.tie-gamble .gamble-btn{width:100%}.competition-row{align-items:stretch;flex-direction:column}.competition-row .gamble-btn{width:100%}.gamble-toast{bottom:18px;width:calc(100% - 30px);min-width:0}}

/* V3.5 — choose box spec first, then create bulk item slots */
.box-spec-builder{display:grid;grid-template-columns:minmax(220px,.9fr) auto minmax(270px,.9fr) auto;gap:18px;align-items:center;background:#fff;border:1px solid #e8e8e2;border-radius:26px;padding:22px 24px;margin:18px 0 22px;box-shadow:0 10px 30px rgba(20,20,20,.045)}
.box-spec-copy h2{font-size:24px;margin:4px 0 5px}.box-spec-copy p{margin:0;color:#83837d;font-size:11px;line-height:1.65}.box-spec-copy p b{color:var(--ink)}
.box-spec-presets{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.spec-preset{-webkit-appearance:none;appearance:none;border:1px solid #e2e2dc;background:#f4f4ef;color:#565650;min-height:42px;padding:0 15px;border-radius:999px;font:inherit;font-size:12px;font-weight:950;cursor:pointer;transition:.16s;box-shadow:none}.spec-preset:hover{transform:translateY(-1px);background:#fff8d3;border-color:#ead263}.spec-preset.active{background:var(--yellow);border-color:var(--yellow);color:var(--ink);box-shadow:0 3px 0 #dfb91a}
.box-spec-fields{display:flex;align-items:flex-end;gap:10px}.box-spec-fields label{display:flex;flex-direction:column;gap:6px;color:#686862;font-size:10px;font-weight:900}.box-spec-fields input{width:92px;height:48px;border:1px solid #deded7;border-radius:14px;background:#f7f7f3;padding:0 12px;font:inherit;font-size:17px;font-weight:950;text-align:center;outline:none}.box-spec-fields input:focus{background:#fff;border-color:#e1c128;box-shadow:0 0 0 4px rgba(255,216,61,.18)}.spec-plus{font-size:22px;font-weight:1000;padding-bottom:9px;color:#aaa}.spec-create-btn{min-width:190px}
.spec-empty-state{min-height:220px;border:1.5px dashed #dcdcd4;border-radius:24px;background:#fafaf7;display:flex;align-items:center;justify-content:center;gap:17px;padding:30px;text-align:left}.spec-empty-icon{width:56px;height:56px;border-radius:18px;background:var(--yellow);display:grid;place-items:center;font-size:30px;font-weight:350;box-shadow:0 5px 0 #e0ba1a}.spec-empty-state b{font-size:17px}.spec-empty-state p{margin:5px 0 0;color:#8b8b84;font-size:11px;line-height:1.6}
.series-next-step-note{display:flex;align-items:flex-start;gap:12px;background:#fff8cf;border:1px solid #efdc79;border-radius:17px;padding:13px 15px}.series-next-step-note b{white-space:nowrap;font-size:11px}.series-next-step-note span{font-size:10px;color:#756a39;line-height:1.55}
@media(max-width:1100px){.box-spec-builder{grid-template-columns:1fr 1fr}.box-spec-copy{grid-column:1/-1}.spec-create-btn{width:100%}}
@media(max-width:650px){.box-spec-builder{grid-template-columns:1fr;padding:17px;border-radius:20px;gap:14px}.box-spec-copy{grid-column:auto}.box-spec-presets{flex-wrap:nowrap;overflow-x:auto;padding-bottom:3px}.spec-preset{white-space:nowrap}.box-spec-fields{justify-content:space-between}.box-spec-fields label{flex:1}.box-spec-fields input{width:100%}.spec-create-btn{width:100%}.spec-empty-state{min-height:180px;flex-direction:column;text-align:center}.series-next-step-note{flex-direction:column;gap:4px}}

/* V3.7: uploaded screenshot preview — show the whole image on mobile instead of cropping */
.upload-drop.has-file{
  height:auto;
  min-height:280px;
  overflow:visible;
  cursor:default;
}
.shot-card{
  grid-template-columns:92px minmax(0,1fr);
  align-items:center;
}
.shot-card>img{
  width:92px!important;
  height:124px!important;
  min-height:0!important;
  object-fit:contain!important;
  object-position:center!important;
  border-radius:11px!important;
  background:#fff!important;
  border:1px solid #e5e5df;
}

@media(max-width:700px){
  .upload-drop.has-file{
    height:auto!important;
    min-height:0;
    padding:12px;
    overflow:visible;
  }
  .multi-upload-selected{
    overflow:visible!important;
    min-height:0;
  }
  .screenshot-list{
    max-height:430px;
    overflow-y:auto;
    overflow-x:hidden;
    padding:2px 4px 2px 2px;
  }
  .shot-card{
    grid-template-columns:108px minmax(0,1fr);
    gap:10px;
    align-items:center;
  }
  .shot-card>img{
    width:108px!important;
    height:148px!important;
    object-fit:contain!important;
  }
}

@media(max-width:460px){
  .upload-drop.has-file{padding:10px}
  .screenshot-list{max-height:420px}
  .shot-card{
    grid-template-columns:1fr;
    gap:8px;
    padding:9px;
  }
  .shot-card>img{
    width:100%!important;
    height:auto!important;
    max-height:300px!important;
    aspect-ratio:auto!important;
    object-fit:contain!important;
    object-position:center!important;
  }
  .shot-card>div{
    text-align:center!important;
    padding:1px 26px 2px!important;
  }
  .shot-card b,.shot-card span,.shot-card small{
    white-space:normal;
    overflow:visible;
    text-overflow:clip;
  }
}

/* V3.8: compact uploaded screenshot gallery on phones */
@media(max-width:700px){
  .upload-drop.has-file{
    padding:10px;
  }
  .multi-upload-selected{
    display:block!important;
    padding:8px!important;
  }
  .screenshot-list{
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
    gap:8px;
    max-height:360px;
    overflow-y:auto;
    overflow-x:hidden;
    padding:2px;
  }
  .shot-card{
    display:flex!important;
    flex-direction:column;
    gap:6px;
    padding:7px;
    min-width:0;
    align-items:stretch;
  }
  .shot-card>img{
    width:100%!important;
    height:126px!important;
    max-height:126px!important;
    min-height:0!important;
    aspect-ratio:auto!important;
    object-fit:contain!important;
    object-position:center!important;
    border-radius:9px!important;
    background:#fff!important;
  }
  .shot-card>div{
    width:100%;
    min-width:0;
    padding:0 2px 2px!important;
    text-align:center!important;
  }
  .shot-card b{font-size:10px!important;line-height:1.25}
  .shot-card span{font-size:8px!important;line-height:1.25;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}
  .shot-card small{font-size:8px!important;line-height:1.25;white-space:normal!important}
  .shot-remove{width:22px;height:22px;right:4px;top:4px}
  .upload-summary{
    margin-top:9px;
    padding:9px 10px!important;
  }
}
@media(max-width:460px){
  .screenshot-list{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    max-height:350px;
    gap:9px;
  }
  .shot-card>img{
    height:138px!important;
    max-height:138px!important;
  }
}


/* V3.9: prevent thumbnail delete taps from falling through to the upload picker */
.shot-remove{touch-action:manipulation;z-index:4}
@media(max-width:700px){
  .shot-remove{width:30px!important;height:30px!important;right:3px!important;top:3px!important;font-size:18px!important}
}

/* V4.2: processed screenshots can also be removed; button always remains interactive. */
.shot-remove:disabled{opacity:1!important;cursor:pointer!important}
.bulk-save-bar small{display:block;margin-top:4px}


/* V4.2: PC brand chips wrap; mobile keeps horizontal swipe. */
@media(min-width:761px){
  .filter-toolbar{align-items:flex-start}
  .brand-filter{flex:1 1 auto;min-width:0;align-items:flex-start}
  .brand-scroll{flex-wrap:wrap;overflow:visible;padding-bottom:2px;min-width:0}
  .sort-filter{flex:0 0 auto;white-space:nowrap}
}
@media(max-width:760px){
  .brand-scroll{flex-wrap:nowrap!important;overflow-x:auto!important;overflow-y:hidden!important}
}

/* V4.2: multi hidden-type box spec */
.multi-hidden-spec{grid-template-columns:minmax(220px,.8fr) minmax(0,1.7fr);align-items:start}
.multi-hidden-spec .box-spec-copy{grid-column:1/2}
.multi-hidden-spec .box-spec-presets{grid-column:2/3;justify-content:flex-start}
.spec-main-fields{grid-column:1/2;background:#f7f7f3;border-radius:18px;padding:16px}
.spec-main-fields label{display:flex;flex-direction:column;gap:7px;font-size:11px;font-weight:900;color:#686862}
.spec-main-fields input{height:52px;border:1px solid #deded7;border-radius:14px;background:#fff;padding:0 14px;font:inherit;font-size:20px;font-weight:950;text-align:center;outline:none}
.hidden-type-builder{grid-column:2/3;background:#fafaf7;border:1px solid #ecece6;border-radius:20px;padding:16px}
.hidden-builder-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px}.hidden-builder-head b{display:block}.hidden-builder-head small{display:block;color:#999;margin-top:3px;font-size:10px}
#hiddenTypeRows{display:flex;flex-direction:column;gap:9px}.hidden-type-row{display:grid;grid-template-columns:minmax(0,1fr) 100px 38px;gap:9px;align-items:end;background:#fff;border:1px solid #e8e8e2;border-radius:15px;padding:10px}.hidden-type-row label{display:flex;flex-direction:column;gap:5px;font-size:10px;font-weight:900;color:#777}.hidden-type-row input[type=text],.hidden-type-row input[type=number],.hidden-type-row label>input{height:42px;border:1px solid #e0e0d9;border-radius:11px;background:#f8f8f5;padding:0 10px;font:inherit;font-weight:850;outline:none}.hidden-count-field input{text-align:center}.hidden-row-remove{appearance:none;border:0;width:38px;height:38px;border-radius:12px;background:#fff0f0;color:#d94f4f;font-size:22px;font-weight:900;cursor:pointer}.hidden-row-remove:hover{background:#ffe2e2}
.hidden-appearance-rule{grid-column:1/-1;display:grid;grid-template-columns:minmax(180px,1fr) auto auto minmax(150px,auto);gap:10px;align-items:center;background:#f4fbf9;border:1px solid #dcefeb;border-radius:18px;padding:14px 16px}.hidden-appearance-rule>div small{display:block;color:#7d8d89;font-size:10px;margin-top:3px}.rule-radio input{display:none}.rule-radio span{display:block;border:1px solid #d8e7e3;background:#fff;border-radius:999px;padding:10px 12px;font-size:11px;font-weight:900;cursor:pointer}.rule-radio input:checked+span{background:#dff8f2;border-color:#60cdbd;color:#176d61}.max-hidden-field{display:flex;align-items:center;gap:8px;font-size:10px;font-weight:900;color:#68736f}.max-hidden-field input{width:62px;height:40px;border:1px solid #d8e7e3;border-radius:11px;text-align:center;font:inherit;font-weight:950}.max-hidden-field input:disabled{opacity:.45}.multi-hidden-spec .spec-create-btn{grid-column:1/-1;justify-self:stretch}.blind-placeholder{width:100%;height:100%;object-fit:contain;border-radius:18px;background:#f7f4eb}
@media(max-width:900px){.multi-hidden-spec{grid-template-columns:1fr}.multi-hidden-spec .box-spec-copy,.multi-hidden-spec .box-spec-presets,.spec-main-fields,.hidden-type-builder,.hidden-appearance-rule,.multi-hidden-spec .spec-create-btn{grid-column:1}.hidden-appearance-rule{grid-template-columns:1fr 1fr}.hidden-appearance-rule>div{grid-column:1/-1}}
@media(max-width:600px){.hidden-type-row{grid-template-columns:minmax(0,1fr) 82px 34px;padding:8px}.hidden-row-remove{width:34px;height:34px}.hidden-appearance-rule{grid-template-columns:1fr}.hidden-appearance-rule>div{grid-column:auto}.rule-radio span{border-radius:14px}.max-hidden-field{justify-content:space-between}}
