:root {
  --ink: #332c26;
  --muted: #70675d;
  --line: #e8dfd2;
  --paper: #fffdf9;
  --wash: #faf7f0;
  --navy: #342d27;
  --accent: #7c3a20;
  --accent-soft: #f6e9dc;
  --teal: #367157;
  --teal-soft: #e9f2e9;
  --rose: #a84647;
  --rose-soft: #fbede9;
  --amber: #94641f;
  --amber-soft: #fcf1d9;
  --shadow: 0 14px 36px rgba(78, 55, 35, 0.07);
  --radius: 18px;
}

* { box-sizing: border-box; }

html { background: var(--wash); }

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 88% 0%, rgba(196, 153, 103, 0.12), transparent 27rem),
    var(--wash);
  font-family: Pretendard, "Noto Sans KR", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button, .button, a { -webkit-tap-highlight-color: transparent; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { color: var(--navy); letter-spacing: -0.035em; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  min-height: 72px;
  padding: 0 5vw;
  background: rgba(255, 253, 249, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; color: var(--navy); }
.brand__mark { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 11px; color: white; background: linear-gradient(135deg, #8a4128, var(--accent)); font-size: 13px; box-shadow: 0 7px 16px rgba(124, 58, 32, 0.2); }
.brand--large { font-size: 19px; }
.brand--large .brand__mark { width: 42px; height: 42px; }
.nav { display: flex; align-items: center; gap: 4px; padding: 5px; border-radius: 999px; background: var(--wash); }
.nav__link { padding: 8px 18px; border-radius: 999px; color: var(--muted); font-size: 14px; font-weight: 700; }
.nav__link:hover { color: var(--navy); background: var(--paper); }
.account { justify-self: end; display: flex; align-items: center; gap: 15px; color: var(--muted); font-size: 13px; }
.account strong { color: var(--ink); }
.inline-form { display: inline; margin: 0; }
.text-button { padding: 0; border: 0; color: var(--muted); background: transparent; cursor: pointer; }

.page { width: min(1180px, calc(100% - 40px)); margin: 0 auto; padding: 52px 0 80px; }
.page--narrow { width: min(760px, calc(100% - 40px)); }
.stack { display: flex; flex-direction: column; gap: 22px; }
.stack--large { gap: 40px; }
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.eyebrow { display: block; margin-bottom: 5px; color: var(--accent); font-size: 11px; font-weight: 800; letter-spacing: 0.13em; }
.muted, .empty { color: var(--muted); }
.document { line-height: 1.85; }
.document h2 { margin-top: 36px; font-size: 22px; }
.document a { color: var(--accent); text-decoration: underline; }
.document table { width: 100%; border-collapse: collapse; font-size: 14px; }
.document th, .document td { padding: 12px; border: 1px solid var(--line); text-align: left; vertical-align: top; }
.document th { background: var(--accent-soft); }
.document-footer { display: flex; justify-content: center; flex-wrap: wrap; gap: 18px; padding: 26px 20px; color: var(--muted); font-size: 13px; border-top: 1px solid var(--line); }
.empty { padding: 28px; text-align: center; }
.pre-wrap { white-space: pre-wrap; }

.hero, .page-heading, .profile-hero, .session-hero, .class-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}
.hero h1, .page-heading h1, .profile-hero h1, .session-hero h1, .class-hero h1 { margin-bottom: 8px; font-size: clamp(32px, 5vw, 48px); line-height: 1.1; }
.hero p, .page-heading p, .profile-hero p, .session-hero p, .class-hero p { margin-bottom: 0; color: var(--muted); }
.page-heading { align-items: center; margin-bottom: 8px; }

.flash { width: min(1180px, calc(100% - 40px)); margin: 18px auto -18px; padding: 13px 18px; border-radius: 12px; font-size: 14px; font-weight: 700; }
.flash--notice { color: #2e654c; background: var(--teal-soft); border: 1px solid #c7dfcb; }
.flash--alert { color: #933b3d; background: var(--rose-soft); border: 1px solid #eecbc7; }

.button { display: inline-flex; align-items: center; justify-content: center; min-height: 42px; padding: 10px 17px; border: 1px solid var(--accent); border-radius: 11px; color: white; background: var(--accent); font-weight: 750; cursor: pointer; box-shadow: 0 7px 15px rgba(124, 58, 32, 0.15); }
.button:hover { filter: brightness(0.97); transform: translateY(-1px); }
.button--secondary { color: var(--navy); background: var(--paper); border-color: var(--line); box-shadow: none; }
.button--dark { color: white; background: var(--navy); border-color: var(--navy); }
.button--full { width: 100%; }
.button-row { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; }

.live-pill { display: inline-flex; align-items: center; gap: 8px; width: fit-content; padding: 9px 13px; border: 1px solid #c7dfcb; border-radius: 999px; color: #2e654c; background: var(--teal-soft); font-size: 13px; font-weight: 800; }
.live-dot { width: 8px; height: 8px; border-radius: 999px; background: var(--teal); box-shadow: 0 0 0 4px rgba(54, 113, 87, 0.13); }
.tag { display: inline-flex; align-items: center; width: fit-content; padding: 5px 9px; border-radius: 999px; color: var(--accent); background: var(--accent-soft); font-size: 11px; font-weight: 800; }
.tag--soft { color: var(--muted); background: var(--wash); }
.status { display: inline-flex; width: fit-content; padding: 5px 9px; border-radius: 999px; font-size: 11px; font-weight: 800; color: var(--muted); background: var(--wash); }
.status--in-progress, .status--completed, .status--understood, .status--done { color: #2e654c; background: var(--teal-soft); }
.status--help-needed, .status--no-show { color: #933b3d; background: var(--rose-soft); }
.status--canceled { color: var(--muted); background: #ede7df; }
.status--working { color: var(--amber); background: var(--amber-soft); }

.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 12px; }
.section-heading h2 { margin: 0; font-size: 24px; }
.section-heading small, .subtle-link, .count { color: var(--muted); font-size: 13px; }
.subtle-link { font-weight: 750; }
.subtle-link:hover { color: var(--accent); }

.course-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.course-grid--single { grid-template-columns: 1fr; }
.course-card { display: flex; flex-direction: column; min-height: 220px; padding: 23px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); box-shadow: var(--shadow); transition: 160ms ease; }
.course-card:hover, .student-card:hover { border-color: #cda783; transform: translateY(-3px); box-shadow: 0 18px 45px rgba(78, 55, 35, 0.12); }
.course-card__top { display: flex; justify-content: space-between; align-items: center; color: var(--muted); font-size: 12px; }
.course-card h2, .course-card h3 { margin: 24px 0 8px; font-size: 22px; }
.course-card p { flex: 1; color: var(--muted); font-size: 14px; }
.course-card__session { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding-top: 14px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.teacher-stack { display: flex; align-items: center; gap: 6px; margin: 10px 0 16px; color: var(--muted); font-size: 12px; }

.dashboard-columns { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(300px, 0.75fr); gap: 30px; align-items: start; }
.dashboard-columns--student { grid-template-columns: minmax(0, 1.45fr) minmax(300px, 0.55fr); }
.student-list { overflow: hidden; }
.student-row { display: grid; grid-template-columns: auto minmax(120px, 1fr) minmax(140px, 1fr) auto; align-items: center; gap: 13px; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.student-row:last-child { border-bottom: 0; }
.student-row:hover { background: #fcf4e9; }
.student-row__main { display: flex; flex-direction: column; }
.student-row small, .student-row__goal { color: var(--muted); font-size: 12px; }
.avatar { display: inline-grid; flex: 0 0 auto; place-items: center; width: 42px; height: 42px; border-radius: 14px; color: var(--accent); background: var(--accent-soft); font-weight: 850; }
.avatar--small { width: 28px; height: 28px; border-radius: 9px; font-size: 10px; }
.avatar--large { width: 56px; height: 56px; border-radius: 18px; }
.avatar--xl { width: 78px; height: 78px; border-radius: 24px; font-size: 22px; }

.timeline { overflow: hidden; }
.timeline__item { position: relative; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; padding: 17px 18px; border-bottom: 1px solid var(--line); }
.timeline__item:last-child { border: 0; }
.timeline__item > span:nth-child(2) { display: flex; flex-direction: column; }
.timeline__item small { color: var(--muted); }
.timeline__dot { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }

.student-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.student-card { padding: 22px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); box-shadow: var(--shadow); transition: 160ms ease; }
.student-card__header { display: flex; justify-content: space-between; align-items: start; }
.student-card h2 { margin: 18px 0 2px; font-size: 22px; }
.student-card > p { color: var(--muted); }
.student-card dl { margin: 18px 0; padding: 13px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.student-card dl div { display: flex; justify-content: space-between; gap: 10px; padding: 3px 0; font-size: 13px; }
.student-card dt { color: var(--muted); }
.student-card dd { margin: 0; font-weight: 700; }
.student-card__goal { min-height: 64px; font-size: 13px; }
.student-card__goal span { display: block; margin-bottom: 4px; color: var(--accent); font-size: 10px; font-weight: 800; }
.search { display: flex; gap: 9px; max-width: 560px; }

.profile-hero { align-items: center; padding: 28px 30px; border-radius: 24px; color: var(--navy); background: linear-gradient(115deg, var(--paper) 30%, #f3e7d7); border: 1px solid #e7d6c1; }
.profile-hero__identity, .student-live__title { display: flex; align-items: center; gap: 18px; }
.student-tabs { position: sticky; top: 84px; z-index: 10; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px; padding: 6px; border: 1px solid var(--line); border-radius: 15px; background: rgba(255, 253, 249, .95); box-shadow: 0 10px 30px rgba(78, 55, 35, .08); backdrop-filter: blur(16px); }
.student-tabs__link { display: grid; place-items: center; min-height: 46px; border-radius: 10px; color: var(--muted); font-size: 14px; font-weight: 800; }
.student-tabs__link:hover { color: var(--navy); background: var(--wash); }
.student-tabs__link.is-active { color: white; background: var(--navy); }
.workspace-card { padding: 22px; }
.workspace-card h3 { margin: 10px 0 3px; }
.workspace-card summary { cursor: pointer; font-weight: 800; }
.workspace-card[open] summary { margin-bottom: 18px; }
.workspace-rows { overflow: hidden; border: 1px solid var(--line); border-radius: 12px; }
.workspace-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 13px 15px; border-bottom: 1px solid var(--line); }
.workspace-row:last-child { border-bottom: 0; }
.workspace-row > span { display: flex; flex-direction: column; min-width: 0; }
.workspace-row small { color: var(--muted); }
.profile-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.detail-card, .goal-card { padding: 24px; }
.detail-list { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 22px; margin: 22px 0 0; }
.detail-list div { min-width: 0; }
.detail-list dt { color: var(--muted); font-size: 11px; font-weight: 700; }
.detail-list dd { margin: 3px 0 0; font-size: 14px; font-weight: 750; word-break: break-word; }
.goal-card p { min-height: 70px; margin: 22px 0; font-size: 18px; line-height: 1.7; }
.class-chips { display: flex; flex-wrap: wrap; gap: 7px; }

.note-grid { display: grid; gap: 14px; }
.note-card { padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); box-shadow: 0 8px 24px rgba(78, 55, 35, 0.05); }
.note-card--important { border-left: 4px solid var(--rose); }
.note-card__meta, .note-card footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: var(--muted); font-size: 11px; }
.note-card h3 { margin: 15px 0 10px; }
.note-card > p { color: #554a40; font-size: 14px; }
.summary { padding: 14px; border-radius: 12px; background: var(--accent-soft); }
.summary span { color: var(--accent); font-size: 10px; font-weight: 850; }
.summary p { margin: 5px 0 0; font-size: 14px; }
.note-action { padding-top: 12px; border-top: 1px solid var(--line); }
.note-action strong { margin-right: 6px; color: var(--teal); }
.note-card footer { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--line); }

.task-list { padding: 8px 18px; }
.task { display: grid; grid-template-columns: auto 1fr; gap: 11px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); }
.task:last-child { border: 0; }
.task > span { display: flex; flex-direction: column; }
.task small { color: var(--muted); }
.task--done strong { color: var(--muted); text-decoration: line-through; }
.task__check { display: grid; place-items: center; width: 24px; height: 24px; padding: 0; border: 2px solid #cda783; border-radius: 8px; color: white; background: var(--paper); cursor: pointer; }
.task--done .task__check { border-color: var(--teal); background: var(--teal); }
.quick-panel { padding: 18px; }
.quick-panel summary { color: var(--navy); font-weight: 800; cursor: pointer; }
.quick-panel[open] summary { margin-bottom: 18px; }

.form-card { padding: 26px; }
.form-stack { display: flex; flex-direction: column; gap: 16px; }
.form-grid { display: grid; gap: 16px; }
.form-grid--two { grid-template-columns: 1fr 1fr; }
.field { display: flex; flex-direction: column; gap: 7px; color: var(--ink); font-size: 13px; font-weight: 750; }
.input { width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid #d9cdbd; border-radius: 10px; color: var(--ink); background: var(--paper); outline: none; }
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(124, 58, 32, 0.12); }
.textarea { resize: vertical; line-height: 1.55; }
.check-field { display: flex; gap: 8px; align-items: center; font-size: 13px; }
.error-summary { padding: 14px 16px; border-radius: 10px; color: #933b3d; background: var(--rose-soft); }
.error-summary ul { margin-bottom: 0; }

.class-hero { min-height: 220px; align-items: end; padding: 34px; border-radius: 24px; color: white; background: linear-gradient(130deg, #3b3028, #75523a); }
.class-hero h1, .class-hero p { color: white; }
.class-hero small { color: rgba(255, 255, 255, 0.67); }
.session-list { overflow: hidden; }
.session-row { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 13px; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.session-row:last-child { border: 0; }
.session-row > span:nth-child(2) { display: flex; flex-direction: column; }
.session-row small { color: var(--muted); }
.lesson-memo-list { border-top: 1px solid var(--line); }
.lesson-memo-row { display: grid; grid-template-columns: 150px minmax(0, 1fr) auto; align-items: center; gap: 16px; padding: 15px 8px; border-bottom: 1px solid var(--line); font-size: 14px; }
.lesson-memo-row:hover { background: var(--paper); }
.lesson-memo-row time { color: var(--muted); font-size: 13px; }
.lesson-memo-row__text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 400; }
@media (max-width: 640px) {
  .lesson-memo-row { grid-template-columns: minmax(0, 1fr) auto; gap: 8px 12px; }
  .lesson-memo-row time { grid-column: 1; grid-row: 1; }
  .lesson-memo-row > .status { grid-column: 2; grid-row: 1; }
  .lesson-memo-row__text { grid-column: 1 / -1; grid-row: 2; }
}

.session-hero { align-items: center; padding: 28px; border-radius: 22px; background: var(--paper); border: 1px solid var(--line); }
.session-hero__meta { display: flex; gap: 7px; margin-bottom: 12px; }
.live-summary { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); overflow: hidden; }
.live-summary div { display: flex; flex-direction: column; padding: 18px 22px; border-right: 1px solid var(--line); }
.live-summary div:last-child { border: 0; }
.live-summary strong { color: var(--navy); font-size: 28px; }
.live-summary span { color: var(--muted); font-size: 12px; }
.live-summary__alert strong { color: var(--rose); }
.answer { min-height: 104px; margin: 18px 0; padding: 14px; border-radius: 12px; background: var(--wash); }
.answer span { color: var(--muted); font-size: 10px; font-weight: 800; }
.answer p { margin: 6px 0 0; font-size: 14px; white-space: pre-wrap; }

.student-live { width: min(720px, 100%); margin: 0 auto; }
.response-form { padding: 22px; }
.response-form fieldset { padding: 0; border: 0; }
.response-form legend { margin-bottom: 10px; font-size: 13px; font-weight: 800; }
.status-choices { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.status-choices input { position: absolute; opacity: 0; pointer-events: none; }
.status-choices span { display: grid; place-items: center; min-height: 48px; padding: 8px; border: 1px solid var(--line); border-radius: 11px; color: var(--muted); text-align: center; cursor: pointer; }
.status-choices input:checked + span { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); font-weight: 800; }

.auth-shell { display: grid; grid-template-columns: 1fr minmax(360px, 440px); align-items: center; gap: 8vw; min-height: calc(100vh - 72px); width: min(1040px, calc(100% - 40px)); margin: 0 auto; padding: 50px 0; }
.auth-intro h1 { margin: 14px 0 20px; font-size: clamp(42px, 6vw, 68px); line-height: 1.08; }
.auth-intro p { max-width: 440px; color: var(--muted); font-size: 17px; }
.auth-card { padding: 34px; }
.auth-card h2 { margin: 30px 0 7px; font-size: 28px; }
.auth-card .form-stack { margin-top: 25px; }
.demo-hint { margin: 18px 0 0; padding: 10px; border-radius: 9px; color: var(--muted); background: var(--wash); font-size: 11px; text-align: center; }

.zoom-mode { min-width: 300px; background: var(--wash); }
.zoom-mode .flash { width: calc(100% - 24px); margin: 10px auto; }
.zoom-panel { width: 100%; max-width: 520px; margin-inline: auto; padding: 12px; gap: 14px; }
.zoom-header { display: flex; align-items: center; gap: 9px; padding: 5px 2px 8px; }
.zoom-header > div { display: flex; flex-direction: column; }
.zoom-header small { color: var(--muted); }
.connection { display: flex; align-items: center; gap: 5px; margin-left: auto; color: var(--teal); font-size: 11px; font-weight: 800; }
.connection i { width: 7px; height: 7px; border-radius: 50%; background: var(--teal); }
.connection:not(.is-connected) { color: var(--muted); }
.connection:not(.is-connected) i { background: var(--muted); }
[hidden] { display: none !important; }
.zoom-panel .session-hero { align-items: start; flex-direction: column; padding: 18px; }
.zoom-panel .session-hero h1 { font-size: 25px; }
.zoom-panel .live-summary { grid-template-columns: repeat(2, 1fr); }
.zoom-panel .live-summary div:nth-child(2) { border-right: 0; }
.zoom-panel .live-summary div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
.zoom-panel .section-heading { align-items: start; flex-direction: column; }
.zoom-header { flex-wrap: wrap; }
.zoom-selection, .interaction-composer, .interaction-response, .interaction-history { padding: 18px; min-width: 0; }
.zoom-selection.stack, .interaction-composer.stack { gap: 12px; }
.zoom-selection h1 { margin: 7px 0; font-size: 20px; line-height: 1.35; }
.zoom-selection h2, .lesson-interactions h2 { margin: 0 0 6px; font-size: 18px; }
.zoom-selection p, .lesson-interactions p { margin: 8px 0; font-size: 13px; overflow-wrap: anywhere; }
.zoom-selection select { width: 100%; min-width: 0; text-overflow: ellipsis; }
.zoom-student { display: flex; align-items: center; gap: 10px; }
.zoom-student > div { min-width: 0; overflow-wrap: anywhere; }
.zoom-notice { padding: 12px; border-radius: 10px; color: #6b5520; background: #fff7e5; font-size: 12px; line-height: 1.65; }
.zoom-lesson { padding-top: 14px; border-top: 1px solid var(--line); }
.zoom-other-actions { margin-top: 12px; font-size: 12px; color: var(--muted); }
.zoom-other-actions .button-row { margin-top: 10px; }
.zoom-panel summary { cursor: pointer; font-weight: 700; }
.zoom-switcher > form { margin-top: 12px; }
.zoom-other-actions [data-copy-lesson-link] { margin: 8px 0; }
.zoom-other-actions [data-copy-lesson-status] { display: block; }
.zoom-panel .detail-list { margin-top: 14px; grid-template-columns: 1fr; }
.zoom-mode .student-tabs { top: 8px; }
.zoom-mode .student-tabs__link { min-height: 40px; font-size: 13px; }
.zoom-tab-content { display: contents; }
.zoom-tab-content .workspace-card { padding: 18px; }
.zoom-tab-content .section-heading { align-items: flex-start; }
.zoom-student-surface { min-height: 100vh; }
.zoom-waiting { display: grid; place-items: center; align-content: center; gap: 24px; min-height: calc(100vh - 24px); color: var(--navy); font-size: 21px; letter-spacing: -.03em; }
.zoom-logo-orbit { position: relative; display: grid; place-items: center; width: 98px; height: 98px; border-radius: 31px; background: var(--paper); box-shadow: 0 20px 55px rgba(124, 58, 32, .16); }
.zoom-logo-orbit::before, .zoom-logo-orbit::after { position: absolute; content: ""; inset: -12px; border: 2px solid rgba(124, 58, 32, .22); border-radius: 38px; animation: zoom-logo-pulse 2.2s ease-out infinite; }
.zoom-logo-orbit::after { animation-delay: 1.1s; }
.zoom-logo-orbit .brand__mark { width: 58px; height: 58px; border-radius: 19px; font-size: 18px; }
@keyframes zoom-logo-pulse { 0% { transform: scale(.82); opacity: 0; } 28% { opacity: 1; } 100% { transform: scale(1.32); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .zoom-logo-orbit::before, .zoom-logo-orbit::after { animation: none; } }
.interaction-kinds { display: flex; gap: 8px; margin: 0; padding: 0; border: 0; }
.interaction-kinds legend { margin-bottom: 8px; font-size: 12px; font-weight: 700; }
.interaction-kinds label { display: flex; align-items: center; justify-content: center; gap: 5px; flex: 1; padding: 11px 6px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; font-size: 13px; }
.interaction-kinds label:has(input:checked) { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); }
.interaction-kinds input { accent-color: var(--accent); }
.interaction-sync { display: flex; align-items: start; justify-content: space-between; gap: 10px; padding: 0 3px; font-size: 11px; color: var(--muted); }
.interaction-sync a { white-space: nowrap; color: var(--accent); }
.interaction-item { border-top: 1px solid var(--line); padding-top: 15px; overflow-wrap: anywhere; }
.interaction-item__meta { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px; font-size: 11px; color: var(--muted); }
.interaction-item__meta strong { color: var(--accent); }
.interaction-item form { margin-top: 12px; }
.interaction-answer { margin-top: 12px; padding: 12px; background: #f5efe5; border-radius: 10px; font-size: 12px; }
.button:disabled { cursor: not-allowed; opacity: .55; transform: none; }
.tag--test { color: #745222; background: #fff1d6; border: 1px solid #efd5a2; vertical-align: middle; }
.danger-panel { border-color: #efc5c5; padding: 22px; }
.danger-panel summary { color: #aa3140; font-weight: 800; cursor: pointer; }
.danger-panel p { color: var(--muted); }
.deletion-counts { max-width: 420px; margin: 15px 0; padding: 0; list-style: none; }
.deletion-counts li { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--line); }
.button--danger { color: white; background: #ac3443; }
.button--danger:hover { background: #8c2533; }

@media (max-width: 900px) {
  .topbar { grid-template-columns: auto 1fr; padding: 8px 20px 0; }
  .nav { order: 3; grid-column: 1 / -1; justify-content: center; margin-bottom: 10px; }
  .account { font-size: 0; }
  .account strong, .account .text-button { font-size: 12px; }
  .course-grid, .student-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dashboard-columns, .dashboard-columns--student { grid-template-columns: 1fr; }
  .auth-shell { grid-template-columns: 1fr; max-width: 560px; }
  .auth-intro { display: none; }
}

@media (max-width: 620px) {
  .page, .page--narrow { width: min(100% - 24px, 1180px); padding: 28px 0 55px; }
  .hero, .page-heading, .profile-hero, .session-hero { align-items: flex-start; flex-direction: column; }
  .hero h1, .page-heading h1, .profile-hero h1, .session-hero h1 { font-size: 32px; }
  .course-grid, .student-grid, .profile-grid, .form-grid--two { grid-template-columns: 1fr; }
  .student-row { grid-template-columns: auto 1fr auto; }
  .student-row__goal { display: none; }
  .profile-hero { padding: 22px; }
  .profile-hero__identity { align-items: flex-start; }
  .student-tabs { top: 112px; }
  .detail-list { grid-template-columns: 1fr; }
  .live-summary { grid-template-columns: repeat(2, 1fr); }
  .live-summary div:nth-child(2) { border-right: 0; }
  .live-summary div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .status-choices { grid-template-columns: 1fr; }
  .auth-shell { width: calc(100% - 24px); }
  .auth-card { padding: 25px; }
  .search { flex-direction: column; }
}

/* Management workspace: stable rows, readable hierarchy and clear role boundaries. */
.nav__link[aria-current="page"] { color: var(--accent); background: var(--paper); box-shadow: 0 1px 5px #332c2610; }
.topbar { grid-template-columns: auto 1fr auto; gap: 24px; padding-inline: 3vw; }
.topbar .nav { justify-self: center; }
.management-page { gap: 24px; }
.management-page h1 { font-size: 32px; }
.table-scroll { width: 100%; overflow-x: auto; background: var(--paper); border: 1px solid var(--line); border-radius: 14px; }
.data-table { width: 100%; border-collapse: collapse; text-align: left; font-size: 14px; }
.data-table th { padding: 14px 18px; background: #f3eee5; color: var(--muted); font-size: 12px; font-weight: 750; white-space: nowrap; }
.data-table td { padding: 18px; border-top: 1px solid var(--line); vertical-align: middle; min-width: 100px; }
.data-table tbody tr:hover { background: #fcf8f1; }
.data-table .table-primary { display: block; color: var(--ink); font-weight: 750; min-width: 90px; }
.data-table a:hover { color: var(--accent); text-decoration: underline; }
.data-table td small { display: block; color: var(--muted); font-size: 12px; margin-top: 5px; }
.data-table td .tag + .table-primary { margin-top: 5px; }
.table-actions { white-space: nowrap; }
.table-actions a + a { margin-left: 15px; }
.zoom-entry { display: inline-flex; flex-direction: column; align-items: center; gap: 4px; white-space: nowrap; }
.zoom-entry small { color: var(--muted); font-size: 11px; }
.button--compact { padding: 7px 12px; min-height: 34px; font-size: 12px; }
.button:disabled { cursor: not-allowed; opacity: .65; }
.assignment-fieldset { border: 1px solid var(--line); border-radius: 12px; padding: 18px; display: grid; gap: 12px; max-height: 380px; overflow-y: auto; }
.assignment-fieldset legend { font-weight: 750; padding: 0 8px; }
.feedback-answer { background: var(--teal-soft); border-left: 3px solid var(--teal); padding: 18px; border-radius: 8px; }
.feedback-answer p { margin-top: 8px; }
a:focus-visible, button:focus-visible, .table-scroll:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.search { display: flex; flex-direction: row; flex-wrap: wrap; }
.search input[type="search"] { flex: 1 1 240px; }
.search select { flex: 0 1 160px; }
@media (max-width: 1000px) {
  .topbar { grid-template-columns: 1fr auto; padding: 14px 20px; gap: 12px; }
  .student-tabs { top: 138px; }
  .topbar .nav { grid-row: 2; grid-column: 1 / -1; justify-self: stretch; justify-content: center; }
}
@media (max-width: 600px) {
  .topbar { padding: 12px 16px; }
  .topbar .nav { overflow-x: auto; justify-content: flex-start; border-radius: 12px; }
  .nav__link { white-space: nowrap; font-size: 12px; padding: 8px 11px; }
  .topbar .account { font-size: 11px; gap: 8px; }
  .management-page .section-heading { flex-wrap: wrap; gap: 8px; }
  .section-heading > .muted { font-size: 12px; }
  .data-table td { padding: 14px; }
  .search { flex-direction: row; }
  .search input[type="search"] { flex: 1 1 100%; }
  .search select { flex: 1 1 120px; }
  .search .button { flex: 1 1 80px; }
}

#questions { scroll-margin-top: 150px; }

.student-tabs { display: flex; overflow-x: auto; }
.student-tabs__link { flex: 1 0 auto; white-space: nowrap; text-align: center; }
.learning-journal { background: var(--paper); border: 1px solid var(--line); border-radius: 14px; }
.learning-entry { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 24px; padding: 24px; border-bottom: 1px solid var(--line); }
.learning-entry:last-child { border-bottom: 0; }
.learning-entry__date { display: flex; align-items: flex-start; flex-direction: column; gap: 8px; }
.learning-entry__body h3 { margin-bottom: 0; }
.learning-entry__body > p { margin-top: 16px; }
#results { scroll-margin-top: 150px; }
@media (max-width: 600px) { .learning-entry { grid-template-columns: 1fr; gap: 16px; padding: 20px; } .learning-entry__date { flex-direction: row; align-items: center; } }

/* Monthly assessment insights and parent-report drafts. */
.insight-filters { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 14px; padding: 22px; }
.insight-filters .field { flex: 1 1 145px; min-width: 0; }
.insight-notice { padding: 14px 18px; border-radius: 12px; background: #f1e7d8; color: #775433; font-size: 14px; }
.insight-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 18px; }
.insight-stats article { padding: 24px; }
.insight-stats article > span { color: var(--muted); font-size: 14px; }
.insight-stats strong { display: block; margin-top: 16px; font-size: 38px; line-height: 1.2; font-variant-numeric: tabular-nums; }
.insight-stats strong small { margin-left: 6px; font-size: 16px; font-weight: 500; }
.insight-stats p { color: var(--muted); font-size: 13px; margin-bottom: 0; }
.trend-card { padding: 28px; min-width: 0; }
.chart-legend { display: flex; flex-wrap: wrap; gap: 20px; font-size: 13px; }
.chart-legend span::before { content: ''; display: inline-block; width: 24px; margin-right: 7px; vertical-align: middle; border-top: 3px solid #8b482b; }
.chart-legend .legend-peer::before { border-color: #678596; border-top-style: dashed; }
.trend-scroll { width: 100%; overflow-x: auto; margin: 24px 0; }
.trend-chart { width: 100%; min-width: 580px; display: block; }
.chart-grid { stroke: #e9e1d6; stroke-width: 1; }
.chart-tick { fill: #776b60; font-size: 12px; }
.chart-line { fill: none; stroke-width: 3; stroke-linejoin: round; stroke-linecap: round; }
.chart-line--score { stroke: #8b482b; }
.chart-line--average { stroke: #678596; stroke-dasharray: 7 6; }
.chart-dot { stroke: #fffdf9; stroke-width: 2; }
.chart-dot--score { fill: #8b482b; }
.chart-dot--average { fill: #678596; }
.trend-card .muted { font-size: 13px; line-height: 1.7; }
.trend-card caption { text-align: left; padding: 12px 16px; }
.insight-sharing, .report-callout { display: flex; justify-content: space-between; align-items: center; gap: 24px; padding: 26px; }
.report-callout { background: #f0e6d7; }
.report-subjects { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
.report-entry + .report-entry { padding-top: 18px; border-top: 1px solid var(--line); }
.report-preview { border-top: 5px solid #8b482b; line-height: 1.9; }
@media (max-width: 640px) {
  .trend-card { padding: 16px; }
  .insight-sharing, .report-callout { align-items: stretch; flex-direction: column; }
  .insight-filters { padding: 16px; }
  .report-subjects { grid-template-columns: minmax(0, 1fr); }
}
