:root {
  --ink: #111827;
  --muted: #667085;
  --line: #e7e9ee;
  --surface: #ffffff;
  --page: #edf1f5;
  --brand: #972a21;
  --brand-bright: #ef2637;
  --brand-soft: #fff2f3;
  --gold: #f5d44f;
  --blue: #2376df;
  --purple: #7548e8;
  --orange: #ef9b19;
  --shadow-shell: 0 18px 60px rgba(26, 32, 44, 0.12);
  --shadow-card: 0 5px 16px rgba(31, 41, 55, 0.07);
  color-scheme: light;
  font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 0;
  scroll-behavior: smooth;
  background: var(--page);
}

body {
  min-width: 0;
  min-height: 100svh;
  margin: 0;
  color: var(--ink);
  background: var(--page);
}

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

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

button {
  color: inherit;
}

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

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

[hidden] {
  display: none !important;
}

.home-page {
  width: 100%;
  min-height: 100svh;
}

.home-shell {
  position: relative;
  width: 100%;
  max-width: 430px;
  min-height: 100svh;
  margin: 0 auto;
  padding: env(safe-area-inset-top, 0) 0 calc(25px + env(safe-area-inset-bottom, 0));
  overflow-x: clip;
  background: #fff;
  box-shadow: var(--shadow-shell);
}

.brand-header {
  position: relative;
  z-index: 20;
  display: flex;
  min-height: 80px;
  align-items: center;
  justify-content: space-between;
  padding: 15px 18px 12px;
}

.brand-lockup {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
}

.brand-lockup > img {
  width: 43px;
  height: 43px;
  flex: 0 0 43px;
  object-fit: contain;
}

.brand-copy {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.brand-copy strong {
  overflow: hidden;
  color: #101318;
  font-size: 22px;
  font-weight: 900;
  line-height: 1.08;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand-copy small {
  overflow: hidden;
  color: #5d6675;
  font-size: 10px;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.menu-button {
  display: grid;
  width: 43px;
  height: 43px;
  flex: 0 0 43px;
  padding: 0;
  place-content: center;
  gap: 4px;
  border: 1px solid #eceff3;
  border-radius: 50%;
  background: #fff;
  box-shadow: var(--shadow-card);
  cursor: pointer;
}

.menu-button span {
  display: block;
  width: 17px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: transform 160ms ease, opacity 160ms ease;
}

.menu-button.is-open span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.menu-button.is-open span:nth-child(2) {
  opacity: 0;
}

.menu-button.is-open span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

.site-nav {
  position: absolute;
  top: 67px;
  right: 18px;
  z-index: 30;
  width: 154px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 14px 34px rgba(17, 24, 39, 0.16);
}

.site-nav a {
  display: flex;
  min-height: 42px;
  align-items: center;
  padding: 0 12px;
  border-radius: 6px;
  color: #303848;
  font-size: 14px;
  font-weight: 700;
}

.site-nav a:hover {
  color: var(--brand);
  background: var(--brand-soft);
}

.hero-banner {
  position: relative;
  width: calc(100% - 36px);
  aspect-ratio: 718 / 230;
  margin: 0 18px;
  overflow: hidden;
  border-radius: 15px;
  background: var(--brand-soft);
}

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

.hero-banner.is-missing::after {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--brand);
  font-size: 13px;
  content: "请在后管上传顶部 Banner";
}

.home-section {
  padding: 0 18px;
  scroll-margin-top: 12px;
}

.careers-section {
  margin-top: 21px;
}

.courses-section {
  margin-top: 25px;
}

.more-section {
  margin-top: 24px;
}

.section-heading {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.section-heading h1,
.section-heading h2 {
  position: relative;
  min-width: 0;
  margin: 0;
  padding-left: 14px;
  color: #101828;
  font-size: 22px;
  font-weight: 900;
  line-height: 1.25;
  letter-spacing: 0;
}

.section-heading h1::before,
.section-heading h2::before {
  position: absolute;
  top: 3px;
  bottom: 3px;
  left: 0;
  width: 4px;
  border-radius: 4px;
  background: var(--brand-bright);
  content: "";
}

.section-heading-blue h2::before {
  background: var(--blue);
}

.section-heading > p {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  color: #7a8392;
  font-size: 11px;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.section-heading-compact {
  justify-content: flex-start;
}

.section-heading-compact > p {
  margin-left: 4px;
}

.section-action {
  min-width: 0;
}

.profession-link {
  display: inline-flex;
  min-height: 31px;
  max-width: 180px;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 0 12px;
  overflow: hidden;
  border: 1px solid #efd7d5;
  border-radius: 999px;
  color: #394150;
  background: #fff;
  font-size: 11px;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
}

.profession-link span {
  color: var(--brand-bright);
  font-weight: 900;
}

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

.career-card {
  display: flex;
  min-width: 0;
  min-height: 176px;
  align-items: center;
  padding: 12px 4px 10px;
  overflow: hidden;
  border: 1px solid #edf0f4;
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow-card);
  text-align: center;
  flex-direction: column;
}

.career-icon {
  position: relative;
  display: block;
  width: 54px;
  height: 54px;
  flex: 0 0 54px;
  margin-bottom: 8px;
  overflow: hidden;
  border-radius: 10px;
}

.career-icon img {
  position: absolute;
  top: -17px;
  left: 50%;
  width: 172px;
  height: auto;
  max-width: none;
  transform: translateX(-50%);
}

.career-icon.is-missing {
  background: var(--brand-soft);
}

.career-card strong {
  width: 100%;
  min-height: 33px;
  margin-bottom: 4px;
  overflow: hidden;
  color: #101318;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.career-card p,
.career-card small {
  display: -webkit-box;
  width: 100%;
  margin: 0;
  overflow: hidden;
  color: #6c7482;
  font-size: 9px;
  line-height: 1.5;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.career-card small {
  color: #4d5664;
}

.course-groups {
  display: grid;
  gap: 22px;
}

.course-group {
  min-width: 0;
}

.course-group-heading {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 3px 11px;
  margin-bottom: 10px;
}

.course-group-heading strong {
  display: inline-flex;
  min-width: 76px;
  min-height: 32px;
  align-items: center;
  justify-content: center;
  padding: 0 15px;
  border-radius: 8px;
  color: #fff;
  background: var(--group-color, var(--brand));
  font-size: 14px;
  font-weight: 900;
  line-height: 1;
}

.course-group-heading p {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  color: #66736d;
  font-size: 10px;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.course-group-heading span {
  grid-column: 2;
  color: #98a2b3;
  font-size: 9px;
  line-height: 1.2;
}

.course-cover-rail {
  display: flex;
  width: auto;
  min-width: 0;
  margin-right: -18px;
  padding: 1px 18px 8px 0;
  overflow-x: auto;
  overflow-y: hidden;
  gap: 10px;
  cursor: grab;
  overscroll-behavior-inline: contain;
  scroll-padding-inline: 0 18px;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
  touch-action: pan-x pan-y;
  -webkit-overflow-scrolling: touch;
}

.course-cover-rail::-webkit-scrollbar {
  display: none;
}

.course-cover-rail.is-dragging {
  cursor: grabbing;
  scroll-snap-type: none;
  user-select: none;
}

.course-cover-card,
.more-cover-card {
  position: relative;
  display: block;
  min-width: 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid #e3e7ed;
  border-radius: 8px;
  background: #f7f8fa;
  box-shadow: var(--shadow-card);
}

.course-cover-card {
  width: 40%;
  flex: 0 0 40%;
  aspect-ratio: 212 / 184;
  scroll-snap-align: start;
  cursor: pointer;
}

.course-cover-card img,
.more-cover-card img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 180ms ease;
}

.course-cover-card:not(.is-disabled):hover img,
.more-cover-card:not(.is-disabled):hover img {
  transform: scale(1.018);
}

.course-cover-card.is-disabled,
.more-cover-card.is-disabled {
  cursor: default;
}

.cover-placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #a4acb8;
  font-size: 10px;
  font-weight: 700;
}

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

.more-cover-card {
  width: 100%;
  aspect-ratio: 212 / 186;
}

.feature-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 25px 18px 0;
  padding: 13px 5px;
  border-top: 1px solid #edf0f4;
  border-bottom: 1px solid #edf0f4;
  background: #fff;
}

.feature-item {
  display: grid;
  min-width: 0;
  grid-template-columns: 30px minmax(0, 1fr);
  align-items: center;
  gap: 5px;
  padding: 0 5px;
}

.feature-item + .feature-item {
  border-left: 1px solid #eff1f4;
}

.feature-icon {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 7px;
  color: #fff;
  background: var(--brand-bright);
}

.feature-icon::before {
  font-size: 17px;
  font-weight: 900;
  line-height: 1;
  content: "◆";
}

.feature-2 .feature-icon {
  color: #4f3a00;
  background: var(--gold);
}

.feature-2 .feature-icon::before {
  content: "★";
}

.feature-3 .feature-icon {
  background: var(--purple);
}

.feature-3 .feature-icon::before {
  content: "↗";
}

.feature-4 .feature-icon {
  background: var(--blue);
}

.feature-4 .feature-icon::before {
  font-size: 10px;
  content: "●●";
}

.feature-item div {
  min-width: 0;
}

.feature-item strong,
.feature-item p {
  display: block;
  width: 100%;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.feature-item strong {
  color: #101828;
  font-size: 9px;
  font-weight: 900;
  line-height: 1.35;
}

.feature-item p {
  color: #7a8392;
  font-size: 7px;
  line-height: 1.35;
}

.site-footer {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 18px 18px 0;
  padding: 0 5px;
}

.site-footer img {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  object-fit: contain;
  filter: grayscale(1);
  opacity: 0.68;
}

.site-footer p {
  margin: 0;
  color: #667085;
  font-size: 8px;
  line-height: 1.55;
}

.load-error {
  display: grid;
  min-height: 140px;
  place-content: center;
  gap: 5px;
  border: 1px dashed #dfb7b4;
  border-radius: 8px;
  color: var(--brand);
  background: #fff8f8;
  text-align: center;
}

.load-error strong {
  font-size: 13px;
}

.load-error span {
  font-size: 10px;
}

.toast {
  position: fixed;
  right: 16px;
  bottom: calc(16px + env(safe-area-inset-bottom, 0));
  z-index: 100;
  max-width: min(320px, calc(100% - 32px));
  padding: 11px 14px;
  border-radius: 7px;
  color: #fff;
  background: #202735;
  box-shadow: 0 12px 28px rgba(17, 24, 39, 0.24);
  font-size: 12px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity 160ms ease, transform 160ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.menu-button:focus-visible,
.site-nav a:focus-visible,
.profession-link:focus-visible,
.course-cover-card:focus-visible,
.more-cover-card:focus-visible {
  outline: 3px solid rgba(151, 42, 33, 0.24);
  outline-offset: 2px;
}

@media (max-width: 350px) {
  .brand-header {
    min-height: 74px;
    padding: 12px;
  }

  .brand-lockup > img {
    width: 39px;
    height: 39px;
    flex-basis: 39px;
  }

  .brand-copy strong {
    font-size: 19px;
  }

  .menu-button {
    width: 40px;
    height: 40px;
    flex-basis: 40px;
  }

  .hero-banner {
    width: calc(100% - 24px);
    margin: 0 12px;
    border-radius: 12px;
  }

  .home-section {
    padding: 0 12px;
  }

  .section-heading h1,
  .section-heading h2 {
    font-size: 19px;
  }

  .profession-link {
    max-width: 150px;
    padding: 0 9px;
    font-size: 10px;
  }

  .career-grid {
    gap: 4px;
  }

  .career-card {
    min-height: 164px;
    padding-right: 2px;
    padding-left: 2px;
  }

  .career-icon {
    width: 47px;
    height: 47px;
    flex-basis: 47px;
  }

  .career-card strong {
    min-height: 29px;
    font-size: 10px;
  }

  .career-card p,
  .career-card small {
    font-size: 8px;
  }

  .course-cover-rail {
    margin-right: -12px;
    padding-right: 12px;
  }

  .feature-strip {
    margin-right: 12px;
    margin-left: 12px;
    padding-right: 2px;
    padding-left: 2px;
  }

  .feature-item {
    grid-template-columns: 25px minmax(0, 1fr);
    gap: 3px;
    padding: 0 3px;
  }

  .feature-icon {
    width: 25px;
    height: 25px;
  }

  .feature-item strong {
    font-size: 8px;
  }

  .feature-item p {
    font-size: 6px;
  }
}

@media (min-width: 431px) {
  .home-page {
    padding: 18px 0;
  }

  .home-shell {
    min-height: calc(100svh - 36px);
    border-radius: 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .menu-button span,
  .course-cover-card img,
  .more-cover-card img,
  .toast {
    transition: none;
  }
}
