/* 天智有声绘本馆首页样式
   build: 20260630-fixes-v2
   作用范围：仅 /books/index.html。
   不影响 /books/bookN/style.css。
   本版重点：学前馆/综合馆分区、标题渐变动画、手机端导航不溢出。
*/
:root {
  --page-bg-1: #fff8d7;
  --page-bg-2: #e9f8ed;
  --teal: #2aa99a;
  --text: #6c603c;
  --warm: #ffa42f;
  --card-shadow: rgba(68, 82, 52, .16);
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 18% 12%, rgba(255, 232, 141, .36), transparent 34%),
    radial-gradient(circle at 78% 8%, rgba(190, 244, 220, .55), transparent 38%),
    linear-gradient(135deg, var(--page-bg-1), var(--page-bg-2));
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}
a { color: inherit; text-decoration: none; }

.share-thumb-probe {
  position: absolute;
  left: -9999px;
  top: -9999px;
  width: 1px;
  height: 1px;
  opacity: .01;
  pointer-events: none;
}

.site-header {
  width: 100%;
  padding: max(12px, env(safe-area-inset-top)) 10px 6px;
  overflow: hidden;
}
.top-nav {
  width: min(760px, calc(100vw - 20px));
  max-width: 100%;
  margin: 0 auto;
  min-height: 48px;
  padding: 7px 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(2px, 1.5vw, 18px);
  border-radius: 999px;
  background: rgba(255, 255, 250, .88);
  box-shadow: 0 10px 24px rgba(109, 108, 72, .12);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.top-nav a {
  flex: 0 1 auto;
  min-width: 0;
  font-weight: 800;
  font-size: clamp(14px, 3.25vw, 18px);
  color: #4f5146;
  padding: 7px clamp(5px, 1.6vw, 10px);
  border-radius: 999px;
  white-space: nowrap;
  line-height: 1.15;
}
.top-nav a.active {
  color: #fff;
  background: linear-gradient(180deg, #ffbc4a, #ff9d28);
  box-shadow: 0 6px 14px rgba(255, 161, 42, .32);
}

.library-page {
  width: min(980px, 100%);
  margin: 0 auto;
  padding: 14px 20px 46px;
}
.hero { margin-top: 18px; }
.eyebrow {
  font-size: clamp(13px, 3vw, 22px);
  letter-spacing: .30em;
  font-weight: 750;
  color: #a27737;
  margin: 0 0 6px;
}
.hero h1 {
  margin: 0 0 12px;
  font-size: clamp(34px, 9.35vw, 66px);
  line-height: 1.06;
  letter-spacing: .01em;
  color: var(--teal);
  white-space: nowrap;
  background-image: linear-gradient(90deg, #ff8a2b 0%, #ffcc4a 22%, #3abf9f 48%, #5fb7ff 72%, #ff8a2b 100%);
  background-size: 220% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 4px 0 rgba(255,255,255,.32), 0 14px 28px rgba(107, 129, 79, .14);
  animation: tianzhiTitleFlow 7.5s ease-in-out infinite;
}
.hero h1::after {
  content: "";
  display: block;
  width: min(220px, 52vw);
  height: 7px;
  margin-top: 10px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(255, 174, 54, .85), rgba(66, 193, 166, .7), rgba(95, 183, 255, .65));
  box-shadow: 0 8px 20px rgba(255, 174, 54, .22);
  animation: tianzhiUnderlinePulse 3.8s ease-in-out infinite;
}
@keyframes tianzhiTitleFlow {
  0%, 100% { background-position: 0% center; transform: translateY(0); }
  50% { background-position: 100% center; transform: translateY(-1px); }
}
@keyframes tianzhiUnderlinePulse {
  0%, 100% { transform: scaleX(.92); opacity: .75; transform-origin: left center; }
  50% { transform: scaleX(1); opacity: 1; transform-origin: left center; }
}
.hero p {
  margin: 0;
  font-size: clamp(15px, 3.65vw, 24px);
  line-height: 1.62;
  font-weight: 750;
  color: #756844;
  letter-spacing: .01em;
}
.books-sections {
  margin: 30px auto 0;
  display: grid;
  gap: clamp(24px, 5vw, 44px);
}
.books-zone {
  position: relative;
}
.books-zone-header {
  margin: 0 0 14px;
  padding: 15px 16px;
  border-radius: 24px;
  background: rgba(255, 255, 250, .58);
  box-shadow: 0 10px 24px rgba(109, 108, 72, .10);
  border: 1px solid rgba(255, 255, 255, .62);
}
.books-zone-header h2 {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: clamp(24px, 6.2vw, 38px);
  line-height: 1.1;
  font-weight: 950;
  color: #2f907e;
}
.books-zone-header h2::before {
  content: "";
  width: .72em;
  height: .72em;
  border-radius: 50%;
  background: linear-gradient(180deg, #ffd56c, #ff9e2a);
  box-shadow: 0 5px 14px rgba(255, 158, 42, .28);
}
.books-zone-header p {
  margin: 8px 0 0;
  font-size: clamp(14px, 3.25vw, 18px);
  line-height: 1.55;
  font-weight: 720;
  color: #756844;
}
.books-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(14px, 3.8vw, 28px);
}
.tz-book-card {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  border-radius: clamp(16px, 4vw, 24px);
  overflow: hidden;
  background: linear-gradient(135deg, #fff8df, #eaf8f1);
  box-shadow: 0 12px 24px var(--card-shadow);
  transform: translateZ(0);
  -webkit-tap-highlight-color: transparent;
}
.tz-book-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
  -webkit-user-drag: none;
}
.tz-book-card:active { transform: scale(.985); }
.tz-book-card:hover .tz-book-number {
  transform: translate(-50%, -50%) scale(1.04);
}
.tz-book-number {
  position: absolute;
  left: 50%;
  top: 50%;
  width: clamp(50px, 13vw, 82px);
  height: clamp(50px, 13vw, 82px);
  transform: translate(-50%, -50%);
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: clamp(24px, 6.6vw, 40px);
  font-weight: 900;
  background: linear-gradient(180deg, #ffc653, #ff9d23);
  border: clamp(5px, 1.5vw, 10px) solid rgba(255, 244, 203, .78);
  box-shadow: 0 8px 22px rgba(89, 67, 31, .22);
  text-shadow: 0 1px 2px rgba(0,0,0,.16);
  transition: transform .18s ease;
}
.tz-book-number.long {
  font-size: clamp(19px, 5.4vw, 32px);
  letter-spacing: -0.04em;
}
.books-section-empty {
  margin: 12px 0 0;
  padding: 18px 16px;
  border-radius: 20px;
  font-size: clamp(14px, 3.3vw, 18px);
  line-height: 1.55;
  font-weight: 750;
  color: #846f3c;
  background: rgba(255, 248, 224, .68);
  border: 1px dashed rgba(255, 171, 56, .45);
}
.books-section-empty[hidden] { display: none; }
.books-status {
  display: none;
  margin: 22px auto;
  text-align: center;
  font-size: 15px;
  color: #806f47;
}
.books-status.show { display: block; }

@media (min-width: 900px) {
  .books-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 430px) {
  .site-header { padding-left: 8px; padding-right: 8px; }
  .top-nav {
    width: calc(100vw - 16px);
    min-height: 46px;
    padding: 6px 7px;
    gap: 2px;
  }
  .top-nav a {
    font-size: clamp(13px, 3.05vw, 15px);
    padding-left: 5px;
    padding-right: 5px;
  }
  .library-page { padding-left: 18px; padding-right: 18px; }
  .hero h1 { font-size: clamp(32px, 8.9vw, 39px); }
  .hero p { font-size: clamp(15px, 3.45vw, 17px); line-height: 1.58; }
  .eyebrow { font-size: clamp(12px, 2.85vw, 14px); letter-spacing: .28em; }
  .books-zone-header { padding: 13px 14px; border-radius: 20px; }
}
@media (max-width: 360px) {
  .site-header { padding-left: 6px; padding-right: 6px; }
  .top-nav { width: calc(100vw - 12px); padding-left: 5px; padding-right: 5px; }
  .top-nav a { font-size: 12.5px; padding-left: 4px; padding-right: 4px; }
  .hero h1 { font-size: 31px; }
  .hero p { font-size: 14.5px; }
  .library-page { padding-left: 14px; padding-right: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  .hero h1,
  .hero h1::after {
    animation: none;
  }
}

/* build: 20260630-fixes-v2 */
.books-section-empty:empty{display:none!important;}
.books-footer{margin:36px auto 0;padding:18px 6px 24px;text-align:center;color:#6b7a6d;font-weight:850;font-size:clamp(13px,3.2vw,18px);line-height:1.7;white-space:nowrap}.books-footer a{color:#507a68;border-bottom:1px solid rgba(80,122,104,.38)}
@media(max-width:430px){.books-footer{font-size:clamp(12px,3.2vw,14px);padding-left:2px;padding-right:2px}.books-sections{margin-top:22px}.books-zone-header{margin-bottom:12px}}
