/* 牛牛学堂 · 四年级专属界面（v7） */
:root {
  --chrome-h: 68px; /* 底部导航占位高度：底栏收起时由 JS 置 0 */
  --primary: #FF8A00;
  --primary-light: #FFB74D;
  --accent: #00C48C;
  --blue: #0984E3;
  --green: #00B894;
  --orange: #FDCB6E;
  --red: #D63031;
  --bg: #F7F5F0;
  --card: #FFFFFF;
  --text: #2D3436;
  --muted: #7F8C8D;
  --line: #EDE8DF;
  --radius: 20px;
  --shadow: 0 6px 20px rgba(255, 138, 0, .10);
}
* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; }
body {
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  background: var(--bg); color: var(--text); font-size: 16px;
  overscroll-behavior: none;
}
#app { display: flex; flex-direction: column; height: 100%; max-width: 860px; margin: 0 auto; }
.hidden { display: none !important; }

/* ---------- 顶部标题 ---------- */
.page-head { padding: 18px 20px 8px; }
.page-head h1 { font-size: 24px; }
.page-head .sub { color: var(--muted); font-size: 14px; margin-top: 4px; }

/* ---------- 视图 ---------- */
.view { flex: 1; overflow-y: auto; padding-bottom: calc(var(--chrome-h) + 22px); }
.pad { padding: 12px 16px; }

/* ---------- 底部导航 ---------- */
.tabbar {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 860px; height: 68px;
  background: var(--card); border-top: 1px solid var(--line);
  display: flex; z-index: 50; padding-bottom: env(safe-area-inset-bottom);
}
.tab { flex: 1; border: 0; background: none; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: 12px; color: var(--muted); cursor: pointer; }
.tab .tab-ico { font-size: 24px; }
.tab.active { color: var(--primary); font-weight: 600; }
/* 软键盘弹起时收起底栏（安卓 Chrome 下 fixed 底栏会被键盘盖住，看着像"底栏消失了"） */
html.kb-open .tabbar { display: none !important; }

/* ---------- 通用卡片/按钮 ---------- */
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; margin-bottom: 14px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 0; border-radius: 14px; padding: 12px 20px; font-size: 16px; font-weight: 600;
  background: var(--primary); color: #fff; cursor: pointer; transition: transform .1s;
}
.btn:active { transform: scale(.96); }
.btn.block { width: 100%; }
.btn-outline { background: #fff; color: var(--primary); border: 2px solid var(--primary-light); }
.btn-green { background: var(--green); }
.btn-red { background: var(--red); }
.btn-ghost { background: #EFF0F6; color: var(--text); }
.btn-sm { padding: 8px 14px; font-size: 14px; border-radius: 10px; }
.btn:disabled { opacity: .5; }

/* ---------- 首页 ---------- */
.hero {
  background: linear-gradient(135deg, #FF8A00, #FFA726 60%, #FF7043);
  border-radius: var(--radius); color: #fff; padding: 22px; margin-bottom: 14px;
  box-shadow: var(--shadow);
}
.hero h2 { font-size: 22px; margin-bottom: 6px; }
.hero p { opacity: .9; font-size: 14px; }
.menu-item {
  display: flex; align-items: center; gap: 14px; background: var(--card);
  border-radius: var(--radius); padding: 16px; margin-bottom: 12px; box-shadow: var(--shadow);
  cursor: pointer; border: 0; width: 100%; text-align: left; font-size: 16px;
}
.menu-item:active { transform: scale(.98); }
.menu-ico { width: 46px; height: 46px; border-radius: 14px; display: flex; align-items: center; justify-content: center; font-size: 24px; flex-shrink: 0; }
.menu-txt b { display: block; font-size: 17px; }
.menu-txt span { font-size: 13px; color: var(--muted); }
.menu-arrow { margin-left: auto; color: var(--line); font-size: 20px; }
.stat-chips { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
.chip { background: rgba(255,255,255,.22); border-radius: 999px; padding: 6px 14px; font-size: 13px; }

/* ---------- 学科/类型选择 ---------- */
.subject-tab { display: flex; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
.subject-tab button {
  border: 2px solid var(--line); background: #fff; border-radius: 999px;
  padding: 9px 18px; font-size: 15px; cursor: pointer; color: var(--muted);
}
.subject-tab button.active { border-color: var(--primary); color: var(--primary); font-weight: 600; background: #FFF3E0; }

/* ---------- 答题 ---------- */
.q-card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px; }
.q-progress { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; color: var(--muted); font-size: 14px; }
.q-bar { height: 8px; background: var(--line); border-radius: 999px; overflow: hidden; margin-bottom: 20px; }
.q-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--primary), var(--accent)); border-radius: 999px; transition: width .3s; }
.q-stem { font-size: 20px; line-height: 1.6; margin-bottom: 20px; font-weight: 600; }
.q-oral { font-size: 34px; text-align: center; font-weight: 700; margin: 26px 0; letter-spacing: 2px; }
.opt {
  display: block; width: 100%; text-align: left; border: 2px solid var(--line); background: #fff;
  border-radius: 14px; padding: 15px 16px; font-size: 17px; margin-bottom: 10px; cursor: pointer;
}
.opt.sel { border-color: var(--primary); background: #FFF3E0; }
.opt.right { border-color: var(--green); background: #E7F9F3; }
.opt.wrong { border-color: var(--red); background: #FDECEC; }
.answer-input {
  width: 100%; border: 2px solid var(--line); border-radius: 14px; padding: 14px;
  font-size: 26px; text-align: center; outline: none; font-weight: 700;
}
.answer-input:focus { border-color: var(--primary); }
.feedback { border-radius: 14px; padding: 14px; margin: 14px 0; font-size: 15px; line-height: 1.6; }
.feedback.ok { background: #E7F9F3; color: #02735E; }
.feedback.no { background: #FDECEC; color: var(--red); }
.row-btns { display: flex; gap: 10px; margin-top: 6px; }
.row-btns .btn { flex: 1; }

/* ---------- 结果页 ---------- */
.result-score { text-align: center; padding: 30px 0 16px; }
.result-score .big { font-size: 64px; font-weight: 800; color: var(--primary); }
.result-stars { font-size: 34px; margin: 8px 0; }

/* ---------- 错题本 ---------- */
.m-item { background: var(--card); border-radius: 16px; box-shadow: var(--shadow); padding: 16px; margin-bottom: 12px; }
.m-meta { display: flex; gap: 6px; margin-bottom: 8px; }
.tag { font-size: 12px; border-radius: 6px; padding: 3px 8px; background: #FFF3E0; color: #E67E22; }
.tag.gray { background: #F0F1F5; color: var(--muted); }
.tag.green { background: #E7F9F3; color: var(--green); }
.tag.red { background: #FDECEC; color: var(--red); }
/* 做题退出键 */
.q-right-tools { display: inline-flex; align-items: center; gap: 8px; }
.quiz-exit {
  font-size: 12px; border: 1.5px solid var(--line); background: #fff; color: var(--muted);
  border-radius: 999px; padding: 3px 10px; cursor: pointer;
}
.quiz-exit:active { background: #F0F1F5; }
/* 查词历史标签 */
.lk-hist { border: none; cursor: pointer; margin: 2px 0; display: inline-block; }
.m-stem { font-size: 15px; line-height: 1.55; margin-bottom: 8px; }
.m-answer { font-size: 13px; color: var(--muted); line-height: 1.5; }
.m-actions { display: flex; gap: 8px; margin-top: 10px; }

/* ---------- AI 聊天 ---------- */
.chat-wrap { display: flex; flex-direction: column; height: calc(var(--vvh, 100dvh) - var(--chrome-h)); }
.chat-head { padding: 14px 16px 10px; border-bottom: 1px solid var(--line); background: #fff; }
.chat-list { flex: 1; overflow-y: auto; padding: 14px 14px 6px; }
.bubble { max-width: 82%; margin-bottom: 12px; padding: 12px 14px; border-radius: 16px; font-size: 15px; line-height: 1.65; white-space: pre-wrap; word-break: break-word; }
.bubble.user { background: var(--primary); color: #fff; margin-left: auto; border-bottom-right-radius: 4px; }
.bubble.ai { background: #fff; box-shadow: var(--shadow); border-bottom-left-radius: 4px; }
.bubble.ai .reasoning { color: var(--muted); font-size: 13px; border-left: 3px solid var(--line); padding-left: 8px; margin-bottom: 8px; white-space: pre-wrap; }
.chat-input-bar { display: flex; gap: 8px; padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); background: #fff; border-top: 1px solid var(--line); }
.chat-input-bar textarea {
  flex: 1; border: 2px solid var(--line); border-radius: 14px; padding: 10px 12px;
  font-size: 15px; resize: none; height: 46px; outline: none; font-family: inherit; line-height: 1.5;
}
.chat-input-bar textarea:focus { border-color: var(--primary); }
.quick-chips { display: flex; gap: 8px; padding: 10px 14px 0; flex-wrap: wrap; }
.quick-chips button { border: 1px solid var(--primary-light); color: var(--primary); background: #fff; border-radius: 999px; padding: 7px 13px; font-size: 13px; cursor: pointer; }
.typing-dot { display: inline-block; width: 8px; height: 8px; background: var(--primary-light); border-radius: 50%; animation: blink 1s infinite; }
@keyframes blink { 50% { opacity: .3; } }

/* ---------- 知识点 ---------- */
.k-item { background: var(--card); border-radius: 16px; box-shadow: var(--shadow); padding: 16px; margin-bottom: 12px; }
.k-item h3 { font-size: 17px; margin-bottom: 8px; display: flex; align-items: center; gap: 8px; }
.k-item p { font-size: 14px; color: var(--muted); line-height: 1.65; }
.k-item .btn { margin-top: 10px; }

/* ---------- 家长 ---------- */
.report-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 14px; }
.report-cell { background: var(--card); border-radius: 16px; box-shadow: var(--shadow); padding: 14px 8px; text-align: center; }
.report-cell .num { font-size: 24px; font-weight: 800; color: var(--primary); }
.report-cell .lbl { font-size: 12px; color: var(--muted); margin-top: 4px; }
.chart-card svg { width: 100%; height: auto; display: block; }
.form-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.form-row:last-child { border-bottom: 0; }
.form-row label { font-size: 15px; }
.form-row select, .form-row input {
  border: 2px solid var(--line); border-radius: 10px; padding: 8px 10px; font-size: 15px; outline: none; background: #fff;
}
.form-row select:focus, .form-row input:focus { border-color: var(--primary); }

/* ---------- 弹窗 ---------- */
.modal { position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 250; display: flex; align-items: center; justify-content: center; padding: 24px; }
.modal-card { background: #fff; border-radius: 22px; padding: 24px; width: 100%; max-width: 420px; max-height: 82dvh; overflow-y: auto; }
.modal-card h3 { margin-bottom: 14px; font-size: 18px; }
.modal-card .btn { margin-top: 12px; }

/* ---------- AI 精准学：知识掌握地图 ---------- */
.kp-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 14px; }
.kp-tile {
  border: 2px solid var(--line); border-radius: 14px; padding: 14px 12px;
  display: flex; flex-direction: column; align-items: flex-start; gap: 4px;
  background: #fff; cursor: pointer; text-align: left; transition: transform .12s;
}
.kp-tile:active { transform: scale(.96); }
.kp-tile b { font-size: 14px; }
.kp-tile span { font-size: 13px; font-weight: 700; }
.kp-good { border-color: #A3E4D7; background: #F0FBF7; }
.kp-good span { color: var(--green); }
.kp-mid { border-color: #FAD7A0; background: #FEF9F0; }
.kp-mid span { color: #E67E22; }
.kp-weak { border-color: #F5B7B1; background: #FEF5F3; }
.kp-weak span { color: var(--red); }

/* ---------- 勋章墙 ---------- */
.medal-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.medal {
  border-radius: 16px; padding: 14px 6px; text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  animation: popIn .35s both;
}
.medal.on { background: linear-gradient(150deg, #FFF6E5, #FFE9F3); border: 2px solid #F7DCB4; }
.medal.off { background: #F4F5F9; border: 2px dashed var(--line); }
.medal-ico { font-size: 34px; }
.medal b { font-size: 13px; }
.medal span { font-size: 11px; color: var(--muted); line-height: 1.4; }

/* ---------- AI 听写 ---------- */
.dt-speaker {
  display: block; margin: 12px auto 0; width: 110px; height: 110px;
  border-radius: 50%; border: none; font-size: 44px;
  background: linear-gradient(145deg, #A29BFE, #6C5CE7); color: #fff;
  box-shadow: 0 8px 22px #6C5CE755; cursor: pointer; transition: transform .12s;
}
.dt-speaker:active { transform: scale(.92); }

/* ---------- 趣味乐园（卡通风格） ---------- */
.game-land { position: relative; }
.games-hero {
  position: relative; overflow: hidden;
  background: linear-gradient(135deg, #FFB347 0%, #FF7BAC 50%, #9D6BFF 100%);
  border-radius: 26px; padding: 20px 22px; margin-bottom: 16px;
  display: flex; align-items: center; gap: 14px;
  box-shadow: 0 8px 24px rgba(253, 121, 168, .35);
}
.gh-mascot {
  font-size: 52px; background: rgba(255,255,255,.28); border-radius: 50%;
  width: 84px; height: 84px; display: flex; align-items: center; justify-content: center;
  animation: bounce 2s infinite; flex-shrink: 0;
  border: 3px dashed rgba(255,255,255,.5);
}
.gh-txt b { display: block; color: #fff; font-size: 19px; text-shadow: 0 2px 4px rgba(0,0,0,.15); }
.gh-txt span { color: rgba(255,255,255,.95); font-size: 13px; }
.gh-float { position: absolute; top: 10px; right: 18px; font-size: 22px; animation: floaty 3s ease-in-out infinite; }
.gh-float.f2 { top: auto; bottom: 12px; right: 44px; font-size: 16px; animation-delay: 1.2s; }
@keyframes floaty { 0%,100% { transform: translateY(0) rotate(0deg); } 50% { transform: translateY(-8px) rotate(12deg); } }
@keyframes bounce { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }

.game-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.game-card {
  border: 0; border-radius: 22px; padding: 18px 12px 16px; cursor: pointer;
  color: #fff; text-align: center; position: relative; overflow: hidden;
  box-shadow: 0 6px 16px rgba(0,0,0,.16);
  animation: pop-in .5s backwards cubic-bezier(.34,1.56,.64,1);
  transition: transform .12s;
}
.game-card:last-child:nth-child(odd) { grid-column: 1 / -1; }
.game-card:active { transform: scale(.94) rotate(-1deg); }
.game-card::after {
  content: ""; position: absolute; top: -30px; right: -30px; width: 70px; height: 70px;
  background: rgba(255,255,255,.18); border-radius: 50%;
}
.game-card::before {
  content: ""; position: absolute; bottom: -24px; left: -20px; width: 54px; height: 54px;
  background: rgba(255,255,255,.12); border-radius: 50%;
}
.gc-ico { display: block; font-size: 40px; margin-bottom: 8px; animation: bounce 2.4s infinite; }
.game-card b { display: block; font-size: 16px; text-shadow: 0 2px 4px rgba(0,0,0,.18); }
.gc-d { display: block; font-size: 12px; opacity: .92; margin-top: 4px; }
@keyframes pop-in { from { opacity: 0; transform: scale(.6) translateY(16px); } to { opacity: 1; transform: scale(1) translateY(0); } }
.games-tip { text-align: center; font-size: 13px; color: var(--muted); margin-top: 16px; }

/* 卡通游戏面板（各游戏共用） */
.game-shell { border-radius: 26px; padding: 14px; box-shadow: 0 8px 22px rgba(0,0,0,.15); }
.shell-blue { background: linear-gradient(150deg, #4FC3F7, #1976D2); }
.shell-green { background: linear-gradient(150deg, #66BB6A, #2E7D32); }
.shell-pink { background: linear-gradient(150deg, #F06292, #AD1457); }
.shell-orange { background: linear-gradient(150deg, #FFB74D, #EF6C00); }
.shell-purple { background: linear-gradient(150deg, #BA68C8, #6A1B9A); }
.gs-head { display: flex; align-items: center; gap: 10px; padding: 2px 6px 12px; }
.gs-mascot {
  font-size: 30px; background: rgba(255,255,255,.3); border-radius: 50%;
  width: 48px; height: 48px; display: flex; align-items: center; justify-content: center;
  animation: bounce 2s infinite; border: 2px dashed rgba(255,255,255,.55); flex-shrink: 0;
}
.gs-title { color: #fff; font-size: 17px; font-weight: 800; text-shadow: 0 2px 4px rgba(0,0,0,.2); }
.gs-badge {
  margin-left: auto; background: rgba(255,255,255,.92); color: #D84315;
  border-radius: 999px; padding: 6px 12px; font-size: 13px; font-weight: 800;
  box-shadow: 0 3px 8px rgba(0,0,0,.15);
}
.gs-badge.pop { animation: pop-in .35s cubic-bezier(.34,1.56,.64,1); }
.game-panel { background: #fff; border-radius: 20px; padding: 18px 16px; }
.game-panel .q-oral { margin: 20px 0; }
#sp-opts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 18px 0 8px; }
#sp-opts .opt { text-align: center; margin-bottom: 0; }

/* 24点游戏 */
.g24-ask { text-align: center; font-size: 15px; color: var(--muted); margin-bottom: 12px; }
.g24-nums { display: flex; justify-content: center; gap: 10px; margin-bottom: 16px; }
.g24-num {
  width: 52px; height: 52px; border-radius: 16px; display: flex; align-items: center; justify-content: center;
  font-size: 26px; font-weight: 800; color: #fff; animation: pop-in .4s backwards;
  box-shadow: 0 4px 10px rgba(0,0,0,.18);
}
.g24-num.n0 { background: #FF7043; animation-delay: 0s; }
.g24-num.n1 { background: #42A5F5; animation-delay: .08s; }
.g24-num.n2 { background: #66BB6A; animation-delay: .16s; }
.g24-num.n3 { background: #AB47BC; animation-delay: .24s; }
.g24-opt { font-family: "Consolas", "Courier New", monospace; font-size: 17px; font-weight: 700; letter-spacing: .5px; }

/* 记忆游戏 */
.mem-status { text-align: center; font-size: 15px; color: var(--muted); margin-bottom: 12px; font-weight: 600; }
.mem-flash {
  width: 96px; height: 96px; margin: 0 auto 16px; border-radius: 24px;
  display: flex; align-items: center; justify-content: center;
  font-size: 44px; font-weight: 800; color: #fff; background: #EEF0F6;
  box-shadow: 0 6px 16px rgba(0,0,0,.15);
}
.mem-flash.pop { animation: pop-in .3s cubic-bezier(.34,1.56,.64,1); }
.mem-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.mem-card {
  border: 0; border-radius: 16px; padding: 16px 0; font-size: 24px; font-weight: 800; color: #3E2723;
  cursor: pointer; box-shadow: 0 3px 8px rgba(0,0,0,.12); transition: transform .1s, filter .2s;
}
.mem-card:disabled { filter: saturate(.35) opacity(.55); cursor: default; }
.mem-card:not(:disabled):active { transform: scale(.92); }
.mem-card.hit { filter: none; outline: 3px solid #00C853; outline-offset: -3px; animation: pop-in .3s; }
.mem-card.miss { outline: 3px solid var(--red); outline-offset: -3px; animation: shake .4s; }

.tile-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.tile {
  background: #FFFDF7; border: 2px solid #FFE0B2; border-radius: 14px;
  padding: 10px 4px; font-size: 13px; line-height: 1.35; min-height: 52px;
  display: flex; align-items: center; justify-content: center; text-align: center;
  cursor: pointer; transition: transform .1s; word-break: break-word;
  animation: pop-in .4s backwards; box-shadow: 0 2px 6px rgba(255,152,0,.12);
}
.tile:active { transform: scale(.95); }
.tile.sel { border-color: #FF7043; background: #FFF3E0; font-weight: 700; transform: scale(1.06); }
.tile.done { border-color: #66BB6A; background: #E8F5E9; opacity: .45; pointer-events: none; }
.tile.shake { animation: shake .4s; border-color: var(--red); background: #FDECEC; }
@keyframes shake { 0%,100% { transform: translateX(0); } 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }

/* ---------- 锁屏 ---------- */
.lock { position: fixed; inset: 0; background: linear-gradient(160deg, #2d3561, #141a34); z-index: 200; display: flex; align-items: center; justify-content: center; color: #fff; }
.lock-card { text-align: center; padding: 30px; }
.lock-ico { font-size: 60px; margin-bottom: 16px; }
.lock-card h2 { margin-bottom: 8px; }
.lock-card p { opacity: .7; margin-bottom: 22px; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; bottom: 90px; left: 50%; transform: translateX(-50%);
  background: rgba(45,52,54,.92); color: #fff; padding: 10px 20px; border-radius: 999px;
  font-size: 14px; z-index: 300; max-width: 80vw; text-align: center;
}

@media (min-width: 700px) {
  .grid2 { grid-template-columns: repeat(4, 1fr); }
  .q-stem { font-size: 22px; }
}

/* ================= 牛牛学堂 v7 ================= */

/* 首页 hero */
.onion-hero {
  position: relative; overflow: hidden;
  background: linear-gradient(135deg, #FF8A00, #FFA726 55%, #FF9800);
  border-radius: 26px; padding: 20px 22px; margin-bottom: 14px;
  display: flex; align-items: center; gap: 16px;
  box-shadow: 0 8px 24px rgba(255, 138, 0, .30);
}
.oh-mascot {
  font-size: 50px; background: rgba(255,255,255,.28); border-radius: 50%;
  width: 84px; height: 84px; display: flex; align-items: center; justify-content: center;
  animation: bounce 2s infinite; flex-shrink: 0; border: 3px dashed rgba(255,255,255,.5);
}
.oh-txt { flex: 1; }
.oh-txt b { display: block; color: #fff; font-size: 20px; text-shadow: 0 2px 4px rgba(0,0,0,.15); }
.oh-txt > span { color: rgba(255,255,255,.95); font-size: 12.5px; }
.oh-progress { height: 8px; background: rgba(255,255,255,.3); border-radius: 999px; margin: 10px 0 6px; overflow: hidden; }
.oh-progress i { display: block; height: 100%; background: #fff; border-radius: 999px; transition: width .5s; }
.oh-num { font-size: 12px; color: rgba(255,255,255,.9); }
.oh-float { position: absolute; top: 10px; right: 18px; font-size: 22px; animation: floaty 3s ease-in-out infinite; }
.oh-float.f2 { top: auto; bottom: 12px; right: 46px; font-size: 15px; animation-delay: 1.2s; }

/* 今日任务卡 */
.next-card { display: flex; align-items: center; gap: 14px; padding: 16px 18px; }
.next-lbl { font-size: 12px; color: #E67E22; font-weight: 700; background: #FFF3E0; border-radius: 8px; padding: 4px 8px; flex-shrink: 0; }
.next-body { flex: 1; min-width: 0; }
.next-body b { display: block; font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.next-body span { font-size: 12px; color: var(--muted); }
.next-card .btn { flex-shrink: 0; }

/* 学科卡片 */
.subj-grid { margin-bottom: 14px; }
.subj-card {
  border: 2px solid var(--line); border-radius: 18px; background: #fff;
  padding: 14px 10px 12px; cursor: pointer; text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  transition: transform .12s; box-shadow: var(--shadow);
}
.subj-card:active { transform: scale(.95); border-color: var(--c); }
.sc-ico { font-size: 30px; }
.subj-card b { font-size: 16px; color: var(--c, var(--primary)); }
.sc-ver { font-size: 11px; color: var(--muted); }
.sc-bar { display: block; width: 100%; height: 6px; background: var(--line); border-radius: 999px; overflow: hidden; margin-top: 6px; }
.sc-bar i { display: block; height: 100%; background: var(--c, var(--primary)); border-radius: 999px; }
.sc-num { font-size: 11px; color: var(--muted); }

/* 目录页 */
.vol-head { display: flex; align-items: center; gap: 10px; }
.back-btn {
  width: 38px; height: 38px; border-radius: 50%; border: 2px solid var(--line);
  background: #fff; font-size: 22px; color: var(--text); cursor: pointer; flex-shrink: 0; line-height: 1;
}
.back-btn:active { background: #FFF3E0; }
.vol-tab { justify-content: center; }
.unit-card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px; margin-bottom: 14px; }
.unit-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.unit-no {
  width: 26px; height: 26px; border-radius: 9px; background: linear-gradient(135deg, #FF8A00, #FFA726);
  color: #fff; font-size: 13px; font-weight: 800; display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.unit-head b { font-size: 15.5px; flex: 1; }
.unit-prog { font-size: 12px; color: var(--muted); background: #F7F5F0; border-radius: 999px; padding: 3px 10px; }
.lesson-row {
  display: flex; align-items: center; gap: 10px; width: 100%; border: 0; background: none;
  padding: 11px 6px; border-bottom: 1px dashed var(--line); cursor: pointer; text-align: left; font-size: 15px;
}
.lesson-row:last-child { border-bottom: 0; }
.lesson-row:active { background: #FFF9F0; border-radius: 10px; }
.lr-state {
  width: 26px; height: 26px; border-radius: 50%; background: #F0F1F5; color: var(--muted);
  display: flex; align-items: center; justify-content: center; font-size: 12px; flex-shrink: 0;
}
.lr-state.done { background: #E7F9F3; }
.lr-title { flex: 1; min-width: 0; }
.lr-score { font-size: 12px; color: #00A87E; font-weight: 700; flex-shrink: 0; }
.lr-min { font-size: 11px; color: var(--muted); flex-shrink: 0; }

/* 课时讲解播放器 */
.player-shell { background: var(--card); border-radius: 24px; box-shadow: var(--shadow); padding: 16px; margin-bottom: 14px; }
.player-top { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.pl-min { font-size: 12px; }
.player-dots { display: flex; gap: 6px; margin-bottom: 12px; }
.player-dots i { width: 100%; height: 6px; flex: 1; background: var(--line); border-radius: 999px; transition: background .3s; }
.player-dots i.on { background: linear-gradient(90deg, #FF8A00, #FFB74D); }
.stage { background: #FFFBF4; border: 2px solid #FFE8CC; border-radius: 18px; padding: 16px 14px; margin-bottom: 12px; }
.mascot-bubble { display: flex; gap: 10px; margin-bottom: 12px; }
.mb-ico {
  font-size: 26px; width: 46px; height: 46px; background: linear-gradient(145deg, #FFF3E0, #FFE0B2);
  border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0;
  animation: bounce 2.4s infinite;
}
.mb-txt { flex: 1; font-size: 15.5px; line-height: 1.75; background: #fff; border-radius: 4px 16px 16px 16px; padding: 10px 14px; box-shadow: 0 2px 8px rgba(255,138,0,.08); animation: lvIn .4s both; }
.stage-visual { min-height: 60px; }
.stage-visual:empty { display: none; }

/* 视觉演示通用 */
.lv { animation: lvIn .45s both; }
@keyframes lvIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.lv-svg { width: 100%; max-width: 420px; display: block; margin: 0 auto; }
.lv-center { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.lv-note { text-align: center; font-size: 13px; color: #E67E22; font-weight: 700; margin-top: 8px; }
.lv-nums { display: flex; flex-direction: column; gap: 8px; align-items: center; }
.num-chip { background: #fff; border: 2px solid #FFE0B2; border-radius: 14px; padding: 10px 20px; text-align: center; box-shadow: 0 2px 8px rgba(255,138,0,.08); }
.num-chip b { display: block; font-size: 22px; color: #E67E22; letter-spacing: 1px; font-family: "Consolas", monospace; }
.num-chip span { font-size: 12px; color: var(--muted); }
.lv-flow { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; }
.flow-chip { background: #fff; border: 2px solid #FFE0B2; border-radius: 12px; padding: 8px 12px; font-size: 14px; font-weight: 600; }
.flow-arrow { color: #E67E22; font-weight: 800; }
.flow-total { background: linear-gradient(135deg, #FF8A00, #FFA726); color: #fff; border-radius: 999px; padding: 7px 14px; font-size: 13px; font-weight: 700; }
.lv-table table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 12px; overflow: hidden; }
.lv-table th, .lv-table td { border: 1px solid #FFE8CC; padding: 8px 10px; font-size: 14px; text-align: center; }
.lv-table th { background: #FFF3E0; color: #B25E00; }
.lv-words { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.word-card { background: #fff; border: 2px solid #D6EAF8; border-radius: 12px; padding: 9px 6px; text-align: center; }
.word-card b { display: block; font-size: 15px; color: #2E86DE; word-break: break-all; }
.word-card span { font-size: 12px; color: var(--muted); }
.lv-sents { display: flex; flex-direction: column; gap: 8px; }
.sent-row { background: #fff; border: 2px solid #FFE8CC; border-radius: 12px; padding: 9px 14px; display: flex; justify-content: space-between; gap: 10px; align-items: center; flex-wrap: wrap; }
.sent-row b { font-size: 14.5px; color: #2D3436; }
.sent-row span { font-size: 13px; color: #E67E22; }
.lv-split { text-align: center; }
.split-row { display: inline-flex; gap: 14px; background: #fff; border: 2px solid #FFE0B2; border-radius: 12px; padding: 10px 16px; }
.split-g { font-size: 26px; font-weight: 800; font-family: "Consolas", monospace; letter-spacing: 3px; color: #E67E22; }
.split-g + .split-g { border-left: 3px dashed #FFB74D; padding-left: 14px; }
.split-lbl { display: inline-flex; gap: 14px; margin-top: 6px; }
.split-lbl span { font-size: 12px; color: var(--muted); flex: 1; text-align: center; }
.lv-compare { background: #fff; border: 2px solid #FFE0B2; border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 6px; align-items: center; }
.cmp-row { font-family: "Consolas", monospace; font-size: 24px; font-weight: 800; letter-spacing: 2px; display: flex; }
.cmp-row span { padding: 0 2px; }
.cmp-row span.hl { background: #FF8A00; color: #fff; border-radius: 6px; animation: lvIn .4s .2s both; }
.lv-pv table { margin: 0 auto; border-collapse: collapse; }
.lv-pv th, .lv-pv td { border: 1.5px solid #E67E22; padding: 5px 6px; font-size: 12px; text-align: center; }
.lv-pv th { background: #FFF3E0; color: #B25E00; font-weight: 700; }
.lv-pv .pv-head { color: #7F8C8D; font-size: 11px; }
.lv-pv .pv-digit { font-size: 17px; font-weight: 800; color: #E67E22; min-width: 30px; }
.lv-vc { display: flex; justify-content: center; }
.vc-box { font-family: "Consolas", monospace; font-size: 22px; font-weight: 700; line-height: 1.5; background: #fff; border: 2px solid #FFE0B2; border-radius: 14px; padding: 14px 22px; overflow-x: auto; }
.vc-expr { background: #fff; border: 2px solid #FFE0B2; border-radius: 14px; padding: 14px 18px; font-size: 19px; font-weight: 700; text-align: center; font-family: "Consolas", monospace; overflow-x: auto; }
.vc-r { color: #E67E22; margin-top: 8px; font-size: 18px; }
.lv-angles { display: flex; justify-content: center; gap: 4px; flex-wrap: wrap; }
.ang-item { display: flex; flex-direction: column; align-items: center; }
.ang-item .lv-svg { width: 105px; }
.ang-item span { font-size: 12px; color: var(--muted); font-weight: 600; }
.lv-bars { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.bars-plot { display: flex; align-items: flex-end; gap: 18px; height: 175px; padding: 0 8px; border-bottom: 2px solid #D8CFC0; }
.bars-col { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; }
.bars-col span { font-size: 12px; color: var(--muted); margin-top: 5px; }
.bars-col .bar { width: 34px; background: linear-gradient(180deg, #FFB74D, #FF8A00); border-radius: 8px 8px 0 0; display: flex; justify-content: center; align-items: flex-start; }
.bars-col .bar i { font-style: normal; font-size: 11px; font-weight: 700; color: #B25E00; margin-top: 4px; }
.bars-pair { display: flex; align-items: flex-end; gap: 4px; height: 100%; }
.bar-a { width: 17px; background: linear-gradient(180deg, #FFB74D, #FF8A00); border-radius: 6px 6px 0 0; position: relative; }
.bar-b { width: 17px; background: linear-gradient(180deg, #64B5F6, #1E88E5); border-radius: 6px 6px 0 0; }
.bar-a i, .bar-b i { font-style: normal; font-size: 10px; font-weight: 700; color: #5D4037; position: absolute; top: 3px; left: 50%; transform: translateX(-50%); }
.bars-unit { font-size: 12px; color: var(--muted); }

/* 我的页面 */
.me-hero {
  background: linear-gradient(135deg, #FF8A00, #FFA726 60%, #FF9800);
  display: flex; align-items: center; gap: 14px; padding: 26px 20px 20px; color: #fff;
}
.me-avatar {
  width: 62px; height: 62px; border-radius: 50%; background: rgba(255,255,255,.3);
  border: 3px dashed rgba(255,255,255,.6); display: flex; align-items: center; justify-content: center;
  font-size: 26px; font-weight: 800; flex-shrink: 0;
}
.me-info { flex: 1; }
.me-info b { display: block; font-size: 20px; }
.me-info span { font-size: 13px; opacity: .92; }
.me-stars { font-size: 16px; font-weight: 800; background: rgba(255,255,255,.25); border-radius: 999px; padding: 8px 14px; }

/* 随堂练卡片 */
.practice-card .pc-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.practice-card .pc-head b { font-size: 17px; }

/* ================= PK 竞技场 v8 ================= */

/* —— 首页 PK 入口 —— */
.pk-entry {
  width: 100%; display: flex; align-items: center; gap: 13px; text-align: left; cursor: pointer;
  border: 0; border-radius: 22px; padding: 15px 16px; margin-bottom: 14px; color: #fff;
  background: linear-gradient(120deg, #7B3FE4, #B14CFF 45%, #FF5FA2);
  box-shadow: 0 8px 22px rgba(123, 63, 228, .32); position: relative; overflow: hidden;
}
.pk-entry:active { transform: scale(.98); }
.pk-entry::after {
  content: ""; position: absolute; right: -30px; top: -40px; width: 130px; height: 130px;
  background: radial-gradient(circle, rgba(255,255,255,.28), transparent 70%);
}
.pe-ico {
  width: 52px; height: 52px; flex-shrink: 0; border-radius: 16px; font-size: 27px;
  background: rgba(255,255,255,.22); border: 2px dashed rgba(255,255,255,.5);
  display: flex; align-items: center; justify-content: center; animation: bounce 2.2s infinite;
}
.pe-txt { flex: 1; min-width: 0; }
.pe-txt b { display: block; font-size: 18px; display: flex; align-items: center; gap: 7px; }
.pe-hot {
  font-style: normal; font-size: 10px; font-weight: 800; background: #FFD54F; color: #7B3FE4;
  border-radius: 999px; padding: 2px 7px; letter-spacing: .5px;
}
.pe-txt > span { display: block; font-size: 12.5px; opacity: .95; margin-top: 2px; }
.pe-rank { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 6px !important; }
.pe-rank i {
  font-style: normal; font-size: 11.5px; background: rgba(255,255,255,.2);
  border-radius: 999px; padding: 3px 9px;
}
.pe-tier { font-weight: 700; background: rgba(255,255,255,.32) !important; }
.pe-go { font-size: 13px; font-weight: 700; background: rgba(255,255,255,.25); border-radius: 999px; padding: 8px 12px; flex-shrink: 0; }

/* —— 竞技场：段位卡 —— */
.pk-hero {
  border-radius: 24px; padding: 18px 18px 14px; margin-bottom: 12px; color: #fff;
  background: linear-gradient(135deg, var(--tc, #8E9BA8), #2D3436 130%);
  box-shadow: 0 8px 22px rgba(45, 52, 54, .2); position: relative; overflow: hidden;
}
.pk-hero::before {
  content: ""; position: absolute; left: -20px; bottom: -50px; width: 150px; height: 150px;
  background: radial-gradient(circle, rgba(255,255,255,.18), transparent 70%);
}
.ph-top { display: flex; align-items: center; gap: 13px; }
.ph-badge {
  width: 56px; height: 56px; flex-shrink: 0; border-radius: 18px; font-size: 30px;
  background: rgba(255,255,255,.2); border: 2px solid rgba(255,255,255,.45);
  display: flex; align-items: center; justify-content: center;
}
.ph-info { flex: 1; min-width: 0; }
.ph-info b { display: block; font-size: 20px; }
.ph-info span { font-size: 12px; opacity: .9; }
.ph-pts { text-align: right; flex-shrink: 0; }
.ph-pts b { display: block; font-size: 24px; line-height: 1.1; }
.ph-pts span { font-size: 11px; opacity: .85; }
.ph-bar { height: 9px; background: rgba(255,255,255,.25); border-radius: 999px; margin: 12px 0 12px; overflow: hidden; }
.ph-bar i { display: block; height: 100%; background: linear-gradient(90deg, #FFD54F, #fff); border-radius: 999px; transition: width .6s cubic-bezier(.3,1.2,.5,1); }
.ph-stats { display: flex; justify-content: space-between; text-align: center; }
.ph-stats div { flex: 1; }
.ph-stats b { display: block; font-size: 16px; }
.ph-stats span { font-size: 11px; opacity: .82; }
.pk-promote {
  background: linear-gradient(90deg, #FF6B00, #FFB300); color: #fff; font-size: 14px;
  border-radius: 14px; padding: 11px 16px; margin-bottom: 12px; text-align: center;
  box-shadow: 0 6px 16px rgba(255, 107, 0, .3); animation: pulseGlow 1.8s infinite;
}
@keyframes pulseGlow { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.02); } }

/* —— 竞技场：科目选择 —— */
.pk-card-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 12px; }
.pk-card-head b { font-size: 16.5px; }
.pk-card-head span { font-size: 12px; color: var(--muted); }
.pk-mode-card { padding: 16px 14px; }
.pk-mode-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pk-mode {
  border: 2px solid var(--line); background: #fff; border-radius: 16px; cursor: pointer;
  padding: 12px 10px; display: flex; flex-direction: column; align-items: center; gap: 2px; text-align: center;
}
.pk-mode:active { transform: scale(.96); }
.pk-mode.on { border-color: var(--c); background: #FFFDF8; box-shadow: 0 4px 14px rgba(0,0,0,.06); }
.pk-mode.on b { color: var(--c); }
.pk-mode .pm-ico { font-size: 26px; }
.pk-mode b { font-size: 15.5px; }
.pk-mode span { font-size: 11.5px; color: var(--muted); }

.pk-go {
  font-size: 18px; padding: 16px; border-radius: 18px; margin-bottom: 8px;
  background: linear-gradient(120deg, #7B3FE4, #B14CFF 50%, #FF5FA2);
  box-shadow: 0 8px 22px rgba(123, 63, 228, .3);
}
.pk-sub-note { text-align: center; font-size: 12.5px; color: var(--muted); margin-bottom: 16px; }

/* —— 排行榜 —— */
.pk-lb { padding: 16px 12px; }
.lb-list { display: flex; flex-direction: column; }
.lb-row {
  display: flex; align-items: center; gap: 8px; padding: 8px 6px;
  border-bottom: 1px dashed var(--line); font-size: 13.5px;
}
.lb-row:last-child { border-bottom: 0; }
.lb-row.mine { background: linear-gradient(90deg, #FFF7EC, transparent); border-radius: 12px; }
.lb-row.mine .lb-nm { color: var(--primary); font-weight: 700; }
.lb-no { width: 22px; text-align: center; font-weight: 700; color: var(--muted); flex-shrink: 0; font-size: 13px; }
.lb-no.top1 { color: #E8A317; }
.lb-no.top2 { color: #8E9BA8; }
.lb-no.top3 { color: #C0763A; }
.lb-ava { font-size: 18px; flex-shrink: 0; }
.lb-nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-tier { font-size: 11px; color: var(--muted); flex-shrink: 0; }
.lb-pt { font-weight: 700; color: #E8A317; flex-shrink: 0; font-size: 13px; }
.lb-my-rank { text-align: center; font-size: 13px; color: var(--primary); font-weight: 700; margin-top: 10px; }

/* —— 规则 —— */
.pk-rules { padding: 16px; }
.pk-rules ul { padding-left: 18px; }
.pk-rules li { font-size: 13.5px; color: #5D6D7E; line-height: 1.85; }
.pk-rules li b { color: var(--text); }

/* —— 匹配中 —— */
.match-box {
  background: var(--card); border-radius: 24px; box-shadow: var(--shadow);
  padding: 40px 20px 26px; text-align: center; margin-top: 30px;
}
.match-radar {
  width: 150px; height: 150px; margin: 0 auto 22px; position: relative;
  display: flex; align-items: center; justify-content: center;
}
.mr-core {
  width: 60px; height: 60px; border-radius: 50%; font-size: 28px; z-index: 2;
  background: linear-gradient(135deg, #7B3FE4, #FF5FA2); color: #fff;
  display: flex; align-items: center; justify-content: center; box-shadow: 0 6px 18px rgba(123,63,228,.4);
}
.mr-c, .mr-r1, .mr-r2 {
  position: absolute; border-radius: 50%; border: 2px solid rgba(123, 63, 228, .45);
  animation: radar 2s ease-out infinite;
}
.mr-c { width: 60px; height: 60px; opacity: 0; }
.mr-r1 { width: 60px; height: 60px; animation-delay: .6s; }
.mr-r2 { width: 60px; height: 60px; animation-delay: 1.2s; }
@keyframes radar { from { transform: scale(1); opacity: .85; } to { transform: scale(2.4); opacity: 0; } }
.match-box > b { display: block; font-size: 18px; margin-bottom: 6px; }
.match-box > span { font-size: 13px; color: var(--muted); }
.mt-info { display: flex; gap: 10px; justify-content: center; margin-top: 18px; flex-wrap: wrap; }
.mt-info span { font-size: 12px; background: #F7F5F0; border-radius: 999px; padding: 6px 12px; color: #5D6D7E; }

/* —— VS 对战房间 —— */
.vs-card {
  background: linear-gradient(135deg, #2D3436, #4B4F52); border-radius: 24px;
  padding: 26px 16px 20px; display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 14px; position: relative; color: #fff; box-shadow: 0 10px 26px rgba(45,52,54,.28);
}
.vs-tag {
  position: absolute; top: 10px; left: 50%; transform: translateX(-50%);
  font-size: 10.5px; letter-spacing: 3px; color: rgba(255,255,255,.6);
}
.vs-side { flex: 1; text-align: center; }
.vs-ava {
  width: 66px; height: 66px; margin: 0 auto 8px; border-radius: 50%; font-size: 32px;
  background: rgba(255,255,255,.15); border: 2px solid rgba(255,255,255,.3);
  display: flex; align-items: center; justify-content: center;
}
.vs-side.me .vs-ava { border-color: #FFB74D; box-shadow: 0 0 0 4px rgba(255,183,77,.18); }
.vs-side.rv .vs-ava { border-color: #FF5FA2; box-shadow: 0 0 0 4px rgba(255,95,162,.18); }
.vs-side b { display: block; font-size: 16px; }
.vs-side span { font-size: 11.5px; opacity: .85; }
.vs-mid { font-size: 22px; font-weight: 900; color: #FFD54F; flex-shrink: 0; padding: 0 6px; text-shadow: 0 2px 10px rgba(255,213,79,.5); }
.rv-card { padding: 6px 16px; }
.rv-row { display: flex; justify-content: space-between; gap: 12px; padding: 11px 0; border-bottom: 1px dashed var(--line); font-size: 14px; }
.rv-row:last-child { border-bottom: 0; }
.rv-row span { color: var(--muted); flex-shrink: 0; }
.rv-row b { text-align: right; }
.count-box { text-align: center; margin: 18px 0 6px; }
.count-box span {
  display: inline-block; font-size: 68px; font-weight: 900; color: var(--primary);
  line-height: 1; font-family: "Impact", "PingFang SC", sans-serif;
}
.count-box span.pop { animation: cdPop .5s cubic-bezier(.3,1.6,.5,1); }
.count-box span.go { color: #00C48C; font-size: 58px; }
@keyframes cdPop { from { transform: scale(.5); opacity: .3; } to { transform: scale(1); opacity: 1; } }

/* —— 对战界面 —— */
.pk-battle { padding-top: 10px; }
.pk-topbar { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.pk-quit {
  width: 34px; height: 34px; border-radius: 50%; border: 2px solid var(--line); background: #fff;
  font-size: 16px; color: var(--muted); cursor: pointer; flex-shrink: 0; line-height: 1;
}
.pk-badge-mode { font-size: 12.5px; color: var(--muted); }
.pk-qno { margin-left: auto; font-size: 12.5px; color: var(--muted); font-weight: 600; }
.pk-hud {
  display: flex; align-items: center; gap: 8px; background: var(--card); border-radius: 18px;
  padding: 12px 14px; box-shadow: var(--shadow); border: 2px solid transparent; transition: border-color .3s;
}
.pk-hud.lead { border-color: #A8E6CF; }
.pk-hud.trail { border-color: #FFD3D3; }
.pk-side { flex: 1; min-width: 0; }
.pk-side.rv { text-align: right; }
.pk-ava {
  width: 38px; height: 38px; border-radius: 50%; font-size: 20px; background: #F7F5F0; position: relative;
  display: inline-flex; align-items: center; justify-content: center;
}
.pk-crown { position: absolute; top: -9px; left: 50%; transform: translateX(-50%); font-size: 12px; font-style: normal; }
.pk-nm { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pk-sc { font-size: 26px; font-weight: 900; color: var(--primary); line-height: 1.1; }
.pk-side.rv .pk-sc { color: #E1474B; }
.pk-bar { height: 7px; background: var(--line); border-radius: 999px; overflow: hidden; margin-top: 5px; }
.pk-bar i { display: block; height: 100%; border-radius: 999px; transition: width .3s; }
.pk-side.me .pk-bar i { background: linear-gradient(90deg, #FFB74D, #FF8A00); }
.pk-side.rv .pk-bar i { background: linear-gradient(90deg, #FF8A8A, #E1474B); }
.pk-vs { font-size: 15px; font-weight: 900; color: #B2BEC3; flex-shrink: 0; }
.pk-rstate { text-align: center; font-size: 12.5px; color: var(--muted); margin: 9px 0 4px; }
.pk-combo {
  text-align: center; font-size: 15px; font-weight: 800; color: #FF6B00; margin-bottom: 6px;
}
.pk-combo.pop { animation: comboPop .4s cubic-bezier(.3,1.6,.5,1); }
@keyframes comboPop { from { transform: scale(.6); } to { transform: scale(1); } }
.pk-q-card {
  background: var(--card); border-radius: 22px; box-shadow: var(--shadow); padding: 20px 16px 16px; margin-top: 6px;
}
.pk-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.pk-flash {
  text-align: center; font-size: 17px; font-weight: 800; margin-top: 14px;
  animation: lvIn .3s both;
}
.pk-flash.ok { color: #00A87E; }
.pk-flash.no { color: #E1474B; }

/* —— 结算 —— */
.pk-result { padding-top: 14px; }
.pr-hero {
  border-radius: 24px; padding: 24px 16px 18px; margin-bottom: 14px; text-align: center; color: #fff;
  box-shadow: 0 10px 26px rgba(45,52,54,.2); position: relative; overflow: hidden;
}
.pk-result.win .pr-hero { background: linear-gradient(135deg, #FF8A00, #FFB300 60%, #FFD54F); }
.pk-result.lose .pr-hero { background: linear-gradient(135deg, #5D6D7E, #8E9BA8); }
.pk-result.draw .pr-hero { background: linear-gradient(135deg, #0984E3, #00A8C6); }
.pr-title { font-size: 26px; font-weight: 900; margin-bottom: 14px; text-shadow: 0 2px 8px rgba(0,0,0,.12); }
.pr-board { display: flex; align-items: center; justify-content: center; gap: 14px; }
.pr-p { text-align: center; }
.pr-ava {
  width: 54px; height: 54px; margin: 0 auto 6px; border-radius: 50%; font-size: 27px;
  background: rgba(255,255,255,.25); display: flex; align-items: center; justify-content: center;
}
.pr-p b { display: block; font-size: 13px; font-weight: 600; opacity: .95; }
.pr-s { display: block; font-size: 30px; font-weight: 900; line-height: 1.15; }
.pr-col { font-size: 26px; font-weight: 900; opacity: .7; }
.pr-sub { font-size: 14px; margin-top: 12px; }
.pr-times { display: flex; gap: 10px; justify-content: center; margin-top: 10px; flex-wrap: wrap; }
.pr-times span { font-size: 12px; background: rgba(255,255,255,.22); border-radius: 999px; padding: 5px 12px; }
.rank-card { padding: 16px; }
.rc-line { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 15px; }
.rc-old { color: var(--muted); }
.rc-arrow { color: var(--muted); }
.rc-new { font-size: 18px; }
.rc-delta { margin-left: auto; font-size: 14px; font-weight: 800; color: var(--muted); }
.rc-delta.up { color: #00A87E; }
.rc-delta.down { color: #E1474B; }
.rc-bar { height: 10px; background: var(--line); border-radius: 999px; overflow: hidden; margin: 12px 0 9px; }
.rc-bar i { display: block; height: 100%; border-radius: 999px; background: var(--tc, var(--primary)); transition: width 1.1s cubic-bezier(.3,1.1,.5,1); }
.rc-note { font-size: 12.5px; color: var(--muted); }
.pr-reward { text-align: center; font-size: 15px; }
.pr-reward b { color: #E8A317; font-size: 19px; }
.pr-extra { font-size: 12.5px; color: var(--muted); margin-top: 6px; }
.pk-wrong { padding: 16px 14px; }
.pw-item { border-top: 1px dashed var(--line); padding: 11px 0; }
.pw-item:first-of-type { border-top: 0; }
.pw-stem { font-size: 14.5px; font-weight: 600; line-height: 1.6; }
.pw-ans { font-size: 13px; color: #00A87E; margin-top: 5px; }
.pw-ans b { color: #E1474B; }
.pw-exp { font-size: 12.5px; color: var(--muted); margin-top: 5px; line-height: 1.6; }
.pk-confetti {
  position: fixed; inset: 0; pointer-events: none; z-index: 900; overflow: hidden;
}
.pk-confetti i {
  position: absolute; top: -14px; width: 9px; height: 15px; border-radius: 2px;
  animation: cfFall 2.4s linear forwards;
}
@keyframes cfFall {
  from { transform: translateY(0) rotate(0); opacity: 1; }
  to { transform: translateY(105vh) rotate(560deg); opacity: .15; }
}

@media (max-width: 420px) {
  .tab { font-size: 10.5px; }
  .tab .tab-ico { font-size: 21px; }
  .pk-mode b { font-size: 14px; }
  .lb-tier { display: none; }
}

/* ---------- 激活码门禁 ---------- */
.lic-gate { position: fixed; inset: 0; z-index: 400; background: linear-gradient(160deg, #FFF3E0, #FFD9A0); display: flex; align-items: center; justify-content: center; padding: 24px; }
.lic-card { background: #fff; border-radius: 24px; box-shadow: var(--shadow); padding: 30px 24px 24px; width: 100%; max-width: 380px; text-align: center; }
.lic-logo { font-size: 44px; }
.lic-card h2 { margin: 8px 0 2px; font-size: 21px; }
.lic-sub { color: var(--muted); font-size: 14px; margin-bottom: 18px; }
.lic-input { width: 100%; border: 2px solid var(--line); border-radius: 14px; padding: 13px 12px; font-size: 17px; text-align: center; letter-spacing: 1px; outline: none; font-family: inherit; }
.lic-input:focus { border-color: var(--primary); }
.lic-card .btn { margin-top: 14px; }
.lic-msg { margin-top: 12px; font-size: 13.5px; color: var(--muted); line-height: 1.6; min-height: 20px; }
.lic-msg.bad { color: var(--red); }
.lic-tips { margin-top: 14px; font-size: 12px; color: #B2A99B; line-height: 1.7; }
.lic-close { margin-top: 12px; border: 0; background: none; color: var(--muted); font-size: 13px; cursor: pointer; text-decoration: underline; }

/* ---------- 卖家后台 ---------- */
.adm-wrap { max-width: 960px; margin: 0 auto; padding: 20px 16px 60px; }
.adm-head { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.adm-head h1 { font-size: 22px; }
.adm-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.adm-input { border: 2px solid var(--line); border-radius: 12px; padding: 10px 12px; font-size: 15px; outline: none; font-family: inherit; }
.adm-input:focus { border-color: var(--primary); }
.adm-table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 16px; overflow: hidden; box-shadow: var(--shadow); font-size: 14px; }
.adm-table th, .adm-table td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
.adm-table th { background: #FFF7EC; font-size: 13px; color: #8A6D3B; }
.adm-table td code { font-family: Consolas, monospace; letter-spacing: .5px; }
.adm-tag { display: inline-block; border-radius: 999px; padding: 2px 10px; font-size: 12px; }
.adm-tag.unused { background: #EFF0F6; color: #636E72; }
.adm-tag.active { background: #E3F9EE; color: #00A87E; }
.adm-tag.revoked { background: #FDECEC; color: #D63031; }
.adm-mini { border: 0; border-radius: 8px; padding: 5px 10px; font-size: 12.5px; cursor: pointer; margin-right: 6px; }
.adm-mini.b1 { background: #FFF1DE; color: #B96A00; }
.adm-mini.b2 { background: #FDECEC; color: #C0392B; }
.adm-new { background: #FFFDF6; border: 2px dashed var(--primary-light); border-radius: 16px; padding: 14px; margin-bottom: 14px; }
.adm-new code { display: inline-block; background: #fff; border-radius: 8px; padding: 4px 8px; margin: 3px 6px 3px 0; font-family: Consolas, monospace; font-size: 15px; letter-spacing: .5px; }
.adm-note { font-size: 12.5px; color: var(--muted); line-height: 1.7; margin-top: 10px; }
