* { margin: 0; padding: 0; box-sizing: border-box; }
:root {
  --bg: #0f0f1a;
  --surface: #1a1a2e;
  --card: #222240;
  --border: #2d2d5a;
  --text: #e8e8f0;
  --muted: #8888aa;
  --accent: #6c5ce7;
  --accent-light: #a29bfe;
  --green: #00b894;
  --gold: #fdcb6e;
  --red: #ff6b6b;
  --blue: #74b9ff;
}
html, body { height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-tap-highlight-color: transparent;
}
.test-env-badge {
  display: none;
  position: fixed;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(253,203,110,0.16);
  border: 1px solid rgba(253,203,110,0.35);
  color: var(--gold);
  font-size: 12px;
  font-weight: 700;
  backdrop-filter: blur(10px);
  pointer-events: none;
}
body.test-env .test-env-badge { display: block; }

.app-toast {
  position: fixed;
  top: calc(env(safe-area-inset-top, 0px) + 14px);
  left: 50%;
  transform: translate(-50%, -10px);
  z-index: 1800;
  max-width: min(420px, calc(100vw - 32px));
  padding: 10px 14px;
  border: 1px solid rgba(116,185,255,0.32);
  border-radius: 12px;
  background: rgba(26,26,46,0.94);
  color: var(--text);
  box-shadow: 0 12px 30px rgba(0,0,0,0.35);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.45;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  white-space: pre-line;
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.app-toast.visible {
  opacity: 1;
  transform: translate(-50%, 0);
}
.app-toast-warn {
  border-color: rgba(253,203,110,0.46);
  background: rgba(41,35,24,0.96);
  color: #ffe9a8;
}
.app-toast-error {
  border-color: rgba(255,107,107,0.42);
  background: rgba(46,25,31,0.96);
  color: #ffd0d0;
}
.app-toast-success {
  border-color: rgba(0,184,148,0.42);
  background: rgba(18,43,39,0.96);
  color: #bff9e9;
}

/* ── 登录页 ── */
.login-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.login-logo {
  font-size: 48px;
  margin-bottom: 8px;
}
.login-title {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 4px;
}
.login-subtitle {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 32px;
}
.login-form {
  width: 100%;
  max-width: 360px;
}
.login-mode-card {
  padding: 12px 14px;
  margin-bottom: 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(255,255,255,0.04);
}
.login-mode-title {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 4px;
}
.login-mode-text {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}
.form-group {
  margin-bottom: 16px;
}
.form-label {
  display: block;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 6px;
}
.form-hint {
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}
.form-hint.warning {
  color: var(--red);
  font-weight: 700;
}
.form-select, .form-input {
  width: 100%;
  padding: 14px 16px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text);
  font-size: 16px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s;
  -webkit-appearance: none;
}
.form-select:focus, .form-input:focus {
  border-color: var(--accent);
}
.form-input.input-warning {
  border-color: var(--red);
  box-shadow: 0 0 0 2px rgba(255, 107, 107, 0.14);
}
.form-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%238888aa' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 40px;
}
.form-select option { background: var(--card); }
.login-btn {
  width: 100%;
  padding: 15px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 8px;
  transition: opacity 0.2s;
  font-family: inherit;
}
.login-btn:active { opacity: 0.8; }
.login-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.login-link-btn {
  width: 100%;
  margin-top: 10px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: transparent;
  color: var(--accent-light);
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
}
.login-link-btn:active { opacity: 0.8; }
/* 学生搜索选择（和提交页一致） */
.search-wrapper {
  position: relative;
  margin-bottom: 8px;
}
.search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 14px;
  color: var(--muted);
}
.search-input {
  width: 100%;
  padding: 10px 14px 10px 36px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: all 0.2s;
}
.search-input:focus { border-color: var(--accent); }
.student-list {
  max-height: 200px;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
}
.student-item {
  padding: 10px 14px;
  cursor: pointer;
  transition: all 0.15s;
  font-size: 14px;
  border-bottom: 1px solid rgba(45, 45, 90, 0.5);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.student-item:last-child { border-bottom: none; }
.student-item:active {
  background: rgba(108, 92, 231, 0.15);
  color: var(--accent-light);
}
.student-item .grade-tag {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 6px;
  background: rgba(108, 92, 231, 0.1);
  color: var(--accent-light);
}
.student-item .grade-tag.g1 { background: rgba(0, 184, 148, 0.15); color: #00b894; }
.student-item .grade-tag.g2 { background: rgba(108, 92, 231, 0.15); color: #a29bfe; }
.student-item .grade-tag.g3 { background: rgba(253, 203, 110, 0.15); color: #ffeaa7; }
.selected-student {
  display: none;
  padding: 10px 14px;
  background: rgba(108, 92, 231, 0.1);
  border: 1.5px solid var(--accent);
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  color: var(--accent-light);
  justify-content: space-between;
  align-items: center;
}
.selected-student .change-btn {
  font-size: 12px;
  color: var(--muted);
  cursor: pointer;
  padding: 4px 10px;
  border-radius: 6px;
  background: rgba(255,255,255,0.05);
  border: none;
  font-family: inherit;
}
.login-notice {
  display: none;
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 10px;
  background: rgba(0, 184, 148, 0.12);
  border: 1px solid rgba(0, 184, 148, 0.24);
  color: #7bedc8;
  font-size: 13px;
  line-height: 1.5;
}
.login-error {
  background: rgba(255,107,107,0.15);
  color: var(--red);
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 14px;
  margin-top: 12px;
  display: none;
  text-align: center;
}

/* ── 主界面 ── */
.app { display: none; min-height: 100vh; padding-bottom: 80px; }
.app.active { display: block; }
.auth-booting .login-page { display: none; }
.auth-app .login-page { display: none; }
.auth-login .login-page { display: flex; }
.login-page.hidden { display: none; }
.alumni-page {
  max-width: 640px;
  margin: 0 auto;
  padding: 20px 18px 42px;
}
.alumni-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 0 18px;
}
.alumni-kicker {
  color: var(--gold);
  font-size: 13px;
  font-weight: 800;
  margin-bottom: 6px;
}
.alumni-title {
  font-size: 24px;
  font-weight: 800;
  line-height: 1.25;
  margin-bottom: 6px;
}
.alumni-subtitle {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}
.alumni-panel {
  margin-bottom: 14px;
  padding: 16px;
  border: 1px solid rgba(116,185,255,0.24);
  border-radius: 12px;
  background: rgba(34,34,64,0.72);
}
.alumni-primary-panel {
  border-color: rgba(253,203,110,0.34);
  background:
    linear-gradient(145deg, rgba(253,203,110,0.12), rgba(116,185,255,0.08)),
    rgba(34,34,64,0.72);
}
.paused-page .alumni-kicker {
  color: #cfe9ff;
}
.paused-page .alumni-primary-panel {
  border-color: rgba(116,185,255,0.34);
  background:
    linear-gradient(145deg, rgba(116,185,255,0.12), rgba(0,184,148,0.08)),
    rgba(34,34,64,0.72);
}
.alumni-panel-title {
  font-size: 16px;
  font-weight: 800;
  margin-bottom: 8px;
}
.alumni-panel-text {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}
.alumni-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 16px;
}
.alumni-main-btn,
.alumni-secondary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 10px 12px;
  border-radius: 10px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}
.alumni-main-btn {
  border: none;
  background: var(--gold);
  color: #14120b;
}
.alumni-main-btn:disabled {
  opacity: 0.72;
  cursor: not-allowed;
}
.alumni-secondary-btn {
  border: 1px solid rgba(116,185,255,0.38);
  background: rgba(116,185,255,0.12);
  color: #cfe9ff;
}
.alumni-secondary-btn.disabled {
  color: var(--muted);
  border-color: var(--border);
  background: rgba(255,255,255,0.04);
  pointer-events: none;
}
.alumni-notice {
  display: none;
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(0,184,148,0.28);
  background: rgba(0,184,148,0.12);
  color: #9ff2d6;
  font-size: 13px;
  line-height: 1.55;
}
.alumni-status-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.alumni-status-grid div {
  padding: 12px;
  border-radius: 10px;
  background: rgba(15,15,26,0.38);
}
.alumni-status-grid span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 5px;
}
.alumni-status-grid strong {
  display: block;
  font-size: 15px;
}
@media (max-width: 460px) {
  .alumni-actions,
  .alumni-status-grid {
    grid-template-columns: 1fr;
  }
}
.site-beian-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 4px 10px;
  padding: 18px 16px calc(98px + env(safe-area-inset-bottom, 0px));
  color: var(--muted);
  font-size: 11px;
  line-height: 1.8;
  text-align: center;
}
.site-beian-footer a {
  color: inherit;
  text-decoration: none;
}
.site-beian-footer a:hover {
  color: var(--accent-light);
}
.site-beian-police {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.site-beian-police img {
  width: 16px;
  height: 16px;
}
.site-beian-sep {
  color: rgba(136, 136, 170, 0.55);
}

/* 顶栏 */
.top-bar {
  padding: 20px 20px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.greeting {
  font-size: 18px;
  font-weight: 600;
}
.greeting-sub {
  font-size: 13px;
  color: var(--muted);
  margin-top: 2px;
}
.logout-btn {
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--muted);
  padding: 8px 14px;
  border-radius: 20px;
  font-size: 13px;
  cursor: pointer;
  font-family: inherit;
}

/* 余额卡片 */
.balance-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 0 20px;
  margin-bottom: 20px;
}
.balance-card {
  background: var(--card);
  border-radius: 16px;
  padding: 20px;
  position: relative;
  overflow: hidden;
}
.balance-card::before {
  content: '';
  position: absolute;
  top: -20px; right: -20px;
  width: 80px; height: 80px;
  border-radius: 50%;
  opacity: 0.1;
}
.balance-card.points::before { background: var(--accent); }
.balance-card.money::before { background: var(--gold); }
.balance-label {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 8px;
}
.balance-value {
  font-size: 28px;
  font-weight: 700;
}
.balance-card.points .balance-value { color: var(--accent-light); }
.balance-card.money .balance-value { color: var(--gold); }
.balance-unit {
  font-size: 14px;
  font-weight: 400;
  margin-left: 2px;
}
.balance-actions {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 8px;
  margin-top: 14px;
}
.balance-mini-btn {
  flex: 1;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  background: rgba(255,255,255,0.06);
  color: var(--text);
  font-family: inherit;
  font-size: 12px;
  font-weight: 800;
  padding: 8px 6px;
  cursor: pointer;
}
.balance-mini-btn:active { transform: scale(0.98); }

/* 倍率+连胜 */
.stats-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
  padding: 0 20px;
  margin-bottom: 20px;
}
.stat-item {
  background: var(--card);
  border-radius: 12px;
  padding: 14px;
  text-align: center;
}
.stat-item.clickable { cursor: pointer; transition: transform 0.15s ease; }
.stat-item.clickable:active { transform: scale(0.98); }
.stat-icon { font-size: 20px; margin-bottom: 4px; }
.stat-value { font-size: 18px; font-weight: 700; }
.stat-label { font-size: 11px; color: var(--muted); margin-top: 2px; }

/* 排名卡片 */
.rank-card {
  background: var(--card);
  border-radius: 16px;
  padding: 20px;
  margin: 0 20px 20px;
}
.rank-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
.rank-title { font-size: 15px; font-weight: 600; }
.rank-title-main,
.rank-title-class {
  max-width: 100%;
}
.rank-toggles {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.rank-board-toggle {
  width: 100%;
  justify-content: flex-end;
  background: transparent;
  gap: 6px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.rank-board-toggle button {
  background: var(--surface);
  border-radius: 999px;
  white-space: nowrap;
  flex: 0 0 auto;
}
.rank-board-toggle button.active {
  background: var(--accent);
}
.rank-toggle {
  display: flex;
  background: var(--surface);
  border-radius: 8px;
  overflow: hidden;
}
.rank-toggle button {
  background: none;
  border: none;
  color: var(--muted);
  padding: 6px 12px;
  font-size: 12px;
  cursor: pointer;
  font-family: inherit;
}
.rank-toggle button.active {
  background: var(--accent);
  color: #fff;
}
.rank-my {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(108,92,231,0.1);
  border: 1px solid rgba(108,92,231,0.3);
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 12px;
}
.rank-my-pos {
  font-size: 24px;
  font-weight: 700;
  color: var(--accent-light);
}
.rank-my-label { font-size: 13px; color: var(--muted); }
.rank-gap {
  font-size: 12px;
  color: var(--gold);
  text-align: right;
}
.rank-presence {
  display: none;
  margin: -2px 0 10px;
  padding: 8px 12px;
  border-radius: 10px;
  background: rgba(116, 185, 255, 0.08);
  border: 1px solid rgba(116, 185, 255, 0.22);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}
.rank-presence b { color: var(--accent-light); }
.rank-list { max-height: 300px; overflow-y: auto; }
.rank-loading-note {
  padding: 18px 0 22px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}
.rank-item {
  display: flex;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.rank-item:last-child { border-bottom: none; }
.rank-pos {
  width: 32px;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  text-align: center;
}
.rank-pos.top1 { color: var(--gold); }
.rank-pos.top2 { color: #b0b0b0; }
.rank-pos.top3 { color: #cd7f32; }
.rank-main { flex: 1; min-width: 0; margin-left: 8px; }
.rank-name { font-size: 14px; }
.rank-name.me { color: var(--accent-light); font-weight: 600; }
.rank-detail {
  margin-top: 3px;
  font-size: 11px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rank-pts {
  font-size: 14px;
  color: var(--muted);
  text-align: right;
  margin-left: 8px;
  white-space: nowrap;
}
@media (max-width: 520px) {
  .rank-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(112px, 34%);
    grid-template-areas:
      "title scope"
      "board board"
      "range range";
    align-items: center;
    gap: 8px 10px;
  }
  .rank-title {
    grid-area: title;
    width: 100%;
    min-width: 0;
    line-height: 1.35;
    padding-top: 0;
    display: block;
  }
  .rank-title-main {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .rank-title-class,
  .rank-title-sep {
    display: none;
  }
  .rank-toggles {
    display: contents;
  }
  .rank-board-toggle {
    grid-area: board;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    width: 100%;
    justify-content: stretch;
    overflow: visible;
    padding: 3px;
    background: var(--surface);
    border-radius: 10px;
    gap: 4px;
  }
  .rank-range-toggle,
  .rank-scope-toggle {
    display: grid;
    border-radius: 9px;
    justify-content: stretch;
  }
  .rank-range-toggle {
    grid-area: range;
    width: 100%;
    justify-self: end;
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
  .rank-scope-toggle {
    grid-area: scope;
    width: 100%;
    justify-self: end;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .rank-range-toggle button {
    min-width: 0;
  }
  .rank-scope-toggle button {
    min-width: 0;
  }
  .rank-board-toggle button {
    background: rgba(255,255,255,0.05);
    border-radius: 8px;
    padding: 7px 2px;
    font-size: 11px;
    line-height: 1.15;
    text-align: center;
    min-width: 0;
  }
  .rank-board-toggle button.active {
    background: var(--accent);
  }
  .rank-toggle button {
    padding: 6px 5px;
    font-size: 11px;
  }
  .rank-pts {
    font-size: 12px;
  }
}

/* 今日班级福利 */
.class-welfare-card {
  display: none;
  margin-top: 16px;
  padding: 14px;
  border-radius: 14px;
  border: 1px solid rgba(253,203,110,0.28);
  background:
    linear-gradient(180deg, rgba(253,203,110,0.09), rgba(15,15,26,0.14)),
    radial-gradient(circle at 16% 8%, rgba(253,203,110,0.16), transparent 28%),
    rgba(8,18,32,0.42);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.03);
}
.class-welfare-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.class-welfare-title {
  color: var(--gold);
  font-size: 15px;
  font-weight: 900;
  letter-spacing: 0;
}
.class-welfare-status {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}
.class-welfare-meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 10px;
}
.class-welfare-meta span { color: var(--accent-light); }
.class-welfare-full {
  margin-left: 4px;
  color: var(--gold) !important;
  font-size: 11px;
  white-space: nowrap;
}
.class-welfare-track {
  position: relative;
  height: 18px;
  border-radius: 999px;
  background: rgba(0,0,0,0.32);
  border: 1px solid rgba(253,203,110,0.16);
  overflow: hidden;
  margin: 12px 8px 16px;
}
.class-welfare-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #ffd166, #f6a73a 48%, #ff6b6b);
  border-radius: inherit;
  box-shadow: 0 0 14px rgba(253,203,110,0.36);
  transition: width 0.35s ease;
}
.class-welfare-chests {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.class-welfare-chest {
  display: grid;
  gap: 6px;
  justify-items: center;
  min-width: 0;
}
.class-welfare-icon {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-size: 24px;
  background: rgba(253,203,110,0.13);
  border: 1px solid rgba(253,203,110,0.2);
  filter: saturate(0.75);
  opacity: 0.58;
}
.class-welfare-chest.unlocked .class-welfare-icon {
  opacity: 1;
  filter: none;
  box-shadow: 0 0 16px rgba(253,203,110,0.34);
}
.class-welfare-chest.claimed .class-welfare-icon {
  opacity: 0.62;
  filter: grayscale(0.45);
  box-shadow: none;
}
.class-welfare-threshold {
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
}
.class-welfare-claim {
  width: 100%;
  border: 1px solid rgba(253,203,110,0.2);
  border-radius: 999px;
  background: rgba(0,0,0,0.2);
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  padding: 6px 4px;
  font-family: inherit;
}
.class-welfare-claim.can-claim {
  background: linear-gradient(135deg, #f6c453, #e58e26);
  color: #1f1605;
  border-color: rgba(255,255,255,0.18);
  cursor: pointer;
}
.class-welfare-claim:disabled { cursor: not-allowed; opacity: 0.78; }
.class-welfare-makeup {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(253,203,110,0.14);
}
.class-welfare-makeup-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
}
.class-welfare-makeup-head strong {
  color: var(--gold);
  font-size: 12px;
}
.class-welfare-makeup-head span {
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
}
.class-welfare-makeup-note {
  color: var(--muted);
  font-size: 11px;
  margin-bottom: 8px;
}
.class-welfare-makeup-chests {
  margin-top: 0;
}
.class-welfare-leaderboard {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid rgba(253,203,110,0.12);
}
.class-welfare-leaderboard-title {
  color: var(--gold);
  font-size: 12px;
  font-weight: 800;
  margin-bottom: 6px;
}
.class-welfare-leaderboard-list {
  display: grid;
  gap: 5px;
}
.class-welfare-leader {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}
.class-welfare-leader-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.class-welfare-leader.me .class-welfare-leader-name {
  color: var(--accent-light);
  font-weight: 800;
}
.class-welfare-leader-count {
  color: var(--text);
  white-space: nowrap;
}
.class-welfare-empty {
  color: var(--muted);
  font-size: 12px;
}

/* 考试趋势 */
.section-card {
  background: var(--card);
  border-radius: 16px;
  padding: 20px;
  margin: 0 20px 20px;
}
.section-title {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 16px;
}
.section-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.section-title-row .section-title { margin-bottom: 0; }
.section-toggle-row {
  width: 100%;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  text-align: left;
  cursor: pointer;
}
.section-toggle-row .section-title { margin-bottom: 4px; }
.section-toggle {
  flex-shrink: 0;
  color: var(--accent-light);
  font-size: 13px;
  font-weight: 700;
}
.section-subtitle {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}
.exam-title-row {
  align-items: flex-start;
  margin-bottom: 8px;
}
.exam-goal-summary {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  flex: 1;
  min-height: 22px;
}
.exam-goal-summary:empty { display: none; }
.exam-goal-chip,
.exam-goal-status {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 8px;
  border-radius: 8px;
  white-space: nowrap;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
}
.exam-goal-chip {
  border: 1px solid rgba(246,200,95,0.35);
  background: rgba(246,200,95,0.12);
  color: #f6c85f;
}
.exam-goal-chip.mid {
  border-color: rgba(125,211,252,0.32);
  background: rgba(125,211,252,0.1);
  color: #9bdcf9;
}
.exam-goal-chip.big {
  border-color: rgba(167,139,250,0.36);
  background: rgba(167,139,250,0.12);
  color: #c4b5fd;
}
.exam-goal-status {
  border: 1px solid rgba(232,232,240,0.18);
  background: rgba(255,255,255,0.06);
  color: var(--muted);
  font-weight: 600;
}
@media (max-width: 420px) {
  .exam-title-row { gap: 8px; }
  .exam-goal-summary { gap: 4px; }
  .exam-goal-chip,
  .exam-goal-status {
    height: 20px;
    padding: 0 6px;
    font-size: 10px;
  }
}
.reading-chart-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.reading-chart-controls button {
  width: 30px;
  height: 30px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(0,0,0,0.12);
  color: var(--text);
  font-size: 18px;
  font-weight: 800;
  font-family: inherit;
  line-height: 1;
  cursor: pointer;
}
.reading-chart-controls button:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}
.reading-chart-range {
  min-width: 118px;
  text-align: center;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}
.reading-chart-legend {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 11px;
  margin: -2px 0 8px;
}
.reading-chart-legend span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.reading-chart-legend i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}
.legend-duration { background: var(--green); }
.legend-accuracy { background: var(--gold); }
.reading-record-list {
  display: grid;
  gap: 8px;
  margin: 10px 0 12px;
}
.reading-record-item {
  display: block;
  padding: 9px 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(0,0,0,0.12);
}
.arena-rule-chart {
  display: grid;
  gap: 10px;
  margin-top: 10px;
}
.arena-rule-flow {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}
.arena-rule-step {
  min-width: 0;
  padding: 8px;
  border: 1px solid rgba(163,156,255,0.22);
  border-radius: 10px;
  background: rgba(0,0,0,0.14);
}
.arena-rule-step .num {
  display: inline-flex;
  width: 18px;
  height: 18px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(108,92,231,0.28);
  color: var(--accent-light);
  font-size: 11px;
  font-weight: 900;
  margin-bottom: 5px;
}
.arena-rule-step b {
  display: block;
  color: var(--text);
  font-size: 12px;
  line-height: 1.35;
}
.arena-rule-step span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}
.arena-rule-matrix {
  display: grid;
  grid-template-columns: minmax(76px, 0.8fr) minmax(0, 1.8fr);
  border: 1px solid rgba(163,156,255,0.22);
  border-radius: 10px;
  overflow: hidden;
  background: rgba(0,0,0,0.1);
}
.arena-rule-matrix div {
  min-width: 0;
  padding: 7px 8px;
  border-top: 1px solid rgba(163,156,255,0.16);
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}
.arena-rule-matrix div:nth-child(-n+2) { border-top: 0; }
.arena-rule-matrix div:nth-child(odd) {
  color: var(--accent-light);
  font-weight: 800;
  background: rgba(108,92,231,0.08);
}
.arena-rule-matrix--triple {
  grid-template-columns: minmax(68px, 0.65fr) minmax(0, 1.45fr) minmax(0, 1.05fr);
}
.arena-rule-matrix--triple div:nth-child(-n+3) { border-top: 0; }
.arena-rule-matrix--triple div:nth-child(odd) {
  color: var(--muted);
  font-weight: 400;
  background: transparent;
}
.arena-rule-matrix--triple .arena-rule-head,
.arena-rule-matrix--triple div[role="rowheader"] {
  color: var(--accent-light);
  font-weight: 800;
  background: rgba(108,92,231,0.08);
}
.arena-rule-extra {
  color: var(--text) !important;
}
.arena-rule-extra b {
  color: var(--gold);
  font-weight: 900;
}
.arena-rule-note {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.arena-rule-note span {
  padding: 5px 8px;
  border: 1px solid rgba(163,156,255,0.2);
  border-radius: 999px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
  background: rgba(0,0,0,0.1);
}
.arena-rule-dialog-card {
  width: min(760px, 100%);
  max-height: min(86vh, 760px);
  overflow-y: auto;
  border-color: rgba(108,92,231,0.58);
  background:
    radial-gradient(circle at 50% 0%, rgba(108,92,231,0.18), transparent 34%),
    linear-gradient(180deg, rgba(34,34,64,0.98), rgba(26,26,46,0.98));
}
.arena-rule-dialog-card .arena-rule-chart { margin-top: 12px; }
.arena-practice-dialog-card {
  border-color: rgba(253,203,110,0.52);
  background:
    radial-gradient(circle at 50% 0%, rgba(253,203,110,0.16), transparent 34%),
    linear-gradient(180deg, rgba(34,34,64,0.98), rgba(26,26,46,0.98));
}
.arena-practice-article {
  margin: -4px 0 14px;
  padding: 9px 10px;
  border: 1px solid rgba(163,156,255,0.22);
  border-radius: 10px;
  background: rgba(0,0,0,0.14);
  color: var(--accent-light);
  font-size: 12px;
  line-height: 1.45;
}
.arena-stage-strip {
  margin: 8px 0 12px;
  padding: 10px 0 12px;
  border-top: 1px solid rgba(163,156,255,0.16);
  border-bottom: 1px solid rgba(163,156,255,0.16);
}
.arena-stage-summary {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}
.arena-stage-kicker {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}
.arena-stage-title {
  color: var(--text);
  font-size: 15px;
  font-weight: 900;
  line-height: 1.35;
  margin-top: 2px;
}
.arena-stage-badge {
  flex-shrink: 0;
  padding: 5px 8px;
  border-radius: 999px;
  border: 1px solid rgba(163,156,255,0.28);
  background: rgba(108,92,231,0.14);
  color: var(--accent-light);
  font-size: 11px;
  font-weight: 900;
}
.arena-stage-badge.waiting {
  border-color: rgba(253,203,110,0.35);
  background: rgba(253,203,110,0.12);
  color: var(--gold);
}
.arena-stage-badge.ready {
  border-color: rgba(0,184,148,0.35);
  background: rgba(0,184,148,0.12);
  color: var(--green);
}
.arena-stage-track {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin-bottom: 8px;
}
.arena-stage-step {
  min-width: 0;
  padding: 7px 6px;
  border-radius: 999px;
  border: 1px solid rgba(163,156,255,0.2);
  background: rgba(0,0,0,0.12);
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.arena-stage-step.done {
  border-color: rgba(0,184,148,0.38);
  background: rgba(0,184,148,0.12);
  color: var(--green);
}
.arena-stage-step.current {
  border-color: rgba(253,203,110,0.48);
  background: rgba(253,203,110,0.13);
  color: var(--gold);
}
.arena-stage-next {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}
@media (max-width: 520px) {
  .arena-rule-flow { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .arena-stage-track { grid-template-columns: 1fr; }
  .arena-stage-step { text-align: left; padding-left: 10px; }
}
#arenaPanel {
  padding-bottom: calc(106px + env(safe-area-inset-bottom, 0px));
}
.arena-subtabs {
  position: fixed;
  left: 20px;
  right: 20px;
  bottom: calc(14px + env(safe-area-inset-bottom, 0px));
  z-index: 260;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  margin: 0;
  padding: 4px;
  border: 1px solid rgba(108,92,231,0.35);
  border-radius: 12px;
  background: rgba(26,26,46,0.96);
  box-shadow: 0 16px 36px rgba(0,0,0,0.32);
  backdrop-filter: blur(12px);
}
.arena-subtabs button {
  min-height: 38px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  font-family: inherit;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}
.arena-subtabs button.active {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 8px 18px rgba(108,92,231,0.22);
}
.arena-subtabs button:disabled {
  cursor: not-allowed;
  opacity: 0.52;
}
.arena-subpane {
  display: none;
}
.arena-subpane.active {
  display: block;
}
.arena-pane-head {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 10px;
  margin: 2px 0 10px;
}
.arena-pane-title {
  display: flex;
  align-items: center;
  min-height: 46px;
  color: var(--text);
  font-size: 18px;
  font-weight: 900;
  white-space: nowrap;
}
.arena-history-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(255,255,255,0.03);
  overflow: hidden;
}
.arena-history-card summary {
  list-style: none;
  cursor: pointer;
  padding: 12px;
}
.arena-history-card summary::-webkit-details-marker {
  display: none;
}
.arena-history-detail {
  padding: 0 12px 12px;
}
.arena-opponent-tag {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid rgba(46,213,115,0.28);
  background: rgba(46,213,115,0.1);
  color: var(--green);
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}
.arena-opponent-tag {
  margin-left: 6px;
  border-color: rgba(255,204,77,0.32);
  background: rgba(255,204,77,0.1);
  color: var(--gold);
}
.arena-result-note {
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}
.arena-matchup-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  margin: 0 0 10px;
  padding: 9px 10px;
  border-radius: 12px;
  border: 1px solid rgba(255,204,77,0.28);
  background: rgba(255,204,77,0.08);
  color: var(--text);
  font-size: 12px;
  line-height: 1.45;
}
.arena-matchup-banner b {
  color: var(--gold);
  font-size: 13px;
}
.arena-matchup-pill {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(0,0,0,0.16);
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}
.arena-open-btn,
.arena-hall-card button {
  border: 1px solid rgba(108,92,231,0.7);
  background: var(--accent);
  color: #fff;
  font-family: inherit;
  font-weight: 800;
  cursor: pointer;
}
.arena-rating-card,
.arena-open-card,
.arena-hall-card {
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  background: rgba(0,0,0,0.14);
}
.arena-rating-card {
  display: grid;
  gap: 10px;
  padding: 12px;
  margin-bottom: 10px;
}
.arena-rating-inline {
  flex: 1;
  min-width: 0;
  margin-bottom: 0;
  padding: 9px 10px;
  border-color: rgba(108,92,231,0.26);
  background: rgba(108,92,231,0.08);
}
.arena-rating-inline .arena-rating-head {
  align-items: center;
}
.arena-rating-inline .arena-rating-title {
  font-size: 12px;
  color: var(--accent-light);
}
.arena-rating-inline .arena-card-sub {
  font-size: 11px;
}
.arena-rating-inline .arena-radar {
  margin-top: -2px;
}
.arena-rating-head,
.arena-hall-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}
.arena-rating-title {
  font-size: 14px;
  font-weight: 800;
  color: var(--text);
}
.arena-score-pill,
.arena-level-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid rgba(108,92,231,0.45);
  background: rgba(108,92,231,0.18);
  color: var(--accent-light);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}
.arena-radar {
  display: grid;
  gap: 7px;
}
.arena-radar-row {
  display: grid;
  grid-template-columns: minmax(56px, 72px) 1fr 36px;
  align-items: center;
  gap: 8px;
  font-size: 12px;
}
.arena-radar-name {
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.arena-radar-track {
  height: 7px;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  overflow: hidden;
}
.arena-radar-track span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--gold));
}
.arena-radar-value {
  color: var(--text);
  font-weight: 800;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.arena-card-sub {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}
.arena-open-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 12px;
  margin: 10px 0;
}
.arena-open-btn {
  flex: 0 0 auto;
  padding: 9px 13px;
  border-radius: 10px;
  font-size: 13px;
}
.arena-section-action {
  padding: 7px 12px;
  border-radius: 9px;
  font-size: 12px;
}
.arena-open-btn:disabled,
.arena-hall-card button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}
.arena-section-label {
  margin: 12px 0 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}
.arena-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 12px 0 8px;
}
.arena-section-head .arena-section-label {
  margin: 0;
}
.arena-refresh-btn {
  flex: 0 0 auto;
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--surface);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  font-family: inherit;
  cursor: pointer;
}
.arena-refresh-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.arena-hall-list {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
}
.arena-hall-card {
  padding: 11px 12px;
}
.arena-hall-title {
  color: var(--text);
  font-size: 14px;
  font-weight: 800;
}
.arena-hall-meta {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}
.arena-attack-preview {
  margin-top: 8px;
  padding: 8px 10px;
  border: 1px solid rgba(46,213,115,0.24);
  border-radius: 10px;
  background: rgba(46,213,115,0.07);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}
.arena-attack-preview b {
  color: var(--green);
}
.arena-hall-card button {
  padding: 8px 11px;
  border-radius: 10px;
  font-size: 12px;
}
.arena-leaderboard {
  display: grid;
  gap: 7px;
  margin: 8px 0 12px;
}
.arena-board-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin: 8px 0 10px;
  padding: 4px;
  border: 1px solid rgba(163,156,255,0.24);
  border-radius: 12px;
  background: rgba(0,0,0,0.14);
}
.arena-board-scope-tabs {
  margin-bottom: 6px;
}
.arena-board-tabs button {
  min-height: 34px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  font-family: inherit;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}
.arena-board-tabs button.active {
  background: rgba(108,92,231,0.95);
  color: #fff;
}
.arena-board-title {
  margin: 6px 2px 4px;
  color: var(--text);
  font-size: 13px;
  font-weight: 900;
}
.arena-leaderboard-row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 10px;
  background: rgba(255,255,255,0.04);
}
.arena-leaderboard-rank {
  color: var(--gold);
  font-size: 12px;
  font-weight: 900;
  text-align: center;
}
.arena-leaderboard-name {
  min-width: 0;
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.arena-leaderboard-detail {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
}
.arena-leaderboard-points {
  color: var(--gold);
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
}
.arena-empty {
  padding: 10px 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}
.arena-lock-card {
  padding: 14px 12px;
  border: 1px solid rgba(163,156,255,0.22);
  border-radius: 12px;
  background: rgba(108,92,231,0.08);
}
.reading-record-top {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.reading-record-title {
  font-size: 14px;
  font-weight: 800;
  color: var(--text);
}
.reading-record-meta {
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--muted);
}
.reading-record-time {
  white-space: nowrap;
}
.reading-record-accuracy {
  font-weight: 800;
  color: var(--gold);
  white-space: nowrap;
}
.reading-record-accuracy.good { color: var(--green); }
.reading-record-status {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}
.reading-record-status.pass {
  background: rgba(0,184,148,0.14);
  color: var(--green);
}
.reading-record-status.fail,
.reading-record-status.duplicate {
  background: rgba(255,107,107,0.16);
  color: #ff7675;
}
.reading-record-status.scoring {
  background: rgba(253,203,110,0.14);
  color: var(--gold);
}
.reading-record-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}
.reading-record-actions button {
  min-width: 40px;
  height: 30px;
  border: 1px solid var(--accent-light);
  border-radius: 9px;
  background: rgba(0,0,0,0.12);
  color: var(--accent-light);
  font-family: inherit;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}
.reading-record-actions button.icon {
  min-width: 32px;
  color: var(--text);
  border-color: var(--border);
}
.reading-record-actions button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.reading-task-record-item {
  padding: 0;
  border: 0;
  border-bottom: 1px solid rgba(45,45,90,0.72);
  border-radius: 0;
  background: transparent;
}
.reading-task-record-item:first-child {
  border-top: 1px solid rgba(45,45,90,0.72);
}
.reading-task-record-main {
  display: grid;
  grid-template-columns: max-content max-content max-content max-content minmax(0, 1fr) max-content;
  grid-template-areas: "title duration accuracy clock status actions";
  align-items: center;
  column-gap: 9px;
  min-height: 46px;
  padding: 7px 0;
}
.reading-task-record-title {
  grid-area: title;
  min-width: 0;
}
.reading-record-duration {
  grid-area: duration;
  color: var(--text);
  font-size: 14px;
  font-weight: 800;
  white-space: nowrap;
}
.reading-task-record-main .reading-record-accuracy {
  grid-area: accuracy;
  font-size: 14px;
}
.reading-task-record-main .reading-record-time {
  grid-area: clock;
  font-weight: 700;
  text-align: right;
}
.reading-task-record-status-slot {
  grid-area: status;
  display: inline-flex;
  justify-content: flex-end;
  min-width: 0;
}
.reading-task-record-actions {
  grid-area: actions;
  flex-shrink: 0;
  justify-self: end;
  margin-left: 0;
}
.mining-record-list {
  display: grid;
  gap: 8px;
  margin-top: 6px;
}
.mining-record-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.mining-record-title {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mining-record-award {
  font-weight: 900;
  white-space: nowrap;
}
.mining-record-award.good { color: var(--green); }
.mining-record-award.bad { color: #ff7675; }
.reading-recognition-card {
  width: min(760px, 100%);
  max-height: min(82vh, 720px);
  overflow-y: auto;
}
.reading-recognition-summary {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 8px 0 12px;
  color: var(--muted);
  font-size: 12px;
}
.reading-recognition-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 10px;
}
.reading-segment-list {
  display: grid;
  gap: 10px;
}
.reading-segment-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(0,0,0,0.12);
  padding: 12px;
}
.reading-segment-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.reading-segment-title {
  color: var(--text);
  font-size: 14px;
  font-weight: 800;
}
.reading-segment-score {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  background: rgba(0,0,0,0.16);
  font-size: 12px;
  font-weight: 900;
}
.reading-segment-score.good { color: var(--green); }
.reading-segment-score.warn { color: var(--gold); }
.reading-segment-score.bad { color: #ff7675; }
.reading-segment-score.uncertain {
  color: var(--gold);
  border: 1px solid rgba(253,203,110,0.35);
  background: rgba(253,203,110,0.12);
}
.reading-segment-uncertain-notice {
  margin: 0 0 10px;
  color: var(--gold);
  border: 1px solid rgba(253,203,110,0.35);
  border-radius: 10px;
  background: rgba(253,203,110,0.12);
  padding: 10px;
  font-size: 12px;
  line-height: 1.6;
}
.reading-segment-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 8px;
}
.reading-recognition-box {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(0,0,0,0.12);
  padding: 12px;
}
.reading-recognition-label {
  color: var(--accent-light);
  font-size: 12px;
  font-weight: 800;
  margin-bottom: 8px;
}
.reading-recognition-text {
  white-space: pre-wrap;
  line-height: 1.65;
  font-size: 13px;
  color: var(--text);
}
.reading-recognition-text .match {
  color: var(--green);
  font-weight: 900;
  background: rgba(0,184,148,0.14);
  border-radius: 4px;
  padding: 0 2px;
}
.reading-recognition-text .miss {
  color: #ffb3b3;
  font-weight: 900;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}
.reading-recognition-text .extra {
  color: var(--gold);
  font-weight: 800;
}
.reading-issue-row {
  margin-top: 10px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}
.reading-issue-chip {
  display: inline-flex;
  align-items: center;
  margin: 3px 4px 0 0;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(255,107,107,0.16);
  color: #ffb3b3;
  font-weight: 700;
}
@media (max-width: 520px) {
  #readingTaskPanel .section-title-row {
    align-items: flex-start;
    gap: 8px;
  }
  #readingTaskPanel .section-title-row .section-title {
    min-width: 4em;
    white-space: nowrap;
  }
  .reading-chart-controls {
    margin-left: auto;
  }
  .reading-chart-range {
    min-width: 96px;
    font-size: 10px;
  }
  .reading-record-meta {
    flex-wrap: nowrap;
    gap: 7px;
  }
  .reading-record-actions {
    flex-shrink: 0;
  }
  .reading-record-actions button {
    height: 30px;
    min-width: 38px;
    padding: 0 8px;
  }
  .reading-record-actions button.icon {
    min-width: 32px;
    padding: 0;
  }
  .reading-task-record-main {
    grid-template-columns: minmax(58px, 1fr) max-content max-content max-content;
    grid-template-areas:
      "title duration accuracy actions"
      "clock clock status actions";
    row-gap: 3px;
    column-gap: 7px;
    min-height: 48px;
    padding: 8px 0;
  }
  .reading-task-record-title,
  .reading-record-duration,
  .reading-task-record-main .reading-record-accuracy {
    font-size: 13px;
  }
  .reading-task-record-main .reading-record-time {
    justify-self: start;
    text-align: left;
    font-size: 11px;
  }
  .reading-task-record-main .reading-record-status {
    height: 20px;
    padding: 0 7px;
    font-size: 10px;
  }
  .arena-rating-head,
  .arena-pane-head,
  .arena-open-card,
  .arena-hall-head {
    flex-direction: column;
    align-items: stretch;
  }
  .arena-pane-title {
    min-height: 0;
  }
  .arena-section-head {
    align-items: stretch;
  }
  .arena-open-btn,
  .arena-refresh-btn,
  .arena-hall-card button {
    width: 100%;
  }
  .arena-radar-row {
    grid-template-columns: 58px 1fr 34px;
  }
}
.chart-area {
  width: 100%;
  height: 180px;
  position: relative;
}
.chart-area canvas { width: 100%; height: 100%; }
.reading-chart-area {
  width: 100%;
  height: 160px;
  position: relative;
}
.reading-chart-area canvas {
  width: 100%;
  height: 100%;
  cursor: pointer;
  touch-action: manipulation;
}
.reading-chart-tooltip {
  position: absolute;
  min-width: 132px;
  max-width: 190px;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid rgba(108,92,231,0.55);
  background: rgba(31,31,61,0.96);
  box-shadow: 0 10px 28px rgba(0,0,0,0.35);
  color: var(--text);
  font-size: 11px;
  line-height: 1.45;
  pointer-events: none;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.16s ease, transform 0.16s ease;
  z-index: 3;
}
.reading-chart-tooltip.visible {
  opacity: 1;
  transform: translateY(0);
}
.reading-chart-tooltip b {
  display: block;
  font-size: 12px;
  margin-bottom: 4px;
}
.reading-chart-tooltip span {
  display: inline-block;
  margin-right: 8px;
  color: var(--muted);
}
.reading-chart-tooltip .good { color: var(--green); font-weight: 700; }
.reading-chart-tooltip .warn { color: var(--gold); font-weight: 700; }
.no-data {
  text-align: center;
  color: var(--muted);
  padding: 40px 0;
  font-size: 14px;
}
.essay-correction-item {
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}
.essay-correction-item:last-child { border-bottom: none; }
.essay-correction-item.essay-correction-target {
  margin: 0 -8px;
  padding: 12px 8px;
  border-radius: 12px;
  background: rgba(124,92,255,0.10);
  box-shadow: inset 0 0 0 1px rgba(165,180,252,0.28);
}
.essay-correction-item.essay-correction-target .essay-correction-title {
  color: var(--accent-light);
}
.essay-correction-title {
  font-weight: 700;
  line-height: 1.35;
  overflow-wrap: anywhere;
}
.essay-correction-meta {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}
.essay-correction-summary {
  margin-top: 8px;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(255, 204, 102, 0.12);
  border: 1px solid rgba(255, 204, 102, 0.24);
  color: #ffcc66;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.45;
}
.essay-correction-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}
.essay-correction-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 8px 12px;
  border-radius: 10px;
  background: rgba(124,92,255,0.16);
  color: var(--accent-light);
  text-decoration: none;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
}
.essay-correction-action-primary {
  background: rgba(116,211,139,0.18);
  color: #74d38b;
}
.essay-correction-note {
  margin-top: 10px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}
.essay-review-card-box {
  border: 1px solid rgba(116,211,139,0.22);
  background: linear-gradient(180deg, rgba(116,211,139,0.08), var(--card));
}
.essay-review-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}
.essay-review-card-main {
  min-width: 0;
}
.essay-review-card-head-actions {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}
.essay-review-card-kicker {
  color: #74d38b;
  font-size: 12px;
  font-weight: 800;
  margin-bottom: 3px;
}
.essay-review-card-title {
  font-size: 17px;
  font-weight: 800;
  color: var(--text);
}
.essay-review-card-date {
  flex-shrink: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}
.essay-review-card-toggle {
  min-width: 58px;
  min-height: 34px;
  padding: 7px 12px;
  border-radius: 10px;
  border: 1px solid rgba(116,211,139,0.32);
  background: rgba(116,211,139,0.13);
  color: #74d38b;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
}
.essay-review-card-body {
  margin-top: 10px;
}
.essay-review-card-body[hidden] {
  display: none;
}
.essay-review-card-note {
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255,255,255,0.05);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
  margin-bottom: 12px;
}
.essay-review-card-grid {
  display: grid;
  gap: 12px;
}
.essay-review-card-grid section {
  border-top: 1px solid var(--border);
  padding-top: 12px;
}
.essay-review-card-grid h3 {
  margin: 0 0 8px;
  color: var(--accent-light);
  font-size: 14px;
}
.essay-review-card-grid ul {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 6px;
  color: var(--text);
  font-size: 13px;
  line-height: 1.65;
}
.essay-review-focus-list {
  list-style: none;
  padding-left: 0 !important;
}
.essay-review-focus-list li {
  padding: 9px 10px;
  border-radius: 12px;
  background: rgba(255,204,102,0.08);
  border: 1px solid rgba(255,204,102,0.18);
}
.essay-review-focus-list strong {
  display: block;
  color: var(--gold);
  font-size: 13px;
  margin-bottom: 3px;
}
.essay-review-focus-list span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}
.essay-review-card-sources {
  display: grid;
  gap: 4px;
  margin-top: 12px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}
.essay-review-card-empty {
  color: var(--muted);
  font-size: 12px;
}
@media (max-width: 420px) {
  .essay-review-card-head {
    align-items: stretch;
  }
  .essay-review-card-head-actions {
    align-items: flex-end;
  }
}
.essay-history-item {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border: none;
  border-bottom: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  text-align: left;
  font: inherit;
  cursor: pointer;
}
.essay-history-item:last-child { border-bottom: none; }
.essay-history-item:active { opacity: 0.82; }
.essay-history-main { min-width: 0; }
.essay-history-title {
  display: block;
  font-size: 14px;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.essay-history-meta {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}
.essay-history-open {
  flex-shrink: 0;
  color: var(--accent-light);
  font-size: 12px;
  font-weight: 800;
}
.essay-history-detail-card {
  max-height: min(72vh, 560px);
  overflow: auto;
  border-color: rgba(124,92,255,0.65);
}
.essay-history-detail-body {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}
.essay-history-detail-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  color: var(--muted);
  font-size: 13px;
}
.essay-history-detail-row strong {
  color: var(--text);
  font-weight: 800;
  text-align: right;
}
.review-asset-viewer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 3200;
  display: none;
  align-items: stretch;
  justify-content: center;
  background: rgba(9, 12, 26, 0.92);
}
.review-asset-viewer-backdrop.visible {
  display: flex;
}
.review-asset-viewer-shell {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}
.review-asset-viewer-close {
  position: fixed;
  top: max(12px, env(safe-area-inset-top));
  right: 12px;
  z-index: 1;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 999px;
  background: rgba(31, 34, 53, 0.92);
  color: #eef2ff;
  font-size: 28px;
  font-weight: 900;
  line-height: 1;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}
.review-asset-viewer-body {
  min-height: 100%;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: max(64px, env(safe-area-inset-top)) 10px 28px;
}
.review-asset-viewer-image {
  width: min(100%, 920px);
  height: auto;
  display: block;
  border-radius: 10px;
  background: #fff;
}
.review-asset-viewer-loading,
.review-asset-viewer-error {
  margin: auto;
  color: #eef2ff;
  font-size: 18px;
  font-weight: 900;
  text-align: center;
}
.essay-audit-detail-panel {
  padding: 12px;
  border-radius: 12px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(124,92,255,0.28);
}
.essay-audit-detail-title {
  color: var(--text);
  font-size: 14px;
  font-weight: 900;
  margin-bottom: 10px;
}
.essay-audit-detail-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
  gap: 8px;
}
.essay-audit-detail-item {
  min-width: 0;
  padding: 9px;
  border-radius: 10px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
}
.essay-audit-detail-pass {
  border-color: rgba(116,211,139,0.28);
}
.essay-audit-detail-fail {
  border-color: rgba(255,107,107,0.34);
}
.essay-audit-detail-neutral {
  border-color: rgba(255,204,102,0.28);
}
.essay-audit-detail-badge {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  color: var(--text);
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
}
.essay-audit-detail-item p,
.essay-audit-error-item p {
  display: grid;
  gap: 3px;
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}
.essay-audit-detail-item p b,
.essay-audit-error-item p b {
  color: rgba(235,238,255,0.86);
  font-size: 11px;
}
.essay-audit-detail-item p span,
.essay-audit-error-item p span {
  overflow-wrap: anywhere;
}
.essay-audit-detail-hint {
  margin-top: 10px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}
.essay-audit-new-errors {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}
.essay-audit-subtitle {
  color: #ffcc66;
  font-size: 13px;
  font-weight: 900;
}
.essay-audit-error-item {
  padding: 9px;
  border-radius: 10px;
  background: rgba(255,204,102,0.09);
  border: 1px solid rgba(255,204,102,0.2);
}
.essay-audit-error-item > strong {
  color: var(--text);
  font-size: 13px;
}
.essay-history-actions {
  display: grid;
  gap: 10px;
  margin-top: 8px;
}
.essay-history-actions a {
  display: block;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(124,92,255,0.18);
  color: var(--accent-light);
  text-decoration: none;
  text-align: center;
  font-size: 14px;
  font-weight: 800;
}
.essay-history-action-primary {
  background: rgba(116,211,139,0.18) !important;
  color: #74d38b !important;
}
.essay-history-action-sub {
  background: rgba(124,92,255,0.14) !important;
}
.essay-history-action-note {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
  line-height: 1.4;
}
.essay-history-empty {
  padding: 12px;
  border-radius: 12px;
  background: rgba(255,255,255,0.05);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

/* 交易记录 */
.txn-card.collapsed {
  padding-bottom: 18px;
}
.txn-list {
  margin-top: 12px;
}
.txn-controls {
  margin-top: 12px;
}
.txn-controls[hidden] {
  display: none;
}
.txn-filter-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 0 8px;
  scrollbar-width: none;
}
.txn-filter-row::-webkit-scrollbar {
  display: none;
}
.txn-filter-chip {
  flex: 0 0 auto;
  min-height: 32px;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 6px 12px;
  background: rgba(255,255,255,0.05);
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
  cursor: pointer;
}
.txn-filter-chip.active {
  border-color: rgba(162,155,254,0.72);
  background: rgba(162,155,254,0.16);
  color: var(--accent-light);
}
.txn-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.txn-item:last-child { border-bottom: none; }
.txn-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  margin-right: 12px;
  flex-shrink: 0;
}
.txn-icon.earn { background: rgba(0,184,148,0.15); }
.txn-icon.spend { background: rgba(255,107,107,0.15); }
.txn-info { flex: 1; }
.txn-source { font-size: 14px; }
.txn-time { font-size: 12px; color: var(--muted); }
.txn-amount { font-size: 16px; font-weight: 600; }
.txn-amount.positive { color: var(--green); }
.txn-amount.negative { color: var(--red); }
.txn-more {
  display: block;
  width: 100%;
  border: 0;
  background: transparent;
  text-align: center;
  padding: 12px;
  color: var(--accent-light);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}
.txn-more:disabled {
  color: var(--muted);
  cursor: default;
}

/* 底部导航（预留） */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--surface);
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-around;
  padding: 8px 0 env(safe-area-inset-bottom, 8px);
}
.nav-item {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 0;
  padding: 6px 4px;
  color: var(--muted);
  text-decoration: none;
  font-size: 11px;
  cursor: pointer;
  position: relative;
}
.nav-item.active { color: var(--accent-light); }
.nav-icon { font-size: 22px; margin-bottom: 2px; }
.nav-badge,
.feedback-reply-dot {
  display: none;
  position: absolute;
  top: 1px;
  left: calc(50% + 8px);
  right: auto;
  align-items: center;
  justify-content: center;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--red);
  color: #fff;
  border: 2px solid var(--surface);
  font-size: 10px;
  line-height: 1;
  font-weight: 800;
  text-align: center;
}
.essay-alert-dot {
  background: var(--gold);
  color: #1a1a2e;
}

/* 反馈 */
.feedback-category-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}
.feedback-category-btn {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  border-radius: 12px;
  padding: 12px 10px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
}
.feedback-category-btn span {
  display: block;
  font-size: 20px;
  margin-bottom: 4px;
}
.feedback-category-btn.active {
  border-color: var(--accent);
  color: var(--text);
  background: rgba(108,92,231,0.22);
}
.feedback-textarea {
  width: 100%;
  min-height: 130px;
  resize: vertical;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  border-radius: 14px;
  padding: 14px;
  font-family: inherit;
  font-size: 15px;
  line-height: 1.6;
  outline: none;
}
.feedback-textarea:focus { border-color: var(--accent); }
.feedback-upload-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  flex-wrap: wrap;
}
.feedback-upload-btn {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  border-radius: 12px;
  padding: 9px 12px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
.feedback-upload-hint {
  color: var(--muted);
  font-size: 12px;
}
.feedback-image-preview {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}
.feedback-image-preview:empty { display: none; }
.feedback-preview-item,
.feedback-attachment-btn {
  width: 76px;
  height: 76px;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  background: var(--surface);
  position: relative;
}
.feedback-preview-item img,
.feedback-attachment-btn img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.feedback-remove-image {
  position: absolute;
  top: 3px;
  right: 3px;
  width: 22px;
  height: 22px;
  border: none;
  border-radius: 50%;
  background: rgba(0,0,0,0.68);
  color: #fff;
  font-size: 15px;
  line-height: 22px;
}
.feedback-attachment-list {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}
.feedback-attachment-btn {
  cursor: pointer;
  padding: 0;
}
.feedback-bubble-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 10px;
}
.feedback-withdraw-btn {
  border: 1px solid rgba(255,118,117,0.38);
  background: rgba(255,118,117,0.1);
  color: var(--red);
  border-radius: 999px;
  padding: 5px 10px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}
.feedback-withdraw-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.feedback-thread {
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.feedback-thread:last-child { border-bottom: none; }
.feedback-thread-head {
  align-items: flex-start;
  margin-bottom: 8px;
}
.feedback-dialog-list {
  display: grid;
  gap: 8px;
}
.feedback-bubble {
  max-width: 86%;
  border-radius: 14px;
  padding: 10px 12px;
  font-size: 13px;
  line-height: 1.6;
  word-break: break-word;
}
.feedback-bubble-student {
  justify-self: end;
  background: rgba(108,92,231,0.16);
  border: 1px solid rgba(108,92,231,0.28);
  color: var(--text);
}
.feedback-bubble-teacher {
  justify-self: start;
  background: rgba(0,184,148,0.1);
  border: 1px solid rgba(0,184,148,0.28);
  color: var(--text);
}
.feedback-bubble-pending {
  justify-self: start;
  background: rgba(120,124,145,0.08);
  border: 1px dashed rgba(120,124,145,0.3);
  color: var(--muted);
}
.feedback-bubble-meta {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  margin-bottom: 4px;
}
.feedback-reply-box {
  margin-top: 0;
}
.feedback-reply-title {
  font-weight: 800;
  color: var(--green);
  margin-bottom: 4px;
}
.feedback-reply-text {
  white-space: pre-wrap;
}
.feedback-new-reply {
  margin-left: 6px;
  color: var(--red);
  font-weight: 800;
}
.feedback-anonymous-hint {
  display: none;
  margin: -4px 0 10px;
  padding: 9px 10px;
  border: 1px solid rgba(116,185,255,0.28);
  border-radius: 10px;
  background: rgba(116,185,255,0.1);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}
.feedback-anonymous-hint.visible { display: block; }
.feedback-submit-btn {
  width: 100%;
  margin-top: 12px;
  padding: 14px;
  border: none;
  border-radius: 14px;
  background: var(--accent);
  color: #fff;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}
.feedback-submit-btn:disabled { opacity: 0.55; cursor: not-allowed; }
.feedback-msg {
  min-height: 22px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}
.feedback-msg.success { color: var(--green); }
.feedback-msg.error { color: var(--red); }
.feedback-item {
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.feedback-item:last-child { border-bottom: none; }
.feedback-item-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  margin-bottom: 6px;
}
.feedback-item-type { font-size: 13px; font-weight: 700; color: var(--accent-light); }
.feedback-item-status {
  font-size: 12px;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(253,203,110,0.14);
  color: var(--gold);
  white-space: nowrap;
}
.feedback-item-status.resolved {
  background: rgba(0,184,148,0.14);
  color: var(--green);
}
.feedback-item-status.replied {
  background: rgba(116,185,255,0.14);
  color: var(--accent-light);
}
.feedback-item-content { font-size: 13px; line-height: 1.6; color: var(--text); white-space: pre-wrap; }
.feedback-item-time { font-size: 12px; color: var(--muted); margin-top: 6px; }

/* 加载 */
.loading {
  text-align: center;
  padding: 60px 0;
  color: var(--muted);
}
.spinner {
  display: inline-block;
  width: 32px;
  height: 32px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── 同桌卡片 ── */
#buddyCard {
  margin: 0 20px 20px;
}
#buddyCard:empty { margin: 0; }
.buddy-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 0;
}
.buddy-card.active {
  background: var(--card);
  border-color: rgba(45,45,90,0.7);
  border-radius: 14px;
  padding: 12px 14px;
  box-shadow: none;
}
.buddy-header { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 8px; }
.buddy-card.active .buddy-header { flex-wrap: wrap; margin-bottom: 6px; }
.buddy-name { font-size: 16px; font-weight: 700; }
.buddy-card.active .buddy-name { display: flex; align-items: center; gap: 6px; font-size: 15px; }
.buddy-help {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(108,92,231,0.34);
  color: var(--text);
  font-size: 12px;
  font-weight: 800;
}
.buddy-level { font-size: 12px; color: var(--gold); white-space: nowrap; }
.buddy-card.active .buddy-level {
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(253,203,110,0.08);
  border: 1px solid rgba(253,203,110,0.12);
}
.buddy-synergy { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.buddy-card.active .buddy-synergy { gap: 8px; margin: 8px 0 6px; }
.buddy-bar { flex: 1; height: 5px; background: rgba(15,15,26,0.58); border-radius: 999px; overflow: hidden; }
.buddy-bar-fill { height: 100%; background: linear-gradient(90deg, var(--accent-light), var(--green)); border-radius: 999px; opacity: 0.72; }
.buddy-card.active .buddy-bar { height: 7px; background: rgba(162,155,254,0.13); box-shadow: inset 0 0 0 1px rgba(255,255,255,0.035); }
.buddy-card.active .buddy-bar-fill { opacity: 1; box-shadow: 0 0 10px rgba(0,184,148,0.32); }
.buddy-synergy-text { font-size: 12px; color: var(--muted); white-space: nowrap; }
.buddy-card.active .buddy-synergy-text { color: var(--accent-light); font-weight: 700; }
.buddy-info { font-size: 12px; color: var(--muted); }
.buddy-card.active .buddy-info {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  line-height: 1.45;
  flex-wrap: wrap;
}
.buddy-actions { display: flex; gap: 8px; margin-top: 8px; }
.buddy-card.active .buddy-actions { justify-content: flex-end; margin-top: 4px; }
.buddy-btn {
  padding: 6px 14px; border-radius: 8px; border: none; font-size: 12px;
  cursor: pointer; font-family: inherit; font-weight: 600;
}
.buddy-btn.primary { background: var(--accent); color: #fff; }
.buddy-btn.danger { background: rgba(255,107,107,0.15); color: var(--red); }
.buddy-card.active .buddy-btn.danger {
  background: transparent;
  color: rgba(255,107,107,0.78);
  padding: 2px 0;
  border-radius: 0;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
}
.buddy-btn.ghost { background: var(--surface); color: var(--muted); border: 1px solid var(--border); }
.buddy-request {
  background: rgba(253,203,110,0.1); border: 1px solid var(--gold); border-radius: 12px;
  padding: 12px; margin-bottom: 12px; font-size: 13px;
}
.buddy-request .br-actions { display: flex; gap: 8px; margin-top: 8px; }
.candidate-item {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 0; border-bottom: 1px solid var(--border);
}
.candidate-item:last-child { border-bottom: none; }
.candidate-name { font-size: 14px; font-weight: 600; }
.candidate-meta { font-size: 11px; color: var(--muted); }

/* ── 读书页面 ── */
.reading-page {
  display: none;
  min-height: 100vh;
  padding: 20px;
  padding-bottom: calc(20px + env(safe-area-inset-bottom, 0px));
}
.reading-page.active { display: block; }
.reading-back {
  font-size: 14px;
  color: var(--muted);
  cursor: pointer;
  margin-bottom: 16px;
}

/* ── 背词页面 ── */
.vocab-page {
  padding-top: 14px;
  padding-bottom: calc(110px + env(safe-area-inset-bottom, 0px));
}
.vocab-hero-card {
  margin: 0 0 12px;
  padding: 16px;
}
.vocab-hero-title {
  font-size: 18px;
  font-weight: 900;
  margin-bottom: 5px;
}
.vocab-hero-sub {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
  margin-bottom: 10px;
}
.vocab-mode-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  margin-bottom: 10px;
}
.vocab-mode-tabs button,
.vocab-primary-btn,
.vocab-choice-btn {
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.04);
  color: var(--text);
  border-radius: 12px;
  font-family: inherit;
  cursor: pointer;
}
.vocab-mode-tabs button {
  min-height: 36px;
  font-weight: 800;
}
.vocab-mode-tabs button.active {
  border-color: rgba(108,92,231,0.8);
  background: rgba(108,92,231,0.2);
  color: var(--accent-light);
}
.vocab-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}
.vocab-summary-item {
  min-height: 50px;
  padding: 7px 6px;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  background: rgba(0,0,0,0.14);
  text-align: center;
}
.vocab-summary-item b {
  display: block;
  color: var(--accent-light);
  font-size: 15px;
  margin-bottom: 3px;
}
.vocab-summary-item span {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.3;
}
.vocab-checkin-entry {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
}
.vocab-checkin-entry-btn,
.vocab-checkin-result-btn {
  flex: 0 0 auto;
  min-height: 38px;
  border: 1px solid rgba(0,184,148,0.38);
  border-radius: 10px;
  background: rgba(0,184,148,0.12);
  color: var(--green);
  padding: 0 12px;
  font: inherit;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}
.vocab-checkin-entry-btn:disabled {
  border-color: rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.05);
  color: var(--muted);
  cursor: not-allowed;
  opacity: 0.72;
}
.vocab-checkin-entry span {
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}
		.vocab-book-control {
		  display: flex;
		  align-items: center;
		  gap: 8px;
	  flex: 1 1 auto;
	  min-width: 0;
	  color: var(--muted);
	  font-size: 12px;
	  font-weight: 800;
	}
	.vocab-book-row {
	  display: flex;
	  align-items: center;
	  gap: 8px;
	  margin: 12px 0 0;
	}
	.vocab-book-control select {
	  flex: 1 1 auto;
  min-width: 0;
  min-height: 38px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  padding: 8px 10px;
  font: inherit;
  font-size: 13px;
  outline: none;
}
	.vocab-book-control select:focus {
	  border-color: rgba(116,185,255,0.72);
	}
		.vocab-book-overview-btn,
		.vocab-book-overview-refresh,
		.vocab-book-reset-btn {
		  flex: 0 0 auto;
		  display: inline-flex;
		  align-items: center;
		  justify-content: center;
		  min-height: 38px;
		  border: 1px solid rgba(116,185,255,0.32);
		  border-radius: 10px;
		  background: rgba(116,185,255,0.12);
		  color: var(--blue);
		  padding: 0 12px;
		  font: inherit;
		  font-size: 12px;
		  font-weight: 900;
		  line-height: 1;
		  text-align: center;
		  cursor: pointer;
		}
	.vocab-book-reset-btn {
	  border-color: rgba(253,203,110,0.44);
	  background: rgba(253,203,110,0.12);
	  color: #fdcb6e;
	}
	.vocab-book-overview-btn:disabled {
	  opacity: 0.55;
	  cursor: default;
	}
		.vocab-book-overview-refresh:disabled,
		.vocab-book-reset-btn:disabled {
		  opacity: 0.55;
		  cursor: default;
		}
		.vocab-practice-size-wrap {
		  margin: 12px 0 14px;
		  padding: 10px;
		  border: 1px solid rgba(116,185,255,0.2);
		  border-radius: 8px;
		  background: rgba(116,185,255,0.08);
		}
		.vocab-practice-size-label {
		  margin-bottom: 8px;
		  color: var(--muted);
		  font-size: 12px;
		  font-weight: 800;
		}
		.vocab-practice-size-control {
		  display: grid;
		  grid-template-columns: repeat(4, minmax(0, 1fr));
		  gap: 7px;
		  margin: 0;
		}
		.vocab-practice-size-control button {
		  min-width: 0;
		  min-height: 36px;
		  border: 1px solid rgba(255,255,255,0.12);
		  border-radius: 10px;
		  background: rgba(255,255,255,0.05);
		  color: rgba(255,255,255,0.82);
		  padding: 0 6px;
		  font: inherit;
		  font-size: 12px;
		  font-weight: 900;
		  line-height: 1.1;
		  cursor: pointer;
		}
		.vocab-practice-size-control button.active {
		  border-color: rgba(116,185,255,0.72);
		  background: rgba(116,185,255,0.16);
		  color: var(--accent-light);
		}
		.vocab-practice-size-control button:disabled {
		  opacity: 0.58;
		  cursor: not-allowed;
		}
		.vocab-book-progress-panel {
		  margin: 12px 0 12px;
		  padding: 12px 14px;
	  border: 1px solid rgba(116, 97, 255, 0.42);
	  border-radius: 8px;
	  background: rgba(20, 22, 54, 0.7);
	}
	.vocab-book-progress-heading {
	  display: flex;
	  align-items: baseline;
	  justify-content: space-between;
	  gap: 12px;
	  margin-bottom: 6px;
	  color: #fff;
	}
	.vocab-book-progress-heading span {
	  display: inline-flex;
	  align-items: center;
	  gap: 6px;
	  flex-wrap: wrap;
	  color: var(--muted);
	  font-size: 12px;
	  font-weight: 800;
	}
	.vocab-book-done-badge {
	  display: inline-flex;
	  align-items: center;
	  min-height: 20px;
	  border: 1px solid rgba(46,213,115,0.38);
	  border-radius: 999px;
	  background: rgba(46,213,115,0.12);
	  color: var(--green);
	  padding: 0 7px;
	  font-style: normal;
	  font-size: 11px;
	  font-weight: 900;
	  line-height: 1;
	}
	.vocab-book-progress-heading strong {
	  color: var(--accent);
	  font-size: 22px;
	  line-height: 1;
	}
	.vocab-book-progress-top {
	  display: flex;
	  justify-content: space-between;
	  gap: 10px;
	  margin-bottom: 8px;
	  color: var(--muted);
	  font-size: 12px;
	  line-height: 1.45;
	}
	.vocab-book-progress-top b {
	  color: #fff;
	  font-size: 13px;
	}
	.vocab-book-progress-top span {
	  text-align: right;
	}
	.vocab-book-progress-track {
	  position: relative;
	  height: 10px;
	  overflow: hidden;
	  border-radius: 999px;
	  background: rgba(255,255,255,0.1);
	}
	.vocab-book-progress-seen,
	.vocab-book-progress-mastered {
	  position: absolute;
	  inset: 0 auto 0 0;
	  border-radius: inherit;
	}
	.vocab-book-progress-seen {
	  background: rgba(116,185,255,0.42);
	}
	.vocab-book-progress-mastered {
	  z-index: 1;
	  background: linear-gradient(90deg, var(--accent), var(--blue));
	}
	.vocab-book-progress-stats {
	  display: grid;
	  grid-template-columns: repeat(3, minmax(0, 1fr));
	  gap: 8px;
	  margin-top: 10px;
	}
	.vocab-book-progress-stats span {
	  min-width: 0;
	  padding: 8px 10px;
	  border-radius: 8px;
	  background: rgba(255,255,255,0.05);
	  color: var(--muted);
	  font-size: 11px;
	  text-align: center;
	}
		.vocab-book-progress-stats b {
		  display: block;
		  margin-bottom: 2px;
		  color: #fff;
		  font-size: 15px;
		  line-height: 1.1;
		}
		.vocab-assessment-history-panel {
		  margin-top: 12px;
		  border: 1px solid rgba(255,255,255,0.1);
		  border-radius: 14px;
		  background: rgba(0,0,0,0.16);
		  padding: 12px;
		}
		.vocab-assessment-history-head {
		  display: flex;
		  align-items: flex-start;
		  justify-content: space-between;
		  gap: 10px;
		  margin-bottom: 10px;
		}
		.vocab-assessment-history-title {
		  display: grid;
		  gap: 2px;
		  min-width: 0;
		}
		.vocab-assessment-history-title strong {
		  color: #fff;
		  font-size: 14px;
		  line-height: 1.25;
		}
		.vocab-assessment-history-title span {
		  color: var(--muted);
		  font-size: 11px;
		  line-height: 1.35;
		}
		.vocab-assessment-history-refresh {
		  flex: 0 0 auto;
		  min-width: 50px;
		  min-height: 30px;
		  border: 1px solid rgba(116,185,255,0.35);
		  border-radius: 10px;
		  background: rgba(116,185,255,0.12);
		  color: var(--blue);
		  font-size: 12px;
		  font-weight: 900;
		  font-family: inherit;
		  cursor: pointer;
		}
		.vocab-assessment-history-refresh:disabled {
		  opacity: 0.5;
		  cursor: wait;
		}
		.vocab-assessment-history-stats {
		  display: grid;
		  grid-template-columns: repeat(3, minmax(0, 1fr));
		  gap: 6px;
		  margin-bottom: 10px;
		}
		.vocab-assessment-history-stat {
		  min-width: 0;
		  border-radius: 10px;
		  background: rgba(255,255,255,0.05);
		  padding: 7px 8px;
		  text-align: center;
		}
		.vocab-assessment-history-stat b {
		  display: block;
		  color: var(--gold);
		  font-size: 15px;
		  line-height: 1.15;
		}
		.vocab-assessment-history-stat span {
		  color: var(--muted);
		  font-size: 10px;
		  line-height: 1.3;
		}
		.vocab-assessment-chart-area {
		  width: 100%;
		  height: 158px;
		  position: relative;
		}
		.vocab-assessment-chart-area canvas {
		  width: 100%;
		  height: 100%;
		  cursor: pointer;
		  touch-action: manipulation;
		}
		.vocab-assessment-chart-tooltip {
		  position: absolute;
		  min-width: 146px;
		  max-width: 210px;
		  padding: 8px 10px;
		  border-radius: 12px;
		  border: 1px solid rgba(246,200,95,0.5);
		  background: rgba(31,31,61,0.96);
		  box-shadow: 0 10px 28px rgba(0,0,0,0.35);
		  color: var(--text);
		  font-size: 11px;
		  line-height: 1.45;
		  pointer-events: none;
		  opacity: 0;
		  transform: translateY(4px);
		  transition: opacity 0.16s ease, transform 0.16s ease;
		  z-index: 3;
		}
		.vocab-assessment-chart-tooltip.visible {
		  opacity: 1;
		  transform: translateY(0);
		}
		.vocab-assessment-chart-tooltip b {
		  display: block;
		  color: #fff;
		  font-size: 12px;
		  margin-bottom: 4px;
		}
		.vocab-assessment-chart-tooltip span {
		  display: inline-block;
		  margin-right: 8px;
		  color: var(--muted);
		}
		.vocab-assessment-chart-tooltip .good { color: var(--green); font-weight: 700; }
		.vocab-assessment-chart-tooltip .warn { color: var(--gold); font-weight: 700; }
		.vocab-assessment-history-latest {
		  margin-top: 8px;
		  color: var(--muted);
		  font-size: 11px;
		  line-height: 1.45;
		}
		.vocab-assessment-history-empty {
		  color: var(--muted);
		  font-size: 12px;
		  line-height: 1.5;
		  text-align: center;
		  padding: 4px 0;
		}
			@media (max-width: 640px) {
			  .vocab-summary-grid {
			    grid-template-columns: repeat(2, minmax(0, 1fr));
			  }
			  .vocab-book-progress-stats {
			    grid-template-columns: repeat(3, minmax(0, 1fr));
			  }
				  .vocab-assessment-history-stats {
				    grid-template-columns: repeat(3, minmax(0, 1fr));
				  }
		  .vocab-practice-size-control {
		    grid-template-columns: repeat(2, minmax(0, 1fr));
		  }
		  .vocab-checkin-entry {
		    align-items: stretch;
		    flex-direction: column;
		  }
		  .vocab-checkin-entry-btn {
		    width: 100%;
		  }
		}
.vocab-practice-card {
  margin: 0;
  padding: 16px;
}
.vocab-timer {
  flex-shrink: 0;
  min-width: 52px;
  padding: 6px 9px;
  border-radius: 999px;
  background: rgba(116,185,255,0.12);
  color: var(--blue);
  text-align: center;
  font-size: 12px;
  font-weight: 900;
}
.vocab-progress {
  height: 7px;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  overflow: hidden;
  margin-bottom: 12px;
}
.vocab-progress-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--blue));
}
.vocab-question-head {
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}
.vocab-question-head .vocab-question-meta {
  flex: 1 1 auto;
  text-align: left;
}
.vocab-question-timer {
  --timer-angle: 360deg;
  --timer-color: var(--accent-light);
  position: relative;
  flex: 0 0 48px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: conic-gradient(var(--timer-color) var(--timer-angle), rgba(255,255,255,0.1) 0deg);
  box-shadow: 0 0 0 1px rgba(255,255,255,0.08) inset;
}
.vocab-question-timer::before {
  content: '';
  position: absolute;
  inset: 5px;
  border-radius: inherit;
  background: rgba(18, 20, 34, 0.96);
}
.vocab-question-timer span {
  position: relative;
  z-index: 1;
  color: #fff;
  font-size: 16px;
  font-weight: 900;
}
.vocab-question-timer.urgent {
  --timer-color: var(--red);
}
.vocab-question-timer.paused {
  --timer-color: var(--gold);
}
.vocab-question-word-row {
  min-height: 58px;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 42px;
  align-items: center;
  gap: 8px;
  margin: 6px 0 10px;
}
.vocab-pronounce-btn,
.vocab-answer-audio-btn,
.vocab-overview-audio-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid rgba(116,185,255,0.32);
  background: rgba(116,185,255,0.12);
  color: var(--blue);
  display: inline-grid;
  place-items: center;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  flex: 0 0 auto;
}
.vocab-pronounce-btn {
  justify-self: center;
}
.vocab-pronounce-btn.speaking,
.vocab-answer-audio-btn.speaking,
.vocab-overview-audio-btn.speaking {
  border-color: rgba(253,203,110,0.75);
  background: rgba(253,203,110,0.16);
  color: var(--gold);
  animation: speechPulse 1.1s ease-in-out infinite;
}
.vocab-question-word-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
  min-height: 58px;
  width: 100%;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(0,0,0,0.16);
  padding: 6px 10px;
}
.vocab-question-word {
  min-width: 0;
  font-size: 28px;
  font-weight: 900;
  line-height: 1.1;
  color: #fff;
  overflow-wrap: anywhere;
}
.vocab-question-phonetic {
  min-width: 0;
  color: rgba(255,255,255,0.6);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.2;
  overflow-wrap: anywhere;
}
.vocab-question-meta,
.vocab-result-note {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
  text-align: center;
}
.vocab-choices {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}
.vocab-choice-btn {
  min-height: 42px;
  padding: 10px 14px;
  text-align: left;
  font-size: 15px;
  font-weight: 800;
}
.vocab-choice-btn:active,
.vocab-primary-btn:active {
  transform: scale(0.98);
}
.vocab-choice-btn.checking {
  border-color: rgba(116,185,255,0.55);
  background: rgba(116,185,255,0.14);
  color: #fff;
}
.vocab-choice-btn.checking::after {
  content: '判定中...';
  float: right;
  color: var(--blue);
  font-size: 12px;
  font-weight: 900;
}
.vocab-question-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 8px;
}
.vocab-question-action-btn {
  min-height: 40px;
  padding: 9px 10px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.86);
  font-size: 14px;
  font-weight: 900;
  cursor: pointer;
}
.vocab-question-action-btn.cut {
  border-color: rgba(253,203,110,0.42);
  color: var(--gold);
  background: rgba(253,203,110,0.12);
}
.vocab-question-action-btn.cut.active {
  border-color: rgba(0,184,148,0.65);
  color: var(--green);
  background: rgba(0,184,148,0.16);
}
.vocab-question-action-btn:disabled {
  cursor: not-allowed;
  opacity: 0.62;
}
.vocab-cut-status {
  display: grid;
  gap: 8px;
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(0,184,148,0.32);
  background: rgba(0,184,148,0.09);
  color: rgba(255,255,255,0.82);
  font-size: 13px;
  line-height: 1.5;
}
.vocab-cut-status .vocab-secondary-btn {
  width: 100%;
}
.vocab-question-control-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}
.vocab-question-control-btn {
  min-height: 40px;
  padding: 9px 10px;
  border-radius: 10px;
  border: 1px solid rgba(116,185,255,0.28);
  background: rgba(116,185,255,0.08);
  color: var(--accent-light);
  font-size: 14px;
  font-weight: 900;
}
.vocab-question-control-btn.end {
  border-color: rgba(255,107,107,0.34);
  background: rgba(255,107,107,0.08);
  color: #ffb3b3;
}
.vocab-question-control-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.vocab-paused-note,
.vocab-ended-card {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(253,203,110,0.28);
  background: rgba(253,203,110,0.08);
  color: rgba(255,255,255,0.82);
  font-size: 13px;
  line-height: 1.5;
}
.vocab-ended-card {
  display: grid;
  gap: 8px;
  text-align: center;
}
.vocab-ended-card b {
  color: #fff;
  font-size: 16px;
}
.vocab-choice-btn.correct {
  border-color: rgba(0,184,148,0.78);
  background: rgba(0,184,148,0.18);
  color: #fff;
}
.vocab-choice-btn.correct::after {
  content: '✓';
  float: right;
  color: var(--green);
  font-size: 18px;
  font-weight: 900;
  line-height: 1;
}
.vocab-choice-btn.wrong {
  border-color: rgba(255,107,107,0.78);
  background: rgba(255,107,107,0.16);
  color: #fff;
}
.vocab-choice-btn.wrong::after {
  content: '✕';
  float: right;
  color: var(--red);
  font-size: 18px;
  font-weight: 900;
  line-height: 1;
}
.vocab-inline-feedback {
  display: grid;
  gap: 6px;
  margin-top: 12px;
  padding: 10px 12px;
  border: 1px solid rgba(255,107,107,0.32);
  border-radius: 10px;
  background: rgba(255,107,107,0.08);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}
.vocab-inline-feedback b {
  color: var(--red);
  font-size: 14px;
}
.vocab-inline-feedback span {
  overflow-wrap: anywhere;
}
.vocab-primary-btn {
  width: 100%;
  min-height: 46px;
  margin-top: 14px;
  background: var(--accent);
  border-color: rgba(108,92,231,0.8);
  color: #fff;
  font-size: 15px;
  font-weight: 900;
}
.vocab-result-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
}
.vocab-result-actions .vocab-primary-btn,
.vocab-result-actions .vocab-checkin-result-btn {
  width: 100%;
  margin-top: 0;
}
.vocab-checkin-result-btn {
  min-height: 46px;
  font-size: 15px;
}
.vocab-secondary-btn {
  width: 100%;
  min-height: 44px;
  margin-top: 8px;
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.06);
  color: #fff;
  font-size: 14px;
  font-weight: 900;
}
.vocab-assessment-restart-btn {
  border-color: rgba(116,185,255,0.28);
  color: var(--accent-light);
}
.vocab-assessment-restart-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
@media (max-height: 760px) {
  .vocab-page {
    padding-top: 10px;
  }
  .vocab-hero-card {
    padding: 14px 16px;
  }
  .vocab-summary-grid {
    display: grid;
    gap: 6px;
  }
  .vocab-summary-item {
    min-height: 42px;
    padding: 6px;
  }
  .vocab-summary-item b {
    font-size: 14px;
  }
  .vocab-summary-item span {
    font-size: 10px;
  }
  .vocab-practice-card {
    padding: 14px 16px;
  }
  .vocab-question-word {
    min-height: 54px;
  }
}
.vocab-result-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 12px 0;
}
.vocab-result-pill {
  border-radius: 12px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  padding: 10px 8px;
  text-align: center;
}
.vocab-result-pill b {
  display: block;
  font-size: 18px;
  color: var(--gold);
}
.vocab-result-pill span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  margin-top: 3px;
}
.vocab-assessment-choice-card {
  border: 1px solid rgba(253,203,110,0.25);
  border-radius: 12px;
  background: rgba(253,203,110,0.08);
  padding: 14px;
}
.vocab-assessment-choice-title {
  margin-top: 4px;
  color: #fff;
  font-size: 20px;
  font-weight: 900;
  text-align: center;
}
.vocab-assessment-choice-estimate {
  margin: 12px 0 8px;
  text-align: center;
}
.vocab-assessment-choice-estimate b {
  display: block;
  color: var(--gold);
  font-size: 32px;
  line-height: 1.1;
}
.vocab-assessment-choice-estimate span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-top: 4px;
}
.vocab-assessment-choice-copy {
  margin-top: 12px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
  text-align: center;
}
.vocab-assessment-choice-actions {
  margin-top: 4px;
}
.vocab-answer-review {
  margin-top: 14px;
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 12px;
}
.vocab-answer-review-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}
.vocab-answer-review-head b {
  font-size: 14px;
  color: #fff;
}
.vocab-answer-review-head span {
  font-size: 12px;
  color: var(--muted);
}
.vocab-answer-list {
  display: grid;
  gap: 8px;
}
.vocab-answer-row {
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  background: rgba(255,255,255,0.04);
  padding: 10px;
}
.vocab-answer-row.correct {
  border-color: rgba(46,213,115,0.26);
  background: rgba(46,213,115,0.06);
}
.vocab-answer-row.wrong,
.vocab-answer-row.timeout {
  border-color: rgba(255,107,107,0.28);
  background: rgba(255,107,107,0.06);
}
.vocab-answer-word {
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 8px;
  margin-bottom: 4px;
}
.vocab-answer-word span {
  flex: 1 1 auto;
  min-width: 0;
  overflow-wrap: anywhere;
  color: #fff;
  font-size: 15px;
  font-weight: 900;
  line-height: 1.35;
}
.vocab-answer-word .vocab-answer-phonetic {
  flex: 0 1 auto;
  color: rgba(255,255,255,0.58);
  font-size: 12px;
  font-weight: 800;
}
.vocab-answer-audio-btn {
  width: 30px;
  height: 30px;
  font-size: 13px;
  margin-top: -2px;
}
.vocab-answer-word em {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 2px 7px;
  background: rgba(255,255,255,0.08);
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
}
.vocab-answer-row.correct .vocab-answer-word em {
  background: rgba(46,213,115,0.14);
  color: var(--green);
}
.vocab-answer-row.wrong .vocab-answer-word em,
.vocab-answer-row.timeout .vocab-answer-word em {
  background: rgba(255,107,107,0.14);
  color: var(--red);
}
.vocab-answer-meta {
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 11px;
}
.vocab-answer-line {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}
.vocab-answer-line + .vocab-answer-line {
  margin-top: 4px;
}
.vocab-answer-line span {
  color: var(--muted);
}
.vocab-answer-line b {
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--text);
  font-weight: 700;
}
.vocab-answer-line.correct-answer b {
  color: var(--gold);
}
.vocab-answer-line.mnemonic-answer b {
  color: var(--blue);
  white-space: pre-line;
}
.vocab-checkin-card {
  width: min(430px, calc(100vw - 24px));
  max-height: min(88vh, 760px);
  display: flex;
  flex-direction: column;
  padding: 18px;
}
.vocab-checkin-card h2 {
  margin-right: 30px;
}
.vocab-checkin-image-body {
  min-height: 180px;
  overflow: auto;
  border-radius: 12px;
  background: rgba(0,0,0,0.18);
  padding: 8px;
}
.vocab-checkin-image-body img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 10px;
  user-select: auto;
  -webkit-user-select: auto;
  -webkit-touch-callout: default;
}
.vocab-checkin-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}
.vocab-checkin-actions button,
.vocab-checkin-actions a {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(116,185,255,0.36);
  border-radius: 10px;
  background: rgba(116,185,255,0.12);
  color: var(--blue);
  padding: 0 10px;
  font: inherit;
  font-size: 13px;
  font-weight: 900;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}
.vocab-checkin-actions button:first-child {
  border-color: rgba(0,184,148,0.42);
  background: rgba(0,184,148,0.14);
  color: var(--green);
}
.vocab-checkin-actions button:disabled {
  opacity: 0.56;
  cursor: wait;
}
.vocab-feedback-card {
  border: 1px solid rgba(255,107,107,0.32);
  border-radius: 12px;
  background: rgba(255,107,107,0.08);
  padding: 14px;
}
.vocab-feedback-status {
  color: var(--red);
  font-size: 13px;
  font-weight: 900;
  text-align: center;
}
.vocab-feedback-word-row {
  min-height: 44px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 8px 0 12px;
}
.vocab-feedback-word-wrap {
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: center;
  gap: 8px;
}
.vocab-feedback-word {
  min-width: 0;
  color: #fff;
  font-size: 28px;
  font-weight: 900;
  text-align: center;
  overflow-wrap: anywhere;
}
.vocab-feedback-phonetic {
  min-width: 0;
  color: rgba(255,255,255,0.62);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.2;
  overflow-wrap: anywhere;
}
.vocab-feedback-audio-btn {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 7px 12px;
  border: 1px solid rgba(116,185,255,0.48);
  border-radius: 999px;
  background: rgba(116,185,255,0.16);
  color: var(--blue);
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
  flex: 0 0 auto;
}
.vocab-feedback-audio-btn b {
  color: inherit;
  font-size: 12px;
}
.vocab-feedback-audio-btn.speaking {
  border-color: rgba(253,203,110,0.75);
  background: rgba(253,203,110,0.16);
  color: var(--gold);
  animation: speechPulse 1.1s ease-in-out infinite;
}
.vocab-feedback-usage {
  display: grid;
  gap: 8px;
  margin: 10px 0 12px;
}
.vocab-feedback-usage-item {
  padding: 9px 10px;
  border: 1px solid rgba(116,185,255,0.14);
  border-radius: 8px;
  background: rgba(0,0,0,0.14);
}
.vocab-feedback-usage-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 5px;
}
.vocab-feedback-usage-head span {
  color: var(--blue);
  font-size: 11px;
  font-weight: 900;
}
.vocab-feedback-example-audio-btn {
  flex: 0 0 auto;
  min-height: 24px;
  border: 1px solid rgba(116,185,255,0.36);
  border-radius: 999px;
  background: rgba(116,185,255,0.12);
  color: var(--blue);
  padding: 0 8px;
  font: inherit;
  font-size: 11px;
  font-weight: 900;
  cursor: pointer;
}
.vocab-feedback-example-audio-btn.speaking {
  border-color: rgba(253,203,110,0.75);
  background: rgba(253,203,110,0.16);
  color: var(--gold);
  animation: speechPulse 1.1s ease-in-out infinite;
}
.vocab-feedback-usage-lines {
  display: grid;
  gap: 4px;
}
.vocab-feedback-usage-line {
  color: rgba(255,255,255,0.84);
  font-size: 12px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}
@media (max-width: 480px) {
  .vocab-feedback-audio-btn {
    width: 100%;
    max-width: 160px;
  }
}
	.vocab-book-overview-card {
	  width: min(620px, calc(100vw - 28px));
	  max-height: min(78vh, 720px);
	  display: flex;
	  flex-direction: column;
	  padding: 18px;
	}
	.vocab-overview-head {
	  display: flex;
	  align-items: flex-start;
	  justify-content: space-between;
	  gap: 12px;
	  margin-bottom: 12px;
	}
	.vocab-overview-head-actions {
	  display: flex;
	  align-items: center;
	  justify-content: flex-end;
	  gap: 8px;
	  flex-wrap: wrap;
	}
	.vocab-overview-head h2 {
	  margin: 0 0 4px;
	  font-size: 18px;
	  line-height: 1.25;
	}
	.vocab-overview-head p {
	  margin: 0;
	  color: var(--muted);
	  font-size: 12px;
	  line-height: 1.45;
	}
	.vocab-overview-body {
	  min-height: 160px;
	  overflow: auto;
	  padding-right: 2px;
	}
	.vocab-overview-unit {
	  border: 1px solid rgba(255,255,255,0.08);
	  border-radius: 8px;
	  background: rgba(255,255,255,0.04);
	  overflow: hidden;
	}
	.vocab-overview-unit + .vocab-overview-unit {
	  margin-top: 8px;
	}
	.vocab-overview-unit summary {
	  min-height: 42px;
	  display: flex;
	  align-items: center;
	  justify-content: space-between;
	  gap: 10px;
	  padding: 10px 12px;
	  cursor: pointer;
	  color: #fff;
	  font-size: 13px;
	  font-weight: 900;
	}
	.vocab-overview-unit summary b {
	  flex: 0 0 auto;
	  color: var(--muted);
	  font-size: 11px;
	  font-weight: 800;
	}
	.vocab-overview-word-list {
	  display: grid;
	  gap: 1px;
	  padding: 0 8px 8px;
	}
	.vocab-overview-word {
	  display: grid;
	  grid-template-columns: minmax(0, 1fr) 64px;
	  gap: 8px;
	  align-items: center;
	  min-height: 72px;
	  padding: 8px;
	  border-radius: 7px;
	  background: rgba(0,0,0,0.12);
	}
		.vocab-overview-word-main {
		  min-width: 0;
		}
		.vocab-overview-word-title {
		  display: flex;
		  align-items: center;
		  gap: 6px;
		  min-width: 0;
		}
		.vocab-overview-word strong {
		  display: block;
		  flex: 0 1 auto;
		  min-width: 0;
		  color: #fff;
		  font-size: 14px;
		  line-height: 1.3;
		  overflow-wrap: anywhere;
		}
		.vocab-overview-phonetic {
		  flex: 1 1 auto;
		  min-width: 0;
		  color: rgba(255,255,255,0.58);
		  font-size: 11px;
		  font-weight: 800;
		  line-height: 1.2;
		  overflow-wrap: anywhere;
		}
		.vocab-overview-audio-btn {
		  width: 26px;
		  height: 26px;
		  font-size: 12px;
		  border-color: rgba(255,255,255,0.16);
		  background: rgba(116,185,255,0.1);
		}
	.vocab-overview-meaning {
	  display: block;
	  margin-top: 2px;
	  color: var(--muted);
	  font-size: 12px;
	  line-height: 1.35;
	  overflow-wrap: anywhere;
	}
	.vocab-overview-meaning.hidden {
	  color: rgba(255,255,255,0.42);
	  letter-spacing: 0;
	  user-select: none;
	}
	.vocab-overview-meaning.visible {
	  color: var(--muted);
	}
	.vocab-overview-actions {
	  display: flex;
	  flex-wrap: wrap;
	  gap: 6px;
	  margin-top: 8px;
	}
	.vocab-overview-actions button {
	  min-height: 30px;
	  border: 1px solid rgba(255,255,255,0.1);
	  border-radius: 8px;
	  background: rgba(255,255,255,0.06);
	  color: var(--muted);
	  padding: 0 9px;
	  font: inherit;
	  font-size: 11px;
	  font-weight: 900;
	  cursor: pointer;
	}
	.vocab-overview-actions button.known {
	  border-color: rgba(46,213,115,0.36);
	  background: rgba(46,213,115,0.12);
	  color: var(--green);
	}
	.vocab-overview-actions button.undo-known {
	  border-color: rgba(253,203,110,0.45);
	  background: rgba(253,203,110,0.12);
	  color: #fdcb6e;
	}
		.vocab-overview-actions button:disabled {
		  opacity: 0.55;
		  cursor: default;
		}
		.vocab-overview-detail {
		  margin-top: 8px;
		  padding: 9px;
		  border: 1px solid rgba(116,185,255,0.14);
		  border-radius: 8px;
		  background: rgba(116,185,255,0.06);
		}
		.vocab-overview-detail-row + .vocab-overview-detail-row {
		  margin-top: 9px;
		}
		.vocab-overview-detail-label {
		  display: inline-block;
		  margin-bottom: 5px;
		  color: var(--blue);
		  font-size: 11px;
		  font-weight: 900;
		}
		.vocab-overview-detail-content {
		  margin: 0;
		  color: rgba(255,255,255,0.82);
		  font-size: 12px;
		  line-height: 1.55;
		  overflow-wrap: anywhere;
		}
		.vocab-overview-detail-structured {
		  display: grid;
		  gap: 6px;
		}
		.vocab-overview-detail-section {
		  display: grid;
		  grid-template-columns: minmax(0, 1fr);
		  gap: 2px;
		  align-items: start;
		  padding: 6px 8px;
		  border-radius: 7px;
		  background: rgba(0,0,0,0.12);
		}
		.vocab-overview-detail-section b {
		  color: rgba(116,185,255,0.95);
		  font-size: 11px;
		  line-height: 1.5;
		  font-weight: 900;
		}
		.vocab-overview-detail-section > div {
		  min-width: 0;
		}
		.vocab-overview-detail-lines {
		  display: grid;
		  gap: 3px;
		}
		.vocab-overview-detail-line {
		  min-width: 0;
		}
		.vocab-overview-example + .vocab-overview-example {
		  margin-top: 4px;
		}
		.vocab-overview-detail-empty {
		  color: var(--muted);
		  font-size: 12px;
		}
		.vocab-overview-word em {
		  justify-self: end;
		  border-radius: 999px;
	  padding: 3px 7px;
	  background: rgba(255,255,255,0.08);
	  color: var(--muted);
	  font-size: 11px;
	  font-style: normal;
	  font-weight: 900;
	}
	.vocab-overview-word.seen em {
	  background: rgba(253,203,110,0.14);
	  color: var(--gold);
	}
	.vocab-overview-word.mastered em {
	  background: rgba(46,213,115,0.14);
	  color: var(--green);
	}
.reading-mode-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 4px;
  margin-bottom: 16px;
}
.reading-mode-tabs button {
  position: relative;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  padding: 10px 12px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  min-width: 0;
}
.reading-mode-tabs button.active {
  background: var(--accent);
  color: #fff;
}
.reading-mode-tabs .arena-tab-help {
  width: 17px;
  height: 17px;
  margin-left: 5px;
  border: 1px solid rgba(253,203,110,0.55);
  background: rgba(253,203,110,0.16);
  color: #fdcb6e;
  font-size: 10px;
  vertical-align: -2px;
}
.reading-mode-tabs button.active .arena-tab-help {
  border-color: rgba(255,255,255,0.55);
  background: rgba(255,255,255,0.2);
  color: #fff;
}
@media (max-width: 360px) {
  .reading-mode-tabs {
    gap: 5px;
    padding: 3px;
  }
  .reading-mode-tabs button {
    padding: 9px 6px;
    font-size: 13px;
  }
}
.arena-invite-badge {
  display: none;
  position: absolute;
  top: 4px;
  right: 7px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border: 2px solid var(--surface);
  border-radius: 999px;
  background: #ff4d5e;
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  line-height: 12px;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 10px rgba(255,77,94,.45);
}
.arena-invite-badge.show {
  display: inline-flex;
}
.reading-mode-tabs button.active .arena-invite-badge {
  border-color: var(--accent);
}
.task-header {
  margin-bottom: 20px;
}
.task-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 4px;
}
.task-title {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.25;
  min-width: 0;
  flex: 1;
}
.reading-boost-badges {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  flex-wrap: wrap;
  flex-shrink: 0;
  max-width: 46%;
}
.boost-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 1px solid rgba(162,155,254,0.28);
  border-radius: 999px;
  padding: 5px 8px;
  background: rgba(34,34,64,0.92);
  color: var(--text);
  font-family: inherit;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
}
.boost-pill.buddy-empty {
  color: var(--muted);
  opacity: 0.82;
}
.boost-total {
  color: var(--gold);
  background: rgba(253,203,110,0.12);
  border-color: rgba(253,203,110,0.3);
}
@media (max-width: 360px) {
  .task-title-row { display: block; }
  .reading-boost-badges {
    justify-content: flex-start;
    max-width: none;
    margin-top: 8px;
  }
}
.task-meta {
  font-size: 13px;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  line-height: 1.5;
}
.weekly-task-pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  border-radius: 999px;
  border: 1px solid rgba(253,203,110,0.28);
  background: rgba(253,203,110,0.08);
  color: var(--gold);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}
.weekly-task-pill.done {
  border-color: rgba(0,184,148,0.28);
  background: rgba(0,184,148,0.08);
  color: var(--green);
}
.progress-bar-wrap {
  position: sticky;
  top: 0;
  z-index: 70;
  background: var(--card);
  border: 1px solid rgba(162,155,254,0.18);
  border-radius: 16px;
  padding: 16px 16px 14px;
  margin-bottom: 20px;
  box-shadow: 0 10px 28px rgba(0,0,0,0.26);
}
body.test-env .progress-bar-wrap { top: 58px; }
.progress-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.progress-track-area {
  position: relative;
  margin: 18px 0 4px;
  padding-right: 18px;
}
.progress-track {
  position: relative;
  height: 12px;
  background: var(--surface);
  border-radius: 8px;
  overflow: hidden;
}
.progress-fill {
  position: absolute;
  inset: 0 auto 0 0;
  height: 100%;
  background: linear-gradient(90deg, var(--accent), #a29bfe);
  border-radius: 8px;
  transition: width 0.6s ease;
}
.progress-segments {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 4px;
  pointer-events: none;
}
.progress-segment {
  border: 1px solid rgba(255,255,255,0.16);
  background: rgba(255,255,255,0.04);
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.12);
}
.progress-segment:first-child { border-radius: 8px 0 0 8px; }
.progress-segment:last-child { border-radius: 0 8px 8px 0; }
.progress-segment.complete {
  border-color: rgba(162,155,254,0.9);
  background: rgba(162,155,254,0.16);
  box-shadow:
    inset 0 0 10px rgba(255,255,255,0.22),
    0 0 5px rgba(108,92,231,0.28);
}
.progress-fill.milestone-flash {
  animation: progressMilestoneFlash 1.25s ease-in-out;
}
.progress-fill.gas-blast {
  animation: gasBlastFill 0.72s ease-out;
}
.progress-treasure {
  position: absolute;
  right: 0;
  top: 50%;
  width: 34px;
  height: 34px;
  transform: translate(42%, -54%);
  border-radius: 50%;
  display: grid;
  place-items: center;
  opacity: 0.72;
  pointer-events: auto;
  cursor: pointer;
  transition: opacity 0.25s ease, filter 0.25s ease, transform 0.25s ease;
}
.progress-mini-chest {
  position: relative;
  width: 28px;
  height: 24px;
  display: block;
  filter: drop-shadow(0 3px 7px rgba(0,0,0,0.42));
}
.progress-mini-chest::before,
.progress-mini-chest::after {
  content: "";
  position: absolute;
  left: 2px;
  width: 24px;
  border: 1px solid rgba(66,41,22,0.55);
  box-sizing: border-box;
}
.progress-mini-chest::before {
  top: 1px;
  height: 10px;
  border-radius: 7px 7px 2px 2px;
  background:
    linear-gradient(90deg, transparent 45%, rgba(255,226,141,0.9) 45% 55%, transparent 55%),
    linear-gradient(180deg, #ff7869, #c93535);
  transform-origin: left bottom;
  transition: transform 0.25s ease, filter 0.25s ease, background 0.25s ease;
}
.progress-mini-chest::after {
  bottom: 2px;
  height: 15px;
  border-radius: 2px 2px 6px 6px;
  background:
    linear-gradient(90deg, transparent 45%, rgba(255,226,141,0.92) 45% 55%, transparent 55%),
    linear-gradient(180deg, #f6b24d, #b56520);
  box-shadow: inset 0 -3px 0 rgba(76,44,20,0.18);
  transition: filter 0.25s ease, background 0.25s ease;
}
.progress-mini-chest-lock {
  position: absolute;
  left: 11px;
  top: 11px;
  width: 6px;
  height: 6px;
  border-radius: 2px;
  background: #ffe083;
  border: 1px solid rgba(87,58,22,0.45);
  z-index: 1;
  transition: background 0.25s ease, opacity 0.25s ease;
}
.progress-treasure:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 4px;
}
.progress-treasure.unlocked {
  opacity: 1;
  filter: drop-shadow(0 0 10px rgba(253,203,110,0.82));
  animation: progressTreasureGlow 1.35s ease-in-out infinite;
}
.progress-treasure.unlocked .progress-mini-chest::before,
.progress-treasure.unlocked .progress-mini-chest::after {
  filter: brightness(1.12) saturate(1.2);
}
.progress-treasure.claimed {
  opacity: 0.42;
  filter: saturate(0.48) brightness(0.72);
  animation: none;
}
.progress-treasure.claimed .progress-mini-chest {
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.32));
}
.progress-treasure.claimed .progress-mini-chest::before {
  transform: translateY(-4px) rotate(-10deg);
  background:
    linear-gradient(90deg, transparent 45%, rgba(139,116,72,0.7) 45% 55%, transparent 55%),
    linear-gradient(180deg, #8e4a42, #5d2d2d);
}
.progress-treasure.claimed .progress-mini-chest::after {
  background:
    linear-gradient(90deg, transparent 45%, rgba(139,116,72,0.7) 45% 55%, transparent 55%),
    linear-gradient(180deg, #87612f, #5c3b1c);
}
.progress-treasure.claimed .progress-mini-chest-lock {
  background: #78643d;
  opacity: 0.72;
}
@keyframes progressTreasureGlow {
  0%, 100% { transform: translate(42%, -54%) scale(1); }
  50% { transform: translate(42%, -60%) scale(1.14); }
}
@keyframes progressMilestoneFlash {
  0%, 100% {
    filter: brightness(1);
    box-shadow: none;
  }
  18%, 52%, 86% {
    filter: brightness(1.75);
    box-shadow: 0 0 18px rgba(162,155,254,0.95);
  }
  35%, 69% {
    filter: brightness(1.12);
    box-shadow: 0 0 8px rgba(108,92,231,0.45);
  }
}
@keyframes gasBlastFill {
  0% {
    filter: brightness(1);
    box-shadow: none;
  }
  28% {
    filter: brightness(2);
    box-shadow: 0 0 20px rgba(253,203,110,0.95), 0 0 36px rgba(255,107,107,0.35);
  }
  54% {
    filter: brightness(1.2);
    box-shadow: 0 0 10px rgba(253,203,110,0.5);
  }
  100% {
    filter: brightness(1);
    box-shadow: none;
  }
}
.progress-value {
  position: absolute;
  top: -18px;
  font-size: 12px;
  font-weight: 700;
  color: var(--accent-light);
  transform: translateX(-50%);
  transition: left 0.6s ease;
}
.progress-delta {
  position: absolute;
  top: -38px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(253,203,110,0.95);
  color: #111;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
  transform: translateX(-50%);
  pointer-events: none;
  animation: progressDelta 1.55s ease forwards;
}
@keyframes progressDelta {
  0% { opacity: 0; transform: translate(-50%, 8px) scale(0.85); }
  18% { opacity: 1; transform: translate(-50%, 0) scale(1); }
  72% { opacity: 1; transform: translate(-50%, -4px) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -18px) scale(0.96); }
}
.progress-ticks {
  position: relative;
  height: 18px;
  margin-top: 6px;
  color: var(--muted);
  font-size: 10px;
}
.progress-tick {
  position: absolute;
  top: 0;
  transform: translateX(-50%);
  white-space: nowrap;
}
.progress-tick::before {
  content: '';
  display: block;
  width: 1px;
  height: 6px;
  margin: 0 auto 2px;
  background: rgba(255,255,255,0.22);
}
.gas-station-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  margin: 0;
  flex-shrink: 0;
}
.gas-item {
  width: 40px;
  min-height: 42px;
  padding: 5px 3px;
  border-radius: 10px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  cursor: default;
  opacity: 0.3;
  transition: all 0.3s;
}
.gas-item.available {
  opacity: 1;
  cursor: pointer;
  border-color: rgba(253,203,110,0.65);
  background: rgba(253,203,110,0.12);
  animation: gasGlow 1.5s ease infinite;
}
.gas-item.claimed {
  opacity: 0.62;
  cursor: default;
  border-color: rgba(162,155,254,0.35);
  background: rgba(162,155,254,0.08);
  animation: none;
}
.gas-item.claimed .gas-icon { filter: grayscale(0.5); }
@keyframes gasGlow {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.12); filter: drop-shadow(0 0 6px rgba(253,203,110,0.5)); }
}
.gas-icon { display: none; }
.gas-label {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  line-height: 1.1;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.gas-bonus { font-size: 10px; color: var(--gold); font-weight: 800; line-height: 1.1; margin-top: 4px; }
.gas-claim-effect { animation: claimPop 0.4s ease; }
@keyframes claimPop {
  0% { transform: scale(1.3); }
  50% { transform: scale(0.9); }
  100% { transform: scale(1); }
}
.progress-info {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  min-width: 0;
  font-size: 13px;
  color: var(--muted);
}
.progress-info #progressText {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.gas-station-toast {
  position: absolute;
  top: -34px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(253,203,110,0.97);
  color: #000;
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  z-index: 88;
  white-space: nowrap;
  pointer-events: none;
  box-shadow: 0 6px 16px rgba(0,0,0,0.18);
  animation: gasPop 0.28s ease;
}
.gas-blast-pop {
  position: absolute;
  z-index: 80;
  pointer-events: none;
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(253,203,110,0.96);
  color: #111;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
  transform: translate(-50%, -50%);
  animation: gasBlastPop 0.86s ease-out forwards;
}
@keyframes gasBlastPop {
  0% { opacity: 0; transform: translate(-50%, -35%) scale(0.72); }
  22% { opacity: 1; transform: translate(-50%, -70%) scale(1.1); }
  100% { opacity: 0; transform: translate(-50%, -130%) scale(0.96); }
}
@keyframes gasPop {
  0% { transform: translateX(-50%) translateY(5px) scale(0.92); opacity: 0; }
  60% { transform: translateX(-50%) translateY(0) scale(1.04); }
  100% { transform: translateX(-50%) scale(1); opacity: 1; }
}

/* 文章显示区 */
.article-text {
  background: var(--card);
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 20px;
  line-height: 1.8;
  font-size: 15px;
}
.article-text:has(.dialogue-speaker-label)::before {
  content: "💬 角色名只提示谁在说话，不用读，AI 也不评分";
  display: block;
  margin: 0 0 12px;
  padding: 9px 11px;
  border: 1px solid rgba(116,185,255,0.28);
  border-radius: 10px;
  background: rgba(116,185,255,0.08);
  color: var(--accent-light);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.55;
}
.dialogue-speaker-label {
  display: inline-flex;
  align-items: center;
  margin: 0 5px 0 2px;
  padding: 1px 6px;
  border-radius: 6px;
  background: rgba(116,185,255,0.13);
  color: var(--accent-light);
  font-weight: 800;
  white-space: nowrap;
  cursor: help;
  user-select: none;
  -webkit-user-select: none;
}
.article-para {
  margin-bottom: 12px;
  padding: 8px 12px;
  border-radius: 8px;
  position: relative;
  transition: background 0.18s ease, box-shadow 0.18s ease;
}
.article-para:last-child { margin-bottom: 0; }
.article-para.reading-aloud {
  background: rgba(253,203,110,0.1);
  box-shadow: inset 3px 0 0 rgba(253,203,110,0.8);
}
.para-read-btn {
  width: 28px;
  height: 28px;
  margin-right: 8px;
  border: 1px solid rgba(253,203,110,0.3);
  border-radius: 50%;
  background: rgba(253,203,110,0.1);
  color: var(--gold);
  font-size: 13px;
  cursor: pointer;
  vertical-align: top;
}
.para-read-btn.speaking {
  background: var(--gold);
  color: #1a1a2e;
  animation: speechPulse 1.1s ease-in-out infinite;
}
@keyframes speechPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}
.para-num {
  display: inline-block;
  width: 20px;
  height: 20px;
  background: var(--accent);
  color: #fff;
  border-radius: 50%;
  text-align: center;
  font-size: 12px;
  line-height: 20px;
  margin-right: 8px;
  flex-shrink: 0;
}
.word-span { cursor: pointer; transition: background 0.15s; border-radius: 3px; padding: 0 1px; }
.word-span:active { background: rgba(108,92,231,0.25); }
.word-span.missed { color: var(--red); text-decoration: underline wavy var(--red); text-underline-offset: 3px; }
.word-span.blind-hidden:not(.blind-revealed):not(.reading-current) {
  color: transparent;
  -webkit-text-fill-color: transparent;
  background: rgba(253,203,110,0.22);
  box-shadow: inset 0 -1px 0 rgba(253,203,110,0.42);
  text-decoration: none;
}
.word-span.blind-hidden:not(.blind-revealed):not(.reading-current).missed {
  box-shadow: inset 0 -2px 0 rgba(255,118,117,0.82);
}
.word-span.blind-hidden.blind-revealed {
  background: rgba(0,184,148,0.14);
}
.word-span.reading-current {
  background: rgba(253,203,110,0.35);
  box-shadow: 0 0 0 2px rgba(253,203,110,0.12);
  color: #fff;
}
.beginner-sentence-break {
  display: block;
  content: "";
  margin-top: 7px;
}
.mining-segment-title {
  margin-bottom: 8px;
  color: var(--text);
  font-size: 13px;
  font-weight: 750;
}
.mining-segment-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 7px;
}
.mining-segment-hint {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}
.mining-selection-locked {
  opacity: 0.62;
}
.mining-selection-locked::after {
  display: block;
  margin-top: 6px;
  color: var(--gold);
  font-size: 12px;
  content: "录音中，当前学习段已锁定";
}
.beginner-phonetic-paragraph {
  padding: 10px 0;
}
.beginner-paragraph-toolbar {
  display: flex;
  align-items: center;
  margin-bottom: 10px;
}
.beginner-sentence-list {
  display: grid;
  gap: 12px;
}
.beginner-sentence-card {
  padding: 12px 14px;
  border: 1px solid rgba(116,185,255,0.2);
  border-radius: 12px;
  background: rgba(116,185,255,0.055);
}
.beginner-sentence-card.reading-aloud {
  border-color: rgba(253,203,110,0.5);
  background: rgba(253,203,110,0.08);
}
.beginner-sentence-head {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.beginner-sentence-english {
  flex: 1;
  min-width: 0;
  color: var(--text);
  font-size: 17px;
  font-weight: 750;
  line-height: 1.55;
}
.beginner-sentence-speak {
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(253,203,110,0.38);
  border-radius: 50%;
  background: rgba(253,203,110,0.1);
  color: var(--gold);
  font-size: 15px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.beginner-sentence-speak:active,
.beginner-sentence-speak.speaking {
  background: var(--gold);
  color: #1a1a2e;
  animation: speechPulse 1.1s ease-in-out infinite;
}
.beginner-sentence-speak:focus-visible {
  outline: 2px solid var(--accent-light);
  outline-offset: 2px;
}
.beginner-sentence-support.para-translation {
  margin-top: 8px;
  padding-left: 0;
  line-height: 1.5;
}
.beginner-sentence-translation {
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
}
.beginner-phonetic-note.para-translation {
  margin: 0 0 10px;
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(253,203,110,0.08);
  color: var(--gold);
  font-style: normal;
}
.beginner-sentence-card .para-phonetic-guide {
  gap: 6px;
  margin-top: 8px;
  padding-top: 8px;
}
.beginner-sentence-card .para-phonetic-item {
  min-width: 48px;
}
.word-phonetic {
  position: fixed; bottom: 180px; left: 50%; transform: translateX(-50%);
  background: var(--card); border: 1px solid var(--accent); border-radius: 10px;
  padding: 10px 16px; font-size: 14px; z-index: 100;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  max-width: 90vw; width: max-content; text-align: center; line-height: 1.6;
}
.word-phonetic .wp-word { font-weight: 700; margin-right: 8px; }
.word-phonetic .wp-ipa { color: var(--accent-light); }
.word-phonetic .wp-meaning { color: var(--text); font-size: 13px; }
.word-phonetic .wp-eudic {
  display: inline-block; margin-top: 6px; padding: 3px 12px;
  background: var(--accent); color: #fff; border-radius: 6px;
  font-size: 12px; text-decoration: none; font-weight: 600;
}
.word-phonetic .wp-replay {
  margin-top: 6px; margin-right: 6px; padding: 3px 12px;
  border: 1px solid var(--accent); border-radius: 6px;
  background: rgba(116,185,255,0.12); color: var(--accent-light);
  font-size: 12px; font-weight: 700;
}

/* 译文开关 */
.translate-toggle {
  display: flex; align-items: center; justify-content: flex-end;
  margin-bottom: 8px; gap: 8px; font-size: 13px; color: var(--muted);
}
.reading-tools-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}
.reading-tools-row .translate-toggle {
  margin-bottom: 0;
}
.speech-rate-control {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid rgba(162,155,254,0.22);
  border-radius: 999px;
  background: rgba(162,155,254,0.08);
  color: var(--muted);
  padding: 5px 8px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}
.blind-mode-control {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid rgba(0,184,148,0.22);
  border-radius: 999px;
  background: rgba(0,184,148,0.08);
  color: var(--muted);
  padding: 5px 8px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}
.speech-rate-select,
.blind-mode-select {
  border: none;
  outline: none;
  border-radius: 999px;
  background: rgba(108,92,231,0.25);
  color: var(--text);
  font-family: inherit;
  font-size: 12px;
  font-weight: 800;
  padding: 4px 6px;
}
.blind-mode-select {
  background: rgba(0,184,148,0.2);
  max-width: 118px;
}
.speech-rate-select option,
.blind-mode-select option {
  background: var(--card);
  color: var(--text);
}
.blind-mode-select option:disabled {
  color: var(--muted);
}
.spend-entry-btn {
  border: 1px solid rgba(253,203,110,0.26);
  border-radius: 999px;
  background: rgba(253,203,110,0.08);
  color: var(--muted);
  padding: 7px 10px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}
.spend-entry-btn.lit {
  color: var(--gold);
  background: rgba(253,203,110,0.15);
}
.spend-entry-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.translate-switch {
  width: 40px; height: 22px; background: var(--border); border-radius: 11px;
  position: relative; cursor: pointer; transition: background 0.2s; border: none;
}
.translate-switch.on { background: var(--accent); }
.translate-switch::after {
  content: ''; position: absolute; top: 2px; left: 2px;
  width: 18px; height: 18px; background: #fff; border-radius: 50%;
  transition: transform 0.2s;
}
.translate-switch.on::after { transform: translateX(18px); }
.para-translation {
  display: none; font-size: 13px; color: var(--muted); margin-top: 6px;
  padding-left: 28px; line-height: 1.6; font-style: italic;
}
.para-translation.show { display: block; }
.para-translation-text {
  color: var(--text);
  font-style: normal;
}
.para-phonetic-guide {
  display: flex;
  flex-wrap: wrap;
  gap: 7px 6px;
  margin-top: 9px;
  padding-top: 9px;
  border-top: 1px dashed rgba(162,155,254,0.24);
}
.para-phonetic-item {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  min-width: 42px;
  padding: 4px 6px;
  border-radius: 7px;
  background: rgba(116,185,255,0.08);
  border: 1px solid transparent;
  color: inherit;
  font-family: inherit;
  font-style: normal;
  line-height: 1.25;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.12s ease, background 0.12s ease, border-color 0.12s ease;
}
.para-phonetic-item:active,
.para-phonetic-item.speaking {
  transform: scale(0.96);
  background: rgba(116,185,255,0.2);
  border-color: rgba(116,185,255,0.45);
}
.para-phonetic-item:focus-visible {
  outline: 2px solid var(--accent-light);
  outline-offset: 2px;
}
.para-phonetic-word {
  color: var(--text);
  font-size: 13px;
  font-weight: 750;
}
.para-phonetic-ipa {
  color: var(--accent-light);
  font-size: 11px;
  white-space: nowrap;
}
.article-text.translation-only .article-para {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0 10px;
  background: rgba(0,184,148,0.08);
  border: 1px solid rgba(0,184,148,0.16);
}
.article-text.translation-only .para-read-btn,
.article-text.translation-only .para-body {
  display: none;
}
.article-text.translation-only .para-num {
  grid-column: 1;
  margin-right: 0;
  margin-top: 1px;
}
.article-text.translation-only .para-translation {
  display: block;
  grid-column: 1 / -1;
  margin-top: 0;
  padding-left: 0;
  color: var(--text);
  font-size: 15px;
  font-style: normal;
  line-height: 1.8;
}
.article-text.translation-only .para-num ~ .para-translation {
  grid-column: 2;
}
.article-text.translation-only .para-translation-missing {
  color: var(--muted);
  font-style: italic;
}
.mining-article-meta {
  font-size: 12px;
  color: var(--muted);
  margin: -2px 0 10px;
  text-align: left;
}
.mining-article-text {
  max-height: 280px;
  overflow-y: auto;
  text-align: left;
  margin-bottom: 12px;
}

/* 录音按钮 */
.record-area {
  text-align: center;
  padding: 16px 20px calc(16px + env(safe-area-inset-bottom, 0px));
  position: sticky;
  bottom: 0;
  background: var(--bg);
  z-index: 50;
  border-top: 1px solid var(--border);
}
.record-control-row {
  display: grid;
  grid-template-columns: minmax(80px, 1fr) 92px minmax(100px, 1fr);
  align-items: center;
  gap: 10px;
  max-width: 460px;
  margin: 0 auto;
}
.record-button-wrap {
  position: relative;
  display: inline-block;
}
.mining-record-button-wrap {
  margin-top: 8px;
}
.mining-record-button-wrap .voice-ring {
  left: 50%;
  top: 50%;
  margin-left: -40px;
  margin-top: -40px;
}
.mining-record-button-wrap #miningBtn {
  position: relative;
  z-index: 1;
}
.last-reading-stats {
  justify-self: start;
  text-align: left;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
  min-width: 100px;
}
.last-reading-stats strong {
  color: var(--text);
  font-weight: 700;
}
.record-btn {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 3px solid var(--accent);
  background: var(--card);
  color: var(--accent-light);
  font-size: 32px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
  transition: all 0.3s;
}
.record-btn.recording {
  border-color: var(--red);
  background: rgba(255,107,107,0.15);
  color: var(--red);
}
.record-device-row {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
  font-size: 12px;
  color: var(--muted);
}
.mic-select {
  max-width: 210px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  padding: 5px 8px;
  font-size: 12px;
  font-family: inherit;
}
.mic-status {
  min-width: 96px;
  text-align: left;
}
.mic-status.ok { color: var(--green); }
.mic-status.warn { color: var(--gold); }
.voice-ring {
  position: absolute;
  width: 80px; height: 80px;
  border-radius: 50%;
  border: 3px solid var(--red);
  opacity: 0.4;
  transition: transform 0.1s ease, opacity 0.1s ease;
  pointer-events: none;
}
.placement-record-action {
  position: relative;
  display: inline-flex;
  align-items: center;
}
.placement-voice-ring {
  width: 36px;
  height: 36px;
  top: 50%;
  right: calc(100% + 8px);
  margin-top: -18px;
  border-width: 2px;
  border-color: var(--gold);
}
.placement-mic-icon {
  position: absolute;
  top: 50%;
  right: calc(100% + 17px);
  margin-top: -10px;
  font-size: 16px;
  line-height: 20px;
  pointer-events: none;
}
.placement-device-row {
  justify-content: flex-start;
  margin-top: 10px;
}
.sim-btn {
  padding: 6px 12px; border: none; border-radius: 8px;
  background: var(--accent); color: #fff; font-size: 12px;
  font-weight: 600; cursor: pointer; font-family: inherit;
}
.sim-btn.secondary { background: var(--surface); border: 1px solid var(--border); color: var(--text); }
.sim-btn.secondary.active { background: var(--gold); border-color: var(--gold); color: #111; }
}
@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}
.record-label {
  font-size: 14px;
  color: var(--muted);
}
.record-label.pending-score {
  color: var(--gold);
}
.record-timer {
  display: inline-block;
  min-width: 72px;
  padding: 4px 10px;
  border-radius: 10px;
  font-size: 28px;
  font-weight: 700;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  margin: 8px 0;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  touch-action: manipulation;
}
@media (max-width: 420px) {
  .record-area {
    padding-left: 12px;
    padding-right: 12px;
  }
  .record-control-row {
    grid-template-columns: 78px 86px 1fr;
    gap: 6px;
  }
  .record-btn,
  .voice-ring {
    width: 74px;
    height: 74px;
  }
  .record-timer {
    min-width: 66px;
    padding-left: 4px;
    padding-right: 4px;
    font-size: 24px;
  }
  .last-reading-stats {
    font-size: 11px;
  }
}
.record-stats {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
  margin-top: 20px;
}
.record-stat {
  background: var(--card);
  border-radius: 12px;
  padding: 14px;
  text-align: center;
}
.record-stat-value { font-size: 18px; font-weight: 700; }
.record-stat-label { font-size: 11px; color: var(--muted); margin-top: 2px; }
.record-stat-sub { font-size: 10px; color: var(--muted); margin-top: 3px; }

/* 录音结果反馈 */
.record-result {
  background: var(--card);
  border: 2px solid var(--accent);
  border-radius: 16px;
  padding: 16px 18px 16px 72px;
  display: none;
  text-align: left;
  position: fixed;
  left: 16px;
  top: 50%;
  width: min(380px, calc(100vw - 32px));
  min-height: 86px;
  z-index: 1200;
  box-shadow: 0 18px 44px rgba(0,0,0,0.38);
  transform: translate(-120%, -50%);
  opacity: 0;
  transition: transform 0.28s ease, opacity 0.28s ease;
  pointer-events: none;
}
.record-result.visible {
  display: block !important;
  transform: translate(0, -50%);
  opacity: 1;
  pointer-events: auto;
}
.result-close {
  position: absolute;
  top: 8px;
  right: 10px;
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  padding: 4px;
}
.result-emoji {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 36px;
}
.result-msg { font-size: 16px; font-weight: 600; margin-bottom: 4px; }
.result-detail { font-size: 13px; color: var(--muted); line-height: 1.55; white-space: pre-line; }
.result-milestone {
  background: rgba(108,92,231,0.15);
  border: 1px solid rgba(108,92,231,0.3);
  border-radius: 12px;
  padding: 12px;
  margin-top: 12px;
  font-size: 15px;
  font-weight: 600;
  color: var(--accent-light);
}
@media (max-width: 520px) {
  .record-result {
    left: 12px;
    right: 12px;
    top: auto;
    bottom: 88px;
    width: auto;
    min-height: 0;
    padding: 12px 42px 12px 58px;
    border-radius: 14px;
    transform: translateY(130%);
  }
  .record-result.visible {
    transform: translateY(0);
  }
  .record-result .result-emoji {
    left: 14px;
    font-size: 30px;
  }
  .record-result .result-msg {
    font-size: 15px;
  }
  .record-result .result-detail {
    font-size: 12px;
    line-height: 1.45;
  }
  .record-result .result-milestone {
    margin-top: 8px;
    padding: 8px;
    font-size: 12px;
  }
}

/* ── 就地提示 ── */
.help-hint {
  display: inline-flex; align-items: center; justify-content: center;
  width: 18px; height: 18px; border-radius: 50%;
  background: rgba(108,92,231,0.2); color: var(--accent-light);
  font-size: 11px; font-weight: 700; cursor: pointer;
  margin-left: 4px; vertical-align: middle; flex-shrink: 0;
  -webkit-tap-highlight-color: transparent; transition: background 0.2s;
}
.help-hint:active { background: rgba(108,92,231,0.4); }
.help-bubble {
  position: fixed; z-index: 300; max-width: 280px;
  padding: 12px 16px; background: var(--card);
  border: 1px solid var(--accent); border-radius: 12px;
  font-size: 13px; line-height: 1.6; color: var(--text);
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
  animation: bubbleIn 0.2s ease; white-space: pre-line;
  pointer-events: none;
}
@keyframes bubbleIn { from { opacity:0; transform:scale(0.9); } to { opacity:1; transform:scale(1); } }
.help-bubble-overlay { position: fixed; inset: 0; z-index: 299; }

/* ── 攻略弹窗 ── */
.guide-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.7); z-index: 500; animation: fadeIn 0.2s ease; }
@keyframes fadeIn { from { opacity:0; } to { opacity:1; } }
.guide-modal {
  position: fixed; inset: 0; z-index: 501; background: var(--bg);
  overflow-y: auto; -webkit-overflow-scrolling: touch; animation: slideUp 0.3s ease;
}
@keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
.guide-header {
  position: sticky; top: 0; background: var(--bg); padding: 16px 20px;
  display: flex; justify-content: space-between; align-items: center;
  border-bottom: 1px solid var(--border); z-index: 1;
  cursor: pointer; user-select: none; -webkit-tap-highlight-color: transparent;
}
.guide-title { font-size: 18px; font-weight: 700; }
.guide-close {
  width: 32px; height: 32px; border-radius: 50%; background: var(--card);
  border: 1px solid var(--border); color: var(--muted); font-size: 18px;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.guide-body { padding: 20px; padding-bottom: 40px; }
.guide-debug-note {
  margin-bottom: 12px; padding: 8px 12px; border-radius: 10px;
  background: rgba(0,184,148,0.12); border: 1px solid rgba(0,184,148,0.28);
  color: var(--green); font-size: 12px; font-weight: 700;
}
.guide-section { margin-bottom: 24px; }
.guide-section-title {
  font-size: 13px; font-weight: 600; color: var(--accent-light);
  margin-bottom: 12px; letter-spacing: 1px;
}
.guide-item {
  background: var(--card); border-radius: 12px; padding: 14px 16px;
  margin-bottom: 8px; display: flex; align-items: flex-start; gap: 12px;
}
.guide-item-icon { font-size: 24px; flex-shrink: 0; width: 32px; text-align: center; }
.guide-item-content { flex: 1; }
.guide-item-title { font-size: 14px; font-weight: 600; margin-bottom: 4px; }
.guide-item-desc { font-size: 12px; color: var(--muted); line-height: 1.5; }
.guide-item.locked { opacity: 0.5; }
.guide-item.locked .guide-item-title,
.guide-item.locked .guide-item-desc { filter: blur(3px); user-select: none; }
.guide-lock-badge {
  font-size: 11px; color: var(--gold); padding: 2px 8px;
  background: rgba(253,203,110,0.15); border-radius: 6px; white-space: nowrap;
  flex-shrink: 0; align-self: center;
}
.guide-new-tag {
  display: inline-flex; align-items: center; justify-content: center;
  margin-left: 6px; padding: 1px 6px; border-radius: 999px;
  background: rgba(0,206,201,0.18); color: var(--green);
  font-size: 10px; font-weight: 800; vertical-align: middle;
}
.guide-item.new-guide {
  border-color: rgba(0,206,201,0.35);
  box-shadow: 0 0 0 1px rgba(0,206,201,0.12) inset;
}
.guide-item.hidden-rule .guide-item-title { filter: blur(4px); user-select: none; }
.guide-item.hidden-rule .guide-item-desc { color: var(--border); }
.guide-btn {
  position: relative; display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; padding: 14px; border: none; border-radius: 12px;
  font-size: 15px; font-weight: 600; cursor: pointer; font-family: inherit;
  background: linear-gradient(135deg, var(--accent), #a29bfe); color: #fff;
}
.guide-btn.has-new-guide {
  animation: guidePulse 1.8s ease-in-out infinite;
}
.guide-btn-new {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  min-width: 26px; height: 20px; padding: 0 7px; border-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--gold); color: #2d2a4a; font-size: 11px; font-weight: 900;
  box-shadow: 0 4px 14px rgba(253,203,110,0.35);
}
.guide-btn-new[hidden] { display: none; }
@keyframes guidePulse {
  0%, 100% { box-shadow: 0 0 0 rgba(116,185,255,0); transform: translateY(0); }
  50% { box-shadow: 0 0 22px rgba(116,185,255,0.45); transform: translateY(-1px); }
}

/* ── 设置弹窗 ── */
.settings-item {
  background: var(--card); border-radius: 12px; padding: 16px;
  margin-bottom: 8px; display: flex; align-items: center; gap: 12px;
  cursor: pointer; border: 2px solid transparent; transition: border-color 0.2s;
}
.settings-item.selected { border-color: var(--accent); }
.settings-item-icon { font-size: 28px; width: 40px; text-align: center; }
.settings-item-name { font-size: 15px; font-weight: 600; flex: 1; }
.settings-check { font-size: 18px; color: var(--accent); }
.tier-preview { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.tier-tag {
  font-size: 12px; padding: 4px 10px; border-radius: 8px;
  background: var(--surface); color: var(--muted);
}
.tier-tag.current { background: var(--accent); color: #fff; font-weight: 600; }

/* ── 倍率变动 Toast ── */
.mult-toast {
  position: fixed; top: 20px; left: 50%; transform: translateX(-50%);
  z-index: 600; padding: 14px 24px; border-radius: 14px;
  font-size: 15px; font-weight: 600; text-align: center;
  box-shadow: 0 8px 24px rgba(0,0,0,0.5);
  animation: toastSlide 0.3s ease;
}
.mult-toast.up { background: linear-gradient(135deg, #00b894, #00cec9); color: #fff; }
.mult-toast.down { background: linear-gradient(135deg, #ff6b6b, #e17055); color: #fff; }
@keyframes toastSlide { from { opacity:0; transform:translateX(-50%) translateY(-20px); } to { opacity:1; transform:translateX(-50%) translateY(0); } }

/* ── 150分通关提示 ── */
.complete-prompt {
  position: fixed; inset: 0; z-index: 1400; display: none;
  align-items: center; justify-content: center; padding: 20px;
  background: rgba(0,0,0,0.68);
}
.complete-prompt.visible { display: flex; }
.complete-card {
  position: relative;
  width: min(420px, 100%);
  background: var(--card); border: 2px solid var(--gold);
  border-radius: 18px; padding: 22px;
  box-shadow: 0 22px 60px rgba(0,0,0,0.45);
  animation: bubbleIn 0.22s ease;
}
#shopModal {
  bottom: calc(64px + env(safe-area-inset-bottom, 0px));
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
#shopModal .shop-card {
  max-height: calc(100vh - 104px - env(safe-area-inset-bottom, 0px));
  overflow-y: auto;
}
.complete-close-btn {
  position: absolute;
  top: 10px;
  right: 12px;
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  padding: 4px;
}
.complete-close-btn:focus-visible {
  outline: 2px solid var(--accent-light);
  outline-offset: 2px;
}
.complete-card h2 { font-size: 20px; margin-bottom: 8px; color: var(--gold); }
.complete-card p { color: var(--muted); font-size: 13px; line-height: 1.65; margin-bottom: 14px; }
.complete-actions { display: grid; gap: 10px; }
.complete-actions button {
  border: none; border-radius: 12px; padding: 12px 14px;
  font-family: inherit; font-size: 14px; font-weight: 700; cursor: pointer;
}
.complete-actions button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.memorization-video-card {
  width: min(480px, 100%);
}
.memorization-record-panel {
  display: grid;
  gap: 10px;
  margin: 12px 0 10px;
}
.memorization-video-preview {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  border: 1px solid rgba(253,203,110,0.32);
  background: rgba(0,0,0,0.28);
  object-fit: cover;
}
.memorization-record-status {
  min-height: 20px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}
.memorization-record-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.memorization-record-actions button {
  min-height: 42px;
  border: none;
  border-radius: 12px;
  padding: 10px 8px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}
.memorization-record-actions button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.memorization-video-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 12px 0 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}
.memorization-video-divider::before,
.memorization-video-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: rgba(255,255,255,0.1);
}
.memorization-video-picker {
  display: grid;
  gap: 10px;
  margin: 12px 0 8px;
}
.memorization-video-name {
  min-height: 42px;
  border: 1px dashed rgba(253,203,110,0.42);
  border-radius: 12px;
  padding: 11px 12px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
  background: rgba(255,255,255,0.04);
  overflow-wrap: anywhere;
}
.memorization-video-select {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  padding: 12px 14px;
  background: rgba(116,185,255,0.16);
  color: #74b9ff;
  border: 1px solid rgba(116,185,255,0.38);
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
}
.memorization-video-status {
  min-height: 20px;
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}
.class-welfare-dialog-card {
  border-color: rgba(253,203,110,0.42);
  background:
    radial-gradient(circle at 50% 0%, rgba(253,203,110,0.16), transparent 34%),
    linear-gradient(180deg, rgba(34,34,64,0.98), rgba(26,26,46,0.98));
}
.class-welfare-dialog-icon {
  width: 58px;
  height: 58px;
  margin: 0 auto 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 18px;
  background: rgba(253,203,110,0.14);
  border: 1px solid rgba(253,203,110,0.28);
  font-size: 30px;
  box-shadow: 0 12px 30px rgba(253,203,110,0.12);
}
.class-welfare-dialog-card h2 {
  text-align: center;
  font-size: 19px;
  margin-bottom: 8px;
}
.class-welfare-dialog-card p {
  text-align: center;
  color: #c9c9dc;
  font-size: 14px;
  line-height: 1.75;
  white-space: pre-line;
}
.class-welfare-dialog-card .complete-actions {
  margin-top: 16px;
}
.class-welfare-dialog-card .complete-primary {
  background: linear-gradient(135deg, var(--gold), #ffeaa7);
  color: #16111f;
}
.completion-decision-card {
  border: 1px solid rgba(253,203,110,0.34);
  background: linear-gradient(135deg, rgba(253,203,110,0.12), rgba(108,92,231,0.12));
  border-radius: 16px;
  padding: 16px;
  margin: 16px 0 18px;
}
.completion-decision-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}
.completion-decision-title {
  font-size: 16px;
  font-weight: 800;
  color: var(--gold);
}
.completion-decision-badge {
  flex-shrink: 0;
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(253,203,110,0.15);
  color: var(--gold);
  font-size: 11px;
  font-weight: 800;
}
.completion-decision-text {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
  margin-bottom: 12px;
}
.completion-decision-actions {
  display: grid;
  gap: 8px;
}
.completion-decision-actions button {
  border: none;
  border-radius: 12px;
  padding: 12px 13px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
}
.completion-decision-actions .primary { background: var(--gold); color: #111; }
.completion-decision-actions .secondary { background: var(--accent); color: #fff; }
.completion-decision-actions .ghost {
  background: rgba(255,255,255,0.06);
  color: var(--muted);
  border: 1px solid rgba(255,255,255,0.08);
}
.completion-decision-actions.two-col {
  grid-template-columns: 1fr 1fr;
}
.spend-card {
  border-color: rgba(253,203,110,0.42);
}
.spend-rule-note {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
  margin-bottom: 12px;
}
.spend-balance {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--gold);
  background: rgba(253,203,110,0.11);
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 12px;
  font-weight: 800;
}
.spend-actions {
  display: grid;
  gap: 10px;
}
.spend-option {
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  background: rgba(255,255,255,0.04);
  padding: 12px;
}
.spend-option-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 4px;
}
.spend-option-title {
  font-size: 14px;
  font-weight: 800;
}
.spend-option-cost {
  color: var(--gold);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}
.spend-option-desc {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
  margin-bottom: 10px;
}
.spend-option button {
  width: 100%;
  border: none;
  border-radius: 10px;
  padding: 10px 12px;
  background: var(--accent);
  color: #fff;
  font-family: inherit;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}
.spend-option button.gold {
  background: var(--gold);
  color: #111;
}
.spend-option button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.spend-select {
  width: 100%;
  margin-bottom: 8px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  font-family: inherit;
  font-size: 13px;
  padding: 10px;
}
.spend-error {
  color: var(--red);
  font-size: 12px;
  min-height: 18px;
  margin-top: 8px;
  line-height: 1.45;
}
.shop-card { border-color: rgba(108,92,231,0.72); }
.shop-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 12px 0;
}
.shop-tabs button {
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  background: rgba(255,255,255,0.05);
  color: var(--muted);
  font-family: inherit;
  font-size: 13px;
  font-weight: 800;
  padding: 10px 12px;
  cursor: pointer;
}
.shop-tabs button.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.shop-list {
  display: grid;
  gap: 10px;
}
.shop-item {
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  background: rgba(255,255,255,0.04);
  padding: 12px;
}
.shop-item.disabled { opacity: 0.58; }
.shop-item-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
}
.shop-item-title {
  font-size: 15px;
  font-weight: 900;
}
.shop-item-cost {
  color: var(--gold);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}
.shop-item-desc,
.shop-item-owned {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}
.shop-item-owned { margin: 6px 0 10px; }
.shop-item button {
  width: 100%;
  border: none;
  border-radius: 10px;
  padding: 10px 12px;
  background: var(--accent);
  color: #fff;
  font-family: inherit;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
}
.shop-item button.gold {
  background: var(--gold);
  color: #111;
}
.shop-confirm-note {
  margin: 8px 0 10px;
  color: var(--gold);
  font-size: 12px;
  line-height: 1.45;
  font-weight: 800;
}
.shop-confirm-actions {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(72px, 0.75fr);
  gap: 8px;
}
.shop-confirm-actions button:not(.gold) {
  background: rgba(255,255,255,0.06);
  color: var(--muted);
  border: 1px solid rgba(255,255,255,0.1);
}
.shop-item button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.bag-empty {
  padding: 18px 12px;
  border-radius: 14px;
  background: rgba(0,0,0,0.14);
  color: var(--muted);
  text-align: center;
  font-size: 13px;
}
.streak-calendar-card {
  border-color: var(--accent);
  padding-top: 62px;
  max-height: calc(100dvh - 40px - env(safe-area-inset-bottom, 0px));
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.streak-calendar-close-btn {
  top: 14px;
  right: 14px;
  width: 44px;
  height: 44px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(116,185,255,0.3);
  border-radius: 999px;
  background: rgba(15,23,42,0.72);
  color: var(--text);
  font-size: 28px;
  box-shadow: 0 8px 22px rgba(0,0,0,0.26);
  touch-action: manipulation;
}
.streak-calendar-close-btn:active {
  transform: translateY(1px);
  background: rgba(116,185,255,0.18);
}
.streak-calendar-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.streak-calendar-stats {
  display: flex;
  gap: 12px;
  text-align: right;
  flex-shrink: 0;
  margin-left: auto;
}
.streak-calendar-stat {
  min-width: 58px;
}
.streak-calendar-count {
  font-size: 28px;
  font-weight: 900;
  color: var(--accent-light);
  line-height: 1;
}
.streak-calendar-sub {
  color: var(--muted);
  font-size: 12px;
  margin-top: 4px;
}
.streak-calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 7px;
  margin: 10px 0 14px;
}
.streak-day {
  min-height: 46px;
  border-radius: 12px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  font-size: 11px;
  color: var(--muted);
}
.streak-day b { font-size: 15px; color: var(--text); line-height: 1.1; }
.streak-day.read {
  background: rgba(0,184,148,0.16);
  border-color: rgba(0,184,148,0.45);
}
.streak-day.makeup {
  background: rgba(253,203,110,0.16);
  border-color: rgba(253,203,110,0.55);
}
.streak-day.missed { background: rgba(255,107,107,0.08); }
.streak-day.repairable {
  border-color: rgba(255,107,107,0.8);
  box-shadow: 0 0 0 1px rgba(255,107,107,0.3);
}
.streak-day.today { border-color: rgba(108,92,231,0.65); }
.streak-day.before { opacity: 0.35; }
.streak-calendar-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 11px;
  margin-bottom: 12px;
}
.streak-calendar-legend span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.streak-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}
.streak-dot.read { background: var(--green); }
.streak-dot.makeup { background: var(--gold); }
.streak-dot.missed { background: #ff6b6b; }
.monthly-gift-panel {
  padding: 12px;
  border-radius: 14px;
  background: rgba(253,203,110,0.10);
  border: 1px solid rgba(253,203,110,0.28);
  color: var(--text);
  margin-bottom: 12px;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}
.monthly-gift-panel.ready {
  background: rgba(253,203,110,0.18);
  border-color: rgba(253,203,110,0.62);
}
.monthly-gift-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
}
.monthly-gift-title {
  font-size: 15px;
  font-weight: 900;
}
.monthly-gift-badge {
  color: var(--gold);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}
.monthly-gift-progress {
  height: 8px;
  border-radius: 99px;
  background: rgba(0,0,0,0.24);
  overflow: hidden;
  margin: 10px 0;
}
.monthly-gift-progress span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--gold), var(--green));
}
.monthly-gift-secret {
  margin-top: 8px;
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(0,0,0,0.18);
  color: var(--gold);
  font-size: 12px;
  font-weight: 800;
}
.monthly-gift-panel button {
  width: 100%;
  border: none;
  border-radius: 12px;
  margin-top: 10px;
  padding: 11px 12px;
  background: var(--gold);
  color: #111;
  font-family: inherit;
  font-weight: 900;
  cursor: pointer;
}
.monthly-gift-panel button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.streak-makeup-panel {
  padding: 12px;
  border-radius: 14px;
  background: rgba(0,0,0,0.16);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}
.streak-makeup-panel button {
  width: 100%;
  border: none;
  border-radius: 12px;
  margin-top: 10px;
  padding: 11px 12px;
  background: var(--accent);
  color: #fff;
  font-family: inherit;
  font-weight: 800;
  cursor: pointer;
}
.streak-makeup-panel button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.lottery-zone,
.treasure-zone {
  display: grid;
  justify-items: center;
  gap: 12px;
  margin: 14px 0;
}
.lottery-wheel-wrap {
  position: relative;
  width: 210px;
  height: 210px;
}
.lottery-pointer {
  position: absolute;
  left: 50%;
  top: -10px;
  transform: translateX(-50%);
  color: var(--gold);
  font-size: 26px;
  z-index: 2;
  text-shadow: 0 2px 8px rgba(0,0,0,0.45);
}
.lottery-wheel {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 5px solid rgba(253,203,110,0.95);
  background: conic-gradient(
    #fff3b0 0deg 18deg,
    #e040fb 18deg 90deg,
    #00b894 90deg 216deg,
    #26264f 216deg 360deg
  );
  box-shadow:
    0 16px 38px rgba(0,0,0,0.42),
    0 0 24px rgba(253,203,110,0.18),
    inset 0 0 0 9px rgba(0,0,0,0.16);
  overflow: hidden;
  transition: transform 3s cubic-bezier(.12,.72,.08,1);
}
.lottery-wheel::before {
  content: '';
  position: absolute;
  inset: 12px;
  border-radius: 50%;
  border: 1px dashed rgba(255,255,255,0.32);
  background:
    radial-gradient(circle at 50% 50%, rgba(255,255,255,0.18), transparent 31%),
    repeating-conic-gradient(from 0deg, rgba(255,255,255,0.1) 0deg 2deg, transparent 2deg 18deg);
  mix-blend-mode: screen;
}
.lottery-wheel::after {
  content: '?';
  position: absolute;
  inset: 50% auto auto 50%;
  width: 62px;
  height: 62px;
  border-radius: 50%;
  background: var(--card);
  border: 2px solid rgba(253,203,110,0.85);
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold);
  font-size: 30px;
  font-weight: 900;
  box-shadow: 0 8px 20px rgba(0,0,0,0.35);
}
.lottery-mark {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 1;
  font-size: 18px;
  font-weight: 900;
  color: rgba(255,255,255,0.92);
  text-shadow: 0 2px 8px rgba(0,0,0,0.42);
  transform: rotate(var(--angle)) translateY(-78px) rotate(calc(-1 * var(--angle))) translate(-50%, -50%);
}
.lottery-mark.jackpot { color: #2d2100; font-size: 20px; }
.lottery-odds {
  display: grid;
  grid-template-columns: repeat(4, auto);
  gap: 6px;
  justify-content: center;
  color: var(--muted);
  font-size: 10px;
}
.lottery-odds span {
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 999px;
  padding: 3px 7px;
  background: rgba(255,255,255,0.04);
}
.lottery-wheel.spinning { filter: brightness(1.15); }
.streak-lottery-card {
  border-color: rgba(253,203,110,0.9);
  background:
    radial-gradient(circle at 50% 0%, rgba(253,203,110,0.14), transparent 48%),
    var(--card);
}
.streak-lottery-card .lottery-wheel-wrap {
  width: 220px;
  height: 220px;
}
.streak-lottery-card .lottery-wheel {
  transform: rotate(0deg);
}
.streak-lottery-card .lottery-wheel.settled::after {
  content: '✓';
}
.streak-lottery-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(253,203,110,0.14);
  color: var(--gold);
  font-size: 12px;
  font-weight: 900;
  margin-bottom: 8px;
}
.lottery-result {
  min-height: 22px;
  font-size: 15px;
  font-weight: 800;
  color: var(--gold);
  text-align: center;
}
.lottery-result.pending {
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(253,203,110,0.12);
  border: 1px solid rgba(253,203,110,0.35);
  line-height: 1.6;
}
.lottery-draw-btn {
  width: 100%;
  border: none;
  border-radius: 12px;
  padding: 12px 14px;
  background: linear-gradient(135deg, var(--gold), #ffeaa7);
  color: #111;
  font-family: inherit;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
}
.treasure-chest-wrap {
  position: relative;
  width: 190px;
  height: 150px;
  display: grid;
  place-items: center;
}
.treasure-glow {
  position: absolute;
  inset: 18px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(253,203,110,0.28), transparent 68%);
  filter: blur(3px);
  opacity: 0.82;
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.treasure-chest {
  position: relative;
  width: 128px;
  height: 104px;
  transform-origin: 50% 80%;
  cursor: pointer;
  transition: filter 0.2s ease;
}
.treasure-chest::before {
  content: '';
  position: absolute;
  left: 14px;
  top: 18px;
  width: 100px;
  height: 92px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 34%, rgba(255,255,255,0.86), rgba(253,203,110,0.45) 28%, transparent 68%);
  filter: blur(2px);
  opacity: 0;
  transform: translateY(8px) scale(0.72);
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.35s ease;
  z-index: 1;
}
.treasure-chest.ready {
  filter: drop-shadow(0 0 14px rgba(253,203,110,0.42));
}
.treasure-chest.ready .treasure-lid {
  animation: treasureLidReady 1.65s ease-in-out infinite;
}
.treasure-chest.ready .treasure-body {
  animation: treasureBodyGlow 1.65s ease-in-out infinite;
}
.treasure-chest.ready .treasure-spark {
  animation: treasureIdleSpark 1.8s ease-in-out infinite;
}
.treasure-lid {
  position: absolute;
  left: 8px;
  top: 0;
  width: 112px;
  height: 44px;
  border-radius: 18px 18px 8px 8px;
  background: linear-gradient(135deg, #ffd166, #f39c12);
  border: 3px solid rgba(45,33,0,0.72);
  box-shadow: inset 0 8px 0 rgba(255,255,255,0.22);
  transform-origin: 50% 100%;
  transition: transform 0.45s ease;
  z-index: 4;
}
.treasure-body {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 128px;
  height: 72px;
  border-radius: 12px 12px 20px 20px;
  background: linear-gradient(135deg, #7c3f19, #4c2410);
  border: 3px solid rgba(45,33,0,0.78);
  box-shadow: inset 0 10px 0 rgba(255,255,255,0.08), 0 16px 34px rgba(0,0,0,0.36);
  z-index: 3;
}
.treasure-band {
  position: absolute;
  left: 53px;
  bottom: 0;
  width: 22px;
  height: 73px;
  background: linear-gradient(#ffeaa7, #f6b93b);
  border-left: 2px solid rgba(45,33,0,0.42);
  border-right: 2px solid rgba(45,33,0,0.42);
}
.treasure-lock {
  position: absolute;
  left: 50%;
  bottom: 26px;
  width: 30px;
  height: 24px;
  transform: translateX(-50%);
  border-radius: 8px;
  background: linear-gradient(#fff1a8, #fdcb6e);
  border: 2px solid rgba(45,33,0,0.65);
  display: grid;
  place-items: center;
  color: #4c2410;
  font-size: 14px;
  font-weight: 900;
}
.treasure-spark {
  position: absolute;
  opacity: 0;
  color: var(--gold);
  font-size: 18px;
  text-shadow: 0 0 12px rgba(253,203,110,0.8);
  z-index: 6;
}
.treasure-spark.s1 { left: 20px; top: 24px; }
.treasure-spark.s2 { right: 18px; top: 36px; animation-delay: 0.35s; }
.treasure-spark.s3 { left: 80px; top: 4px; animation-delay: 0.72s; }
.treasure-chest-wrap.opening .treasure-glow,
.treasure-chest-wrap.opened .treasure-glow {
  opacity: 1;
  transform: scale(1.28);
}
.treasure-chest.opening {
  animation: treasureBounce 1.15s ease;
}
.treasure-chest.opening::before,
.treasure-chest.opened::before {
  opacity: 1;
  transform: translateY(-16px) scale(1.08);
}
.treasure-chest.opening .treasure-lid,
.treasure-chest.opened .treasure-lid {
  transform: rotateX(64deg) translateY(-17px);
}
.treasure-chest.opening .treasure-spark {
  animation: treasureSpark 1.15s ease forwards;
}
.treasure-prize-pop {
  min-height: 30px;
  font-size: 24px;
  font-weight: 900;
  color: var(--gold);
  text-shadow: 0 0 16px rgba(253,203,110,0.7);
  opacity: 0;
  transform: translateY(18px) scale(0.72);
  pointer-events: none;
}
.treasure-prize-pop.show {
  animation: prizePop 1.35s cubic-bezier(.16,.9,.22,1) forwards;
}
@keyframes treasureLidReady {
  0%, 100% { transform: rotate(0deg) translateY(0); }
  38% { transform: rotate(-2deg) translateY(-2px); }
  68% { transform: rotate(1.6deg) translateY(0); }
}
@keyframes treasureBodyGlow {
  0%, 100% { filter: brightness(1); }
  48% { filter: brightness(1.12); }
}
@keyframes treasureBounce {
  0%, 100% { transform: scale(1); }
  25% { transform: scale(0.96) translateY(3px); }
  55% { transform: scale(1.06) translateY(-4px); }
}
@keyframes treasureIdleSpark {
  0%, 100% { opacity: 0; transform: translateY(5px) scale(0.7); }
  45% { opacity: 0.95; transform: translateY(-5px) scale(1.05); }
}
@keyframes treasureSpark {
  0% { opacity: 0; transform: translateY(10px) scale(0.6); }
  32% { opacity: 1; transform: translateY(-6px) scale(1.12); }
  100% { opacity: 0; transform: translateY(-28px) scale(0.9); }
}
@keyframes prizePop {
  0% { opacity: 0; transform: translateY(18px) scale(0.72); }
  22% { opacity: 1; transform: translateY(-20px) scale(1.18); }
  55% { opacity: 1; transform: translateY(-12px) scale(1); }
  100% { opacity: 1; transform: translateY(-12px) scale(1); }
}
.complete-primary { background: var(--gold); color: #111; }
.complete-secondary { background: var(--accent); color: #fff; }
.complete-ghost { background: var(--surface); color: var(--accent-light); border: 1px solid var(--border) !important; }
.complete-close {
  width: 100%; margin-top: 8px; border: none; background: transparent;
  color: var(--muted); font-family: inherit; font-size: 13px; cursor: pointer;
}
