/* ========== 基础重置与变量 ========== */
:root {
  --primary: #1f5f9f;
  --primary-dark: #164978;
  --primary-light: #e9f2fb;
  --success: #20735a;
  --success-light: #e5f4ef;
  --error: #c2413b;
  --error-light: #fae7e5;
  --warning: #a16207;
  --warning-light: #fff6dc;
  --accent: #2f7b66;
  --accent-light: #e8f4ef;
  --text: #202633;
  --text-secondary: #687083;
  --bg: #f5f7fb;
  --card: #ffffff;
  --border: #dfe4ec;
  --shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 10px 24px rgba(33, 70, 112, 0.06);
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05);
  --radius: 10px;
  --radius-sm: 8px;
}

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

html, body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior-y: none;
}

[x-cloak] { display: none !important; }

/* ========== 布局 ========== */
.app-container {
  max-width: 460px;
  margin: 0 auto;
  min-height: 100vh;
  background:
    linear-gradient(180deg, #ffffff 0, #f4f6fa 230px, #f4f6fa 100%);
  position: relative;
  padding-bottom: 80px;
}

/* ========== 页面切换动画 ========== */
.page {
  animation: fadeIn 0.3s ease;
  padding: 12px 14px;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ========== 卡片 ========== */
.card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 12px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

.card-title {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text);
  letter-spacing: 0;
}

/* ========== 按钮 ========== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 13px 16px;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.16s, box-shadow 0.16s, background 0.16s;
  width: 100%;
  -webkit-appearance: none;
}

.btn:active { transform: scale(0.97); }

.btn-primary {
  background: var(--primary);
  color: white;
  box-shadow: none;
}

.btn-secondary {
  background: #f7f9fc;
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-success {
  background: var(--success);
  color: white;
}

.btn-ghost {
  background: transparent;
  color: var(--primary);
  font-size: 14px;
  padding: 8px;
  width: auto;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ========== 顶部导航 ========== */
.top-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: rgba(255, 255, 255, 0.96);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(12px);
}

.nav-back {
  font-size: 20px;
  padding: 8px;
  background: none;
  border: none;
  color: var(--text);
  cursor: pointer;
}

.nav-title {
  font-size: 17px;
  font-weight: 600;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

/* ========== 首页 ========== */
.home-header {
  text-align: center;
  padding: 30px 10px 22px;
}

.home-title {
  font-size: 27px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 10px;
  line-height: 1.22;
  letter-spacing: 0;
}

.home-subtitle {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.version-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 13px;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--primary-light);
  border: 1px solid #c9dbf2;
  color: var(--primary);
  font-size: 13px;
  font-weight: 800;
}

.update-notice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
}

.update-notice strong {
  display: block;
  color: var(--text);
  font-size: 14px;
  margin-bottom: 2px;
}

.update-notice span {
  display: block;
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.5;
}

.update-notice button {
  flex: 0 0 auto;
  border: 0;
  border-radius: var(--radius-sm);
  background: #eef2f7;
  color: var(--text);
  color: white;
  font-size: 13px;
  font-weight: 700;
  padding: 9px 12px;
  cursor: pointer;
}

.demo-link {
  margin-top: 10px;
  color: var(--primary);
  font-weight: 700;
}

.flow-strip {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  align-items: center;
  gap: 8px;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
  margin-bottom: 14px;
  box-shadow: var(--shadow-sm);
}

.flow-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  min-width: 0;
  text-align: center;
  color: var(--text);
}

.flow-step span {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-light);
  color: var(--primary);
  font-size: 14px;
  font-weight: 800;
}

.flow-step strong {
  font-size: 12px;
  line-height: 1.2;
}

.flow-arrow {
  display: none;
  color: var(--text-secondary);
  font-size: 24px;
  font-weight: 700;
}

/* 统计卡片 */
.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 16px;
}

.stat-item {
  background: var(--card);
  border-radius: var(--radius);
  padding: 13px 12px;
  text-align: left;
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(216, 222, 232, 0.85);
}

.stat-number {
  font-size: 24px;
  font-weight: 800;
  color: var(--primary);
}

.stat-label {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 3px;
}

.difficulty-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(86px, 1fr));
  gap: 8px;
}

.difficulty-btn {
  min-height: 54px;
  padding: 9px 8px;
  font-size: 14px;
  background: #ffffff;
  color: var(--text);
  border: 1px solid var(--border);
}

.difficulty-btn.active {
  background: var(--primary);
  color: white;
}

.difficulty-btn:disabled {
  background: #f4f6f9;
  color: #9aa4b2;
  border-color: #e3e8ef;
  opacity: 1;
}

/* ========== 步骤提示 ========== */
.step-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 20px;
}

.step-dot {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--border);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  transition: all 0.3s;
}

.step-dot.active {
  background: var(--primary);
  color: white;
}

.step-dot.done {
  background: var(--success);
  color: white;
}

.step-line {
  width: 40px;
  height: 2px;
  background: var(--border);
}

.step-line.done {
  background: var(--success);
}

/* ========== 词性标注 ========== */
.pos-instruction {
  background: #ffffff;
  border: 1px solid #c9dbf2;
  border-left: 4px solid var(--primary);
  padding: 12px 16px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin-bottom: 16px;
  font-size: 14px;
  line-height: 1.6;
}

.pos-skip {
  text-align: right;
  margin-bottom: 12px;
}

.word-pos-item {
  background: var(--card);
  border-radius: var(--radius-sm);
  padding: 14px;
  margin-bottom: 10px;
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(216, 222, 232, 0.8);
}

.word-pos-label {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 10px;
}

.pos-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pos-btn {
  padding: 10px 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: white;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  -webkit-appearance: none;
}

.pos-btn:active { transform: scale(0.95); }

.pos-btn.correct {
  background: var(--success);
  border-color: var(--success);
  color: white;
}

.pos-btn.wrong {
  background: var(--error);
  border-color: var(--error);
  color: white;
  animation: shake 0.4s;
}

.pos-btn.disabled {
  opacity: 0.4;
  cursor: default;
  pointer-events: none;
}

.word-pos-tag {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 10px;
  background: var(--primary-light);
  color: var(--primary);
  border-radius: 12px;
  font-size: 13px;
  font-weight: 600;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-6px); }
  75% { transform: translateX(6px); }
}

/* ========== 做题界面 ========== */
.flow-status {
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.5;
}

.flow-status.done {
  background: var(--success-light);
  color: #047857;
  border: 1px solid #a7f3d0;
}

.flow-status.skipped {
  background: var(--warning-light);
  color: #92400e;
  border: 1px solid #fde68a;
}

.passage-box {
  background: var(--card);
  border-radius: var(--radius);
  padding: 18px 16px;
  margin-bottom: 14px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(216, 222, 232, 0.85);
  line-height: 2.15;
  font-size: 16.5px;
}

.blank-input {
  display: inline-block;
  min-width: 90px;
  padding: 6px 10px;
  border: 1px solid #b8c2d2;
  border-radius: 6px;
  font-size: 16px;
  text-align: center;
  font-weight: 600;
  color: var(--text);
  background: white;
  margin: 0 2px;
  transition: border-color 0.2s;
  -webkit-appearance: none;
}

.blank-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}

.blank-input.active {
  border-color: var(--primary);
  background: #f0f7ff;
  box-shadow: 0 0 0 3px rgba(31, 95, 159, 0.14);
}

.blank-input.correct {
  border-color: var(--success);
  background: var(--success-light);
  color: var(--success);
}

.blank-input.wrong {
  border-color: var(--error);
  background: var(--error-light);
  color: var(--error);
}

.sticky-options {
  position: sticky;
  top: 52px;
  z-index: 80;
  margin-bottom: 12px;
}

/* 选项词提示区 */
.options-hint {
  background: #ffffff;
  border: 1px solid #e4d19b;
  border-radius: var(--radius-sm);
  padding: 12px;
  margin-bottom: 0;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
}

.options-hint-title {
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
  font-size: 14px;
}

.options-hint-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-height: 94px;
  overflow-y: auto;
}

.option-chip {
  padding: 7px 12px;
  background: #f8fafc;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  border: 1px solid #e7c464;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  font-family: inherit;
  transition: transform 0.15s, border-color 0.15s;
}

.option-chip:active {
  transform: scale(0.96);
  border-color: var(--primary);
}

.option-chip .pos-tag {
  font-size: 12px;
  color: var(--text-secondary);
  margin-left: 4px;
}

.options-tip {
  margin-top: 8px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--text-secondary);
}

/* 提示按钮 */
.hint-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 8px 14px;
  background: var(--primary-light);
  color: var(--primary);
  border: none;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  margin-bottom: 12px;
}

.hint-text {
  background: #eff6ff;
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  margin-bottom: 12px;
  font-size: 14px;
  color: var(--primary-dark);
  animation: fadeIn 0.2s;
}

/* ========== 结果分析 ========== */
.report-hero {
  text-align: center;
  border: 1px solid var(--border);
  background: #ffffff;
}

.report-kicker {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--primary-light);
  border: 1px solid #c9dbf2;
  color: var(--primary);
  font-size: 12px;
  font-weight: 800;
  margin-bottom: 14px;
}

.score-circle {
  width: 136px;
  height: 136px;
  border-radius: 50%;
  background: conic-gradient(var(--success) var(--score-deg), #e8edf4 var(--score-deg));
  margin: 0 auto 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: background 0.8s ease;
}

.score-circle::before {
  content: '';
  width: 106px;
  height: 106px;
  border-radius: 50%;
  background: white;
  position: absolute;
}

.score-text {
  position: relative;
  z-index: 1;
  font-size: 36px;
  font-weight: 800;
  color: var(--text);
}

.score-label {
  text-align: center;
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 20px;
}

.report-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.report-tags span {
  max-width: 100%;
  padding: 6px 10px;
  border-radius: 999px;
  background: white;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 700;
}

.diagnosis-summary {
  font-size: 15px;
  line-height: 1.7;
  color: var(--text);
  margin-bottom: 12px;
}

.diagnosis-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.diagnosis-meta span {
  padding: 6px 10px;
  border-radius: 999px;
  background: #f7f9fc;
  border: 1px solid var(--border);
  color: var(--primary);
  font-size: 12px;
  font-weight: 700;
}

.next-action {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.5;
}

.diagnosis-item {
  padding: 12px;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: 8px;
}

.diagnosis-item-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  color: var(--text);
  font-weight: 700;
}

.diagnosis-item-head span {
  flex: 0 0 auto;
  font-size: 12px;
}

.diagnosis-item-body {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 6px;
  line-height: 1.6;
}

/* 维度得分条 */
.dim-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.dim-name {
  width: 80px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  flex-shrink: 0;
}

.dim-track {
  flex: 1;
  height: 10px;
  background: #e8edf4;
  border-radius: 5px;
  overflow: hidden;
}

.dim-fill {
  height: 100%;
  border-radius: 5px;
  transition: width 0.6s ease;
}

.dim-fill.good { background: var(--success); }
.dim-fill.warning { background: var(--warning); }
.dim-fill.bad { background: var(--error); }

.dim-value {
  width: 36px;
  text-align: right;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-secondary);
  flex-shrink: 0;
}

/* 错题分析 */
.wrong-item {
  background: var(--card);
  border-radius: var(--radius-sm);
  padding: 16px;
  margin-bottom: 12px;
  box-shadow: var(--shadow-sm);
  border-left: 3px solid var(--error);
}

.wrong-item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.wrong-item-num {
  font-weight: 700;
  color: var(--error);
}

.wrong-item-category {
  font-size: 12px;
  padding: 2px 8px;
  background: var(--error-light);
  color: var(--error);
  border-radius: 10px;
}

.wrong-item-answer {
  font-size: 15px;
  margin-bottom: 6px;
}

.wrong-item-answer .wrong-ans {
  color: var(--error);
  text-decoration: line-through;
  margin-right: 8px;
}

.wrong-item-answer .correct-ans {
  color: var(--success);
  font-weight: 700;
}

.wrong-item-exp {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ========== 雷达图容器 ========== */
.radar-chart {
  width: 100%;
  height: 300px;
}

/* ========== 底部固定栏 ========== */
.bottom-bar {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  background: rgba(255, 255, 255, 0.96);
  padding: 10px 14px;
  box-shadow: 0 -8px 24px rgba(15, 23, 42, 0.1);
  border-top: 1px solid var(--border);
  display: flex;
  gap: 10px;
  z-index: 100;
}

.bottom-bar .btn {
  flex: 1;
  width: auto;
}

/* ========== 帮助页面 ========== */
.help-section {
  margin-bottom: 20px;
}

.help-section h3 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--primary);
}

.help-section p {
  font-size: 14px;
  line-height: 1.8;
  color: var(--text-secondary);
}

/* ========== 设置项 ========== */
.setting-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}

.card [style*="grid-template-columns:1fr 1fr 1fr 1fr"] > div {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #ffffff;
}

.shortcut-mark {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: #f0f5fb;
  color: var(--primary);
  font-size: 14px;
  font-weight: 800;
}

.card [style*="grid-template-columns:1fr 1fr 1fr 1fr"] > div:active {
  transform: scale(0.98);
}

.setting-label {
  font-size: 16px;
  font-weight: 600;
}

.setting-desc {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 2px;
}

/* 开关 */
.toggle-switch {
  width: 50px;
  height: 28px;
  background: var(--border);
  border-radius: 14px;
  position: relative;
  cursor: pointer;
  transition: background 0.2s;
  -webkit-appearance: none;
  border: none;
}

.toggle-switch.on {
  background: var(--success);
}

.toggle-switch::after {
  content: '';
  width: 24px;
  height: 24px;
  background: white;
  border-radius: 50%;
  position: absolute;
  top: 2px;
  left: 2px;
  transition: transform 0.2s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.toggle-switch.on::after {
  transform: translateX(22px);
}

.locked-panel {
  border: 1px solid #e4e9f0;
  border-radius: var(--radius-sm);
  background: #f8fafc;
  padding: 12px;
  margin-bottom: 14px;
}

.locked-panel strong,
.locked-panel span {
  display: block;
}

.locked-panel strong {
  color: var(--text);
  font-size: 15px;
  margin-bottom: 4px;
}

.locked-panel span,
.import-note {
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.6;
}

.teacher-login {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #ffffff;
  padding: 14px;
}

.teacher-login label {
  display: block;
  color: var(--text);
  font-weight: 700;
  margin-bottom: 8px;
}

.teacher-login input {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px;
  font: inherit;
  color: var(--text);
  background: #f8fafc;
  margin-bottom: 10px;
}

.teacher-login input:focus {
  outline: none;
  border-color: var(--primary);
  background: #ffffff;
}

.login-error {
  display: block;
  color: #b91c1c;
  font-size: 13px;
  line-height: 1.5;
  margin-top: 8px;
}

.import-options {
  display: grid;
  gap: 10px;
}

.import-option {
  text-align: left;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #ffffff;
  padding: 14px;
  font-family: inherit;
}

.import-option.active {
  border-color: var(--primary);
  background: #f1f7ff;
}

.import-option strong,
.import-option span {
  display: block;
}

.import-option strong {
  color: var(--text);
  font-size: 15px;
  margin-bottom: 4px;
}

.import-option span {
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.5;
}

.upload-box {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #ffffff;
  padding: 12px;
  margin-top: 12px;
}

.upload-box label {
  display: block;
  color: var(--text);
  font-weight: 700;
  margin-bottom: 8px;
}

.upload-box input {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #f8fafc;
  padding: 10px;
  margin-bottom: 10px;
  font: inherit;
}

.upload-status {
  display: block;
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.5;
  margin-top: 8px;
}

.upload-status.success {
  color: #15803d;
}

.upload-status.error {
  color: #b91c1c;
}

.server-bank-panel {
  margin-top: 14px;
  padding: 14px;
  border: 1px solid #dbeafe;
  border-radius: var(--radius-sm);
  background: #eff6ff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.server-bank-panel div {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.server-bank-panel strong {
  color: var(--text);
  font-size: 14px;
}

.server-bank-panel span {
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.5;
}

.server-bank-panel .btn {
  flex-shrink: 0;
  width: auto;
  padding: 8px 12px;
}

.draft-box {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #ffffff;
  padding: 12px;
  margin-top: 12px;
}

.draft-box label {
  display: block;
  color: var(--text);
  font-weight: 700;
  margin-bottom: 8px;
}

.draft-box textarea {
  width: 100%;
  min-height: 140px;
  resize: vertical;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px;
  font: inherit;
  line-height: 1.6;
  color: var(--text);
  background: #f8fafc;
  margin-bottom: 10px;
}

.draft-box textarea:focus {
  outline: none;
  border-color: var(--primary);
  background: #ffffff;
}

.draft-saved {
  display: block;
  color: #15803d;
  font-size: 13px;
  line-height: 1.5;
  margin-top: 8px;
}

.import-note {
  margin-top: 12px;
}

/* ========== 响应式微调 ========== */
@media (max-width: 400px) {
  .passage-box {
    font-size: 16px;
    padding: 16px;
  }
  .blank-input {
    min-width: 70px;
    font-size: 15px;
  }
  .btn {
    font-size: 16px;
    padding: 14px 20px;
  }
  .home-title {
    font-size: 24px;
  }
  .update-notice {
    align-items: stretch;
    flex-direction: column;
  }
  .update-notice button {
    width: 100%;
  }
}

/* ========== 隐藏滚动条但保留功能 ========== */
.hide-scrollbar {
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.hide-scrollbar::-webkit-scrollbar {
  display: none;
}

/* ========== v1.5.6 首页展示优化 ========== */
.page[x-show="page === 'home'"] {
  padding-top: 10px;
}

.home-header {
  padding: 26px 10px 18px;
}

.home-title {
  font-size: 29px;
  line-height: 1.18;
}

.home-subtitle {
  color: #596579;
}

.version-pill {
  background: #f6fbff;
  border-color: #d6e5f5;
  color: var(--primary-dark);
}

.update-notice {
  margin-bottom: 12px;
  background: #f8fbff;
  border-color: #d7e5f3;
  box-shadow: none;
}

.update-notice-footer {
  margin: 4px 0 12px;
  background: transparent;
  border-color: #e3e8f0;
  box-shadow: none;
}

.update-notice-footer strong {
  color: var(--text-secondary);
  font-size: 13px;
}

.update-notice-footer button {
  background: #eef3f8;
  color: var(--primary);
  border: 1px solid #d7e5f3;
}

.update-notice button {
  min-height: 36px;
  background: var(--primary);
  color: white;
}

.update-notice-footer button {
  background: #eef3f8;
  color: var(--primary);
  border: 1px solid #d7e5f3;
}

.home-workbench {
  display: grid;
  gap: 12px;
}

.home-main-card {
  background: #ffffff;
  border: 1px solid #dbe4ef;
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
}

.section-label {
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 700;
}

.difficulty-panel {
  background: #f8fafc;
  border: 1px solid #e4e9f0;
  border-radius: var(--radius-sm);
  padding: 12px;
  margin-bottom: 14px;
}

.difficulty-panel .section-label {
  margin-bottom: 10px;
}

.difficulty-btn {
  align-items: center;
  flex-direction: column;
  gap: 3px;
  line-height: 1.15;
}

.difficulty-btn small {
  font-size: 12px;
  font-weight: 600;
  opacity: 0.78;
}

.start-btn {
  margin-bottom: 10px;
}

.home-main-card .btn-secondary {
  margin-bottom: 4px;
}

.demo-link {
  margin-top: 2px;
}

.flow-note {
  margin-top: 10px;
  text-align: center;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.5;
}

.preview-banner {
  border: 1px solid #f5c96b;
  border-radius: var(--radius-sm);
  background: #fff8e5;
  padding: 10px;
  margin-top: 10px;
  text-align: left;
}

.preview-banner strong,
.preview-banner span {
  display: block;
}

.preview-banner strong {
  color: #8a5a00;
  font-size: 14px;
  margin-bottom: 3px;
}

.preview-banner span {
  color: #72510f;
  font-size: 12px;
  line-height: 1.5;
}

.server-banner {
  border-color: #bfdbfe;
  background: #eff6ff;
}

.server-banner strong {
  color: #1d4ed8;
}

.server-banner span {
  color: #1e40af;
}

.flow-strip {
  grid-template-columns: 1fr auto 1fr auto 1fr;
  margin-bottom: 0;
  box-shadow: none;
  background: #ffffff;
}

.flow-arrow {
  display: block;
}

.stats-grid {
  margin-bottom: 2px;
}

.stat-item {
  box-shadow: none;
  background: #ffffff;
}

.stat-number {
  font-size: 22px;
}

.shortcut-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-top: 14px;
}

.shortcut-item {
  min-width: 0;
  min-height: 52px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #ffffff;
  color: var(--text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 15px;
  font-weight: 700;
  -webkit-appearance: none;
}

.shortcut-item:active {
  transform: scale(0.98);
}

.shortcut-item em {
  min-width: 18px;
  min-height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--error);
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
}

.utility-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 12px;
}

.utility-links button {
  border: 0;
  background: transparent;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
  padding: 6px 4px;
  cursor: pointer;
}

.utility-links span {
  width: 1px;
  height: 12px;
  background: #cfd6e1;
}

@media (max-width: 400px) {
  .home-title {
    font-size: 26px;
  }

  .home-main-card {
    padding: 16px;
  }

  .shortcut-grid {
    gap: 8px;
  }

  .shortcut-item {
    font-size: 14px;
  }
}
