/* modals.css — auto-extracted from index.html
   Category: modals
   Blocks: 185
*/

.modal { display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: var(--bg-overlay); align-items: flex-start; justify-content: center; z-index: 1000; backdrop-filter: blur(4px); padding: 24px; overflow-y: auto; -webkit-overflow-scrolling: touch; }

.modal.active { display: flex; }

.modal-content { background: white; border-radius: var(--radius-xl); padding: 32px; width: 400px; text-align: center; box-shadow: var(--shadow-xl); margin: auto; }

.modal-content h3 { margin-bottom: 20px; color: var(--text-primary); font-weight: 600; }

.modal-content input { width: 100%; padding: 15px; border: 2px solid var(--border); border-radius: var(--radius-md); font-size: 15px; margin-bottom: 20px; background: var(--bg-subtle); transition: all 0.2s var(--ease-out); }

.modal-content input:focus { outline: none; border-color: var(--brand-400); background: white; box-shadow: 0 0 0 4px var(--brand-100); }

.modal-buttons { display: flex; gap: 12px; }

.modal-buttons button { flex: 1; padding: 13px; border-radius: var(--radius-md); border: none; font-size: 15px; cursor: pointer; font-weight: 500; transition: all 0.2s var(--ease-out); }

.btn-cancel { background: var(--bg-subtle); color: var(--text-secondary); }

.btn-cancel:hover { background: var(--border); }

.btn-confirm { background: linear-gradient(135deg, var(--brand-400) 0%, var(--brand-600) 100%); color: #FFFFFF; box-shadow: 0 4px 14px rgba(79, 70, 229,0.3); }

.btn-confirm:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(79, 70, 229,0.4); }

.quick-score-panel { display: none; position: fixed; top: 0; right: 0; bottom: 0; width: 900px; background: white; box-shadow: -5px 0 30px rgba(0,0,0,0.1); z-index: 999; flex-direction: column; }

.quick-score-panel.active { display: flex; }

.panel-header { padding: 20px 30px; border-bottom: 1px solid #eee; display: flex; justify-content: space-between; align-items: center; }

.close-btn { width: 30px; height: 30px; border-radius: 50%; border: none; background: #f0f0f0; cursor: pointer; }

.panel-content { flex: 1; display: flex; min-height: 0; }

.panel-left, .panel-right { flex: 1; padding: 20px; border-right: 1px solid #eee; min-height: 0; display: flex; flex-direction: column; }

.panel-right { border-right: none; }

.mode-tabs { display: flex; gap: 10px; margin-bottom: 20px; }

.mode-tab { padding: 8px 20px; border-radius: 20px; cursor: pointer; font-size: 14px; font-weight: 500; }

.mode-tab.add { color: #4caf50; border: 2px solid #4caf50; }

.mode-tab.add.active { background: #4caf50; color: #FFFFFF; }

.mode-tab.subtract { color: #f44336; border: 2px solid #f44336; }

.mode-tab.subtract.active { background: #f44336; color: #FFFFFF; }

.rules-list { display: grid; grid-template-columns: repeat(2,1fr); gap: 10px; }

.rule-item { padding: 12px; background: #f8f9fa; border-radius: 8px; cursor: pointer; display: flex; justify-content: space-between; align-items: center; }

.rule-item.selected { background: var(--brand-500); color: #FFFFFF; }

.rule-item.selected .rule-score { color: #111827; }

.rule-score { font-weight: bold; color: #4caf50; }

.rule-score.negative { color: #f44336; }

/* 临时自定义规则的删除按钮（右上角小 ❌） */
.rule-item[data-is-custom="true"] { position: relative; padding-right: 22px; }

.rule-del-btn {
    position: absolute;
    top: 2px;
    right: 4px;
    width: 15px;
    height: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    line-height: 1;
    color: #9ca3af;
    background: #ffffff;
    border-radius: 50%;
    cursor: pointer;
    opacity: 0.85;
    transition: all 0.15s var(--ease-out);
}

.rule-del-btn:hover { color: #ef4444; background: #fff0f0; }

.rule-item.selected .rule-del-btn { background: rgba(255,255,255,0.9); }

.quick-score-footer { padding: 20px 30px; border-top: 1px solid #eee; display: flex; justify-content: space-between; }

.footer-btn { padding: 12px 30px; border-radius: 8px; border: none; cursor: pointer; }

.footer-btn:disabled { background: #eee; color: #999; }

.student-checkboxes { display: grid; grid-template-columns: repeat(2,1fr); gap: 10px; overflow-y: auto; flex: 1; min-height: 0; }

.student-checkbox { padding: 12px; background: #f8f9fa; border-radius: 8px; cursor: pointer; display: flex; align-items: center; gap: 10px; }

.student-checkbox.selected { background: #e3f2fd; border: 1px solid #2196f3; }

/* 极速记分学生项的学号小标签（右侧对齐） */
.student-checkbox-sid {
  margin-left: auto;
  padding: 0 7px;
  border-radius: 6px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  color: #64748b;
  font-size: 11px;
  font-weight: 700;
  line-height: 18px;
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}
.student-checkbox.selected .student-checkbox-sid { background: #ffffff; border-color: #bbdefb; color: #1976d2; }

.checkbox { width: 20px; height: 20px; border: 2px solid #ddd; border-radius: 4px; }

.student-checkbox.selected .checkbox { background: #2196f3; }

.select-all-section { display: flex; justify-content: flex-end; gap: 15px; margin-bottom: 15px; color: #666; cursor: pointer; }

.student-detail-modal { display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.5); align-items: flex-start; justify-content: center; z-index: 1000; padding: 24px; overflow-y: auto; -webkit-overflow-scrolling: touch; }

.student-detail-modal.active { display: flex; }

.detail-modal-content { background: white; border-radius: 16px; width: 960px; max-height: calc(100vh - 48px); display: flex; overflow: hidden; box-shadow: 0 20px 60px rgba(0,0,0,0.3); position: relative; margin: auto; }

.detail-modal-close { position: absolute; top: 15px; right: 15px; width: 32px; height: 32px; border-radius: 50%; background: #f5f5f5; display: flex; align-items: center; justify-content: center; cursor: pointer; font-size: 16px; color: #999; z-index: 10; border: none; }

.detail-modal-close:hover { background: #eee; }

.detail-left { width: 320px; background: linear-gradient(180deg, #fef9f0 0%, #fff8e7 100%); padding: 30px 24px; display: flex; flex-direction: column; border-right: 1px solid #f0f0f0; overflow-y: auto; }

.detail-pet-avatar { width: 120px; height: 120px; border-radius: 20px; background: linear-gradient(135deg, var(--brand-50) 0%, var(--brand-200) 100%); display: flex; align-items: center; justify-content: center; font-size: 50px; margin: 0 auto 20px; overflow: hidden; }

.detail-pet-avatar img { width: 100%; height: 100%; object-fit: cover; }
.detail-pet-avatar #detail-pet-emoji { width: 100%; height: 100%; }

.detail-student-name { font-size: 20px; font-weight: 600; text-align: center; color: #333; margin-bottom: 6px; }

.detail-student-id { font-size: 13px; color: #9ca3af; text-align: center; font-weight: 500; }

.detail-pet-info { margin-top: 25px; padding: 18px; background: linear-gradient(135deg, var(--brand-50) 0%, var(--brand-200) 100%); border-radius: 12px; text-align: center; }

.detail-pet-name { font-size: 16px; font-weight: 600; color: #374151; }

.detail-pet-level { display: inline-flex; align-items: center; gap: 2px; background: linear-gradient(135deg, var(--brand-500), var(--brand-600)); color: #FFFFFF; padding: 2px 10px; border-radius: 4px; font-size: 11px; font-weight: 800; margin-left: 6px; letter-spacing: 0.5px; box-shadow: 0 2px 4px rgba(79, 70, 229,0.3); }

.detail-pet-level span { font-size: 9px; font-weight: 700; }

.detail-pet-desc { font-size: 12px; color: #999; margin-top: 10px; line-height: 1.4; }

.detail-exp-section { margin: 14px 0 6px; padding: 0 4px; }

.detail-exp-bar { width: 100%; height: 6px; border-radius: 3px; background: #e5e7eb; overflow: hidden; }

.detail-exp-fill { height: 100%; border-radius: 3px; background: linear-gradient(90deg, var(--brand-400), var(--brand-600)); transition: width 0.5s ease; }

.detail-stats { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; margin-top: 25px; }

.detail-stat { background: #f8f9fa; border-radius: 10px; padding: 15px 10px; text-align: center; }

.detail-stat-value { font-size: 20px; font-weight: 600; }

.detail-stat-value.positive { color: #4caf50; }

.detail-stat-value.negative { color: #f44336; }

.detail-stat-value.neutral { color: var(--brand-500); }

.detail-stat-label { font-size: 11px; color: #999; margin-top: 4px; font-weight: 400; text-transform: none; letter-spacing: normal; }

.detail-group-btn { background: #f3f4f6; color: #6b7280; border: 1px solid #e5e7eb; padding: 10px 14px; border-radius: 12px; font-size: 13px; font-weight: 600; cursor: default; margin-top: 10px; display: flex; align-items: center; justify-content: center; gap: 6px; }

.detail-right { flex: 1; display: flex; flex-direction: column; min-width: 0; }

.detail-tabs { display: flex; border-bottom: 1px solid #f3f4f6; padding: 0 24px; gap: 4px; }

.detail-tab { padding: 16px 20px; font-size: 14px; font-weight: 500; color: #9ca3af; cursor: pointer; border-bottom: 2px solid transparent; display: flex; align-items: center; gap: 6px; transition: all 0.2s; white-space: nowrap; }

.detail-tab:hover { color: #6b7280; }

.detail-tab.active { color: #4F46E5; border-bottom-color: #4F46E5; }

.detail-tab-content { flex: 1; padding: 20px 24px; overflow-y: auto; }

.detail-tab-badge { margin-left: 2px; font-size: 11px; color: #9ca3af; }

/* 详情弹窗「勋章」网格（眼睛图标控制是否在学生卡展示） */
.detail-medal-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
.detail-medal-item { display: flex; align-items: center; gap: 8px; padding: 8px 10px; background: var(--bg-subtle, #F1F3F7); border: 1px solid var(--border, #E2E5EA); border-radius: 12px; transition: all 0.2s; }
.detail-medal-item.dm-hidden { opacity: 0.55; }
.detail-medal-emoji { font-size: 20px; line-height: 1; flex-shrink: 0; }
.detail-medal-name { flex: 1; font-size: 13px; font-weight: 600; color: var(--text-primary, #111827); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.detail-medal-vis { font-size: 16px; cursor: pointer; flex-shrink: 0; padding: 2px; border-radius: 6px; transition: all 0.15s; }
.detail-medal-vis:hover { background: rgba(79,70,229,0.1); }
.detail-medal-vis.vis-hidden { filter: grayscale(1); opacity: 0.65; }
.detail-medal-locked { opacity: 0.55; background: var(--bg-subtle, #F1F3F7); filter: grayscale(0.85); }
.detail-medal-locked .detail-medal-emoji { filter: grayscale(1); opacity: 0.5; }
.detail-medal-locked .detail-medal-name { color: var(--text-secondary, #6B7280); font-weight: 500; }
.detail-medal-lock { font-size: 14px; opacity: 0.6; flex-shrink: 0; }

/* === 宠物实时状态（替换图鉴） === */
.pet-status-wrap { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 6px 2px 2px; }
.pet-status-header { font-size: 14px; font-weight: 700; color: var(--text-primary); }
.pet-status-card { width: 100%; background: linear-gradient(135deg, var(--brand-50), #ffffff); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 24px 18px; display: flex; flex-direction: column; align-items: center; gap: 12px; box-shadow: var(--shadow-sm); }
.pet-status-emoji { font-size: 52px; line-height: 1; transition: opacity .25s ease; }
.pet-status-text { font-size: 15px; color: var(--text-primary); text-align: center; font-weight: 500; transition: opacity .25s ease; min-height: 22px; }
.pet-status-foot { font-size: 12px; color: var(--text-secondary); text-align: center; line-height: 1.5; }

.energy-header-tabs { display: flex; margin-bottom: 22px; border-bottom: 1px solid #f0f0f0; }

.energy-header-tab { flex: 1; padding: 12px; border-radius: 6px 6px 0 0; font-size: 13px; cursor: pointer; font-weight: 500; transition: all 0.2s; border: none; outline: none; display: flex; align-items: center; justify-content: center; gap: 6px; }

.energy-header-tab.add { background: #4caf50; color: #FFFFFF; }

.energy-header-tab.add.inactive { background: transparent; color: #4caf50; }

.energy-header-tab.subtract { background: #f44336; color: #111827; }

.energy-header-tab.subtract.inactive { background: transparent; color: #f44336; }

.energy-section { margin-bottom: 18px; }

.energy-section-title { display: flex; align-items: center; gap: 6px; font-size: 12px; color: #666; padding-bottom: 8px; border-bottom: 1px dashed #ddd; margin-bottom: 10px; }

.energy-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }

.energy-item { padding: 12px 15px; border-radius: 8px; cursor: pointer; transition: all 0.2s; display: flex; align-items: center; justify-content: space-between; }

.energy-item:hover { transform: translateY(-1px); box-shadow: 0 2px 8px rgba(0,0,0,0.06); }

.energy-item.add { background: #e8f5e9; border: 1px solid #dcedc8; }

.energy-item.subtract { background: #ffebee; border: 1px solid #ffcdd2; }

.energy-item-left { display: flex; align-items: center; gap: 8px; }

.energy-item-icon { font-size: 15px; }

.energy-item-name { font-size: 12px; color: #333; }

.energy-item-score { font-size: 13px; font-weight: 600; }

.energy-item-score.add { color: #4caf50; }

.energy-item-score.subtract { color: #f44336; }

.energy-footer { display: flex; gap: 10px; margin-top: 22px; padding-top: 18px; border-top: 1px solid #f0f0f0; }

.energy-footer-btn { flex: 1; padding: 12px; border-radius: var(--radius-md); font-size: 12px; font-weight: 600; cursor: pointer; transition: all 0.25s var(--ease-out); border: 1.5px solid transparent; position: relative; overflow: hidden; }

.energy-footer-btn.custom { border-color: #4caf50; color: #4caf50; background: rgba(76,175,80,0.07); }

.energy-footer-btn.custom:hover { background: rgba(76,175,80,0.13); transform: translateY(-1px); }

.energy-footer-btn.add-rule { background: linear-gradient(135deg, #5cd08a 0%, #4caf50 100%); color: #FFFFFF; border: none; box-shadow: 0 2px 10px rgba(76,175,80,0.3), inset 0 1px 0 rgba(255,255,255,0.18); }

.energy-footer-btn.add-rule:hover { box-shadow: 0 5px 18px rgba(76,175,80,0.4); filter: brightness(1.04); transform: translateY(-1px); }

.energy-footer-btn.custom.subtract { border-color: #f44336; color: #f44336; background: rgba(244,67,54,0.07); }

.energy-footer-btn.custom.subtract:hover { background: rgba(244,67,54,0.13); transform: translateY(-1px); }

.energy-footer-btn.add-rule.subtract { background: linear-gradient(135deg, #ff6b5e 0%, #f44336 100%); }

.energy-footer-btn:active { transform: scale(0.97); }

.modal-overlay {
          position: fixed; inset: 0;
          background: rgba(15,23,42,0.6);
          backdrop-filter: blur(8px);
          -webkit-backdrop-filter: blur(8px);
          z-index: 1000;
          display: none;
          align-items: flex-start; justify-content: center;
          padding: 24px;
          overflow-y: auto;
          -webkit-overflow-scrolling: touch;
          animation: modalFadeIn 0.25s ease;
        }

.modal-overlay.is-open { display: flex !important; }

.modal-overlay > .modal {
          background: linear-gradient(180deg, #ffffff 0%, #fafbfc 100%);
          box-shadow:
            0 32px 64px -16px rgba(0,0,0,0.25),
            0 0 0 1px rgba(0,0,0,0.04),
            0 0 80px -20px rgba(79, 70, 229,0.12);
          border-radius: 24px;
          position: relative;
          width: 100%;
          max-height: calc(100vh - 48px);
          display: flex; flex-direction: column;
          overflow: hidden;
          margin: auto;
          animation: modalSlideUp 0.35s cubic-bezier(0.16,1,0.3,1);
        }

.modal--2xl { max-width: 672px; }

.modal--5xl { max-width: 1024px; }

.modal-header {
          padding: 20px 28px;
          border-bottom: 1px solid rgba(241,245,249,0.8);
          display: flex;
          align-items: center;
          gap: 14px;
          flex-shrink: 0;
          background: linear-gradient(180deg, #ffffff 0%, #fafbfc 100%);
          position: relative;
        }

.modal-header::after {
          content: '';
          position: absolute;
          bottom: 0;
          left: 28px;
          right: 28px;
          height: 1px;
          background: linear-gradient(90deg, transparent, rgba(79, 70, 229,0.15), transparent);
        }

.modal-header__icon {
          width: 42px; height: 42px;
          border-radius: 12px;
          display: flex; align-items: center; justify-content: center;
          font-size: 20px;
          flex-shrink: 0;
          box-shadow: 0 2px 8px rgba(0,0,0,0.08);
        }

.modal-header__icon--brand {
          background: linear-gradient(135deg, var(--brand-50) 0%, var(--brand-100) 100%);
          border: 1px solid rgba(79, 70, 229,0.15);
        }

.modal-header__icon--blue {
          background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
          border: 1px solid rgba(59,130,246,0.15);
        }

.modal-header__icon--green {
          background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
          border: 1px solid rgba(16,185,129,0.15);
        }

.modal-header__icon--purple {
          background: linear-gradient(135deg, #f5f3ff 0%, #ede9fe 100%);
          border: 1px solid rgba(139,92,246,0.15);
        }

.modal-header__body { flex: 1; min-width: 0; }

.modal-header__title {
          font-size: 16px; font-weight: 700; color: var(--slate-900);
          margin: 0; line-height: 1.3;
        }

.modal-header__desc {
          font-size: 12px; color: var(--slate-400);
          margin: 2px 0 0 0; line-height: 1.5;
        }

.modal-header__action {
          flex-shrink: 0;
        }

#modal-product-manage .modal-body {
          padding: 24px 28px;
          overflow-y: auto;
          flex: 1;
          background: #ffffff;
        }

#modal-product-manage .product-list { display: flex; flex-direction: column; gap: 10px; }

#modal-product-manage .modal-footer {
          padding: 20px 28px 24px;
          border-top: 1.5px solid rgba(241,245,249,0.9);
          display: flex; gap: 10px; flex-shrink: 0;
          background: linear-gradient(180deg, #fafbfc 0%, #f9fafb 100%);
        }

#modal-product-add > div {
          height: 88vh;
          max-height: 88vh;
        }

#modal-product-add .modal-body {
          padding: 20px 24px;
          overflow-y: auto;
          flex: 1;
          background: #ffffff;
          min-height: 480px;
        }

#modal-product-add .form-pane {
          min-height: 420px;
        }

#modal-product-add .form-section,
        #modal-edit-normal .form-section { margin-bottom: 22px; }

#modal-product-add .modal-footer {
          padding: 16px 24px 20px;
          border-top: 1.5px solid rgba(241,245,249,0.9);
          display: flex; gap: 10px; flex-shrink: 0;
          background: linear-gradient(180deg, #fafbfc 0%, #f9fafb 100%);
        }

.alert-warn {
          margin-top: 12px;
          padding: 10px 14px;
          background: linear-gradient(135deg, #fffbeb 0%, var(--sun-100) 100%);
          border: 1px solid #fcd34d;
          border-radius: 10px;
          color: var(--gold-700);
          font-size: 13px;
          line-height: 1.6;
          font-weight: 500;
        }

.modal-split { display: grid; grid-template-columns: 1fr; min-height: 0; flex: 1; overflow: hidden; }

@media (min-width: 1024px) { .modal-split { grid-template-columns: 1fr 340px; } }

.modal-banner {
          width: 100%; position: relative; height: 80px; flex-shrink: 0;
          display: flex; align-items: center; justify-content: center;
          overflow: hidden;
        }

.modal-banner::before {
          content: '';
          position: absolute;
          inset: 0;
          background:
            radial-gradient(circle at 30% 50%, rgba(255,255,255,0.12) 0%, transparent 50%),
            radial-gradient(circle at 70% 80%, rgba(255,255,255,0.08) 0%, transparent 40%);
          pointer-events: none;
        }

.modal-banner--brand {
          background: linear-gradient(135deg, var(--brand-400) 0%, var(--brand-500) 40%, var(--brand-600) 80%, var(--brand-800) 100%);
        }

.modal-banner--blue {
          background: linear-gradient(135deg, #2563eb 0%, #2563eb 40%, #1d4ed8 80%, #1e3a8a 100%);
        }

.modal-banner--green {
          background: linear-gradient(135deg, #10b981 0%, #059669 40%, #047857 80%, #064e3b 100%);
        }

.modal-banner--purple {
          background: linear-gradient(135deg, #7c3aed 0%, #7c3aed 40%, #6d28d9 80%, #4c1d95 100%);
        }

.modal-banner--amber {
          background: linear-gradient(135deg, #C8A163 0%, #d97706 40%, #b45309 80%, #78350f 100%);
        }

.modal-banner--slate {
          background: linear-gradient(135deg, #6b7280 0%, #4B5563 40%, #374151 80%, #111827 100%);
        }

.modal-banner__icon { font-size: 32px; position: relative; z-index: 1; filter: drop-shadow(0 2px 4px rgba(0,0,0,0.15)); }

.modal-banner__text { position: relative; z-index: 1; text-align: center; }

.modal-banner__title {
          font-size: 18px; font-weight: 800; color: #111827;
          letter-spacing: 0.5px; text-shadow: 0 1px 3px rgba(0,0,0,0.15);
          margin: 0;
        }

.modal-banner__subtitle {
          font-size: 11px; color: rgba(255,255,255,0.7);
          margin-top: 2px; letter-spacing: 0.3px;
        }

.drawer-mask {
            position: fixed; inset: 0;
            background: rgba(0, 0, 0, 0.4);
            opacity: 0; pointer-events: none;
            transition: opacity .25s;
            z-index: 999;
        }

.drawer-mask.show { opacity: 1; pointer-events: auto; }

.pet-handbook-filter { background: white; border-bottom: 1px solid var(--border); box-shadow: var(--shadow-sm); }

.pet-handbook-filter-inner { padding: 12px 16px; }

.pet-handbook-filter-row { display: flex; align-items: center; gap: 8px; }

.pet-handbook-lv-btn { width: 112px; flex-shrink: 0; display: flex; align-items: center; gap: 4px; background: #f9fafb; border: 2px solid #e5e7eb; border-radius: 8px; padding: 6px 8px; height: 36px; cursor: pointer; transition: all 0.2s; }

.pet-handbook-lv-btn:hover { border-color: #d1d5db; background: #f3f4f6; }

.pet-handbook-lv-label { font-size: 11px; font-weight: 700; color: #9ca3af; }

.pet-handbook-lv-value { font-size: 14px; font-weight: 900; color: #d1d5db; }

.pet-handbook-lv-emoji { font-size: 14px; line-height: 1; }

.pet-handbook-lv-name { font-size: 10px; color: #6b7280; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.pet-handbook-search { position: relative; flex: 1; min-width: 0; }

.pet-handbook-search-icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: #9ca3af; font-size: 14px; }

.pet-handbook-search-input { width: 100%; padding: 8px 36px 8px 36px; border: 2px solid #e5e7eb; border-radius: 8px; background: #f9fafb; font-size: 14px; outline: none; transition: all 0.2s; }

.pet-handbook-search-input:focus { border-color: #38bdf8; background: white; }

.pet-handbook-search-input::placeholder { color: #9ca3af; }

.pet-handbook-select-wrapper { position: relative; flex-shrink: 0; width: 80px; }

.pet-handbook-select-wrapper.rarity { width: 122px; }

.pet-handbook-select-btn { display: flex; align-items: center; justify-content: space-between; gap: 4px; width: 100%; height: 36px; padding: 0 10px; border-radius: 8px; border: 2px solid #e5e7eb; background: #f9fafb; font-size: 12px; font-weight: 500; color: #6b7280; cursor: pointer; transition: all 0.2s; }

.pet-handbook-select-btn:hover { border-color: #d1d5db; background: #f3f4f6; }

.pet-handbook-select-arrow { font-size: 10px; transition: transform 0.2s; }

.pet-handbook-dropdown { position: absolute; top: 100%; left: 0; right: 0; margin-top: 4px; background: white; border: 2px solid #e5e7eb; border-radius: 8px; box-shadow: 0 4px 12px rgba(0,0,0,0.1); z-index: 100; max-height: 200px; overflow-y: auto; }

.pet-handbook-dropdown-item { padding: 8px 12px; font-size: 13px; color: #6b7280; cursor: pointer; transition: background 0.15s; }

.pet-handbook-dropdown-item:hover { background: #f3f4f6; color: #374151; }

.pet-handbook-progress { position: relative; height: 20px; display: flex; align-items: center; padding: 0 11px; margin-top: 10px; }

.pet-handbook-progress-segments { position: absolute; top: 50%; transform: translateY(-50%); left: 11px; right: 11px; height: 12px; border-radius: 9999px; pointer-events: none; background: linear-gradient(to right, #D1D5DB 0%, #D1D5DB 9%, rgba(255,255,255,0.7) 9%, rgba(255,255,255,0.7) 9.1%, #A7F3D0 9.1%, #A7F3D0 18.1%, rgba(255,255,255,0.7) 18.1%, rgba(255,255,255,0.7) 18.2%, #6EE7B7 18.2%, #6EE7B7 27.2%, rgba(255,255,255,0.7) 27.2%, rgba(255,255,255,0.7) 27.3%, #86EFAC 27.3%, #86EFAC 36.3%, rgba(255,255,255,0.7) 36.3%, rgba(255,255,255,0.7) 36.4%, #4ADE80 36.4%, #4ADE80 45.4%, rgba(255,255,255,0.7) 45.4%, rgba(255,255,255,0.7) 45.5%, #7DD3FC 45.5%, #7DD3FC 54.5%, rgba(255,255,255,0.7) 54.5%, rgba(255,255,255,0.7) 54.6%, #38BDF8 54.6%, #38BDF8 63.6%, rgba(255,255,255,0.7) 63.6%, rgba(255,255,255,0.7) 63.7%, #818CF8 63.7%, #818CF8 72.7%, rgba(255,255,255,0.7) 72.7%, rgba(255,255,255,0.7) 72.8%, #7C3AED 72.8%, #7C3AED 81.8%, rgba(255,255,255,0.7) 81.8%, rgba(255,255,255,0.7) 81.9%, #C084FC 81.9%, #C084FC 90.9%, rgba(255,255,255,0.7) 90.9%, rgba(255,255,255,0.7) 91%, #F0ABFC 91%, #F0ABFC 100%); }

.pet-handbook-slider { -webkit-appearance: none; appearance: none; background: transparent; height: 20px; cursor: pointer; width: 100%; position: relative; z-index: 10; }

.pet-handbook-slider::-webkit-slider-runnable-track { height: 12px; background: transparent; border-radius: 9999px; }

.pet-handbook-slider::-moz-range-track { height: 12px; background: transparent; border-radius: 9999px; }

.pet-handbook-slider::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 22px; height: 22px; border-radius: 50%; background: var(--slider-thumb-color, #D1D5DB); border: 3px solid #fff; box-shadow: 0 2px 6px rgba(0,0,0,0.2); margin-top: -5px; cursor: grab; position: relative; z-index: 2; transition: border-color 0.15s; }

.pet-handbook-slider::-webkit-slider-thumb:active { cursor: grabbing; border-color: var(--slider-thumb-color, #38bdf8); }

.pet-handbook-slider::-moz-range-thumb { width: 22px; height: 22px; border-radius: 50%; background: var(--slider-thumb-color, #D1D5DB); border: 3px solid #fff; box-shadow: 0 2px 6px rgba(0,0,0,0.2); cursor: grab; }

.pet-handbook-slider::-moz-range-thumb:active { cursor: grabbing; }

.pet-handbook-slider:focus { outline: none; }

.pet-handbook-slider:focus::-webkit-slider-thumb { box-shadow: 0 0 0 4px rgba(56,189,248,0.25); }

.pet-handbook-grid-wrapper { flex: 1; overflow-y: auto; }

.pet-handbook-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; padding: 20px; }

@media (min-width: 640px) { .pet-handbook-grid { grid-template-columns: repeat(3, 1fr); } }

@media (min-width: 768px) { .pet-handbook-grid { grid-template-columns: repeat(3, 1fr); } }

@media (min-width: 1024px) { .pet-handbook-grid { grid-template-columns: repeat(4, 1fr); } }

@media (min-width: 1280px) { .pet-handbook-grid { grid-template-columns: repeat(5, 1fr); } }

.pet-handbook-card { background: white; border: 2px solid var(--border); border-radius: var(--radius-xl); overflow: hidden; cursor: pointer; transition: all 0.2s; }

.pet-handbook-card:hover { transform: translateY(-2px); box-shadow: 0 8px 25px rgba(0,0,0,0.1); border-color: var(--border-hover); }

.energy-value { font-weight: 600; color: var(--brand-600); font-size: 16px; }

.energy-unit { font-size: 13px; color: #9ca3af; margin-left: 4px; }

.energy-num { font-weight: 600; color: #111827; }

.energy-num.zero { color: #9ca3af; }

.energy-num.high { color: var(--brand-600); }

.pet-handbook-card:hover { transform: translateY(-2px); box-shadow: 0 8px 25px rgba(0,0,0,.1); }

/* ── 批量导入弹窗 ── */
.batch-body { min-height: 0; }
.batch-textarea-wrap { position:relative; flex:1; min-height:300px; width:70%; margin:0 auto; }
.batch-textarea {
  width:100%; height:100%; min-height:300px;
  padding:12px 6px; border:2px solid #e5e7eb; border-radius:14px;
  font-size:15px; font-family:inherit; resize:vertical;
  outline:none; box-sizing:border-box; background:#f9fafb;
  transition:all .2s; color:#111827; line-height:1.7;
}
.batch-textarea:focus { border-color:#10b981; background:white; box-shadow:0 0 0 4px rgba(16,185,129,0.08); }
.batch-textarea::placeholder { color:#9ca3af; }
.batch-textarea-hint {
  position:absolute; bottom:12px; right:14px;
  font-size:11px; color:#9ca3af; background:rgba(255,255,255,0.85);
  padding:2px 8px; border-radius:6px; pointer-events:none;
}
.batch-preview-stats {
  display:flex; gap:24px; margin-bottom:12px;
  padding:12px 16px; background:#f9fafb; border-radius:12px;
}
.batch-preview-stat {
  display:flex; align-items:center; gap:8px;
  font-size:13px; color:#6b7280;
}
.batch-preview-stat-icon {
  width:28px; height:28px; border-radius:8px;
  display:flex; align-items:center; justify-content:center; font-size:14px;
}
.batch-preview-stat--add .batch-preview-stat-icon { background:#d1fae5; }
.batch-preview-stat--warn .batch-preview-stat-icon { background:#fef3c7; }
.batch-preview-stat-num { color:#059669; font-size:15px; font-weight:700; }
.batch-preview-stat-num--warn { color:#f59e0b; }
.batch-table-scroll {
  flex:1; max-height:220px; overflow-y:auto;
  border:1.5px solid #e8e8e8; border-radius:12px;
}
.batch-table { width:100%; border-collapse:collapse; font-size:13px; }
.batch-table th {
  padding:10px 14px; text-align:left;
  color:#9ca3af; font-weight:600; font-size:11px;
  text-transform:uppercase; letter-spacing:0.5px;
  background:#f9fafb; border-bottom:1.5px solid #e8e8e8;
  position:sticky; top:0; z-index:1;
}
.batch-table tbody tr { transition:background .15s; }
.batch-table tbody tr:hover { background:#f9fafb; }
.batch-table tbody tr:not(:last-child) { border-bottom:1px solid #f3f4f6; }
.batch-table td { padding:10px 14px; color:#4B5563; }
.batch-table .row-add td { background:#f0fdf4; }
.batch-table .row-add:hover td { background:#dcfce7; }
.batch-table .row-conflict td { background:#fffbeb; }
.batch-table .row-conflict:hover td { background:#fef3c7; }
.batch-btn {
  flex:1; padding:14px 24px;
  font-size:15px; font-weight:600; cursor:pointer;
  transition:all .25s var(--ease-out); border-radius:var(--radius-md);
  position: relative; overflow: hidden;
}
.batch-btn::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(255,255,255,0.14) 0%, transparent 50%); pointer-events: none; border-radius: inherit; }
#batch-import-modal .modal-footer {
  gap:32px;
}
.batch-btn--outline {
  border:1.5px solid var(--border); background:linear-gradient(180deg,#fff,#f9fafb); color:var(--text-secondary); box-shadow: var(--shadow-xs);
}
.batch-btn--outline:hover { border-color:var(--brand-300); background:var(--brand-50); color:var(--brand-600); transform:translateY(-1px); box-shadow:0 2px 10px rgba(79, 70, 229,0.12); }
.batch-btn--primary {
  border:none; font-weight:600;
  background:linear-gradient(135deg,#10b981,#059669);
  color:#FFFFFF; box-shadow:0 4px 14px rgba(16,185,129,0.3), inset 0 1px 0 rgba(255,255,255,0.18);
}
.batch-btn--primary:hover {
  transform:translateY(-1px);
  box-shadow:0 6px 20px rgba(16,185,129,0.4);
  filter: brightness(1.04);
}
.batch-btn:active { transform: scale(0.97); }

/* ── Modal Footer 通用样式 ── */
.modal-footer {
  padding:16px 12px 20px;
  border-top:1px solid rgba(241,245,249,0.9);
  display:flex; gap:16px;
  background:linear-gradient(180deg,#fafbfc 0%,#f9fafb 100%);
  border-radius:0 0 24px 24px;
}

/* ── 宠物升级进化庆祝弹窗（独立动画，由 anime.js 接管，不走全局弹窗动画） ── */
/* ── 宠物进化庆祝弹窗（暗蒙版 + 光效 + 彩带） ── */
.evolution-celebration-overlay {
  position: fixed; inset: 0; z-index: 3000;
  display: flex; align-items: center; justify-content: center;
  background: radial-gradient(ellipse at center, rgba(109,40,217,0.45) 0%, rgba(9,6,28,0.88) 74%);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
/* 蒙版闪烁星光 */
.evo-stars { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.evo-star {
  position: absolute; border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 0 6px rgba(255,255,255,0.9), 0 0 14px rgba(196,181,253,0.8);
  opacity: 0;
  animation: evoStarTwinkle 2.4s ease-in-out infinite;
}
@keyframes evoStarTwinkle {
  0%, 100% { opacity: 0; transform: scale(0.5); }
  50%      { opacity: 1; transform: scale(1.25); }
}
/* 卡片背后旋转放射性光芒 */
.evo-backrays {
  position: absolute; left: 50%; top: 44%;
  width: 900px; height: 900px; margin: -450px 0 0 -450px;
  z-index: 0; pointer-events: none;
  border-radius: 50%;
  background: repeating-conic-gradient(
    from 0deg,
    rgba(253,230,138,0.16) 0deg 7deg,
    rgba(255,255,255,0) 7deg 20deg,
    rgba(196,181,253,0.16) 20deg 27deg,
    rgba(255,255,255,0) 27deg 40deg
  );
  -webkit-mask-image: radial-gradient(circle, rgba(0,0,0,1) 0%, rgba(0,0,0,0.55) 46%, rgba(0,0,0,0) 72%);
  mask-image: radial-gradient(circle, rgba(0,0,0,1) 0%, rgba(0,0,0,0.55) 46%, rgba(0,0,0,0) 72%);
  animation: evoBackraysSpin 16s linear infinite;
  will-change: transform;
}
@keyframes evoBackraysSpin {
  to { transform: rotate(360deg); }
}
/* 卡片背后的呼吸光晕（第二层，径向脉动） */
.evo-backglow {
  position: absolute; left: 50%; top: 44%;
  width: 520px; height: 520px; margin: -260px 0 0 -260px;
  z-index: 0; pointer-events: none;
  border-radius: 50%;
  background: radial-gradient(circle,
    rgba(253,224,71,0.18) 0%,
    rgba(244,114,182,0.12) 38%,
    rgba(124,58,237,0.08) 60%,
    rgba(0,0,0,0) 74%);
  animation: evoBackglowPulse 2.6s ease-in-out infinite alternate;
}
@keyframes evoBackglowPulse {
  from { transform: scale(0.92); opacity: 0.75; }
  to   { transform: scale(1.08); opacity: 1; }
}
.evo-card {
  position: relative; z-index: 1; width: 400px; padding: 40px 28px 30px;
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: linear-gradient(160deg, #bdeafe 0%, #c9b8ff 42%, #ffc8e8 100%);
  border-radius: 38px; text-align: center; overflow: hidden;
  box-shadow:
    0 0 26px rgba(253,224,71,0.3),
    0 0 90px rgba(196,181,253,0.55),
    0 26px 54px -10px rgba(0,0,0,0.65),
    inset 0 2px 0 rgba(255,255,255,0.7);
  animation: evoCardGlow 2.4s ease-in-out infinite alternate;
}
@keyframes evoCardGlow {
  from { box-shadow: 0 0 20px rgba(253,224,71,0.26), 0 0 70px rgba(196,181,253,0.5), 0 26px 54px -10px rgba(0,0,0,0.65), inset 0 2px 0 rgba(255,255,255,0.7); }
  to   { box-shadow: 0 0 36px rgba(253,224,71,0.52), 0 0 120px rgba(196,181,253,0.8), 0 26px 54px -10px rgba(0,0,0,0.65), inset 0 2px 0 rgba(255,255,255,0.7); }
}
/* 卡片内光柱扫描 */
.evo-scanline {
  position: absolute; left: 6%; right: 6%; top: -35%;
  height: 26%; z-index: 4; pointer-events: none;
  background: linear-gradient(180deg, transparent 0%, rgba(255,255,255,0.55) 50%, transparent 100%);
  border-radius: 999px;
  animation: evoScan 2.6s ease-in-out infinite;
}
@keyframes evoScan {
  0%   { top: -35%; opacity: 0; }
  12%  { opacity: 1; }
  80%  { opacity: 1; }
  100% { top: 115%; opacity: 0; }
}
/* 彩带（从中心爆开飘落） */
.evo-confetti { position: absolute; left: 50%; top: 44%; width: 0; height: 0; z-index: 5; pointer-events: none; }
.evo-confetti-piece {
  position: absolute; left: 0; top: 0;
  width: 10px; height: 18px; margin: -9px 0 0 -5px;
  border-radius: 2px; opacity: 0;
  box-shadow: 0 2px 6px rgba(0,0,0,0.25);
  animation: evoConfetti 2.5s cubic-bezier(.15,.7,.35,1) forwards;
}
@keyframes evoConfetti {
  0%   { opacity: 0; transform: translate(0, 0) rotate(0deg) scale(0.4); }
  12%  { opacity: 1; }
  100% { opacity: 0; transform: translate(var(--dx), var(--dy)) rotate(var(--rot)) scale(0.85); }
}
.evo-card::before {
  content: '';
  position: absolute; top: 0; left: 18%; right: 18%; height: 3px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.85), transparent);
  border-radius: 3px;
}
.evo-rays {
  position: absolute; inset: -50%; z-index: 0;
  background: conic-gradient(from 0deg,
    rgba(253,230,138,0.22), rgba(244,114,182,0.18), rgba(125,211,252,0.22),
    rgba(196,181,253,0.20), rgba(253,230,138,0.22));
  animation: evo-spin 9s linear infinite;
}
@keyframes evo-spin { to { transform: rotate(360deg); } }
.evo-card > * { position: relative; z-index: 1; }
.evo-pet {
  width: 150px; height: 150px; margin: 0 auto 18px;
  background: rgba(255,255,255,0.65);
  border-radius: 32px; padding: 8px;
  box-shadow: 0 10px 24px rgba(124,58,237,0.2), inset 0 2px 0 rgba(255,255,255,0.8);
  overflow: hidden;
}
.evo-pet img {
  width: 100%; height: 100%; object-fit: contain;
  border-radius: 24px;
  animation: evoPetGlow 2.4s ease-in-out infinite alternate;
}
@keyframes evoPetGlow {
  from { filter: drop-shadow(0 6px 14px rgba(244,114,182,0.3)); }
  to   { filter: drop-shadow(0 8px 22px rgba(96,165,250,0.5)) drop-shadow(0 0 16px rgba(244,114,182,0.35)); }
}
/* ── 进化形态对比区（旧 → 新） ── */
.evo-compare {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  margin: 0 auto 16px; width: 100%;
}
.evo-before, .evo-after {
  width: 96px; height: 96px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  background: rgba(255,255,255,0.6);
  border-radius: 20px; padding: 6px;
}
.evo-before { box-shadow: inset 0 2px 0 rgba(255,255,255,0.7), 0 6px 16px rgba(124,58,237,0.12); }
.evo-after {
  background: rgba(255,255,255,0.75);
  box-shadow:
    0 0 0 3px rgba(253,230,138,0.7),
    0 0 26px rgba(253,224,71,0.55),
    0 8px 22px rgba(124,58,237,0.22);
}
.evo-before img, .evo-after img { width: 62px; height: 62px; object-fit: contain; }
.evo-before-emoji { font-size: 40px; line-height: 62px; }
.evo-before-label, .evo-after-label { font-size: 11px; font-weight: 700; color: #7c3aed; letter-spacing: 1px; }
.evo-arrow { font-size: 24px; color: #db2777; font-weight: 900; animation: evoArrowPulse 1s ease-in-out infinite alternate; }
@keyframes evoArrowPulse { from { transform: scale(1); } to { transform: scale(1.25); } }
/* ── 进化闪光爆发层 ── */
.evo-flash {
  position: absolute; left: 50%; top: 38%; width: 220px; height: 220px; margin: -110px 0 0 -110px;
  z-index: 3; pointer-events: none;
  background: radial-gradient(circle, rgba(255,255,255,0.95) 0%, rgba(253,230,138,0.6) 35%, rgba(255,255,255,0) 70%);
  border-radius: 50%;
}
/* ── 进化冲击波光环 ── */
.evo-shockwave {
  position: absolute; left: 50%; top: 38%; width: 120px; height: 120px; margin: -60px 0 0 -60px;
  z-index: 3; pointer-events: none;
  border: 4px solid rgba(253,224,71,0.85);
  border-radius: 50%;
  box-shadow: 0 0 30px rgba(253,224,71,0.6), inset 0 0 20px rgba(253,224,71,0.4);
}
/* ── 阶段名大字（如 究极体 / 成年） ── */
.evo-stage-big {
  font-size: 30px; font-weight: 900; letter-spacing: 6px;
  margin: 0 auto 10px; line-height: 1.2;
  background: linear-gradient(135deg, #f7e7b4 0%, #d4af37 38%, #b8962e 68%, #8a6d1d 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 2px 0 rgba(255,255,255,0.45)) drop-shadow(0 4px 16px rgba(184,150,46,0.4));
}
.evo-title {
  font-size: 32px; font-weight: 900; color: #7c3aed;
  margin: 0 auto 8px; letter-spacing: 2px;
  text-shadow: 0 2px 0 rgba(255,255,255,0.65), 0 0 18px rgba(244,114,182,0.45);
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-align: center;
  box-sizing: border-box;
}
.evo-sparkle {
  display: inline-block;
  font-size: 20px; vertical-align: middle;
  animation: sparkleTwinkle 1.2s ease-in-out infinite alternate;
}
.evo-sparkle:nth-child(2) { animation-delay: 0.3s; }
@keyframes sparkleTwinkle {
  from { opacity: 0.5; transform: scale(0.85) rotate(-10deg); }
  to   { opacity: 1; transform: scale(1.2) rotate(10deg); }
}
.evo-name {
  font-size: 18px; font-weight: 800; color: #4c1d95; margin-bottom: 6px;
  letter-spacing: 1px;
}
.evo-breed {
  font-size: 14px; color: #7c3aed; margin-bottom: 12px; font-weight: 600;
}
.evo-level-change {
  display: inline-flex; align-items: center; gap: 12px;
  font-size: 19px; font-weight: 800; color: #5b21b6;
  background: rgba(255,255,255,0.7);
  padding: 9px 24px; border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.9);
  box-shadow: 0 4px 12px rgba(124,58,237,0.15);
  margin-top: 4px;
}
.evo-level-from { color: #b794e8; text-decoration: line-through; }
.evo-level-arrow { color: #db2777; font-size: 15px; }
.evo-level-to { color: #e11d48; text-shadow: 0 0 12px rgba(225,29,72,0.35); }
.evo-hint-bar {
  margin-top: 18px; padding: 10px 16px;
  background: rgba(255,255,255,0.55);
  border-radius: 999px; border: 1px solid rgba(255,255,255,0.9);
  font-size: 13px; color: #6d28d9; font-weight: 600; letter-spacing: 0.5px;
}
.evo-hint-bar .emoji { margin-right: 4px; }
.evo-close-hint {
  margin-top: 14px; font-size: 11px; color: rgba(109,40,217,0.5);
  letter-spacing: 1px;
}
/* 粒子 — 糖果彩色系 */
.evo-particles { position: absolute; left: 50%; top: 44%; width: 0; height: 0; z-index: 2; }
.evo-particle {
  position: absolute; left: 0; top: 0; width: 9px; height: 9px; margin: -4.5px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #fef3c7, #fb7185);
  box-shadow: 0 0 10px rgba(251,113,133,0.7), 0 0 4px rgba(253,230,138,0.5);
}

/* ── 加分飘字横幅（右→左飞过 · 纯 CSS 动画，不依赖 anime） ── */
.score-fly-banner {
  position: fixed; top: 72px; left: 0; z-index: 2800;
  transform: translateX(100vw);   /* 初始在屏幕右外侧 */
  opacity: 0;
  display: flex; align-items: center; gap: 12px;
  padding: 20px 36px;
  background: linear-gradient(135deg, var(--brand-500) 0%, var(--brand-600) 40%, #6d28d9 100%);
  border-radius: 999px;
  box-shadow:
    0 4px 20px rgba(79,70,229,0.35),
    0 0 40px rgba(79,70,229,0.15),
    inset 0 1px 0 rgba(255,255,255,0.2);
  white-space: nowrap; pointer-events: none;
  font-size: 28px; font-weight: 700; color: #FFFFFF;
  letter-spacing: 0.5px;
  text-shadow: 0 1px 2px rgba(0,0,0,0.15);
  max-width: min(80vw, 640px);
  will-change: transform, opacity;
  animation: scoreFlyAcross 7s cubic-bezier(.25,.46,.45,.94) forwards;
}
@keyframes scoreFlyAcross {
  0%   { transform: translateX(100vw);   opacity: 0; }
  6%   { opacity: 1; }
  86%  { opacity: 1; }
  100% { transform: translateX(-120%);   opacity: 0; }   /* -120% 自身宽度，确保完全离开左边缘 */
}
.score-fly-banner .banner-icon { font-size: 32px; }
.score-fly-banner .banner-name { font-weight: 800; max-width: 42vw; overflow: hidden; text-overflow: ellipsis; }
.score-fly-banner .banner-score { color: #fef3c7; }

/* ── Toast Alert 弹窗样式 ── */
@keyframes toastShrink {
  from { width: 100%; }
  to   { width: 0%; }
}
.toast-alert-box { animation: modalPop .35s cubic-bezier(0.34,1.56,0.64,1); transform-origin: center center; }
.toast-alert-btn:active { transform: translateY(0) scale(0.97)!important; }

/* ── 旅行出发成功富文本 Toast ── */
.toast-alert-rich { text-align: center; line-height: 1.5; color: #1a1a2e; }
.travel-toast-title { font-size: 20px; font-weight: 800; margin-bottom: 8px; letter-spacing: 0.5px; }
.travel-toast-subtitle { font-size: 15px; color: #4b5563; margin-bottom: 18px; }
.tt-student { color: var(--brand-600); font-weight: 700; }
.tt-scene {
  display: inline-block;
  color: var(--brand-600);
  font-weight: 700;
  background: var(--brand-50);
  padding: 2px 10px;
  border-radius: 999px;
  border: 1px solid var(--brand-200);
  margin: 0 2px;
}
.travel-toast-chips {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.tt-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  border: 1px solid;
}
.tt-cost { background: #eef2ff; color: var(--brand-600); border-color: var(--brand-200); }
.tt-reward { background: #ecfdf5; color: #047857; border-color: #a7f3d0; }
.tt-chip-icon { font-size: 16px; line-height: 1; }
.tt-chip b { font-size: 16px; font-weight: 800; margin: 0 2px; }
.travel-toast-plan { font-size: 13px; color: #6b7280; margin-bottom: 12px; }
.travel-toast-hint {
  display: inline-block;
  font-size: 13px;
  color: #6b7280;
  background: #f9fafb;
  padding: 8px 14px;
  border-radius: 10px;
  border: 1px solid #f3f4f6;
}

/* ── 消沉风格扣能量弹窗 ── */
.penalty-box {
  background: linear-gradient(175deg, #2d2d3a 0%, #1a1a24 100%);
  border-radius: 24px;
  padding: 36px 30px 28px;
  text-align: center;
  width: 340px;
  max-width: 88vw;
  position: relative;
  overflow: hidden;
  box-shadow:
    0 20px 60px rgba(0,0,0,0.5),
    0 0 0 1px rgba(255,255,255,0.06),
    inset 0 1px 0 rgba(255,255,255,0.06);
  animation: penaltyDropIn .5s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
@keyframes penaltyDropIn {
  0%   { opacity: 0; transform: scale(0.7) translateY(-30px); }
  50%  { transform: scale(1.03) translateY(4px); }
  70%  { transform: scale(0.97) translateY(-2px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}
/* 入场后持续微颤 */
.penalty-box::after {
  content: '';
  position: absolute; inset: 0;
  border-radius: 24px;
  animation: penaltyShake .6s ease-in-out 0.5s;
  pointer-events: none;
}
@keyframes penaltyShake {
  0%, 100% { transform: translateX(0); }
  15%      { transform: translateX(-3px) rotate(-0.5deg); }
  30%      { transform: translateX(3px) rotate(0.5deg); }
  45%      { transform: translateX(-2px) rotate(-0.3deg); }
  60%      { transform: translateX(2px) rotate(0.3deg); }
  75%      { transform: translateX(-1px); }
}
.penalty-top-bar {
  position: absolute; top: 0; left: 12%; right: 12%; height: 3px;
  background: linear-gradient(90deg, #4a4a5a, #6e5a5a, #4a4a5a);
  border-radius: 0 0 3px 3px;
}
.penalty-icon {
  font-size: 44px;
  line-height: 1;
  margin-bottom: 14px;
  animation: penaltyIconSad 2s ease-in-out infinite alternate;
  filter: drop-shadow(0 4px 12px rgba(0,0,0,0.4));
}
@keyframes penaltyIconSad {
  from { transform: translateY(0) scale(1); }
  to   { transform: translateY(3px) scale(0.95); opacity: 0.8; }
}
.penalty-title {
  font-size: 20px;
  font-weight: 800;
  color: #9ca3af;
  letter-spacing: 2px;
  margin-bottom: 10px;
  text-transform: uppercase;
}
.penalty-detail {
  font-size: 16px;
  color: #b0b0c0;
  line-height: 1.6;
  margin-bottom: 18px;
}
.penalty-name {
  color: #e0c070;
  font-weight: 700;
}
.penalty-score {
  color: #ef4444;
  font-weight: 900;
  font-size: 18px;
  text-shadow: 0 0 10px rgba(239,68,68,0.35);
  animation: penaltyScorePulse 1.8s ease-in-out infinite;
}
@keyframes penaltyScorePulse {
  from { opacity: 0.7; transform: scale(1); }
  to   { opacity: 1; transform: scale(1.08); }
}
/* 碎裂粒子 */
.penalty-cracks {
  position: relative;
  width: 120px;
  height: 40px;
  margin: 0 auto 20px;
}
.crack {
  position: absolute;
  width: 3px;
  height: 3px;
  background: rgba(160,160,180,0.5);
  border-radius: 50%;
  animation: penaltyFall 1.4s ease-in forwards;
}
.c1 { left: 10%; top: 0;  animation-delay: 0s;   width:4px;height:4px; }
.c2 { left: 25%; top:-2px;animation-delay: 0.1s;width:3px;height:3px; }
.c3 { left: 42%; top:0;  animation-delay: 0.2s;width:5px;height:5px;background:rgba(200,170,170,0.4); }
.c4 { left: 58%; top:-1px;animation-delay: 0.15s;width:3px;height:3px; }
.c5 { left: 75%; top:0;  animation-delay: 0.25s;width:4px;height:4px; }
.c6 { left: 90%; top:-2px;animation-delay: 0.05s;width:2px;height:2px; }
@keyframes penaltyFall {
  0%   { opacity: 1; transform: translateY(0) scaleX(1); }
  50%  { opacity: 0.6; }
  100% { opacity: 0; transform: translateY(22px) scaleX(0.3); }
}
.penalty-btn {
  display: inline-block;
  margin-top: 4px;
  padding: 10px 32px;
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg, #374151 0%, #1f2937 100%);
  color: #9ca3af;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all .25s ease;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3), inset 0 1px 0 rgba(255,255,255,0.04);
  letter-spacing: 1px;
}
.penalty-btn:hover {
  background: linear-gradient(135deg, #4b5563 0%, #374151 100%);
  color: #d1d5db;
  transform: translateY(-1px);
}
.penalty-btn:active {
  transform: translateY(1px) scale(0.98);
}
