:root {
  --bg: #f7f5ef;
  --surface: #ffffff;
  --ink: #17212b;
  --muted: #65717d;
  --line: #dfe4e4;
  --teal: #008c8c;
  --teal-dark: #006f73;
  --coral: #e75d47;
  --gold: #d99a21;
  --blue: #2854a3;
  --shadow: 0 22px 60px rgba(23, 33, 43, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Noto Sans TC", "Microsoft JhengHei", Arial, sans-serif;
  line-height: 1.6;
}

body.has-home-sidebar {
  --home-sidebar-width: 232px;
}

body.has-home-sidebar.sidebar-collapsed {
  --home-sidebar-width: 70px;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

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

button {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 22px;
  min-height: 72px;
  padding: 12px clamp(18px, 4vw, 56px);
  border-bottom: 1px solid rgba(23, 33, 43, 0.08);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(18px);
}

.home-sidebar {
  position: fixed;
  top: 72px;
  left: 0;
  z-index: 15;
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 14px;
  width: var(--home-sidebar-width, 0px);
  height: calc(100vh - 72px);
  padding: 14px 12px;
  border-right: 1px solid rgba(23, 33, 43, 0.08);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(18px);
  transition: width 180ms ease;
}

.sidebar-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 42px;
  height: 42px;
  align-items: center;
  border: 1px solid rgba(23, 33, 43, 0.12);
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
}

.sidebar-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: var(--ink);
}

.sidebar-nav {
  display: grid;
  align-content: start;
  gap: 8px;
}

.sidebar-nav a {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  min-height: 46px;
  border-radius: 8px;
  color: var(--ink);
  font-weight: 800;
}

.sidebar-nav a:hover {
  background: #eef3f0;
}

.sidebar-icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  color: var(--teal-dark);
  font-weight: 900;
}

.sidebar-text {
  overflow: hidden;
  white-space: nowrap;
}

body.sidebar-collapsed .sidebar-text {
  display: none;
}

body.has-home-sidebar main,
body.has-home-sidebar .site-footer {
  margin-left: var(--home-sidebar-width);
  transition: margin-left 180ms ease;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: 0;
}

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
}

.main-nav {
  display: flex;
  justify-content: center;
  gap: clamp(10px, 2vw, 24px);
  color: var(--muted);
  font-size: 0.95rem;
}

.main-nav a:hover {
  color: var(--ink);
}

.header-action,
.primary-button,
.secondary-button,
.plan-card button,
.header-login {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  font-weight: 700;
  white-space: nowrap;
}

.header-action,
.primary-button,
.plan-card button {
  border: 0;
  background: var(--teal);
  color: #fff;
  box-shadow: 0 10px 24px rgba(0, 140, 140, 0.22);
}

.header-action {
  padding: 0 16px;
}

.auth-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  justify-self: end;
}

.header-login {
  padding: 0 14px;
  border: 1px solid rgba(23, 33, 43, 0.14);
  background: #fff;
  color: var(--ink);
}

.member-menu {
  position: relative;
}

.member-menu summary {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  gap: 8px;
  padding: 0 16px;
  border: 1px solid rgba(23, 33, 43, 0.14);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  font-weight: 800;
  list-style: none;
  white-space: nowrap;
}

.member-menu summary::-webkit-details-marker {
  display: none;
}

.member-menu summary::after {
  content: "⌄";
  color: var(--muted);
  font-size: 0.95rem;
}

.member-menu[open] summary {
  border-color: rgba(0, 140, 140, 0.34);
  box-shadow: 0 0 0 3px rgba(0, 140, 140, 0.12);
}

.member-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 40;
  display: grid;
  min-width: 190px;
  padding: 8px;
  border: 1px solid rgba(23, 33, 43, 0.1);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.member-dropdown a {
  padding: 10px 12px;
  border-radius: 8px;
  color: var(--ink);
  font-weight: 800;
}

.member-dropdown a:hover {
  background: #eef3f0;
  color: var(--teal-dark);
}

.primary-button,
.secondary-button {
  padding: 0 20px;
}

.secondary-button {
  border: 1px solid rgba(23, 33, 43, 0.16);
  background: #fff;
  color: var(--ink);
}

.hero-section {
  display: grid;
  grid-template-columns: minmax(0, 0.86fr) minmax(340px, 1.14fr);
  gap: clamp(28px, 4vw, 64px);
  align-items: center;
  min-height: calc(100vh - 72px);
  padding: clamp(44px, 7vw, 86px) clamp(18px, 5vw, 72px) 42px;
}

.home-video-hero {
  min-height: calc(100vh - 72px);
  padding: clamp(28px, 5vw, 54px) clamp(18px, 5vw, 72px) clamp(36px, 5vw, 58px);
  background:
    linear-gradient(180deg, rgba(247, 245, 239, 0.3), rgba(247, 245, 239, 1)),
    #f7f5ef;
}

.home-video-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: end;
  margin-bottom: 20px;
}

.home-video-heading > .metric-row {
  justify-self: end;
}

.home-video-heading h1 {
  max-width: 860px;
  margin-bottom: 12px;
  font-size: clamp(2.2rem, 5vw, 4.6rem);
}

.home-video-heading p:not(.eyebrow) {
  max-width: 680px;
  color: var(--muted);
  font-size: 1.08rem;
}

.home-filter {
  position: sticky;
  top: 72px;
  z-index: 10;
  margin: 0 0 18px;
  padding: 12px 0;
  background: rgba(247, 245, 239, 0.92);
  backdrop-filter: blur(14px);
}

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

.home-video-grid .video-thumb {
  min-height: 120px;
}

.home-video-grid .video-body {
  padding: 16px;
}

.home-video-grid h3 {
  font-size: 1.06rem;
}

.home-video-grid .video-meta {
  gap: 6px;
  margin-top: 12px;
}

.home-video-grid .video-meta span {
  font-size: 0.78rem;
  padding: 4px 8px;
}

.home-shorts-preview {
  margin-top: clamp(28px, 4vw, 44px);
}

.inline-section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.inline-section-heading h2 {
  margin-bottom: 0;
  font-size: clamp(1.35rem, 2.2vw, 2rem);
}

.section-kicker {
  color: var(--teal-dark);
  font-size: 0.82rem;
  font-weight: 900;
  text-transform: uppercase;
}

.inline-section-heading a {
  color: var(--teal-dark);
  font-weight: 800;
}

.short-video-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
}

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

.short-video-card {
  overflow: hidden;
  border: 1px solid rgba(23, 33, 43, 0.09);
  border-radius: 8px;
  background: #fff;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.short-video-card:hover {
  transform: translateY(-3px);
  border-color: rgba(0, 140, 140, 0.28);
  box-shadow: 0 16px 42px rgba(23, 33, 43, 0.1);
}

.short-video-cover {
  display: flex;
  min-height: 260px;
  aspect-ratio: 9 / 16;
  flex-direction: column;
  justify-content: space-between;
  padding: 14px;
  color: #fff;
}

.short-video-cover span,
.short-video-cover strong {
  align-self: flex-start;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
  font-size: 0.84rem;
}

.short-video-cover.coral {
  background: linear-gradient(180deg, #e75d47, #8f3b67);
}

.short-video-cover.teal {
  background: linear-gradient(180deg, #008c8c, #1b6f78);
}

.short-video-cover.gold {
  background: linear-gradient(180deg, #d99a21, #69458a);
}

.short-video-cover.ink {
  background: linear-gradient(180deg, #2e3c58, #17212b);
}

.short-video-cover.blue {
  background: linear-gradient(180deg, #2854a3, #31a39d);
}

.short-video-body {
  padding: 14px;
}

.short-video-body h3 {
  font-size: 1rem;
}

.short-video-body .video-meta {
  gap: 6px;
  margin-top: 12px;
}

.short-video-body .video-meta span {
  font-size: 0.76rem;
  padding: 4px 8px;
}

.empty-state {
  grid-column: 1 / -1;
  padding: 28px;
  border: 1px dashed rgba(23, 33, 43, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--muted);
}

.hero-copy {
  max-width: 660px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--teal-dark);
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 18px;
  font-size: clamp(2.35rem, 5.5vw, 5.2rem);
  line-height: 1.05;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 10px;
  font-size: clamp(1.8rem, 3.2vw, 3rem);
  line-height: 1.18;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 8px;
  font-size: 1.18rem;
  line-height: 1.25;
}

.hero-text,
.section-heading p,
.feature-grid p,
.teacher-card p,
.video-card p,
.checkout-flow span,
.dashboard-grid p,
.plan-card li {
  color: var(--muted);
}

.hero-text {
  max-width: 560px;
  font-size: 1.1rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 28px 0;
}

.metric-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.metric-row span {
  display: inline-flex;
  gap: 6px;
  align-items: baseline;
  padding: 10px 14px;
  border: 1px solid rgba(23, 33, 43, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.66);
}

.hero-media {
  overflow: hidden;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.hero-media img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.section-band,
.content-section {
  padding: clamp(58px, 8vw, 96px) clamp(18px, 5vw, 72px);
}

.section-band {
  background: var(--surface);
}

.content-section {
  background: var(--bg);
}

.section-heading {
  max-width: 760px;
  margin-bottom: 28px;
}

.feature-grid,
.teacher-grid,
.plan-grid,
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.feature-grid article,
.feature-link,
.teacher-card,
.plan-card,
.dashboard-grid article,
.video-card,
.calendar-card,
.checkout-flow,
.info-panel,
.lesson-sidebar {
  border: 1px solid rgba(23, 33, 43, 0.09);
  border-radius: 8px;
  background: var(--surface);
}

.feature-grid article,
.feature-link,
.dashboard-grid article {
  padding: 22px;
}

.feature-link,
.video-cover-link,
.video-title-link,
.video-card,
.teacher-card {
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.feature-link:hover,
.video-card:hover,
.teacher-card:hover {
  transform: translateY(-3px);
  border-color: rgba(0, 140, 140, 0.28);
  box-shadow: 0 16px 42px rgba(23, 33, 43, 0.1);
}

.teacher-card.linked-target {
  border-color: var(--teal);
  box-shadow: 0 0 0 4px rgba(0, 140, 140, 0.12), 0 16px 42px rgba(23, 33, 43, 0.1);
}

.feature-icon {
  display: grid;
  width: 42px;
  height: 42px;
  margin-bottom: 18px;
  place-items: center;
  border-radius: 50%;
  background: #e9f5f4;
  color: var(--teal-dark);
  font-weight: 900;
}

.filter-panel {
  display: grid;
  gap: 10px;
  margin-bottom: 22px;
}

.search-row {
  margin-bottom: 4px;
}

.search-box {
  display: grid;
  grid-template-columns: 42px minmax(220px, 520px);
  align-items: center;
  gap: 12px;
}

.search-box span {
  color: var(--muted);
  font-weight: 800;
}

.search-box input {
  width: 100%;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid rgba(23, 33, 43, 0.14);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font: inherit;
}

.search-box input:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(0, 140, 140, 0.12);
  outline: none;
}

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

.filter-label {
  min-width: 42px;
  color: var(--muted);
  font-weight: 800;
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.filter-chip {
  min-width: 74px;
  min-height: 40px;
  border: 1px solid rgba(23, 33, 43, 0.14);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
}

.filter-chip.active {
  border-color: var(--ink);
  background: var(--ink);
  color: #fff;
}

.video-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.video-card {
  overflow: hidden;
}

.video-card-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 10px;
}

.favorite-button {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid rgba(0, 140, 140, 0.22);
  border-radius: 999px;
  background: #fff;
  color: var(--teal-dark);
  font-weight: 900;
  cursor: pointer;
}

.favorite-button.saved {
  background: var(--teal);
  color: #fff;
}

.favorite-button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.video-card:hover .video-title-link h3 {
  color: var(--teal-dark);
}

.video-cover-link {
  display: block;
}

.video-thumb {
  display: grid;
  min-height: 162px;
  place-items: end start;
  padding: 16px;
  color: #fff;
}

.video-thumb.speaking {
  background: linear-gradient(135deg, #1b6f78, #31a39d);
}

.video-thumb.listening {
  background: linear-gradient(135deg, #2854a3, #6b8ed6);
}

.video-thumb.business {
  background: linear-gradient(135deg, #26384f, #e75d47);
}

.video-thumb.grammar {
  background: linear-gradient(135deg, #69458a, #d99a21);
}

.video-thumb.exam {
  background: linear-gradient(135deg, #334155, #008c8c);
}

.video-thumb span {
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
  font-size: 0.85rem;
  font-weight: 800;
}

.video-body,
.teacher-card,
.plan-card {
  padding: 20px;
}

.video-title-link {
  display: block;
}

.video-teacher {
  margin-bottom: 0;
}

.video-teacher a {
  color: var(--teal-dark);
  font-weight: 800;
}

.video-teacher a:hover {
  text-decoration: underline;
}

.video-meta,
.teacher-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.video-meta span,
.teacher-meta span,
.plan-badge,
.dashboard-label {
  border-radius: 999px;
  background: #eef3f0;
  color: #38514e;
  font-size: 0.84rem;
  font-weight: 700;
  padding: 5px 9px;
}

.shorts-section {
  background: #18222e;
  color: #fff;
}

.shorts-section .eyebrow,
.shorts-section .section-heading p {
  color: #9fe3da;
}

.shorts-rail {
  display: grid;
  grid-template-columns: repeat(4, minmax(180px, 1fr));
  gap: 16px;
  overflow-x: auto;
  padding-bottom: 6px;
}

.short-card {
  display: flex;
  min-height: 340px;
  flex-direction: column;
  justify-content: space-between;
  padding: 20px;
  border-radius: 8px;
}

.short-card span {
  font-weight: 900;
}

.short-card p {
  font-size: 1.12rem;
  font-weight: 800;
}

.short-card.coral {
  background: #d94f3d;
}

.short-card.teal {
  background: #007c7d;
}

.short-card.gold {
  background: #c18414;
}

.short-card.ink {
  background: #2e3c58;
}

.teacher-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.teacher-card-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.teacher-video-preview {
  display: flex;
  min-height: 132px;
  align-items: end;
  justify-content: space-between;
  padding: 14px;
  border-radius: 8px;
  background: linear-gradient(135deg, #17212b, #008c8c);
  color: #fff;
  font-weight: 800;
}

.teacher-card:nth-child(2) .teacher-video-preview {
  background: linear-gradient(135deg, #2854a3, #31a39d);
}

.teacher-card:nth-child(3) .teacher-video-preview {
  background: linear-gradient(135deg, #69458a, #e75d47);
}

.teacher-card:nth-child(4) .teacher-video-preview {
  background: linear-gradient(135deg, #2e3c58, #d99a21);
}

.play-dot {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
}

.teacher-top-video {
  display: grid;
  gap: 4px;
  padding: 12px;
  border-radius: 8px;
  background: #f4f7f5;
}

.teacher-top-video span,
.teacher-info-label {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.teacher-top-video small {
  color: var(--teal-dark);
  font-weight: 800;
}

.teacher-info-group {
  display: grid;
  gap: 8px;
}

.teacher-photo {
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  font-weight: 900;
}

.teacher-card:nth-child(1) .teacher-photo {
  background: var(--teal);
}

.teacher-card:nth-child(2) .teacher-photo {
  background: var(--coral);
}

.teacher-card:nth-child(3) .teacher-photo {
  background: var(--blue);
}

.teacher-card:nth-child(4) .teacher-photo {
  background: var(--gold);
}

.plans-section {
  background: #eef3f0;
}

.plan-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(26px, 3.2vw, 44px);
}

.plan-card {
  position: relative;
  display: flex;
  min-height: 330px;
  flex-direction: column;
}

.plan-card.highlighted {
  border-color: var(--teal);
  box-shadow: var(--shadow);
}

.plan-card.current-plan {
  border-color: var(--teal);
  box-shadow: 0 0 0 4px rgba(0, 140, 140, 0.12), var(--shadow);
}

.plan-badge {
  align-self: flex-start;
  margin-bottom: 12px;
  background: #dff3f0;
  color: var(--teal-dark);
}

.plan-status {
  display: none;
  align-self: flex-start;
  margin: 0 0 12px;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 800;
}

.plan-card.current-plan .plan-status {
  display: inline-flex;
}

.price {
  margin-bottom: 18px;
  font-size: 1.9rem;
  font-weight: 900;
}

.plan-card ul {
  display: grid;
  gap: 10px;
  margin: 0 0 22px;
  padding-left: 20px;
}

.plan-card button {
  width: 100%;
  margin-top: auto;
  cursor: pointer;
}

.booking-layout {
  background: #fff;
}

.booking-panel {
  display: grid;
  grid-template-columns: minmax(280px, 0.8fr) minmax(0, 1.2fr);
  gap: 16px;
}

.calendar-card,
.checkout-flow {
  padding: 22px;
}

.calendar-header {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
  color: var(--muted);
}

.calendar-header strong {
  color: var(--ink);
}

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

.calendar-grid button {
  min-height: 92px;
  border: 1px solid rgba(23, 33, 43, 0.12);
  border-radius: 8px;
  background: #f7faf8;
  cursor: pointer;
}

.calendar-grid button:hover {
  border-color: var(--teal);
}

.my-courses-section {
  display: grid;
  gap: 28px;
  background: #fff;
}

.my-courses-actions,
.booking-reservation-panel,
.monthly-calendar-card,
.course-action-panel {
  border: 1px solid rgba(23, 33, 43, 0.09);
  border-radius: 8px;
  background: var(--surface);
}

.my-courses-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 22px;
}

.my-courses-actions h2,
.course-action-panel h2 {
  margin: 0 0 6px;
}

.my-courses-actions p,
.booking-notice,
.course-action-panel p {
  margin: 0;
  color: var(--muted);
}

.booking-reservation-panel {
  display: grid;
  grid-template-columns: minmax(260px, 0.75fr) minmax(0, 1.25fr);
  gap: 18px;
  padding: 22px;
}

.owned-course-grid {
  display: grid;
  gap: 12px;
}

.owned-course-card {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 4px 12px;
  align-items: center;
  padding: 14px;
  border: 1px solid rgba(23, 33, 43, 0.12);
  border-radius: 8px;
  background: #f7faf8;
  color: var(--ink);
  cursor: pointer;
  text-align: left;
}

.owned-course-card.active {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(0, 140, 140, 0.12);
}

.owned-course-card strong,
.owned-course-card span:not(.teacher-photo),
.owned-course-card em {
  grid-column: 2;
}

.owned-course-card em {
  color: var(--teal-dark);
  font-style: normal;
  font-weight: 900;
}

.teacher-photo.small {
  grid-row: span 3;
  width: 44px;
  height: 44px;
  font-size: 0.82rem;
}

.teacher-course-schedule {
  display: grid;
  align-content: start;
  gap: 14px;
}

.booking-slot-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.booking-slot-grid button {
  min-height: 92px;
  border: 1px solid rgba(0, 140, 140, 0.2);
  border-radius: 8px;
  background: #e5f5f2;
  color: var(--teal-dark);
  cursor: pointer;
  font-weight: 800;
}

.booking-slot-grid button:hover {
  border-color: var(--teal);
  background: #d8efec;
}

.booking-notice {
  grid-column: 1 / -1;
  padding: 12px 14px;
  border-radius: 8px;
  background: #f7faf8;
  font-weight: 800;
}

.reschedule-confirmation {
  display: grid;
  gap: 10px;
  margin: 14px 0;
}

.reschedule-confirmation span {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid rgba(23, 33, 43, 0.09);
  border-radius: 8px;
  background: #f7faf8;
  color: var(--ink);
}

.reschedule-confirmation b {
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
}

.contact-summary {
  display: grid;
  gap: 10px;
  margin: 14px 0;
}

.contact-summary span {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid rgba(23, 33, 43, 0.09);
  border-radius: 8px;
  background: #f7faf8;
  color: var(--ink);
}

.contact-summary b,
.contact-message-box span {
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
}

.contact-message-box {
  display: grid;
  gap: 8px;
}

.contact-message-box textarea {
  width: 100%;
  min-height: 132px;
  resize: vertical;
  border: 1px solid rgba(23, 33, 43, 0.12);
  border-radius: 8px;
  padding: 12px;
  background: #fff;
  color: var(--ink);
  font: inherit;
}

.notification-preview {
  display: grid;
  gap: 12px;
  margin: 14px 0;
}

.notification-preview label {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid rgba(23, 33, 43, 0.09);
  border-radius: 8px;
  background: #f7faf8;
}

.notification-preview span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.notification-preview textarea {
  width: 100%;
  min-height: 112px;
  resize: vertical;
  border: 1px solid rgba(23, 33, 43, 0.12);
  border-radius: 8px;
  padding: 12px;
  background: #fff;
  color: var(--ink);
  font: inherit;
}

[data-notification-save-status] {
  padding: 10px 12px;
  border-radius: 8px;
  background: #f7faf8;
  color: var(--muted);
  font-weight: 800;
}

[data-notification-save-status][data-tone="success"] {
  background: #eaf8f6;
  color: var(--teal-dark);
}

[data-contact-save-status] {
  margin: 8px 0 0;
  padding: 10px 12px;
  border-radius: 8px;
  background: #f7faf8;
  color: var(--muted);
  font-weight: 800;
}

[data-contact-save-status][data-tone="success"] {
  background: #eaf8f6;
  color: var(--teal-dark);
}

.monthly-course-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(260px, 0.65fr);
  gap: 18px;
  align-items: start;
}

.monthly-calendar-card,
.course-action-panel {
  padding: 22px;
}

.month-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
}

.month-grid > span {
  color: var(--muted);
  font-weight: 900;
  text-align: center;
}

.month-grid button {
  display: grid;
  min-height: 92px;
  align-content: start;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  text-align: left;
}

.month-grid button.has-course {
  border-color: rgba(0, 140, 140, 0.28);
  background: #e5f5f2;
}

.month-grid small {
  color: var(--teal-dark);
  font-weight: 900;
  line-height: 1.35;
}

.course-action-panel {
  position: sticky;
  top: 96px;
  display: grid;
  gap: 16px;
}

.course-action-buttons {
  display: grid;
  gap: 10px;
}

.course-action-buttons button {
  min-height: 42px;
  border: 1px solid rgba(23, 33, 43, 0.12);
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  font-weight: 800;
}

.checkout-flow ol {
  display: grid;
  gap: 18px;
  margin: 0;
  padding-left: 22px;
}

.checkout-flow li::marker {
  color: var(--teal);
  font-weight: 900;
}

.checkout-flow span {
  display: block;
  margin-top: 3px;
}

.profile-section {
  background: #17212b;
  color: #fff;
}

.profile-section .eyebrow,
.profile-section .section-heading p,
.profile-section .dashboard-grid p {
  color: #a9d9d5;
}

.dashboard-grid article {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.12);
}

.dashboard-grid strong {
  display: block;
  margin: 10px 0 8px;
  font-size: 1.7rem;
}

.dashboard-label {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  padding: 24px clamp(18px, 5vw, 72px);
  background: #0f1720;
  color: #cbd5df;
}

.page-hero {
  padding: clamp(52px, 8vw, 92px) clamp(18px, 5vw, 72px) clamp(32px, 5vw, 56px);
  background: var(--surface);
}

.page-hero h1 {
  max-width: 880px;
  margin-bottom: 14px;
}

.page-hero p:not(.eyebrow) {
  max-width: 720px;
  color: var(--muted);
  font-size: 1.08rem;
}

.dark-hero {
  background: #17212b;
  color: #fff;
}

.dark-hero .eyebrow,
.dark-hero p:not(.eyebrow) {
  color: #a9d9d5;
}

.compact-top {
  padding-top: 24px;
}

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

.page-map a,
.info-panel {
  padding: 20px;
  border: 1px solid rgba(23, 33, 43, 0.09);
  border-radius: 8px;
  background: #fff;
}

.page-map strong,
.page-map span {
  display: block;
}

.page-map span {
  margin-top: 4px;
  color: var(--muted);
}

.watch-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 18px;
  padding: clamp(24px, 5vw, 56px) clamp(18px, 5vw, 72px);
}

.video-player {
  display: grid;
  min-height: 480px;
  place-items: center;
  border-radius: 8px;
  background: linear-gradient(135deg, #1b6f78, #31a39d);
  color: #fff;
  text-align: center;
}

.video-player span {
  display: grid;
  width: 76px;
  height: 76px;
  place-items: center;
  margin-bottom: 12px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.22);
  font-size: 1.8rem;
}

.watch-player-content {
  display: grid;
  width: min(520px, calc(100% - 40px));
  justify-items: center;
  gap: 14px;
}

.watch-play-button {
  display: grid;
  width: 86px;
  height: 86px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  cursor: pointer;
}

.watch-play-button span {
  width: auto;
  height: auto;
  margin: 0;
  background: transparent;
  font-size: 2rem;
}

.watch-player-content p {
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
}

.watch-progress {
  width: 100%;
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
}

.watch-progress span {
  display: block;
  width: 0;
  height: 100%;
  margin: 0;
  border-radius: 999px;
  background: #fff;
}

.watch-meter {
  display: flex;
  width: 100%;
  justify-content: space-between;
  gap: 12px;
  color: rgba(255, 255, 255, 0.88);
  font-weight: 800;
}

.lesson-detail {
  padding: 24px 0;
}

.lesson-detail h1 {
  font-size: clamp(2rem, 4vw, 3.2rem);
}

.lesson-teacher-block {
  display: grid;
  max-width: 520px;
  gap: 14px;
  margin-top: 24px;
}

.lesson-teacher-card {
  margin-top: 0;
}

.lesson-booking-button {
  width: 100%;
}

.lesson-sidebar {
  align-self: start;
  padding: 22px;
}

.chapter-list {
  display: grid;
  gap: 12px;
  margin: 0 0 24px;
  padding: 0;
  list-style: none;
}

.chapter-list li,
.teacher-mini,
.cart-row,
.cart-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.chapter-list li {
  justify-content: flex-start;
  padding: 12px;
  border-radius: 8px;
  background: #f4f7f5;
}

.chapter-list strong {
  color: var(--teal-dark);
}

.teacher-mini {
  justify-content: flex-start;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.teacher-mini p {
  margin-bottom: 0;
  color: var(--muted);
}

.profile-hero {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) minmax(220px, 320px);
  gap: 24px;
  align-items: center;
  padding: clamp(44px, 7vw, 84px) clamp(18px, 5vw, 72px);
  background: #fff;
}

.teacher-profile-hero {
  display: grid;
  grid-template-columns: minmax(360px, 0.95fr) minmax(0, 0.9fr) minmax(220px, 300px);
  gap: 24px;
  align-items: start;
  padding: clamp(44px, 7vw, 84px) clamp(18px, 5vw, 72px);
  background: #fff;
}

.teacher-profile-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.98fr) minmax(420px, 0.82fr);
  gap: clamp(24px, 4vw, 48px);
  align-items: start;
  padding: clamp(34px, 5vw, 64px) clamp(18px, 5vw, 72px);
}

.teacher-profile-main {
  display: grid;
  gap: 18px;
}

.teacher-intro-video {
  display: flex;
  min-height: 320px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 14px;
  border-radius: 8px;
  background: linear-gradient(135deg, #17212b, #008c8c);
  color: #fff;
  font-weight: 900;
  text-align: center;
}

.teacher-long-intro {
  display: grid;
  gap: 16px;
  padding: 22px;
  border: 1px solid rgba(23, 33, 43, 0.09);
  border-radius: 8px;
  background: #fff;
}

.teacher-long-intro h2,
.teacher-long-intro h3 {
  margin-bottom: 8px;
}

.teacher-long-intro p,
.teacher-long-intro li {
  color: var(--muted);
}

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

.teacher-intro-grid section {
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.teacher-intro-grid ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 20px;
}

.large-play {
  width: 72px;
  height: 72px;
  font-size: 1.6rem;
}

.teacher-profile-copy {
  display: grid;
  gap: 16px;
  padding: 22px;
  border: 1px solid rgba(23, 33, 43, 0.09);
  border-radius: 8px;
  background: #fff;
}

.teacher-name-row {
  display: flex;
  align-items: center;
  gap: 16px;
}

.teacher-name-row h1 {
  margin-bottom: 4px;
}

.teacher-avatar {
  display: block;
  width: 58px;
  height: 58px;
  flex: 0 0 auto;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #fff;
  box-shadow: 0 10px 28px rgba(23, 33, 43, 0.16);
}

.teacher-avatar.large {
  width: 108px;
  height: 108px;
}

.teacher-side-panel {
  position: sticky;
  top: 92px;
  display: grid;
  gap: 18px;
  min-width: 0;
}

.teacher-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.teacher-tab {
  min-height: 46px;
  padding: 0 18px;
  border: 0;
  border-bottom: 3px solid transparent;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-weight: 900;
}

.teacher-tab.active {
  border-bottom-color: var(--teal);
  color: var(--ink);
}

.teacher-tab-panel {
  display: none;
}

.teacher-tab-panel.active {
  display: block;
}

.teacher-side-panel .profile-stats {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.teacher-side-panel .video-grid {
  grid-template-columns: 1fr;
}

.teacher-side-panel .video-thumb {
  min-height: 112px;
}

.teacher-side-panel .video-body {
  padding: 14px;
}

.compact-heading {
  margin-bottom: 18px;
}

.lesson-booking-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 340px);
  gap: 18px;
  align-items: start;
  margin-bottom: 18px;
}

.lesson-price-card {
  display: grid;
  gap: 10px;
  padding: 18px;
  border: 1px solid rgba(23, 33, 43, 0.09);
  border-radius: 8px;
  background: #fff;
}

.lesson-price-card span {
  color: var(--muted);
  font-weight: 800;
}

.lesson-price-card strong {
  font-size: 1.35rem;
}

.schedule-table-wrap {
  overflow-x: auto;
  border: 1px solid rgba(23, 33, 43, 0.09);
  border-radius: 8px;
  background: #fff;
}

.schedule-table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
}

.schedule-table th,
.schedule-table td {
  width: 12.5%;
  height: 54px;
  padding: 8px;
  border: 1px solid var(--line);
  text-align: center;
  vertical-align: middle;
}

.schedule-table thead th,
.schedule-table tbody th {
  background: #f7faf8;
  color: var(--muted);
  font-weight: 900;
}

.slot-open,
.slot-booked {
  border-radius: 8px;
  font-weight: 900;
}

.slot-open {
  background: #dff3f0;
  color: var(--teal-dark);
}

.slot-booked {
  background: #fde4df;
  color: #aa3a2d;
}

.schedule-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 14px;
  color: var(--muted);
  font-weight: 800;
}

.schedule-legend span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.schedule-legend i {
  width: 14px;
  height: 14px;
  border-radius: 4px;
  border: 1px solid var(--line);
}

.legend-open {
  background: #dff3f0;
}

.legend-booked {
  background: #fde4df;
}

.legend-empty {
  background: #fff;
}

.teacher-photo.large {
  width: 108px;
  height: 108px;
  font-size: 1.8rem;
}

.profile-stats {
  display: grid;
  gap: 10px;
}

.profile-stats span {
  display: grid;
  padding: 14px;
  border-radius: 8px;
  background: #eef3f0;
  color: var(--muted);
}

.profile-stats strong {
  color: var(--ink);
  font-size: 1.25rem;
}

.two-column,
.checkout-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.tag-row,
.payment-options {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tag-row span,
.payment-options button {
  padding: 10px 12px;
  border: 1px solid rgba(23, 33, 43, 0.12);
  border-radius: 999px;
  background: #f7faf8;
}

.full-button {
  width: 100%;
  margin-top: 18px;
}

.cart-row,
.cart-total {
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.cart-total {
  border-bottom: 0;
  font-size: 1.25rem;
}

.payment-options {
  margin-bottom: 16px;
}

.payment-options button {
  cursor: pointer;
}

.cart-items-panel {
  display: grid;
  gap: 14px;
}

.cart-item,
.order-summary-card,
.payment-form,
.order-row {
  border: 1px solid rgba(23, 33, 43, 0.09);
  border-radius: 8px;
  background: #fff;
}

.cart-item {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 22px;
}

.cart-item h2 {
  margin: 8px 0 6px;
}

.cart-item p {
  margin: 0;
  color: var(--muted);
}

.cart-item > strong {
  white-space: nowrap;
  font-size: 1.2rem;
}

.order-summary-card {
  align-self: start;
  display: grid;
  gap: 10px;
  padding: 22px;
}

.payment-form {
  display: grid;
  gap: 16px;
  border: 0;
  background: transparent;
}

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

.payment-method {
  display: flex;
  min-height: 54px;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(23, 33, 43, 0.12);
  border-radius: 8px;
  background: #f7faf8;
  cursor: pointer;
  font-weight: 900;
}

.payment-method.active {
  border-color: var(--teal);
  background: #e5f5f2;
  color: var(--teal-dark);
}

.payment-result-hero {
  display: grid;
  min-height: calc(100vh - 72px);
  place-items: center;
  align-content: center;
  gap: 14px;
  padding: clamp(58px, 8vw, 96px) clamp(18px, 5vw, 72px);
  background: #fff;
  text-align: center;
}

.payment-result-hero h1 {
  margin-bottom: 0;
}

.payment-result-hero p:not(.eyebrow) {
  max-width: 620px;
  color: var(--muted);
}

.payment-check {
  display: grid;
  width: 72px;
  height: 72px;
  place-items: center;
  border-radius: 50%;
  background: #e5f5f2;
  color: var(--teal-dark);
  font-size: 2rem;
  font-weight: 900;
}

.order-detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 340px);
  gap: 18px;
  align-items: start;
}

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

.order-meta-grid span {
  display: grid;
  gap: 5px;
  padding: 12px;
  border-radius: 8px;
  background: #f7faf8;
  color: var(--muted);
}

.order-meta-grid strong {
  color: var(--ink);
}

.order-list {
  display: grid;
  gap: 12px;
}

.order-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 120px 140px;
  gap: 14px;
  align-items: center;
  padding: 18px 22px;
}

.order-row span:first-child {
  display: grid;
  gap: 4px;
}

.order-row span:nth-child(2) {
  color: var(--teal-dark);
  font-weight: 900;
}

.register-section {
  padding: clamp(34px, 5vw, 64px) clamp(18px, 5vw, 72px);
}

.login-section {
  padding: clamp(34px, 5vw, 64px) clamp(18px, 5vw, 72px);
}

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

.auth-form label {
  display: grid;
  gap: 7px;
  margin-top: 14px;
  color: var(--ink);
  font-weight: 800;
}

.auth-form input {
  width: 100%;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid rgba(23, 33, 43, 0.14);
  border-radius: 8px;
  font: inherit;
}

.login-helper {
  align-content: start;
}

.form-message {
  min-height: 22px;
  margin: 10px 0 0;
  color: var(--muted);
  font-weight: 800;
}

.form-message[data-tone="success"] {
  color: var(--teal);
}

.form-message[data-tone="error"] {
  color: #b93b32;
}

.form-hint {
  margin: 0;
  color: var(--muted);
}

.login-card {
  display: grid;
  gap: 16px;
  padding: 24px;
  border: 1px solid rgba(23, 33, 43, 0.09);
  border-radius: 8px;
  background: #fff;
}

.login-card p {
  color: var(--muted);
}

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

.teacher-dashboard-grid article {
  background: #fff;
  color: var(--ink);
}

.teacher-dashboard-grid p {
  color: var(--muted);
}

.teacher-admin-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 16px;
  margin-top: 18px;
}

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

.admin-action-grid button,
.admin-action-grid a {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  border: 1px solid rgba(23, 33, 43, 0.12);
  border-radius: 8px;
  background: #f7faf8;
  color: var(--ink);
  cursor: pointer;
  font-weight: 800;
  text-align: center;
}

.teacher-month-calendar {
  margin-top: 18px;
}

.teacher-availability-manager {
  display: grid;
  gap: 16px;
  margin-top: 18px;
  padding: 22px;
  border: 1px solid rgba(23, 33, 43, 0.09);
  border-radius: 8px;
  background: #fff;
}

.availability-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
  gap: 12px;
  align-items: end;
}

.availability-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-weight: 800;
}

.availability-form input,
.availability-form select {
  min-height: 42px;
  border: 1px solid rgba(23, 33, 43, 0.14);
  border-radius: 8px;
  padding: 0 12px;
  background: #fff;
  color: var(--ink);
  font: inherit;
}

.availability-form .form-message {
  grid-column: 1 / -1;
}

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

.availability-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 14px;
  border: 1px solid rgba(23, 33, 43, 0.09);
  border-radius: 8px;
  background: #f7faf8;
}

.availability-row strong {
  display: block;
}

.availability-row p {
  margin: 4px 0 0;
  color: var(--muted);
}

.teacher-video-manager {
  margin-top: 18px;
  padding: 22px;
  border: 1px solid rgba(23, 33, 43, 0.09);
  border-radius: 8px;
  background: #fff;
}

.teacher-video-manager .compact-heading {
  margin-bottom: 18px;
  align-items: end;
}

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

.teacher-video-status-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}

.teacher-video-status-card {
  min-height: 82px;
  padding: 14px;
  border: 1px solid rgba(23, 33, 43, 0.09);
  border-radius: 8px;
  background: #f7faf8;
}

.teacher-video-status-card span,
.teacher-video-group-title span,
.teacher-video-row p,
.teacher-video-row-meta span {
  color: var(--muted);
  font-weight: 800;
}

.teacher-video-status-card strong {
  display: block;
  margin-top: 8px;
  font-size: 1.8rem;
}

.teacher-video-status-card.draft {
  border-color: rgba(207, 145, 37, 0.34);
  background: #fff8e8;
}

.teacher-video-status-card.pending {
  border-color: rgba(42, 99, 184, 0.24);
  background: #eef5ff;
}

.teacher-video-status-card.published {
  border-color: rgba(0, 140, 140, 0.24);
  background: #eaf8f6;
}

.teacher-video-status-card.rejected {
  border-color: rgba(185, 59, 50, 0.22);
  background: #fff0ed;
}

.teacher-video-list {
  display: grid;
  gap: 18px;
}

.teacher-video-group {
  display: grid;
  gap: 10px;
}

.teacher-video-group-title,
.teacher-video-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.teacher-video-group-title h3,
.teacher-video-row h4 {
  margin: 0;
}

.teacher-video-row-list {
  display: grid;
  gap: 8px;
}

.teacher-video-row {
  min-height: 92px;
  padding: 14px;
  border: 1px solid rgba(23, 33, 43, 0.09);
  border-radius: 8px;
  background: #fbfcfb;
}

.teacher-video-type {
  display: inline-flex;
  margin-bottom: 6px;
  padding: 5px 8px;
  border-radius: 999px;
  background: #e8f2ef;
  color: var(--teal);
  font-size: 0.78rem;
  font-weight: 900;
}

.teacher-video-row-meta {
  display: grid;
  gap: 8px;
  min-width: 118px;
  justify-items: end;
}

.teacher-video-row-meta a {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  border: 1px solid rgba(0, 140, 140, 0.22);
  border-radius: 8px;
  background: #f0faf8;
  color: var(--teal);
  font-weight: 900;
}

.admin-dashboard-grid article {
  background: #fff;
}

.admin-review-toolbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin: 24px 0 12px;
}

.admin-review-toolbar h2 {
  margin: 0 0 6px;
  font-size: 2rem;
}

.admin-review-toolbar p {
  margin: 0;
  color: var(--muted);
}

.admin-filter-row {
  margin: 0;
  justify-content: flex-end;
}

.admin-review-list {
  display: grid;
  gap: 12px;
}

.admin-review-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(170px, 0.24fr);
  gap: 16px;
  padding: 18px;
  border: 1px solid rgba(23, 33, 43, 0.09);
  border-radius: 8px;
  background: #fff;
}

.admin-review-main {
  display: grid;
  gap: 8px;
}

.admin-review-main h3,
.admin-review-main p {
  margin: 0;
}

.admin-review-main p {
  color: var(--muted);
}

.admin-review-actions {
  display: grid;
  gap: 8px;
  align-content: center;
}

.admin-review-actions a,
.admin-review-actions button {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  border: 1px solid rgba(23, 33, 43, 0.12);
  border-radius: 8px;
  background: #f7faf8;
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  font-weight: 900;
  text-align: center;
}

.admin-review-actions button[data-admin-review-action="published"] {
  border-color: rgba(0, 140, 140, 0.25);
  background: var(--teal);
  color: #fff;
}

.admin-review-actions button[data-admin-review-action="rejected"] {
  border-color: rgba(185, 59, 50, 0.24);
  background: #fff0ed;
  color: #9f342c;
}

.messages-section {
  display: grid;
  gap: 18px;
}

.messages-toolbar,
.message-list-panel,
.message-card {
  border: 1px solid rgba(23, 33, 43, 0.09);
  border-radius: 8px;
  background: #fff;
}

.messages-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 22px;
}

.messages-toolbar h2,
.messages-toolbar p {
  margin: 0;
}

.messages-toolbar p,
.message-meta,
.message-card p {
  color: var(--muted);
}

.messages-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
}

.message-list-panel {
  display: grid;
  gap: 14px;
  padding: 22px;
}

.message-list {
  display: grid;
  gap: 12px;
}

.message-card {
  display: grid;
  gap: 12px;
  padding: 18px;
}

.message-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.message-card-head h3 {
  margin: 8px 0 0;
}

.message-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  font-size: 0.9rem;
  font-weight: 800;
}

.message-card .secondary-button {
  justify-self: start;
}

.message-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.message-send-status {
  margin: 0;
  color: var(--muted);
  font-weight: 800;
}

.message-send-status[data-tone="success"] {
  color: var(--teal-dark);
}

.teacher-calendar-detail {
  position: static;
}

.course-action-buttons a {
  width: 100%;
}

.student-record-layout {
  display: grid;
  grid-template-columns: minmax(260px, 0.42fr) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.record-summary {
  display: grid;
  gap: 10px;
  margin: 18px 0;
}

.record-summary span {
  display: grid;
  padding: 12px;
  border-radius: 8px;
  background: #eef3f0;
  color: var(--muted);
}

.record-summary strong {
  color: var(--ink);
  font-size: 1.25rem;
}

.record-timeline {
  display: grid;
  gap: 14px;
}

.record-timeline article,
.upload-form,
.short-preview-card,
.editable-panel {
  border: 1px solid rgba(23, 33, 43, 0.09);
  border-radius: 8px;
  background: #fff;
}

.record-timeline article {
  padding: 22px;
}

.edit-toolbar,
.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.editable-panel label,
.upload-form label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-weight: 800;
}

.editable-panel input,
.editable-panel textarea,
.upload-form input,
.upload-form textarea,
.upload-form select {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid rgba(23, 33, 43, 0.14);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font: inherit;
}

.editable-panel textarea,
.upload-form textarea {
  min-height: 120px;
  resize: vertical;
}

.compact-form {
  width: 100%;
}

.permission-list {
  display: grid;
  gap: 12px;
}

.permission-list label {
  display: flex;
  gap: 10px;
  align-items: center;
  font-weight: 800;
}

.upload-form {
  display: grid;
  gap: 18px;
  padding: 22px;
}

.short-upload-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 340px);
  gap: 18px;
  align-items: start;
}

.short-preview-card {
  display: grid;
  gap: 16px;
  padding: 22px;
}

.short-preview-phone {
  display: grid;
  min-height: 420px;
  place-items: center;
  align-content: center;
  gap: 12px;
  border-radius: 8px;
  background: linear-gradient(145deg, #17212b, #008c8c);
  color: #fff;
  text-align: center;
}

.short-preview-phone span {
  opacity: 0.75;
  font-weight: 900;
}

.account-settings-layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.account-settings-nav,
.settings-card {
  border: 1px solid rgba(23, 33, 43, 0.09);
  border-radius: 8px;
  background: #fff;
}

.account-settings-nav {
  position: sticky;
  top: 96px;
  display: grid;
  gap: 6px;
  padding: 12px;
}

.account-settings-nav a {
  padding: 10px 12px;
  border-radius: 8px;
  color: var(--ink);
  font-weight: 800;
}

.account-settings-nav a:hover {
  background: #eef3f0;
  color: var(--teal-dark);
}

.account-settings-main {
  display: grid;
  gap: 16px;
}

.settings-card {
  display: grid;
  gap: 18px;
  padding: 22px;
}

.settings-card-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.settings-card-heading h2 {
  margin: 0;
}

.settings-status {
  display: inline-flex;
  padding: 5px 10px;
  border-radius: 999px;
  background: #eef3f0;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 900;
}

.settings-status.verified {
  background: #e5f5f2;
  color: var(--teal-dark);
}

.settings-status.pending {
  background: #fff4dc;
  color: #8a5d00;
}

.settings-status.danger {
  background: #fde4de;
  color: #a63725;
}

.verification-grid,
.login-device-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.verification-item,
.login-device-list div {
  display: grid;
  gap: 8px;
  padding: 16px;
  border-radius: 8px;
  background: #f7faf8;
}

.verification-item em {
  color: var(--teal-dark);
  font-style: normal;
  font-weight: 900;
}

.settings-list {
  display: grid;
  gap: 12px;
}

.settings-list label {
  display: flex;
  gap: 10px;
  align-items: center;
  font-weight: 800;
}

.danger-card {
  border-color: rgba(231, 93, 71, 0.28);
}

.danger-button {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  padding: 0 20px;
  border: 0;
  border-radius: 8px;
  background: var(--coral);
  color: #fff;
  cursor: pointer;
  font-weight: 900;
}

.register-shell {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.register-side,
.register-form {
  border: 1px solid rgba(23, 33, 43, 0.09);
  border-radius: 8px;
  background: #fff;
  padding: 22px;
}

.register-side {
  position: sticky;
  top: 92px;
  display: grid;
  gap: 18px;
}

.register-tabs {
  display: grid;
  gap: 10px;
}

.register-tab {
  min-height: 46px;
  border: 1px solid rgba(23, 33, 43, 0.12);
  border-radius: 8px;
  background: #f7faf8;
  color: var(--ink);
  cursor: pointer;
  font-weight: 900;
}

.register-tab.active {
  border-color: var(--teal);
  background: var(--teal);
  color: #fff;
}

.register-note {
  padding: 14px;
  border-radius: 8px;
  background: #eef3f0;
}

.register-note p {
  margin-bottom: 0;
  color: var(--muted);
}

.register-form {
  display: none;
  gap: 18px;
}

.register-form.active {
  display: grid;
}

.form-heading p {
  color: var(--muted);
}

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

.register-form label {
  display: grid;
  gap: 7px;
  color: var(--ink);
  font-weight: 800;
}

.register-form input,
.register-form select,
.register-form textarea {
  width: 100%;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid rgba(23, 33, 43, 0.14);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-weight: 400;
}

.register-form textarea {
  min-height: 112px;
  padding-top: 10px;
  resize: vertical;
}

.register-form input[type="file"] {
  padding: 10px;
}

.form-submit {
  justify-self: start;
  padding: 0 22px;
}

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

  body.has-home-sidebar {
    --home-sidebar-width: 64px;
  }

  body.has-home-sidebar main,
  body.has-home-sidebar .site-footer {
    margin-left: var(--home-sidebar-width);
  }

  .main-nav {
    grid-column: 1 / -1;
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .hero-section,
  .home-video-heading,
  .booking-panel,
  .watch-layout,
  .profile-hero,
  .teacher-profile-hero,
  .teacher-profile-layout,
  .teacher-intro-grid,
  .student-record-layout,
  .short-upload-layout,
  .account-settings-layout,
  .verification-grid,
  .login-device-list,
  .payment-method-grid,
  .order-detail-layout,
  .order-meta-grid,
  .lesson-booking-header,
  .register-shell,
  .login-grid,
  .teacher-admin-layout,
  .availability-form,
  .form-grid,
  .upload-grid,
  .two-column,
  .checkout-layout,
  .messages-layout {
    grid-template-columns: 1fr;
  }

  .order-row {
    grid-template-columns: 1fr;
  }

  .teacher-side-panel {
    position: static;
  }

  .register-side {
    position: static;
  }

  .hero-section {
    min-height: auto;
  }

  .feature-grid,
  .teacher-grid,
  .dashboard-grid,
  .teacher-video-status-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .video-grid,
  .home-video-grid,
  .short-video-grid,
  .plan-grid,
  .page-map {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .site-header {
    gap: 12px;
  }

  body.has-home-sidebar {
    --home-sidebar-width: 56px;
  }

  .home-sidebar {
    top: 116px;
    padding: 10px 7px;
    height: calc(100vh - 116px);
  }

  .sidebar-toggle,
  .sidebar-icon {
    width: 42px;
  }

  .header-action {
    display: none;
  }

  .hero-section,
  .section-band,
  .content-section {
    padding-left: 16px;
    padding-right: 16px;
  }

  h1 {
    font-size: 2.3rem;
  }

  .feature-grid,
  .teacher-grid,
  .dashboard-grid,
  .calendar-grid,
  .teacher-video-status-grid {
    grid-template-columns: 1fr;
  }

  .teacher-video-manager .compact-heading,
  .teacher-video-row,
  .admin-review-toolbar,
  .messages-toolbar,
  .message-card-head {
    align-items: stretch;
    flex-direction: column;
  }

  .teacher-video-actions {
    justify-content: stretch;
  }

  .teacher-video-actions a,
  .teacher-video-row-meta {
    width: 100%;
  }

  .teacher-video-row-meta {
    justify-items: start;
  }

  .admin-review-card {
    grid-template-columns: 1fr;
  }

  .admin-filter-row {
    justify-content: flex-start;
  }

  .shorts-rail {
    grid-template-columns: repeat(4, 78vw);
  }

  .short-video-grid {
    display: flex;
    overflow-x: auto;
    padding-bottom: 8px;
  }

  .short-video-card {
    min-width: 72vw;
  }

  .filter-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .search-box {
    grid-template-columns: 1fr;
    gap: 8px;
  }
}
