/* V3.4 首页 · 全屏背景 + 圆形科目按钮 */

.page--home {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
  align-items: stretch;
  justify-content: flex-start;
  overflow-x: hidden;
}

.home-hero {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  overflow: hidden;
  background-color: #ff9a3c;
  background-image: url("../images/background-babahomework-cn.png");
  background-repeat: no-repeat;
  background-size: cover;
  background-position: 62% center;
}

.home-hero__scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(
    105deg,
    rgba(255, 248, 240, 0.72) 0%,
    rgba(255, 248, 240, 0.42) 42%,
    rgba(255, 236, 210, 0.18) 68%,
    rgba(255, 255, 255, 0.08) 100%
  );
}

.home-header {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 14px clamp(20px, 9vw, 155px) 0 clamp(20px, 9vw, 155px);
}

.logo-link,
.logo-wrapper,
.home-header__logo {
  display: block;
  line-height: 0;
  flex-shrink: 0;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
}

.site-logo {
  display: block;
  width: clamp(150px, 10vw, 205px);
  height: auto;
  object-fit: contain;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

.home-header__nav {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-top: 4px;
}

.home-header__link {
  background-color: var(--glass-fill);
  background-image: var(--glass-gradient);
  -webkit-backdrop-filter: var(--glass-backdrop);
  backdrop-filter: var(--glass-backdrop);
  border: var(--glass-border);
  border-radius: var(--glass-radius);
  box-shadow: var(--glass-shadow);
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 6px 16px;
  font-size: 14px;
  font-weight: 700;
  color: #2b211c;
  text-decoration: none;
  transition: background 0.12s ease;
}

.home-header__icon {
  width: 28px;
  height: 28px;
  margin-right: 6px;
  vertical-align: middle;
  object-fit: contain;
  filter: drop-shadow(0 1px 1px rgba(0,0,0,0.06));
}

.home-header__link:hover,
.home-header__link:focus-visible {
  color: #2b211c;
  background: rgba(255, 255, 255, 0.92);
  outline: 2px solid rgba(255, 138, 31, 0.35);
  outline-offset: 2px;
}

.home-hero__body {
  position: relative;
  z-index: 2;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  width: 100%;
  padding: 24px 0 120px;
}

.hero-left-content {
  position: relative;
  z-index: 2;
  width: min(56vw, 820px);
  margin-left: clamp(70px, 9vw, 155px);
}

.hero-copy {
  width: 100%;
}

.home-hero__title {
  margin: 0 0 12px;
  font-size: clamp(32px, 5vw, 46px);
  font-weight: 900;
  line-height: 1.22;
  color: #4a3e36;
  text-shadow: none;
  letter-spacing: 0.01em;
}

.home-hero__title-accent {
  color: #f58220;
  position: relative;
}

.home-hero__stars {
  display: inline-block;
  position: relative;
  width: 0;
  height: 0;
  vertical-align: top;
}

.home-hero__stars::before,
.home-hero__stars::after {
  content: "✦";
  position: absolute;
  color: #f5b927;
  font-size: 0.42em;
  font-weight: 700;
  line-height: 1;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.65);
}

.home-hero__stars::before {
  top: 0.15em;
  left: 0.28em;
  transform: rotate(-12deg);
}

.home-hero__stars::after {
  top: 0.85em;
  left: 0.95em;
  font-size: 0.32em;
  color: #ffd56a;
  transform: rotate(18deg);
}

.home-hero__tagline {
  margin: 0;
  font-size: clamp(15px, 2.2vw, 18px);
  font-weight: 600;
  line-height: 1.65;
  color: #68707b;
  text-shadow: none;
}

.home-hero__visitor {
  margin: 10px 0 0;
  font-size: clamp(13px, 1.8vw, 15px);
  font-weight: 600;
  line-height: 1.5;
  color: #8a929c;
}

.home-subject-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  width: 100%;
  box-sizing: border-box;
  margin-top: 12px;
}

.home-subject-card {
  background-color: var(--glass-fill);
  background-image: var(--glass-gradient);
  -webkit-backdrop-filter: var(--glass-backdrop);
  backdrop-filter: var(--glass-backdrop);
  border: var(--glass-border);
  border-radius: var(--glass-radius);
  box-shadow: var(--glass-shadow);
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 124px;
  padding: 14px 16px;
  text-decoration: none;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.home-subject-card:hover,
.home-subject-card:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.16);
  outline: none;
}

.home-subject-card__icon {
  width: 72px;
  height: 72px;
  flex: 0 0 72px;
  display: block;
  object-fit: contain;
}

.home-subject-card__body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.home-subject-card__name {
  font-size: 20px;
  font-weight: 900;
  color: #382d27;
  line-height: 1.1;
}

.home-subject-card__desc {
  font-size: 12px;
  font-weight: 700;
  color: #6b5b52;
  line-height: 1.35;
}

.home-subject-card--math .home-subject-card__icon,
.home-subject-card--chinese .home-subject-card__icon,
.home-subject-card--english .home-subject-card__icon {
  filter: none;
}

.home-hero__strip {
  background-color: var(--glass-fill);
  background-image: var(--glass-gradient);
  -webkit-backdrop-filter: var(--glass-backdrop);
  backdrop-filter: var(--glass-backdrop);
  border: var(--glass-border);
  border-radius: var(--glass-radius);
  box-shadow: var(--glass-shadow);
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 24px;
  padding: 14px 16px 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.65);
}

.home-strip__item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 800;
  color: #5a4a3a;
}

.home-strip__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  font-size: 13px;
  color: var(--color-primary);
  background: #fff3e8;
  border-radius: 50%;
  overflow: hidden;
}

.home-strip__icon img {
  width: 28px;
  height: 28px;
  object-fit: contain;
  display: block;
}

.home-secondary {
  background: transparent;
  padding: 28px 20px 36px;
}

.home-secondary__inner {
  background-color: var(--glass-fill);
  background-image: var(--glass-gradient);
  -webkit-backdrop-filter: var(--glass-backdrop);
  backdrop-filter: var(--glass-backdrop);
  border: var(--glass-border);
  border-radius: var(--glass-radius);
  box-shadow: var(--glass-shadow);
  max-width: 560px;
  margin: 0 auto;
  padding: 18px 20px;
}

.home-secondary__title {
  margin: 0 0 12px;
  font-size: 18px;
  font-weight: 900;
  color: var(--color-text);
}

.home-secondary__list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.home-secondary__item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  font-size: 15px;
}

.home-secondary__item + .home-secondary__item {
  border-top: 1px dashed rgba(0, 0, 0, 0.08);
}

.home-secondary__subject {
  font-weight: 800;
  color: #444;
}

.home-secondary__value {
  font-weight: 600;
  color: #777;
}

.home-secondary__total {
  margin: 12px 0 0;
  padding-top: 12px;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  font-size: 15px;
  font-weight: 900;
  color: var(--color-primary);
}

@media (max-width: 768px) {
  .home-hero {
    background-position: 78% center;
  }

  .home-header {
    padding: 14px 20px 0;
  }

  .hero-left-content {
    width: 100%;
    margin-left: 0;
    padding-left: 20px;
    padding-right: 20px;
  }

  .home-hero__body {
    padding-bottom: 140px;
  }

  .subject-buttons,
  .home-orbs,
  .home-subject-cards {
    margin-left: 0;
    justify-content: stretch;
  }

  .home-subject-cards {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .home-subject-card {
    min-height: 80px;
    padding: 12px 14px;
  }
}

@media (max-width: 375px) {
  .home-header {
    padding: 10px 12px 0;
  }

  .site-logo {
    width: min(148px, 46vw);
  }

  .hero-left-content {
    padding-left: 12px;
    padding-right: 12px;
  }

  .home-hero__body {
    padding-bottom: 150px;
  }

  .subject-buttons,
  .home-orbs,
  .home-subject-cards {
    gap: 8px;
  }

  .home-subject-card {
    min-height: 96px;
  }

  .home-subject-card__icon {
    width: 60px;
    height: 60px;
    flex-basis: 60px;
  }

  .home-subject-card__name {
    font-size: 18px;
  }

  .home-hero__strip {
    gap: 6px 12px;
    padding: 12px 10px 14px;
  }

  .home-strip__item {
    font-size: 12px;
  }
}

/* Beian footer */
.home-beian {
  text-align: center;
  padding: 14px 16px 18px;
  font-size: 13px;
  color: #555;
  line-height: 1.8;
  background: #f9f6f2;
  border-top: 1px solid #ebe5dc;
}

.home-beian__text {
  display: inline;
}

.home-beian__separator {
  margin: 0 8px;
  color: #ccc;
}

.home-beian__link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #555;
  text-decoration: none;
}

.home-beian__link:hover {
  color: #333;
}

.home-beian__icon {
  vertical-align: middle;
}

@media (max-width: 480px) {
  .home-beian {
    font-size: 11px;
    padding: 10px 12px 14px;
  }

  .home-beian__separator {
    margin: 0 4px;
  }
}

/* 学生登录态正式首页：左对齐栅格 + 左侧安全区，禁止居中窄栏/绝对定位/整体缩放 */
.page--home:has(.child-home-grid--student),
.page--home-student {
  --student-gutter: clamp(48px, 3.5vw, 64px);
  --student-upper-max: 760px;
  --student-card-radius: 18px;
  font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC", sans-serif;
  min-height: 100vh;
  background-color: #ff9a3c;
  background-image: url("../images/background-babahomework-cn.png");
  background-repeat: no-repeat;
  background-size: cover;
  background-position: 62% center;
  background-attachment: scroll;
}

.student-home {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  width: 100%;
  min-height: 0;
}

.student-home-nav {
  position: sticky;
  top: 0;
  z-index: 40;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 16px;
  width: 100%;
  min-height: 80px;
  height: clamp(76px, 8vw, 84px);
  margin: 0;
  padding: 0 var(--student-gutter);
  box-sizing: border-box;
  background: rgba(255, 255, 255, 0.94);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  backdrop-filter: blur(14px) saturate(1.2);
  border-bottom: 1px solid rgba(255, 255, 255, 0.65);
  box-shadow: 0 4px 18px rgba(74, 52, 30, 0.08);
}

.student-home-nav__logo .site-logo {
  width: clamp(140px, 9vw, 188px);
}

.student-home-nav__center {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: clamp(18px, 3vw, 36px);
}

.student-home-nav__link {
  position: relative;
  padding: 8px 2px;
  font-size: 16px;
  font-weight: 700;
  color: #5c534c;
  text-decoration: none;
}

.student-home-nav__link.is-active,
.student-home-nav__link[aria-current="page"] {
  color: #f58220;
}

.student-home-nav__link.is-active::after,
.student-home-nav__link[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  border-radius: 2px;
  background: #f58220;
}

.student-home-nav__link:hover,
.student-home-nav__link:focus-visible {
  color: #f58220;
  outline: none;
}

.student-home-nav__right {
  display: flex;
  align-items: center;
  gap: 14px;
}

.student-home-nav__identity {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
}

.student-home-nav__avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #ffe0b2;
  color: #c45f12;
  font-size: 16px;
  font-weight: 800;
  line-height: 1;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.9);
}

.student-home-nav__identity-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.student-home-nav__name {
  font-size: 15px;
  font-weight: 800;
  color: #2b211c;
}

.student-home-nav__grade {
  font-size: 12px;
  font-weight: 600;
  color: #8a7f76;
}

.student-home-nav__divider {
  width: 1px;
  height: 28px;
  background: rgba(74, 62, 54, 0.18);
}

.student-home-nav__parent {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(255, 248, 240, 0.95);
  border: 1px solid rgba(245, 130, 32, 0.28);
  color: #2b211c;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}

.student-home-nav__parent:hover,
.student-home-nav__parent:focus-visible {
  background: #fff;
  outline: 2px solid rgba(255, 138, 31, 0.35);
  outline-offset: 2px;
}

.student-home__body {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 28px var(--student-gutter) 64px;
  box-sizing: border-box;
}

.student-home__upper {
  width: 100%;
  max-width: var(--student-upper-max);
}

.student-home__hero {
  margin-bottom: 4px;
}

.student-home__intro {
  max-width: 100%;
  margin-bottom: 22px;
}

.student-home__title {
  margin: 0;
  font-size: clamp(44px, 4.2vw, 64px);
  font-weight: 900;
  line-height: 1.18;
  color: #4a3e36;
  letter-spacing: 0.01em;
}

.student-home__title-accent {
  color: #f58220;
  position: relative;
}

.student-home__stars {
  display: inline-block;
  position: relative;
  width: 0;
  height: 0;
  vertical-align: top;
}

.student-home__stars::before,
.student-home__stars::after {
  content: "✦";
  position: absolute;
  color: #f5b927;
  font-size: 0.42em;
  font-weight: 700;
  line-height: 1;
}

.student-home__stars::before {
  top: 0.15em;
  left: 0.28em;
  transform: rotate(-12deg);
}

.student-home__stars::after {
  top: 0.85em;
  left: 0.95em;
  font-size: 0.32em;
  color: #ffd56a;
  transform: rotate(18deg);
}

.student-home__context {
  margin: 14px 0 0;
  font-size: 15px;
  font-weight: 600;
  color: #68707b;
}

.student-home__context-switch {
  margin-left: 10px;
  padding: 4px 10px;
  border: 1px solid rgba(245, 130, 32, 0.35);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  color: #c45f12;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.student-home-section {
  margin-top: 22px;
}

.student-home-section__title {
  margin: 0 0 12px;
  font-size: 20px;
  font-weight: 800;
  color: #3d342e;
}

.student-home-section--entries {
  margin-top: 22px;
}

.student-home-section--growth {
  width: 100%;
  max-width: min(1180px, 100%);
  margin-top: 28px;
}

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

.student-subject-card {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 94px;
  min-height: 94px;
  max-height: 94px;
  padding: 12px 14px;
  border-radius: var(--student-card-radius);
  background: rgba(255, 255, 255, 0.91);
  border: 1px solid rgba(255, 255, 255, 0.85);
  box-shadow: 0 6px 18px rgba(74, 52, 30, 0.08);
  text-decoration: none;
  color: inherit;
  box-sizing: border-box;
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.student-subject-card:hover,
.student-subject-card:focus-visible {
  transform: scale(1.05);
  box-shadow:
    0 10px 24px rgba(74, 52, 30, 0.12),
    0 0 0 4px rgba(245, 130, 32, 0.18);
  outline: none;
  z-index: 1;
}

.student-subject-card__icon {
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  object-fit: contain;
}

.student-subject-card__body {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.student-subject-card__name {
  font-size: 18px;
  font-weight: 800;
  color: #2b211c;
}

.student-subject-card__desc {
  font-size: 13.5px;
  font-weight: 600;
  color: #8a929c;
  line-height: 1.3;
}

.student-feature-entries {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 15px;
}

.student-feature-entry {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 88px;
  min-height: 88px;
  padding: 14px 18px;
  border-radius: var(--student-card-radius);
  text-decoration: none;
  color: inherit;
  box-sizing: border-box;
  border: 1px solid transparent;
  box-shadow: 0 6px 18px rgba(74, 52, 30, 0.08);
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.student-feature-entry--map {
  background: rgba(255, 236, 210, 0.96);
  border-color: rgba(245, 130, 32, 0.22);
}

.student-feature-entry--learning {
  background: rgba(227, 242, 253, 0.96);
  border-color: rgba(66, 165, 245, 0.28);
}

.student-feature-entry:hover,
.student-feature-entry:focus-visible {
  transform: scale(1.03);
  box-shadow:
    0 10px 24px rgba(74, 52, 30, 0.12),
    0 0 0 4px rgba(245, 130, 32, 0.14);
  outline: none;
}

.student-feature-entry__icon {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  object-fit: contain;
}

.student-feature-entry__title {
  font-size: 18px;
  font-weight: 800;
  color: #2b211c;
}

.student-growth-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(0, 0.55fr) minmax(0, 0.55fr);
  gap: 14px;
  padding: 18px;
  border-radius: 20px;
  background: rgba(255, 252, 248, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 8px 24px rgba(74, 52, 30, 0.08);
}

.student-growth-metrics {
  list-style: none;
  margin: 0;
  padding: 10px 8px;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  align-content: center;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.72);
}

.student-growth-metric {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  min-width: 0;
}

.student-growth-metric__icon {
  width: 36px;
  height: 36px;
  object-fit: contain;
}

.student-growth-metric__label {
  font-size: 13px;
  font-weight: 700;
  color: #8a7f76;
}

.student-growth-metric__value {
  font-size: 24px;
  font-weight: 800;
  color: #2b211c;
  line-height: 1.1;
}

.student-growth-metric__value--off,
.student-growth-collectible__value--off {
  font-size: 22px;
  font-weight: 700;
  color: #a39a93;
}

.student-growth-metric.is-missing,
.student-growth-collectible.is-missing {
  opacity: 0.88;
}

.student-growth-collectibles {
  display: contents;
}

.student-growth-collectible {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
  min-height: 118px;
  padding: 14px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid rgba(245, 130, 32, 0.12);
  box-shadow: 0 2px 10px rgba(74, 52, 30, 0.05);
}

.student-growth-collectible__head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.student-growth-collectible__icon {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  object-fit: contain;
}

.student-growth-collectible__text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.student-growth-collectible__label {
  font-size: 13px;
  font-weight: 700;
  color: #8a7f76;
}

.student-growth-collectible__value {
  font-size: 22px;
  font-weight: 800;
  color: #2b211c;
  line-height: 1.1;
}

.student-growth-collectible__thumbs {
  display: flex;
  gap: 6px;
}

.student-growth-collectible__thumb {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: rgba(245, 130, 32, 0.12);
  border: 1px dashed rgba(168, 140, 110, 0.35);
}

.student-growth-collectible--badges .student-growth-collectible__thumb {
  border-radius: 50%;
  background: rgba(255, 193, 7, 0.18);
}

.page--home:has(.child-home-grid--student) .home-beian {
  background: transparent;
  border-top: 1px solid rgba(56, 45, 39, 0.1);
  color: #4a3f38;
}

@media (max-width: 1500px) {
  .page--home:has(.child-home-grid--student),
  .page--home-student {
    --student-upper-max: 700px;
  }

  .student-growth-panel {
    grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.5fr) minmax(0, 0.5fr);
  }
}

@media (max-width: 1100px) {
  .page--home-student {
    --student-gutter: 28px;
    --student-upper-max: 100%;
  }

  .student-growth-panel {
    grid-template-columns: 1fr;
  }

  .student-growth-collectibles {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }
}

@media (max-width: 820px) {
  .page--home-student {
    --student-gutter: 16px;
  }

  .student-home-nav {
    grid-template-columns: 1fr auto;
    height: auto;
    min-height: 76px;
    padding: 10px var(--student-gutter);
    gap: 10px;
  }

  .student-home-nav__center {
    display: none;
  }

  .student-home__title {
    font-size: clamp(34px, 8vw, 48px);
  }

  .student-subject-cards,
  .student-feature-entries {
    grid-template-columns: 1fr;
  }

  .student-subject-card,
  .student-feature-entry {
    height: auto;
    min-height: 88px;
    max-height: none;
  }

  .student-subject-card:hover,
  .student-subject-card:focus-visible,
  .student-feature-entry:hover,
  .student-feature-entry:focus-visible {
    transform: none;
  }

  .student-growth-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .student-growth-collectibles {
    grid-template-columns: 1fr;
  }

  .student-growth-metric__value {
    font-size: 22px;
  }
}
