/* =========================================================
   学生端
   ========================================================= */

.student-body {
  min-height: 100dvh;
  background:
    radial-gradient(circle at 100% 0%, rgba(226, 161, 61, 0.1), transparent 24%),
    var(--paper);
}

.student-body .svg-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

/* ---------- 加入页 ---------- */

.join-page {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(430px, 0.92fr);
  min-height: 100dvh;
  background: var(--paper);
}

.join-visual {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 100dvh;
  padding: 40px 52px 34px;
  overflow: hidden;
  color: var(--paper-soft);
  background:
    radial-gradient(circle at 86% 12%, rgba(191, 227, 207, 0.12), transparent 31%),
    radial-gradient(circle at 2% 100%, rgba(226, 161, 61, 0.13), transparent 36%),
    var(--ink-900);
}

.join-visual::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.35;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 100% 38px, 38px 100%;
  mask-image: radial-gradient(circle at 45% 50%, #000, transparent 78%);
}

.join-visual-top {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand-on-dark {
  color: var(--paper-soft);
}

.brand-mark-paper {
  color: var(--ink-900);
  background: var(--paper-soft);
}

.brand-on-dark .brand-sub {
  color: rgba(244, 240, 230, 0.4);
}

.live-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 27px;
  padding: 0 11px;
  border: 1px solid rgba(191, 227, 207, 0.2);
  border-radius: 999px;
  color: var(--mint);
  background: rgba(191, 227, 207, 0.06);
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.12em;
}

.live-chip .live-dot {
  width: 5px;
  height: 5px;
}

.join-statement {
  position: relative;
  z-index: 2;
  max-width: 560px;
  margin-top: 5vh;
}

.eyebrow-light {
  color: rgba(244, 240, 230, 0.43);
}

.join-statement h1 {
  margin-top: 17px;
  color: var(--paper-soft);
  font-family: var(--font-serif);
  font-size: clamp(42px, 4.7vw, 66px);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.18;
}

.join-statement > p:last-child {
  max-width: 420px;
  margin-top: 18px;
  color: rgba(244, 240, 230, 0.52);
  font-size: 13px;
  line-height: 1.85;
}

.join-signal {
  position: relative;
  z-index: 2;
  width: min(100%, 420px);
  margin: 5vh 0 3vh;
}

.signal-card {
  position: relative;
  z-index: 2;
  padding: 17px 18px 15px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  color: var(--ink-900);
  background: var(--paper-soft);
  box-shadow: 0 28px 58px -30px rgba(0, 0, 0, 0.7);
  transform: rotate(-1.4deg);
}

.signal-card-head {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--text-soft);
  font-size: 9.5px;
}

.signal-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #4bb98a;
  box-shadow: 0 0 0 3px rgba(75, 185, 138, 0.13);
}

.signal-badge {
  margin-left: auto;
  padding: 3px 6px;
  border-radius: 5px;
  color: var(--green-deep);
  background: var(--green-soft);
  font-family: var(--font-mono);
  font-size: 7px;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.signal-line {
  height: 7px;
  margin-top: 10px;
  border-radius: 99px;
  background: rgba(24, 37, 31, 0.11);
}

.signal-line.w-80 { width: 80%; }
.signal-line.w-58 { width: 58%; margin-top: 7px; }

.signal-progress {
  height: 5px;
  margin-top: 16px;
  overflow: hidden;
  border-radius: 99px;
  background: rgba(24, 37, 31, 0.08);
}

.signal-progress i {
  display: block;
  width: 68%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--green), #68b892);
}

.signal-foot {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 8px;
  color: var(--text-faint);
  font-size: 8px;
}

.signal-ring {
  position: absolute;
  z-index: 1;
  top: 50%;
  left: 54%;
  border: 1px solid rgba(191, 227, 207, 0.12);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.ring-1 { width: 150%; padding-top: 150%; }
.ring-2 { width: 210%; padding-top: 210%; border-color: rgba(191, 227, 207, 0.07); }
.ring-3 { width: 285%; padding-top: 285%; border-color: rgba(191, 227, 207, 0.04); }

.join-visual-foot {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 11px;
  color: rgba(244, 240, 230, 0.32);
  font-size: 9.5px;
}

.join-visual-foot i {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: currentColor;
}

.join-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100dvh;
  padding: 40px 42px;
  background:
    radial-gradient(circle at 90% 8%, rgba(226, 161, 61, 0.1), transparent 28%),
    var(--paper);
}

.join-card {
  width: min(100%, 378px);
}

.join-mobile-brand {
  display: none;
  margin-bottom: 32px;
}

.join-class-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  min-height: 29px;
  margin-bottom: 28px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text-soft);
  background: rgba(255, 253, 248, 0.66);
  font-size: 10.5px;
  font-weight: 550;
}

.join-class-pill span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.join-class-pill .live-dot {
  width: 5px;
  height: 5px;
}

.join-card h2 {
  margin-top: 9px;
  font-family: var(--font-serif);
  font-size: 38px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.24;
}

.join-lede {
  margin-top: 9px;
  color: var(--text-soft);
  font-size: 12px;
  line-height: 1.8;
}

.join-card form {
  display: grid;
  gap: 16px;
  margin-top: 25px;
}

.input-lg {
  height: 50px;
  padding: 0 15px;
  border-radius: 14px;
}

.join-submit {
  margin-top: 4px;
  min-height: 52px;
  border-radius: 15px;
}

.join-submit svg {
  transition: transform 180ms var(--ease-out);
}

.join-submit:hover svg {
  transform: translateX(3px);
}

.join-fine {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 17px;
  color: var(--text-faint);
  font-size: 9.5px;
}

.join-fine svg {
  width: 13px;
  height: 13px;
}

.join-help {
  display: flex;
  justify-content: center;
  gap: 5px;
  margin-top: 22px;
  padding-top: 17px;
  border-top: 1px solid rgba(24, 37, 31, 0.09);
  color: var(--text-faint);
  font-size: 10px;
}

.join-help button {
  padding: 0;
  color: var(--green);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.join-footer {
  position: absolute;
  bottom: 26px;
  color: var(--text-faint);
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.06em;
}

.form-error {
  padding: 8px 10px;
  border-radius: 9px;
  color: #8d3620;
  background: var(--coral-soft);
  font-size: 10.5px;
}

/* ---------- 学生课堂 ---------- */

.student-shell {
  min-height: 100dvh;
}

.student-header {
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 1px solid rgba(24, 37, 31, 0.09);
  background: rgba(244, 240, 230, 0.86);
  backdrop-filter: blur(16px);
}

.student-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  width: min(100% - 36px, 840px);
  height: 67px;
  margin: 0 auto;
}

.brand-compact {
  min-width: 0;
}

.brand-compact .brand-mark {
  width: 35px;
  height: 35px;
  border-radius: 11px;
}

.student-class-copy {
  min-width: 0;
}

.student-class-copy .brand-name {
  overflow: hidden;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.student-class-copy .brand-sub {
  overflow: hidden;
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.student-me {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}

.student-me-copy {
  display: grid;
  justify-items: end;
  gap: 1px;
  min-width: 0;
}

.student-me-copy strong {
  max-width: 140px;
  overflow: hidden;
  font-size: 11.5px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.student-presence {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--text-faint);
  font-size: 8.5px;
  white-space: nowrap;
}

.student-presence .live-dot {
  width: 4px;
  height: 4px;
}

.student-presence.is-offline {
  color: var(--coral);
}

.student-presence.is-offline .live-dot {
  background: var(--coral);
  animation: none;
}

.student-me .avatar {
  width: 35px;
  height: 35px;
  border-radius: 11px;
  font-size: 12px;
}

.student-exit {
  width: 30px;
  height: 30px;
  margin-left: 1px;
  border-radius: 8px;
}

.student-exit svg {
  width: 15px;
  height: 15px;
}

.connection-banner {
  position: fixed;
  z-index: 80;
  top: 78px;
  left: 50%;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 13px;
  border: 1px solid rgba(226, 161, 61, 0.3);
  border-radius: 999px;
  color: #6d470c;
  background: rgba(247, 231, 199, 0.96);
  box-shadow: var(--shadow-md);
  font-size: 10px;
  transform: translateX(-50%);
  backdrop-filter: blur(10px);
}

.connection-spinner {
  width: 9px;
  height: 9px;
  border: 1.5px solid rgba(109, 71, 12, 0.25);
  border-top-color: #6d470c;
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.student-main {
  width: min(100% - 36px, 840px);
  margin: 0 auto;
  padding: 25px 0 50px;
}

.prompt-stack {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
}

.prompt-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 12px 11px 14px;
  border: 1px solid rgba(226, 161, 61, 0.35);
  border-radius: 14px;
  color: #66440d;
  background: var(--amber-soft);
  font-size: 10.5px;
  line-height: 1.55;
  animation: promptIn 320ms var(--ease-out);
}

@keyframes promptIn {
  from { opacity: 0; transform: translateY(-5px); }
  to { opacity: 1; transform: translateY(0); }
}

.prompt-banner > svg {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
}

.prompt-banner span {
  flex: 1;
}

.prompt-banner button {
  flex: 0 0 auto;
  padding: 5px 9px;
  border-radius: 8px;
  color: #66440d;
  background: rgba(255, 255, 255, 0.36);
  font-size: 9.5px;
  font-weight: 600;
}

.student-welcome {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 23px;
}

.student-welcome h1 {
  margin-top: 7px;
  text-wrap: balance;
  font-family: var(--font-serif);
  font-size: clamp(30px, 4vw, 40px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.student-welcome p:not(.eyebrow) {
  margin-top: 5px;
  color: var(--text-soft);
  font-size: 11.5px;
}

.student-welcome-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  border: 1px solid rgba(226, 161, 61, 0.25);
  border-radius: 50%;
  color: var(--amber);
  background: rgba(247, 231, 199, 0.4);
}

.student-welcome-mark svg {
  width: 19px;
  height: 19px;
}

.student-tabs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: rgba(255, 253, 248, 0.58);
}

.student-tab {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 42px;
  border-radius: 11px;
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 600;
  transition: color 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.student-tab:hover {
  color: var(--text);
}

.student-tab.is-active {
  color: var(--paper-soft);
  background: var(--ink-850);
  box-shadow: 0 8px 20px -14px rgba(8, 22, 17, 0.8);
}

.student-tab svg {
  width: 16px;
  height: 16px;
}

.tab-badge {
  display: inline-grid;
  place-items: center;
  min-width: 18px;
  height: 17px;
  padding: 0 5px;
  border-radius: 999px;
  color: #fff;
  background: var(--coral);
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 700;
}

.tab-badge-soft {
  color: var(--text-soft);
  background: rgba(24, 37, 31, 0.08);
}

.student-tab.is-active .tab-badge-soft {
  color: var(--ink-900);
  background: var(--mint);
}

.student-tab-panel {
  display: none;
  padding-top: 16px;
}

.student-tab-panel.is-active {
  display: block;
  animation: panelIn 240ms var(--ease-out);
}

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

/* ---------- 通知 ---------- */

.notice-hero {
  position: relative;
  padding: 24px 25px 19px;
  overflow: hidden;
  border-radius: 24px;
  color: var(--paper-soft);
  background:
    radial-gradient(circle at 100% 0%, rgba(191, 227, 207, 0.12), transparent 34%),
    var(--ink-850);
  box-shadow: 0 20px 44px -30px rgba(8, 22, 17, 0.8);
}

.notice-hero::after {
  content: "";
  position: absolute;
  right: -46px;
  bottom: -64px;
  width: 180px;
  height: 180px;
  border: 26px solid rgba(255, 255, 255, 0.035);
  border-radius: 50%;
  pointer-events: none;
}

.notice-hero-top {
  display: flex;
  align-items: center;
  gap: 8px;
}

.notice-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 22px;
  padding: 0 9px;
  border-radius: 999px;
  color: var(--mint);
  background: rgba(191, 227, 207, 0.1);
  font-size: 9px;
  font-weight: 650;
  letter-spacing: 0.04em;
}

.notice-hero[data-level="important"] .notice-hero-badge {
  color: #f4cf94;
  background: rgba(226, 161, 61, 0.15);
}

.notice-hero[data-level="homework"] .notice-hero-badge {
  color: #b8d6ec;
  background: rgba(79, 125, 159, 0.18);
}

.notice-hero-badge svg {
  width: 10px;
  height: 10px;
}

.notice-hero-time {
  flex: 1;
  color: rgba(244, 240, 230, 0.38);
  font-family: var(--font-mono);
  font-size: 8.5px;
}

.notice-hero-read {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: rgba(244, 240, 230, 0.45);
  font-size: 8.5px;
}

.notice-hero-read svg {
  width: 12px;
  height: 12px;
}

.notice-hero h2 {
  position: relative;
  text-wrap: balance;
  z-index: 1;
  margin-top: 14px;
  color: var(--paper-soft);
  font-family: var(--font-serif);
  font-size: clamp(26px, 4.4vw, 36px);
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.notice-hero-body {
  position: relative;
  z-index: 1;
  margin-top: 9px;
  color: rgba(244, 240, 230, 0.7);
  font-size: 12.5px;
  line-height: 1.8;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.notice-hero-foot {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 17px;
  padding-top: 13px;
  border-top: 1px solid rgba(255, 255, 255, 0.09);
}

.notice-hero-foot span {
  color: rgba(244, 240, 230, 0.34);
  font-size: 8.5px;
}

.notice-hero-foot strong {
  color: rgba(244, 240, 230, 0.7);
  font-weight: 500;
}

.notice-empty {
  display: grid;
  justify-items: center;
  padding: 44px 24px;
  border: 1px dashed var(--line-strong);
  border-radius: 23px;
  color: var(--text-soft);
  text-align: center;
  background: rgba(255, 253, 248, 0.45);
}

.notice-empty-icon {
  display: grid;
  place-items: center;
  width: 45px;
  height: 45px;
  margin-bottom: 11px;
  border-radius: 14px;
  color: var(--green);
  background: var(--green-soft);
}

.notice-empty-icon svg {
  width: 21px;
  height: 21px;
}

.notice-empty h3 {
  color: var(--text);
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 700;
}

.notice-empty p {
  max-width: 280px;
  margin-top: 4px;
  font-size: 10.5px;
  line-height: 1.7;
}

.student-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 32px;
  margin-top: 22px;
  margin-bottom: 9px;
}

.student-section-head h2 {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  font-weight: 650;
}

.section-count {
  display: inline-grid;
  place-items: center;
  min-width: 19px;
  height: 18px;
  padding: 0 6px;
  border-radius: 999px;
  color: var(--text-soft);
  background: rgba(24, 37, 31, 0.07);
  font-family: var(--font-mono);
  font-size: 8.5px;
  font-weight: 600;
}

.section-hint {
  color: var(--text-faint);
  font-size: 9px;
}

.text-button {
  padding: 0;
  color: var(--green);
  font-size: 9.5px;
  font-weight: 600;
}

.text-button:disabled {
  color: var(--text-faint);
  cursor: default;
}

.student-notice-list {
  display: grid;
  gap: 8px;
}

.student-notice {
  display: grid;
  grid-template-columns: 8px minmax(0, 1fr) auto;
  align-items: start;
  gap: 11px;
  width: 100%;
  padding: 14px 15px;
  border: 1px solid var(--line);
  border-radius: 16px;
  color: var(--text);
  background: var(--paper-card);
  text-align: left;
  transition: border-color 160ms ease, transform 160ms var(--ease-out), box-shadow 160ms ease;
}

.student-notice:hover {
  border-color: var(--line-strong);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.notice-level-dot {
  width: 7px;
  height: 7px;
  margin-top: 7px;
  border-radius: 50%;
  background: var(--green);
}

.student-notice[data-level="important"] .notice-level-dot { background: var(--amber); }
.student-notice[data-level="homework"] .notice-level-dot { background: var(--blue); }

.student-notice-copy {
  min-width: 0;
}

.notice-pin {
  display: inline-flex;
  align-items: center;
  min-height: 16px;
  margin-right: 4px;
  padding: 0 5px;
  border-radius: 4px;
  color: #74490d;
  background: var(--amber-soft);
  font-size: 7px;
  font-weight: 600;
  vertical-align: 1px;
}

.student-notice h3 {
  overflow: hidden;
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.5;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.student-notice p {
  margin-top: 3px;
  overflow: hidden;
  color: var(--text-soft);
  font-size: 10px;
  line-height: 1.55;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.student-notice time {
  display: block;
  margin-top: 5px;
  color: var(--text-faint);
  font-family: var(--font-mono);
  font-size: 8px;
}

.read-state {
  min-height: 20px;
  padding: 0 7px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border-radius: 999px;
  color: var(--text-faint);
  background: rgba(24, 37, 31, 0.05);
  font-size: 8px;
  font-weight: 600;
  white-space: nowrap;
}

.read-state.is-read {
  color: var(--green-deep);
  background: var(--green-soft);
}

.read-state svg {
  width: 10px;
  height: 10px;
}

.notice-list-empty {
  padding: 26px 10px;
  color: var(--text-faint);
  font-size: 10px;
  text-align: center;
}

/* ---------- 作业 ---------- */

.homework-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 17px 19px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background:
    radial-gradient(circle at 96% 14%, rgba(226, 161, 61, 0.12), transparent 32%),
    var(--paper-card);
}

.homework-summary-copy {
  min-width: 0;
}

.homework-summary-copy .eyebrow {
  font-size: 8px;
}

.homework-summary-copy h2 {
  margin-top: 5px;
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 700;
  line-height: 1.3;
}

.homework-summary-copy p {
  margin-top: 3px;
  color: var(--text-soft);
  font-size: 9.5px;
  line-height: 1.6;
}

.progress-ring {
  --value: 0;
  position: relative;
  display: grid;
  place-items: center;
  width: 66px;
  height: 66px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: conic-gradient(var(--green) calc(var(--value) * 1%), rgba(24, 37, 31, 0.08) 0);
}

.progress-ring::before {
  content: "";
  position: absolute;
  inset: 6px;
  border-radius: 50%;
  background: var(--paper-card);
}

.progress-ring span {
  position: relative;
  z-index: 1;
  color: var(--green-deep);
  font-family: var(--font-serif);
  font-size: 16px;
  font-weight: 700;
}

.homework-summary.is-empty .progress-ring {
  background: rgba(24, 37, 31, 0.07);
}

.student-homework-list {
  display: grid;
  gap: 10px;
}

.hw-card {
  padding: 18px 18px 16px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--paper-card);
}

.hw-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.hw-card-title {
  min-width: 0;
}

.hw-card-title h3 {
  font-size: 15px;
  font-weight: 650;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.hw-due {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 4px;
  color: var(--text-faint);
  font-size: 9px;
}

.hw-due svg {
  width: 11px;
  height: 11px;
}

.hw-due.is-overdue {
  color: var(--coral);
}

.hw-current-status {
  flex: 0 0 auto;
  min-height: 23px;
  padding: 0 8px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border-radius: 999px;
  color: var(--text-soft);
  background: rgba(24, 37, 31, 0.06);
  font-size: 8.5px;
  font-weight: 600;
}

.hw-current-status[data-status="done"] { color: var(--green-deep); background: var(--green-soft); }
.hw-current-status[data-status="doing"] { color: #7a4d0c; background: var(--amber-soft); }
.hw-current-status[data-status="help"] { color: #8d3620; background: var(--coral-soft); }

.hw-description {
  margin-top: 8px;
  color: var(--text-soft);
  font-size: 10.5px;
  line-height: 1.7;
  white-space: pre-wrap;
}

.hw-status-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  margin-top: 13px;
}

.status-option {
  display: flex;
  align-items: center;
  gap: 5px;
  min-height: 38px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 11px;
  color: var(--text-soft);
  background: var(--paper-soft);
  font-size: 9.5px;
  font-weight: 550;
  text-align: left;
  transition: color 160ms ease, border-color 160ms ease, background 160ms ease, transform 160ms var(--ease-out);
}

.status-option svg {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
}

.status-option:hover {
  border-color: var(--line-strong);
  transform: translateY(-1px);
}

.status-option.is-selected[data-status="done"] {
  border-color: var(--green);
  color: var(--green-deep);
  background: var(--green-soft);
}

.status-option.is-selected[data-status="doing"] {
  border-color: var(--amber);
  color: #6d470c;
  background: var(--amber-soft);
}

.status-option.is-selected[data-status="help"] {
  border-color: var(--coral);
  color: #8d3620;
  background: var(--coral-soft);
}

.status-option.is-selected[data-status="todo"] {
  border-color: var(--line-strong);
  color: var(--text);
  background: var(--paper-deep);
}

.status-option:disabled {
  opacity: 0.65;
  cursor: wait;
}

.hw-note-area {
  margin-top: 11px;
}

.hw-note-toggle {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 0;
  color: var(--text-soft);
  font-size: 9.5px;
  font-weight: 550;
}

.hw-note-toggle svg {
  width: 13px;
  height: 13px;
}

.hw-note-toggle:hover {
  color: var(--green);
}

.hw-note-wrap {
  margin-top: 8px;
}

.hw-note-wrap textarea {
  width: 100%;
  min-height: 68px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 11px;
  outline: 0;
  color: var(--text);
  background: var(--paper-soft);
  font-size: 10.5px;
  line-height: 1.65;
  resize: vertical;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.hw-note-wrap textarea:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(29, 107, 82, 0.09);
}

.hw-note-meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 5px;
  color: var(--text-faint);
  font-size: 8px;
}

.hw-note-meta .is-saved {
  color: var(--green);
  font-weight: 600;
}

.hw-updated {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 10px;
  padding-top: 9px;
  border-top: 1px solid rgba(24, 37, 31, 0.06);
  color: var(--text-faint);
  font-size: 8.5px;
}

.hw-updated svg {
  width: 11px;
  height: 11px;
  color: var(--green);
}

.hw-empty {
  display: grid;
  justify-items: center;
  padding: 44px 24px;
  border: 1px dashed var(--line-strong);
  border-radius: 21px;
  color: var(--text-soft);
  text-align: center;
  background: rgba(255, 253, 248, 0.45);
}

.hw-empty-icon {
  display: grid;
  place-items: center;
  width: 45px;
  height: 45px;
  margin-bottom: 11px;
  border-radius: 14px;
  color: var(--green);
  background: var(--green-soft);
}

.hw-empty-icon svg {
  width: 21px;
  height: 21px;
}

.hw-empty h3 {
  color: var(--text);
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 700;
}

.hw-empty p {
  max-width: 260px;
  margin-top: 4px;
  font-size: 10.5px;
  line-height: 1.7;
}

.install-link {
  padding: 0;
  color: var(--green);
  font-size: 8.5px;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.pwa-standalone [data-install-app] {
  display: none !important;
}

.student-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  width: min(100% - 36px, 840px);
  margin: 0 auto;
  padding: 16px 0 26px;
  color: var(--text-faint);
  font-family: var(--font-mono);
  font-size: 8px;
}

/* ---------- 响应式 ---------- */

@media (max-width: 980px) {
  .join-page {
    grid-template-columns: 1fr;
  }

  .join-visual {
    display: none;
  }

  .join-mobile-brand {
    display: block;
  }

  .join-panel {
    min-height: 100dvh;
    padding: 34px 24px 70px;
    justify-content: flex-start;
  }

  .join-card {
    margin-top: 2vh;
  }

  .join-footer {
    display: none;
  }
}

@media (max-width: 600px) {
  .student-header-inner {
    width: calc(100% - 28px);
    height: 61px;
  }

  .student-me-copy {
    display: none;
  }

  .student-me .avatar {
    width: 33px;
    height: 33px;
  }

  .student-exit {
    width: 28px;
    height: 28px;
  }

  .student-main {
    width: calc(100% - 28px);
    padding-top: 18px;
  }

  .student-welcome {
    margin-bottom: 17px;
  }

  .student-welcome h1 {
    font-size: 29px;
  }

  .student-welcome p:not(.eyebrow) {
    font-size: 10.5px;
  }

  .student-welcome-mark {
    width: 36px;
    height: 36px;
  }

  .student-tab {
    min-height: 40px;
  }

  .notice-hero {
    padding: 20px 19px 17px;
    border-radius: 21px;
  }

  .notice-hero h2 {
    font-size: 27px;
  }

  .notice-hero-body {
    font-size: 11.5px;
  }

  .student-notice {
    padding: 12px 13px;
  }

  .homework-summary {
    padding: 15px 16px;
  }

  .homework-summary-copy h2 {
    font-size: 20px;
  }

  .progress-ring {
    width: 58px;
    height: 58px;
  }

  .hw-card {
    padding: 16px 15px 14px;
  }

  .hw-status-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .status-option {
    min-height: 39px;
  }

  .join-panel {
    padding: 28px 20px 60px;
  }

  .join-card h2 {
    font-size: 33px;
  }

  .join-class-pill {
    margin-bottom: 22px;
  }

  .join-mobile-brand {
    margin-bottom: 25px;
  }

  .student-footer {
    width: calc(100% - 28px);
    padding-bottom: 20px;
  }

  .toast-host {
    right: 14px;
    bottom: 14px;
    width: calc(100vw - 28px);
  }
}
