:root {
  --green: #2f7c57;
  --green-deep: #174d38;
  --green-soft: #eaf5ef;
  --ink: #17231d;
  --muted: #6f7d76;
  --line: #dce9e2;
  --paper: #ffffff;
  --bg: #f5f8f6;
  --shadow: 0 18px 45px rgba(25, 72, 51, 0.1);
  font-family: "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

.preview-environment-banner {
  position: sticky;
  top: 0;
  z-index: 1000;
  width: 100%;
  padding: 8px 16px;
  color: #3f2d00;
  font-size: 14px;
  font-weight: 700;
  text-align: center;
  background: #ffd666;
  border-bottom: 1px solid #d9a928;
}

.feature-hidden {
  display: none !important;
}

.view-hidden {
  display: none !important;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(135deg, rgba(234, 245, 239, 0.92), rgba(255, 255, 255, 0.88)),
    radial-gradient(circle at 80% 0%, rgba(47, 124, 87, 0.12), transparent 32%),
    var(--bg);
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.student-app {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 52px;
}

.student-topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: minmax(220px, auto) 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid rgba(47, 124, 87, 0.14);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 10px 28px rgba(20, 62, 45, 0.08);
  backdrop-filter: blur(16px);
}

.brand-block {
  display: flex;
  gap: 10px;
  align-items: center;
}

.brand-block img {
  width: 112px;
  height: auto;
}

.brand-block span,
.eyebrow {
  display: block;
  color: var(--green);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
}

.brand-block strong {
  display: block;
  margin-top: 2px;
  color: var(--ink);
  font-size: 15px;
}

.top-nav {
  display: flex;
  justify-content: center;
  gap: 8px;
}

.top-nav button,
.account-chip,
.soft-button,
.ghost-button {
  min-height: 36px;
  border: 1px solid rgba(47, 124, 87, 0.12);
  border-radius: 999px;
  padding: 0 14px;
  color: var(--green-deep);
  background: #f3faf6;
  font-size: 13px;
  font-weight: 900;
}

.top-nav button.active,
.account-chip,
.search-row button,
.stack-form button[type="submit"],
.note-actions button[type="submit"] {
  border-color: var(--green-deep);
  color: #fff;
  background: var(--green-deep);
}

.hero-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 18px;
  align-items: stretch;
  margin: 22px 0 16px;
}

.hero-copy,
.hero-card,
.panel,
.metric-card {
  border: 1px solid rgba(47, 124, 87, 0.12);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
}

.hero-copy {
  padding: 30px;
  min-height: 210px;
}

.hero-copy h1 {
  max-width: 740px;
  margin: 8px 0 10px;
  font-size: clamp(30px, 4vw, 52px);
  line-height: 1.08;
  letter-spacing: 0;
}

.hero-copy p {
  max-width: 620px;
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.8;
}

.hero-card {
  display: grid;
  align-content: space-between;
  padding: 22px;
}

.learner-line {
  display: flex;
  gap: 12px;
  align-items: center;
}

.avatar {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 16px;
  color: #fff;
  background: var(--green);
  font-size: 19px;
  font-weight: 900;
}

.learner-line span,
.metric-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.learner-line strong {
  display: block;
  margin: 4px 0;
  font-size: 22px;
}

.learner-line small {
  color: var(--muted);
}

.overview-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.metric-card {
  padding: 16px;
}

.metric-card strong {
  display: block;
  margin-top: 8px;
  color: var(--green-deep);
  font-size: 24px;
  line-height: 1;
}

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

.side-stack {
  display: grid;
  gap: 16px;
  align-content: start;
}

.panel {
  padding: 18px;
}

.weekly-course-panel {
  margin: 16px 0;
  padding: 16px 18px;
  overflow: hidden;
}

.weekly-course-heading,
.weekly-course-main,
.weekly-course-actions {
  display: flex;
  align-items: center;
}

.weekly-course-heading {
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.weekly-course-heading h2 {
  margin: 2px 0 0;
  font-size: 20px;
}

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

.course-lifecycle-tabs button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 44px;
  padding: 8px 10px;
  border: 1px solid rgba(47, 124, 87, 0.18);
  border-radius: 10px;
  color: var(--green-deep);
  background: #f3faf6;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  touch-action: manipulation;
}

.course-lifecycle-tabs button span {
  display: inline-grid;
  min-width: 22px;
  min-height: 22px;
  margin-left: 6px;
  place-items: center;
  border-radius: 999px;
  background: rgba(47, 124, 87, 0.1);
  font-size: 11px;
}

.course-lifecycle-tabs button.is-active {
  color: #fff;
  border-color: var(--green-deep);
  background: var(--green-deep);
}

.course-lifecycle-tabs button.is-active span {
  background: rgba(255, 255, 255, 0.18);
}

.course-lifecycle-tabs button:focus-visible,
.course-archive-panel input:focus-visible,
.course-archive-panel button:focus-visible,
.weekly-course-card button:focus-visible {
  outline: 3px solid rgba(47, 124, 87, 0.28);
  outline-offset: 2px;
}

.weekly-course-status {
  flex: 0 0 auto;
  padding: 5px 10px;
  border-radius: 999px;
  color: var(--green-deep);
  background: var(--green-soft);
  font-size: 12px;
  font-weight: 800;
}

.weekly-course-main {
  justify-content: space-between;
  gap: 18px;
}

.weekly-course-cards {
  display: grid;
  gap: 14px;
}

.weekly-course-card {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}

.weekly-course-card.is-active {
  border-color: rgba(47, 124, 87, 0.42);
  box-shadow: 0 10px 28px rgba(35, 93, 66, 0.08);
}

.weekly-course-book {
  min-width: 180px;
}

.weekly-course-book strong,
.weekly-course-section strong {
  display: block;
  color: var(--ink);
}

.weekly-course-book strong {
  margin-bottom: 4px;
  font-size: 20px;
}

.weekly-course-book span,
.weekly-course-section span,
.weekly-course-empty {
  color: var(--muted);
  font-size: 13px;
}

.weekly-course-book-selector {
  display: grid;
  flex: 0 1 240px;
  min-width: 180px;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.weekly-course-book-selector select {
  width: 100%;
  min-height: 44px;
  padding: 0 36px 0 12px;
  border: 1px solid rgba(47, 124, 87, 0.28);
  border-radius: 10px;
  color: var(--ink);
  background: #fff;
  font: inherit;
  font-size: 14px;
  cursor: pointer;
  touch-action: manipulation;
}

.weekly-course-book-selector select:focus-visible {
  outline: 3px solid rgba(47, 124, 87, 0.28);
  outline-offset: 2px;
}

.weekly-course-detail {
  display: grid;
  grid-template-columns: repeat(2, minmax(180px, 1fr));
  flex: 1;
  gap: 10px;
}

.weekly-course-overview {
  min-width: 0;
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 10px;
  background: var(--green-soft);
}

.weekly-course-overview strong,
.weekly-course-summary strong,
.weekly-course-review strong {
  display: block;
  margin-bottom: 5px;
  color: var(--green-deep);
  font-size: 12px;
  letter-spacing: 0.04em;
}

.weekly-course-overview h3 {
  margin: 0 0 5px;
  color: var(--ink);
  font-size: 16px;
}

.weekly-course-overview p,
.weekly-course-summary p,
.weekly-course-review p {
  margin: 0;
  overflow-wrap: anywhere;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
  white-space: pre-wrap;
}

.weekly-course-book-content {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.weekly-course-summary,
.weekly-course-review {
  min-width: 0;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fbfdfc;
}

.weekly-course-review button {
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid rgba(47, 124, 87, 0.22);
  border-radius: 8px;
  color: var(--green-deep);
  background: #fff;
  font-size: 13px;
  font-weight: 800;
}

.weekly-course-section {
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdfc;
}

.weekly-course-section strong {
  margin-bottom: 4px;
  font-size: 13px;
}

.weekly-course-section span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.weekly-course-actions {
  flex: 0 0 auto;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 10px;
}

.weekly-course-actions button {
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid rgba(47, 124, 87, 0.18);
  border-radius: 8px;
  color: var(--green-deep);
  background: #f3faf6;
  font-size: 13px;
  font-weight: 800;
}

.course-archive-panel {
  min-width: 0;
  margin-bottom: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fbfdfc;
}

.course-archive-panel form label {
  display: block;
  margin-bottom: 7px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
}

.course-archive-panel form > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.course-archive-panel input,
.course-archive-panel button {
  min-width: 0;
  min-height: 44px;
  border: 1px solid rgba(47, 124, 87, 0.24);
  border-radius: 9px;
}

.course-archive-panel input {
  width: 100%;
  padding: 0 12px;
  color: var(--ink);
  background: #fff;
}

.course-archive-panel button {
  padding: 0 14px;
  color: #fff;
  background: var(--green-deep);
  font-weight: 800;
}

.course-archive-results {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.course-archive-results button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 10px 12px;
  color: var(--ink);
  background: #fff;
  text-align: left;
}

.course-archive-results button span {
  color: var(--muted);
  font-size: 12px;
}

.weekly-course-archive-error {
  color: #a13c32;
}

.weekly-course-actions button:first-child {
  color: #fff;
  background: var(--green-deep);
}

.weekly-course-empty {
  margin: 0;
  padding: 10px 0 2px;
  line-height: 1.65;
}

.weekly-course-error {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

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

.section-head h2 {
  margin: 2px 0 0;
  font-size: 24px;
}

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

.search-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  margin-bottom: 14px;
}

.search-row input,
.login-form input,
.login-form select,
.stack-form textarea,
.stack-form input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  color: var(--ink);
  background: #fbfdfc;
  outline: none;
}

.search-row input:focus,
.login-form input:focus,
.login-form select:focus,
.stack-form textarea:focus {
  border-color: rgba(47, 124, 87, 0.48);
  box-shadow: 0 0 0 4px rgba(47, 124, 87, 0.1);
}

.search-row button {
  min-width: 82px;
  border: 0;
  border-radius: 12px;
  font-weight: 900;
}

.theme-strip {
  display: flex;
  gap: 8px;
  overflow: auto;
  padding-bottom: 8px;
}

.theme-pill {
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 12px;
  color: var(--green-deep);
  background: #fff;
  font-size: 13px;
  font-weight: 900;
}

.theme-pill.active {
  color: #fff;
  background: var(--green-deep);
}

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

.book-card,
.task-card,
.note-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
  background: #fff;
  text-align: left;
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.book-card:hover,
.task-card:hover,
.note-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 28px rgba(25, 72, 51, 0.09);
}

.book-card-top,
.card-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.level-badge,
.mini-badge {
  border-radius: 999px;
  padding: 4px 8px;
  color: var(--green-deep);
  background: var(--green-soft);
  font-size: 11px;
  font-weight: 900;
}

.book-card h3,
.task-card h3,
.note-card h3 {
  margin: 10px 0 6px;
  font-size: 17px;
  line-height: 1.35;
}

.book-card p,
.task-card p,
.note-card p,
.report-item p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.tag-row span {
  border-radius: 999px;
  padding: 4px 8px;
  color: #517064;
  background: #f3f8f5;
  font-size: 11px;
  font-weight: 800;
}

.task-list,
.note-list {
  display: grid;
  gap: 10px;
  max-height: 430px;
  overflow: auto;
  padding-right: 4px;
}

.notes-panel {
  margin-top: 16px;
}

.notes-section-head {
  align-items: flex-start;
}

.notes-section-head p {
  max-width: 620px;
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.notes-head-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.note-count {
  border-radius: 999px;
  padding: 8px 11px;
  color: var(--green-deep);
  background: var(--green-soft);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.note-filter {
  display: inline-flex;
  gap: 4px;
  margin: 4px 0 18px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f5f8f6;
}

.note-filter button {
  min-height: 34px;
  border: 0;
  border-radius: 6px;
  padding: 0 14px;
  color: #5f7169;
  background: transparent;
  font-size: 13px;
  font-weight: 900;
}

.note-filter button.active {
  color: #fff;
  background: var(--green-deep);
  box-shadow: 0 4px 12px rgba(23, 77, 56, 0.16);
}

.notes-panel .note-list {
  max-height: none;
  overflow: visible;
  gap: 20px;
  padding-right: 0;
}

.note-history-group {
  display: grid;
  gap: 10px;
}

.note-history-group > header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  padding: 0 2px;
}

.note-history-group > header span {
  color: var(--green);
  font-size: 11px;
  font-weight: 900;
}

.note-history-group > header h3 {
  margin: 3px 0 0;
  color: var(--ink);
  font-size: 17px;
}

.note-history-group > header small {
  color: var(--muted);
  font-size: 12px;
}

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

.note-history-card {
  display: grid;
  width: 100%;
  min-width: 0;
  min-height: 184px;
  gap: 9px;
  color: var(--ink);
  font: inherit;
  cursor: pointer;
}

.note-history-card.is-family-guide {
  border-color: rgba(47, 124, 87, 0.24);
  background: linear-gradient(180deg, #ffffff 0%, #f8fcfa 100%);
}

.note-card-topline,
.note-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.note-card-topline b {
  border-radius: 999px;
  padding: 5px 8px;
  color: #725315;
  background: #fff4cf;
  font-size: 11px;
}

.note-history-card:not(.is-family-guide) .note-card-topline b {
  color: var(--green-deep);
  background: var(--green-soft);
}

.note-card-topline time {
  color: var(--muted);
  font-size: 11px;
}

.note-history-card > strong {
  overflow-wrap: anywhere;
  font-size: 17px;
  line-height: 1.45;
}

.note-source-line {
  display: block;
  border-left: 3px solid var(--green);
  padding: 7px 9px;
  color: #416556;
  background: #eef7f2;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.note-card-preview {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.note-card-foot {
  align-self: end;
  margin-top: 2px;
}

.note-card-foot em {
  color: #66786f;
  font-size: 11px;
  font-style: normal;
}

.note-card-foot i {
  color: var(--green-deep);
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
}

.note-detail-modal-card {
  width: min(620px, 100%);
}

.note-detail-category {
  display: inline-flex;
  border-radius: 999px;
  padding: 6px 9px;
  color: #725315;
  background: #fff4cf;
  font-size: 11px;
  font-weight: 900;
}

#note-detail-content > h2 {
  margin: 10px 42px 14px 0;
  color: var(--ink);
  font-size: 25px;
  line-height: 1.35;
}

.note-detail-source {
  border-left: 4px solid var(--green);
  padding: 12px 14px;
  background: #eef7f2;
}

.note-detail-source span,
.note-conversation-summary span {
  display: block;
  color: var(--green);
  font-size: 11px;
  font-weight: 900;
}

.note-detail-source strong {
  display: block;
  margin-top: 4px;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.55;
}

.note-detail-source p {
  margin: 7px 0 0;
  color: #52685e;
  font-size: 13px;
  line-height: 1.65;
}

.note-detail-meta {
  display: flex;
  gap: 8px;
  margin: 12px 0;
}

.note-detail-meta span {
  border-radius: 999px;
  padding: 5px 8px;
  color: #65766e;
  background: #f3f6f4;
  font-size: 11px;
}

.note-conversation-summary {
  display: grid;
  gap: 8px;
}

.note-conversation-summary section {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 13px;
  background: #fff;
}

.note-conversation-summary p {
  margin: 5px 0 0;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.65;
  white-space: pre-wrap;
}

.note-detail-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 14px;
}

.note-detail-actions button {
  min-height: 38px;
  border: 1px solid var(--green-deep);
  border-radius: 999px;
  padding: 0 14px;
  color: #fff;
  background: var(--green-deep);
  font-size: 12px;
  font-weight: 900;
}

.note-detail-actions .ghost-button {
  color: var(--green-deep);
  background: #fff;
}

.note-detail-actions .danger-button {
  color: #9a3c32;
  border-color: #d7a29b;
  background: #fff;
}

.note-detail-actions .danger-button.is-confirming {
  color: #fff;
  border-color: #a83e34;
  background: #a83e34;
}

.note-detail-operation-status {
  min-height: 20px;
  margin: 10px 0 0;
  color: #64766d;
  font-size: 12px;
  line-height: 1.5;
}

.note-detail-operation-status.is-error {
  color: #9a3c32;
}

.note-conversation-edit-form {
  display: grid;
  gap: 12px;
}

.note-conversation-edit-form label {
  display: grid;
  gap: 6px;
}

.note-conversation-edit-form label > span {
  color: var(--green-deep);
  font-size: 12px;
  font-weight: 900;
}

.note-conversation-edit-form select,
.note-conversation-edit-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 11px;
  color: var(--ink);
  background: #fff;
  outline: none;
}

.note-conversation-edit-form select:focus,
.note-conversation-edit-form textarea:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(47, 124, 87, 0.12);
}

.note-conversation-edit-form textarea {
  resize: vertical;
  line-height: 1.6;
}

.task-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.task-actions button,
.note-card button {
  border: 0;
  border-radius: 999px;
  padding: 8px 12px;
  color: #fff;
  background: var(--green);
  font-size: 12px;
  font-weight: 900;
}

.task-card .task-teacher-rating {
  display: inline-flex;
  margin-top: 10px;
  padding: 5px 8px;
  border-radius: 6px;
  color: #80591a;
  background: #fff4d8;
  font-weight: 900;
}

.task-card .task-teacher-comment {
  margin-top: 8px;
  padding: 9px 10px;
  border-left: 3px solid #d58b67;
  color: #624838;
  background: #fff7f2;
}

.task-actions > span {
  color: #6e7d75;
  font-size: 12px;
  font-weight: 800;
}

#submission-preview span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

#submission-preview button {
  width: 22px;
  height: 22px;
  min-height: 22px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: #8a442d;
  background: #fff0e9;
  line-height: 22px;
}

.report-panel {
  margin-top: 16px;
}

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

.report-item {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
  color: var(--ink);
  background: #fff;
  text-align: left;
}

.report-item strong {
  display: block;
  margin: 4px 0 6px;
  color: var(--green-deep);
  font-size: 20px;
}

.family-guide-panel {
  margin-bottom: 16px;
}

.family-guide-panel[hidden],
.top-nav button[hidden] {
  display: none !important;
}

.guide-count {
  border-radius: 999px;
  padding: 6px 10px;
  color: var(--green-deep);
  background: var(--green-soft);
  font-size: 12px;
  font-weight: 900;
}

.guide-layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.guide-layout.current-course-guide {
  grid-template-columns: minmax(0, 1fr);
}

.guide-picker {
  position: sticky;
  top: 92px;
  display: grid;
  gap: 12px;
}

.guide-column-note {
  border: 1px solid rgba(47, 124, 87, 0.18);
  border-radius: 14px;
  padding: 13px;
  background: #f2faf5;
}

.guide-column-note span {
  display: block;
  margin-bottom: 6px;
  color: var(--green-deep);
  font-size: 13px;
  font-weight: 900;
}

.guide-column-note p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}

.guide-search-row {
  margin-bottom: 0;
}

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

.guide-book-option {
  display: grid;
  gap: 5px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 13px;
  color: var(--ink);
  background: #fff;
  text-align: left;
}

.guide-book-option span {
  color: var(--green);
  font-size: 12px;
  font-weight: 900;
}

.guide-book-option strong {
  font-size: 16px;
  line-height: 1.35;
}

.guide-book-option small {
  color: var(--muted);
  line-height: 1.5;
}

.guide-book-option b {
  justify-self: start;
  border-radius: 999px;
  padding: 5px 9px;
  color: var(--green-deep);
  background: var(--green-soft);
  font-size: 12px;
  font-weight: 900;
}

.guide-book-option.active {
  border-color: var(--green-deep);
  background: #f0f8f3;
  box-shadow: 0 12px 24px rgba(25, 72, 51, 0.08);
}

.guide-reader {
  --guide-theme: var(--green);
  --guide-accent: #f2b84b;
  display: grid;
  gap: 14px;
}

.guide-desktop-reader {
  display: grid;
  gap: 14px;
}

.guide-mobile-reader {
  display: none;
}

.guide-cover,
.guide-intro,
.guide-question-card,
.guide-back-cover {
  border: 1px solid rgba(47, 124, 87, 0.14);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 14px 34px rgba(25, 72, 51, 0.08);
}

.guide-cover {
  position: relative;
  overflow: hidden;
  min-height: 310px;
  padding: 28px;
  color: #fff;
  background:
    linear-gradient(135deg, var(--guide-theme), #63af83),
    var(--guide-theme);
}

.guide-cover::before,
.guide-back-cover::before {
  content: "";
  position: absolute;
  inset: auto -34px -42px auto;
  width: 230px;
  height: 118px;
  transform: rotate(-10deg);
  background: var(--guide-accent);
  opacity: 0.72;
}

.guide-cover-mark {
  position: absolute;
  top: 22px;
  right: 24px;
  border-radius: 999px;
  padding: 7px 12px;
  color: var(--guide-theme);
  background: rgba(255, 255, 255, 0.92);
  font-size: 12px;
  font-weight: 900;
}

.guide-cover .eyebrow {
  color: rgba(255, 255, 255, 0.84);
}

.guide-cover h3 {
  max-width: 560px;
  margin: 36px 0 6px;
  font-size: clamp(36px, 6vw, 74px);
  line-height: 1;
}

.guide-cover strong {
  display: block;
  font-size: 25px;
}

.guide-cover p {
  max-width: 620px;
  margin: 16px 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: 15px;
  line-height: 1.8;
}

.guide-cover small {
  display: block;
  margin-top: 18px;
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.5;
}

.guide-tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.guide-tag-row span {
  border-radius: 999px;
  padding: 7px 10px;
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  font-size: 12px;
  font-weight: 900;
}

.guide-intro {
  padding: 20px;
  border-left: 8px solid var(--guide-accent);
}

.guide-intro h3 {
  margin: 4px 0 8px;
  font-size: 22px;
}

.guide-intro p,
.guide-question-body p,
.guide-back-cover p {
  margin: 0;
  color: var(--muted);
  line-height: 1.75;
}

.guide-question-stack {
  display: grid;
  gap: 12px;
}

.guide-document-panel {
  display: grid;
  gap: 10px;
  border: 1px solid rgba(47, 124, 87, 0.16);
  border-radius: 16px;
  padding: 14px;
  background: #f8fffb;
}

.guide-document-panel > span {
  color: var(--green-deep);
  font-size: 13px;
  font-weight: 900;
}

.guide-document-list {
  display: grid;
  gap: 8px;
}

.guide-document-link {
  display: grid;
  gap: 4px;
  border: 1px solid rgba(47, 124, 87, 0.18);
  border-radius: 13px;
  padding: 12px;
  color: var(--ink);
  background: #fff;
  text-decoration: none;
}

.guide-document-link strong {
  color: var(--green-deep);
  font-size: 15px;
  line-height: 1.35;
}

.guide-document-link small {
  color: var(--muted);
  font-weight: 800;
}

.guide-document-link:hover {
  border-color: var(--green);
  background: #f2faf5;
}

.guide-question-card {
  overflow: hidden;
}

.guide-question-card summary {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 16px;
  list-style: none;
}

.guide-question-card summary::-webkit-details-marker {
  display: none;
}

.guide-question-index {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  color: #fff;
  background: var(--guide-theme);
  font-weight: 900;
}

.guide-question-card.is-ai .guide-question-index {
  background: #6c4bb3;
}

.guide-question-card summary em {
  display: block;
  color: var(--green);
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
}

.guide-question-card summary strong {
  display: block;
  margin-top: 3px;
  font-size: 18px;
}

.guide-question-card summary b {
  color: var(--guide-accent);
  font-size: 15px;
  letter-spacing: 0;
}

.guide-question-body {
  display: grid;
  gap: 14px;
  padding: 0 16px 16px;
}

.guide-question-quick {
  display: grid;
  gap: 12px;
  padding: 0 16px 16px;
}

.guide-conversation-mini {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  max-width: 100%;
  border: 1px solid rgba(47, 124, 87, 0.18);
  border-radius: 999px;
  padding: 7px 11px;
  color: var(--green-deep);
  background: #fff;
  box-shadow: 0 5px 14px rgba(15, 83, 56, 0.06);
  font-size: 12px;
  font-weight: 900;
}

.guide-conversation-mini small {
  overflow: hidden;
  max-width: 126px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.guide-conversation-mini:active {
  transform: translateY(1px);
}

.guide-detail-entry-panel {
  display: grid;
  gap: 10px;
  border: 1px solid rgba(47, 124, 87, 0.16);
  border-radius: 14px;
  padding: 12px;
  background: #fbfdfc;
}

.guide-detail-entry-panel > span {
  color: var(--green-deep);
  font-size: 13px;
  font-weight: 900;
}

.guide-detail-entry-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.guide-detail-entry-grid button {
  display: grid;
  gap: 4px;
  min-height: 66px;
  border: 1px solid rgba(47, 124, 87, 0.16);
  border-radius: 12px;
  padding: 10px;
  color: var(--ink);
  background: #fff;
  text-align: left;
}

.guide-detail-entry-grid button strong,
.guide-detail-entry-grid button small {
  display: block;
}

.guide-detail-entry-grid button strong {
  color: var(--green-deep);
  font-size: 14px;
  line-height: 1.25;
}

.guide-detail-entry-grid button small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.guide-detail-entry-grid button:active {
  transform: translateY(1px);
}

.guide-conversation-detail {
  padding-bottom: 16px;
}

.guide-conversation-last,
.guide-conversation-form {
  display: grid;
  gap: 10px;
  margin: 0 16px 12px;
}

.guide-conversation-last {
  border: 1px solid rgba(242, 184, 75, 0.28);
  border-radius: 14px;
  padding: 12px;
  background: #fffaf0;
}

.guide-conversation-last span,
.guide-conversation-field > label {
  color: var(--green-deep);
  font-size: 13px;
  font-weight: 900;
}

.guide-conversation-last p {
  margin: 0;
  color: var(--ink);
  line-height: 1.7;
}

.guide-conversation-field {
  display: grid;
  gap: 7px;
}

.guide-conversation-form select,
.guide-conversation-form textarea {
  position: relative;
  z-index: 2;
  display: block;
  box-sizing: border-box;
  width: 100%;
  border: 1px solid rgba(47, 124, 87, 0.2);
  border-radius: 12px;
  padding: 10px 12px;
  outline: 2px solid transparent;
  outline-offset: 0;
  color: var(--ink);
  background: #fff;
  box-shadow: none;
  font: inherit;
  pointer-events: auto;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  -webkit-user-select: text;
  user-select: text;
}

.guide-conversation-form select {
  min-height: 46px;
}

.guide-conversation-form textarea {
  min-height: 78px;
  resize: vertical;
  line-height: 1.6;
}

.guide-conversation-form select:focus,
.guide-conversation-form textarea:focus,
.guide-conversation-form select:focus-visible,
.guide-conversation-form textarea:focus-visible {
  border-color: var(--green);
  outline-color: transparent;
  box-shadow: 0 0 0 3px rgba(47, 124, 87, 0.14);
}

.guide-conversation-status-text {
  margin: -2px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.guide-conversation-status-text.is-error {
  color: #b23b2e;
  font-weight: 900;
}

.guide-conversation-save-row {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.guide-conversation-save-row button {
  border: 0;
  border-radius: 999px;
  padding: 9px 15px;
  color: #fff;
  background: var(--green-deep);
  font-weight: 900;
}

.guide-conversation-save-row .ghost-button {
  border: 1px solid rgba(47, 124, 87, 0.18);
  color: var(--green-deep);
  background: #f7fbf9;
}

.guide-conversation-save-row button:disabled {
  opacity: 0.62;
}

.guide-coach-panel {
  display: grid;
  gap: 10px;
  border: 1px solid rgba(242, 184, 75, 0.35);
  border-radius: 14px;
  padding: 13px;
  background: #fffaf0;
}

.guide-coach-panel > span,
.guide-recommend-panel > div:first-child span {
  color: var(--green-deep);
  font-size: 13px;
  font-weight: 900;
}

.guide-coach-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 9px;
}

.guide-coach-grid article {
  border-radius: 12px;
  padding: 11px;
  background: #fff;
}

.guide-coach-grid strong {
  display: block;
  margin-bottom: 6px;
  color: var(--green-deep);
  font-size: 13px;
}

.guide-coach-grid p {
  color: var(--ink);
  font-size: 14px;
  line-height: 1.65;
}

.guide-prompt {
  border-radius: 14px;
  padding: 14px;
  background: #f2faf5;
}

.guide-prompt span {
  display: inline-block;
  margin-bottom: 7px;
  border-radius: 999px;
  padding: 4px 8px;
  color: var(--green-deep);
  background: #fff;
  font-size: 12px;
  font-weight: 900;
}

.guide-prompt p {
  color: var(--ink);
  font-size: 17px;
  font-weight: 900;
}

.guide-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.guide-info-grid-single {
  grid-template-columns: 1fr;
}

.guide-info-grid section,
.guide-step {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 13px;
  background: #fbfdfc;
}

.guide-info-grid h4 {
  margin: 0 0 6px;
  color: var(--green-deep);
  font-size: 14px;
}

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

.guide-step {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
}

.guide-step span {
  color: var(--guide-theme);
  font-weight: 900;
}

.guide-step strong {
  display: block;
  margin-bottom: 5px;
}

.guide-back-cover {
  position: relative;
  overflow: hidden;
  padding: 30px;
  color: #fff;
  background:
    linear-gradient(135deg, #24362d, var(--guide-theme)),
    var(--guide-theme);
  text-align: center;
}

.guide-back-cover span {
  font-size: 12px;
  font-weight: 900;
  opacity: 0.78;
}

.guide-back-cover h3 {
  margin: 10px auto 8px;
  max-width: 520px;
  font-size: clamp(28px, 5vw, 46px);
  line-height: 1.1;
}

.guide-back-cover p {
  color: rgba(255, 255, 255, 0.84);
  font-weight: 900;
}

.guide-mobile-book,
.guide-part-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(25, 72, 51, 0.07);
}

.guide-mobile-book {
  width: 100%;
  padding: 16px;
  color: var(--ink);
  text-align: left;
}

.guide-mobile-book h3 {
  margin: 4px 0 8px;
  font-size: 22px;
}

.guide-mobile-book strong,
.guide-mobile-book small {
  display: block;
}

.guide-mobile-book strong {
  margin-bottom: 8px;
  color: var(--green-deep);
  font-size: 16px;
}

.guide-mobile-book p {
  margin: 0 0 10px;
  color: var(--muted);
  line-height: 1.65;
}

.guide-mobile-book small {
  color: var(--green);
  font-size: 12px;
  font-weight: 900;
}

.guide-mobile-preview {
  border-color: rgba(47, 124, 87, 0.28);
  background: linear-gradient(135deg, #f8fffb, #eef8f2);
}

.guide-mobile-preview.is-open {
  border-color: var(--green);
  background: #f2faf5;
}

.guide-mobile-part-list {
  display: grid;
  gap: 10px;
}

.guide-mobile-part-list-modal {
  max-height: min(62vh, 560px);
  overflow: auto;
  padding-right: 2px;
}

.guide-part-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: center;
  width: 100%;
  padding: 13px;
  color: var(--ink);
  text-align: left;
}

.guide-part-card > span {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  color: #fff;
  background: var(--guide-theme);
  font-size: 12px;
  font-weight: 900;
}

.guide-part-card.is-ai > span {
  background: #6c4bb3;
}

.guide-part-card strong,
.guide-part-card small {
  display: block;
}

.guide-part-card strong {
  font-size: 16px;
  line-height: 1.35;
}

.guide-part-card small {
  margin-top: 3px;
  color: var(--muted);
  line-height: 1.45;
  overflow-wrap: anywhere;
  white-space: normal;
}

.guide-card-difficulty {
  display: inline-flex;
  width: fit-content;
  margin-top: 8px;
  border-radius: 999px;
  padding: 4px 8px;
  color: var(--green-deep);
  background: var(--green-soft);
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
}

.guide-part-card.is-recommended {
  border-color: rgba(242, 184, 75, 0.58);
  background: #fffdf7;
}

.guide-part-card i {
  display: inline-flex;
  width: fit-content;
  margin-top: 7px;
  border-radius: 999px;
  padding: 4px 8px;
  color: #8a5a00;
  background: #fff0bf;
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
}

.guide-part-card b {
  color: var(--green);
  font-size: 24px;
  line-height: 1;
}

.guide-detail-card #guide-detail-content {
  --guide-theme: var(--green);
  --guide-accent: #f2b84b;
}

.guide-layer-back {
  width: fit-content;
  margin: 0 0 10px;
  border: 1px solid rgba(27, 102, 71, 0.16);
  border-radius: 999px;
  padding: 8px 12px;
  color: var(--green-deep);
  background: #f2faf5;
  font-size: 13px;
  font-weight: 900;
}

.guide-question-collection {
  display: grid;
  gap: 14px;
}

.guide-question-collection-head {
  border-radius: 18px;
  padding: 22px;
  color: #fff;
  background:
    linear-gradient(135deg, var(--guide-theme), #63af83),
    var(--guide-theme);
}

.guide-question-collection-head .eyebrow {
  color: rgba(255, 255, 255, 0.82);
}

.guide-question-collection-head h2 {
  margin: 8px 0 5px;
  font-size: clamp(28px, 5vw, 48px);
  line-height: 1.08;
}

.guide-question-collection-head strong {
  display: block;
  font-size: 19px;
}

.guide-question-collection-head p {
  max-width: 720px;
  margin: 12px 0;
  color: rgba(255, 255, 255, 0.88);
  line-height: 1.75;
}

.guide-question-collection-head small {
  display: block;
  margin-top: 12px;
  color: rgba(255, 255, 255, 0.82);
  font-weight: 900;
}

.guide-recommend-panel {
  display: grid;
  gap: 10px;
  border: 1px solid rgba(242, 184, 75, 0.36);
  border-radius: 16px;
  padding: 13px;
  background: #fffaf0;
}

.guide-recommend-panel > div:first-child p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.guide-recommend-list {
  display: grid;
  gap: 8px;
}

.guide-recommend-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: center;
  width: 100%;
  border: 1px solid rgba(242, 184, 75, 0.42);
  border-radius: 13px;
  padding: 10px;
  color: var(--ink);
  background: #fff;
  text-align: left;
}

.guide-recommend-card > span {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  color: #fff;
  background: var(--guide-theme);
  font-size: 12px;
  font-weight: 900;
}

.guide-recommend-card.is-ai > span {
  background: #6c4bb3;
}

.guide-recommend-card strong,
.guide-recommend-card small {
  display: block;
}

.guide-recommend-card strong {
  font-size: 15px;
  line-height: 1.35;
}

.guide-recommend-card small {
  margin-top: 3px;
  color: var(--muted);
  line-height: 1.45;
}

.guide-question-stack-modal {
  gap: 14px;
}

.guide-question-stack-modal .guide-question-detail {
  border-color: rgba(47, 124, 87, 0.18);
}

.guide-question-detail {
  box-shadow: none;
}

.guide-detail-head {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: center;
  padding: 16px;
}

.guide-detail-head em {
  display: block;
  color: var(--green);
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
}

.guide-detail-head h3 {
  margin: 3px 0;
  font-size: 22px;
  line-height: 1.25;
}

.guide-detail-head small {
  color: var(--guide-accent);
  font-weight: 900;
}

.guide-question-section-detail {
  box-shadow: none;
}

.guide-section-head {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: center;
  padding: 16px;
}

.guide-section-head em {
  display: block;
  color: var(--green);
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
}

.guide-section-head h3 {
  margin: 3px 0;
  font-size: 22px;
  line-height: 1.25;
}

.guide-section-head p {
  margin: 4px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.guide-section-body {
  padding-top: 0;
}

.detail-meta-row,
.modal-action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0;
}

.detail-meta-row span {
  border-radius: 999px;
  padding: 6px 10px;
  color: var(--green-deep);
  background: var(--green-soft);
  font-size: 12px;
  font-weight: 900;
}

.detail-block.single {
  margin-top: 12px;
}

.detail-block.single p,
#report-detail-content p {
  margin: 0;
  color: var(--muted);
  line-height: 1.75;
}

.modal-action-row {
  justify-content: flex-end;
  margin-top: 16px;
}

.modal-action-row button {
  min-height: 40px;
  border: 0;
  border-radius: 999px;
  padding: 0 14px;
  color: #fff;
  background: var(--green);
  font-weight: 900;
}

.report-detail-value {
  display: block;
  margin: 10px 0;
  color: var(--green-deep);
  font-size: 30px;
  line-height: 1.1;
}

.modal-mask {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(12, 30, 22, 0.38);
}

.modal-mask.show {
  display: flex;
}

.modal-card {
  position: relative;
  width: min(720px, 100%);
  max-height: min(86vh, 820px);
  overflow: auto;
  border-radius: 20px;
  padding: 22px;
  background: #fff;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.24);
}

.modal-card.small {
  width: min(460px, 100%);
}

.modal-card.large {
  width: min(900px, 100%);
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 999px;
  color: var(--green-deep);
  background: var(--green-soft);
  font-size: 18px;
  font-weight: 900;
}

.modal-mask.auth-required .modal-close {
  display: none;
}

.login-tabs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin: 14px 0;
  padding: 5px;
  border-radius: 999px;
  background: #f0f6f3;
}

.login-tabs button {
  border: 0;
  border-radius: 999px;
  padding: 10px;
  color: var(--green-deep);
  background: transparent;
  font-weight: 900;
}

.login-tabs button.active {
  color: #fff;
  background: var(--green-deep);
}

.login-form,
.stack-form,
.student-list {
  display: grid;
  gap: 12px;
}

.register-fields {
  display: none;
  gap: 12px;
}

.register-fields.show {
  display: grid;
}

.register-student-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(104px, 0.42fr);
  gap: 10px;
  align-items: end;
}

.login-form select {
  min-height: 44px;
  appearance: auto;
}

.account-summary {
  display: grid;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
  background: #fbfdfc;
}

.account-summary span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.login-form label,
.stack-form label {
  display: grid;
  gap: 6px;
  color: #3f5149;
  font-size: 13px;
  font-weight: 900;
}

.login-form button,
.stack-form button[type="submit"] {
  min-height: 44px;
  border: 0;
  border-radius: 12px;
  font-weight: 900;
}

.hidden {
  display: none !important;
}

.form-hint,
.empty-state {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.student-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
  background: #fff;
}

.book-detail-title {
  margin: 4px 0 6px;
  font-size: 30px;
}

.detail-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 16px;
}

.detail-block {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
  background: #fbfdfc;
}

.detail-block h3 {
  margin: 0 0 10px;
  font-size: 17px;
}

.detail-block li {
  margin: 7px 0;
  color: #41554b;
  line-height: 1.6;
}

.file-box {
  position: relative;
  border: 1px dashed rgba(47, 124, 87, 0.34);
  border-radius: 14px;
  padding: 14px;
  color: var(--green-deep);
  background: #f7fbf8;
  text-align: center;
}

.file-box input {
  position: absolute;
  inset: 0;
  opacity: 0;
}

.file-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.file-preview span {
  border-radius: 999px;
  padding: 6px 9px;
  color: #52665c;
  background: #f0f6f3;
  font-size: 12px;
}

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

.note-audio-recorder {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #f7fbf8;
}

.note-audio-recorder-head {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
}

.note-audio-recorder-head strong {
  font-size: 14px;
}

.note-audio-recorder-head small {
  min-width: 0;
  color: var(--muted);
}

.note-audio-recorder-head button {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 12px;
  color: var(--green-deep);
  background: #fff;
  font-size: 12px;
  font-weight: 900;
}

.recording-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #7e8d85;
}

.note-audio-recorder.is-recording .recording-dot {
  background: #d84b3e;
  box-shadow: 0 0 0 4px rgba(216, 75, 62, 0.13);
  animation: note-recording-pulse 1.1s ease-in-out infinite;
}

@keyframes note-recording-pulse {
  50% { opacity: 0.45; }
}

.note-audio-preview {
  display: none;
  gap: 8px;
}

.note-audio-preview.show {
  display: grid;
}

.note-audio-item {
  display: grid;
  grid-template-columns: minmax(110px, 0.8fr) minmax(180px, 1.4fr) auto;
  align-items: center;
  gap: 10px;
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.note-audio-item > div {
  min-width: 0;
}

.note-audio-item strong,
.note-audio-item small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.note-audio-item strong {
  font-size: 13px;
}

.note-audio-item small {
  margin-top: 3px;
  color: var(--muted);
}

.note-audio-item audio {
  width: 100%;
  height: 36px;
}

.note-audio-item > button {
  border: 0;
  padding: 6px;
  color: #a33a2c;
  background: transparent;
  font-size: 12px;
  font-weight: 900;
}

.note-tools,
.note-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.note-tools button,
.note-actions button,
.danger-button {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 9px 12px;
  color: var(--green-deep);
  background: #fff;
  font-size: 12px;
  font-weight: 900;
}

.danger-button {
  color: #a33a2c;
}

.note-image-preview {
  display: none;
  width: 100%;
  margin-top: 12px;
  border-radius: 16px;
  border: 1px solid var(--line);
}

.note-image-preview.show {
  display: block;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 80;
  display: none;
  transform: translateX(-50%);
  border-radius: 999px;
  padding: 12px 18px;
  color: #fff;
  background: rgba(23, 77, 56, 0.94);
  font-size: 14px;
  font-weight: 900;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.2);
}

.toast.show {
  display: block;
}

@media (max-width: 960px) {
  .student-topbar,
  .hero-shell,
  .workspace-grid {
    grid-template-columns: 1fr;
  }

  .top-nav {
    justify-content: flex-start;
    overflow: auto;
  }

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

  .guide-layout {
    grid-template-columns: 1fr;
  }

  .guide-picker {
    position: static;
  }

  .guide-info-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .student-app {
    width: min(100% - 18px, 1180px);
    padding-top: 8px;
  }

  .weekly-course-panel {
    margin: 12px 0;
    padding: 14px;
  }

  .weekly-course-main,
  .weekly-course-error {
    align-items: stretch;
    flex-direction: column;
  }

  .weekly-course-detail {
    grid-template-columns: 1fr;
  }

  .weekly-course-book-content {
    grid-template-columns: 1fr;
  }

  .weekly-course-book,
  .weekly-course-book-selector {
    width: 100%;
    min-width: 0;
  }

  .weekly-course-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .course-lifecycle-tabs button {
    padding-inline: 6px;
    font-size: 12px;
  }

  .course-archive-results button {
    align-items: flex-start;
    flex-direction: column;
    gap: 3px;
  }

  .student-topbar {
    grid-template-columns: minmax(0, 1fr) auto;
    padding: 10px;
    border-radius: 14px;
    gap: 10px;
  }

  .brand-block img {
    width: 92px;
  }

  .account-chip {
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
    min-height: 34px;
    padding: 0 16px;
    white-space: nowrap;
  }

  .top-nav {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .top-nav button {
    min-width: max-content;
    padding: 0 12px;
  }

  .student-app[data-active-view] .hero-shell,
  .student-app[data-active-view] #home-view,
  .student-app[data-active-view] .family-guide-panel,
  .student-app[data-active-view] .workspace-grid,
  .student-app[data-active-view] .report-panel,
  .student-app[data-active-view] [data-view-panel] {
    display: none;
  }

  .student-app[data-active-view="home"] .hero-shell,
  .student-app[data-active-view="home"] #home-view {
    display: grid;
  }

  .student-app[data-active-view="family-guide"] .family-guide-panel,
  .student-app[data-active-view="family-guide"] [data-view-panel="family-guide"],
  .student-app[data-active-view="catalog"] .workspace-grid,
  .student-app[data-active-view="catalog"] [data-view-panel="catalog"],
  .student-app[data-active-view="tasks"] .workspace-grid,
  .student-app[data-active-view="tasks"] .side-stack,
  .student-app[data-active-view="tasks"] [data-view-panel="tasks"],
  .student-app[data-active-view="notes"] .workspace-grid,
  .student-app[data-active-view="notes"] .side-stack,
  .student-app[data-active-view="notes"] [data-view-panel="notes"],
  .student-app[data-active-view="report"] .report-panel,
  .student-app[data-active-view="report"] [data-view-panel="report"] {
    display: block;
  }

  .student-app[data-active-view="catalog"] .side-stack,
  .student-app[data-active-view="tasks"] [data-view-panel="notes"],
  .student-app[data-active-view="notes"] [data-view-panel="tasks"],
  .student-app[data-active-view="tasks"] .main-panel,
  .student-app[data-active-view="notes"] .main-panel {
    display: none;
  }

  .hero-copy,
  .hero-card,
  .panel {
    padding: 16px;
    border-radius: 16px;
  }

  .notes-section-head {
    display: grid;
    gap: 12px;
  }

  .notes-head-actions {
    justify-content: space-between;
  }

  .note-filter {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: 100%;
  }

  .note-filter button {
    min-width: 0;
    padding: 0 8px;
  }

  .note-history-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .note-history-card {
    min-height: 0;
  }

  #note-detail-content > h2 {
    font-size: 22px;
  }

  .note-detail-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .note-attachment-grid {
    grid-template-columns: 1fr 1fr;
  }

  .note-audio-recorder-head {
    grid-template-columns: auto auto minmax(0, 1fr);
  }

  .note-audio-recorder-head button {
    grid-column: 1 / -1;
    width: 100%;
  }

  .note-audio-item {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .note-audio-item audio {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .hero-copy {
    min-height: 0;
  }

  .hero-copy h1 {
    font-size: 29px;
  }

  .overview-grid,
  .book-grid,
  .report-grid,
  .detail-columns {
    grid-template-columns: 1fr;
  }

  .guide-cover {
    min-height: 270px;
    padding: 22px;
  }

  .guide-cover h3 {
    font-size: 42px;
  }

  .guide-book-list {
    max-height: 150px;
    overflow: auto;
    padding-right: 2px;
  }

  .family-guide-panel.single-guide .guide-column-note,
  .family-guide-panel.single-guide .guide-book-list {
    display: none;
  }

  .family-guide-panel.single-guide .guide-picker {
    gap: 10px;
  }

  .guide-mobile-reader {
    display: grid;
    gap: 12px;
  }

  .guide-mobile-part-list {
    max-height: min(58vh, 520px);
    overflow: auto;
    padding-right: 2px;
  }

  .guide-desktop-reader {
    display: none;
  }

  .guide-question-card summary {
    grid-template-columns: auto 1fr;
  }

  .guide-question-card summary b {
    grid-column: 2;
  }

  .modal-mask {
    align-items: flex-end;
    padding: 10px;
  }

  .modal-card {
    max-height: 92vh;
    border-radius: 20px 20px 0 0;
    padding: 18px;
  }

  .guide-detail-card {
    width: 100%;
  }

  .guide-detail-card .guide-cover {
    min-height: 68vh;
  }

  .task-list,
  .note-list {
    max-height: none;
    overflow: visible;
  }

  .task-card,
  .note-card,
  .report-item {
    padding: 13px;
  }

  .report-item p,
  .task-card p,
  .note-card p {
    display: none;
  }
}
