/* BoBo & Friends — prototype styles */

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html, body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang TC', 'Microsoft JhengHei', sans-serif;
  background: linear-gradient(135deg, #E6F1FB 0%, #FBEAF0 100%);
  min-height: 100vh;
  color: #2C2C2A;
  -webkit-font-smoothing: antialiased;
}

.page-wrap {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px 12px 80px;
}

.phone-frame {
  width: 100%;
  max-width: 380px;
  background: #FFFFFF;
  border-radius: 32px;
  border: 1px solid rgba(0,0,0,0.06);
  box-shadow: 0 24px 60px -20px rgba(24,95,165,0.25), 0 6px 12px rgba(0,0,0,0.04);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 720px;
  position: relative;
}

.page-note {
  margin-top: 20px;
  font-size: 13px;
  color: #5F5E5A;
  text-align: center;
  max-width: 380px;
  line-height: 1.6;
}

.status-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 20px 4px;
  font-size: 11px;
  color: #5F5E5A;
  flex-shrink: 0;
}
.status-icons { display: flex; gap: 6px; align-items: center; }
.status-icons i { font-size: 13px; }

.screen {
  flex: 1;
  padding: 8px 16px 16px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}
.hidden { display: none !important; }

/* =============== ONBOARDING =============== */
#screen-onboarding {
  background: linear-gradient(180deg, #E6F1FB 0%, #FFFFFF 60%);
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px 24px;
}
.ob-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  width: 100%;
}
.ob-step.hidden { display: none; }
.ob-mascot {
  width: 120px;
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #FFFFFF;
  border-radius: 50%;
  box-shadow: 0 8px 24px rgba(24,95,165,0.15);
}
.ob-step h1 {
  font-size: 22px;
  font-weight: 600;
  color: #185FA5;
}
.ob-sub {
  font-size: 14px;
  color: #5F5E5A;
  line-height: 1.6;
  max-width: 280px;
}
.btn-primary {
  background: #185FA5;
  color: #FFFFFF;
  border: none;
  padding: 14px 32px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: transform 0.1s, box-shadow 0.1s;
  box-shadow: 0 4px 12px rgba(24,95,165,0.3);
}
.btn-primary:active { transform: scale(0.97); }
.btn-primary i { font-size: 18px; }

#kid-name {
  width: 100%;
  padding: 14px 16px;
  border: 2px solid #E6F1FB;
  border-radius: 14px;
  font-size: 16px;
  font-family: inherit;
  text-align: center;
  outline: none;
}
#kid-name:focus { border-color: #185FA5; }

.grade-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  width: 100%;
  margin-top: 8px;
}
.grade-btn {
  padding: 16px;
  background: #FFFFFF;
  border: 2px solid #E6F1FB;
  border-radius: 14px;
  font-size: 14px;
  font-weight: 500;
  font-family: inherit;
  color: #185FA5;
  cursor: pointer;
}
.grade-btn:active { background: #E6F1FB; transform: scale(0.97); }

/* =============== HOME =============== */
.home-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 4px 12px;
}
.user-block {
  display: flex;
  align-items: center;
  gap: 10px;
}
.avatar-mini {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #F1EFE8;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hi { font-size: 11px; color: #5F5E5A; line-height: 1; }
.name { font-size: 15px; font-weight: 600; margin-top: 2px; }

.stats-row { display: flex; gap: 6px; }
.stat-pill {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 10px;
  background: #FAEEDA;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  color: #854F0B;
}
.stat-pill i { font-size: 14px; }
.stat-pill.stat-purple { background: #EEEDFE; color: #26215C; }

.quest-card {
  background: #FBEAF0;
  border-radius: 16px;
  padding: 14px 16px;
  margin: 4px 0 12px;
}
.quest-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}
.quest-label {
  font-size: 11px;
  font-weight: 600;
  color: #993556;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.quest-reward { font-size: 11px; color: #993556; }
.quest-reward i { font-size: 12px; vertical-align: -1px; }
.quest-title { font-size: 14px; font-weight: 500; color: #4B1528; margin-bottom: 8px; }
.quest-bar {
  height: 6px;
  background: #F4C0D1;
  border-radius: 999px;
  overflow: hidden;
}
.quest-bar-fill {
  height: 100%;
  background: #D4537E;
  border-radius: 999px;
  transition: width 0.4s;
}
.quest-progress { font-size: 11px; color: #993556; margin-top: 4px; }

.speak-cta {
  background: #185FA5;
  border: none;
  border-radius: 18px;
  padding: 14px 16px;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 14px;
  color: #FFFFFF;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  transition: transform 0.1s;
  box-shadow: 0 6px 16px rgba(24,95,165,0.3);
}
.speak-cta:active { transform: scale(0.98); }
.speak-cta-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.speak-cta-text { flex: 1; }
.speak-cta-title { font-size: 16px; font-weight: 600; }
.speak-cta-sub { font-size: 12px; opacity: 0.85; margin-top: 2px; }
.speak-cta-mic {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #FFFFFF;
  color: #185FA5;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.speak-cta-mic i { font-size: 18px; }

.section-label {
  font-size: 13px;
  font-weight: 600;
  color: #5F5E5A;
  margin: 14px 4px 10px;
}

.activity-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}
.activity-card {
  border-radius: 14px;
  padding: 14px 8px;
  text-align: center;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  transition: transform 0.1s;
}
.activity-card:active { transform: scale(0.95); }
.activity-card.a-vocab { background: #FAECE7; color: #4A1B0C; }
.activity-card.a-grammar { background: #EEEDFE; color: #26215C; }
.activity-card.a-spelling { background: #FAEEDA; color: #412402; }
.activity-card.a-stories { background: #E1F5EE; color: #04342C; }
.activity-card.a-games { background: #FBEAF0; color: #4B1528; }
.activity-card.a-roleplay { background: #E6F1FB; color: #042C53; }
.activity-icon {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 6px;
}
.activity-icon i { font-size: 20px; }

/* =============== SPEAK =============== */
#screen-speak {
  padding: 0;
  background: #F8FAFC;
}
.speak-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px 12px;
  background: #FFFFFF;
  border-bottom: 0.5px solid #E5E3DD;
}
.back-btn, .close-btn {
  font-size: 22px;
  color: #5F5E5A;
  cursor: pointer;
}
.speak-bobo-info { flex: 1; }
.bobo-name { font-size: 14px; font-weight: 600; }
.bobo-status { font-size: 11px; color: #5F5E5A; display: flex; align-items: center; gap: 4px; }
.status-dot {
  width: 6px;
  height: 6px;
  background: #1D9E75;
  border-radius: 50%;
  display: inline-block;
}
.speak-bobo-info .bobo-status.speaking .status-dot { background: #185FA5; animation: pulse 1.2s infinite; }
.speak-bobo-info .bobo-status.listening .status-dot { background: #D85A30; animation: pulse 0.8s infinite; }
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}
.scene-badge {
  background: #FAEEDA;
  color: #854F0B;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  gap: 4px;
}
.scene-badge i { font-size: 12px; }

.scene-picker { padding: 16px; }
.picker-title { font-size: 16px; font-weight: 600; }
.picker-sub { font-size: 12px; color: #5F5E5A; margin-bottom: 14px; }
.scene-list { display: flex; flex-direction: column; gap: 10px; }
.scene-option {
  background: #FFFFFF;
  border: 0.5px solid #E5E3DD;
  border-radius: 14px;
  padding: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  transition: transform 0.1s, border-color 0.1s;
}
.scene-option:active { transform: scale(0.98); border-color: #185FA5; }
.scene-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.scene-icon i { font-size: 22px; }
.scene-title { font-size: 14px; font-weight: 600; }
.scene-desc { font-size: 11px; color: #5F5E5A; margin-top: 2px; }

.conversation {
  flex: 1;
  padding: 16px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 280px;
}

.msg-bobo, .msg-kid, .msg-correction {
  animation: slideIn 0.3s;
}
@keyframes slideIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.msg-bobo {
  display: flex;
  gap: 8px;
  align-items: flex-end;
}
.msg-bobo-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #185FA5;
  flex-shrink: 0;
  position: relative;
}
.msg-bobo-avatar::before,
.msg-bobo-avatar::after {
  content: '';
  position: absolute;
  top: 8px;
  width: 6px;
  height: 6px;
  background: #FFFFFF;
  border-radius: 50%;
}
.msg-bobo-avatar::before { left: 6px; }
.msg-bobo-avatar::after { right: 6px; }
.msg-bobo-bubble {
  background: #FFFFFF;
  border-radius: 16px 16px 16px 4px;
  padding: 10px 14px;
  max-width: 250px;
  border: 0.5px solid #E5E3DD;
}
.msg-bobo-en { font-size: 13px; }
.msg-bobo-zh { font-size: 11px; color: #888780; margin-top: 4px; }

.msg-kid {
  display: flex;
  justify-content: flex-end;
}
.msg-kid-bubble {
  background: #DDE6F4;
  border-radius: 16px 16px 4px 16px;
  padding: 10px 14px;
  max-width: 250px;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.msg-kid-bubble i { font-size: 12px; color: #185FA5; }

.msg-correction {
  background: #E1F5EE;
  border-radius: 14px;
  padding: 12px 14px;
  border-left: 3px solid #1D9E75;
}
.correction-head {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
}
.correction-head i { font-size: 14px; color: #0F6E56; }
.correction-label {
  font-size: 11px;
  font-weight: 600;
  color: #0F6E56;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.correction-intro { font-size: 12px; color: #04342C; margin-bottom: 6px; }
.correction-suggestion {
  background: #FFFFFF;
  border-radius: 10px;
  padding: 8px 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.correction-en { font-size: 13px; font-weight: 600; }
.correction-zh { font-size: 11px; color: #888780; margin-top: 2px; }
.correction-play {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #1D9E75;
  color: #FFFFFF;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}
.correction-play i { font-size: 14px; }
.correction-hint { font-size: 11px; color: #0F6E56; margin-top: 8px; }

.mic-area {
  padding: 12px 16px 16px;
  background: #FFFFFF;
  border-top: 0.5px solid #E5E3DD;
}
.quick-actions { display: flex; gap: 8px; margin-bottom: 12px; justify-content: center; }
.quick-btn {
  background: #F1EFE8;
  border: none;
  font-family: inherit;
  font-size: 11px;
  color: #444441;
  padding: 6px 12px;
  border-radius: 999px;
  cursor: pointer;
}
.quick-btn:active { background: #E5E3DD; }
.mic-row { display: flex; justify-content: center; align-items: center; gap: 14px; }
.mic-side {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #F1EFE8;
  color: #5F5E5A;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.mic-side i { font-size: 20px; }
.mic-main {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: #185FA5;
  color: #FFFFFF;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(24,95,165,0.4);
  transition: transform 0.1s, background 0.2s;
}
.mic-main:active { transform: scale(0.95); }
.mic-main.recording { background: #D85A30; box-shadow: 0 6px 16px rgba(216,90,48,0.45); }
.mic-main i { font-size: 30px; }
.mic-pulse {
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  border: 2px solid #378ADD;
  opacity: 0;
  pointer-events: none;
}
.mic-main.recording .mic-pulse {
  opacity: 0.5;
  animation: micPulse 1.2s infinite;
  border-color: #D85A30;
}
@keyframes micPulse {
  0% { transform: scale(1); opacity: 0.6; }
  100% { transform: scale(1.4); opacity: 0; }
}
.mic-hint {
  text-align: center;
  font-size: 11px;
  color: #888780;
  margin-top: 8px;
}

.type-area {
  padding: 12px 16px 16px;
  background: #FFFFFF;
  border-top: 0.5px solid #E5E3DD;
  display: flex;
  gap: 8px;
}
#type-input {
  flex: 1;
  padding: 12px 14px;
  border: 1px solid #E5E3DD;
  border-radius: 999px;
  font-size: 14px;
  font-family: inherit;
  outline: none;
}
#type-input:focus { border-color: #185FA5; }
.btn-send {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #185FA5;
  color: #FFFFFF;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.btn-send i { font-size: 18px; }

/* =============== QUIZ =============== */
.quiz-top {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 4px 14px;
}
.quiz-progress-bar {
  flex: 1;
  height: 8px;
  background: #F1EFE8;
  border-radius: 999px;
  overflow: hidden;
}
.quiz-progress-fill {
  height: 100%;
  background: #1D9E75;
  border-radius: 999px;
  width: 10%;
  transition: width 0.4s;
}
.quiz-counter { font-size: 12px; font-weight: 600; color: #5F5E5A; }

.quiz-badges {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}
.badge-orange, .badge-coral {
  font-size: 11px;
  padding: 5px 10px;
  border-radius: 999px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.badge-orange { background: #FAEEDA; color: #854F0B; }
.badge-coral { background: #FAECE7; color: #4A1B0C; }
.badge-orange i, .badge-coral i { font-size: 13px; }

.quiz-question {
  background: #FFFFFF;
  border: 0.5px solid #E5E3DD;
  border-radius: 18px;
  padding: 18px;
  text-align: center;
  margin-bottom: 14px;
}
.quiz-image {
  height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 90px;
  line-height: 1;
}
.quiz-q-text { font-size: 16px; font-weight: 600; margin-top: 12px; }
.quiz-q-sub { font-size: 12px; color: #888780; margin-top: 2px; }

.quiz-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.quiz-option {
  background: #FFFFFF;
  border: 2px solid #E5E3DD;
  border-radius: 14px;
  padding: 14px 10px;
  text-align: center;
  cursor: pointer;
  position: relative;
  transition: transform 0.1s, border-color 0.2s, background 0.2s;
  font-family: inherit;
}
.quiz-option:active { transform: scale(0.97); }
.quiz-option.correct {
  background: #E1F5EE;
  border-color: #1D9E75;
}
.quiz-option.wrong {
  background: #FAECE7;
  border-color: #D85A30;
}
.quiz-option.disabled { pointer-events: none; opacity: 0.5; }
.opt-en { font-size: 14px; font-weight: 600; }
.opt-zh { font-size: 11px; color: #888780; margin-top: 2px; }
.opt-mark {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: none;
  align-items: center;
  justify-content: center;
}
.quiz-option.correct .opt-mark {
  display: flex;
  background: #1D9E75;
  color: #FFFFFF;
}
.quiz-option.wrong .opt-mark {
  display: flex;
  background: #D85A30;
  color: #FFFFFF;
}
.opt-mark i { font-size: 12px; }

.quiz-feedback {
  margin-top: 14px;
  background: #E1F5EE;
  border-radius: 16px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  animation: slideIn 0.4s;
}
.quiz-feedback.gentle {
  background: #FAEEDA;
}
.feedback-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #1D9E75;
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
}
.quiz-feedback.gentle .feedback-icon { background: #EF9F27; }
.feedback-icon i { font-size: 18px; }
.feedback-text { flex: 1; }
.feedback-title { font-size: 13px; font-weight: 600; color: #04342C; }
.quiz-feedback.gentle .feedback-title { color: #412402; }
.feedback-sub { font-size: 11px; color: #0F6E56; }
.quiz-feedback.gentle .feedback-sub { color: #854F0B; }
.feedback-reward {
  background: #FAEEDA;
  color: #854F0B;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
}
.feedback-reward i { font-size: 14px; }

/* =============== FRIENDS =============== */
.friends-top {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 4px 12px;
}
.friends-top .back-btn { margin-right: 4px; }
.screen-title { font-size: 16px; font-weight: 600; flex: 1; }
.friends-stats { display: flex; gap: 6px; }

.challenge-card {
  background: #FBEAF0;
  border-radius: 16px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}
.challenge-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: #D4537E;
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.challenge-icon i { font-size: 22px; }
.challenge-title { font-size: 13px; font-weight: 600; color: #4B1528; }
.challenge-sub { font-size: 11px; color: #993556; }
.challenge-sub i { font-size: 12px; vertical-align: -1px; }
.challenge-bar {
  height: 5px;
  background: #F4C0D1;
  border-radius: 999px;
  margin-top: 6px;
}
.challenge-bar-fill {
  height: 100%;
  width: 66%;
  background: #D4537E;
  border-radius: 999px;
}

.friends-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.friend-card {
  background: #FFFFFF;
  border: 0.5px solid #E5E3DD;
  border-radius: 12px;
  padding: 10px 6px;
  text-align: center;
  position: relative;
  cursor: pointer;
}
.friend-card.locked { border-style: dashed; }
.friend-card.locked .friend-face { background: #D3D1C7; }
.friend-avatar-wrap {
  width: 48px;
  height: 48px;
  margin: 0 auto 6px;
  position: relative;
}
.friend-face {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #F1EFE8;
}
.friend-name { font-size: 11px; font-weight: 600; }
.friend-lvl {
  font-size: 9px;
  background: #E6F1FB;
  color: #185FA5;
  padding: 1px 6px;
  border-radius: 999px;
  display: inline-block;
  margin-top: 2px;
}
.friend-cost {
  font-size: 9px;
  color: #854F0B;
  margin-top: 2px;
  display: inline-flex;
  align-items: center;
  gap: 2px;
}
.friend-cost i { font-size: 11px; }
.lock-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 18px;
  color: #444441;
}
.rare-badge {
  position: absolute;
  top: 4px;
  right: 4px;
  background: #7F77DD;
  color: #FFFFFF;
  font-size: 8px;
  font-weight: 600;
  padding: 1px 5px;
  border-radius: 999px;
}

/* =============== PARENT =============== */
.parent-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 4px 12px;
}
.parent-tag { font-size: 11px; color: #5F5E5A; }
.parent-name { font-size: 15px; font-weight: 600; margin-top: 2px; }
.parent-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #FBEAF0;
  color: #993556;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
}

.confidence-card {
  background: #185FA5;
  border-radius: 18px;
  padding: 16px;
  color: #FFFFFF;
  margin-bottom: 12px;
}
.cc-user-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.cc-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
}
.cc-name { font-size: 14px; font-weight: 600; }
.cc-sub { font-size: 11px; opacity: 0.85; }
.cc-score-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}
.cc-label {
  font-size: 11px;
  opacity: 0.85;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.cc-score-line {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-top: 4px;
}
.cc-score { font-size: 36px; font-weight: 600; line-height: 1; }
.cc-score-max { font-size: 12px; opacity: 0.85; }
.cc-trend {
  background: #1D9E75;
  color: #FFFFFF;
  font-size: 10px;
  padding: 3px 8px;
  border-radius: 999px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 3px;
}
.cc-trend i { font-size: 12px; }

.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.stat-card {
  background: #FFFFFF;
  border: 0.5px solid #E5E3DD;
  border-radius: 14px;
  padding: 12px;
}
.stat-key {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #5F5E5A;
  font-size: 11px;
}
.stat-key i { font-size: 13px; }
.stat-val {
  font-size: 22px;
  font-weight: 600;
  margin-top: 4px;
  line-height: 1;
}
.stat-unit { font-size: 13px; color: #5F5E5A; font-weight: 500; }
.stat-trend { font-size: 10px; color: #0F6E56; margin-top: 4px; }
.stat-trend-amber { color: #854F0B; }

.skills-card {
  background: #FFFFFF;
  border: 0.5px solid #E5E3DD;
  border-radius: 14px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.skill-row { width: 100%; }
.skill-name {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  margin-bottom: 4px;
}
.skill-tag-good { color: #0F6E56; font-weight: 600; }
.skill-tag-grow { color: #185FA5; font-weight: 600; }
.skill-tag-weak { color: #854F0B; font-weight: 600; }
.skill-bar {
  height: 6px;
  background: #F1EFE8;
  border-radius: 999px;
  overflow: hidden;
}
.skill-bar-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.6s;
}
.bar-good { background: #1D9E75; }
.bar-grow { background: #378ADD; }
.bar-weak { background: #EF9F27; }

.plan-card {
  background: #EEEDFE;
  border-radius: 16px;
  padding: 12px 14px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin: 12px 0;
}
.plan-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #7F77DD;
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.plan-icon i { font-size: 18px; }
.plan-label {
  font-size: 11px;
  font-weight: 600;
  color: #26215C;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.plan-text {
  font-size: 12px;
  color: #26215C;
  margin-top: 3px;
  line-height: 1.4;
}

.upsell-card {
  background: #FAEEDA;
  border: 0.5px solid #EF9F27;
  border-radius: 16px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.upsell-title { font-size: 13px; font-weight: 600; color: #412402; }
.upsell-sub { font-size: 11px; color: #854F0B; }
.upsell-card > div:first-child { flex: 1; }
.upsell-btn {
  background: #EF9F27;
  color: #FFFFFF;
  font-size: 12px;
  font-weight: 600;
  padding: 7px 14px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  font-family: inherit;
}

/* =============== BOTTOM NAV =============== */
.bottom-nav {
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 8px 12px 12px;
  border-top: 0.5px solid #E5E3DD;
  background: #FFFFFF;
  flex-shrink: 0;
}
.nav-item {
  background: transparent;
  border: none;
  font-family: inherit;
  cursor: pointer;
  text-align: center;
  color: #5F5E5A;
  padding: 4px 8px;
}
.nav-item i { font-size: 20px; }
.nav-item span { display: block; font-size: 10px; margin-top: 2px; }
.nav-item.active { color: #185FA5; }
.nav-item.active span { font-weight: 600; }

/* =============== SPELLING =============== */
.hear-btn {
  background: #E6F1FB;
  color: #185FA5;
  border: none;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  margin-top: 8px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  font-family: inherit;
  background: #E6F1FB;
  color: #185FA5;
  border: none;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  margin-top: 8px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  font-family: inherit;
}
.hear-btn i { font-size: 14px; }

/* Spelling */
.spell-slots {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin: 14px 0;
  flex-wrap: wrap;
}
.spell-slot {
  width: 34px;
  height: 44px;
  border-bottom: 3px solid #E5E3DD;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 600;
  color: #185FA5;
  transition: border-color 0.2s, transform 0.15s, color 0.2s;
}
.spell-slot.filled { border-color: #1D9E75; color: #04342C; }
.spell-slot.hint { color: #888780; border-color: #888780; }
.spell-slot.shake { animation: shake 0.4s; }
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-4px); }
  40% { transform: translateX(4px); }
  60% { transform: translateX(-3px); }
  80% { transform: translateX(3px); }
}
.spell-keys {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 4px;
  margin: 8px 0;
}
.spell-key {
  background: #FFFFFF;
  border: 1px solid #E5E3DD;
  border-radius: 8px;
  padding: 10px 0;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}
.spell-key:active { background: #E6F1FB; transform: scale(0.92); }
.spell-key.used { background: #F1EFE8; color: #888780; }
.spell-key.wrong { background: #FAECE7; color: #A32D2D; }
.spell-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 12px;
}

/* Stories */
.story-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 10px;
}
.story-card-pick {
  background: #FFFFFF;
  border: 0.5px solid #E5E3DD;
  border-radius: 14px;
  padding: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
}
.story-emoji-pick {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: #E1F5EE;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  flex-shrink: 0;
}
.story-title-pick { font-size: 14px; font-weight: 600; }
.story-level-pick {
  font-size: 11px;
  color: #5F5E5A;
  margin-top: 2px;
  display: inline-block;
  background: #F1EFE8;
  padding: 1px 8px;
  border-radius: 999px;
}
.story-emoji {
  text-align: center;
  font-size: 72px;
  margin: 18px 0 8px;
}
.story-card {
  background: #FFFFFF;
  border: 0.5px solid #E5E3DD;
  border-radius: 18px;
  padding: 18px;
  margin-bottom: 14px;
  text-align: center;
}
.story-en { font-size: 18px; font-weight: 500; line-height: 1.5; color: #04342C; }
.story-zh { font-size: 13px; color: #5F5E5A; margin-top: 8px; }
.story-nav { display: flex; gap: 10px; }
.story-nav-btn {
  flex: 1;
  background: #FFFFFF;
  border: 1px solid #E5E3DD;
  border-radius: 12px;
  padding: 12px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  color: #5F5E5A;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}
.story-nav-btn.primary { background: #1D9E75; color: #FFFFFF; border: none; }
.story-q-wrap { display: flex; flex-direction: column; gap: 16px; margin-top: 10px; }
.story-q-card {
  background: #FFFFFF;
  border: 0.5px solid #E5E3DD;
  border-radius: 16px;
  padding: 14px;
}
.story-q-text { font-size: 14px; font-weight: 600; }
.story-q-zh { font-size: 11px; color: #888780; margin-bottom: 10px; }
.story-q-opts { display: flex; flex-direction: column; gap: 6px; }
.story-q-opt {
  background: #F8FAFC;
  border: 1.5px solid #E5E3DD;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 13px;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
}
.story-q-opt.correct { background: #E1F5EE; border-color: #1D9E75; color: #04342C; }
.story-q-opt.wrong { background: #FAECE7; border-color: #D85A30; }

/* Games */
.games-list { display: flex; flex-direction: column; gap: 10px; margin-top: 10px; }
.game-option {
  background: #FFFFFF;
  border: 0.5px solid #E5E3DD;
  border-radius: 14px;
  padding: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
}
.listen-card {
  background: #E6F1FB;
  border-radius: 18px;
  padding: 24px 16px;
  text-align: center;
  margin: 10px 0 16px;
}
.listen-hint { font-size: 12px; color: #185FA5; margin-bottom: 10px; }
.listen-bobo {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: #185FA5;
  color: #FFFFFF;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 10px;
  cursor: pointer;
}
.listen-bobo i { font-size: 36px; }
.listen-cta { font-size: 13px; color: #185FA5; font-weight: 500; }
.listen-options { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.listen-opt {
  background: #FFFFFF;
  border: 2px solid #E5E3DD;
  border-radius: 14px;
  padding: 22px;
  font-size: 48px;
  cursor: pointer;
  text-align: center;
}
.listen-opt.correct { background: #E1F5EE; border-color: #1D9E75; }
.listen-opt.wrong { background: #FAECE7; border-color: #D85A30; }

/* Memory Match — FIXED */
.memory-info {
  flex: 1;
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: #5F5E5A;
  font-weight: 600;
}
.memory-info i { font-size: 13px; vertical-align: -1px; margin-right: 2px; }
.memory-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 16px;
}
.memory-card {
  aspect-ratio: 1;
  background: #185FA5;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 600;
  color: #FFFFFF;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: background 0.3s, transform 0.2s;
}
.memory-card:active { transform: scale(0.97); }
.memory-card.flipped {
  background: #FFFFFF;
  color: #185FA5;
  border: 2px solid #185FA5;
}
.memory-card.matched {
  background: #E1F5EE;
  color: #04342C;
  border: 2px solid #1D9E75;
  cursor: default;
}
.memory-card .mc-back {
  font-size: 28px;
  font-weight: 700;
}
.memory-card .mc-content {
  display: none;
  padding: 4px;
  text-align: center;
  line-height: 1.2;
  font-size: 16px;
}
.memory-card.flipped .mc-back,
.memory-card.matched .mc-back { display: none; }
.memory-card.flipped .mc-content,
.memory-card.matched .mc-content { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; }

/* Speed Tap */
.speed-info {
  flex: 1;
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: #5F5E5A;
  font-weight: 600;
}
.speed-info i { font-size: 13px; vertical-align: -1px; margin-right: 2px; }
.speed-prompt {
  text-align: center;
  font-size: 38px;
  font-weight: 600;
  color: #185FA5;
  margin: 24px 0 4px;
}
.speed-prompt-zh { text-align: center; font-size: 14px; color: #5F5E5A; margin-bottom: 18px; }
.speed-options { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.speed-opt {
  background: #FFFFFF;
  border: 2px solid #E5E3DD;
  border-radius: 14px;
  padding: 20px;
  font-size: 44px;
  cursor: pointer;
  text-align: center;
}
.speed-opt.right { background: #E1F5EE; border-color: #1D9E75; }
.speed-opt.wrong { background: #FAECE7; border-color: #D85A30; }

/* Grammar */
.grammar-question { padding: 24px 16px; }
.grammar-sentence {
  font-size: 19px;
  font-weight: 500;
  color: #2C2C2A;
  line-height: 1.6;
  letter-spacing: 0.3px;
}
.grammar-sentence .blank {
  display: inline-block;
  min-width: 50px;
  border-bottom: 2.5px solid #7F77DD;
  margin: 0 4px;
  padding: 0 6px;
  text-align: center;
  color: #7F77DD;
}

/* Lesson picker — for categories and lessons */
.picker-page { padding: 4px 0; }
.cat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 8px;
}
.cat-card {
  background: #FFFFFF;
  border: 0.5px solid #E5E3DD;
  border-radius: 14px;
  padding: 14px 10px;
  text-align: center;
  cursor: pointer;
  transition: transform 0.1s, border-color 0.2s;
  position: relative;
}
.cat-card:active { transform: scale(0.97); }
.cat-emoji { font-size: 32px; line-height: 1; margin-bottom: 6px; }
.cat-name { font-size: 13px; font-weight: 600; }
.cat-meta { font-size: 11px; color: #5F5E5A; margin-top: 3px; }
.cat-progress-bar {
  height: 4px;
  background: #F1EFE8;
  border-radius: 999px;
  margin-top: 6px;
  overflow: hidden;
}
.cat-progress-fill {
  height: 100%;
  background: #1D9E75;
  border-radius: 999px;
  transition: width 0.4s;
}
.cat-done-badge {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #1D9E75;
  color: #FFFFFF;
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lesson-list { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.lesson-card {
  background: #FFFFFF;
  border: 0.5px solid #E5E3DD;
  border-radius: 14px;
  padding: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  transition: transform 0.1s;
}
.lesson-card:active { transform: scale(0.98); }
.lesson-card.locked { background: #F8FAFC; opacity: 0.6; cursor: not-allowed; }
.lesson-card.done { border-color: #1D9E75; background: #F0F9F5; }
.lesson-num {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #185FA5;
  color: #FFFFFF;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.lesson-card.locked .lesson-num { background: #B4B2A9; }
.lesson-card.done .lesson-num { background: #1D9E75; }
.lesson-body { flex: 1; }
.lesson-title { font-size: 14px; font-weight: 600; }
.lesson-desc { font-size: 11px; color: #5F5E5A; margin-top: 2px; }
.lesson-icon-r { font-size: 22px; color: #5F5E5A; }
.lesson-card.locked .lesson-icon-r { color: #B4B2A9; }
.lesson-card.done .lesson-icon-r { color: #1D9E75; }

/* Section header for picker pages */
.picker-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 4px 4px;
  margin-bottom: 8px;
}
.picker-header .screen-title { font-size: 17px; font-weight: 600; flex: 1; }
.picker-header .back-btn { font-size: 22px; color: #5F5E5A; cursor: pointer; }

/* Toast */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: #2C2C2A;
  color: #FFFFFF;
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 13px;
  z-index: 1000;
  animation: slideIn 0.3s;
}

/* Voice settings panel on home */
.voice-panel {
  background: #FFFFFF;
  border: 0.5px solid #E5E3DD;
  border-radius: 16px;
  padding: 14px 16px;
  margin-top: 14px;
  margin-bottom: 8px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.voice-panel-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}
.voice-panel-title {
  font-size: 13px;
  font-weight: 600;
  color: #185FA5;
  display: flex;
  align-items: center;
  gap: 6px;
}
.voice-panel-title i { font-size: 16px; }
.voice-panel-sub { font-size: 11px; color: #5F5E5A; margin-top: 2px; }
.voice-test-btn {
  background: #185FA5;
  color: #FFFFFF;
  border: none;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 999px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}
.voice-test-btn i { font-size: 14px; }
.voice-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
}
.voice-row label { width: 50px; color: #5F5E5A; font-weight: 600; }
.voice-row select {
  flex: 1;
  padding: 8px 10px;
  border: 1px solid #E5E3DD;
  border-radius: 8px;
  font-family: inherit;
  font-size: 12px;
  background: #FFFFFF;
  outline: none;
}
.voice-row select:focus { border-color: #185FA5; }
.voice-row input[type="range"] { flex: 1; accent-color: #185FA5; }
.voice-row span { font-size: 11px; color: #185FA5; font-weight: 600; min-width: 32px; text-align: right; }

/* Word Scramble */
.scramble-letters {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 16px 0;
}
.scramble-tile {
  width: 44px;
  height: 52px;
  background: #185FA5;
  color: #FFFFFF;
  border: none;
  border-radius: 10px;
  font-size: 22px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  box-shadow: 0 3px 8px rgba(24,95,165,0.3);
  transition: transform 0.1s, opacity 0.2s, background 0.2s;
}
.scramble-tile:active { transform: scale(0.92); }
.scramble-tile.used {
  background: #F1EFE8;
  color: #B4B2A9;
  box-shadow: none;
  cursor: default;
  pointer-events: none;
}

/* True / False */
.tf-sentence-card {
  background: #FFFFFF;
  border: 0.5px solid #E5E3DD;
  border-radius: 18px;
  padding: 28px 20px;
  text-align: center;
  margin: 14px 0 18px;
}
.tf-sentence {
  font-size: 20px;
  font-weight: 600;
  color: #185FA5;
  line-height: 1.5;
  margin-bottom: 8px;
}
.tf-zh { font-size: 14px; color: #5F5E5A; }
.tf-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.tf-btn {
  border: none;
  border-radius: 18px;
  padding: 28px 12px;
  font-family: inherit;
  font-size: 18px;
  font-weight: 700;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  transition: transform 0.1s, background 0.2s, border 0.2s;
  border: 2px solid transparent;
}
.tf-btn i { font-size: 32px; margin-bottom: 4px; }
.tf-true-btn { background: #E1F5EE; color: #04342C; }
.tf-false-btn { background: #FAECE7; color: #4A1B0C; }
.tf-btn:active { transform: scale(0.96); }
.tf-btn.right { border-color: #1D9E75; background: #1D9E75; color: #FFFFFF; }
.tf-btn.wrong { border-color: #D85A30; background: #D85A30; color: #FFFFFF; }
.tf-btn.disabled { pointer-events: none; }
.tf-btn-zh { font-size: 13px; opacity: 0.85; font-weight: 500; }

/* Speed Translate */
.tr-prompt-card {
  background: #185FA5;
  color: #FFFFFF;
  border-radius: 18px;
  padding: 36px 20px;
  text-align: center;
  margin: 16px 0 18px;
}
.tr-prompt { font-size: 44px; font-weight: 700; line-height: 1.1; }
.tr-prompt-sub { font-size: 13px; opacity: 0.85; margin-top: 8px; }
.tr-options { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tr-opt {
  background: #FFFFFF;
  border: 2px solid #E5E3DD;
  border-radius: 14px;
  padding: 18px 12px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  color: #2C2C2A;
  transition: transform 0.08s, border-color 0.2s, background 0.2s;
}
.tr-opt:active { transform: scale(0.94); }
.tr-opt.right { background: #E1F5EE; border-color: #1D9E75; }
.tr-opt.wrong { background: #FAECE7; border-color: #D85A30; }

.voice-reset-btn {
  background: #FBEAF0;
  color: #993556;
  border: none;
  font-family: inherit;
  font-size: 11px;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: 999px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: 6px;
}
.voice-reset-btn i { font-size: 13px; }
.voice-reset-btn:active { transform: scale(0.95); }

.grade-pill {
  display: inline-block;
  background: #EEEDFE;
  color: #26215C;
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 999px;
  margin-left: 6px;
  vertical-align: middle;
  font-weight: 600;
}
.lesson-card.locked .grade-pill { background: #F1EFE8; color: #888780; }
.lesson-card.done .grade-pill { background: #E1F5EE; color: #04342C; }

.demo-banner {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  background: #FBEAF0;
  color: #4B1528;
  padding: 10px 12px;
  font-size: 12px;
  line-height: 1.4;
  border-bottom: 0.5px solid #F4C0D1;
}
.demo-banner i { font-size: 16px; color: #993556; flex-shrink: 0; margin-top: 1px; }
.demo-banner > div { flex: 1; }
.demo-close {
  background: transparent;
  border: none;
  color: #993556;
  font-size: 14px;
  cursor: pointer;
  font-family: inherit;
}

.browser-hint {
  background: #FAEEDA;
  color: #412402;
  padding: 10px 12px;
  margin-bottom: 12px;
  border-radius: 12px;
  font-size: 12px;
  line-height: 1.4;
  display: flex;
  align-items: center;
  gap: 8px;
}
.browser-hint i { color: #854F0B; font-size: 16px; flex-shrink: 0; }
.browser-hint strong { color: #185FA5; }

/* AI thinking dots */
.dot-flash {
  display: inline-block;
  margin: 0 2px;
  opacity: 0.3;
  animation: dot-flash 1.4s infinite;
}
.dot-flash:nth-child(2) { animation-delay: 0.2s; }
.dot-flash:nth-child(3) { animation-delay: 0.4s; }
@keyframes dot-flash {
  0%, 60%, 100% { opacity: 0.3; }
  30% { opacity: 1; }
}

/* AI badge */
.ai-badge {
  display: inline-block;
  background: #185FA5;
  color: #FFFFFF;
  font-size: 9px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 999px;
  margin-left: 6px;
  vertical-align: middle;
  letter-spacing: 0.5px;
}

/* Free chat highlight */
.scene-ai-highlight {
  border: 2px solid #185FA5 !important;
  background: linear-gradient(135deg, #FFFFFF 0%, #E6F1FB 100%) !important;
  box-shadow: 0 4px 12px rgba(24,95,165,0.15);
}

/* Status: thinking */
.bobo-status.thinking .status-dot {
  background: #7F77DD;
  animation: pulse 0.7s infinite;
}

/* ===== CHARACTER PANEL ON HOME ===== */
.char-panel {
  background: linear-gradient(135deg, #FFFFFF 0%, #E6F1FB 100%);
  border: 0.5px solid #E5E3DD;
  border-radius: 18px;
  padding: 12px;
  margin: 4px 0 14px;
  display: flex;
  gap: 12px;
  align-items: center;
}
.char-panel-avatar {
  width: 88px;
  flex-shrink: 0;
}
.char-panel-info { flex: 1; min-width: 0; }
.char-panel-name { font-size: 16px; font-weight: 700; color: #185FA5; }
.char-panel-sub { font-size: 11px; color: #5F5E5A; margin-bottom: 8px; }
.char-panel-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.char-action-btn {
  background: #FFFFFF;
  border: 1px solid #E5E3DD;
  font-family: inherit;
  font-size: 11px;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: 999px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}
.char-action-btn:active { transform: scale(0.96); }
.char-action-btn i { font-size: 13px; }
.shop-btn { color: #D85A30; }
.wardrobe-btn { color: #7F77DD; }
.switch-btn { color: #1D9E75; }

/* ===== SHOP ===== */
.shop-tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 4px 0 12px;
  scrollbar-width: none;
}
.shop-tabs::-webkit-scrollbar { display: none; }
.shop-tab {
  background: #FFFFFF;
  border: 1px solid #E5E3DD;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
  color: #5F5E5A;
}
.shop-tab.active { background: #185FA5; color: #FFFFFF; border-color: #185FA5; }
.shop-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
.shop-item {
  background: #FFFFFF;
  border: 2px solid #E5E3DD;
  border-radius: 14px;
  padding: 12px 8px;
  text-align: center;
  position: relative;
}
.shop-item.owned { opacity: 0.7; }
.shop-item-emoji { font-size: 38px; line-height: 1; margin-bottom: 6px; }
.shop-item-name { font-size: 13px; font-weight: 700; margin-bottom: 2px; }
.shop-item-rarity { font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 8px; }
.shop-item-buy {
  background: #185FA5;
  color: #FFFFFF;
  border: none;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 999px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.shop-item-buy:active { transform: scale(0.95); }
.shop-item-buy i { font-size: 14px; }
.shop-item-owned {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 11px;
  color: #0F6E56;
  font-weight: 600;
  padding: 6px 12px;
  background: #E1F5EE;
  border-radius: 999px;
}

/* ===== WARDROBE ===== */
.wardrobe-avatar-wrap {
  text-align: center;
  padding: 16px 0;
  background: linear-gradient(135deg, #E6F1FB 0%, #FBEAF0 100%);
  border-radius: 18px;
  margin: 0 -4px 16px;
}
.wardrobe-section { margin-bottom: 16px; }
.wardrobe-section-title {
  font-size: 13px;
  font-weight: 700;
  color: #185FA5;
  margin-bottom: 8px;
}
.wardrobe-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: none;
}
.wardrobe-row::-webkit-scrollbar { display: none; }
.wardrobe-slot {
  flex-shrink: 0;
  width: 72px;
  background: #FFFFFF;
  border: 2px solid #E5E3DD;
  border-radius: 12px;
  padding: 8px 4px;
  text-align: center;
  cursor: pointer;
}
.wardrobe-slot:active { transform: scale(0.95); }
.wardrobe-slot.active {
  background: #E6F1FB;
  border-color: #185FA5;
}
.wardrobe-slot-emoji { font-size: 28px; line-height: 1; }
.wardrobe-slot-label { font-size: 10px; color: #5F5E5A; margin-top: 4px; }

/* ===== CHARACTER PICKER ===== */
.char-pick-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 12px;
}
.char-pick-card {
  background: #FFFFFF;
  border: 2px solid #E5E3DD;
  border-radius: 16px;
  padding: 12px 8px;
  text-align: center;
  cursor: pointer;
  position: relative;
}
.char-pick-card:active { transform: scale(0.97); }
.char-pick-card.selected { border-color: #185FA5; background: #E6F1FB; }
.char-pick-svg { display: flex; justify-content: center; align-items: center; min-height: 130px; }
.char-pick-name { font-size: 14px; font-weight: 700; margin-top: 4px; color: #2C2C2A; }
.char-pick-tag {
  position: absolute;
  top: 6px;
  right: 6px;
  background: #185FA5;
  color: #FFFFFF;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 2px;
}

/* ===== TWEMOJI sizing ===== */
img.twe {
  height: 1em;
  width: 1em;
  vertical-align: -0.15em;
  margin: 0 0.05em;
  display: inline-block;
}
/* Big emoji contexts — quiz images, story emoji, etc. */
.quiz-image img.twe {
  width: 100px;
  height: 100px;
  margin: 0 auto;
  display: block;
}
.story-emoji img.twe { width: 72px; height: 72px; margin: 0 4px; display: inline-block; vertical-align: middle; }
.story-emoji-pick img.twe { width: 30px; height: 30px; }
.cat-emoji img.twe { width: 36px; height: 36px; }
.scene-icon img.twe { width: 24px; height: 24px; }
.listen-opt img.twe { width: 56px; height: 56px; }
.speed-opt img.twe { width: 52px; height: 52px; }
.scramble-tile img.twe { width: 26px; height: 26px; }
.shop-item-emoji img.twe { width: 44px; height: 44px; }
.wardrobe-slot-emoji img.twe { width: 32px; height: 32px; }
.feedback-icon img.twe { width: 22px; height: 22px; }
.quest-card img.twe { width: 16px; height: 16px; vertical-align: -0.2em; }
.demo-banner img.twe { width: 16px; height: 16px; }
.ai-badge img.twe { display: none; }
/* memory card content */
.memory-card .mc-content img.twe { width: 28px; height: 28px; }
/* navigation icons stay as Tabler */
.nav-item img.twe { display: inline-block; }
.activity-card img.twe { width: 16px; height: 16px; }

/* ===== EXAMS ===== */
.exam-result-card {
  background: #FFFFFF;
  border: 0.5px solid #E5E3DD;
  border-radius: 24px;
  padding: 32px 20px;
  text-align: center;
  margin-top: 24px;
  box-shadow: 0 8px 24px rgba(24,95,165,0.15);
}
.exam-result-icon {
  font-size: 72px;
  line-height: 1;
  margin-bottom: 12px;
}
.exam-result-title {
  font-size: 22px;
  font-weight: 700;
  color: #185FA5;
  margin-bottom: 8px;
}
.exam-result-score {
  font-size: 36px;
  font-weight: 700;
  color: #1D9E75;
  margin: 12px 0;
}
.exam-result-sub {
  font-size: 14px;
  color: #5F5E5A;
  line-height: 1.5;
  margin-bottom: 16px;
}
.exam-result-reward {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #FAEEDA;
  color: #854F0B;
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 16px;
  font-weight: 700;
}
.ex-listen-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #185FA5;
  color: #FFFFFF;
  padding: 24px;
  border-radius: 18px;
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 12px;
  cursor: pointer;
}
.ex-listen-cta i { font-size: 28px; }
