/* ===== 公考学习宝 · 移动端 App 样式 ===== */
:root {
  --app-bg: #f2f5fa;
  --app-card: #ffffff;
  --app-ink: #172033;
  --app-ink-2: #48536b;
  --app-ink-3: #8a93a8;
  --app-line: #e3e8f1;
  --app-blue: #1d4ed8;
  --app-blue-2: #3b82f6;
  --app-red: #c0392b;
  --app-purple: #7c3aed;
  --app-green: #16a34a;
  --app-amber: #d97706;
  --app-radius: 12px;
  --tabbar-h: 58px;
  --reader-header-h: 52px;
  --reader-nav-h: 58px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-top: env(safe-area-inset-top, 0px);
}

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

html, body {
  margin: 0;
  padding: 0 !important;
  background: var(--app-bg) !important;
  color: var(--app-ink);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  line-height: 1.65;
  overscroll-behavior-y: none;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
}

button {
  font-family: inherit;
  border: 0;
  cursor: pointer;
  -webkit-touch-callout: none;
}

button:focus-visible {
  outline: 2px solid var(--app-blue-2);
  outline-offset: 2px;
}

#app {
  max-width: 640px;
  margin: 0 auto;
  min-height: 100vh;
  min-height: 100dvh;
  position: relative;
}

.view {
  display: none;
  min-height: 100vh;
  min-height: 100dvh;
}

.view.active { display: block; }

/* ===== 密码锁屏 ===== */
.lock-view {
  position: fixed;
  inset: 0;
  z-index: 70;
  max-width: 640px;
  margin: 0 auto;
  background: linear-gradient(160deg, #1e3a8a 0%, #1d4ed8 55%, #7c3aed 100%);
  align-items: center;
  justify-content: center;
  padding: 24px;
  display: none;
}

.lock-view.active {
  display: flex;
}

.lock-inner {
  width: 100%;
  max-width: 340px;
  background: rgba(255, 255, 255, 0.98);
  border-radius: 18px;
  padding: 30px 22px 26px;
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.28);
  text-align: center;
}

.lock-brand {
  width: 66px;
  height: 66px;
  margin: 0 auto 14px;
  border-radius: 19px;
  background: linear-gradient(135deg, #1d4ed8, #7c3aed);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.9rem;
  color: #fff;
  box-shadow: 0 8px 20px rgba(29, 78, 216, 0.3);
}

.lock-inner h1 {
  margin: 0 0 4px;
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--app-ink);
}

.lock-sub {
  margin: 0 0 20px;
  font-size: 0.86rem;
  color: var(--app-ink-2);
}

#lockForm {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

#lockPassword {
  width: 100%;
  border: 1px solid var(--app-line);
  border-radius: 11px;
  padding: 13px 14px;
  font-size: 1rem;
  text-align: center;
  background: #fff;
  color: var(--app-ink);
  outline: none;
}

#lockPassword:focus {
  border-color: var(--app-blue);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.18);
}

.lock-remember {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 0.8rem;
  color: var(--app-ink-2);
}

.lock-remember input {
  width: 18px;
  height: 18px;
  accent-color: var(--app-blue);
}

.lock-btn {
  padding: 13px 14px;
  font-size: 0.98rem;
  border-radius: 11px;
}

.lock-error {
  margin-top: 14px;
  color: #dc2626;
  font-size: 0.85rem;
  font-weight: 600;
}

/* ===== 页面骨架 ===== */
#tabViews {
  padding: calc(14px + var(--safe-top)) 14px calc(var(--tabbar-h) + var(--safe-bottom) + 18px);
}

.screen {
  animation: app-fade 0.22s ease;
}

@keyframes app-fade {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.screen-title {
  font-size: 1.55rem;
  font-weight: 800;
  color: var(--app-ink);
  margin: 2px 0 4px;
  line-height: 1.3;
}

.screen-sub {
  font-size: 0.88rem;
  color: var(--app-ink-2);
  margin-bottom: 14px;
}

.screen-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.progress-pill {
  flex-shrink: 0;
  min-width: 74px;
  text-align: center;
  background: #e8efff;
  color: var(--app-blue);
  border-radius: 20px;
  padding: 7px 10px;
  font-size: 0.8rem;
  font-weight: 700;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--app-card);
  border: 1px solid var(--app-line);
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 14px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
}

.search-box span { font-size: 0.95rem; }

.search-box input {
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 0.95rem;
  color: var(--app-ink);
  min-width: 0;
}

.search-box input::placeholder { color: var(--app-ink-3); }

.card {
  background: var(--app-card);
  border: 1px solid var(--app-line);
  border-radius: var(--app-radius);
  box-shadow: 0 1px 3px rgba(16, 24, 40, 0.05);
}

.section {
  margin: 18px 0 6px;
}

.section-head {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 9px;
}

.section-badge {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  font-weight: 800;
  color: #fff;
  background: var(--app-blue);
  flex-shrink: 0;
}

.section-badge.red { background: var(--app-red); }
.section-badge.green { background: var(--app-green); }
.section-badge.purple { background: var(--app-purple); }
.section-badge.amber { background: var(--app-amber); }

.section-title {
  font-size: 1.02rem;
  font-weight: 800;
  color: var(--app-ink);
  line-height: 1.25;
}

.section-desc {
  font-size: 0.78rem;
  color: var(--app-ink-3);
  margin-top: 1px;
}

.section-sub {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 3px;
}

.mini-progress {
  width: 72px;
  height: 5px;
  border-radius: 4px;
  background: #e7ebf3;
  overflow: hidden;
}

.mini-progress i {
  display: block;
  height: 100%;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--app-blue), var(--app-blue-2));
}

/* ===== 首页 ===== */
.home-hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #1e3a8a 0%, #1d4ed8 52%, #7c3aed 100%);
  color: #fff;
  border-radius: 16px;
  padding: 20px 18px 18px;
  margin-bottom: 14px;
  box-shadow: 0 8px 24px rgba(29, 78, 216, 0.22);
}

.home-hero::after {
  content: "";
  position: absolute;
  right: -46px;
  top: -56px;
  width: 170px;
  height: 170px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
}

.home-hero .hello {
  font-size: 0.85rem;
  opacity: 0.9;
}

.home-hero h1 {
  font-size: 1.5rem;
  font-weight: 800;
  margin: 3px 0 8px;
  position: relative;
}

.home-hero .quote {
  font-size: 0.85rem;
  line-height: 1.6;
  opacity: 0.92;
  position: relative;
}

.home-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 14px;
}

.stat-card {
  background: var(--app-card);
  border: 1px solid var(--app-line);
  border-radius: 12px;
  padding: 11px 10px;
  text-align: center;
}

.stat-card .num {
  font-size: 1.22rem;
  font-weight: 800;
  color: var(--app-ink);
}

.stat-card .num small {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--app-ink-3);
}

.stat-card .label {
  font-size: 0.74rem;
  color: var(--app-ink-2);
  margin-top: 1px;
}

.continue-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px;
  margin-bottom: 14px;
}

.continue-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: #eef2ff;
  color: var(--app-blue);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}

.continue-info {
  flex: 1;
  min-width: 0;
}

.continue-info .k {
  font-size: 0.74rem;
  color: var(--app-ink-3);
}

.continue-info .t {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--app-ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.go-btn {
  flex-shrink: 0;
  background: var(--app-blue);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 700;
  padding: 9px 14px;
  border-radius: 9px;
}

.course-card {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 14px;
  margin-bottom: 10px;
  text-align: left;
  width: 100%;
}

.course-card .cc-icon {
  width: 48px;
  height: 48px;
  border-radius: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.course-card .cc-icon.shenlun { background: #fdeaea; }
.course-card .cc-icon.xingce { background: #e6edff; }

.course-card .cc-body {
  flex: 1;
  min-width: 0;
}

.course-card .cc-title {
  font-size: 1.02rem;
  font-weight: 800;
  color: var(--app-ink);
}

.course-card .cc-desc {
  font-size: 0.78rem;
  color: var(--app-ink-2);
  margin: 2px 0 7px;
}

.course-card .cc-bar {
  height: 6px;
  border-radius: 4px;
  background: #e7ebf3;
  overflow: hidden;
}

.course-card .cc-bar i {
  display: block;
  height: 100%;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--app-red), #e67e22);
}

.course-card.xingce .cc-bar i {
  background: linear-gradient(90deg, var(--app-blue), var(--app-purple));
}

.course-card .cc-arrow {
  color: var(--app-ink-3);
  font-size: 1.15rem;
  font-weight: 700;
}

.tool-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.tool-btn {
  background: var(--app-card);
  border: 1px solid var(--app-line);
  border-radius: 12px;
  padding: 12px 4px 10px;
  text-align: center;
  color: var(--app-ink);
}

.tool-btn .ti {
  display: block;
  font-size: 1.25rem;
  margin-bottom: 3px;
}

.tool-btn .tl {
  font-size: 0.72rem;
  color: var(--app-ink-2);
}

/* ===== 课程列表 ===== */
.group-card {
  margin-bottom: 12px;
}

.group-head {
  padding: 12px 13px 10px;
  border-bottom: 1px solid var(--app-line);
}

.lesson-row {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  padding: 12px 13px;
  border-bottom: 1px solid #eef1f7;
  background: transparent;
  text-align: left;
}

.lesson-row:last-child { border-bottom: 0; }

.lesson-num {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: #eef2ff;
  color: var(--app-blue);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.84rem;
  font-weight: 800;
  flex-shrink: 0;
}

.shenlun .lesson-num {
  background: #fdeaea;
  color: var(--app-red);
}

.lesson-info {
  flex: 1;
  min-width: 0;
}

.lesson-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--app-ink);
  line-height: 1.35;
}

.lesson-tags {
  font-size: 0.75rem;
  color: var(--app-ink-3);
  margin-top: 2px;
  line-height: 1.4;
}

.lesson-check {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #eef3f8;
  color: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 800;
  flex-shrink: 0;
}

.lesson-row.done .lesson-check {
  background: var(--app-green);
  color: #fff;
}

.lesson-row.done .lesson-title { color: var(--app-ink-2); }

.tool-row {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  padding: 12px 13px;
  border-bottom: 1px solid #eef1f7;
  background: transparent;
  text-align: left;
}

.tool-row:last-child { border-bottom: 0; }

.tool-row .ti {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: #f3f0ff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.empty-hint {
  text-align: center;
  color: var(--app-ink-3);
  font-size: 0.85rem;
  padding: 26px 10px;
}

/* ===== 学习页 ===== */
.study-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 14px;
}

.study-stat {
  padding: 12px;
}

.study-stat .sv {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--app-ink);
}

.study-stat .sv small {
  font-size: 0.72rem;
  color: var(--app-ink-3);
  font-weight: 600;
}

.study-stat .sl {
  font-size: 0.78rem;
  color: var(--app-ink-2);
  margin-top: 2px;
}

.progress-card {
  padding: 13px;
  margin-bottom: 10px;
}

.progress-card .pc-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 7px;
}

.progress-card .pc-head .pct { color: var(--app-blue); }

.progress-card .pc-bar {
  height: 8px;
  border-radius: 5px;
  background: #e7ebf3;
  overflow: hidden;
}

.progress-card .pc-bar i {
  display: block;
  height: 100%;
  border-radius: 5px;
  background: linear-gradient(90deg, var(--app-blue), var(--app-purple));
}

.recent-list .recent-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 13px;
  border-bottom: 1px solid #eef1f7;
}

.recent-item:last-child { border-bottom: 0; }

.recent-item .ri-icon {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: #eef2ff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}

.recent-item .ri-body {
  flex: 1;
  min-width: 0;
}

.recent-item .ri-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--app-ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.recent-item .ri-time {
  font-size: 0.72rem;
  color: var(--app-ink-3);
}

.note-form {
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding: 13px;
  margin-bottom: 12px;
}

.note-form input,
.note-form textarea,
.note-form select {
  width: 100%;
  border: 1px solid var(--app-line);
  border-radius: 9px;
  padding: 10px 12px;
  font-size: 0.9rem;
  font-family: inherit;
  color: var(--app-ink);
  background: #fff;
}

.note-form textarea { min-height: 78px; resize: vertical; }

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
}

.form-row.wide { grid-template-columns: 1fr; }

.primary-btn {
  background: var(--app-blue);
  color: #fff;
  font-size: 0.92rem;
  font-weight: 700;
  padding: 11px 14px;
  border-radius: 9px;
  width: 100%;
}

.ghost-btn {
  background: #eef2ff;
  color: var(--app-blue);
  font-size: 0.88rem;
  font-weight: 700;
  padding: 9px 12px;
  border-radius: 9px;
}

.danger-btn {
  background: #fdeaea;
  color: var(--app-red);
}

.note-item {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px 13px;
  border-bottom: 1px solid #eef1f7;
}

.note-item:last-child { border-bottom: 0; }

.note-item .ni-main { flex: 1; min-width: 0; }

.note-item .ni-meta {
  font-size: 0.74rem;
  color: var(--app-ink-3);
  margin-bottom: 3px;
}

.note-item .ni-keywords {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--app-ink);
}

.note-item .ni-reason {
  font-size: 0.82rem;
  color: var(--app-ink-2);
  margin-top: 2px;
}

.note-item .ni-del {
  background: transparent;
  color: var(--app-ink-3);
  font-size: 0.78rem;
  padding: 6px 8px;
  flex-shrink: 0;
}

.review-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.74rem;
  color: var(--app-green);
  background: #e9f8ef;
  border-radius: 20px;
  padding: 3px 9px;
  margin-top: 6px;
}

.review-chip.no { color: var(--app-ink-3); background: #eef1f6; }

/* ===== 我的页 ===== */
.me-card {
  padding: 13px;
  margin-bottom: 12px;
}

.me-card h4 {
  margin: 0 0 9px;
  font-size: 0.98rem;
  color: var(--app-ink);
}

.me-step {
  display: flex;
  gap: 10px;
  padding: 7px 0;
  font-size: 0.88rem;
  color: var(--app-ink-2);
}

.me-step b {
  color: var(--app-ink);
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #eef2ff;
  color: var(--app-blue);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
}

.me-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.me-link {
  display: block;
  width: 100%;
  text-align: left;
  padding: 11px 12px;
  background: #f7f9fd;
  border: 1px solid var(--app-line);
  border-radius: 10px;
  color: var(--app-ink);
  font-size: 0.86rem;
  font-weight: 600;
  text-decoration: none;
}

.about-line {
  font-size: 0.8rem;
  color: var(--app-ink-3);
  margin: 5px 0;
}

/* ===== 底部导航 ===== */
.tabbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  max-width: 640px;
  margin: 0 auto;
  height: calc(var(--tabbar-h) + var(--safe-bottom));
  padding-bottom: var(--safe-bottom);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--app-line);
  display: flex;
  z-index: 50;
}

.tab-btn {
  flex: 1;
  background: transparent;
  color: var(--app-ink-3);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  font-size: 0.7rem;
  padding: 0;
}

.tab-btn .tab-icon {
  font-size: 1.3rem;
  line-height: 1;
}

.tab-btn.active {
  color: var(--app-blue);
  font-weight: 700;
}

/* ===== 阅读器 ===== */
.reader {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: var(--app-bg);
  display: none;
  max-width: 640px;
  margin: 0 auto;
}

.reader.active {
  display: flex;
  flex-direction: column;
}

.reader-header {
  height: calc(var(--reader-header-h) + var(--safe-top));
  padding: var(--safe-top) 8px 0;
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--app-line);
  flex-shrink: 0;
}

.icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: #f2f5fa;
  color: var(--app-ink);
  font-size: 1rem;
  font-weight: 700;
  flex-shrink: 0;
}

#readerBack {
  font-size: 1.7rem;
  line-height: 1;
  color: var(--app-ink);
  padding-bottom: 5px;
}

.reader-title {
  flex: 1;
  min-width: 0;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--app-ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.done-btn {
  background: var(--app-green);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
  border-radius: 20px;
  padding: 7px 12px;
  margin-left: 2px;
  flex-shrink: 0;
}

.done-btn.done {
  background: #e9f8ef;
  color: var(--app-green);
}

.reader-scroll {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 0 0 calc(var(--reader-nav-h) + var(--safe-bottom) + 16px);
}

.reader-loading {
  text-align: center;
  color: var(--app-ink-3);
  font-size: 0.9rem;
  padding: 48px 16px;
}

.reader-error {
  text-align: center;
  color: var(--app-red);
  font-size: 0.92rem;
  padding: 36px 18px;
}

.reader-error button {
  display: block;
  margin: 14px auto 0;
  background: var(--app-blue);
  color: #fff;
  border-radius: 9px;
  padding: 9px 18px;
  font-size: 0.88rem;
}

/* 原课程内容在阅读器里的移动端适配 */
#app .reader-body {
  padding: 14px 14px 8px;
  font-size: 1rem;
}

#app .reader-body .container,
#app .reader-body .content {
  max-width: 100%;
  margin: 0;
  box-shadow: none;
}

#app .reader-body .content {
  background: transparent;
  border-radius: 0;
  padding: 8px 2px;
  min-height: 0;
  animation: none;
}

#app .reader-body h1 {
  font-size: 1.5rem;
  line-height: 1.35;
}

#app .reader-body h2 {
  font-size: 1.22rem;
}

#app .reader-body h3 {
  font-size: 1.08rem;
}

#app .reader-body .table-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

#app .reader-body pre {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  white-space: pre;
}

#app .reader-body details > *:not(summary) {
  overflow-wrap: break-word;
}

#app .reader-body .quiz-option {
  min-height: 44px;
  align-items: center;
}

#app .reader-body .quiz-option input {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.reader-nav {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: calc(var(--reader-nav-h) + var(--safe-bottom));
  padding: 8px 10px var(--safe-bottom);
  display: grid;
  grid-template-columns: 1fr 1.4fr 1fr;
  gap: 8px;
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--app-line);
}

.reader-nav-btn {
  border-radius: 10px;
  background: #f2f5fa;
  color: var(--app-ink);
  font-size: 0.82rem;
  font-weight: 700;
  min-width: 0;
  padding: 0 4px;
}

.reader-nav-btn.primary {
  background: var(--app-blue);
  color: #fff;
}

.reader-nav-btn.primary.done {
  background: #e9f8ef;
  color: var(--app-green);
}

.reader-nav-btn:disabled {
  opacity: 0.38;
}

/* ===== Toast ===== */
.toast {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: calc(var(--tabbar-h) + var(--safe-bottom) + 18px);
  z-index: 80;
  background: rgba(23, 32, 51, 0.94);
  color: #fff;
  border-radius: 22px;
  padding: 10px 18px;
  font-size: 0.86rem;
  max-width: 86vw;
  text-align: center;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.22);
}

.toast.reader {
  bottom: calc(var(--reader-nav-h) + var(--safe-bottom) + 18px);
}

/* ===== 打印 ===== */
@media print {
  .tabbar, .reader-header, .reader-nav, .toast { display: none !important; }
  #app .reader-body { padding: 0; }
}
