:root {
  color-scheme: light;
  --bg: #eef2f7;
  --surface: #ffffff;
  --surface-alt: #f6f8fb;
  --text: #162033;
  --muted: #5f6b7c;
  --line: #d8deea;
  --brand: #1d4ed8;
  --brand-soft: #dbe8ff;
  --success: #0f9f6e;
  --success-soft: #dff8ee;
  --danger: #d14343;
  --danger-soft: #ffe5e5;
  --warning: #b7791f;
  --warning-soft: #fff4dc;
  --shadow: 0 14px 36px rgba(17, 24, 39, 0.08);
  font-family: "Segoe UI", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

img {
  max-width: 100%;
  height: auto;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
}

body[data-surface="student"] {
  background:
    linear-gradient(180deg, #09111f 0, #10213d 220px, #eef3f9 220px, #f3f7fb 100%);
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 320px 1fr;
}

.sidebar {
  background: #18253d;
  color: #f7f9fd;
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.brand-sidebar {
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.1) 0, transparent 38%),
    linear-gradient(180deg, #0b1120 0%, #111c32 54%, #1a1b45 100%);
}

.admin-brand-sidebar {
  background:
    radial-gradient(circle at top left, rgba(239, 68, 68, 0.18) 0, transparent 36%),
    linear-gradient(180deg, #160d14 0%, #251225 48%, #381725 100%);
}

.brand-lockup {
  margin-bottom: 18px;
  padding: 14px;
  border-radius: 12px;
  background: rgba(6, 10, 22, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03);
}

.brand-logo {
  width: min(240px, 100%);
  display: block;
  border-radius: 8px;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.28);
}

.eyebrow {
  margin: 0 0 10px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: #96acff;
}

.sidebar h1 {
  margin: 0 0 12px;
  font-size: 32px;
}

.sidebar-copy {
  margin: 0;
  color: #c4d2ee;
  line-height: 1.6;
}

.sidebar-card {
  padding: 18px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-card h2 {
  margin: 0 0 12px;
  font-size: 15px;
}

.plain-list {
  margin: 0;
  padding-left: 18px;
  color: #d6dff6;
  line-height: 1.7;
}

.main-panel {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

body[data-surface="student"] .main-panel {
  background:
    linear-gradient(180deg, rgba(20, 184, 166, 0.08) 0, rgba(14, 165, 233, 0.03) 240px, transparent 240px),
    repeating-linear-gradient(135deg, rgba(15, 23, 42, 0.025) 0 18px, transparent 18px 36px);
}

.topbar {
  padding: 22px 28px 10px;
}

.topbar[hidden] {
  display: none;
}

body[data-surface="student"] .topbar {
  padding-top: 28px;
}

body[data-surface="student"] .topbar .toolbar {
  padding: 16px 18px;
  border-radius: 10px;
  background: rgba(8, 18, 35, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(10px);
}

body[data-surface="student"] .topbar strong,
body[data-surface="student"] .topbar .muted {
  color: #f7fbff;
}

body[data-surface="student"] .topbar .ghost-btn {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.22);
  color: #ffffff;
  font-weight: 700;
}

body[data-surface="student"] .topbar .success-box,
body[data-surface="student"] .topbar .error-box {
  backdrop-filter: blur(8px);
}

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

.toolbar > * {
  min-width: 0;
}

.toolbar-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.content {
  padding: 0 28px 28px;
}

.panel,
.hero,
.practice-board,
.login-panel,
.stat,
.table-card,
.report-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.hero {
  padding: 24px;
  display: grid;
  gap: 20px;
}

.hero-grid,
.stat-grid,
.mode-grid,
.library-grid,
.report-grid,
.panel-grid,
.form-grid {
  display: grid;
  gap: 16px;
}

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

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

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

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

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

.span-2 {
  grid-column: 1 / -1;
}

.hero h2,
.panel h2,
.table-card h2,
.report-card h2,
.practice-board h2,
.login-panel h2 {
  margin: 0 0 8px;
  font-size: 21px;
}

.hero p,
.panel p,
.table-card p,
.report-card p,
.muted {
  color: var(--muted);
  line-height: 1.6;
}

.stat,
.panel,
.table-card,
.report-card,
.practice-board,
.login-panel {
  padding: 20px;
}

.stat strong {
  display: block;
  font-size: 30px;
  margin-bottom: 8px;
}

.badge-row,
.tag-row,
.choice-list,
.report-tags,
.practice-actions,
.tab-row,
.stack {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.badge,
.tag,
.report-chip {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 13px;
  border: 1px solid transparent;
}

.badge {
  background: var(--brand-soft);
  color: var(--brand);
}

.tag {
  background: var(--surface-alt);
  border-color: var(--line);
  color: var(--muted);
}

.report-chip {
  background: var(--danger-soft);
  color: var(--danger);
}

.btn,
.ghost-btn,
.mode-card button,
.choice-btn {
  min-height: 42px;
  border-radius: 8px;
  border: 1px solid transparent;
  padding: 0 14px;
  transition: 0.16s ease;
}

.btn {
  background: var(--brand);
  color: #fff;
}

.btn:hover {
  filter: brightness(1.05);
}

.ghost-btn {
  background: #fff;
  border-color: var(--line);
  color: var(--text);
}

.ghost-btn.active {
  background: var(--brand-soft);
  border-color: #9cbcff;
  color: var(--brand);
}

.danger-btn {
  background: var(--danger-soft);
  color: var(--danger);
  border-color: #ffb7b7;
}

.success-btn {
  background: var(--success-soft);
  color: var(--success);
  border-color: #bfe9d7;
}

.mode-card,
.library-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  background: var(--surface-alt);
  display: grid;
  gap: 14px;
}

.mode-card h3,
.library-card h3,
.table-card h3,
.panel h3 {
  margin: 0;
  font-size: 17px;
}

.field {
  display: grid;
  gap: 8px;
}

.field label {
  font-size: 14px;
  color: var(--muted);
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: #fff;
  color: var(--text);
}

textarea {
  min-height: 128px;
  resize: vertical;
}

.table-wrap {
  overflow: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 12px 10px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

th {
  font-size: 13px;
  color: var(--muted);
  font-weight: 600;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12px;
}

.status-active {
  background: var(--success-soft);
  color: var(--success);
}

.status-disabled {
  background: var(--danger-soft);
  color: var(--danger);
}

.status-expired {
  background: var(--warning-soft);
  color: var(--warning);
}

.notice,
.error-box,
.success-box {
  border-radius: 8px;
  padding: 14px 16px;
  border: 1px solid transparent;
}

.notice {
  background: var(--brand-soft);
  color: var(--brand);
  border-color: #c5d8ff;
}

.error-box {
  background: var(--danger-soft);
  color: var(--danger);
  border-color: #ffc1c1;
}

.success-box {
  background: var(--success-soft);
  color: var(--success);
  border-color: #bbe7d4;
}

.login-layout {
  min-height: 100vh;
  display: grid;
  align-items: center;
}

.login-panel {
  width: min(560px, 100%);
}

.login-showcase {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 22px;
  align-items: stretch;
}

.login-showcase-simple {
  grid-template-columns: 1fr;
  justify-items: center;
}

.login-hero-card,
.branded-login-panel {
  border-radius: 8px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  box-shadow: 0 24px 48px rgba(15, 23, 42, 0.14);
}

.login-hero-card {
  position: relative;
  overflow: hidden;
  padding: 30px;
  min-height: 100%;
  background:
    linear-gradient(135deg, #0b1730 0%, #10254c 56%, #0f766e 100%);
  color: #f8fbff;
}

.student-login-hero-card {
  background:
    linear-gradient(135deg, #0b1730 0%, #10254c 56%, #0f766e 100%);
}

.admin-login-hero-card {
  background:
    linear-gradient(135deg, #1a1018 0%, #35142a 54%, #7f1d1d 100%);
}

.login-glow {
  position: absolute;
  inset: auto -20% -28% auto;
  width: 320px;
  height: 320px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.34) 0%, rgba(56, 189, 248, 0) 70%);
  pointer-events: none;
}

.login-copy {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 12px;
}

.login-eyebrow {
  color: #96d9ff;
}

.login-copy h2 {
  margin: 0;
  font-size: 34px;
  line-height: 1.15;
}

.login-copy p {
  margin: 0;
  color: rgba(237, 247, 255, 0.82);
}

.branded-login-panel {
  width: 100%;
  max-width: 440px;
  padding: 24px;
  align-self: center;
  background: rgba(255, 255, 255, 0.96);
}

.login-panel-head {
  display: grid;
  gap: 6px;
  margin-bottom: 14px;
}

.login-panel-head h2 {
  margin: 0;
  font-size: 26px;
}

.login-panel-head p {
  margin: 0;
  color: var(--muted);
}

.login-panel-head .eyebrow {
  margin: 0 0 2px;
}

.login-panel-logo {
  width: min(220px, 100%);
  display: block;
  border-radius: 8px;
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.18);
}

.student-login-panel {
  border-top: 4px solid #0ea5e9;
}

.admin-login-panel {
  border-top: 4px solid #ef4444;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(255, 244, 246, 0.98) 100%);
}

.progress-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.progress {
  height: 10px;
  flex: 1;
  border-radius: 999px;
  background: #dbe4f0;
  overflow: hidden;
}

.progress > span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #2563eb 0%, #38bdf8 100%);
}

.student-shell {
  gap: 14px;
}

.student-kicker {
  margin: 0 0 10px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1.4px;
  color: #8be9d2;
}

.student-focus-strip {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) auto;
  gap: 18px;
  align-items: center;
  padding: 20px 22px;
  background:
    linear-gradient(135deg, rgba(7, 18, 38, 0.96) 0%, rgba(13, 35, 74, 0.92) 56%, rgba(15, 118, 110, 0.88) 100%);
  border-color: rgba(255, 255, 255, 0.12);
}

.student-focus-main h2,
.student-focus-main p,
.student-focus-main .student-kicker {
  color: #f7fbff;
}

.student-focus-main h2 {
  margin: 0;
  font-size: clamp(26px, 4vw, 34px);
}

.student-focus-copy {
  margin: 10px 0 0;
  max-width: 680px;
  color: rgba(246, 251, 255, 0.94);
}

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

.student-focus-actions .btn,
.student-focus-actions .ghost-btn {
  min-width: 136px;
}

.student-focus-actions .ghost-btn {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
  color: #f4fbff;
}

.student-mini-stats {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.student-mini-stat {
  min-height: 82px;
  padding: 14px 16px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.09);
  color: #eff8ff;
}

.student-mini-stat strong {
  display: block;
  font-size: 26px;
  line-height: 1.1;
}

.student-mini-stat span {
  display: block;
  margin-top: 6px;
  color: rgba(246, 251, 255, 0.92);
  font-size: 13px;
}

.student-hero {
  position: relative;
  overflow: hidden;
  padding: 28px;
  border-color: rgba(255, 255, 255, 0.14);
  background:
    linear-gradient(140deg, rgba(7, 18, 38, 0.96) 0%, rgba(13, 35, 74, 0.92) 48%, rgba(15, 118, 110, 0.88) 100%);
}

.student-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px),
    linear-gradient(180deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px);
  background-size: 28px 28px;
  opacity: 0.2;
  pointer-events: none;
}

.student-hero > * {
  position: relative;
  z-index: 1;
}

.student-hero h2,
.student-hero p,
.student-hero .badge {
  color: #f7fbff;
}

.student-hero p {
  max-width: 720px;
  color: rgba(236, 247, 255, 0.82);
}

.student-badges .badge {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.student-stat-grid {
  align-self: stretch;
}

.student-stat {
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(8px);
  color: #eff8ff;
  box-shadow: none;
}

.student-stat span {
  color: rgba(234, 247, 255, 0.74);
}

.student-tabs {
  width: 100%;
  gap: 10px;
  padding: 0;
  border: 0;
  background: transparent;
}

.student-tabs .ghost-btn {
  min-width: 112px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  border-color: rgba(87, 124, 160, 0.35);
  color: #173954;
  font-weight: 700;
  white-space: normal;
  text-align: center;
}

.student-tabs .ghost-btn.active {
  background: linear-gradient(135deg, #0f766e 0%, #0284c7 100%);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 12px 24px rgba(14, 116, 144, 0.22);
}

.student-panel,
.student-banner,
.student-practice-board,
body[data-surface="student"] .report-card,
body[data-surface="student"] .table-card {
  border-color: rgba(148, 163, 184, 0.2);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(10px);
}

.student-banner {
  background:
    linear-gradient(135deg, rgba(14, 165, 233, 0.12) 0%, rgba(20, 184, 166, 0.14) 100%),
    rgba(255, 255, 255, 0.9);
}

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

.student-section-head h2 {
  margin: 0;
}

.student-section-head p {
  margin: 8px 0 0;
}

.student-section-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

body[data-surface="student"] .student-panel,
body[data-surface="student"] .student-banner,
body[data-surface="student"] .student-shell .library-card,
body[data-surface="student"] .student-shell .mode-card,
body[data-surface="student"] .report-card,
body[data-surface="student"] .table-card {
  color: #13293d;
}

body[data-surface="student"] .student-panel h2,
body[data-surface="student"] .student-panel h3,
body[data-surface="student"] .student-banner h2,
body[data-surface="student"] .student-banner h3,
body[data-surface="student"] .report-card h2,
body[data-surface="student"] .table-card h2,
body[data-surface="student"] .student-shell strong {
  color: #0d2238;
}

body[data-surface="student"] .student-panel p,
body[data-surface="student"] .student-banner p,
body[data-surface="student"] .student-shell .muted,
body[data-surface="student"] .student-shell .small,
body[data-surface="student"] .report-card p,
body[data-surface="student"] .table-card p,
body[data-surface="student"] .empty-state {
  color: #35526a;
}

.student-split .student-panel:first-child,
.student-split .student-panel:last-child,
.student-shell .library-card,
.student-shell .mode-card {
  border-color: rgba(148, 163, 184, 0.18);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(244, 249, 255, 1) 100%);
  box-shadow: 0 18px 28px rgba(15, 23, 42, 0.06);
}

.student-shell .library-card {
  position: relative;
  overflow: hidden;
}

.student-shell .library-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: linear-gradient(180deg, #0ea5e9 0%, #14b8a6 100%);
}

.student-shell .tag {
  background: #e3f2ff;
  border-color: #a5cae8;
  color: #143955;
  font-weight: 700;
}

body[data-surface="student"] .student-shell .badge,
body[data-surface="student"] .report-card .badge,
body[data-surface="student"] .table-card .badge {
  background: #d7ecff;
  border: 1px solid #9fc7eb;
  color: #124465;
  font-weight: 700;
}

.student-shell .btn {
  background: linear-gradient(135deg, #0f766e 0%, #0284c7 100%);
  box-shadow: 0 12px 24px rgba(2, 132, 199, 0.18);
  color: #ffffff;
  font-weight: 700;
}

.student-shell .ghost-btn {
  border-color: #a8c3da;
  background: #ffffff;
  color: #163a56;
  font-weight: 700;
}

.student-practice-board {
  background:
    linear-gradient(180deg, rgba(6, 16, 34, 0.96) 0%, rgba(12, 29, 58, 0.98) 100%);
  color: #edf7ff;
  border-color: rgba(148, 163, 184, 0.14);
}

.student-practice-board .muted,
.student-practice-board .question-meta {
  color: rgba(241, 248, 255, 0.9);
}

.student-practice-board .progress {
  background: rgba(255, 255, 255, 0.14);
}

.student-practice-board .badge {
  background: rgba(255, 255, 255, 0.14);
  color: #eff9ff;
}

.student-practice-board .ghost-btn {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.24);
  color: #ffffff;
  font-weight: 700;
}

.student-question-card {
  border-color: rgba(125, 211, 252, 0.18);
  background:
    linear-gradient(180deg, rgba(244, 250, 255, 0.98) 0%, rgba(233, 245, 255, 0.98) 100%);
  color: var(--text);
}

.student-question-card .question-word {
  color: #082032;
  font-size: 38px;
}

.student-question-card .toolbar,
.student-question-card .field label,
.student-question-card .small {
  color: #14344e;
  font-weight: 600;
}

.student-question-card .ghost-btn {
  background: linear-gradient(180deg, #ffffff 0%, #ecf6ff 100%);
  border-color: rgba(2, 132, 199, 0.22);
  color: #0b3a5b;
  font-weight: 700;
  box-shadow: 0 8px 18px rgba(2, 132, 199, 0.12);
}

.student-question-card .ghost-btn:hover {
  filter: none;
  background: linear-gradient(180deg, #ffffff 0%, #dff1ff 100%);
}

.question-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}

.meta-chip {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  background: rgba(8, 32, 50, 0.16);
  border: 1px solid rgba(8, 32, 50, 0.24);
  color: #082032;
  font-size: 14px;
  font-weight: 700;
}

.meta-chip.accent {
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.24) 0%, rgba(20, 184, 166, 0.3) 100%);
  border-color: rgba(14, 165, 233, 0.3);
  color: #075985;
}

.student-question-card input,
.student-question-card select,
.student-question-card textarea {
  background: rgba(255, 255, 255, 0.96);
  border-color: rgba(14, 165, 233, 0.18);
  color: #082032;
}

.student-question-card .btn {
  background: linear-gradient(135deg, #0f766e 0%, #0284c7 100%);
  color: #ffffff;
  font-weight: 700;
}

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

.permission-item {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-alt);
  color: var(--text);
}

.permission-item input {
  width: 18px;
  height: 18px;
  margin: 0;
}

body[data-surface="student"] .empty-state {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(245, 249, 255, 1) 100%);
  border-color: rgba(123, 156, 187, 0.34);
}

.practice-board {
  display: grid;
  gap: 20px;
}

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

.question-card {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-alt);
}

.question-word {
  font-size: 32px;
  margin: 0 0 10px;
}

.question-meta {
  color: var(--muted);
  margin-bottom: 16px;
}

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

.choice-btn {
  min-height: 56px;
  text-align: left;
  background: #fff;
  border-color: var(--line);
}

.choice-btn.correct {
  background: var(--success-soft);
  border-color: #9ddac3;
  color: var(--success);
}

.choice-btn.wrong {
  background: var(--danger-soft);
  border-color: #ffb9b9;
  color: var(--danger);
}

.shake {
  animation: shake 0.25s linear 2;
}

@keyframes shake {
  0% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  50% { transform: translateX(4px); }
  75% { transform: translateX(-4px); }
  100% { transform: translateX(0); }
}

.sentence-grid {
  display: grid;
  gap: 10px;
}

.sentence-pronounce-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(233, 245, 255, 0.98) 0%, rgba(244, 250, 255, 0.98) 100%);
  border: 1px solid rgba(125, 211, 252, 0.24);
}

.sentence-pronounce-label {
  color: #0b3a5b;
  font-size: 15px;
  font-weight: 700;
}

.sentence-pronounce-copy {
  display: grid;
  gap: 4px;
}

.sentence-pronounce-copy .small {
  color: #35526a;
}

.sentence-inputs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
}

.sentence-input {
  width: 100%;
}

.sentence-input label {
  display: none;
}

.sentence-input input {
  min-height: 52px;
  text-align: center;
  border: 0;
  border-bottom: 2px solid rgba(14, 165, 233, 0.5);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  padding-left: 4px;
  padding-right: 4px;
}

.sentence-input input:focus {
  outline: none;
  border-bottom-color: #0284c7;
  background: rgba(14, 165, 233, 0.04);
}

.sentence-input.wrong {
  border-color: #ff9e9e;
  background: #fff2f2;
}

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

.correction-item {
  border: 1px solid #ffc7c7;
  background: #fff3f3;
  border-radius: 8px;
  padding: 12px 14px;
}

.empty-state {
  padding: 28px;
  border-radius: 8px;
  border: 1px dashed #b7c5db;
  color: var(--muted);
  background: #fbfcfe;
}

.split {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 16px;
}

.small {
  font-size: 13px;
}

.right {
  text-align: right;
}

code {
  font-family: Consolas, monospace;
}

@media (max-width: 1100px) {
  .app-shell {
    grid-template-columns: 280px 1fr;
  }

  .hero-grid,
  .mode-grid,
  .library-grid,
  .report-grid,
  .panel-grid,
  .split,
  .form-grid,
  .login-showcase {
    grid-template-columns: 1fr;
  }

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

  .sidebar {
    padding: 24px 20px;
  }

  .topbar,
  .content {
    padding-left: 22px;
    padding-right: 22px;
  }

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

  .student-focus-actions,
  .student-section-meta {
    justify-content: flex-start;
  }

  .practice-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .practice-header .badge-row {
    width: 100%;
    justify-content: flex-start;
  }
}

@media (max-width: 900px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    gap: 12px;
  }

  body[data-surface="student"] .sidebar {
    display: none;
  }

  .topbar,
  .content {
    padding-left: 18px;
    padding-right: 18px;
  }

  .choice-list {
    grid-template-columns: 1fr;
  }

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

  .student-focus-actions {
    justify-content: flex-start;
  }

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

  .login-copy h2 {
    font-size: 30px;
  }

  .student-tabs {
    width: 100%;
    gap: 8px;
    justify-content: flex-start;
  }

  .student-tabs .ghost-btn {
    min-width: 0;
    flex: 1 1 140px;
  }

  .student-shell .toolbar,
  .student-question-card .toolbar,
  .practice-header {
    align-items: stretch;
  }

  .student-shell .toolbar-group {
    width: 100%;
  }

  .question-meta-row {
    gap: 8px;
  }

  .student-section-head {
    flex-direction: column;
  }

  .student-section-meta {
    justify-content: flex-start;
  }

  .permission-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .sidebar {
    padding: 18px 16px;
  }

  .sidebar h1 {
    font-size: 26px;
  }

  .sidebar-copy {
    font-size: 14px;
  }

  .topbar,
  .content {
    padding-left: 14px;
    padding-right: 14px;
  }

  .panel,
  .hero,
  .practice-board,
  .login-panel,
  .stat,
  .table-card,
  .report-card {
    padding: 16px;
  }

  .login-layout {
    min-height: auto;
    padding: 18px 0;
  }

  .login-showcase-simple {
    justify-items: stretch;
  }

  .branded-login-panel {
    max-width: 100%;
    padding: 18px;
  }

  .login-panel-head h2 {
    font-size: 24px;
  }

  .student-focus-main h2 {
    font-size: 24px;
  }

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

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

  .student-tabs .ghost-btn {
    flex: none;
    width: 100%;
    min-height: 46px;
  }

  .student-focus-actions,
  .practice-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .student-focus-actions .btn,
  .student-focus-actions .ghost-btn,
  .practice-actions .btn,
  .practice-actions .ghost-btn,
  .toolbar-group > * {
    width: 100%;
  }

  .student-shell .toolbar,
  .student-question-card .toolbar,
  .toolbar-group {
    flex-direction: column;
    align-items: stretch;
  }

  .question-meta-row {
    display: grid;
    grid-template-columns: 1fr;
  }

  .meta-chip {
    width: 100%;
    justify-content: center;
  }

  .student-question-card .question-word,
  .question-word {
    font-size: 28px;
  }

  .sentence-inputs {
    grid-template-columns: 1fr;
  }

  .sentence-pronounce-row {
    flex-direction: column;
    align-items: stretch;
  }

  .empty-state {
    padding: 20px;
  }
}

@media (max-width: 420px) {
  .sidebar h1 {
    font-size: 24px;
  }

  .login-panel-head h2 {
    font-size: 22px;
  }

  .student-mini-stats,
  .student-tabs {
    grid-template-columns: 1fr;
  }

  .student-focus-copy,
  .student-panel p,
  .student-banner p {
    font-size: 14px;
  }
}
