/* 纯词 (Juntango) V2 - 全新舒适配色：暖米和纸白 (Warm Washi) + 柔和暮山紫/靛青 (Soft Indigo) */
:root {
  --bg-page: #f6f5f0;
  --bg-card: #ffffff;
  --bg-subtle: #efede6;
  --primary: #4f5d95;
  --primary-dark: #3b4675;
  --primary-light: #e8ebf7;
  --primary-soft: #f2f4fb;
  --accent-warm: #e07a5f;
  --accent-gold: #d99b26;
  --success: #3d9970;
  --text-main: #232634;
  --text-sub: #686d82;
  --text-muted: #9aa0b5;
  --border-light: #e6e4dc;
  --shadow-card: 0 8px 24px rgba(35, 38, 52, 0.05);
  --shadow-float: 0 12px 32px rgba(79, 93, 149, 0.16);
  --radius-xl: 24px;
  --radius-lg: 18px;
  --radius-md: 14px;
  --radius-sm: 10px;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", sans-serif;
  background: #e9e7df;
  color: var(--text-main);
  display: flex;
  justify-content: center;
  min-height: 100vh;
  overflow-x: hidden;
}

#app-shell {
  width: 100%;
  max-width: 440px;
  min-height: 100vh;
  background: var(--bg-page);
  position: relative;
  display: flex;
  flex-direction: column;
  box-shadow: 0 0 42px rgba(0, 0, 0, 0.07);
  overflow-x: hidden;
}

/* 顶部 Toast */
#toast-container {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
  width: 90%;
  max-width: 390px;
}

.toast {
  background: rgba(35, 38, 52, 0.94);
  color: #fff;
  padding: 12px 18px;
  border-radius: 14px;
  font-size: 13.5px;
  font-weight: 500;
  text-align: center;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.16);
  animation: toastSlide 0.22s ease forwards;
}

@keyframes toastSlide {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* 通用屏幕容器 */
.screen {
  flex: 1;
  padding: 18px 18px 98px 18px;
  overflow-y: auto;
  animation: fadeScreen 0.2s ease;
}

.screen.fullscreen-modal {
  padding-bottom: 30px;
  min-height: 100vh;
  background: var(--bg-page);
  z-index: 200;
}

@keyframes fadeScreen {
  from { opacity: 0.5; }
  to { opacity: 1; }
}

/* ==================== 1. 三步全屏无滚动引导页 (Step 1 -> Step 2 -> Step 3) ==================== */
.onboard-screen {
  height: 100vh;
  max-height: 100vh;
  overflow: hidden;
  padding: 28px 22px 28px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: radial-gradient(circle at top right, #eceff9 0%, #f6f5f0 65%);
}

.step-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.step-dot {
  width: 8px;
  height: 8px;
  border-radius: 99px;
  background: #d5d7e3;
  transition: all 0.25s ease;
}

.step-dot.active {
  width: 26px;
  background: var(--primary);
}

.welcome-hero {
  text-align: center;
  margin: auto 0;
  padding: 10px 6px;
}

.welcome-logo-box {
  width: 88px;
  height: 88px;
  border-radius: 28px;
  background: linear-gradient(135deg, #4f5d95 0%, #6e7cb8 100%);
  color: #fff;
  font-size: 38px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
  box-shadow: var(--shadow-float);
}

.onboard-title {
  font-size: 26px;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 8px;
  letter-spacing: -0.3px;
}

.onboard-sub {
  font-size: 14px;
  color: var(--text-sub);
  line-height: 1.55;
}

/* 紧凑型无滚动网格 */
.compact-grid-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 14px 0;
}

.compact-option-card {
  background: var(--bg-card);
  border: 2px solid var(--border-light);
  border-radius: 16px;
  padding: 12px 12px;
  cursor: pointer;
  transition: all 0.16s ease;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 68px;
}

.compact-option-card.selected {
  border-color: var(--primary);
  background: var(--primary-soft);
  box-shadow: 0 4px 14px rgba(79, 93, 149, 0.12);
}

.compact-opt-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 3px;
}

.compact-opt-desc {
  font-size: 11.5px;
  color: var(--text-sub);
  line-height: 1.3;
}

/* ==================== 2. 全新主页样式 ==================== */
.lookup-bar-wrap {
  position: relative;
  margin-bottom: 18px;
}

.lookup-search-box {
  background: var(--bg-card);
  border: 1.5px solid var(--border-light);
  border-radius: 16px;
  padding: 11px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: var(--shadow-card);
}

.lookup-input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 14.5px;
  color: var(--text-main);
  background: transparent;
}

.lookup-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: var(--bg-card);
  border-radius: 16px;
  box-shadow: 0 14px 34px rgba(35, 38, 52, 0.15);
  border: 1px solid var(--border-light);
  z-index: 300;
  max-height: 290px;
  overflow-y: auto;
  padding: 6px;
}

.lookup-item {
  padding: 10px 12px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
}

.lookup-item:hover, .lookup-item:active {
  background: var(--primary-soft);
}

/* 主页核心背词与复习重构大卡 */
.main-launch-card {
  background: linear-gradient(140deg, #435082 0%, #5c6ba6 100%);
  border-radius: var(--radius-xl);
  padding: 24px 20px;
  color: #fff;
  box-shadow: var(--shadow-float);
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.launch-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.launch-stat-group {
  display: flex;
  gap: 24px;
}

.launch-stat-item {
  cursor: pointer;
}

.launch-stat-num {
  font-size: 28px;
  font-weight: 800;
  line-height: 1.1;
}

.launch-stat-label {
  font-size: 12.5px;
  opacity: 0.85;
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 3px;
}

.launch-btn-row {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 10px;
}

.btn-start-main {
  background: #ffffff;
  color: var(--primary-dark);
  border: none;
  border-radius: 16px;
  padding: 15px 18px;
  font-size: 16.5px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: transform 0.12s;
}

.btn-start-main:active {
  transform: scale(0.97);
}

.btn-start-review {
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 16px;
  padding: 15px 14px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

/* 三大核心入口横排卡片：今日学习 / 认识的词 / 随身听磨耳朵 */
.core-trio-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 20px;
}

.trio-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 15px 10px;
  text-align: center;
  cursor: pointer;
  box-shadow: var(--shadow-card);
  position: relative;
  transition: transform 0.14s ease;
}

.trio-card:active {
  transform: scale(0.96);
}

.trio-icon {
  width: 42px;
  height: 42px;
  border-radius: 13px;
  background: var(--primary-soft);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  margin: 0 auto 8px;
}

.trio-title {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 2px;
}

.trio-sub {
  font-size: 11px;
  color: var(--text-sub);
}

/* ==================== 6. 主页艾宾浩斯复习详细时间表 ==================== */
.ebbinghaus-panel {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  padding: 18px 16px;
  box-shadow: var(--shadow-card);
  margin-bottom: 18px;
}

.ebbinghaus-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.ebbinghaus-title {
  font-size: 16px;
  font-weight: 800;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 6px;
}

.ebbinghaus-stage-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ebbinghaus-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-radius: 12px;
  background: #faf9f6;
  border: 1px solid #eceae2;
  font-size: 13px;
}

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

.stage-pill {
  background: var(--primary-light);
  color: var(--primary-dark);
  font-weight: 700;
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 8px;
  min-width: 58px;
  text-align: center;
}

.ebbinghaus-status {
  font-size: 12px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 99px;
}

.status-due {
  background: #fff0eb;
  color: var(--accent-warm);
}

.status-done {
  background: #e7f6ee;
  color: var(--success);
}

.status-wait {
  background: #f0f1f5;
  color: var(--text-sub);
}

/* ==================== 单词全词意详情页 & 穿插测验页 ==================== */
.study-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 0 16px;
  min-height: 44px;
}

.back-icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  font-size: 20px;
  color: var(--text-main);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.study-progress-track {
  flex: 1;
  max-width: 150px;
  height: 8px;
  background: #e2e0d8;
  border-radius: 99px;
  overflow: hidden;
  margin: 0 12px;
}

.study-progress-bar {
  height: 100%;
  background: var(--primary);
  border-radius: 99px;
  transition: width 0.25s ease;
}

.known-top-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #fff7eb;
  color: #c27803;
  border: 1.5px solid #f2b84b;
  padding: 6px 13px;
  border-radius: 99px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.word-header-block {
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  padding: 20px 18px;
  box-shadow: var(--shadow-card);
  margin-bottom: 16px;
  border: 1px solid var(--border-light);
}

.word-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.word-kanji-large {
  font-size: 36px;
  font-weight: 800;
  color: var(--primary-dark);
}

.pitch-circle {
  font-size: 13px;
  color: var(--text-sub);
  margin-left: 6px;
  font-weight: 600;
}

.word-reading-line {
  font-size: 16px;
  color: var(--text-sub);
  margin-bottom: 14px;
}

.audio-pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.audio-pill {
  background: var(--primary-soft);
  border: 1px solid #d8def2;
  border-radius: 99px;
  padding: 7px 14px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--primary-dark);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
}

.def-block {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 14px;
  border-top: 1px solid var(--border-light);
}

.def-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.def-tag {
  background: var(--primary-light);
  color: var(--primary-dark);
  font-size: 11.5px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  white-space: nowrap;
}

.def-text {
  font-size: 16.5px;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.45;
}

/* 参考例句卡片 */
.example-section {
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  padding: 18px;
  box-shadow: var(--shadow-card);
  border: 1px solid var(--border-light);
  margin-bottom: 0;
}

.example-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.example-title {
  font-size: 15px;
  font-weight: 800;
  color: var(--primary-dark);
  background: var(--primary-soft);
  padding: 4px 10px;
  border-radius: 8px;
}

.ruby-sentence-wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 6px 8px;
  margin-bottom: 14px;
}

.ruby-token {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
}

.ruby-kana {
  font-size: 11px;
  color: var(--text-sub);
  min-height: 14px;
  margin-bottom: 2px;
}

.ruby-kanji {
  font-size: 19px;
  font-weight: 700;
  color: var(--text-main);
  padding-bottom: 2px;
  border-bottom: 2px solid #cbd2ec;
}

.ruby-token.punct .ruby-kanji {
  border-bottom: none;
}

.ruby-romaji {
  font-size: 10.5px;
  color: var(--text-muted);
  margin-top: 2px;
}

.example-cn-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}

.level-mini-pill {
  background: var(--primary-soft);
  color: var(--primary);
  border: 1px solid #d0d7f0;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 99px;
}

.example-cn-text {
  font-size: 15px;
  color: var(--text-sub);
}

.shadowing-toolbar {
  display: flex;
  gap: 10px;
  margin-bottom: 14px;
}

.shadow-btn {
  flex: 1;
  padding: 10px 10px;
  border-radius: 12px;
  border: 1.5px solid #d5dcf2;
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
}

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

.grammar-box {
  background: #faf9f5;
  border-left: 3.5px solid var(--primary);
  border-radius: 10px;
  padding: 12px 14px;
}

.grammar-box-title {
  font-size: 12.5px;
  font-weight: 800;
  color: var(--primary-dark);
  margin-bottom: 6px;
}

.grammar-item {
  font-size: 13px;
  line-height: 1.5;
  margin-bottom: 6px;
}
.grammar-item:last-child { margin-bottom: 0; }
.grammar-point { font-weight: 700; color: var(--text-main); }
.grammar-desc { color: var(--text-sub); }

/* 学习详情底栏 */
.study-bottom-bar {
  flex: none;
  background: #fafaf8;
  padding: 10px 16px max(16px, calc(8px + env(safe-area-inset-bottom, 0px)));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-top: 1px solid var(--border-light);
}

.btn-primary-pill {
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 99px;
  padding: 12px 22px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(79, 93, 149, 0.22);
}

.btn-white-pill {
  background: #fff;
  color: var(--text-main);
  border: 1px solid var(--border-light);
  border-radius: 99px;
  padding: 12px 18px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.btn-known-highlight {
  background: #fff8eb;
  color: #c27803;
  border: 1.5px solid #f2b84b;
  border-radius: 99px;
  padding: 12px 18px;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
}

/* 测验卡片 */
.quiz-choice-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 18px;
}

.quiz-choice-card {
  background: var(--bg-card);
  border: 1.5px solid var(--border-light);
  border-radius: 16px;
  padding: 16px 18px;
  cursor: pointer;
  box-shadow: var(--shadow-card);
  transition: all 0.14s ease;
}

.quiz-choice-card.correct {
  background: #eafaf1;
  border-color: var(--success);
}

.quiz-choice-card.wrong {
  background: #fff0ed;
  border-color: var(--accent-warm);
}

.quiz-choice-pos {
  font-size: 13px;
  color: var(--text-sub);
  margin-bottom: 4px;
}

.quiz-choice-main {
  font-size: 19px;
  font-weight: 700;
  color: var(--text-main);
}

/* 假名拼写方块 */
.spell-meaning-box {
  text-align: center;
  padding: 18px 8px;
}

.spell-pos-pill {
  display: inline-block;
  background: var(--primary-soft);
  color: var(--primary-dark);
  padding: 4px 14px;
  border-radius: 99px;
  font-size: 12.5px;
  font-weight: 700;
  margin-bottom: 14px;
}

.spell-meaning-text {
  font-size: 21px;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.45;
}

.spell-slots-row {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin: 30px 0;
  flex-wrap: wrap;
}

.spell-slot {
  min-width: 40px;
  height: 46px;
  border-bottom: 4px solid var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 800;
  color: var(--primary-dark);
  cursor: pointer;
}

.kana-tiles-row {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 24px;
}

.kana-tile {
  width: 58px;
  height: 64px;
  background: var(--bg-card);
  border-radius: 14px;
  box-shadow: var(--shadow-card);
  border: 1.5px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  cursor: pointer;
  font-size: 23px;
  font-weight: 800;
  color: var(--text-main);
}

.kana-tile.used {
  opacity: 0.22;
  pointer-events: none;
}

/* 多邻国配对 */
.match-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 16px;
}

.match-card {
  background: var(--bg-card);
  border: 2px solid var(--border-light);
  border-radius: 16px;
  padding: 16px 12px;
  text-align: center;
  font-size: 15.5px;
  font-weight: 700;
  color: var(--text-main);
  cursor: pointer;
  min-height: 68px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.match-card.selected {
  border-color: var(--primary);
  background: var(--primary-soft);
}

.match-card.matched {
  opacity: 0.25;
  pointer-events: none;
}

/* 滑动列表与通用卡片 */
.swipe-tip-banner {
  background: var(--primary);
  color: #fff;
  padding: 11px 14px;
  border-radius: 12px;
  font-size: 12.5px;
  font-weight: 600;
  margin-bottom: 12px;
}

.word-swipe-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.swipe-item-wrapper {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  background: var(--accent-warm);
}

.swipe-bg-Notice {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 18px;
  color: #fff;
  font-weight: 700;
  font-size: 12.5px;
}

.swipe-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  padding: 14px 16px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--shadow-card);
  transition: transform 0.2s ease;
}

.hero-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  padding: 18px;
  box-shadow: var(--shadow-card);
  margin-bottom: 14px;
}

.section-heading {
  font-size: 15px;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 10px;
}

/* 随身听 */
.walkman-player {
  background: linear-gradient(155deg, #343d66 0%, #232842 100%);
  color: #fff;
  border-radius: 26px;
  padding: 28px 20px;
  text-align: center;
  box-shadow: var(--shadow-float);
  margin-top: 10px;
}

.walkman-controls {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.walkman-control {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 58px;
  padding: 7px 4px;
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 14px;
  background: rgba(255, 255, 255, .1);
  color: #fff;
  font: inherit;
  font-size: 13px;
  font-weight: 650;
  line-height: 1.25;
  white-space: nowrap;
  cursor: pointer;
}

.walkman-control-main {
  background: #f3f5ff;
  border-color: #f3f5ff;
  color: #242d4e;
}

.walkman-control svg {
  display: block;
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.walkman-control:active { opacity: .78; }

.walkman-repeat {
  margin-top: 16px;
  padding: 14px 0 0;
  border-top: 1px solid rgba(255, 255, 255, .16);
}

.walkman-repeat-heading, .walkman-repeat-ends {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.walkman-repeat-heading { font-size: 13px; font-weight: 650; }
.walkman-repeat-heading output { color: #d1dcff; font-variant-numeric: tabular-nums; }
.walkman-repeat input { display: block; width: 100%; height: 32px; accent-color: #b9c7f8; }
.walkman-repeat-ends { color: #c9cee1; font-size: 11px; }

.vinyl-disc {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: radial-gradient(circle, #5c6ba6 24%, #191c2e 26%, #252a42 60%, #141726 100%);
  margin: 0 auto 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 6px solid rgba(255, 255, 255, 0.12);
}

.vinyl-disc.spinning {
  animation: spin 8s linear infinite;
}

@keyframes spin {
  100% { transform: rotate(360deg); }
}

/* 底部四栏导航 */
.bottom-tabbar {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 440px;
  height: 70px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--border-light);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  align-items: center;
  padding: 0 8px 4px;
  z-index: 100;
}

.tab-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  cursor: pointer;
  color: var(--text-sub);
}

.tab-icon-pill {
  padding: 3px 16px;
  border-radius: 99px;
  font-size: 19px;
  transition: all 0.15s ease;
}

.tab-item.active .tab-icon-pill {
  background: var(--primary-light);
  color: var(--primary-dark);
}

.tab-item.active .tab-label {
  color: var(--primary-dark);
  font-weight: 800;
}

.tab-label {
  font-size: 11px;
  font-weight: 600;
}

/* 补充 V3：动词变形表、倍速弹出选择器、按住录音实时识别浮窗、7档艾宾浩斯周期抽屉、今日词表/记忆总表切换 */
.verb-conj-card {
  background: var(--primary-soft);
  border: 1px solid #d5dcf2;
  border-radius: 16px;
  padding: 14px;
  margin-bottom: 16px;
}

.verb-conj-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.verb-conj-title {
  font-size: 13px;
  font-weight: 800;
  color: var(--primary-dark);
  display: flex;
  align-items: center;
  gap: 6px;
}

.verb-group-badge {
  background: #ffffff;
  color: var(--primary);
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 99px;
  border: 1px solid #d5dcf2;
}

.verb-conj-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.verb-conj-item {
  background: #ffffff;
  border: 1px solid #e2e6f5;
  border-radius: 10px;
  padding: 7px 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  cursor: pointer;
}

.verb-conj-item:active {
  background: var(--primary-light);
}

.conj-label {
  font-size: 11px;
  color: var(--text-sub);
  font-weight: 600;
}

.conj-form {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.conj-kana {
  font-size: 11px;
  color: var(--text-muted);
}

.typing-input-box {
  width: 100%;
  padding: 15px 16px;
  font-size: 20px;
  font-weight: 700;
  border: 2px solid var(--primary);
  border-radius: 16px;
  background: #fff;
  color: var(--text-main);
  text-align: center;
  outline: none;
  margin: 16px 0;
}

.icon-btn-plain {
  background: none;
  border: none;
  font-size: 20px;
  color: var(--text-sub);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
}

.icon-btn-plain.starred {
  color: var(--accent-gold);
}

/* 扁平化 SVG 图标通用对齐 */
.flat-svg-icon {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
  flex-shrink: 0;
}

/* 7档倍速选择器 (0.5 / 0.8 / 1.0 / 1.2 / 1.5 / 1.8 / 2.0) */
.speed-Control-wrap {
  position: relative;
  display: inline-flex;
}

.speed-popover {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  background: #232634;
  color: #fff;
  border-radius: 14px;
  padding: 6px;
  display: flex;
  gap: 4px;
  z-index: 400;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.22);
}

.speed-opt-btn {
  background: transparent;
  color: rgba(255, 255, 255, 0.78);
  border: none;
  border-radius: 9px;
  padding: 6px 8px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

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

/* 按住说话 · 实时语音识别 · 松开即回放 悬浮麦克风与中央反馈卡片 */
.hold-mic-fab {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, #4f5d95 0%, #3b4675 100%);
  color: #fff;
  border: 3px solid #e8ebf7;
  box-shadow: 0 8px 22px rgba(79, 93, 149, 0.32);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
  transition: transform 0.15s ease, background 0.15s ease;
}

.hold-mic-fab.recording {
  transform: scale(1.12);
  background: linear-gradient(135deg, #e07a5f 0%, #c85a3d 100%);
  box-shadow: 0 0 0 8px rgba(224, 122, 95, 0.22);
}

.voice-hud-overlay {
  position: fixed;
  left: 50%;
  top: 46%;
  transform: translate(-50%, -50%);
  width: 88%;
  max-width: 340px;
  background: rgba(26, 30, 46, 0.96);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  color: #fff;
  border-radius: 22px;
  padding: 22px 20px;
  z-index: 900;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.35);
  text-align: center;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

.hold-mic-fab {
  -webkit-touch-callout: none !important;
  -webkit-user-select: none !important;
  user-select: none !important;
  touch-action: none !important;
}

.voice-pulse-circle {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #7284c7;
  margin: 0 auto 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: pulseWave 1.1s infinite ease-in-out;
}

@keyframes pulseWave {
  0%, 100% { transform: scale(1); opacity: 0.95; }
  50% { transform: scale(1.16); opacity: 0.7; }
}

.voice-bars {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  height: 16px;
}

.voice-bar {
  width: 3px;
  background: #94a7ec;
  border-radius: 2px;
  animation: barBounce 0.7s infinite ease-in-out;
}
.voice-bar:nth-child(2) { animation-delay: 0.15s; }
.voice-bar:nth-child(3) { animation-delay: 0.3s; }
.voice-bar:nth-child(4) { animation-delay: 0.45s; }

@keyframes barBounce {
  0%, 100% { height: 6px; }
  50% { height: 15px; }
}

/* 艾宾浩斯 7 档周期胶囊按钮网格 (1小时 / 1天 / 2天 / 7天 / 15天 / 30天 / 加强) */
.ebbinghaus-cycle-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.cycle-pill-btn {
  background: #f5f4ee;
  border: 1.5px solid var(--border-light);
  border-radius: 14px;
  padding: 10px 2px;
  text-align: center;
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  font: inherit;
  color: var(--text-main);
}

.cycle-pill-btn.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  box-shadow: 0 6px 14px rgba(79, 93, 149, 0.22);
}

.cycle-pill-btn.strengthen {
  border-color: #f0b49e;
  background: #fff5f2;
  color: #c85a3d;
}

.cycle-pill-btn.strengthen.active {
  background: #e07a5f;
  color: #fff;
  border-color: #e07a5f;
}

.cycle-btn-title {
  font-size: 13px;
  font-weight: 800;
}

.cycle-btn-count {
  font-size: 11px;
  opacity: 0.82;
  font-weight: 600;
}

.cycle-btn-total, .cycle-count-note {
  color: var(--text-sub);
  font-size: 11px;
  line-height: 1.45;
}
.cycle-pill-btn.active .cycle-btn-total { color: inherit; }
.cycle-count-note { order: 2; margin-top: 3px; }

@media (max-width: 380px) {
  .ebbinghaus-cycle-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* 计划表内部分栏 Tab */
.plan-subtabs {
  display: flex;
  background: #eae8e0;
  border-radius: 12px;
  padding: 4px;
  margin-bottom: 14px;
}

.plan-subtab {
  flex: 1;
  text-align: center;
  padding: 8px 6px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-sub);
  border-radius: 9px;
  cursor: pointer;
}

.plan-subtab.active {
  background: #fff;
  color: var(--primary-dark);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}


/* V3.1: 顶栏「退出练习」按钮 & 右上角「第 N 次出现」徽章 & 未勾选态「○ 标为认识」按钮 */
.exit-save-btn {
  background: #ffffff;
  color: var(--primary-dark);
  border: 1.5px solid #cfd6ec;
  border-radius: 10px;
  padding: 6px 11px;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.03);
}

.exit-save-btn:active {
  background: var(--primary-soft);
}

.seen-count-badge {
  background: var(--primary-soft);
  color: var(--primary-dark);
  border: 1px solid #d5dcf2;
  padding: 5px 11px;
  border-radius: 99px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.btn-unmarked-known {
  background: #ffffff;
  color: var(--text-main);
  border: 1.5px dashed #b4bdd9;
  border-radius: 99px;
  padding: 11px 16px;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
}

.btn-unmarked-known:active {
  background: var(--primary-soft);
  border-style: solid;
  border-color: var(--primary);
}

.unmarked-circle-icon {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  border: 2px solid #8a94b5;
  display: inline-block;
}


/* ==================== V3.3: 1. 例句单词点击弹出底部半屏词义抽屉 (Bottom Sheet) ==================== */
.ruby-token {
  padding: 2px 3px;
  border-radius: 6px;
  transition: background 0.15s ease, transform 0.1s ease;
}

.ruby-token:not(.punct):active {
  background: var(--primary-light);
  transform: scale(0.96);
}

.token-sheet-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(18, 22, 34, 0.48);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  z-index: 800;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  animation: fadeBackdrop 0.18s ease;
}

@keyframes fadeBackdrop {
  from { opacity: 0; }
  to { opacity: 1; }
}

.token-bottom-sheet {
  width: 100%;
  max-width: 440px;
  max-height: 76vh;
  background: var(--bg-card);
  border-radius: 26px 26px 0 0;
  padding: 12px 20px 32px;
  box-shadow: 0 -10px 36px rgba(0, 0, 0, 0.22);
  overflow-y: auto;
  animation: slideUpSheet 0.24s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

@keyframes slideUpSheet {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

.sheet-drag-handle {
  width: 40px;
  height: 5px;
  background: #d5d7e2;
  border-radius: 99px;
  margin: 0 auto 14px;
}

/* ==================== V3.3: 2. 极简「按住即识别 · 松开即回放」卡片（复刻录屏2干净体验） ==================== */
.minimal-rec-wrap {
  position: fixed;
  left: 50%;
  top: 46%;
  transform: translate(-50%, -50%);
  z-index: 950;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  pointer-events: none;
  width: 82%;
  max-width: 280px;
}

.minimal-release-pill {
  background: rgba(24, 28, 40, 0.85);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  min-height: 44px;
  padding: 8px 16px;
  border: 0;
  border-radius: 10px;
  pointer-events: auto;
  cursor: pointer;
  touch-action: manipulation;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.minimal-rec-box {
  width: 100%;
  min-height: 90px;
  background: rgba(22, 26, 38, 0.60);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border-radius: 18px;
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.32);
  text-align: center;
}

.minimal-rec-dot {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #7c8fd6;
  margin-bottom: 5px;
  animation: pulseWave 1s infinite ease-in-out;
}

.minimal-rec-status {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.65);
  margin-bottom: 10px;
}

.minimal-rec-live-text {
  font-size: 17px;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.45;
  min-height: 24px;
  max-height: 25vh;
  max-height: 25dvh;
  overflow-y: auto;
  overflow-wrap: anywhere;
}

/* 松手后的底部极简回放卡片 */
.minimal-play-card {
  position: fixed;
  left: 50%;
  bottom: 108px;
  transform: translateX(-50%);
  width: 86%;
  max-width: 340px;
  background: rgba(26, 31, 44, 0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: #fff;
  border-radius: 16px;
  padding: 14px 18px;
  z-index: 950;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.28);
}

.minimal-play-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 10px;
  margin-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.minimal-play-left {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.minimal-play-text {
  font-size: 16px;
  font-weight: 700;
  color: #ffffff;
  text-align: left;
  line-height: 1.4;
}


/* ==================== V3.4: 单词卡顶部「动词变形」翻转按钮与平滑翻转动画 (对应图4批注) ==================== */
.verb-flip-btn {
  background: var(--primary-soft);
  color: var(--primary-dark);
  border: 1.5px solid #c9d2f0;
  border-radius: 10px;
  padding: 5px 11px;
  font-size: 12.5px;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.16s ease;
}

.verb-flip-btn.flipped {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
  box-shadow: 0 4px 12px rgba(79, 93, 149, 0.25);
}

.flip-face-enter {
  animation: cardFlipIn 0.24s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes cardFlipIn {
  from {
    opacity: 0.3;
    transform: rotateY(-12deg) scale(0.98);
  }
  to {
    opacity: 1;
    transform: rotateY(0) scale(1);
  }
}


/* ==================== V3.6: 双栏切换式「中日互译」卡片样式 (复刻图2设计) ==================== */
.trans-split-card {
  background: #ffffff;
  border-radius: 24px;
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-card);
  padding: 18px 18px 14px;
  position: relative;
  margin-bottom: 18px;
}

.trans-pane-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.trans-lang-btn {
  background: none;
  border: none;
  font-size: 16px;
  font-weight: 800;
  color: var(--text-main);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
}

.trans-tokenize-pill {
  background: #2b3040;
  color: #ffffff;
  border: none;
  border-radius: 99px;
  padding: 6px 14px;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
}

.trans-textarea {
  width: 100%;
  min-height: 92px;
  border: none;
  outline: none;
  resize: none;
  font-size: 18px;
  font-weight: 600;
  color: var(--text-main);
  background: transparent;
  font-family: inherit;
  line-height: 1.5;
}

.trans-textarea::placeholder {
  color: #c5c8d4;
  font-weight: 700;
  font-size: 20px;
}

.trans-pane-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0 12px;
}

.trans-divider-wrap {
  position: relative;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 2px 0 8px;
}

.trans-divider-line {
  width: 100%;
  height: 1px;
  background: #ebe9e2;
}

.trans-swap-circle {
  position: absolute;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #ffffff;
  border: 1px solid #e2e0d8;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: var(--text-main);
  cursor: pointer;
  transition: transform 0.2s ease;
}

.trans-swap-circle:active {
  transform: rotate(180deg) scale(0.95);
}

.trans-output-box {
  min-height: 90px;
  font-size: 18px;
  font-weight: 700;
  color: var(--primary-dark);
  line-height: 1.5;
  padding: 6px 0 12px;
  word-break: break-word;
}

.trans-footer-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: #b0b5c4;
  padding: 0 4px;
  margin-bottom: 18px;
}

/* 每个词和紧随其后的标点作为一个换行单元，保留词本身的点击区域。 */
.ruby-token-group { display: inline-flex; align-items: flex-end; flex: 0 0 auto; max-width: 100%; }
.ruby-token-group .ruby-token.punct { padding-left: 0; padding-right: 0; }

/* 练习底栏：认识、例句跟读、继续 */
.study-bottom-bar .btn-unmarked-known { flex:1; justify-content:center; padding:11px 8px; font-size:12.5px; text-align:center; line-height:1.25; }
.study-bottom-bar .btn-primary-pill { flex:1; padding:13px 10px; }
.bottom-mic-wrap {
  flex:1.25;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:5px;
  min-width:118px;
  min-height:82px;
  padding:6px 14px;
  border-radius:18px;
  color:var(--primary-dark);
  font-size:11.5px;
  font-weight:800;
  white-space:nowrap;
  touch-action:none;
  -webkit-touch-callout:none;
  -webkit-user-select:none;
  user-select:none;
  cursor:pointer;
  position:relative;
}
.bottom-mic-wrap:active .bottom-mic {
  transform: scale(1.08);
}
.study-bottom-bar .bottom-mic {
  width:54px;
  height:54px;
  min-width:54px;
  box-shadow: 0 6px 18px rgba(79, 93, 149, 0.28), 0 0 0 4px rgba(79, 93, 149, 0.12);
  touch-action:none;
}
.bottom-mic-wrap > * { pointer-events:none; }

/* 键盘输入强化模式：固定视口不随软键盘弹出而上下滑动 */
.quiz-type-locked-screen {
  position: fixed !important;
  inset: 0 !important;
  width: 100% !important;
  max-width: 480px !important;
  margin: 0 auto !important;
  height: 100dvh !important;
  max-height: 100dvh !important;
  overflow: hidden !important;
  overscroll-behavior: none !important;
  touch-action: none !important;
  padding-bottom: 0 !important;
}

html.keyboard-lock-active,
body.keyboard-lock-active {
  overflow: hidden !important;
  position: fixed !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  overscroll-behavior: none !important;
  touch-action: none !important;
}

/* ==================== V3.9: 商业化与裂变推广样式 (Paywall 订阅 & 伴学邀请中心) ==================== */
.trial-badge-pill {
  background: linear-gradient(135deg, #fff7eb 0%, #ffeed2 100%);
  border: 1px solid #f6d198;
  color: #a46400;
  border-radius: 99px;
  padding: 4px 10px;
  font-size: 11.5px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  transition: transform 0.12s;
}
.trial-badge-pill:active { transform: scale(0.96); }

.paywall-modal-card {
  background: var(--bg-card);
  border-radius: 26px;
  padding: 24px 20px;
  box-shadow: 0 16px 40px rgba(35, 38, 52, 0.14);
  border: 1px solid var(--border-light);
  margin-bottom: 18px;
  text-align: center;
}

.plan-select-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 18px 0 14px;
}

.plan-card-item {
  border: 2px solid var(--border-light);
  border-radius: 18px;
  padding: 16px 12px;
  text-align: center;
  cursor: pointer;
  background: #faf9f6;
  position: relative;
  transition: all 0.16s ease;
}

.plan-card-item.selected {
  border-color: var(--primary);
  background: #ffffff;
  box-shadow: 0 6px 18px rgba(79, 93, 149, 0.16);
}

.plan-save-tag {
  position: absolute;
  top: -10px;
  right: 10px;
  background: #e07a5f;
  color: #ffffff;
  font-size: 10.5px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 99px;
  box-shadow: 0 2px 6px rgba(224, 122, 95, 0.35);
}

.paywall-perks-list {
  text-align: left;
  background: #f7f6f0;
  border-radius: 16px;
  padding: 14px 16px;
  margin: 16px 0;
  display: flex;
  flex-direction: column;
  gap: 9px;
  font-size: 13px;
  color: var(--text-main);
  border: 1px solid var(--border-light);
}

.invite-hero-banner {
  background: linear-gradient(135deg, #4f5d95 0%, #364273 100%);
  color: #ffffff;
  border-radius: 22px;
  padding: 22px 18px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-float);
  text-align: center;
}

.invite-code-pill-box {
  background: rgba(255, 255, 255, 0.16);
  border: 1.5px dashed rgba(255, 255, 255, 0.45);
  border-radius: 14px;
  padding: 10px 16px;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin: 12px 0 6px;
  cursor: pointer;
}

.share-poster-preview {
  background: #ffffff;
  border: 1.5px solid var(--border-light);
  border-radius: 24px;
  padding: 24px 20px;
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.12);
  text-align: center;
  margin: 10px auto 16px;
  max-width: 320px;
}



/* 2026-11 极简编辑式界面：仅调整视觉，保留原有交互与数据。 */
:root {
  --bg-page:#f5f5f3; --bg-card:#fff; --bg-subtle:#efefed;
  --primary:#bb3022; --primary-dark:#242424; --primary-light:#f1e8e6; --primary-soft:#f5f4f2;
  --accent-warm:#b83226; --accent-gold:#bb3022; --success:#477b5f;
  --text-main:#252525; --text-sub:#727270; --text-muted:#a2a29f; --border-light:#e8e8e5;
  --shadow-card:0 4px 18px rgba(0,0,0,.035); --shadow-float:0 8px 24px rgba(0,0,0,.08);
  --radius-xl:22px; --radius-lg:18px; --radius-md:14px;
}
body { background:#e9e9e7; color:var(--text-main); }
#app-shell { background:var(--bg-page); box-shadow:0 0 38px rgba(0,0,0,.06); }
.screen { padding:22px 20px calc(100px + env(safe-area-inset-bottom)); }
.screen.fullscreen-modal { background:var(--bg-page); }
.brand-heading { display:flex; align-items:flex-end; justify-content:space-between; margin:6px 0 23px; }
.brand-heading h1 { color:#242424; font-family:"Songti SC","Noto Serif CJK SC",serif; font-size:36px; font-weight:700; line-height:1.12; letter-spacing:1px; }
.brand-heading p { margin-top:7px; color:var(--text-sub); font-size:12px; letter-spacing:.05em; }
.brand-dot { display:inline-block; width:9px; height:9px; border-radius:50%; background:var(--primary); margin-left:5px; vertical-align:baseline; }
.page-heading { margin-bottom:20px; }
.lookup-search-box { min-height:48px; border:1px solid var(--border-light); background:#fff; border-radius:15px; box-shadow:none; padding:11px 15px; }
.lookup-icon { width:20px; height:20px; fill:none; stroke:#696967; stroke-width:1.7; stroke-linecap:round; }
.lookup-input { min-width:0; font-size:14px; }
.lookup-dropdown { border-color:var(--border-light); border-radius:16px; }
.main-launch-card { background:#fff; color:var(--text-main); border:1px solid var(--border-light); border-radius:22px; box-shadow:var(--shadow-card); padding:22px 18px 18px; gap:20px; }
.launch-stat-group { width:100%; gap:0; justify-content:space-between; }
.launch-stat-item { min-width:0; flex:1; padding:0 8px; border-right:1px solid #ededeb; }
.launch-stat-item:first-child { padding-left:0; } .launch-stat-item:last-child { border-right:0; }
.launch-stat-num { color:#222; font-family:Georgia,"Songti SC",serif; font-weight:700; font-size:28px; }
.launch-stat-label { color:var(--text-sub); opacity:1; font-size:11.5px; white-space:nowrap; }
.btn-start-main, .btn-primary-pill { background:var(--primary); color:#fff; box-shadow:none; border:0; }
.btn-start-main { border-radius:14px; font-size:15px; justify-content:space-between; }
.btn-start-review, .btn-white-pill { background:#fff; color:#252525; border:1px solid #e2e2df; box-shadow:none; }
.btn-start-review { border-radius:14px; font-size:14px; }
.btn-white-pill, .btn-primary-pill { min-height:38px; }
.core-trio-grid { gap:8px; }
.trio-card { background:#fff; border-color:var(--border-light); box-shadow:none; padding:14px 7px; }
.trio-icon { background:#f4f4f2; filter:grayscale(1); margin-bottom:8px; }
.trio-title { font-size:12px; color:#292929; } .trio-sub { font-size:10.5px; }
.hero-card, .ebbinghaus-panel, .word-header-block, .example-section, .trans-split-card, .paywall-modal-card { border:1px solid var(--border-light); background:#fff; border-radius:20px; box-shadow:var(--shadow-card); }
.section-heading { color:#242424; font-size:16px; font-weight:750; letter-spacing:.01em; margin-top:22px; }
.ebbinghaus-row, .grammar-box, .paywall-perks-list, .plan-card-item { background:#f7f7f5; border-color:#ededea; }
.grammar-box { border-left-color:#c6c6c2; }
.trial-badge-pill { background:#f5f5f3 !important; color:#686864 !important; border:1px solid #e8e8e5 !important; font-weight:600; }
.study-topbar { padding-bottom:20px; gap:6px; }
.back-icon-btn, .exit-save-btn { border:1px solid #e7e7e4; background:#fff; box-shadow:none; color:#272727; }
.study-progress-track { height:5px; background:#dededb; } .study-progress-bar { background:var(--primary); }
.seen-count-badge, .level-mini-pill, .spell-pos-pill, .def-tag { color:#696967; background:#f2f2f0; border:1px solid #eaeae7; }
.word-header-block { padding:24px 21px; }
.word-kanji-large { font-family:"Hiragino Mincho ProN","Yu Mincho","Songti SC",serif; color:#252525; font-size:42px; font-weight:700; line-height:1.25; letter-spacing:.01em; overflow-wrap:anywhere; }
.word-reading-line { color:#8b8b88; margin:5px 0 18px; }
.word-title-row { gap:8px; align-items:flex-start; }
.word-title-row > :first-child { min-width: 0; }
.word-title-actions { display: flex; align-items: center; gap: 4px; flex-shrink: 0; }
.word-feedback-button {
  min-height: 40px;
  padding: 4px 5px;
  border: 0;
  background: transparent;
  color: var(--text-sub);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}
.word-feedback-dialog {
  box-sizing: border-box;
  width: min(420px, calc(100% - 32px));
  max-height: calc(100% - 32px);
  color: var(--primary-dark);
  background: var(--bg-card, #fff);
  border: 1px solid var(--border-light);
  border-radius: 20px;
  padding: 20px;
}
.word-feedback-dialog::backdrop { background: rgba(0, 0, 0, .45); }
.word-feedback-form { display: grid; gap: 12px; }
.word-feedback-form header { display: flex; align-items: center; justify-content: space-between; }
.word-feedback-form h2 { margin: 0; font-size: 20px; }
.word-feedback-form p { margin: 0; }
.word-feedback-context { font-weight: 700; }
.word-feedback-form label { display: grid; gap: 6px; font-size: 14px; font-weight: 600; }
.word-feedback-form select, .word-feedback-form textarea {
  box-sizing: border-box;
  width: 100%;
  padding: 10px;
  border-radius: 10px;
  border: 1px solid var(--border-light);
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 16px;
}
.word-feedback-form textarea { resize: vertical; }
.word-feedback-hint, .word-feedback-status { color: var(--text-sub); font-size: 13px; overflow-wrap: anywhere; }
.word-feedback-status:empty { display: none; }
.word-feedback-actions { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.audio-pill { background:#fff; border-color:#e4e4e1; color:#30302f; font-weight:650; }
.audio-pill:active, .btn-white-pill:active { background:#f1f1ef; }
.def-block { border-top-color:#eeeeeb; gap:14px; } .def-tag { font-size:11px; }
.example-title { background:transparent; color:#252525; padding:0; font-size:14px; white-space:nowrap; }
.example-cn-row:last-child { margin-bottom:0; }
.example-cn-row .level-mini-pill { flex:none; }
.example-cn-text, .example-section .ruby-kana, .example-section .ruby-kanji { overflow-wrap:anywhere; }
.example-section .ruby-token { min-width:0; }
.ruby-kanji { color:#262626; border-bottom-color:#d0d0cd; } .ruby-kana, .example-cn-text { color:#777775; }
.shadow-btn, .cycle-pill-btn, .plan-subtab, .verb-flip-btn { background:#f6f6f4; color:#30302f; border-color:#e4e4e1; }
.shadow-btn.active, .cycle-pill-btn.active, .plan-subtab.active { background:#333; border-color:#333; color:#fff; }
.study-bottom-bar { border-color:#e7e7e4; }
.btn-unmarked-known { border:1px solid #dededb; color:#333; }
.study-bottom-bar .bottom-mic { background:#292929; border-color:#eee; }
.quiz-choice-card { background:#fff; border:1px solid #e8e8e5; border-radius:16px; box-shadow:none; }
.quiz-choice-card.correct { background:#edf7ef; border-color:#609773; } .quiz-choice-card.wrong { background:#fff0ee; border-color:#c94b3e; }
.quiz-choice-main { font-weight:650; }
.spell-meaning-box { padding-top:24px; } .spell-meaning-text { line-height:1.55; }
.trans-split-card { padding:20px; } .trans-tokenize-pill { background:#292929; } .trans-output-box { color:#333; }
.bottom-tabbar { height:calc(66px + env(safe-area-inset-bottom)); padding:0 8px env(safe-area-inset-bottom); background:rgba(255,255,255,.97); border-top:1px solid #ebebe9; }
.tab-item { color:#8b8b88; } .tab-icon-pill { line-height:0; padding:4px 12px; }
.tab-icon-pill svg { width:21px; height:21px; fill:none; stroke:currentColor; stroke-width:1.7; stroke-linecap:round; stroke-linejoin:round; }
.tab-item.active .tab-icon-pill { color:#242424; background:transparent; }
.tab-item.active .tab-label { color:#242424; }
.icon-btn-plain.starred { color:var(--primary); }
.token-bottom-sheet { background:#fff; border-radius:24px 24px 0 0; }
.speed-popover, .lookup-dropdown { background:#fff; }
.onboard-screen { background:var(--bg-page); }
.welcome-logo-box { background:#282828; box-shadow:none; }
.compact-option-card.selected, .plan-card-item.selected { border-color:#333; box-shadow:none; }
.invite-hero-banner { background:#292929; box-shadow:none; }
.plan-save-tag { background:var(--primary); box-shadow:none; }
:focus-visible { outline:2px solid #bd3022; outline-offset:3px; }
@media (max-width:360px) {
  .screen { padding-left:15px; padding-right:15px; }
  .word-kanji-large { font-size:36px; }
  .launch-stat-num { font-size:24px; }
  .launch-stat-label { font-size:10px; }
  .seen-count-badge { font-size:10px; padding:5px 7px; }
}

/* 对照确认图：主页概览、任务、记忆法和个人中心 */
.home-overview-card,.home-task-card,.profile-stats-card,.profile-menu {background:#fff;border:1px solid var(--border-light);border-radius:20px;box-shadow:var(--shadow-card)}
.home-overview-card {display:grid;grid-template-columns:1fr 1fr;padding:22px 18px;margin:18px 0 22px;}
.home-overview-learning,.home-overview-review {border:0;background:none;text-align:left;display:flex;flex-direction:column;gap:9px;min-width:0;color:var(--text-main);cursor:pointer;}
.home-overview-learning {padding-right:14px;border-right:1px solid #e8e8e5;justify-content:space-between;}
.home-overview-review {align-items:center;padding-left:14px;}.overview-label {font-size:13px;font-weight:700;align-self:flex-start;}
.overview-number {font-family:Georgia,serif;font-size:36px;font-weight:700;line-height:1.2;white-space:nowrap;}.overview-number small {font-family:-apple-system,"PingFang SC",sans-serif;font-size:15px;font-weight:650;}
.overview-caption {font-size:11px;color:var(--text-sub);line-height:1.4;}.review-ring {width:73px;height:73px;border-radius:50%;background:conic-gradient(var(--primary) var(--ring),#e9e9e7 0);padding:5px;display:flex;align-items:center;justify-content:center;}
.review-ring>span {width:100%;height:100%;border-radius:50%;background:white;display:flex;justify-content:center;align-items:center;font-size:17px;font-weight:750;}.review-ring small {font-size:10px;font-weight:500;color:var(--text-sub);}
.home-task-heading {margin-top:0;margin-bottom:10px}.home-task-card {padding:3px 17px;}.home-task-row {display:flex;width:100%;align-items:center;gap:12px;min-height:57px;border:0;border-bottom:1px solid #eeeeec;background:transparent;color:var(--text-main);text-align:left;cursor:pointer;padding:10px 0;}.home-task-row:last-child {border-bottom:0;}.task-check {width:20px;height:20px;border:1.5px solid #bcbcb9;border-radius:50%;flex:none;display:grid;place-items:center;color:#fff;font-size:12px}.task-check.done {background:#537a62;border-color:#537a62;}.task-name {font-weight:650;font-size:13px;flex:1;}.task-name small {display:block;font-size:10px;font-weight:400;color:var(--text-sub);margin-top:3px}.task-count {font-size:12px;color:var(--text-sub);white-space:nowrap;}
.home-start-button {width:100%;min-height:52px;margin-top:20px;border:0;border-radius:99px;color:white;background:var(--primary);font-size:16px;font-weight:750;cursor:pointer;}.home-start-button span {padding-left:12px;}.home-secondary-review {display:block;margin:12px auto 0;background:none;border:0;color:var(--text-sub);font-size:12px;padding:7px;cursor:pointer;}
.simple-page-header {display:grid;grid-template-columns:40px 1fr 40px;align-items:center;margin-bottom:22px;}.simple-page-header h2 {text-align:center;font-size:17px;}.memory-screen .ebbinghaus-panel {display:flex;flex-direction:column;gap:14px;}.memory-screen .ebbinghaus-header {order:0}.memory-screen .memory-cycle-prompt {order:1;margin:0!important}.memory-screen .ebbinghaus-cycle-grid {order:2;margin:0}.memory-screen .memory-cycle-results {order:3}.memory-screen .memory-intro {order:4;margin-top:5px;}
.word-header-block {background:transparent;border:0;box-shadow:none;padding:24px 2px 18px;}.word-accent-dot {display:inline-block;width:9px;height:9px;background:var(--primary);border-radius:50%;margin-left:5px;vertical-align:baseline;}.word-header-block .def-block {border:0;padding:0;margin:3px 0 18px;gap:5px;}.word-pos-label {font-size:12px;color:var(--text-sub);}.word-core-meaning {font-family:"Songti SC","Hiragino Mincho ProN",serif;font-size:21px;line-height:1.5;font-weight:650;}.word-origin {font-size:12px;color:var(--text-sub);line-height:1.5;}.more-meanings {font-size:12px;color:var(--text-sub);line-height:1.6}.more-meanings summary {cursor:pointer;}.audio-pill-row {margin:8px 0 0;}.audio-pill-row .audio-pill {min-height:39px;}.example-section {margin-top:4px;padding:20px;}.ruby-sentence-wrap {line-height:1.9;gap:6px 7px;}.study-bottom-bar {gap:12px;}.study-bottom-bar .btn-unmarked-known {flex:1.05;}.study-bottom-bar .btn-primary-pill {flex:1.15;}.study-bottom-bar .bottom-mic {background:#f1f1ef;color:#262626;border-color:#e5e5e2;box-shadow:none;}.study-bottom-bar .bottom-mic svg {stroke:#262626;}
.profile-stats-card {padding:20px;margin-bottom:18px;}.profile-stats-title {font-weight:750;font-size:15px;display:flex;justify-content:space-between;}.profile-stats-title span {color:var(--text-sub);font-size:11px;font-weight:500;}.profile-stat-grid {display:grid;grid-template-columns:repeat(3,1fr);margin:20px 0;}.profile-stat-grid>div {text-align:center;border-right:1px solid #eee;min-width:0}.profile-stat-grid>div:last-child {border:0}.profile-stat-grid strong {display:block;font:700 26px Georgia,serif;}.profile-stat-grid span {font-size:11px;color:var(--text-sub);}.profile-bars {height:38px;display:flex;gap:8px;align-items:flex-end;}.profile-bars div {flex:1;height:100%;display:flex;align-items:flex-end;}.profile-bars div span {width:100%;background:#e2e2df;border-radius:3px 3px 0 0;}.profile-bars div span.current {background:var(--primary)}.profile-chart-note {font-size:10px;color:var(--text-muted);margin-top:8px;}
.profile-menu {padding:4px 16px}.profile-menu-link,.profile-menu-details>summary {display:flex;align-items:center;gap:12px;width:100%;min-height:55px;padding:11px 2px;border:0;border-bottom:1px solid #ededeb;background:transparent;color:var(--text-main);font-size:14px;text-align:left;cursor:pointer;list-style:none;}.profile-menu-details>summary::-webkit-details-marker {display:none}.profile-menu-details:last-child>summary {border-bottom:0}.profile-menu-link>span:nth-child(2),.profile-menu-details>summary>span:nth-child(2) {flex:1;font-weight:650}.profile-menu-link small {font-size:11px;color:var(--text-sub)}.profile-menu-link b,.profile-menu-details>summary b {font-size:20px;font-weight:400;color:#a5a5a2;transition:transform .15s}.profile-menu-details[open]>summary b {transform:rotate(90deg)}.profile-menu-icon {width:22px;text-align:center;font-size:19px;color:#444}.profile-menu-details>.hero-card {box-shadow:none;border:0;background:#f8f8f6;margin:10px 0 14px;padding:14px}.profile-menu-details>details {padding:5px 10px}
@media(max-width:360px){.home-overview-card {padding:18px 14px}.overview-number {font-size:30px}.overview-number small {font-size:13px}.review-ring {width:66px;height:66px}.task-name {font-size:12px}.word-kanji-large {font-size:36px}}
.plan-subtabs {overflow-x:auto;scrollbar-width:none;}
.plan-subtabs::-webkit-scrollbar {display:none;}
.plan-subtab {flex:1 0 auto;white-space:nowrap;font-size:11.5px;}

/* 汉字释义与数字统一使用系统字体，保持不同字符字形一致。 */
.word-core-meaning,.overview-number,.overview-number small,.profile-stat-grid strong {font-family:-apple-system,BlinkMacSystemFont,"PingFang SC","Hiragino Sans",sans-serif;font-synthesis:none;}
.overview-number {font-size:34px;letter-spacing:-.03em;font-variant-numeric:tabular-nums;}
.known-select-btn {display:inline-flex;align-items:center;gap:5px;background:#fff;color:#4a4a48;border:1px solid #dededb;border-radius:99px;padding:7px 10px;font-size:12px;font-weight:650;white-space:nowrap;cursor:pointer;}
.known-select-circle {width:14px;height:14px;border:1.5px solid #aaa;border-radius:50%;display:inline-block;}
.known-select-btn.selected {background:#292929;color:#fff;border-color:#292929;}
.known-select-btn.selected .known-select-circle {background:#fff;border-color:#fff;box-shadow:inset 0 0 0 3px #292929;}
.profile-stat-grid>button {border:0;border-right:1px solid #eee;background:none;min-width:0;padding:0;text-align:center;color:inherit;cursor:pointer;font:inherit;}
.profile-stat-grid>button span {display:block;}

/* 记忆表：文字与状态可换行，操作按钮保持完整。 */
.swipe-card:has(.memory-word-content) { align-items:center; gap:10px; }
.memory-word-content { min-width:0; overflow-wrap:anywhere; }
.memory-word-meta { display:flex; flex-wrap:wrap; align-items:center; gap:4px 8px; margin-bottom:4px; }
.memory-word-meta .level-mini-pill { white-space:nowrap; flex:none; }
.memory-word-reading { font-size:13px; color:var(--text-sub); overflow-wrap:anywhere; }
.memory-word-actions { flex:none; }
@media(max-width:360px) { .swipe-card:has(.memory-word-content) { flex-wrap:wrap; } .memory-word-actions { margin-left:auto; } }

/* 完成时的轻量彩带；回放浮层放在顶部并拦截误触。 */
.group-confetti { position:absolute; inset:0; overflow:hidden; pointer-events:none; z-index:2; }
.group-confetti i { position:absolute; top:-18px; left:var(--x); width:8px; height:15px; background:hsl(var(--hue),75%,55%); border-radius:2px; animation:group-confetti-fall 2.3s ease-in var(--delay) both; }
@keyframes group-confetti-fall { 0% {transform:translateY(-20px) rotate(0);opacity:1} 100% {transform:translateY(75vh) rotate(680deg);opacity:0} }
.playback-dismiss-layer { position:fixed; inset:0; z-index:949; background:transparent; touch-action:manipulation; }
.minimal-play-card { top:calc(env(safe-area-inset-top, 0px) + 16px); bottom:auto; }
.listen-answer-reveal { margin-top:8px; font-size:15px; color:#456751; font-weight:600; }
@media (prefers-reduced-motion:reduce) { .group-confetti i { animation:none; display:none; } }

/* 长按录音区域不应触发系统选字和放大镜。 */
.juntango-mic-active, .juntango-mic-active body, .juntango-mic-active * { -webkit-user-select:none !important; user-select:none !important; -webkit-touch-callout:none !important; }
.bottom-mic-wrap, .bottom-mic-wrap *, .minimal-rec-wrap, .minimal-rec-wrap *, .minimal-play-card { -webkit-user-select:none !important; user-select:none !important; -webkit-touch-callout:none !important; }
.minimal-play-close { width:44px; height:44px; flex:none; display:flex; align-items:center; justify-content:center; padding:0; margin:-10px -10px -10px 0; border:0; border-radius:50%; background:transparent; color:rgba(255,255,255,.82); font-size:20px; cursor:pointer; }

/* 礼花从各个中心向四周绽放，不遮挡按钮。 */
.group-fireworks { position:absolute; inset:0; overflow:hidden; pointer-events:none; z-index:2; }
.firework-burst { position:absolute; left:var(--x); top:var(--y); width:1px; height:1px; }
.firework-burst i { position:absolute; left:0; top:0; width:5px; height:13px; border-radius:99px; background:hsl(var(--hue), 82%, 55%); box-shadow:0 0 9px hsla(var(--hue), 90%, 60%, .7); opacity:0; transform-origin:center; animation:firework-spark 1.35s ease-out var(--delay) both; }
@keyframes firework-spark { 0% {opacity:0;transform:rotate(var(--angle)) translateY(0) scale(.2)} 12% {opacity:1} 72% {opacity:1} 100% {opacity:0;transform:rotate(var(--angle)) translateY(-65px) scale(.45)} }
@media (prefers-reduced-motion:reduce) { .firework-burst i { animation:none; display:none; } }

/* 音频速度滑块 */
.speed-popover { width: 220px; max-width: calc(100vw - 32px); padding: 14px 16px; color: #252525; }
.speed-slider { width: 100%; }
.speed-slider-heading, .speed-slider-ends { display: flex; align-items: center; justify-content: space-between; }
.speed-slider-heading { font-size: 14px; font-weight: 600; }
.speed-slider-heading strong { color: var(--primary); }
.speed-slider input[type="range"] { display: block; width: 100%; margin: 14px 0 8px; accent-color: var(--primary); }
.speed-slider-ends { font-size: 12px; color: #777; }

.screen.study-detail-screen {
  display: flex;
  flex: none;
  flex-direction: column;
  min-height: 0;
  height: 100vh;
  height: 100dvh;
  padding: 0;
  overflow: hidden;
}
.study-detail-scroll {
  flex: 1;
  min-height: 0;
  padding: 22px clamp(12px, 4vw, 20px) 14px;
  overflow: auto;
  overscroll-behavior-y: contain;
}
.example-section { padding: 14px clamp(12px, 3.5vw, 20px) 16px; }
.example-header { position: relative; gap: 6px; margin-bottom: 12px; }
.example-audio-controls { display: flex; flex: 1; min-width: 0; width: 100%; justify-content: space-between; align-items: center; gap: 6px; }
.example-control-group { display: flex; align-items: center; gap: 4px; min-width: 0; }
.example-control-group:last-child { flex-shrink: 0; }
.example-audio-controls .speed-Control-wrap { position: static; flex-shrink: 0; }
.example-audio-controls .audio-pill {
  justify-content: center;
  min-width: 38px;
  min-height: 44px;
  padding: 4px 7px;
  gap: 4px;
  border-color: transparent;
  border-radius: 11px;
  background: transparent;
  font-size: 12px;
  line-height: 1.25;
  white-space: nowrap;
}
.example-audio-controls .example-play-button,
.example-audio-controls .example-loop-button[aria-pressed="true"] {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}
.example-audio-controls.is-looping .example-play-button {
  background: #fff;
  border-color: var(--border-light);
  color: var(--text-main);
}
.example-audio-controls .speed-Control-wrap > .audio-pill {
  border: 4px solid transparent;
  border-radius: 13px;
  background: var(--primary-soft);
  background-clip: padding-box;
  font-variant-numeric: tabular-nums;
}
.example-audio-controls .icon-btn-plain { width: 34px; min-height: 44px; flex-shrink: 0; }
@media (max-width: 360px) {
  .example-audio-controls { gap: 4px; }
  .example-control-group { gap: 3px; }
  .example-audio-controls .audio-pill { min-width: 34px; padding-inline: 5px; gap: 3px; }
  .example-audio-controls .flat-svg-icon { width: 14px; height: 14px; }
  .example-audio-controls .icon-btn-plain { width: 32px; }
}

.quiz-action-row {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-width: 288px;
  margin: 0 auto 18px;
}
.quiz-typing-fixed-body .quiz-action-row { margin-top: 10px; }
.quiz-action-row > button,
.quiz-action-row .speed-Control-wrap > button,
.quiz-audio-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 44px;
  padding: 6px;
  font-size: 13px;
  line-height: 1.25;
  white-space: nowrap;
}
.quiz-audio-button { padding-inline: 16px; }
.quiz-action-row .speed-Control-wrap > button { width: 100%; }
.audio-pill[aria-pressed="true"] { background: #333; border-color: #333; color: #fff; }

/* 订阅、邀请和海报的返回按钮随本页内容滚动时固定在顶部。 */
.screen.membership-screen {
  --membership-background: var(--bg-page);
  flex: none;
  min-height: 0;
  height: 100vh;
  height: 100dvh;
  padding-top: 0;
  padding-right: max(20px, env(safe-area-inset-right, 0px));
  padding-bottom: calc(30px + env(safe-area-inset-bottom, 0px));
  padding-left: max(20px, env(safe-area-inset-left, 0px));
  background: var(--membership-background);
  overscroll-behavior-y: contain;
}
.screen.share-poster-screen { --membership-background: #232634; }
.membership-screen .study-topbar {
  position: sticky;
  top: 0;
  z-index: 2;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  text-align: center;
  padding: calc(14px + env(safe-area-inset-top, 0px)) 0 14px;
  background: var(--membership-background);
}
.membership-screen .back-icon-btn { width: 44px; height: 44px; }
.membership-screen .study-topbar > button { min-height: 44px; white-space: nowrap; }
.invite-redeem-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; }
.invite-redeem-row input {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  padding: 10px 12px;
  border: 1.5px solid var(--border-light);
  border-radius: 12px;
  font-size: 16px;
  text-transform: uppercase;
}
.invite-redeem-row button { min-height: 44px; padding: 8px 14px; font-size: 14px; white-space: nowrap; }

/* 录音时保留原布局，避免松手落到临近的跳过按钮。 */
.shadow-skip-row { display: flex; justify-content: center; margin-top: 26px; }
.shadow-skip-row button { min-height: 44px; padding: 8px 16px; font-size: 13px; }
.juntango-mic-active .shadow-skip-row { visibility: hidden; pointer-events: none; }

.plan-search { box-sizing:border-box; width:100%; min-height:44px; padding:9px 14px; margin-bottom:10px; border:1px solid var(--border-light); border-radius:12px; background:var(--surface,white); color:var(--text-main); font:inherit; font-size:16px; }
.plan-subtabs button.plan-subtab { font-family:inherit; border:0; }
.example-original { min-width:0; font-size:18px; font-weight:700; line-height:1.65; overflow-wrap:anywhere; }
