/* 祺祺围棋乐园 —— 温暖棋童风 */
* { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --wood: #eec27d;
  --ink: #3d2b16;
  --accent: #e8743b;
  --accent-dark: #c95a26;
  --green: #4a9e5c;
  --red: #d33;
  --green-deep: #1a7f37;
  --info: #5a7bb8;
  --toast-bg: #444;
  --bg: #fdf6e9;
  --card: #ffffff;
  --shadow: 0 4px 14px rgba(90, 61, 30, 0.12);
}
body {
  font-family: "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", sans-serif;
  background: var(--bg); color: var(--ink); min-height: 100vh;
}

/* 顶部导航 */
#topnav {
  display: flex; align-items: center; gap: 20px; flex-wrap: wrap;
  padding: 12px 24px; background: linear-gradient(90deg, #7a4a1f, #96612c);
  color: #fff; position: sticky; top: 0; z-index: 50; box-shadow: var(--shadow);
  padding-top: calc(12px + env(safe-area-inset-top)); /* iOS 刘海适配 */
  padding-left: calc(24px + env(safe-area-inset-left));
  padding-right: calc(24px + env(safe-area-inset-right));
}
#topnav .brand { font-size: 20px; font-weight: 700; letter-spacing: 1px; }
#topnav nav { display: flex; gap: 4px; flex-wrap: wrap; }
#topnav nav a {
  color: rgba(255,255,255,0.85); text-decoration: none; padding: 7px 13px;
  border-radius: 18px; font-size: 15px; transition: all .2s;
  display: inline-flex; align-items: center; min-height: 44px; /* 触屏目标达标 */
}
#topnav nav a:hover { background: rgba(255,255,255,0.15); }
#topnav nav a.active { background: var(--accent); color: #fff; font-weight: 600; }
.engine-badge { margin-left: auto; font-size: 12px; background: rgba(0,0,0,0.25); padding: 5px 12px; border-radius: 14px; }

/* 顶部导航收起/展开：收起后导航完全隐藏不占顶部空间，只在页面右侧留一个悬浮展开箭头 */
#nav-toggle {
  background: rgba(255,255,255,0.18); border: none; color: #fff; cursor: pointer;
  font-size: 20px; font-weight: 900; line-height: 1; border-radius: 12px;
  padding: 8px 16px; min-height: 44px; transition: background .2s;
}
#nav-toggle:hover { background: rgba(255,255,255,0.32); }
#nav-fab {
  display: none; position: fixed; right: 6px; top: 42%; z-index: 60;
  background: linear-gradient(135deg, #7a4a1f, #96612c); color: #fff; border: none; cursor: pointer;
  font-size: 22px; font-weight: 900; line-height: 1; border-radius: 14px 0 0 14px;
  padding: 16px 10px 16px 14px; box-shadow: var(--shadow);
}
body.nav-collapsed #topnav { display: none; } /* 完全隐藏，不占顶部空间 */
body.nav-collapsed #nav-fab { display: block; }

main { max-width: 1080px; margin: 0 auto; padding: 24px 20px 60px; }
.loading { text-align: center; padding: 80px; color: #999; font-size: 18px; }

/* 卡片与按钮 */
.card { background: var(--card); border-radius: 16px; padding: 22px; box-shadow: var(--shadow); margin-bottom: 18px; }
.btn {
  display: inline-block; border: none; cursor: pointer; border-radius: 22px;
  padding: 10px 22px; font-size: 15px; font-weight: 600; font-family: inherit;
  background: var(--accent); color: #fff; transition: all .15s; text-decoration: none;
}
.btn:hover { background: var(--accent-dark); transform: translateY(-1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.btn.secondary { background: #eee0c8; color: var(--ink); }
.btn.secondary:hover { background: #e2d0b0; }
.btn.green { background: var(--green); }
.btn.small { padding: 6px 14px; font-size: 13px; }

h1.page-title { font-size: 26px; margin-bottom: 6px; }
p.page-sub { color: #9a7b52; margin-bottom: 20px; font-size: 14px; }

/* 今日任务 */
.greet { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.greet .face { font-size: 46px; }
.greet h1 { font-size: 24px; }
.progress-bar { height: 12px; background: #f0e4cc; border-radius: 6px; overflow: hidden; margin-top: 10px; }
.progress-bar > div { height: 100%; background: linear-gradient(90deg, #f6a53a, var(--accent)); border-radius: 6px; transition: width .5s; }
.task-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.task-card {
  background: var(--card); border-radius: 14px; padding: 18px 20px; box-shadow: var(--shadow);
  display: flex; align-items: center; gap: 14px; cursor: pointer; transition: all .15s; border: 2px solid transparent;
}
.task-card:hover { transform: translateY(-2px); border-color: var(--accent); }
.task-card.done { opacity: .62; }
.task-card .icon { font-size: 30px; }
.task-card .t-title { font-size: 15px; font-weight: 600; }
.task-card .t-status { font-size: 12px; color: #9a7b52; margin-top: 3px; }
.task-card.done .t-status { color: var(--green); font-weight: 700; }

/* 棋盘布局 */
.play-layout { display: flex; gap: 22px; align-items: flex-start; flex-wrap: wrap; }
.board-wrap { background: var(--card); padding: 14px; border-radius: 16px; box-shadow: var(--shadow); }
canvas.goban { display: block; border-radius: 8px; width: min(640px, 100%); height: auto; }
.side-panel { flex: 1; min-width: 260px; display: flex; flex-direction: column; gap: 14px; }
.cap-row { display: flex; justify-content: space-between; font-size: 15px; padding: 6px 2px; }
.controls { display: flex; gap: 10px; flex-wrap: wrap; }

.setup-form label { display: block; margin: 14px 0 6px; font-weight: 600; font-size: 15px; }
.setup-form select, .setup-form input {
  width: 100%; padding: 10px 12px; border-radius: 10px; border: 2px solid #e8d9bd;
  font-size: 15px; font-family: inherit; background: #fffdf7;
}
.thinking { color: #9a7b52; font-size: 14px; padding: 8px 0; }

/* 棋谱列表 */
.game-item { display: flex; align-items: center; gap: 12px; padding: 14px 6px; border-bottom: 1px solid #f0e4cc; cursor: pointer; border-radius: 8px; }
.game-item:hover { background: #fdf3e0; }
.game-item .vs { font-weight: 600; font-size: 15px; }
.game-item .meta { color: #9a7b52; font-size: 12px; margin-top: 3px; }
.game-item .src { margin-left: auto; font-size: 12px; background: #f0e4cc; padding: 3px 10px; border-radius: 10px; }
textarea.sgf-input {
  width: 100%; min-height: 110px; border-radius: 10px; border: 2px solid #e8d9bd;
  padding: 12px; font-family: monospace; font-size: 13px; background: #fffdf7; resize: vertical;
}

/* 复盘 */
.review-nav { display: flex; align-items: center; gap: 10px; margin-top: 14px; flex-wrap: wrap; }
.review-nav input[type=range] { flex: 1; min-width: 140px; accent-color: var(--accent); }
.analysis-box { background: #fffcf4; border: 2px dashed #e8d9bd; border-radius: 12px; padding: 18px; margin-top: 14px; line-height: 1.8; font-size: 15px; white-space: pre-wrap; }
.analysis-box h1, .analysis-box h2, .analysis-box h3, .analysis-box h4 { margin: 12px 0 6px; }
.coach-picker { display: flex; gap: 10px; flex-wrap: wrap; margin: 10px 0; }

/* 教练 */
.coach-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.coach-card { background: var(--card); border-radius: 16px; padding: 20px; box-shadow: var(--shadow); cursor: pointer; transition: all .15s; border: 2px solid transparent; }
.coach-card:hover { transform: translateY(-3px); border-color: var(--accent); }
.coach-card .avatar { font-size: 42px; }
.coach-card .c-name { font-size: 17px; font-weight: 700; margin: 8px 0 4px; }
.coach-card .c-model { font-size: 12px; color: #9a7b52; }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 5px; }
.dot.on { background: var(--green); }
.dot.off { background: #d3b98a; }
.model-group-title { font-size: 15px; color: #9a7b52; margin: 20px 0 10px; font-weight: 700; }

/* 对话 */
.chat-box { display: flex; flex-direction: column; gap: 12px; max-height: 420px; overflow-y: auto; padding: 6px 2px; }
.msg { max-width: 78%; padding: 12px 16px; border-radius: 16px; line-height: 1.65; font-size: 15px; white-space: pre-wrap; }
.msg.user { align-self: flex-end; background: var(--accent); color: #fff; border-bottom-right-radius: 4px; }
.msg.bot { align-self: flex-start; background: #f4ead3; border-bottom-left-radius: 4px; }
.chat-input { display: flex; gap: 10px; margin-top: 14px; }
.chat-input input { flex: 1; padding: 12px 16px; border-radius: 24px; border: 2px solid #e8d9bd; font-size: 15px; font-family: inherit; }

/* 课程 */
.course-item { display: flex; align-items: center; gap: 14px; padding: 15px 6px; border-bottom: 1px solid #f0e4cc; cursor: pointer; border-radius: 8px; }
.course-item:hover { background: #fdf3e0; }
.course-item .topic-tag { font-size: 12px; background: #e8f0e4; color: var(--green); padding: 3px 10px; border-radius: 10px; }
.course-content { line-height: 2; font-size: 16px; white-space: pre-wrap; background: #fffcf4; border-radius: 12px; padding: 20px; }

/* 背谱 */
.kifu-item { display: flex; align-items: center; gap: 12px; padding: 14px 6px; border-bottom: 1px solid #f0e4cc; cursor: pointer; border-radius: 8px; }
.kifu-item:hover { background: #fdf3e0; }
.stars { color: #f6a53a; }
.kifu-status { margin-left: auto; font-size: 13px; color: #9a7b52; }
.kifu-status.done { color: var(--green); font-weight: 700; }
.quiz-banner { text-align: center; font-size: 17px; font-weight: 600; padding: 10px; }
.quiz-banner.ok { color: var(--green); }
.quiz-banner.bad { color: var(--red); animation: shake .4s; }
@keyframes shake { 0%,100%{transform:translateX(0)} 25%{transform:translateX(-6px)} 75%{transform:translateX(6px)} }

/* Toast */
#toast-container { position: fixed; top: 70px; right: 24px; z-index: 999; display: flex; flex-direction: column; gap: 8px; }
.toast {
  background: var(--toast-bg); color: #fff; padding: 12px 20px; border-radius: 12px; font-size: 14px;
  opacity: 0; transform: translateY(-8px); transition: all .25s; max-width: 340px; box-shadow: var(--shadow);
}
.toast.show { opacity: 1; transform: translateY(0); }
.toast-success { background: var(--green); }
.toast-info { background: var(--info); }

/* iPad / 窄屏适配 */
@media (max-width: 960px) {
  main { padding: 16px 12px 60px; }
  #topnav { gap: 10px; }
  #topnav .brand { font-size: 17px; }
  .play-layout { flex-direction: column; }
  .board-wrap { width: 100%; }
  canvas.goban { width: 100%; }
  .side-panel { width: 100%; min-width: 0; }
  .task-grid { grid-template-columns: 1fr; }
  .coach-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
  .btn { min-height: 44px; }
}

/* 家长报表 */
.stat-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 14px; margin-bottom: 18px; }
.stat-card { background: var(--card); border-radius: 14px; padding: 18px 12px; box-shadow: var(--shadow); text-align: center; overflow: hidden; }
.stat-card .num { font-size: 26px; font-weight: 800; color: var(--accent-dark); line-height: 1.3; word-break: break-word; }
.stat-card .num.long { font-size: 16px; font-weight: 700; } /* 长文本（心情/正确率组合）自动降字号 */
.stat-card .sub { font-size: 12px; color: #9a7b52; margin-top: 2px; }
.stat-card .lbl { font-size: 13px; color: #9a7b52; margin-top: 4px; }
.bars { display: flex; align-items: flex-end; gap: 6px; height: 140px; padding: 10px 4px 0; overflow-x: auto; }
.bar-col { flex: 1 0 22px; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; }
.bar { width: 100%; max-width: 34px; background: linear-gradient(180deg, #f6a53a, var(--accent)); border-radius: 6px 6px 0 0; min-height: 3px; }
.bar-lbl { font-size: 10px; color: #9a7b52; margin-top: 5px; }
.day-detail summary:hover { color: var(--accent-dark); }

/* 奥特曼化：能量条 / 跳步按钮 / 口头禅 */
.xp-card { background: linear-gradient(120deg, #fff8ec, #fdf0dc); border: 2px solid #f0d9b5; }
.xp-bar { background: #f0dfc0; }
.xp-bar > div { background: linear-gradient(90deg, #ffd34d, #f6a53a, #e8743b); }
.move-chip {
  display: inline-block; border: 2px solid var(--accent); color: var(--accent-dark);
  background: #fff3e6; border-radius: 14px; padding: 2px 10px; margin: 0 2px;
  font-size: 14px; font-weight: 700; cursor: pointer; min-height: 32px;
}
.move-chip:hover { background: var(--accent); color: #fff; }
.c-catchphrase { font-size: 12px; color: var(--accent-dark); margin-top: 6px; }
.roadmap-card { border-left: 6px solid var(--accent); }

/* 口诀道场（DeepSeek 场馆） */
.mantra-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
.mantra-card {
  background: linear-gradient(135deg, #eaf1ff, #dbe7ff); border: 2px solid #b9cffc;
  border-radius: 14px; padding: 16px 12px; text-align: center; cursor: pointer;
  transition: transform .15s; min-height: 44px;
}
.mantra-card:hover { transform: translateY(-2px); }
.mantra-card .m-verse { font-weight: 800; font-size: 16px; color: #2b4ea2; }
.mantra-card .m-star { font-size: 12px; color: #9a7b52; margin-top: 6px; }
.mantra-card.glow { animation: mantraGlow 1s ease; }
@keyframes mantraGlow {
  0% { box-shadow: 0 0 0 rgba(90,140,255,0); }
  40% { box-shadow: 0 0 24px rgba(90,140,255,0.9); border-color: #3a6fd8; }
  100% { box-shadow: 0 0 0 rgba(90,140,255,0); }
}
.monster-row { display: flex; gap: 14px; align-items: center; margin-bottom: 12px; }
.monster { font-size: 44px; }
.quiz-verse { font-size: 22px; font-weight: 800; color: #2b4ea2; letter-spacing: 2px; }
.quiz-verse .blank { color: var(--accent-dark); border-bottom: 3px solid var(--accent); padding: 0 4px; }
.quiz-opts { display: flex; gap: 10px; flex-wrap: wrap; }

/* 激战星云（Gemini 场馆） */
.gem-card { background: linear-gradient(135deg, #ffe9e4, #ffd9d2); border-color: #f0b3a8; }
.gem-card .m-verse { color: #a23325; }
.gem-card.shattered { opacity: 0.75; border-color: #7fc98f; background: linear-gradient(135deg, #eefbea, #dcf5e0); animation: shatter .5s ease; }
@keyframes shatter {
  0% { transform: scale(1); } 30% { transform: scale(1.12) rotate(2deg); }
  60% { transform: scale(0.94) rotate(-2deg); } 100% { transform: scale(1); }
}
.medal {
  background: #f5f0e8; border: 2px solid #e0d5c0; border-radius: 14px;
  padding: 14px 18px; text-align: center; min-width: 130px; opacity: 0.7;
}
.medal.got { background: linear-gradient(135deg, #fff3d6, #ffe6b0); border-color: #f0c75e; opacity: 1; box-shadow: 0 0 14px rgba(240, 199, 94, 0.5); }

/* 光之侦探所（Qwen 场馆） */
.qwen-card { background: linear-gradient(135deg, #e2f6f2, #d2efe9); border-color: #a8ddd3; }
.qwen-card .m-verse { color: #1a6e63; }
.qwen-card.solved { opacity: 0.75; border-color: #7fc98f; background: linear-gradient(135deg, #eefbea, #dcf5e0); }

/* 月光花园（Kimi 场馆） */
.breath-wrap { display: flex; justify-content: center; margin: 10px 0; }
.breath-circle {
  width: 110px; height: 110px; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #fdf6d8, #e8d48a);
  display: flex; align-items: center; justify-content: center; font-size: 40px;
  box-shadow: 0 0 18px rgba(230, 210, 140, 0.8);
  transition: transform 3s ease-in-out;
}
.breath-circle.inhale { transform: scale(1.45); box-shadow: 0 0 34px rgba(240, 220, 150, 1); }
.breath-circle.exhale { transform: scale(0.85); box-shadow: 0 0 10px rgba(200, 190, 150, 0.6); }

/* 盖亚积木城（Sol 场馆） */
.pair-board { max-width: 210px; }

/* 光之提问训练场（HY4 场馆） */
.hy4-card { background: linear-gradient(135deg, #e6ecfc, #d8e1f8); border-color: #b3c2f0; }
.hy4-card .m-verse { color: #2b48a2; }
.big-answer { font-size: 18px; padding: 14px 18px; min-height: 52px; }
.hint-pulse { animation: hintPulse 0.9s ease infinite; border-color: #f0c75e !important; }
@keyframes hintPulse {
  0%, 100% { box-shadow: 0 0 0 rgba(240, 199, 94, 0); }
  50% { box-shadow: 0 0 18px rgba(240, 199, 94, 0.95); }
}

/* 银河星之域（MiniMax 场馆） */
.mm-card { background: linear-gradient(135deg, #ece4fb, #e0d4f6); border-color: #c4b0ea; }
.mm-card .m-verse { color: #5a35a2; }
.mm-card.cleared { opacity: 0.8; border-color: #f0c75e; background: linear-gradient(135deg, #fff6dc, #ffefc4); }

/* 诺亚时空道场（豆包场馆） */
.crystal { font-size: 56px; animation: crystalBreath 3.2s ease-in-out infinite; display: inline-block; }
@keyframes crystalBreath {
  0%, 100% { transform: scale(1); filter: drop-shadow(0 0 6px rgba(138, 143, 216, 0.5)); }
  50% { transform: scale(1.12); filter: drop-shadow(0 0 20px rgba(138, 143, 216, 0.95)); }
}
.db-card { background: linear-gradient(135deg, #e9e9fb, #dcdcf5); border-color: #b8bce8; }
.db-card .m-verse { color: #4a4ea2; }
.db-card.foreseen { opacity: 0.8; border-color: #f0c75e; background: linear-gradient(135deg, #fff6dc, #ffefc4); }

/* 光芒觉醒馆（MiMo 场馆） */
.breathe { animation: btnBreath 2.6s ease-in-out infinite; }
@keyframes btnBreath {
  0%, 100% { box-shadow: 0 2px 6px rgba(216, 176, 45, 0.25); }
  50% { box-shadow: 0 2px 18px rgba(216, 176, 45, 0.75); }
}
.mm2-card { background: linear-gradient(135deg, #fdf6e0, #f9edc4); border-color: #ecd68e; }
.mm2-card .m-verse { color: #9a7a1a; }
.mm2-card.lit { border-color: #f0c75e; box-shadow: 0 0 14px rgba(240, 199, 94, 0.6); }
.light-burst {
  position: fixed; inset: 0; z-index: 999; display: flex; flex-direction: column;
  align-items: center; justify-content: center; pointer-events: none;
  background: radial-gradient(circle, rgba(255, 226, 122, 0.9), rgba(216, 176, 45, 0.55));
  font-size: 64px; color: #8a6a10;
  animation: burstIn 2.6s ease forwards;
}
@keyframes burstIn {
  0% { opacity: 0; transform: scale(0.6); }
  15% { opacity: 1; transform: scale(1.05); }
  80% { opacity: 1; transform: scale(1); }
  100% { opacity: 0; transform: scale(1.1); }
}

/* 奥特曼试炼之路 */
.trial-map { display: flex; gap: 10px; overflow-x: auto; padding: 6px 2px; }
.trial-node {
  min-width: 118px; text-align: center; padding: 12px 8px; border-radius: 14px;
  border: 2px solid var(--line); background: #faf7f0; flex-shrink: 0;
}
.trial-node .t-icon { font-size: 28px; }
.trial-node .t-title { font-size: 12px; font-weight: 700; margin-top: 4px; }
.trial-node .t-sub { font-size: 11px; color: #9a7b52; margin: 2px 0 6px; }
.trial-node.passed { border-color: #f0c75e; background: linear-gradient(135deg, #fff6dc, #ffefc4); }
.trial-node.active { border-color: #d8b02d; background: linear-gradient(135deg, #fdf3d8, #f9e7b8); box-shadow: 0 0 12px rgba(216, 176, 45, 0.5); animation: btnBreath 2.6s ease-in-out infinite; }
.trial-node.locked { opacity: 0.55; }
.t-enter { padding: 4px 10px; font-size: 12px; }

/* 杰克实验舱（Grok 场馆） */
.gk-card { background: linear-gradient(135deg, #fbe9e9, #f6d9d9); border-color: #e8b3b3; }
.gk-card .m-verse { color: #a23a3a; }
.glow-btn { animation: btnGlow 2.2s ease-in-out infinite; }
@keyframes btnGlow {
  0%, 100% { box-shadow: 0 0 6px rgba(201, 74, 74, 0.4); }
  50% { box-shadow: 0 0 18px rgba(201, 74, 74, 0.85); }
}
.glow-btn.glow-blue { animation: btnGlowBlue 2.2s ease-in-out infinite; }
@keyframes btnGlowBlue {
  0%, 100% { box-shadow: 0 0 6px rgba(58, 90, 216, 0.4); }
  50% { box-shadow: 0 0 18px rgba(58, 90, 216, 0.85); }
}
.quiz-banner.discover { background: linear-gradient(135deg, #ede9fb, #e0d9f6); color: #5a35a2; border-color: #c4b0ea; }

/* 简单 markdown */
.md { line-height: 1.85; font-size: 15px; }
.md h2 { font-size: 19px; margin: 14px 0 8px; }
.md h3 { font-size: 16px; margin: 12px 0 6px; color: var(--accent-dark); }
.md p { margin: 6px 0; }
.md li { margin-left: 22px; }

/* 棋风对弈页 iPad 横屏单屏布局（fit-board，仅 style-arena 对弈页使用，不影响其它页面） */
/* 禁滚要 html+body 双锁（iOS Safari 单锁 body 仍有橡皮筋滚动），JS 再加 touchmove 拦截兜底 */
html:has(body.fit-lock), html.fit-lock, body.fit-lock { overflow: hidden; height: 100%; overscroll-behavior: none; }
body.fit-lock main { overflow: hidden; }
.fit-board { flex-wrap: nowrap; align-items: flex-start; gap: 12px; }
.fit-board .board-wrap { padding: 10px; flex: none; }
.fit-board canvas.goban { border-radius: 8px; touch-action: none; } /* 棋盘上双指/单指滑动不触发页面滚动 */
.fit-board .side-panel {
  width: 200px; flex: none; display: flex; flex-direction: column; gap: 8px;
  justify-content: flex-start;
}
.fit-board .sa-coach-mini { margin: 0; padding: 8px 12px; font-size: 12px; } /* 棋手信息紧凑卡 */
.fit-board .sa-actions { display: flex; flex-direction: column; gap: 8px; } /* 功能键统一在右侧信息区底部 */
.fit-board .sa-actions .btn { width: 100%; min-height: 44px; }
@media (max-width: 899px) { /* 窄屏回退：纵向排列 */
  .fit-board { flex-wrap: wrap; }
  .fit-board .side-panel { width: 100%; }
}

/* ===== 复盘页优化（2026-09-14，仅 coach-review 使用，.cr- 前缀不影响其它页面） ===== */
.cr-navrow { display: flex; gap: 6px; }
.fit-board .sa-actions .cr-navrow .btn { flex: 1; min-height: 38px; padding: 6px 4px; font-size: 13px; width: auto; }
.cr-progress { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.cr-progress input[type=range] { flex: 1; -webkit-appearance: none; appearance: none; height: 8px; border-radius: 6px; background: #e5d5b8; cursor: pointer; touch-action: pan-x; }
.cr-progress input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 24px; height: 24px; border-radius: 50%; background: #d88b4a; border: 3px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.25); }
.cr-progress input[type=range]::-moz-range-thumb { width: 22px; height: 22px; border-radius: 50%; background: #d88b4a; border: 3px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.25); }
.cr-progress-label { flex: none; font-size: 12px; font-weight: 700; color: #8a5a20; min-width: 84px; text-align: right; }
#cr-side, #cr-chat-box { min-height: 0; }
#cr-side { overflow-y: auto; flex: 1; }
#cr-chat-box { flex: 1; display: flex; flex-direction: column; }
#cr-chat-box[style*="none"] { display: none; } /* 隐藏态优先 */

/* 教练朗读钮（coach-tts.js，仅点击播放） */
.tts-btn { display: inline-flex; align-items: center; justify-content: center; min-width: 36px; min-height: 36px; margin: 4px 0 0 6px; padding: 0; border: none; background: transparent; font-size: 16px; cursor: pointer; vertical-align: bottom; opacity: .85; }
.tts-btn:active { transform: scale(1.15); }
.tts-btn[data-tts="playing"] { opacity: 1; }
