:root {
  --bg: #f6f7f9;
  --surface: #ffffff;
  --surface-soft: #fafbfc;
  --text: #172033;
  --text-strong: #101828;
  --muted: #667085;
  --muted-light: #98a2b3;
  --border: #dfe3e8;
  --border-strong: #cfd5dc;
  --red: #dd2636;
  --red-hover: #c81f2f;
  --red-soft: #fff1f2;
  --red-border: #ffc9cf;
  --shadow: 0 8px 24px rgba(16, 24, 40, 0.06);
  --radius: 8px;
  --content: 1160px;
}

* {
  box-sizing: border-box;
}

html {
  color-scheme: light;
  background: var(--bg);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  color: var(--text);
  background: var(--bg);
  font-family: Pretendard, "Apple SD Gothic Neo", "Noto Sans KR", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.55;
  letter-spacing: 0;
}

button,
a,
input {
  font: inherit;
  letter-spacing: 0;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  color: inherit;
}

a {
  color: inherit;
}

svg {
  width: 20px;
  height: 20px;
  stroke-width: 1.8;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 8px;
  left: 8px;
  padding: 10px 14px;
  border-radius: 6px;
  color: #fff;
  background: var(--red);
  transform: translateY(-150%);
}

.skip-link:focus {
  transform: translateY(0);
}

.topbar {
  position: sticky;
  z-index: 30;
  top: 0;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.97);
}

.topbar__inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 28px;
  width: min(calc(100% - 40px), var(--content));
  min-height: 72px;
  margin: 0 auto;
}

.brand {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  gap: 11px;
  padding: 0;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.brand__mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--red-border);
  border-radius: 8px;
  color: var(--red);
  background: var(--red-soft);
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  color: var(--text-strong);
  font-size: 15px;
  line-height: 1.35;
}

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

.main-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-soft);
}

.main-nav button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  padding: 7px 13px;
  border: 0;
  border-radius: 6px;
  color: var(--muted);
  background: transparent;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.main-nav button:hover {
  color: var(--text);
  background: #fff;
}

.main-nav button.is-active {
  color: var(--red);
  background: #fff;
  box-shadow: 0 1px 4px rgba(16, 24, 40, 0.08);
}

.main-nav svg {
  width: 17px;
  height: 17px;
}

.student-name {
  display: inline-flex;
  align-items: center;
  justify-self: end;
  gap: 9px;
  color: var(--text-strong);
  font-size: 14px;
}

.student-name > span {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  color: #fff;
  background: var(--text);
  font-size: 14px;
  font-weight: 800;
}

.app-shell {
  width: min(calc(100% - 40px), var(--content));
  margin: 0 auto;
  padding: 48px 0 72px;
  outline: none;
}

.page-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  margin-bottom: 24px;
}

.eyebrow {
  margin: 0 0 7px;
  color: var(--red);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.page-header h1,
.page-header h2,
.detail-title h1 {
  margin: 0;
  color: var(--text-strong);
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1.25;
  word-break: keep-all;
}

.page-header p,
.detail-title p {
  margin: 9px 0 0;
  color: var(--muted);
}

.header-progress {
  flex: 0 0 260px;
}

.progress-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 13px;
}

.progress-label strong {
  color: var(--text-strong);
  font-size: 15px;
}

.progress-track {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #e8ebef;
}

.progress-track > span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--red);
  transition: width 220ms ease;
}

.hero-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(320px, 0.85fr);
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.hero-panel__main {
  padding: 38px 40px;
}

.hero-panel__side {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-left: 1px solid var(--border);
  background: var(--surface-soft);
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 0 0 12px;
  color: var(--red);
  font-size: 13px;
  font-weight: 800;
}

.hero-panel h2 {
  margin: 0;
  color: var(--text-strong);
  font-size: clamp(25px, 3vw, 34px);
  line-height: 1.3;
}

.hero-panel__main > p {
  margin: 10px 0 25px;
  color: var(--muted);
}

.hero-progress {
  max-width: 620px;
  margin: 0 0 28px;
}

.metric {
  display: flex;
  min-height: 122px;
  padding: 24px;
  flex-direction: column;
  justify-content: center;
  border-bottom: 1px solid var(--border);
}

.metric:nth-child(odd) {
  border-right: 1px solid var(--border);
}

.metric:nth-child(n + 3) {
  border-bottom: 0;
}

.metric span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.metric strong {
  margin-top: 5px;
  color: var(--text-strong);
  font-size: 25px;
  line-height: 1.2;
}

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

.primary-button,
.secondary-button,
.ghost-button,
.text-button,
.material-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 17px;
  border-radius: 7px;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.primary-button {
  border: 1px solid var(--red);
  color: #fff;
  background: var(--red);
}

.primary-button:hover {
  border-color: var(--red-hover);
  background: var(--red-hover);
}

.secondary-button,
.material-link {
  border: 1px solid var(--border-strong);
  color: var(--text-strong);
  background: #fff;
}

.secondary-button:hover,
.material-link:hover {
  border-color: var(--red);
  color: var(--red);
}

.ghost-button,
.text-button {
  min-height: 38px;
  padding: 7px 11px;
  border: 0;
  color: var(--muted);
  background: transparent;
}

.ghost-button:hover,
.text-button:hover {
  color: var(--text);
  background: #eef1f4;
}

.primary-button svg,
.secondary-button svg,
.ghost-button svg,
.text-button svg,
.material-link svg {
  width: 18px;
  height: 18px;
}

.section-block {
  margin-top: 28px;
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 13px;
}

.section-heading h2,
.section-heading h3 {
  margin: 0;
  color: var(--text-strong);
  font-size: 20px;
}

.section-heading p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.next-session {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 20px;
  padding: 20px 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.date-tile {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 7px;
  color: var(--red);
  background: var(--red-soft);
  font-weight: 800;
  line-height: 1.25;
}

.date-tile small {
  font-size: 11px;
}

.next-session h3 {
  margin: 0;
  color: var(--text-strong);
  font-size: 17px;
}

.next-session p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
}

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

.subject-card {
  position: relative;
  display: flex;
  min-height: 248px;
  padding: 22px;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  background: var(--surface);
  text-align: left;
  cursor: pointer;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.subject-card:hover {
  border-color: var(--red-border);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.subject-card.is-complete {
  border-color: var(--red-border);
  background: #fffafa;
}

.subject-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.subject-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--border);
  border-radius: 7px;
  color: var(--text);
  background: var(--surface-soft);
}

.subject-card.is-complete .subject-icon {
  border-color: var(--red-border);
  color: var(--red);
  background: var(--red-soft);
}

.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 26px;
  padding: 3px 9px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted);
  background: #fff;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.status-chip.is-complete,
.status-chip.is-current {
  border-color: var(--red-border);
  color: var(--red);
  background: var(--red-soft);
}

.status-chip svg {
  width: 13px;
  height: 13px;
}

.subject-card h2 {
  margin: 21px 0 5px;
  color: var(--text-strong);
  font-size: 21px;
}

.subject-card h3 {
  margin: 0;
  color: var(--text-strong);
  font-size: 16px;
  line-height: 1.45;
  word-break: keep-all;
}

.subject-card p {
  margin: 10px 0 22px;
  color: var(--muted);
  font-size: 13px;
}

.subject-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
  padding-top: 15px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.subject-card__footer svg {
  width: 17px;
  height: 17px;
  color: var(--red);
}

.outcome-band {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 20px;
  padding: 16px 18px;
  border-left: 3px solid var(--red);
  color: var(--text);
  background: var(--surface);
}

.outcome-band svg {
  flex: 0 0 auto;
  color: var(--red);
}

.completion-band {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 20px;
  padding: 19px 22px;
  border: 1px solid var(--red-border);
  border-radius: var(--radius);
  background: var(--red-soft);
}

.completion-band strong,
.completion-band span {
  display: block;
}

.completion-band strong {
  color: var(--text-strong);
}

.completion-band span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 13px;
}

.detail-back {
  margin: 0 0 20px;
}

.detail-title {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 25px;
}

.detail-title .subject-icon {
  flex: 0 0 auto;
  width: 48px;
  height: 48px;
  color: var(--red);
  background: var(--red-soft);
  border-color: var(--red-border);
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(300px, 0.72fr);
  gap: 18px;
}

.content-panel,
.action-panel {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.content-panel {
  padding: 28px;
}

.action-panel {
  align-self: start;
  padding: 24px;
  position: sticky;
  top: 96px;
}

.content-panel h2,
.action-panel h2 {
  margin: 0 0 16px;
  color: var(--text-strong);
  font-size: 18px;
}

.goal-list,
.check-list {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.goal-list li,
.check-list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 15px 0;
  border-bottom: 1px solid var(--border);
}

.goal-list li:last-child,
.check-list li:last-child {
  border-bottom: 0;
}

.goal-number {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 25px;
  height: 25px;
  border-radius: 50%;
  color: var(--red);
  background: var(--red-soft);
  font-size: 11px;
  font-weight: 800;
}

.check-box {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 22px;
  height: 22px;
  margin-top: 1px;
  border: 1px solid var(--border-strong);
  border-radius: 5px;
  color: transparent;
  background: #fff;
}

.check-box svg {
  width: 14px;
  height: 14px;
}

.is-done .check-box {
  border-color: var(--red);
  color: #fff;
  background: var(--red);
}

.panel-divider {
  height: 1px;
  margin: 24px 0;
  background: var(--border);
}

.material-summary {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 13px;
}

.material-link {
  width: 100%;
}

.complete-action {
  width: 100%;
  margin-top: 18px;
}

.complete-note {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.schedule-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.schedule-summary > div {
  padding: 19px 22px;
  border-right: 1px solid var(--border);
}

.schedule-summary > div:last-child {
  border-right: 0;
}

.schedule-summary span,
.schedule-summary strong {
  display: block;
}

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

.schedule-summary strong {
  margin-top: 5px;
  color: var(--text-strong);
  font-size: 21px;
}

.schedule-table {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.schedule-row {
  display: grid;
  grid-template-columns: 56px 120px minmax(140px, 0.75fr) minmax(280px, 1.65fr) 100px;
  align-items: center;
  min-height: 72px;
  border-bottom: 1px solid var(--border);
}

.schedule-row:last-child {
  border-bottom: 0;
}

.schedule-row.is-head {
  min-height: 44px;
  color: var(--muted);
  background: var(--surface-soft);
  font-size: 12px;
  font-weight: 800;
}

.schedule-row.is-current {
  box-shadow: inset 3px 0 0 var(--red);
  background: #fffafa;
}

.schedule-row > div {
  min-width: 0;
  padding: 12px 14px;
}

.schedule-row .session-number {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-align: center;
}

.schedule-date {
  color: var(--muted);
  font-size: 13px;
}

.schedule-title {
  color: var(--text-strong);
  font-weight: 800;
}

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

.schedule-status {
  text-align: right;
}

.reading-title {
  margin-bottom: 20px;
}

.quiz-progress {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 8px 20px;
  margin-bottom: 18px;
  padding: 16px 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.quiz-progress span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.quiz-progress strong {
  color: var(--text-strong);
}

.quiz-progress .progress-track {
  grid-column: 1 / -1;
}

.score-panel {
  display: grid;
  grid-template-columns: auto auto 1fr;
  align-items: center;
  gap: 28px;
  margin-bottom: 18px;
  padding: 20px 24px;
  border: 1px solid var(--red-border);
  border-radius: var(--radius);
  background: var(--red-soft);
}

.score-panel > div {
  min-width: 110px;
}

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

.score-panel span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.score-panel strong {
  margin-top: 2px;
  color: var(--red);
  font-size: 24px;
}

.score-panel p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  text-align: right;
}

.reading-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.88fr) minmax(0, 1.12fr);
  align-items: start;
  gap: 18px;
}

.reading-passage,
.reading-questions {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.reading-passage {
  position: sticky;
  top: 92px;
  overflow: hidden;
}

.reading-section-heading {
  padding: 20px 22px 17px;
  border-bottom: 1px solid var(--border);
}

.reading-section-heading > span {
  display: block;
  margin-bottom: 4px;
  color: var(--red);
  font-size: 11px;
  font-weight: 900;
}

.reading-section-heading h2 {
  margin: 0;
  color: var(--text-strong);
  font-size: 21px;
  line-height: 1.35;
}

.passage-copy {
  padding: 24px 24px 26px;
}

.passage-copy p {
  position: relative;
  margin: 0 0 20px;
  padding-left: 30px;
  color: #283244;
  font-family: Pretendard, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.88;
}

.passage-copy p:last-child {
  margin-bottom: 0;
}

.passage-copy p > span {
  position: absolute;
  top: 1px;
  left: 0;
  color: var(--red);
  font-size: 12px;
  font-weight: 800;
}

.reading-questions {
  overflow: hidden;
}

.question-block {
  min-width: 0;
  margin: 0;
  padding: 22px;
  border: 0;
  border-bottom: 1px solid var(--border);
}

.question-block:last-child {
  border-bottom: 0;
}

.question-block legend {
  display: block;
  width: 100%;
  margin: 0 0 14px;
  padding: 0;
  color: var(--text-strong);
  font-size: 15px;
  font-weight: 800;
  line-height: 1.55;
}

.question-block legend > span {
  display: inline-block;
  margin-right: 8px;
  color: var(--red);
  font-size: 12px;
}

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

.option-row {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  align-items: start;
  gap: 10px;
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 7px;
  color: #354052;
  background: var(--surface-soft);
  cursor: pointer;
}

.option-row:hover {
  border-color: var(--border-strong);
  background: #fff;
}

.option-row input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.option-letter {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border: 1px solid var(--border-strong);
  border-radius: 50%;
  color: var(--muted);
  background: #fff;
  font-size: 12px;
  font-weight: 900;
}

.option-row.is-selected {
  border-color: var(--red);
  background: var(--red-soft);
}

.option-row.is-selected .option-letter,
.option-row.is-correct .option-letter {
  border-color: var(--red);
  color: #fff;
  background: var(--red);
}

.option-row.is-correct {
  border-color: var(--red);
  background: var(--red-soft);
}

.option-row.is-wrong {
  border-color: var(--border-strong);
  color: var(--muted);
  background: #f3f4f6;
}

.answer-mark {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  color: #fff;
  background: var(--red);
}

.answer-mark svg {
  width: 15px;
  height: 15px;
}

.quiz-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 18px;
  padding: 18px 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.quiz-actions > div {
  margin-right: auto;
}

.quiz-actions strong,
.quiz-actions span {
  display: block;
}

.quiz-actions strong {
  color: var(--text-strong);
}

.quiz-actions span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.primary-button:disabled {
  color: var(--muted-light);
  background: #e8ebef;
  cursor: not-allowed;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.audio-panel {
  display: grid;
  grid-template-columns: minmax(180px, 0.55fr) minmax(300px, 1.35fr) auto;
  align-items: center;
  gap: 22px;
  margin-bottom: 18px;
  padding: 19px 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.audio-panel span,
.audio-panel strong {
  display: block;
}

.audio-panel span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.audio-panel strong {
  margin-top: 3px;
  color: var(--text-strong);
}

.audio-panel audio,
.audio-preview audio {
  width: 100%;
  min-width: 0;
}

.listening-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.88fr) minmax(0, 1.12fr);
  align-items: start;
  gap: 18px;
}

.listening-script {
  position: sticky;
  top: 92px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.dialogue-copy {
  padding: 22px 24px 25px;
}

.dialogue-copy p {
  margin: 0 0 12px;
  color: #283244;
  font-size: 15px;
  line-height: 1.72;
}

.dialogue-copy p:last-child {
  margin-bottom: 0;
}

.locked-script {
  min-height: 240px;
  padding: 48px 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-align: center;
  color: var(--muted);
}

.locked-script > span {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--soft);
  color: var(--primary);
}

.locked-script strong {
  color: var(--ink);
  font-size: 16px;
}

.locked-script p {
  margin: 0;
  font-size: 14px;
}

.empty-practice-state {
  min-height: 360px;
  padding: 56px 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  text-align: center;
  box-shadow: var(--shadow);
}

.empty-practice-state > span {
  width: 50px;
  height: 50px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--soft);
  color: var(--primary);
}

.empty-practice-state h2,
.empty-practice-state p {
  margin: 0;
}

.empty-practice-state p {
  max-width: 620px;
  color: var(--muted);
  line-height: 1.7;
}

.empty-practice-state .primary-button {
  margin-top: 8px;
}

.practice-layout,
.speaking-layout {
  display: grid;
  grid-template-columns: minmax(300px, 0.72fr) minmax(0, 1.28fr);
  gap: 18px;
}

.topic-panel,
.editor-panel,
.writing-reference,
.recording-panel {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.topic-panel,
.recording-panel {
  padding: 26px;
}

.panel-kicker {
  display: block;
  margin-bottom: 10px;
  color: var(--red);
  font-size: 11px;
  font-weight: 900;
}

.topic-panel h2,
.recording-panel h2 {
  margin: 0;
  color: var(--text-strong);
  font-size: 19px;
  line-height: 1.58;
}

.requirement-list {
  display: grid;
  gap: 0;
  margin: 25px 0 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--border);
}

.requirement-list li {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  color: var(--muted);
  font-size: 13px;
}

.requirement-list svg {
  width: 16px;
  height: 16px;
  color: var(--red);
}

.editor-panel {
  overflow: hidden;
}

.editor-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--border);
}

.editor-heading span,
.editor-heading strong {
  display: block;
}

.editor-heading span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.editor-heading strong {
  margin-top: 2px;
  color: var(--text-strong);
}

.autosave-status {
  color: #197553 !important;
}

#writing-editor {
  display: block;
  width: 100%;
  min-height: 420px;
  padding: 24px;
  resize: vertical;
  border: 0;
  outline: 0;
  color: #222c3e;
  background: #fff;
  font: inherit;
  font-size: 16px;
  line-height: 1.8;
}

#writing-editor:focus {
  box-shadow: inset 0 0 0 2px rgba(221, 38, 54, 0.18);
}

.editor-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 13px 20px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  background: var(--surface-soft);
  font-size: 12px;
}

.editor-footer strong {
  color: var(--text-strong);
}

.submission-receipt {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 15px;
  margin-top: 18px;
  padding: 17px 20px;
  border: 1px solid var(--red-border);
  border-radius: var(--radius);
  background: var(--red-soft);
}

.submission-receipt > svg {
  width: 24px;
  height: 24px;
  color: var(--red);
}

.submission-receipt strong,
.submission-receipt span {
  display: block;
}

.submission-receipt strong {
  color: var(--text-strong);
}

.submission-receipt span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.writing-reference {
  overflow: hidden;
}

.writing-preview {
  min-height: 300px;
  max-height: 520px;
  overflow: auto;
  padding: 24px;
  color: #2d3748;
  font-size: 15px;
  line-height: 1.75;
  white-space: normal;
}

.recording-status {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  margin-top: 28px;
  padding: 15px 16px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--surface-soft);
}

.recording-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--muted-light);
}

.recording-status.is-recording .recording-dot {
  background: var(--red);
  box-shadow: 0 0 0 5px rgba(221, 38, 54, 0.12);
}

.recording-status strong {
  color: var(--text-strong);
  font-size: 14px;
}

.recording-status > span:last-child {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  font-size: 13px;
}

.recording-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 12px;
}

.file-button {
  position: relative;
  overflow: hidden;
}

.file-button input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.audio-preview {
  display: grid;
  gap: 8px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.audio-preview span {
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.toast {
  position: fixed;
  z-index: 80;
  right: 22px;
  bottom: 22px;
  max-width: min(360px, calc(100% - 44px));
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: 7px;
  color: #fff;
  background: var(--text);
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity 160ms ease, transform 160ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

button:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(221, 38, 54, 0.2);
  outline-offset: 2px;
}

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

  .student-name {
    display: none;
  }

  .main-nav {
    justify-self: end;
  }

  .hero-panel {
    grid-template-columns: 1fr;
  }

  .hero-panel__side {
    border-top: 1px solid var(--border);
    border-left: 0;
  }

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

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

  .action-panel {
    position: static;
  }

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

  .listening-layout,
  .practice-layout,
  .speaking-layout {
    grid-template-columns: 1fr;
  }

  .reading-passage,
  .listening-script {
    position: static;
  }

  .audio-panel {
    grid-template-columns: 1fr;
  }

  .schedule-row {
    grid-template-columns: 50px 106px minmax(130px, 0.7fr) minmax(220px, 1.4fr) 90px;
  }
}

@media (max-width: 720px) {
  .topbar__inner,
  .app-shell {
    width: min(calc(100% - 28px), var(--content));
  }

  .topbar__inner {
    min-height: 64px;
    gap: 12px;
  }

  .brand small,
  .main-nav button span {
    display: none;
  }

  .main-nav button {
    width: 38px;
    padding: 7px;
  }

  .app-shell {
    padding: 34px 0 56px;
  }

  .page-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 18px;
  }

  .header-progress {
    width: 100%;
    flex-basis: auto;
  }

  .hero-panel__main {
    padding: 28px 24px;
  }

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

  .metric {
    min-height: 104px;
    padding: 18px;
  }

  .metric strong {
    font-size: 21px;
  }

  .next-session {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .next-session .secondary-button {
    grid-column: 1 / -1;
    width: 100%;
  }

  .completion-band {
    align-items: stretch;
    flex-direction: column;
  }

  .score-panel {
    grid-template-columns: 1fr 1fr;
    gap: 14px;
  }

  .score-panel p {
    grid-column: 1 / -1;
    text-align: left;
  }

  .quiz-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .quiz-actions > div {
    margin-right: 0;
  }

  .quiz-actions button {
    width: 100%;
  }

  .submission-receipt {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .submission-receipt .secondary-button {
    grid-column: 1 / -1;
    width: 100%;
  }

  .recording-actions {
    grid-template-columns: 1fr;
  }

  .schedule-summary {
    grid-template-columns: 1fr;
  }

  .schedule-summary > div {
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .schedule-summary > div:last-child {
    border-bottom: 0;
  }

  .schedule-table {
    display: grid;
    gap: 10px;
    overflow: visible;
    border: 0;
    background: transparent;
  }

  .schedule-row,
  .schedule-row.is-head {
    grid-template-columns: 44px minmax(0, 1fr) auto;
    min-height: 0;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
  }

  .schedule-row.is-head {
    display: none;
  }

  .schedule-row > div {
    padding: 12px 10px;
  }

  .schedule-date {
    grid-column: 2;
    grid-row: 1;
    align-self: end;
    padding-bottom: 1px !important;
  }

  .schedule-title {
    grid-column: 2;
    grid-row: 2;
    padding-top: 1px !important;
  }

  .schedule-focus {
    grid-column: 1 / -1;
    grid-row: 3;
    padding-top: 0 !important;
    text-overflow: clip;
    white-space: normal;
  }

  .schedule-status {
    grid-column: 3;
    grid-row: 1 / span 2;
    align-self: center;
  }

  .schedule-row .session-number {
    grid-column: 1;
    grid-row: 1 / span 2;
    align-self: center;
  }
}

@media (max-width: 560px) {
  .study-grid {
    grid-template-columns: 1fr;
  }

  .subject-card {
    min-height: 218px;
  }

  .content-panel,
  .action-panel {
    padding: 21px;
  }

  .reading-section-heading,
  .question-block {
    padding: 18px;
  }

  .passage-copy {
    padding: 20px 18px 22px;
  }

  .passage-copy p {
    padding-left: 27px;
    font-size: 15px;
    line-height: 1.8;
  }

  .audio-panel,
  .topic-panel,
  .recording-panel {
    padding: 20px;
  }

  #writing-editor {
    min-height: 360px;
    padding: 20px;
  }

  .editor-footer {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
