:root {
  --ink: #1f1a17;
  --ink2: #5a514a;
  --paper: #f6f2ec;
  --card: #fffdf9;
  --line: #e4dcd1;
  --red: #b3261e;
  --red2: #8c1d17;
  --gold: #a47a3c;
  --shadow: 0 10px 30px rgba(40, 25, 15, .12);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { width: 100%; height: 100%; overflow: hidden; background: #111; }
body { font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans SC", sans-serif; color: var(--ink); }
button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }

/* 固定 1920×1080 舞台，按屏幕等比缩放 */
#stage {
  position: absolute; left: 50%; top: 50%;
  width: 1920px; height: 1080px;
  transform-origin: 0 0;
  background: var(--paper);
  display: grid; grid-template-rows: 96px 1fr 120px;
  overflow: hidden;
}

/* 顶栏 */
.top { display: flex; align-items: center; gap: 32px; padding: 0 48px; background: var(--card); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: baseline; gap: 16px; white-space: nowrap; }
.brand b { font-size: 34px; color: var(--red); letter-spacing: .12em; font-family: "SimSun", "Songti SC", serif; }
.brand span { font-size: 26px; color: var(--ink2); }
.steps { flex: 1; display: flex; justify-content: center; gap: 4px; }
.steps button { font-size: 22px; padding: 10px 16px; white-space: nowrap; border-radius: 999px; color: var(--ink2); display: flex; align-items: center; gap: 10px; }
.steps button i { font-style: normal; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--line); font-size: 20px; }
.steps button.cur { background: var(--red); color: #fff; }
.steps button.cur i { background: rgba(255,255,255,.25); }
.steps button.done i { background: var(--gold); color: #fff; }
.grade { font-size: 22px; color: var(--ink2); white-space: nowrap; }

/* 主区 */
.view { position: relative; overflow: hidden; }
.view > * { animation: fade .45s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* 全幅照片场景 */
.scene { position: absolute; inset: 0; }
.scene img.bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.scene .shade { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(15,10,8,.78) 0%, rgba(15,10,8,.45) 45%, rgba(15,10,8,0) 75%); }
.scene .txt { position: absolute; left: 96px; top: 50%; transform: translateY(-50%); width: 900px; color: #fff; }
.scene h1 { font-family: "SimSun", "Songti SC", serif; font-size: 120px; letter-spacing: .16em; line-height: 1.1; }
.scene .sub { font-size: 32px; margin-top: 20px; opacity: .9; }
.scene .credit { font-size: 24px; margin-top: 12px; opacity: .75; }
.scene .q { margin-top: 56px; font-size: 40px; line-height: 1.6; padding-left: 28px; border-left: 6px solid var(--red); }
.scene .q small { display: block; font-size: 26px; opacity: .8; margin-top: 8px; }
.scene .row { margin-top: 40px; }

/* 双栏 */
/* 教学页：照片铺满做背景，内容放在居中的半透明卡片上 */
.split { position: absolute; inset: 0; }
.split .pic { position: absolute; inset: 0; overflow: hidden; }
.split .pic img { width: 100%; height: 100%; object-fit: cover; filter: brightness(.82); transition: opacity .5s; }
.split .pic::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(20,12,8,.25) 0%, rgba(20,12,8,.35) 70%, rgba(20,12,8,.7) 100%); }
/* 诗句放在卡片下方居中，像画作的题签 */
.split .pic .cap { position: absolute; z-index: 1; left: 0; right: 0; bottom: 22px; text-align: center; color: #fff; font-family: "SimSun", "Songti SC", serif; font-size: 28px; letter-spacing: .3em; text-shadow: 0 2px 12px rgba(0,0,0,.6); }
/* 内容卡片水平居中；标题固定在顶部，其余内容在剩余空间里垂直居中 */
.split .body { position: absolute; z-index: 2; left: 50%; transform: translateX(-50%); width: 1600px; top: 28px; bottom: 76px; padding: 44px 72px;
  overflow: hidden; display: flex; flex-direction: column; gap: 24px;
  background: rgba(250,246,240,.95); border-radius: 24px; box-shadow: 0 24px 60px rgba(0,0,0,.35); }
.split .body > :first-child { padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.split .body:not(.grid) > :nth-child(2) { margin-top: auto; }
.split .body:not(.grid) > :last-child { margin-bottom: auto; }
.split .body h2 { display: flex; align-items: baseline; }
.split .body h2::before { content: ""; width: 8px; height: 40px; background: var(--red); border-radius: 4px; margin-right: 20px; align-self: center; }
.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.cols > div { display: flex; flex-direction: column; gap: 24px; }
.split .body .card { box-shadow: none; }

h2 { font-size: 44px; font-weight: 700; }
h2 small { font-size: 26px; color: var(--ink2); font-weight: 400; margin-left: 16px; }
.lead { font-size: 30px; color: var(--ink2); line-height: 1.6; }

.btn { font-size: 26px; padding: 16px 40px; border-radius: 12px; background: var(--red); color: #fff; box-shadow: var(--shadow); }
.btn:hover { background: var(--red2); }
.btn.ghost { background: var(--card); color: var(--ink); border: 1px solid var(--line); box-shadow: none; }
.btn.light { background: rgba(255,255,255,.16); color: #fff; border: 1px solid rgba(255,255,255,.5); box-shadow: none; }
.btn:disabled { opacity: .35; cursor: default; }
.row { display: flex; gap: 20px; flex-wrap: wrap; align-items: center; }
/* 卡片与标签 */
.card { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 28px 32px; box-shadow: var(--shadow); }
.tag { display: inline-block; font-size: 22px; color: var(--gold); letter-spacing: .1em; margin-bottom: 10px; }
.hint { font-size: 24px; color: var(--ink2); line-height: 1.6; }

/* 情绪词 */
.moods { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.mood { font-size: 34px; padding: 22px 0; border-radius: 14px; background: var(--card); border: 2px solid var(--line); }
.mood.on { border-color: var(--red); color: var(--red); background: #fdf0ee; }
.mood.fit { border-color: var(--gold); }
.mood.fit::after { content: " ✓"; }
.mood.miss { opacity: .45; }

/* 歌词 */
.lyrics { display: flex; flex-direction: column; gap: 6px; }
.lyrics .ln { font-family: "SimSun", "Songti SC", serif; font-size: 54px; letter-spacing: .14em; padding: 8px 28px; border-radius: 12px; transition: background .3s; }
.lyrics .ln.cur { background: #fdf0ee; }
.lyrics em { font-style: normal; color: var(--gold); }
.lyrics strong { color: var(--red); }
.lyrics .br { color: var(--gold); font-size: 36px; margin-left: 6px; }

/* 五声柱状图 */
.bars { display: flex; align-items: flex-end; gap: 26px; height: 180px; padding: 0 12px; }
.bar { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 10px; height: 100%; justify-content: flex-end; }
.bar i { display: block; width: 100%; border-radius: 10px 10px 0 0; background: var(--red); transition: height .8s ease; }
.bar.off i { background: #cfc6ba; }
.bar b { font-size: 40px; }
.bar span { font-size: 20px; color: var(--ink2); }
.bar button { width: 100%; }

/* 测验 */
.quiz-q { font-size: 42px; line-height: 1.5; text-align: center; }
.opts { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.opt { text-align: left; font-size: 34px; padding: 30px 36px; border-radius: 14px; background: var(--card); border: 2px solid var(--line); display: flex; gap: 18px; align-items: center; }
.opt .k { width: 52px; height: 52px; border-radius: 50%; background: var(--line); display: grid; place-items: center; flex: none; font-weight: 700; }
.opt.right { border-color: #2e7d4f; background: #edf7f0; }
.opt.right .k { background: #2e7d4f; color: #fff; }
.opt.wrong { border-color: var(--red); background: #fdf0ee; }
.explain { font-size: 28px; line-height: 1.55; color: var(--ink); background: #faf4e8; border-radius: 14px; padding: 22px 28px; }
.qdots { display: flex; gap: 12px; }
.qdots i { width: 16px; height: 16px; border-radius: 50%; background: var(--line); }
.qdots i.on { background: var(--red); }

/* AI 答疑 */
.ask-list { display: flex; flex-direction: column; gap: 14px; }
.ask-item { text-align: left; font-size: 28px; padding: 18px 26px; border-radius: 12px; background: var(--card); border: 1px solid var(--line); }
.ask-item:hover, .ask-item.cur { border-color: var(--red); color: var(--red); }
.ask-input { display: flex; gap: 14px; }
.ask-input input { flex: 1; font: inherit; font-size: 28px; padding: 16px 22px; border-radius: 12px; border: 1px solid var(--line); background: #fff; }
.answer { flex: 1; font-size: 29px; line-height: 1.6; overflow: auto; }
.answer .who { font-size: 22px; color: var(--gold); letter-spacing: .1em; margin-bottom: 12px; }
.answer .src { margin-top: 18px; font-size: 20px; color: var(--ink2); }

/* 底栏播放器 */
.bottom { display: flex; align-items: center; gap: 40px; padding: 0 48px; background: var(--card); border-top: 1px solid var(--line); }
.player { flex: 1; display: flex; align-items: center; gap: 22px; }
.pbtn { width: 120px; font-size: 26px; padding: 14px 0; border-radius: 12px; background: var(--ink); color: #fff; }
.plabel { font-size: 24px; width: 380px; color: var(--ink2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ptrack { flex: 1; height: 14px; border-radius: 7px; background: var(--line); position: relative; cursor: pointer; }
.pseg { position: absolute; top: 0; bottom: 0; background: rgba(179,38,30,.25); border-radius: 7px; }
.pfill { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: var(--red); border-radius: 7px; }
.ptime { font-size: 22px; color: var(--ink2); width: 150px; text-align: right; font-variant-numeric: tabular-nums; }
.nav { display: flex; gap: 16px; }

/* 学唱与创编 */
.sing-line { font-family: "SimSun", "Songti SC", serif; font-size: 64px; letter-spacing: .16em; }
.sing-line em { font-style: normal; color: var(--gold); }
.sing-line strong { color: var(--red); }
.btn.on { background: var(--ink); }
.meter { font-size: 24px; color: var(--ink2); }
.sing-grid { flex: 1; min-height: 0; display: grid; grid-template-columns: 580px 1fr; gap: 24px; }
.sing-grid .answer { font-size: 28px; }
.rubric { display: flex; flex-direction: column; gap: 18px; margin-top: 6px; }
.rr { display: grid; grid-template-columns: 70px 1fr auto; align-items: center; gap: 14px; }
.rk { font-size: 28px; font-weight: 700; }
.rs { font-size: 21px; color: var(--ink2); white-space: nowrap; }
.lv { display: flex; align-items: center; gap: 6px; font-size: 22px; color: var(--ink2); }
.lv i { width: 16px; height: 16px; border-radius: 50%; background: var(--line); }
.lv i.on { background: var(--red); }
.lv b { width: 52px; text-align: right; font-weight: 400; }
.lv3 b { color: var(--red); font-weight: 700; }
.frame { font-family: "SimSun", "Songti SC", serif; font-size: 52px; letter-spacing: .14em; display: flex; align-items: baseline; gap: 6px; }
.frame em { font-style: normal; color: var(--gold); }
.frame .fx { color: #b7ab9c; }
.frame .eg { font-family: "Microsoft YaHei", sans-serif; font-size: 24px; letter-spacing: 0; color: var(--ink2); margin-left: 40px; }
.better { margin-top: 14px; padding: 12px 18px; border-left: 4px solid var(--gold); background: #faf4e8; font-size: 26px; }
.works { display: flex; flex-wrap: wrap; gap: 12px; min-height: 0; }
.work { font-size: 22px; padding: 8px 16px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); }
.work i { font-style: normal; margin-left: 10px; color: var(--red); font-size: 18px; }

/* 单栏页面：说明、按钮行、提示文字统一居中 */
.split .body:not(.grid) > .row:not(:first-child), #qr { justify-content: center; }
.split .body:not(.grid) > .lead, .split .body:not(.grid) > .hint, .sing-line { text-align: center; }
.frame { justify-content: center; }
#qb > #ex .explain { text-align: center; }
/* 内容较多的页面压缩纵向空间，避免底部被裁 */
.split .body { padding: 36px 72px; gap: 18px; }
.split .body > :first-child { padding-bottom: 14px; }
.bars { height: 140px; }
.bar b { font-size: 34px; }
.bar span { font-size: 18px; }
.split .body .card { padding: 22px 30px; }
.frame { font-size: 44px; }
.sing-line { font-size: 56px; }
.sing-grid .answer { font-size: 26px; line-height: 1.55; }
.better { font-size: 24px; margin-top: 10px; padding: 8px 16px; }
.answer .src { margin-top: 10px; }
.bars { height: 190px; }
.bar i { flex-shrink: 0; }
.bars { height: 170px; margin-top: 8px; }
.split .body:not(.grid) > * { flex-shrink: 0; }
.split .body > .sing-grid { flex-shrink: 1; }
.bars { height: 200px; }
