/* =========================================================
   咖啡店客诉模拟训练系统 - 手机端适配样式 (Mobile-First)
   ========================================================= */

:root {
  --bg-page: #18181b;
  --bg-app: #f6f4f0;
  --bg-card: #ffffff;
  --primary: #6f4e37;
  --primary-dark: #543927;
  --primary-light: #f3ebe4;
  --accent: #d97706;
  --success: #16a34a;
  --success-bg: #dcfce7;
  --danger: #dc2626;
  --danger-bg: #fee2e2;
  --text-main: #1f2937;
  --text-muted: #6b7280;
  --border: #e5e0d8;
  --locked-bg: #1f2023;
  --locked-text: #71717a;
  --radius: 14px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  background-color: var(--bg-page);
  color: var(--text-main);
}

/* 手机端外壳：在电脑浏览器上居中显示为手机屏幕尺寸，在手机上全屏铺满 */
.mobile-shell {
  width: 100%;
  max-width: 430px;
  height: 100dvh;
  margin: 0 auto;
  background-color: var(--bg-app);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  box-shadow: 0 0 36px rgba(0, 0, 0, 0.45);
}

/* 顶部导航栏 */
.app-header {
  background: var(--primary);
  color: #fff;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
  z-index: 10;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.app-logo {
  font-size: 24px;
}

.app-title {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.25;
}

.app-subtitle {
  font-size: 11px;
  opacity: 0.85;
  margin-top: 2px;
}

.header-actions {
  display: flex;
  gap: 6px;
}

.icon-btn {
  background: rgba(255, 255, 255, 0.16);
  border: none;
  color: #fff;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.icon-btn:active {
  transform: scale(0.95);
}

/* 主内容区 */
.app-main {
  flex: 1;
  overflow-y: auto;
  position: relative;
}

.tab-view {
  display: none;
  min-height: 100%;
  padding: 14px;
}

.tab-view.active {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* 底部 Tab 导航 */
.bottom-nav {
  height: 62px;
  background: #ffffff;
  border-top: 1px solid var(--border);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  flex-shrink: 0;
  z-index: 10;
}

.nav-item {
  background: none;
  border: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: var(--text-muted);
  cursor: pointer;
  position: relative;
  font-size: 12px;
}

.nav-item.active {
  color: var(--primary);
  font-weight: 700;
}

.nav-icon {
  font-size: 19px;
}

.nav-badge {
  position: absolute;
  top: 6px;
  right: 22%;
  background: var(--danger);
  color: #fff;
  font-size: 10px;
  min-width: 17px;
  height: 17px;
  border-radius: 99px;
  padding: 0 5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

/* 通用卡片与排版 */
.section-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 15px;
  border: 1px solid var(--border);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
}

.section-title {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.section-desc {
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.5;
}

/* 按钮 */
.btn {
  border: none;
  border-radius: 10px;
  padding: 11px 16px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: opacity 0.15s, transform 0.1s;
}

.btn:active:not(:disabled) {
  transform: scale(0.98);
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.btn-block {
  width: 100%;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
}

.btn-accent {
  background: var(--accent);
  color: #fff;
}

.btn-danger {
  background: var(--danger);
  color: #fff;
}

.btn-secondary {
  background: #e5e7eb;
  color: #374151;
}

.btn-sm {
  padding: 6px 11px;
  font-size: 12px;
  border-radius: 8px;
}

/* 抽卡模块：双卡库展示与抽卡结果 */
.pool-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 12px 0;
}

.pool-box {
  background: var(--primary-light);
  border: 1px dashed var(--primary);
  border-radius: 10px;
  padding: 12px;
  text-align: center;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  position: relative;
  overflow: hidden;
}

.pool-box.is-shuffling {
  border-style: solid;
  border-color: var(--accent);
  box-shadow: 0 0 18px rgba(217, 119, 6, 0.38);
  animation: poolPulse 0.36s ease-in-out infinite alternate;
}

@keyframes poolPulse {
  0% {
    transform: translateY(0) scale(1);
  }
  100% {
    transform: translateY(-3px) scale(1.03);
  }
}

.pool-box-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--primary-dark);
}

.pool-box-count {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* 抽卡合成动画舞台 */
.draw-anim-stage {
  margin-top: 12px;
  background: radial-gradient(circle at center, #3b2618 0%, #1c130d 100%);
  border: 1.5px solid #f59e0b;
  border-radius: 14px;
  padding: 18px 12px;
  color: #fff;
  text-align: center;
  position: relative;
  overflow: hidden;
  perspective: 800px;
}

.draw-anim-cards {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-bottom: 10px;
}

.anim-card {
  width: 118px;
  height: 142px;
  border-radius: 11px;
  padding: 10px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.45);
  transform-style: preserve-3d;
}

.anim-card.char-card {
  background: linear-gradient(145deg, #7c583f, #4b3323);
  border: 1.5px solid #fbbf24;
  animation: flipAndMergeLeft 1.05s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.anim-card.evt-card {
  background: linear-gradient(145deg, #d97706, #92400e);
  border: 1.5px solid #fde68a;
  animation: flipAndMergeRight 1.05s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.anim-card-icon {
  font-size: 28px;
}

.anim-card-label {
  font-size: 11px;
  font-weight: 700;
  color: #fde68a;
}

.anim-card-rolling {
  font-size: 11.5px;
  color: #fff;
  line-height: 1.3;
  min-height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.anim-plus-spark {
  font-size: 22px;
  font-weight: 800;
  color: #fbbf24;
  animation: sparkSpin 0.6s linear infinite;
}

.draw-anim-status {
  font-size: 12.5px;
  color: #fde68a;
  font-weight: 600;
  letter-spacing: 0.5px;
}

@keyframes flipAndMergeLeft {
  0% {
    transform: translateX(-28px) rotateY(0deg) scale(0.85);
    opacity: 0.4;
  }
  45% {
    transform: translateX(0px) rotateY(360deg) scale(1.04);
    opacity: 1;
  }
  80% {
    transform: translateX(18px) rotateY(540deg) scale(0.96);
  }
  100% {
    transform: translateX(0px) rotateY(720deg) scale(1);
  }
}

@keyframes flipAndMergeRight {
  0% {
    transform: translateX(28px) rotateY(0deg) scale(0.85);
    opacity: 0.4;
  }
  45% {
    transform: translateX(0px) rotateY(-360deg) scale(1.04);
    opacity: 1;
  }
  80% {
    transform: translateX(-18px) rotateY(-540deg) scale(0.96);
  }
  100% {
    transform: translateX(0px) rotateY(-720deg) scale(1);
  }
}

@keyframes sparkSpin {
  0% {
    transform: scale(0.9) rotate(0deg);
  }
  50% {
    transform: scale(1.3) rotate(180deg);
  }
  100% {
    transform: scale(0.9) rotate(360deg);
  }
}

.drawn-pack-preview {
  background: #fffbeb;
  border: 1.5px solid #f59e0b;
  border-radius: 12px;
  padding: 13px;
  margin-top: 12px;
}

.drawn-pack-preview.just-revealed {
  animation: packRevealPop 0.45s cubic-bezier(0.18, 1.25, 0.4, 1) forwards;
}

@keyframes packRevealPop {
  0% {
    transform: scale(0.86);
    opacity: 0;
    box-shadow: 0 0 0 rgba(245, 158, 11, 0);
  }
  60% {
    transform: scale(1.03);
    opacity: 1;
    box-shadow: 0 0 24px rgba(245, 158, 11, 0.55);
  }
  100% {
    transform: scale(1);
    opacity: 1;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.18);
  }
}

.mini-card.flip-in-1 {
  animation: cardFlipReveal 0.4s ease-out 0.05s both;
}

.mini-card.flip-in-2 {
  animation: cardFlipReveal 0.4s ease-out 0.18s both;
}

@keyframes cardFlipReveal {
  0% {
    transform: rotateX(-75deg) translateY(8px);
    opacity: 0;
  }
  100% {
    transform: rotateX(0deg) translateY(0);
    opacity: 1;
  }
}

/* =========================================================
   精简双面卡 (角色卡 & 事件卡：正面极简封面 / 反面清晰详情)
   ========================================================= */
.char-flip-card {
  cursor: pointer;
  user-select: none;
  width: 100%;
}

.char-face {
  border-radius: 10px;
  padding: 11px 13px;
  animation: cardFlipQuick 0.28s ease-out;
}

@keyframes cardFlipQuick {
  0% {
    opacity: 0.4;
    transform: rotateX(-35deg) scale(0.98);
  }
  100% {
    opacity: 1;
    transform: rotateX(0deg) scale(1);
  }
}

/* 默认只显示正面封面，点击翻转后切换显示反面详情（彻底解决正面被反面撑高留白的问题） */
.char-flip-card .char-face-back {
  display: none;
}

.char-flip-card.is-flipped .char-face-front {
  display: none;
}

.char-flip-card.is-flipped .char-face-back {
  display: block;
}

/* 正面：极简封面 */
.char-face-front {
  background: #fdfaf6;
  border: 1.5px solid #d6c5b3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.char-front-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.char-front-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: #f3ebe2;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.char-front-info {
  min-width: 0;
}

.char-front-title-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.char-front-name {
  font-size: 14.5px;
  font-weight: 800;
  color: var(--primary-dark);
}

.char-mini-tag {
  font-size: 10.5px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 4px;
  background: var(--primary);
  color: #fff;
}

.char-front-sub {
  font-size: 11.5px;
  color: var(--text-muted);
  margin-top: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.char-flip-btn {
  font-size: 11px;
  font-weight: 700;
  color: var(--primary);
  background: #f3ebe2;
  padding: 4px 8px;
  border-radius: 6px;
  white-space: nowrap;
  flex-shrink: 0;
}

/* 反面：详细内容 */
.char-face-back {
  background: #271d16;
  border: 1.5px solid #d97706;
  color: #f9fafb;
}

.char-back-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 6px;
  margin-bottom: 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.char-back-title {
  font-size: 13px;
  font-weight: 700;
  color: #fbbf24;
}

.char-back-flip {
  font-size: 11px;
  color: #fde68a;
}

.char-back-desc {
  font-size: 12.5px;
  color: #e5e7eb;
  line-height: 1.58;
}

/* 事件卡暖色变体 */
.char-flip-card.event-theme .char-face-front {
  background: #fffcf5;
  border-color: #f59e0b;
}

.char-flip-card.event-theme .char-front-icon {
  background: #fef3c7;
}

.char-flip-card.event-theme .char-mini-tag {
  background: var(--accent);
}

.char-flip-card.event-theme .char-flip-btn {
  background: #fef3c7;
  color: #b45309;
}

/* =========================================================
   独立常驻 ABSA 顾客感知监控面板（区间 -100 ~ +100，从 0 开始）
   ========================================================= */
.absa-dock-panel {
  background: #ffffff;
  border-bottom: 1.5px solid var(--border);
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-shrink: 0;
}

.absa-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.absa-title {
  font-size: 12.5px;
  font-weight: 800;
  color: var(--primary-dark);
}

.absa-score-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 99px;
}

.absa-score-badge.mood-angry {
  background: #fee2e2;
  color: #dc2626;
}

.absa-score-badge.mood-upset {
  background: #ffedd5;
  color: #ea580c;
}

.absa-score-badge.mood-calm {
  background: #dbeafe;
  color: #2563eb;
}

.absa-score-badge.mood-satisfied {
  background: #dcfce7;
  color: #16a34a;
}

.absa-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.absa-metric {
  background: #faf8f5;
  border: 1px solid #ede8e1;
  border-radius: 8px;
  padding: 6px 8px;
}

.absa-metric-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11.5px;
  font-weight: 600;
  color: #374151;
  margin-bottom: 4px;
}

.absa-delta {
  font-size: 10.5px;
  font-weight: 700;
  margin-left: 3px;
}

.absa-delta.pos {
  color: #16a34a;
}

.absa-delta.neg {
  color: #dc2626;
}

/* 双向进度条：中点 50% 为 0，右侧 0~+100，左侧 -100~0 */
.absa-bi-bar {
  height: 5px;
  background: #e5e7eb;
  border-radius: 99px;
  position: relative;
  overflow: hidden;
}

.absa-bi-zero {
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 1.5px;
  background: #9ca3af;
  z-index: 2;
}

.absa-bi-fill {
  position: absolute;
  top: 0;
  bottom: 0;
  transition: width 0.3s ease, left 0.3s ease;
}

.absa-bi-fill.pos {
  background: #16a34a;
}

.absa-bi-fill.neg {
  background: #dc2626;
}

.absa-status-tip {
  font-size: 11px;
  padding: 5px 8px;
  border-radius: 6px;
  background: #f3f4f6;
  color: #4b5563;
  line-height: 1.4;
}

.absa-status-tip.can-finish {
  background: #dcfce7;
  color: #15803d;
  font-weight: 700;
}

.btn-success {
  background: var(--success);
  color: #fff;
}

.pack-cards-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 10px 0;
}

.mini-card {
  background: #fff;
  border: 1px solid #fde68a;
  border-radius: 8px;
  padding: 9px 11px;
}

.mini-card-tag {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--primary);
  color: #fff;
  margin-bottom: 4px;
}

.mini-card-tag.event {
  background: var(--accent);
}

.mini-card-name {
  font-size: 13.5px;
  font-weight: 700;
}

.mini-card-desc {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* 练习模块：情景包列表（含结束后变黑禁用样式） */
.scenario-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.scenario-item {
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 13px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: all 0.2s;
}

.scenario-item.available {
  cursor: pointer;
  border-color: #d6c7b8;
}

.scenario-item.available:hover {
  border-color: var(--primary);
}

/* 关键需求：结束后该情景包会变黑无法使用 */
.scenario-item.locked {
  background: var(--locked-bg) !important;
  border-color: #111113 !important;
  color: var(--locked-text) !important;
  cursor: not-allowed !important;
  user-select: none;
  position: relative;
}

.scenario-item.locked .scenario-title,
.scenario-item.locked .scenario-sub,
.scenario-item.locked .scenario-meta {
  color: #71717a !important;
}

.scenario-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.scenario-title {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
}

.scenario-sub {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.45;
}

.status-pill {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 99px;
  white-space: nowrap;
  flex-shrink: 0;
}

.status-pill.ready {
  background: var(--primary-light);
  color: var(--primary-dark);
}

.status-pill.locked-satisfied {
  background: #27272a;
  color: #4ade80;
  border: 1px solid #3f3f46;
}

.status-pill.locked-unsatisfied {
  background: #27272a;
  color: #f87171;
  border: 1px solid #3f3f46;
}

/* 练习对话界面 */
.chat-wrapper {
  display: flex;
  flex-direction: column;
  height: calc(100dvh - 150px);
  background: #fff;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
}

.chat-topbar {
  background: #faf7f4;
  border-bottom: 1px solid var(--border);
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.chat-pack-info {
  flex: 1;
  min-width: 0;
}

.chat-pack-title {
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-turn-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  color: var(--primary);
  background: var(--primary-light);
  padding: 2px 7px;
  border-radius: 6px;
  margin-top: 3px;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: #f9f8f6;
}

.msg-row {
  display: flex;
  flex-direction: column;
  max-width: 84%;
}

.msg-row.ai {
  align-self: flex-start;
}

.msg-row.user {
  align-self: flex-end;
}

.msg-row.system {
  align-self: center;
  max-width: 95%;
}

.msg-sender {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 3px;
}

.msg-row.user .msg-sender {
  text-align: right;
}

.msg-bubble {
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 13.5px;
  line-height: 1.48;
  word-break: break-word;
  white-space: pre-wrap;
}

.msg-row.ai .msg-bubble {
  background: #ffffff;
  border: 1px solid var(--border);
  border-top-left-radius: 4px;
}

.msg-row.user .msg-bubble {
  background: var(--primary);
  color: #fff;
  border-top-right-radius: 4px;
}

.msg-row.system .msg-bubble {
  background: #fef3c7;
  color: #92400e;
  font-size: 12px;
  text-align: center;
  border: 1px solid #fde68a;
}

.chat-input-bar {
  padding: 10px;
  background: #fff;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 8px;
}

.chat-input {
  flex: 1;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 9px 12px;
  font-size: 14px;
  outline: none;
}

.chat-input:focus {
  border-color: var(--primary);
}

/* 记录模块 */
.record-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 13px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.record-transcript {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 10px;
  max-height: 180px;
  overflow-y: auto;
  font-size: 12.5px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.transcript-line {
  line-height: 1.45;
}

.transcript-line strong {
  color: var(--primary-dark);
}

.advice-box {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 12.5px;
  color: #1e3a8a;
  white-space: pre-wrap;
  line-height: 1.55;
}

/* 待定占位区块 */
.tbd-placeholder {
  border: 1.5px dashed #cbd5e1;
  background: rgba(255, 255, 255, 0.6);
  border-radius: 12px;
  padding: 14px;
  text-align: center;
  color: var(--text-muted);
  font-size: 12.5px;
}

/* 空状态 */
.empty-state {
  text-align: center;
  padding: 28px 16px;
  color: var(--text-muted);
  font-size: 13px;
}

/* 弹窗与 Toast */
.hidden {
  display: none !important;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  z-index: 50;
}

.modal-card {
  background: #fff;
  width: 100%;
  border-radius: 14px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-header h3 {
  font-size: 15px;
}

.close-btn {
  background: none;
  border: none;
  font-size: 16px;
  cursor: pointer;
}

.form-label {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  margin-bottom: 5px;
}

.form-input {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 9px 11px;
  font-size: 13px;
  margin-bottom: 10px;
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  margin-bottom: 8px;
}

.form-hint {
  font-size: 11.5px;
  color: var(--text-muted);
  line-height: 1.45;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.toast {
  position: absolute;
  bottom: 76px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(24, 24, 27, 0.92);
  color: #fff;
  padding: 9px 16px;
  border-radius: 99px;
  font-size: 12.5px;
  z-index: 60;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* 登录遮罩与卡片（仅输入账户名登录，实现多人数据隔离） */
.login-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, #4b3323 0%, #241811 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 80;
}

.login-card {
  background: #ffffff;
  width: 100%;
  border-radius: 18px;
  padding: 26px 20px;
  text-align: center;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.login-logo {
  font-size: 42px;
  line-height: 1;
}

.login-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--primary-dark);
}

.login-desc {
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.5;
}

.login-input {
  text-align: center;
  font-size: 15px;
  padding: 11px 14px;
  margin-top: 4px;
  margin-bottom: 4px;
}

/* 上限提示条 */
.limit-banner {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #b91c1c;
  border-radius: 9px;
  padding: 9px 12px;
  font-size: 12.5px;
  margin-top: 10px;
  line-height: 1.45;
}

