:root {
  --bg: #f4f7fb;
  --panel: #ffffff;
  --panel-alt: #edf3ff;
  --line: #d8e2f2;
  --text: #15233d;
  --muted: #63718d;
  --primary: #1747a6;
  --primary-dark: #0d2d6e;
  --accent: #e0a126;
  --accent-soft: #fff3d9;
  --success: #1f9d55;
  --warning: #d48513;
  --danger: #cf3f4d;
  --shadow: 0 20px 60px rgba(18, 44, 95, 0.12);
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-sm: 12px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Manrope", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(23, 71, 166, 0.11), transparent 20%),
    linear-gradient(180deg, #f7f9fd 0%, #eff4fb 100%);
}
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
a { color: inherit; }
.app-shell { min-height: 100vh; }
.site-banner {
  background: #192f76;
  color: #fff;
  text-align: center;
  padding: 12px 18px;
}
.site-banner strong {
  display: block;
  color: #f2c24c;
  font-size: .95rem;
  margin-bottom: 4px;
}
.site-banner span {
  font-size: .95rem;
  opacity: .92;
}
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding: 20px 40px;
  border-bottom: 1px solid rgba(216, 226, 242, 0.85);
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(18px);
}
.brand-block {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 220px;
  flex: 0 1 auto;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 72px;
  height: 96px;
  border-radius: 24px;
  color: white;
  font-weight: 800;
  background: transparent;
  box-shadow: none;
}
.brand-logo-wrap {
  width: 68px;
  height: 82px;
  padding: 0;
  overflow: hidden;
  background: #fff;
  border: 1px solid rgba(216, 226, 242, 0.95);
  border-radius: 16px;
  flex: 0 0 68px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.brand-logo-circle { border-radius: 0; }
.brand-logo {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
}
.brand-copy {
  display: flex;
  flex-direction: column;
  gap: 3px;
  max-width: 260px;
}
.brand-name {
  margin: 0;
  font-family: "Playfair Display", serif;
  font-size: 1.8rem;
  line-height: 0.95;
  color: #1f3f98;
  font-weight: 800;
}
.brand-tagline {
  margin: 0;
  font-size: 0.85rem;
  letter-spacing: 0.03em;
  line-height: 1.3;
  color: #6b7aa0;
}
.eyebrow {
  margin: 0 0 4px;
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}
#app { padding: 30px 28px 60px; }
.hero { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 24px; margin-bottom: 24px; }
.card, .panel, .sidebar-card, .hero-panel {
  background: var(--panel);
  border: 1px solid rgba(216, 226, 242, 0.95);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}
.hero-panel { padding: 32px; overflow: hidden; }
.hero-gradient {
  position: relative;
  color: white;
  background: linear-gradient(140deg, rgba(13, 45, 110, 1), rgba(23, 71, 166, 0.94) 52%, rgba(224, 161, 38, 0.95));
}
.hero-gradient::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(255,255,255,0.16) 1px, transparent 1px);
  background-size: 22px 22px;
  opacity: 0.35;
  pointer-events: none;
}
.hero-panel > * { position: relative; z-index: 1; }
.hero-title {
  margin: 10px 0 14px;
  font-family: "Playfair Display", serif;
  font-size: clamp(2rem, 4vw, 3.8rem);
  line-height: 1;
}
.hero-text { max-width: 680px; color: rgba(255,255,255,0.82); line-height: 1.7; }
.hero-actions, .topbar-actions, .toolbar, .stack-row, .badge-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.topbar-actions {
  justify-content: flex-end;
  gap: 14px;
  margin-left: auto;
  flex: 1 1 620px;
}
.topbar-actions .btn-ghost,
.topbar-actions .btn-primary,
.topbar-actions .btn-accent,
.topbar-actions .badge {
  white-space: nowrap;
}
.topbar-role-btn { font-weight: 900; color: var(--primary); }
.btn, .btn-ghost, .btn-primary, .btn-accent, .chip {
  border: none;
  border-radius: 999px;
  padding: 12px 20px;
  font-weight: 700;
  transition: 180ms ease;
}
.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: #2558bf; transform: translateY(-1px); }
.btn-accent { background: var(--accent); color: #18233d; }
.btn-accent:hover { background: #f0b13a; }
.btn-ghost { background: #fff; color: #36496f; border: 1px solid rgba(216, 226, 242, 0.95); }
.btn-ghost:hover { border-color: var(--primary); color: var(--primary); }
.hero-stats, .summary-grid, .stats-grid, .course-grid, .dashboard-grid, .analytics-grid, .resource-grid, .activity-grid, .table-grid, .quick-grid { display: grid; gap: 16px; }
.hero-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 28px; }
.stat-pill { padding: 18px; border-radius: 20px; background: rgba(255,255,255,0.12); border: 1px solid rgba(255,255,255,0.18); }
.stat-pill strong, .metric-value { display: block; font-size: 1.7rem; font-weight: 800; }
.stat-pill span, .muted { color: var(--muted); }
.hero-gradient .stat-pill span { color: rgba(255,255,255,0.7); }
.page-grid { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 22px; }
.sidebar { display: flex; flex-direction: column; gap: 16px; }
.sidebar-card, .panel { padding: 22px; }
.nav-list, .detail-list, .feed-list, .notification-list, .lesson-list, .module-list, .simple-list { display: flex; flex-direction: column; gap: 10px; }
.nav-button {
  width: 100%;
  text-align: left;
  border: 1px solid transparent;
  border-radius: 16px;
  background: transparent;
  padding: 13px 14px;
  color: var(--muted);
  font-weight: 700;
}
.nav-button.active, .nav-button:hover { color: var(--primary); background: rgba(23, 71, 166, 0.08); border-color: rgba(23, 71, 166, 0.12); }
.section-title { margin: 0 0 6px; font-size: 1.3rem; }
.section-subtitle { margin: 0; color: var(--muted); line-height: 1.6; }
.summary-grid, .stats-grid, .analytics-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.metric-card { padding: 20px; border-radius: 22px; background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%); border: 1px solid var(--line); }
.metric-label { font-size: 0.85rem; color: var(--muted); }
.metric-trend { margin-top: 6px; font-size: 0.82rem; color: var(--success); }
.course-grid, .activity-grid, .dashboard-grid, .table-grid, .resource-grid, .quick-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.course-card, .activity-card, .feed-item, .table-card, .quick-card { padding: 20px; border-radius: 22px; border: 1px solid var(--line); background: linear-gradient(180deg, #ffffff 0%, #f7faff 100%); }
.dashboard-grid > *,
.table-grid > *,
.panel,
.table-card {
  min-width: 0;
}
.table-card {
  overflow-x: auto;
}
.course-cover { height: 140px; border-radius: 18px; margin-bottom: 16px; background-size: cover; background-position: center; position: relative; overflow: hidden; }
.course-cover img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center; }
.course-cover::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(9,18,36,0.08), rgba(9,18,36,0.48)); }
.course-cover span { position: absolute; bottom: 14px; left: 14px; z-index: 1; padding: 6px 10px; border-radius: 999px; background: rgba(255,255,255,0.92); color: var(--primary-dark); font-size: 0.8rem; font-weight: 800; }
.course-card h3, .activity-card h3, .feed-item h3, .table-card h3 { margin: 0 0 8px; }
.meta, .tiny { color: var(--muted); font-size: 0.9rem; }
.progress { height: 10px; border-radius: 999px; background: #e6edf8; overflow: hidden; margin: 14px 0 8px; }
.progress > span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--primary), var(--accent)); }
.badge { display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px; border-radius: 999px; font-size: 0.8rem; font-weight: 800; }
.badge.primary { background: rgba(23,71,166,0.11); color: var(--primary); }
.badge.success { background: rgba(31,157,85,0.11); color: var(--success); }
.badge.warning { background: rgba(212,133,19,0.12); color: var(--warning); }
.badge.danger { background: rgba(207,63,77,0.12); color: var(--danger); }
.module-card, .lesson-card, .notification-item, .submission-row, .question-card { padding: 16px 18px; border: 1px solid var(--line); border-radius: 18px; background: #fbfdff; }
.module-card.active { border-color: rgba(23,71,166,0.3); background: rgba(23,71,166,0.04); }
.policy-panel {
  margin-bottom: 18px;
  background: linear-gradient(180deg, #ffffff 0%, #f6f9ff 100%);
}
.policy-panel-compact {
  margin-top: 18px;
}
.policy-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 16px;
}
.policy-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.policy-card {
  min-width: 0;
  padding: 16px;
  border: 1px solid rgba(23,71,166,.13);
  border-radius: 16px;
  background: #fff;
}
.policy-card strong {
  display: block;
  margin-bottom: 6px;
  color: var(--primary-dark);
}
.policy-card p {
  margin: 0;
  color: var(--muted);
  font-size: .9rem;
  line-height: 1.6;
}
.service-showcase {
  margin-bottom: 24px;
}
.service-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 20px;
}
.service-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 14px 34px rgba(18, 44, 95, 0.09);
}
.service-card img {
  display: block;
  width: 100%;
  height: 190px;
  object-fit: cover;
}
.service-card-body {
  padding: 18px;
}
.service-card h3 {
  margin: 12px 0 8px;
  font-size: 1.2rem;
}
.course-main-menu {
  margin-top: 18px;
  padding: 18px;
  border: 1px solid rgba(23,71,166,0.14);
  border-radius: 20px;
  background: linear-gradient(180deg, #ffffff 0%, #f3f7ff 100%);
}
.course-menu-head {
  justify-content: space-between;
  margin-bottom: 14px;
}
.course-mobile-chipbar {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 8px;
  margin-bottom: 12px;
  scrollbar-width: thin;
}
.course-mobile-chipbar .chip {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  padding: 9px 13px;
  color: var(--primary);
  text-decoration: none;
  background: #fff;
  border: 1px solid rgba(23,71,166,0.16);
}
.course-menu-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.course-menu-section {
  min-width: 0;
}
.menu-section-title {
  margin-bottom: 8px;
  color: var(--muted);
  font-size: .78rem;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.course-menu-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.menu-card-btn {
  width: 100%;
  min-width: 0;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px 14px;
  background: #fff;
  color: var(--text);
}
.menu-card-btn strong,
.menu-card-btn span {
  display: block;
  overflow-wrap: anywhere;
}
.menu-card-btn span {
  margin-top: 4px;
  color: var(--muted);
  font-size: .84rem;
}
.menu-card-btn.active {
  border-color: rgba(23,71,166,0.35);
  background: rgba(23,71,166,0.07);
  color: var(--primary);
}
.menu-card-btn:disabled {
  opacity: .58;
  cursor: not-allowed;
}
.game-card {
  border-color: rgba(23,71,166,0.18);
}
.game-quiz-cover {
  display: block;
  width: 100%;
  height: 150px;
  margin-bottom: 16px;
  border-radius: 18px;
  object-fit: cover;
  border: 1px solid rgba(23,71,166,.12);
}
.game-intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, .8fr);
  gap: 18px;
  margin-bottom: 18px;
  padding: 24px;
  border: 1px solid rgba(23,71,166,.16);
  border-radius: 22px;
  background: linear-gradient(135deg, #0d2d6e, #1747a6 62%, #e0a126);
  color: #fff;
}
.game-intro h2 {
  margin: 6px 0 10px;
  font-family: "Playfair Display", serif;
  font-size: 2.2rem;
  line-height: 1.05;
}
.game-intro p {
  max-width: 720px;
  color: rgba(255,255,255,.84);
  line-height: 1.65;
}
.game-intro .eyebrow,
.game-intro .meta {
  color: rgba(255,255,255,.78);
}
.game-how-grid {
  display: grid;
  gap: 10px;
}
.game-how-grid .module-card {
  background: rgba(255,255,255,.12);
  border-color: rgba(255,255,255,.22);
}
.game-detail-hero {
  display: grid;
  grid-template-columns: minmax(260px, .8fr) minmax(0, 1fr);
  gap: 20px;
  align-items: center;
}
.game-detail-cover {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border: 1px solid rgba(23,71,166,.14);
  border-radius: 20px;
}
.game-play-panel {
  max-width: 980px;
  margin: 0 auto;
}
.game-question {
  margin: 18px 0;
  padding: 22px;
  border-radius: 20px;
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  color: #fff;
}
.game-question h3 {
  margin: 0 0 8px;
  font-size: 1.5rem;
}
.game-question .tiny {
  color: rgba(255,255,255,.78);
}
.game-answer-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.game-answer-card {
  display: flex;
  gap: 12px;
  align-items: center;
  min-height: 74px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  cursor: pointer;
}
.game-answer-card:hover {
  border-color: var(--primary);
  background: #f4f8ff;
}
.game-answer-card input {
  width: auto;
}
.game-answer-card span {
  font-weight: 800;
  overflow-wrap: anywhere;
}
.game-qr-card {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 18px;
  padding: 16px;
  border: 1px solid rgba(23,71,166,.16);
  border-radius: 20px;
  background: #f8fbff;
}
.game-qr-card img {
  width: 132px;
  height: 132px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid var(--line);
}
.game-qr-fallback {
  width: 132px;
  height: 132px;
  place-items: center;
  text-align: center;
  border-radius: 14px;
  background: #fff;
  border: 2px dashed var(--primary);
  color: var(--primary);
  font-size: 1.35rem;
  font-weight: 900;
  letter-spacing: .12em;
}
.game-qr-card a {
  display: block;
  margin-top: 6px;
  color: var(--primary);
  overflow-wrap: anywhere;
}
.podium-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  align-items: end;
}
.podium-card {
  padding: 20px;
  text-align: center;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #fff;
}
.podium-card strong {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  margin-bottom: 10px;
  border-radius: 999px;
  background: var(--accent);
  color: #18233d;
  font-size: 1.2rem;
}
.podium-card.rank-1 {
  min-height: 190px;
  background: linear-gradient(180deg, #fff7dd, #fff);
  border-color: rgba(224,161,38,.55);
}
.resource-grid { margin-top: 16px; }
.resource-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; border-radius: 16px; border: 1px solid var(--line); background: white; }
.lesson-embed-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 18px;
}
.lesson-embed-card {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
}
.resource-preview {
  margin-top: 18px;
}
.resource-preview.compact {
  margin-top: 0;
}
.resource-preview iframe,
.resource-preview video {
  display: block;
  width: 100%;
  min-height: 62vh;
  border: 1px solid rgba(37,82,187,.16);
  border-radius: 18px;
  background: #fff;
}
.resource-preview.compact iframe,
.resource-preview.compact video {
  aspect-ratio: 16 / 9;
  min-height: 320px;
}
.resource-preview img {
  display: block;
  width: 100%;
  max-height: 70vh;
  object-fit: contain;
  border: 1px solid rgba(37,82,187,.16);
  border-radius: 18px;
  background: #f8fbff;
}
.resource-preview audio {
  width: 100%;
}
.layout-split { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 22px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field.full { grid-column: 1 / -1; }
label { font-size: 0.9rem; font-weight: 700; }
input, select, textarea { width: 100%; border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; background: white; color: var(--text); }
input:focus, select:focus, textarea:focus { outline: 2px solid rgba(23,71,166,0.18); border-color: rgba(23,71,166,0.3); }
.password-control { display: flex; align-items: stretch; width: 100%; }
.password-control input { border-radius: 14px 0 0 14px; border-right: 0; }
.password-control button {
  border: 1px solid var(--line);
  border-radius: 0 14px 14px 0;
  background: #f8fbff;
  color: var(--primary);
  font-weight: 800;
  padding: 0 14px;
  cursor: pointer;
}
.password-control input:focus + button { border-color: rgba(23,71,166,0.3); }
.settings-status-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 14px; }
.competency-strip { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.competency-chip {
  border: 1px solid rgba(23,71,166,0.18);
  background: #eef5ff;
  color: var(--primary);
  border-radius: 999px;
  padding: 7px 10px;
  font-size: 0.82rem;
  font-weight: 800;
}
textarea { min-height: 110px; resize: vertical; }
table { width: 100%; min-width: 640px; border-collapse: collapse; }
th, td { padding: 12px 10px; text-align: left; border-bottom: 1px solid var(--line); font-size: 0.95rem; }
th { font-size: 0.78rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; }
.empty-state { padding: 26px; border: 1px dashed var(--line); border-radius: 18px; color: var(--muted); text-align: center; }
.modal-backdrop { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 20px; background: rgba(11,18,34,0.55); backdrop-filter: blur(8px); }
.modal-card { width: min(760px, 100%); max-height: 92vh; overflow: auto; background: white; border-radius: 28px; box-shadow: var(--shadow); position: relative; }
.modal-content { padding: 28px; }
.modal-close { position: absolute; top: 14px; right: 14px; width: 38px; height: 38px; border: none; border-radius: 50%; background: #eff4fb; }
.auth-grid { display: grid; grid-template-columns: 0.95fr 1.05fr; }
.auth-aside { padding: 28px; color: white; background: linear-gradient(180deg, var(--primary-dark), var(--primary)); }
.auth-main { padding: 28px; }
.auth-main h2, .auth-aside h2 { margin-top: 0; }
.list-check { padding-left: 18px; line-height: 1.8; color: rgba(255,255,255,0.82); }
.announcement { padding: 14px 16px; border-radius: 18px; background: var(--accent-soft); color: #7b580f; border: 1px solid rgba(224,161,38,0.24); }
.footer-note { margin-top: 24px; text-align: center; color: var(--muted); font-size: 0.9rem; }
.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: 28px 0 0;
  padding: 22px 26px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 14px 34px rgba(18, 44, 95, 0.08);
}
.site-footer strong { color: var(--primary-dark); font-size: 1.05rem; }
.site-footer p { margin: 4px 0 0; color: var(--muted); font-size: 0.92rem; }
.social-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}
.social-links a,
.footer-contact a,
.footer-contact button {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 8px 14px;
  border: 1px solid #cfdcf0;
  border-radius: 999px;
  background: #f8fbff;
  color: var(--primary-dark);
  font-weight: 800;
  text-decoration: none;
}
.footer-contact {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}
.footer-contact button {
  cursor: pointer;
  font-family: inherit;
}
.contact-social-links { justify-content: flex-start; margin-top: 10px; }
.storefront-hero {
  display: grid;
  grid-template-columns: 1.3fr .7fr;
  gap: 20px;
  padding: 32px;
  border-radius: 28px;
  margin-bottom: 22px;
  color: white;
  box-shadow: var(--shadow);
}
.storefront-school { background: linear-gradient(135deg, #0d2d6e, #1c57c5, #6fa8ff); }
.storefront-pro { background: linear-gradient(135deg, #321302, #8a4a00, #e0a126); }
.storefront-text { max-width: 700px; color: rgba(255,255,255,.84); line-height: 1.75; }
.storefront-aside { display: flex; flex-direction: column; gap: 14px; }
.storefront-aside .stat-pill span { color: rgba(255,255,255,.74); }
.catalog-tabs {
  margin-top: 18px;
  background: linear-gradient(180deg, #eef3ff 0%, #f8fbff 100%);
}
.catalog-chip-row {
  gap: 10px;
}
.catalog-chip {
  border: 1px solid #c8d6f0;
  background: #fff;
  color: var(--primary-dark);
  border-radius: 999px;
  padding: 10px 16px;
  font-weight: 700;
}
.catalog-chip.active {
  background: #244ea9;
  color: #fff;
  border-color: #244ea9;
}
.store-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.store-card {
  padding: 16px;
  border-radius: 24px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  box-shadow: var(--shadow);
}
.store-cover { height: 140px; }
.store-card h3 {
  font-size: 1.05rem;
  line-height: 1.35;
}
.store-card .btn-primary,
.store-card .btn-accent {
  padding: 9px 14px;
  font-size: .92rem;
}
.selling-points { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0; }
.selling-chip {
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(23,71,166,.08);
  color: var(--primary);
  font-size: .78rem;
  font-weight: 700;
}
.price-block {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 0;
  margin: 8px 0 12px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.price-block strong {
  font-size: 1.8rem;
  font-family: "Playfair Display", serif;
}
.price-block span { color: var(--muted); font-size: .9rem; }
.quick-school { background: linear-gradient(180deg, #f8fbff 0%, #eaf2ff 100%); }
.quick-literacy { background: linear-gradient(180deg, #f4fffb 0%, #e0f7ef 100%); }
.quick-pro { background: linear-gradient(180deg, #fffaf0 0%, #fff1d5 100%); }
.certificate-card {
  padding: 10px 4px;
}
.certificate-card h2 {
  margin: 8px 0 12px;
  font-family: "Playfair Display", serif;
  font-size: 2rem;
  color: #1b377e;
}
.school-topnav {
  padding: 0;
  overflow: hidden;
  margin-bottom: 16px;
}
.school-topnav-row {
  display: flex;
  gap: 8px;
  padding: 14px 18px;
  overflow-x: auto;
  background: linear-gradient(180deg, #f2f5fb 0%, #e9eef8 100%);
}
.school-topnav-item {
  border: none;
  background: transparent;
  color: #5a6f9e;
  font-weight: 800;
  padding: 10px 14px 14px;
  border-bottom: 3px solid transparent;
  white-space: nowrap;
}
.school-topnav-item.active {
  color: #2147a0;
  border-bottom-color: #2147a0;
}
.school-heading-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  margin-top: 20px;
}
.school-badge {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  border-radius: 999px;
  background: #edf3ff;
  color: #2147a0;
  font-weight: 800;
  font-size: .88rem;
  margin-bottom: 10px;
}
.school-heading-title {
  margin: 0 0 8px;
  font-family: "Playfair Display", serif;
  font-size: 2rem;
  color: #16264b;
}
.school-view-switch {
  display: inline-flex;
  background: #e8eefb;
  padding: 6px;
  border-radius: 18px;
  gap: 6px;
}
.school-view-switch-btn {
  border: none;
  background: transparent;
  padding: 12px 16px;
  border-radius: 14px;
  font-weight: 800;
  color: #5d6f97;
}
.school-view-switch-btn.active {
  background: #2147a0;
  color: #fff;
}
.contact-hero {
  padding: 34px 34px 28px;
  margin-bottom: 18px;
  border-radius: 28px;
  background:
    radial-gradient(circle at top left, rgba(31, 63, 152, 0.16), transparent 22%),
    linear-gradient(180deg, #eef4ff 0%, #f9fbff 100%);
  border: 1px solid rgba(190, 209, 243, 0.9);
}
.contact-hero .hero-title {
  margin: 0 0 12px;
  color: #16264b;
}
.contact-hero-text {
  margin: 0;
  max-width: 780px;
  color: #5b6d95;
  font-size: 1.05rem;
  line-height: 1.7;
}
.contact-panel {
  background: linear-gradient(180deg, #f8fbff 0%, #eef4ff 100%);
}
.founder-message {
  display: grid;
  grid-template-columns: minmax(220px, 340px) minmax(0, 1fr);
  gap: 28px;
  align-items: center;
  margin-bottom: 18px;
}
.founder-photo-wrap {
  overflow: hidden;
  border-radius: 22px;
  border: 1px solid var(--line);
  background: #eef4ff;
  box-shadow: 0 18px 42px rgba(18, 44, 95, 0.14);
}
.founder-photo {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: center top;
}
.founder-copy {
  min-width: 0;
}
.founder-text {
  margin-top: 14px;
  color: #445577;
  line-height: 1.75;
}
.founder-text p {
  margin: 0 0 12px;
}
.founder-signature {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  color: #16264b;
}
.founder-signature strong {
  font-size: 1.05rem;
}
.founder-signature span {
  color: var(--muted);
}
.attendance-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.attendance-option select {
  max-width: 150px;
}

@media (max-width: 1150px) {
  .hero, .page-grid, .layout-split, .auth-grid { grid-template-columns: 1fr; }
  .summary-grid, .stats-grid, .analytics-grid, .course-grid, .activity-grid, .dashboard-grid, .table-grid, .resource-grid, .quick-grid, .form-grid, .hero-stats, .storefront-hero { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .store-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .policy-grid, .service-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .course-menu-grid { grid-template-columns: 1fr; }
  .course-sidebar {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: start;
  }
  .topbar { align-items: flex-start; }
  .topbar-actions { justify-content: flex-start; }
}

@media (max-width: 720px) {
  body { background: #f4f7fb; }
  .site-banner { padding: 8px 12px; }
  .site-banner strong { font-size: .72rem; line-height: 1.25; }
  .site-banner span { font-size: .76rem; }
  #app { padding: 14px 10px 34px; }
  .topbar { padding-left: 10px; padding-right: 10px; }
  .topbar { gap: 10px; padding-top: 12px; padding-bottom: 12px; }
  .summary-grid, .stats-grid, .analytics-grid, .course-grid, .activity-grid, .dashboard-grid, .table-grid, .resource-grid, .quick-grid, .form-grid, .hero-stats, .store-grid, .storefront-hero, .settings-status-grid { grid-template-columns: 1fr; }
  .policy-grid, .service-grid { grid-template-columns: 1fr; }
  .site-footer {
    flex-direction: column;
    align-items: stretch;
    padding: 16px;
    text-align: center;
  }
  .social-links,
  .footer-contact,
  .contact-social-links {
    justify-content: center;
  }
  .social-links a,
  .footer-contact a,
  .footer-contact button {
    flex: 1 1 150px;
    justify-content: center;
  }
  .policy-head { flex-direction: column; align-items: stretch; }
  .service-card img { height: 160px; }
  .founder-message { grid-template-columns: 1fr; }
  .founder-photo-wrap {
    width: min(100%, 360px);
    margin: 0 auto;
  }
  .founder-photo {
    aspect-ratio: 3 / 4;
    object-position: center center;
  }
  .hero-panel, .panel, .sidebar-card { padding: 14px; border-radius: 18px; }
  .hero-title { font-size: 2rem; }
  .section-title { font-size: 1.15rem; overflow-wrap: anywhere; }
  .section-subtitle { font-size: .94rem; }
  .brand-name { font-size: 1.4rem; }
  .brand-tagline { font-size: 0.78rem; }
  .brand-block { min-width: auto; }
  .brand-copy {
    max-width: 150px;
  }
  .brand-name { font-size: 1.2rem; }
  .brand-tagline { font-size: 0.72rem; }
  .brand-logo-wrap {
    width: 56px;
    height: 70px;
    flex-basis: 56px;
  }
  .topbar-actions {
    flex-basis: 100%;
    margin-left: 0;
    justify-content: flex-start;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 8px;
    padding-bottom: 4px;
    scrollbar-width: thin;
  }
  .topbar-actions .btn-ghost,
  .topbar-actions .btn-primary,
  .topbar-actions .btn-accent,
  .topbar-actions .badge {
    padding: 9px 12px;
    font-size: .84rem;
    flex: 0 0 auto;
  }
  .toolbar,
  .badge-row {
    gap: 8px;
  }
  .toolbar {
    align-items: stretch;
  }
  .toolbar > .btn-ghost,
  .toolbar > .btn-primary,
  .toolbar > .btn-accent,
  .toolbar > a.btn-ghost,
  .toolbar > a.btn-primary,
  .toolbar > a.btn-accent {
    flex: 1 1 auto;
    justify-content: center;
    text-align: center;
  }
  table {
    min-width: 620px;
  }
  .course-workspace {
    padding: 12px;
  }
  .course-workspace-grid {
    gap: 14px;
  }
  .course-workspace-student .course-sidebar {
    display: none;
  }
  .course-sidebar {
    grid-template-columns: 1fr;
  }
  .course-main-menu {
    margin-top: 14px;
    padding: 12px;
    border-radius: 18px;
    box-shadow: 0 10px 26px rgba(18, 44, 95, 0.08);
  }
  .course-menu-head {
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 10px;
  }
  .course-menu-head h3 {
    margin: 0;
    font-size: 1rem;
    overflow-wrap: anywhere;
  }
  .course-menu-grid {
    gap: 10px;
  }
  .course-menu-section {
    padding-top: 2px;
  }
  .course-menu-list {
    max-height: 170px;
    overflow: auto;
    padding-right: 2px;
  }
  .menu-card-btn {
    padding: 10px 12px;
    border-radius: 14px;
  }
  .menu-card-btn strong {
    font-size: .94rem;
  }
  .menu-card-btn span {
    font-size: .8rem;
  }
  .course-cover {
    height: 150px !important;
    border-radius: 16px;
  }
  .activity-card,
  .course-card,
  .feed-item,
  .table-card,
  .module-card,
  .lesson-card,
  .resource-item,
  .lesson-embed-card {
    padding: 13px;
    border-radius: 16px;
  }
  .activity-card h3,
  .course-card h3,
  .feed-item h3 {
    overflow-wrap: anywhere;
  }
  .activity-card .toolbar,
  .resource-item {
    align-items: stretch;
    flex-direction: column;
  }
  .game-answer-grid,
  .podium-grid,
  .game-intro,
  .game-detail-hero {
    grid-template-columns: 1fr;
  }
  .game-intro {
    padding: 16px;
    border-radius: 18px;
  }
  .game-intro h2 {
    font-size: 1.55rem;
  }
  .game-question {
    padding: 16px;
    border-radius: 16px;
  }
  .game-question h3 {
    font-size: 1.15rem;
  }
  .game-answer-card {
    min-height: 62px;
    padding: 13px;
    border-radius: 16px;
  }
  .game-qr-card {
    align-items: stretch;
    flex-direction: column;
  }
  .game-qr-card img {
    width: 180px;
    height: 180px;
    margin: 0 auto;
  }
  .game-qr-fallback {
    width: 180px;
    height: 180px;
    margin: 0 auto;
  }
  .modal-backdrop { padding: 10px; align-items: start; }
  .modal-card { width: 100%; max-height: 94vh; border-radius: 20px; }
  .modal-content { padding: 20px; }
  .storefront-hero { padding: 20px; }
  .school-topnav,
  .school-levelnav {
    overflow-x: auto;
    flex-wrap: nowrap;
  }
  .school-heading-row { flex-direction: column; align-items: stretch; }
  .attendance-option {
    align-items: stretch;
    flex-direction: column;
  }
  .attendance-option select {
    max-width: none;
  }
  .resource-preview iframe,
  .resource-preview video,
  .resource-preview.compact iframe,
  .resource-preview.compact video {
    min-height: 300px;
    border-radius: 14px;
  }
  .resource-preview img {
    border-radius: 14px;
  }
}
