/* 学生端专属样式（叠加在 common.css 之上） */
[v-cloak] { display: none; }
.enter-card { max-width: 720px; margin: 22px auto; }
.enter-form { display: flex; flex-direction: column; gap: 18px; width: 100%; max-width: 460px; margin: 22px auto 0; text-align: left; }
.enter-form .btn-lg { width: 100%; min-height: 56px; }

/* 顶栏：当前学生 + 切换姓名 */
.who { display: inline-flex; align-items: center; gap: 8px; padding: 4px 6px 4px 14px; border-radius: var(--r-pill);
  background: var(--surface-alt); border: 1px solid var(--line); }
.who-name { font-weight: 800; font-size: 14.5px; color: var(--brand-dark); }
.who .btn-ghost { color: var(--muted); padding: 6px 12px; min-height: 34px; }
.who .btn-ghost:hover { color: var(--brand-dark); }

.chips { display: flex; gap: 10px; flex-wrap: wrap; }
.chip { min-height: 44px; padding: 9px 18px; border-radius: var(--r-pill); border: 1.5px solid var(--line);
  background: var(--surface); color: var(--ink-soft); font-weight: 800; transition: all var(--dur-fast); }
.chip:hover { border-color: var(--brand); }
.chip.active { background: var(--brand-soft); color: var(--brand-dark); border-color: var(--brand); }

.ai-bar { display: flex; gap: 12px; align-items: stretch; flex-wrap: wrap; }
.ai-bar .input { flex: 1; min-width: 260px; }
.ai-bar .btn { min-height: 48px; }

.material-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.material-card { display: flex; flex-direction: column; gap: 8px; padding: 18px; border-radius: var(--r-md);
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-soft); }
.material-card .mat-en { margin: 8px 0 0; font-size: 17px; font-weight: 800; line-height: 1.5; color: var(--ink); }
.material-card .mat-zh { margin: 0; font-size: 14px; color: var(--muted); flex: 1; }
.material-card .btn { align-self: flex-start; margin-top: 8px; }

/* 英文原文用拉丁字体优先：避免中文字体把 ’ “ 渲染成全角，引号前后出现空隙 */
.passage { margin: 14px 0 0; font-size: 16px; line-height: 1.9; color: var(--ink-soft);
  font-family: "Segoe UI", "Quicksand", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif; }
.level-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.level-list .card-soft { display: flex; flex-direction: column; gap: 6px; }

.check-row { display: flex; align-items: flex-start; gap: 12px; padding: 12px 16px; margin-bottom: 8px;
  border-radius: var(--r-sm); background: var(--surface-alt); border: 1px solid var(--line); cursor: pointer; }
.check-row input { width: 20px; height: 20px; margin-top: 3px; accent-color: var(--brand); flex: none; }
.check-row span { font-size: 15px; }

.upload-zone { min-height: 180px; display: grid; place-items: center; padding: 24px; border: 2px dashed var(--line);
  border-radius: var(--r-md); background: var(--surface-alt); cursor: pointer; transition: border-color var(--dur-fast), background var(--dur-fast); }
.upload-zone:hover, .upload-zone.filled { border-color: var(--brand); background: #F5FAFF; }
.upload-ico { display: grid; place-items: center; width: 62px; height: 62px; margin: 0 auto 8px;
  border-radius: 20px; background: var(--brand-soft); color: var(--brand-dark); font-size: 32px; font-weight: 800; }
.preview { width: 130px; height: 130px; object-fit: cover; border-radius: var(--r-sm); border: 1px solid var(--line); background: #fff; }

.grading { display: flex; flex-direction: column; align-items: center; gap: 16px; margin-top: 22px; padding: 28px;
  border-radius: var(--r-md); background: var(--brand-soft); color: var(--brand-dark); font-weight: 700; text-align: center; }
.spin-ring { width: 46px; height: 46px; border-radius: 50%; border: 5px solid rgba(46, 144, 250, .25); border-top-color: var(--brand); animation: spin .9s linear infinite; }

.result { padding: 22px; border-radius: var(--r-md); background: var(--surface-alt); border: 1px solid var(--line); }
.score-hero { display: flex; align-items: center; gap: 24px; padding: 20px; margin-top: 14px; border-radius: var(--r-md);
  background: linear-gradient(120deg, var(--brand-soft), var(--cyan-soft)); }
.score-num { font-size: 52px; font-weight: 800; line-height: 1; color: var(--brand-dark); white-space: nowrap; }
.score-num small { font-size: 20px; color: var(--muted); }
.result h4 { margin: 0 0 10px; font-size: 16px; }
.result .card-soft p { margin: 5px 0; }
.dim-row { display: flex; align-items: center; gap: 14px; margin: 12px 0; }
.dim-name { width: 140px; font-weight: 800; font-size: 14px; flex: none; }
.dim-score { width: 86px; text-align: right; font-size: 14px; color: var(--brand-dark); flex: none; }

.record-list { display: flex; flex-direction: column; gap: 12px; }
.record { display: flex; align-items: center; gap: 16px; width: 100%; padding: 14px; text-align: left;
  border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-soft); transition: transform var(--dur-fast); }
.record:hover { transform: translateY(-2px); }
.thumb { width: 64px; height: 64px; object-fit: cover; border-radius: var(--r-sm); background: var(--surface-alt); flex: none; }
.ml-8 { margin-left: 8px; }

/* 写作素材：两个入口的子 tabs */
.sub-tabs { margin: 14px 0 18px; }
.sub-tabs .tab { min-height: 40px; padding: 8px 18px; font-size: 14.5px;
  transition: transform var(--dur-fast), background-color var(--dur-fast), border-color var(--dur-fast); }

/* AI 对话 */
.chat-wrap { display: flex; flex-direction: column; }
.chat-log { display: flex; flex-direction: column; gap: 14px; max-height: 46vh; min-height: 240px; overflow-y: auto;
  padding: 16px; border-radius: var(--r-md); background: var(--surface-alt); border: 1px solid var(--line); }
.msg { display: flex; flex-direction: column; gap: 4px; max-width: 88%; }
.msg.user { align-self: flex-end; align-items: flex-end; }
.msg.assistant { align-self: flex-start; }
.msg-role { font-size: 12px; font-weight: 800; color: var(--muted); }
.msg-bubble { padding: 12px 16px; border-radius: 18px; background: var(--surface);
  border: 1px solid var(--line); box-shadow: var(--shadow-soft); }
.msg.user .msg-bubble { background: linear-gradient(100deg, var(--brand), var(--brand-dark)); border-color: transparent; }
.msg-text { margin: 0; font-size: 15px; line-height: 1.7; }
.msg.user .msg-text { color: #fff; }
.msg-bubble.typing { color: var(--muted); font-weight: 700; animation: pulse 1.4s ease-in-out infinite; }
.msg-mats { display: flex; flex-direction: column; gap: 10px; margin-top: 10px; }
.msg-mat { padding: 12px 14px; border-radius: var(--r-sm); background: var(--surface-alt); border: 1px solid var(--line); }
.msg-mat .mat-en { margin: 8px 0 0; font-size: 15.5px; font-weight: 800; line-height: 1.5; color: var(--ink); }
.msg-mat .mat-zh { margin: 4px 0 0; font-size: 13.5px; color: var(--muted); }
.msg-mat .btn { margin-top: 8px; }
.chat-input { display: flex; flex-direction: column; gap: 10px; }
.chat-input .textarea { min-height: 78px; }
.chat-actions { display: flex; gap: 12px; justify-content: flex-end; align-items: center; flex-wrap: wrap; }
.mic-btn { display: inline-flex; align-items: center; gap: 8px; }
.mic-btn.recording { background: #FFF0EE; color: #C6442E; border-color: #FFC9BE; animation: pulse 1.2s ease-in-out infinite; }
.voice-status { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 800; color: #0C7768; }
.dot-live { width: 9px; height: 9px; border-radius: 50%; background: #E2483B; box-shadow: 0 0 0 4px rgba(226, 72, 59, .18); animation: pulse 1.2s ease-in-out infinite; flex: none; }
.err-text { color: #C6442E; font-weight: 700; }
.chat-wrap code { padding: 1px 6px; border-radius: 6px; background: var(--surface-alt); border: 1px solid var(--line);
  font-family: Consolas, "Courier New", monospace; font-size: 12px; }

@media (max-width: 900px) { .material-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 720px) {
  .material-grid, .level-list, .grid-2 { grid-template-columns: 1fr; }
  .score-hero { flex-direction: column; align-items: flex-start; gap: 10px; }
  .dim-row { flex-wrap: wrap; }
  .dim-name { width: 100%; }
  .record { gap: 10px; }
  .msg { max-width: 96%; }
  .chat-log { max-height: 52vh; }
}
