.native-ui .sandbox-panel{max-width:900px;margin:auto;padding:12px;color:#f4e5c4;text-shadow:0 1px 2px #111;background:#1c292bef;border:1px solid #8c7149;border-radius:8px}
.sandbox-panel h2,.sandbox-panel h3{margin:.3rem 0 .5rem}
.sandbox-controls{display:flex;align-items:center;gap:.55rem;flex-wrap:wrap;margin:.4rem 0 .65rem}
.sandbox-controls label{display:flex;gap:.35rem;align-items:center;max-width:100%}
.sandbox-controls input,.sandbox-controls select{min-width:0;max-width:100%;background:#10191b;color:#f4e5c4;border:1px solid #8c7149;border-radius:.35rem;padding:.4rem}
.sandbox-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(8rem,1fr));gap:.35rem;max-height:13rem;overflow:auto}
.sandbox-grid button{display:flex;align-items:center;gap:.35rem;min-height:2.5rem;text-align:left;background:#10191b;border:1px solid #5e573e;border-radius:.3rem;color:#f4e5c4;padding:.25rem;cursor:pointer}
.sandbox-grid button[aria-pressed=true]{background:#3d3221;border-color:#e7c987}
.sandbox-grid img,.sandbox-grid button>span:first-child{width:2rem;height:2rem;object-fit:contain;flex:none}
.sandbox-item-editor{display:flex;align-items:center;gap:.8rem;margin-top:.55rem;border-top:1px solid #8c7149;padding-top:.55rem}
.sandbox-item-preview{width:110px;height:92px;flex:none}
.sandbox-item-preview>.card-component{width:100%;height:100%}
.new-run-panel [data-start-sandbox]{margin-top:.6rem}
@media(max-width:640px){.sandbox-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.sandbox-item-preview{width:64px;height:68px}}

/* ---------- 2026-11-08：三栏布局，整体放进上方画框（不再伸到棋盘后面） ---------- */
.native-ui .market-panel:has(.sandbox-panel){overflow:visible}
.native-ui .sandbox-panel{
  max-width:none;width:100%;height:100%;margin:0;box-sizing:border-box;padding:10px 12px;
  display:grid;grid-template-columns:minmax(170px,1fr) minmax(280px,1.9fr) minmax(170px,.95fr);gap:12px;overflow:hidden;
  background:linear-gradient(#1c292bf2,#141e20f2);box-shadow:inset 0 0 0 1px #0008,0 6px 18px #0008;
}
.sandbox-panel .sb-col{display:flex;flex-direction:column;min-height:0;min-width:0;gap:6px}
.sandbox-panel .sb-col+.sb-col{border-left:1px solid #8c714966;padding-left:12px}
.sandbox-panel h3{margin:0;font-size:1rem;color:#f0d7a0;letter-spacing:.04em}
.sandbox-panel .sandbox-controls{margin:0;gap:.4rem;flex-wrap:nowrap}
.sandbox-panel .sandbox-controls input{flex:1;min-width:0}
.sandbox-panel input[data-sandbox-msearch]{background:#10191b;color:#f4e5c4;border:1px solid #8c7149;border-radius:.35rem;padding:.35rem .45rem;min-width:0}
/* 野怪列表 */
.sb-monster-list{flex:1;min-height:0;overflow:auto;display:flex;flex-direction:column;gap:4px;padding-right:2px}
.sb-monster{display:grid;grid-template-columns:34px 1fr auto;align-items:center;gap:6px;text-align:left;padding:3px 6px 3px 3px;
  background:#10191b;border:1px solid #5e573e;border-radius:.35rem;color:#f4e5c4;cursor:pointer;font:inherit;font-size:.86rem}
.sb-monster:hover{border-color:#c9a865;background:#1b2729}
.sb-monster[aria-selected=true]{background:#3d3221;border-color:#e7c987;box-shadow:0 0 0 1px #e7c98755,0 0 10px #e7c98744}
.sb-monster img,.sb-monster-fallback{width:34px;height:34px;object-fit:cover;object-position:50% 20%;border-radius:4px;display:grid;place-items:center;background:#0a1214}
.sb-monster-name{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.sb-monster-hp{display:flex;align-items:center;gap:2px;color:#9fe08a;font:700 .78rem BazaarNumbers,sans-serif}
.sb-monster-hp .game-icon{width:14px;height:14px}
.sb-empty{opacity:.7;margin:.4rem}
.sb-monsters [data-sandbox-fight]{flex:none;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
/* 物品目录 */
.sb-items .sandbox-catalog{flex:1;min-height:0;display:flex;flex-direction:column;gap:6px}
.sb-items .sandbox-grid{flex:1;min-height:0;max-height:none;grid-template-columns:repeat(auto-fill,minmax(7.4rem,1fr));align-content:start}
.sb-items .sandbox-grid button{min-height:2.3rem;font-size:.82rem}
.sb-items .sandbox-grid button:hover{border-color:#c9a865;background:#1b2729}
.sb-items nav.sandbox-controls{justify-content:space-between;flex:none}
/* 物品设置 */
.sandbox-panel .sandbox-item-editor{margin:0;border-top:0;padding-top:0;align-items:stretch;justify-content:flex-start;overflow:auto}
.sandbox-panel .sandbox-item-editor:not(:has(h3)){display:grid;place-items:center;text-align:center;color:#d8c8a6;opacity:.8;font-size:.9rem}
.sandbox-panel .sandbox-item-preview{width:100%;height:min(120px,30%);min-height:72px;flex:none;display:grid;place-items:center}
.sandbox-panel .sandbox-item-preview>.card-component{width:100%;height:100%}
.sandbox-panel .sandbox-item-editor .sandbox-controls{flex-wrap:wrap}
.sandbox-panel .sandbox-item-editor .sandbox-controls button{flex:1;min-width:0;white-space:nowrap}
/* 野怪悬浮预览 */
.sb-monster-tip{min-width:260px;max-width:min(560px,92vw)}
.sb-monster-tip .mt-head{display:flex;align-items:center;gap:8px}
.sb-mt-portrait{width:44px;height:44px;border-radius:6px;object-fit:cover;object-position:50% 20%;border:1px solid #c9a865}
.sb-mt-board{display:flex;flex-wrap:wrap;gap:4px;justify-content:center;padding:6px 8px}
.sb-mini{position:relative;flex:none}
.sb-mini>.card-component{width:100%;height:100%}
.sb-mt-skills{display:flex;flex-wrap:wrap;align-items:center;gap:6px;padding:0 8px 6px}
.sb-mt-skill{display:flex;align-items:center;gap:4px;font-size:.8rem;color:#e9d9b6}
.sb-mt-skill i{font-style:normal}
@media(max-width:900px){
  .native-ui .sandbox-panel{grid-template-columns:1fr;height:auto;max-height:none;overflow:visible}
  .sandbox-panel .sb-col+.sb-col{border-left:0;padding-left:0;border-top:1px solid #8c714966;padding-top:8px}
  .sb-monster-list{max-height:11rem}.sb-items .sandbox-grid{max-height:13rem}
}
.sb-items .sandbox-grid button>span:last-child{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;line-height:1.15}
.sb-items .sandbox-grid button{min-height:2.6rem}
.sb-monster-tip{max-width:min(600px,92vw)}
.sb-monster-tip .mt-body{border-radius:0;border-bottom:0;justify-content:flex-start}
.sb-monster-tip .mt-body .mt-label+.mt-rewards{margin-right:10px}
.sb-monster-tip .sb-mt-board,.sb-monster-tip .sb-mt-skills{margin:0;background:#151210;border:2px solid #6d6150;border-top:1px solid #6d615066}
.sb-monster-tip .sb-mt-board{border-bottom:0;padding:10px}
.sb-monster-tip .sb-mt-skills{border-radius:0 0 6px 6px;padding:8px 14px 10px}
.sb-monster-tip:not(:has(.sb-mt-skills)) .sb-mt-board{border-bottom:2px solid #6d6150;border-radius:0 0 6px 6px}
.sb-monster-tip .sb-mt-skills .mt-label{margin-right:6px}
.sb-monster-tip .sb-mt-board{flex-wrap:nowrap;justify-content:center}
.native-ui .card-popover:has(.sb-monster-tip){overflow:visible;max-width:none}

/* 2026-11-14：测试场的野怪/事件切换、设置条、事件列表、返回按钮 */
.sb-tabs{display:flex;gap:4px;flex:none}
.sb-tabs button{flex:1;padding:5px 0;border:1px solid #8c7149;border-radius:6px;background:#1a2426;color:#cbbd9c;font:700 14px BazaarTitle,"Microsoft YaHei",sans-serif;cursor:pointer}
.sb-tabs button[aria-selected=true]{background:#6b5326;color:#fff3d0;box-shadow:inset 0 0 0 1px #e9c97a}
.sb-settings{display:flex;flex-wrap:wrap;gap:4px 6px;align-items:center;flex:none;font-size:11px;color:#d9cba8}
.sb-settings label{display:flex;align-items:center;gap:3px}
.sb-settings input{width:52px;padding:2px 4px;border:1px solid #8c7149;border-radius:4px;background:#10191b;color:#fff3d0;font:700 12px BazaarNumbers,sans-serif}
.sb-settings button{padding:2px 8px;min-height:0;font-size:11px}
.sb-event-filter{display:flex;gap:4px;flex:none}
.sb-event-filter input{flex:1;min-width:0}
.sb-event-filter select{flex:none;max-width:86px}
.sb-event-kind{flex:none;font-size:10px;padding:1px 5px;border-radius:8px;background:#2c3b3d;color:#cfe3e6;white-space:nowrap}
.sb-event-kind.k-merchant{background:#4a3a1a;color:#ffe2a0}
.sb-event-kind.k-pedestal{background:#23405a;color:#bfe6ff}
.sb-event.is-other-hero{opacity:.62}
.sb-monsters [data-sandbox-enter]{flex:none;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.sb-leave{position:absolute;left:calc(var(--uf-l,18%) + 6px);top:62px;z-index:40;left:270px;padding:6px 14px;font-size:13px;box-shadow:0 0 0 2px #7fd4ff66,0 4px 10px #000a}

/* 2026-11-14：测试工具（对手页、工具页、连打、技能目录、修改已有物品） */
.sb-tabs button{font-size:13px}
.sb-batch-row{display:flex;gap:4px;flex:none}
.sb-batch-row select{flex:none;width:74px}
.sb-batch-row button{flex:1;min-height:0;padding:3px 6px;font-size:12px;white-space:nowrap}
.sb-result{flex:none;font-size:11px;line-height:1.45;color:#cfd8c8}
.sb-result p{margin:0}
.sb-result .sb-batch b{color:#9be86f}
.sb-opp-row{display:flex;align-items:center;gap:6px;padding:3px 6px;border:1px solid #8c714955;border-radius:5px;background:#10191b99;font-size:12px}
.sb-opp-row span{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.sb-opp-row small{flex:none;color:#b9ad97;font-size:10px}
.sb-opp-row button{flex:none;width:20px;height:20px;border:0;border-radius:4px;background:#5a2a24;color:#ffd9cf;cursor:pointer;line-height:1}
.sb-tools h4{margin:4px 0 2px;font:700 12px BazaarTitle,"Microsoft YaHei",sans-serif;color:#e9c97a}
.sb-tools select{max-width:120px}
.sb-own{display:flex;flex-wrap:wrap;gap:4px}
.sb-own-item{display:flex;flex-direction:column;align-items:flex-start;padding:3px 7px;border:1px solid #8c7149;border-radius:5px;background:#1a2426;color:#f4e5c4;font-size:11px;cursor:pointer}
.sb-own-item small{color:#b9ad97;font-size:9px}
.sb-own-item.is-editing{background:#6b5326;box-shadow:inset 0 0 0 1px #e9c97a}
.sb-editing span{font-size:11px;color:#e9c97a;width:100%}
.sb-items h3 select{font:inherit;color:inherit;background:#10191b;border:1px solid #8c7149;border-radius:5px;padding:1px 4px}

/* 2026-11-14：野怪/事件列表腾出空间——设置条挪到“工具”页，开战与连打并成一行，列表行压矮 */
.sb-fight-row{display:flex;gap:4px;flex:none;align-items:stretch}
.sb-fight-row>.primary-button{flex:1;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;padding:4px 6px;min-height:0}
.sb-fight-row .sb-batch-row{flex:none}
.sb-fight-row .sb-batch-row select{width:64px}
.sb-fight-row .sb-batch-row button{flex:none;padding:3px 8px}
.sb-monsters .sb-monster{grid-template-columns:26px 1fr auto;padding:2px 6px 2px 2px;gap:5px;font-size:12px}
.sb-monsters .sb-monster img,.sb-monsters .sb-monster-fallback{width:26px;height:26px}
.sb-monsters .sb-monster-list{gap:2px}
.sb-monsters>input,.sb-event-filter input,.sb-event-filter select{padding-top:3px;padding-bottom:3px}
.sb-result:empty{display:none}

/* 野怪列表：左栏加宽、两列排布、行压到 27px，一屏能看到约 16 只 */
.native-ui .sandbox-panel{grid-template-columns:minmax(230px,1.35fr) minmax(260px,1.6fr) minmax(170px,.95fr)}
.sb-monsters .sb-monster{height:27px;min-height:0;box-sizing:border-box}
.sb-monsters .sb-monster-hp{font-size:11px}
.sb-monsters .sb-monster-hp .game-icon{width:12px;height:12px}
.sb-monsters .sb-monster-list[role=listbox]:not(.sb-event-list){display:grid;grid-template-columns:1fr 1fr;align-content:start;gap:2px 4px}
.sb-monsters>input{height:28px;box-sizing:border-box}
@media(max-width:900px){.sb-monsters .sb-monster-list[role=listbox]:not(.sb-event-list){grid-template-columns:1fr}}

/* 事件/对手列表是纵向弹性容器：行不能被压缩（否则几百行会被挤成一条线） */
.sb-monsters .sb-monster,.sb-opp-row{flex:none}
.sb-monsters .sb-event{height:28px}

/* 2026-11-14：目录筛选（英雄 / 类别 / 主动被动 / 效果类型） */
.sb-filters{gap:4px;flex-wrap:wrap}
.sb-filters select{flex:1 1 0;min-width:0;max-width:none;font-size:12px;padding:2px 2px}
.sb-filters button{flex:none;min-height:0;padding:2px 8px;font-size:11px}
