:root {
  --bg: #f3f5f4;
  --surface: #ffffff;
  --surface-soft: #f7f4ee;
  --text: #15191f;
  --muted: #69737f;
  --line: rgba(21, 25, 31, 0.1);
  --brand: #145c4f;
  --brand-dark: #0f453c;
  --accent: #b66a2c;
  --danger: #b42318;
  --shadow: 0 22px 55px rgba(21, 25, 31, 0.11);
  --soft-shadow: 0 10px 24px rgba(21, 25, 31, 0.06);
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(243, 245, 244, 0.95) 36%),
    var(--bg);
  color: var(--text);
  font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
}

button,
input,
select {
  font: inherit;
}

.app-shell {
  width: min(1080px, calc(100% - 32px));
  margin: 36px auto;
}

.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--accent);
  font-size: 14px;
  font-weight: 700;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: clamp(30px, 5vw, 52px);
  line-height: 1.05;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 8px;
  font-size: 22px;
}

.status-pill {
  flex: 0 0 auto;
  border: 0;
  border-radius: 999px;
  padding: 8px 13px;
  color: var(--brand);
  background: rgba(20, 92, 79, 0.08);
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 14px;
  border-radius: 8px;
  padding: 4px;
  background: rgba(21, 25, 31, 0.06);
}

.tab-button,
.primary-button,
.ghost-button,
.danger-button,
.record-button,
.stop-button {
  min-height: 44px;
  border-radius: 8px;
  border: 1px solid transparent;
  padding: 0 16px;
  cursor: pointer;
}

.tab-button {
  flex: 1 1 128px;
  color: var(--muted);
  background: transparent;
}

.tab-button.active {
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.9);
  background: #ffffff;
  box-shadow: var(--soft-shadow);
}

.deadline-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  border: 1px solid rgba(20, 92, 79, 0.12);
  border-radius: 8px;
  padding: 12px 14px;
  background: #ffffff;
  box-shadow: var(--soft-shadow);
}

.deadline-strip span,
.deadline-strip small {
  color: var(--muted);
  font-size: 13px;
}

.deadline-strip strong {
  color: var(--brand);
}

.panel {
  display: none;
  background: var(--surface);
  border: 0;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.panel.active {
  display: block;
}

.upload-form {
  padding: 28px;
}

.student-hub-intro {
  display: grid;
  gap: 14px;
  padding: 24px 28px 12px;
}

.student-hub-intro p {
  max-width: 680px;
  margin-bottom: 0;
  color: var(--muted);
}

.task-switch {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.task-card {
  min-width: 0;
  min-height: 74px;
  border: 1px solid rgba(21, 25, 31, 0.08);
  border-radius: 8px;
  padding: 12px;
  color: var(--text);
  background: #f8faf9;
  cursor: pointer;
  text-align: left;
}

.task-card strong,
.task-card span {
  display: block;
}

.task-card strong {
  margin-bottom: 5px;
  font-size: 17px;
}

.task-card span {
  color: var(--muted);
  font-size: 13px;
}

.task-card.active {
  border-color: rgba(20, 92, 79, 0.32);
  color: #ffffff;
  background: var(--brand);
  box-shadow: var(--soft-shadow);
}

.task-card.active span {
  color: rgba(255, 255, 255, 0.78);
}

.task-form[hidden] {
  display: none;
}

.section-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}

.section-title-row p {
  max-width: 640px;
  margin-bottom: 0;
  color: var(--muted);
}

.required-badge {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 8px 12px;
  color: #8a3a12;
  background: #fff0dc;
  font-size: 14px;
  font-weight: 700;
}

.required-badge.compact {
  padding: 5px 9px;
  font-size: 12px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.full-row {
  grid-column: 1 / -1;
}

label span {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 14px;
}

label .select-help {
  margin: 8px 0 0;
  color: #8a3a12;
  font-size: 13px;
  line-height: 1.45;
}

input,
select {
  width: 100%;
  min-height: 48px;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 0 14px;
  color: var(--text);
  background: #f6f8f7;
  font-size: 16px;
}

input:hover,
select:hover,
input:focus,
select:focus {
  border-color: rgba(20, 92, 79, 0.22);
  background: #ffffff;
}

input:focus,
select:focus,
button:focus {
  outline: 3px solid rgba(33, 105, 92, 0.22);
  outline-offset: 2px;
}

.upload-zone,
.file-drop {
  display: block;
  margin-top: 22px;
  border: 1px dashed rgba(20, 92, 79, 0.28);
  border-radius: 8px;
  padding: 24px;
  background: rgba(20, 92, 79, 0.05);
  cursor: pointer;
}

.upload-zone:hover,
.file-drop:hover {
  background: rgba(20, 92, 79, 0.08);
}

.upload-zone input,
.file-drop input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.file-main {
  margin-bottom: 6px;
  color: var(--text);
  font-size: 18px;
  font-weight: 700;
}

.file-sub {
  color: var(--muted);
}

.recorder-box {
  margin-top: 22px;
  border: 0;
  border-radius: 8px;
  padding: 22px;
  background:
    linear-gradient(135deg, rgba(20, 92, 79, 0.1), rgba(182, 106, 44, 0.08)),
    var(--surface-soft);
}

.recorder-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.recorder-head h2 {
  margin-bottom: 6px;
}

.recorder-head p,
.recorder-status {
  margin-bottom: 0;
  color: var(--muted);
}

.timer {
  min-width: 86px;
  border: 0;
  border-radius: 8px;
  padding: 10px 12px;
  color: #ffffff;
  background: #ffffff;
  background: var(--brand);
  font-size: 24px;
  font-weight: 700;
  text-align: center;
  box-shadow: var(--soft-shadow);
}

.record-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 16px 0 12px;
}

.record-button {
  color: #ffffff;
  border-color: var(--brand);
  background: var(--brand);
}

.stop-button {
  color: #ffffff;
  border-color: var(--danger);
  background: var(--danger);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.segment-list {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.segment-item {
  display: grid;
  grid-template-columns: minmax(116px, 0.7fr) minmax(220px, 1.4fr) 44px;
  gap: 12px;
  align-items: center;
  border: 0;
  border-radius: 8px;
  padding: 12px 12px 12px 14px;
  background: #ffffff;
  box-shadow: var(--soft-shadow);
}

.segment-meta strong,
.segment-meta span {
  display: block;
}

.segment-meta span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 14px;
}

.delete-segment-button {
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 999px;
  color: var(--danger);
  background: #fff1ef;
  cursor: pointer;
  font-size: 24px;
  line-height: 1;
}

.delete-segment-button:hover {
  background: #ffe1dd;
}

.actions,
.teacher-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.actions {
  justify-content: flex-start;
  margin-top: 18px;
}

.primary-button {
  color: #ffffff;
  border-color: var(--brand);
  background: var(--brand);
  box-shadow: 0 12px 24px rgba(20, 92, 79, 0.18);
}

.primary-button:hover {
  background: var(--brand-dark);
}

.ghost-button {
  color: var(--text);
  background: rgba(255, 255, 255, 0.72);
  border-color: rgba(21, 25, 31, 0.11);
}

.danger-button {
  color: var(--danger);
  background: #fff7f6;
  border-color: #f4c7c3;
}

.message {
  min-height: 24px;
  margin: 14px 0 0;
  color: var(--brand);
}

.teacher-login {
  padding: 28px;
}

.teacher-login form {
  max-width: 420px;
  display: grid;
  gap: 14px;
}

.teacher-login p {
  margin-bottom: 0;
  color: var(--muted);
}

.consent-notice {
  border-radius: 8px;
  padding: 12px 14px;
  color: #7a3d12;
  background: #fff4e6;
}

.consent-check {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
}

.consent-check input {
  width: 18px;
  min-height: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.consent-check span {
  margin: 0;
  color: var(--text);
  font-size: 15px;
}

.teacher-tools {
  padding: 24px 28px;
  border-bottom: 1px solid rgba(21, 25, 31, 0.08);
}

.teacher-tools p {
  margin-bottom: 0;
  color: var(--muted);
}

.empty-state {
  padding: 30px 28px;
  color: var(--muted);
}

.submission-list {
  display: grid;
  gap: 12px;
  padding: 18px 28px 28px;
}

.dashboard-section {
  padding: 24px 28px;
  border-bottom: 1px solid rgba(21, 25, 31, 0.08);
}

.manager-form {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(120px, 180px) auto;
  gap: 10px;
  align-items: center;
  margin-bottom: 14px;
}

.teacher-filters {
  display: grid;
  grid-template-columns: minmax(130px, 1.1fr) minmax(120px, 0.9fr) minmax(140px, 0.9fr) minmax(130px, 0.9fr) auto;
  gap: 10px;
  align-items: end;
  padding: 16px 28px;
  border-bottom: 1px solid rgba(21, 25, 31, 0.08);
  background: #fbfcfb;
}

.manager-notice {
  margin: -8px 0 14px;
  border-radius: 8px;
  padding: 11px 12px;
  color: #7a3d12;
  background: #fff7ec;
  line-height: 1.55;
}

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

.student-card {
  display: grid;
  grid-template-columns: minmax(140px, 0.9fr) minmax(220px, 1.2fr) minmax(240px, 1.4fr);
  gap: 12px;
  align-items: start;
  border-radius: 8px;
  padding: 12px;
  background: #f6f8f7;
}

.student-card.is-hidden {
  color: var(--muted);
  background: #eeeeec;
}

.student-card.is-hidden .code-block code {
  color: var(--muted);
}

.student-card strong,
.student-card span {
  display: block;
}

.student-card span,
.code-block span {
  color: var(--muted);
  font-size: 13px;
}

.student-codes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.code-block code {
  display: inline-block;
  margin-top: 4px;
  border-radius: 6px;
  padding: 5px 8px;
  color: var(--brand);
  background: #ffffff;
  font-weight: 700;
}

.student-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.student-actions .ghost-button {
  min-height: 38px;
  padding: 0 11px;
  font-size: 13px;
}

.week-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
  padding: 18px 28px 10px;
}

.week-card {
  border-radius: 8px;
  padding: 14px;
  background: linear-gradient(180deg, #ffffff, #fbfbfa);
  box-shadow: var(--soft-shadow);
}

.week-card-head,
.word-progress,
.mini-counts {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.week-card-head span,
.word-progress span,
.mini-counts span {
  color: var(--muted);
  font-size: 13px;
}

.word-progress {
  margin-top: 12px;
}

.day-strip {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 5px;
  margin-top: 10px;
}

.day-pill {
  min-height: 34px;
  border-radius: 6px;
  padding: 5px 3px;
  font-size: 11px;
  text-align: center;
}

.day-pill.done {
  color: var(--brand);
  background: rgba(20, 92, 79, 0.1);
}

.day-pill.missing {
  color: #9a3412;
  background: #fff2e8;
}

.mini-counts {
  justify-content: flex-start;
  flex-wrap: wrap;
  margin-top: 10px;
}

.mini-counts span {
  border-radius: 999px;
  padding: 5px 8px;
  background: #f0f2f1;
}

.mini-counts .late-count,
.late-badge {
  color: #9a3412;
  background: #fff2e8;
}

.type-sections {
  display: grid;
  gap: 10px;
  padding: 8px 28px 28px;
}

.type-section {
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--soft-shadow);
}

.type-section > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 48px;
  padding: 0 14px;
  cursor: pointer;
  font-weight: 700;
}

.empty-inline {
  margin: 0;
  padding: 14px;
  color: var(--muted);
}

.compact-list {
  display: grid;
  gap: 8px;
  padding: 0 12px 12px;
}

.compact-item {
  border-radius: 8px;
  background: #f8faf9;
}

.compact-item summary {
  display: grid;
  grid-template-columns: auto auto minmax(80px, 1fr) minmax(56px, 0.8fr) minmax(96px, 1.2fr) auto;
  gap: 8px;
  align-items: center;
  min-height: 44px;
  padding: 8px 10px;
  cursor: pointer;
}

.compact-item summary span,
.compact-item summary time {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.compact-body {
  padding: 0 10px 10px;
}

.submission-card {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(220px, 1.5fr);
  gap: 16px;
  border: 1px solid rgba(21, 25, 31, 0.08);
  border-radius: 8px;
  padding: 16px;
  background: linear-gradient(180deg, #ffffff, #fbfbfa);
}

.submission-type-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.type-badge {
  width: fit-content;
  border-radius: 999px;
  padding: 6px 10px;
  color: #ffffff;
  background: var(--brand);
  font-size: 13px;
  font-weight: 700;
}

.late-badge {
  width: fit-content;
  border-radius: 999px;
  padding: 6px 9px;
  font-size: 12px;
  font-weight: 700;
}

.type-badge.daily {
  background: var(--accent);
}

.type-badge.writing {
  background: #3b5c8a;
}

.type-badge.homework {
  background: #5f4b8b;
}

.meta,
.player-area,
.continuous-player,
.segment-item {
  min-width: 0;
}

.meta {
  display: grid;
  gap: 6px;
}

.meta strong {
  font-size: 18px;
}

.meta span {
  color: var(--muted);
  font-size: 14px;
}

.player-area {
  display: grid;
  align-content: center;
  gap: 10px;
}

audio {
  display: block;
  width: 100%;
}

.download-link {
  width: fit-content;
  color: var(--brand);
  font-weight: 700;
  text-decoration: none;
}

.download-link:hover {
  text-decoration: underline;
}

.continuous-player {
  display: grid;
  gap: 10px;
}

.player-title {
  color: var(--muted);
  font-size: 14px;
}

.segment-downloads {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
}

.image-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(124px, 1fr));
  gap: 12px;
}

.image-card {
  min-width: 0;
  display: grid;
  gap: 8px;
  border-radius: 8px;
  padding: 8px;
  color: var(--text);
  background: #f6f8f7;
  text-decoration: none;
}

.image-card span {
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.attachment-thumb {
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 6px;
  object-fit: cover;
  background: #ffffff;
}

.parent-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 22px 28px;
  border-bottom: 1px solid rgba(21, 25, 31, 0.08);
}

.parent-toolbar p {
  margin-bottom: 0;
  color: var(--muted);
}

.parent-overview {
  padding: 24px 28px 10px;
}

.parent-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  border: 1px solid rgba(20, 92, 79, 0.12);
  border-radius: 8px;
  padding: 20px;
  background:
    linear-gradient(135deg, rgba(20, 92, 79, 0.1), rgba(255, 255, 255, 0.96) 52%),
    #ffffff;
}

.parent-kicker {
  display: block;
  margin-bottom: 6px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
}

.parent-hero h2 {
  margin-bottom: 6px;
  font-size: 28px;
}

.parent-hero p {
  max-width: 620px;
  margin-bottom: 0;
  color: var(--muted);
}

.parent-deadline {
  display: inline-block;
  margin-top: 10px;
  border-radius: 999px;
  padding: 7px 10px;
  color: var(--brand);
  background: rgba(20, 92, 79, 0.08);
  font-size: 13px;
  font-weight: 700;
}

.parent-score {
  min-width: 116px;
  border-radius: 8px;
  padding: 14px 16px;
  color: #ffffff;
  background: var(--brand);
  text-align: center;
  box-shadow: var(--soft-shadow);
}

.parent-score span,
.parent-score strong {
  display: block;
}

.parent-score span {
  margin-bottom: 4px;
  font-size: 13px;
  opacity: 0.86;
}

.parent-score strong {
  font-size: 30px;
  line-height: 1;
}

.parent-stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.parent-stat-grid > div {
  min-width: 0;
  border-radius: 8px;
  padding: 13px 14px;
  background: #f6f8f7;
}

.parent-stat-grid span,
.parent-stat-grid small {
  display: block;
  color: var(--muted);
  font-size: 13px;
}

.parent-stat-grid strong {
  display: block;
  margin: 5px 0 2px;
  font-size: 22px;
}

.parent-view-switch {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin: 4px 28px 10px;
  border-radius: 8px;
  padding: 4px;
  background: rgba(21, 25, 31, 0.06);
}

.parent-view-button {
  min-height: 42px;
  border: 1px solid transparent;
  border-radius: 7px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  font-weight: 700;
}

.parent-view-button.active {
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.9);
  background: #ffffff;
  box-shadow: var(--soft-shadow);
}

.parent-view-panel[hidden] {
  display: none;
}

.parent-sections {
  display: grid;
  gap: 12px;
  padding: 12px 28px 28px;
}

.parent-section {
  overflow: hidden;
  border: 1px solid rgba(21, 25, 31, 0.08);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--soft-shadow);
}

.parent-section > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 66px;
  padding: 12px 16px;
  cursor: pointer;
  list-style: none;
}

.parent-section > summary::-webkit-details-marker {
  display: none;
}

.parent-section > summary::after {
  content: "展开";
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 5px 9px;
  color: var(--brand);
  background: rgba(20, 92, 79, 0.08);
  font-size: 12px;
  font-weight: 700;
}

.parent-section[open] > summary::after {
  content: "收起";
}

.parent-section-title {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.parent-section-title > span:last-child {
  min-width: 0;
}

.parent-section-title strong,
.parent-section-title small,
.parent-section-count strong,
.parent-section-count small {
  display: block;
}

.parent-section-title small,
.parent-section-count small {
  color: var(--muted);
  font-size: 12px;
}

.parent-section-count {
  flex: 0 0 auto;
  min-width: 54px;
  text-align: right;
}

.parent-section-count strong {
  font-size: 22px;
  line-height: 1.1;
}

.parent-section-body {
  display: grid;
  gap: 12px;
  padding: 0 16px 16px;
}

.parent-day-strip {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
}

.parent-day {
  min-width: 0;
  border-radius: 7px;
  padding: 9px 4px;
  text-align: center;
}

.parent-day strong,
.parent-day small {
  display: block;
}

.parent-day strong {
  font-size: 12px;
}

.parent-day small {
  margin-top: 2px;
  font-size: 11px;
}

.parent-day.done {
  color: var(--brand);
  background: rgba(20, 92, 79, 0.1);
}

.parent-day.missing {
  color: #9a3412;
  background: #fff2e8;
}

.parent-section-note,
.parent-empty {
  margin: 0;
  border-radius: 8px;
  padding: 11px 12px;
  color: var(--muted);
  background: #f8faf9;
}

.parent-section-note {
  color: #7a3d12;
  background: #fff7ec;
}

.parent-item-list {
  display: grid;
  gap: 10px;
}

.parent-item {
  border-radius: 8px;
  padding: 13px;
  background: #f8faf9;
}

.parent-item-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  margin-bottom: 10px;
}

.parent-item-head strong,
.parent-item-head span {
  display: block;
  min-width: 0;
}

.parent-item-head strong {
  overflow-wrap: anywhere;
}

.parent-item-head span,
.parent-item-head time {
  color: var(--muted);
  font-size: 13px;
}

.parent-item-body {
  min-width: 0;
}

.parent-week-view {
  padding: 12px 28px 28px;
}

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

.parent-week-head strong,
.parent-week-head span {
  display: block;
}

.parent-week-head strong {
  font-size: 18px;
}

.parent-week-head span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 13px;
}

.parent-week-list {
  display: grid;
  gap: 9px;
}

.parent-week-day {
  overflow: hidden;
  border: 1px solid rgba(21, 25, 31, 0.08);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--soft-shadow);
}

.parent-week-day > summary {
  display: grid;
  grid-template-columns: minmax(72px, 0.5fr) auto minmax(280px, 1.4fr) auto;
  gap: 12px;
  align-items: center;
  min-height: 62px;
  padding: 11px 14px;
  cursor: pointer;
  list-style: none;
}

.parent-week-day > summary::-webkit-details-marker {
  display: none;
}

.parent-week-day > summary::after {
  content: "展开";
  border-radius: 999px;
  padding: 5px 9px;
  color: var(--brand);
  background: rgba(20, 92, 79, 0.08);
  font-size: 12px;
  font-weight: 700;
}

.parent-week-day[open] > summary::after {
  content: "收起";
}

.week-day-main strong,
.week-day-main small {
  display: block;
}

.week-day-main small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.week-day-status {
  width: fit-content;
  border-radius: 999px;
  padding: 6px 9px;
  font-size: 12px;
  font-weight: 700;
}

.week-day-status.done,
.week-metric.done {
  color: var(--brand);
  background: rgba(20, 92, 79, 0.1);
}

.week-day-status.missing,
.week-metric.missing {
  color: #9a3412;
  background: #fff2e8;
}

.week-day-status.upcoming,
.week-metric.upcoming {
  color: var(--muted);
  background: #f0f2f1;
}

.week-day-counts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.week-day-counts span {
  border-radius: 999px;
  padding: 5px 8px;
  color: var(--muted);
  background: #f6f8f7;
  font-size: 12px;
}

.parent-week-body {
  display: grid;
  gap: 12px;
  padding: 0 14px 14px;
}

.week-day-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.week-metric {
  border-radius: 8px;
  padding: 10px;
  background: #f8faf9;
  text-align: center;
}

.week-metric strong,
.week-metric small {
  display: block;
}

.week-metric strong {
  font-size: 20px;
}

.week-metric small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.week-day-submissions,
.week-submission-group {
  display: grid;
  gap: 10px;
}

.week-submission-group h3 {
  margin: 0;
  color: var(--text);
  font-size: 15px;
}

@media (max-width: 720px) {
  .app-shell {
    width: min(100% - 12px, 1040px);
    margin: 8px auto 14px;
  }

  .top-bar,
  .teacher-tools,
  .deadline-strip,
  .parent-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .top-bar {
    gap: 10px;
    margin-bottom: 10px;
  }

  .eyebrow {
    margin-bottom: 4px;
    font-size: 12px;
  }

  h1 {
    font-size: 28px;
    line-height: 1.08;
  }

  .status-pill {
    padding: 6px 10px;
    font-size: 12px;
  }

  .tabs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-bottom: 8px;
  }

  body:not([data-active-panel="teacherPanel"]) .tabs {
    position: sticky;
    top: 0;
    z-index: 10;
    box-shadow: 0 10px 22px rgba(21, 25, 31, 0.08);
  }

  .tab-button,
  .primary-button,
  .ghost-button,
  .danger-button,
  .record-button,
  .stop-button {
    min-height: 48px;
  }

  .tab-button {
    padding: 0 8px;
    font-weight: 700;
  }

  .deadline-strip {
    gap: 5px;
    margin-bottom: 8px;
    padding: 10px 12px;
  }

  .deadline-strip span,
  .deadline-strip small {
    font-size: 12px;
  }

  .deadline-strip strong {
    font-size: 14px;
  }

  .form-grid,
  .submission-card,
  .segment-item,
  .manager-form,
  .teacher-filters,
  .student-card,
  .compact-item summary {
    grid-template-columns: 1fr;
  }

  .student-codes {
    grid-template-columns: 1fr;
  }

  .student-actions {
    justify-content: stretch;
  }

  .student-actions .ghost-button {
    flex: 1 1 140px;
  }

  .delete-segment-button {
    width: 100%;
    height: 42px;
    border-radius: 8px;
    font-size: 22px;
  }

  .recorder-head {
    flex-direction: column;
    gap: 10px;
  }

  .section-title-row {
    flex-direction: column;
    gap: 10px;
  }

  .student-hub-intro {
    gap: 10px;
    padding: 14px 12px 8px;
  }

  .student-hub-intro p {
    font-size: 14px;
    line-height: 1.55;
  }

  .task-switch {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    position: sticky;
    top: 60px;
    z-index: 9;
    border-radius: 8px;
    padding: 8px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: var(--soft-shadow);
    backdrop-filter: blur(10px);
  }

  .task-card {
    min-height: 58px;
    padding: 10px;
  }

  .task-card strong {
    margin-bottom: 3px;
    font-size: 16px;
  }

  .task-card span {
    font-size: 12px;
  }

  .required-badge {
    width: fit-content;
  }

  .timer {
    width: 100%;
  }

  #studentPanel .upload-form {
    padding-top: 16px;
    padding-bottom: 18px;
  }

  #studentPanel .section-title-row {
    margin-bottom: 14px;
  }

  #studentPanel .section-title-row h2 {
    margin-bottom: 5px;
    font-size: 20px;
  }

  #studentPanel .section-title-row p {
    font-size: 14px;
    line-height: 1.55;
  }

  #studentPanel .form-grid {
    gap: 12px;
  }

  label .select-help {
    font-size: 12px;
  }

  .upload-zone,
  .file-drop {
    margin-top: 16px;
    padding: 18px;
  }

  .file-main {
    font-size: 16px;
  }

  .file-sub {
    font-size: 13px;
    line-height: 1.45;
  }

  .recorder-box {
    margin-top: 16px;
    padding: 16px;
  }

  .recorder-head h2 {
    font-size: 20px;
  }

  .recorder-head p,
  .recorder-status {
    font-size: 14px;
    line-height: 1.55;
  }

  .record-actions,
  .actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .segment-downloads {
    display: grid;
    grid-template-columns: 1fr;
  }

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

  .parent-hero,
  .parent-item-head {
    grid-template-columns: 1fr;
  }

  .parent-score {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    text-align: left;
  }

  .parent-score span {
    margin-bottom: 0;
  }

  #parentPanel .teacher-login {
    padding: 16px;
  }

  #parentPanel .teacher-login form {
    max-width: none;
    gap: 12px;
  }

  #parentPanel .teacher-login h2 {
    font-size: 22px;
  }

  #parentPanel .teacher-login p {
    font-size: 14px;
    line-height: 1.55;
  }

  .consent-notice {
    padding: 10px 12px;
  }

  .consent-check {
    align-items: flex-start;
    border-radius: 8px;
    padding: 10px 12px;
    background: #f8faf9;
  }

  .parent-toolbar {
    gap: 8px;
    border-bottom: 0;
    padding-top: 16px;
    padding-bottom: 10px;
  }

  .parent-toolbar h2 {
    margin-bottom: 4px;
    font-size: 22px;
  }

  .parent-overview {
    padding-top: 10px;
  }

  .parent-hero {
    gap: 12px;
    padding: 14px;
  }

  .parent-hero h2 {
    font-size: 24px;
  }

  .parent-hero p {
    font-size: 14px;
    line-height: 1.55;
  }

  .parent-deadline {
    border-radius: 8px;
    font-size: 12px;
  }

  .parent-score {
    padding: 12px 14px;
  }

  .parent-score strong {
    font-size: 24px;
  }

  .parent-stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .parent-stat-grid > div {
    padding: 10px 11px;
  }

  .parent-stat-grid strong {
    font-size: 20px;
  }

  .parent-view-switch {
    margin: 2px 16px 8px;
  }

  .parent-view-button {
    min-height: 40px;
    font-size: 14px;
  }

  .parent-sections {
    gap: 8px;
  }

  .parent-section > summary {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px 10px;
    align-items: center;
    min-height: 58px;
    padding: 10px 12px;
  }

  .parent-section-title {
    align-items: flex-start;
  }

  .parent-section-title .type-badge {
    min-width: 44px;
    text-align: center;
  }

  .parent-section-count {
    grid-column: 1;
    display: flex;
    gap: 8px;
    align-items: baseline;
    text-align: left;
  }

  .parent-section-count strong {
    font-size: 18px;
  }

  .parent-section > summary::after {
    grid-column: 2;
    grid-row: 1 / span 2;
    align-self: center;
  }

  .parent-section-body {
    padding: 0 12px 12px;
  }

  .parent-day-strip {
    overflow-x: auto;
    grid-template-columns: repeat(7, minmax(44px, 1fr));
    padding-bottom: 2px;
  }

  .parent-section-note,
  .parent-empty {
    padding: 10px;
    font-size: 13px;
    line-height: 1.5;
  }

  .parent-item {
    padding: 11px;
  }

  .parent-item-head {
    gap: 4px;
    margin-bottom: 8px;
  }

  .parent-item-head span,
  .parent-item-head time {
    font-size: 12px;
  }

  .parent-week-view {
    padding: 8px 16px 16px;
  }

  .parent-week-head {
    margin-bottom: 8px;
  }

  .parent-week-head strong {
    font-size: 16px;
  }

  .parent-week-head span {
    font-size: 12px;
    line-height: 1.45;
  }

  .parent-week-list {
    gap: 8px;
  }

  .parent-week-day > summary {
    grid-template-columns: minmax(52px, 0.5fr) minmax(72px, auto) auto;
    gap: 7px 8px;
    min-height: 58px;
    padding: 10px 11px;
  }

  .parent-week-day > summary::after {
    grid-column: 3;
    grid-row: 1 / span 2;
    align-self: center;
  }

  .week-day-main small {
    font-size: 11px;
  }

  .week-day-status {
    padding: 5px 8px;
    font-size: 11px;
  }

  .week-day-counts {
    grid-column: 1 / span 2;
    gap: 5px;
  }

  .week-day-counts span {
    padding: 4px 7px;
    font-size: 11px;
  }

  .parent-week-body {
    padding: 0 11px 11px;
  }

  .week-day-metrics {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
  }

  .week-metric {
    padding: 8px 4px;
  }

  .week-metric strong {
    font-size: 17px;
  }

  .week-metric small {
    font-size: 11px;
  }

  .week-submission-group h3 {
    font-size: 14px;
  }

  .download-link {
    width: 100%;
    min-height: 38px;
    display: inline-flex;
    align-items: center;
  }

  .upload-form,
    .teacher-login,
    .teacher-tools,
    .dashboard-section,
    .teacher-filters,
    .parent-toolbar,
    .parent-overview,
    .parent-sections,
    .week-grid,
    .type-sections,
  .submission-list,
  .empty-state {
    padding-left: 16px;
    padding-right: 16px;
  }
}
