/* WORDMONv3 — 移动优先、单列 app 布局、底部 tab 导航 */

:root {
  --bg: #f4f6fb;
  --card: #ffffff;
  --ink: #1d2433;
  --ink-2: #5b6478;
  --ink-3: #9aa3b8;
  --line: #e7eaf3;
  --accent: #5b7cfa;
  --accent-2: #7c5cfc;
  --accent-soft: #eef1ff;
  --green: #2fbf8f;
  --green-soft: #e6f8f1;
  --red: #f0616d;
  --red-soft: #fdeceb;
  --amber: #f5a623;
  --amber-soft: #fdf3e0;
  --radius: 16px;
  --radius-sm: 12px;
  --shadow: 0 2px 12px rgba(29, 36, 51, 0.06);
  --shadow-lift: 0 8px 28px rgba(29, 36, 51, 0.14);
  --tabbar-h: 62px;
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  height: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Segoe UI", "Helvetica Neue", sans-serif;
  font-size: 17px;
  line-height: 1.5;
}
html { touch-action: manipulation; }

button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, textarea, select { font-family: inherit; font-size: 16px; color: var(--ink); }

.app-shell { min-height: 100vh; }
.app-loading { padding: 80px; text-align: center; color: var(--ink-3); }

/* ---- iPad shell: 左侧栏 + 宽内容区 ---- */
.ipad-shell { display: flex; align-items: stretch; min-height: 100vh; }

.side-nav {
  width: 244px; flex-shrink: 0;
  background: var(--card);
  border-right: 1px solid var(--line);
  position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column; gap: 24px;
  padding: 26px 16px calc(24px + env(safe-area-inset-bottom, 0px));
  overflow-y: auto; overscroll-behavior: contain;
}
.side-brand { display: flex; align-items: center; gap: 11px; padding: 0 6px; }
.app-logo {
  width: 40px; height: 40px; border-radius: 12px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff; font-weight: 800; font-size: 20px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow);
}
.side-title { font-size: 18px; font-weight: 800; }
.side-stats { display: flex; flex-direction: column; gap: 8px; }
.side-chip {
  display: flex; align-items: center; gap: 6px;
  font-size: 14px; font-weight: 600; color: var(--ink-2);
  background: var(--bg); border-radius: 12px;
  padding: 10px 14px; text-align: left;
}
.side-chip strong { color: var(--ink); font-size: 16px; }
.side-chip.tap:active { background: var(--accent-soft); }
.side-menu { display: flex; flex-direction: column; gap: 6px; margin-top: 4px; }
.side-menu-wrap { display: flex; flex-direction: column; gap: 6px; }
.side-settings { margin-top: 9px; border-top: 1px solid var(--line); border-radius: 0 0 13px 13px; }
.side-item {
  display: flex; align-items: center; gap: 12px;
  font-size: 16px; font-weight: 700; color: var(--ink-2);
  padding: 13px 14px; border-radius: 13px;
  transition: background 0.12s;
}
.side-item .si { font-size: 21px; width: 26px; text-align: center; }
.side-item:active { background: var(--bg); }
.side-item.on { background: var(--accent-soft); color: var(--accent); }

/* ---- main / views ---- */
.app-main { flex: 1; min-width: 0; overflow-x: hidden; }
.main-inner {
  max-width: 980px; margin: 0 auto;
  padding: 30px 34px 60px;
  display: flex; flex-direction: column; gap: 20px;
}
/* 列表型页面（朗读/报告/积分）收窄，阅读更舒服 */
.main-inner.view-advanced-spelling, .main-inner.view-word-readings, .main-inner.view-phrase-readings,
.main-inner.view-report, .main-inner.view-points { max-width: 760px; }

.advanced-spelling-hero {
  display: flex; align-items: center; gap: 16px; color: #fff;
  background: linear-gradient(135deg, #6954b8, #8b74d3);
  border-radius: var(--radius); padding: 22px 24px; box-shadow: var(--shadow-lift);
}
.advanced-spelling-icon {
  width: 52px; height: 52px; flex: 0 0 52px; display: flex; align-items: center; justify-content: center;
  border-radius: 16px; background: rgba(255,255,255,0.18); font-size: 27px;
}
.advanced-spelling-hero h2 { font-size: 22px; font-weight: 800; }
.advanced-spelling-hero p { margin-top: 4px; font-size: 14px; line-height: 1.5; opacity: 0.9; }
.advanced-spelling-list { display: flex; flex-direction: column; gap: 12px; }
.advanced-spelling-card {
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px 22px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.advanced-spelling-card h3 { font-size: 18px; line-height: 1.35; }
.advanced-spelling-card p { color: var(--ink-3); font-size: 13px; margin-top: 5px; }
.advanced-spelling-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.advanced-spelling-actions button {
  min-height: 42px; border-radius: 11px; background: var(--accent-soft); color: var(--accent);
  padding: 9px 13px; font-size: 13px; font-weight: 800;
}

.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px;
}

.section-title {
  font-size: 15px; font-weight: 700; color: var(--ink-2);
  margin: 8px 2px -6px;
  display: flex; align-items: center; justify-content: space-between;
}
.section-title .link-btn { font-size: 14px; color: var(--accent); font-weight: 600; }

/* ---- 单词朗读 ---- */
.word-reading-hero {
  display: flex; align-items: center; gap: 16px; color: #fff;
  background: linear-gradient(135deg, #387f4c, #6a9d3b);
  border-radius: var(--radius); padding: 22px 24px; box-shadow: var(--shadow-lift);
}
.word-reading-hero-icon {
  width: 52px; height: 52px; flex: 0 0 52px; display: flex; align-items: center; justify-content: center;
  border-radius: 16px; background: rgba(255,255,255,0.18); font-size: 27px;
}
.word-reading-hero h2 { font-size: 22px; font-weight: 800; }
.word-reading-hero p { margin-top: 3px; font-size: 14px; opacity: 0.9; }
.word-reading-sets { display: flex; flex-direction: column; gap: 18px; }
.word-reading-card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px 24px 24px; }
.word-reading-card-head h3 { margin-top: 7px; font-size: 21px; line-height: 1.3; }
.word-reading-card-head p, .word-reading-section-head p { margin-top: 3px; color: var(--ink-3); font-size: 13px; }
.word-reading-badge {
  display: inline-flex; color: #347046; background: #eaf5e7;
  border-radius: 999px; padding: 3px 10px; font-size: 12px; font-weight: 800;
}
.word-reading-controls { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; margin-top: 18px; }
.word-reading-play, .word-reading-stop {
  min-height: 46px; border-radius: 13px; padding: 10px 16px; font-size: 14px; font-weight: 800;
  transition: transform 0.12s ease, background 0.15s ease, box-shadow 0.15s ease;
}
.word-reading-play { color: #fff; background: linear-gradient(135deg, #438d55, #75a842); box-shadow: 0 5px 16px rgba(58,127,76,0.16); }
.word-reading-play.is-playing { background: linear-gradient(135deg, #245f37, #4b7f26); }
.word-reading-stop { min-width: 96px; color: var(--ink-2); background: var(--bg); }
.word-reading-play:active, .word-reading-stop:active { transform: scale(0.985); }
.word-reading-section { margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--line); }
.word-reading-section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.word-reading-section-head h4 { color: #314b37; font-size: 18px; }
.word-reading-play-section { min-height: 38px; padding: 8px 13px; font-size: 13px; box-shadow: none; }
.word-reading-list { display: flex; flex-direction: column; gap: 8px; margin-top: 13px; }
.word-reading-row {
  width: 100%; min-height: 66px; display: grid; grid-template-columns: 48px minmax(0, 1fr) 34px;
  align-items: center; gap: 12px; padding: 10px 13px; border: 1.5px solid var(--line); border-radius: 14px;
  background: #fff; text-align: left; transition: border-color 0.15s ease, background 0.15s ease, transform 0.12s ease;
}
.word-reading-row:hover { border-color: #b9d8b6; background: #fbfff9; }
.word-reading-row:active { transform: scale(0.995); }
.word-reading-row.is-playing { border-color: #5aa36a; background: #edf8eb; box-shadow: 0 4px 14px rgba(58,127,76,0.1); }
.word-reading-number {
  min-width: 44px; height: 34px; padding: 0 5px; display: flex; align-items: center; justify-content: center;
  border-radius: 11px; background: var(--bg); color: var(--ink-2); font-size: 13px; font-weight: 900;
}
.word-reading-row.is-playing .word-reading-number { color: #fff; background: #5aa36a; }
.word-reading-copy { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.word-reading-zh { color: var(--ink-2); font-size: 13px; font-weight: 700; }
.word-reading-en { color: #26324a; font-family: Georgia, 'Times New Roman', serif; font-size: 18px; font-weight: 700; line-height: 1.35; overflow-wrap: anywhere; }
.word-reading-speaker {
  width: 34px; height: 34px; display: flex; align-items: center; justify-content: center;
  border-radius: 50%; background: #eaf5e7; font-size: 15px; opacity: 0.72;
}
.word-reading-row.is-playing .word-reading-speaker { background: #d7eed5; opacity: 1; }
.word-reading-empty {
  min-height: 220px; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 6px; color: var(--ink-3); background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
}
.word-reading-empty div { font-size: 34px; }
.word-reading-empty strong { color: var(--ink-2); }
.word-reading-empty span { font-size: 13px; }

/* ---- 词组朗读 ---- */
.phrase-reading-hero {
  display: flex; align-items: center; gap: 16px;
  color: #fff;
  background: linear-gradient(135deg, #16a085, #3b82d0);
  border-radius: var(--radius); padding: 22px 24px;
  box-shadow: var(--shadow-lift);
}
.phrase-reading-hero-icon {
  width: 52px; height: 52px; flex: 0 0 52px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 16px; background: rgba(255,255,255,0.18); font-size: 27px;
}
.phrase-reading-hero h2 { font-size: 22px; font-weight: 800; }
.phrase-reading-hero p { margin-top: 3px; font-size: 14px; opacity: 0.9; }
.phrase-reading-sets { display: flex; flex-direction: column; gap: 18px; }
.phrase-reading-card {
  background: var(--card); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 22px 24px 24px;
}
.phrase-reading-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.phrase-reading-card-head h3 { margin-top: 7px; font-size: 21px; line-height: 1.3; }
.phrase-reading-card-head p { margin-top: 3px; color: var(--ink-3); font-size: 13px; }
.phrase-reading-badge {
  display: inline-flex; color: #14806c; background: #e5f8f3;
  border-radius: 999px; padding: 3px 10px; font-size: 12px; font-weight: 800;
}
.phrase-reading-controls {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px;
  margin-top: 18px;
}
.phrase-reading-play-all, .phrase-reading-stop {
  min-height: 48px; border-radius: 13px; padding: 11px 18px;
  font-size: 15px; font-weight: 800;
  transition: transform 0.12s ease, background 0.15s ease, box-shadow 0.15s ease;
}
.phrase-reading-play-all {
  color: #fff; background: linear-gradient(135deg, #18a987, #3b82d0);
  box-shadow: 0 5px 16px rgba(22,160,133,0.18);
}
.phrase-reading-play-all.is-playing { background: linear-gradient(135deg, #087c67, #2768aa); }
.phrase-reading-stop { min-width: 96px; color: var(--ink-2); background: var(--bg); }
.phrase-reading-play-all:active, .phrase-reading-stop:active { transform: scale(0.985); }
.phrase-reading-play-all:focus-visible, .phrase-reading-stop:focus-visible,
.phrase-reading-row:focus-visible { outline: 3px solid rgba(22,160,133,0.28); outline-offset: 2px; }
.phrase-reading-list {
  display: flex; flex-direction: column; gap: 9px;
  margin-top: 18px;
}
.phrase-reading-row {
  width: 100%; min-height: 70px;
  display: grid; grid-template-columns: 48px minmax(0, 1fr) 34px;
  align-items: center; gap: 12px;
  padding: 12px 13px; border: 1.5px solid var(--line); border-radius: 14px;
  background: #fff; text-align: left;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.12s ease, box-shadow 0.15s ease;
}
.phrase-reading-row:hover { border-color: #b6ddd5; background: #fbfffe; }
.phrase-reading-row:active { transform: scale(0.995); }
.phrase-reading-row.is-playing {
  border-color: #20a88a; background: #eaf9f5;
  box-shadow: 0 4px 14px rgba(22,160,133,0.12);
}
.phrase-reading-number {
  min-width: 44px; height: 34px; padding: 0 5px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 11px; background: var(--bg); color: var(--ink-2);
  font-size: 13px; font-weight: 900;
}
.phrase-reading-row.is-playing .phrase-reading-number { color: #fff; background: #20a88a; }
.phrase-reading-copy { min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.phrase-reading-zh { color: var(--ink-2); font-size: 13px; font-weight: 700; }
.phrase-reading-en-list { display: flex; flex-direction: column; gap: 2px; }
.phrase-reading-en-item {
  color: #26324a; font-family: Georgia, 'Times New Roman', serif;
  font-size: 18px; font-weight: 700; line-height: 1.35; overflow-wrap: anywhere;
}
.phrase-reading-speaker {
  width: 34px; height: 34px; display: flex; align-items: center; justify-content: center;
  border-radius: 50%; background: var(--accent-soft); font-size: 15px; opacity: 0.72;
}
.phrase-reading-row.is-playing .phrase-reading-speaker { background: #d1f1e9; opacity: 1; }
.phrase-reading-empty {
  min-height: 220px; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 6px; color: var(--ink-3); background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
}
.phrase-reading-empty div { font-size: 34px; }
.phrase-reading-empty strong { color: var(--ink-2); }
.phrase-reading-empty span { font-size: 13px; }

/* ---- 课本跟读 ---- */
.reading-hero {
  display: flex; align-items: center; gap: 16px;
  color: #fff;
  background: linear-gradient(135deg, #4266e8, var(--accent-2));
  border-radius: var(--radius); padding: 22px 24px;
  box-shadow: var(--shadow-lift);
}
.reading-hero-icon {
  width: 52px; height: 52px; flex: 0 0 52px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 16px; background: rgba(255,255,255,0.18); font-size: 27px;
}
.reading-hero h2 { font-size: 22px; font-weight: 800; }
.reading-hero p { margin-top: 3px; font-size: 14px; opacity: 0.88; }
.reading-list { display: flex; flex-direction: column; gap: 18px; }
.reading-card {
  background: var(--card); border: 2px solid transparent;
  border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px 24px;
}
.reading-card-head { display: flex; align-items: flex-start; }
.reading-card h3 { margin-top: 4px; font-family: Georgia, 'Times New Roman', serif; font-size: 24px; line-height: 1.25; }
.reading-card-head p { margin-top: 3px; color: var(--ink-3); font-size: 14px; font-style: italic; }
.reading-status {
  display: inline-flex; color: var(--ink-3); background: var(--bg);
  border-radius: 999px; padding: 3px 9px; font-size: 12px; font-weight: 700;
}
.reading-player-label, .reading-line-guide {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  color: var(--ink-3); font-size: 13px;
}
.reading-player-label { margin-top: 18px; }
.reading-player-label strong, .reading-line-guide strong { color: var(--ink-2); font-size: 14px; }
.reading-audio { display: block; width: 100%; min-height: 44px; margin-top: 8px; }
.reading-line-guide { margin-top: 18px; }
.reading-poem {
  margin-top: 8px; padding-top: 10px; border-top: 1px solid var(--line);
  color: #273149; font-family: Georgia, 'Times New Roman', serif;
  font-size: 19px; line-height: 1.55;
}
.reading-line {
  appearance: none; width: 100%; min-height: 44px; margin: 0; padding: 5px 8px;
  display: flex; align-items: flex-start; gap: 7px;
  border: 0; border-radius: 9px; background: transparent; color: inherit;
  font: inherit; line-height: inherit; text-align: left; cursor: pointer;
  transition: color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}
.reading-line:hover { background: #f1f4ff; }
.reading-line:active { transform: scale(0.995); }
.reading-line:focus-visible { outline: 3px solid rgba(91,124,250,0.35); outline-offset: 1px; }
.reading-line.is-playing { color: #3157d7; background: #e9eeff; font-weight: 700; }
.reading-line-speaker {
  flex: 0 0 20px; padding-top: 0.3em; color: var(--accent); font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 12px; line-height: 1; opacity: 0.45;
}
.reading-line.is-playing .reading-line-speaker { opacity: 1; }
.reading-section-tabs {
  display: grid; grid-template-columns: 1fr 1fr; gap: 6px;
  padding: 5px; border-radius: 15px; background: #e7ebf4;
}
.reading-section-tabs button {
  min-height: 46px; padding: 9px 16px; border-radius: 11px;
  color: var(--ink-2); font-size: 15px; font-weight: 800;
}
.reading-section-tabs button.on {
  color: #3157d7; background: #fff; box-shadow: 0 2px 9px rgba(35,49,88,0.1);
}
.textbook-page-tabs {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px;
}
.textbook-page-tabs button {
  min-height: 64px; display: flex; flex-direction: column; align-items: flex-start; justify-content: center;
  gap: 3px; padding: 10px 14px; border: 1.5px solid var(--line); border-radius: 13px;
  color: var(--ink-2); background: #fff; text-align: left;
}
.textbook-page-tabs button span { font-size: 14px; font-weight: 900; }
.textbook-page-tabs button small {
  width: 100%; color: var(--ink-3); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.textbook-page-tabs button.on { color: #246f42; border-color: #7fbd8f; background: #eef8ef; }
.textbook-page-tabs button.on small { color: #4b7d59; }
.textbook-page {
  overflow: hidden; padding: 0 28px 28px; border: 1px solid #dce9dd; border-left: 8px solid #70aa78;
  background: linear-gradient(180deg, #fcfff9 0, #fff 160px);
}
.textbook-unit-banner {
  min-height: 72px; margin: 0 -28px 20px; padding: 0 28px;
  display: flex; align-items: center; gap: 18px;
  color: #fff; background: linear-gradient(100deg, #215b4e, #5da83d);
  box-shadow: 0 4px 12px rgba(38,91,65,0.17);
}
.textbook-unit-banner span {
  padding-right: 18px; border-right: 2px solid rgba(255,255,255,0.35);
  font-family: Georgia, 'Times New Roman', serif; font-size: 25px; font-weight: 900;
}
.textbook-unit-banner strong { font-size: 24px; line-height: 1.2; }
.textbook-source, .textbook-lead { color: #4d7150; font-size: 14px; font-weight: 750; }
.textbook-copy { border-top-color: #dbe8d9; }
.textbook-email-list { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 12px; }
.textbook-email {
  overflow: hidden; border: 1px solid #a8c9cf; border-radius: 13px;
  background: #eef7f7; box-shadow: 0 5px 13px rgba(39,83,92,0.1);
}
.textbook-email-bar { padding: 8px 14px; color: #fff; background: #438ba0; font-weight: 800; }
.textbook-email-meta { padding: 10px 15px 7px; color: #354c59; font-family: Georgia, 'Times New Roman', serif; }
.textbook-email-meta div { display: grid; grid-template-columns: 70px minmax(0, 1fr); border-bottom: 1px solid #a9bfc4; }
.textbook-email-meta dt { font-style: italic; text-decoration: underline; }
.textbook-email-meta dd { min-width: 0; font-weight: 700; }
.textbook-email-body { padding: 6px 10px 14px; color: #263747; font-family: Georgia, 'Times New Roman', serif; font-size: 17px; }
.textbook-email-line { min-height: 39px; padding: 4px 6px; }
.textbook-planner-title {
  margin: 2px 0 0; color: #2d6946; font-family: Georgia, 'Times New Roman', serif;
  font-size: 29px; text-align: center;
}
.textbook-checklist {
  display: grid; grid-template-columns: 1fr 1fr; gap: 6px 20px;
  margin: 12px 0 18px; padding: 14px 18px; border: 1px solid #cbdcc8; border-radius: 13px; background: #f7fbf3;
}
.textbook-check-item { display: flex; align-items: flex-start; gap: 4px; color: #263747; }
.textbook-check-item > span { padding-top: 7px; font-size: 18px; }
.textbook-check-line { min-height: 39px; padding: 4px; }
.textbook-planner-scroll { overflow-x: auto; border: 1px solid #bacdac; border-radius: 12px; }
.textbook-planner-grid {
  min-width: 720px; display: grid; grid-template-columns: 110px repeat(3, minmax(180px, 1fr));
  color: #2f4737; background: #e8f1df;
}
.textbook-planner-head, .textbook-planner-day, .textbook-planner-cell {
  min-height: 58px; padding: 8px; border-right: 1px solid #c7d7bc; border-bottom: 1px solid #c7d7bc;
}
.textbook-planner-head {
  min-height: 44px; display: flex; align-items: center; justify-content: center;
  color: #385c42; background: #d4e5c6; font-size: 15px; font-weight: 900;
}
.textbook-planner-day { display: flex; align-items: center; font-family: Georgia, 'Times New Roman', serif; font-size: 16px; font-weight: 800; }
.textbook-planner-cell { background: rgba(255,255,255,0.2); }
.textbook-planner-line { min-height: 42px; padding: 3px; font-family: Georgia, 'Times New Roman', serif; font-size: 15px; }
.textbook-planner-empty { display: block; min-height: 40px; }
.textbook-bubble-intro {
  margin: -2px 0 2px; padding: 2px 10px; border-radius: 11px;
  color: #416844; background: #f0f7e9; font-family: Georgia, 'Times New Roman', serif; font-size: 17px; font-weight: 700;
}
.textbook-intro-line { min-height: 42px; }
.textbook-bubble-list { display: flex; flex-direction: column; gap: 14px; margin-top: 12px; }
.textbook-dialogue { display: flex; align-items: center; gap: 12px; }
.textbook-dialogue.from-right { flex-direction: row-reverse; }
.textbook-speaker-dot {
  flex: 0 0 42px; width: 42px; height: 42px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%; color: #fff; background: #3293b3; border: 4px solid #d7eef3;
  font-size: 13px; font-weight: 900;
}
.textbook-dialogue:nth-child(3n+2) .textbook-speaker-dot { background: #d7606e; border-color: #f7dde0; }
.textbook-dialogue:nth-child(3n) .textbook-speaker-dot { background: #4b9a5d; border-color: #dceede; }
.textbook-speech-bubble {
  position: relative; width: min(78%, 690px); padding: 10px 13px;
  border: 1.5px solid #b9c2b7; border-radius: 15px; background: #fbfcf8;
  box-shadow: 0 3px 9px rgba(53,72,55,0.08);
  color: #263747; font-family: Georgia, 'Times New Roman', serif; font-size: 18px;
}
.textbook-dialogue.from-left .textbook-speech-bubble::before,
.textbook-dialogue.from-right .textbook-speech-bubble::before {
  content: ''; position: absolute; top: 16px; width: 12px; height: 12px;
  border-bottom: 1.5px solid #b9c2b7; border-left: 1.5px solid #b9c2b7; background: #fbfcf8;
}
.textbook-dialogue.from-left .textbook-speech-bubble::before { left: -7px; transform: rotate(45deg); }
.textbook-dialogue.from-right .textbook-speech-bubble::before { right: -7px; transform: rotate(225deg); }
.textbook-dialogue-line { min-height: 39px; padding: 3px 5px; }
.textbook-big-question {
  display: flex; align-items: center; gap: 14px; padding: 12px 16px; border-radius: 18px;
  color: #315d37; background: #eef7df;
}
.textbook-big-question > span {
  flex: 0 0 58px; width: 58px; height: 58px; display: flex; align-items: center; justify-content: center;
  border-radius: 50%; color: #fff; background: #6daa3d; font-family: Georgia, 'Times New Roman', serif;
  font-size: 41px; font-weight: 900;
}
.textbook-big-question > div { min-width: 0; flex: 1; }
.textbook-big-question small { display: block; padding-left: 8px; color: #57824f; font-weight: 900; }
.textbook-question-line { min-height: 42px; font-size: 21px; font-weight: 800; }
.textbook-todo-note {
  margin-top: 10px; padding: 18px 20px; border: 1px solid #d4d1be; border-radius: 8px;
  color: #314035; background: #fffdf1; box-shadow: 0 7px 16px rgba(70,74,46,0.09);
}
.textbook-todo-note h3 { margin: 0 0 10px; color: #456645; font-size: 26px; }
.textbook-todo-row { display: grid; grid-template-columns: 28px minmax(0, 1fr); align-items: flex-start; }
.textbook-todo-row > span { padding-top: 7px; color: #4f5a4a; font-weight: 900; }
.textbook-todo-line { min-height: 40px; padding: 4px; font-size: 17px; }
.textbook-subject-lead {
  padding: 8px 12px; border-radius: 12px; color: #43714a; background: #f1f8eb;
  font-family: Georgia, 'Times New Roman', serif; font-size: 17px; font-weight: 700;
}
.textbook-lead-line { min-height: 38px; padding: 2px 5px; }
.textbook-subject-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; margin-top: 10px; }
.textbook-subject-chip {
  min-height: 56px; align-items: center; justify-content: center; padding: 7px; border: 1px solid #d8e4cf;
  background: #f3f8ee; color: #315843; text-align: center; font-size: 16px; font-weight: 800;
}
.textbook-subject-chip .reading-line-speaker { display: none; }
.textbook-subject-dialogues { display: flex; flex-direction: column; gap: 12px; margin-top: 18px; }
.textbook-sound-card {
  margin-top: 18px; padding: 14px 16px; border-radius: 14px; color: #33445a;
  background: linear-gradient(135deg, #f0f7ff, #f8f3ff); border: 1px solid #dce4f3;
  font-family: Georgia, 'Times New Roman', serif;
}
.textbook-sound-card > div { display: flex; align-items: baseline; gap: 12px; margin-bottom: 4px; }
.textbook-sound-card > div strong { color: #d3573b; font-size: 20px; }
.textbook-sound-card > div span { color: #b44d3b; font-weight: 800; }
.textbook-chant-line { min-height: 36px; padding: 2px 5px; font-size: 17px; }
.textbook-word-web {
  position: relative; min-height: 290px; margin-top: 10px; padding: 92px 18px 18px;
  border-radius: 18px; background: radial-gradient(circle at 50% 42%, #f1f7e7 0 88px, #fbfdf8 89px);
  border: 1px solid #dce8d5;
}
.textbook-word-web-center { position: absolute; top: 24px; left: 50%; width: 120px; transform: translateX(-50%); }
.textbook-web-center-line {
  min-height: 54px; align-items: center; justify-content: center; border-radius: 50%; color: #324d34;
  background: #dfe98d; font-size: 20px; font-weight: 900;
}
.textbook-web-center-line .reading-line-speaker { display: none; }
.textbook-word-web-items { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.textbook-web-item {
  min-height: 52px; align-items: center; justify-content: center; border: 1px solid #cfdac8; border-radius: 999px;
  background: #fff; text-align: center; font-size: 17px; font-weight: 800;
}
.textbook-web-item .reading-line-speaker { display: none; }
.textbook-science-example {
  margin-top: 18px; padding: 16px 18px; border-radius: 14px; color: #33445a; background: #eef6fb; border: 1px solid #d4e3ec;
  font-family: Georgia, 'Times New Roman', serif;
}
.textbook-science-example > strong { display: block; margin-bottom: 8px; color: #2873a2; font-family: inherit; }
.textbook-keywords { display: flex; gap: 8px; flex-wrap: wrap; }
.textbook-keyword-line { width: auto; min-height: 38px; padding: 4px 12px; border-radius: 999px; color: #b4543f; background: #fff; }
.textbook-science-line { margin-top: 8px; font-size: 18px; font-weight: 800; }
.textbook-online-post-page { background: linear-gradient(180deg, #fafff8 0, #fff 210px); }
.textbook-forum-window {
  overflow: hidden; margin-top: 4px; border: 1.5px solid #9ab9a5; border-radius: 16px;
  color: #263747; background: #fbfcf7; box-shadow: 0 7px 18px rgba(45,79,61,0.1);
  font-family: Georgia, 'Times New Roman', serif;
}
.textbook-forum-bar {
  min-height: 58px; padding: 10px 18px; display: flex; align-items: center; justify-content: space-between; gap: 14px;
  color: #fff; background: linear-gradient(105deg, #40786f 0 55%, #6ea43d 55% 100%);
}
.textbook-forum-bar span { font-size: 17px; font-weight: 750; }
.textbook-forum-bar strong { font-size: 24px; letter-spacing: 0.2px; }
.textbook-forum-topic, .textbook-forum-answer { padding: 18px 20px; }
.textbook-forum-topic h3 { margin: 0 0 10px; color: #29344a; font-size: 24px; font-family: inherit; }
.textbook-forum-author {
  display: flex; align-items: center; justify-content: flex-end; gap: 9px; margin-bottom: 7px;
  color: #687181; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}
.textbook-forum-author strong { font-size: 16px; }
.textbook-forum-author time { margin-left: 4px; color: #46505e; font-family: Georgia, 'Times New Roman', serif; font-size: 16px; }
.textbook-forum-avatar {
  width: 31px; height: 31px; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%; background: #e5eddf; font-size: 18px;
}
.textbook-forum-questions { padding-right: 32px; font-size: 20px; line-height: 1.42; }
.textbook-forum-answer-count {
  min-height: 46px; padding: 8px 20px; display: flex; align-items: center; gap: 10px;
  border-top: 1px dotted #98a49c; border-bottom: 1px dotted #98a49c; color: #344251; background: #f7f9f4;
}
.textbook-forum-answer-count span {
  width: 31px; height: 31px; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%; color: #fff; background: #587f83; font-family: sans-serif; font-size: 20px;
}
.textbook-forum-answer-count strong { font-size: 18px; }
.textbook-forum-answer { padding-top: 13px; }
.textbook-forum-answer-layout { display: grid; grid-template-columns: minmax(0, 1fr) 190px; gap: 18px; align-items: start; }
.textbook-forum-copy { min-width: 0; font-size: 19px; line-height: 1.48; }
.textbook-forum-copy p { margin: 0 0 7px; }
.textbook-forum-line { min-height: 35px; padding: 1px 5px; }
.textbook-forum-line .reading-line-speaker { padding-top: 0.45em; }
.textbook-school-photo {
  min-height: 135px; padding: 15px 10px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  border: 5px solid #e5e7df; border-radius: 10px; color: #54705f; background: linear-gradient(180deg, #dce9f4, #e6edd8);
  box-shadow: 0 3px 8px rgba(45,60,72,0.16); transform: rotate(1.5deg);
}
.textbook-school-photo span { font-size: 54px; }
.textbook-school-photo small { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; font-size: 12px; font-weight: 750; }
.textbook-forum-actions { display: flex; gap: 24px; margin-top: 8px; color: #344251; font-size: 18px; }
@media (max-width: 720px) {
  .advanced-spelling-card { flex-direction: column; align-items: stretch; padding: 18px; }
  .advanced-spelling-actions { justify-content: flex-start; }
  .word-reading-card { padding: 18px; }
  .word-reading-controls { grid-template-columns: 1fr; }
  .word-reading-stop { min-width: 0; }
  .word-reading-section-head { align-items: flex-start; }
  .word-reading-row { grid-template-columns: 44px minmax(0, 1fr) 30px; gap: 9px; padding: 10px; }
  .word-reading-number { min-width: 40px; height: 30px; font-size: 12px; }
  .word-reading-speaker { width: 30px; height: 30px; }
  .word-reading-en { font-size: 17px; }
  .phrase-reading-card { padding: 18px; }
  .phrase-reading-controls { grid-template-columns: 1fr; }
  .phrase-reading-stop { min-width: 0; }
  .phrase-reading-row { grid-template-columns: 44px minmax(0, 1fr) 30px; gap: 9px; padding: 11px 10px; }
  .phrase-reading-number { min-width: 40px; height: 30px; padding: 0 4px; font-size: 12px; }
  .phrase-reading-speaker { width: 30px; height: 30px; }
  .phrase-reading-en-item { font-size: 17px; }
  .reading-card { padding: 18px; }
  .reading-player-label, .reading-line-guide { align-items: flex-start; flex-direction: column; gap: 2px; }
  .reading-poem { font-size: 17px; line-height: 1.55; }
  .textbook-page-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .textbook-page { padding: 0 15px 20px; border-left-width: 5px; }
  .textbook-unit-banner { min-height: 61px; margin: 0 -15px 16px; padding: 0 15px; gap: 11px; }
  .textbook-unit-banner span { padding-right: 11px; font-size: 20px; }
  .textbook-unit-banner strong { font-size: 19px; }
  .textbook-email-list { grid-template-columns: 1fr; }
  .textbook-checklist { grid-template-columns: 1fr; padding: 12px; }
  .textbook-planner-title { font-size: 25px; }
  .textbook-dialogue { gap: 8px; }
  .textbook-speaker-dot { flex-basis: 34px; width: 34px; height: 34px; border-width: 3px; }
  .textbook-speech-bubble { width: calc(100% - 42px); padding: 8px; font-size: 16px; }
  .textbook-big-question { align-items: flex-start; padding: 10px; }
  .textbook-big-question > span { flex-basis: 45px; width: 45px; height: 45px; font-size: 32px; }
  .textbook-question-line { font-size: 18px; }
  .textbook-todo-note { padding: 14px 12px; }
  .textbook-subject-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .textbook-word-web { min-height: 0; padding: 82px 12px 14px; }
  .textbook-word-web-items { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .textbook-forum-bar { min-height: 52px; padding: 9px 12px; }
  .textbook-forum-bar span { font-size: 14px; }
  .textbook-forum-bar strong { font-size: 19px; }
  .textbook-forum-topic, .textbook-forum-answer { padding: 14px 12px; }
  .textbook-forum-topic h3 { font-size: 20px; }
  .textbook-forum-questions, .textbook-forum-copy { padding-right: 0; font-size: 17px; }
  .textbook-forum-answer-layout { grid-template-columns: 1fr; }
  .textbook-school-photo { min-height: 105px; }
  .textbook-forum-actions { font-size: 16px; }
}

/* 任务/词库列表：宽屏自动双列 */
.task-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; align-items: start; }
.task-grid .empty-note { grid-column: 1 / -1; }

/* ---- 今日 view ---- */
.daily-card {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-lift);
}
.daily-card .daily-top { display: flex; align-items: center; justify-content: space-between; }
.daily-card h2 { font-size: 22px; font-weight: 800; }
.daily-card .daily-sub { font-size: 14px; opacity: 0.85; margin-top: 5px; }
.daily-done-badge { font-size: 13px; background: rgba(255,255,255,0.22); border-radius: 999px; padding: 4px 12px; font-weight: 600; }
.daily-progress { margin-top: 14px; }
.daily-progress-bar { height: 8px; background: rgba(255,255,255,0.28); border-radius: 999px; overflow: hidden; }
.daily-progress-fill { height: 100%; background: #fff; border-radius: 999px; transition: width 0.3s; }
.daily-progress-pct { display: block; margin-top: 6px; font-size: 12px; opacity: 0.9; }
.daily-actions { display: flex; gap: 10px; margin-top: 14px; }
.daily-start-btn {
  flex: 1;
  background: #fff; color: var(--accent);
  font-weight: 800; font-size: 16px;
  border-radius: 12px; padding: 12px;
  transition: transform 0.1s;
}
.daily-start-btn:active { transform: scale(0.97); }
.daily-mini-btn {
  background: rgba(255,255,255,0.18); color: #fff;
  font-weight: 600; font-size: 14px;
  border-radius: 12px; padding: 12px 14px;
}

.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.stat-tile {
  background: var(--card); border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  padding: 12px 6px; text-align: center;
}
.stat-tile .num { font-size: 20px; font-weight: 800; }
.stat-tile .lbl { font-size: 12px; color: var(--ink-3); margin-top: 2px; }
.stat-tile.tappable:active { background: var(--accent-soft); }
.stat-tile .num.warn { color: var(--amber); }
.stat-tile .num.bad { color: var(--red); }
.stat-tile .num.ok { color: var(--green); }

.quick-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.quick-btn {
  display: flex; align-items: center; gap: 10px;
  background: var(--card); border-radius: var(--radius-sm);
  box-shadow: var(--shadow); padding: 14px;
  font-size: 15px; font-weight: 700; text-align: left;
}
.quick-btn .qi { font-size: 22px; }
.quick-btn .qd { font-size: 12px; color: var(--ink-3); font-weight: 500; display: block; }
.quick-btn:active { background: var(--accent-soft); }

/* ---- task list ---- */
.task-toolbar { display: flex; gap: 8px; align-items: center; }
.task-toolbar .spacer { flex: 1; }
.tool-btn {
  font-size: 13px; font-weight: 600;
  padding: 7px 13px; border-radius: 999px;
  background: var(--card); color: var(--ink-2);
  box-shadow: var(--shadow);
}
.tool-btn.primary { background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; }
.tool-btn.active { background: var(--ink); color: #fff; }
.tool-btn.danger.active { background: var(--red); }

.task-item {
  background: var(--card); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 13px 15px;
  display: flex; align-items: center; gap: 12px;
  border: 2px solid transparent;
}
.task-item:active { background: #fafbff; }
.task-item.pinned { border-color: rgba(91,124,250,0.2); }
.task-item.selected { border-color: var(--accent); background: var(--accent-soft); }
.task-item.selected.for-delete { border-color: var(--red); background: var(--red-soft); }
.task-kind-icon {
  width: 40px; height: 40px; border-radius: 12px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-size: 19px;
  background: var(--accent-soft);
}
.task-kind-icon.mc { background: var(--amber-soft); }
.task-kind-icon.reading { background: var(--green-soft); }
.task-kind-icon.lib { background: linear-gradient(135deg, var(--accent), var(--accent-2)); }
.task-info { flex: 1; min-width: 0; }
.task-name { font-size: 15px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.task-meta { font-size: 12px; color: var(--ink-3); margin-top: 2px; display: flex; gap: 8px; }
.task-pin-btn {
  width: 44px; height: 44px; border-radius: 12px; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  background: #f3f5fb; color: var(--ink-3); font-size: 20px; font-weight: 800;
  transition: color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}
.task-pin-btn:hover { background: var(--accent-soft); color: var(--accent); }
.task-pin-btn:active { transform: scale(0.94); }
.task-pin-btn:focus-visible { outline: 3px solid rgba(91,124,250,0.35); outline-offset: 2px; }
.task-pin-btn.active { background: var(--accent-soft); color: var(--accent); }
.task-pin-btn:disabled { opacity: 0.45; cursor: wait; }
.task-progress { text-align: right; flex-shrink: 0; }
.task-progress .pct { font-size: 15px; font-weight: 800; color: var(--accent); }
.task-progress .frac { font-size: 11px; color: var(--ink-3); }
.task-progress .pct.done { color: var(--green); }

.select-confirm-bar {
  position: fixed; left: 244px; right: 0;
  bottom: calc(24px + env(safe-area-inset-bottom, 0px));
  display: flex; justify-content: center; padding: 10px 16px;
  pointer-events: none;
  z-index: 30;
}
.select-confirm-bar .inner {
  pointer-events: auto;
  display: flex; gap: 10px; align-items: center;
  background: var(--ink); color: #fff;
  border-radius: 999px; padding: 10px 12px 10px 18px;
  box-shadow: var(--shadow-lift);
  font-size: 14px; font-weight: 600;
  max-width: 560px;
}
.select-confirm-bar button {
  background: var(--accent); color: #fff; font-weight: 700;
  border-radius: 999px; padding: 8px 16px; font-size: 14px;
}
.select-confirm-bar button.danger { background: var(--red); }
.select-confirm-bar button.ghost { background: rgba(255,255,255,0.15); }

/* ---- task detail sheet & modals ---- */
.overlay {
  position: fixed; inset: 0; z-index: 70; /* 高于 .challenge-screen(60)，退出确认等弹窗要压在挑战页上 */
  background: rgba(20, 24, 35, 0.5);
  display: flex; align-items: flex-end; justify-content: center;
}
.overlay.center { align-items: center; padding: 24px; }
.sheet {
  background: var(--card);
  width: 100%; max-width: 680px;
  border-radius: 22px 22px 0 0;
  max-height: 86vh;
  display: flex; flex-direction: column;
  animation: sheet-up 0.22s ease;
}
/* iPad 上任务详情里的单词表双列；minmax 允许长词组收缩到列宽内 */
.word-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 26px; }
@keyframes sheet-up { from { transform: translateY(40px); opacity: 0.6; } to { transform: none; opacity: 1; } }
.sheet-head {
  padding: 16px 18px 10px;
  display: flex; align-items: center; gap: 10px;
  border-bottom: 1px solid var(--line);
}
.sheet-head h3 { font-size: 17px; font-weight: 800; flex: 1; }
.sheet-close { font-size: 15px; color: var(--ink-3); padding: 6px 10px; }
.sheet-body { overflow-x: hidden; overflow-y: auto; padding: 14px 18px calc(20px + env(safe-area-inset-bottom, 0px)); }

.modal {
  background: var(--card); border-radius: var(--radius);
  width: 100%; max-width: 340px;
  padding: 22px 20px;
  box-shadow: var(--shadow-lift);
  animation: pop 0.18s ease;
}
@keyframes pop { from { transform: scale(0.94); opacity: 0.5; } to { transform: none; opacity: 1; } }
.modal h3 { font-size: 17px; font-weight: 800; margin-bottom: 8px; }
.modal p { font-size: 14px; color: var(--ink-2); }
.modal-actions { display: flex; gap: 10px; margin-top: 18px; }
.modal-actions button {
  flex: 1; padding: 11px; border-radius: 12px;
  font-size: 15px; font-weight: 700;
}
.btn-plain { background: var(--bg); color: var(--ink-2); }
.btn-accent { background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; }
.btn-danger { background: var(--red); color: #fff; }
.btn-green { background: var(--green); color: #fff; }

/* ---- batch pick ---- */
.batch-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 12px; }
.batch-grid button {
  padding: 14px 6px; border-radius: 12px;
  background: var(--bg); font-size: 15px; font-weight: 700;
}
.batch-grid button small { display: block; font-size: 11px; color: var(--ink-3); font-weight: 500; }
.batch-grid button:active { background: var(--accent-soft); }

/* ---- word list in detail ---- */
.word-row {
  display: flex; align-items: center; gap: 10px;
  min-width: 0;
  padding: 9px 2px; border-bottom: 1px solid var(--line);
}
.word-row:last-child { border-bottom: none; }
.word-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--line); flex-shrink: 0; }
.word-dot.mastered { background: var(--green); }
.word-dot.learning { background: var(--amber); }
.word-main { flex: 1; min-width: 0; }
.word-en { font-size: 15px; font-weight: 700; }
.word-zh { font-size: 12px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.word-speak { font-size: 17px; padding: 6px; color: var(--accent); }

/* ---- import sheet ---- */
.import-tabs { display: flex; gap: 8px; margin-bottom: 14px; }
.import-tabs button {
  flex: 1; padding: 9px 4px; border-radius: 10px;
  font-size: 13px; font-weight: 700;
  background: var(--bg); color: var(--ink-2);
}
.import-tabs button.on { background: var(--ink); color: #fff; }
.import-field label { display: flex; align-items: center; justify-content: space-between; font-size: 13px; font-weight: 700; color: var(--ink-2); margin: 12px 0 6px; }
.import-field textarea {
  width: 100%; min-height: 140px; resize: vertical;
  border: 1.5px solid var(--line); border-radius: 12px;
  padding: 12px; font-size: 15px; background: #fbfcff;
}
.import-field input[type="text"], .import-field select, .import-field input[type="number"] {
  width: 100%; border: 1.5px solid var(--line); border-radius: 12px;
  padding: 11px 12px; background: #fbfcff;
}
.import-field textarea:focus, .import-field input:focus, .import-field select:focus { outline: none; border-color: var(--accent); }
.ai-clean-btn { font-size: 13px; color: var(--accent); font-weight: 700; }
.import-submit {
  width: 100%; margin-top: 16px; padding: 13px;
  border-radius: 12px; font-size: 16px; font-weight: 800;
  background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff;
}
.import-submit:disabled { opacity: 0.55; }
.import-hint { font-size: 12px; color: var(--ink-3); margin-top: 8px; }
.preview-list { margin-top: 12px; border: 1.5px solid var(--line); border-radius: 12px; padding: 4px 12px; max-height: 240px; overflow-y: auto; }
.gen-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.preset-item {
  display: flex; align-items: center; gap: 12px;
  padding: 13px 4px; border-bottom: 1px solid var(--line);
}
.preset-item:last-child { border-bottom: none; }
.preset-info { flex: 1; }
.preset-name { font-size: 15px; font-weight: 700; }
.preset-desc { font-size: 12px; color: var(--ink-3); margin-top: 2px; }
.preset-add {
  background: var(--accent-soft); color: var(--accent);
  font-size: 13px; font-weight: 700; border-radius: 999px; padding: 7px 14px;
  flex-shrink: 0;
}
.preset-add:disabled { background: var(--bg); color: var(--ink-3); }

/* ---- report ---- */
.report-hero { display: flex; gap: 10px; }
.report-hero .stat-tile { flex: 1; }
.cal-bars { display: flex; align-items: flex-end; gap: 8px; height: 110px; padding-top: 8px; }
.cal-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 5px; height: 100%; justify-content: flex-end; }
.cal-bar { width: 100%; max-width: 30px; border-radius: 7px 7px 3px 3px; background: linear-gradient(180deg, var(--accent), var(--accent-2)); min-height: 4px; }
.cal-bar.empty { background: var(--line); }
.cal-lbl { font-size: 10px; color: var(--ink-3); }
.cal-num { font-size: 11px; font-weight: 700; color: var(--ink-2); }
.study-log-card { padding-top: 4px; padding-bottom: 4px; }
.study-log-row { padding: 13px 0; border-bottom: 1px solid var(--line); }
.study-log-row:last-child { border-bottom: none; }
.study-log-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.study-log-name { min-width: 0; font-size: 15px; font-weight: 800; color: var(--ink); }
.study-log-head time { flex-shrink: 0; font-size: 11px; color: var(--ink-3); padding-top: 2px; }
.study-log-summary { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 14px; margin-top: 7px; font-size: 13px; color: var(--ink-2); }
.study-log-summary strong { color: var(--green); }
.study-log-summary strong.low { color: var(--red); }
.study-log-summary strong.mid { color: var(--amber); }
.study-log-detail { margin-top: 5px; font-size: 12px; color: var(--ink-3); }
.weak-row { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.weak-row:last-child { border-bottom: none; }
.weak-point { font-size: 14px; font-weight: 700; flex: 1; }
.weak-bar-wrap { flex: 2; height: 8px; background: var(--bg); border-radius: 999px; overflow: hidden; }
.weak-bar { height: 100%; border-radius: 999px; background: var(--green); }
.weak-bar.low { background: var(--red); }
.weak-bar.mid { background: var(--amber); }
.weak-acc { font-size: 13px; font-weight: 700; width: 44px; text-align: right; }
.mini-word-row { display: flex; justify-content: space-between; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.mini-word-row:last-child { border-bottom: none; }
.mini-word-row .w { font-weight: 700; }
.mini-word-row .m { color: var(--ink-3); font-size: 13px; }
.mini-word-row .x { color: var(--red); font-size: 12px; font-weight: 700; }
.empty-note { text-align: center; color: var(--ink-3); font-size: 13px; padding: 16px 0; }

/* ---- points ---- */
.points-hero {
  background: linear-gradient(135deg, #ffb84d, #f59e0b);
  color: #fff; border-radius: var(--radius);
  padding: 20px; text-align: center; box-shadow: var(--shadow-lift);
}
.points-hero .total { font-size: 40px; font-weight: 900; line-height: 1.15; }
.points-hero .sub { font-size: 13px; opacity: 0.9; }
.redeem-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 14px; }
.redeem-row button {
  background: rgba(255,255,255,0.2); color: #fff;
  border-radius: 12px; padding: 10px 4px; font-size: 14px; font-weight: 800;
}
.redeem-row button:disabled { opacity: 0.45; }
.ledger-row { display: flex; justify-content: space-between; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.ledger-row:last-child { border-bottom: none; }
.ledger-note { color: var(--ink-2); }
.ledger-date { color: var(--ink-3); font-size: 11px; }
.ledger-delta { font-weight: 800; }
.ledger-delta.plus { color: var(--green); }
.ledger-delta.minus { color: var(--red); }
.redeem-status { font-size: 11px; font-weight: 700; border-radius: 999px; padding: 3px 9px; }
.redeem-status.pending { background: var(--amber-soft); color: var(--amber); }
.redeem-status.done { background: var(--green-soft); color: var(--green); }
.mark-done-btn { font-size: 12px; color: var(--accent); font-weight: 700; padding: 4px 8px; }

/* 导航已移至左侧栏 .side-nav */

/* ---- challenge (fullscreen) ---- */
.challenge-screen {
  position: fixed; inset: 0; z-index: 60;
  background: var(--bg);
  display: flex; flex-direction: column; align-items: center;
}
.ch-head {
  width: 100%; max-width: 780px;
  display: flex; align-items: center; gap: 14px;
  padding: calc(16px + env(safe-area-inset-top, 0px)) 22px 12px;
}
.ch-quit { font-size: 20px; color: var(--ink-3); padding: 4px 8px; }
.ch-progress-wrap { flex: 1; height: 10px; background: var(--line); border-radius: 999px; overflow: hidden; }
.ch-progress { height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--accent), var(--accent-2)); transition: width 0.25s; }
.ch-count { font-size: 13px; font-weight: 700; color: var(--ink-2); }
.ch-chips { width: 100%; max-width: 780px; display: flex; gap: 8px; padding: 0 22px 6px; }
.ch-chip { font-size: 12px; font-weight: 700; background: var(--card); border-radius: 999px; padding: 4px 11px; box-shadow: var(--shadow); color: var(--ink-2); }
.ch-chip.fire { color: #e8590c; }
.ch-chip.stage { color: var(--accent); background: var(--accent-soft); }
.ch-body { width: 100%; max-width: 780px; flex: 1; overflow-y: auto; padding: 16px 22px calc(28px + env(safe-area-inset-bottom, 0px)); display: flex; flex-direction: column; }

.q-card {
  background: var(--card); border-radius: 22px;
  box-shadow: var(--shadow); padding: 30px 26px;
  display: flex; flex-direction: column; gap: 16px;
}
.q-type-tag { font-size: 13px; font-weight: 700; color: var(--accent); background: var(--accent-soft); align-self: flex-start; border-radius: 999px; padding: 4px 12px; }
.q-prompt { font-size: 32px; font-weight: 800; text-align: center; padding: 10px 0; }
.q-prompt.small { font-size: 22px; font-weight: 700; }
.q-prompt.sentence { font-size: 23px; line-height: 1.7; text-align: left; font-weight: 600; }
.q-phonetic { text-align: center; color: var(--ink-3); font-size: 14px; margin-top: -12px; }
.word-preview-card { text-align: center; }
.preview-word { font-size: 38px; font-weight: 900; color: var(--ink); padding-top: 10px; }
.preview-meaning { font-size: 22px; font-weight: 750; color: var(--ink-2); }
.preview-example { font-size: 17px; line-height: 1.7; color: var(--ink-2); background: var(--bg); border-radius: 14px; padding: 14px 16px; }
.preview-tip { font-size: 13px; color: var(--ink-3); }
.batch-note { margin-top: 14px; color: var(--ink-3); font-size: 12px; line-height: 1.6; text-align: center; }
.q-hint { text-align: center; color: var(--ink-2); font-size: 15px; }
.q-hint .mask { letter-spacing: 2px; font-weight: 700; font-family: "SF Mono", Menlo, monospace; }
.q-meaning-hint { text-align: center; font-size: 15px; color: var(--ink-2); background: var(--bg); border-radius: 10px; padding: 8px; }

.speak-big {
  width: 84px; height: 84px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff; font-size: 36px;
  display: flex; align-items: center; justify-content: center;
  margin: 6px auto; box-shadow: var(--shadow-lift);
}
.speak-big:active { transform: scale(0.94); }
.speak-inline { font-size: 20px; color: var(--accent); padding: 2px 8px; vertical-align: middle; }

.opt-grid { display: flex; flex-direction: column; gap: 12px; }
.opt-btn {
  background: var(--bg); border: 2px solid transparent;
  border-radius: 14px; padding: 17px 18px;
  font-size: 18px; font-weight: 600; text-align: left;
  transition: background 0.12s;
}
.opt-btn:active { background: var(--accent-soft); }
.opt-btn.correct { background: var(--green-soft); border-color: var(--green); color: #1d7a5c; }
.opt-btn.wrong { background: var(--red-soft); border-color: var(--red); color: #b23842; }
.opt-btn.dim { opacity: 0.45; }
.opt-btn.reviewing { display: flex; align-items: center; justify-content: space-between; gap: 12px; cursor: default; }
.opt-btn.reviewing:disabled { opacity: 1; cursor: default; }
.opt-btn.reviewing.dim:disabled { opacity: 0.45; }
.opt-state-label { flex-shrink: 0; font-size: 12px; font-weight: 800; }

.spell-input {
  width: 100%; border: 2px solid var(--line); border-radius: 14px;
  padding: 16px; font-size: 23px; text-align: center; font-weight: 700;
  background: #fbfcff;
}
.spell-input:focus { outline: none; border-color: var(--accent); }
.spell-submit {
  width: 100%; padding: 16px; border-radius: 14px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff; font-size: 18px; font-weight: 800;
}
.spell-submit:disabled { opacity: 0.48; cursor: not-allowed; }
.tile-instruction { color: var(--ink-3); font-size: 14px; text-align: center; line-height: 1.5; }
.tile-context {
  color: var(--ink-2); background: var(--bg); border-radius: 12px;
  padding: 12px 14px; text-align: center; font-size: 18px; font-weight: 700;
}
.tile-selected, .tile-bank { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 9px; }
.tile-selected { min-height: 68px; padding: 11px; border: 2px dashed var(--line); border-radius: 15px; }
.tile-slot, .tile-choice {
  min-width: 52px; min-height: 46px; border-radius: 11px; padding: 9px 13px;
  font-size: 17px; font-weight: 800; text-align: center;
}
.tile-slot.empty { display: flex; align-items: center; justify-content: center; color: var(--ink-3); background: var(--bg); }
.tile-slot.filled { color: var(--accent); background: var(--accent-soft); }
.tile-slot.fixed { color: #526157; background: #e8ece5; border: 1.5px solid #cbd3c7; display: flex; align-items: center; justify-content: center; cursor: default; }
.tile-placeholder-hint { color: var(--ink-3); font-size: 13px; text-align: center; line-height: 1.6; }
.tile-slot.filled span { margin-left: 4px; opacity: 0.65; }
.tile-bank { padding: 6px 0 10px; }
.tile-choice { background: var(--bg); border: 1.5px solid var(--line); color: var(--ink); }
.tile-choice:active { background: var(--accent-soft); }
.tile-choice:disabled { opacity: 0.3; cursor: default; }

.reading-passage {
  background: var(--card); border-radius: 16px; box-shadow: var(--shadow);
  padding: 20px; margin-bottom: 14px;
  font-size: 16px; line-height: 1.8;
}
.reading-passage h4 { font-size: 15px; margin-bottom: 6px; display: flex; justify-content: space-between; align-items: center; }
.reading-passage .psg-pos { font-size: 12px; color: var(--ink-3); font-weight: 600; }

.feedback-card {
  border-radius: 20px; padding: 20px 18px;
  display: flex; flex-direction: column; gap: 10px;
  animation: pop 0.18s ease;
}
.feedback-card.good { background: var(--green-soft); }
.feedback-card.bad { background: var(--red-soft); }
.fb-title { font-size: 21px; font-weight: 900; }
.feedback-card.good .fb-title { color: #1d7a5c; }
.feedback-card.bad .fb-title { color: #b23842; }
.fb-word { font-size: 25px; font-weight: 800; display: flex; align-items: center; gap: 8px; }
.fb-meaning { font-size: 15px; color: var(--ink-2); }
.fb-example { font-size: 14px; color: var(--ink-2); background: rgba(255,255,255,0.65); border-radius: 10px; padding: 10px 12px; line-height: 1.6; }
.fb-explain { font-size: 14px; color: var(--ink-2); background: rgba(255,255,255,0.65); border-radius: 10px; padding: 10px 12px; line-height: 1.6; }
.fb-next {
  margin-top: 6px; padding: 13px; border-radius: 14px;
  font-size: 16px; font-weight: 800; color: #fff;
}
.feedback-card.good .fb-next { background: var(--green); }
.feedback-card.bad .fb-next { background: var(--red); }
.fb-retry-note { font-size: 12px; color: var(--ink-3); text-align: center; }
.grammar-inline-feedback { margin-top: 2px; border: 1px solid transparent; }
.grammar-inline-feedback.good { border-color: rgba(47,191,143,0.22); }
.grammar-inline-feedback.bad { border-color: rgba(240,97,109,0.2); }
.grammar-explain-speak {
  min-height: 44px; align-self: flex-start; border-radius: 12px; padding: 8px 13px;
  background: rgba(255,255,255,0.72); color: var(--ink-2);
  font-size: 13px; font-weight: 800;
}
.grammar-explain-speak:active { transform: scale(0.98); }
.grammar-explain-speak:focus-visible { outline: 3px solid rgba(91,124,250,0.35); outline-offset: 2px; }

/* completion */
.complete-card { text-align: center; padding: 26px 20px; }
.complete-emoji { font-size: 52px; }
.complete-title { font-size: 22px; font-weight: 900; margin-top: 6px; }
.complete-stats { display: flex; flex-wrap: wrap; justify-content: center; gap: 18px; margin: 14px 0; }
.complete-stats .cs { text-align: center; }
.complete-stats .cs .n { font-size: 22px; font-weight: 800; }
.complete-stats .cs .l { font-size: 12px; color: var(--ink-3); }
.points-block { background: var(--amber-soft); border-radius: 14px; padding: 12px 14px; text-align: left; margin-bottom: 14px; }
.points-block .pb-total { font-size: 16px; font-weight: 800; color: #b45309; margin-bottom: 4px; }
.points-block .pb-line { font-size: 13px; color: var(--ink-2); display: flex; justify-content: space-between; padding: 2px 0; }

/* toast */
.toast {
  position: fixed; left: 50%; bottom: 34px;
  transform: translateX(-50%);
  background: var(--ink); color: #fff;
  font-size: 15px; font-weight: 600;
  border-radius: 999px; padding: 11px 22px;
  box-shadow: var(--shadow-lift);
  z-index: 90; max-width: 88vw; text-align: center;
  animation: pop 0.18s ease;
}

.spin { display: inline-block; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---- 登录页 ---- */

.login-wrap {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 28px calc(24px + env(safe-area-inset-bottom));
  text-align: center;
}

.login-logo { width: 76px; height: 76px; margin-bottom: 18px; }

.login-title {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 0.5px;
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.login-sub { color: var(--ink-3); font-size: 15px; margin-top: 4px; }

.login-form {
  width: 100%;
  max-width: 300px;
  margin-top: 32px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.login-input {
  width: 100%;
  height: 52px;
  padding: 0 18px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--card);
  font-size: 17px;
  text-align: center;
  letter-spacing: 4px;
  outline: none;
  transition: border-color 0.15s;
}

.login-input:focus { border-color: var(--accent); }
.login-input::placeholder { letter-spacing: normal; color: var(--ink-3); }

.login-btn {
  height: 52px;
  border-radius: var(--radius-sm);
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  color: #fff;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 2px;
  box-shadow: var(--shadow);
  transition: opacity 0.15s, transform 0.1s;
}

.login-btn:active { transform: scale(0.985); }
.login-btn:disabled { opacity: 0.55; }

.login-err {
  min-height: 20px;
  color: var(--red);
  font-size: 14px;
}

.login-tip { margin-top: 22px; color: var(--ink-3); font-size: 13px; }

/* 6A adventure */
.main-inner.view-home, .main-inner.view-adventure-unit { max-width: 1080px; }
.adventure-hero { position: relative; overflow: hidden; padding: 32px 38px; border-radius: 26px; color: white; background: linear-gradient(125deg,#4c6ee8,#735df1); box-shadow: 0 20px 42px rgba(76,91,190,.18); }
.adventure-eyebrow { display: inline-block; padding: 6px 12px; border: 1px solid rgba(255,255,255,.4); border-radius: 20px; font-size: 12px; font-weight: 800; letter-spacing: .1em; }
.adventure-lifetime { display: flex; flex-wrap: wrap; gap: 20px 46px; margin-top: 22px; }
.adventure-lifetime > div { display: flex; flex-direction: column; gap: 1px; min-width: 130px; }
.adventure-lifetime strong { font-size: clamp(31px,5vw,44px); font-weight: 900; line-height: 1.1; font-variant-numeric: tabular-nums; }
.adventure-lifetime span { font-size: 13px; font-weight: 750; color: rgba(255,255,255,.84); }
.adventure-lifetime-bar { height: 9px; max-width: 610px; overflow: hidden; margin-top: 22px; border-radius: 20px; background: rgba(255,255,255,.28); }
.adventure-lifetime-bar i { display: block; height: 100%; border-radius: inherit; background: #fff; }
.adventure-hero-bottom { display: flex; justify-content: space-between; align-items: center; gap: 18px; margin-top: 25px; }
.adventure-primary { position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; min-width: 290px; min-height: 52px; padding: 12px 18px; border-radius: 14px; background: #fff; color: #445ed7; font-size: 15px; font-weight: 900; box-shadow: 0 7px 22px rgba(33,37,100,.16); }
.adventure-primary span { font-size: 23px; }
.adventure-hero-count { color: rgba(255,255,255,.9); font-weight: 800; white-space: nowrap; }
.adventure-section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 15px; margin-top: 8px; }
.adventure-section-head h2 { font-size: 23px; color: #26366c; }
.adventure-section-head span { font-size: 13px; color: var(--ink-2); }
.adventure-unit-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; }
.adventure-unit-card { display: grid; grid-template-columns: auto 1fr; gap: 2px 15px; text-align: left; min-height: 190px; padding: 23px; border: 1px solid #e2e6f5; border-radius: 22px; background: #fff; box-shadow: 0 7px 22px rgba(48,65,138,.055); transition: transform .16s ease, box-shadow .16s ease; }
.adventure-unit-card:hover { transform: translateY(-3px); box-shadow: 0 13px 28px rgba(48,65,138,.12); }
.adventure-unit-card.is-current { border-color: #9bacf4; background: linear-gradient(145deg,#fff,#f4f5ff); }
.adventure-unit-index { grid-row: span 3; width: 48px; height: 48px; display: grid; place-items: center; border-radius: 15px; background: #eef1ff; color: #536de1; font-size: 16px; font-weight: 900; }
.adventure-unit-title { color: #26366c; font-size: 22px; font-weight: 900; line-height: 1.2; }
.adventure-unit-title small { display: block; margin-top: 4px; color: #6c8481; font-size: 13px; font-weight: 650; }
.adventure-unit-meta { grid-column: 2; color: #697397; font-size: 13px; font-weight: 700; }
.adventure-unit-bar { grid-column: 2; overflow: hidden; height: 8px; margin-top: 10px; border-radius: 20px; background: #e9ebf8; }
.adventure-unit-bar i { display: block; height: 100%; border-radius: inherit; background: #7188f6; }
.adventure-unit-levels { grid-column: 2; display: grid; gap: 10px; margin-top: 12px; }
.adventure-progress { display: grid; gap: 7px; min-width: 0; }
.adventure-progress-label { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.adventure-progress-label b { color: var(--ink); }
.adventure-progress-track { display: block; height: 9px; overflow: hidden; border-radius: 20px; background: var(--bg); }
.adventure-progress-track i { display: block; height: 100%; border-radius: inherit; background: #7188f6; }
.adventure-progress.level-2 .adventure-progress-track i { background: #c98835; }
.adventure-level-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,330px),1fr)); gap: 18px; margin-top: 20px; }
.adventure-level-card { padding: 26px; border: 1px solid var(--line); border-radius: 22px; background: var(--card); box-shadow: var(--shadow); min-width: 0; }
.adventure-level-heading { display: flex; align-items: center; gap: 14px; margin-bottom: 24px; }
.adventure-level-copy { flex: 1; min-width: 0; }
.adventure-header-check { flex: 0 0 auto; align-self: flex-start; min-height: 44px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--accent-soft); color: var(--accent); font-size: 12px; font-weight: 800; white-space: nowrap; }
.adventure-header-check:hover { border-color: var(--accent); }
.adventure-header-check:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.adventure-level-badge { display: grid; place-items: center; flex: 0 0 58px; height: 58px; border-radius: 17px; background: var(--accent-soft); color: var(--accent); font-weight: 900; font-size: 20px; }
.adventure-level-heading h2 { margin: 0 0 5px; color: var(--ink); font-size: 21px; }
.adventure-level-heading div > span { color: var(--ink-2); font-size: 13px; }
.adventure-level-description { margin: 20px 0 0; color: var(--ink-2); font-size: 13px; line-height: 1.7; }
.adventure-level-card .adventure-stage-actions button { flex: 1; min-height: 46px; }
.adventure-complete-progress { font-weight: 800; color: var(--accent); }
html[data-theme="objectshow"] .adventure-progress-track i { background: var(--accent); }
@media (max-width: 700px) {
  .adventure-level-grid { grid-template-columns: 1fr; gap: 14px; }
  .adventure-level-card { padding: 22px; }
}
@media (max-width: 450px) {
  .adventure-level-heading { gap: 10px; }
  .adventure-level-badge { flex-basis: 48px; height: 48px; font-size: 18px; }
  .adventure-level-heading h2 { font-size: 18px; }
  .adventure-header-check { padding-inline: 8px; }
}
.adventure-unit-foot { grid-column: 2; display: flex; justify-content: space-between; margin-top: 11px; color: #8992af; font-size: 12px; }
.adventure-unit-foot b { color: #526ce2; font-size: 13px; }
.adventure-back { align-self: flex-start; padding: 9px 0; color: #526ce2; font-size: 14px; font-weight: 800; }
.adventure-unit-hero { padding: 30px 34px; border-radius: 24px; color: white; background: linear-gradient(125deg,#536fea,#7762ed); box-shadow: 0 14px 28px rgba(77,83,185,.15); }
.adventure-unit-hero > span { font-size: 12px; font-weight: 850; letter-spacing: .16em; opacity: .8; }
.adventure-unit-hero h1 { margin: 7px 0 3px; font-size: clamp(28px,4vw,39px); }
.adventure-unit-hero p { color: rgba(255,255,255,.82); font-size: 14px; }
.adventure-level-bars { display: grid; grid-template-columns: repeat(2,1fr); gap: 22px; margin-top: 24px; }
.adventure-level-bars label { display: block; margin-bottom: 8px; font-size: 13px; font-weight: 800; }
.adventure-level-bars i { display: block; height: 9px; overflow: hidden; border-radius: 20px; background: rgba(255,255,255,.23); }
.adventure-level-bars b { display: block; height: 100%; border-radius: inherit; background: #fff; }
.adventure-stage-list { display: flex; flex-direction: column; gap: 13px; margin-top: 20px; }
.adventure-stage-card { display: flex; gap: 18px; padding: 20px; border: 1px solid #e1e6f5; border-radius: 20px; background: #fff; box-shadow: 0 5px 15px rgba(49,59,130,.045); }
.adventure-stage-number { flex: 0 0 50px; height: 50px; display: grid; place-items: center; border-radius: 15px; background: #edf0ff; color: #586fe4; font-size: 18px; font-weight: 900; }
.adventure-stage-card.all-done .adventure-stage-number { background: #eaf5bd; color: #486d23; }
.adventure-stage-content { flex: 1; min-width: 0; }
.adventure-stage-kicker { color: #6377dd; font-size: 12px; font-weight: 850; }
.adventure-stage-content h3 { margin: 4px 0; color: #28345e; font-size: 18px; overflow-wrap: anywhere; }
.adventure-stage-content h3 span { color: #92a8a1; font-weight: 500; }
.adventure-stage-progress { color: #738d87; font-size: 12px; }
.adventure-stage-actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 14px; }
.adventure-stage-actions button { min-height: 42px; padding: 10px 16px; border-radius: 11px; color: #fff; background: #5b7cfa; font-size: 13px; font-weight: 850; }
.adventure-stage-actions button.level-two { background: #c98835; }
.adventure-stage-actions button.adventure-review { background: #526c9c; }
.adventure-level-practice { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.adventure-level-status { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 6px 12px; font-size: 13px; }
.adventure-level-status span { color: var(--ink-2); }
.adventure-level-practice .adventure-stage-actions { margin-top: 8px; }
.adventure-stage-actions button.adventure-repeat { color: var(--ink); background: var(--bg); border: 1px solid var(--line); }
.adventure-practice-note { font-size: 12px; color: var(--ink-2); margin: 12px 0 0; }
.adventure-complete-actions { flex-wrap: wrap; justify-content: center; }
.adventure-complete-actions button { flex: 1 1 calc(50% - 8px); min-width: 130px; }
.adventure-stage-actions button:disabled { background: #edf2ef; color: #98aaa2; cursor: default; }
.adventure-spelling { margin-top: 20px; }
.adventure-typed { min-height: 60px; display: flex; align-items: center; padding: 10px 16px; border: 2px solid #b8c5fa; border-radius: 14px; background: #f8f9ff; color: #2e386b; font: 750 25px/1.4 ui-monospace,SFMono-Regular,Menlo,monospace; overflow-wrap: anywhere; white-space: pre-wrap; }
.adventure-caret { color: #5b7cfa; animation: caretBlink 1s step-end infinite; }
@keyframes caretBlink { 50% { opacity: 0; } }
.adventure-keyboard { margin: 20px 0 14px; display: flex; flex-direction: column; gap: 7px; }
.keyboard-row { display: flex; justify-content: center; gap: 6px; }
.keyboard-row button { flex: 1; max-width: 56px; min-width: 0; height: 54px; border: 1px solid #cfd6ee; border-radius: 9px; background: #fff; color: #2e386b; font-size: 18px; font-weight: 850; box-shadow: 0 3px 0 #d5daec; }
.keyboard-row button:active { transform: translateY(2px); box-shadow: 0 1px 0 #d5daec; }
.keyboard-row button.keyboard-space { max-width: 145px; flex: 2; font-size: 13px; }
.keyboard-row button.keyboard-delete { background: #edf0ff; }
@media(max-width: 760px) { .adventure-unit-grid { grid-template-columns: 1fr; } .adventure-hero { padding: 27px 23px; } .adventure-lifetime { gap: 16px 24px; } .adventure-lifetime > div { min-width: 82px; } .adventure-hero-bottom { align-items: flex-start; flex-direction: column; } .adventure-primary { min-width: 0; width: 100%; } .adventure-unit-hero { padding: 24px; } .adventure-level-bars { grid-template-columns: 1fr; gap: 14px; } .keyboard-row { gap: 3px; } .keyboard-row button { height: 47px; font-size: 15px; } }
@media (max-width: 760px) {
  .ipad-shell { display: block; }
  .side-nav { position: static; width: 100%; height: auto; padding: 14px 14px 10px; gap: 9px; overflow: visible; }
  .side-brand { display: none; }
  .side-stats { flex-direction: row; }
  .side-chip { padding: 6px 10px; font-size: 12px; }
  .side-chip strong { font-size: 13px; }
  .side-menu-wrap { min-width: 0; flex-direction: row; gap: 6px; }
  .side-menu { min-width: 0; flex: 1; flex-direction: row; gap: 5px; margin: 0; overflow-x: auto; overscroll-behavior-inline: contain; }
  .side-settings { flex: 0 0 auto; margin: 0; border-top: 0; border-left: 1px solid var(--line); border-radius: 0 13px 13px 0; }
  .side-item { flex: 0 0 auto; padding: 8px 10px; gap: 5px; font-size: 13px; white-space: nowrap; }
  .side-item .si { width: auto; font-size: 16px; }
  .main-inner { padding: 17px 14px 36px; }
}

/* ---- 设置：外观主题选择 ---- */
.main-inner.view-settings { max-width: 860px; }
.settings-page { display: flex; flex-direction: column; gap: 18px; }
.settings-heading { padding: 8px 2px 4px; }
.settings-heading > span { color: var(--accent); font-size: 12px; font-weight: 850; letter-spacing: .16em; }
.settings-heading h1 { margin-top: 5px; font-size: clamp(29px, 4vw, 39px); line-height: 1.2; }
.settings-heading p { max-width: 600px; margin-top: 9px; color: var(--ink-2); font-size: 15px; line-height: 1.65; }
.settings-page > h2 { margin-top: 7px; font-size: 18px; }
.theme-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.theme-option {
  display: flex; flex-direction: column; overflow: hidden; text-align: left;
  background: var(--card); border: 2px solid var(--line); border-radius: 20px;
  box-shadow: var(--shadow); transition: border-color .15s, transform .15s;
}
.theme-option:hover { transform: translateY(-2px); }
.theme-option.selected { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.theme-option:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.theme-preview { position: relative; height: 226px; display: flex; gap: 10px; padding: 18px; overflow: hidden; }
.theme-preview.classic { background: #edf1fb; }
.theme-preview.objectshow { background: #f8f0df; background-image: radial-gradient(#d7d8c8 1px, transparent 1px); background-size: 18px 18px; }
.theme-preview-nav { width: 57px; flex: 0 0 57px; display: flex; flex-direction: column; gap: 8px; padding: 18px 10px; border-radius: 12px; background: #fff; }
.theme-preview-nav i { width: 100%; height: 11px; border-radius: 7px; background: #d7def8; }
.theme-preview-nav i:first-child { background: #6785ed; }
.theme-preview-panel { position: relative; z-index: 1; flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; padding: 17px; background: #fff; border-radius: 14px; box-shadow: 0 3px 12px rgba(38,50,67,.08); }
.theme-preview-kicker { color: #6879a8; font-size: 11px; font-weight: 800; }
.theme-preview-panel strong { margin-top: 8px; color: #26324c; font-size: clamp(19px, 2vw, 27px); line-height: 1.1; overflow-wrap: anywhere; }
.theme-preview-panel small { margin-top: 5px; color: #657187; font-size: 12px; }
.theme-preview-button { margin-top: 15px; padding: 7px 10px; border-radius: 8px; background: #e9eeff; color: #4566d1; font-size: 11px; font-weight: 800; }
.theme-preview.objectshow .theme-preview-nav { background: #fffdf6; border: 2px solid #374b4d; box-shadow: 3px 3px 0 #d8a984; }
.theme-preview.objectshow .theme-preview-nav i { background: #e7dbb7; }
.theme-preview.objectshow .theme-preview-nav i:first-child { background: #efa36d; }
.theme-preview.objectshow .theme-preview-panel { background: #fffdf6; border: 2px solid #374b4d; box-shadow: 4px 4px 0 #d8a984; }
.theme-preview.objectshow .theme-preview-kicker { color: #a35b35; }
.theme-preview.objectshow .theme-preview-panel strong { color: #203b3b; }
.theme-preview.objectshow .theme-preview-button { background: #d7eee5; color: #276760; }
.theme-preview-friend { position: absolute; z-index: 2; right: 7px; bottom: 15px; width: 66px; height: 61px; display: flex; align-items: center; justify-content: center; border: 2px solid #33494b; border-radius: 10px 8px 13px 9px; background: #f6c95f; box-shadow: 3px 3px 0 #374b4d; transform: rotate(8deg); color: #28393b; font-size: 25px; font-weight: 900; }
.theme-preview-friend::before, .theme-preview-friend::after { content: ''; position: absolute; top: 40px; width: 22px; height: 2px; background: #33494b; }
.theme-preview-friend::before { left: -19px; transform: rotate(-24deg); }
.theme-preview-friend::after { right: -19px; transform: rotate(24deg); }
.theme-preview-friend i { position: absolute; left: 16px; top: 12px; width: 6px; height: 8px; border-radius: 50%; background: #28393b; box-shadow: 25px 0 #28393b; }
.theme-preview-friend b { margin-top: 12px; font-weight: 800; }
.theme-option-copy { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 17px 19px 19px; }
.theme-option-copy strong, .theme-option-copy small { display: block; }
.theme-option-copy strong { font-size: 17px; }
.theme-option-copy small { margin-top: 3px; color: var(--ink-2); font-size: 12px; }
.theme-choice-mark { flex: 0 0 auto; padding: 6px 10px; border-radius: 999px; color: var(--ink-2); background: var(--bg); font-size: 12px; font-weight: 800; }
.theme-option.selected .theme-choice-mark { color: var(--accent); background: var(--accent-soft); }
.settings-note { color: var(--ink-3); font-size: 13px; line-height: 1.6; }

/* ---- 物品秀主题：保留页面结构，以纸张、物品表情和明亮描边统一外观 ---- */
html[data-theme="objectshow"] {
  --bg: #f6f0e5;
  --card: #fffdf7;
  --ink: #243739;
  --ink-2: #566a69;
  --ink-3: #80918b;
  --line: #d7ddd3;
  --accent: #276f72;
  --accent-2: #3b8790;
  --accent-soft: #dcefeb;
  --green: #31875d;
  --green-soft: #e1f3df;
  --red: #cc614c;
  --red-soft: #fce9df;
  --amber: #bf7334;
  --amber-soft: #fff0d0;
  --radius: 18px;
  --shadow: 3px 4px 0 rgba(43, 65, 62, .10);
  --shadow-lift: 5px 7px 0 rgba(43, 65, 62, .16);
}
html[data-theme="objectshow"] body { background-color: var(--bg); background-image: radial-gradient(#e1ddd0 1px, transparent 1px); background-size: 27px 27px; }
html[data-theme="objectshow"] .side-nav { background: #fffdf7; border-right: 2px solid #d3d9cf; }
html[data-theme="objectshow"] .app-logo { position: relative; background: #f6c95f; border: 2px solid #31494a; box-shadow: 3px 3px 0 #31494a; color: transparent; font-size: 0; transform: rotate(-5deg); }
html[data-theme="objectshow"] .app-logo::after { content: '•ᴗ•'; position: absolute; inset: 0; display: grid; place-items: center; color: #243739; font-size: 15px; font-weight: 900; letter-spacing: -2px; }
html[data-theme="objectshow"] .side-chip { border: 1px solid #d7ddd3; }
html[data-theme="objectshow"] .side-item.on { box-shadow: inset 3px 0 0 var(--accent); }
html[data-theme="objectshow"] .adventure-hero,
html[data-theme="objectshow"] .adventure-unit-hero { background: linear-gradient(130deg, #226a70, #35848b); border: 2px solid #214c51; box-shadow: 6px 7px 0 #d5c8ab; }
html[data-theme="objectshow"] .adventure-hero { padding-right: 150px; }
html[data-theme="objectshow"] .adventure-hero::after { content: '•ᴗ•'; position: absolute; right: 30px; top: 42px; width: 88px; height: 89px; display: grid; place-items: center; color: #253d3d; background: #f5c862; border: 3px solid #274747; border-radius: 14px 12px 18px 13px; box-shadow: 5px 5px 0 #174a51; font-size: 27px; font-weight: 900; transform: rotate(8deg); }
html[data-theme="objectshow"] .adventure-primary { color: #236b70; box-shadow: 4px 4px 0 #184c50; }
html[data-theme="objectshow"] .adventure-section-head h2,
html[data-theme="objectshow"] .adventure-unit-title { color: #234a4c; }
html[data-theme="objectshow"] .adventure-unit-card,
html[data-theme="objectshow"] .adventure-stage-card,
html[data-theme="objectshow"] .q-card,
html[data-theme="objectshow"] .word-reading-card,
html[data-theme="objectshow"] .phrase-reading-card,
html[data-theme="objectshow"] .reading-card,
html[data-theme="objectshow"] .reading-passage,
html[data-theme="objectshow"] .stat-tile,
html[data-theme="objectshow"] .task-item { border: 1.5px solid #c9d5ca; background: var(--card); box-shadow: var(--shadow); }
html[data-theme="objectshow"] .adventure-unit-card.is-current { border-color: #5da399; background: #f1faf4; }
html[data-theme="objectshow"] .adventure-unit-index,
html[data-theme="objectshow"] .adventure-stage-number { background: #f9df9d; color: #284b4c; border: 1.5px solid #a87845; }
html[data-theme="objectshow"] .adventure-unit-bar { background: #d8e8dc; }
html[data-theme="objectshow"] .adventure-unit-bar i { background: #3a987d; }
html[data-theme="objectshow"] .adventure-stage-kicker,
html[data-theme="objectshow"] .adventure-back,
html[data-theme="objectshow"] .adventure-unit-foot b { color: #2b7774; }
html[data-theme="objectshow"] .adventure-stage-content h3 { color: #234a4c; }
html[data-theme="objectshow"] .adventure-stage-actions button { background: #276f72; }
html[data-theme="objectshow"] .adventure-stage-actions button.level-two { background: #dd9046; color: #2c382f; }
html[data-theme="objectshow"] .adventure-stage-actions button.adventure-review { background: #53766e; }
html[data-theme="objectshow"] .adventure-stage-actions button.adventure-repeat { background: #f4eddb; color: #2c382f; }
html[data-theme="objectshow"] .adventure-stage-actions button:disabled { background: #edf1e8; color: #94a39a; }
html[data-theme="objectshow"] .word-reading-hero,
html[data-theme="objectshow"] .phrase-reading-hero,
html[data-theme="objectshow"] .reading-hero,
html[data-theme="objectshow"] .advanced-spelling-hero { background: linear-gradient(125deg, #267177, #45917e); border: 1.5px solid #1d5a5b; box-shadow: var(--shadow-lift); }
html[data-theme="objectshow"] .word-reading-play,
html[data-theme="objectshow"] .phrase-reading-play-all { background: #2c806d; }
html[data-theme="objectshow"] .word-reading-row,
html[data-theme="objectshow"] .phrase-reading-row { background: var(--card); }
html[data-theme="objectshow"] .word-reading-row:hover,
html[data-theme="objectshow"] .phrase-reading-row:hover { background: #eff8ef; }
html[data-theme="objectshow"] .q-card { border-radius: 20px; }
html[data-theme="objectshow"] .opt-btn { border-color: #d4dfd4; background: #fffdf7; }
html[data-theme="objectshow"] .opt-btn.correct { border-color: var(--green); background: var(--green-soft); }
html[data-theme="objectshow"] .opt-btn.wrong { border-color: var(--red); background: var(--red-soft); }
html[data-theme="objectshow"] .tile-choice,
html[data-theme="objectshow"] .keyboard-row button { background: #fffdf7; border-color: #b9cfc5; color: #284549; }
html[data-theme="objectshow"] .spell-input,
html[data-theme="objectshow"] .adventure-typed { background: #fffdf7; border-color: #9dbab0; color: #264547; }
html[data-theme="objectshow"] .spell-submit,
html[data-theme="objectshow"] .speak-big { background: #276f72; }
html[data-theme="objectshow"] .points-hero { background: linear-gradient(125deg, #b96544, #d9924c); }
html[data-theme="objectshow"] .login-logo { border: 2px solid #276f72; border-radius: 17px; background: #fffdf7; box-shadow: 4px 4px 0 #d5c8ab; transform: rotate(-5deg); }
html[data-theme="objectshow"] .login-input { border-color: #b5c8bd; }
html[data-theme="objectshow"] .login-btn { background: #276f72; border: 1.5px solid #1d5a5b; box-shadow: 4px 4px 0 #d5c8ab; }

@media (max-width: 760px) {
  .theme-options { grid-template-columns: 1fr; }
  html[data-theme="objectshow"] .side-nav { border-right: 0; border-bottom: 2px solid #d3d9cf; }
  html[data-theme="objectshow"] .adventure-hero { padding-right: 28px; }
  html[data-theme="objectshow"] .adventure-hero::after { width: 53px; height: 53px; top: 15px; right: 16px; font-size: 17px; opacity: .78; }
}
@media (max-width: 480px) {
  .theme-preview { height: 198px; }
  .theme-option-copy { padding: 14px; }
  html[data-theme="objectshow"] .adventure-hero::after { display: none; }
}
