/* 个人版首页 · 科技书香风 · 中性透明柜 + 暖纸书脊；蓝仅用于交互 */

body.home-hub-page {
  --home-ink: #1a2438;
  --home-ink-soft: rgba(26, 36, 56, 0.58);
  --home-mist: #ffffff;
  --home-paper: #ffffff;
  --home-line: rgba(26, 36, 56, 0.08);
  --home-brand: #5b7ae8;
  --home-brand-deep: #4560c0;
  --home-warm: #c47a3a;
  --home-wood: #c4b49a;
  --home-wood-deep: #9a876c;
  --home-seal: #b52e24;
  --home-lamp: rgba(255, 255, 255, 0.45);
  --home-radius: 16px;
  --home-font: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --home-serif: "Songti SC", "STSong", "Noto Serif SC", "PingFang SC", serif;

  /* 共用书架材质 · 暖橡木柜（书香点缀，非整页） */
  --shelf-frame: #b39a78;
  --shelf-body-top: #e4d5bf;
  --shelf-body-mid: #d2c0a6;
  --shelf-body-bot: #c0ab8e;
  --shelf-rail-top: #ddcdb4;
  --shelf-rail-bot: #b59a78;
  --shelf-bay-tint: rgba(110, 84, 52, 0.12);
  --shelf-plank-top: #efe4d2;
  --shelf-plank-mid: #d8c5aa;
  --shelf-plank-bot: #b89d7a;
  --shelf-lamp: rgba(255, 246, 230, 0.45);
  --shelf-inset: rgba(26, 36, 56, 0.08);

  /* 柜内书脊 · 暖中性纸色，靠明度分科（无蓝紫） */
  --book-chinese-top: #c9b9a4;
  --book-chinese-bot: #9e8c76;
  --book-math-top: #bdae99;
  --book-math-bot: #92806b;
  --book-english-top: #d4c5b0;
  --book-english-bot: #a8947c;
  --book-science-top: #b5a898;
  --book-science-bot: #8a7d6e;
  --book-moral-top: #d8c9b4;
  --book-moral-bot: #ad9980;
  --book-other-top: #c2b6a8;
  --book-other-bot: #95897c;

  /* 暑假作业 · 暖纸 3 档明度 */
  --book-summer-a-top: #d2c0a8;
  --book-summer-a-bot: #a89074;
  --book-summer-b-top: #c4b094;
  --book-summer-b-bot: #9a8168;
  --book-summer-c-top: #deccb4;
  --book-summer-c-bot: #b49a7c;
  --book-summer-d-top: #d2c0a8;
  --book-summer-d-bot: #a89074;
  --book-summer-e-top: #c4b094;
  --book-summer-e-bot: #9a8168;

  /* 试卷 · 略深暖灰纸 */
  --book-paper-top: #c0b09a;
  --book-paper-bot: #948270;
}

body.home-hub-page .home-panel.is-personal-mode,
body.home-hub-page .ios-screen.is-personal-mode {
  background: #ffffff;
}

body.home-hub-page .home-view--personal {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  font-family: var(--home-font);
  color: var(--home-ink);
  background: #ffffff;
}

body.home-hub-page .home-view--personal::before {
  display: none;
}

body.home-hub-page .home-view--personal > * {
  position: relative;
  z-index: 1;
}

body.home-hub-page .home-personal-bar.care-hub-promo__bar {
  min-height: 0;
  margin: 0;
  padding: 0;
  background: transparent;
  border: none;
}

/* —— 顶栏 —— */
.home-hub-promo {
  flex-shrink: 0;
  margin: 0;
  padding: 8px 18px 8px;
}

.home-hub-promo .care-hub-promo__bar {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  padding: 0;
  background: transparent;
  border-bottom: none;
}

.home-hub-child-switcher {
  max-width: none;
  width: auto;
  min-width: 0;
  min-height: 34px;
  height: 34px;
  padding: 0 8px 0 3px;
  gap: 6px;
  border-radius: 12px;
  background: #ffffff;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border: none;
  box-shadow:
    0 1px 2px rgba(26, 36, 56, 0.06),
    0 4px 12px rgba(26, 36, 56, 0.08);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.home-hub-child-switcher:active {
  transform: scale(0.98);
}

.home-hub-child-switcher__avatar {
  width: 26px;
  height: 26px;
  border-width: 1.5px;
  box-shadow: 0 2px 6px rgba(91, 122, 232, 0.14);
}

.home-hub-promo__bar .home-child-switcher__name {
  font-size: 13px;
  font-weight: 650;
  letter-spacing: 0.01em;
  color: var(--home-ink);
  line-height: 1.2;
}

.home-hub-promo__bar .home-child-switcher__info {
  flex: 0 1 auto;
  gap: 0;
  justify-content: center;
  min-width: 0;
}

.home-hub-promo__bar .home-child-switcher__chevron {
  font-size: 9px;
  color: var(--home-ink-soft);
}

.home-hub-bar__actions {
  width: 100%;
  min-width: 0;
}

.home-hub-search-box {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  width: 100%;
  min-width: 0;
  height: 34px;
  min-height: 34px;
  padding: 0 4px 0 2px;
  border-radius: 12px;
  background: #ffffff;
  border: none;
  box-shadow:
    0 1px 2px rgba(26, 36, 56, 0.06),
    0 4px 12px rgba(26, 36, 56, 0.08);
  transition: box-shadow 0.18s ease;
}

.home-hub-search-box:focus-within {
  border-color: transparent;
  box-shadow:
    0 1px 2px rgba(91, 122, 232, 0.1),
    0 4px 14px rgba(91, 122, 232, 0.16),
    0 0 0 3px rgba(91, 122, 232, 0.1);
}

.home-hub-scan-btn {
  width: 100%;
  min-width: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  height: 26px;
  padding: 0 6px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--home-brand);
  font: inherit;
  font-size: 12px;
  font-weight: 650;
  white-space: nowrap;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.15s ease, opacity 0.15s ease;
}

.home-hub-scan-btn i {
  font-size: 12px;
}

.home-hub-scan-btn:active {
  background: rgba(91, 122, 232, 0.1);
  opacity: 0.9;
}

.home-hub-search-box__divider {
  flex: 0 0 auto;
  width: 1px;
  height: 14px;
  margin: 0 2px;
  background: var(--home-line);
}

.home-hub-search-field {
  width: 100%;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  height: 100%;
  padding: 0 8px 0 6px;
}

.home-hub-search-field__icon {
  flex-shrink: 0;
  font-size: 12px;
  color: var(--home-ink-soft);
}

.home-hub-search-field__input {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: none;
  background: none;
  font-size: 13px;
  color: var(--home-ink);
  outline: none;
}

.home-hub-search-field__input::placeholder {
  color: rgba(42, 36, 28, 0.38);
}

.home-hub-search-field__input::-webkit-search-cancel-button {
  display: none;
}

.home-hub-promo__bar.is-scrolled {
  padding-top: 6px;
  padding-bottom: 6px;
}

.home-hub-promo__bar.is-scrolled .home-hub-child-switcher,
.home-hub-promo__bar.is-scrolled .home-hub-search-box {
  min-height: 34px;
  height: 34px;
}

.home-hub-promo__bar.is-scrolled .home-hub-child-switcher {
  padding: 0 8px 0 3px;
}

.home-hub-promo__bar.is-scrolled .home-hub-child-switcher__avatar {
  width: 26px;
  height: 26px;
}

.home-hub-promo__bar.is-scrolled .home-child-switcher__info {
  gap: 0;
}

.home-hub-promo__bar.is-scrolled .home-child-switcher__grade {
  display: none;
}

/* 个人首页下滑仍显示孩子名（覆盖托管页隐藏校区名的规则） */
body.home-hub-page .care-hub-promo__bar.care-hub-bar.is-scrolled .home-child-switcher__name,
body.home-hub-page .home-hub-promo__bar.care-hub-bar.is-scrolled .home-child-switcher__name {
  display: block !important;
  font-size: 13px;
  font-weight: 650;
  line-height: 1.2;
  color: var(--home-ink);
  max-height: none;
  opacity: 1;
  overflow: visible;
}

body.home-hub-page .care-hub-promo__bar.care-hub-bar.is-scrolled .home-child-switcher__info,
body.home-hub-page .home-hub-promo__bar.care-hub-bar.is-scrolled .home-child-switcher__info {
  display: flex;
  min-width: 0;
  overflow: visible;
}

.home-hub-promo__bar.is-scrolled .home-child-switcher__chevron {
  font-size: 9px;
}

.home-hub-promo__bar .home-hub-child-switcher,
.home-hub-promo__bar .home-hub-child-switcher__avatar,
.home-hub-promo__bar .home-child-switcher__info,
.home-hub-promo__bar .home-child-switcher__name,
.home-hub-promo__bar .home-child-switcher__grade,
.home-hub-promo__bar .home-hub-search-box {
  transition:
    min-height 0.2s ease,
    height 0.2s ease,
    padding 0.2s ease,
    gap 0.2s ease,
    width 0.2s ease,
    font-size 0.2s ease;
}

/* —— 内容区 —— */
body.home-hub-page .home-hub-content.care-hub-content {
  padding: 4px 16px calc(28px + env(safe-area-inset-bottom, 0px));
  gap: 20px;
  overflow-x: hidden;
  background: #ffffff;
}

.home-hub-content > .home-book-search__results {
  margin-bottom: 4px;
  border-radius: var(--home-radius);
}

/* —— 分区标题统一 —— */
.home-hub-section {
  gap: 8px;
}

.home-hub-section__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding: 0 2px;
}

.home-hub-section__title {
  margin: 0;
  padding: 0;
  font-family: var(--home-serif);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--home-ink);
  line-height: 1.3;
}

.home-hub-section__desc {
  margin: 0;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--home-ink-soft);
  line-height: 1.3;
  white-space: nowrap;
}

.home-hub-panel.care-card {
  border-radius: var(--home-radius);
  border: 1px solid rgba(255, 255, 255, 0.85);
  background: rgba(255, 255, 255, 0.88);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.9) inset,
    0 8px 20px rgba(26, 36, 56, 0.05);
  overflow: hidden;
}

/* 我的作业本 · 透明柜体 · 靠光影读出结构（中性玻璃，不染蓝） */
.home-subject-books .home-hub-panel.care-card {
  position: relative;
  border-radius: 8px 8px 12px 12px;
  border: 1px solid rgba(26, 36, 56, 0.1);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.32) 0%, rgba(255, 255, 255, 0.08) 18%, rgba(255, 255, 255, 0.05) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.8),
    inset 0 -1px 0 rgba(26, 36, 56, 0.05),
    inset 14px 0 22px -14px rgba(26, 36, 56, 0.08),
    inset -14px 0 22px -14px rgba(26, 36, 56, 0.08),
    0 10px 28px rgba(26, 36, 56, 0.06),
    0 2px 0 rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.home-subject-books .home-hub-panel.care-card::before,
.home-subject-books .home-hub-panel.care-card::after {
  content: "";
  position: absolute;
  top: 6px;
  bottom: 8px;
  width: 10px;
  z-index: 3;
  pointer-events: none;
  opacity: 1;
  border-radius: 2px;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.55) 0%,
    rgba(255, 255, 255, 0.08) 45%,
    rgba(26, 36, 56, 0.08) 100%
  );
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.25),
    2px 0 8px rgba(26, 36, 56, 0.06);
}

.home-subject-books .home-hub-panel.care-card::before {
  left: 4px;
  border-right: none;
}

.home-subject-books .home-hub-panel.care-card::after {
  right: 4px;
  border-left: none;
  background: linear-gradient(
    270deg,
    rgba(255, 255, 255, 0.55) 0%,
    rgba(255, 255, 255, 0.08) 45%,
    rgba(26, 36, 56, 0.08) 100%
  );
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.25),
    -2px 0 8px rgba(26, 36, 56, 0.06);
}

.home-subject-books__shelf {
  position: relative;
  z-index: 2;
}

.home-subject-books__shelf::before {
  content: "";
  position: absolute;
  left: 16px;
  right: 16px;
  top: 0;
  height: 48px;
  pointer-events: none;
  background:
    radial-gradient(ellipse 70% 90% at 50% 0%, rgba(255, 255, 255, 0.55), transparent 70%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.18), transparent 85%);
  z-index: 1;
}

/* —— 本地作业馆 · 地域氛围标题（方案3） —— */
.home-hub-local {
  gap: 10px;
}

.home-hub-local__head {
  position: relative;
  align-items: center;
  gap: 10px;
  overflow: hidden;
}

.home-hub-local__atmos {
  position: absolute;
  right: 8px;
  top: 50%;
  width: 148px;
  height: 44px;
  transform: translateY(-48%);
  color: rgba(26, 36, 56, 0.055);
  pointer-events: none;
  z-index: 0;
}

.home-hub-local__skyline {
  display: block;
  width: 100%;
  height: 100%;
}

.home-hub-seal,
.home-hub-seal__tower,
.home-hub-seal__face,
.home-hub-seal__mark,
.home-hub-seal__city,
.home-hub-seal__ring,
.home-hub-seal__teeth,
.home-hub-seal__inner,
.home-hub-seal__sub {
  display: none;
}

.home-hub-local__title-wrap {
  position: relative;
  z-index: 1;
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 0;
  min-width: 0;
}

.home-hub-local__title-wrap .home-hub-section__title {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-indent: 0;
  line-height: 1.35;
}

.home-hub-local__sep {
  margin: 0 0.18em;
  letter-spacing: 0;
  font-weight: 500;
  color: rgba(26, 36, 56, 0.28);
}

.home-hub-local__city {
  letter-spacing: 0.1em;
  font-weight: 700;
  color: var(--home-ink);
}

.home-hub-local__title-wrap .home-hub-section__desc {
  display: none;
}

.home-hub-local__city-btn {
  position: relative;
  z-index: 1;
  flex: 0 0 auto;
  align-self: center;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  height: auto;
  padding: 4px 2px;
  border: none;
  border-radius: 0;
  background: transparent;
  font-family: inherit;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: rgba(26, 36, 56, 0.42);
  cursor: pointer;
  transition: color 0.15s ease, opacity 0.15s ease;
}

.home-hub-local__city-btn i {
  font-size: 10px;
  color: var(--home-seal);
  opacity: 0.7;
}

.home-hub-local__city-btn:active {
  transform: none;
  background: transparent;
  color: var(--home-seal);
  opacity: 0.9;
}

/* —— 本地作业馆 · 拟物书架 —— */
.home-lib {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.home-lib__labels {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  padding: 0 18px;
  margin-bottom: -6px;
}

.home-lib-label {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  padding: 0;
  border: none;
  background: none;
  font-family: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.home-lib-label__plate {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 0;
  width: 100%;
  min-height: 0;
  height: 36px;
  padding: 4px 5px;
  border-radius: 5px 5px 3px 3px;
  border: 1.5px solid rgba(255, 255, 255, 0.65);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.62) 0%, rgba(255, 255, 255, 0.28) 42%, rgba(244, 245, 247, 0.35) 100%);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.8) inset,
    0 -1px 2px rgba(26, 36, 56, 0.06) inset,
    0 3px 10px rgba(26, 36, 56, 0.08);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transform: perspective(360px) rotateX(10deg);
  transform-origin: center bottom;
  transition: transform 0.2s cubic-bezier(0.23, 1, 0.32, 1), box-shadow 0.2s ease, border-color 0.2s ease;
  filter: none;
}

.home-lib-label__plate::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(115deg, rgba(255, 255, 255, 0.55) 0%, transparent 42%, rgba(255, 255, 255, 0.12) 100%);
  pointer-events: none;
}

.home-lib-label__sticker {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 100%;
  height: 100%;
  padding: 0 6px;
  border-radius: 3px;
  border: 1px solid rgba(26, 36, 56, 0.08);
  background:
    linear-gradient(180deg, #ffffff 0%, #f6f6f7 100%);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.9) inset,
    0 1px 3px rgba(26, 36, 56, 0.08);
}

.home-lib-label__stand {
  width: 46%;
  height: 7px;
  margin-top: -1px;
  border-radius: 0 0 3px 3px;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.65) 0%,
    rgba(232, 214, 188, 0.38) 45%,
    rgba(196, 170, 136, 0.3) 100%
  );
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.7) inset,
    0 3px 6px rgba(26, 36, 56, 0.08);
}

.home-lib-label__stand::before {
  content: "";
  display: block;
  width: 30%;
  height: 4px;
  margin: -3px auto 0;
  border-radius: 1px;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.7) 0%,
    rgba(216, 190, 156, 0.4) 100%
  );
  box-shadow: 0 2px 4px rgba(26, 36, 56, 0.08);
}

.home-lib-label:active .home-lib-label__plate {
  transform: perspective(360px) rotateX(6deg) translateY(1px);
}

.home-lib-label.is-active .home-lib-label__plate {
  border-color: rgba(255, 255, 255, 0.85);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.78) 0%, rgba(255, 255, 255, 0.4) 42%, rgba(246, 246, 247, 0.45) 100%);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.9) inset,
    0 -1px 2px rgba(26, 36, 56, 0.06) inset,
    0 5px 14px rgba(26, 36, 56, 0.1);
  transform: perspective(360px) rotateX(4deg) translateY(-3px);
  filter: none;
}

.home-lib-label.is-active .home-lib-label__sticker {
  border-color: rgba(26, 36, 56, 0.1);
  background: linear-gradient(180deg, #ffffff 0%, #f7f7f8 100%);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.95) inset,
    0 2px 6px rgba(26, 36, 56, 0.08);
}

.home-lib-label__badge {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid rgba(91, 122, 232, 0.14);
  background: rgba(91, 122, 232, 0.1);
  color: var(--home-brand-deep, #4560c0);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0;
  box-shadow: none;
}

.home-lib-label.is-active .home-lib-label__badge {
  border-color: rgba(91, 122, 232, 0.28);
  background: rgba(91, 122, 232, 0.14);
  color: var(--home-brand-deep, #4560c0);
}

.home-lib-label__title {
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  color: var(--home-ink, #1a2438);
  text-shadow: none;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.home-lib-label.is-active .home-lib-label__title {
  color: var(--home-brand-deep, #4560c0);
  text-shadow: none;
}

.home-lib-label:focus-visible {
  outline: none;
}

.home-lib-label:focus-visible .home-lib-label__plate {
  box-shadow:
    0 0 0 2px #fff,
    0 0 0 4px rgba(91, 122, 232, 0.32),
    0 5px 14px rgba(91, 122, 232, 0.12);
}

.home-lib__cabinet {
  position: relative;
  margin-top: 0;
  padding: 18px 0 12px;
  border-radius: 8px 8px 12px 12px;
  border: 1px solid rgba(26, 36, 56, 0.1);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.32) 0%, rgba(255, 255, 255, 0.08) 18%, rgba(255, 255, 255, 0.05) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.8),
    inset 0 -1px 0 rgba(26, 36, 56, 0.05),
    inset 14px 0 22px -14px rgba(26, 36, 56, 0.08),
    inset -14px 0 22px -14px rgba(26, 36, 56, 0.08),
    0 10px 28px rgba(26, 36, 56, 0.06),
    0 2px 0 rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  overflow: hidden;
  touch-action: pan-y;
}

.home-lib__cabinet.is-swiping {
  user-select: none;
}

.home-lib__rail {
  position: absolute;
  top: 6px;
  bottom: 10px;
  width: 10px;
  z-index: 3;
  pointer-events: none;
  opacity: 1;
  border-radius: 2px;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.55) 0%,
    rgba(255, 255, 255, 0.08) 45%,
    rgba(26, 36, 56, 0.08) 100%
  );
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.25),
    2px 0 8px rgba(26, 36, 56, 0.06);
}

.home-lib__rail--left {
  left: 4px;
  border-right: none;
}

.home-lib__rail--right {
  right: 4px;
  border-left: none;
  background: linear-gradient(
    270deg,
    rgba(255, 255, 255, 0.55) 0%,
    rgba(255, 255, 255, 0.08) 45%,
    rgba(26, 36, 56, 0.08) 100%
  );
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.25),
    -2px 0 8px rgba(26, 36, 56, 0.06);
}

.home-lib__lamp {
  position: absolute;
  left: 16px;
  right: 16px;
  top: 0;
  height: 56px;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 70% 90% at 50% 0%, rgba(255, 255, 255, 0.55), transparent 70%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.2), transparent 85%);
}

.home-lib__bay {
  position: relative;
  z-index: 2;
  min-height: 0;
  margin: 0 12px;
  padding: 8px 8px 2px;
  border-radius: 4px;
  overflow: hidden;
  isolation: isolate;
  transform: translateZ(0);
  background: linear-gradient(
    180deg,
    rgba(26, 36, 56, 0.035) 0%,
    rgba(255, 255, 255, 0.04) 40%,
    rgba(26, 36, 56, 0.02) 100%
  );
  box-shadow:
    inset 0 10px 18px rgba(26, 36, 56, 0.07),
    inset 0 -1px 0 rgba(255, 255, 255, 0.35),
    inset 8px 0 14px -10px rgba(26, 36, 56, 0.05),
    inset -8px 0 14px -10px rgba(26, 36, 56, 0.05);
}

.home-lib__track {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: flex-start;
  width: 100%;
  max-width: 100%;
  will-change: transform;
  backface-visibility: hidden;
  transform: translate3d(0, 0, 0);
}

.home-lib__pane {
  flex: 0 0 100%;
  width: 100%;
  min-width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  display: block;
  overflow: hidden;
  pointer-events: none;
}

.home-lib__pane.is-active {
  pointer-events: auto;
}

.home-lib__pane[aria-hidden="true"]:not(.is-sliding) {
  visibility: hidden;
}

.home-lib__pane.is-sliding,
.home-lib__pane.is-active {
  visibility: visible;
}

.home-lib__shelf {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-bottom: 4px;
}

.home-lib__row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  padding: 8px 4px 0;
  align-items: end;
  justify-items: stretch;
}

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

/* 未满行保持左起陈列，不拉伸空位 */
.home-lib__row:has(> :last-child:nth-child(-n + 3)):not(.home-lib__row--3) {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.home-lib__row > .home-lib-cover,
.home-lib__row > .home-lib-book {
  width: 100%;
  max-width: 100%;
}

.home-lib-book {
  position: relative;
  width: 100%;
  aspect-ratio: 78 / 108;
  transform-style: preserve-3d;
  isolation: isolate;
}

.home-lib-book.is-opening,
.home-lib-book.is-open {
  z-index: 6;
}

.home-lib-book__pages {
  position: absolute;
  inset: 0;
  border-radius: 2px 4px 2px 1px;
  pointer-events: none;
  overflow: hidden;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.35),
    0 4px 10px rgba(26, 36, 56, 0.08);
}

.home-lib-book__page--stack {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(26, 36, 56, 0.08) 0%, transparent 14%),
    linear-gradient(160deg, #e8dfd0 0%, #d5c9b6 100%);
}

.home-lib-book__page--leaf {
  position: absolute;
  inset: 4px 4px 4px 6px;
  border-radius: 1px 2px 1px 1px;
  background:
    linear-gradient(90deg, rgba(196, 170, 136, 0.18) 0 5px, transparent 5px),
    linear-gradient(180deg, #fffefb 0%, #f8f3ea 100%);
  box-shadow:
    inset 0 0 0 1px rgba(26, 36, 56, 0.05),
    -1px 0 0 rgba(26, 36, 56, 0.04);
}

.home-lib-book__margin {
  position: absolute;
  top: 12px;
  bottom: 10px;
  left: 14px;
  width: 1px;
  background: rgba(196, 120, 100, 0.28);
}

.home-lib-book__ruled {
  position: absolute;
  inset: 16px 10px 12px 18px;
  background: repeating-linear-gradient(
    180deg,
    transparent 0,
    transparent 10px,
    rgba(26, 36, 56, 0.07) 10px,
    rgba(26, 36, 56, 0.07) 11px
  );
}

.home-lib-book .home-lib-cover {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
  min-height: 0;
}

.home-lib__cabinet.is-opening {
  overflow: visible;
  z-index: 4;
}

.home-lib__bay.is-opening {
  overflow: visible;
}

.home-lib__row.is-opening {
  position: relative;
  z-index: 5;
}

.home-lib-cover {
  position: relative;
  width: 100%;
  aspect-ratio: 78 / 108;
  height: auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 8px;
  padding: 10px 8px 10px 12px;
  border: none;
  border-radius: 2px 4px 2px 1px;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  overflow: hidden;
  transform-origin: left center;
  transform-style: preserve-3d;
  will-change: transform;
  -webkit-tap-highlight-color: transparent;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.35) inset,
    -1px 0 0 rgba(0, 0, 0, 0.08) inset,
    0 5px 12px rgba(26, 36, 56, 0.1);
  transition:
    box-shadow 0.18s ease;
}

.home-lib-cover.is-flipping {
  z-index: 8;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.35) inset,
    -6px 4px 18px rgba(26, 36, 56, 0.14),
    0 8px 20px rgba(26, 36, 56, 0.1);
}

.home-lib-cover:active:not(.is-flipping):not(.is-hovering) {
  transform: translateY(2px) scale(0.98);
}

.home-lib-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(115deg, rgba(255, 255, 255, 0.16) 0%, transparent 42%),
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 3px,
      rgba(255, 255, 255, 0.03) 3px,
      rgba(255, 255, 255, 0.03) 4px
    );
}

.home-lib-cover__spine {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 5px;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.28), rgba(255, 255, 255, 0.12) 55%, rgba(0, 0, 0, 0.1));
  pointer-events: none;
  z-index: 1;
}

.home-lib-cover[hidden] {
  display: none !important;
}

.home-lib-cover__band {
  position: relative;
  z-index: 1;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  height: 18px;
  padding: 0 6px;
  border-radius: 3px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.18);
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  color: #fff;
}

.home-lib-cover__title {
  position: relative;
  z-index: 1;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
  overflow: hidden;
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.02em;
  line-height: 1.35;
  color: rgba(255, 255, 255, 0.96);
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);
  word-break: break-all;
}

.home-lib-cover--a { background: linear-gradient(160deg, var(--book-summer-a-top) 0%, var(--book-summer-a-bot) 100%); }
.home-lib-cover--b { background: linear-gradient(160deg, var(--book-summer-b-top) 0%, var(--book-summer-b-bot) 100%); }
.home-lib-cover--c { background: linear-gradient(160deg, var(--book-summer-c-top) 0%, var(--book-summer-c-bot) 100%); }
.home-lib-cover--d { background: linear-gradient(160deg, var(--book-summer-d-top) 0%, var(--book-summer-d-bot) 100%); }
.home-lib-cover--e { background: linear-gradient(160deg, var(--book-summer-e-top) 0%, var(--book-summer-e-bot) 100%); }

.home-lib-cover--summer {
  aspect-ratio: 78 / 100;
  gap: 3px;
  padding: 10px 5px 8px 9px;
  justify-content: flex-start;
  align-items: flex-start;
}

.home-lib-cover--summer .home-lib-cover__title {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 3px;
  flex: 0 1 auto;
  width: 100%;
  min-height: 0;
  overflow: hidden;
  -webkit-line-clamp: unset;
  color: #fff8ee;
  text-shadow: 0 1px 1px rgba(58, 36, 16, 0.28);
  word-break: keep-all;
}

.home-lib-cover--summer .home-lib-cover__line--brand,
.home-lib-cover--summer .home-lib-cover__line--name,
.home-lib-cover--summer .home-lib-cover__line--publisher {
  display: block;
  max-width: 100%;
  font-family: var(--home-font);
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.01em;
  line-height: 1.3;
}

.home-lib-cover--summer .home-lib-cover__line--brand {
  font-weight: 700;
  color: #fff;
  white-space: normal;
  word-break: break-all;
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  max-height: calc(1.3em * 2);
}

.home-lib-cover--summer .home-lib-cover__line--brand.home-lib-cover__line--stack {
  display: flex;
  -webkit-line-clamp: unset;
  max-height: none;
  overflow: visible;
  word-break: keep-all;
}

.home-lib-cover--summer .home-lib-cover__line--name {
  font-weight: 500;
  color: rgba(255, 248, 236, 0.52);
  white-space: nowrap;
  word-break: keep-all;
  text-shadow: none;
  overflow: hidden;
}

.home-lib-cover--summer .home-lib-cover__line--publisher {
  font-size: 10px;
  font-weight: 700;
  color: #fffaf2;
  white-space: normal;
  word-break: break-all;
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  max-height: calc(1.3em * 2);
}

.home-lib-cover--summer .home-lib-cover__line--publisher.home-lib-cover__line--stack {
  display: flex;
  -webkit-line-clamp: unset;
  max-height: none;
  overflow: visible;
  word-break: keep-all;
  font-size: 10px;
  line-height: 1.25;
}

.home-lib-cover--chinese { background: linear-gradient(160deg, var(--book-chinese-top) 0%, var(--book-chinese-bot) 100%); }
.home-lib-cover--math { background: linear-gradient(160deg, var(--book-math-top) 0%, var(--book-math-bot) 100%); }
.home-lib-cover--english { background: linear-gradient(160deg, var(--book-english-top) 0%, var(--book-english-bot) 100%); }
.home-lib-cover--science { background: linear-gradient(160deg, var(--book-science-top) 0%, var(--book-science-bot) 100%); }
.home-lib-cover--moral { background: linear-gradient(160deg, var(--book-moral-top) 0%, var(--book-moral-bot) 100%); }

.home-lib-cover--textbook {
  aspect-ratio: 78 / 100;
  gap: 6px;
  padding: 10px 5px 9px 9px;
  justify-content: flex-start;
  align-items: flex-start;
}

.home-lib-cover--textbook .home-lib-cover__band {
  height: 15px;
  padding: 0 5px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.04em;
  background: rgba(255, 255, 255, 0.2);
}

.home-lib-cover--textbook.home-lib-cover--english .home-lib-cover__band {
  font-size: 8px;
  letter-spacing: 0.02em;
  text-transform: none;
}

.home-lib-cover--textbook .home-lib-cover__title {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 1px;
  flex: 0 1 auto;
  width: 100%;
  min-width: 0;
  min-height: 0;
  overflow: visible;
  -webkit-line-clamp: unset;
  color: #f4f8ff;
  text-shadow: 0 1px 1px rgba(20, 32, 52, 0.28);
  word-break: keep-all;
}

.home-lib-cover--textbook .home-lib-cover__line--grade {
  margin-top: 0;
  max-width: 100%;
  font-family: var(--home-serif);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.25;
  color: #f8fbff;
  white-space: nowrap;
  word-break: keep-all;
  overflow: hidden;
}

.home-lib-cover--textbook .home-lib-cover__line--subject {
  margin-top: 1px;
  font-family: var(--home-serif);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.15;
  color: #fff;
  white-space: nowrap;
  word-break: keep-all;
  overflow: hidden;
  max-width: 100%;
}

.home-lib-cover--textbook .home-lib-cover__line--subject.home-lib-cover__line--stack {
  font-size: 12px;
  letter-spacing: 0.04em;
  white-space: normal;
  overflow: visible;
}

.home-lib-cover--paper {
  aspect-ratio: 78 / 100;
  gap: 6px;
  padding: 10px 7px 9px 11px;
  justify-content: flex-start;
  align-items: flex-start;
  background: linear-gradient(160deg, var(--book-paper-top) 0%, var(--book-paper-bot) 100%);
}

.home-lib-cover--paper .home-lib-cover__band {
  height: 15px;
  padding: 0 5px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.12em;
  background: rgba(255, 255, 255, 0.22);
}

.home-lib-cover--paper .home-lib-cover__title {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 1px;
  flex: 0 1 auto;
  width: 100%;
  min-height: 0;
  overflow: hidden;
  -webkit-line-clamp: unset;
  color: #fff8ee;
  text-shadow: 0 1px 1px rgba(58, 36, 16, 0.28);
  word-break: keep-all;
}

.home-lib-cover__line {
  display: block;
  max-width: 100%;
  white-space: normal;
  word-break: break-all;
  line-height: 1.25;
}

/* 短标签：单行 */
.home-lib-cover__line--short {
  white-space: nowrap;
  word-break: keep-all;
  overflow: hidden;
}

/* 长标签：最多两行，完整可见优先 */
.home-lib-cover__line--wrap {
  white-space: normal;
  word-break: break-all;
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  line-height: 1.25;
  max-height: calc(1.25em * 2);
}

/* 主动拆行（如 道德 / 与法治） */
.home-lib-cover__line--stack {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
  white-space: normal;
  word-break: keep-all;
  overflow: visible;
  -webkit-line-clamp: unset;
  max-height: none;
}

.home-lib-cover__line--stack > span {
  display: block;
  line-height: 1.2;
  max-width: 100%;
}

.home-lib-cover__line--year {
  font-family: var(--home-font);
  font-size: 8px;
  font-weight: 500;
  letter-spacing: 0.04em;
  line-height: 1.2;
  color: rgba(255, 248, 236, 0.62);
  white-space: nowrap;
  word-break: keep-all;
  text-shadow: none;
}

.home-lib-cover__line--region {
  font-family: var(--home-font);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.01em;
  line-height: 1.3;
  min-height: calc(9px * 1.3);
  color: rgba(255, 248, 236, 0.7);
  text-shadow: none;
  white-space: normal;
  word-break: break-all;
  overflow-wrap: anywhere;
}

.home-lib-cover__line--region-slot {
  visibility: hidden;
  pointer-events: none;
}

.home-lib-cover__line--grade {
  margin-top: 5px;
  font-family: var(--home-serif);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.2;
  color: #fffaf2;
  white-space: nowrap;
  word-break: keep-all;
  overflow: hidden;
  max-width: 100%;
}

.home-lib-cover__line--subject {
  margin-top: 1px;
  font-family: var(--home-serif);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.06em;
  line-height: 1.15;
  color: #fff;
  white-space: nowrap;
  word-break: keep-all;
  overflow: hidden;
  max-width: 100%;
}

.home-lib-cover__line--subject.home-lib-cover__line--stack {
  font-size: 12px;
  letter-spacing: 0.04em;
  overflow: visible;
  white-space: normal;
}

.home-lib-cover--paper .home-lib-cover__line--grade {
  font-size: 12px;
  letter-spacing: 0.02em;
}

.home-lib-cover--paper .home-lib-cover__line--subject {
  font-size: 13px;
  letter-spacing: 0.04em;
}

.home-lib-cover--more {
  /* 与 .home-lib-book 书壳同尺寸（更多项未包书壳） */
  aspect-ratio: 78 / 108;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding: 10px 8px;
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.45) 0%, rgba(255, 255, 255, 0.1) 100%),
    linear-gradient(180deg, rgba(245, 245, 247, 0.35) 0%, rgba(228, 230, 234, 0.22) 100%);
  border: 1px solid rgba(255, 255, 255, 0.45);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.55),
    0 4px 10px rgba(26, 36, 56, 0.08);
}

.home-lib-cover--summer.home-lib-cover--more,
.home-lib-cover--textbook.home-lib-cover--more,
.home-lib-cover--paper.home-lib-cover--more {
  aspect-ratio: 78 / 108;
}

.home-lib-cover--more::after {
  display: none;
}

.home-lib-cover--more .home-lib-cover__spine {
  display: block;
  opacity: 0.55;
}

.home-lib-cover--more .home-lib-cover__title {
  display: flex;
  flex-direction: column;
  flex: 0 1 auto;
  align-items: center;
  justify-content: center;
  gap: 2px;
  width: 100%;
  overflow: visible;
  color: rgba(26, 36, 56, 0.72);
  text-shadow: none;
  text-align: center;
  font-family: var(--home-font);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.3;
  word-break: keep-all;
  white-space: normal;
  -webkit-line-clamp: unset;
}

.home-lib-cover--more .home-lib-cover__line {
  display: block;
  max-width: 100%;
  white-space: nowrap;
  word-break: keep-all;
  overflow: visible;
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  line-height: inherit;
}

.home-lib-cover--summer.home-lib-cover--more .home-lib-cover__title,
.home-lib-cover--textbook.home-lib-cover--more .home-lib-cover__title {
  font-size: 11px;
  letter-spacing: 0.02em;
  color: rgba(26, 36, 56, 0.7);
}

.home-lib-cover--more.is-expanded {
  border-style: solid;
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.5) 0%, rgba(255, 255, 255, 0.12) 100%),
    linear-gradient(180deg, rgba(245, 245, 247, 0.4) 0%, rgba(232, 214, 188, 0.22) 100%);
}

.home-lib-cover--more:active {
  transform: translateY(1px) scale(0.98);
}

.home-lib__plank {
  height: 10px;
  margin: 2px 0 0;
  border-radius: 1px;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.65) 0%,
    rgba(232, 214, 188, 0.38) 45%,
    rgba(196, 170, 136, 0.3) 100%
  );
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.85) inset,
    0 4px 10px rgba(26, 36, 56, 0.1),
    0 1px 0 rgba(160, 140, 110, 0.14);
}

.home-lib__base {
  height: 10px;
  margin: 6px 12px 0;
  border-radius: 0 0 8px 8px;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.28) 0%,
    rgba(240, 240, 242, 0.14) 100%
  );
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.55) inset,
    0 6px 14px rgba(26, 36, 56, 0.08);
}

@media (prefers-reduced-motion: reduce) {
  .home-lib__track {
    will-change: auto;
    transition: none;
  }

  .home-lib-label__plate,
  .home-lib-label.is-active .home-lib-label__plate {
    transform: none;
  }

  .home-hub-tool__glyph,
  .home-hub-tool:active .home-hub-tool__glyph {
    transition: none;
    transform: none;
  }

  .home-lib-cover,
  .home-lib-cover:active,
  .home-lib-cover--more:active {
    transition: none;
  }
}

/* —— 入场 —— */
@keyframes homeHubReveal {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.home-hub-reveal {
  animation: homeHubReveal 0.45s cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: var(--reveal-delay, 0ms);
}

@media (prefers-reduced-motion: reduce) {
  .home-hub-reveal {
    animation: none;
  }
}

/* —— 活动海报（可选）+ 学习工具 —— */
.home-hub-desk {
  margin: 0;
}

.home-hub-desk__stack {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.home-hub-desk--no-banner .home-hub-desk__campaign {
  display: none !important;
}

.home-hub-desk__campaign {
  position: relative;
}

.home-hub-banner--ops.home-hub-poster {
  position: relative;
  z-index: 1;
  overflow: hidden;
  display: flex;
  align-items: center;
  aspect-ratio: 3 / 1;
  min-height: 112px;
  margin: 0;
  padding: 16px 18px;
  border-radius: 16px;
  border: 1px solid rgba(76, 117, 242, 0.16);
  background:
    radial-gradient(120% 140% at 100% 0%, rgba(120, 168, 255, 0.45) 0%, transparent 46%),
    radial-gradient(90% 120% at 0% 100%, rgba(56, 104, 240, 0.35) 0%, transparent 50%),
    linear-gradient(120deg, #3f6df0 0%, #4c75f2 46%, #2f57d8 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.28),
    0 12px 28px rgba(63, 109, 240, 0.22);
  color: #fff;
  background-size: cover;
  background-position: center;
  isolation: isolate;
}

.home-hub-poster__art {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.home-hub-poster__glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(18px);
  opacity: 0.55;
}

.home-hub-poster__glow--a {
  width: 120px;
  height: 120px;
  right: -20px;
  top: -36px;
  background: rgba(180, 214, 255, 0.7);
}

.home-hub-poster__glow--b {
  width: 90px;
  height: 90px;
  right: 48px;
  bottom: -40px;
  background: rgba(90, 140, 255, 0.55);
}

.home-hub-poster__grid {
  position: absolute;
  inset: 0;
  opacity: 0.18;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.35) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.35) 1px, transparent 1px);
  background-size: 18px 18px;
  mask-image: linear-gradient(90deg, transparent 0%, #000 55%, #000 100%);
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 55%, #000 100%);
}

.home-hub-poster__visual {
  position: absolute;
  right: 16px;
  top: 50%;
  width: 108px;
  height: 78px;
  transform: translateY(-50%);
}

.home-hub-poster__ring {
  position: absolute;
  right: 8px;
  top: 50%;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.28);
  transform: translateY(-50%);
  box-shadow:
    inset 0 0 0 8px rgba(255, 255, 255, 0.06),
    0 0 0 1px rgba(255, 255, 255, 0.08);
}

.home-hub-poster__ring::before {
  content: "";
  position: absolute;
  inset: 10px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 30%, rgba(255, 255, 255, 0.55), transparent 42%),
    linear-gradient(160deg, rgba(255, 255, 255, 0.28), rgba(255, 255, 255, 0.06));
  border: 1px solid rgba(255, 255, 255, 0.22);
}

.home-hub-poster__streak {
  position: absolute;
  left: 0;
  bottom: 8px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.home-hub-poster__day {
  width: 12px;
  height: 12px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.home-hub-poster__day.is-done {
  background: rgba(255, 255, 255, 0.88);
  border-color: transparent;
}

.home-hub-poster__day.is-now {
  width: 28px;
  height: 22px;
  border-radius: 7px;
  display: grid;
  place-items: center;
  background: #fff;
  color: #3a5ccc;
  border: none;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: -0.02em;
  box-shadow: 0 6px 14px rgba(26, 50, 120, 0.28);
}

.home-hub-poster__copy {
  position: relative;
  z-index: 1;
  max-width: 62%;
}

.home-hub-poster__eyebrow {
  margin: 0 0 5px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.72);
}

.home-hub-poster__title {
  margin: 0;
  font-family: var(--home-font);
  font-size: 19px;
  font-weight: 800;
  letter-spacing: 0.01em;
  line-height: 1.2;
  text-shadow: 0 1px 8px rgba(30, 60, 140, 0.2);
}

.home-hub-poster__desc {
  margin: 6px 0 0;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.82);
}

.home-hub-poster__cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  padding: 6px 12px;
  border-radius: 999px;
  border: none;
  background: #fff;
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.02em;
  line-height: 1.2;
  color: #3558c7;
  box-shadow: 0 6px 14px rgba(26, 50, 120, 0.2);
}

.home-hub-poster__cta i {
  font-size: 9px;
}

.home-hub-poster__close {
  position: absolute;
  z-index: 3;
  top: 8px;
  right: 8px;
  width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 50%;
  background: rgba(18, 36, 84, 0.28);
  color: #fff;
  font-size: 12px;
  cursor: pointer;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: background 0.15s ease, transform 0.15s ease;
}

.home-hub-poster__close:active {
  transform: scale(0.94);
  background: rgba(18, 36, 84, 0.42);
}

.home-hub-banner__media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: inherit;
}

.home-hub-banner__media:not([hidden]) {
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
}

.home-hub-banner__media:not([hidden]) ~ .home-hub-poster__art,
.home-hub-banner__media:not([hidden]) ~ .home-hub-poster__copy {
  display: none;
}

.home-hub-desk__tools.home-hub-panel.care-card {
  margin: 0;
  padding: 4px 0 2px;
  border: none;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.home-hub-tool-stack {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.home-hub-tool-grid {
  display: grid;
  gap: 8px;
  padding: 0;
}

.home-hub-tool-grid--primary {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.home-hub-tool-grid--secondary {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2px;
  opacity: 0.88;
}

.home-hub-tool {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 6px 2px 4px;
  border: none;
  background: none;
  font-family: inherit;
  cursor: pointer;
  border-radius: 12px;
  transition: background 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}

.home-hub-tool:active {
  transform: scale(0.96);
  background: rgba(91, 122, 232, 0.06);
}

.home-hub-tool:active .home-hub-tool__glyph {
  transform: translateY(1px);
}

.home-hub-tool--featured {
  position: relative;
  overflow: hidden;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  min-height: 80px;
  padding: 14px 14px 14px 12px;
  border-radius: 18px;
  border: none;
  text-align: left;
  isolation: isolate;
}

.home-hub-tool--featured::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.55) 0%, transparent 42%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.2) 0%, transparent 100%);
  z-index: 0;
}

.home-hub-tool--featured > * {
  position: relative;
  z-index: 1;
}

.home-hub-tool--featured-wrong {
  background:
    linear-gradient(145deg, #fff8f5 0%, #ffe8e0 48%, #ffdcd2 100%);
  box-shadow:
    0 1px 2px rgba(180, 60, 40, 0.06),
    0 8px 22px rgba(200, 80, 50, 0.14),
    0 18px 36px rgba(26, 36, 56, 0.05);
}

.home-hub-tool--featured-grade {
  background:
    linear-gradient(145deg, #f6f8ff 0%, #e7edff 48%, #dce6ff 100%);
  box-shadow:
    0 1px 2px rgba(60, 80, 180, 0.06),
    0 8px 22px rgba(91, 122, 232, 0.16),
    0 18px 36px rgba(26, 36, 56, 0.05);
}

.home-hub-tool--featured:active {
  transform: scale(0.985);
  background: inherit;
}

.home-hub-tool--featured-wrong:active {
  box-shadow:
    0 1px 2px rgba(180, 60, 40, 0.08),
    0 4px 12px rgba(200, 80, 50, 0.12);
}

.home-hub-tool--featured-grade:active {
  box-shadow:
    0 1px 2px rgba(60, 80, 180, 0.08),
    0 4px 12px rgba(91, 122, 232, 0.14);
}

.home-hub-tool__copy {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
  min-width: 0;
}

.home-hub-tool--featured .home-hub-tool__glyph {
  flex: 0 0 auto;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  border: none;
  background: rgba(255, 255, 255, 0.72);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    0 4px 10px rgba(26, 36, 56, 0.08);
}

.home-hub-tool--featured .home-hub-tool__label {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--home-ink);
  line-height: 1.15;
}

.home-hub-tool__desc {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: rgba(26, 36, 56, 0.5);
  line-height: 1.2;
}

.home-hub-tool__chevron {
  flex: 0 0 auto;
  margin-left: auto;
  font-size: 11px;
  color: rgba(26, 36, 56, 0.28);
}

.home-hub-tool--featured-wrong .home-hub-tool__chevron {
  color: rgba(200, 80, 50, 0.35);
}

.home-hub-tool--featured-grade .home-hub-tool__chevron {
  color: rgba(91, 122, 232, 0.4);
}

.home-hub-tool-grid--secondary .home-hub-tool__glyph {
  width: 44px;
  height: 44px;
}

.home-hub-tool__glyph {
  position: relative;
  width: 50px;
  height: 50px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  transition: transform 0.18s cubic-bezier(0.23, 1, 0.32, 1);
}

.home-hub-tool__glyph--notebook,
.home-hub-tool__glyph--wrongbook,
.home-hub-tool__glyph--grade,
.home-hub-tool__glyph--en,
.home-hub-tool__glyph--cn {
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.6) 0%, rgba(244, 245, 247, 0.35) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.85),
    0 4px 10px rgba(26, 36, 56, 0.08);
}

.home-hub-tool__glyph--wrongbook {
  background:
    linear-gradient(160deg, rgba(255, 236, 230, 0.95) 0%, rgba(255, 214, 200, 0.7) 100%);
}

.home-hub-tool__glyph--grade {
  background:
    linear-gradient(160deg, rgba(230, 236, 255, 0.95) 0%, rgba(200, 214, 250, 0.7) 100%);
}

.home-hub-tool--featured .home-hub-tool__glyph--wrongbook {
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.88) 0%, rgba(255, 228, 220, 0.75) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    0 4px 12px rgba(200, 80, 50, 0.16);
}

.home-hub-tool--featured .home-hub-tool__glyph--grade {
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.88) 0%, rgba(220, 230, 255, 0.75) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    0 4px 12px rgba(91, 122, 232, 0.18);
}

.home-hub-tool__paper {
  width: 26px;
  height: 30px;
  border-radius: 2px;
  background: linear-gradient(180deg, #fff 0%, #eef2f8 100%);
  box-shadow: 0 1px 0 rgba(91, 122, 232, 0.1), 1px 2px 0 rgba(91, 122, 232, 0.06);
}

.home-hub-tool__glyph--wrongbook .home-hub-tool__paper {
  background: linear-gradient(180deg, #f4a494 0%, #e86b5b 100%);
  box-shadow:
    inset -2px 0 0 rgba(0, 0, 0, 0.12),
    0 2px 4px rgba(180, 60, 40, 0.22);
}

.home-hub-tool__camera {
  position: relative;
  width: 28px;
  height: 22px;
  display: block;
}

.home-hub-tool__camera-body {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 18px;
  border-radius: 5px;
  background: linear-gradient(180deg, #8aa0f0 0%, #5b7ae8 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.35),
    0 2px 4px rgba(60, 80, 180, 0.22);
}

.home-hub-tool__camera-body::before {
  content: "";
  position: absolute;
  left: 7px;
  top: -4px;
  width: 9px;
  height: 5px;
  border-radius: 2px 2px 0 0;
  background: linear-gradient(180deg, #7a92e8 0%, #5b7ae8 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.home-hub-tool__camera-lens {
  position: absolute;
  left: 50%;
  bottom: 4px;
  width: 10px;
  height: 10px;
  margin-left: -5px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 30%, #dfe6ff 0%, #8aa0f0 35%, #3d56b8 72%, #2a3f8a 100%);
  box-shadow:
    0 0 0 2px rgba(255, 255, 255, 0.35),
    inset 0 1px 1px rgba(255, 255, 255, 0.4);
}

.home-hub-tool__camera-flash {
  position: absolute;
  right: 5px;
  bottom: 12px;
  width: 4px;
  height: 3px;
  border-radius: 1px;
  background: rgba(255, 255, 255, 0.85);
  box-shadow: 0 0 3px rgba(255, 255, 255, 0.5);
}

.home-hub-tool__tick {
  position: absolute;
  right: 11px;
  bottom: 12px;
  width: 11px;
  height: 6px;
  border-left: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(-45deg);
  filter: drop-shadow(0 1px 0 rgba(0, 0, 0, 0.15));
}

.home-hub-tool__cross {
  position: absolute;
  right: 12px;
  bottom: 13px;
  width: 11px;
  height: 11px;
}

.home-hub-tool__cross::before,
.home-hub-tool__cross::after {
  content: "";
  position: absolute;
  left: 4px;
  top: 0;
  width: 2px;
  height: 11px;
  border-radius: 1px;
  background: #fff;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.12);
}

.home-hub-tool__cross::before {
  transform: rotate(45deg);
}

.home-hub-tool__cross::after {
  transform: rotate(-45deg);
}

.home-hub-tool__book {
  width: 26px;
  height: 30px;
  border-radius: 2px 3px 2px 1px;
  background: linear-gradient(160deg, #8fa3c4 0%, #5a7194 100%);
  box-shadow: -2px 0 0 rgba(0, 0, 0, 0.15) inset;
}

.home-hub-tool__glyph--notebook .home-hub-tool__book {
  background: linear-gradient(160deg, #7eb3a0 0%, #4a8a72 100%);
}

.home-hub-tool__lines {
  position: absolute;
  left: 16px;
  top: 14px;
  width: 12px;
  height: 12px;
  background:
    linear-gradient(#fff, #fff) 0 0 / 100% 1.5px no-repeat,
    linear-gradient(#fff, #fff) 0 5px / 100% 1.5px no-repeat,
    linear-gradient(#fff, #fff) 0 10px / 70% 1.5px no-repeat;
}

.home-hub-tool__glyph--cn .home-hub-tool__book {
  background: linear-gradient(160deg, #9a8fc4 0%, #6a6294 100%);
}

.home-hub-tool__letter {
  position: absolute;
  font-family: var(--home-serif);
  font-size: 14px;
  font-weight: 800;
  color: #fff;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);
  line-height: 1;
}

.home-hub-tool__label {
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 0.01em;
  color: var(--home-ink);
  line-height: 1.2;
  white-space: nowrap;
}

.home-hub-poster__close:focus-visible,
.home-hub-tool:focus-visible,
.home-subject-book:focus-visible,
.home-hub-child-switcher:focus-visible,
.home-hub-scan-btn:focus-visible,
.home-hub-local__city-btn:focus-visible,
.home-lib-cover:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px rgba(91, 122, 232, 0.32);
}

.home-lib-label:focus-visible {
  outline: none;
}

/* —— 切换城市 Sheet —— */
.child-switch-sheet.home-city-sheet {
  display: flex;
  flex-direction: column;
  height: 78%;
  max-height: 78%;
  padding: 8px 16px 0;
  overflow: hidden;
  border-radius: 16px 16px 0 0;
  background: #ffffff;
  box-shadow: 0 -8px 28px rgba(26, 36, 56, 0.12);
}

.child-switch-sheet.home-city-sheet[hidden] {
  display: flex !important;
  visibility: hidden;
  pointer-events: none;
}

.child-switch-sheet.home-city-sheet.is-show,
.child-switch-sheet.home-city-sheet.is-show[hidden] {
  display: flex !important;
  visibility: visible;
  pointer-events: auto;
}

.home-city-sheet .child-switch-sheet__handle {
  width: 36px;
  height: 4px;
  margin: 4px auto 12px;
  background: #d8dce6;
  box-shadow: none;
}

.home-city-sheet .child-switch-sheet__title {
  margin: 0 0 12px;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0;
  color: var(--text-primary, #1a2438);
  text-shadow: none;
}

.home-city-sheet__search {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  margin: 0 0 14px;
  padding: 0 12px;
  height: 40px;
  border-radius: 10px;
  border: none;
  background: rgba(26, 36, 56, 0.05);
  box-shadow: none;
  color: rgba(26, 36, 56, 0.38);
}

.home-city-sheet__search i {
  flex: 0 0 auto;
  font-size: 13px;
}

.home-city-sheet__input {
  flex: 1 1 auto;
  min-width: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  appearance: none;
  -webkit-appearance: none;
  font-family: inherit;
  font-size: 15px;
  line-height: 1.3;
  color: var(--text-primary, #1a2438);
  outline: none;
}

.home-city-sheet__input::-webkit-search-decoration,
.home-city-sheet__input::-webkit-search-cancel-button,
.home-city-sheet__input::-webkit-search-results-button,
.home-city-sheet__input::-webkit-search-results-decoration {
  -webkit-appearance: none;
  appearance: none;
}

.home-city-sheet__input::placeholder {
  color: rgba(26, 36, 56, 0.35);
}

.home-city-sheet__body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 0 0 calc(16px + env(safe-area-inset-bottom, 0px));
  mask-image: none;
  -webkit-mask-image: none;
}

.home-city-sheet__group-title {
  margin: 2px 2px 10px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: rgba(26, 36, 56, 0.42);
}

.home-city-sheet__hot {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 18px;
  padding: 0;
  border: none;
  border-radius: 0;
  background: none;
  box-shadow: none;
}

.home-city-sheet__province {
  margin: 0 0 18px;
  padding: 0;
  border: none;
  border-radius: 0;
  background: none;
  box-shadow: none;
}

.home-city-sheet__province:last-child {
  margin-bottom: 4px;
}

.home-city-sheet__province .home-city-sheet__group-title {
  position: static;
  margin: 0 0 8px;
  padding: 0;
  background: transparent;
}

.home-city-sheet__chip,
.home-city-sheet__item {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-width: 64px;
  height: 34px;
  padding: 0 10px;
  border: 1px solid rgba(26, 36, 56, 0.08);
  border-radius: 8px;
  background: #fff;
  box-shadow: none;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  color: #1a2438;
  text-align: center;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.home-city-sheet__item {
  width: 100%;
  min-width: 0;
  padding: 0 8px;
}

.home-city-sheet__chip.is-active,
.home-city-sheet__item.is-active {
  border-color: rgba(91, 122, 232, 0.35);
  background: rgba(91, 122, 232, 0.1);
  color: #4560c0;
  box-shadow: none;
}

.home-city-sheet__chip:active,
.home-city-sheet__item:active {
  transform: none;
  background: rgba(91, 122, 232, 0.08);
  box-shadow: none;
}

.home-city-sheet__list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.home-city-sheet__list > li {
  flex: 0 0 calc((100% - 16px) / 3);
  max-width: calc((100% - 16px) / 3);
}

.home-city-sheet__item-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-city-sheet__item i,
.home-city-sheet__item.is-active i {
  display: none;
}

.home-city-sheet__empty {
  margin: 28px 8px;
  font-size: 14px;
  color: rgba(26, 36, 56, 0.42);
  text-align: center;
  list-style: none;
}

#citySwitchBackdrop.is-show {
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
