/* 直播工作台 · 第 2 组样式：礼物选择器、成员库、阵容与玩法编辑面板、顶栏预设标签、中栏预览 / 测试面板。
   依赖 app.css 的设计变量（规格 §5）；只用 transform/opacity 做动效。 */

.rot180 { transform: rotate(180deg); }
.field-opt { margin-left: 6px; font-weight: 500; color: var(--dim); font-size: 12px; }
.callout-err { background: var(--danger-soft); color: #FFB3C0; }

/* ================= 礼物：图标 / 胶囊 / 字段 ================= */
.gift-ic { position: relative; display: inline-grid; place-items: center; flex: none; border-radius: 8px; overflow: hidden; background: #10141B; }
.gift-ic img { width: 100%; height: 100%; object-fit: contain; }
.gift-ic.no-img { background: linear-gradient(135deg, rgba(139, 92, 255, .28), rgba(255, 122, 162, .18)); color: #D9CCFF; }
.gift-price { display: inline-flex; align-items: center; gap: 3px; font-size: 12px; font-weight: 600; color: #8FD3FF; font-variant-numeric: tabular-nums; white-space: nowrap; }
.gift-price .ic { color: #6FC3FF; }
.gift-price.muted { color: var(--dim); }

.gift-chip { display: inline-flex; align-items: center; gap: 8px; min-width: 0; max-width: 100%; }
.gift-chip .gc-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.gift-chip.empty { color: var(--muted); }
.gift-chip.empty .ic { color: var(--dim); }

.gift-field { display: flex; align-items: center; gap: 8px; width: 100%; min-width: 0; height: 44px; padding: 0 8px 0 6px; border-radius: var(--r-ctl); border: 1px solid var(--line-2); background: var(--panel-2); color: var(--fg); text-align: left; transition: border-color .15s, background-color .15s; }
.gift-field:hover { border-color: var(--accent-line); background: #1F2532; }
.gift-field .gift-chip { flex: 1; }
.gift-field .gf-chev { color: var(--dim); display: inline-flex; }
.gift-field.empty { border-style: dashed; }
.gift-field.empty .gift-chip .ic { margin-left: 4px; }
.gift-field.invalid { border-color: var(--danger); box-shadow: 0 0 0 3px var(--danger-soft); }
.gift-field.compact { height: var(--ctl-h); }

/* 选择器弹窗 */
.gp { display: flex; flex-direction: column; gap: 12px; }
.gp-toolbar { display: flex; align-items: center; gap: 12px; }
.gp-search { position: relative; flex: 1; display: flex; align-items: center; }
.gp-search .ic { position: absolute; left: 12px; color: var(--dim); pointer-events: none; }
.gp-search .input { padding-left: 36px; }
.gp-count { color: var(--dim); font-size: 12px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.gp-current { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 10px; background: var(--accent-soft); font-size: 13px; }
.gp-current-label { color: #C7B3FF; font-weight: 700; }
.gp-current-id { color: var(--muted); font-family: var(--mono); font-size: 12px; }
.gp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; max-height: min(46vh, 420px); overflow: auto; padding: 2px; margin: -2px; }
.gp-cell { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 6px 8px; min-width: 0; border-radius: 12px; border: 1.5px solid var(--line); background: var(--panel-2); color: var(--fg); transition: border-color .12s, background-color .12s, transform .12s; }
.gp-cell:hover { border-color: var(--accent-line); background: #1F2230; }
.gp-cell:active { transform: scale(.98); }
.gp-cell.selected { border-color: var(--accent); background: #211B38; box-shadow: 0 0 0 3px var(--accent-soft); }
.gp-cell.blocked { opacity: .42; cursor: not-allowed; }
.gp-cell.blocked:hover { border-color: var(--line); background: var(--panel-2); }
.gp-name { width: 100%; text-align: center; font-size: 12px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gp-check { position: absolute; top: 6px; left: 6px; width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: #fff; }
.gp-occ { position: absolute; top: 5px; right: 5px; border-radius: 50%; box-shadow: 0 0 0 2px var(--panel-2); line-height: 0; }
.gp-cell.selected .gp-occ { box-shadow: 0 0 0 2px #211B38; }
.gp-empty { grid-column: 1 / -1; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 28px 16px; text-align: center; color: var(--muted); }
.gp-empty .ic { color: #B9A0FF; }
.gp-empty-title { margin: 0; font-weight: 700; color: var(--fg); }
.gp-empty-text { margin: 0; font-size: 13px; max-width: 420px; line-height: 1.6; }
.gp-manual { display: flex; align-items: center; gap: 10px; padding-top: 12px; border-top: 1px solid var(--line); }
.gp-manual-label { font-size: 13px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.gp-manual .input { max-width: 200px; font-family: var(--mono); }

/* ================= 成员库 ================= */
.mb { display: flex; flex-direction: column; gap: 14px; }
.mb-toolbar { display: flex; align-items: center; gap: 12px; }
.mb-search { max-width: 320px; }
.mb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.mb-card { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 18px 10px 14px; min-width: 0; border-radius: 14px; border: 1px solid var(--line); background: var(--panel-2); color: var(--fg); text-align: center; transition: border-color .15s, background-color .15s, transform .15s; }
.mb-card:hover { border-color: var(--accent-line); background: #1E2231; transform: translateY(-1px); }
.mb-card .mb-avatar { margin-bottom: 6px; }
.mb-card-name { max-width: 100%; font-weight: 800; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mb-card-handle { max-width: 100%; color: var(--dim); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mb-card-gift { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; margin-top: 6px; padding: 3px 10px; border-radius: var(--r-pill); background: #10141B; font-size: 12px; font-weight: 600; }
.mb-card-gift-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mb-card-gift.none { color: var(--dim); background: transparent; border: 1px dashed var(--line-2); }
.mb-card-edit { position: absolute; top: 8px; right: 8px; width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; color: var(--muted); background: var(--panel-3); opacity: 0; transition: opacity .15s; }
.mb-card:hover .mb-card-edit, .mb-card:focus-visible .mb-card-edit { opacity: 1; }
.mb-card-flag { position: absolute; top: 8px; left: 8px; height: 20px; font-size: 11px; }
.mb-card-add { border-style: dashed; border-color: var(--line-2); background: transparent; justify-content: center; }
.mb-card-add:hover { background: var(--accent-soft); }
.mb-add-ring { width: 72px; height: 72px; margin-bottom: 6px; border-radius: 50%; display: grid; place-items: center; border: 1.5px dashed var(--accent-line); color: #B9A0FF; }
.mb-empty { grid-column: 1 / -1; display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 40px 16px; text-align: center; }
.mb-none { grid-column: 1 / -1; margin: 6px 0; color: var(--muted); font-size: 13px; }
.mb-foot-tip { color: var(--dim); font-size: 12px; display: inline-flex; align-items: center; gap: 6px; }

.mb-avatar { position: relative; display: inline-flex; flex: none; }
.mb-avatar > .avatar { width: 100% !important; height: 100% !important; }
.mb-gift { position: absolute; right: -4px; bottom: -4px; padding: 2px; border-radius: 9px; background: var(--panel); box-shadow: 0 2px 6px rgba(0, 0, 0, .4); line-height: 0; }
.mb-gift .gift-ic { border-radius: 7px; }

.mb-edit { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 24px; align-items: start; }
.mb-edit-side { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 20px 12px; border-radius: 14px; background: radial-gradient(120% 80% at 50% 0%, rgba(139, 92, 255, .18), transparent 70%), var(--panel-2); border: 1px solid var(--line); }
.mb-edit-preview { display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; min-width: 0; max-width: 100%; }
.mb-edit-preview .mb-avatar { margin-bottom: 8px; }
.mb-edit-preview .mb-gift .gift-ic { width: 30px !important; height: 30px !important; }
.mb-edit-name { font-weight: 800; font-size: 16px; max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mb-edit-handle { color: var(--dim); font-size: 12px; max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mb-edit-tip { margin: 0; color: var(--dim); font-size: 12px; line-height: 1.5; text-align: center; }
.mb-edit-form { align-content: start; }

/* ================= 顶栏预设标签 ================= */
.preset-tab { position: relative; display: inline-flex; align-items: center; gap: 7px; flex: none; height: 34px; max-width: 220px; padding: 0 14px 0 10px; border-radius: var(--r-pill); border: 1px solid var(--line-2); background: var(--panel-2); color: var(--muted); font-weight: 700; font-size: 13px; white-space: nowrap; transition: border-color .15s, background-color .15s, color .15s; }
.preset-tab:hover:not(:disabled) { color: var(--fg); border-color: #3A4456; background: var(--panel-3); }
.preset-tab:disabled { opacity: .5; cursor: not-allowed; }
.preset-tab .pt-no { font-size: 15px; line-height: 1; color: var(--dim); }
.preset-tab .pt-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.preset-tab.active { background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: 0 4px 16px rgba(139, 92, 255, .35); }
.preset-tab.active .pt-no { color: rgba(255, 255, 255, .85); }
.preset-tab.active:hover:not(:disabled) { background: var(--accent-hover); color: #fff; }
.preset-tab.modified { border-color: var(--accent-line); color: #D2C2FF; background: #1D1A2C; }
.preset-tab .pt-mod { height: 18px; padding: 0 6px; border-radius: var(--r-pill); background: var(--warn-soft); color: var(--warn); font-size: 11px; line-height: 18px; font-weight: 700; }
.preset-add { display: inline-flex; align-items: center; justify-content: center; gap: 6px; flex: none; width: 34px; height: 34px; border-radius: var(--r-pill); border: 1px dashed var(--line-2); background: transparent; color: var(--muted); font-weight: 700; font-size: 13px; transition: border-color .15s, color .15s, background-color .15s; }
.preset-add:hover:not(:disabled) { border-color: var(--accent); color: #C7B3FF; background: var(--accent-soft); }
.preset-add:disabled { opacity: .45; cursor: not-allowed; }
.preset-add.with-label { width: auto; padding: 0 14px 0 10px; }
.preset-add.attn { border-color: var(--accent-line); color: #C7B3FF; }
.preset-empty { color: var(--dim); font-size: 13px; font-weight: 600; white-space: nowrap; }

/* ================= 中栏预览 ================= */
#col-preview { position: relative; }
.pv-card { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 10px; padding: 10px; }
.pv-head { display: flex; align-items: center; gap: 4px; min-height: 30px; }
.pv-title { flex: 1; min-width: 0; color: var(--fg); font-size: 13px; }
.pv-title .ic { color: var(--muted); }
.pv-tag { height: 20px; font-size: 11px; }
.pv-actions { display: flex; align-items: center; gap: 2px; }
.pv-actions .btn-icon[aria-pressed="true"] { color: #C7B3FF; background: var(--accent-soft); }
.pv-stage { position: relative; flex: 1 1 0; min-height: 160px; display: flex; align-items: center; justify-content: center; }
.pv-card.is-sim .pv-stage { align-items: flex-start; }
.pv-frame { position: relative; overflow: hidden; border-radius: 12px; border: 1px solid var(--line-2); flex: none; color-scheme: light; }
/* ↑ color-scheme: light —— 与 overlay 文档（默认浅色配色）一致；否则 Chrome 给配色方案不同的 iframe 画不透明白底，透明背景失效 */
.pv-frame iframe { position: absolute; left: 0; top: 0; width: 1080px; height: 1920px; border: 0; transform-origin: 0 0; background: transparent; }
.pv-frame.bg-dark { background: #000; }
.pv-frame.bg-checker { background: repeating-conic-gradient(#3a3f4a 0% 25%, #22262e 0% 50%) 0 0 / 16px 16px; }
.pv-msg { position: absolute; inset: 12px; display: grid; place-items: center; padding: 12px; text-align: center; color: var(--muted); font-size: 12px; line-height: 1.6; background: rgba(13, 16, 22, .85); border-radius: 12px; }
.pv-foot { display: flex; align-items: center; justify-content: space-between; gap: 6px; font-size: 11px; color: var(--dim); }
.pv-foot .link-btn { font-size: 12px; white-space: nowrap; }
.pv-foot-text { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pv-rail { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 14px 0; border-radius: var(--r-card); border: 1px solid var(--line); background: var(--panel); color: var(--muted); transition: background-color .15s, color .15s; }
.pv-rail:hover { background: var(--panel-2); color: var(--fg); }
.pv-rail-text { writing-mode: vertical-rl; letter-spacing: 4px; font-size: 13px; font-weight: 700; }

/* 测试面板 */
.pv-card.is-sim { border-color: var(--accent-line); box-shadow: 0 0 0 1px rgba(139, 92, 255, .12) inset; }
.pv-sim { flex: 0 1 auto; max-height: 52%; overflow: auto; display: flex; flex-direction: column; gap: 8px; padding: 10px; margin: 0 -2px; border-radius: 10px; background: var(--panel-2); border: 1px solid var(--line); }
.pv-sim-head { display: flex; align-items: center; gap: 6px; }
.pv-sim-title { font-size: 13px; }
.pv-sim-row { display: flex; flex-wrap: wrap; gap: 6px; }
.pv-sim-row .btn { flex: 1 1 auto; }
.pv-sim-note { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.pv-sim-err { font-size: 12px; padding: 8px 10px; }
.pv-sim-wait { font-size: 12px; padding: 4px 2px; }
.pv-sim-list { display: flex; flex-direction: column; gap: 6px; }
.pv-sim-member { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; padding: 6px 8px; border-radius: 8px; background: var(--panel); border: 1px solid var(--line); }
.pv-sim-who { flex: 1 1 90px; min-width: 0; display: flex; align-items: center; gap: 6px; }
.pv-sim-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 700; font-size: 13px; }
.pv-sim-nogift { width: 20px; height: 20px; opacity: .5; }
.pv-sim-actions { display: flex; flex-wrap: wrap; gap: 4px; }
.pv-sim-actions .btn-sm, .pv-sim-row .btn-sm { height: 28px; padding: 0 9px; font-size: 12px; }
.pv-sim .btn.is-on { background: var(--accent-soft); border-color: var(--accent-line); color: #D2C2FF; }
.pv-sim-label { font-size: 12px; font-weight: 700; color: var(--muted); }

/* ================= 阵容与玩法：编辑布局 ================= */
.ws-main[data-editing="lineup"] { grid-template-columns: minmax(0, 1fr) clamp(300px, 22vw, 400px); }
.ws-main[data-editing="lineup"] > #col-left, .ws-main[data-editing="lineup"] > #col-control { display: none; }
.lu { order: -1; min-height: 0; min-width: 0; display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--accent-line); border-radius: var(--r-modal); box-shadow: 0 0 0 1px rgba(139, 92, 255, .1), 0 18px 48px rgba(0, 0, 0, .35); overflow: hidden; animation: lu-in .18s ease; }
@keyframes lu-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.lu-head { display: flex; align-items: center; gap: 14px; padding: 16px 16px 14px 20px; border-bottom: 1px solid var(--line); background: linear-gradient(180deg, rgba(139, 92, 255, .08), transparent); }
.lu-head-icon { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--accent-soft); color: #C7B3FF; flex: none; }
.lu-head-text { flex: 1; min-width: 0; }
.lu-title { margin: 0; font-size: 19px; font-weight: 800; display: flex; align-items: center; gap: 10px; }
.lu-sub { margin: 2px 0 0; color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lu-body { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(340px, 5fr) minmax(0, 6fr); }
.lu-col { min-height: 0; overflow: auto; padding: 16px 20px 24px; display: flex; flex-direction: column; gap: 12px; }
.lu-cast { border-right: 1px solid var(--line); background: rgba(255, 255, 255, .012); }
.lu-sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.lu-sec-title { margin: 0; font-size: 15px; font-weight: 800; display: inline-flex; align-items: center; gap: 8px; }
.lu-sec-tip { margin: 0; display: inline-flex; align-items: center; gap: 4px; color: var(--dim); font-size: 12px; }
.lu-count { font-size: 12px; font-weight: 700; color: var(--muted); padding: 1px 8px; border-radius: var(--r-pill); background: var(--panel-3); font-variant-numeric: tabular-nums; }
.lu-hint { margin: 0; color: var(--dim); font-size: 12px; line-height: 1.6; display: flex; align-items: center; gap: 6px; }
.lu-roster-head { margin-top: 10px; padding-top: 14px; border-top: 1px solid var(--line); }

/* 阵容槽 */
.lu-slots { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.lu-slots-empty { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 26px 12px; border-radius: 12px; border: 1.5px dashed var(--line-2); color: var(--muted); font-size: 13px; }
.lu-slot { position: relative; display: flex; flex-direction: column; gap: 8px; padding: 10px 10px 10px 8px; border-radius: 12px; background: var(--panel-2); border: 1px solid var(--line); transition: border-color .15s, opacity .15s; }
.lu-slot:hover { border-color: var(--line-2); }
.lu-slot.dragging { opacity: .45; }
.lu-slot.drop-before::before, .lu-slot.drop-after::after { content: ""; position: absolute; left: 6px; right: 6px; height: 3px; border-radius: 3px; background: var(--accent); box-shadow: 0 0 10px rgba(139, 92, 255, .7); }
.lu-slot.drop-before::before { top: -6px; }
.lu-slot.drop-after::after { bottom: -6px; }
.lu-slot.missing { border-color: rgba(255, 176, 32, .4); }
.lu-slot-top { display: flex; align-items: center; gap: 8px; min-width: 0; }
.lu-grip { color: var(--dim); cursor: grab; display: inline-flex; padding: 2px 0; }
.lu-slot:active .lu-grip { cursor: grabbing; }
.lu-no { width: 22px; height: 22px; flex: none; border-radius: 7px; display: grid; place-items: center; background: var(--panel-3); color: var(--muted); font-size: 12px; font-weight: 800; font-variant-numeric: tabular-nums; }
.lu-slot-who { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.lu-slot-name { display: flex; align-items: center; gap: 6px; font-weight: 800; font-size: 14px; min-width: 0; }
.lu-slot-name .tag { height: 18px; font-size: 11px; padding: 0 6px; }
.lu-slot-handle { color: var(--dim); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lu-slot.missing .lu-slot-handle { color: var(--warn); }
.lu-missing-av { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--warn-soft); color: var(--warn); flex: none; }
.lu-slot-ops { display: flex; align-items: center; gap: 0; flex: none; }
.lu-slot-fields { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 8px; padding-left: 54px; }
.lu-slot-fields.with-kw { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr) 76px; }
.lu-in { height: var(--ctl-h); font-size: 13px; }

/* 成员头像网格 */
.lu-roster { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; }
.lu-tile { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 4px 8px; min-width: 0; border-radius: 12px; border: 1.5px solid transparent; background: var(--panel-2); color: var(--fg); transition: border-color .12s, background-color .12s; }
.lu-tile:hover { border-color: var(--line-2); background: #1F2532; }
.lu-tile.on { border-color: var(--accent); background: #1F1A33; }
.lu-tile-name { max-width: 100%; font-size: 12px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lu-tile-no { position: absolute; top: 6px; left: 6px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; display: grid; place-items: center; background: var(--accent); color: #fff; font-size: 11px; font-weight: 800; box-shadow: 0 2px 8px rgba(139, 92, 255, .5); }
.lu-tile-add { border: 1.5px dashed var(--line-2); background: transparent; color: var(--muted); }
.lu-tile-add:hover { border-color: var(--accent-line); background: var(--accent-soft); color: #C7B3FF; }
.lu-add-ring { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; border: 1.5px dashed currentColor; }

/* 模式卡片 */
.lu-modes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.lu-mode { position: relative; display: flex; align-items: center; gap: 10px; padding: 12px; min-width: 0; border-radius: 12px; border: 1.5px solid var(--line-2); background: var(--panel-2); color: var(--fg); text-align: left; transition: border-color .15s, background-color .15s; }
.lu-mode:hover { border-color: #3A4456; }
.lu-mode.on { border-color: var(--accent); background: #1F1A33; box-shadow: 0 0 0 3px var(--accent-soft); }
.lu-mode-ic { width: 38px; height: 38px; flex: none; border-radius: 10px; display: grid; place-items: center; background: #10141B; color: var(--muted); }
.lu-mode.on .lu-mode-ic { background: var(--accent); color: #fff; }
.lu-mode-text { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.lu-mode-name { font-weight: 800; font-size: 14px; }
.lu-mode-short { color: var(--dim); font-size: 12px; line-height: 1.35; }
.lu-mode.on .lu-mode-short { color: #B3A6D9; }
.lu-mode-check { position: absolute; top: 8px; right: 8px; width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: #fff; }
.lu-mode-desc { margin: -2px 0 4px; padding: 10px 12px; border-radius: 10px; background: rgba(139, 92, 255, .07); border-left: 3px solid var(--accent); color: #CFC4F0; font-size: 13px; line-height: 1.6; }

/* 参数 */
.lu-params { display: flex; flex-direction: column; gap: 12px; margin-top: 6px; }
.lu-param-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.lu-param { display: flex; flex-direction: column; gap: 8px; padding: 12px; border-radius: 12px; background: var(--panel-2); border: 1px solid var(--line); min-width: 0; transition: opacity .15s; }
.lu-param.wide { grid-column: 1 / -1; }
.lu-param.dim { opacity: .55; }
.lu-param-label { font-size: 13px; font-weight: 700; }
.lu-param-hint { color: var(--dim); font-size: 12px; line-height: 1.5; }
.lu-stepper-wrap { display: flex; flex-direction: column; gap: 8px; }
.lu-stepper { display: flex; align-items: stretch; height: var(--ctl-h); border-radius: var(--r-ctl); border: 1px solid var(--line-2); background: #10141B; overflow: hidden; }
.lu-stepper:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.lu-stepper:has(.lu-step-in[aria-invalid="true"]) { border-color: var(--danger); box-shadow: 0 0 0 3px var(--danger-soft); }
.lu-step-btn { width: 36px; flex: none; border: 0; background: var(--panel-3); color: var(--muted); display: grid; place-items: center; transition: background-color .12s, color .12s; }
.lu-step-btn:hover { background: #2A3242; color: var(--fg); }
.lu-step-in { flex: 1; min-width: 0; width: 60px; height: 100%; border: 0; border-radius: 0; background: transparent; box-shadow: none !important; text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; }
.lu-step-in:focus { border: 0; }
.lu-step-in.ro { display: grid; place-items: center; color: var(--dim); font-weight: 600; font-size: 13px; }
.lu-stepper.disabled { opacity: .6; }
.lu-unit { display: grid; place-items: center; padding: 0 10px 0 0; color: var(--dim); font-size: 12px; }
.lu-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.lu-chip { height: 26px; padding: 0 10px; border-radius: var(--r-pill); border: 1px solid var(--line-2); background: transparent; color: var(--muted); font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; transition: border-color .12s, color .12s, background-color .12s; }
.lu-chip:hover { border-color: var(--accent-line); color: var(--fg); }
.lu-chip.on { border-color: var(--accent); background: var(--accent-soft); color: #D2C2FF; }
.lu-seg { display: flex; padding: 3px; gap: 3px; border-radius: var(--r-ctl); background: #10141B; border: 1px solid var(--line-2); }
.lu-seg-btn { flex: 1; height: 28px; border: 0; border-radius: 7px; background: transparent; color: var(--muted); font-weight: 700; font-size: 13px; white-space: nowrap; transition: background-color .12s, color .12s; }
.lu-seg-btn:hover { color: var(--fg); }
.lu-seg-btn.on { background: var(--accent); color: #fff; }
.lu-switch-row { display: flex; align-items: center; gap: 10px; height: var(--ctl-h); }
.lu-switch-text { color: var(--muted); font-size: 13px; font-weight: 600; }
.lu-dance-note { margin-top: 4px; }

/* 玩法礼物 */
.lu-plays-wrap { display: flex; flex-direction: column; gap: 10px; }
.lu-plays-wrap:not(:empty) { margin-top: 6px; }
.lu-plays { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.lu-play-row { display: grid; grid-template-columns: 22px minmax(0, 1.1fr) minmax(0, 1fr) 30px; align-items: center; gap: 8px; }
.lu-plays-wrap > .btn { align-self: flex-start; }
.lu-plays-off { padding: 8px 10px; border-radius: 10px; background: var(--panel-2); }

/* 成员玩法面板 */
.lu-sticker { display: flex; flex-direction: column; gap: 12px; margin-top: 10px; padding-top: 16px; border-top: 1px solid var(--line); }
.lu-sticker-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.lu-sticker-head > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.lu-sticker-body { display: flex; flex-direction: column; gap: 12px; transition: opacity .15s; }
.lu-sticker-body.off { opacity: .45; }
.lu-styles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.lu-style { display: flex; flex-direction: column; gap: 4px; padding: 10px; border-radius: 12px; border: 1.5px solid var(--line-2); background: var(--panel-2); color: var(--fg); text-align: left; transition: border-color .15s, background-color .15s; }
.lu-style:hover:not(:disabled) { border-color: #3A4456; }
.lu-style:disabled { cursor: not-allowed; }
.lu-style.on { border-color: var(--accent); background: #1F1A33; }
.lu-style-thumb { height: 58px; margin-bottom: 4px; border-radius: 8px; background: #0B0E14; color: #8C93A3; display: block; padding: 2px 6px; }
.lu-style.on .lu-style-thumb { color: #B9A0FF; }
.lu-style-name { font-weight: 800; font-size: 13px; }
.lu-style-desc { color: var(--dim); font-size: 11.5px; line-height: 1.4; }
.lu-overlap { font-size: 12.5px; }

/* 底栏 */
.lu-foot { display: flex; align-items: center; gap: 12px; padding: 14px 20px; border-top: 1px solid var(--line); background: var(--panel); }
.lu-foot-msg { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; color: var(--dim); font-size: 13px; }
.lu-foot-msg span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lu-foot-msg.err { color: #FF8A9B; font-weight: 600; }
.lu-foot-msg.warn { color: var(--warn); }
.lu-foot-msg.shake { animation: lu-shake .35s ease; }
@keyframes lu-shake { 20% { transform: translateX(-4px); } 40% { transform: translateX(4px); } 60% { transform: translateX(-3px); } 80% { transform: translateX(2px); } }
.lu-btn { min-width: 128px; }
.lu-dirty { height: 22px; font-size: 11.5px; }

/* 窄屏：阵容与玩法单列 */
@media (max-width: 1360px) {
  .lu-body { grid-template-columns: minmax(320px, 1fr) minmax(0, 1.15fr); }
  .lu-modes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lu-col { padding: 14px 14px 20px; }
  .lu-slot-fields { padding-left: 0; }
  .mb-edit { grid-template-columns: 1fr; }
}

/* ================= 礼物特效库（T2.5） ================= */
.fx-drop { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 16px 18px; border-radius: 14px; border: 1.5px dashed var(--line-2); background: var(--panel-2); cursor: pointer; transition: border-color .15s, background-color .15s; }
.fx-drop:hover, .fx-drop:focus-visible { border-color: var(--accent-line); outline: none; }
.fx-drop.over { border-color: var(--accent); background: var(--accent-soft); }
.fx-drop.busy { cursor: progress; opacity: .75; }
.fx-drop-ic { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--accent-soft); color: #C7B3FF; }
.fx-drop-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.fx-drop-text strong { font-size: 14px; }
.fx-drop-text span { font-size: 12px; color: var(--dim); }
.fx-progress { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--muted); }
.fx-progress-track { flex: 1; height: 6px; border-radius: 3px; background: var(--panel-3); overflow: hidden; }
.fx-progress-bar { display: block; height: 100%; width: 0; background: var(--accent); transition: width .15s; }
.fx-progress-text { flex: none; max-width: 60%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fx-list { display: flex; flex-direction: column; gap: 6px; max-height: 240px; overflow: auto; }
.fx-row { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto auto; align-items: center; gap: 12px; padding: 8px 8px 8px 10px; border-radius: 12px; background: var(--panel-2); border: 1px solid var(--line); }
.fx-row-ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: #0E1219; border: 1px solid var(--line-2); color: var(--warn); }
.fx-row-main { min-width: 0; }
.fx-row-name { font-weight: 700; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fx-row-sub { font-size: 12px; color: var(--dim); }
.fx-empty { margin: 0; padding: 14px 4px; font-size: 13px; }
.fx-note { margin: 0; font-size: 12px; color: var(--dim); line-height: 1.6; }
.fx-binds { display: flex; flex-direction: column; gap: 8px; }
.fx-bind { display: grid; grid-template-columns: minmax(150px, 1fr) minmax(150px, 1.2fr) auto auto auto; align-items: center; gap: 8px; padding: 8px; border-radius: 12px; background: var(--panel-2); border: 1px solid var(--line); }
.fx-bind.invalid { border-color: rgba(255, 92, 114, .5); }
.fx-bind .gift-field { min-width: 0; }
.fx-bind-effect { min-width: 0; }
.fx-bind-min-wrap { display: inline-flex; align-items: center; gap: 6px; }
.fx-bind-min-label { font-size: 12px; color: var(--muted); }
.fx-bind-min { width: 76px; }
.fx-bind-err { grid-column: 1 / -1; margin: 0; font-size: 12px; color: var(--danger); }
.pf-extra { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 10px; }
.pf-extra-row { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.pf-extra-label { font-size: 13px; font-weight: 600; color: var(--muted); margin-right: 4px; }
.pf-extra .fx-note { margin: 0; }
@media (max-width: 760px) {
  .fx-bind { grid-template-columns: 1fr 1fr; }
}
