/* ============================================
   v36.39 修补 · 强制 hidden 元素 display:none（避免 position:fixed 残留）
   ============================================ */

/* ============================================
   v36.39 · "看 玩 法 指 南" 浮层 · 纯文字产品介绍
   ============================================ */
.guide-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(8, 12, 20, 0.78);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 24px;
  animation: guideFadeIn 0.25s ease-out;
}
.guide-overlay[hidden] { display: none !important; }
@keyframes guideFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
.guide-card {
  position: relative;
  background: #fafaf8;
  color: #1a1a1a;
  border-radius: 12px;
  padding: 40px 36px 32px;
  max-width: 520px;
  width: 100%;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.4);
  font-family: 'Noto Serif SC', 'Songti SC', serif;
  animation: guideSlideIn 0.3s ease-out;
}
@keyframes guideSlideIn {
  from { transform: translateY(12px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
.guide-close {
  position: absolute;
  top: 12px;
  right: 16px;
  background: transparent;
  border: 0;
  font-size: 24px;
  line-height: 1;
  color: #999;
  cursor: pointer;
  padding: 4px 8px;
  transition: color 0.2s;
}
.guide-close:hover { color: #1a1a1a; }
.guide-eyebrow {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.4em;
  color: #999;
  margin-bottom: 12px;
  text-align: center;
}
.guide-title {
  font-family: 'Noto Serif SC', serif;
  font-size: 28px;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-align: center;
  margin: 0 0 20px 0;
  color: #1a1a1a;
}
.guide-lead {
  font-size: 16px;
  line-height: 1.9;
  text-align: center;
  letter-spacing: 0.08em;
  color: #333;
  margin: 0 0 28px 0;
}
.guide-lead b {
  color: #1a1a1a;
  font-weight: 600;
  border-bottom: 2px solid #60a5fa;
  padding-bottom: 1px;
}
.guide-steps {
  list-style: none;
  margin: 0 0 24px 0;
  padding: 0;
  border-top: 1px solid #e6e3d8;
}
.guide-steps li {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid #e6e3d8;
  font-size: 14px;
  line-height: 1.7;
  color: #333;
  letter-spacing: 0.05em;
}
.guide-steps .step-num {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  color: #60a5fa;
  min-width: 18px;
  padding-top: 4px;
  font-weight: 600;
}
.guide-foot {
  font-size: 11px;
  color: #888;
  text-align: center;
  letter-spacing: 0.1em;
  margin: 0 0 24px 0;
  line-height: 1.7;
}
.guide-btn {
  display: block;
  width: 100%;
  padding: 14px 20px;
  background: transparent;
  color: #1a1a1a;
  border: 1.5px solid #1a1a1a;
  border-radius: 8px;
  font-size: 14px;
  letter-spacing: 0.2em;
  font-family: 'Noto Serif SC', serif;
  cursor: pointer;
  transition: all 0.2s;
}
.guide-btn:hover {
  background: #1a1a1a;
  color: #fafafa;
}
.composer[hidden] { display: none !important; }
.reactions-bar[hidden] { display: none !important; }
.canvas-loading[hidden] { display: none !important; }

/* ============================================
   Components
   按钮 / 拖拽区 / 抽屉 / Toast / 滑块
   ============================================ */

/* v36.39 · 卡面更新动画（拒绝收入时：撕旧 → 出新 → 稀有度高亮） */
@keyframes v36-39-card-update-out {
  0%   { opacity: 1; transform: scale(1)   rotate(0deg); }
  60%  { opacity: 0.3; transform: scale(0.85) rotate(-3deg); }
  100% { opacity: 0; transform: scale(0.7) rotate(-6deg); }
}
@keyframes v36-39-card-update-in {
  0%   { opacity: 0; transform: scale(0.7) rotate(6deg); }
  40%  { opacity: 0.7; transform: scale(0.95) rotate(-2deg); }
  100% { opacity: 1; transform: scale(1) rotate(0deg); }
}
@keyframes v36-39-rarity-up-glow {
  0%   { box-shadow: 0 0 0 0 rgba(255, 200, 100, 0); border-color: rgba(255, 200, 100, 0); }
  30%  { box-shadow: 0 0 24px 8px rgba(255, 200, 100, 0.7); border-color: rgba(255, 200, 100, 1); }
  100% { box-shadow: 0 0 0 0 rgba(255, 200, 100, 0); border-color: rgba(255, 200, 100, 0); }
}
.v36-39-card-update-out {
  animation: v36-39-card-update-out 300ms ease-in forwards !important;
  pointer-events: none;
}
.v36-39-card-update-in {
  animation: v36-39-card-update-in 400ms cubic-bezier(0.16, 1, 0.3, 1) forwards !important;
}
.v36-39-rarity-up {
  animation: v36-39-rarity-up-glow 700ms ease-out 1 !important;
}

/* v36.39 · 档案库删除按钮 */
.v362-archive-delete {
  background: transparent;
  border: 1px solid rgba(255, 100, 100, 0.3);
  color: rgba(255, 100, 100, 0.7);
  padding: 2px 8px;
  margin-left: 8px;
  cursor: pointer;
  font-family: monospace;
  font-size: 11px;
  border-radius: 2px;
  transition: all 0.2s;
}
.v362-archive-delete:hover {
  background: rgba(255, 100, 100, 0.15);
  border-color: rgba(255, 100, 100, 0.8);
  color: rgba(255, 100, 100, 1);
}

/* ====================== BUTTONS ====================== */

.primary-btn {
  font-family: var(--font-mono);
  font-size: var(--fs-md);
  letter-spacing: 0.08em;
  color: var(--text-primary);
  background: var(--accent);
  border: 1px solid var(--accent);
  border-radius: var(--r-1);
  padding: var(--sp-3) var(--sp-5);
  display: inline-flex;
  align-items: center;
  gap: var(--sp-3);
  cursor: pointer;
  transition: all var(--t-fast) var(--ease-out);
  box-shadow: 0 0 0 0 transparent, var(--hl);
  position: relative;
}

.primary-btn::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: var(--r-1);
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.1) 0%,
    transparent 50%
  );
  pointer-events: none;
  opacity: 0.6;
}

.primary-btn:hover {
  background: #5fa8ff;
  border-color: #5fa8ff;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(74, 158, 255, 0.3), var(--hl);
}

.primary-btn:active {
  transform: translateY(0);
}

.primary-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  background: var(--bg-elevated);
  border-color: var(--border);
  color: var(--text-tertiary);
  transform: none;
  box-shadow: none;
}

.primary-btn:disabled::before {
  display: none;
}

.primary-btn-mono {
  font-family: var(--font-mono);
  font-size: var(--fs-sm);
  opacity: 0.8;
}

.ghost-btn {
  font-family: var(--font-mono);
  font-size: var(--fs-sm);
  letter-spacing: 0.06em;
  color: var(--text-secondary);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--r-1);
  padding: var(--sp-2) var(--sp-4);
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  cursor: pointer;
  transition: all var(--t-fast) var(--ease-out);
}

.ghost-btn:hover {
  color: var(--text-primary);
  border-color: var(--accent-line);
  background: var(--bg-elevated);
}

.ghost-btn:active {
  transform: translateY(1px);
}

/* ====================== COMPOSER (固定底部输入栏) ====================== */

.composer {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 32px;
  z-index: calc(var(--z-hud) + 1);
  background: linear-gradient(
    180deg,
    rgba(15, 20, 27, 0.6) 0%,
    rgba(10, 14, 20, 0.95) 100%
  );
  border-top: 1px solid var(--border);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: var(--sp-2) var(--sp-4);
  display: flex;
  flex-direction: column;
  gap: var(--sp-1);
  animation: composer-in var(--t-base) var(--ease-out);
}

@keyframes composer-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.composer-status {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: var(--fs-xs);
  color: var(--text-tertiary);
  letter-spacing: 0.05em;
}

.composer-status-text {
  color: var(--text-secondary);
}

.composer-status-text.is-warn { color: var(--warn); }
.composer-status-text.is-ok { color: var(--ok); }
.composer-status-text.is-active { color: var(--accent); }

.composer-inner {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  height: 40px;
}

.composer-upload {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 40px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--r-1);
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  color: var(--text-secondary);
  letter-spacing: 0.1em;
  transition: all var(--t-fast) var(--ease-out);
  flex-shrink: 0;
}

.composer-upload:hover {
  border-color: var(--accent-line);
  color: var(--accent);
  background: var(--accent-soft);
}

.composer-input {
  flex: 1;
  height: 40px;
  min-height: 40px;
  max-height: 120px;
  padding: var(--sp-2) var(--sp-3);
  background: var(--bg-deepest);
  border: 1px solid var(--border);
  border-radius: var(--r-1);
  font-family: var(--font-cn);
  font-size: var(--fs-md);
  line-height: 1.5;
  color: var(--text-primary);
  resize: none;
  transition: border-color var(--t-fast) var(--ease-out);
}

.composer-input::placeholder {
  color: var(--text-tertiary);
}

.composer-input:focus {
  border-color: var(--accent-line);
  outline: none;
}

.composer-meta {
  font-size: var(--fs-xs);
  color: var(--text-tertiary);
  width: 40px;
  text-align: right;
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}

.composer-analyze {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  height: 40px;
  padding: 0 var(--sp-4);
  background: var(--accent);
  border: 1px solid var(--accent);
  border-radius: var(--r-1);
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: var(--fs-sm);
  letter-spacing: 0.1em;
  cursor: pointer;
  transition: all var(--t-fast) var(--ease-out);
  flex-shrink: 0;
}

.composer-analyze:hover:not(:disabled) {
  background: #5fa8ff;
  border-color: #5fa8ff;
}

.composer-analyze:disabled {
  background: var(--bg-elevated);
  border-color: var(--border);
  color: var(--text-tertiary);
  cursor: not-allowed;
  opacity: 0.5;
}

.composer-analyze.is-animating {
  animation: pulse 1.4s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(74, 158, 255, 0.5); }
  50% { box-shadow: 0 0 0 8px rgba(74, 158, 255, 0); }
}

.composer-thumb {
  position: absolute;
  top: -56px;
  left: 16px;
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-1) var(--sp-1) var(--sp-1) var(--sp-1);
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--r-1);
  animation: composer-in var(--t-base) var(--ease-out);
}

.composer-thumb img {
  width: 40px;
  height: 40px;
  object-fit: cover;
  border-radius: var(--r-1);
  display: block;
}

.composer-thumb-info {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  color: var(--text-secondary);
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.composer-thumb-remove {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 50%;
  cursor: pointer;
  color: var(--text-tertiary);
  font-size: 10px;
  transition: all var(--t-fast) var(--ease-out);
}

.composer-thumb-remove:hover {
  background: var(--warn);
  border-color: var(--warn);
  color: var(--bg-base);
}

.composer-dropzone {
  position: absolute;
  inset: 0;
  background: rgba(74, 158, 255, 0.15);
  border: 2px dashed var(--accent);
  border-radius: var(--r-1);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  pointer-events: none;
  color: var(--accent);
  font-size: var(--fs-sm);
  letter-spacing: 0.2em;
}

/* ====================== REACTIONS BAR (反应栏，浮动在 composer 上方) ====================== */

.reactions-bar {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 120px; /* composer 上方更多 · v36.39 整体上移 */
  z-index: calc(var(--z-hud) + 2);
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: transparent;  /* v36.39 · 完全透明 · 去掉黑底 */
  border: none;  /* v36.39 · 不要边框 */
  border-radius: 0;
  padding: 0;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  box-shadow: none;
  animation: reactions-in var(--t-base) var(--ease-out);
  min-width: 640px;
  max-width: 920px;
}

@keyframes reactions-in {
  from { opacity: 0; transform: translate(-50%, 8px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

@media (max-width: 768px) {
  .reactions-bar {
    min-width: 0;
    width: calc(100% - 32px);
  }
}

/* v36.39 · 5 按钮行：等宽，每个按钮带底下小字 */
.reactions-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}
@media (max-width: 768px) {
  .reactions-row { grid-template-columns: repeat(2, 1fr); }
}

/* v36.39 · ⊕ 出卡按钮行：垂直布局（按钮 + 提示小字） */
.reactions-mint-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

/* v36.39 · 按钮间的虚线分隔 · 你要"完全透明" → 这条分隔也透明 */
.reactions-divider {
  height: 1px;
  background: transparent;
  margin: 2px 0;
}

.reaction {
  font-family: var(--font-mono);
  font-size: var(--fs-sm);
  letter-spacing: 0.04em;
  color: #1a1a1a;  /* v36.39 · 白底用深文字 */
  background: transparent;  /* v36.39 · 透明背景 */
  border: 1px solid rgba(0, 0, 0, 0.18);  /* 仍保留细边，让按钮有"实体" */
  border-radius: var(--r-1);
  padding: 8px 10px;
  cursor: pointer;
  transition: all var(--t-fast) var(--ease-out);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  box-shadow: none;
  text-align: center;
  line-height: 1.2;
  min-width: 96px;
}

.reaction:hover {
  color: #000000;
  border-color: rgba(0, 0, 0, 0.4);
  background: transparent;  /* v36.39 · hover 也保持透明 */
}

.reaction:active {
  transform: translateY(1px);
}

.reaction-main {
  font-size: 13px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 4px;
  color: #1a1a1a;  /* v36.39 · 主文字深色 */
}

.reaction-sub {
  font-size: 10px;
  color: #6a6a6a;  /* v36.39 · 底下小字深灰 */
  opacity: 0.85;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.reaction-accept.is-active {
  color: #ffffff;
  background: var(--ok);
  border-color: var(--ok);
}

.reaction-reject {
  position: relative;
}

.reaction-reject.is-shaking {
  animation: shake 0.4s var(--ease-out);
  border-color: var(--warn);
  color: var(--warn);
}

/* v36.39 · ⊕ 出卡按钮 = 蓝描边 + 完全透明 + 蓝色光晕（系统蓝） */
.reaction-manual.reaction-special {
  margin: 0;
  background: transparent;
  border: 2px solid #60a5fa;
  color: #60a5fa;
  font-weight: 600;
  font-size: 18px;
  padding: 18px 60px;
  letter-spacing: 0.06em;
  flex-direction: row;
  gap: 8px;
  min-width: 220px;
  border-radius: 8px;
  box-shadow: 0 0 24px rgba(96, 165, 250, 0.25), inset 0 0 12px rgba(96, 165, 250, 0.08);
  transition: all var(--t-base) var(--ease-out);
}
.reaction-manual.reaction-special:hover {
  background: rgba(96, 165, 250, 0.08);
  border-color: #93c5fd;
  color: #93c5fd;
  box-shadow: 0 0 32px rgba(96, 165, 250, 0.5), inset 0 0 16px rgba(96, 165, 250, 0.15);
  transform: translateY(-1px);
}
.reaction-manual.reaction-special:active {
  transform: translateY(1px);
  box-shadow: 0 0 16px rgba(96, 165, 250, 0.3);
}

/* v36.39 · ⊕ 下方提示小字 */
.reactions-hint {
  font-family: var(--font-mono);
  font-size: 11px;
  color: transparent;  /* v36.39 · 提示小字也透明（你要"完全透明"） */
  opacity: 0;
  letter-spacing: 0.04em;
  text-align: center;
}

/* v36.19 · 提示文字「只有 ⊕ 才会出卡」 */
.reaction-hint {
  display: inline-flex;
  align-items: center;
  margin-left: 12px;
  padding: 4px 8px;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 10.5px;
  letter-spacing: 0.05em;
  color: rgba(216,180,254,0.85);
  background: rgba(168,85,247,0.1);
  border: 1px dashed rgba(168,85,247,0.35);
  border-radius: 3px;
  white-space: nowrap;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-4px); }
  40% { transform: translateX(4px); }
  60% { transform: translateX(-3px); }
  80% { transform: translateX(3px); }
}

/* ====================== HISTORY FLOATING PANEL (右侧浮窗) ====================== */

.history-float {
  position: fixed;
  top: 60px;
  right: 12px;
  bottom: 92px;
  z-index: calc(var(--z-hud) + 1);
  width: 280px;
  background: rgba(15, 20, 27, 0.88);
  border: 1px solid var(--border);
  border-radius: var(--r-2);
  display: flex;
  flex-direction: column;
  box-shadow: var(--shdw);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  animation: hist-in var(--t-base) var(--ease-out);
}

@keyframes hist-in {
  from { opacity: 0; transform: translateX(12px); }
  to { opacity: 1; transform: translateX(0); }
}

.history-float-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sp-3) var(--sp-3);
  border-bottom: 1px solid var(--border);
  font-size: var(--fs-xs);
  color: var(--text-secondary);
  letter-spacing: 0.05em;
}

.history-float-close {
  font-family: var(--font-mono);
  color: var(--text-tertiary);
  padding: 2px var(--sp-2);
  border-radius: var(--r-1);
  transition: all var(--t-fast) var(--ease-out);
  font-size: var(--fs-xs);
}

.history-float-close:hover {
  color: var(--text-primary);
  background: var(--bg-elevated);
}

.history-float-list {
  flex: 1;
  padding: var(--sp-2);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}

.history-float-foot {
  padding: var(--sp-2);
  border-top: 1px solid var(--border);
}

.history-float-foot .ghost-btn {
  width: 100%;
  justify-content: center;
  font-size: var(--fs-xs);
}

@media (max-width: 1024px) {
  .history-float {
    width: 240px;
  }
}

@media (max-width: 768px) {
  .history-float {
    width: calc(100% - 24px);
    right: 12px;
    top: 60px;
  }
}

/* ====================== DRAWER (右侧弹层：设置 / 修改) ====================== */

.drawer {
  position: fixed;
  top: 48px;
  bottom: 32px;
  width: 420px;
  max-width: 100vw;
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid var(--border);
  z-index: var(--z-drawer);
  display: flex;
  flex-direction: column;
  box-shadow: var(--shdw-lg);
  animation: drawer-in var(--t-base) var(--ease-out);
  color: var(--text-primary);
}

.drawer-right {
  right: 0;
  border-right: 0;
  border-top: 0;
  border-bottom: 0;
  border-left: 1px solid var(--border);
}

@keyframes drawer-in {
  from {
    opacity: 0;
    transform: translateX(20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sp-3) var(--sp-4);
  border-bottom: 1px solid var(--border);
  background: var(--bg-panel);
  color: var(--text-secondary);
}

.drawer-close {
  font-family: var(--font-mono);
  color: var(--text-tertiary);
  padding: var(--sp-1) var(--sp-2);
  border-radius: var(--r-1);
  transition: all var(--t-fast) var(--ease-out);
}

.drawer-close:hover {
  color: var(--text-primary);
  background: var(--bg-base);
}

.drawer-body {
  flex: 1;
  padding: var(--sp-4);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}

.drawer-hint {
  font-family: var(--font-cn);
  font-size: var(--fs-sm);
  color: var(--text-secondary);
  line-height: 1.7;
  padding: var(--sp-3);
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--r-1);
  border-left: 2px solid var(--accent);
}

/* ====================== FORM ====================== */

.form-row {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}

.form-row-toggle {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
}

.form-label {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  letter-spacing: 0.1em;
  color: var(--text-secondary);
}

.form-input {
  font-family: var(--font-mono);
  font-size: var(--fs-base);
  padding: var(--sp-2) var(--sp-3);
  background: var(--bg-deepest);
  border: 1px solid var(--border);
  border-radius: var(--r-1);
  color: var(--text-primary);
  transition: border-color var(--t-fast) var(--ease-out);
}

.form-input::placeholder {
  color: var(--text-tertiary);
}

.form-input:focus {
  border-color: var(--accent-line);
  outline: none;
}

.form-actions {
  display: flex;
  gap: var(--sp-2);
  align-items: center;
  margin-top: var(--sp-3);
}

.form-actions .primary-btn,
.form-actions .ghost-btn {
  flex: 1;
  justify-content: center;
}

.form-hint {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  color: var(--text-tertiary);
  line-height: 1.6;
}

/* ====================== 修正抽屉新字段 ====================== */
.modify-section {
  padding: 10px 0 12px;
  border-bottom: 1px dashed var(--border);
}
.modify-section:last-of-type {
  border-bottom: none;
}
.modify-label {
  display: block;
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  letter-spacing: 0.12em;
  color: var(--text-secondary);
  margin-bottom: 6px;
  text-transform: uppercase;
  font-weight: 600;
}
.modify-input,
.modify-textarea,
.modify-select {
  width: 100%;
  font-family: var(--font-mono);
  font-size: var(--fs-sm);
  padding: 8px 10px;
  background: var(--bg-deepest);
  border: 1px solid var(--border);
  border-radius: var(--r-1);
  color: var(--text-primary);
  transition: border-color var(--t-fast) var(--ease-out);
  box-sizing: border-box;
  letter-spacing: 0.03em;
}
.modify-input:focus,
.modify-textarea:focus,
.modify-select:focus {
  border-color: var(--accent-line);
  outline: none;
  background: var(--bg-base);
}
.modify-textarea {
  resize: vertical;
  min-height: 64px;
  line-height: 1.6;
  font-family: var(--font-cn);
}
.modify-tag-add {
  display: flex;
  gap: 6px;
  align-items: stretch;
  margin-top: 6px;
}
.modify-tag-add .modify-input {
  flex: 1;
}
.ghost-btn-sm {
  padding: 6px 10px;
  font-size: var(--fs-xs);
  letter-spacing: 0.05em;
}
.modify-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  min-height: 26px;
  padding: 4px 0;
}
.modify-tag {
  display: inline-flex;
  align-items: center;
  background: rgba(220, 38, 38, 0.08);
  border: 1px solid rgba(220, 38, 38, 0.3);
  color: var(--accent);
  padding: 3px 4px 3px 8px;
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  letter-spacing: 0.04em;
  border-radius: 2px;
  transition: all var(--t-fast) var(--ease-out);
}
.modify-tag:hover {
  background: rgba(220, 38, 38, 0.12);
}
.modify-tag-remove {
  background: transparent;
  border: none;
  color: var(--accent);
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  padding: 0 4px 0 6px;
  margin-left: 2px;
  opacity: 0.55;
  font-weight: 700;
}
.modify-tag-remove:hover {
  opacity: 1;
  color: var(--accent);
}
.modify-tag-pool {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dotted var(--border);
}
.modify-tag-pool-label {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  color: var(--text-tertiary);
  letter-spacing: 0.05em;
  width: 100%;
  margin-bottom: 2px;
}
.modify-tag-pool-item {
  display: inline-block;
  background: var(--bg-deepest);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  padding: 2px 7px;
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  letter-spacing: 0.03em;
  border-radius: 2px;
  cursor: pointer;
  transition: all var(--t-fast) var(--ease-out);
}
.modify-tag-pool-item:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.modify-tag-pool-item.is-picked {
  opacity: 0.35;
  cursor: not-allowed;
  text-decoration: line-through;
}

.form-hint.is-ok {
  color: var(--ok);
}

.form-hint.is-warn {
  color: var(--warn);
}

/* ====================== 高级设置折叠 ====================== */
.form-advanced {
  margin-top: var(--sp-3);
  border-top: 1px dashed var(--border);
  padding-top: var(--sp-3);
}
.form-advanced > summary {
  list-style: none;
  cursor: pointer;
  color: var(--text-tertiary);
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  letter-spacing: 0.08em;
  padding: 4px 0;
  user-select: none;
  transition: color var(--t-fast) var(--ease-out);
}
.form-advanced > summary:hover { color: var(--text-secondary); }
.form-advanced > summary::-webkit-details-marker { display: none; }
.form-advanced[open] > summary { color: var(--text-secondary); margin-bottom: var(--sp-2); }
.form-advanced-body {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  padding: 4px 0 0;
}

/* ====================== AI 后端选择器 ====================== */

.ai-backend-options {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 8px;
  background: var(--bg-deepest);
  border: 1px solid var(--border);
  border-radius: var(--r-1);
}
.radio-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 4px 6px;
  border-radius: var(--r-1);
  cursor: pointer;
  font-family: var(--font-cn);
  font-size: var(--fs-sm);
  color: var(--text-secondary);
  transition: background 120ms var(--ease-out);
}
.radio-row:hover {
  background: rgba(0,0,0,0.04);
  color: var(--text-primary);
}
.radio-row input[type="radio"] {
  margin: 3px 0 0 0;
  cursor: pointer;
  accent-color: var(--accent);
}
.radio-row input[type="radio"]:checked + span {
  color: var(--text-primary);
  font-weight: 600;
}
.webllm-progress {
  width: 100%;
}
.webllm-progress-bar {
  width: 100%;
  height: 6px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  overflow: hidden;
}
.webllm-progress-fill {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--accent) 0%, #06b6d4 100%);
  transition: width 300ms var(--ease-out);
}
#webllmStatus.is-loading { color: var(--accent); }
#webllmStatus.is-ready { color: var(--ok); font-weight: 600; }
#webllmStatus.is-error { color: var(--warn); }

/* ====================== SWITCH ====================== */

.switch {
  position: relative;
  display: inline-block;
  width: 36px;
  height: 20px;
  cursor: pointer;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.switch-slider {
  position: absolute;
  inset: 0;
  background: var(--bg-deepest);
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  transition: all var(--t-fast) var(--ease-out);
}

.switch-slider::before {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 14px;
  height: 14px;
  background: var(--text-secondary);
  border-radius: 50%;
  transition: all var(--t-fast) var(--ease-out);
}

.switch input:checked + .switch-slider {
  background: var(--accent-soft);
  border-color: var(--accent);
}

.switch input:checked + .switch-slider::before {
  background: var(--accent);
  transform: translateX(16px);
}

.switch input:disabled + .switch-slider {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ====================== TOAST ====================== */

.toast {
  position: fixed;
  bottom: 152px;
  left: 50%;
  transform: translateX(-50%);
  z-index: var(--z-toast);
  font-family: var(--font-mono);
  font-size: var(--fs-sm);
  letter-spacing: 0.04em;
  color: var(--text-primary);
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-1);
  padding: var(--sp-3) var(--sp-4);
  box-shadow: var(--shdw);
  animation: toast-in var(--t-base) var(--ease-out);
  max-width: 480px;
}

.toast.is-warn {
  border-color: var(--warn);
  color: var(--warn);
}

.toast.is-ok {
  border-color: var(--ok);
  color: var(--ok);
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translate(-50%, 8px);
  }
  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

.toast.is-leaving {
  animation: toast-out var(--t-base) var(--ease-out) forwards;
}

@keyframes toast-out {
  to {
    opacity: 0;
    transform: translate(-50%, 8px);
  }
}

/* ====================== SLIDERS ====================== */

.sliders {
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
}

.slider-row {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}

.slider-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: var(--fs-sm);
  color: var(--text-secondary);
}

.slider-value {
  font-variant-numeric: tabular-nums;
  color: var(--accent);
  font-weight: 500;
}

.slider-row input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 4px;
  background: var(--bg-deepest);
  border-radius: var(--r-pill);
  outline: none;
  cursor: pointer;
}

.slider-row input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  background: var(--accent);
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid var(--bg-base);
  box-shadow: 0 0 0 1px var(--accent);
}

.slider-row input[type="range"]::-moz-range-thumb {
  width: 14px;
  height: 14px;
  background: var(--accent);
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid var(--bg-base);
  box-shadow: 0 0 0 1px var(--accent);
}

/* ====================== HISTORY ITEM (in history-float-list) ====================== */

.history-list {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}

.history-item {
  padding: var(--sp-2) var(--sp-3);
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--r-1);
  cursor: pointer;
  transition: all var(--t-fast) var(--ease-out);
  display: flex;
  flex-direction: column;
  gap: var(--sp-1);
}

.history-item:hover {
  border-color: var(--accent-line);
  background: var(--bg-elevated);
}

.history-item.is-active {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.history-item-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  color: var(--text-tertiary);
  letter-spacing: 0.05em;
}

.history-item-type {
  padding: 1px var(--sp-2);
  border-radius: var(--r-pill);
  border: 1px solid var(--border);
  font-size: 9px;
  letter-spacing: 0.1em;
}

.history-item-type.is-text {
  color: var(--accent);
  border-color: var(--accent-line);
}

.history-item-type.is-image {
  color: var(--pink);
  border-color: rgba(244, 114, 182, 0.3);
}

.history-item-status {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.05em;
}

.history-item-status.is-accept { color: var(--ok); }
.history-item-status.is-reject { color: var(--warn); }
.history-item-status.is-modify { color: var(--mute); }
.history-item-status.is-reanalyze { color: var(--cyan); }
.history-item-status.is-view-bias { color: var(--violet); }

.history-item-preview {
  font-family: var(--font-cn);
  font-size: 11px;
  color: var(--text-primary);
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
}

.history-empty {
  padding: var(--sp-5);
  text-align: center;
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  color: var(--text-tertiary);
  border: 1px dashed var(--border);
  border-radius: var(--r-1);
  letter-spacing: 0.1em;
}

/* ====================== v31-RESIZABLE 拖拽调整大小手柄 ====================== */
.obs-resize-handle {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 18px;
  height: 18px;
  cursor: nwse-resize;
  z-index: 6;
  background:
    linear-gradient(135deg,
      transparent 0%,
      transparent 38%,
      var(--text-tertiary) 38%,
      var(--text-tertiary) 44%,
      transparent 44%,
      transparent 56%,
      var(--text-tertiary) 56%,
      var(--text-tertiary) 62%,
      transparent 62%,
      transparent 74%,
      var(--text-tertiary) 74%,
      var(--text-tertiary) 80%,
      transparent 80%);
  opacity: 0.35;
  transition: opacity 0.18s ease;
  pointer-events: auto;
  touch-action: none;
}
.fcard:hover > .obs-resize-handle,
.system-mode-panel:hover > .obs-resize-handle {
  opacity: 0.75;
}
.obs-resize-handle:hover,
.obs-resize-handle:active {
  opacity: 1;
  background:
    linear-gradient(135deg,
      transparent 0%,
      transparent 38%,
      var(--accent) 38%,
      var(--accent) 44%,
      transparent 44%,
      transparent 56%,
      var(--accent) 56%,
      var(--accent) 62%,
      transparent 62%,
      transparent 74%,
      var(--accent) 74%,
      var(--accent) 80%,
      transparent 80%);
}
.obs-resize-handle::after {
  content: '';
  position: absolute;
  right: 3px;
  bottom: 3px;
  width: 4px;
  height: 4px;
  background: var(--accent);
  border-radius: 50%;
  opacity: 0;
  transition: opacity 0.18s;
}
.obs-resize-handle:hover::after { opacity: 0.9; }

/* 主分析面板图片缩略图 */
.hero-thumb {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  cursor: zoom-in;
  z-index: 2;
}
.hero-thumb:hover {
  transform: translateY(-50%) scale(1.08);
  transition: transform 0.2s ease;
}

/* ====================== v32-COLLAPSE 主分析面板 + composer 折叠 ====================== */

/* 顶部行：图片 + 标题/描述 并排 */
.hero-top-row {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: var(--sp-4, 14px);
  padding-bottom: var(--sp-2, 8px);
  border-bottom: 1px dashed var(--border, rgba(0,0,0,0.1));
  margin-bottom: var(--sp-2, 8px);
}
.hero-top-text {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.hero-img-large {
  flex: 0 0 auto;
  width: 96px;
  height: 96px;
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid var(--border, rgba(0,0,0,0.12));
  background: var(--bg-elevated, #1a1a1a);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
  cursor: zoom-in;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.hero-img-large:hover {
  transform: scale(1.04);
  box-shadow: 0 4px 20px rgba(220, 38, 38, 0.25);
  border-color: var(--accent, #dc2626);
}
.hero-mini-meta {
  font-family: var(--font-mono, monospace);
  font-size: var(--fs-xs, 11px);
  color: var(--text-tertiary, #888);
  letter-spacing: 0.05em;
  line-height: 1.5;
  padding-bottom: 2px;
}
.hero-top-text .hero-title {
  margin-top: 0;
  font-size: 24px;
  line-height: 1.25;
}
.hero-top-text .hero-desc {
  border-bottom: none;
  padding-top: 2px;
  padding-bottom: 0;
  font-size: 13px;
  line-height: 1.6;
}
@media (max-width: 720px) {
  .hero-top-row { flex-direction: column; align-items: stretch; }
  .hero-img-large { width: 100%; height: 160px; }
}

/* composer 折叠按钮（放在状态行右侧） */
.composer-toggle {
  margin-left: auto;
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border, rgba(255,255,255,0.12));
  border-radius: var(--r-1, 4px);
  color: var(--text-secondary, #aaa);
  font-family: var(--font-mono, monospace);
  font-size: var(--fs-xs, 11px);
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.composer-toggle:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--accent, #dc2626);
  border-color: var(--accent, #dc2626);
}
.composer-toggle:active { transform: translateY(1px); }

/* composer 折叠后只剩状态行 */
.composer.is-collapsed {
  padding: var(--sp-1, 6px) var(--sp-4, 16px);
}
.composer.is-collapsed .composer-inner,
.composer.is-collapsed .composer-thumb {
  display: none !important;
}

/* ====================== v33-VISITOR 观众上传区（首页） ====================== */
.home-upload {
  margin: 26px auto 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 720px;
  width: 100%;
}
.home-dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 180px;
  padding: 28px 24px;
  background: linear-gradient(180deg,
    rgba(255, 255, 255, 0.04) 0%,
    rgba(255, 255, 255, 0.02) 100%);
  border: 2px dashed var(--accent, #dc2626);
  border-radius: 8px;
  color: var(--text-secondary, #ccc);
  cursor: pointer;
  text-align: center;
  transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
  position: relative;
  overflow: hidden;
}
.home-dropzone::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 0%, rgba(220, 38, 38, 0.08), transparent 60%);
  pointer-events: none;
  opacity: 0.6;
}
.home-dropzone:hover,
.home-dropzone:focus {
  background: linear-gradient(180deg,
    rgba(220, 38, 38, 0.06) 0%,
    rgba(255, 255, 255, 0.04) 100%);
  border-color: var(--accent, #dc2626);
  border-style: solid;
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(220, 38, 38, 0.15);
  outline: none;
}
.home-dropzone.is-drag {
  background: linear-gradient(180deg,
    rgba(220, 38, 38, 0.12) 0%,
    rgba(220, 38, 38, 0.04) 100%);
  border-color: var(--accent, #dc2626);
  border-style: solid;
  transform: scale(1.01);
  box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.18), 0 12px 36px rgba(220, 38, 38, 0.25);
}
.home-dropzone-icon {
  font-size: 56px;
  line-height: 1;
  color: var(--accent, #dc2626);
  margin-bottom: 6px;
  font-family: var(--font-mono, monospace);
  letter-spacing: -0.05em;
  position: relative;
  z-index: 1;
}
.home-dropzone-title {
  font-family: var(--font-cn, sans-serif);
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary, #f5f0e6);
  letter-spacing: 0.05em;
  position: relative;
  z-index: 1;
}
.home-dropzone-sub {
  font-family: var(--font-mono, monospace);
  font-size: 11px;
  color: var(--text-tertiary, #888);
  letter-spacing: 0.1em;
  position: relative;
  z-index: 1;
}
.home-dropzone-hint {
  font-family: var(--font-mono, monospace);
  font-size: 10px;
  color: var(--text-tertiary, #777);
  letter-spacing: 0.08em;
  margin-top: 6px;
  opacity: 0.7;
  position: relative;
  z-index: 1;
}
.home-text-input {
  display: flex;
  align-items: stretch;
  gap: 10px;
  background: var(--bg-elevated, rgba(255,255,255,0.04));
  border: 1px solid var(--border, rgba(255,255,255,0.12));
  border-radius: 6px;
  padding: 10px 12px;
  transition: border-color 0.18s ease;
}
.home-text-input:focus-within {
  border-color: var(--accent, #dc2626);
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}
.home-text-input textarea {
  flex: 1 1 auto;
  resize: vertical;
  min-height: 44px;
  max-height: 140px;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-primary, #f5f0e6);
  font-family: var(--font-cn, sans-serif);
  font-size: 14px;
  line-height: 1.5;
  padding: 4px 0;
}
.home-text-input textarea::placeholder {
  color: var(--text-tertiary, #888);
}
.home-text-submit {
  flex: 0 0 auto;
  align-self: stretch;
  white-space: nowrap;
  padding: 0 18px;
  margin: 0;
}
.home-secondary-btn {
  opacity: 0.6;
  filter: saturate(0.6);
  transition: opacity 0.18s ease, filter 0.18s ease;
}
.home-secondary-btn:hover {
  opacity: 1;
  filter: none;
}

/* v36.39 · "看 玩 法 指 南" 按钮 · 蓝描边透明 + 蓝色发光（覆盖 home-secondary-btn 的灰色样式）*/
.home-guide-btn {
  margin-top: 18px;
  padding: 14px 36px;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.15em;
  font-family: var(--font-serif, 'Noto Serif SC', 'Songti SC', serif);
  color: #60a5fa;
  background: transparent;
  border: 1.5px solid #60a5fa;
  border-radius: 8px;
  box-shadow: 0 0 12px rgba(96, 165, 250, 0.15);
  opacity: 1 !important;  /* 覆盖 home-secondary-btn 的 0.6 灰 */
  filter: none !important;  /* 覆盖 saturate(0.6) */
  cursor: pointer;
  transition: all 0.25s var(--ease-out);
}
.home-guide-btn:hover {
  background: rgba(96, 165, 250, 0.06);
  border-color: #3b82f6;
  color: #3b82f6;
  box-shadow: 0 0 24px rgba(96, 165, 250, 0.4);
  transform: translateY(-1px);
}
.home-guide-btn:active {
  transform: translateY(0);
  box-shadow: 0 0 12px rgba(96, 165, 250, 0.25);
}
@media (max-width: 720px) {
  .home-dropzone { min-height: 140px; padding: 20px 16px; }
  .home-dropzone-title { font-size: 16px; }
  .home-text-input { flex-direction: column; }
  .home-text-submit { padding: 10px 18px; }
}

/* ============================================================
   v36.2 召唤仪式 · 祭品/献祭/召唤 + 旧模型残影
   ============================================================ */

/* ----- 卡片共性 ----- */
.v36-sidebar {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.v36-side-card {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 10px 12px 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-primary);
  position: relative;
  overflow: hidden;
}
.v36-side-title {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 1px dashed rgba(0, 0, 0, 0.1);
}
.v36-side-title-cn {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.1em;
}
.v36-side-title-en {
  font-size: 9px;
  letter-spacing: 0.18em;
  opacity: 0.5;
  text-transform: uppercase;
}
.v36-side-count {
  margin-left: auto;
  font-size: 9px;
  background: rgba(0, 0, 0, 0.06);
  padding: 1px 6px;
  border-radius: 6px;
  color: var(--text-tertiary);
}
.v36-side-empty {
  font-size: 10px;
  color: var(--text-tertiary);
  font-style: italic;
  padding: 4px 0;
}
.v36-side-item {
  padding: 5px 0;
  border-bottom: 1px dotted rgba(0, 0, 0, 0.08);
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.v36-side-item:last-child { border-bottom: none; }
.v36-side-item > span:first-child {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
}
.v36-side-item-name {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 11px;
}
.v36-side-item-score {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
}
.v36-side-item-evidence {
  font-size: 9px;
  color: var(--text-tertiary);
  font-style: italic;
  letter-spacing: 0.02em;
}
.v36-side-item-rationale {
  font-size: 10px;
  color: var(--text-secondary);
  line-height: 1.45;
  font-family: var(--font-cn);
  margin-top: 2px;
}

/* ----- 祭品（绿）----- */
.v36-side-offerings {
  background: linear-gradient(180deg, rgba(74, 222, 128, 0.04) 0%, rgba(74, 222, 128, 0.01) 100%);
  border-color: rgba(74, 222, 128, 0.35);
  box-shadow: inset 3px 0 0 rgba(74, 222, 128, 0.5);
}
.v36-side-offerings .v36-side-title-cn { color: #047857; }
.v36-side-offerings .v36-side-title-en { color: #059669; opacity: 0.7; }
.v36-side-item-offering .v36-side-item-name::before {
  content: '≡ ';
  color: #059669;
  font-weight: 700;
}

/* ----- 献祭（暗红 + 划去）----- */
.v36-side-sacrificed {
  background: linear-gradient(180deg, rgba(127, 29, 29, 0.04) 0%, rgba(127, 29, 29, 0.01) 100%);
  border-style: dashed;
  border-color: rgba(127, 29, 29, 0.4);
  box-shadow: inset 3px 0 0 rgba(127, 29, 29, 0.5);
  opacity: 0.85;
}
.v36-side-sacrificed .v36-side-title-cn { color: #991b1b; }
.v36-side-sacrificed .v36-side-title-en { color: #b91c1c; opacity: 0.7; }
.v36-side-item-sacrificed {
  text-decoration: line-through;
  text-decoration-color: rgba(127, 29, 29, 0.5);
  text-decoration-thickness: 1.5px;
  opacity: 0.7;
}
.v36-side-item-deleted {
  font-size: 10px;
  color: #7f1d1d;
  font-family: var(--font-cn);
  font-weight: 500;
  letter-spacing: 0.02em;
}
.v36-side-item-sacrificed::before {
  content: '✕ ';
  color: #7f1d1d;
  font-weight: 700;
  margin-right: 4px;
}

/* ----- 召唤（蓝 + 闪烁）----- */
.v36-side-summoned {
  background: linear-gradient(180deg, rgba(96, 165, 250, 0.05) 0%, rgba(96, 165, 250, 0.01) 100%);
  border-color: rgba(96, 165, 250, 0.4);
  box-shadow: inset 3px 0 0 rgba(96, 165, 250, 0.6);
}
.v36-side-summoned .v36-side-title-cn { color: #1d4ed8; }
.v36-side-summoned .v36-side-title-en { color: #2563eb; opacity: 0.7; }
.v36-side-item-summoned .v36-side-item-action {
  font-size: 11px;
  color: #1d4ed8;
  font-weight: 600;
  letter-spacing: 0.02em;
}

/* ----- 旧模型残影 ----- */
.v36-side-legacy {
  background: repeating-linear-gradient(
    -45deg,
    rgba(0, 0, 0, 0.015) 0px,
    rgba(0, 0, 0, 0.015) 4px,
    transparent 4px,
    transparent 8px
  ), rgba(255, 255, 255, 0.6);
  border-style: dashed;
  border-color: rgba(0, 0, 0, 0.18);
  opacity: 0.85;
}
.v36-side-legacy-head {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 6px;
}
.v36-side-legacy-head .v36-side-title-cn { color: rgba(0, 0, 0, 0.45); }
.v36-side-legacy-head .v36-side-title-en { color: rgba(0, 0, 0, 0.35); }
.v36-side-legacy-tag {
  margin-left: auto;
  font-size: 9px;
  padding: 1px 6px;
  border: 1px solid rgba(0, 0, 0, 0.2);
  border-radius: 3px;
  color: rgba(0, 0, 0, 0.5);
  letter-spacing: 0.05em;
  font-family: var(--font-mono);
}
.v36-side-legacy-details { margin-top: 4px; }
.v36-side-legacy-summary {
  cursor: pointer;
  font-size: 10px;
  color: rgba(0, 0, 0, 0.5);
  letter-spacing: 0.04em;
  user-select: none;
  list-style: none;
}
.v36-side-legacy-summary::-webkit-details-marker { display: none; }
.v36-side-legacy-summary:hover { color: rgba(0, 0, 0, 0.8); }
.v36-side-legacy-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
  margin-top: 8px;
  padding: 6px;
  background: rgba(0, 0, 0, 0.03);
  border-radius: 2px;
}
.v36-side-legacy-item {
  padding: 4px 6px;
  background: rgba(255, 255, 255, 0.5);
  border-left: 2px solid rgba(0, 0, 0, 0.2);
  font-size: 9px;
  color: rgba(0, 0, 0, 0.5);
  line-height: 1.55;
}
.v36-side-legacy-line1 {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 4px;
  text-decoration: line-through;
  text-decoration-color: rgba(0, 0, 0, 0.3);
}
.v36-side-legacy-name { font-weight: 600; }
.v36-side-legacy-state {
  font-size: 8px;
  color: rgba(0, 0, 0, 0.4);
  font-weight: 400;
}
.v36-side-legacy-reason {
  font-size: 9px;
  color: rgba(0, 0, 0, 0.4);
  font-style: italic;
  margin: 2px 0;
}
.v36-side-legacy-line3 {
  display: flex;
  justify-content: space-between;
  font-size: 9px;
  font-family: var(--font-mono);
}
.v36-side-legacy-score {
  color: rgba(0, 0, 0, 0.35);
  text-decoration: line-through;
  text-decoration-color: rgba(0, 0, 0, 0.3);
}
.v36-side-legacy-x {
  color: rgba(220, 38, 38, 0.5);
  letter-spacing: 0.02em;
}

/* ============================================================
   v36.2 残余卡 · 预览 / 大卡 / 历史卡册
   ============================================================ */

.v362-card-preview {
  margin-top: 16px;
  padding: 12px;
  background: linear-gradient(180deg, rgba(96, 165, 250, 0.05) 0%, rgba(96, 165, 250, 0.01) 100%);
  border: 1px solid rgba(96, 165, 250, 0.3);
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 11px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  cursor: pointer;
  transition: all 0.2s ease;
}
.v362-card-preview:hover {
  border-color: rgba(96, 165, 250, 0.6);
  box-shadow: 0 0 0 1px rgba(96, 165, 250, 0.3);
}
.v362-card-preview-line1 {
  font-weight: 700;
  color: #1d4ed8;
  font-size: 12px;
  letter-spacing: 0.04em;
}
.v362-card-preview-line2 {
  font-size: 9px;
  color: var(--text-tertiary);
  margin-top: 4px;
  font-family: var(--font-cn);
}
.v362-card-preview-cta {
  padding: 6px 12px;
  background: #1d4ed8;
  color: #fff;
  border-radius: 3px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.v362-card-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(8, 12, 20, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 9500;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: v362-fade-in 0.3s ease;
  padding: 40px;
}
@keyframes v362-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}
.v362-card-modal {
  width: 320px;
  height: 480px;
  perspective: 1000px;
  cursor: pointer;
  user-select: none;
}
.v362-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.7s cubic-bezier(0.4, 0.0, 0.2, 1);
}
.v362-card-inner.is-flipped { transform: rotateY(180deg); }
.v362-card-face {
  position: absolute;
  inset: 0;
  border-radius: 8px;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  display: flex;
  flex-direction: column;
  padding: 18px 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6), inset 0 0 0 2px rgba(255, 255, 255, 0.08);
}
.v362-card-face.is-front {
  background: linear-gradient(160deg, #0c1e3a 0%, #1e3a8a 60%, #0c1e3a 100%);
  color: #f5f5f0;
}
.v362-card-face.is-back {
  background: linear-gradient(160deg, #1a1a1a 0%, #0a0a0a 100%);
  color: #fafafa;
  transform: rotateY(180deg);
}
.v362-card-rarity {
  font-size: 9px;
  letter-spacing: 0.2em;
  text-align: right;
  font-weight: 700;
  margin-bottom: 12px;
}
.v362-card-rarity.rarity-N   { color: #9ca3af; }
.v362-card-rarity.rarity-R   { color: #60a5fa; }
.v362-card-rarity.rarity-SR  { color: #a855f7; }
.v362-card-rarity.rarity-SSR { color: #f59e0b; text-shadow: 0 0 8px #f59e0b80; }
.v362-card-rarity.rarity-UR  {
  color: #dc2626;
  text-shadow: 0 0 12px #dc2626;
  animation: v362-ur-pulse 1.4s ease-in-out infinite;
}
@keyframes v362-ur-pulse {
  0%, 100% { text-shadow: 0 0 8px #dc2626; }
  50%      { text-shadow: 0 0 18px #dc2626, 0 0 32px #dc262680; }
}
.v362-card-num {
  font-size: 10px;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: auto;
}
.v362-card-name {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.06em;
  line-height: 1.3;
  margin-bottom: 8px;
}
.v362-card-type {
  font-size: 10px;
  letter-spacing: 0.12em;
  margin-bottom: 4px;
  color: rgba(255, 255, 255, 0.7);
}
.v362-card-context {
  font-size: 10px;
  letter-spacing: 0.05em;
  color: rgba(255, 255, 255, 0.55);
  font-family: var(--font-cn);
}
.v362-card-icon {
  position: absolute;
  bottom: 18px;
  left: 20px;
  font-size: 28px;
  opacity: 0.7;
}
.v362-card-hint {
  position: absolute;
  bottom: 18px;
  right: 20px;
  font-size: 9px;
  color: rgba(255, 255, 255, 0.4);
  letter-spacing: 0.08em;
}
.v362-card-back-title {
  font-size: 10px;
  letter-spacing: 0.18em;
  color: rgba(255, 255, 255, 0.4);
  margin-bottom: 16px;
}
.v362-card-back-text {
  font-size: 11px;
  font-family: var(--font-cn);
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: auto;
  white-space: pre-wrap;
}
.v362-card-back-meta {
  margin-top: 14px;
  font-size: 9px;
  color: rgba(255, 255, 255, 0.4);
  font-family: var(--font-mono);
  line-height: 1.7;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 10px;
}
.v362-card-modal-close {
  position: fixed;
  top: 24px;
  right: 32px;
  z-index: 9600;
  background: rgba(255, 255, 255, 0.08);
  color: #fafafa;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  padding: 6px 14px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  cursor: pointer;
  backdrop-filter: blur(8px);
}
.v362-card-modal-close:hover { background: rgba(255, 255, 255, 0.18); }

/* 雷达图放大 modal */
.v362-radar-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(8, 12, 20, 0.88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 9400;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: v362-fade-in 0.3s ease;
}
.v362-radar-modal-content {
  position: relative;
  background: rgba(255, 255, 255, 0.97);
  border: 1px solid var(--border);
  border-radius: 6px;
  box-shadow: 0 30px 100px rgba(0, 0, 0, 0.6);
  padding: 28px 28px 20px;
  max-width: 90vw;
  max-height: 90vh;
  overflow: auto;
}
.v362-radar-modal-content canvas,
.v362-radar-modal-content svg {
  display: block;
  margin: 0 auto;
}
.v362-radar-modal-caption {
  text-align: center;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--text-tertiary);
  margin-top: 12px;
}
.v362-radar-zoomable {
  cursor: zoom-in;
  transition: filter 0.2s ease;
}
.v362-radar-zoomable:hover { filter: brightness(1.05); }

/* 历史卡册 */
.v362-archive-card {
  display: grid;
  grid-template-columns: 36px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.04);
  border-left: 3px solid var(--text-tertiary);
  border-radius: 2px;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-secondary);
  margin-bottom: 4px;
}
.v362-archive-card.is-accept { border-left-color: #059669; }
.v362-archive-card.is-reject { border-left-color: #dc2626; }
.v362-archive-card.is-modify { border-left-color: #2563eb; }
.v362-archive-idx { color: var(--text-tertiary); font-weight: 700; }
.v362-archive-name { color: var(--text-primary); font-weight: 600; }
.v362-archive-tag {
  font-size: 9px;
  padding: 1px 5px;
  border-radius: 2px;
  background: rgba(0, 0, 0, 0.06);
  color: var(--text-tertiary);
}

/* ============================================================
   v36.3 三幕式 · CLASSIFY → CARD → ARCHIVE
   ============================================================ */

.v363-view {
  position: relative;
  width: 100%;
  min-height: calc(100vh - 48px - 32px - 200px);
  padding: 32px 48px 80px;
  font-family: var(--font-cn);
  color: var(--text-primary);
  z-index: 3;
  box-sizing: border-box;
}

.v363-btn {
  appearance: none;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.94);
  color: var(--text-primary);
  padding: 12px 20px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  border-radius: 3px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.v363-btn:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12); }
.v363-btn:active { transform: translateY(0); }
.v363-btn-primary {
  background: #1d4ed8;
  border-color: #1d4ed8;
  color: #fff;
}
.v363-btn-primary:hover { background: #1e40af; }
.v363-btn-danger {
  background: rgba(220, 38, 38, 0.95);
  border-color: rgba(220, 38, 38, 0.95);
  color: #fff;
}
.v363-btn-danger:hover { background: #b91c1c; }
.v363-btn-ghost {
  background: transparent;
  border-color: var(--border);
  color: var(--text-secondary);
}

/* ----- 顶部幕标 ----- */
.v363-act1-top,
.v363-act2-top,
.v363-act3-top {
  display: flex;
  align-items: baseline;
  gap: 16px;
  margin-bottom: 28px;
  padding-bottom: 12px;
  border-bottom: 1px dashed var(--border);
}
.v363-act1-top-tag,
.v363-act2-top-tag,
.v363-act3-top-tag {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  color: #fff;
  background: #1d4ed8;
  padding: 2px 8px;
  border-radius: 2px;
  font-weight: 700;
}
.v363-act2-top-tag { background: #b91c1c; }
.v363-act3-top-tag { background: #047857; }
.v363-act1-top-name,
.v363-act2-top-name,
.v363-act3-top-name {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.06em;
}
.v363-act1-top-en,
.v363-act2-top-en,
.v363-act3-top-en {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--text-tertiary);
  text-transform: uppercase;
}
.v363-act1-top-id {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-tertiary);
  letter-spacing: 0.1em;
}
.v363-act2-top-note {
  margin-left: auto;
  font-family: var(--font-cn);
  font-size: 12px;
  color: #b91c1c;
  font-style: italic;
}

/* ----- 第一幕 section ----- */
.v363-act1-section {
  margin-bottom: 24px;
  padding: 16px 18px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--border);
  border-radius: 4px;
}
.v363-act1-section-head {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px dashed rgba(0, 0, 0, 0.08);
}
.v363-act1-section-title {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.06em;
}
.v363-act1-section-en {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.2em;
  color: var(--text-tertiary);
  text-transform: uppercase;
}

.v363-act1-empty {
  font-size: 11px;
  color: var(--text-tertiary);
  font-style: italic;
  padding: 8px 0;
}

.v363-act1-input-body {
  display: flex;
  align-items: center;
  gap: 16px;
}
.v363-act1-input-image {
  max-width: 220px;
  max-height: 120px;
  border: 1px solid var(--border);
  border-radius: 3px;
  object-fit: cover;
}
.v363-act1-input-text {
  flex: 1;
  font-family: var(--font-cn);
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-primary);
  padding: 8px 10px;
  background: rgba(0, 0, 0, 0.03);
  border-radius: 3px;
  min-height: 60px;
}
.v363-act1-input-meta {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--text-tertiary);
  letter-spacing: 0.06em;
  margin-top: 8px;
  padding-top: 6px;
  border-top: 1px dotted rgba(0, 0, 0, 0.08);
}

.v363-act1-context-name {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 6px;
}
.v363-act1-context-rationale {
  font-size: 12px;
  line-height: 1.6;
  color: var(--text-secondary);
  font-family: var(--font-cn);
}

.v363-act1-radar-body {
  text-align: center;
}
.v363-act1-radar-canvas {
  display: inline-block;
  max-width: 100%;
}
.v363-act1-radar-canvas canvas,
.v363-act1-radar-canvas svg {
  display: block;
  margin: 0 auto;
  cursor: zoom-in;
  max-width: 100%;
}
.v363-act1-radar-caption {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-tertiary);
  letter-spacing: 0.08em;
  margin-top: 10px;
}

.v363-act1-dim-row {
  padding: 8px 0;
  border-bottom: 1px dotted rgba(0, 0, 0, 0.08);
}
.v363-act1-dim-row:last-child { border-bottom: none; }
.v363-act1-dim-line {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 4px;
}
.v363-act1-dim-num {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-tertiary);
  letter-spacing: 0.05em;
}
.v363-act1-dim-name {
  flex: 1;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}
.v363-act1-dim-score {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
}
.v363-act1-dim-rationale {
  font-size: 11px;
  line-height: 1.5;
  color: var(--text-secondary);
  margin-bottom: 4px;
  font-family: var(--font-cn);
}
.v363-act1-dim-evidence {
  font-size: 10px;
  color: var(--text-tertiary);
  font-style: italic;
  font-family: var(--font-mono);
}

.v363-act1-deleted-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 4px 0;
  font-size: 12px;
  color: var(--text-secondary);
}
.v363-act1-deleted-mark {
  color: #7f1d1d;
  font-weight: 700;
}
.v363-act1-deleted-text {
  text-decoration: line-through;
  text-decoration-color: rgba(127, 29, 29, 0.4);
  font-family: var(--font-cn);
}

.v363-act1-reverse-body p {
  margin: 0;
  font-size: 12px;
  line-height: 1.7;
  color: var(--text-secondary);
  font-family: var(--font-cn);
  font-style: italic;
}

.v363-act1-actions {
  display: flex;
  gap: 12px;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px dashed var(--border);
  justify-content: center;
}

/* ----- 第二幕：核弹文案 ----- */
.v363-act2-wrap {
  text-align: center;
}
.v363-act2-bomb {
  margin: 32px auto 40px;
  max-width: 800px;
  font-family: var(--font-cn);
  color: var(--text-primary);
  animation: v363-bomb-fade 1.5s ease;
}
.v363-act2-bomb-line1,
.v363-act2-bomb-line2 {
  font-size: clamp(20px, 3.4vw, 36px);
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: 0.04em;
  margin: 12px 0;
}
.v363-act2-bomb-line1 { color: var(--text-secondary); }
.v363-act2-bomb-line2 {
  color: #1d4ed8;
  position: relative;
  display: inline-block;
}
.v363-act2-bomb-line2::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent 0%, #1d4ed8 50%, transparent 100%);
  animation: v363-bomb-underline 2.5s ease-in-out infinite;
}
@keyframes v363-bomb-fade {
  from { opacity: 0; transform: translateY(-12px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes v363-bomb-underline {
  0%, 100% { opacity: 0.3; }
  50%      { opacity: 1; }
}

.v363-act2-card-wrap {
  margin: 32px auto;
  perspective: 1200px;
}
.v363-card-modal {
  width: 320px;
  height: 480px;
  margin: 0 auto;
  perspective: 1000px;
  cursor: pointer;
  user-select: none;
}
.v363-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.7s cubic-bezier(0.4, 0.0, 0.2, 1);
}
.v363-card-inner.is-flipped { transform: rotateY(180deg); }
.v363-card-face {
  position: absolute;
  inset: 0;
  border-radius: 8px;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  display: flex;
  flex-direction: column;
  padding: 18px 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4), inset 0 0 0 2px rgba(255, 255, 255, 0.08);
}
.v363-card-face.is-front {
  background: linear-gradient(160deg, #0c1e3a 0%, #1e3a8a 60%, #0c1e3a 100%);
  color: #f5f5f0;
}
.v363-card-face.is-back {
  background: linear-gradient(160deg, #1a1a1a 0%, #0a0a0a 100%);
  color: #fafafa;
  transform: rotateY(180deg);
  overflow: auto;
}
.v363-card-rarity {
  font-size: 9px;
  letter-spacing: 0.2em;
  text-align: right;
  font-weight: 700;
  margin-bottom: 12px;
}
.v363-card-rarity.rarity-N   { color: #9ca3af; }
.v363-card-rarity.rarity-R   { color: #60a5fa; }
.v363-card-rarity.rarity-SR  { color: #a855f7; }
.v363-card-rarity.rarity-SSR { color: #f59e0b; text-shadow: 0 0 8px #f59e0b80; }
.v363-card-rarity.rarity-UR  {
  color: #dc2626;
  text-shadow: 0 0 12px #dc2626;
  animation: v362-ur-pulse 1.4s ease-in-out infinite;
}
.v363-card-num {
  font-size: 10px;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: auto;
}
.v363-card-name {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.06em;
  line-height: 1.3;
  margin-bottom: 8px;
}
.v363-card-type {
  font-size: 10px;
  letter-spacing: 0.12em;
  margin-bottom: 4px;
  color: rgba(255, 255, 255, 0.7);
}
.v363-card-context {
  font-size: 10px;
  letter-spacing: 0.05em;
  color: rgba(255, 255, 255, 0.55);
  font-family: var(--font-cn);
}
.v363-card-icon {
  position: absolute;
  bottom: 18px;
  left: 20px;
  font-size: 28px;
  opacity: 0.7;
}
.v363-card-hint {
  position: absolute;
  bottom: 18px;
  right: 20px;
  font-size: 9px;
  color: rgba(255, 255, 255, 0.4);
  letter-spacing: 0.08em;
}
.v363-card-back-title {
  font-size: 10px;
  letter-spacing: 0.18em;
  color: rgba(255, 255, 255, 0.4);
  margin-bottom: 12px;
}
.v363-card-back-block {
  margin-bottom: 12px;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.04);
  border-left: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 2px;
}
.v363-card-back-block-title {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 6px;
}
.v363-card-back-block-list {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.v363-card-back-block-row {
  display: flex;
  align-items: baseline;
  gap: 6px;
  font-size: 10px;
  color: rgba(255, 255, 255, 0.7);
}
.v363-card-back-block-mark {
  color: rgba(255, 255, 255, 0.4);
  font-weight: 700;
  width: 10px;
  text-align: center;
}
.v363-card-back-block-text {
  flex: 1;
  font-family: var(--font-cn);
}
.v363-card-back-empty {
  font-size: 9px;
  color: rgba(255, 255, 255, 0.3);
  font-style: italic;
}
.v363-card-refused {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 10px;
  padding: 6px 8px;
  background: rgba(220, 38, 38, 0.12);
  border-left: 2px solid rgba(220, 38, 38, 0.5);
  border-radius: 2px;
}
.v363-card-back-meta {
  font-size: 9px;
  color: rgba(255, 255, 255, 0.4);
  font-family: var(--font-mono);
  line-height: 1.7;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 8px;
  white-space: pre-wrap;
}

.v363-act2-sub {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--text-tertiary);
  margin: 8px auto 16px;
}
.v363-act2-actions {
  display: flex;
  gap: 12px;
  margin-top: 32px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ----- 第三幕 ----- */
.v363-act3-wrap {
  max-width: 980px;
  margin: 0 auto;
}
.v363-act3-reuse-notice {
  margin-bottom: 24px;
  padding: 16px 20px;
  background: linear-gradient(180deg, rgba(220, 38, 38, 0.06) 0%, rgba(220, 38, 38, 0.01) 100%);
  border: 1px solid rgba(220, 38, 38, 0.4);
  border-left: 4px solid #dc2626;
  border-radius: 3px;
}
.v363-act3-reuse-title {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: #b91c1c;
  margin-bottom: 6px;
}
.v363-act3-reuse-body {
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-primary);
  font-family: var(--font-cn);
  white-space: pre-line;
}

.v363-archive-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
}
.v363-archive-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
  padding: 14px 18px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--border);
  border-left: 4px solid var(--text-tertiary);
  border-radius: 3px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.v363-archive-row:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
}
.v363-archive-row.is-accept  { border-left-color: #059669; }
.v363-archive-row.is-reject  { border-left-color: #b91c1c; }
.v363-archive-row.is-modify  { border-left-color: #2563eb; }
.v363-archive-row.is-refused {
  background: repeating-linear-gradient(135deg, rgba(220, 38, 38, 0.04) 0px, rgba(220, 38, 38, 0.04) 8px, transparent 8px, transparent 16px);
}
.v363-archive-idx {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-tertiary);
  letter-spacing: 0.08em;
  font-weight: 700;
}
.v363-archive-name {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px;
}
.v363-archive-cardname {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
}
.v363-archive-meta {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-tertiary);
  letter-spacing: 0.05em;
}
.v363-archive-ctx,
.v363-archive-dims,
.v363-archive-deleted {
  font-size: 11px;
  line-height: 1.5;
  color: var(--text-secondary);
  font-family: var(--font-cn);
}
.v363-archive-stats {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-tertiary);
  margin-top: 4px;
}
.v363-archive-stat.is-clean { color: #059669; }
.v363-archive-stat.is-polluted { color: #b91c1c; }
.v363-archive-stat-divider { opacity: 0.5; }
.v363-archive-empty {
  font-size: 12px;
  color: var(--text-tertiary);
  font-style: italic;
  padding: 32px;
  text-align: center;
}
.v363-act3-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px dashed var(--border);
}

/* ============================================================
   v36.3-restore · 卡 modal 增强（核弹文案 + 4 按钮）
   ============================================================ */
.v362-card-modal-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 0 8px;
}
.v362-card-bomb {
  text-align: center;
  margin-bottom: 6px;
  animation: v362-bomb-in 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.v362-card-bomb-line1,
.v362-card-bomb-line2 {
  font-family: var(--font-cn);
  font-size: clamp(18px, 2.4vw, 28px);
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: 0.04em;
  margin: 6px 0;
}
.v362-card-bomb-line1 { color: #d1d5db; }
.v362-card-bomb-line2 {
  color: #60a5fa;
  text-shadow: 0 0 16px rgba(96, 165, 250, 0.5);
  position: relative;
  display: inline-block;
}
.v362-card-bomb-line2::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent 0%, #60a5fa 50%, transparent 100%);
  animation: v362-bomb-underline 2.5s ease-in-out infinite;
}
@keyframes v362-bomb-in {
  from { opacity: 0; transform: translateY(-10px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes v362-bomb-underline {
  0%, 100% { opacity: 0.3; }
  50%      { opacity: 1; }
}

.v362-card-status,
.v362-card-archive-id {
  font-size: 10px;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.55);
  font-family: var(--font-mono);
  margin-top: 4px;
}

.v362-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  max-width: 480px;
}
.v362-modal-btn {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.08);
  color: #fafafa;
  padding: 10px 18px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  border-radius: 3px;
  cursor: pointer;
  transition: all 0.2s ease;
  backdrop-filter: blur(6px);
  white-space: nowrap;
}
.v362-modal-btn:hover { transform: translateY(-1px); background: rgba(255, 255, 255, 0.16); }
.v362-modal-btn-primary {
  background: #1d4ed8;
  border-color: #1d4ed8;
  color: #fff;
}
.v362-modal-btn-primary:hover { background: #1e40af; }
.v362-modal-btn-danger {
  background: rgba(220, 38, 38, 0.9);
  border-color: rgba(220, 38, 38, 0.9);
  color: #fff;
}
.v362-modal-btn-danger:hover { background: #b91c1c; }
.v362-modal-btn-ghost {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.25);
  color: rgba(255, 255, 255, 0.75);
}

/* 报告卡震动动画 */
.v362-shake {
  animation: v362-report-shake 1.1s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
  transform-origin: 50% 50%;
  z-index: 9000;
}
@keyframes v362-report-shake {
  10%, 90% { transform: translate3d(-1px, 0, 0); }
  20%, 80% { transform: translate3d(2px, 0, 0); }
  30%, 50%, 70% { transform: translate3d(-4px, 0, 0); }
  40%, 60% { transform: translate3d(4px, 0, 0); }
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50%      { transform: translate3d(0, 0, 0) scale(1.02); }
}

/* ============================================================
   v36.3-restore · 偏见档案库 modal（卡册式）
   ============================================================ */
.v362-archive-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(8, 12, 20, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 9500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: v362-fade-in 0.3s ease;
}
.v362-archive-modal-wrap {
  width: 100%;
  max-width: 1100px;
  max-height: 90vh;
  overflow-y: auto;
  background: rgba(15, 18, 26, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  padding: 24px 28px;
  font-family: var(--font-cn);
  color: #fafafa;
  box-shadow: 0 30px 100px rgba(0, 0, 0, 0.7);
}
.v362-archive-modal-head {
  display: flex;
  align-items: baseline;
  gap: 16px;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.v362-archive-modal-title {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.06em;
}
.v362-archive-modal-en {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  color: rgba(255, 255, 255, 0.5);
  text-transform: uppercase;
}
.v362-archive-modal-count {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 10px;
  color: rgba(255, 255, 255, 0.6);
  padding: 3px 10px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 2px;
}
.v362-archive-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}
.v362-archive-grid-card {
  position: relative;
  padding: 14px 12px 12px;
  background: linear-gradient(160deg, #0c1e3a 0%, #1a2742 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
  min-height: 180px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.v362-archive-grid-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.4);
  border-color: rgba(96, 165, 250, 0.5);
}
.v362-archive-grid-card.is-accept { border-color: rgba(74, 222, 128, 0.4); }
.v362-archive-grid-card.is-reject { border-color: rgba(220, 38, 38, 0.4); }
.v362-archive-grid-card.is-refused {
  background: repeating-linear-gradient(135deg, #1a1a1a 0px, #1a1a1a 8px, #0a0a0a 8px, #0a0a0a 16px);
}
.v362-archive-grid-card.is-polluted {
  border-color: rgba(250, 204, 21, 0.4);
}
.v362-archive-card-rarity {
  position: absolute;
  top: 8px;
  right: 10px;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.15em;
}
.v362-archive-card-rarity.rarity-N   { color: #9ca3af; }
.v362-archive-card-rarity.rarity-R   { color: #60a5fa; }
.v362-archive-card-rarity.rarity-SR  { color: #a855f7; }
.v362-archive-card-rarity.rarity-SSR { color: #f59e0b; text-shadow: 0 0 6px #f59e0b80; }
.v362-archive-card-rarity.rarity-UR  { color: #dc2626; text-shadow: 0 0 10px #dc2626; }
.v362-archive-card-id {
  font-family: var(--font-mono);
  font-size: 9px;
  color: rgba(255, 255, 255, 0.5);
  letter-spacing: 0.05em;
  margin-top: 14px;
}
.v362-archive-card-name {
  font-size: 13px;
  font-weight: 700;
  color: #fafafa;
  line-height: 1.3;
  margin-bottom: 4px;
}
.v362-archive-card-status {
  font-family: var(--font-mono);
  font-size: 9px;
  color: rgba(255, 255, 255, 0.7);
  letter-spacing: 0.04em;
}
.v362-archive-card-context {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.6);
  font-family: var(--font-cn);
  flex: 1;
}
.v362-archive-card-stats {
  display: flex;
  gap: 4px;
  font-family: var(--font-mono);
  font-size: 9px;
  color: rgba(255, 255, 255, 0.5);
  letter-spacing: 0.03em;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 6px;
  margin-top: 6px;
}
.v362-archive-card-pollute.is-clean     { color: #4ade80; }
.v362-archive-card-pollute.is-polluted  { color: #facc15; }

.v362-archive-empty {
  padding: 60px 20px;
  text-align: center;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.4);
  font-style: italic;
  font-family: var(--font-cn);
}

.v362-archive-reuse-notice {
  margin: 16px 0 24px;
  padding: 12px 16px;
  background: rgba(220, 38, 38, 0.1);
  border: 1px solid rgba(220, 38, 38, 0.4);
  border-left: 4px solid #dc2626;
  border-radius: 3px;
  font-size: 12px;
  line-height: 1.55;
  font-family: var(--font-cn);
}
.v362-archive-reuse-mark {
  color: #dc2626;
  font-weight: 700;
  margin-right: 6px;
}
.v362-archive-reuse-text {
  color: rgba(255, 255, 255, 0.85);
}

.v362-archive-modal-actions {
  display: flex;
  justify-content: center;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

/* ============================================================
   v36.4 · 3 组仪式化面板（祭品 / 献祭掉的 / 召唤物）
   透明嵌入底图；位置：固定左侧上下排列
   ============================================================ */
.v36-ritual-sidebar {
  position: fixed;
  top: 80px;
  left: 16px;
  width: 360px;
  max-height: calc(100vh - 240px);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
  z-index: 4;
  font-family: var(--font-cn);
  pointer-events: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.2) transparent;
}
.v36-ritual-sidebar::-webkit-scrollbar { width: 4px; }
.v36-ritual-sidebar::-webkit-scrollbar-track { background: transparent; }
.v36-ritual-sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.2); border-radius: 2px; }
.v36-ritual-panel {
  background: rgba(8, 12, 20, 0.55);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 4px;
  border-left: 3px solid rgba(255, 255, 255, 0.2);
  padding: 12px 14px 14px;
  color: #fafafa;
  font-size: 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
  transition: all 0.2s ease;
  flex-shrink: 0;
}
.v36-ritual-panel:hover {
  background: rgba(8, 12, 20, 0.75);
  border-left-color: rgba(96, 165, 250, 0.6);
  transform: translateX(2px);
}
.v36-ritual-offerings { border-left-color: rgba(74, 222, 128, 0.85); }
.v36-ritual-sacrificed { border-left-color: rgba(220, 38, 38, 0.85); }
.v36-ritual-summoned   { border-left-color: rgba(96, 165, 250, 0.85); }

.v36-ritual-head {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.v36-ritual-mark {
  font-family: var(--font-mono);
  font-size: 14px;
  color: rgba(255, 255, 255, 0.9);
  font-weight: 700;
}
.v36-ritual-cn {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.06em;
}
.v36-ritual-offerings .v36-ritual-cn { color: #4ade80; }
.v36-ritual-sacrificed .v36-ritual-cn { color: #f87171; }
.v36-ritual-summoned   .v36-ritual-cn { color: #60a5fa; }
.v36-ritual-en {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.15em;
  color: rgba(255, 255, 255, 0.5);
  text-transform: uppercase;
}
.v36-ritual-count {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 10px;
  color: rgba(255, 255, 255, 0.7);
  background: rgba(255, 255, 255, 0.1);
  padding: 2px 7px;
  border-radius: 8px;
  font-weight: 700;
}

.v36-ritual-list {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.v36-ritual-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 4px 0;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.9);
  border-bottom: 1px dotted rgba(255, 255, 255, 0.06);
}
.v36-ritual-row:last-child { border-bottom: none; }
.v36-ritual-row-num {
  font-family: var(--font-mono);
  font-size: 9px;
  color: rgba(255, 255, 255, 0.45);
  flex-shrink: 0;
  font-weight: 600;
}
.v36-ritual-row-name {
  flex: 1;
  font-family: var(--font-cn);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: 0.02em;
  font-weight: 500;
}
.v36-ritual-row-score {
  font-family: var(--font-mono);
  font-size: 10px;
  color: rgba(255, 255, 255, 0.7);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.v36-ritual-row-source {
  font-family: var(--font-mono);
  font-size: 9px;
  color: rgba(255, 255, 255, 0.4);
  letter-spacing: 0.02em;
  max-width: 100px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 献祭的：划去 + 暗红 */
.v36-ritual-row.is-sacrificed .v36-ritual-row-name {
  text-decoration: line-through;
  text-decoration-color: rgba(248, 113, 113, 0.7);
  text-decoration-thickness: 1.5px;
  color: rgba(255, 255, 255, 0.5);
}

/* 召唤的：特殊 kind 着色 */
.v36-ritual-row.is-residual-card .v36-ritual-row-name {
  color: #60a5fa;
  font-weight: 700;
}
.v36-ritual-row.is-refused .v36-ritual-row-name {
  color: #f87171;
  font-weight: 700;
}
.v36-ritual-row.is-proxy-pollution .v36-ritual-row-name {
  color: #facc15;
  font-weight: 700;
}

.v36-ritual-empty {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.3);
  font-style: italic;
  padding: 6px 0;
  font-family: var(--font-cn);
}

/* 小屏适配：折回顶部 */
@media (max-width: 1400px) {
  .v36-ritual-sidebar { width: 320px; }
}
@media (max-width: 1200px) {
  .v36-ritual-sidebar {
    width: 280px;
    top: 70px;
    left: 12px;
  }
}
@media (max-width: 900px) {
  .v36-ritual-sidebar {
    position: relative;
    top: auto;
    left: auto;
    width: calc(100% - 24px);
    max-height: none;
    margin: 12px;
  }
}

/* ============================================================
   v36.9 · 密钥输入框安全样式
   ============================================================ */
.input-with-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
}
.input-with-actions .api-key-input {
  flex: 1;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  letter-spacing: 0.05em;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(220, 38, 38, 0.3);
  border-radius: 3px;
  color: #fafafa;
  padding: 8px 10px;
  font-size: 13px;
  transition: all 0.2s ease;
}
.input-with-actions .api-key-input:focus {
  outline: none;
  border-color: rgba(220, 38, 38, 0.6);
  background: rgba(0, 0, 0, 0.45);
  box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.15);
}
.input-with-actions .api-key-input:read-only {
  background: rgba(0, 0, 0, 0.2);
  border-color: rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.55);
  cursor: pointer;
}
.input-with-actions .api-key-input:read-only:hover {
  border-color: rgba(220, 38, 38, 0.4);
  color: rgba(255, 255, 255, 0.8);
}
.key-action-btn {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.06);
  color: #d1d5db;
  padding: 8px 10px;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 11px;
  font-weight: 600;
  border-radius: 3px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
  flex-shrink: 0;
}
.key-action-btn:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(96, 165, 250, 0.4);
  color: #fafafa;
}
.key-action-btn:active {
  transform: translateY(1px);
}
.key-action-btn.danger {
  border-color: rgba(220, 38, 38, 0.4);
  color: #fca5a5;
}
.key-action-btn.danger:hover {
  background: rgba(220, 38, 38, 0.15);
  border-color: rgba(220, 38, 38, 0.7);
  color: #fecaca;
}
.key-status {
  margin-left: 8px;
  font-size: 10px;
  letter-spacing: 0.05em;
  padding: 2px 6px;
  border-radius: 3px;
  font-weight: 600;
}
.key-status.is-saved {
  background: rgba(34, 197, 94, 0.15);
  color: #86efac;
  border: 1px solid rgba(34, 197, 94, 0.3);
}
.key-status.is-pending {
  background: rgba(234, 179, 8, 0.15);
  color: #fde68a;
  border: 1px solid rgba(234, 179, 8, 0.3);
}
.key-hint {
  margin-top: 6px;
  font-size: 10.5px;
  line-height: 1.6;
  color: rgba(252, 165, 165, 0.85);
}
.key-hint code {
  background: rgba(0, 0, 0, 0.4);
  padding: 1px 4px;
  border-radius: 2px;
  color: #fca5a5;
  font-size: 10px;
}
@media (max-width: 900px) {
  .input-with-actions {
    flex-wrap: wrap;
  }
  .input-with-actions .api-key-input {
    flex-basis: 100%;
    min-width: 100%;
  }
  .key-action-btn {
    flex: 1;
  }
}

/* ============================================================
   v36.10 · 密钥面板折叠态（默认隐藏输入框）
   ============================================================ */
.key-locked-panel {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px dashed rgba(220, 38, 38, 0.4);
  border-radius: 4px;
  background-image: linear-gradient(
    135deg,
    rgba(220, 38, 38, 0.06) 0%,
    rgba(220, 38, 38, 0.02) 25%,
    transparent 50%,
    rgba(220, 38, 38, 0.02) 75%,
    rgba(220, 38, 38, 0.06) 100%
  );
}
.key-locked-icon {
  font-size: 22px;
  color: rgba(220, 38, 38, 0.7);
  filter: drop-shadow(0 0 4px rgba(220, 38, 38, 0.4));
  animation: key-lock-pulse 2.5s ease-in-out infinite;
}
@keyframes key-lock-pulse {
  0%, 100% { opacity: 0.7; }
  50% { opacity: 1; }
}
.key-locked-text {
  flex: 1;
  font-size: 11.5px;
  color: rgba(255, 255, 255, 0.55);
  letter-spacing: 0.05em;
}
.key-unlock-btn {
  background: linear-gradient(180deg, #1d4ed8 0%, #1e40af 100%);
  border-color: #1e40af;
  color: #fff;
  font-weight: 700;
  padding: 8px 14px;
  letter-spacing: 0.08em;
}
.key-unlock-btn:hover {
  background: linear-gradient(180deg, #2563eb 0%, #1d4ed8 100%);
  border-color: #2563eb;
  box-shadow: 0 0 12px rgba(96, 165, 250, 0.4);
}
.key-row-collapsed[hidden] { display: none; }
.key-row-expanded[hidden] { display: none; }
.key-row-expanded {
  animation: key-expand-fade 0.3s ease;
}
@keyframes key-expand-fade {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}
