/* ============================================================
   《影之刃零》存档查看器 · 网页版样式
   ------------------------------------------------------------
   = 拖放区 / 主题变量（本文件手写）
   = 存档查看器全部组件样式：移植自 pbz-save-viewer 的 styles.css，
     已统一作用域化到 .pbz-app 下，避免污染主站。
   ============================================================ */

/* 容器：overflow-x:clip 防止提示气泡/装饰造成的横向溢出 */
.pbz-app{position:relative;isolation:isolate;overflow-x:clip}

/* ── 拖放区 ── */
.pbz-app #drop{display:flex;align-items:center;justify-content:center;gap:12px;min-height:104px;margin:6px 0 12px;
  padding:20px;border:1.5px dashed var(--line);border-radius:var(--radius);text-align:center;color:var(--muted);
  cursor:pointer;transition:.18s;background:rgba(127,127,127,.12);box-shadow:var(--shadow-sm)}
.pbz-app #drop:hover,.pbz-app #drop.hover,.pbz-app #drop:focus-visible{border-color:var(--gold);background:rgba(232,189,119,.07);color:var(--gold);outline:none}
.pbz-app .drop-icon{font-size:25px;color:var(--gold)}
.pbz-app #drop b{color:var(--text)}
.pbz-app #file{display:none}
.pbz-app .privacy{border:1px solid rgba(107,197,138,.35);background:rgba(107,197,138,.12);color:var(--green);padding:5px 10px;border-radius:99px;font-size:11.5px}
.pbz-app #status.err{color:var(--red)}
.pbz-app main:has(.empty){background:transparent;box-shadow:none}
#drawerRoot .btn.primary, .pbz-app .btn.primary{background:linear-gradient(135deg,var(--gold),var(--gold-2));color:#17130c;border-color:var(--gold);font-weight:600}
#drawerRoot .btn.primary:hover, .pbz-app .btn.primary:hover{filter:brightness(1.06);color:#17130c}
.pbz-app #drop{position:relative;z-index:2}

/* ============================================================
   影之刃零 · 存档查看器
   设计基调：墨色底 + 鎏金主线；青色专用于"提示"层，让解释性信息
   与原始数据在视觉上分离。
   ============================================================ */
.pbz-app, #drawerRoot {
  --bg: #080a0f;
  --bg-2: #0d1119;
  --panel: #12161f;
  --panel-2: #171d28;
  --panel-3: #1e2634;
  --line: #263041;
  --line-soft: #1e2735;
  --text: #e2e8f2;
  --text-2: #aeb9c9;
  --muted: #7d8b9f;
  --gold: #e8bd77;
  --gold-2: #f3d9a8;
  --gold-deep: #8a6a37;
  --green: #6bc58a;
  --amber: #e6b86f;
  --red: #e27676;
  --blue: #78b6ed;
  --violet: #b48ce8;
  --teal: #6fd0c6;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 18px 44px rgba(0, 0, 0, 0.42);
  --shadow-sm: 0 6px 18px rgba(0, 0, 0, 0.28);
  --mono: "JetBrains Mono", Consolas, "SF Mono", "Cascadia Mono", monospace;
  --sans: "PingFang SC", "Microsoft YaHei", "Segoe UI", system-ui, sans-serif;
}

.pbz-app, .pbz-app * {
  box-sizing: border-box;
}

.pbz-app {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(1200px 600px at 12% -10%, rgba(232, 189, 119, 0.07), transparent 60%),
    radial-gradient(900px 520px at 92% 0%, rgba(111, 208, 198, 0.05), transparent 55%),
    linear-gradient(180deg, #0b0e15 0, var(--bg) 45%);
  background-attachment: fixed;
  color: var(--text);
  font: 14px/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
}

.pbz-app button,
.pbz-app input,
.pbz-app select {
  font: inherit;
  color: inherit;
}

.pbz-app h1,
.pbz-app h2,
.pbz-app h3,
.pbz-app h4 {
  margin: 0;
}

.pbz-app a {
  color: var(--blue);
  text-decoration: none;
}

.pbz-app a:hover {
  text-decoration: underline;
}

.pbz-app ::selection {
  background: rgba(232, 189, 119, 0.28);
}

/* 滚动条 */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: #2a3444;
  border-radius: 6px;
  border: 2px solid transparent;
  background-clip: padding-box;
}

::-webkit-scrollbar-thumb:hover {
  background: #3a4759;
  background-clip: padding-box;
}

/* ---------- 骨架 ---------- */
.pbz-app .app {
  max-width: 1640px;
  margin: 0 auto;
  padding: 0 28px 64px;
}

.pbz-app .app-header {
  position: sticky;
  top: 0;
  z-index: 40;
  padding: 20px 0 14px;
  margin-bottom: 20px;
  background: linear-gradient(180deg, rgba(8, 10, 15, 0.96) 60%, rgba(8, 10, 15, 0));
  backdrop-filter: blur(8px);
}

.pbz-app .headline {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.pbz-app .brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.pbz-app .brand-mark {
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 19px;
  color: #14181f;
  background: linear-gradient(145deg, var(--gold-2), var(--gold) 45%, var(--gold-deep));
  box-shadow: 0 6px 18px rgba(232, 189, 119, 0.22);
}

.pbz-app .app-header h1 {
  font-size: 20px;
  line-height: 1.25;
  letter-spacing: 1px;
  background: linear-gradient(92deg, #fff5e2 0%, var(--gold) 45%, #c79a55 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.pbz-app .app-header .sub {
  color: var(--muted);
  font-size: 12.5px;
  margin-top: 3px;
}

.pbz-app .header-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.pbz-app .source-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.pbz-app .source-bar .segment {
  margin-bottom: 0;
}

.pbz-app .source-note {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
  min-width: 0;
}

.pbz-app .source-note.bad {
  color: var(--red);
}

.pbz-app .privacy {
  border: 1px solid rgba(107, 197, 138, 0.3);
  background: rgba(107, 197, 138, 0.08);
  color: #8ed5a4;
  padding: 5px 11px;
  border-radius: 99px;
  font-size: 11.5px;
  white-space: nowrap;
}

/* ---------- 按钮 ---------- */
#drawerRoot .btn, .pbz-app .btn {
  background: var(--panel-2);
  border: 1px solid var(--line);
  color: var(--text-2);
  border-radius: var(--radius-sm);
  padding: 6px 12px;
  cursor: pointer;
  font-size: 12px;
  transition: 0.16s;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

#drawerRoot .btn:hover:not(:disabled), .pbz-app .btn:hover:not(:disabled) {
  border-color: var(--gold);
  color: var(--gold);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(232, 189, 119, 0.12);
}

#drawerRoot .btn:active:not(:disabled), .pbz-app .btn:active:not(:disabled) {
  transform: translateY(0);
}

#drawerRoot .btn:disabled, .pbz-app .btn:disabled {
  opacity: 0.38;
  cursor: not-allowed;
}

#drawerRoot .btn.ghost, .pbz-app .btn.ghost {
  background: transparent;
}

#drawerRoot .btn.primary, .pbz-app .btn.primary {
  border-color: rgba(232, 189, 119, 0.35);
  color: var(--gold);
  background: rgba(232, 189, 119, 0.08);
}

/* ---------- 状态条 ---------- */
.pbz-app .statusbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin: 0 2px 16px;
}

#drawerRoot .status, .pbz-app .status {
  color: var(--muted);
  font-size: 12px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  flex: 1 1 420px;
}

#drawerRoot .status.error, .pbz-app .status.error {
  color: var(--red);
}

#drawerRoot .status .hash, .pbz-app .status .hash {
  font-family: var(--mono);
  font-size: 11px;
  color: #5f6c7e;
}

.pbz-app .actions {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
}

.pbz-app .progress {
  height: 2px;
  background: var(--panel-3);
  border-radius: 4px;
  overflow: hidden;
  margin: 0 0 14px;
  display: none;
}

.pbz-app .progress.on {
  display: block;
}

.pbz-app .progress i {
  display: block;
  width: 32%;
  height: 100%;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  animation: slide 1.15s ease-in-out infinite;
}

@keyframes slide {
  from {
    transform: translateX(-120%);
  }
  to {
    transform: translateX(420%);
  }
}

/* ---------- 槽位页签 ---------- */
.pbz-app .slot-strip {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 2px 14px;
  scrollbar-width: thin;
}

.pbz-app .slot {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 9px 14px 9px 10px;
  cursor: pointer;
  transition: 0.16s;
  position: relative;
  overflow: hidden;
}

.pbz-app .slot:hover {
  border-color: #3a465c;
  background: var(--panel-2);
  transform: translateY(-1px);
}

.pbz-app .slot.on {
  border-color: rgba(232, 189, 119, 0.42);
  background: linear-gradient(180deg, rgba(232, 189, 119, 0.07), rgba(232, 189, 119, 0.02));
  box-shadow: 0 8px 22px rgba(232, 189, 119, 0.09);
}

.pbz-app .slot .ring {
  flex: 0 0 auto;
}

.pbz-app .slot .slot-name {
  font-size: 12.5px;
  color: var(--text-2);
  line-height: 1.3;
  white-space: nowrap;
}

.pbz-app .slot.on .slot-name {
  color: var(--gold-2);
}

.pbz-app .slot .slot-meta {
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
}

.pbz-app .slot .slot-meta.bad {
  color: var(--red);
}

/* 进度环 */
.pbz-app .ring {
  width: 30px;
  height: 30px;
  transform: rotate(-90deg);
}

.pbz-app .ring circle {
  fill: none;
  stroke-width: 3;
}

.pbz-app .ring .track {
  stroke: var(--panel-3);
}

.pbz-app .ring .value {
  stroke: var(--gold);
  stroke-linecap: round;
  transition: stroke-dashoffset 0.5s ease;
}

.pbz-app .ring .value.done {
  stroke: var(--green);
}

.pbz-app .ring-wrap {
  position: relative;
  display: inline-grid;
  place-items: center;
}

.pbz-app .ring-wrap .ring-label {
  position: absolute;
  font-size: 9px;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
}

/* ---------- 主区段切换 ---------- */
.pbz-app .segment {
  display: inline-flex;
  gap: 3px;
  padding: 3px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 11px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.pbz-app .segment button {
  background: transparent;
  border: 0;
  color: var(--muted);
  border-radius: 8px;
  padding: 6px 14px;
  cursor: pointer;
  font-size: 12.5px;
  transition: 0.15s;
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.pbz-app .segment button:hover {
  color: var(--text);
}

.pbz-app .segment button.on {
  background: var(--panel-3);
  color: var(--gold);
  box-shadow: var(--shadow-sm);
}

.pbz-app .segment .dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.55;
}

/* ---------- 布局 ---------- */
.pbz-app .layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 400px;
  gap: 20px;
  align-items: start;
}

/* 右侧解读栏：可向右折叠，折叠后保留一个贴边把手 */
.pbz-app .side-shell {
  position: relative;
  min-width: 0;
}
.pbz-app .side-toggle {
  position: absolute;
  top: 0;
  left: -26px;
  z-index: 5;
  width: 26px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--line);
  border-right: 0;
  border-radius: 8px 0 0 8px;
  background: var(--panel-2);
  color: var(--gold);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  transition: color .16s, border-color .16s, background .16s;
}
.pbz-app .side-toggle:hover,
.pbz-app .side-toggle:focus-visible {
  color: var(--gold);
  border-color: var(--gold);
  background: var(--panel-3);
  outline: none;
}
.pbz-app.side-collapsed .layout {
  grid-template-columns: minmax(0, 1fr) 0;
  gap: 0;
}
.pbz-app.side-collapsed .side {
  display: none;
}
.pbz-app.side-collapsed .side-toggle {
  left: -30px;
  width: 30px;
  height: 48px;
  background: var(--panel-3);
  border-color: var(--gold);
  box-shadow: var(--shadow-sm);
}

@media (max-width: 1240px) {
.pbz-app .layout {
    grid-template-columns: minmax(0, 1fr);
  }
  .pbz-app .side-toggle {
    display: none;
  }
  .pbz-app.side-collapsed .layout {
    grid-template-columns: minmax(0, 1fr);
  }
  .pbz-app.side-collapsed .side {
    display: flex;
  }
}

.pbz-app .panel {
  background: linear-gradient(180deg, rgba(20, 25, 34, 0.96), rgba(16, 20, 28, 0.96));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 22px;
  box-shadow: var(--shadow);
  min-height: 320px;
  animation: fade-up 0.32s ease both;
}

.pbz-app .side {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.pbz-app .card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 15px 17px;
  box-shadow: var(--shadow-sm);
}

.pbz-app .card > h2 {
  font-size: 12.5px;
  color: var(--gold);
  margin: 0 0 11px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  letter-spacing: 0.4px;
}

.pbz-app .card > h2 small {
  font-size: 11px;
  color: var(--muted);
  font-weight: 400;
  letter-spacing: 0;
}

.pbz-app .card > h2 .count {
  font-family: var(--mono);
  color: var(--muted);
  font-size: 11px;
}

/* 内容分区标题：标题 / 计数 / 说明图标之间留固定间距 */
.pbz-app .sec-title {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin: 4px 0 12px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: .2px;
}
.pbz-app .sec-title .count {
  font-family: var(--mono);
  color: var(--muted);
  font-size: 11px;
  font-weight: 400;
}

.pbz-app .empty {
  display: grid;
  place-items: center;
  min-height: 240px;
  color: var(--muted);
  text-align: center;
}

.pbz-app .empty strong {
  display: block;
  color: var(--text);
  font-size: 15px;
  margin-bottom: 6px;
}

.pbz-app .empty code {
  font-family: var(--mono);
  color: var(--teal);
  background: rgba(111, 208, 198, 0.08);
  border: 1px solid rgba(111, 208, 198, 0.22);
  border-radius: 6px;
  padding: 1px 6px;
}

/* ---------- 指标磁贴 ---------- */
.pbz-app .tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}

.pbz-app .tile {
  position: relative;
  background: linear-gradient(160deg, var(--panel-2), var(--panel));
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  padding: 12px 13px;
  overflow: hidden;
  transition: 0.18s;
}

.pbz-app .tile:hover {
  border-color: #36435a;
  transform: translateY(-2px);
}

.pbz-app .tile::after {
  content: '';
  position: absolute;
  inset: 0 auto 0 0;
  width: 2px;
  background: var(--gold);
  opacity: 0.55;
}

.pbz-app .tile.green::after {
  background: var(--green);
}

.pbz-app .tile.blue::after {
  background: var(--blue);
}

.pbz-app .tile.violet::after {
  background: var(--violet);
}

.pbz-app .tile.teal::after {
  background: var(--teal);
}

.pbz-app .tile.red::after {
  background: var(--red);
}

.pbz-app .tile .label {
  font-size: 11px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 4px;
}

.pbz-app .tile .value {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 0.3px;
  margin-top: 3px;
  font-variant-numeric: tabular-nums;
  line-height: 1.25;
}

.pbz-app .tile .value small {
  font-size: 12px;
  color: var(--muted);
  font-weight: 400;
  margin-left: 2px;
}

.pbz-app .tile .foot {
  font-size: 10.5px;
  color: #5f6c7e;
  margin-top: 2px;
}

/* ---------- 键值网格 ---------- */
#drawerRoot .kv, .pbz-app .kv {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(158px, 1fr));
  gap: 9px;
  margin: 10px 0 16px;
}

#drawerRoot .kv > div, .pbz-app .kv > div {
  background: var(--panel-2);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  padding: 9px 11px;
  min-width: 0;
}

#drawerRoot .kv span, .pbz-app .kv span {
  display: block;
  color: var(--muted);
  font-size: 11px;
}

#drawerRoot .kv b, .pbz-app .kv b {
  display: block;
  font-weight: 600;
  overflow-wrap: anywhere;
  margin-top: 2px;
}

/* ---------- 统计块 ---------- */
.pbz-app .stats {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 9px 0 12px;
}

.pbz-app .stat {
  background: var(--panel-2);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  padding: 7px 12px;
  min-width: 88px;
}

.pbz-app .stat strong {
  display: block;
  font-size: 17px;
  line-height: 1.25;
  font-variant-numeric: tabular-nums;
}

.pbz-app .stat span {
  font-size: 10.5px;
  color: var(--muted);
}

.pbz-app .stat.done strong {
  color: var(--green);
}

.pbz-app .stat.doing strong {
  color: var(--amber);
}

.pbz-app .stat.failed strong {
  color: var(--red);
}

/* ---------- 进度条 ---------- */
.pbz-app .bar {
  height: 6px;
  border-radius: 4px;
  background: var(--panel-3);
  overflow: hidden;
  display: flex;
  margin: 6px 0 4px;
}

.pbz-app .bar i {
  display: block;
  height: 100%;
  transition: width 0.5s ease;
}

.pbz-app .bar i.done {
  background: linear-gradient(90deg, #4fae74, var(--green));
}

.pbz-app .bar i.doing {
  background: linear-gradient(90deg, #c99a55, var(--amber));
}

.pbz-app .bar i.failed {
  background: linear-gradient(90deg, #bf6060, var(--red));
}

.pbz-app .bar i.other {
  background: #4a5665;
}

/* ---------- 提示 ---------- */
#drawerRoot .tip, .pbz-app .tip {
  position: relative;
  border-bottom: 1px dotted #6d7c92;
  cursor: help;
  outline: none;
}

#drawerRoot .tip::after, .pbz-app .tip::after {
  content: attr(data-tip);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 9px);
  transform: translateX(-50%) translateY(4px);
  width: max-content;
  max-width: 330px;
  background: #060a10;
  color: var(--text);
  border: 1px solid #2c3a4d;
  border-radius: 9px;
  padding: 8px 11px;
  font-size: 11.5px;
  line-height: 1.6;
  font-weight: 400;
  text-align: left;
  white-space: normal;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.6);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.14s, transform 0.14s;
  z-index: 60;
}

#drawerRoot .tip:hover::after, .pbz-app .tip:hover::after,
#drawerRoot .tip:focus-visible::after, .pbz-app .tip:focus-visible::after {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

#drawerRoot .tip.below::after, .pbz-app .tip.below::after {
  bottom: auto;
  top: calc(100% + 9px);
  transform: translateX(-50%) translateY(-4px);
}

#drawerRoot .tip:hover.below::after, .pbz-app .tip:hover.below::after,
#drawerRoot .tip:focus-visible.below::after, .pbz-app .tip:focus-visible.below::after {
  transform: translateX(-50%) translateY(0);
}

#drawerRoot .infoltip, .pbz-app .infoltip {
  position: relative;
  display: inline-flex;
  vertical-align: middle;
  margin-left: 5px;
}

#drawerRoot .infoltip > button, .pbz-app .infoltip > button {
  width: 15px;
  height: 15px;
  min-width: 15px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid rgba(111, 208, 198, 0.45);
  background: rgba(111, 208, 198, 0.1);
  color: var(--teal);
  font-size: 10px;
  line-height: 13px;
  text-align: center;
  cursor: pointer;
  transition: 0.15s;
}

#drawerRoot .infoltip > button:hover, .pbz-app .infoltip > button:hover,
#drawerRoot .infoltip.open > button, .pbz-app .infoltip.open > button {
  background: rgba(111, 208, 198, 0.24);
  color: #d7f6f2;
}

#drawerRoot .infoltip .tip-body, .pbz-app .infoltip .tip-body {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 9px);
  transform: translateX(-50%) translateY(4px);
  width: max-content;
  max-width: 340px;
  background: #060a10;
  border: 1px solid rgba(111, 208, 198, 0.32);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 11.5px;
  line-height: 1.65;
  color: var(--text);
  text-align: left;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.6);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.14s, transform 0.14s;
  z-index: 70;
  white-space: normal;
}

#drawerRoot .infoltip .tip-body b, .pbz-app .infoltip .tip-body b {
  display: block;
  color: var(--teal);
  font-size: 11px;
  margin-bottom: 4px;
  letter-spacing: 0.4px;
}

#drawerRoot .infoltip.open .tip-body, .pbz-app .infoltip.open .tip-body,
#drawerRoot .infoltip:hover .tip-body, .pbz-app .infoltip:hover .tip-body {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}

#drawerRoot .infoltip .tip-body.below, .pbz-app .infoltip .tip-body.below {
  bottom: auto;
  top: calc(100% + 9px);
}

/* ---------- 解读 ---------- */
#drawerRoot .insight, .pbz-app .insight {
  display: flex;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px dashed var(--line-soft);
}

#drawerRoot .insight:last-child, .pbz-app .insight:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

#drawerRoot .insight .dot, .pbz-app .insight .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  margin-top: 7px;
  flex: 0 0 auto;
  background: var(--blue);
  box-shadow: 0 0 0 3px rgba(120, 182, 237, 0.12);
}

#drawerRoot .insight.good .dot, .pbz-app .insight.good .dot {
  background: var(--green);
  box-shadow: 0 0 0 3px rgba(107, 197, 138, 0.12);
}

#drawerRoot .insight.warn .dot, .pbz-app .insight.warn .dot {
  background: var(--red);
  box-shadow: 0 0 0 3px rgba(226, 118, 118, 0.12);
}

#drawerRoot .insight.hint .dot, .pbz-app .insight.hint .dot {
  background: var(--teal);
  box-shadow: 0 0 0 3px rgba(111, 208, 198, 0.12);
}

#drawerRoot .insight .title, .pbz-app .insight .title {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text);
}

#drawerRoot .insight .detail, .pbz-app .insight .detail {
  font-size: 11.5px;
  color: var(--muted);
  line-height: 1.65;
  margin-top: 1px;
}

/* ---------- 工具栏 ---------- */
.pbz-app .toolbar {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  margin: 10px 0 12px;
}

.pbz-app input[type='search'],
.pbz-app input[type='text'] {
  background: var(--panel-2);
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: var(--radius-sm);
  padding: 7px 12px;
  width: min(100%, 300px);
  font-size: 12px;
  outline: none;
  transition: 0.15s;
}

.pbz-app input[type='search']:focus,
.pbz-app input[type='text']:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(232, 189, 119, 0.1);
}

#drawerRoot .count, .pbz-app .count {
  color: var(--muted);
  font-size: 11.5px;
}

.pbz-app .filters {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}

.pbz-app .filters button {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--muted);
  border-radius: 20px;
  padding: 3px 11px;
  font-size: 11px;
  cursor: pointer;
  transition: 0.15s;
}

.pbz-app .filters button:hover {
  border-color: var(--gold);
  color: var(--gold);
}

.pbz-app .filters button.on {
  background: rgba(232, 189, 119, 0.12);
  border-color: rgba(232, 189, 119, 0.35);
  color: var(--gold);
}

/* ---------- 表格 ---------- */
.pbz-app .table-wrap {
  width: 100%;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  max-height: 72vh;
}

.pbz-app table {
  border-collapse: collapse;
  width: 100%;
  min-width: 760px;
}

.pbz-app th,
.pbz-app td {
  text-align: left;
  padding: 9px 12px;
  border-bottom: 1px solid var(--line-soft);
  vertical-align: top;
}

.pbz-app tbody tr:last-child td {
  border-bottom: 0;
}

.pbz-app tbody tr {
  transition: background 0.12s;
}

.pbz-app tbody tr:hover {
  background: rgba(232, 189, 119, 0.05);
}

.pbz-app th {
  color: var(--muted);
  font-weight: 600;
  font-size: 11px;
  background: #151a24;
  white-space: nowrap;
  position: sticky;
  top: 0;
  z-index: 2;
  letter-spacing: 0.4px;
  border-bottom: 1px solid var(--line);
}

.pbz-app th.sortable {
  cursor: pointer;
  user-select: none;
}

.pbz-app th.sortable:hover {
  color: var(--gold);
}

.pbz-app th .arrow {
  color: var(--gold);
  margin-left: 3px;
  font-size: 9px;
}

.pbz-app td.name {
  color: var(--text);
  min-width: 150px;
  font-weight: 500;
}

.pbz-app td.raw {
  color: #8d9bb0;
  font-size: 11px;
  font-family: var(--mono);
  overflow-wrap: anywhere;
}

.pbz-app tr.clickable {
  cursor: pointer;
}

.pbz-app tr.clickable td:first-child {
  box-shadow: inset 2px 0 0 var(--line);
}

.pbz-app tr.clickable:hover td:first-child {
  box-shadow: inset 2px 0 0 var(--gold);
}

.pbz-app .unknown {
  color: var(--muted);
  font-style: italic;
  font-weight: 400;
}

#drawerRoot .badge, .pbz-app .badge {
  display: inline-block;
  font-size: 10px;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 0 6px;
  color: var(--muted);
  margin-left: 5px;
  white-space: nowrap;
}

/* 任务类型着色 */
.pbz-app .qtype {
  display: inline-block;
  font-size: 10.5px;
  border-radius: 6px;
  padding: 1px 7px;
  white-space: nowrap;
  border: 1px solid transparent;
}

.pbz-app .qtype.Main {
  color: var(--gold);
  background: rgba(232, 189, 119, 0.12);
  border-color: rgba(232, 189, 119, 0.28);
}

.pbz-app .qtype.Branch {
  color: var(--violet);
  background: rgba(180, 140, 232, 0.12);
  border-color: rgba(180, 140, 232, 0.26);
}

.pbz-app .qtype.Simple {
  color: var(--blue);
  background: rgba(120, 182, 237, 0.1);
  border-color: rgba(120, 182, 237, 0.24);
}

.pbz-app .qtype.Collect {
  color: var(--teal);
  background: rgba(111, 208, 198, 0.1);
  border-color: rgba(111, 208, 198, 0.24);
}

.pbz-app .qtype.Tutorial {
  color: #93a1b5;
  background: rgba(147, 161, 181, 0.1);
  border-color: rgba(147, 161, 181, 0.22);
}

/* ---------- 标签 ---------- */
#drawerRoot .chip, .pbz-app .chip {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 20px;
  font-size: 11px;
  margin: 2px 3px 2px 0;
  white-space: nowrap;
  border: 1px solid transparent;
}

#drawerRoot .chip.done, .pbz-app .chip.done {
  background: rgba(107, 197, 138, 0.12);
  color: var(--green);
  border-color: rgba(107, 197, 138, 0.3);
}

#drawerRoot .chip.doing, .pbz-app .chip.doing {
  background: rgba(230, 184, 111, 0.11);
  color: var(--amber);
  border-color: rgba(230, 184, 111, 0.3);
}

#drawerRoot .chip.none, .pbz-app .chip.none {
  background: rgba(132, 145, 165, 0.1);
  color: #93a1b5;
  border-color: rgba(132, 145, 165, 0.22);
}

#drawerRoot .chip.info, .pbz-app .chip.info {
  background: rgba(120, 182, 237, 0.1);
  color: var(--blue);
  border-color: rgba(120, 182, 237, 0.26);
}

#drawerRoot .chip.failed, .pbz-app .chip.failed {
  background: rgba(226, 118, 118, 0.13);
  color: var(--red);
  border-color: rgba(226, 118, 118, 0.32);
}

#drawerRoot .chip.violet, .pbz-app .chip.violet {
  background: rgba(180, 140, 232, 0.12);
  color: var(--violet);
  border-color: rgba(180, 140, 232, 0.28);
}

.pbz-app .qc {
  font-size: 11px;
  padding: 2px 9px;
  border-radius: 6px;
  white-space: nowrap;
  display: inline-block;
}

.pbz-app .qc.started {
  background: rgba(230, 184, 111, 0.13);
  color: var(--amber);
}

.pbz-app .qc.succeded {
  background: rgba(107, 197, 138, 0.13);
  color: var(--green);
}

.pbz-app .qc.failed {
  background: rgba(226, 118, 118, 0.13);
  color: var(--red);
}

/* ---------- 标记 ---------- */
.pbz-app .tag-areas {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
  gap: 8px;
}

.pbz-app .tag-area {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  text-align: left;
  background: var(--panel-2);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  cursor: pointer;
}

.pbz-app .tag-area.selected {
  border-color: rgba(232, 189, 119, 0.55);
  background: rgba(232, 189, 119, 0.08);
}

.pbz-app .tag-area b {
  display: block;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--gold);
  font-weight: 600;
  line-height: 1.3;
}

.pbz-app .tag-area small {
  display: block;
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.3;
}

.pbz-app .tag-detail {
  margin-top: 12px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  padding: 12px;
  background: rgba(255, 255, 255, 0.02);
}

.pbz-app .tag-detail > header {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 8px;
}

.pbz-app .tag-detail > header b {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--gold);
}

.pbz-app .tag-subs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.pbz-app .tag-sub {
  border: 1px solid var(--line);
  background: var(--panel-2);
  border-radius: 999px;
  padding: 2px 10px;
  font-size: 11.5px;
  cursor: pointer;
}

.pbz-app .tag-sub.selected {
  border-color: rgba(232, 189, 119, 0.55);
  color: var(--gold);
}

.pbz-app .tag-sub em {
  font-style: normal;
  margin-left: 6px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.pbz-app .tag-detail .items,
.pbz-app .tag-group .items {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  max-height: 168px;
  overflow-y: auto;
}

.pbz-app .tag-detail .items.lone {
  margin-top: 8px;
}

#drawerRoot .tag, .pbz-app .tag {
  font-family: var(--mono);
  font-size: 10.5px;
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 1px 6px;
  color: #9aa8bd;
  background: var(--panel);
}

/* ---------- 列表（武器 / BOSS / 铃铛） ---------- */
.pbz-app .rows {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.pbz-app .row-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--panel-2);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  padding: 9px 12px;
  transition: 0.15s;
}

.pbz-app .row-item:hover {
  border-color: #36435a;
  transform: translateX(2px);
}

.pbz-app .row-item .name {
  font-size: 12.5px;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.pbz-app .row-item .name-text {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.pbz-app .row-icon {
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  object-fit: contain;
  border-radius: 8px;
  background:
    radial-gradient(16px 16px at 50% 55%, rgba(255, 205, 150, 0.12), transparent 72%),
    rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line-soft);
}

.pbz-app .row-icon.unknown {
  padding: 6px;
}

.pbz-app .row-item .name small {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10.5px;
}

.pbz-app .row-item .right {
  font-size: 11.5px;
  color: var(--muted);
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.pbz-app .level-pill {
  font-family: var(--mono);
  font-size: 10px;
  border: 1px solid rgba(232, 189, 119, 0.3);
  color: var(--gold);
  border-radius: 5px;
  padding: 0 5px;
}

/* ---------- 抽屉 ---------- */
#drawerRoot{color:var(--text);font:14px/1.65 "Segoe UI",system-ui,"Microsoft YaHei",sans-serif}
#drawerRoot .drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(3, 5, 9, 0.68);
  backdrop-filter: blur(3px);
  z-index: 100;
  display: flex;
  justify-content: flex-end;
  animation: fade 0.18s ease;
}

@keyframes fade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

#drawerRoot .drawer {
  width: min(560px, 100%);
  height: 100%;
  overflow-y: auto;
  background: linear-gradient(180deg, #131923, #0e131b);
  border-left: 1px solid var(--line);
  box-shadow: -24px 0 60px rgba(0, 0, 0, 0.5);
  padding: 22px 24px 48px;
  animation: slide-in 0.24s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes slide-in {
  from {
    transform: translateX(26px);
    opacity: 0;
  }
  to {
    transform: none;
    opacity: 1;
  }
}

#drawerRoot .drawer header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 4px;
}

#drawerRoot .drawer h3 {
  font-size: 18px;
  color: var(--gold);
  letter-spacing: 0.5px;
}

#drawerRoot .drawer .sub {
  color: var(--muted);
  font-size: 11px;
  font-family: var(--mono);
  overflow-wrap: anywhere;
  margin-top: 2px;
}

#drawerRoot .drawer section {
  margin-top: 20px;
}

#drawerRoot .drawer section > h4 {
  font-size: 12px;
  color: var(--muted);
  margin: 0 0 9px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  letter-spacing: 0.4px;
}

#drawerRoot .branch-row, .pbz-app .branch-row {
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  padding: 9px 12px;
  margin-bottom: 7px;
  background: var(--panel-2);
}

#drawerRoot .branch-row .line1, .pbz-app .branch-row .line1 {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

#drawerRoot .branch-row .line2, .pbz-app .branch-row .line2 {
  color: var(--muted);
  font-size: 11px;
  margin-top: 5px;
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  font-family: var(--mono);
}

#drawerRoot .task-dots, .pbz-app .task-dots {
  display: inline-flex;
  gap: 3px;
}

#drawerRoot .task-dots i, .pbz-app .task-dots i {
  width: 7px;
  height: 7px;
  border-radius: 2px;
  background: var(--panel-3);
  border: 1px solid var(--line);
  display: block;
}

#drawerRoot .task-dots i.on, .pbz-app .task-dots i.on {
  background: var(--green);
  border-color: var(--green);
}

.pbz-app .next-step {
  background: rgba(111, 208, 198, 0.06);
  border: 1px solid rgba(111, 208, 198, 0.2);
  border-radius: var(--radius-sm);
  padding: 11px 13px;
  font-size: 12px;
  color: #b9c5d6;
  line-height: 1.7;
}

/* ---------- 折叠 ---------- */
.pbz-app details {
  margin: 10px 0;
}

.pbz-app summary {
  cursor: pointer;
  color: var(--muted);
  font-size: 12.5px;
  padding: 5px 0;
  transition: color 0.15s;
}

.pbz-app summary:hover {
  color: var(--gold);
}

.pbz-app pre {
  background: #0b0f16;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 11px;
  font-size: 11px;
  overflow: auto;
  max-height: 420px;
  color: #9aa8bd;
  font-family: var(--mono);
  margin: 0;
}

/* ---------- 指南 ---------- */
.pbz-app .guide h3 {
  font-size: 13.5px;
  color: var(--gold);
  margin: 20px 0 7px;
  letter-spacing: 0.4px;
}

.pbz-app .guide h3:first-child {
  margin-top: 0;
}

.pbz-app .guide p,
.pbz-app .guide li {
  font-size: 12.5px;
  color: #b3c0d1;
  line-height: 1.8;
}

.pbz-app .guide ul,
.pbz-app .guide ol {
  padding-left: 19px;
  margin: 7px 0;
}

.pbz-app .guide code {
  font-family: var(--mono);
  font-size: 11.5px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 1px 5px;
  overflow-wrap: anywhere;
  color: var(--teal);
}

.pbz-app .guide .path {
  display: block;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--teal);
  background: rgba(111, 208, 198, 0.06);
  border: 1px solid rgba(111, 208, 198, 0.18);
  border-radius: 8px;
  padding: 9px 11px;
  margin: 8px 0 11px;
  overflow-wrap: anywhere;
}

#drawerRoot .legend, .pbz-app .legend {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
}

#drawerRoot .legend div, .pbz-app .legend div {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 12px;
  color: #b3c0d1;
}

/* ---------- 页脚 ---------- */
#drawerRoot .foot, .pbz-app .foot {
  color: #5f6c7e;
  font-size: 10.5px;
  margin-top: 24px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  line-height: 1.8;
}

/* ---------- 错误 ---------- */
.pbz-app .error-panel {
  border: 1px solid rgba(226, 118, 118, 0.3);
  background: rgba(226, 118, 118, 0.06);
  border-radius: var(--radius);
  padding: 20px 22px;
}

.pbz-app .error-panel h2 {
  color: var(--red);
  font-size: 15px;
  margin-bottom: 8px;
}

.pbz-app .error-panel p {
  color: #cdb4b4;
  font-size: 12.5px;
  margin: 6px 0;
}

.pbz-app .error-panel .fix {
  color: var(--teal);
  font-size: 12.5px;
  border-left: 2px solid rgba(111, 208, 198, 0.5);
  padding-left: 11px;
  margin-top: 11px;
}

.pbz-app .error-panel ol {
  color: #b3c0d1;
  font-size: 12.5px;
  padding-left: 20px;
  line-height: 1.9;
}

.pbz-app .loading-block {
  display: grid;
  place-items: center;
  min-height: 200px;
  color: var(--muted);
  gap: 12px;
}

.pbz-app .spinner {
  width: 26px;
  height: 26px;
  border: 2px solid var(--panel-3);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ============================================================
   战绩页（B 站《影之刃零战绩》版式）
   ============================================================ */
.pbz-app .record {
  --rec-accent: #e0622f;
  --rec-accent-soft: #ffb27a;
  --rec-gold: #d8a441;
  --rec-card: rgba(255, 255, 255, 0.028);
  --rec-line: rgba(255, 255, 255, 0.07);
}

.pbz-app .rec-loading {
  display: grid;
  place-items: center;
  gap: 12px;
  min-height: 240px;
  color: var(--muted);
}

/* 顶部指标条 */
.pbz-app .rec-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 18px;
  background: linear-gradient(180deg, rgba(24, 22, 26, 0.9), rgba(14, 15, 20, 0.9));
}

.pbz-app .rec-stat {
  padding: 16px 20px;
  border-right: 1px solid var(--line);
  position: relative;
}

.pbz-app .rec-stat:last-child {
  border-right: 0;
}

.pbz-app .rec-stat-label {
  font-size: 12px;
  color: var(--muted);
}

.pbz-app .rec-stat-value {
  font-size: 32px;
  line-height: 1.25;
  font-weight: 600;
  letter-spacing: 0.5px;
  background: linear-gradient(92deg, var(--rec-accent-soft), var(--rec-accent) 70%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-variant-numeric: tabular-nums;
}

.pbz-app .rec-stat-foot {
  font-size: 10.5px;
  color: #5f6c7e;
}

/* 页签行 */
.pbz-app .rec-tabs {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.pbz-app .rec-tabs .segment {
  margin-bottom: 0;
}

.pbz-app .rec-tabs-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.pbz-app .rec-meta {
  font-size: 11.5px;
  color: var(--muted);
  font-family: var(--mono);
}

.pbz-app .rec-toast {
  font-size: 12px;
  color: var(--teal);
  background: rgba(111, 208, 198, 0.08);
  border: 1px solid rgba(111, 208, 198, 0.24);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  margin-bottom: 12px;
}

.pbz-app .rec-toast.err {
  color: var(--red);
  background: rgba(226, 118, 118, 0.08);
  border-color: rgba(226, 118, 118, 0.3);
}

.pbz-app .rec-toast.busy {
  color: var(--gold);
  background: rgba(232, 189, 119, 0.07);
  border-color: rgba(232, 189, 119, 0.25);
}

/* 尝试最多 */
.pbz-app .rec-most {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 18px;
  border-radius: var(--radius);
  border: 1px solid rgba(224, 98, 47, 0.22);
  background: linear-gradient(90deg, rgba(224, 98, 47, 0.12), rgba(224, 98, 47, 0.02));
  margin-bottom: 18px;
}

.pbz-app .rec-most-label {
  font-size: 11.5px;
  color: #d08a63;
  letter-spacing: 1px;
}

.pbz-app .rec-most-name {
  font-size: 15px;
  color: var(--text);
  font-weight: 600;
}

.pbz-app .rec-most-count {
  margin-left: auto;
  font-size: 12px;
  color: var(--muted);
}

.pbz-app .rec-most-count b {
  font-size: 26px;
  color: var(--rec-accent);
  font-variant-numeric: tabular-nums;
  margin-right: 4px;
}

/* 区段头 */
.pbz-app .rec-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin: 4px 0 12px;
}

.pbz-app .rec-section-head h2 {
  font-size: 17px;
  color: var(--text);
  letter-spacing: 1px;
  display: flex;
  align-items: baseline;
  gap: 9px;
}

.pbz-app .rec-section-head h2 small {
  font-size: 11.5px;
  color: var(--muted);
  font-weight: 400;
}

.pbz-app .rec-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.pbz-app .rec-sort {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 11.5px;
  color: var(--muted);
  white-space: nowrap;
  flex: 0 0 auto;
}

.pbz-app .rec-sort select {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--text);
  padding: 5px 9px;
  font-size: 12px;
  outline: none;
}

/* BOSS 卡片 */
.pbz-app .boss-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(186px, 1fr));
  gap: 12px;
}

.pbz-app .boss-card {
  background: var(--rec-card);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  overflow: hidden;
  transition: 0.18s;
  display: flex;
  flex-direction: column;
}

.pbz-app .boss-card:hover {
  border-color: #3a4658;
  transform: translateY(-2px);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.35);
}

.pbz-app .boss-card.pending {
  opacity: 0.55;
}

.pbz-app .boss-art {
  position: relative;
  height: 168px;
  display: grid;
  place-items: center;
  background:
    radial-gradient(120px 90px at 50% 58%, rgba(255, 190, 140, 0.09), transparent 70%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent);
}

.pbz-app .boss-art img {
  width: 152px;
  height: 152px;
  object-fit: contain;
  filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.6));
}

.pbz-app .boss-art-fallback {
  color: #4c5666;
  font-family: var(--mono);
  font-size: 12px;
}

.pbz-app .boss-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  border: 1px solid rgba(216, 164, 65, 0.5);
  background: rgba(216, 164, 65, 0.12);
  color: var(--rec-gold);
  border-radius: 6px;
  padding: 2px 8px;
  font-size: 11px;
  white-space: nowrap;
}

.pbz-app .boss-counts {
  display: flex;
  gap: 16px;
  justify-content: center;
  padding: 4px 12px 8px;
  font-size: 11.5px;
  color: var(--muted);
}

.pbz-app .boss-counts b {
  font-size: 15px;
  color: var(--rec-accent);
  font-variant-numeric: tabular-nums;
  margin-left: 3px;
}

.pbz-app .boss-name {
  font-size: 13px;
  color: var(--text);
  text-align: center;
  padding: 0 12px 10px;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pbz-app .boss-time {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--rec-line);
  padding: 8px 13px;
  font-size: 11.5px;
  color: var(--muted);
}

.pbz-app .boss-time b {
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

/* 装备 */
.pbz-app .equip-groups {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.pbz-app .equip-group h3 {
  font-size: 13px;
  color: var(--gold);
  margin: 0 0 10px;
  letter-spacing: 0.5px;
}

.pbz-app .equip-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 11px;
}

.pbz-app .equip-grid.six {
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
}

.pbz-app .equip-slot {
  background: var(--rec-card);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  overflow: hidden;
  transition: 0.18s;
}

.pbz-app .equip-slot:hover {
  border-color: #3a4658;
  transform: translateY(-2px);
}

.pbz-app .equip-slot.empty {
  opacity: 0.45;
}

.pbz-app .equip-art {
  position: relative;
  height: 132px;
  display: grid;
  place-items: center;
  background:
    radial-gradient(90px 70px at 50% 55%, rgba(255, 205, 150, 0.08), transparent 72%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent);
}

.pbz-app .equip-art img {
  width: 118px;
  height: 118px;
  object-fit: contain;
  filter: drop-shadow(0 8px 14px rgba(0, 0, 0, 0.55));
}

.pbz-app .equip-plus {
  font-size: 30px;
  color: #39424f;
  line-height: 1;
}

.pbz-app .equip-fallback {
  color: #4c5666;
  font-size: 22px;
}

.pbz-app .equip-level {
  position: absolute;
  right: 9px;
  bottom: 9px;
  border: 1px solid rgba(216, 164, 65, 0.45);
  background: rgba(20, 16, 10, 0.85);
  color: var(--rec-gold);
  border-radius: 6px;
  padding: 1px 7px;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.pbz-app .equip-label {
  position: absolute;
  left: 9px;
  top: 9px;
  border: 1px solid var(--line);
  background: rgba(12, 14, 20, 0.85);
  color: var(--muted);
  border-radius: 5px;
  padding: 1px 6px;
  font-size: 10.5px;
}

.pbz-app .equip-name {
  text-align: center;
  font-size: 12.5px;
  color: var(--text);
  padding: 9px 10px 11px;
  border-top: 1px solid var(--rec-line);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 760px) {
.pbz-app .rec-stat {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

.pbz-app .rec-stat-value {
    font-size: 26px;
  }

}

/* ---------- 战绩图预览 ---------- */
#drawerRoot .poster-backdrop {
  position: fixed;
  inset: 0;
  z-index: 120;
  background: rgba(3, 5, 9, 0.8);
  backdrop-filter: blur(4px);
  display: grid;
  place-items: center;
  padding: 24px;
  animation: fade 0.18s ease;
}

#drawerRoot .poster-modal {
  width: min(100%, 720px);
  max-height: 100%;
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, #131923, #0e131b);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.6);
  overflow: hidden;
}

#drawerRoot .poster-modal header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}

#drawerRoot .poster-modal h3 {
  font-size: 14px;
  color: var(--gold);
}

#drawerRoot .poster-modal .sub {
  color: var(--muted);
  font-size: 11px;
  font-family: var(--mono);
}

#drawerRoot .poster-canvas-wrap {
  overflow: auto;
  padding: 14px;
  background: #08090d;
}

#drawerRoot .poster-canvas-wrap canvas {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

@media (max-width: 760px) {
.pbz-app .app {
    padding: 0 14px 34px;
  }

.pbz-app .app-header {
    padding: 14px 0 10px;
  }

.pbz-app .app-header h1 {
    font-size: 17px;
  }

.pbz-app .panel {
    padding: 14px 12px;
  }

#drawerRoot .drawer {
    width: 100%;
  }

.pbz-app .segment button {
    padding: 6px 10px;
    font-size: 12px;
  }

}


/* ============================================================
   浅色主题：覆盖组件变量，保证双主题可读
   ============================================================ */
[data-theme="light"] .pbz-app,[data-theme="light"] #drawerRoot{
  --bg:#f4f6fb;--bg-2:#eceff6;--panel:#ffffff;--panel-2:#f3f6fb;--panel-3:#e7edf6;
  --line:#d7dfea;--line-soft:#e6ebf2;--text:#202633;--text-2:#465366;--muted:#718099;
  --gold:#9a6a1e;--gold-2:#b98535;--gold-deep:#c9a35e;
  --green:#0f7a47;--amber:#a76a12;--red:#c0392b;--blue:#1d5fa8;--violet:#7c4bb8;--teal:#0d8a80;
  --shadow:0 14px 34px -14px rgba(30,41,59,.2);--shadow-sm:0 4px 14px -6px rgba(30,41,59,.18);
}
[data-theme="light"] .pbz-app{background:radial-gradient(1200px 600px at 12% -10%,rgba(154,106,30,.06),transparent 60%),linear-gradient(180deg,#f8fafd 0,var(--bg) 45%)}
[data-theme="light"] .pbz-app .app-header{background:linear-gradient(180deg,rgba(248,250,253,.96) 60%,rgba(248,250,253,0))}
[data-theme="light"] .pbz-app h1{background:linear-gradient(92deg,#5c3d0e 0%,var(--gold) 45%,#a9781f 100%);-webkit-background-clip:text;background-clip:text}
[data-theme="light"] .pbz-app .brand-mark{color:#fff}
[data-theme="light"] .pbz-app .panel{background:linear-gradient(180deg,rgba(255,255,255,.97),rgba(248,250,253,.97))}
[data-theme="light"] .pbz-app .rec-stats{background:linear-gradient(180deg,#f6f8fb,#eef2f8)}
[data-theme="light"] .pbz-app th{background:#eef2f8}
[data-theme="light"] #drawerRoot .status .hash, .pbz-app .status .hash {color:#8894a6}
[data-theme="light"] #drawerRoot .btn.primary, .pbz-app .btn.primary {color:#fff}
[data-theme="light"] .pbz-app .rec-stat-value{background:linear-gradient(90deg,#c2410c,#e0622f)}
[data-theme="light"] .pbz-app .boss-counts b,[data-theme="light"] .pbz-app .rec-most-count b{color:#c2410c;background:none}

/* ── 移动端 ── */
@media(max-width:650px){
  .pbz-app .app{padding:0 14px 28px}
  .pbz-app #drop{min-height:88px;padding:14px;font-size:12px}
  .pbz-app .panel{padding:14px 12px}
  .pbz-app .statusbar{display:block}
  .pbz-app .statusbar .actions{margin-top:8px}
  .pbz-app .rec-stats{grid-template-columns:repeat(2,1fr)}
  .pbz-app .boss-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .pbz-app .equip-grid.six{grid-template-columns:repeat(2,minmax(0,1fr))}
}
