/* ============================================================
   XiangsuReader · 像素朗读（英语听力自动播放器）
   清新青柠 × 深色教室大屏 · 毛玻璃 × 大圆角
   ============================================================ */

/* ---------------- 本地字体（Outfit，适配英语字幕） ---------------- */
@font-face {
  font-family: "Outfit";
  src: url("../assets/fonts/outfit-400.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Outfit";
  src: url("../assets/fonts/outfit-500.woff2") format("woff2");
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Outfit";
  src: url("../assets/fonts/outfit-600.woff2") format("woff2");
  font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Outfit";
  src: url("../assets/fonts/outfit-700.woff2") format("woff2");
  font-weight: 700; font-style: normal; font-display: swap;
}

:root {
  /* 色彩：清新青柠 */
  --bg-0: #070d14;
  --bg-1: #0b1522;
  --bg-2: #101f33;
  --lime: #c8f542;
  --lime-strong: #a8e62a;
  --lime-dim: rgba(200, 245, 66, .14);
  --mint: #5ce8c4;
  --blue: #7cc7ff;
  --amber: #ffd166;
  --text: #eef4fb;
  --text-dim: #93a5c4;
  --text-faint: #5d6f8f;
  --glass: rgba(16, 27, 45, .55);
  --glass-2: rgba(22, 36, 60, .65);
  --stroke: rgba(255, 255, 255, .09);
  --stroke-strong: rgba(255, 255, 255, .16);
  --danger: #ff6b7a;
  --ok: var(--lime);

  /* 波形画布配色（暖纸主题会整体覆盖） */
  --wave-bg: rgba(5, 10, 18, .6);
  --wave-bar: rgba(124, 199, 255, .5);
  --wave-bar-active: rgba(200, 245, 66, .6);
  --wave-bar-idle: rgba(124, 199, 255, .3);
  --wave-played: rgba(92, 232, 196, .18);
  --wave-progress: rgba(200, 245, 66, .9);

  /* 圆角 */
  --r-xl: 32px;
  --r-lg: 24px;
  --r-md: 16px;
  --r-sm: 12px;
  --r-full: 999px;

  /* 字体（本地 Outfit 适配英文字幕 + 系统中文字体） */
  --font-display: "SF Pro Display", "Avenir Next Condensed", "Helvetica Neue", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-body: "Outfit", -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", "PingFang SC", "Microsoft YaHei", sans-serif;

  --shadow-card: 0 20px 60px rgba(0, 0, 0, .45);
  --shadow-pop: 0 12px 40px rgba(0, 0, 0, .5);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scrollbar-color: rgba(200, 245, 66, .35) transparent; }

body {
  font-family: var(--font-body);
  background: var(--bg-0);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--lime); color: #08110a; }

/* ---------------- 背景氛围 ---------------- */
.bg-aura { position: fixed; inset: 0; z-index: -1; overflow: hidden; }
.aura { position: absolute; border-radius: 50%; filter: blur(90px); opacity: .5; }
.aura-1 { width: 620px; height: 620px; background: radial-gradient(circle, rgba(140, 210, 60, .28), transparent 65%); top: -180px; right: -120px; }
.aura-2 { width: 560px; height: 560px; background: radial-gradient(circle, rgba(80, 190, 255, .16), transparent 65%); bottom: -200px; left: -160px; }
.aura-3 { width: 420px; height: 420px; background: radial-gradient(circle, rgba(92, 232, 196, .12), transparent 65%); top: 40%; left: 55%; }
.grain {
  position: absolute; inset: 0;
  opacity: .05; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
}

/* ---------------- 布局 ---------------- */
.app { max-width: 1120px; margin: 0 auto; padding: 0 20px 80px; }
.hidden { display: none !important; }

/* ---------------- 顶栏 ---------------- */
.topbar {
  position: sticky; top: 14px; z-index: 50;
  display: flex; align-items: center; gap: 16px;
  padding: 12px 16px;
  margin: 14px 0 8px;
  border-radius: var(--r-xl);
}
.glass {
  background: var(--glass);
  border: 1px solid var(--stroke);
  backdrop-filter: blur(22px) saturate(1.35);
  -webkit-backdrop-filter: blur(22px) saturate(1.35);
  box-shadow: var(--shadow-card);
}

.brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.brand-mark {
  width: 44px; height: 44px; flex: none;
  display: grid; place-items: center;
  font-size: 20px; color: #0a1406;
  font-family: "Outfit", var(--font-body);
  background: linear-gradient(135deg, var(--lime), var(--mint));
  border-radius: 14px;
  box-shadow: 0 6px 18px rgba(168, 230, 42, .35);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.brand-name {
  font-family: "Outfit", var(--font-body);
  font-weight: 800; font-size: 17px; letter-spacing: .4px;
}
.brand-sub { font-size: 11.5px; color: var(--text-dim); letter-spacing: .3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.topbar-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }

/* ---------------- 按钮 ---------------- */
.btn-primary {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 20px;
  border: none; border-radius: var(--r-full);
  background: linear-gradient(135deg, var(--lime), var(--lime-strong));
  color: #0a1406; font-family: var(--font-body); font-weight: 700; font-size: 14px;
  cursor: pointer; transition: transform .18s ease, box-shadow .18s ease, filter .18s;
  box-shadow: 0 8px 24px rgba(168, 230, 42, .28);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 32px rgba(168, 230, 42, .4); filter: brightness(1.05); }
.btn-primary:active { transform: translateY(0) scale(.98); }
.btn-primary.big { padding: 14px 26px; font-size: 15px; }
.btn-primary.block { width: 100%; }

.btn-ghost {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 24px;
  border: 1px solid var(--stroke-strong); border-radius: var(--r-full);
  background: rgba(255, 255, 255, .04);
  color: var(--text); font-family: var(--font-body); font-weight: 600; font-size: 15px;
  cursor: pointer; transition: .18s;
}
.btn-ghost:hover { border-color: var(--lime); color: var(--lime); background: var(--lime-dim); }

.btn-danger {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 24px;
  border: 1px solid rgba(255, 107, 122, .4); border-radius: var(--r-full);
  background: rgba(255, 107, 122, .08);
  color: var(--danger); font-family: var(--font-body); font-weight: 600; font-size: 15px;
  cursor: pointer; transition: .18s;
}
.btn-danger:hover { border-color: var(--danger); background: rgba(255, 107, 122, .16); transform: translateY(-1px); }
.btn-danger:active { transform: translateY(0) scale(.98); }
.btn-danger.big { padding: 14px 26px; }
.btn-danger.block { width: 100%; }

.settings-foot { display: flex; flex-direction: column; gap: 12px; margin-top: 18px; }
.settings-foot .btn-primary, .settings-foot .btn-danger, .settings-foot .btn-danger-outline { width: 100%; }

/* 老师/课代表模式提示条 */
.settings-teacher-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 16px; border-radius: var(--r-lg);
  border: 1px solid var(--lime); background: var(--lime-dim);
  color: var(--lime);
}
.settings-teacher-txt { font-size: 13px; line-height: 1.5; }
.settings-teacher-bar .chip { flex-shrink: 0; }

/* 清除网页所有数据（弱化样式，防误触） */
.btn-danger-outline {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 24px;
  border: 1px dashed rgba(255, 107, 122, .4); border-radius: var(--r-full);
  background: transparent; color: var(--text-faint); font-family: var(--font-body);
  font-weight: 600; font-size: 13.5px; cursor: pointer; transition: .18s;
}
.btn-danger-outline:hover { border-color: var(--danger); color: var(--danger); background: rgba(255, 107, 122, .06); }
.btn-danger-outline.big { padding: 13px 26px; }
.btn-danger-outline.block { width: 100%; }

.settings-footer {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 14px 0 6px; text-align: center;
}
.footer-logo { width: 36px; height: 36px; border-radius: 10px; object-fit: cover; }
.settings-footer p { margin: 0; font-size: 12.5px; color: var(--text-faint); }
.settings-footer a { font-size: 12.5px; color: var(--lime); text-decoration: none; opacity: .75; transition: .2s; }
.settings-footer a:hover { opacity: 1; text-decoration: underline; }

.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 15px;
  border: 1px solid var(--stroke); border-radius: var(--r-full);
  background: rgba(255, 255, 255, .03);
  color: var(--text-dim); font-size: 13px; font-weight: 600; font-family: var(--font-body);
  cursor: pointer; transition: .18s;
}
.chip span { font-size: 11px; }
.chip:hover { color: var(--text); border-color: var(--stroke-strong); background: rgba(255, 255, 255, .06); }
.chip-demo { border-color: rgba(200, 245, 66, .4); color: var(--lime); }
.chip-demo:hover { background: var(--lime-dim); border-color: var(--lime); }
.chip.danger { color: var(--danger); }
.chip.danger:hover { border-color: var(--danger); }

/* ---------------- 内容区 ---------------- */
.content { margin-top: 28px; }
.view { animation: viewIn .45s ease both; }
@keyframes viewIn {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}

/* ---------------- 列表页 Hero ---------------- */
.hero { text-align: center; padding: 44px 16px 8px; }
.hero-kicker {
  display: inline-block;
  font-family: var(--font-display); font-size: 11px; font-weight: 600;
  letter-spacing: 3px; color: var(--lime);
  background: var(--lime-dim); border: 1px solid rgba(200, 245, 66, .3);
  padding: 7px 16px; border-radius: var(--r-full);
  margin-bottom: 18px;
}
.hero-title {
  font-family: var(--font-display);
  font-size: clamp(30px, 5vw, 46px);
  font-weight: 800; line-height: 1.25; letter-spacing: .5px;
}
.hero-title .dot { color: var(--lime); }
.hero-desc { max-width: 560px; margin: 16px auto 0; color: var(--text-dim); font-size: 15px; line-height: 1.8; }
.hero-actions { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; margin-top: 26px; }

/* ---------------- 空状态 ---------------- */
.empty-tip {
  margin-top: 36px; padding: 44px 20px;
  border-radius: var(--r-xl); text-align: center;
  border-style: dashed;
}
.empty-icon { font-size: 46px; margin-bottom: 12px; filter: saturate(.8); }
.empty-title { font-size: 18px; font-weight: 700; }
.empty-desc { margin-top: 8px; font-size: 13.5px; color: var(--text-dim); }

/* ---------------- 音频卡片 ---------------- */
.audio-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; margin-top: 24px; }

.audio-card {
  display: flex; align-items: center; gap: 14px;
  background: var(--glass);
  border: 1px solid var(--stroke);
  border-radius: var(--r-lg);
  padding: 18px;
  backdrop-filter: blur(18px) saturate(1.3);
  -webkit-backdrop-filter: blur(18px) saturate(1.3);
  box-shadow: var(--shadow-card);
  cursor: pointer;
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
  animation: cardIn .4s ease both;
}
@keyframes cardIn {
  from { opacity: 0; transform: translateY(10px) scale(.98); }
  to { opacity: 1; transform: none; }
}
.audio-card:hover { transform: translateY(-3px); border-color: rgba(200, 245, 66, .45); box-shadow: var(--shadow-pop); }

.card-icon {
  width: 52px; height: 52px; flex: none;
  display: grid; place-items: center;
  font-size: 22px; border-radius: var(--r-md);
  background: linear-gradient(135deg, rgba(200, 245, 66, .18), rgba(92, 232, 196, .12));
  border: 1px solid rgba(200, 245, 66, .25);
}
.audio-card .info { flex: 1; min-width: 0; }
.audio-card .name { font-size: 15px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.audio-card .meta { margin-top: 4px; font-size: 12.5px; color: var(--text-dim); }

.card-ops { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; flex: none; }

/* 识别/翻译进度条 */
.prog {
  margin-top: 10px; height: 6px; border-radius: var(--r-full);
  background: rgba(255, 255, 255, .08); overflow: hidden; position: relative;
}
.prog-fill {
  height: 100%; border-radius: var(--r-full);
  background: linear-gradient(90deg, var(--lime), #5ce8c4);
  transition: width .35s ease;
}
.prog.indet .prog-fill {
  width: 40%; animation: progSlide 1.3s ease-in-out infinite;
}
@keyframes progSlide {
  0% { transform: translateX(-110%); }
  100% { transform: translateX(285%); }
}

.status-tag {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 12px; border-radius: var(--r-full);
  font-size: 12px; font-weight: 700; white-space: nowrap;
}
.status-ready { background: rgba(200, 245, 66, .14); color: var(--lime); }
.status-ready::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 10px var(--lime); }
.status-work { background: rgba(124, 199, 255, .14); color: var(--blue); }
.status-work::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--blue); animation: pulse 1.1s ease infinite; }
.status-failed { background: rgba(255, 107, 122, .14); color: var(--danger); }
.status-idle { background: rgba(147, 165, 196, .13); color: var(--text-dim); }
@keyframes pulse { 50% { opacity: .35; } }

.engine-btns { display: flex; gap: 6px; }
.engine-btn {
  padding: 6px 12px; border-radius: var(--r-full);
  border: 1px solid var(--stroke); background: rgba(255, 255, 255, .03);
  color: var(--text-dim); font-size: 12px; font-weight: 600; cursor: pointer; transition: .16s;
}
.engine-btn:hover { border-color: var(--lime); color: var(--lime); background: var(--lime-dim); }
.engine-btn.del { color: var(--text-faint); }
.engine-btn.del:hover { border-color: var(--danger); color: var(--danger); background: rgba(255, 107, 122, .1); }

/* ---------------- 播放页 ---------------- */
.player-head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.player-title-wrap { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1; }
.player-dot { width: 9px; height: 9px; flex: none; border-radius: 50%; background: var(--lime); box-shadow: 0 0 12px var(--lime); }
.player-title { font-size: 15px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 字幕舞台 */
.stage {
  position: relative;
  border-radius: var(--r-xl);
  padding: 52px 32px 44px;
  min-height: 240px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px;
  text-align: center;
  overflow: hidden;
}
.stage::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(600px 220px at 50% -40px, rgba(200, 245, 66, .13), transparent 70%),
    radial-gradient(500px 200px at 85% 110%, rgba(92, 232, 196, .09), transparent 70%);
  pointer-events: none;
}
.stage-counter {
  position: absolute; top: 18px; right: 22px;
  font-family: var(--font-display); font-size: 12px; font-weight: 600;
  color: var(--text-faint); letter-spacing: 1px;
}
.stage-en {
  font-size: clamp(26px, 4.6vw, 52px);
  font-weight: 700; line-height: 1.4; letter-spacing: .3px;
  max-width: 900px;
  transition: opacity .2s;
}
.stage-en.slide { animation: enIn .35s ease both; }
@keyframes enIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.stage-en.idle { color: var(--text-faint); font-weight: 500; font-size: 24px; }
.stage-zh { font-size: clamp(17px, 2.3vw, 24px); color: var(--text-dim); line-height: 1.6; min-height: 1.6em; }
.stage-gap { font-size: 14px; color: var(--lime); font-weight: 700; letter-spacing: 2px; }

/* 控制台 */
.deck {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px;
  margin-top: 22px;
}
.ctrl-btn {
  min-width: 60px; height: 60px;
  display: grid; place-items: center;
  border: 1px solid var(--stroke); border-radius: 20px;
  background: var(--glass-2);
  color: var(--text); font-size: 22px; cursor: pointer;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition: .18s;
}
.ctrl-btn:hover { border-color: var(--lime); color: var(--lime); transform: translateY(-2px); }
.ctrl-btn:active { transform: scale(.95); }
.ctrl-btn.play {
  width: 78px; height: 78px;
  border: none; border-radius: 50%;
  background: linear-gradient(135deg, var(--lime), var(--lime-strong));
  color: #0a1406; font-size: 30px;
  box-shadow: 0 12px 34px rgba(168, 230, 42, .4);
}
.ctrl-btn.play:hover { filter: brightness(1.08); }
.ctrl-btn.active { border-color: var(--lime); color: var(--lime); box-shadow: inset 0 0 0 1px var(--lime); }
.ctrl-btn.tiny { min-width: 52px; height: 52px; border-radius: 16px; font-size: 15px; font-weight: 700; }

.deck-label {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 16px; border-radius: var(--r-md);
  background: var(--glass-2); border: 1px solid var(--stroke);
  font-size: 13px; color: var(--text-dim);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.deck-label select {
  background: rgba(255, 255, 255, .06);
  border: 1px solid var(--stroke); border-radius: 10px;
  color: var(--text); font-size: 13px; font-family: var(--font-body);
  padding: 6px 8px; outline: none; cursor: pointer;
}
.deck-label select:focus { border-color: var(--lime); }

/* 波形 */
.wave-box { margin-top: 20px; padding: 14px 16px 10px; border-radius: var(--r-xl); }
#wave { width: 100%; height: 64px; display: block; border-radius: var(--r-md); background: rgba(5, 10, 18, .6); }
.wave-meta { display: flex; align-items: center; justify-content: space-between; padding: 8px 6px 2px; }
#progressText { font-size: 12.5px; color: var(--text-dim); font-variant-numeric: tabular-nums; letter-spacing: .5px; }
.wave-hint { font-size: 11.5px; color: var(--text-faint); }

/* 句子列表 */
.sent-list {
  margin-top: 18px;
  border-radius: var(--r-xl);
  padding: 10px;
  max-height: 400px; overflow-y: auto;
  display: flex; flex-direction: column; gap: 6px;
  scrollbar-width: thin; scrollbar-color: rgba(200, 245, 66, .3) transparent;
}
.sent-list::-webkit-scrollbar { width: 6px; }
.sent-list::-webkit-scrollbar-thumb { background: rgba(200, 245, 66, .3); border-radius: 3px; }
.sent-item {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 12px 14px; border-radius: var(--r-md);
  border: 1px solid transparent;
  cursor: pointer; transition: .16s;
}
.sent-item:hover { background: rgba(255, 255, 255, .04); }
.sent-item.current {
  background: var(--lime-dim);
  border-color: rgba(200, 245, 66, .4);
}
.sent-item .num {
  flex: none; min-width: 44px;
  font-family: var(--font-display); font-size: 11.5px; font-weight: 600;
  color: var(--text-faint); letter-spacing: .3px; padding-top: 3px;
}
.sent-item.current .num { color: var(--lime); }
.sent-item .txt { flex: 1; min-width: 0; }
.sent-item .en { font-size: 14.5px; line-height: 1.5; }
.sent-item .zh { font-size: 12.5px; color: var(--text-dim); margin-top: 3px; line-height: 1.5; }

/* ---------------- 设置页 ---------------- */
.settings-wrap { max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; gap: 18px; }

.settings-bar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 2px 2px 0;
}
.settings-bar-title { font-size: 14px; font-weight: 700; color: var(--text-dim); letter-spacing: 1px; }
.settings-card { border-radius: var(--r-xl); padding: 26px; }
.settings-head { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; }
.settings-ico {
  width: 46px; height: 46px; flex: none;
  display: grid; place-items: center;
  font-size: 20px; color: var(--ico, var(--lime));
  background: color-mix(in srgb, var(--ico, #c8f542) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--ico, #c8f542) 35%, transparent);
  border-radius: 14px;
}
.settings-head h3 { font-size: 16.5px; font-weight: 700; }
.settings-sub { font-size: 12.5px; color: var(--text-dim); margin-top: 3px; }

.field { margin-bottom: 14px; flex: 1; min-width: 0; }
.field label { display: block; font-size: 12.5px; color: var(--text-dim); margin-bottom: 7px; font-weight: 600; letter-spacing: .2px; }
.field input, .field select {
  width: 100%;
  background: rgba(5, 10, 18, .55);
  border: 1px solid var(--stroke);
  color: var(--text); border-radius: var(--r-sm);
  padding: 11px 14px; font-size: 14px; font-family: var(--font-body);
  outline: none; transition: border-color .16s, box-shadow .16s;
}
.field input:focus, .field select:focus { border-color: var(--lime); box-shadow: 0 0 0 3px rgba(200, 245, 66, .12); }
.field select { cursor: pointer; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%2393a5c4' stroke-width='1.6' fill='none' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 34px; }
.field-row { display: flex; gap: 14px; }
.field-row .field:last-child { margin-bottom: 14px; }
.hint { font-size: 11.5px; color: var(--text-faint); margin-top: 6px; line-height: 1.6; }

.advanced { margin-top: 4px; }
.advanced summary {
  cursor: pointer; font-size: 12.5px; color: var(--text-faint);
  padding: 6px 0; list-style: none; transition: .16s;
}
.advanced summary:hover { color: var(--text-dim); }
.advanced summary::-webkit-details-marker { display: none; }
.advanced[open] summary { color: var(--lime); }

/* 模型配置说明表 */
.model-guide {
  margin-top: 16px; padding: 16px;
  border: 1px solid var(--stroke); border-radius: var(--r-md);
  background: rgba(5, 10, 18, .4);
}
.model-guide-title { font-size: 13px; font-weight: 700; color: var(--text); margin-bottom: 10px; }
.model-guide table { width: 100%; border-collapse: collapse; font-size: 12px; }
.model-guide th, .model-guide td {
  text-align: left; padding: 8px 10px; vertical-align: top;
  border-bottom: 1px solid var(--stroke); line-height: 1.55;
}
.model-guide th { color: var(--text-dim); font-weight: 600; white-space: nowrap; }
.model-guide tr:last-child td { border-bottom: none; }
.model-guide td:first-child { color: var(--lime); white-space: nowrap; }
.model-guide td:nth-child(2) { color: var(--text-dim); }
@media (max-width: 720px) {
  .model-guide table { font-size: 11px; }
  .model-guide th, .model-guide td { padding: 6px 6px; }
}

/* ---------------- Toast ---------------- */
#toast {
  position: fixed; bottom: 30px; left: 50%; transform: translateX(-50%) translateY(16px);
  z-index: 200;
  background: var(--glass-2);
  border: 1px solid var(--stroke-strong); border-radius: var(--r-full);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 13px 26px; font-size: 14px;
  box-shadow: var(--shadow-pop);
  opacity: 0; pointer-events: none; transition: .28s cubic-bezier(.2, .9, .3, 1.2);
  max-width: 90vw; text-align: center;
}
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
#toast.err { border-color: var(--danger); color: var(--danger); }

/* ---------------- 响应式 ---------------- */
@media (max-width: 720px) {
  .app { padding: 0 14px 60px; }
  .topbar { flex-wrap: wrap; }
  .brand-sub { display: none; }
  .topbar-actions { width: 100%; justify-content: flex-end; }
  .chip span { display: none; }
  .chip { padding: 9px 13px; }
  .hero { padding-top: 30px; }
  .stage { padding: 44px 18px 34px; min-height: 200px; }
  .field-row { flex-direction: column; gap: 0; }
  .deck-label { width: 100%; justify-content: center; }
  .ctrl-btn { min-width: 54px; height: 54px; }
  .ctrl-btn.play { width: 70px; height: 70px; }
  .audio-grid { grid-template-columns: 1fr; }
}

/* 减少动效偏好 */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* ---------------- 原始响应查看弹窗 ---------------- */
.raw-modal {
  position: fixed; inset: 0; z-index: 120;
  display: flex; align-items: center; justify-content: center;
  background: rgba(5, 10, 18, .66);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  padding: 24px;
}
.raw-modal.hidden { display: none; }
.raw-box {
  width: min(860px, 94vw); max-height: 82vh;
  display: flex; flex-direction: column;
  border-radius: 22px; padding: 18px 18px 14px;
}
.raw-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 12px; color: var(--lime);
}
.raw-head b { font-size: 15px; letter-spacing: .3px; }
.raw-actions { display: flex; align-items: center; gap: 8px; }
.raw-btn {
  padding: 6px 14px; border-radius: var(--r-full);
  border: 1px solid var(--lime); background: var(--lime-dim);
  color: var(--lime); font-size: 12px; font-weight: 700; cursor: pointer; transition: .16s;
}
.raw-btn:hover { background: var(--lime); color: #0a1406; }
.raw-close {
  border: 1px solid var(--line); background: transparent;
  color: var(--text-dim); width: 30px; height: 30px; border-radius: 10px;
  cursor: pointer; font-size: 13px; transition: .2s;
}
.raw-close:hover { color: var(--danger); border-color: var(--danger); }
#infoContent {
  margin: 0; overflow: auto; flex: 1;
  padding: 14px 16px; border-radius: 14px;
  background: rgba(0, 0, 0, .32);
  border: 1px solid var(--line);
  color: var(--text); font-size: 12.5px; line-height: 1.65;
  font-family: "SF Mono", Menlo, Consolas, monospace;
  white-space: pre-wrap; word-break: break-word;
}

/* ---------------- 确认弹窗 ---------------- */
.confirm-box { width: min(440px, 92vw); padding: 26px 26px 24px; text-align: center; }
.confirm-head { display: flex; align-items: center; justify-content: center; margin-bottom: 14px; }
.confirm-head b { font-size: 17px; font-weight: 800; letter-spacing: .3px; color: var(--lime); }
.confirm-msg { font-size: 14px; color: var(--text); line-height: 1.7; margin-bottom: 24px; white-space: pre-line; word-break: break-word; }
.confirm-actions { display: flex; gap: 12px; }
.confirm-btn {
  flex: 1; padding: 12px 16px; border-radius: 14px; font-size: 14px; font-weight: 700;
  letter-spacing: .5px; cursor: pointer; border: 1px solid transparent; transition: .18s;
}
.confirm-btn.ghost { border-color: var(--line); color: var(--text-dim); background: transparent; }
.confirm-btn.ghost:hover { border-color: var(--text-dim); color: var(--text); }
.confirm-btn.primary { background: var(--lime); color: #0a1406; }
.confirm-btn.primary:hover { box-shadow: 0 8px 22px rgba(168, 230, 42, .35); transform: translateY(-1px); }
.confirm-btn.danger { background: var(--danger); color: #fff; }
.confirm-btn.danger:hover { box-shadow: 0 8px 22px rgba(255, 107, 122, .35); transform: translateY(-1px); }

/* ---------------- 访问码解锁弹窗 ---------------- */
.lock-box { width: min(460px, 92vw); padding: 34px 30px 30px; text-align: center; }
.lock-icon { font-size: 34px; line-height: 1; margin-bottom: 14px; }
.lock-title { font-size: 19px; font-weight: 800; color: var(--lime); letter-spacing: .3px; margin-bottom: 8px; }
.lock-desc { font-size: 13px; color: var(--text-dim); line-height: 1.6; margin-bottom: 20px; }
.lock-input {
  width: 100%; padding: 12px 14px; margin-bottom: 16px;
  border-radius: var(--r-lg); border: 1px solid var(--line);
  background: rgba(0, 0, 0, .28); color: var(--text);
  font-size: 15px; letter-spacing: 1px; text-align: center; outline: none; transition: border-color .2s;
}
.lock-input:focus { border-color: var(--lime); }
.lock-choices {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 4px;
}
.lock-choice {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  padding: 22px 12px; border-radius: var(--r-lg);
  border: 1px solid var(--line); background: rgba(0, 0, 0, .22);
  color: var(--text); cursor: pointer; transition: .2s;
}
.lock-choice:hover { border-color: var(--lime); background: var(--lime-dim); transform: translateY(-2px); }
.lock-choice-ico { font-size: 30px; line-height: 1; }
.lock-choice-txt { font-size: 13.5px; font-weight: 700; letter-spacing: .3px; }
.lock-code-area { margin-top: 14px; }
.lock-admin {
  margin-top: 4px; background: none; border: none; cursor: pointer;
  color: var(--text-dim); font-size: 12.5px; text-decoration: underline;
  text-underline-offset: 3px; transition: color .2s;
}
.lock-admin:hover { color: var(--lime); }

/* ============================================================
   暖纸笔记本风（第二主题）
   米白纸底 × 墨色文字 × 红笔批注 · 去毛玻璃 · 更"人"一点
   切换：设置 → 播放偏好 → 外观主题（保存到本机 localStorage）
   ============================================================ */
html[data-theme="paper"] {
  /* 色彩：纸张 + 红笔红 + 墨蓝 */
  --bg-0: #f4eee1;
  --bg-1: #ece3d1;
  --bg-2: #e1d7c2;
  --lime: #d1503e;          /* 红笔批注红（替代青柠） */
  --lime-strong: #b93e30;
  --lime-dim: rgba(209, 80, 62, .10);
  --mint: #3e5c76;          /* 墨蓝（第二强调色） */
  --blue: #4a6fa5;
  --amber: #b9821f;
  --text: #2b241c;          /* 墨色 */
  --text-dim: #6f6353;
  --text-faint: #a2947e;
  --glass: rgba(255, 252, 246, .92);
  --glass-2: rgba(250, 245, 236, .95);
  --stroke: rgba(43, 36, 28, .12);
  --stroke-strong: rgba(43, 36, 28, .22);
  --danger: #c0392b;
  --ok: var(--lime);

  /* 圆角收敛一点，更克制 */
  --r-xl: 22px; --r-lg: 18px; --r-md: 14px; --r-sm: 11px;

  --shadow-card: 0 4px 20px rgba(80, 60, 40, .13);
  --shadow-pop: 0 10px 32px rgba(80, 60, 40, .18);

  /* 波形画布配色 */
  --wave-bg: rgba(240, 233, 218, .8);
  --wave-bar: rgba(62, 92, 118, .4);
  --wave-bar-active: rgba(209, 80, 62, .65);
  --wave-bar-idle: rgba(62, 92, 118, .25);
  --wave-played: rgba(209, 80, 62, .14);
  --wave-progress: rgba(209, 80, 62, .85);

  scrollbar-color: rgba(209, 80, 62, .4) transparent;
}
/* 页面底色：暖纸 + 极淡暖色晕染（替代深色光晕，弱而自然） */
html[data-theme="paper"] body {
  background:
    radial-gradient(1100px 640px at 88% -8%, rgba(216, 160, 110, .16), transparent 62%),
    radial-gradient(900px 560px at -8% 112%, rgba(74, 111, 165, .09), transparent 60%),
    var(--bg-0);
}
html[data-theme="paper"] .aura { display: none; }
html[data-theme="paper"] .grain { mix-blend-mode: multiply; opacity: .05; }
html[data-theme="paper"] ::selection { background: var(--lime); color: #fff8ef; }

/* 去玻璃：纸面卡片 */
html[data-theme="paper"] .glass,
html[data-theme="paper"] .audio-card,
html[data-theme="paper"] .ctrl-btn,
html[data-theme="paper"] .deck-label,
html[data-theme="paper"] #toast {
  backdrop-filter: none; -webkit-backdrop-filter: none;
}
html[data-theme="paper"] .audio-card {
  background: var(--glass);
  box-shadow: 0 3px 0 rgba(80, 60, 40, .05), var(--shadow-card);
}
html[data-theme="paper"] .audio-card:hover { border-color: rgba(209, 80, 62, .4); transform: translateY(-2px); }

/* 红笔系点缀 */
html[data-theme="paper"] .brand-mark {
  background: linear-gradient(135deg, var(--lime), var(--lime-strong));
  box-shadow: 0 6px 16px rgba(209, 80, 62, .3);
}
html[data-theme="paper"] .btn-primary {
  background: linear-gradient(135deg, var(--lime), var(--lime-strong));
  color: #fff8ef; box-shadow: 0 6px 18px rgba(209, 80, 62, .26);
}
html[data-theme="paper"] .btn-primary:hover { box-shadow: 0 10px 26px rgba(209, 80, 62, .38); }
html[data-theme="paper"] .ctrl-btn.play {
  background: linear-gradient(135deg, var(--lime), var(--lime-strong));
  color: #fff8ef; box-shadow: 0 10px 26px rgba(209, 80, 62, .3);
}
html[data-theme="paper"] .prog { background: rgba(43, 36, 28, .1); }
html[data-theme="paper"] .prog-fill { background: linear-gradient(90deg, var(--lime), var(--mint)); }
html[data-theme="paper"] .hero-kicker { border-color: rgba(209, 80, 62, .3); }
html[data-theme="paper"] .card-icon {
  background: linear-gradient(135deg, rgba(209, 80, 62, .14), rgba(62, 92, 118, .10));
  border-color: rgba(209, 80, 62, .25);
}
html[data-theme="paper"] .chip-demo { border-color: rgba(209, 80, 62, .45); }
html[data-theme="paper"] .status-ready { background: rgba(209, 80, 62, .12); }
html[data-theme="paper"] .stage::before {
  background:
    radial-gradient(600px 220px at 50% -40px, rgba(209, 80, 62, .10), transparent 70%),
    radial-gradient(500px 200px at 85% 110%, rgba(62, 92, 118, .08), transparent 70%);
}
html[data-theme="paper"] .sent-item:hover { background: rgba(43, 36, 28, .05); }
html[data-theme="paper"] .sent-item.current { border-color: rgba(209, 80, 62, .4); }
html[data-theme="paper"] .sent-list { scrollbar-color: rgba(209, 80, 62, .35) transparent; }
html[data-theme="paper"] .sent-list::-webkit-scrollbar-thumb { background: rgba(209, 80, 62, .35); }
html[data-theme="paper"] .btn-ghost { background: rgba(43, 36, 28, .05); }
html[data-theme="paper"] .chip, html[data-theme="paper"] .engine-btn { background: rgba(43, 36, 28, .05); }

/* 表单走浅色纸面 */
html[data-theme="paper"] .field input,
html[data-theme="paper"] .field select {
  background-color: #fbf7ef; border-color: var(--stroke-strong);
}
html[data-theme="paper"] .field input:focus,
html[data-theme="paper"] .field select:focus { box-shadow: 0 0 0 3px rgba(209, 80, 62, .14); }
html[data-theme="paper"] .field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%236f6353' stroke-width='1.6' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
}
html[data-theme="paper"] .model-guide { background: rgba(250, 245, 236, .7); }
html[data-theme="paper"] .lock-input { background: #fbf7ef; border-color: var(--stroke-strong); }
html[data-theme="paper"] .lock-choice { background: rgba(43, 36, 28, .04); border-color: var(--stroke); }
html[data-theme="paper"] .raw-modal { background: rgba(43, 36, 28, .35); }
html[data-theme="paper"] #wave { background: var(--wave-bg); }
