/* 两个模块共用的学习页框架（单词设计第 8、9.2 节；设计稿 docs/backup/assets/ui-references/vocab-module-design.html v2）：
   底部三个标签、做题页（顶部进度条和关闭、中间一道题、底部位置固定的唯一按钮）、答对反馈行、答错红条、结束页、连续天数。
   只引用 tokens.css 的变量；设计稿的红 #E5484D、橙 #E8590C 不在 tokens 里，按 ui-style.md 用 --c-bad、--c-warn-text（docs/02_design/vocab.md「原 vocab-batch2-frame-and-pages.md」一章第 4 节）。
   单词批 2 先给单词页用；句型模块迁移是单独一批。 */

.lf-app { height: 100dvh; max-width: 480px; margin: 0 auto; display: flex; flex-direction: column; position: relative; overflow: hidden; }

/* 顶部：关闭、进度条、单元名 */
.lf-top { flex: none; height: 56px; padding: 0 var(--sp-4) 0 var(--sp-2); display: flex; align-items: center; gap: var(--sp-3); }
.lf-scene { flex: none; max-width: 40%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--fs-small); color: var(--c-text-2); }

/* 中间一道题（Steven 11-06：题目刚出来一屏放下，不出滚动条）：
   题卡在题目区里上下居中用 margin: auto（不用 justify-content: center：放不下时那样会把题卡顶端推到看不见、滚不回去的地方）；
   题卡最高就是题目区的高度，矮下来的部分由图（.vq-vis，vocab.css）缩小来让；图缩到最小还放不下，才在题卡的白底里面滚，
   题目不会被顶出白底，也滚得回来（作答后红条占了底部，常会这样；vocab-drills.js 答完滚到最下面，先看答案和「再听」）。 */
.lf-main { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; align-items: center; padding: var(--sp-1) var(--sp-4) var(--sp-2); }
.lf-card { width: 100%; max-width: 358px; padding: var(--sp-4); border-radius: var(--r-card); background: var(--c-card); box-shadow: var(--shadow-0);
  display: flex; flex-direction: column; align-items: center; margin: auto 0; min-height: 0; flex: 0 1 auto; overflow-y: auto; container-type: inline-size; }

/* 底部唯一按钮：位置固定，只换颜色和字 */
.lf-foot { flex: none; padding: var(--sp-2) var(--sp-4) var(--sp-5); }
.lf-cta { display: block; width: 100%; height: 52px; border: 0; border-radius: var(--r-pill); background: var(--c-primary); color: #FFFFFF;
  font-size: 17px; font-weight: var(--fw-bold); cursor: pointer; text-decoration: none; text-align: center; line-height: 52px; }
.lf-cta:disabled, .lf-cta.idle { background: var(--c-line); color: var(--c-disabled); cursor: not-allowed; }
.lf-cta.ok { background: var(--c-ok); }
.lf-cta.bad { background: var(--c-bad); }

/* 答对：题目下方的反馈行（不弹条） */
.lf-fb { width: 100%; margin-top: var(--sp-3); display: flex; flex-direction: column; align-items: center; gap: 2px; text-align: center; }
.lf-fb .t { display: flex; align-items: center; gap: 6px; font-weight: var(--fw-bold); color: var(--c-ok-text); }
.lf-fb .t .ico { width: 18px; height: 18px; }
.lf-fb .z { font-size: var(--fs-gloss); color: var(--c-text-2); line-height: 22px; }
.lf-fb .z b { color: var(--c-text); font-size: 18px; }

/* 答错：底部红条（正确答案、中文、一句为什么），占底部按钮的位置（不再浮在题目上面盖住「再听」和选项，Steven 11-06），题目区跟着变矮 */
.lf-sheet { flex: none; position: relative; z-index: 2; padding: 18px var(--sp-4) var(--sp-5); border-radius: var(--r-card) var(--r-card) 0 0;
  background: var(--c-bad-tint); box-shadow: var(--shadow-2); }
.lf-sheet .sh { display: flex; align-items: center; gap: var(--sp-2); font-size: 19px; font-weight: 800; color: var(--c-bad); }
.lf-sheet .sh .ans { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.lf-sheet .sh .icon-btn { flex: none; background: rgba(255, 255, 255, .7); color: var(--c-primary); }
.lf-sheet .sh .icon-btn:disabled { color: var(--c-disabled); }
.lf-sheet .sb { margin: var(--sp-2) 0 14px; font-size: var(--fs-gloss); line-height: 23px; color: var(--c-text); overflow-wrap: anywhere; }
.lf-sheet .sb .k { display: block; color: var(--c-text-2); font-size: var(--fs-small); }

/* 底部三个标签 */
.lf-tabs { flex: none; display: flex; height: 64px; border-top: 1px solid var(--c-line); background: var(--c-card); padding-bottom: env(safe-area-inset-bottom, 0px); }
.lf-tab { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: 12px; color: var(--c-text-2); text-decoration: none; }
.lf-tab[aria-current="page"] { color: var(--c-primary); font-weight: var(--fw-bold); }

/* 首页、「我的」这类非做题页 */
.lf-hd { flex: none; height: 56px; display: flex; align-items: center; gap: 10px; padding: 0 var(--sp-4); }
.lf-ttl { font-size: 24px; font-weight: 800; }
.lf-pill { margin-left: auto; height: 34px; padding: 0 12px; border-radius: var(--r-pill); background: var(--c-card); display: flex; align-items: center; gap: 4px;
  font-size: 15px; font-weight: var(--fw-bold); color: var(--c-warn-text); box-shadow: var(--shadow-0); }
.lf-pill .ico { width: 18px; height: 18px; }
.lf-page { flex: 1; min-height: 0; overflow-y: auto; padding: 0 var(--sp-4) var(--sp-4); }
/* 页脚：和首页底部的 .foot 同一个写法（居中、12px/19px、次要文字色）。只管版权行 p.lf-foot：
   做题页底部按钮那一栏 footer.lf-foot 也叫这个名字，原来被这条加了 24px 的上边距，白白占掉题目区的高度 */
p.lf-foot { margin: var(--sp-5) 0 0; text-align: center; font-size: 12px; line-height: 19px; color: var(--c-text-2); }

/* 电脑宽屏（Steven 11-06：不再把手机的窄屏直接搬到电脑上）：做题页放宽，题卡分两栏（vocab-drills.js 的 splitCard）：
   左边题干（图、句子、短文、大播放钮），右边作答（选项、词块、输入框、兔子乌龟、反馈行）；只有一栏的题型（选项就是图的、翻牌、排序、分类、组词）居中放大。
   断点 900：小于它的平板竖屏、手机都按手机版；底部按钮和红条不跟着拉到全宽。 */
@media (min-width: 900px) {
  .lf-app.lf-drill { max-width: 1120px; }
  .lf-drill .lf-main { padding: var(--sp-2) var(--sp-6) var(--sp-3); }
  .lf-drill .lf-card { max-width: 960px; padding: 28px 32px; }
  .lf-drill .lf-card.one { max-width: 560px; }
  .lf-drill .lf-card.two { flex-direction: row; align-items: stretch; gap: 40px; }
  .lf-drill .lf-card.two > .vq-l, .lf-drill .lf-card.two > .vq-r { flex: 1 1 0; min-width: 0; min-height: 0; display: flex; flex-direction: column; align-items: center; justify-content: safe center;
    container-type: inline-size; }
  .lf-drill > .lf-foot { width: 100%; max-width: 560px; margin: 0 auto; }
  .lf-drill > .lf-sheet { width: 100%; max-width: 960px; margin: 0 auto; }
}

/* 结束页 */
.lf-end { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 0 var(--sp-5); text-align: center; }
.lf-end .done { width: 120px; height: 120px; border-radius: 50%; background: var(--c-ok-tint); display: grid; place-items: center; }
.lf-end .done > span { width: 76px; height: 76px; border-radius: 50%; background: var(--c-ok); color: #FFFFFF; display: grid; place-items: center; }
.lf-end .done .ico { width: 44px; height: 44px; }
.lf-end h1 { font-size: 26px; font-weight: 800; margin: 20px 0 0; }
.lf-end p { font-size: var(--fs-body); color: var(--c-text-2); margin: var(--sp-2) 0 0; line-height: 24px; }
.lf-stats { width: 100%; display: flex; gap: 10px; margin-top: var(--sp-5); }
.lf-stat { flex: 1; min-width: 0; background: var(--c-card); border-radius: var(--r-card); padding: 14px var(--sp-2); box-shadow: var(--shadow-0); }
.lf-stat .v { font-size: 24px; font-weight: 800; color: var(--c-primary); }
.lf-stat .v.o { color: var(--c-warn-text); }
.lf-stat .t { font-size: 13px; color: var(--c-text-2); margin-top: 2px; }

/* 图标（Lucide，同 base.css 的写法） */
.ico-book-open { --ico: url(/icons/book-open.svg); }
.ico-message-square { --ico: url(/icons/message-square.svg); }
.ico-flame { --ico: url(/icons/flame.svg); }
.ico-lock { --ico: url(/icons/lock.svg); }
.ico-person-standing { --ico: url(/icons/person-standing.svg); }
.ico-volume-2 { --ico: url(/icons/volume-2.svg); }
.ico-delete { --ico: url(/icons/delete.svg); }
