:root {
  --text-body: 0.9375rem;
  --text-input: 1rem;
  --text-small: 0.84375rem;
  --text-label: 0.75rem;
  --ink: #142744;
  --ink-rgb: 20, 39, 68;
  --ink-secondary: #344963;
  --muted-strong: #536882;
  --muted: #6b7d95;
  --muted-soft: #8797ae;
  --muted-faint: #b6c4d8;
  --primary: #1646a3;
  --primary-rgb: 22, 70, 163;
  --primary-dark: #123684;
  --primary-soft: #e8f0ff;
  --primary-tint: #f1f6ff;
  --primary-border: #c9daf6;
  --primary-focus: #86a8e4;
  --primary-light: #a5c5f1;
  --primary-ice: #d7e8ff;
  --page: #f6f8fc;
  --line: #e4ebf5;
  --line-strong: #d1ddeb;
  --subtle: #f0f4fa;
  --wash: #f8faff;
  --brand-deep: #102c64;
  --brand-gradient: linear-gradient(115deg, #0e5490 0%, #13429e 52%, #162eaa 100%);
  --sidebar: 264px;
  --bs-primary: var(--primary);
  --bs-primary-rgb: var(--primary-rgb);
  --bs-body-color: var(--ink);
  --bs-secondary-color: var(--muted);
  --bs-body-font-family: Inter, 'Segoe UI', Arial, sans-serif;
  --bs-border-color: var(--line-strong);
  --bs-border-radius: 0.75rem;
  --bs-link-color: var(--primary);
  --bs-link-color-rgb: var(--primary-rgb);
  --bs-link-hover-color: var(--primary-dark);
  --bs-link-hover-color-rgb: 18, 54, 132;
  --bs-focus-ring-color: rgba(var(--primary-rgb), 0.2);
}

* {
  box-sizing: border-box;
}
body {
  margin: 0;
  color: var(--ink);
  font-size: var(--text-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a {
  text-decoration: none;
  color: var(--primary);
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  touch-action: manipulation;
}
h1,
h2,
h3 {
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.3;
}
h1 {
  font-size: 1.9375rem;
}
h2 {
  font-size: 1.3125rem;
}
h3 {
  font-size: 1.0625rem;
}
.icon {
  flex-shrink: 0;
  vertical-align: middle;
}
.btn {
  font-weight: 600;
  font-size: var(--text-body);
  min-height: 43px;
  padding: 10px 18px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.btn-sm {
  min-height: 36px;
  font-size: var(--text-small);
  padding: 7px 12px;
}
.btn-lg {
  min-height: 54px;
  font-size: var(--text-body);
}
.btn-primary {
  --bs-btn-bg: var(--primary);
  --bs-btn-border-color: var(--primary);
  --bs-btn-hover-bg: var(--primary-dark);
  --bs-btn-hover-border-color: var(--primary-dark);
  --bs-btn-active-bg: var(--primary-dark);
  --bs-btn-active-border-color: var(--primary-dark);
  box-shadow: 0 5px 12px rgba(var(--primary-rgb), 0.082);
  --bs-btn-focus-shadow-rgb: var(--primary-rgb);
  --bs-btn-disabled-bg: var(--primary);
  --bs-btn-disabled-border-color: var(--primary);
}
.btn-light {
  --bs-btn-bg: var(--primary-tint);
  --bs-btn-border-color: var(--primary-tint);
  --bs-btn-hover-bg: var(--subtle);
  color: var(--muted-strong);
}
.btn-outline-primary {
  --bs-btn-color: var(--primary);
  --bs-btn-border-color: var(--primary-border);
  --bs-btn-hover-bg: var(--primary);
  --bs-btn-hover-border-color: var(--primary);
  --bs-btn-active-bg: var(--primary-dark);
  --bs-btn-active-border-color: var(--primary-dark);
  --bs-btn-focus-shadow-rgb: var(--primary-rgb);
}
.btn-dark {
  --bs-btn-bg: var(--ink);
  --bs-btn-border-color: var(--ink);
}
.btn-white {
  background: #fff;
  color: var(--primary-dark);
  border-color: #fff;
}
.btn-white:hover {
  background: var(--primary-tint);
  color: var(--primary-dark);
}
.btn .icon {
  width: 18px;
  height: 18px;
}
.form-control,
.form-select {
  font-size: var(--text-input);
  min-height: 46px;
  padding: 11px 14px;
  border-color: var(--line);
  border-radius: 9px;
  background-color: #fff;
  color: var(--ink);
}
.form-control:focus,
.form-select:focus {
  border-color: var(--primary-focus);
  box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.071);
}
.form-control-lg {
  min-height: 54px;
}
.form-label {
  font-size: var(--text-body);
  font-weight: 650;
  color: var(--ink-secondary);
  margin-bottom: 9px;
}
.form-help {
  font-size: var(--text-small);
  line-height: 1.8;
  color: var(--muted);
}
.form-check {
  line-height: 1.7;
  font-size: var(--text-body);
}
.form-check-input:checked {
  background-color: var(--primary);
  border-color: var(--primary);
}
textarea.form-control {
  min-height: 100px;
  resize: vertical;
}
.form-actions {
  display: flex;
  gap: 12px;
  border-top: 1px solid var(--line);
  padding-top: 24px;
  margin-top: 30px;
}
.form-panel {
  max-width: 760px;
}
.wide-form {
  max-width: 1000px;
}
.skip-link {
  position: fixed;
  top: -70px;
  left: 12px;
  z-index: 1100;
  background: var(--primary);
  color: #fff;
  padding: 12px;
}
.skip-link:focus {
  top: 12px;
}
:focus-visible {
  outline: 3px solid var(--primary-focus);
  outline-offset: 3px;
}
.app-body {
  background: var(--page);
}
.sidebar {
  --bs-offcanvas-width: var(--sidebar);
  width: var(--sidebar);
  height: 100vh;
  height: 100dvh;
  position: fixed;
  top: 0;
  left: 0;
  background: #fff !important;
  border-right: 1px solid var(--line) !important;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 1045;
}
.sidebar-brand {
  flex: none;
  padding: 16px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  color: var(--ink);
  font-size: 21px;
  font-weight: 750;
  letter-spacing: -0.055em;
  line-height: 1.25;
}
.brand:hover {
  color: var(--ink);
}
.brand-mark {
  width: 64px;
  height: 50px;
  display: block;
  flex-shrink: 0;
  object-fit: cover;
  object-position: center 46%;
  border-radius: 10px;
}
.sidebar .brand {
  gap: 9px;
  font-size: 18px;
}
.brand-illustration {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}
.btn-account-access {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  color: var(--primary);
  background: var(--primary-tint);
  border: 1px solid var(--primary-border);
  white-space: nowrap;
}
.btn-account-access:hover,
.btn-account-access:focus-visible {
  color: #fff;
  background: var(--primary-dark);
  border-color: var(--primary-dark);
}
.btn-account-access .icon {
  width: 17px;
  height: 17px;
}
.account-access-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  margin-bottom: 26px;
  border: 1px solid var(--primary-border);
  border-radius: 14px;
  background: var(--primary-tint);
  color: var(--primary-dark);
}
.account-access-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  border-radius: 11px;
  background: var(--primary-soft);
}
.account-access-bar > div {
  display: grid;
  gap: 3px;
  min-width: 0;
  overflow-wrap: anywhere;
}
.account-access-bar > div > span {
  font-size: var(--text-small);
}
.account-access-bar > form {
  flex-shrink: 0;
  margin-left: auto;
}
@media (max-width: 575px) {
  .account-access-bar {
    flex-wrap: wrap;
    padding: 13px;
    gap: 9px;
  }
  .account-access-bar > div {
    flex: 1;
  }
  .account-access-bar > form {
    flex-basis: calc(100% - 47px);
    margin-left: 47px;
  }
}
.brand small {
  display: block;
  font-size: var(--text-small);
  font-weight: 550;
  letter-spacing: normal;
  white-space: normal;
  margin-top: 2px;
  color: var(--muted-strong);
}
.sidebar-nav {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior-y: contain;
  scroll-padding-block: 4px;
  padding: 4px 12px 8px;
  scrollbar-width: thin;
  scrollbar-color: var(--muted) transparent;
}
.nav-section {
  font-size: var(--text-label);
  font-weight: 750;
  letter-spacing: 1.2px;
  color: var(--muted-soft);
  text-transform: uppercase;
  padding: clamp(18px, 3vh, 26px) 13px 6px;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  padding: 8px 13px;
  border-radius: 9px;
  color: var(--muted-strong);
  font-size: var(--text-body);
  font-weight: 550;
  margin-bottom: 2px;
  transition:
    background 0.15s,
    color 0.15s;
}
.nav-item .icon {
  width: 19px;
  height: 19px;
}
.nav-item:hover {
  color: var(--primary);
  background: var(--primary-tint);
}
.nav-item.active {
  background: var(--primary-tint);
  color: var(--primary);
  font-weight: 700;
}
.nav-ai {
  color: var(--primary);
}
.tiny-badge {
  background: var(--primary-soft);
  border-radius: 5px;
  color: var(--primary);
  font-size: var(--text-label);
  font-weight: 750;
  margin-left: auto;
  padding: 1px 5px;
}
.sidebar-bottom {
  flex: none;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  padding-bottom: max(10px, env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
}
.account-mini {
  display: flex;
  flex: 1;
  min-width: 0;
  align-items: center;
  gap: 9px;
  color: var(--ink);
}
.account-mini > span:nth-child(2) {
  min-width: 0;
  flex: 1;
}
.account-mini strong {
  display: block;
  font-size: var(--text-body);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.account-mini small {
  display: block;
  font-size: var(--text-small);
  color: var(--muted-strong);
  margin-top: 2px;
}
.avatar {
  width: 36px;
  height: 36px;
  display: inline-grid;
  place-items: center;
  border-radius: 11px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 15px;
  font-weight: 750;
  flex-shrink: 0;
}
.avatar-small {
  width: 34px;
  height: 34px;
  font-size: var(--text-small);
}
.avatar-large {
  width: 58px;
  height: 58px;
  border-radius: 19px;
  font-size: 24px;
}
.logout-btn {
  border: 0;
  background: var(--primary-tint);
  color: var(--muted-strong);
  border-radius: 9px;
  display: grid;
  place-items: center;
  min-width: 44px;
  min-height: 44px;
  padding: 4px 8px;
  font-size: var(--text-small);
  line-height: 1.25;
}
.logout-btn .icon {
  width: 19px;
  height: 19px;
}
.logout-btn:hover {
  color: #c04e59;
}
.app-shell {
  margin-left: var(--sidebar);
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}
.topbar {
  height: 77px;
  padding: 0 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  background: #fff;
  gap: 12px;
}
.topbar-title {
  font-size: var(--text-small);
  color: var(--muted-strong);
}
.topbar-title .text-muted {
  margin: 0 12px;
  color: var(--muted-faint) !important;
}
.profile-toggle {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 12px;
  background: transparent;
}
.profile-toggle:hover .avatar,
.profile-toggle[aria-expanded='true'] .avatar {
  box-shadow: 0 0 0 2px var(--primary);
}
.profile-menu {
  --bs-dropdown-font-size: var(--text-body);
  --bs-dropdown-spacer: 0.375rem;
  width: min(15rem, calc(100vw - 2rem));
  overflow-wrap: anywhere;
}
.profile-menu .dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  min-height: 44px;
  white-space: normal;
}
.profile-menu .icon {
  width: 18px;
  height: 18px;
}
.language-form {
  display: flex;
  align-items: center;
  gap: 6px;
}
.language-form .icon {
  width: 16px;
  height: 16px;
  color: var(--muted);
}
.language-select {
  border: 0;
  background: transparent;
  color: var(--muted-strong);
  font-size: var(--text-input);
  max-width: 120px;
  min-height: 34px;
  cursor: pointer;
}
.icon-button {
  border: 0;
  background: var(--primary-tint);
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: var(--muted-strong);
}
.main-content {
  padding: 31px 36px 42px;
  max-width: 1640px;
  width: 100%;
  margin: 0 auto;
  flex: 1;
}
.app-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 4px 20px;
  font-size: var(--text-small);
  color: var(--muted-soft);
  margin: 0 36px;
  padding: 17px 0 22px;
  border-top: 1px solid var(--line);
}
.app-footer a {
  color: var(--muted-soft);
}
.page-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 26px;
}
.page-heading h1 {
  margin-bottom: 7px;
}
.page-heading p {
  color: var(--muted-soft);
  margin: 0;
  font-size: var(--text-body);
}
.eyebrow {
  font-size: var(--text-label);
  letter-spacing: 1.7px;
  font-weight: 750;
  color: var(--muted-strong);
  display: block;
  margin-bottom: 9px;
}
.eyebrow.light {
  color: var(--primary-light);
}
.dot-separator {
  margin: 0 8px;
  color: var(--line-strong);
}
.wave {
  font-weight: 400;
  color: #efb75c;
  font-size: 25px;
  margin-left: 7px;
}
.panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 26px;
  box-shadow: 0 4px 20px rgba(var(--ink-rgb), 0.008);
}
.panel > h2 {
  margin-bottom: 22px;
}
.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  margin-bottom: 20px;
}
.section-heading h2 {
  margin: 0;
  font-size: 1.3125rem;
}
.section-heading > a {
  font-size: var(--text-small);
  font-weight: 650;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.section-heading > a .icon {
  width: 15px;
  height: 15px;
}
.tag {
  font-size: var(--text-small);
  font-weight: 600;
  color: var(--muted);
  background: var(--subtle);
  border-radius: 6px;
  padding: 4px 8px;
  display: inline-block;
  line-height: 1.5;
}
.soft-blue {
  background: var(--primary-tint);
  color: var(--primary);
}
.soft-green {
  background: #e9f7ef;
  color: #4d9973;
}
.soft-red {
  background: #fff0f0;
  color: #be6370;
}
.status-label {
  font-size: var(--text-small);
  color: var(--muted-soft);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.status-label:before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}
.status-label.is-active {
  color: #55a386;
}
.peach {
  background: var(--primary-tint);
  color: var(--primary);
}
.mint {
  background: var(--wash);
  color: var(--primary);
}
.lavender {
  background: var(--primary-soft);
  color: var(--primary);
}
.blue {
  background: var(--primary-ice);
  color: var(--primary-dark);
}
.tile-icon {
  width: 45px;
  height: 45px;
  border-radius: 13px;
  display: inline-grid;
  place-items: center;
}
.tile-icon .icon {
  width: 23px;
  height: 23px;
}
.empty-state {
  text-align: center;
  padding: 38px 16px;
  color: var(--muted-soft);
}
.empty-icon {
  display: grid;
  place-items: center;
  width: 60px;
  height: 60px;
  border-radius: 20px;
  background: var(--primary-tint);
  color: var(--primary-light);
  margin: 0 auto 17px;
}
.empty-state h3 {
  font-size: 1.0625rem;
  color: var(--muted);
  margin-bottom: 7px;
}
.empty-state p {
  font-size: var(--text-small);
  margin: 0;
}
.grid-full {
  grid-column: 1/-1;
}
.back-link {
  color: var(--muted-soft);
  font-size: var(--text-small);
  display: inline-block;
  margin-bottom: 12px;
}
.pagination-row {
  display: flex;
  justify-content: center;
  gap: 20px;
  align-items: center;
  margin: 25px 0 0;
  font-size: var(--text-small);
}
.welcome-banner {
  border-radius: 18px;
  background: var(--brand-gradient);
  color: #fff;
  min-height: 250px;
  display: flex;
  position: relative;
  overflow: hidden;
  padding: 32px 35px;
  margin-bottom: 31px;
}
.banner-copy {
  position: relative;
  z-index: 2;
}
.banner-copy h2 {
  font-size: 2.125rem;
  line-height: 1.3;
  letter-spacing: -0.045em;
  font-weight: 650;
}
.banner-copy h2 span {
  color: var(--primary-border);
}
.banner-copy p {
  font-size: var(--text-body);
  color: var(--primary-border);
  margin: 10px 0 21px;
}
.banner-copy .btn {
  font-size: var(--text-body);
  padding: 9px 15px;
  min-height: 38px;
}
.banner-art {
  position: absolute;
  right: 11%;
  top: 16px;
  width: 260px;
  height: 230px;
}
.art-book {
  position: absolute;
  left: 30px;
  top: 32px;
  width: 139px;
  height: 172px;
  background: var(--brand-gradient);
  border: 6px solid var(--primary-light);
  border-radius: 8px 18px 18px 8px;
  transform: rotate(-13deg);
  box-shadow: 12px 13px 0 var(--brand-deep);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  color: var(--primary-dark);
}
.art-bubble {
  position: absolute;
  right: 9px;
  top: 28px;
  padding: 13px 20px;
  background: var(--primary-ice);
  color: var(--brand-deep);
  border-radius: 18px 18px 18px 0;
  font-size: 20px;
  font-weight: 700;
  transform: rotate(8deg);
}
.art-star {
  position: absolute;
  bottom: 32px;
  right: 19px;
  font-size: 53px;
  color: var(--primary-border);
}
.art-circle {
  position: absolute;
  left: 5px;
  top: 10px;
  border: 2px solid var(--primary-focus);
  width: 200px;
  height: 200px;
  border-radius: 50%;
  opacity: 0.5;
}
.level-pill {
  position: absolute;
  right: 21px;
  top: 20px;
  border: 1px solid #ffffff2b;
  background: #ffffff0d;
  border-radius: 10px;
  padding: 9px 15px;
  text-align: center;
}
.level-pill span {
  display: block;
  font-size: var(--text-label);
  color: var(--primary-light);
}
.level-pill strong {
  font-size: 23px;
  font-weight: 600;
}
.skill-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 17px;
  margin-bottom: 18px;
}
.skill-tile {
  overflow-wrap: anywhere;
  padding: 22px;
  border-radius: 14px;
  position: relative;
  overflow: hidden;
  transition: transform 0.18s;
}
.skill-tile:hover {
  transform: translateY(-3px);
  color: inherit;
}
.skill-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  background: #ffffff9c;
  border-radius: 11px;
  margin-bottom: 24px;
}
.skill-icon .icon {
  width: 21px;
  height: 21px;
}
.skill-tile h3 {
  font-size: 1.0625rem;
  margin-bottom: 5px;
  color: var(--ink-secondary);
  letter-spacing: -0.02em;
}
.skill-tile p {
  font-size: var(--text-body);
  margin: 0;
  color: var(--muted);
}
.skill-arrow {
  position: absolute;
  right: 16px;
  top: 22px;
  opacity: 0.6;
}
.skill-arrow .icon {
  width: 15px;
  height: 15px;
}
.room-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 6px 0 30px;
}
.room-links a {
  font-size: var(--text-small);
  color: var(--muted-strong);
  display: flex;
  align-items: center;
  gap: 7px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 12px;
}
.room-links .icon {
  width: 15px;
  height: 15px;
}
.room-links a:hover {
  color: var(--primary);
  border-color: var(--primary-light);
}
.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 17px;
  margin-bottom: 25px;
}
.stat-card {
  background: #fff;
  border: 1px solid var(--line);
  padding: 20px 18px;
  border-radius: 14px;
  display: flex;
  gap: 13px;
  align-items: center;
  color: var(--ink);
}
.stat-icon {
  width: 42px;
  height: 45px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.stat-card > div > span {
  display: block;
  font-size: var(--text-small);
  color: var(--muted-soft);
}
.stat-card strong {
  display: block;
  font-size: 25px;
  font-weight: 700;
  line-height: 1.4;
}
.stat-card > .icon {
  margin-left: auto;
  width: 13px;
  color: var(--muted-faint);
}
.lesson-row {
  display: flex;
  align-items: center;
  gap: 17px;
  padding: 20px 0;
  border-top: 1px solid var(--line);
}
.lesson-date {
  border: 1px solid var(--subtle);
  background: var(--wash);
  min-width: 56px;
  padding: 8px 5px;
  border-radius: 10px;
  text-align: center;
  flex-shrink: 0;
}
.lesson-date strong {
  font-size: 21px;
  display: block;
  line-height: 1.3;
  color: var(--primary);
}
.lesson-date span {
  font-size: var(--text-label);
  color: var(--muted-soft);
}
.lesson-info {
  flex: 1;
  min-width: 0;
}
.lesson-info h2,
.lesson-info h3 {
  font-size: 1.0625rem;
  margin-bottom: 5px;
  font-weight: 650;
}
.lesson-info p {
  font-size: var(--text-small);
  color: var(--muted-soft);
  margin-bottom: 3px;
}
.lesson-info p span {
  margin: 0 5px;
}
.lesson-info small {
  font-size: var(--text-small);
  color: var(--muted-soft);
}
.lesson-info small .icon {
  width: 11px;
  height: 11px;
  margin-right: 3px;
}
.lesson-row .btn {
  font-size: var(--text-small);
  min-height: 33px;
  padding: 6px 10px;
  white-space: nowrap;
}
.lesson-row .btn .icon {
  width: 13px;
  height: 13px;
}
.lesson-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
  max-width: 45%;
}
.ai-invite {
  background: var(--primary-soft);
  border: 1px solid var(--primary-border);
  border-radius: 16px;
  padding: 25px;
}
.ai-symbol {
  display: inline-grid;
  place-items: center;
  width: 47px;
  height: 47px;
  color: var(--primary);
  background: #fff;
  border-radius: 15px;
  margin-bottom: 18px;
}
.ai-symbol .icon {
  width: 27px;
  height: 27px;
}
.ai-invite h2 {
  font-size: 20px;
  line-height: 1.4;
  max-width: 240px;
}
.ai-invite p {
  font-size: var(--text-body);
  color: var(--muted-soft);
  line-height: 1.8;
  margin-bottom: 20px;
}
.ai-invite .btn {
  font-size: var(--text-body);
  justify-content: space-between;
}
.news-item {
  padding: 17px 0;
  border-top: 1px solid var(--line);
}
.news-item:first-of-type {
  border-top: 0;
}
.news-item > small {
  font-size: var(--text-small);
  color: var(--muted-soft);
}
.news-item h3 {
  font-size: 1.0625rem;
  letter-spacing: 0;
  margin: 7px 0;
}
.news-item p {
  font-size: var(--text-body);
  color: var(--muted-soft);
  line-height: 1.8;
  margin-bottom: 0;
}
.parent-banner {
  background: var(--primary-soft);
  border-radius: 16px;
  padding: 28px;
  display: flex;
  gap: 20px;
  align-items: center;
  margin-bottom: 25px;
}
.parent-banner p {
  margin: 0;
  color: var(--muted);
  font-size: var(--text-body);
}
.banner-icon {
  color: var(--primary);
  background: #fff;
  border-radius: 17px;
  padding: 16px;
}
.children-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 25px;
}
.child-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 18px;
  color: var(--ink);
}
.child-card h3 {
  font-size: 1.0625rem;
}
.child-card > .icon {
  margin-left: auto;
  color: var(--muted-faint);
}
.student-report-heading {
  display: flex;
  gap: 18px;
  align-items: center;
  margin: 25px 0;
}
.student-report-heading h2 {
  font-size: 22px;
}
.report-row {
  display: flex;
  gap: 15px;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  padding: 14px 0;
  font-size: var(--text-body);
}
.report-row small {
  display: block;
  color: var(--muted-soft);
  font-size: var(--text-small);
}
.score-badge {
  font-weight: 700;
  font-size: var(--text-small);
  white-space: nowrap;
  color: var(--muted);
}
.library-toolbar {
  margin-bottom: 21px;
}
.filter-form {
  display: flex;
  gap: 10px;
  align-items: center;
}
.filter-form .form-select {
  width: 170px;
  font-size: var(--text-input);
}
.search-input {
  position: relative;
  flex: 1;
}
.search-input > .icon {
  position: absolute;
  left: 13px;
  top: 13px;
  width: 18px;
  height: 18px;
  color: var(--muted-faint);
}
.search-input .form-control {
  padding-left: 42px;
  font-size: var(--text-input);
}
.category-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 25px;
}
.category-pills a {
  padding: 7px 12px;
  font-size: var(--text-small);
  border-radius: 7px;
  background: #fff;
  color: var(--muted-soft);
  border: 1px solid var(--line);
}
.category-pills a.selected,
.category-pills a:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}
.content-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}
.learning-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 15px;
  overflow: hidden;
  color: var(--ink);
  transition:
    transform 0.16s,
    box-shadow 0.16s;
}
.learning-card:hover {
  transform: translateY(-3px);
  color: var(--ink);
  box-shadow: 0 8px 22px rgba(var(--ink-rgb), 0.039);
}
.learning-card-top {
  position: relative;
  height: 143px;
  padding: 23px;
  overflow: hidden;
}
.learning-card-top .tile-icon {
  background: #ffffffaa;
  width: 49px;
  height: 49px;
}
.level-badge {
  position: absolute;
  top: 20px;
  right: 20px;
  background: #ffffffa6;
  border: 1px solid #ffffffb3;
  padding: 3px 9px;
  border-radius: 6px;
  font-size: var(--text-label);
  color: var(--muted);
  font-weight: 700;
}
.card-decoration {
  font-size: 100px;
  line-height: 1;
  position: absolute;
  right: 35px;
  bottom: -24px;
  opacity: 0.18;
  transform: rotate(-12deg);
  font-weight: 800;
  letter-spacing: -10px;
}
.learning-card-body {
  padding: 22px;
}
.learning-card-body .eyebrow {
  font-size: var(--text-label);
  letter-spacing: 1px;
}
.learning-card-body h2 {
  font-size: 1.1875rem;
  margin: 6px 0 10px;
  min-height: 41px;
}
.learning-card-body p {
  font-size: var(--text-body);
  color: var(--muted-soft);
}
.learning-card-footer {
  border-top: 1px solid var(--line);
  padding-top: 15px;
  margin-top: 19px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--muted-soft);
  font-size: var(--text-small);
}
.learning-card-footer .icon {
  width: 15px;
  height: 15px;
}
.learning-card-footer span .icon {
  width: 12px;
  height: 12px;
}
.group-card h2 {
  font-size: 20px;
  margin: 22px 0 9px;
}
.group-card p {
  font-size: var(--text-body);
  color: var(--muted-soft);
  min-height: 35px;
}
.group-meta {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  font-size: var(--text-small);
  color: var(--muted-soft);
}
.group-meta .icon {
  width: 14px;
  height: 14px;
}
.search-form {
  display: flex;
  gap: 10px;
  max-width: 550px;
}
.user-role-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-bottom: 22px;
}
.user-role-filter {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 10px 15px;
  border: 1px solid var(--line);
  border-radius: 11px;
  color: var(--muted);
  background: #fff;
  font-weight: 600;
  line-height: 1.3;
}
.user-role-filter:hover,
.user-role-filter:focus-visible {
  color: var(--primary);
  background: var(--primary-tint);
  border-color: var(--primary-border);
}
.user-role-filter.is-selected {
  color: #fff;
  background: var(--primary);
  border-color: var(--primary);
}
.user-role-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  padding: 3px 6px;
  border-radius: 7px;
  background: var(--subtle);
  font-size: 12px;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}
.is-selected > .user-role-count {
  color: #fff;
  background: #ffffff26;
}
.table {
  font-size: var(--text-body);
  --bs-table-color: var(--muted-strong);
  --bs-table-border-color: var(--line);
  margin-bottom: 0;
}
.table th {
  font-size: var(--text-small);
  color: var(--muted-soft);
  font-weight: 600;
  padding: 12px 10px;
  white-space: nowrap;
}
.table td {
  padding: 15px 10px;
}
.table strong {
  font-weight: 600;
  color: var(--muted-strong);
}
.person-cell {
  display: flex;
  align-items: center;
  gap: 12px;
}
.person-cell strong {
  display: block;
  font-size: var(--text-body);
}
.person-cell small {
  display: block;
  font-size: var(--text-small);
  color: var(--muted-soft);
  margin-top: 3px;
}
.table .btn {
  font-size: var(--text-small);
}
.table .form-select,
.table .form-control {
  min-height: 38px;
  font-size: var(--text-input);
}
.member-list {
  border: 1px solid var(--line);
  border-radius: 10px;
  max-height: 300px;
  overflow: auto;
  padding: 8px;
}
.member-option {
  display: flex;
  gap: 13px;
  align-items: center;
  padding: 10px;
  border-bottom: 1px solid var(--line);
  font-size: var(--text-body);
}
.member-option:last-child {
  border-bottom: 0;
}
.member-option small {
  display: block;
  color: var(--muted-soft);
  font-size: var(--text-small);
}
.member-option .form-check-input {
  margin: 0;
  flex-shrink: 0;
}
.room-assign-form {
  align-items: center;
}
.room-assign-form .form-select {
  flex: none;
  width: clamp(9rem, 16vw, 12.5rem);
}
.room-assign-form .btn {
  flex: none;
  white-space: nowrap;
}
.content-article {
  font-size: var(--text-body);
  line-height: 1.9;
}
.prose-text {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  line-height: 1.9;
}
.media-player {
  width: 100%;
  max-height: 520px;
  border-radius: 12px;
  background: var(--ink);
  margin-top: 20px;
}
.content-image {
  max-width: 100%;
  max-height: 650px;
  border-radius: 12px;
  margin-top: 20px;
}
.attachment-link {
  display: flex;
  align-items: center;
  gap: 15px;
  border: 1px solid var(--line);
  background: var(--primary-tint);
  padding: 18px;
  border-radius: 12px;
  margin-top: 20px;
  font-size: var(--text-body);
}
.attachment-link span {
  flex: 1;
  overflow-wrap: anywhere;
}
.attachment-link small {
  display: block;
  font-size: var(--text-small);
  color: var(--muted-soft);
  margin-top: 3px;
}
.detail-list {
  margin: 20px 0 0;
  font-size: var(--text-body);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.detail-list dt {
  font-weight: 400;
  color: var(--muted-soft);
}
.detail-list dd {
  text-align: right;
  color: var(--muted-strong);
  margin: 0;
  overflow-wrap: anywhere;
}
.notice-line {
  background: #fff6e6;
  border-radius: 9px;
  padding: 10px 14px;
  color: #a18b5f;
  font-size: var(--text-small);
  margin-bottom: 20px;
  display: flex;
  gap: 8px;
  align-items: center;
}
.notice-line .icon {
  width: 16px;
  height: 16px;
}
.question-builder {
  background: var(--wash);
  border: 1px solid var(--primary-soft);
  border-radius: 12px;
  padding: 22px;
  margin-bottom: 16px;
}
.exam-question {
  padding: 25px 0;
  border-top: 1px solid var(--line);
}
.exam-question legend {
  float: none;
  font-size: 1.0625rem;
  font-weight: 600;
  line-height: 1.6;
  margin-bottom: 16px;
}
.exam-option {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 15px;
  border: 1px solid var(--line);
  border-radius: 9px;
  margin-bottom: 9px;
  font-size: var(--text-body);
  cursor: pointer;
}
.exam-option:has(input:checked) {
  background: var(--primary-tint);
  border-color: var(--primary-light);
}
.exam-option input {
  flex-shrink: 0;
}
.exam-timer {
  background: var(--primary-soft);
  color: var(--primary);
  font-weight: 750;
  font-size: 17px;
  border-radius: 10px;
  padding: 12px 18px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 14px 0;
  position: sticky;
  top: 12px;
  z-index: 2;
}
.submission-done {
  text-align: center;
  padding: 30px 10px;
  color: #79a68c;
}
.submission-done > .icon {
  width: 40px;
  height: 40px;
  margin-bottom: 18px;
}
.submission-done p {
  color: var(--muted-soft);
  font-size: var(--text-body);
}
.submission-review {
  border-top: 1px solid var(--line);
  padding: 18px 0;
}
.submission-review summary {
  cursor: pointer;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  align-items: center;
}
.submission-review summary strong {
  font-size: var(--text-body);
}
.word-practice {
  background: var(--wash);
  border-radius: 15px;
  padding: 25px;
  margin-top: 25px;
  text-align: center;
}
.practice-word {
  font-size: 34px;
  font-weight: 700;
  color: var(--muted-strong);
  margin-bottom: 25px;
}
.practice-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.practice-options button {
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--muted);
  font-size: var(--text-body);
}
.practice-options button.is-correct {
  background: #e6f6ec;
  border-color: #abd9bc;
  color: #4a9461;
}
.practice-feedback {
  min-height: 24px;
  margin-top: 15px;
  color: var(--muted);
  font-size: var(--text-body);
}
.upload-progress {
  font-size: var(--text-body);
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--primary);
  margin-top: 20px;
}
[hidden] {
  display: none !important;
}
.chat-layout {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  gap: 20px;
}
.chat-history {
  padding: 20px;
  height: calc(100dvh - 275px);
  min-height: 430px;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}
.chat-history h2 {
  font-size: 1.0625rem;
  color: var(--muted-soft);
  margin-bottom: 20px;
}
.chat-history-item {
  font-size: var(--text-small);
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 12px 10px;
  border-radius: 8px;
  color: var(--muted-soft);
}
.chat-history-item span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.chat-history-item .icon {
  width: 16px;
  height: 16px;
}
.chat-history-item.selected {
  background: var(--primary-soft);
  color: var(--primary);
}
.chat-allowance {
  margin-top: auto;
  padding-top: 22px;
  font-size: var(--text-small);
  color: var(--muted-soft);
  display: flex;
  gap: 8px;
  align-items: flex-start;
}
.chat-allowance .icon {
  width: 16px;
  height: 16px;
}
.chat-main {
  padding: 0;
  display: flex;
  flex-direction: column;
  height: calc(100dvh - 275px);
  min-height: 500px;
  overflow: hidden;
}
.chat-top {
  padding: 18px 23px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 11px;
}
.ai-symbol.small {
  width: 35px;
  height: 35px;
  border-radius: 11px;
  background: var(--primary-soft);
  margin: 0;
}
.ai-symbol.small .icon {
  width: 19px;
  height: 19px;
}
.chat-top strong {
  display: block;
  font-size: var(--text-body);
}
.chat-top small {
  display: block;
  font-size: var(--text-small);
  color: var(--muted-soft);
}
.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 25px;
  scroll-behavior: smooth;
}
.chat-empty {
  text-align: center;
  max-width: 360px;
  margin: 55px auto;
  color: var(--muted-soft);
}
.chat-empty .ai-symbol {
  width: 65px;
  height: 65px;
  background: var(--primary-soft);
  border-radius: 22px;
  color: var(--primary-focus);
}
.chat-empty h2 {
  font-size: 20px;
  color: var(--muted);
}
.chat-empty p {
  font-size: var(--text-body);
  line-height: 1.9;
}
.chat-message {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 22px;
}
.chat-avatar {
  background: var(--primary-soft);
  color: var(--muted-soft);
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 29px;
  height: 29px;
  border-radius: 10px;
  font-size: var(--text-small);
}
.chat-avatar .icon {
  width: 16px;
  height: 16px;
}
.chat-bubble {
  background: var(--primary-tint);
  color: var(--muted);
  padding: 14px 17px;
  border-radius: 0 12px 12px 12px;
  font-size: var(--text-body);
  line-height: 1.9;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  max-width: 90%;
}
.chat-message.user {
  flex-direction: row-reverse;
}
.chat-message.user .chat-avatar {
  background: var(--primary-soft);
  color: var(--primary);
}
.chat-message.user .chat-bubble {
  background: var(--primary-soft);
  border-radius: 12px 0 12px 12px;
  color: var(--muted);
}
.chat-composer {
  margin: 0 20px 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  display: flex;
  align-items: flex-end;
  padding: 8px;
  gap: 8px;
  background: #fff;
}
.chat-composer:focus-within {
  border-color: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.047);
}
.chat-composer textarea {
  border: 0;
  resize: none;
  outline: none;
  box-shadow: none;
  flex: 1;
  padding: 7px 10px;
  font-size: var(--text-input);
  max-height: 120px;
  background: transparent;
  min-width: 0;
}
.chat-composer textarea::placeholder {
  color: var(--muted-faint);
}
.chat-composer .btn {
  padding: 9px;
  min-height: 35px;
  width: 36px;
  border-radius: 8px;
}
.chat-privacy {
  text-align: center;
  font-size: var(--text-small);
  color: var(--muted-faint);
  padding: 10px 20px;
  margin: 0;
  line-height: 1.7;
}
.chat-start {
  text-align: center;
  padding: 0 20px 15px;
}
.chat-error {
  font-size: var(--text-small);
  color: #ba6c87;
  padding: 7px 23px;
}
.ai-title-badge {
  font-size: var(--text-small);
  color: var(--muted-soft);
  background: var(--primary-soft);
  border: 1px solid var(--primary-border);
  padding: 4px 8px;
  border-radius: 7px;
  vertical-align: middle;
  letter-spacing: 0;
}
.message-item {
  border-bottom: 1px solid var(--line);
  padding: 16px 0;
}
.message-item summary {
  display: flex;
  align-items: center;
  gap: 13px;
  cursor: pointer;
}
.message-item summary strong {
  display: block;
  font-size: var(--text-body);
}
.message-item summary small {
  display: block;
  font-size: var(--text-small);
  color: var(--muted-soft);
  margin-top: 4px;
}
.message-avatar {
  background: var(--primary-soft);
  border-radius: 11px;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  color: var(--muted-soft);
  flex-shrink: 0;
}
.message-avatar .icon {
  width: 19px;
  height: 19px;
}
.message-body {
  padding: 20px 0 5px 51px;
  font-size: var(--text-body);
  color: var(--muted);
}
.mfa-secret {
  padding: 18px;
  background: var(--primary-tint);
  border: 1px dashed var(--primary-light);
  border-radius: 12px;
  font-size: 17px;
  letter-spacing: 2px;
  display: block;
  word-break: break-all;
  color: var(--muted);
}
.recovery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
.recovery-grid code {
  background: var(--primary-tint);
  padding: 12px;
  text-align: center;
  color: var(--muted);
  border-radius: 8px;
}
.error-box {
  text-align: center;
  padding: 35px 10px;
}
.error-code {
  font-size: 68px;
  color: var(--primary-light);
  font-weight: 750;
  letter-spacing: -5px;
}
.error-box h1 {
  font-size: 20px;
  max-width: 550px;
  margin: 15px auto;
  line-height: 1.6;
}
.auth-body {
  background: #fff;
}
.login-layout {
  min-height: 100dvh;
  display: grid;
  grid-template-columns: 46% 54%;
}
.login-story {
  padding: 45px 48px 30px;
  background: var(--brand-gradient);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 760px;
}
.brand-light {
  color: #fff;
}
.brand-light:hover {
  color: #fff;
}
.brand-light small {
  color: var(--line);
}
.story-content {
  max-width: 440px;
  margin: auto;
  padding: 50px 0 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: 100%;
}
.story-content .eyebrow {
  font-size: var(--text-label);
  letter-spacing: 2.5px;
  color: var(--primary-light);
}
.story-content h1 {
  color: #fff;
  font-size: 49px;
  line-height: 1.15;
  letter-spacing: -0.055em;
  margin-top: 12px;
  font-weight: 600;
}
.story-content h1 > span {
  color: var(--primary-light);
}
.story-content > p {
  color: var(--primary-ice);
  font-size: var(--text-body);
  line-height: 1.9;
  max-width: 300px;
  margin-top: 16px;
}
.learning-orbit {
  width: 370px;
  height: 270px;
  position: relative;
  margin-top: 15px;
  align-self: center;
  flex-shrink: 0;
}
.orbit-center {
  width: 148px;
  height: 148px;
  position: absolute;
  left: 111px;
  top: 67px;
  border-radius: 22px;
  background: var(--brand-gradient);
  transform: rotate(-8deg);
  box-shadow: 10px 12px 0 var(--brand-deep);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  color: var(--primary-dark);
  overflow: hidden;
}
.orbit-line {
  position: absolute;
  left: 40px;
  top: 38px;
  width: 280px;
  height: 210px;
  border: 1px solid #ffffff12;
  border-radius: 50%;
  transform: rotate(-25deg);
}
.orbit-two {
  width: 340px;
  height: 260px;
  left: 10px;
  top: 12px;
  border-style: dashed;
  transform: rotate(20deg);
}
.orbit-card {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 13px 15px;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(var(--primary-rgb), 0.145);
  font-size: 10px;
  font-weight: 600;
}
.orbit-card .icon {
  width: 19px;
  height: 19px;
}
.card-read {
  background: var(--primary-ice);
  color: var(--primary-dark);
  left: 0;
  top: 58px;
  transform: rotate(-9deg);
}
.card-speak {
  background: var(--primary-soft);
  color: var(--primary);
  right: -2px;
  bottom: 48px;
  transform: rotate(7deg);
}
.orbit-star {
  position: absolute;
  right: 47px;
  top: 22px;
  font-size: 39px;
  color: var(--primary-ice);
}
.orbit-dot {
  width: 10px;
  height: 10px;
  background: var(--primary-light);
  border-radius: 50%;
  position: absolute;
  left: 48px;
  bottom: 49px;
}
.story-footer {
  display: flex;
  align-items: center;
  gap: 13px;
  color: var(--primary-ice);
  font-size: var(--text-small);
  margin-top: 30px;
}
.story-avatars {
  display: flex;
  align-items: center;
}
.story-avatars i {
  width: 25px;
  height: 25px;
  border-radius: 50%;
  border: 2px solid var(--brand-deep);
  display: grid;
  place-items: center;
  background: var(--primary-dark);
  color: #fff;
  font-style: normal;
  font-size: 9px;
}
.story-avatars i + i {
  margin-left: -7px;
  background: var(--primary);
}
.story-avatars i:last-child {
  background: var(--brand-deep);
}
.login-panel {
  display: flex;
  flex-direction: column;
  padding: 33px 48px 20px;
  position: relative;
}
.login-top {
  display: flex;
  justify-content: flex-end;
}
.login-form-wrap {
  width: 100%;
  max-width: 355px;
  margin: auto;
  padding: 35px 0;
}
.login-form-wrap h2 {
  font-size: 30px;
  letter-spacing: -0.05em;
  margin-bottom: 9px;
}
.login-form-wrap > p {
  font-size: var(--text-body);
  color: var(--muted-soft) !important;
}
.portal-tabs {
  display: flex;
  border: 1px solid var(--subtle);
  background: var(--primary-tint);
  border-radius: 11px;
  padding: 5px;
  margin: 25px 0 29px;
  gap: 4px;
}
.portal-tab {
  flex: 1;
  border: 0;
  min-height: 35px;
  border-radius: 7px;
  background: transparent;
  color: var(--muted-soft);
  font-size: var(--text-body);
  font-weight: 600;
}
.portal-tab.selected {
  background: #fff;
  color: var(--primary);
  box-shadow: 0 2px 7px rgba(var(--ink-rgb), 0.063);
}
.login-form .form-label {
  font-size: var(--text-body);
  color: var(--muted);
}
.login-form .form-control {
  font-size: var(--text-input);
  border-color: var(--line);
  background: #fff;
}
.login-form .btn-primary {
  font-size: var(--text-body);
  background: var(--primary);
  border-color: var(--primary);
  box-shadow: 0 6px 15px rgba(var(--ink-rgb), 0.102);
}
.login-form .btn-primary:hover {
  background: var(--primary-dark);
}
.password-field {
  position: relative;
}
.password-field input {
  padding-right: 50px;
}
.password-toggle {
  position: absolute;
  right: 0;
  top: 0;
  height: 100%;
  width: 46px;
  background: transparent;
  border: 0;
  color: var(--muted-faint);
  font-size: 17px;
}
.parent-login-link {
  background: none;
  border: 0;
  color: var(--primary);
  font-size: var(--text-body);
  display: flex;
  align-items: center;
  gap: 7px;
  justify-content: center;
  margin: 21px auto 0;
  padding: 5px;
}
.parent-login-link .icon {
  width: 15px;
  height: 15px;
}
.login-help {
  font-size: var(--text-small);
  color: var(--muted-faint);
  line-height: 1.8;
  text-align: center;
  margin: 20px 0 0;
}
.login-bottom {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  color: var(--muted-faint);
  font-size: var(--text-small);
  margin-top: 25px;
}
.login-bottom a {
  color: var(--muted-soft);
}
.centered-auth {
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 35px 20px;
  background: var(--primary-tint);
}
.admin-login-header,
.auth-card {
  width: 100%;
  max-width: 460px;
}
.admin-login-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
}
.admin-login-header .language-form {
  min-width: 0;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.auth-card {
  padding: 35px;
}
.auth-card h1 {
  font-size: 25px;
  margin-bottom: 20px;
}
.auth-card p {
  font-size: var(--text-body);
  color: var(--muted-soft);
}
.privacy-panel {
  max-width: 850px;
  padding: 40px;
}
.privacy-panel h1 {
  font-size: 27px;
  margin: 20px 0;
}
.privacy-panel p {
  font-size: var(--text-body);
  line-height: 2;
  color: var(--muted);
}
@media (min-width: 992px) {
  .sidebar.offcanvas-lg {
    visibility: visible !important;
    transform: none !important;
    position: fixed;
    background: #fff;
  }
  .sidebar.offcanvas-lg .offcanvas-body {
    display: flex;
  }
}
@media (min-width: 1500px) {
  .main-content {
    padding-left: 46px;
    padding-right: 46px;
  }
  .topbar {
    padding-left: 46px;
    padding-right: 46px;
  }
  .skill-tile {
    padding: 26px;
  }
  .welcome-banner {
    min-height: 270px;
    padding: 37px 40px;
  }
  .banner-copy h2 {
    font-size: 2.375rem;
  }
}
@media (max-width: 1199px) {
  :root {
    --sidebar: 238px;
  }
  .brand {
    font-size: 18px;
  }
  .nav-item {
    gap: 9px;
  }
  .main-content {
    padding: 28px 25px;
  }
  .topbar {
    padding: 0 25px;
  }
  .stat-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .content-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .children-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .banner-art {
    right: 4%;
    transform: scale(0.85);
    transform-origin: right center;
  }
  .skill-tile {
    padding: 18px 15px;
  }
  .chat-layout {
    grid-template-columns: 190px minmax(0, 1fr);
  }
  .login-story {
    padding: 35px;
  }
  .story-content h1 {
    font-size: 42px;
  }
  .learning-orbit {
    transform: scale(0.88);
    transform-origin: center;
  }
  .login-panel {
    padding: 30px 35px;
  }
  .recovery-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 991px) {
  .app-shell {
    margin-left: 0;
  }
  .sidebar {
    --bs-offcanvas-width: 272px;
  }
  .topbar {
    height: 66px;
    padding: 0 22px;
  }
  .main-content {
    padding: 26px 22px;
  }
  .app-footer {
    margin: 0 22px;
  }
  .welcome-banner {
    min-height: 250px;
  }
  .banner-art {
    right: 10%;
  }
  .skill-grid {
    gap: 14px;
  }
  .skill-tile {
    padding: 23px;
  }
  .login-layout {
    grid-template-columns: 42% 58%;
  }
  .login-story {
    padding: 30px 25px;
    min-height: 720px;
  }
  .story-content h1 {
    font-size: 34px;
  }
  .learning-orbit {
    transform: scale(0.68);
    width: 330px;
    margin-left: -40px;
  }
  .story-footer {
    gap: 8px;
  }
  .login-panel {
    padding: 25px 30px;
  }
  .login-form-wrap h2 {
    font-size: 28px;
  }
}
@media (max-width: 767px) {
  h1 {
    font-size: 1.6875rem;
  }
  .page-heading {
    align-items: flex-start;
    gap: 15px;
    flex-wrap: wrap;
    margin-bottom: 22px;
  }
  .page-heading .btn {
    font-size: var(--text-body);
  }
  .panel {
    padding: 21px;
    border-radius: 14px;
  }
  .main-content {
    padding: 23px 17px;
  }
  .topbar {
    padding: 0 17px;
  }
  .topbar-title {
    display: none;
  }
  .app-footer {
    margin: 0 17px;
  }
  .skill-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
  .skill-tile {
    padding: 23px;
  }
  .skill-icon {
    margin-bottom: 19px;
  }
  .welcome-banner {
    padding: 27px;
    min-height: 235px;
  }
  .banner-copy h2 {
    font-size: 1.8125rem;
  }
  .banner-copy p {
    max-width: 100%;
  }
  .banner-art {
    right: 12px;
    top: 58px;
    transform: scale(0.72);
  }
  .level-pill {
    right: 16px;
    top: 16px;
    padding: 6px 12px;
  }
  .level-pill strong {
    font-size: 20px;
  }
  .room-links {
    gap: 6px;
  }
  .room-links a {
    padding: 7px 9px;
  }
  .content-grid {
    gap: 15px;
  }
  .learning-card-top {
    height: 120px;
    padding: 18px;
  }
  .learning-card-body {
    padding: 17px;
  }
  .filter-form {
    flex-wrap: wrap;
    gap: 8px;
  }
  .search-input {
    flex-basis: 100%;
  }
  .filter-form .form-select {
    flex: 1;
    width: 100px;
    padding-left: 11px;
  }
  .filter-form .btn {
    font-size: var(--text-body);
    padding: 10px 13px;
  }
  .category-pills {
    gap: 6px;
  }
  .category-pills a {
    padding: 6px 9px;
  }
  .lesson-row {
    gap: 12px;
    flex-wrap: wrap;
  }
  .lesson-date {
    min-width: 48px;
  }
  .lesson-actions {
    max-width: 100%;
    flex-basis: 100%;
    justify-content: flex-start;
    padding-left: 60px;
  }
  .lesson-row > form,
  .lesson-row > .tag {
    margin-left: 60px;
  }
  .stat-card {
    padding: 16px 13px;
    gap: 10px;
  }
  .stat-card > .icon {
    display: none;
  }
  .stat-icon {
    width: 35px;
    height: 39px;
  }
  .stat-icon .icon {
    width: 18px;
    height: 18px;
  }
  .stat-card strong {
    font-size: 23px;
  }
  .children-grid {
    grid-template-columns: 1fr;
  }
  .parent-banner {
    padding: 22px;
    gap: 15px;
  }
  .parent-banner h2 {
    font-size: 1.1875rem;
  }
  .chat-layout {
    grid-template-columns: 1fr;
  }
  .chat-history {
    height: auto;
    min-height: 0;
    display: block;
    padding: 15px;
    max-height: 160px;
  }
  .chat-history h2 {
    margin-bottom: 10px;
  }
  .chat-history-item {
    display: inline-flex;
    max-width: 180px;
    padding: 8px;
  }
  .chat-allowance {
    padding-top: 12px;
  }
  .chat-main {
    height: calc(100dvh - 225px);
    min-height: 480px;
  }
  .chat-messages {
    padding: 19px;
  }
  .chat-bubble {
    max-width: 90%;
    padding: 12px;
  }
  .chat-message {
    gap: 8px;
  }
  .chat-top {
    padding: 15px;
  }
  .chat-composer {
    margin: 0 12px;
  }
  .login-layout {
    display: block;
  }
  .login-story {
    min-height: 0;
    height: auto;
    padding: 23px 27px 26px;
  }
  .login-story .brand {
    font-size: 20px;
  }
  .story-content {
    padding: 30px 0 0;
    max-width: none;
    display: block;
  }
  .story-content .eyebrow {
    margin-bottom: 10px;
  }
  .story-content h1 {
    font-size: 31px;
    margin-bottom: 0;
    max-width: 290px;
  }
  .story-content h1 br {
    display: none;
  }
  .story-content > p,
  .learning-orbit,
  .story-footer {
    display: none;
  }
  .login-panel {
    padding: 19px 25px 20px;
    min-height: calc(100dvh - 210px);
  }
  .login-form-wrap {
    max-width: 400px;
    padding-top: 16px;
  }
  .login-form-wrap h2 {
    font-size: 27px;
  }
  .portal-tabs {
    margin: 23px 0;
  }
  .auth-card {
    padding: 27px;
  }
  .privacy-panel {
    padding: 27px;
  }
  .recovery-grid {
    gap: 7px;
  }
  .mfa-secret {
    font-size: 14px;
  }
  .practice-word {
    font-size: 29px;
  }
  .practice-options {
    gap: 8px;
  }
  .practice-options button {
    padding: 11px;
  }
  .table .btn {
    white-space: nowrap;
  }
  .form-actions {
    flex-wrap: wrap;
  }
  .schedule-row .lesson-actions {
    padding-left: 0;
  }
}
@media (max-width: 575px) {
  .banner-art {
    display: none;
  }
  .banner-copy > .eyebrow {
    min-height: 1.75rem;
    padding-right: 6rem;
  }
  .level-pill {
    display: flex;
    align-items: baseline;
    gap: 0.375rem;
    padding: 0.2rem 0.5rem;
  }
  .level-pill strong {
    font-size: 1rem;
  }
}
@media (max-width: 400px) {
  .admin-login-header .language-form .ss-main.language-select {
    width: 6rem;
  }
  .admin-login-header .ss-main .choice-text {
    position: absolute;
    width: 1px;
    height: 1px;
    clip-path: inset(50%);
  }
  .admin-login-header .ss-main .choice-code {
    display: inline;
    margin: 0;
    color: inherit;
    font-size: var(--text-small);
  }
  .banner-copy h2 {
    font-size: 1.6875rem;
  }
  .welcome-banner {
    padding: 23px;
  }
  .skill-tile {
    padding: 20px 15px;
  }
  .content-grid {
    grid-template-columns: 1fr;
  }
  .stat-grid {
    grid-template-columns: 1fr;
  }
  .stat-card {
    padding: 14px 10px;
  }
  .lesson-info {
    flex-basis: calc(100% - 65px);
  }
  .chat-message .chat-avatar {
    display: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *:before,
  *:after {
    scroll-behavior: auto !important;
    transition: none !important;
    animation: none !important;
  }
}

/* Readability and touch targets */
.form-help,
.page-heading p,
.empty-state p,
.learning-card-body p,
.news-item p,
.ai-invite p,
.lesson-info p,
.chat-privacy,
.login-help {
  color: var(--muted);
}
.login-form .form-label {
  color: var(--muted-strong);
}
.login-form-wrap > p {
  color: var(--muted) !important;
}
.portal-tab {
  color: var(--muted);
}
.login-bottom {
  color: var(--muted);
}
.nav-section {
  color: var(--muted);
}
.skill-tile p {
  color: var(--muted-strong);
}
.learning-card-footer {
  color: var(--muted);
}
.lesson-info small {
  color: var(--muted);
}
.brand > span:last-child {
  min-width: 0;
}
.sidebar .brand > span:last-child {
  flex: 1;
  white-space: normal;
}
.table th {
  color: var(--muted);
}
.table td small {
  color: var(--muted);
}
.login-help {
  line-height: 1.8;
}
@media (max-width: 767px) {
  .btn-sm,
  .lesson-row .btn {
    min-height: 42px;
  }
  .room-links a {
    padding: 9px 11px;
  }
}
