:root {
  --ink: #111923;
  --muted: #647082;
  --line: #dfeaf5;
  --paper: #fffdf4;
  --panel: #ffffff;
  --sun: #ffd331;
  --sun-soft: #fff4b8;
  --sky: #2297f3;
  --sky-soft: #e8f5ff;
  --blue: #0877d8;
  --blue-deep: #14528f;
  --coral: #ff6b4a;
  --teal: #20b7b0;
  --green: #39aa5a;
  --shadow: 0 18px 48px rgba(8, 119, 216, 0.13);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--paper);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 12% 0%, rgba(255, 211, 49, 0.36), transparent 260px),
    radial-gradient(circle at 88% 3%, rgba(34, 151, 243, 0.18), transparent 280px),
    linear-gradient(180deg, rgba(255, 244, 184, 0.5), rgba(255, 253, 244, 0) 320px),
    var(--paper);
  letter-spacing: 0;
}

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

button {
  cursor: pointer;
}

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

.shell {
  min-height: 100vh;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid rgba(34, 151, 243, 0.16);
  background: rgba(255, 253, 244, 0.94);
  backdrop-filter: blur(16px);
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: 1180px;
  margin: 0 auto;
  padding: 14px 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 2px solid var(--blue-deep);
  border-radius: 50%;
  background: var(--sun);
  color: var(--blue-deep);
  font-size: 16px;
  line-height: 1;
}

.nav {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
}

.nav a {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
}

.nav a.active,
.nav a:hover {
  background: var(--sun-soft);
  color: var(--blue-deep);
}

.main {
  max-width: 1180px;
  margin: 0 auto;
  padding: 24px 20px 80px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  gap: 24px;
  align-items: stretch;
  padding: 26px 0 24px;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 18px;
  min-height: 320px;
}

.eyebrow {
  color: var(--blue);
  font-size: 14px;
  font-weight: 800;
}

.hero h1 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(34px, 6vw, 70px);
  line-height: 0.98;
  letter-spacing: 0;
}

.hero p {
  max-width: 680px;
  margin: 0;
  color: #3e4853;
  font-size: 17px;
  line-height: 1.8;
}

.hero-media {
  min-height: 320px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  background: var(--panel);
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-actions,
.row-actions,
.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.button,
.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  border: 1px solid transparent;
  border-radius: 12px;
  padding: 0 14px;
  background: linear-gradient(135deg, var(--blue), var(--sky));
  color: white;
  font-weight: 750;
  text-decoration: none;
  box-shadow: 0 9px 18px rgba(8, 119, 216, 0.14);
}

.button.secondary {
  border-color: var(--line);
  background: var(--panel);
  color: var(--blue-deep);
  box-shadow: none;
}

.icon-button.secondary {
  border-color: var(--line);
  background: var(--panel);
  color: var(--blue-deep);
  box-shadow: none;
}

.button.ghost {
  border-color: transparent;
  background: transparent;
  color: var(--blue);
  box-shadow: none;
}

.button.danger {
  background: #a63f35;
}

.button.success {
  background: var(--green);
}

.button.warning {
  background: var(--coral);
}

.button.tiny {
  min-height: 32px;
  border-radius: 999px;
  padding: 0 10px;
  font-size: 12px;
}

.button:disabled,
.icon-button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin: 18px 0 14px;
}

.section-head h2,
.page-title h1 {
  margin: 0;
  font-size: 28px;
  line-height: 1.2;
}

.section-head p,
.page-title p {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.6;
}

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

.course-card,
.panel,
.stat-card,
.order-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel);
}

.course-card {
  overflow: hidden;
  box-shadow: 0 12px 30px rgba(23, 32, 42, 0.08);
}

.course-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: #f3ead9;
}

.course-body {
  display: grid;
  gap: 12px;
  padding: 14px;
}

.course-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.course-title h3 {
  margin: 0;
  font-size: 19px;
  line-height: 1.25;
}

.course-title p,
.course-body p {
  margin: 4px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border-radius: 999px;
  padding: 0 9px;
  background: var(--sky-soft);
  color: var(--blue-deep);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.badge.warn {
  background: var(--sun-soft);
  color: #8c6100;
}

.badge.gray {
  background: #eef1f4;
  color: #55606d;
}

.badge.danger {
  background: #ffe5e2;
  color: #a63f35;
}

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

.meta {
  min-height: 62px;
  border: 1px solid #dfeaf5;
  border-radius: var(--radius);
  padding: 8px;
  background: #f7fbff;
}

.meta span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.meta strong {
  display: block;
  margin-top: 4px;
  font-size: 14px;
}

.selected-bar {
  position: sticky;
  bottom: 14px;
  z-index: 15;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  max-width: 760px;
  margin: 20px auto 0;
  border: 1px solid rgba(23, 32, 42, 0.14);
  border-radius: var(--radius);
  padding: 12px;
  background: rgba(255, 253, 244, 0.96);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  gap: 20px;
  align-items: start;
}

.detail-image {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.detail-image img {
  width: 100%;
  aspect-ratio: 16 / 11;
  object-fit: cover;
}

.panel {
  padding: 20px;
}

.panel + .panel {
  margin-top: 14px;
}

.info-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.info-list li {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid #f0eadf;
  padding-bottom: 10px;
}

.info-list li:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.info-list span {
  color: var(--muted);
}

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

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

.field.full {
  grid-column: 1 / -1;
}

.field label {
  color: #323b45;
  font-weight: 760;
}

.field small {
  color: var(--muted);
}

.field input,
.field textarea,
.field select {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 9px 10px;
  background: white;
  color: var(--ink);
  outline: none;
}

.field textarea {
  min-height: 84px;
  resize: vertical;
}

.field input:focus,
.field textarea:focus,
.field select:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(42, 167, 160, 0.15);
}

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

.choice {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  background: #fffdf9;
}

.choice input {
  margin-top: 4px;
}

.choice h4 {
  margin: 0;
}

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

.payment-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.seg {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 10px;
  background: white;
  font-size: 13px;
}

.summary-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin: 14px 0;
}

.summary-strip .meta {
  background: white;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 100;
  max-width: min(380px, calc(100vw - 36px));
  transform: translateY(20px);
  opacity: 0;
  pointer-events: none;
  border-radius: var(--radius);
  padding: 12px 14px;
  background: var(--ink);
  color: white;
  box-shadow: var(--shadow);
  transition: 0.2s ease;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

.admin-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 18px;
}

.admin-side {
  position: sticky;
  top: 76px;
  align-self: start;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px;
  background: var(--panel);
}

.admin-side a {
  display: flex;
  align-items: center;
  min-height: 44px;
  border-radius: 12px;
  padding: 0 10px;
  color: var(--ink);
  text-decoration: none;
}

.admin-side a.active,
.admin-side a:hover {
  background: var(--sun-soft);
  color: var(--blue-deep);
}

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

.stat-card {
  padding: 16px;
  box-shadow: 0 8px 22px rgba(8, 119, 216, 0.07);
}

.stat-card span {
  color: var(--muted);
  font-size: 13px;
}

.stat-card strong {
  display: block;
  margin-top: 6px;
  font-size: 26px;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel);
}

table {
  width: 100%;
  min-width: 780px;
  border-collapse: collapse;
}

th,
td {
  border-bottom: 1px solid #dfeaf5;
  padding: 10px;
  text-align: left;
  vertical-align: top;
}

th {
  background: #eaf6ff;
  color: var(--blue-deep);
  font-size: 13px;
}

tr:last-child td {
  border-bottom: 0;
}

.compact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.compact-actions .button {
  min-height: 32px;
  padding: 0 9px;
  font-size: 12px;
}

.order-card {
  display: grid;
  gap: 12px;
  padding: 14px;
}

.order-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.muted {
  color: var(--muted);
}

.empty {
  border: 1px dashed #d8cbb8;
  border-radius: var(--radius);
  padding: 24px;
  color: var(--muted);
  text-align: center;
}

.print-only {
  display: none;
}

@media (max-width: 920px) {
  .hero,
  .detail-layout,
  .admin-layout {
    grid-template-columns: 1fr;
  }

  .hero-copy,
  .hero-media {
    min-height: auto;
  }

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

  .admin-side {
    position: static;
    display: flex;
    overflow-x: auto;
  }

  .admin-side a {
    white-space: nowrap;
  }
}

@media (max-width: 640px) {
  .topbar-inner {
    align-items: flex-start;
    flex-direction: column;
    padding: 12px;
  }

  .main {
    padding: 16px 12px 84px;
  }

  .hero {
    padding-top: 10px;
  }

  .hero h1 {
    font-size: 40px;
  }

  .grid,
  .form-grid,
  .summary-strip,
  .stats {
    grid-template-columns: 1fr;
  }

  .selected-bar {
    align-items: stretch;
    flex-direction: column;
  }

  .selected-bar .button {
    width: 100%;
  }

  .section-head {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media print {
  body {
    background: white;
  }

  .topbar,
  .admin-side,
  .form-actions,
  .no-print {
    display: none !important;
  }

  .main {
    max-width: none;
    padding: 0;
  }

  .admin-layout {
    display: block;
  }

  .table-wrap {
    border: 0;
  }

  table {
    min-width: 0;
  }
}

/* Mobile H5 parent experience */
.mobile-shell {
  width: 100%;
  max-width: 460px;
  min-height: 100vh;
  margin: 0 auto;
  background:
    radial-gradient(circle at 18% -4%, rgba(255, 211, 49, 0.55), transparent 230px),
    radial-gradient(circle at 95% 1%, rgba(34, 151, 243, 0.22), transparent 240px),
    linear-gradient(180deg, rgba(255, 244, 184, 0.42), rgba(255, 253, 244, 0) 270px),
    var(--paper);
  box-shadow: 0 0 0 1px rgba(8, 119, 216, 0.08);
}

.parent-appbar {
  position: sticky;
  top: 0;
  z-index: 26;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 62px;
  padding: 10px 14px;
  background: rgba(255, 253, 244, 0.88);
  border-bottom: 1px solid rgba(8, 119, 216, 0.08);
  backdrop-filter: blur(18px);
}

.parent-brand {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
}

.parent-brand-mark {
  display: grid;
  width: 40px;
  min-width: 40px;
  height: 40px;
  place-items: center;
  border: 2px solid var(--blue-deep);
  border-radius: 14px;
  background: linear-gradient(135deg, var(--sun), #ffe779);
  color: var(--blue-deep);
  font-size: 15px;
  font-weight: 950;
  box-shadow: 0 8px 18px rgba(255, 211, 49, 0.28);
}

.parent-brand strong,
.parent-brand small {
  display: block;
  overflow: hidden;
  max-width: 220px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.parent-brand strong {
  font-size: 16px;
  line-height: 1.2;
}

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

.parent-app-tag {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  border-radius: 999px;
  padding: 0 10px;
  background: var(--sky-soft);
  color: var(--blue-deep);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.mobile-main {
  min-height: 100vh;
  padding: 14px 14px 92px;
}

.mobile-hero {
  position: relative;
  overflow: hidden;
  display: grid;
  gap: 14px;
  border: 1px solid rgba(8, 119, 216, 0.1);
  border-radius: 24px;
  margin: 8px 0 16px;
  padding: 16px;
  background:
    linear-gradient(145deg, rgba(255, 211, 49, 0.36), rgba(255, 255, 255, 0.82) 44%, rgba(232, 245, 255, 0.94)),
    white;
  box-shadow: 0 18px 42px rgba(8, 119, 216, 0.13);
}

.mobile-hero::after {
  content: "";
  position: absolute;
  right: -34px;
  top: -32px;
  width: 118px;
  height: 118px;
  border-radius: 36px;
  background: rgba(255, 211, 49, 0.46);
  transform: rotate(18deg);
}

.mobile-hero-copy,
.mobile-hero-image,
.hero-carousel {
  position: relative;
  z-index: 1;
}

.mobile-eyebrow {
  color: var(--blue-deep);
  font-size: 14px;
  font-weight: 850;
}

.mobile-hero h1 {
  margin: 0;
  color: #102033;
  font-size: 34px;
  line-height: 1.08;
  letter-spacing: 0;
}

.mobile-hero p {
  margin: 0;
  color: #3e4853;
  font-size: 14px;
  line-height: 1.68;
}

.mobile-hero-image {
  overflow: hidden;
  border: 2px solid rgba(34, 151, 243, 0.16);
  border-radius: 18px;
  background: white;
  box-shadow: 0 14px 32px rgba(23, 32, 42, 0.1);
}

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

.hero-carousel {
  overflow: hidden;
  border: 2px solid rgba(34, 151, 243, 0.16);
  border-radius: 20px;
  background: white;
  box-shadow: 0 14px 32px rgba(23, 32, 42, 0.1);
}

.hero-slide {
  position: relative;
  display: block;
  width: 100%;
  overflow: hidden;
  border: 0;
  padding: 0;
  background: white;
  color: white;
  text-align: left;
}

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

.hero-slide-caption {
  position: absolute;
  right: 10px;
  bottom: 10px;
  left: 10px;
  display: grid;
  gap: 2px;
  border-radius: 14px;
  padding: 9px 10px;
  background: rgba(17, 25, 35, 0.7);
  backdrop-filter: blur(10px);
}

.hero-slide-caption strong,
.hero-slide-caption small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hero-slide-caption strong {
  font-size: 16px;
}

.hero-slide-caption small {
  color: rgba(255, 255, 255, 0.86);
  font-size: 12px;
}

.carousel-control {
  position: absolute;
  top: 50%;
  z-index: 2;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  transform: translateY(-50%);
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.84);
  color: var(--blue-deep);
  font-size: 28px;
  line-height: 1;
}

.carousel-control.prev {
  left: 8px;
}

.carousel-control.next {
  right: 8px;
}

.carousel-dots {
  position: absolute;
  right: 0;
  bottom: 6px;
  left: 0;
  z-index: 3;
  display: flex;
  justify-content: center;
  gap: 5px;
  pointer-events: none;
}

.carousel-dots button {
  width: 6px;
  height: 6px;
  border: 0;
  border-radius: 999px;
  padding: 0;
  background: rgba(255, 255, 255, 0.65);
  pointer-events: auto;
}

.carousel-dots button.active {
  width: 16px;
  background: var(--sun);
}

.mobile-section,
.mobile-page {
  display: grid;
  gap: 14px;
}

.mobile-section-head h1,
.mobile-section-head h2 {
  margin: 0;
  font-size: 24px;
  line-height: 1.2;
}

.mobile-section-head p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.home-course-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 2px 0 2px;
}

.home-course-toolbar span {
  color: var(--blue);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.home-course-toolbar h2 {
  margin: 3px 0 0;
  color: var(--ink);
  font-size: 22px;
  line-height: 1.2;
}

.view-toggle {
  display: inline-flex;
  width: auto;
  min-width: 72px;
  height: 44px;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border: 1px solid rgba(8, 119, 216, 0.14);
  border-radius: 15px;
  padding: 0 10px;
  background: white;
  color: var(--blue-deep);
  box-shadow: 0 8px 20px rgba(8, 119, 216, 0.1);
}

.view-toggle span {
  color: var(--blue);
  font-size: 17px;
  line-height: 1;
}

.view-toggle strong {
  font-size: 13px;
  font-weight: 950;
}

.home-calendar-view {
  display: grid;
  gap: 14px;
}

.course-arrange-card {
  overflow: hidden;
  border: 1px solid rgba(8, 119, 216, 0.12);
  border-radius: 24px;
  background:
    linear-gradient(135deg, rgba(255, 211, 49, 0.72), transparent 28%),
    linear-gradient(135deg, var(--blue-deep), var(--sky));
  box-shadow: 0 16px 34px rgba(8, 119, 216, 0.18);
}

.arrange-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 84px;
  padding: 16px 18px 12px;
  color: white;
}

.arrange-header span {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 999px;
  padding: 0 10px;
  background: rgba(255, 211, 49, 0.92);
  color: var(--blue-deep);
  font-size: 12px;
  font-weight: 900;
}

.arrange-header h2 {
  margin: 8px 0 0;
  font-size: 25px;
  line-height: 1.15;
  letter-spacing: 0;
  text-shadow: 0 2px 0 rgba(17, 25, 35, 0.12);
}

.arrange-mark {
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  border: 3px solid rgba(255, 255, 255, 0.62);
  border-radius: 50%;
  background: var(--sun);
  color: var(--blue-deep);
  font-size: 18px;
  font-weight: 950;
  transform: rotate(7deg);
}

.arrange-list {
  display: grid;
  gap: 10px;
  border-radius: 20px 20px 0 0;
  padding: 14px 16px 18px;
  background: #fbfdff;
}

.arrange-item {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  width: 100%;
  min-height: 122px;
  border: 1px solid rgba(8, 119, 216, 0.1);
  border-radius: 18px;
  padding: 12px;
  background: white;
  color: var(--ink);
  text-align: left;
  box-shadow: 0 9px 22px rgba(8, 119, 216, 0.07);
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.arrange-item:active {
  transform: scale(0.985);
  box-shadow: 0 5px 14px rgba(8, 119, 216, 0.08);
}

.arrange-icon {
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  border-radius: 16px;
  color: white;
  font-size: 18px;
  font-weight: 950;
  box-shadow: inset 0 -8px 16px rgba(17, 25, 35, 0.08);
}

.arrange-icon.tone-0 {
  background: linear-gradient(135deg, var(--blue), #54bcff);
}

.arrange-icon.tone-1 {
  background: linear-gradient(135deg, var(--sun), #ffe777);
  color: var(--blue-deep);
}

.arrange-icon.tone-2 {
  background: linear-gradient(135deg, var(--teal), #69dcd6);
}

.arrange-icon.tone-3 {
  background: linear-gradient(135deg, var(--green), #81d994);
}

.arrange-info {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.arrange-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}

.arrange-title-row strong {
  min-width: 0;
  color: #111827;
  font-size: 16px;
  font-weight: 900;
  line-height: 1.25;
}

.arrange-title-row b {
  display: inline-flex;
  min-width: 44px;
  min-height: 26px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--sun);
  color: var(--blue-deep);
  font-size: 12px;
  font-weight: 950;
  white-space: nowrap;
}

.arrange-info em {
  display: inline-flex;
  width: fit-content;
  min-height: 22px;
  align-items: center;
  border-radius: 8px;
  padding: 0 8px;
  background: #fff7cb;
  color: #101820;
  font-size: 14px;
  font-style: normal;
  font-weight: 900;
}

.arrange-desc {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.arrange-info i {
  display: inline-flex;
  min-width: 42px;
  min-height: 24px;
  align-items: center;
  justify-content: center;
  border-radius: 7px;
  background: var(--blue);
  color: white;
  font-size: 13px;
  font-style: normal;
  font-weight: 900;
}

.arrange-desc small {
  overflow: hidden;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.arrange-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.arrange-meta small {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 999px;
  padding: 0 8px;
  background: #eef7ff;
  color: var(--blue-deep);
  font-size: 12px;
  font-weight: 850;
}

.calendar-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 12px 28px rgba(23, 32, 42, 0.07);
}

.month-switcher {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 44px;
  gap: 10px;
  align-items: center;
}

.month-switcher strong {
  color: var(--blue-deep);
  font-size: 20px;
  text-align: center;
}

.calendar-title {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0 12px;
  background: linear-gradient(90deg, var(--sun), #ffe777);
  color: var(--blue-deep);
  font-size: 20px;
  font-weight: 850;
}

.calendar-week,
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.calendar-grid.bar-mode {
  position: relative;
  grid-template-rows: repeat(var(--weeks), 92px);
}

.calendar-week span {
  border-bottom: 1px solid #dcebf8;
  padding: 8px 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  text-align: center;
}

.calendar-cell {
  position: relative;
  min-height: 92px;
  border-right: 1px solid #dcebf8;
  border-bottom: 1px solid #dcebf8;
  padding: 5px 4px;
  background: white;
}

.calendar-cell:nth-child(7n) {
  border-right: 0;
}

.calendar-cell.outside {
  background: #f7fbff;
  color: #a8b8c8;
}

.calendar-day {
  min-height: 18px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 850;
  text-align: right;
}

.outside .calendar-day {
  color: #a8b8c8;
}

.calendar-events {
  display: grid;
  gap: 3px;
  margin-top: 3px;
}

.calendar-event,
.calendar-more {
  width: 100%;
  min-height: 20px;
  overflow: hidden;
  border: 0;
  border-radius: 999px;
  padding: 0 5px;
  background: var(--sky-soft);
  color: var(--blue-deep);
  font-size: 10px;
  font-weight: 850;
  line-height: 20px;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.calendar-event span {
  display: inline-grid;
  width: 14px;
  height: 14px;
  place-items: center;
  margin-right: 2px;
  border-radius: 50%;
  background: var(--blue);
  color: white;
  font-size: 9px;
}

.calendar-more {
  background: #e9eef4;
  color: #53606f;
  text-align: center;
}

.calendar-span {
  z-index: 3;
  align-self: start;
  width: calc(100% - 6px);
  min-height: 22px;
  overflow: hidden;
  border: 0;
  border-radius: 999px;
  margin: calc(27px + var(--line) * 24px) 3px 0;
  padding: 0 8px;
  background: linear-gradient(90deg, var(--sky), #45b9ff);
  color: white;
  font-size: 11px;
  font-weight: 850;
  line-height: 22px;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(8, 119, 216, 0.18);
}

.calendar-span span {
  display: inline-grid;
  width: 16px;
  height: 16px;
  place-items: center;
  margin-right: 3px;
  border-radius: 50%;
  background: var(--sun);
  color: var(--blue-deep);
  font-size: 10px;
}

.calendar-span.my-schedule.approved {
  background: linear-gradient(90deg, #39aa5a, #67cf80);
  color: white;
}

.calendar-span.my-schedule.pending {
  background: linear-gradient(90deg, var(--sun), #ffe777);
  color: var(--blue-deep);
}

.bottom-tabs {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  max-width: 460px;
  margin: 0 auto;
  border-top: 1px solid rgba(34, 151, 243, 0.16);
  padding: 7px 10px max(7px, env(safe-area-inset-bottom));
  background: rgba(255, 253, 244, 0.96);
  backdrop-filter: blur(18px);
}

.bottom-tabs a {
  display: grid;
  place-items: center;
  gap: 2px;
  min-height: 50px;
  border-radius: var(--radius);
  color: var(--muted);
  text-decoration: none;
}

.bottom-tabs span {
  display: grid;
  width: 23px;
  height: 23px;
  place-items: center;
  border-radius: 50%;
  background: var(--sky-soft);
  font-size: 13px;
  font-weight: 900;
}

.bottom-tabs strong {
  font-size: 12px;
}

.bottom-tabs a.active {
  color: var(--ink);
  background: var(--sun-soft);
}

.bottom-tabs a.active span {
  background: var(--sun);
}

.modal {
  display: none;
}

.modal.open {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: block;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 21, 28, 0.42);
}

.modal-panel {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  max-width: 460px;
  max-height: 88vh;
  margin: 0 auto;
  overflow: auto;
  border-radius: 24px 24px 0 0;
  background: var(--paper);
  box-shadow: 0 -22px 60px rgba(8, 119, 216, 0.22);
}

.modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  color: var(--blue-deep);
  font-size: 24px;
  line-height: 1;
}

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

.modal-content {
  display: grid;
  gap: 14px;
  padding: 16px 16px 20px;
}

.modal-content h2 {
  margin: 0;
  font-size: 24px;
}

.modal-content p {
  margin: 0;
  color: #3e4853;
  line-height: 1.7;
}

.modal-price-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  border: 1px solid rgba(255, 211, 49, 0.55);
  border-radius: 18px;
  padding: 10px;
  background: linear-gradient(135deg, #fff8cd, #f0f9ff);
}

.modal-price-strip > div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.modal-price-strip span {
  color: #6b7280;
  font-size: 11px;
  font-weight: 800;
}

.modal-price-strip strong {
  color: var(--blue-deep);
  font-size: 15px;
  line-height: 1.2;
}

.modal-price-strip small {
  color: var(--coral);
  font-size: 10px;
  font-weight: 850;
}

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

.mobile-info-grid > div,
.mobile-total > div {
  min-height: 58px;
  border: 1px solid #dcebf8;
  border-radius: 14px;
  padding: 8px;
  background: white;
}

.mobile-info-grid span,
.mobile-total span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.mobile-info-grid strong,
.mobile-total strong {
  display: block;
  margin-top: 4px;
  font-size: 14px;
}

.mobile-total small {
  display: block;
  margin-top: 5px;
  color: var(--coral);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
}

.info-list.compact li {
  display: grid;
  gap: 5px;
}

.mobile-full {
  width: 100%;
}

.back-link {
  color: var(--blue-deep);
  font-weight: 800;
  text-decoration: none;
}

.signup-course {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  border: 1px solid #dcebf8;
  border-radius: 20px;
  padding: 10px;
  background: linear-gradient(135deg, white, #f4fbff);
  box-shadow: 0 10px 24px rgba(8, 119, 216, 0.08);
}

.signup-course img {
  width: 92px;
  height: 92px;
  border-radius: 16px;
  object-fit: cover;
}

.signup-step {
  display: inline-flex;
  align-items: center;
  min-height: 23px;
  border-radius: 999px;
  padding: 0 8px;
  background: var(--sun-soft);
  color: var(--blue-deep);
  font-size: 11px;
  font-weight: 900;
}

.signup-course h1 {
  margin: 6px 0 0;
  font-size: 22px;
  line-height: 1.2;
}

.signup-course p {
  margin: 6px 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.mobile-form {
  display: grid;
  gap: 12px;
  border: 1px solid rgba(8, 119, 216, 0.1);
  border-radius: 22px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 12px 28px rgba(8, 119, 216, 0.07);
}

.mobile-form > label {
  display: grid;
  gap: 7px;
  color: #323b45;
  font-weight: 800;
}

.form-section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--blue-deep);
  font-size: 15px;
  font-weight: 950;
}

.form-section-title::before {
  content: "";
  width: 8px;
  height: 18px;
  border-radius: 999px;
  background: var(--sun);
  box-shadow: 0 0 0 4px rgba(255, 211, 49, 0.22);
}

.mobile-form input,
.mobile-form select,
.mobile-form textarea {
  width: 100%;
  min-height: 46px;
  border: 1px solid #cfe5f8;
  border-radius: 14px;
  padding: 10px 12px;
  background: white;
  color: var(--ink);
  outline: none;
  font-size: 16px;
}

.mobile-form input:focus,
.mobile-form select:focus,
.mobile-form textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(34, 151, 243, 0.14);
}

.mobile-form textarea {
  min-height: 92px;
  resize: vertical;
}

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

.radio-row label {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  border: 1px solid #cfe5f8;
  border-radius: 14px;
  padding: 0 10px;
  background: white;
  font-size: 13px;
}

.radio-row input {
  width: auto;
  min-height: 0;
}

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

.mobile-card {
  display: grid;
  gap: 12px;
  border: 1px solid #dcebf8;
  border-radius: 20px;
  padding: 13px;
  background: white;
  box-shadow: 0 10px 24px rgba(23, 32, 42, 0.06);
}

.teacher-contact {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  border: 1px solid rgba(255, 211, 49, 0.52);
  border-radius: 18px;
  padding: 12px;
  background: linear-gradient(135deg, #fff8cc, #eef8ff);
}

.teacher-contact.compact {
  margin-top: 2px;
}

.teacher-contact span,
.teacher-contact small {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.teacher-contact strong {
  display: block;
  margin: 4px 0;
  color: var(--blue-deep);
  font-size: 18px;
  line-height: 1.2;
}

.teacher-contact small {
  color: var(--coral);
  font-weight: 850;
  line-height: 1.4;
}

.teacher-contact img {
  width: 76px;
  height: 76px;
  border: 5px solid white;
  border-radius: 14px;
  object-fit: cover;
  box-shadow: 0 8px 20px rgba(8, 119, 216, 0.13);
}

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

.topic-row {
  display: grid;
  gap: 8px;
}

.topic-list > .topic-row > button,
.timeline-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  border: 1px solid #dcebf8;
  border-radius: 16px;
  padding: 10px;
  background: #f8fcff;
  color: var(--ink);
  text-align: left;
}

.topic-list > .topic-row > button span {
  font-weight: 850;
}

.topic-list > .topic-row > button span strong,
.topic-list > .topic-row > button span small {
  display: block;
}

.topic-list > .topic-row > button span small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.topic-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.topic-actions .button {
  width: auto;
}

.note {
  margin: 0;
  color: #3e4853;
  font-size: 14px;
  line-height: 1.6;
}

.timeline {
  display: grid;
  gap: 10px;
}

.timeline-date {
  display: grid;
  width: 54px;
  min-width: 54px;
  height: 54px;
  place-items: center;
  border-radius: var(--radius);
  background: var(--sun);
  color: var(--blue-deep);
  font-weight: 900;
}

.timeline-main {
  display: grid;
  flex: 1;
  gap: 3px;
}

.timeline-main em,
.timeline-main small {
  color: var(--muted);
  font-style: normal;
}

.progress-full td:first-child {
  box-shadow: inset 4px 0 0 #ff4f42;
}

.progress-empty td:first-child {
  box-shadow: inset 4px 0 0 var(--green);
}

.progress-active td:first-child {
  box-shadow: inset 4px 0 0 var(--blue);
}

.school-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: 18px;
  background: #f7fbff;
  box-shadow: 0 14px 34px rgba(8, 119, 216, 0.1);
}

.school-title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 58px;
  background: linear-gradient(90deg, var(--blue), var(--sky));
  color: white;
  font-size: 24px;
  font-weight: 900;
}

.school-title span {
  font-size: 15px;
  font-weight: 750;
  opacity: 0.92;
}

.school-grid {
  display: grid;
  grid-template-columns: 120px repeat(7, minmax(110px, 1fr));
  gap: 6px;
  min-width: 930px;
  padding: 12px;
  background: #f7fbff;
}

.school-head,
.school-time,
.school-cell {
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.82);
}

.school-head {
  display: grid;
  min-height: 42px;
  place-items: center;
  color: var(--blue-deep);
  font-weight: 900;
}

.school-time {
  display: grid;
  min-height: 126px;
  place-items: center;
  gap: 4px;
  color: var(--blue-deep);
}

.school-time strong {
  font-size: 18px;
}

.school-time span {
  font-size: 13px;
}

.school-cell {
  display: grid;
  align-content: start;
  gap: 8px;
  min-height: 126px;
  padding: 8px;
  background: #eaf6ff;
}

.school-course {
  display: grid;
  gap: 4px;
  border-radius: var(--radius);
  padding: 9px;
  color: white;
  text-align: center;
}

.school-course strong {
  font-size: 14px;
  line-height: 1.25;
}

.school-course span,
.school-course small {
  font-size: 11px;
  line-height: 1.35;
}

.school-course.color-0 {
  background: var(--blue);
}

.school-course.color-1 {
  background: #ffc400;
  color: var(--blue-deep);
}

.school-course.color-2 {
  background: var(--green);
}

.school-course.color-3 {
  background: var(--coral);
}

.school-course.color-4 {
  background: var(--teal);
}

.config-group-title {
  border-left: 5px solid var(--sun);
  border-radius: 12px;
  padding: 10px 12px;
  background: #f2f9ff;
  color: var(--blue-deep);
  font-weight: 950;
}

.filter-panel {
  margin-bottom: 14px;
}

.filter-actions {
  align-content: end;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  display: grid;
  gap: 8px;
}

.proof-preview {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid #dcebf8;
  border-radius: 14px;
  padding: 9px;
  background: #f8fcff;
  color: var(--blue-deep);
  font-weight: 850;
  text-decoration: none;
}

.proof-preview img {
  width: 62px;
  height: 62px;
  border-radius: 10px;
  object-fit: cover;
}

.proof-upload {
  display: grid;
  gap: 10px;
  border: 1px dashed #cfe5f8;
  border-radius: 14px;
  padding: 10px;
  background: #fbfdff;
}

@media (min-width: 461px) {
  .mobile-shell {
    margin-top: 18px;
    margin-bottom: 18px;
    border-radius: 18px;
    overflow: hidden;
  }
}

@media (max-width: 390px) {
  .mobile-hero h1 {
    font-size: 35px;
  }

  .calendar-cell {
    min-height: 82px;
    padding: 4px 3px;
  }

  .calendar-event,
  .calendar-more {
    font-size: 9px;
  }
}
