/* ========================================
   英语冒险岛 v4 — 双轨系统样式
   暗色RPG主题 · 3 Tab布局
   ======================================== */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Microsoft YaHei', sans-serif;
  background: #0f0f1a;
  background-image:
    radial-gradient(ellipse at 30% 20%, rgba(76,175,80,0.06) 0%, transparent 50%),
    radial-gradient(ellipse at 70% 60%, rgba(124,77,255,0.06) 0%, transparent 50%);
  color: #e8e8e8; min-height: 100dvh; overflow-x: hidden;
  -webkit-tap-highlight-color: transparent; user-select: none;
}
.app { max-width: 520px; margin: 0 auto; display: flex; flex-direction: column; min-height: 100dvh; }
:root {
  --gold: #FFD93D; --pink: #FF6B9D; --green: #6BCB77; --blue: #4A90D9;
  --purple: #A78BFA; --orange: #FF8C42; --red: #FF5252;
  --surface: #1a1a30; --card: #222240; --text: #e8e8e8; --dim: #8888aa;
  --r: 14px; --r-lg: 22px; --safe: env(safe-area-inset-bottom, 10px);
}

/* 顶栏 */
.top-bar { display: flex; align-items: center; justify-content: space-between; padding: 8px 14px; background: var(--surface); border-bottom: 1px solid rgba(255,255,255,0.04); position: sticky; top: 0; z-index: 50; }
.top-left { display: flex; align-items: center; gap: 8px; }
.top-logo { font-size: 1.5rem; }
.top-title { font-size: 1.1rem; font-weight: 800; color: var(--gold); }
.top-tagline { font-size: 0.65rem; color: var(--dim); }

/* 主区域 */
.main-area { flex: 1; padding: 10px 14px 16px; }
.module-container { display: none; }
.module-container.active { display: block; animation: fs 0.3s ease; }
@keyframes fs { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fi { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
@keyframes pop { from { opacity: 0; transform: scale(0.9); } to { opacity: 1; transform: scale(1); } }
.fadeIn { animation: fi 0.4s ease; }

/* 底栏 */
.bottom-nav { display: flex; justify-content: space-around; padding: 4px 4px var(--safe); background: var(--surface); border-top: 1px solid rgba(255,255,255,0.04); position: sticky; bottom: 0; z-index: 50; }
.nav-btn { display: flex; flex-direction: column; align-items: center; gap: 1px; background: none; border: none; cursor: pointer; padding: 6px 12px; border-radius: 12px; color: var(--dim); transition: all 0.15s; }
.nav-btn:active { transform: scale(0.9); }
.nav-btn .nav-icon { font-size: 1.3rem; }
.nav-btn .nav-label { font-size: 0.6rem; font-weight: 600; }
.nav-btn.active { color: var(--gold); }
.nav-btn.active .nav-icon { filter: drop-shadow(0 0 4px rgba(255,217,61,0.5)); }

/* ===== 🟢 冒险岛地图 ===== */
.am-hero { text-align: center; padding: 12px 0; }
.am-hero h2 { font-size: 1.6rem; font-weight: 800; color: var(--gold); }
.am-hero p { color: var(--dim); font-size: 0.85rem; margin-top: 4px; }
.am-stats { display: grid; grid-template-columns: repeat(3,1fr); gap: 6px; margin: 10px 0; }
.am-stat { background: var(--surface); border-radius: var(--r); padding: 10px 6px; text-align: center; }
.am-stat span { font-size: 1.1rem; display: block; }
.am-stat b { font-size: 1.3rem; color: var(--gold); display: block; }
.am-stat small { font-size: 0.55rem; color: var(--dim); }
.am-maps { display: flex; flex-direction: column; gap: 8px; }

.am-map-card { position: relative; border-radius: var(--r-lg); overflow: hidden; cursor: pointer; transition: all 0.2s; border: 2px solid rgba(255,255,255,0.06); }
.am-map-card:active { transform: scale(0.97); }
.am-map-bg { position: absolute; inset: 0; opacity: 0.12; background: var(--mbg, linear-gradient(135deg, #1b5e20, #2e7d32)); }
.am-map-content { position: relative; display: flex; align-items: center; gap: 10px; padding: 14px; }
.am-map-icon { font-size: 2rem; flex-shrink: 0; }
.am-map-info { flex: 1; }
.am-map-info h4 { font-size: 1rem; font-weight: 700; }
.am-map-info p { font-size: 0.7rem; color: var(--dim); margin-top: 2px; }
.am-map-npc, .am-map-boss { font-size: 0.65rem; display: block; margin-top: 2px; }
.am-map-npc { color: var(--gold); }
.am-map-boss { color: var(--red); }
.am-map-prog { display: flex; align-items: center; gap: 6px; margin-top: 6px; }
.am-prog-bar { flex: 1; height: 4px; background: rgba(255,255,255,0.08); border-radius: 2px; overflow: hidden; }
.am-prog-fill { height: 100%; background: var(--green); border-radius: 2px; transition: width 0.5s; }
.am-map-prog span { font-size: 0.65rem; color: var(--dim); }
.am-map-status { flex-shrink: 0; }
.am-go-icon { color: var(--green); font-weight: 700; font-size: 0.9rem; }
.am-check-icon, .am-lock-icon { font-size: 1.2rem; }
.am-locked { opacity: 0.35; pointer-events: none; }
.am-current { border-color: var(--gold) !important; box-shadow: 0 0 16px rgba(255,217,61,0.15); }
.am-done { border-color: rgba(107,203,119,0.3); }

/* ===== 🟢 冒险流程 ===== */
.af-container { display: flex; flex-direction: column; gap: 10px; }
.af-header { display: flex; align-items: center; justify-content: space-between; padding: 8px 12px; background: var(--surface); border-radius: var(--r); font-size: 0.8rem; }
.af-back-btn { background: none; border: 1px solid rgba(255,255,255,0.12); border-radius: 12px; padding: 4px 10px; color: var(--dim); cursor: pointer; font-size: 0.75rem; }
.af-prog { color: var(--gold); font-weight: 700; }
.af-scene { min-height: 160px; background: var(--card); border-radius: var(--r-lg); padding: 22px 16px; }
.af-actions { display: flex; flex-direction: column; gap: 6px; align-items: center; }

.af-event { width: 100%; }
.af-speaker { display: flex; align-items: center; gap: 5px; margin-bottom: 5px; }
.af-right { justify-content: flex-end; }
.af-sp-icon { font-size: 1.3rem; }
.af-bubble { padding: 12px 16px; border-radius: var(--r-lg); max-width: 86%; }
.af-b-npc { background: var(--surface); border: 1px solid rgba(255,255,255,0.08); border-bottom-left-radius: 4px; }
.af-b-player { background: rgba(74,144,217,0.18); border: 1px solid rgba(74,144,217,0.25); border-bottom-right-radius: 4px; margin-left: auto; text-align: right; }
.af-line { font-size: 1.15rem; font-weight: 700; }
.af-zh { font-size: 0.75rem; color: var(--dim); margin-top: 3px; }
.af-ok { text-align: center; color: var(--green); font-weight: 700; padding: 6px; animation: pop 0.3s ease; }
.af-try { text-align: center; color: var(--orange); font-weight: 600; padding: 6px; animation: pop 0.3s ease; font-size: 0.8rem; }
.af-collect { text-align: center; color: var(--gold); font-weight: 700; padding: 8px; margin-top: 6px; background: rgba(255,217,61,0.06); border-radius: var(--r); font-size: 0.85rem; }

.af-big-btn { padding: 13px 32px; border: none; border-radius: 50px; font-size: 1rem; font-weight: 800; cursor: pointer; transition: all 0.15s; width: 100%; max-width: 260px; }
.af-big-btn:active { transform: scale(0.95); }
.af-speak-btn { background: linear-gradient(135deg, var(--pink), #FF8FB3); color: white; }
.af-btn { padding: 8px 16px; border: 1px solid rgba(255,255,255,0.15); border-radius: 20px; background: var(--surface); color: var(--text); font-weight: 600; cursor: pointer; flex: 1; text-align: center; }
.af-next-btn { border-color: var(--green); color: var(--green); }
.af-action-row { display: flex; gap: 6px; width: 100%; max-width: 260px; }
.af-help-btn { background: none; border: 2px solid rgba(255,140,66,0.3); border-radius: 20px; color: var(--orange); font-size: 0.8rem; font-weight: 700; cursor: pointer; padding: 8px 18px; transition: all 0.15s; }
.af-help-btn:active { background: rgba(255,140,66,0.1); }
.af-help-scene { text-align: center; }
.af-help-scene h3 { color: var(--gold); font-size: 1rem; margin-bottom: 10px; }
.af-help-card { background: var(--surface); border-radius: var(--r); padding: 14px; margin: 8px 0; }
.af-help-en { font-size: 1.2rem; font-weight: 800; color: var(--text); }
.af-help-zh { font-size: 0.8rem; color: var(--dim); margin-top: 4px; }
.af-word-puzzle { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin: 10px 0; }
.af-puzzle-word { background: var(--surface); border: 1px solid rgba(255,255,255,0.15); border-radius: 10px; padding: 6px 14px; font-size: 1rem; font-weight: 700; color: var(--text); }
.af-puzzle-zh { font-size: 0.75rem; color: var(--dim); margin-top: 4px; }
.af-assisted-msg { text-align: center; padding: 16px; background: rgba(255,140,66,0.06); border-radius: var(--r); margin-top: 10px; animation: fi 0.4s ease; }
.af-assisted-msg span { font-size: 2rem; display: block; }
.af-assisted-msg p { font-size: 0.85rem; color: var(--text); margin: 4px 0; }
.af-assisted-note { font-size: 0.7rem; color: var(--orange); font-weight: 600; }
.af-recog-fail { font-size: 0.8rem; color: var(--dim); text-align: center; margin: 6px 0; }

.af-waveform { display: flex; gap: 3px; justify-content: center; height: 26px; align-items: center; opacity: 0.3; }
.af-waveform.active { opacity: 1; }
.af-waveform span { width: 4px; height: 5px; background: var(--pink); border-radius: 2px; }
.af-waveform.active span { animation: wv 0.6s ease-in-out infinite; }
.af-waveform.active span:nth-child(1) { animation-delay: 0s; }
.af-waveform.active span:nth-child(2) { animation-delay: 0.1s; }
.af-waveform.active span:nth-child(3) { animation-delay: 0.2s; }
.af-waveform.active span:nth-child(4) { animation-delay: 0.3s; }
.af-waveform.active span:nth-child(5) { animation-delay: 0.4s; }
@keyframes wv { 0%,100% { height: 4px; } 50% { height: 22px; } }
.recording { animation: rp 0.8s ease-in-out infinite !important; }
@keyframes rp { 0%,100% { box-shadow: 0 0 0 0 rgba(255,82,82,0.5); } 50% { box-shadow: 0 0 0 12px rgba(255,82,82,0); } }

/* Boss战 */
.af-boss-scene { text-align: center; }
.af-boss-header { margin-bottom: 12px; }
.af-boss-icon { font-size: 2.5rem; }
.af-boss-header h3 { font-size: 1.2rem; color: var(--red); font-weight: 800; }
.af-boss-header p { font-size: 0.8rem; color: var(--dim); }
.af-boss-q-text { font-size: 1.15rem; font-weight: 700; margin-bottom: 10px; }
.af-boss-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.af-boss-opt { padding: 14px; border: 2px solid rgba(255,255,255,0.1); border-radius: var(--r); background: var(--surface); color: var(--text); font-size: 0.95rem; font-weight: 600; cursor: pointer; transition: all 0.15s; }
.af-boss-opt:active { transform: scale(0.95); }
.af-boss-prog { text-align: center; font-size: 0.85rem; font-weight: 700; color: var(--gold); }
.af-correct { background: rgba(107,203,119,0.2); border-color: var(--green) !important; }
.af-wrong { background: rgba(255,82,82,0.2); border-color: var(--red) !important; }

/* 语音挑战 */
.af-voice-scene { text-align: center; }
.af-voice-scene h3 { color: var(--gold); }
.af-voice-card { background: var(--surface); border-radius: var(--r-lg); padding: 20px; margin: 12px 0; }
.af-voice-en { font-size: 1.4rem; font-weight: 800; }
.af-voice-zh { font-size: 0.85rem; color: var(--dim); margin-top: 4px; }
.af-voice-result { margin-top: 14px; padding: 16px; background: var(--surface); border-radius: var(--r); }
.af-vr-emoji { font-size: 2.5rem; }

/* 完成 */
.af-finish { text-align: center; padding: 20px; }
.af-finish-icon { font-size: 3.5rem; }
.af-finish h2 { font-size: 1.4rem; font-weight: 800; color: var(--gold); margin: 8px 0; }
.af-finish p { color: var(--dim); font-size: 0.9rem; }

/* ===== 🔵 学习室 ===== */
.lr-header { text-align: center; padding: 8px 0; }
.lr-header h2 { font-size: 1.4rem; color: var(--blue); }
.lr-header p { color: var(--dim); font-size: 0.8rem; }
.lr-unit-select { display: flex; gap: 6px; margin: 8px 0; }
.lr-unit-select label { font-size: 0.75rem; color: var(--dim); align-self: center; white-space: nowrap; }
.lr-select { flex: 1; padding: 6px 10px; border-radius: var(--r); border: 1px solid rgba(255,255,255,0.12); background: var(--surface); color: var(--text); font-size: 0.8rem; outline: none; }

.lr-tabs { display: flex; gap: 4px; padding: 4px; background: var(--surface); border-radius: var(--r); margin-bottom: 10px; }
.lr-tab { flex: 1; padding: 8px 4px; border: none; border-radius: 10px; background: transparent; color: var(--dim); font-size: 0.7rem; font-weight: 700; cursor: pointer; transition: all 0.15s; }
.lr-tab.active { background: var(--card); color: var(--blue); }

.lr-tutor-intro { font-size: 0.85rem; color: var(--dim); margin-bottom: 10px; padding: 8px 12px; background: rgba(74,144,217,0.06); border-radius: var(--r); }
.lr-tutor-intro strong { color: var(--blue); }

.lr-sentence-card { background: var(--card); border-radius: var(--r); padding: 14px 16px; margin-bottom: 8px; }
.lr-s-en { font-size: 1.1rem; font-weight: 700; }
.lr-s-zh { font-size: 0.8rem; color: var(--dim); margin: 4px 0; }
.lr-s-speak { padding: 4px 12px; border: 1px solid rgba(255,255,255,0.1); border-radius: 12px; background: transparent; color: var(--blue); font-size: 0.75rem; cursor: pointer; margin-top: 4px; }

.lr-vocab-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.lr-vocab-card { background: var(--card); border-radius: var(--r); padding: 12px; text-align: center; position: relative; }
.lr-vocab-card.lr-mastered { border: 1px solid rgba(107,203,119,0.3); }
.lr-vocab-card.lr-weak { border: 1px solid rgba(255,140,66,0.4); }
.lr-v-word { font-size: 1.1rem; font-weight: 700; }
.lr-v-phonetic { font-size: 0.65rem; color: var(--dim); }
.lr-v-zh { font-size: 0.85rem; color: var(--dim); }
.lr-v-tip { font-size: 0.65rem; color: var(--gold); }
.lr-v-speak { margin-top: 4px; padding: 3px 10px; border: 1px solid rgba(255,255,255,0.1); border-radius: 8px; background: transparent; color: var(--dim); font-size: 0.7rem; cursor: pointer; }

.lr-grammar-card { background: rgba(167,139,250,0.1); border: 1px solid rgba(167,139,250,0.2); border-radius: var(--r); padding: 14px; margin-bottom: 10px; }
.lr-grammar-card h4 { color: var(--purple); font-size: 0.95rem; }
.lr-pattern-card { background: var(--card); border-radius: var(--r); padding: 12px 14px; margin-bottom: 8px; }
.lr-p-en { font-size: 1.05rem; font-weight: 700; }
.lr-p-zh { font-size: 0.8rem; color: var(--dim); }
.lr-p-pattern { font-size: 0.75rem; color: var(--gold); margin-top: 4px; }

.lr-quiz-item { margin-bottom: 12px; }
.lr-q-prompt { font-size: 0.9rem; font-weight: 600; margin-bottom: 4px; }
.lr-q-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
.lr-q-opt { padding: 10px; border: 1px solid rgba(255,255,255,0.1); border-radius: var(--r); background: var(--surface); color: var(--text); font-size: 0.85rem; cursor: pointer; }
.lr-q-fb { font-size: 0.75rem; text-align: center; min-height: 18px; }
.correct { color: var(--green); }
.wrong { color: var(--red); }

/* ===== 🏆 成就 ===== */
.aw-hero { text-align: center; padding: 12px; background: var(--card); border-radius: var(--r-lg); margin-bottom: 10px; }
.aw-avatar { font-size: 2.5rem; }
.aw-hero h2 { font-size: 1.2rem; font-weight: 800; color: var(--gold); }
.aw-exp-bar { height: 6px; background: rgba(255,255,255,0.08); border-radius: 3px; margin: 6px 0; overflow: hidden; }
.aw-exp-fill { height: 100%; background: linear-gradient(90deg, var(--gold), var(--orange)); border-radius: 3px; transition: width 0.5s; }
.aw-hero p { color: var(--dim); font-size: 0.75rem; }
.aw-stats { display: grid; grid-template-columns: repeat(4,1fr); gap: 5px; margin-bottom: 12px; }
.aw-stat { background: var(--surface); border-radius: var(--r); padding: 8px 4px; text-align: center; }
.aw-stat span { font-size: 0.9rem; display: block; }
.aw-stat b { font-size: 1.1rem; color: var(--gold); display: block; }
.aw-stat small { font-size: 0.55rem; color: var(--dim); }
.aw-map-progress { margin-bottom: 14px; }
.aw-map-progress h4, .aw-badges h4 { color: var(--gold); font-size: 0.9rem; margin-bottom: 6px; }
.aw-map-row { display: flex; align-items: center; gap: 8px; padding: 6px 0; font-size: 0.8rem; }
.aw-map-bar { flex: 1; height: 6px; background: rgba(255,255,255,0.06); border-radius: 3px; overflow: hidden; }
.aw-map-fill { height: 100%; border-radius: 3px; transition: width 0.5s; }
.aw-badge-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 6px; }
.aw-badge { text-align: center; padding: 12px 6px; background: var(--surface); border-radius: var(--r); }
.aw-badge span { font-size: 1.5rem; display: block; }
.aw-badge strong { font-size: 0.65rem; display: block; }
.aw-badge small { font-size: 0.5rem; color: var(--dim); display: block; }
.aw-badge.aw-earned { border: 1px solid rgba(255,217,61,0.2); }
.aw-badge.aw-locked { opacity: 0.3; filter: grayscale(1); }

.no-data { text-align: center; padding: 40px 20px; color: var(--dim); font-size: 0.9rem; }

@media (min-width: 768px) {
  .app { max-width: 640px; }
  .aw-badge-grid { grid-template-columns: repeat(4,1fr); }
  .lr-vocab-grid { grid-template-columns: repeat(3,1fr); }
  .sh-online-list { grid-template-columns: repeat(4,1fr); }
  .sf-suggested { grid-template-columns: repeat(3,1fr); }
}

/* ===== 🌐 子Tab导航 ===== */
.sh-subtabs {
  display: flex; gap: 4px; padding: 4px; background: var(--surface);
  border-radius: var(--r); margin: 8px 0; position: relative;
}
.sh-subtab {
  flex: 1; padding: 8px 6px; border: none; border-radius: 10px;
  background: transparent; color: var(--dim); font-size: 0.72rem;
  font-weight: 700; cursor: pointer; transition: all 0.15s;
  display: flex; align-items: center; justify-content: center; gap: 2px;
}
.sh-subtab.active { background: var(--card); color: var(--gold); }
.sh-badge {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--red); color: white; font-size: 0.55rem;
  min-width: 16px; height: 16px; border-radius: 8px; padding: 0 4px;
  font-weight: 800;
}
.sh-notif-badge {
  position: absolute; top: -6px; right: -6px;
  background: var(--red); color: white; font-size: 0.55rem;
  min-width: 18px; height: 18px; border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; padding: 0 5px;
}

/* ===== 👥 好友系统 ===== */
.sf-section { margin-bottom: 12px; }
.sf-section h4 { font-size: 0.82rem; color: var(--dim); margin-bottom: 6px; }
.sf-request-card {
  display: flex; align-items: center; gap: 8px; padding: 10px 12px;
  background: var(--surface); border-radius: var(--r); margin-bottom: 6px;
  border: 1px solid rgba(255,217,61,0.15);
}
.sf-request-card span { font-size: 1.3rem; }
.sf-request-card strong { font-size: 0.8rem; display: block; }
.sf-request-card small { color: var(--dim); font-size: 0.6rem; }
.sf-req-actions { margin-left: auto; display: flex; gap: 4px; }
.sf-accept-btn, .sf-reject-btn {
  padding: 5px 10px; border: none; border-radius: 10px;
  font-size: 0.65rem; font-weight: 700; cursor: pointer;
}
.sf-accept-btn { background: var(--green); color: white; }
.sf-reject-btn { background: rgba(255,255,255,0.1); color: var(--dim); }

.sf-friend-card {
  display: flex; align-items: center; gap: 8px; padding: 8px 10px;
  background: var(--surface); border-radius: var(--r); margin-bottom: 4px;
}
.sf-friend-avatar { font-size: 1.3rem; }
.sf-friend-info { flex: 1; }
.sf-friend-info strong { font-size: 0.78rem; display: block; }
.sf-friend-info small { color: var(--dim); font-size: 0.6rem; }
.sf-online-dot { font-size: 0.5rem; }
.sf-chat-btn {
  padding: 4px 10px; border: 1px solid rgba(255,255,255,0.12);
  border-radius: 8px; background: transparent; cursor: pointer; font-size: 0.8rem;
}
.sf-chat-btn:active { background: rgba(255,255,255,0.1); }

.sf-suggested { display: grid; grid-template-columns: repeat(2,1fr); gap: 6px; }
.sf-suggest-card {
  text-align: center; padding: 10px 6px; background: var(--surface);
  border-radius: var(--r);
}
.sf-suggest-card span { font-size: 1.5rem; display: block; }
.sf-suggest-card strong { font-size: 0.7rem; display: block; margin: 2px 0; }
.sf-suggest-card small { color: var(--dim); font-size: 0.6rem; display: block; }
.sf-add-btn {
  margin-top: 4px; padding: 4px 12px; border: 1px solid var(--gold);
  border-radius: 10px; background: transparent; color: var(--gold);
  font-size: 0.65rem; font-weight: 700; cursor: pointer;
}
.sf-add-btn:disabled { opacity: 0.4; }

/* ===== 💬 消息系统 ===== */
.sm-container { display: flex; flex-direction: column; gap: 0; }
.sm-list h4 { font-size: 0.82rem; color: var(--dim); margin-bottom: 6px; }
.sm-chat-card {
  display: flex; align-items: center; gap: 8px; padding: 10px 12px;
  background: var(--surface); border-radius: var(--r); margin-bottom: 4px;
  cursor: pointer; transition: all 0.15s;
}
.sm-chat-card:active { background: rgba(255,255,255,0.05); }
.sm-chat-card span { font-size: 1.2rem; }
.sm-chat-info { flex: 1; min-width: 0; }
.sm-chat-info strong { font-size: 0.78rem; display: block; }
.sm-chat-info small { color: var(--dim); font-size: 0.65rem; }
.sm-unread {
  background: var(--red); color: white; font-size: 0.55rem;
  min-width: 16px; height: 16px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; padding: 0 4px;
}
.sm-time { font-size: 0.55rem; color: var(--dim); }

/* 聊天窗口 */
.sm-chat-window {
  display: flex; flex-direction: column; height: 380px;
}
.sm-cw-header {
  display: flex; align-items: center; gap: 8px; padding: 10px 12px;
  background: var(--surface); border-radius: var(--r) var(--r) 0 0;
  font-size: 0.8rem; font-weight: 700;
}
.sm-cw-back { background: none; border: none; color: var(--dim); cursor: pointer; font-size: 0.75rem; }
.sm-cw-filter { font-size: 0.55rem; color: var(--green); margin-left: auto; background: rgba(107,203,119,0.1); padding: 2px 6px; border-radius: 6px; }
.sm-cw-messages {
  flex: 1; overflow-y: auto; padding: 10px 12px; display: flex;
  flex-direction: column; gap: 8px; background: rgba(0,0,0,0.15);
}
.sm-msg { max-width: 80%; }
.sm-msg-me { align-self: flex-end; }
.sm-msg-them { align-self: flex-start; }
.sm-msg-bubble {
  padding: 8px 12px; border-radius: 16px; font-size: 0.85rem;
  line-height: 1.4; word-break: break-word;
}
.sm-msg-me .sm-msg-bubble { background: var(--blue); color: white; border-bottom-right-radius: 4px; }
.sm-msg-them .sm-msg-bubble { background: var(--surface); border: 1px solid rgba(255,255,255,0.08); border-bottom-left-radius: 4px; }
.sm-msg-filtered { opacity: 0.6; border: 1px dashed rgba(255,82,82,0.4) !important; }
.sm-filter-note { font-size: 0.55rem; color: var(--red); margin-top: 2px; }
.sm-msg-time { font-size: 0.5rem; color: var(--dim); display: block; margin-top: 2px; padding: 0 4px; }

.sm-cw-input { display: flex; gap: 6px; padding: 8px 10px; background: var(--surface); }
.sm-cw-text { flex: 1; padding: 8px 12px; border: 1px solid rgba(255,255,255,0.1); border-radius: 16px; background: var(--card); color: var(--text); font-size: 0.8rem; outline: none; }
.sm-cw-text:focus { border-color: var(--blue); }
.sm-cw-send { padding: 8px 16px; border: none; border-radius: 16px; background: var(--blue); color: white; font-weight: 700; cursor: pointer; font-size: 0.8rem; }
.sm-cw-hints { display: flex; gap: 4px; padding: 6px 10px; flex-wrap: wrap; background: rgba(0,0,0,0.1); border-radius: 0 0 var(--r) var(--r); }
.sm-cw-hints span { font-size: 0.6rem; color: var(--dim); align-self: center; }
.sm-hint-btn { padding: 3px 8px; border: 1px solid rgba(255,255,255,0.1); border-radius: 10px; background: transparent; color: var(--dim); font-size: 0.6rem; cursor: pointer; }
.sm-hint-btn:active { background: rgba(255,255,255,0.1); }

/* ===== 🌐 社交大厅 ===== */
.sh-header { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; }
.sh-header h2 { font-size: 1.3rem; color: var(--blue); }
.sh-online-count { font-size: 0.75rem; color: var(--green); font-weight: 600; }

.sh-online-section { margin-bottom: 14px; }
.sh-online-section h4 { font-size: 0.85rem; color: var(--dim); margin-bottom: 8px; }
.sh-online-list { display: grid; grid-template-columns: repeat(3,1fr); gap: 6px; }
.sh-user-chip {
  display: flex; align-items: center; gap: 6px; padding: 8px 10px;
  background: var(--surface); border-radius: var(--r);
  border: 1px solid rgba(255,255,255,0.04); font-size: 0.7rem;
}
.sh-user-chip.sh-online { border-color: rgba(107,203,119,0.25); }
.sh-user-chip.sh-offline { opacity: 0.5; }
.sh-user-chip.sh-is-me { border-color: rgba(255,217,61,0.35); background: rgba(255,217,61,0.06); }
.sh-user-avatar { font-size: 1.2rem; flex-shrink: 0; }
.sh-user-info { flex: 1; min-width: 0; }
.sh-user-info strong { display: block; font-size: 0.7rem; }
.sh-user-info small { color: var(--dim); font-size: 0.55rem; }
.sh-user-dot { font-size: 0.5rem; flex-shrink: 0; }

.sh-feed-section h4 { font-size: 0.85rem; color: var(--dim); margin-bottom: 8px; }
.sh-feed { display: flex; flex-direction: column; gap: 8px; max-height: 500px; overflow-y: auto; }

.sh-post-card {
  display: flex; gap: 10px; padding: 12px 14px;
  background: var(--surface); border-radius: var(--r);
  border: 1px solid rgba(255,255,255,0.04);
  animation: fi 0.3s ease;
}
.sh-post-avatar { font-size: 1.5rem; flex-shrink: 0; width: 36px; text-align: center; }
.sh-post-body { flex: 1; min-width: 0; }
.sh-post-header { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 4px; }
.sh-post-header strong { font-size: 0.8rem; color: var(--gold); }
.sh-post-type {
  font-size: 0.55rem; background: rgba(255,255,255,0.08);
  padding: 1px 6px; border-radius: 6px; color: var(--dim);
}
.sh-post-time { font-size: 0.6rem; color: var(--dim); margin-left: auto; }
.sh-post-content { font-size: 0.85rem; margin-bottom: 4px; }
.sh-post-icon { font-size: 1rem; }
.sh-post-score {
  display: inline-block; font-size: 0.7rem; font-weight: 700;
  color: var(--gold); background: rgba(255,217,61,0.1);
  padding: 2px 8px; border-radius: 8px; margin-top: 4px;
}
.sh-post-actions { margin-top: 6px; }
.sh-like-btn {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 5px 12px; border: 1px solid rgba(255,255,255,0.1);
  border-radius: 14px; background: transparent; color: var(--dim);
  font-size: 0.75rem; cursor: pointer; transition: all 0.2s;
}
.sh-like-btn:active { transform: scale(0.9); }
.sh-like-btn.sh-liked {
  color: var(--pink); border-color: rgba(255,107,157,0.4);
  background: rgba(255,107,157,0.1);
}

/* ===== 🔥 关系驱动样式 ===== */
.sh-post-relation { border-left: 3px solid var(--orange); }
.sh-type-rel { background: rgba(255,140,66,0.2); color: var(--orange); }

.sf-friend-card-enhanced {
  background: var(--surface); border-radius: var(--r);
  padding: 12px; margin-bottom: 8px;
  border: 1px solid rgba(255,255,255,0.04);
}
.sf-fce-top { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.sf-fce-avatar { font-size: 1.5rem; }
.sf-fce-info { flex: 1; }
.sf-fce-name-row { display: flex; align-items: center; gap: 6px; }
.sf-fce-name-row strong { font-size: 0.82rem; }
.sf-fce-online { font-size: 0.5rem; }
.sf-fce-rel { display: block; font-size: 0.65rem; color: var(--gold); margin-top: 2px; }
.sf-fce-score { display: block; font-size: 0.6rem; color: var(--dim); }

.sf-compare { margin: 8px 0; }
.sf-comp-row { display: flex; align-items: center; gap: 6px; margin-bottom: 4px; }
.sf-comp-label { font-size: 0.6rem; color: var(--dim); width: 36px; flex-shrink: 0; }
.sf-comp-bar-wrap { flex: 1; height: 18px; background: rgba(255,255,255,0.05); border-radius: 9px; overflow: hidden; }
.sf-comp-bar { height: 100%; border-radius: 9px; font-size: 0.6rem; font-weight: 700; display: flex; align-items: center; padding: 0 8px; color: white; min-width: 40px; transition: width 0.6s ease; }
.sf-comp-me { background: linear-gradient(90deg, var(--blue), #5BA0E0); }
.sf-comp-them { background: linear-gradient(90deg, var(--purple), #C4B5FD); }
.sf-comp-gap { text-align: center; font-size: 0.7rem; font-weight: 700; margin-top: 4px; padding: 4px; background: rgba(255,255,255,0.03); border-radius: 8px; }

.sf-fce-actions { display: flex; gap: 6px; margin-top: 8px; }
.sf-fce-chat-btn, .sf-fce-coop-btn {
  flex: 1; padding: 7px 10px; border: none; border-radius: 10px;
  font-size: 0.7rem; font-weight: 700; cursor: pointer; text-align: center;
}
.sf-fce-chat-btn { background: rgba(255,255,255,0.08); color: var(--text); }
.sf-fce-coop-btn { background: linear-gradient(135deg, var(--orange), #FF6B3D); color: white; }
.sf-fce-chat-btn:active, .sf-fce-coop-btn:active { transform: scale(0.95); }

.sf-coop-card {
  display: flex; align-items: center; gap: 8px; padding: 10px 12px;
  background: rgba(255,140,66,0.08); border: 1px solid rgba(255,140,66,0.25);
  border-radius: var(--r); margin-bottom: 6px;
}
.sf-coop-card span { font-size: 1.2rem; }
.sf-coop-card strong { font-size: 0.78rem; display: block; }
.sf-coop-card small { color: var(--dim); font-size: 0.65rem; }

/* ===== 💰 家长控制台 ===== */
.top-parent-btn {
  background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.1);
  border-radius: 16px; padding: 4px 10px; font-size: 0.9rem;
  cursor: pointer; transition: all 0.15s;
}
.top-parent-btn:active { background: rgba(255,255,255,0.12); }

.pd-container { display: flex; flex-direction: column; gap: 10px; padding-bottom: 20px; }
.pd-header { display: flex; justify-content: space-between; align-items: center; }
.pd-header h2 { font-size: 1.3rem; color: var(--gold); }
.pd-date { font-size: 0.75rem; color: var(--dim); }

.pd-card {
  background: var(--surface); border-radius: var(--r); padding: 14px 16px;
  border: 1px solid rgba(255,255,255,0.04);
}
.pd-card h4 { font-size: 0.85rem; color: var(--text); margin-bottom: 8px; }

.pd-tier-card {
  border: 2px solid rgba(255,255,255,0.08);
}
.pd-tier-free { border-color: rgba(255,255,255,0.1); }
.pd-tier-vip { border-color: rgba(255,217,61,0.3); background: rgba(255,217,61,0.03); }
.pd-tier-pro { border-color: rgba(167,139,250,0.3); background: rgba(167,139,250,0.03); }
.pd-tier-badge { font-weight: 800; font-size: 0.85rem; margin-bottom: 6px; }
.pd-tier-info p { font-size: 0.8rem; color: var(--dim); margin-bottom: 8px; }
.pd-upgrade-btn {
  display: block; width: 100%; padding: 10px; border: none; border-radius: 12px;
  font-weight: 700; font-size: 0.8rem; cursor: pointer; margin-bottom: 6px;
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  color: #1a1a2e; transition: all 0.15s;
}
.pd-upgrade-pro {
  background: linear-gradient(135deg, var(--purple), #C4B5FD);
  color: white;
}
.pd-upgrade-btn:active { transform: scale(0.97); }

.pd-stats-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 6px; margin-bottom: 8px; }
.pd-stat {
  text-align: center; background: var(--card); border-radius: 10px; padding: 10px 4px;
}
.pd-stat span { font-size: 1rem; display: block; }
.pd-stat b { font-size: 1.1rem; color: var(--gold); display: block; }
.pd-stat small { font-size: 0.55rem; color: var(--dim); }

.pd-speak-score { font-size: 0.8rem; color: var(--blue); margin-bottom: 4px; }
.pd-error-word { font-size: 0.8rem; color: var(--orange); margin-bottom: 4px; }
.pd-advice {
  background: rgba(74,144,217,0.08); border-radius: 10px; padding: 10px 12px;
  margin-top: 8px;
}
.pd-advice span { font-size: 0.7rem; color: var(--blue); font-weight: 700; }
.pd-advice p { font-size: 0.8rem; color: var(--text); margin-top: 4px; }

.pd-weak-list { display: flex; flex-wrap: wrap; gap: 4px; }
.pd-weak-tag {
  display: inline-block; padding: 4px 10px; background: rgba(255,140,66,0.15);
  border-radius: 10px; font-size: 0.7rem; color: var(--orange);
}
.pd-good { font-size: 0.8rem; color: var(--green); }

.pd-trend { display: flex; align-items: flex-end; gap: 8px; height: 80px; padding: 0 4px; }
.pd-trend-bar { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; }
.pd-trend-fill {
  width: 100%; max-width: 30px; background: linear-gradient(0deg, var(--blue), var(--green)); border-radius: 4px 4px 0 0; min-height: 2px; transition: height 0.5s;
}
.pd-trend-bar small { font-size: 0.5rem; color: var(--dim); margin-top: 2px; }
.pd-trend-label { font-size: 0.65rem; color: var(--dim); text-align: center; margin-top: 4px; }

.pd-blurred { opacity: 0.5; position: relative; }
.pd-blurred::after { content: '🔒'; position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); font-size: 2rem; }

.pd-value-bar {
  height: 10px; background: rgba(255,255,255,0.06); border-radius: 5px;
  overflow: hidden; margin: 8px 0;
}
.pd-value-fill {
  height: 100%; background: linear-gradient(90deg, var(--orange), var(--gold), var(--green));
  border-radius: 5px; transition: width 0.5s; min-width: 4px;
}
.pd-value-text { font-size: 0.75rem; color: var(--dim); text-align: center; }

.pd-levels { display: flex; flex-direction: column; gap: 4px; }
.pd-level-row {
  display: flex; align-items: center; gap: 8px; padding: 6px 8px;
  background: var(--card); border-radius: 8px;
}
.pd-level-locked { opacity: 0.4; }
.pd-level-icon { font-size: 1.1rem; flex-shrink: 0; }
.pd-level-info { flex: 1; min-width: 0; }
.pd-level-info strong { font-size: 0.7rem; display: block; }
.pd-level-info small { font-size: 0.55rem; color: var(--dim); }
.pd-level-bar { height: 4px; background: rgba(255,255,255,0.06); border-radius: 2px; margin-top: 2px; overflow: hidden; }
.pd-level-fill { height: 100%; background: linear-gradient(90deg, var(--blue), var(--green)); border-radius: 2px; transition: width 0.5s; }
.pd-level-status { font-size: 0.7rem; flex-shrink: 0; }
.pd-level-desc { font-size: 0.7rem; color: var(--gold); text-align: center; margin-top: 6px; font-weight: 600; }

/* ===== V6.0 今日冒险计划卡片 ===== */
.dt-card {
  background: linear-gradient(135deg, rgba(255,217,61,0.08), rgba(255,140,66,0.05));
  border: 1px solid rgba(255,217,61,0.2); border-radius: var(--r-lg);
  padding: 14px 16px; margin: 4px 0 8px;
}
.dt-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.dt-title { font-weight: 800; font-size: 0.9rem; color: var(--gold); }
.dt-progress { font-weight: 800; font-size: 0.8rem; color: var(--green); }
.dt-bar { height: 6px; background: rgba(255,255,255,0.06); border-radius: 3px; overflow: hidden; margin-bottom: 8px; }
.dt-bar-fill { height: 100%; background: linear-gradient(90deg, var(--gold), var(--green)); border-radius: 3px; transition: width 0.5s; }
.dt-tasks { display: flex; flex-direction: column; gap: 4px; margin-bottom: 8px; }
.dt-task { display: flex; align-items: center; gap: 6px; font-size: 0.78rem; padding: 4px 6px; border-radius: 6px; }
.dt-task span:first-child { font-size: 1rem; }
.dt-task span:nth-child(2) { flex: 1; }
.dt-task span:last-child { font-weight: 700; color: var(--dim); font-size: 0.65rem; }
.dt-done { opacity: 0.5; text-decoration: line-through; }
.dt-done span:last-child { color: var(--green); }
.dt-next { display: flex; align-items: center; gap: 8px; padding: 8px 10px; background: rgba(255,255,255,0.04); border-radius: 10px; }
.dt-next-icon { font-size: 1.1rem; }
.dt-next-info { flex: 1; }
.dt-next-info strong { display: block; font-size: 0.78rem; color: var(--text); }
.dt-next-info small { font-size: 0.65rem; color: var(--dim); }
.dt-next-reward { font-size: 0.6rem; color: var(--gold); white-space: nowrap; }
.dt-review-hint { font-size: 0.65rem; color: var(--orange); margin-top: 6px; }
.dt-complete { text-align: center; padding: 8px; font-weight: 800; color: var(--gold); font-size: 0.85rem; animation: pop 0.4s ease; }

/* ===== V6.0.1 学习室目标条 ===== */
.lr-goal-strip { display: grid; grid-template-columns: repeat(3,1fr); gap: 6px; margin: 8px 0; }
.lr-goal-item { text-align: center; padding: 6px 4px; background: var(--surface); border-radius: 8px; font-size: 0.68rem; }
.lr-goal-item span:first-child { font-size: 0.9rem; display: block; }
.lr-goal-pct { color: var(--green); font-weight: 700; }
.lr-goal-bar { height: 4px; background: rgba(255,255,255,0.06); border-radius: 2px; overflow: hidden; margin-bottom: 6px; }
.lr-goal-fill { height: 100%; background: linear-gradient(90deg, var(--gold), var(--green)); border-radius: 2px; transition: width 0.5s; }
.lr-review-badge {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--orange); color: white; font-size: 0.5rem;
  min-width: 16px; height: 16px; border-radius: 8px; padding: 0 4px;
  font-weight: 800; margin-left: 2px;
}
.lr-review-notice { font-size: 0.7rem; color: var(--orange); margin-bottom: 6px; }
.lr-review-tag { font-size: 0.6rem; background: rgba(255,140,66,0.15); padding: 1px 6px; border-radius: 6px; color: var(--orange); }
.lr-review-item { border-left: 3px solid rgba(255,140,66,0.3); padding-left: 8px; }

/* 复习Tab */
.lr-review-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.lr-review-card {
  background: var(--surface); border-radius: var(--r); padding: 12px;
  text-align: center; border: 1px solid rgba(255,255,255,0.04);
  transition: opacity 0.3s;
}
.lr-review-urgent { border-color: rgba(255,82,82,0.4); background: rgba(255,82,82,0.04); }
.lr-review-word { font-size: 1.1rem; font-weight: 800; color: var(--text); }
.lr-review-meaning { font-size: 0.75rem; color: var(--dim); margin: 2px 0; }
.lr-review-mastery { margin: 6px 0; }
.lr-review-mastery-bar { height: 4px; background: rgba(255,255,255,0.06); border-radius: 2px; overflow: hidden; }
.lr-review-mastery-fill { height: 100%; background: var(--blue); border-radius: 2px; transition: width 0.5s; }
.lr-review-mastery small { font-size: 0.55rem; color: var(--dim); }
.lr-review-speak-btn { padding: 3px 10px; border: 1px solid rgba(255,255,255,0.1); border-radius: 8px; background: transparent; color: var(--dim); font-size: 0.7rem; cursor: pointer; margin: 4px 0; }
.lr-review-actions { display: flex; gap: 4px; margin-top: 4px; }
.lr-review-ok-btn, .lr-review-forgot-btn {
  flex: 1; padding: 5px 8px; border: none; border-radius: 8px;
  font-size: 0.65rem; font-weight: 700; cursor: pointer;
}
.lr-review-ok-btn { background: rgba(107,203,119,0.15); color: var(--green); }
.lr-review-forgot-btn { background: rgba(255,82,82,0.1); color: var(--red); }
.lr-review-info { font-size: 0.6rem; color: var(--dim); text-align: center; margin-top: 8px; }

/* ===== 🎒 宝物柜样式 ===== */
.tc-container { display: flex; flex-direction: column; gap: 12px; padding-bottom: 20px; }

/* 1. 身份卡 */
.tc-id-card {
  background: linear-gradient(135deg, var(--surface), #252545);
  border: 1px solid rgba(255,255,255,0.06); border-radius: var(--r-lg);
  padding: 16px 18px;
}
.tc-id-top { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.tc-avatar { font-size: 2.2rem; }
.tc-id-info strong { display: block; font-size: 1rem; color: var(--gold); }
.tc-level { font-size: 0.75rem; color: var(--dim); }
.tc-energy { margin: 6px 0; }
.tc-energy-bar { height: 10px; background: rgba(255,255,255,0.06); border-radius: 5px; overflow: hidden; }
.tc-energy-fill { height: 100%; background: linear-gradient(90deg, var(--gold), var(--orange)); border-radius: 5px; transition: width 0.6s; }
.tc-energy-text { font-size: 0.65rem; color: var(--dim); margin-top: 4px; display: block; }
.tc-energy-hint { font-size: 0.7rem; color: var(--text); margin-top: 4px; }
.tc-energy-quick { font-size: 0.65rem; color: var(--green); font-weight: 600; }

/* 2. 下一件宝物 (最高优先级视觉) */
.tc-next-treasure {
  position: relative; overflow: hidden;
  background: linear-gradient(135deg, rgba(255,217,61,0.1), rgba(255,140,66,0.08));
  border: 2px solid rgba(255,217,61,0.35); border-radius: var(--r-lg);
  padding: 18px 16px; animation: glowPulse 2s ease-in-out infinite;
}
.tc-next-claimable {
  border-color: rgba(107,203,119,0.5);
  background: linear-gradient(135deg, rgba(107,203,119,0.12), rgba(107,203,119,0.05));
  animation: glowClaim 1.2s ease-in-out infinite;
}
.tc-next-locked {
  border-color: rgba(255,255,255,0.08);
  background: var(--surface);
}
.tc-next-locked .tc-next-label { color: var(--dim); }
.tc-next-locked-hint { font-size: 0.65rem; color: var(--dim); margin-top: 6px; font-style: italic; }
.tc-next-close { border-color: rgba(255,217,61,0.2); }
.tc-next-close .tc-next-label { color: var(--gold); }
@keyframes glowPulse { 0%,100% { box-shadow: 0 0 12px rgba(255,217,61,0.1); } 50% { box-shadow: 0 0 24px rgba(255,217,61,0.2); } }
@keyframes glowClaim { 0%,100% { box-shadow: 0 0 16px rgba(107,203,119,0.15); } 50% { box-shadow: 0 0 32px rgba(107,203,119,0.35); } }
.tc-next-label { font-size: 0.75rem; font-weight: 800; color: var(--gold); display: block; margin-bottom: 8px; }
.tc-next-claimable .tc-next-label { color: var(--green); }
.tc-next-main { display: flex; align-items: center; gap: 10px; }
.tc-next-icon { font-size: 2.5rem; }
.tc-next-info { flex: 1; }
.tc-next-info strong { display: block; font-size: 1rem; color: var(--text); }
.tc-next-info small { display: block; font-size: 0.7rem; color: var(--dim); }
.tc-next-prog { height: 5px; background: rgba(255,255,255,0.06); border-radius: 3px; overflow: hidden; margin-top: 6px; }
.tc-next-prog-fill { height: 100%; background: var(--gold); border-radius: 3px; transition: width 0.5s; }
.tc-next-pct { font-size: 0.6rem; color: var(--gold); font-weight: 700; }
.tc-next-reward { font-size: 0.65rem; color: var(--gold); margin: 8px 0; }
.tc-next-btn {
  display: block; width: 100%; padding: 14px; border: none; border-radius: 16px;
  font-size: 0.9rem; font-weight: 800; cursor: pointer; text-align: center;
  background: linear-gradient(135deg, #FFB300, #FF8F00);
  color: #1a1a2e; transition: all 0.15s;
  box-shadow: 0 4px 16px rgba(255,179,0,0.3);
  letter-spacing: 0.5px;
}
.tc-next-claimable .tc-next-btn {
  background: linear-gradient(135deg, #43A047, #66BB6A);
  box-shadow: 0 4px 20px rgba(67,160,71,0.4);
  font-size: 0.95rem;
}
.tc-next-locked .tc-next-btn {
  background: linear-gradient(135deg, var(--blue), #5BA0E0);
  box-shadow: 0 4px 16px rgba(74,144,217,0.3);
  color: white;
}
.tc-next-btn:active { transform: scale(0.96); }

/* 3. 最近宝物 */
.tc-section { margin-top: 4px; }
.tc-section h4 { font-size: 0.85rem; color: var(--text); margin-bottom: 6px; }
.tc-recent { display: flex; gap: 8px; }
.tc-recent-card {
  flex: 1; background: var(--surface); border-radius: var(--r);
  padding: 10px; text-align: center; border: 1px solid rgba(255,217,61,0.1);
}
.tc-recent-icon { font-size: 1.6rem; display: block; margin-bottom: 2px; }
.tc-recent-info strong { display: block; font-size: 0.7rem; }
.tc-recent-info small { font-size: 0.55rem; color: var(--dim); }
.tc-recent-empty {
  text-align: center; padding: 14px; background: var(--surface);
  border-radius: var(--r); width: 100%;
}
.tc-recent-empty span { font-size: 2rem; display: block; }
.tc-recent-empty p { font-size: 0.8rem; color: var(--dim); margin-top: 4px; }
.tc-recent-empty small { font-size: 0.6rem; color: var(--dim); }

/* 4. 世界收藏册 */
.tc-worlds { display: flex; flex-direction: column; gap: 6px; }
.tc-world-card {
  display: flex; align-items: center; gap: 8px; padding: 10px 14px;
  background: var(--surface); border-radius: var(--r);
  border: 1px solid rgba(255,255,255,0.04);
}
.tc-world-icon { font-size: 1.6rem; }
.tc-world-info { flex: 1; }
.tc-world-info strong { display: block; font-size: 0.78rem; }
.tc-world-info small { font-size: 0.6rem; color: var(--dim); }
.tc-world-go {
  padding: 6px 14px; border: 1px solid var(--gold); border-radius: 12px;
  background: transparent; color: var(--gold); font-size: 0.65rem;
  font-weight: 700; cursor: pointer; white-space: nowrap;
}
.tc-world-go:active { background: rgba(255,217,61,0.1); }
.tc-world-locked { opacity: 0.5; }
.tc-world-done { border-color: rgba(107,203,119,0.2); }

/* 5. 宝物图鉴 */
.tc-filter-tabs {
  display: flex; gap: 4px; padding: 4px; background: var(--surface);
  border-radius: 10px; margin-bottom: 8px;
}
.tc-filter-tab {
  flex: 1; padding: 7px 4px; border: none; border-radius: 8px;
  background: transparent; color: var(--dim); font-size: 0.65rem;
  font-weight: 700; cursor: pointer; transition: all 0.15s;
}
.tc-filter-tab.active { background: var(--card); color: var(--gold); }
.tc-gallery { display: grid; grid-template-columns: repeat(3,1fr); gap: 6px; }
.tc-gallery-item {
  background: var(--surface); border-radius: var(--r);
  padding: 10px 6px; text-align: center; cursor: pointer;
  transition: all 0.15s;
}
.tc-gallery-item:active { transform: scale(0.95); }
.tc-gallery-item span { font-size: 1.6rem; display: block; }
.tc-gallery-item strong { font-size: 0.6rem; display: block; margin: 2px 0; }
.tc-gallery-item small { font-size: 0.5rem; color: var(--dim); display: block; }
.tc-owned { border: 1px solid rgba(255,217,61,0.2); }
.tc-close { border: 1px solid rgba(255,255,255,0.08); }
.tc-claimable { border: 1px solid rgba(107,203,119,0.4); animation: glowClaim 1.5s ease-in-out infinite; }
.tc-secret { opacity: 0.5; font-style: italic; }
.tc-gallery-prog { height: 3px; background: rgba(255,255,255,0.06); border-radius: 2px; overflow: hidden; margin-top: 4px; }
.tc-gallery-prog-fill { height: 100%; background: var(--gold); border-radius: 2px; }
.tc-gallery-pct { font-size: 0.45rem !important; color: var(--gold) !important; }
.tc-zoomed { transform: scale(1.08); box-shadow: 0 0 16px rgba(255,217,61,0.2); }
.tc-empty-msg { grid-column: 1/-1; text-align: center; padding: 16px; font-size: 0.75rem; color: var(--dim); }

/* ===== V6.1 试玩桥 + 家长解锁 + 会员方案 ===== */
.am-trial-bridge { border: 2px dashed rgba(255,217,61,0.4) !important; cursor: pointer; }
.am-bridge-icon { font-size: 1.3rem; }
.am-trial-msg { font-size: 0.6rem; color: var(--gold); text-align: center; padding: 4px 0; }

.af-trial-bridge { text-align: center; padding: 20px; margin-top: 10px; background: rgba(255,217,61,0.08); border: 2px dashed rgba(255,217,61,0.3); border-radius: var(--r-lg); animation: fi 0.5s ease; }
.af-tb-icon { font-size: 2.5rem; }
.af-trial-bridge h3 { font-size: 1rem; color: var(--gold); margin: 8px 0; }
.af-trial-bridge p { font-size: 0.75rem; color: var(--dim); }
.af-tb-btn { margin-top: 12px; padding: 12px 28px; border: none; border-radius: 25px; background: var(--gold); color: #1a1a2e; font-weight: 800; font-size: 0.85rem; cursor: pointer; }

/* 试玩完成页 */
.tp-container { display: flex; flex-direction: column; gap: 16px; align-items: center; text-align: center; padding: 20px 0; }
.tp-hero { margin-bottom: 8px; }
.tp-icon { font-size: 4rem; }
.tp-hero h2 { font-size: 1.3rem; color: var(--gold); margin-top: 8px; }
.tp-rewards { display: flex; gap: 10px; }
.tp-reward { background: var(--surface); border-radius: 12px; padding: 10px 14px; font-size: 0.75rem; }
.tp-reward span { font-size: 1.2rem; display: block; }
.tp-message { font-size: 0.85rem; color: var(--dim); max-width: 300px; }
.tp-bridge { font-size: 1rem; font-weight: 700; color: var(--gold); }
.tp-bridge-hint { font-size: 0.7rem; color: var(--dim); }
.tp-actions { display: flex; flex-direction: column; gap: 8px; width: 100%; max-width: 300px; }
.tp-btn { padding: 14px; border: none; border-radius: 20px; font-weight: 800; font-size: 0.9rem; cursor: pointer; }
.tp-parent-btn { background: linear-gradient(135deg, var(--gold), var(--gold-dark)); color: #1a1a2e; }
.tp-back-btn { background: rgba(255,255,255,0.08); color: var(--dim); }

/* 家长解锁页 */
.pu-container { display: flex; flex-direction: column; gap: 12px; }
.pu-header { display: flex; justify-content: space-between; align-items: center; }
.pu-header h2 { font-size: 1.2rem; color: var(--gold); }
.pu-step { font-size: 0.7rem; color: var(--dim); }
.pu-verify { text-align: center; }
.pu-verify p { font-size: 0.8rem; color: var(--dim); margin-bottom: 12px; }
.pu-pin-input input { width: 100%; padding: 14px; border: 2px solid rgba(255,255,255,0.1); border-radius: 16px; background: var(--surface); color: var(--text); font-size: 1.5rem; text-align: center; letter-spacing: 8px; outline: none; }
.pu-hint { font-size: 0.65rem; color: var(--gold); margin-top: 6px; }
.pu-note { font-size: 0.6rem; color: var(--dim); margin-top: 8px; }

.pu-btn { padding: 12px 20px; border: none; border-radius: 16px; font-weight: 700; font-size: 0.8rem; cursor: pointer; width: 100%; margin-top: 8px; }
.pu-primary-btn { background: linear-gradient(135deg, var(--gold), var(--gold-dark)); color: #1a1a2e; }
.pu-back-btn { background: rgba(255,255,255,0.06); color: var(--dim); }

.pu-report h4 { font-size: 0.9rem; color: var(--text); margin-bottom: 8px; }
.pu-report-list { display: flex; flex-direction: column; gap: 4px; margin-bottom: 10px; }
.pu-report-item { font-size: 0.75rem; padding: 4px 0; }
.pu-report-item span { margin-right: 6px; }
.pu-report-detail p { font-size: 0.72rem; color: var(--dim); margin: 4px 0; }
.pu-report-next { font-size: 0.75rem; color: var(--gold); margin-top: 8px; }

/* 会员方案 */
.pu-plan-cards { display: flex; flex-direction: column; gap: 10px; margin-bottom: 10px; }
.pu-plan-card { background: var(--surface); border: 2px solid rgba(255,255,255,0.06); border-radius: var(--r-lg); padding: 18px 16px; text-align: center; }
.pu-plan-recommended { border-color: rgba(255,217,61,0.4); position: relative; }
.pu-plan-badge { position: absolute; top: -10px; left: 50%; transform: translateX(-50%); background: var(--gold); color: #1a1a2e; padding: 3px 14px; border-radius: 10px; font-size: 0.65rem; font-weight: 800; }
.pu-plan-name { font-size: 0.9rem; font-weight: 700; margin-bottom: 4px; }
.pu-plan-price { font-size: 2rem; font-weight: 800; color: var(--gold); }
.pu-plan-price span { font-size: 0.8rem; color: var(--dim); }
.pu-plan-desc { font-size: 0.7rem; color: var(--dim); margin: 4px 0 8px; }
.pu-plan-features { display: flex; flex-direction: column; gap: 3px; margin: 8px 0; }
.pu-plan-features span { font-size: 0.7rem; }
.pu-plan-btn { padding: 12px; border: none; border-radius: 14px; background: var(--gold); color: #1a1a2e; font-weight: 800; font-size: 0.8rem; cursor: pointer; width: 100%; margin-top: 8px; }
.pu-plan-btn-recommended { background: linear-gradient(135deg, var(--gold), var(--orange)); }

.pu-success { text-align: center; }
.pu-success-icon { font-size: 3rem; margin-bottom: 8px; }
.pu-success h3 { font-size: 1.2rem; color: var(--gold); }
.pu-success p { font-size: 0.8rem; color: var(--dim); margin-top: 4px; }

/* 社交门控 */
.social-gate { text-align: center; padding: 30px 16px; }
.social-gate-icon { font-size: 3rem; }
.social-gate h3 { font-size: 1rem; color: var(--gold); margin: 8px 0; }
.social-gate p { font-size: 0.75rem; color: var(--dim); margin-bottom: 12px; }
.social-gate-lock { font-size: 2rem; opacity: 0.3; }

/* AI 标签 */
.af-ai-label {
  display: inline-block; margin-top: 8px; padding: 2px 8px;
  background: rgba(167,139,250,0.15); border: 1px solid rgba(167,139,250,0.3);
  border-radius: 8px; font-size: 0.55rem; color: var(--purple);
  font-weight: 600;
}

.pd-voice-note { font-size: 0.6rem; color: var(--dim); margin-top: 6px; }
.pd-voice-info { font-size: 0.7rem; margin-bottom: 6px; }
.pd-voice-info b { color: var(--gold); }
.pd-voice-test { display: flex; gap: 6px; }
.pd-voice-btn { flex: 1; padding: 8px; border: 1px solid rgba(255,255,255,0.12); border-radius: 10px; background: var(--surface); color: var(--text); font-size: 0.7rem; font-weight: 600; cursor: pointer; }
.pd-voice-btn:active { background: rgba(255,255,255,0.08); }
.dt-child-msg { font-size: 0.7rem; color: var(--orange); margin: 6px 0; font-style: italic; }

/* V6.3.3 英文教学声音选择器 */
.av-container { background:#1a1a30; padding:12px; border-radius:12px; font-size:0.7rem; line-height:1.6; margin-top:8px; border:1px solid rgba(255,255,255,0.06); }
.av-container h4 { color:#FFD93D; margin-bottom:6px; }
.av-voice-list { display:flex; flex-direction:column; gap:4px; max-height:350px; overflow-y:auto; margin:6px 0; }
.av-voice-row { display:flex; align-items:center; justify-content:space-between; gap:6px; padding:6px 8px; background:rgba(255,255,255,0.03); border-radius:8px; border:1px solid rgba(255,255,255,0.04); }
.av-selected { border-color:rgba(107,203,119,0.4); background:rgba(107,203,119,0.06); }
.av-excluded { opacity:0.4; }
.av-voice-info { flex:1; min-width:0; }
.av-voice-info strong { display:block; font-size:0.7rem; }
.av-voice-info small { font-size:0.55rem; color:#888; }
.av-voice-btns { display:flex; gap:4px; flex-shrink:0; }
.av-btn { padding:4px 10px; border-radius:8px; border:none; cursor:pointer; font-size:0.6rem; font-weight:600; white-space:nowrap; }
.av-test-btn { background:rgba(74,144,217,0.2); color:#7AB8F5; }
.av-pick-btn { background:rgba(255,255,255,0.08); color:#ccc; }
.av-selected .av-pick-btn { background:rgba(107,203,119,0.2); color:#6BCB77; }
/* V6.4 兴趣词包 */
.lr-vocab-section { margin-bottom: 10px; }
.lr-vocab-section h5 { font-size: 0.75rem; color: var(--gold); margin-bottom: 4px; }
.lr-interest-card { border: 1px solid rgba(74,144,217,0.2); background: rgba(74,144,217,0.04); }
.lr-v-source { font-size: 0.6rem; margin-left: 4px; }
.lr-v-theme { font-size: 0.55rem; color: var(--dim); }
/* V6.4.1 森林支线任务 */
.fq-container { display:flex; flex-direction:column; gap:10px; }
.fq-header { display:flex; align-items:center; gap:8px; padding:8px 12px; background:var(--surface); border-radius:var(--r); font-size:0.8rem; }
.fq-scene { min-height:160px; background:var(--card); border-radius:var(--r-lg); padding:22px 16px; display:flex; flex-direction:column; align-items:center; justify-content:center; }
.fq-narrator { text-align:center; } .fq-narrator span { font-size:3rem; display:block; } .fq-narrator p { font-size:0.9rem; color:var(--dim); margin-top:6px; }
.fq-pick-grid { display:grid; grid-template-columns:repeat(2,1fr); gap:10px; width:100%; max-width:280px; margin-top:10px; }
.fq-pick-card { background:var(--surface); border-radius:var(--r); padding:12px 8px; text-align:center; cursor:pointer; border:2px solid rgba(255,255,255,0.06); transition:all 0.15s; }
.fq-pick-card:active { transform:scale(0.95); }
.fq-pick-img { width:60px; height:60px; margin:0 auto 6px; } .fq-pick-img svg { width:100%; height:100%; }
.fq-pick-card span { font-size:0.8rem; font-weight:700; }
.fq-correct { border-color:var(--green)!important; background:rgba(107,203,119,0.1); }
.fq-wrong { border-color:var(--red)!important; background:rgba(255,82,82,0.1); }
.fq-speak { text-align:center; } .fq-speak-word { font-size:2rem; font-weight:800; color:var(--gold); } .fq-speak-meaning { font-size:0.8rem; color:var(--dim); }
.fq-complete { text-align:center; } .fq-comp-icon { font-size:3rem; } .fq-complete h3 { font-size:1.2rem; color:var(--gold); }
.fq-waveform { display:flex; gap:4px; justify-content:center; height:30px; align-items:center; opacity:0.3; }
.fq-waveform.active { opacity:1; } .fq-waveform span { width:4px; height:6px; background:var(--pink); border-radius:2px; }
.fq-waveform.active span { animation:wv 0.6s ease-in-out infinite; }
.fq-waveform.active span:nth-child(1){animation-delay:0s} .fq-waveform.active span:nth-child(2){animation-delay:0.1s} .fq-waveform.active span:nth-child(3){animation-delay:0.2s} .fq-waveform.active span:nth-child(4){animation-delay:0.3s} .fq-waveform.active span:nth-child(5){animation-delay:0.4s}
/* V6.3.3 Alpha Welcome */
.alpha-welcome-screen { position:fixed; inset:0; background:#0f0f1a; z-index:500; display:flex; align-items:center; justify-content:center; padding:20px; }
.aw-content { max-width:380px; width:100%; text-align:center; }
.aw-logo { font-size:4rem; margin-bottom:12px; }
.aw-content h2 { font-size:1.3rem; color:var(--gold); margin-bottom:8px; }
.aw-content h4 { font-size:1rem; color:var(--gold); margin:12px 0 6px; }
.aw-content p { font-size:0.8rem; color:var(--dim); margin-bottom:6px; }
.aw-note { font-size:0.7rem!important; color:var(--orange)!important; }
.aw-hint { font-size:0.65rem!important; margin-top:8px; }
.aw-input { width:100%; padding:12px; border:2px solid rgba(255,255,255,0.1); border-radius:14px; background:var(--surface); color:var(--text); font-size:0.9rem; text-align:center; outline:none; margin:6px 0; }
.aw-input:focus { border-color:var(--gold); }
.aw-btn { display:block; width:100%; padding:14px; border:none; border-radius:16px; font-weight:800; font-size:0.9rem; cursor:pointer; margin:8px 0; }
.aw-btn-primary { background:linear-gradient(135deg,var(--gold),var(--gold-dark)); color:#1a1a2e; }
.aw-btn-back { background:rgba(255,255,255,0.06); color:var(--dim); font-size:0.75rem; }
.aw-error { background:rgba(255,82,82,0.1); border:1px solid rgba(255,82,82,0.3); border-radius:10px; padding:10px; color:var(--red); font-size:0.75rem; }
.aw-consent { font-size:0.65rem!important; text-align:left; line-height:1.5; }
.aw-check { display:flex; align-items:center; gap:8px; font-size:0.7rem; color:var(--dim); margin:8px 0; cursor:pointer; text-align:left; }
.aw-check input { width:16px; height:16px; }
.aw-preset-names { display:flex; flex-wrap:wrap; gap:6px; margin:6px 0; justify-content:center; }
.aw-name-chip { padding:6px 12px; border:1px solid rgba(255,255,255,0.12); border-radius:12px; background:var(--surface); color:var(--text); font-size:0.75rem; cursor:pointer; }
.aw-name-chip:active { background:rgba(255,255,255,0.1); }
.aw-avatar-pick { display:flex; gap:8px; justify-content:center; margin:6px 0; }
.aw-avatar-btn { width:44px;height:44px;border-radius:50%;border:2px solid rgba(255,255,255,0.08);background:var(--surface);font-size:1.3rem;cursor:pointer; }
.aw-av-selected { border-color:var(--gold)!important; }
.aw-field { text-align:left; margin:8px 0; }
.aw-field label { font-size:0.7rem; color:var(--dim); display:block; margin-bottom:4px; }
.aw-field input, .aw-field select { text-align:left; }
/* V6.5 会员方案展示 */
.pd-plans { display:flex; flex-direction:column; gap:10px; margin:10px 0; }
.pd-plan-card { background:var(--surface); border:2px solid rgba(255,255,255,0.06); border-radius:var(--r-lg); padding:18px 16px; text-align:center; }
.pd-plan-rec { border-color:rgba(255,217,61,0.3); position:relative; }
.pd-plan-badge { position:absolute; top:-10px; left:50%; transform:translateX(-50%); background:var(--gold); color:#1a1a2e; padding:3px 14px; border-radius:10px; font-size:0.65rem; font-weight:800; }
.pd-plan-name { font-size:0.9rem; font-weight:700; }
.pd-plan-price { font-size:2rem; font-weight:800; color:var(--gold); margin:4px 0; }
.pd-plan-price span { font-size:0.8rem; color:var(--dim); }
.pd-plan-desc { font-size:0.7rem; color:var(--dim); margin-bottom:8px; }
.pd-plan-feats { display:flex; flex-direction:column; gap:2px; margin:8px 0; text-align:left; }
.pd-plan-feats span { font-size:0.7rem; }
.pd-plan-btn { width:100%; padding:12px; border:none; border-radius:14px; background:rgba(255,255,255,0.08); color:var(--dim); font-weight:700; font-size:0.8rem; cursor:pointer; }
.pd-plan-btn-rec { background:rgba(255,217,61,0.1); color:var(--gold); }
.pd-plan-note { font-size:0.6rem; color:var(--dim); text-align:center; margin-top:6px; }
/* V6.5.1.3 发送验证码按钮 */
.aw-send-code-btn {
  display:block; width:100%; padding:14px; border:none; border-radius:14px;
  font-weight:700; font-size:0.95rem; cursor:pointer; min-height:48px;
  transition: all 0.2s; margin:8px 0;
}
.aw-send-code-btn:disabled {
  background: rgba(255,255,255,0.08); color: rgba(255,255,255,0.6);
  cursor: not-allowed; opacity: 0.55;
}
.aw-send-code-btn:not(:disabled) {
  background: linear-gradient(135deg, #FFB300, #FF8F00);
  color: #1a1a2e; cursor: pointer; opacity: 1;
  box-shadow: 0 4px 16px rgba(255,179,0,0.25);
}
.aw-send-code-btn:not(:disabled):active {
  transform: scale(0.97);
}
.aw-phone-input {
  font-size: 1.1rem !important; letter-spacing: 2px; text-align: center !important;
}
/* 验证并继续按钮 */
.aw-verify-btn {
  display:block; width:100%; padding:14px; border:none; border-radius:14px;
  font-weight:700; font-size:0.95rem; cursor:pointer; min-height:48px;
  transition:all 0.2s; margin:8px 0;
}
.aw-verify-btn:disabled {
  background:rgba(255,255,255,0.08); color:rgba(255,255,255,0.6);
  cursor:not-allowed; opacity:0.55;
}
.aw-verify-btn:not(:disabled) {
  background:linear-gradient(135deg, var(--gold), var(--gold-dark));
  color:#1a1a2e; cursor:pointer; opacity:1;
  box-shadow:0 4px 16px rgba(255,217,61,0.3);
}
.aw-verify-btn:not(:disabled):active { transform:scale(0.97); }
.aw-code-input { font-size:1.2rem!important; letter-spacing:6px; text-align:center!important; }
