/* ========== 咖喱小镇 全局样式 ========== */
:root {
  --color-primary: #E8A04F;
  --color-primary-dark: #D8943F;
  --color-secondary: #5BA89A;
  --color-danger: #C75B5B;
  --color-bg: #F5EEDC;
  --color-card: #EFE3CB;
  --color-card-alt: #F9F4E8;
  --color-text: #4A3B2A;
  --color-text-light: #8B7C6A;
  --color-border: #DCC9A0;
  --color-white: #FFFFFF;
  --season-spring: #A8D5A2;
  --season-summer: #7EC8E3;
  --season-autumn: #E8A04F;
  --season-winter: #D6E4E8;
  --quality-1: #FFFFFF;
  --quality-2: #5BA85B;
  --quality-3: #4A90D9;
  --quality-4: #9B59B6;
  --quality-5: #E8A04F;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: "Noto Sans SC", "Microsoft YaHei", sans-serif;
  background: var(--color-bg);
  color: var(--color-text);
  font-size: 14px;
  line-height: 1.6;
}

a { color: var(--color-primary); text-decoration: none; }
a:hover { color: var(--color-primary-dark); }

/* ========== 顶部状态栏 ========== */
.top-bar {
  position: fixed; top: 0; left: 0; right: 0;
  height: 56px;
  background: rgba(74, 59, 42, 0.95);
  color: var(--color-white);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 24px;
  z-index: 1000;
  backdrop-filter: blur(10px);
}

.top-bar-left { display: flex; align-items: center; gap: 24px; }
.top-bar-right { display: flex; align-items: center; gap: 16px; }

.status-item { display: flex; align-items: center; gap: 6px; font-size: 14px; }
.status-item .label { color: rgba(255,255,255,0.6); }
.status-item .value { font-weight: bold; }
.status-item .spirit-icon { color: var(--color-secondary); }

.spirit-forecast {
  position: relative; cursor: pointer;
  display: flex; align-items: center;
}
.spirit-forecast .tooltip {
  display: none; position: absolute; top: 46px; left: 0;
  background: var(--color-white); color: var(--color-text);
  padding: 12px 16px; border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  white-space: nowrap; z-index: 1001;
  font-size: 12px; min-width: 220px;
  border: 1px solid var(--color-border);
}
.spirit-forecast:hover .tooltip { display: block; }
.spirit-forecast .tooltip-title { font-weight: bold; margin-bottom: 6px; color: var(--color-primary); }
.spirit-forecast .tooltip-countdown { margin-bottom: 6px; }
.spirit-forecast .tooltip-countdown .time { font-weight: bold; color: var(--color-secondary); }
.spirit-forecast .tooltip-trend { display: flex; gap: 8px; align-items: center; }

.weather-forecast {
  position: relative; cursor: pointer;
  display: flex; align-items: center; gap: 4px;
}
.weather-forecast .tooltip {
  display: none; position: absolute; top: 46px; left: 0;
  background: var(--color-white); color: var(--color-text);
  padding: 12px 16px; border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  white-space: nowrap; z-index: 1001;
  font-size: 12px; min-width: 200px;
  border: 1px solid var(--color-border);
}
.weather-forecast:hover .tooltip { display: block; }
.weather-forecast .tooltip-title { font-weight: bold; margin-bottom: 6px; color: var(--color-primary); }
.weather-forecast .tooltip-trend { display: flex; gap: 12px; align-items: center; margin-top: 6px; }

/* 通用 hover tooltip */
.status-item-tooltip { position: relative; cursor: pointer; }
.status-item-tooltip .tooltip {
  display: none; position: absolute; top: 40px; right: 0;
  background: var(--color-white); color: var(--color-text);
  padding: 10px 14px; border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  white-space: nowrap; z-index: 1001;
  font-size: 12px; min-width: 120px;
  border: 1px solid var(--color-border);
}
.status-item-tooltip:hover .tooltip { display: block; }
.status-item-tooltip .tooltip-title { font-weight: bold; margin-bottom: 4px; color: var(--color-primary); }
.status-item-tooltip .tooltip .time { font-weight: bold; color: var(--color-secondary); }

/* ========== 导航栏 ========== */
.nav-bar {
  position: fixed; top: 56px; left: 0; right: 0;
  height: 48px;
  background: var(--color-card);
  display: flex; align-items: center; justify-content: center;
  gap: 0;
  z-index: 999;
  border-bottom: 1px solid var(--color-border);
}
.nav-item {
  padding: 12px 32px;
  color: var(--color-text); font-weight: 500;
  cursor: pointer; transition: all 0.2s;
  border-bottom: 3px solid transparent;
}
.nav-item:hover { background: rgba(232, 160, 79, 0.1); }
.nav-item.active {
  color: var(--color-primary); border-bottom-color: var(--color-primary);
  font-weight: bold;
}
/* 导航栏未读消息徽章 + 闪烁 */
.nav-badge {
  display: inline-block;
  background: var(--color-danger); color: white;
  border-radius: 10px; font-size: 11px; padding: 1px 6px;
  margin-left: 4px; min-width: 18px; text-align: center;
  vertical-align: middle; font-weight: bold;
}
.nav-item.has-unread {
  animation: navFlash 1.2s ease-in-out infinite;
}
.nav-item.flash-strong {
  animation: navFlashStrong 0.5s ease-in-out 6;
}
@keyframes navFlash {
  0%, 100% { background: transparent; }
  50% { background: rgba(199, 91, 91, 0.15); }
}
@keyframes navFlashStrong {
  0%, 100% { background: transparent; }
  50% { background: rgba(199, 91, 91, 0.35); }
}

/* ========== 主内容区 ========== */
.main-content {
  margin-top: 104px;
  padding: 24px;
  min-height: calc(100vh - 104px - 60px);
}

/* ========== 底部版权 ========== */
.footer {
  text-align: center; padding: 20px;
  color: var(--color-text-light); font-size: 12px;
  border-top: 1px solid var(--color-border);
}

/* ========== 卡片 ========== */
.card {
  background: var(--color-white);
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  margin-bottom: 16px;
}
.card-title {
  font-size: 18px; font-weight: bold; margin-bottom: 16px;
  padding-bottom: 12px; border-bottom: 2px solid var(--color-card);
}

/* ========== 按钮 ========== */
.btn {
  display: inline-block; padding: 8px 24px;
  border: none; border-radius: 6px; cursor: pointer;
  font-size: 14px; font-family: inherit;
  transition: all 0.2s; text-align: center;
}
.btn-primary { background: var(--color-primary); color: white; }
.btn-primary:hover { background: var(--color-primary-dark); }
.btn-secondary { background: var(--color-secondary); color: white; }
.btn-danger { background: var(--color-danger); color: white; }
.btn-outline { background: transparent; border: 1px solid var(--color-primary); color: var(--color-primary); }
.btn-gray { background: #ccc; color: #666; }
.btn-sm { padding: 4px 12px; font-size: 12px; }
.btn-lg { padding: 12px 36px; font-size: 16px; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ========== 表单 ========== */
.form-group { margin-bottom: 16px; }
.form-group label { display: block; margin-bottom: 6px; font-weight: bold; }
.form-group input, .form-group select, .form-group textarea {
  width: 100%; padding: 10px;
  border: 1px solid var(--color-border); border-radius: 6px;
  font-size: 14px; font-family: inherit;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  outline: none; border-color: var(--color-primary);
}

/* ========== 列表 ========== */
.list-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--color-card);
}
.list-item:hover { background: var(--color-card-alt); }
.list-item:last-child { border-bottom: none; }

/* ========== 弹窗 ========== */
.modal-overlay {
  display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.5); z-index: 2000;
  justify-content: center; align-items: center;
}
.modal-overlay.show { display: flex; }
.modal {
  background: var(--color-white); border-radius: 12px;
  padding: 24px; min-width: 400px; max-width: 800px;
  max-height: 80vh; overflow-y: auto;
  box-shadow: 0 8px 32px rgba(0,0,0,0.2);
}
.modal.modal-lg {
  width: 90vw; max-width: 900px; min-height: 520px;
  max-height: 85vh; overflow: hidden;
  display: flex; flex-direction: column;
}
.modal.modal-lg .modal-body {
  flex: 1; overflow-y: auto; padding-right: 4px;
}
.modal-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 16px; padding-bottom: 12px;
  border-bottom: 2px solid var(--color-card);
  flex-shrink: 0;
}
.modal-title { font-size: 18px; font-weight: bold; }
.modal-close { cursor: pointer; font-size: 24px; color: var(--color-text-light); }

/* ========== 物品图标 ========== */
.item-icon {
  width: 48px; height: 48px;
  border-radius: 6px; border: 2px solid;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; text-align: center;
}
.item-icon.q1 { border-color: var(--quality-1); background: #f5f5f5; }
.item-icon.q2 { border-color: var(--quality-2); background: #eaf6ea; }
.item-icon.q3 { border-color: var(--quality-3); background: #e8f0fc; }
.item-icon.q4 { border-color: var(--quality-4); background: #f3e8f8; }
.item-icon.q5 { border-color: var(--quality-5); background: #fdf0e0; }

/* ========== Toast 提示 ========== */
.toast {
  position: fixed; top: 80px; left: 50%; transform: translateX(-50%);
  padding: 12px 24px; border-radius: 8px;
  color: white; font-size: 14px; z-index: 3000;
  animation: toastIn 0.3s ease;
}
.toast.success { background: var(--color-secondary); }
.toast.error { background: var(--color-danger); }
@keyframes toastIn {
  from { opacity: 0; transform: translateX(-50%) translateY(-20px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* ========== 品质标签 ========== */
.quality-tag {
  display: inline-block; padding: 2px 8px;
  border-radius: 4px; font-size: 11px; font-weight: bold;
}
.quality-tag.q1 { background: #E0DDD8; color: #6B6B6B; }
.quality-tag.q2 { background: #D4EBD4; color: #2D7A2D; }
.quality-tag.q3 { background: #C5DCF5; color: #1E5BA8; }
.quality-tag.q4 { background: #DCC6E8; color: #6B2E8A; }
.quality-tag.q5 { background: #F2DCA8; color: #A66A1E; }

/* ========== 词条卡品质配色方案 ========== */
/* 普通 — 石灰色调，朴素沉稳 */
.entry-card-q1 {
  --ec-border: #B0B0B0;
  --ec-bg-from: #F5F2ED;
  --ec-bg-to: #EDE8E0;
  --ec-name: #6B6B6B;
  --ec-glow: rgba(176,176,176,0.15);
}
/* 优良 — 翠绿色调，生机盎然 */
.entry-card-q2 {
  --ec-border: #52A352;
  --ec-bg-from: #EEF7EE;
  --ec-bg-to: #DCEBDC;
  --ec-name: #2D7A2D;
  --ec-glow: rgba(82,163,82,0.20);
}
/* 稀有 — 深蓝色调，深邃如海 */
.entry-card-q3 {
  --ec-border: #3A7BD5;
  --ec-bg-from: #E8F1FC;
  --ec-bg-to: #D0E2F8;
  --ec-name: #1E5BA8;
  --ec-glow: rgba(58,123,213,0.22);
}
/* 史诗 — 皇家紫调，神秘奥术 */
.entry-card-q4 {
  --ec-border: #8E44AD;
  --ec-bg-from: #F0E6F5;
  --ec-bg-to: #E0CFEB;
  --ec-name: #6B2E8A;
  --ec-glow: rgba(142,68,173,0.25);
}
/* 传说 — 琥珀金调，与游戏主色呼应 */
.entry-card-q5 {
  --ec-border: #E8A04F;
  --ec-bg-from: #FDF4E3;
  --ec-bg-to: #F5DFB8;
  --ec-name: #A66A1E;
  --ec-glow: rgba(232,160,79,0.30);
}
/* 词条卡通用样式 */
.entry-card {
  padding: 12px;
  border-radius: 10px;
  border: 2px solid var(--ec-border, var(--color-border));
  background: linear-gradient(135deg, var(--ec-bg-from, var(--color-card-alt)), var(--ec-bg-to, var(--color-card-alt)));
  display: flex;
  flex-direction: column;
  min-height: 130px;
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
}
.entry-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px var(--ec-glow, rgba(0,0,0,0.10));
}
.entry-card .entry-name {
  font-weight: bold;
  font-size: 14px;
  color: var(--ec-name, var(--color-text));
}
.entry-card .entry-desc {
  font-size: 11px;
  color: var(--color-text-light);
  line-height: 1.5;
  height: 49.5px;
  overflow: hidden;
  margin: 4px 0 6px;
  flex: 1;
}
/* 传说品质顶部光带 */
.entry-card-q5::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, #FFD700, #E8A04F, #FFD700, transparent);
  animation: shimmer 3s ease-in-out infinite;
}
@keyframes shimmer {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}
/* 史诗品质微光 */
.entry-card-q4::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, #B07CCD, #8E44AD, #B07CCD, transparent);
}
/* 已装载状态高亮 */
.entry-card.loaded {
  border-color: var(--color-primary);
  border-width: 2px;
  box-shadow: 0 0 0 1px var(--color-primary), 0 2px 8px rgba(232,160,79,0.15);
}

/* ========== 通用 ========== */
.text-center { text-align: center; }
.text-right { text-align: right; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-16 { margin-bottom: 16px; }
.hidden { display: none; }
.flex { display: flex; }
.flex-between { display: flex; justify-content: space-between; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.gap-8 { gap: 8px; }
.gap-16 { gap: 16px; }
.w-full { width: 100%; }

/* ========== 背包 ========== */
.backpack-btn:hover { opacity: 0.85; }

.bp-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 12px; padding-bottom: 10px; border-bottom: 1px solid var(--color-card);
}
.bp-slots-info { font-size: 14px; display: flex; align-items: center; gap: 12px; }
.bp-slots-info strong { color: var(--color-primary); }

/* 容量进度条 */
.bp-capacity-bar {
  width: 120px; height: 8px; background: var(--color-card-alt);
  border-radius: 4px; overflow: hidden; border: 1px solid var(--color-border);
}
.bp-capacity-fill {
  height: 100%; border-radius: 4px;
  transition: width 0.3s ease;
}

.bp-tabs {
  display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px;
}
.bp-tab {
  padding: 5px 14px; border: 1px solid var(--color-border);
  border-radius: 18px; background: var(--color-card-alt);
  color: var(--color-text); font-size: 12px; cursor: pointer;
  transition: all 0.2s;
}
.bp-tab:hover { border-color: var(--color-primary); color: var(--color-primary); }
.bp-tab.active { background: var(--color-primary); color: white; border-color: var(--color-primary); }

/* 网格容器 */
.bp-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
  min-height: 280px;
}
@media (max-width: 768px) { .bp-grid { grid-template-columns: repeat(5, 1fr); } }
@media (max-width: 480px) { .bp-grid { grid-template-columns: repeat(4, 1fr); } }

/* 格子基础样式 */
.bp-item {
  position: relative;
  border: 2px solid var(--color-border);
  border-radius: 10px;
  padding: 6px 4px 4px;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  aspect-ratio: 1 / 1.1;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
  overflow: hidden;
}
.bp-item:hover {
  transform: translateY(-3px) scale(1.05);
  z-index: 10;
}

/* 品质配色 - 与词条卡配色统一 */
.bp-item.q1 {
  border-color: #B0B0B0;
  background: linear-gradient(135deg, #F5F5F5, #E8E8E8);
}
.bp-item.q2 {
  border-color: #52A352;
  background: linear-gradient(135deg, #EDF7ED, #D4EBD4);
}
.bp-item.q3 {
  border-color: #3A7BD5;
  background: linear-gradient(135deg, #E8F0FE, #D0E0F8);
}
.bp-item.q4 {
  border-color: #8E44AD;
  background: linear-gradient(135deg, #F5E8FA, #E8D5F0);
}
.bp-item.q5 {
  border-color: #E8A04F;
  background: linear-gradient(135deg, #FFF8E8, #F5E0C0);
  animation: bpLegendaryGlow 2s ease-in-out infinite;
}
@keyframes bpLegendaryGlow {
  0%, 100% { box-shadow: 0 0 4px rgba(232,160,79,0.3); }
  50% { box-shadow: 0 0 12px rgba(232,160,79,0.6); }
}

/* 悬停发光 */
.bp-item.q1:hover { box-shadow: 0 3px 12px rgba(176,176,176,0.4); }
.bp-item.q2:hover { box-shadow: 0 3px 12px rgba(82,163,82,0.4); }
.bp-item.q3:hover { box-shadow: 0 3px 12px rgba(58,123,213,0.4); }
.bp-item.q4:hover { box-shadow: 0 3px 12px rgba(142,68,173,0.4); }
.bp-item.q5:hover { box-shadow: 0 3px 16px rgba(232,160,79,0.5); }

/* 空格 */
.bp-item.empty {
  border: 2px dashed var(--color-border);
  background: var(--color-card-alt);
  opacity: 0.35;
  cursor: default;
}
.bp-item.empty:hover { transform: none; box-shadow: none; }

.bp-icon {
  font-size: 22px; width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.bp-icon img { border-radius: 4px; }
.bp-name {
  font-size: 10px; text-align: center; word-break: break-all;
  line-height: 1.2; max-width: 100%; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap; width: 100%;
}

/* 品质标签条 */
.bp-quality-bar {
  position: absolute; top: 0; left: 0; right: 0;
  height: 3px; border-radius: 8px 8px 0 0;
}

/* 数量徽章 */
.bp-qty {
  position: absolute; bottom: 3px; right: 4px;
  font-size: 11px; font-weight: bold; color: white;
  background: rgba(0,0,0,0.55); border-radius: 8px;
  padding: 0 5px; min-width: 18px; text-align: center;
}

/* 强化等级徽章 */
.bp-upgrade {
  position: absolute; top: 3px; right: 4px;
  font-size: 10px; font-weight: bold; color: white;
  background: var(--color-danger); border-radius: 8px;
  padding: 0 5px;
}

/* 扩展提示 */
.bp-expand-tip {
  position: absolute; top: 3px; left: 3px;
}

/* 点击道具时：按钮叠加在道具格子上 */
/* 道具激活状态 - 隐藏原始内容，显示操作按钮 */
.bp-item.active {
  transform: scale(1.05);
  z-index: 20;
}
.bp-item.active:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 16px rgba(0,0,0,0.2);
}
.bp-item.active .bp-icon,
.bp-item.active .bp-name,
.bp-item.active .bp-quality-bar,
.bp-item.active .bp-qty,
.bp-item.active .bp-upgrade {
  display: none;
}

/* 操作按钮叠加层 */
.bp-item-actions {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  display: none;
  flex-direction: column;
  align-items: stretch;
  padding: 0;
  background: rgba(255,255,255,0.95);
  border-radius: 8px;
  gap: 3px;
  z-index: 10;
  overflow: hidden;
}
.bp-item.active .bp-item-actions {
  display: flex;
}

/* 操作按钮顶部品质色条 */
.bp-act-bar {
  height: 3px;
  border-radius: 8px 8px 0 0;
  flex-shrink: 0;
}

/* 操作按钮标题（物品名称） */
.bp-act-title {
  font-size: 11px;
  font-weight: bold;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 2px 4px 0;
}

/* 操作按钮 */
.bp-act-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 4px 6px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s;
  border: none;
  white-space: nowrap;
  flex: 1;
  min-height: 0;
}
.bp-act-btn.bp-act-wh {
  color: #52A352;
  background: #EDF7ED;
}
.bp-act-btn.bp-act-wh:hover {
  background: #D4EBD4;
}
.bp-act-btn.bp-act-sc {
  color: #8E44AD;
  background: #F5E8FA;
}
.bp-act-btn.bp-act-sc:hover {
  background: #E8D5F0;
}
.bp-act-btn.bp-act-bp {
  color: #3A7BD5;
  background: #E8F0FE;
}
.bp-act-btn.bp-act-bp:hover {
  background: #D0E0F8;
}
.bp-act-btn.bp-act-use {
  color: #E8A04F;
  background: #FFF8E8;
}
.bp-act-btn.bp-act-use:hover {
  background: #F5E0C0;
}

/* 全局浮动信息层 - 悬停物品时弹出独立信息面板 */
.bp-float-info {
  position: fixed;
  background: rgba(30,30,30,0.95);
  color: #fff;
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 12px;
  line-height: 1.5;
  max-width: 240px;
  min-width: 160px;
  z-index: 10000;
  pointer-events: none;
  display: none;
  box-shadow: 0 6px 24px rgba(0,0,0,0.35);
  border: 1px solid rgba(255,255,255,0.12);
}
.bp-float-info .bp-fi-name {
  font-size: 15px; font-weight: bold; margin-bottom: 6px;
}
.bp-float-info .bp-fi-quality {
  display: inline-block; padding: 1px 6px; border-radius: 6px;
  font-size: 10px; font-weight: bold; color: white; margin-right: 4px;
}
.bp-float-info .bp-fi-desc {
  font-size: 12px; color: #ddd; margin: 6px 0;
  line-height: 1.5;
  max-height: 80px; overflow: hidden;
}
.bp-float-info .bp-fi-attrs {
  font-size: 11px; color: #eee; margin-top: 4px;
}
.bp-float-info .bp-fi-attrs div { margin-bottom: 2px; }
.bp-float-info .bp-fi-attrs strong { color: #fff; }

/* 选中状态 */
.bp-item.bp-selected {
  outline: 3px solid var(--color-primary);
  outline-offset: 1px;
}

/* 品质小标签 */
.bp-quality-tag {
  display: inline-block; padding: 1px 8px; border-radius: 8px;
  font-size: 11px; font-weight: bold; color: white;
}
.bp-quality-tag.q1 { background: #B0B0B0; }
.bp-quality-tag.q2 { background: #52A352; }
.bp-quality-tag.q3 { background: #3A7BD5; }
.bp-quality-tag.q4 { background: #8E44AD; }
.bp-quality-tag.q5 { background: #E8A04F; }

/* ========== 灵卡槽 ========== */
.bp-spirit-section {
  margin-bottom: 14px; padding-bottom: 12px;
  border-bottom: 1px solid var(--color-card);
}
.bp-spirit-grid {
  display: flex; gap: 8px; flex-wrap: wrap;
}
.bp-spirit-slot {
  width: 80px; padding: 4px;
  border: 2px solid var(--color-border); border-radius: 10px;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  cursor: pointer; transition: all 0.15s; text-align: center;
  position: relative; overflow: hidden;
  aspect-ratio: 1/1.1;
}
/* 灵卡槽品质配色（与背包格子一致） */
.bp-spirit-slot.q1 { background: linear-gradient(135deg, rgba(176,176,176,0.15), rgba(176,176,176,0.05)); border-color: #B0B0B0; }
.bp-spirit-slot.q2 { background: linear-gradient(135deg, rgba(82,163,82,0.15), rgba(82,163,82,0.05)); border-color: #52A352; }
.bp-spirit-slot.q3 { background: linear-gradient(135deg, rgba(58,123,213,0.15), rgba(58,123,213,0.05)); border-color: #3A7BD5; }
.bp-spirit-slot.q4 { background: linear-gradient(135deg, rgba(142,68,173,0.15), rgba(142,68,173,0.05)); border-color: #8E44AD; }
.bp-spirit-slot.q5 { background: linear-gradient(135deg, rgba(232,160,79,0.2), rgba(232,160,79,0.08)); border-color: #E8A04F; }
.bp-spirit-slot.open.empty {
  background: linear-gradient(135deg, #F5E8FA, #E8D5F0);
  border-color: #8E44AD; border-style: dashed;
}
.bp-spirit-slot.open:hover {
  transform: translateY(-2px);
  box-shadow: 0 3px 12px rgba(142,68,173,0.3);
}
.bp-spirit-slot.q5:hover {
  box-shadow: 0 3px 12px rgba(232,160,79,0.4);
}
/* 灵卡槽品质顶部色条 */
.bp-spirit-slot .bp-quality-bar {
  position: absolute; top: 0; left: 0; right: 0;
  height: 3px; border-radius: 10px 10px 0 0;
}
.bp-spirit-slot-icon { font-size: 16px; margin-top: 2px; display: flex; align-items: center; justify-content: center; }
.bp-spirit-slot-icon img { width: 32px; height: 32px; }
.bp-spirit-slot-label { font-size: 10px; color: var(--color-text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 76px; }
.bp-spirit-slot .bp-qty { font-size: 10px; color: var(--color-text-light); background: rgba(0,0,0,0.3); padding: 0 4px; border-radius: 3px; position: absolute; bottom: 3px; right: 3px; }
.bp-spirit-slot.locked {
  border: 2px dashed var(--color-border);
  background: var(--color-card-alt); opacity: 0.4;
  cursor: default;
}

/* modal-sm */
.modal-sm .modal-body { max-width: 400px; }
