.save-editor-page {
  position: fixed;
  inset: 0;
  z-index: 8000;
  display: none;
  overflow: hidden;
  background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 100%);
  color: #e2e8f0;
}
.save-editor-page.is-open { display: block; }
body.save-editor-open .universal-modal { z-index: 13050; }

.save-editor-shell {
  display: flex;
  height: 100%;
  width: 100%;
  overflow: hidden;
}

.save-editor-page .sidebar-overlay {
  display: none;
}

.save-editor-nav .nav-item {
  width: 100%;
}

.save-editor-nav-group {
  font-size: 11px;
  color: #64748b;
  margin: 16px 16px 8px;
  letter-spacing: 0.04em;
  white-space: nowrap;
  overflow: hidden;
  opacity: 0;
}

.save-editor-page .sidebar.expanded .save-editor-nav-group {
  opacity: 1;
}

.save-editor-page .header-title {
  margin: 0;
}

.save-editor-page-body {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 24px;
  overflow: hidden;
}

.save-editor-page-body.is-hub {
  padding: 0;
}

.save-editor-main {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding-bottom: 96px;
}

.save-editor-page-body.is-hub .save-editor-main {
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding-bottom: 0;
}

.save-editor-fabs {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 8100;
  display: none;
  flex-direction: column;
  align-items: flex-end;
  gap: 14px;
}

.save-editor-page.is-open .save-editor-fabs {
  display: flex;
}

.save-editor-fab {
  width: 56px;
  height: 56px;
  border: 0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #fff;
  font-size: 22px;
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.28);
  position: relative;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.save-editor-fab:hover {
  transform: scale(1.08);
}

.save-editor-fab-back {
  background: linear-gradient(135deg, #64748b, #475569);
}

.save-editor-fab-save {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  box-shadow: 0 6px 25px rgba(37, 99, 235, 0.35);
}

.save-editor-fab-dot {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #fbbf24;
  box-shadow: 0 0 0 2px rgba(15, 23, 42, 0.8);
}
.save-editor-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}
.save-editor-chip {
  background: rgba(251, 191, 36, .12);
  border: 1px solid rgba(251, 191, 36, .22);
  color: #fde68a;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 12px;
}
.save-editor-card {
  background: rgba(30, 41, 59, .72);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 14px;
  padding: 18px;
  margin-bottom: 16px;
}
.save-editor-card h3 { margin: 0 0 6px; font-size: 16px; }
.save-editor-note { font-size: 13px; color: #94a3b8; margin: 0 0 14px; line-height: 1.5; }
.save-editor-fields {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}
.save-editor-field label {
  display: block;
  font-size: 12px;
  color: #94a3b8;
  margin-bottom: 6px;
}
.save-editor-field input,
.save-editor-field select {
  width: 100%;
  background: rgba(15,23,42,.8);
  border: 1px solid rgba(255,255,255,.1);
  color: #e2e8f0;
  border-radius: 8px;
  padding: 10px 12px;
}
.save-editor-field input.dirty { border-color: #f59e0b; }
.save-editor-field.is-missing input { opacity: .5; }
.save-editor-field-cap { font-size: 11px; color: #64748b; margin-top: 4px; }
.save-editor-actions { display: flex; gap: 10px; align-items: center; margin-top: 16px; flex-wrap: wrap; }
.save-editor-bag table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.save-editor-bag th,
.save-editor-bag td {
  border-bottom: 1px solid rgba(255,255,255,.06);
  padding: 8px 6px;
  text-align: left;
}
.save-editor-bag th { color: #94a3b8; font-weight: 600; }
.save-editor-bag input {
  width: 100%;
  background: rgba(15,23,42,.8);
  border: 1px solid rgba(255,255,255,.1);
  color: #e2e8f0;
  border-radius: 8px;
  padding: 10px 12px;
}
.save-editor-grad-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.save-editor-grad-table th,
.save-editor-grad-table td {
  padding: 8px 6px;
  border-bottom: 1px solid rgba(255,255,255,.06);
  text-align: left;
}
.save-editor-grad-table .to { color: #86efac; }
/* 背包 hub：对齐造梦4一键日常 inventory 布局 */
.save-editor-page .se-inventory-hub.inventory-container {
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: 100%;
  margin: 0;
}

.save-editor-page .se-inventory-hub .inventory-header {
  padding: 24px 24px 0;
  background: rgba(30, 41, 59, 0.6);
}

.save-editor-page .se-inventory-hub .inventory-title {
  margin: 0;
  font-size: 18px;
  color: #e2e8f0;
}

.save-editor-page .se-inventory-hub .inventory-tabs {
  margin: 24px 24px 0;
  padding: 0;
}

.save-editor-page .se-inventory-hub .sub-tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  padding: 12px 24px;
  margin: 0;
  background: rgba(30, 41, 59, 0.4);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.save-editor-page .se-inventory-hub .sub-tab-btn {
  padding: 10px 16px;
  background: rgba(30, 41, 59, 0.3);
  border: 1px solid rgba(148, 163, 184, 0.1);
  border-radius: 10px;
  color: #94a3b8;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.save-editor-page .se-inventory-hub .sub-tab-btn:hover {
  background: rgba(59, 130, 246, 0.1);
  border-color: rgba(59, 130, 246, 0.3);
  color: #60a5fa;
}

.save-editor-page .se-inventory-hub .sub-tab-btn.active {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  border-color: #3b82f6;
  color: #fff;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
}

.save-editor-page .se-inventory-hub .tab-content-container {
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.save-editor-page .se-inventory-hub .tab-content {
  padding: 24px;
  overflow: auto;
  max-height: none;
}

.save-editor-page .se-inventory-hub .empty-inventory {
  min-height: 280px;
}

.save-editor-page .se-bag-toolbar {
  margin-bottom: 12px;
  padding: 14px 16px;
}

.save-editor-page .se-bag-grid.items-grid {
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)) !important;
  gap: 16px;
}

.save-editor-page .item-icon.is-locked {
  filter: grayscale(1) brightness(0.45);
  opacity: 0.9;
}

.save-editor-page .item-card.se-skill-card.is-locked {
  opacity: 0.78;
}

.save-editor-page .se-skill-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: #e2e8f0;
  background: rgba(15, 23, 42, 0.8);
}

.save-editor-page .item-card-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 12px;
}

.save-editor-page .item-card-quality-border {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  border-radius: 16px 16px 0 0;
}

.save-editor-add {
  display: flex;
  gap: 8px;
  align-items: center;
  margin: 12px 0;
  flex-wrap: wrap;
}
.save-editor-add select {
  flex: 1;
  min-width: 180px;
  background: rgba(15,23,42,.8);
  border: 1px solid rgba(255,255,255,.1);
  color: #e2e8f0;
  border-radius: 8px;
  padding: 10px 12px;
}
.save-editor-pick-q {
  width: 100%;
  background: rgba(15,23,42,.8);
  border: 1px solid rgba(255,255,255,.1);
  color: #e2e8f0;
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 10px;
}
.save-editor-pick-list {
  max-height: 360px;
  overflow: auto;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 10px;
}
.save-editor-pick-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  width: 100%;
  text-align: left;
  background: transparent;
  border: 0;
  border-bottom: 1px solid rgba(255,255,255,.06);
  color: #e2e8f0;
  padding: 10px 12px;
  cursor: pointer;
  content-visibility: auto;
  contain-intrinsic-size: auto 72px;
}
.se-pick-more {
  padding: 10px 12px;
  margin: 0;
  text-align: center;
}
.se-pick-left { flex: 0 0 auto; }
.se-pick-icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  object-fit: contain;
  background: rgba(15,23,42,.6);
}
.se-pick-icon-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  border: 2px solid var(--se-quality, #64748b);
  background: rgba(15,23,42,.6);
  font-weight: 700;
  color: #e2e8f0;
}
.se-pick-body { flex: 1; min-width: 0; }
.se-pick-title { font-weight: 600; margin-bottom: 2px; }
.se-pick-meta { color: #94a3b8; font-size: 12px; }
.se-pick-desc { color: #cbd5e1; font-size: 12px; margin-top: 4px; line-height: 1.45; }
.save-editor-pick-row:hover,
.save-editor-pick-row.is-hi {
  background: rgba(245, 158, 11, .14);
}
.save-editor-pick-id { color: #94a3b8; font-size: 12px; }
.save-editor-issue {
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 10px;
  background: rgba(15,23,42,.45);
}
.save-editor-issue b { display: block; margin-bottom: 4px; }
.save-editor-issue span { display: block; font-size: 13px; color: #94a3b8; line-height: 1.5; }
.save-editor-issue.danger { border-color: rgba(239, 68, 68, .45); }
.save-editor-issue.warn { border-color: rgba(251, 191, 36, .4); }
.save-editor-issue.info { border-color: rgba(148, 163, 184, .25); }
.save-editor-diff td.num { font-family: ui-monospace, Consolas, monospace; font-size: 12px; }
.save-editor-diff tr.diff-added td { color: #86efac; }
.save-editor-diff tr.diff-removed td { color: #fca5a5; }
.save-editor-plain {
  white-space: pre-wrap;
  font-size: 13px;
  color: #cbd5e1;
  margin: 0;
}
.save-editor-table-q {
  width: 180px;
  background: rgba(15,23,42,.8);
  border: 1px solid rgba(255,255,255,.1);
  color: #e2e8f0;
  border-radius: 8px;
  padding: 8px 10px;
}
.save-editor-row-acts {
  white-space: nowrap;
}
.save-editor-page .item-actions .action-btn,
.save-editor-row-acts .action-btn {
  flex: 1 1 auto;
  min-width: 72px;
  padding: 8px 12px;
}
.save-editor-bag-table { width: 100%; border-collapse: collapse; }
.save-editor-bag-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}
.save-editor-bag-tabs button {
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.08);
  color: #cbd5e1;
  border-radius: 999px;
  padding: 6px 12px;
  cursor: pointer;
}
.save-editor-bag-tabs button.active {
  background: rgba(245, 158, 11, .18);
  border-color: rgba(251, 191, 36, .35);
  color: #fff;
}
.save-editor-busy {
  display: none;
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, .55);
  align-items: center;
  justify-content: center;
  z-index: 2;
  color: #fde68a;
}
.save-editor-page.is-busy .save-editor-busy { display: flex; }
.save-editor-game.is-ready {
  border-color: rgba(251, 191, 36, .45);
  background: rgba(245, 158, 11, .12);
}
.save-editor-badge {
  display: inline-block;
  margin-top: 6px;
  font-size: 11px;
  color: #fbbf24;
}
.save-editor-badge.is-wait { color: #64748b; }

@media (max-width: 768px) {
  .save-editor-page .save-editor-sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: 280px;
    transform: translateX(-100%);
    z-index: 8200;
    transition: transform 0.3s ease;
  }

  .save-editor-page .save-editor-sidebar.expanded {
    transform: translateX(0);
    width: 280px;
  }

  .save-editor-page .save-editor-sidebar .logo-text,
  .save-editor-page .save-editor-sidebar.expanded .nav-text {
    opacity: 1;
  }

  .save-editor-page .sidebar-toggle {
    display: none;
  }

  .save-editor-page .sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 8190;
    display: none;
  }

  .save-editor-page .save-editor-sidebar.expanded + .sidebar-overlay {
    display: block;
  }

  .save-editor-page-body {
    padding: 16px;
  }

  .save-editor-fabs {
    right: 16px;
    bottom: 16px;
  }

  .save-editor-fab {
    width: 50px;
    height: 50px;
    font-size: 20px;
  }

  .save-editor-page .se-inventory-hub .inventory-header {
    padding: 16px 16px 0;
  }

  .save-editor-page .se-inventory-hub .inventory-tabs {
    margin: 16px 16px 0;
    gap: 4px;
  }

  .save-editor-page .se-inventory-hub .sub-tabs {
    padding: 10px 16px;
    gap: 4px;
    overflow-x: auto;
    flex-wrap: nowrap;
  }

  .save-editor-page .se-inventory-hub .tab-content {
    padding: 16px;
  }

  .save-editor-page .se-inventory-hub .tab-btn {
    padding: 10px 16px;
    font-size: 13px;
  }

  .save-editor-page .se-bag-grid.items-grid {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 768px) {
  .save-editor-page .sidebar.expanded .save-editor-nav-group {
    opacity: 1;
  }
}

@media (max-width: 480px) {
  .save-editor-page .se-inventory-hub .tab-btn {
    padding: 8px 12px;
    font-size: 12px;
    flex: 1;
    justify-content: center;
  }

  .save-editor-page .se-inventory-hub .sub-tab-btn {
    padding: 8px 12px;
    font-size: 12px;
    flex-shrink: 0;
  }

  .save-editor-page .item-actions {
    flex-direction: column;
  }

  .save-editor-page .item-actions .action-btn {
    width: 100%;
  }
}
