/* =========================================================
   英语闪卡模块 · flashcard.css
   设计语言：beUI（玻璃拟态 + 弹簧动效）+ 应用品牌令牌
   ------------------------------------------------------------
   响应式三档：
     · 移动端  ≤ 559px   单列 · 固定底部操作条 · 卡片满幅
     · 平板    560–1023  居中 680px · 词表双列 · 操作条收窄
     · 桌面    ≥ 1024px  侧栏 + 主区双栏 · 场景图左 / 词表右
                 · 场景图与词表左右分栏 · 五层解析双列 · 补齐顶部导航
   适配：body.dt-dark 暗色壳
   ========================================================= */

html, body { overflow-x: hidden; }

.fc-stage {
  --fc-primary: #FF9800;
  --fc-primary-2: #F57C00;
  --fc-secondary: #7C4DFF;
  --fc-secondary-2: #536DFE;
  --fc-success: #4CAF50;
  --fc-warning: #FFA726;
  --fc-error: #EF5350;
  --fc-info: #42A5F5;

  --fc-bg: #0d0d1a;
  --fc-bg-2: #12122a;
  --fc-bg-3: #0a0a1e;
  --fc-surface: rgba(255, 255, 255, 0.06);
  --fc-surface-strong: rgba(255, 255, 255, 0.10);
  --fc-border: rgba(255, 255, 255, 0.12);
  --fc-text: #ECECF4;
  --fc-text-2: #A6A6C0;
  --fc-text-3: #6E6E8C;

  --ease-spring: cubic-bezier(.34, 1.56, .64, 1);
  --ease-soft: cubic-bezier(.32, 1.25, .4, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);

  /* 底部导航高度（桌面端无底部导航，由媒体查询覆盖） */
  --fc-nav-h: calc(64px + env(safe-area-inset-bottom));

  position: relative;
  min-height: calc(100vh - 48px - 64px);
  /* 负 margin 让背景满幅延展至 dt-main 边缘（block 自动宽度 = 父内容宽 + |margin|，
     因此正好等于 dt-main 的 border box，视觉上通栏且不产生横向溢出）。
     inset 必须与 dt-main 实际 padding 一致：
     ≤768px 时 dt-main padding = --dt-space-sm(8px)，≥769px = --dt-space(16px)。 */
  --fc-stage-inset: var(--dt-space-sm, 8px);
  margin: calc(-1 * var(--fc-stage-inset)) calc(-1 * var(--fc-stage-inset)) -40px;
  padding: 14px 14px calc(120px + env(safe-area-inset-bottom));
  background:
    radial-gradient(60vw 60vw at 12% 0%, rgba(124, 77, 255, .22), transparent 60%),
    radial-gradient(55vw 55vw at 100% 12%, rgba(255, 152, 0, .18), transparent 55%),
    linear-gradient(160deg, var(--fc-bg-2), var(--fc-bg) 45%, var(--fc-bg-3));
  color: var(--fc-text);
  font-family: var(--dt-font, 'PingFang SC', 'Microsoft YaHei', system-ui, sans-serif);
  -webkit-tap-highlight-color: transparent;
  /* clip 不创建滚动容器，因此 sticky 顶栏仍可正常工作 */
  overflow-x: clip;
  overflow-y: visible;
}

/* =========================================================
   桌面顶部导航（替代 ≥769px 被隐藏的底部三标签）
   ========================================================= */
.fc-dnav { display: none; }
.fc-dnav a {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 15px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 700;
  color: var(--fc-text-2);
  text-decoration: none;
  white-space: nowrap;
  transition: all .22s var(--ease-out);
}
.fc-dnav a:hover { background: rgba(255, 255, 255, .08); color: var(--fc-text); }
.fc-dnav a.active {
  background: linear-gradient(135deg, var(--fc-primary), var(--fc-primary-2));
  color: #1a1206;
  box-shadow: 0 4px 16px rgba(255, 152, 0, .3);
}

/* =========================================================
   布局骨架
   ========================================================= */
.fc-shell { display: block; }
.fc-main { min-width: 0; }
.fc-side { display: contents; }
.fc-index-wrap { display: none; }
.fc-kbd { display: none; }

/* =========================================================
   顶部控制条
   ========================================================= */
.fc-top {
  position: sticky;
  top: var(--dt-top-bar-height, 48px);
  z-index: 30;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 4px 2px 12px;
  margin-bottom: 10px;
  background: linear-gradient(180deg, var(--fc-bg-2) 60%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.fc-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.fc-row.between { justify-content: space-between; }

.fc-title { font-size: 17px; font-weight: 800; letter-spacing: .5px; display: flex; align-items: center; gap: 7px; }
.fc-title .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--fc-primary); box-shadow: 0 0 12px var(--fc-primary); }

/* ===== 学期分段控件 ===== */
.fc-seg {
  display: flex;
  gap: 4px;
  padding: 4px;
  position: relative;
  background: var(--fc-surface);
  border: 1px solid var(--fc-border);
  border-radius: 14px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  overflow-x: auto;
  max-width: 100%;
  scrollbar-width: none;
}
.fc-seg::-webkit-scrollbar { display: none; }
.fc-seg button {
  flex: 0 0 auto;
  border: 0;
  background: transparent;
  color: var(--fc-text-2);
  font-size: 13px;
  font-weight: 700;
  font-family: inherit;
  padding: 7px 13px;
  border-radius: 10px;
  cursor: pointer;
  position: relative;
  z-index: 1;
  transition: color .25s var(--ease-out);
  white-space: nowrap;
}
.fc-seg button.active { color: #1a1206; }
.fc-seg .pill {
  position: absolute;
  top: 4px;
  left: 4px;
  width: 0;
  height: 0;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--fc-primary), var(--fc-primary-2));
  box-shadow: 0 4px 14px rgba(255, 152, 0, .35);
  z-index: 0;
  transition: transform .42s var(--ease-spring), width .42s var(--ease-spring), height .42s var(--ease-spring);
}

/* ===== 筛选 chips ===== */
.fc-chips { display: flex; gap: 7px; flex-wrap: wrap; }
.fc-chip {
  border: 1px solid var(--fc-border);
  background: var(--fc-surface);
  color: var(--fc-text-2);
  font-size: 12px;
  font-weight: 700;
  font-family: inherit;
  padding: 6px 12px;
  border-radius: 999px;
  cursor: pointer;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: all .2s var(--ease-out);
}
.fc-chip:hover { color: var(--fc-text); border-color: rgba(255, 255, 255, .26); }
.fc-chip.active { color: #fff; border-color: transparent; background: rgba(255, 255, 255, .16); }
.fc-chip.active[data-f="review"] { background: rgba(255, 167, 38, .22); border-color: rgba(255, 167, 38, .5); color: #FFD9A0; }
.fc-chip.active[data-f="mastered"] { background: rgba(76, 175, 80, .22); border-color: rgba(76, 175, 80, .5); color: #B7F0B9; }

.fc-stat { font-size: 12px; color: var(--fc-text-2); display: flex; gap: 12px; }
.fc-stat b { color: var(--fc-primary); font-size: 14px; }
.fc-stat .mastered b { color: var(--fc-success); }

/* ===== 进度条 ===== */
.fc-progress {
  height: 5px;
  border-radius: 999px;
  background: var(--fc-surface);
  overflow: hidden;
}
.fc-progress > i {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--fc-secondary), var(--fc-primary));
  transition: width .4s var(--ease-out);
}

/* =========================================================
   卡片舞台
   ========================================================= */
.fc-cardwrap {
  perspective: 1600px;
  margin: 6px 2px 0;
  touch-action: pan-y;
}
.fc-card {
  position: relative;
  width: 100%;
  min-height: 56vh;
  /* 单格栅格堆叠：正面与背面同处 1/1 栅格，卡片高度 = 两者内容较高者，
     词表再长也不会被卡片边界裁切（历史缺陷：absolute + inset:0 锁死高度） */
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  transform-style: preserve-3d;
  transition: transform .55s var(--ease-soft);
  cursor: pointer;
}
.fc-card.flipped { transform: rotateY(180deg); }
.fc-face {
  /* 同格堆叠而非绝对定位：高度由内容驱动 */
  grid-area: 1 / 1;
  position: relative;
  min-width: 0;
  /* 继承卡片最小高度，使短卡片也能撑满、长卡片自适应 */
  min-height: inherit;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border-radius: 22px;
  border: 1px solid var(--fc-border);
  background: var(--fc-surface-strong);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 18px 50px rgba(0, 0, 0, .45);
  padding: 16px 16px 14px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.fc-face.back { transform: rotateY(180deg); overflow-y: auto; }

/* 状态徽章 */
.fc-badge {
  position: absolute;
  top: 12px; right: 12px;
  z-index: 5;
  font-size: 11px;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 999px;
  display: flex; align-items: center; gap: 5px;
  backdrop-filter: blur(8px);
}
.fc-badge .bdot { width: 7px; height: 7px; border-radius: 50%; }
.fc-badge.new { background: rgba(66,165,245,.18); color: #A9D6FF; }
.fc-badge.new .bdot { background: var(--fc-info); }
.fc-badge.review { background: rgba(255,167,38,.20); color: #FFD9A0; }
.fc-badge.review .bdot { background: var(--fc-warning); box-shadow: 0 0 8px var(--fc-warning); }
.fc-badge.learning { background: rgba(124,77,255,.20); color: #C9BCFF; }
.fc-badge.learning .bdot { background: var(--fc-secondary); }
.fc-badge.mastered { background: rgba(76,175,80,.20); color: #B7F0B9; }
.fc-badge.mastered .bdot { background: var(--fc-success); box-shadow: 0 0 8px var(--fc-success); }

/* 正面：场景图 */
.fc-scene {
  position: relative;
  width: 100%;
  height: 190px;
  border-radius: 16px;
  overflow: hidden;
  background: #1a1a2e;
  border: 1px solid var(--fc-border);
  margin-bottom: 12px;
  flex: 0 0 auto;
}
.fc-scene img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease-out); }
.fc-scene:active img { transform: scale(1.04); }
.fc-scene .cap {
  position: absolute; left: 10px; bottom: 10px;
  font-size: 11px; font-weight: 700; color: #fff;
  background: rgba(0,0,0,.42); backdrop-filter: blur(8px);
  padding: 4px 10px; border-radius: 999px;
}
.fc-scene.none { display: none; }

/* 标题区：标题与单元合并为一行（节省垂直空间，供长词表使用） */
.fc-head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 3px 10px; }
.fc-fname { font-size: 19px; font-weight: 800; margin: 0; }
.fc-funit { font-size: 12px; color: var(--fc-text-3); margin: 0; }

/* 词表：列数由容器宽度自适应（1/2/3 列），长词表亦可完整展开，不做内部滚动裁切 */
.fc-words {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(190px, 100%), 1fr));
  gap: 7px 9px;
  /* 卡片高度大于词表内容时，词表整体居中，避免余量全部堆在卡片底部 */
  align-content: center;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding-right: 2px;
}
.fc-word {
  display: flex; align-items: baseline; gap: 6px 9px;
  flex-wrap: wrap;
  padding: 9px 11px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 13px;
  animation: fcRise .5s var(--ease-out) both;
  min-width: 0;
}
@keyframes fcRise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.fc-word .w { font-size: 18px; font-weight: 800; letter-spacing: .3px; white-space: nowrap; }
.fc-word .ipa { font-size: 12px; color: var(--fc-info); font-family: var(--dt-font-mono, monospace); white-space: nowrap; }
.fc-word .pos { font-size: 11px; color: var(--fc-text-3); background: rgba(255,255,255,.07); padding: 1px 6px; border-radius: 6px; white-space: nowrap; }
/* 释义与搭配徽章同处次行，避免徽章独占一行 */
.fc-word .m { font-size: 13px; color: var(--fc-text-2); flex: 1 1 auto; margin-left: 0; min-width: 0; order: 2; }
.fc-word .colloc { font-size: 9px; font-weight: 800; color: #0c1a0c; background: var(--fc-success); padding: 1px 5px; border-radius: 5px; margin-left: 0; margin-right: 6px; order: 3; }
.fc-word .hint { font-size: 11px; color: var(--fc-text-3); display: block; margin-top: 1px; }

/* 背面：五层 */
.fc-back-title { font-size: 16px; font-weight: 800; margin: 2px 0 10px; display: flex; align-items: center; gap: 6px; }
.fc-layer {
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 14px;
  padding: 11px 12px;
  margin-bottom: 9px;
}
.fc-layer h4 { margin: 0 0 6px; font-size: 12px; font-weight: 800; color: var(--fc-primary); display: flex; align-items: center; gap: 6px; letter-spacing: .4px; }
.fc-layer.l2 h4 { color: var(--fc-secondary); }
.fc-layer.l4 h4 { color: var(--fc-success); }
.fc-layer.l5 h4 { color: var(--fc-info); }
.fc-layer p { margin: 4px 0; font-size: 13px; line-height: 1.55; color: var(--fc-text); }
.fc-layer .mut { color: var(--fc-text-2); }
.fc-ph { font-size: 13px; padding: 5px 0; border-bottom: 1px dashed rgba(255,255,255,.08); display: flex; gap: 8px; }
.fc-ph:last-child { border-bottom: 0; }
.fc-ph .t { font-weight: 700; }
.fc-ph .r { font-size: 10px; color: var(--fc-text-3); margin-left: auto; }
.fc-tag { display: inline-block; font-size: 11px; color: var(--fc-text-2); background: rgba(255,255,255,.06); border-radius: 8px; padding: 3px 8px; margin: 3px 4px 0 0; }
.fc-mini { font-size: 12px; color: var(--fc-text-2); padding: 3px 0; }

.fc-flip-hint { text-align: center; font-size: 11px; color: var(--fc-text-3); margin-top: 8px; }

/* =========================================================
   底部操作条（含原位替换的评分按钮）
   ========================================================= */
.fc-actions {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 40;
  padding: 10px 14px calc(var(--fc-nav-h) + 10px);
  display: flex; gap: 10px; align-items: center;
  background: linear-gradient(0deg, var(--fc-bg-3) 55%, transparent);
}
.fc-nav-btn {
  width: 46px; height: 46px; flex: 0 0 auto;
  border-radius: 14px; border: 1px solid var(--fc-border);
  background: var(--fc-surface-strong); color: var(--fc-text);
  font-size: 20px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  transition: transform .18s var(--ease-spring);
}
.fc-nav-btn:active { transform: scale(.9); }
.fc-flip-btn {
  flex: 1; height: 46px;
  border-radius: 14px; border: 0;
  background: linear-gradient(135deg, var(--fc-secondary), var(--fc-secondary-2));
  color: #fff; font-size: 15px; font-weight: 800; font-family: inherit;
  cursor: pointer;
  box-shadow: 0 8px 22px rgba(124,77,255,.35);
  transition: transform .18s var(--ease-spring);
}
.fc-flip-btn:active { transform: scale(.96); }

/* 中部插槽：翻面按钮与评分按钮同位替换，杜绝重叠 */
.fc-act-center {
  position: relative;
  flex: 1;
  min-width: 0;
  height: 46px;
}
.fc-act-center > .fc-flip-btn { width: 100%; }

/* 评分按钮（翻面后浮现，原位覆盖翻面按钮） */
.fc-grade {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: none;
  gap: 8px;
}
.fc-grade.show { display: flex; animation: fcGradeIn .34s var(--ease-spring) both; }
@keyframes fcGradeIn {
  from { opacity: 0; transform: scale(.9); }
  to { opacity: 1; transform: scale(1); }
}
.fc-grade button {
  flex: 1; min-width: 0;
  height: 46px; border-radius: 14px; border: 0;
  font-size: 14px; font-weight: 800; font-family: inherit; cursor: pointer;
  color: #fff; display: flex; align-items: center; justify-content: center; gap: 5px;
  transition: transform .18s var(--ease-spring);
}
.fc-grade button:active { transform: scale(.95); }
.fc-grade .no { background: linear-gradient(135deg, #EF5350, #E53935); box-shadow: 0 8px 22px rgba(239,83,80,.35); }
.fc-grade .yes { background: linear-gradient(135deg, #66BB6A, #43A047); box-shadow: 0 8px 22px rgba(76,175,80,.35); }
/* 翻回正面：翻面态下始终可达，避免长卡片只能靠点击卡片空白处返回 */
.fc-grade .back {
  flex: 0 0 auto;
  width: 46px;
  background: rgba(255, 255, 255, .10);
  border: 1px solid var(--fc-border);
  color: var(--fc-text-2);
  font-size: 18px;
  box-shadow: none;
}
.fc-grade .back:hover { background: rgba(255, 255, 255, .17); color: var(--fc-text); }

/* =========================================================
   侧栏卡片索引（桌面端）
   ========================================================= */
.fc-index-list { display: flex; flex-direction: column; gap: 3px; }
.fc-idx-item {
  display: flex; align-items: center; gap: 8px;
  width: 100%;
  padding: 7px 9px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: var(--fc-text-2);
  font-size: 12.5px;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  transition: all .18s var(--ease-out);
}
.fc-idx-item:hover { background: rgba(255, 255, 255, .07); color: var(--fc-text); }
.fc-idx-item.cur { background: rgba(255, 152, 0, .14); border-color: rgba(255, 152, 0, .34); color: #FFD9A0; }
.fc-idx-num { font-family: var(--dt-font-mono, monospace); font-size: 10.5px; color: var(--fc-text-3); flex: 0 0 auto; width: 20px; }
.fc-idx-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fc-idx-dot { width: 7px; height: 7px; border-radius: 50%; flex: 0 0 auto; background: var(--fc-info); }
.fc-idx-dot.st-new { background: var(--fc-info); }
.fc-idx-dot.st-review { background: var(--fc-warning); box-shadow: 0 0 6px var(--fc-warning); }
.fc-idx-dot.st-learning { background: var(--fc-secondary); }
.fc-idx-dot.st-mastered { background: var(--fc-success); box-shadow: 0 0 6px var(--fc-success); }

.fc-side-title {
  font-size: 11px; font-weight: 800;
  color: var(--fc-text-3);
  letter-spacing: .8px;
  margin: 0 0 8px;
  display: flex; align-items: center; justify-content: space-between;
}
.fc-side-title span { font-weight: 600; letter-spacing: 0; }

/* 键盘快捷键提示（桌面端） */
.fc-kbd { display: none; }
.fc-kbd-row { display: flex; align-items: center; gap: 8px; padding: 4px 0; font-size: 12px; color: var(--fc-text-3); }
.fc-kbd-row kbd {
  font-family: var(--dt-font-mono, monospace);
  font-size: 10.5px;
  padding: 2px 7px;
  border-radius: 6px;
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .12);
  color: var(--fc-text-2);
  min-width: 22px;
  text-align: center;
}

/* =========================================================
   全屏看图
   ========================================================= */
.fc-lightbox {
  position: fixed; inset: 0; z-index: 90;
  background: rgba(5, 5, 12, .92);
  display: none; align-items: center; justify-content: center;
  padding: 24px; backdrop-filter: blur(6px);
}
.fc-lightbox.show { display: flex; animation: fcFade .3s var(--ease-out) both; }
@keyframes fcFade { from { opacity: 0; } to { opacity: 1; } }
.fc-lightbox img { max-width: 100%; max-height: 82vh; border-radius: 18px; box-shadow: 0 20px 60px rgba(0,0,0,.6); transform: scale(.85); animation: fcPop .4s var(--ease-spring) both; }
@keyframes fcPop { to { transform: scale(1); } }
.fc-lightbox .close { position: absolute; top: 18px; right: 18px; width: 42px; height: 42px; border-radius: 50%; border: 1px solid rgba(255,255,255,.25); background: rgba(255,255,255,.1); color: #fff; font-size: 20px; cursor: pointer; }
.fc-lightbox .lb-cap { position: absolute; bottom: 22px; left: 0; right: 0; text-align: center; color: #ccc; font-size: 13px; }

/* =========================================================
   Toast
   ========================================================= */
.fc-toast {
  position: fixed; left: 50%; top: 22%;
  transform: translate(-50%, -10px);
  z-index: 95;
  padding: 12px 20px; border-radius: 14px;
  background: rgba(20,20,40,.86); border: 1px solid var(--fc-border);
  color: #fff; font-size: 14px; font-weight: 700;
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 10px 30px rgba(0,0,0,.4);
  opacity: 0; pointer-events: none;
  transition: opacity .3s var(--ease-out), transform .3s var(--ease-spring);
}
.fc-toast.show { opacity: 1; transform: translate(-50%, 0); }

/* =========================================================
   完成横幅
   ========================================================= */
.fc-banner {
  position: fixed; inset: 0; z-index: 88;
  display: none; align-items: center; justify-content: center;
  background: rgba(6,6,16,.78); backdrop-filter: blur(8px);
}
.fc-banner.show { display: flex; animation: fcFade .35s var(--ease-out) both; }
.fc-banner .box {
  text-align: center; padding: 34px 30px;
  background: var(--fc-surface-strong); border: 1px solid var(--fc-border);
  border-radius: 24px; max-width: 320px;
}
.fc-banner .big { font-size: 56px; animation: fcPop .6s var(--ease-spring) both; }
.fc-banner .t { font-size: 20px; font-weight: 800; margin: 8px 0 4px; }
.fc-banner .s { font-size: 13px; color: var(--fc-text-2); margin-bottom: 18px; }
.fc-banner button {
  border: 0; border-radius: 14px; padding: 12px 26px;
  background: linear-gradient(135deg, var(--fc-primary), var(--fc-primary-2));
  color: #1a1206; font-weight: 800; font-size: 15px; font-family: inherit; cursor: pointer;
}

.fc-empty { text-align: center; color: var(--fc-text-3); padding: 60px 20px; font-size: 14px; }

/* 进入时的内容揭示 */
.fc-reveal > * { animation: fcReveal .5s var(--ease-out) both; }
@keyframes fcReveal { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* =========================================================
   平板：560px – 1023px
   —— 居中 680px · 词表按宽度自适应列数 · 操作条收窄居中
   注：769px 起 dt-main padding 变为 16px，inset 需同步。
   ========================================================= */
@media (min-width: 560px) and (max-width: 1023px) {
  .fc-stage {
    padding-bottom: 96px;
    min-height: calc(100vh - 48px);
  }
  .fc-top,
  .fc-cardwrap { max-width: 680px; margin-left: auto; margin-right: auto; }
  .fc-card { min-height: 62vh; }
  .fc-scene { height: 220px; }
  /* 词表列数沿用全局 auto-fit（680px 卡片内自动落为 3 列） */
  .fc-word { padding: 8px 10px; }
  .fc-word .w { font-size: 17px; }
  .fc-word .ipa { font-size: 11px; }
  .fc-word .m { font-size: 12px; margin-left: 0; }
  .fc-word .pos { font-size: 10px; padding: 1px 5px; }
  /* 操作条：固定底部但收窄居中 */
  .fc-actions {
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    width: min(680px, 100%);
    margin: 0 auto;
    padding: 10px 14px calc(20px + env(safe-area-inset-bottom));
    background: linear-gradient(0deg, var(--fc-bg-3) 62%, transparent);
  }
  .fc-lightbox img { max-height: 76vh; }
}

/* =========================================================
   顶部导航：≥ 769px 启用
   —— 全局 app.css 在 ≥769px 隐藏底部三标签，本页必须在此区间自备导航，
      否则 769–1023px（平板横屏 / 小尺寸平板）将完全失去导航入口。
   ========================================================= */
@media (min-width: 769px) {
  .fc-dnav {
    display: flex;
    align-items: center;
    gap: 4px;
    max-width: 1360px;
    margin: 0 auto 12px;
    padding: 5px;
    background: var(--fc-surface);
    border: 1px solid var(--fc-border);
    border-radius: 16px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
  }
  .fc-dnav .dnav-brand {
    display: flex; align-items: center; gap: 7px;
    padding: 8px 14px 8px 10px;
    margin-right: 4px;
    font-size: 15px; font-weight: 800;
    color: var(--fc-text);
    text-decoration: none;
    border-right: 1px solid var(--fc-border);
  }
  .fc-dnav .dnav-brand .logo { font-size: 19px; }
  /* ≥769px 全局底部标签已隐藏 → 本页固定操作条不再需要为底栏留白 */
  .fc-stage { --fc-nav-h: 0px; }
}

/* =========================================================
   桌面：≥ 1024px
   —— 侧栏 + 主区双栏 · 场景图左 / 词表右 · 五层双列 · 顶部导航
   ========================================================= */
@media (min-width: 1024px) {
  .fc-stage {
    --fc-nav-h: 0px;
    --fc-stage-inset: 16px;
    min-height: calc(100vh - 48px);
    margin: calc(-1 * var(--fc-stage-inset)) calc(-1 * var(--fc-stage-inset)) -40px;
    padding: 14px 20px 28px;
  }

  /* 学习中心标签：桌面端横向铺开 */
  .fc-stage .learning-hub { max-width: 1360px; margin: 0 auto 12px; }
  .fc-stage .learning-hub__tabs { justify-content: flex-start; }
  .fc-stage .learning-hub__tab { font-size: 14px; padding: 10px 16px; }

  /* 双栏骨架：侧栏 + 主区 */
  .fc-shell {
    display: grid;
    grid-template-columns: 290px minmax(0, 1fr);
    gap: 22px;
    max-width: 1360px;
    margin: 0 auto;
    align-items: start;
  }
  .fc-side {
    display: block;
    position: sticky;
    top: calc(48px + 14px);
    max-height: calc(100vh - 48px - 28px);
    overflow-y: auto;
    padding-right: 4px;
    scrollbar-width: thin;
  }
  .fc-side::-webkit-scrollbar { width: 5px; }
  .fc-side::-webkit-scrollbar-thumb { background: var(--fc-border); border-radius: 999px; }

  /* 侧栏内的控制条：不再 sticky，改为静态块 */
  .fc-top {
    position: static;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: rgba(255, 255, 255, .04);
    border: 1px solid var(--fc-border);
    border-radius: 18px;
    padding: 14px;
    margin-bottom: 14px;
    gap: 12px;
  }
  /* 学期分段：桌面竖排 */
  .fc-seg {
    flex-direction: column;
    overflow-x: visible;
    border-radius: 16px;
  }
  .fc-seg button { width: 100%; text-align: left; padding: 9px 13px; }
  .fc-seg .pill { top: 4px; left: 4px; }

  /* 侧栏索引 + 快捷键 */
  .fc-index-wrap {
    display: block;
    background: rgba(255, 255, 255, .04);
    border: 1px solid var(--fc-border);
    border-radius: 18px;
    padding: 14px;
    margin-bottom: 14px;
  }
  .fc-index-list { max-height: 26vh; overflow-y: auto; scrollbar-width: thin; }
  .fc-index-list::-webkit-scrollbar { width: 5px; }
  .fc-index-list::-webkit-scrollbar-thumb { background: var(--fc-border); border-radius: 999px; }

  .fc-kbd {
    display: block;
    background: rgba(255, 255, 255, .04);
    border: 1px solid var(--fc-border);
    border-radius: 18px;
    padding: 14px;
  }

  /* 主区：卡片更宽更高（高度自适应视口，保证操作条在首屏内） */
  .fc-card { min-height: clamp(380px, calc(100vh - 290px), 720px); }
  .fc-face { padding: 20px 22px 18px; border-radius: 26px; }

  /* 正面：场景图左 / 词表右（标题与单元合并为一行，词表获得更多可用高度） */
  .fc-face.front {
    display: grid;
    grid-template-columns: minmax(0, 34%) minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr) auto;
    column-gap: 20px;
    row-gap: 0;
  }
  .fc-face.front .fc-scene {
    grid-column: 1;
    grid-row: 1 / 4;
    height: auto;
    margin-bottom: 0;
  }
  .fc-face.front .fc-head { grid-column: 2; grid-row: 1; }
  .fc-face.front .fc-words { grid-column: 2; grid-row: 2; }
  .fc-face.front .fc-flip-hint { grid-column: 2; grid-row: 3; }
  .fc-face.front .fc-fname { font-size: 23px; }
  .fc-face.front .fc-funit { font-size: 13px; }

  /* 词表：列数随宽度自适应（场景列 34% → 词表区约 540px → 自动落为 2 列） */
  .fc-words { gap: 7px 9px; }
  .fc-word { padding: 7px 11px; }
  .fc-word .w { font-size: 16px; }
  .fc-word .ipa { font-size: 11px; }
  .fc-word .m { font-size: 12px; margin-left: 0; }
  .fc-word .pos { font-size: 10px; padding: 1px 5px; }

  /* 无场景图卡片（多数卡片暂无配图）：词表独占整幅，取消左栏空置 */
  .fc-card.no-img { min-height: clamp(360px, calc(100vh - 420px), 560px); }
  .fc-face.front.no-img { grid-template-columns: minmax(0, 1fr); }
  .fc-face.front.no-img .fc-head,
  .fc-face.front.no-img .fc-words,
  .fc-face.front.no-img .fc-flip-hint { grid-column: 1; }
  .fc-face.front.no-img .fc-head,
  .fc-face.front.no-img .fc-words,
  .fc-face.front.no-img .fc-flip-hint {
    width: 100%;
    max-width: 780px;
    margin-left: auto;
    margin-right: auto;
  }

  /* 背面：五层解析双列 */
  .fc-face.back {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 14px;
    align-content: start;
  }
  .fc-face.back .fc-back-title { grid-column: 1 / -1; margin-bottom: 0; }
  .fc-face.back .fc-layer { margin-bottom: 0; }
  .fc-face.back .fc-flip-hint { grid-column: 1 / -1; text-align: left; }

  /* 操作条：脱离 fixed，回到文档流置于卡片下方 */
  .fc-actions {
    position: static;
    max-width: 100%;
    margin: 14px 0 0;
    padding: 0;
    background: none;
  }
  .fc-nav-btn { width: 52px; height: 52px; font-size: 22px; }
  .fc-act-center { height: 52px; }
  .fc-grade button { height: 52px; font-size: 15px; }

  /* 提示语改为桌面口径 */
  .fc-flip-hint { text-align: left; }
}

/* ===== dt-main padding 断点对齐（≥769px 由 8px 变为 16px） ===== */
@media (min-width: 769px) {
  .fc-stage { --fc-stage-inset: var(--dt-space, 16px); }
}

/* =========================================================
   超宽屏：进一步放大卡片与留白
   ========================================================= */
@media (min-width: 1500px) {
  .fc-shell { grid-template-columns: 320px minmax(0, 1fr); gap: 28px; }
  .fc-card { min-height: clamp(420px, calc(100vh - 300px), 780px); }
}

/* =========================================================
   减少动画
   ========================================================= */
@media (prefers-reduced-motion: reduce) {
  .fc-card, .fc-seg .pill, .fc-word, .fc-grade, .fc-banner, .fc-lightbox img { transition: none !important; animation: none !important; }
}
