:root {
  --bg: #f3f6fb;
  --surface: #ffffff;
  --surface-soft: #f8fafc;
  --border: #e2e8f0;
  --text: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-soft: #eff6ff;
  --accent: #0ea5e9;
  --amber: #d97706;
  --amber-bg: #fffbeb;
  --amber-border: #fde68a;
  --green: #059669;
  --green-bg: #ecfdf5;
  --red: #dc2626;
  --shadow: 0 2px 10px rgba(15, 23, 42, 0.05);
  --shadow-lg: 0 12px 32px rgba(15, 23, 42, 0.14);
  --radius: 16px;
  --radius-sm: 10px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

[data-theme="dark"] {
  --bg: #0b1220;
  --surface: #151e30;
  --surface-soft: #1d293e;
  --border: #27354f;
  --text: #f1f5f9;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  --primary: #3b82f6;
  --primary-dark: #2563eb;
  --primary-soft: rgba(59, 130, 246, 0.16);
  --accent: #38bdf8;
  --amber: #fbbf24;
  --amber-bg: rgba(245, 158, 11, 0.12);
  --amber-border: rgba(245, 158, 11, 0.3);
  --green: #34d399;
  --green-bg: rgba(16, 185, 129, 0.14);
  --red: #f87171;
  --shadow: 0 2px 12px rgba(0, 0, 0, 0.28);
  --shadow-lg: 0 14px 36px rgba(0, 0, 0, 0.5);
}

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

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.5;
  height: 100%;
  overflow: hidden;
}

.hidden {
  display: none !important;
}

.app-shell {
  max-width: 540px;
  margin: 0 auto;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  position: relative;
  box-shadow: 0 0 40px rgba(15, 23, 42, 0.08);
}

/* ==================== 顶部栏 ==================== */
.top-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px 10px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

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

.brand-logo {
  width: 36px;
  height: 36px;
  border-radius: 11px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  font-weight: 800;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  letter-spacing: -0.5px;
  box-shadow: 0 3px 8px rgba(37, 99, 235, 0.28);
}

.brand-text h1 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.2;
}

.brand-text p {
  margin: 2px 0 0;
  font-size: 11px;
  color: var(--text-muted);
}

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

.icon-pill-btn {
  border: 1px solid var(--amber-border);
  background: var(--amber-bg);
  color: var(--amber);
  font-size: 12px;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: 999px;
  cursor: pointer;
}

.icon-circle-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface-soft);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.icon {
  width: 18px;
  height: 18px;
}

/* ==================== 全局语音与显示控制条 ==================== */
.control-strip {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 8px 12px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  flex-shrink: 0;
}

.speed-group {
  display: flex;
  align-items: center;
  gap: 5px;
  overflow-x: auto;
  scrollbar-width: none;
}

.speed-group::-webkit-scrollbar {
  display: none;
}

.strip-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  margin-right: 2px;
  white-space: nowrap;
}

.speed-btn {
  border: 1px solid var(--border);
  background: var(--surface-soft);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
  padding: 4px 9px;
  border-radius: 8px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}

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

.toggle-group {
  display: flex;
  align-items: center;
  gap: 6px;
}

.mini-toggle {
  flex: 1;
  border: 1px solid var(--border);
  background: var(--surface-soft);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
  padding: 5px 8px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.mini-toggle.active {
  background: var(--primary-soft);
  border-color: var(--primary);
  color: var(--primary);
}

/* ==================== 主滚动内容区 ==================== */
.main-content {
  flex: 1;
  overflow-y: auto;
  padding: 12px 12px 24px;
  -webkit-overflow-scrolling: touch;
}

.tab-view {
  display: none;
}

.tab-view.active {
  display: block;
}

/* 三大场景主分类 */
.category-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 10px;
}

.cat-tab {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 14px;
  padding: 10px 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  cursor: pointer;
  color: var(--text-secondary);
  transition: all 0.18s ease;
  box-shadow: var(--shadow);
}

.cat-tab.active {
  border-color: var(--primary);
  background: var(--primary-soft);
  color: var(--primary);
}

.cat-emoji {
  font-size: 20px;
  line-height: 1;
}

.cat-name {
  font-size: 13px;
  font-weight: 700;
}

/* 搜索与操作栏 */
.filter-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.search-box {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: 11px;
  width: 16px;
  height: 16px;
  color: var(--text-muted);
  pointer-events: none;
}

.search-box input {
  width: 100%;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  border-radius: 12px;
  padding: 9px 30px 9px 34px;
  font-size: 14px;
  outline: none;
}

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

.clear-btn {
  position: absolute;
  right: 8px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 14px;
  padding: 4px;
  cursor: pointer;
}

.play-all-btn, .flashcard-btn {
  border: none;
  background: var(--primary);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  padding: 9px 12px;
  border-radius: 12px;
  cursor: pointer;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 4px;
  box-shadow: 0 3px 10px rgba(37, 99, 235, 0.25);
}

.play-all-btn.playing {
  background: var(--red);
}

.flashcard-btn {
  background: linear-gradient(135deg, #f59e0b, #ea580c);
  box-shadow: 0 3px 10px rgba(234, 88, 12, 0.25);
}

/* 子场景滚动标签 */
.subscene-chips {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 4px;
  margin-bottom: 8px;
  scrollbar-width: none;
}

.subscene-chips::-webkit-scrollbar {
  display: none;
}

.sub-chip {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
}

.sub-chip.active {
  background: var(--text);
  border-color: var(--text);
  color: var(--surface);
}

.list-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 8px;
  padding: 0 2px;
}

/* ==================== 句子卡片 ==================== */
.card-list {
  display: flex;
  flex-direction: column;
  gap: 11px;
}

.sentence-card {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 13px 14px;
  box-shadow: var(--shadow);
  transition: border-color 0.2s ease, transform 0.12s ease;
}

.sentence-card.speaking {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
}

.sentence-card.mastered {
  opacity: 0.85;
}

.card-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 8px;
}

.card-badges {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}

.scene-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 6px;
  background: var(--primary-soft);
  color: var(--primary);
}

.user-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 6px;
  background: var(--green-bg);
  color: var(--green);
}

.card-tools {
  display: flex;
  align-items: center;
  gap: 4px;
}

.tool-btn {
  border: 1px solid transparent;
  background: var(--surface-soft);
  color: var(--text-muted);
  font-size: 12px;
  padding: 4px 7px;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

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

.tool-btn.active-fav {
  color: #f59e0b;
  background: var(--amber-bg);
}

.tool-btn.active-done {
  color: var(--green);
  background: var(--green-bg);
}

.tool-btn.danger:hover {
  color: var(--red);
}

/* 可点击朗读主区域 */
.speak-tap-area {
  cursor: pointer;
  border-radius: 10px;
  padding: 4px 2px;
  user-select: text;
}

.speak-tap-area:active {
  background: var(--surface-soft);
}

.en-row {
  display: flex;
  align-items: flex-start;
  gap: 9px;
}

.speaker-pill {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  margin-top: 2px;
  border-radius: 50%;
  background: var(--primary-soft);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
}

.sentence-card.speaking .speaker-pill {
  background: var(--primary);
  color: #fff;
  animation: pulse-ring 1.1s infinite;
}

@keyframes pulse-ring {
  0% { box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.45); }
  70% { box-shadow: 0 0 0 8px rgba(37, 99, 235, 0); }
  100% { box-shadow: 0 0 0 0 rgba(37, 99, 235, 0); }
}

.en-text {
  font-size: 17px;
  font-weight: 650;
  color: var(--text);
  line-height: 1.5;
  word-break: break-word;
}

/* 连读符号可视化 */
.link-arc {
  display: inline-block;
  color: var(--amber);
  font-weight: 900;
  font-size: 18px;
  margin: 0 -1px;
  transform: translateY(2px);
}

.elided-sound {
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.9em;
  text-decoration: underline dotted var(--amber);
  opacity: 0.72;
}

.ipa-line {
  margin: 6px 0 0 41px;
  font-family: "Segoe UI", "DejaVu Sans", "Lucida Sans Unicode", sans-serif;
  font-size: 13px;
  color: var(--primary);
  opacity: 0.88;
  word-break: break-word;
}

.zh-line {
  margin: 6px 0 0 41px;
  font-size: 14.5px;
  color: var(--text-secondary);
  line-height: 1.45;
}

.masked-blur {
  filter: blur(5px);
  transition: filter 0.2s ease;
  cursor: pointer;
}

.masked-blur.revealed {
  filter: none;
}

.liaison-tip-box {
  margin: 8px 0 0;
  padding: 7px 10px;
  border-radius: 10px;
  background: var(--amber-bg);
  border: 1px solid var(--amber-border);
  font-size: 12.5px;
  color: var(--text-secondary);
  line-height: 1.45;
}

.liaison-tip-box strong {
  color: var(--amber);
}

/* 卡片底部关键词快捷条 */
.card-footer {
  margin-top: 9px;
  padding-top: 8px;
  border-top: 1px dashed var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  flex-wrap: wrap;
}

.keyword-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  flex: 1;
}

.kw-chip {
  border: 1px solid var(--border);
  background: var(--surface-soft);
  color: var(--text-secondary);
  font-size: 11.5px;
  padding: 3px 8px;
  border-radius: 999px;
  cursor: pointer;
}

.kw-chip:active {
  border-color: var(--primary);
  color: var(--primary);
}

.lookup-trigger-btn {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--primary);
  font-size: 11.5px;
  font-weight: 600;
  padding: 4px 9px;
  border-radius: 8px;
  cursor: pointer;
  white-space: nowrap;
}

/* ==================== 翻译与添加页 ==================== */
.segment-control {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 4px;
  margin-bottom: 12px;
}

.seg-btn {
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 700;
  padding: 9px 6px;
  border-radius: 10px;
  cursor: pointer;
}

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

.composer-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  box-shadow: var(--shadow);
  margin-bottom: 12px;
}

.field-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.composer-card textarea,
.composer-card input[type="text"],
.manual-form input,
.manual-form textarea,
.manual-form select,
.setting-section input,
.full-select {
  width: 100%;
  border: 1.5px solid var(--border);
  background: var(--surface-soft);
  color: var(--text);
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 14.5px;
  font-family: inherit;
  outline: none;
}

.composer-card textarea:focus,
.composer-card input:focus,
.manual-form input:focus,
.manual-form textarea:focus {
  border-color: var(--primary);
}

.composer-options {
  margin-top: 10px;
}

.chip-select-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.small-label {
  font-size: 12px;
  color: var(--text-muted);
}

.choice-chip {
  border: 1px solid var(--border);
  background: var(--surface-soft);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  cursor: pointer;
}

.choice-chip.active {
  border-color: var(--primary);
  background: var(--primary-soft);
  color: var(--primary);
}

.composer-actions {
  margin-top: 12px;
}

.primary-btn {
  border: none;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  font-size: 14.5px;
  font-weight: 700;
  padding: 11px 16px;
  border-radius: 12px;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.28);
}

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

.secondary-primary-btn {
  border: none;
  background: var(--text);
  color: var(--surface);
  font-size: 14px;
  font-weight: 700;
  padding: 11px 16px;
  border-radius: 12px;
  cursor: pointer;
}

.outline-btn {
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  padding: 9px 13px;
  border-radius: 10px;
  cursor: pointer;
}

.full-btn {
  width: 100%;
}

.ai-result-area {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 12px;
}

.ai-option-card {
  background: var(--surface);
  border: 1.5px solid var(--primary);
  border-radius: var(--radius);
  padding: 13px 14px;
  box-shadow: var(--shadow);
}

.ai-option-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.ai-tag {
  font-size: 12px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 8px;
  background: var(--primary-soft);
  color: var(--primary);
}

.ai-option-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.ai-option-actions button {
  flex: 1;
}

.manual-details {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
}

.manual-details summary {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
}

.manual-form {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.form-row label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

/* ==================== 统计条与单词卡片 ==================== */
.stats-banner {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 10px;
}

.stat-pill {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 13px;
  padding: 9px 6px;
  text-align: center;
  box-shadow: var(--shadow);
}

.stat-pill strong {
  display: block;
  font-size: 18px;
  color: var(--primary);
  line-height: 1.1;
}

.stat-pill span {
  font-size: 11px;
  color: var(--text-muted);
}

.word-card {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 13px 14px;
  box-shadow: var(--shadow);
}

.word-card.speaking {
  border-color: var(--primary);
}

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

.word-title-wrap {
  cursor: pointer;
  flex: 1;
}

.word-main {
  font-size: 20px;
  font-weight: 800;
  color: var(--text);
}

.word-meta {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 2px;
  flex-wrap: wrap;
}

.pos-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 5px;
  background: var(--primary-soft);
  color: var(--primary);
}

.word-ipa {
  font-size: 13px;
  color: var(--primary);
}

.word-zh {
  margin-top: 7px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}

.word-tip {
  margin-top: 6px;
  font-size: 12.5px;
  color: var(--text-secondary);
  background: var(--surface-soft);
  padding: 7px 9px;
  border-radius: 9px;
}

.word-example {
  margin-top: 8px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface-soft);
  cursor: pointer;
}

.word-example-en {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.word-example-zh {
  font-size: 12.5px;
  color: var(--text-secondary);
  margin-top: 2px;
}

/* ==================== 底部导航 ==================== */
.bottom-nav {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 6px 6px calc(6px + var(--safe-bottom));
  flex-shrink: 0;
}

.nav-item {
  border: none;
  background: transparent;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 4px 2px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
}

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

.nav-icon {
  width: 22px;
  height: 22px;
}

.nav-add-circle {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 3px 10px rgba(37, 99, 235, 0.32);
}

.nav-add-circle .nav-icon {
  width: 17px;
  height: 17px;
}

/* ==================== 底部抽屉弹窗 ==================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.56);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  z-index: 100;
  backdrop-filter: blur(2px);
}

.bottom-sheet {
  width: 100%;
  max-width: 540px;
  max-height: 82dvh;
  background: var(--surface);
  border-radius: 22px 22px 0 0;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.tall-sheet {
  max-height: 88dvh;
}

.sheet-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}

.sheet-header h3 {
  margin: 0;
  font-size: 16px;
}

.sheet-close {
  border: none;
  background: var(--surface-soft);
  color: var(--text-secondary);
  width: 30px;
  height: 30px;
  border-radius: 50%;
  font-size: 15px;
  cursor: pointer;
}

.sheet-body {
  padding: 14px 16px calc(20px + var(--safe-bottom));
  overflow-y: auto;
}

.sheet-desc {
  margin: 0 0 10px;
  font-size: 13px;
  color: var(--text-muted);
}

.word-token-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.token-btn {
  border: 1.5px solid var(--border);
  background: var(--surface-soft);
  color: var(--text);
  font-size: 15px;
  font-weight: 600;
  padding: 7px 12px;
  border-radius: 10px;
  cursor: pointer;
}

.token-btn.active {
  border-color: var(--primary);
  background: var(--primary-soft);
  color: var(--primary);
}

.lookup-result-box {
  border: 1.5px solid var(--primary);
  background: var(--surface-soft);
  border-radius: 14px;
  padding: 13px;
}

/* 连读宝典卡片 */
.guide-card {
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px;
  margin-bottom: 10px;
}

.guide-card h4 {
  margin: 0 0 5px;
  font-size: 14.5px;
  color: var(--primary);
}

.guide-card p {
  margin: 0 0 9px;
  font-size: 13px;
  color: var(--text-secondary);
}

.guide-ex-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.guide-ex-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  cursor: pointer;
}

/* 闪卡速刷 */
.flashcard-box {
  background: var(--surface-soft);
  border: 1.5px solid var(--border);
  border-radius: 18px;
  padding: 26px 18px;
  text-align: center;
  min-height: 220px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  margin-bottom: 14px;
}

.flashcard-word {
  font-size: 28px;
  font-weight: 800;
  margin-bottom: 6px;
}

.flashcard-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

/* 设置页 */
.setting-section {
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 13px;
  margin-bottom: 12px;
}

.setting-section.highlight-box {
  background: var(--primary-soft);
  border-color: var(--primary);
}

.setting-section h4 {
  margin: 0 0 8px;
  font-size: 14.5px;
}

.setting-hint {
  margin: 4px 0 8px;
  font-size: 12.5px;
  color: var(--text-secondary);
}

.lan-url-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 8px 0;
}

.lan-url-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 10px;
  font-family: monospace;
  font-size: 14px;
  font-weight: 700;
  color: var(--primary);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.inline-btn-row {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  flex-wrap: wrap;
}

/* 空状态 */
.empty-state {
  text-align: center;
  padding: 40px 18px;
  color: var(--text-muted);
}

.empty-state .empty-icon {
  font-size: 38px;
  margin-bottom: 8px;
}

/* Toast */
.toast {
  position: fixed;
  left: 50%;
  bottom: 82px;
  transform: translateX(-50%);
  background: rgba(15, 23, 42, 0.92);
  color: #fff;
  padding: 9px 16px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  z-index: 200;
  max-width: 88vw;
  text-align: center;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

.loading-box {
  text-align: center;
  padding: 20px;
  color: var(--primary);
  font-size: 13.5px;
  font-weight: 600;
}

/* 云端访问口令解锁层 */
.auth-overlay {
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.auth-card {
  width: 100%;
  max-width: 360px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 26px 22px;
  text-align: center;
  box-shadow: var(--shadow-lg);
}

.auth-card h3 {
  margin: 0 0 6px;
  font-size: 19px;
}

