/* ==========================================================
   口语搭子 · 全局视觉
   iOS 深色中性面 + 系统紫强调 / 玻璃拟态 / 手机优先 / 尊重 prefers-reduced-motion
   ========================================================== */

:root {
  /* 采用 iOS 深色模式的中性色面 + 单一系统紫强调色，降低装饰性渐变 */
  --gold: #BF5AF2;            /* 兼容旧变量名，值改为系统紫 */
  --gold-2: #9B51E0;
  --violet: #C97BB8;
  --violet-2: #8E5BC0;
  --accent: #BF5AF2;

  --bg-0: #0B0B0F;
  --bg-1: #000000;
  --ink: #1D1D1F;
  --ink-soft: #6E6E73;
  --paper: #FFFFFF;

  --glass-bg: rgba(28, 28, 30, 0.64);
  --glass-border: rgba(255, 255, 255, 0.13);
  --glass-blur: blur(20px) saturate(160%);

  --r-lg: 20px;
  --r-md: 14px;
  --shadow-lg: 0 20px 48px -28px rgba(0, 0, 0, 0.9);
  --shadow-gold: 0 18px 40px -24px rgba(191, 90, 242, 0.45);

  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Songti SC", serif;

  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg-0);
  color: #fff;
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

button {
  font-family: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

input, textarea, select { font-family: inherit; }
h1, h2, h3, h4, p, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
q { quotes: "“" "”" "‘" "’"; }
img { display: block; }

/* ---------- 应用外壳 ---------- */

.app-shell {
  min-height: 100vh;
  min-height: 100dvh;
  width: 100%;
  display: flex;
  justify-content: center;
  background:
    radial-gradient(120% 90% at 20% -10%, #1C1C1E 0%, #0B0B0F 62%, #000000 100%);
}

.route {
  position: relative;
  width: 100%;
  max-width: 480px;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg-0);
}

@media (min-width: 520px) {
  .route {
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.06), 0 40px 120px rgba(0, 0, 0, 0.6);
  }
}

.page {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

/* ---------- 通用组件 ---------- */

.glass {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--r-lg);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  box-shadow: var(--shadow-lg), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.glass-btn {
  position: relative;
  padding: 14px 34px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: #111114;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.9);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  backdrop-filter: blur(24px) saturate(180%);
  box-shadow: 0 16px 40px -22px rgba(0, 0, 0, 0.85), inset 0 1px 0 rgba(255, 255, 255, 0.75);
  transition: transform 0.3s cubic-bezier(0.2, 0.7, 0.2, 1), background 0.3s;
}

.glass-btn:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.9);
}

.glass-btn:active { transform: translateY(0) scale(0.99); }

.primary-btn {
  width: 100%;
  padding: 14px 18px;
  border-radius: 14px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: #fff;
  background: linear-gradient(160deg, #C77DFF, #9B51E0);
  box-shadow: 0 14px 26px -18px rgba(191, 90, 242, 0.9);
  transition: transform 0.2s, filter 0.2s;
}

.primary-btn:hover { filter: brightness(1.05); }
.primary-btn:active { transform: translateY(1px); }
.primary-btn:disabled { opacity: 0.45; cursor: not-allowed; }

.ghost-btn {
  width: 100%;
  padding: 13px 18px;
  border-radius: 14px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.05);
}

.icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.07);
  flex-shrink: 0;
}

.icon-btn:hover { background: rgba(255, 255, 255, 0.13); }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 11px;
  border-radius: 999px;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.06);
}

.chip.is-active {
  color: #3a2350;
  background: linear-gradient(150deg, var(--gold), var(--gold-2));
  border-color: transparent;
  font-weight: 700;
}

.tag {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 6px;
  font-size: 10px;
  letter-spacing: 0.03em;
  text-transform: lowercase;
  color: #7a4a16;
  background: rgba(255, 216, 107, 0.28);
  border: 1px solid rgba(242, 160, 61, 0.4);
  white-space: nowrap;
}

.tag.violet {
  color: #5e2f75;
  background: rgba(201, 123, 184, 0.2);
  border-color: rgba(201, 123, 184, 0.45);
}

.eyebrow {
  font-size: 10px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
}

.fade-in {
  animation: fadeUp 0.72s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}

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

/* ---------- 背景场景 ---------- */

.scene {
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: 0;
  background: linear-gradient(160deg, #4a2f5f, #241631 60%, #160d1f);
}

.scene img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1.4s ease;
}

.scene img.is-on { opacity: 1; }

.kenburns {
  animation: kenburns 26s ease-in-out infinite;
  transform-origin: 55% 45%;
}

@keyframes kenburns {
  0% { transform: scale(1.04) translate3d(0, 0, 0); }
  50% { transform: scale(1.14) translate3d(-1.6%, -1.2%, 0); }
  100% { transform: scale(1.04) translate3d(0, 0, 0); }
}

.veil {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

/* 启动页遮罩：减淡处理，保留朝霞天空的清爽感，仅保证文字可读 */
.veil-welcome {
  background:
    linear-gradient(180deg, rgba(18, 9, 26, 0.26) 0%, rgba(18, 9, 26, 0.1) 38%, rgba(18, 9, 26, 0.55) 100%),
    radial-gradient(80% 50% at 50% 72%, rgba(142, 91, 192, 0.16), transparent 70%);
}

/* 主页/记录/词库遮罩：金-金橙-淡紫-紫 */
.veil-theme {
  background:
    linear-gradient(160deg, rgba(255, 216, 107, 0.34) 0%, rgba(242, 160, 61, 0.26) 26%, rgba(201, 123, 184, 0.3) 60%, rgba(142, 91, 192, 0.55) 100%),
    linear-gradient(180deg, rgba(24, 12, 32, 0.34) 0%, rgba(24, 12, 32, 0.58) 55%, rgba(20, 10, 28, 0.88) 100%);
}

/* 内容页需要更克制的遮罩，保证卡片可读 */
.veil-soft {
  background:
    linear-gradient(165deg, rgba(255, 216, 107, 0.18), rgba(201, 123, 184, 0.22) 45%, rgba(142, 91, 192, 0.4)),
    linear-gradient(180deg, rgba(22, 11, 30, 0.55), rgba(20, 10, 28, 0.9));
}

/* ---------- 启动欢迎页 ---------- */

.welcome {
  justify-content: center;
  padding: 0 22px calc(30px + var(--safe-b));
}

.welcome-inner {
  position: relative;
  z-index: 2;
  text-align: center;
}

.welcome-inner h1 {
  margin: 12px 0 10px;
  font-family: var(--font-sans);
  font-size: 38px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: #fff;
  text-shadow: 0 6px 30px rgba(0, 0, 0, 0.45);
}

.welcome-inner .sub {
  font-size: 13px;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.72);
  margin-bottom: 34px;
}

.welcome-inner .micro {
  margin-top: 22px;
  font-size: 10.5px;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.42);
}

/* ---------- 主功能主页 ---------- */

.home {
  justify-content: space-between;
  padding: calc(16px + var(--safe-t)) 20px calc(18px + var(--safe-b));
}

/* 只抬升内容层，背景图与遮罩保持绝对定位 */
.home > :not(.scene):not(.veil) { position: relative; z-index: 2; }

/* 功能页遮罩：只压暗上下两端，中间保留照片与大面积留白 */
.veil-home {
  background:
    linear-gradient(180deg, rgba(5, 5, 7, 0.2) 0%, rgba(5, 5, 7, 0.03) 30%, rgba(5, 5, 7, 0.4) 100%);
}

.home-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

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

.home-back {
  width: 36px;
  height: 36px;
  border-radius: 11px;
  background: rgba(20, 20, 22, 0.42);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}

.brand {
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: rgba(255, 255, 255, 0.92);
}

.date-chip {
  font-size: 11px;
  letter-spacing: 0.02em;
  color: rgba(255, 255, 255, 0.78);
  padding: 6px 11px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(20, 20, 22, 0.34);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.home-main {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 26px;
}

.home-copy {
  padding: 0 2px;
  text-align: left;
}

.home-copy .eyebrow {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.52);
}

.home-copy h2 {
  margin-top: 8px;
  font-family: var(--font-sans);
  font-size: 28px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: #fff;
}

/* 三个功能：整屏中间的单列 */
.entry-stack {
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 11px;
}

.entry-card {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 15px 15px;
  text-align: left;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(24, 24, 26, 0.52);
  -webkit-backdrop-filter: blur(22px) saturate(160%);
  backdrop-filter: blur(22px) saturate(160%);
  box-shadow: 0 18px 44px -30px rgba(0, 0, 0, 0.9);
  transition: transform 0.24s cubic-bezier(0.2, 0.7, 0.2, 1), background 0.24s, border-color 0.24s;
}

.entry-card:hover {
  transform: translateY(-1px);
  background: rgba(38, 38, 42, 0.66);
  border-color: rgba(255, 255, 255, 0.28);
}

.entry-card:active { transform: scale(0.985); }

.entry-icon {
  width: 42px;
  height: 42px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(160deg, #C77DFF, #8E5BC0);
  box-shadow: 0 8px 20px -12px rgba(191, 90, 242, 0.9);
  flex-shrink: 0;
}

.entry-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.entry-title {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: #fff;
}

.entry-sub {
  font-size: 12px;
  color: rgba(235, 235, 245, 0.55);
  letter-spacing: 0;
}

.entry-chevron {
  color: rgba(235, 235, 245, 0.32);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.home-foot {
  text-align: center;
  font-size: 10px;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.34);
}

/* ---------- 每日口语 ---------- */

.chat-page {
  height: 100vh;
  height: 100dvh;
  min-height: 100dvh;
  background: #0B0B0F;
  overflow: hidden;
}

.chat-head {
  position: relative;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: calc(10px + var(--safe-t)) 14px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(11, 11, 15, 0.76);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  backdrop-filter: blur(20px) saturate(160%);
}

.chat-title {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 7px;
}

.chat-title h1 {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.mode-badge {
  font-size: 9.5px;
  padding: 2px 6px;
  border-radius: 999px;
  color: #E5C7FF;
  border: 1px solid rgba(191, 90, 242, 0.4);
  background: rgba(191, 90, 242, 0.14);
  white-space: nowrap;
}

.end-btn {
  font-size: 11.5px;
  padding: 7px 11px;
  border-radius: 999px;
  color: #ffe1ec;
  border: 1px solid rgba(255, 169, 202, 0.38);
  background: rgba(255, 120, 170, 0.12);
  flex-shrink: 0;
  white-space: nowrap;
}

.end-btn:hover { background: rgba(255, 120, 170, 0.2); }

/* 语音设置条 */
.tts-bar {
  position: relative;
  z-index: 4;
  padding: 8px 14px 0;
  flex-shrink: 0;
}

.tts-bar-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.tts-panel {
  margin-top: 9px;
  padding: 12px 13px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(28, 28, 30, 0.82);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
}

.tts-field {
  display: grid;
  grid-template-columns: 52px 1fr auto;
  align-items: center;
  gap: 10px;
  margin-bottom: 9px;
}

.tts-field:last-of-type { margin-bottom: 0; }

.tts-field label {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.62);
}

.tts-field output {
  font-size: 11px;
  color: var(--gold);
  min-width: 26px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.tts-field select {
  width: 100%;
  padding: 6px 8px;
  border-radius: 8px;
  font-size: 11.5px;
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  outline: none;
}

.tts-field select option { color: #2b1b33; }

input[type="range"] {
  width: 100%;
  height: 20px;
  accent-color: var(--gold);
  background: transparent;
}

/* 消息流 */
.messages {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 16px 14px 26px;
  display: flex;
  flex-direction: column;
  gap: 13px;
  scroll-behavior: smooth;
}

.msg {
  display: flex;
  flex-direction: column;
  max-width: 89%;
  animation: fadeUp 0.4s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.msg.ai { align-self: flex-start; align-items: flex-start; }
.msg.user { align-self: flex-end; align-items: flex-end; }

.bubble {
  position: relative;
  padding: 11px 14px;
  border-radius: var(--r-lg);
  font-size: 14.5px;
  line-height: 1.6;
  word-break: break-word;
  white-space: pre-wrap;
}

.msg.ai .bubble {
  background: rgba(255, 252, 245, 0.95);
  color: #2b2033;
  border-top-left-radius: 5px;
  box-shadow: 0 12px 26px -20px rgba(0, 0, 0, 0.8);
  font-family: var(--font-sans);
  font-size: 14.5px;
}

.msg.user .bubble {
  background: linear-gradient(150deg, #b87acf, #8e5bc0);
  color: #fff;
  border-top-right-radius: 5px;
  box-shadow: 0 12px 26px -18px rgba(142, 91, 192, 0.95);
}

.msg-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 5px;
  padding: 0 3px;
  font-size: 10px;
  color: rgba(255, 255, 255, 0.42);
}

.msg.ai .msg-meta { color: rgba(255, 255, 255, 0.5); }

.mini-play {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10.5px;
  padding: 3px 8px;
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.06);
}

.mini-play:hover { color: var(--gold); border-color: rgba(255, 216, 107, 0.45); }

/* TTS 逐词高亮 */
.w { transition: background-color 0.12s, color 0.12s; border-radius: 3px; }
.w.is-speaking {
  background: rgba(242, 160, 61, 0.34);
  box-shadow: 0 0 0 1px rgba(242, 160, 61, 0.25);
  color: #2b2033;
}

.ai-thinking {
  display: inline-flex;
  gap: 4px;
  padding: 4px 2px;
}

.ai-thinking i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #b9a6c7;
  animation: blink 1.2s infinite;
}

.ai-thinking i:nth-child(2) { animation-delay: 0.15s; }
.ai-thinking i:nth-child(3) { animation-delay: 0.3s; }

@keyframes blink {
  0%, 60%, 100% { opacity: 0.3; transform: translateY(0); }
  30% { opacity: 1; transform: translateY(-2px); }
}

/* 校对确认卡 */
.proof-card {
  align-self: stretch;
  max-width: 100%;
  padding: 13px;
  border-radius: var(--r-lg);
  border: 1px solid rgba(255, 216, 107, 0.34);
  background: linear-gradient(160deg, rgba(255, 216, 107, 0.12), rgba(255, 255, 255, 0.05));
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  animation: fadeUp 0.4s both;
}

.proof-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 9px;
}

.proof-head h3 {
  font-size: 13px;
  font-weight: 600;
  color: var(--gold);
  letter-spacing: 0.03em;
}

.raw-block {
  padding: 9px 11px;
  border-radius: var(--r-md);
  border: 1px dashed rgba(255, 255, 255, 0.26);
  background: rgba(18, 9, 26, 0.42);
  margin-bottom: 10px;
}

.raw-block .raw-label {
  font-size: 10px;
  letter-spacing: 0.05em;
  color: rgba(255, 216, 107, 0.8);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 5px;
}

.raw-text {
  font-size: 13.5px;
  line-height: 1.55;
  color: rgba(255, 245, 218, 0.92);
  white-space: pre-wrap;
  word-break: break-word;
}

.proof-label {
  display: block;
  font-size: 10.5px;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 5px;
}

.proof-input {
  width: 100%;
  min-height: 74px;
  max-height: 180px;
  resize: vertical;
  padding: 10px 11px;
  border-radius: var(--r-md);
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 14px;
  line-height: 1.5;
  outline: none;
}

.proof-input:focus { border-color: rgba(255, 216, 107, 0.6); }

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

.proof-actions .ghost-btn { width: auto; flex: 0 0 auto; padding: 11px 13px; font-size: 12px; }
.proof-actions .primary-btn { flex: 1; padding: 11px 14px; font-size: 13.5px; }

.proof-tip {
  margin-top: 8px;
  font-size: 10.5px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.46);
}

/* 对话内每轮纠错反馈卡（深色） */
.feedback-card {
  align-self: flex-start;
  max-width: 92%;
  padding: 12px 13px;
  border-radius: var(--r-lg);
  border-top-left-radius: 5px;
  border: 1px solid rgba(255, 216, 107, 0.22);
  background: linear-gradient(160deg, rgba(255, 216, 107, 0.07), rgba(28, 28, 30, 0.82));
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  box-shadow: 0 10px 24px -18px rgba(0, 0, 0, 0.7);
  animation: fadeUp 0.4s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.feedback-card .fb-head {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 8px;
}

.feedback-card .fb-head h4 {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: rgba(255, 216, 107, 0.92);
}

.fb-corr {
  padding: 7px 0;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.12);
}

.fb-corr:last-of-type { border-bottom: 0; }

.fb-corr-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 7px;
  font-size: 13px;
  line-height: 1.5;
}

.fb-from {
  color: #ff9eb1;
  text-decoration: line-through;
  text-decoration-color: rgba(255, 158, 177, 0.5);
  font-family: var(--font-serif);
}

.fb-arrow { color: rgba(255, 216, 107, 0.7); font-size: 11px; }

.fb-to {
  color: #9be7c4;
  font-weight: 600;
  font-family: var(--font-serif);
}

.fb-zh {
  margin-top: 3px;
  font-size: 11px;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.55);
}

.fb-empty {
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.6);
  padding: 4px 0;
}

.fb-revised-label {
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 216, 107, 0.7);
  margin: 11px 0 5px;
}

.fb-revised {
  font-family: var(--font-serif);
  font-size: 13.5px;
  line-height: 1.75;
  color: rgba(255, 245, 225, 0.94);
  padding: 10px 12px;
  border-radius: var(--r-md);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 216, 107, 0.16);
  white-space: pre-wrap;
  word-break: break-word;
  cursor: pointer;
}

.fb-revised strong {
  color: #e0aaff;
  font-weight: 700;
  background: linear-gradient(180deg, transparent 60%, rgba(201, 123, 184, 0.3) 60%);
}

/* 输入区 */
.composer {
  position: relative;
  z-index: 5;
  flex-shrink: 0;
  padding: 10px 14px calc(10px + var(--safe-b));
  background: linear-gradient(180deg, rgba(11, 11, 15, 0), rgba(11, 11, 15, 0.96) 34%);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  transition: opacity 0.25s;
}

.composer.is-locked { opacity: 0.5; pointer-events: none; }

.composer-row {
  display: flex;
  align-items: flex-end;
  gap: 8px;
}

.composer textarea {
  flex: 1;
  min-height: 44px;
  max-height: 118px;
  resize: none;
  padding: 11px 12px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(28, 28, 30, 0.9);
  color: #fff;
  font-size: 15px;
  line-height: 1.45;
  outline: none;
}

.composer textarea::placeholder { color: rgba(255, 255, 255, 0.36); }
.composer textarea:focus { border-color: rgba(191, 90, 242, 0.6); }

.mic-btn {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: #E5C7FF;
  border: 1px solid rgba(191, 90, 242, 0.4);
  background: rgba(191, 90, 242, 0.14);
  flex-shrink: 0;
  transition: background 0.2s, color 0.2s, transform 0.2s;
}

.mic-btn.is-recording {
  color: #fff;
  background: #e2618f;
  border-color: transparent;
  animation: micPulse 1.3s ease-in-out infinite;
}

@keyframes micPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(226, 97, 143, 0.45); }
  50% { box-shadow: 0 0 0 10px rgba(226, 97, 143, 0); }
}

.send-btn {
  height: 44px;
  padding: 0 15px;
  border-radius: 14px;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(160deg, #C77DFF, #9B51E0);
  flex-shrink: 0;
  box-shadow: 0 10px 22px -14px rgba(191, 90, 242, 0.9);
}

.composer-note {
  margin: 7px 2px 0;
  font-size: 10.5px;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.44);
}

.composer-note strong { color: #D9B3FF; font-weight: 500; }

/* ---------- 复盘长页（纸质阅读面板） ---------- */

.review-overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  justify-content: center;
  background: rgba(14, 7, 20, 0.66);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  animation: fadeIn 0.3s both;
}

.review-panel {
  width: 100%;
  max-width: 520px;
  height: 100%;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  color: var(--ink);
  animation: slideUp 0.45s cubic-bezier(0.2, 0.75, 0.2, 1) both;
}

@keyframes slideUp {
  from { transform: translateY(26px); opacity: 0; }
  to { transform: none; opacity: 1; }
}

.review-head {
  flex-shrink: 0;
  padding: calc(18px + var(--safe-t)) 20px 14px;
  border-bottom: 1px solid rgba(142, 91, 192, 0.16);
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  background: linear-gradient(180deg, #fffdf8, var(--paper));
}

.review-head .eyebrow { color: #b08a4a; }

.review-head h2 {
  font-family: var(--font-serif);
  font-size: 23px;
  font-weight: 500;
  letter-spacing: 0.03em;
  margin-top: 6px;
  color: #3a2350;
}

.review-meta {
  font-size: 11px;
  color: var(--ink-soft);
  padding-bottom: 3px;
  white-space: nowrap;
}

.review-scroll {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 16px 18px 28px;
}

.review-intro {
  font-size: 12.5px;
  line-height: 1.65;
  color: var(--ink-soft);
  padding: 11px 13px;
  border-radius: var(--r-md);
  background: rgba(255, 216, 107, 0.16);
  border: 1px solid rgba(242, 160, 61, 0.22);
  margin-bottom: 16px;
}

.round-block {
  border-radius: var(--r-lg);
  border: 1px solid rgba(142, 91, 192, 0.16);
  background: #fffdf9;
  margin-bottom: 14px;
  overflow: hidden;
  box-shadow: 0 10px 30px -26px rgba(44, 28, 54, 0.6);
}

.round-block > summary {
  list-style: none;
  cursor: pointer;
  padding: 13px 15px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: linear-gradient(150deg, rgba(255, 216, 107, 0.16), rgba(201, 123, 184, 0.1));
}

.round-block > summary::-webkit-details-marker { display: none; }

.round-summary-title {
  font-size: 13px;
  font-weight: 600;
  color: #4a2f63;
  letter-spacing: 0.02em;
}

.round-summary-hint {
  font-size: 10px;
  color: #9c85a8;
}

.round-body { padding: 4px 15px 15px; }

.sop-sec {
  padding: 14px 0 4px;
  border-top: 1px solid rgba(142, 91, 192, 0.12);
}

.sop-sec:first-child { border-top: 0; }

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

.sec-head h3 {
  font-family: var(--font-serif);
  font-size: 15px;
  font-weight: 600;
  color: #5a3672;
  letter-spacing: 0.02em;
}

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

.play-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  font-size: 10px;
  color: #7b5b93;
  border: 1px solid rgba(142, 91, 192, 0.28);
  border-radius: 999px;
  background: rgba(142, 91, 192, 0.06);
  white-space: nowrap;
}

.play-btn:hover { background: rgba(142, 91, 192, 0.14); }

.sub-label {
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #a98d56;
  margin: 11px 0 6px;
}

.weak-list li, .strength-list li {
  position: relative;
  font-size: 12.8px;
  line-height: 1.62;
  color: #40314a;
  padding: 5px 0 5px 14px;
}

.weak-list li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: #c08a3e;
}

.strength-list li::before {
  content: "+";
  position: absolute;
  left: 1px;
  color: #7c5aa0;
  font-weight: 700;
}

.weak-list q, .strength-list q {
  color: #2f1f3c;
  font-family: var(--font-serif);
  font-size: 13.6px;
}

.cefr-box {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-top: 11px;
  padding: 10px 12px;
  border-radius: var(--r-md);
  background: linear-gradient(150deg, rgba(142, 91, 192, 0.1), rgba(255, 216, 107, 0.13));
  border: 1px solid rgba(142, 91, 192, 0.18);
}

.cefr-level {
  font-family: var(--font-serif);
  font-size: 21px;
  font-weight: 600;
  color: #6f4690;
  line-height: 1;
  padding-top: 2px;
}

.cefr-box p {
  font-size: 12px;
  line-height: 1.6;
  color: #4d3a5a;
}

.history-note {
  margin-top: 9px;
  font-size: 11.5px;
  line-height: 1.6;
  color: #7a4a16;
  padding: 8px 10px;
  border-left: 2px solid var(--gold-2);
  background: rgba(255, 216, 107, 0.14);
  border-radius: 0 8px 8px 0;
}

.corr {
  padding: 9px 0 10px;
  border-bottom: 1px dashed rgba(142, 91, 192, 0.18);
}

.corr:last-of-type { border-bottom: 0; }

.corr-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px 7px;
  font-size: 13px;
  line-height: 1.55;
}

.corr-from {
  color: #8a3f4d;
  text-decoration: line-through;
  text-decoration-color: rgba(138, 63, 77, 0.5);
  font-family: var(--font-serif);
}

.corr-arrow { color: #b0955f; font-size: 11px; }

.corr-to {
  color: #2f6a53;
  font-weight: 600;
  font-family: var(--font-serif);
}

.corr-zh {
  margin-top: 3px;
  font-size: 11.8px;
  line-height: 1.6;
  color: #6f6379;
}

.dictation-note {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: var(--r-md);
  border: 1px dashed rgba(201, 123, 184, 0.55);
  background: rgba(201, 123, 184, 0.08);
}

.dictation-note h4 {
  font-size: 11px;
  letter-spacing: 0.06em;
  color: #8a4a79;
  margin-bottom: 5px;
}

.dictation-note p {
  font-size: 11.8px;
  line-height: 1.65;
  color: #5c4766;
  word-break: break-word;
}

.dictation-note .ok { color: #7d7087; }

.hint-caveat {
  margin-top: 6px;
  font-size: 10px;
  color: #a494ad;
}

.revised-text {
  font-family: var(--font-serif);
  font-size: 14.5px;
  line-height: 1.78;
  color: #33233f;
  padding: 11px 13px;
  border-radius: var(--r-md);
  background: rgba(255, 216, 107, 0.1);
  border: 1px solid rgba(242, 160, 61, 0.18);
  white-space: pre-wrap;
}

.revised-text strong {
  color: #7b3f96;
  font-weight: 700;
  background: linear-gradient(180deg, transparent 62%, rgba(201, 123, 184, 0.24) 62%);
}

.revised-block { position: relative; margin-bottom: 9px; }

.revised-play {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 5px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 10px;
  color: #7b5b93;
  border: 1px solid rgba(142, 91, 192, 0.26);
  background: rgba(142, 91, 192, 0.06);
}

.revised-play:hover { background: rgba(142, 91, 192, 0.14); }

.upgrade-list { margin-top: 10px; }
.upgrade-list li {
  font-size: 11.8px;
  line-height: 1.65;
  color: #5d4a68;
  padding: 3px 0 3px 13px;
  position: relative;
}

.upgrade-list li::before {
  content: "↗";
  position: absolute;
  left: 0;
  color: #c08a3e;
  font-size: 10px;
}

.qa-lead {
  font-family: var(--font-serif);
  font-size: 14px;
  line-height: 1.75;
  color: #33233f;
}

.qa-list { margin-top: 8px; }
.qa-list li {
  font-size: 12.8px;
  line-height: 1.65;
  color: #4a3a56;
  padding: 4px 0 4px 18px;
  position: relative;
}

.qa-list li::before {
  content: "?";
  position: absolute;
  left: 0;
  top: 4px;
  font-size: 11px;
  color: #8e5bc0;
  font-weight: 700;
}

.qa-list .reuse-flag {
  display: inline-block;
  margin-left: 5px;
  padding: 1px 6px;
  border-radius: 5px;
  font-size: 9px;
  color: #7c4a12;
  background: rgba(255, 216, 107, 0.3);
  border: 1px solid rgba(242, 160, 61, 0.35);
  vertical-align: 1px;
}

.card-list { display: grid; gap: 9px; }

.word-card {
  padding: 10px 12px;
  border-radius: var(--r-md);
  border: 1px solid rgba(142, 91, 192, 0.16);
  background: #fff;
}

.word-card-head {
  display: flex;
  align-items: baseline;
  gap: 7px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}

.word-term {
  font-family: var(--font-serif);
  font-size: 15px;
  font-weight: 600;
  color: #4c2c68;
}

.word-meaning { font-size: 11.5px; color: #8b7a96; }

.word-card p {
  font-size: 11.6px;
  line-height: 1.6;
  color: #5a4a64;
}

.word-card p + p { margin-top: 2px; }
.word-card .card-key { color: #a392a9; margin-right: 3px; }

.review-foot {
  flex-shrink: 0;
  padding: 12px 18px calc(14px + var(--safe-b));
  border-top: 1px solid rgba(142, 91, 192, 0.16);
  background: #fffdf8;
}

.review-foot .primary-btn { color: #fff; background: linear-gradient(150deg, #8e5bc0, #6e4298); }

/* ---------- 每日记录 ---------- */

.sub-page {
  padding: calc(14px + var(--safe-t)) 16px calc(26px + var(--safe-b));
}

/* 只抬升内容层，背景图与遮罩保持绝对定位 */
.sub-page > :not(.scene):not(.veil) { position: relative; z-index: 2; }

.sub-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.sub-head h1 {
  flex: 1;
  font-family: var(--font-sans);
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.sub-head .mini-action {
  font-size: 11.5px;
  padding: 7px 11px;
  border-radius: 999px;
  color: #E5C7FF;
  border: 1px solid rgba(191, 90, 242, 0.4);
  background: rgba(191, 90, 242, 0.12);
  white-space: nowrap;
}

.sub-head .mini-action:hover { background: rgba(191, 90, 242, 0.2); }

.calendar-card {
  padding: 14px 12px 15px;
  margin-bottom: 14px;
}

.cal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 4px 11px;
}

.cal-title {
  font-family: var(--font-sans);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.cal-nav {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  color: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.05);
}

.cal-week {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  padding: 0 2px 7px;
}

.cal-week span {
  text-align: center;
  font-size: 10px;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.45);
}

.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}

.cal-cell {
  position: relative;
  aspect-ratio: 1 / 1.12;
  border-radius: var(--r-md);
  border: 1px solid rgba(201, 123, 184, 0.28);
  background: linear-gradient(160deg, rgba(142, 91, 192, 0.2), rgba(142, 91, 192, 0.06));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  font-size: 14.5px;
  color: rgba(255, 255, 255, 0.86);
  transition: border-color 0.2s, background 0.2s, transform 0.2s;
}

.cal-cell:hover {
  border-color: rgba(255, 216, 107, 0.6);
  background: linear-gradient(160deg, rgba(255, 216, 107, 0.16), rgba(142, 91, 192, 0.12));
}

.cal-cell.is-out { opacity: 0.26; }

.cal-cell.is-today {
  border-color: var(--gold);
  box-shadow: 0 0 0 1px rgba(255, 216, 107, 0.55), 0 0 20px rgba(255, 216, 107, 0.22);
}

.cal-cell.has-session {
  background: linear-gradient(160deg, rgba(255, 216, 107, 0.22), rgba(201, 123, 184, 0.18));
  border-color: rgba(255, 216, 107, 0.5);
}

.cal-dur {
  font-size: 8.5px;
  letter-spacing: 0.02em;
  color: var(--gold);
  font-variant-numeric: tabular-nums;
}

.cal-dot {
  position: absolute;
  bottom: 6px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 6px rgba(255, 216, 107, 0.8);
}

.cal-legend {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 4px 0;
  font-size: 10px;
  color: rgba(255, 255, 255, 0.45);
}

.cal-legend i {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold);
  margin-right: 4px;
  vertical-align: 1px;
}

.cal-legend .ring {
  background: transparent;
  border: 1px solid var(--gold);
}

/* 日详情 */
.day-session {
  padding: 11px 12px;
  border-radius: var(--r-md);
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.05);
  margin-bottom: 9px;
}

.day-session-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.9);
}

.day-session-top .dur {
  color: var(--gold);
  font-size: 11.5px;
  font-variant-numeric: tabular-nums;
}

.day-session-sub {
  margin-top: 4px;
  font-size: 10.5px;
  color: rgba(255, 255, 255, 0.48);
  letter-spacing: 0.02em;
}

.day-group-title {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 15px 0 7px;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 216, 107, 0.8);
}

.count-pill {
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.7);
  background: rgba(255, 255, 255, 0.1);
}

.day-terms { display: flex; flex-wrap: wrap; gap: 6px; }

.day-term {
  font-size: 11.5px;
  padding: 5px 9px;
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(201, 123, 184, 0.32);
  background: rgba(201, 123, 184, 0.12);
}

.day-term em {
  font-style: normal;
  color: rgba(255, 255, 255, 0.45);
  margin-left: 4px;
  font-size: 10px;
}

.empty-hint {
  font-size: 12px;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.45);
  text-align: center;
  padding: 22px 10px;
}

/* 导出面板 */
.option-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 12px;
}

.option-label {
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
  margin: 2px 0 7px;
}

/* ---------- 单词库 ---------- */

.lib-card {
  padding: 14px 13px 12px;
  margin-bottom: 13px;
}

.lib-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.lib-head h2 {
  font-family: var(--font-sans);
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.lib-hint {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.42);
}

.term-list { display: grid; gap: 8px; }

.term-item {
  padding: 9px 11px;
  border-radius: var(--r-md);
  border: 1px solid rgba(255, 255, 255, 0.11);
  background: rgba(255, 255, 255, 0.045);
}

.term-top {
  display: flex;
  align-items: baseline;
  gap: 6px;
  flex-wrap: wrap;
}

.term-name {
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 600;
  color: #fff;
  letter-spacing: -0.01em;
}

.star {
  color: #FFD60A;
  font-size: 11px;
  text-shadow: 0 0 8px rgba(255, 214, 10, 0.55);
}

.term-meaning { font-size: 11.5px; color: rgba(255, 255, 255, 0.6); }

.term-meta {
  margin-top: 3px;
  font-size: 9.8px;
  color: rgba(255, 255, 255, 0.38);
  letter-spacing: 0.02em;
}

.term-example {
  margin-top: 4px;
  font-size: 10.8px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.5);
  font-family: var(--font-sans);
}

.more-btn {
  width: 100%;
  margin-top: 9px;
  padding: 8px;
  border-radius: 9px;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.66);
  border: 1px dashed rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.03);
}

.more-btn:hover { color: var(--gold); border-color: rgba(255, 216, 107, 0.34); }

.lib-card.is-placeholder {
  border-style: dashed;
  opacity: 0.62;
  background: rgba(255, 255, 255, 0.03);
}

.placeholder-body {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 11.5px;
  color: rgba(255, 255, 255, 0.5);
  line-height: 1.6;
}

.badge-soon {
  flex-shrink: 0;
  font-size: 9.5px;
  padding: 3px 8px;
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

/* ---------- 弹层 / Toast ---------- */

.sheet-overlay {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(12, 6, 18, 0.62);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  animation: fadeIn 0.22s both;
}

.sheet {
  position: relative;
  width: 100%;
  max-width: 480px;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  padding: 8px 16px calc(16px + var(--safe-b));
  border-radius: 22px 22px 0 0;
  background: linear-gradient(180deg, #3a2650, #241631 62%);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-bottom: 0;
  box-shadow: 0 -20px 60px rgba(0, 0, 0, 0.5);
  animation: sheetUp 0.34s cubic-bezier(0.2, 0.75, 0.2, 1) both;
}

.sheet.sheet-full { max-height: 92vh; }

@keyframes sheetUp {
  from { transform: translateY(30px); opacity: 0.6; }
  to { transform: none; opacity: 1; }
}

.sheet-grab {
  width: 34px;
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
  margin: 2px auto 10px;
  flex-shrink: 0;
}

.sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 10px;
  flex-shrink: 0;
}

.sheet-head h2 {
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 500;
  letter-spacing: 0.03em;
}

.sheet-body {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 2px 1px 6px;
  font-size: 13px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.8);
}

.sheet-actions {
  display: flex;
  gap: 8px;
  padding-top: 12px;
  flex-shrink: 0;
}

.sheet-actions .primary-btn,
.sheet-actions .ghost-btn { flex: 1; }

.sheet-body .muted {
  font-size: 11.5px;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.5);
}

.progress-box {
  padding: 26px 6px 10px;
  text-align: center;
}

.spinner {
  width: 26px;
  height: 26px;
  margin: 0 auto 12px;
  border-radius: 50%;
  border: 2px solid rgba(255, 216, 107, 0.25);
  border-top-color: var(--gold);
  animation: spin 0.8s linear infinite;
}

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

.progress-text { font-size: 12.5px; color: rgba(255, 255, 255, 0.72); }
.progress-sub { margin-top: 5px; font-size: 10.5px; color: rgba(255, 255, 255, 0.4); }

.toast-layer {
  position: fixed;
  left: 0;
  right: 0;
  bottom: calc(24px + var(--safe-b));
  z-index: 120;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  pointer-events: none;
}

.toast {
  max-width: 82vw;
  padding: 9px 15px;
  border-radius: 999px;
  font-size: 12px;
  line-height: 1.45;
  color: #fff;
  background: rgba(30, 16, 42, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.4);
  animation: toastIn 0.28s both;
}

@keyframes toastIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

/* ---------- 减少动态效果 ---------- */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .kenburns { animation: none; transform: scale(1.03); }
  .fade-in { opacity: 1; transform: none; }
  .msg { animation: none; }
}

/* ---------- 窄屏微调 ---------- */

@media (max-width: 360px) {
  .entry-card { padding: 13px 12px; gap: 12px; }
  .entry-title { font-size: 13.5px; }
  .welcome-inner h1 { font-size: 34px; }
  .cal-cell { font-size: 13px; }
  .home-copy h2 { font-size: 26px; }
}

/* ---------- Netlify 免费版注入的徽章 iframe ---------- */
/* 它固定在右下角、z-index 最高，会盖住底部功能区；缩小尺寸 + 推到最角落 */
iframe#nl-badge-frame,
iframe#nl-hud-frame {
  pointer-events: none !important;
  width: 110px !important;
  height: 46px !important;
  right: 2px !important;
  bottom: calc(2px + var(--safe-b, 0px)) !important;
  opacity: 0.55 !important;
}

/* 给底部输入区多留一点空间，避免徽章压住提示文字 */
.chat-page .composer {
  padding-bottom: calc(14px + var(--safe-b));
}

/* ---------- Evaluation 三段式反馈卡 ---------- */

.feedback-card {
  background: rgba(22, 22, 28, 0.92);
  border: 1px solid rgba(191, 90, 242, 0.25);
  border-radius: 16px;
  padding: 16px;
  margin: 14px 0 8px;
}

.eval-module { display: flex; flex-direction: column; gap: 14px; }

.eval-title h4 {
  margin: 0;
  font-size: 14.5px;
  font-weight: 600;
  color: #E5C7FF;
  letter-spacing: 0.03em;
}

.eval-section { display: flex; flex-direction: column; gap: 8px; }

.eval-section-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 4px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.eval-section-icon {
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 700;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.7);
}

.eval-section-name {
  font-size: 13px;
  font-weight: 600;
  color: #fff;
}

.eval-section-sub {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.35);
  margin-left: auto;
}

.eval-items { display: flex; flex-direction: column; gap: 8px; }

/* 每条卡片：左边框区分类型 */
.eval-item {
  background: rgba(255, 255, 255, 0.04);
  border-radius: 10px;
  padding: 10px 12px;
  border-left: 3px solid transparent;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.eval-strength { border-left-color: #4ADE80; }
.eval-weakness { border-left-color: #F87171; }
.eval-upgrade { border-left-color: #FB923C; }

.eval-item-head {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.eval-badge {
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 700;
  border-radius: 4px;
}

.eval-badge-green { background: rgba(74, 222, 128, 0.18); color: #4ADE80; }
.eval-badge-red { background: rgba(248, 113, 113, 0.18); color: #F87171; }
.eval-badge-orange { background: rgba(251, 146, 60, 0.18); color: #FB923C; }

.eval-type-tag {
  font-size: 10.5px;
  padding: 1px 7px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.55);
}

.eval-note {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.5);
  flex: 1;
}

/* original / revised 对照 */
.eval-text-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.eval-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  background: rgba(0, 0, 0, 0.25);
  border-radius: 6px;
  padding: 6px 8px;
  font-size: 13px;
}

.eval-label {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.35);
  font-weight: 600;
}

.eval-original .eval-line {
  color: rgba(255, 255, 255, 0.6);
  font-family: ui-monospace, 'SF Mono', Menlo, monospace;
  font-size: 12.5px;
}

.eval-revised .eval-line {
  color: #E5C7FF;
  font-size: 13px;
}

/* 整段改写 */
.eval-section-revised { margin-top: 4px; }

.eval-section-revised .fb-revised {
  cursor: pointer;
  padding: 10px 12px;
  background: rgba(191, 90, 242, 0.08);
  border-radius: 10px;
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
  color: #fff;
}

.eval-section-revised .fb-revised b,
.eval-section-revised .fb-revised strong,
.fb-revised b,
.fb-revised strong {
  color: #E5C7FF;
  font-weight: 600;
}

.fb-empty {
  margin: 0;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.45);
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 8px;
}

/* ================= 导入积累 + 语料库 ================= */

.import-chip {
  border-color: rgba(255, 200, 120, 0.45);
  color: #ffd9a0;
  background: rgba(255, 180, 90, 0.1);
}

.import-wrap { display: flex; flex-direction: column; gap: 12px; }

.import-tip { font-size: 12px; line-height: 1.6; color: rgba(255, 255, 255, 0.6); }

.import-textarea {
  width: 100%;
  resize: vertical;
  min-height: 88px;
  padding: 11px 12px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  font-size: 13px;
  line-height: 1.55;
  font-family: var(--font-sans);
}
.import-textarea:focus { outline: none; border-color: rgba(255, 200, 120, 0.5); }

.import-primary {
  width: 100%;
  padding: 12px;
  border-radius: 14px;
  border: none;
  background: linear-gradient(135deg, #f5a45c, #e8833a);
  color: #1c1005;
  font-size: 14px;
  font-weight: 600;
}
.import-primary:active { opacity: 0.85; }
.import-primary:disabled { opacity: 0.5; }
.import-primary.is-slim { width: auto; padding: 10px 16px; flex-shrink: 0; }

.import-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 10.5px;
  color: rgba(255, 255, 255, 0.4);
}
.import-divider::before, .import-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(255, 255, 255, 0.12);
}

.import-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 9px;
}

.import-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 13px 8px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.85);
  font-size: 11.5px;
}
.import-btn:active { background: rgba(255, 255, 255, 0.1); }

.import-link-row { display: flex; gap: 8px; }

.import-url {
  flex: 1;
  min-width: 0;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  font-size: 13px;
}
.import-url:focus { outline: none; border-color: rgba(255, 200, 120, 0.5); }

.import-note { font-size: 10.5px; line-height: 1.5; color: rgba(255, 255, 255, 0.38); }

.import-progress {
  font-size: 12px;
  color: #ffd9a0;
  text-align: center;
  padding: 6px;
}

/* 预览确认列表 */
.import-list {
  display: flex;
  flex-direction: column;
  gap: 9px;
  max-height: 46vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.imp-item {
  padding: 10px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.045);
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.imp-item-head { display: flex; justify-content: space-between; align-items: center; }

.imp-kind {
  padding: 4px 8px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(20, 20, 26, 0.9);
  color: #ffd9a0;
  font-size: 11px;
}

.imp-del {
  border: none;
  background: none;
  color: rgba(255, 255, 255, 0.45);
  padding: 4px;
}

.imp-pair { display: flex; align-items: center; gap: 7px; }

.imp-arrow { color: rgba(255, 255, 255, 0.45); font-size: 12px; flex-shrink: 0; }

.imp-input {
  flex: 1;
  min-width: 0;
  padding: 7px 9px;
  border-radius: 9px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  font-size: 12.5px;
}
.imp-input:focus { outline: none; border-color: rgba(255, 200, 120, 0.5); }
.imp-pos { flex: 0 0 64px; }

.import-actions { display: flex; gap: 9px; margin-top: 4px; }
.import-actions .import-btn { flex-direction: row; flex: 1; padding: 12px; }
.import-actions .import-primary { flex: 2; }

/* 语料库 */
.lib-stack { margin-top: 22px; }

.term-original {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.5);
  text-decoration: line-through;
  text-decoration-color: rgba(255, 120, 100, 0.6);
}

.term-arrow { font-size: 12px; color: rgba(255, 200, 120, 0.8); }

.term-name {
  border: none;
  background: none;
  padding: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.term-name svg { opacity: 0.55; }
.term-name:active svg { opacity: 1; color: #ffd9a0; }

.pos-badge {
  font-size: 9.5px;
  padding: 2px 7px;
  border-radius: 999px;
  border: 1px solid rgba(255, 200, 120, 0.4);
  color: #ffd9a0;
  background: rgba(255, 180, 90, 0.08);
}

.term-pos-sub {
  margin-top: 2px;
  font-size: 10px;
  color: rgba(255, 255, 255, 0.4);
}

.term-example {
  display: block;
  width: 100%;
  text-align: left;
  border: none;
  background: none;
  padding: 0;
  cursor: pointer;
}
.term-example:active { color: rgba(255, 220, 170, 0.85); }

/* ================= 词条卡：三种版式 ================= */

/* 通用：可点击的词按钮（三种版式共用） */
.term-word {
  border: none;
  background: none;
  padding: 0;
  text-align: left;
  color: #fff;
  cursor: pointer;
  word-break: break-word;
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  font-family: var(--font-sans);
}
.term-play { opacity: 0.45; flex-shrink: 0; }
.term-word:active .term-play { opacity: 1; color: #ffd9a0; }

/* --- 单词卡：左=基础词+释义，右=多个高阶替换（纵向） --- */
.kind-word .word-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  align-items: start;
}
.kind-word .word-from {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}
.kind-word .word-from .term-word {
  font-size: 16px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.82);
}
.kind-word .word-meaning {
  margin: 0;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.45);
  line-height: 1.45;
}
.kind-word .word-to {
  display: flex;
  flex-direction: column;
  gap: 7px;
  align-items: flex-end;
}
.kind-word .word-to .term-word {
  font-size: 15px;
  font-weight: 600;
  color: #fff;
}

/* --- 短语 / 句型卡：上方正确（大）+ 横线 + 下方错误（小、半透明） --- */
.kind-phrase .alt-correct,
.kind-sentence .alt-correct {
  padding: 4px 0 8px;
}
.kind-phrase .alt-correct .term-word {
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  line-height: 1.55;
}
.kind-sentence .alt-correct .term-word {
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  line-height: 1.65;
}

.alt-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.12);
  margin: 6px 0 8px;
  position: relative;
}
.alt-divider::before {
  content: '✗';
  position: absolute;
  right: 0;
  top: -9px;
  font-size: 10px;
  color: rgba(255, 140, 100, 0.55);
}

.kind-phrase .alt-wrong .term-word,
.kind-sentence .alt-wrong .term-word {
  font-size: 12px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.42);
  line-height: 1.5;
  text-decoration: line-through;
  text-decoration-color: rgba(255, 120, 100, 0.35);
}
.alt-empty {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.3);
  font-style: italic;
}

/* ================= 日期分组 ================= */

.date-group {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 14px 0 7px;
  font-size: 11px;
  color: #c9a6ff; /* 紫金色，区别于白色正文 */
  letter-spacing: 0.02em;
}
.date-group:first-child { margin-top: 2px; }
.date-group em {
  font-style: normal;
  font-size: 9.5px;
  color: rgba(201, 166, 255, 0.55);
}
.date-group::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, rgba(201, 166, 255, 0.45), rgba(255, 200, 120, 0.22));
}

/* ================= 搜索栏 ================= */

.lib-search-row { margin: 14px 0 4px; }

.lib-search {
  width: 100%;
  box-sizing: border-box;
  padding: 11px 14px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  font-size: 13px;
  -webkit-appearance: none;
}
.lib-search::placeholder { color: rgba(255, 255, 255, 0.35); }
.lib-search:focus { outline: none; border-color: rgba(255, 200, 120, 0.5); }

/* ================= 每日记录日期详情 ================= */

.day-detail { display: flex; flex-direction: column; gap: 2px; }
.day-sessions { display: flex; flex-direction: column; gap: 8px; margin-bottom: 6px; }

.imp-opos { flex: 0 0 64px; }
