/* ===== 基础重置与变量 ===== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary-blue: #1a7af8;
  --dark-blue: #0d6efd;
  --light-blue: #4a9aff;
  --sky-blue: #e6f2ff;
  --accent-yellow: #ffcc00;
  --accent-orange: #ff7a00;
  --accent-red: #ff4d4f;
  --text-dark: #333333;
  --text-gray: #666666;
  --bg-white: #ffffff;
  --header-height: 60px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

html, body {
  height: 100%;
  width: 100%;
  overflow-x: visible; /* allow decorative elements to overflow horizontally */
  overflow-y: hidden;  /* keep vertical paging behavior */
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", sans-serif;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

body {
  background: #f0f2f5;
  position: relative;
}

/* ===== 顶部公共头部 ===== */
.app-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  padding: 0 16px;
}

.header-logo {
  max-height: 44px;
  width: auto;
  object-fit: contain;
}

/* ===== 页面容器与滑动 ===== */
.pages {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  will-change: transform;
}

.page {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  padding-top: var(--header-height);
  -webkit-overflow-scrolling: touch;
}

/* ===== 公共上滑提示 ===== */
.swipe-hint {
  position: absolute;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  color: #ffffff;
  font-size: 14px;
  z-index: 10;
  pointer-events: auto;
  cursor: pointer;
}

.swipe-hint.dark {
  color: var(--primary-blue);
}

.swipe-hint.blue {
  background: var(--primary-blue);
  border-radius: 20px;
  padding: 6px 18px;
  flex-direction: row;
  gap: 8px;
  color: #fff;
  bottom: 20px;
  animation: none;
  box-shadow: 0 4px 12px rgba(26, 122, 248, 0.3);
}

.swipe-hint > span {
  line-height: 1.4;
}

.swipe-arrow {
  margin-top: 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  animation: floatArrow 2s ease-in-out infinite;
}

.swipe-arrow span {
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid currentColor;
  opacity: 0.8;
}

@keyframes floatArrow {
  0%, 100% { transform: translateY(0); opacity: 1; }
  50% { transform: translateY(-6px); opacity: 0.7; }
}

/* ===== 页码指示器 ===== */
.page-indicator {
  position: fixed;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 100;
}

.page-indicator .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  transition: all 0.3s ease;
}

.page-indicator .dot.active {
  background: #ffffff;
  height: 18px;
  border-radius: 3px;
}

/* ===== 音乐按钮 ===== */
.music-toggle {
  position: fixed;
  top: calc(var(--header-height) + 12px);
  right: 12px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  border: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  cursor: pointer;
  color: var(--primary-blue);
  font-size: 18px;
}

.music-toggle.playing {
  animation: spin 3s linear infinite;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* ===== 1. 查询页面 ===== */
.page-login {
  background: linear-gradient(180deg, #e6f4ff 0%, #ffffff 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.login-card {
  width: 100%;
  max-width: 390px;
  background: #ffffff;
  border-radius: 24px;
  padding: 31px 24px;
  box-shadow: 0 12px 40px rgba(26, 122, 248, 0.15);
  text-align: center;
}

.login-logo img {
  width: 90px;
  height: 90px;
  object-fit: contain;
  margin-bottom: 16px;
}

.login-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 6px;
  line-height: 1.4;
}

.login-campus {
  display: block;
  font-size: 18px;
  font-weight: 600;
  margin-top: 2px;
}

.login-subtitle {
  font-size: 14px;
  color: var(--text-gray);
  margin-bottom: 28px;
}

.login-form {
  text-align: left;
}

.form-group {
  margin-bottom: 18px;
}

.form-group label {
  display: block;
  font-size: 14px;
  color: var(--text-dark);
  margin-bottom: 6px;
  font-weight: 500;
}

.form-group input {
  width: 100%;
  height: 46px;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  padding: 0 14px;
  font-size: 15px;
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
}

.form-group input:focus {
  border-color: var(--primary-blue);
  box-shadow: 0 0 0 3px rgba(26, 122, 248, 0.1);
}

.btn-query {
  width: 100%;
  height: 48px;
  margin-top: 8px;
  border: none;
  border-radius: 12px;
  background: linear-gradient(90deg, var(--primary-blue), var(--light-blue));
  color: #ffffff;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.1s, box-shadow 0.2s;
  box-shadow: 0 4px 12px rgba(26, 122, 248, 0.3);
}

.btn-query:active {
  transform: scale(0.98);
}

.login-tip {
  margin-top: 18px;
  font-size: 12px;
  color: #999999;
}

/* ===== 2. 入学通知书页面 ===== */
.page-notice {
  background: linear-gradient(180deg, #1a8cff 0%, #0d6efd 100%);
  color: #ffffff;
  padding: var(--header-height) 24px 0;
}

.page-notice::before {
  content: '';
  position: absolute;
  top: 70px;
  right: -30px;
  width: 120px;
  height: 120px;
  border: 8px solid rgba(255, 255, 255, 0.25);
  border-radius: 50%;
  z-index: 1;
}

.page-notice::after {
  content: '';
  position: absolute;
  top: 110px;
  right: 30px;
  width: 50px;
  height: 50px;
  border: 4px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  z-index: 1;
}

.notice-content {
  position: relative;
  z-index: 2;
  padding-top: 10px;
  padding-right: 15px;
  padding-bottom: 100px;
}

.notice-year {
  text-align: right;
  font-size: 24px;
  font-weight: 500;
  margin-bottom: 5px;
  padding-right: 12px;
  letter-spacing: 2px;
}

.notice-school {
  font-size: 18px;
  font-weight: 500;
  margin-bottom: 8px;
  letter-spacing: 1px;
}

.notice-title {
  font-size: 40px;
  font-weight: 700;
  letter-spacing: 4px;
  margin-bottom: 5px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.notice-yellow-bar {
  width: 140px;
  height: 10px;
  background: var(--accent-yellow);
  border-radius: 5px;
  margin-bottom: 5px;
}

.notice-list {
  list-style: none;
  font-size: 16px;
  line-height: 2.3;
}

.notice-list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.notice-list .dot {
  width: 0;
  height: 0;
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
  border-left: 8px solid var(--accent-yellow);
  margin-top: 12px;
  flex-shrink: 0;
}

.notice-list strong {
  font-weight: 500;
  flex-shrink: 0;
}

/* 左下角植物装饰 */
.notice-decoration {
  position: absolute;
  bottom: 130px;
  left: 10px;
  width: 130px;
  height: 170px;
  opacity: 0.18;
  z-index: 1;
  background: 
    radial-gradient(ellipse 30% 70% at 25% 30%, rgba(255,255,255,0.9) 0%, transparent 50%),
    radial-gradient(ellipse 30% 70% at 75% 30%, rgba(255,255,255,0.9) 0%, transparent 50%),
    radial-gradient(ellipse 40% 80% at 50% 70%, rgba(255,255,255,0.9) 0%, transparent 50%);
  clip-path: polygon(20% 0%, 80% 0%, 100% 100%, 0% 100%);
  border-radius: 50% 50% 0 0;
}

/* 底部黄色平台（由插画自带平台替代） */
.notice-platform {
  display: none;
}

.notice-kids {
  position: absolute;
  bottom: 0;
  right: 2px; /* keep visible on phones without relying on overflow */
  left: 168px;
  width: 260px;
  height: auto;
  z-index: 3;
  pointer-events: none;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.12));
}

.notice .swipe-hint {
  bottom: 14px;
  right: 24px;
  left: auto;
  transform: none;
  color: var(--text-dark);
  z-index: 4;
  text-align: center;
}

/* ===== 3. 学校简介页面 ===== */
.page-intro {
  background: #ffffff;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.intro-header {
  position: relative;
  width: 100%;
  height: 28%;
  flex-shrink: 0;
  overflow: hidden;
}

.intro-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
}

.intro-wave {
  position: absolute;
  left: 0;
  width: 100%;
  background-size: 100% 100%;
  z-index: 2;
}

.intro-body {
  flex: 1;
  padding: 16px 22px 80px;
  overflow-y: auto;
}

.intro-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 4px;
}

.intro-en {
  font-size: 12px;
  color: #999999;
  margin-bottom: 14px;
  font-family: Arial, sans-serif;
}

.intro-text {
  font-size: 15px;
  line-height: 1.8;
  color: var(--text-dark);
  text-align: justify;
}

.intro-text p {
  margin-bottom: 12px;
  text-indent: 2em;
}

.intro-text strong {
  color: var(--primary-blue);
  font-weight: 600;
}

.page-intro .swipe-hint.dark {
  bottom: 16px;
}

/* ===== 4. 校长寄语页面 ===== */
.page-message {
  background: linear-gradient(180deg, #b8daff 0%, #e6f2ff 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--header-height) 24px 0;
  overflow: hidden;
}

.message-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: 1;
}

.cloud {
  position: absolute;
  background: rgba(255, 255, 255, 0.55);
  border-radius: 50px;
}

.cloud::before,
.cloud::after {
  content: '';
  position: absolute;
  background: rgba(255, 255, 255, 0.55);
  border-radius: 50%;
}

.cloud-1 {
  width: 120px;
  height: 40px;
  top: 80px;
  left: -20px;
  animation: cloudMove 8s ease-in-out infinite alternate;
}

.cloud-1::before {
  width: 60px;
  height: 60px;
  top: -30px;
  left: 20px;
}

.cloud-1::after {
  width: 50px;
  height: 50px;
  top: -25px;
  right: 15px;
}

.cloud-2 {
  width: 100px;
  height: 35px;
  top: 150px;
  right: -10px;
  animation: cloudMove 10s ease-in-out infinite alternate-reverse;
}

.cloud-2::before {
  width: 50px;
  height: 50px;
  top: -25px;
  left: 15px;
}

.cloud-2::after {
  width: 40px;
  height: 40px;
  top: -20px;
  right: 10px;
}

@keyframes cloudMove {
  from { transform: translateX(0); }
  to { transform: translateX(20px); }
}

.message-paper {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 460px;
  max-height: 530px;
  height: 500px;
  background: linear-gradient(180deg, #fffdf5 0%, #fff8e6 100%);
  border-radius: 14px 14px 0 0;
  padding: 36px 28px 120px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
  margin-bottom: 10px;
}

.paper-corner {
  position: absolute;
  top: -1px;
  right: -1px;
  width: 58px;
  height: 58px;
  background: linear-gradient(135deg, transparent 45%, #e8e0d0 48%, #d4c8b6 100%);
  border-radius: 0 0 0 14px;
  box-shadow: -3px 3px 6px rgba(0, 0, 0, 0.1);
}

.message-title {
  font-size: 36px;
  font-weight: 700;
  color: var(--primary-blue);
  text-align: center;
  margin-bottom: 28px;
  letter-spacing: 4px;
}

.message-body {
  font-size: 16px;
  line-height: 1.9;
  color: var(--text-dark);
  text-align: justify;
  margin-bottom: 36px;
}

.message-body p {
  text-indent: 2em;
  margin-bottom: 12px;
}

.message-sign {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  font-size: 16px;
  color: var(--text-dark);
}

.signature-img {
  height: 48px;
  width: auto;
  vertical-align: middle;
  object-fit: contain;
}

/* 信封主体：背板 + 侧边折角 */
.message-envelope {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  width: 420px;
  height: 210px;
  z-index: 1;
  pointer-events: none;
  filter: drop-shadow(0 6px 18px rgba(0, 0, 0, 0.1));
}

.envelope-body {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, #f9c0a0 0%, #f7b08c 100%);
  border-radius: 0 0 14px 14px;
  box-shadow: inset 0 2px 8px rgba(255, 255, 255, 0.2);
}

.envelope-side {
  position: absolute;
  top: 0;
  width: 50%;
  height: 100%;
  overflow: hidden;
}

.envelope-left {
  left: 0;
  background: linear-gradient(135deg, #e88b52 0%, #e07a45 100%);
  clip-path: polygon(0 0, 0 100%, 100% calc(100% - 110px));
  border-radius: 0 0 0 14px;
}

.envelope-right {
  right: 0;
  background: linear-gradient(225deg, #e88b52 0%, #e07a45 100%);
  clip-path: polygon(0 calc(100% - 110px), 100% 0, 100% 100%);
  border-radius: 0 0 14px 0;
}

/* 侧边折角斜纹装饰 */
.envelope-side::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: repeating-linear-gradient(
    -45deg,
    transparent 0,
    transparent 12px,
    rgba(255, 255, 255, 0.15) 12px,
    rgba(255, 255, 255, 0.15) 18px
  );
  pointer-events: none;
}

/* 信封底部三角翻盖，位于信纸之上 */
.message-envelope-bottom {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  width: 420px;
  height: 110px;
  z-index: 3;
  pointer-events: none;
  filter: drop-shadow(0 -2px 6px rgba(0, 0, 0, 0.06));
}

.envelope-bottom {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, #f5c8a8 0%, #f0b895 100%);
  clip-path: polygon(0 0, 50% 100%, 100% 0);
  border-radius: 0 0 14px 14px;
}

.envelope-bottom::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 2px;
  height: 100%;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.08) 100%);
}

/* 信封两侧装饰植物 */
.envelope-left::after,
.envelope-right::after {
  content: '';
  position: absolute;
  bottom: 10px;
  width: 24px;
  height: 50px;
  background: linear-gradient(180deg, #8fd65b 0%, #6ab04c 100%);
  border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
  opacity: 0.35;
}

.envelope-left::after {
  left: 12px;
  transform: rotate(-25deg);
}

.envelope-right::after {
  right: 12px;
  transform: rotate(25deg);
}

/* ===== 5. 录取通知书页面 ===== */
.page-letter {
  background: linear-gradient(180deg, #a8d8ff 0%, #e6f4ff 32%, #ffffff 52%, #fff3e0 66%, #ff9800 88%, #ff7a00 100%);
  display: flex;
  flex-direction: column;
  padding: var(--header-height) 0 0;
  overflow: visible; /* allow decorative elements to extend beyond page edges on some devices */
  position: relative;
}

.letter-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

/* 蓝天白云 */
.letter-bg .cloud {
  position: absolute;
  background: #fff;
  border-radius: 50%;
  opacity: 0.92;
}

.cloud-1 {
  width: 130px;
  height: 55px;
  top: 70px;
  left: -20px;
}

.cloud-1::before,
.cloud-1::after {
  content: '';
  position: absolute;
  background: #fff;
  border-radius: 50%;
}

.cloud-1::before { width: 70px; height: 70px; top: -32px; left: 22px; }
.cloud-1::after { width: 55px; height: 55px; top: -24px; right: 18px; }

.cloud-2 {
  width: 110px;
  height: 48px;
  top: 130px;
  right: -5px;
}

.cloud-2::before,
.cloud-2::after {
  content: '';
  position: absolute;
  background: #fff;
  border-radius: 50%;
}

.cloud-2::before { width: 60px; height: 60px; top: -28px; left: 18px; }
.cloud-2::after { width: 48px; height: 48px; top: -22px; right: 12px; }

.cloud-3 {
  width: 90px;
  height: 40px;
  top: 44px;
  left: 50%;
  transform: translateX(-20%);
  opacity: 0.7;
}

.cloud-3::before,
.cloud-3::after {
  content: '';
  position: absolute;
  background: #fff;
  border-radius: 50%;
}

.cloud-3::before { width: 50px; height: 50px; top: -24px; left: 14px; }
.cloud-3::after { width: 40px; height: 40px; top: -18px; right: 10px; }

/* 底部橙色波浪/山丘 */
.letter-bottom-wave {
  position: absolute;
  bottom: 0;
  left: -10%;
  width: 120%;
  height: 42%;
  background: linear-gradient(180deg, rgba(255,152,0,0) 0%, rgba(255,152,0,0.85) 25%, #ff9800 55%, #ff7a00 100%);
  border-radius: 50% 50% 0 0 / 70% 70% 0 0;
  z-index: 0;
}

.letter-book {
  position: absolute;
  width: 68px;
  height: auto;
  z-index: 1;
  pointer-events: none;
  margin-top: 10px;
  filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.1));
}

.letter-book.left {
  top: 60px;
  left: 28px;
  transform: rotate(-4deg);
}

.letter-book.right {
  top: 60px;
  right: 28px;
  transform: rotate(4deg);
}

.letter-content {
  position: relative;
  z-index: 2;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 1px 0 1px;
}

.letter-header {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 0;
  margin-bottom: 1px;
  padding-top: 2px;
  position: relative;
  z-index: 2;
  height: 86px;
  transform-origin: center bottom;
}

/* 小屏幕下等比缩放 banner，防止两侧小人被截断 */
@media (max-width: 430px) {
  .letter-header {
    /* Removed transform: scale(calc(100vw / 430));
       calc(100vw / 430) produces a length value (vw) which is not a unitless <number> required by
       transform: scale(). Some linters and browsers may treat this as an invalid value.
       Instead, disable the explicit scaling and use responsive padding to avoid clipping on
       very narrow screens. If a dynamic scale is required, compute a unitless scale in JS
       and set it via a CSS variable. */
    transform: none;
    padding: 2px 10px 0;
  }
}

/* 限制横幅最大宽度并在两侧添加内边距，确保两侧装饰图不会触及屏幕边缘 */
.letter-header {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 0;
  margin: 0 auto 1px;
  padding: 2px 16px 0;
  position: relative;
  z-index: 2;
  height: 86px;
  transform-origin: center bottom;
  max-width: 420px;
  box-sizing: border-box;
}

/* 在极窄屏幕上减小两侧人物宽度，防止被缩放后仍然触边 */
@media (max-width: 380px) {
  .banner-left, .banner-right { width: 68px; }
  .banner-scroll { min-width: 160px; }
}

.banner-left,
.banner-right {
  position: relative;
  flex-shrink: 0;
  width: 84px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

/* 横幅两侧卷轴杆 */
.banner-roll {
  position: absolute;
  bottom: 8px;
  width: 12px;
  height: 54px;
  background: linear-gradient(180deg, #ff7a00 0%, #ff4d4f 100%);
  border-radius: 2px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
  z-index: 1;
}

.banner-left .banner-roll { right: 0; }
.banner-right .banner-roll { left: 0; }

.banner-kid {
  width: 100%;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
  position: relative;
  z-index: 2;
}

.banner-center {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  margin-bottom: 8px;
  z-index: 2;
}

.banner-scroll {
  min-width: 160px;
  height: 54px;
  line-height: 50px;
  background: #ffffff;
  border: 2px solid #ff4d4f;
  border-radius: 8px;
  text-align: center;
  color: #ff4d4f;
  font-size: 19px;
  font-weight: 600;
  white-space: nowrap;
  padding: 0 5px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.letter-title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 30px;
  margin-top: 5px;
  position: relative;
  z-index: 2;
}

.title-text {
  font-size: 30px;
  font-weight: 700;
  color: #ff4d4f;
  letter-spacing: 4px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.title-line {
  width: 48px;
  height: 2px;
  background: #ff4d4f;
  position: relative;
}

.title-line::before,
.title-line::after {
  content: '';
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ff4d4f;
  top: 50%;
  transform: translateY(-50%);
}

.title-line::before { left: -4px; }
.title-line::after { right: -4px; }

.letter-card {
  background: #ffffff;
  border-radius: 12px;
  padding: 2px 14px 2px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
  margin-bottom: 1px;
  position: relative;
  overflow: visible;
}

/* 胶囊标题 */
.section-title {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1px;
  padding-top: 5px;
  padding-bottom: 5px;
  position: relative;
  z-index: 1;
}

.section-label {
  display: inline-block;
  border: 2px solid #ff4d4f;
  border-radius: 30px;
  padding: 2px 22px;
  background: #fff;
  font-size: 20px;
  font-weight: 600;
  color: #ff4d4f;
  letter-spacing: 1px;
}

.section-bracket {
  width: 12px;
  height: 30px;
  margin: 0 6px;
}

.section-bracket.left {
  border-left: 3px solid #ff4d4f;
  border-radius: 50% 0 0 50%;
}

.section-bracket.right {
  border-right: 3px solid #ff4d4f;
  border-radius: 0 50% 50% 0;
}

.letter-section {
  position: relative;
  z-index: 1;
  margin-bottom: 1px;
}

.letter-section:last-of-type {
  margin-bottom: 0;
}

.letter-to {
  font-size: 16px;
  color: var(--text-dark);
  margin-bottom: 10px;
}

.letter-text {
  font-size: 16px;
  line-height: 1.7;
  color: var(--text-dark);
  text-indent: 2em;
  margin-bottom: 6px;
  text-align: justify;
}

.letter-school,
.letter-date {
  text-align: right;
  font-size: 16px;
  color: var(--text-dark);
  margin-top: 4px;
}

.section-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 10px 0;
  position: relative;
  z-index: 1;
}

.divider-line {
  width: 80%;
  height: 2px;
  background: #ff4d4f;
}

.divider-square {
  width: 14px;
  height: 14px;
  border: 2px solid #ff4d4f;
  background: transparent;
  flex-shrink: 0;
}

/* 卡片底部橙色书本底座 */
.letter-card-bottom {
  position: absolute;
  /**bottom: -16px;**/
  left: 50%;
  transform: translateX(-50%);
  width: 95%;
  height: 36px;
  z-index: 0;
}

.letter-card-bottom::before,
.letter-card-bottom::after {
  content: '';
  position: absolute;
  bottom: 0;
  width: 48%;
  height: 100%;
  background: linear-gradient(180deg, #ffb347 0%, #ff9800 100%);
  border-radius: 0 0 18px 18px;
  box-shadow: 0 3px 8px rgba(0,0,0,0.08);
}

.letter-card-bottom::before {
  left: 2%;
  transform: skewY(3deg);
  border-radius: 0 0 4px 18px;
}

.letter-card-bottom::after {
  right: 2%;
  transform: skewY(-3deg);
  border-radius: 0 0 18px 4px;
}

.letter-actions {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 10px 24px calc(5px + var(--safe-bottom));
  display: flex;
  justify-content: center;
  z-index: 3;
  background: transparent;
}

.btn-export {
  width: 70%;
  max-width: 280px;
  height: 46px;
  border: none;
  border-radius: 23px;
  background: linear-gradient(90deg, #ff4d4f, #ff7a00);
  color: #ffffff;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(255, 77, 79, 0.3);
  transition: transform 0.1s;
}

.btn-export:active {
  transform: scale(0.98);
}

/* ===== 响应式适配 ===== */
@media (max-height: 700px) {
  .notice-title { font-size: 40px; }
  .notice-list { font-size: 16px; }
  .notice-kids { width: 240px; }
  .notice-content { padding-bottom: 140px; }
  .message-title { font-size: 40px; }
  .message-body { font-size: 20px; }
  .message-paper { padding: 28px 24px 105px; margin-bottom: 15px; }
  .message-envelope { width: 480px; height: 180px; bottom: 14px; }
  .message-envelope-bottom { width: 480px; height: 90px; bottom: 14px; }
  .envelope-left { clip-path: polygon(0 0, 0 100%, 100% calc(100% - 90px)); }
  .envelope-right { clip-path: polygon(0 calc(100% - 90px), 100% 0, 100% 100%); }
  .title-text { font-size: 40px; }
  .letter-card { padding: 1px 14px 2px; }
  .section-label { font-size: 18px; }
  .banner-left, .banner-right { width: 84px; }
  .banner-center { padding: 0; }
  .banner-scroll { font-size: 25px; min-width: 160px; height: 50px; line-height: 48px; }
  .banner-roll { width: 10px; height: 54px; border-radius: 2px; }
  .letter-book { width: 56px; }
  .letter-book.left { top: 60px; left: 22px; transform: rotate(-4deg); }
  .letter-book.right { top: 60px; right: 22px; transform: rotate(4deg); }
  .letter-content { padding: 70px 0 90px; }
  .title-line { width: 36px; }
  .letter-header { margin-bottom: 1px; }
  .letter-title { margin-bottom: 14px; }
}

@media (max-height: 600px) {
  .notice-title { font-size: 34px; }
  .notice-list { font-size: 16px; line-height: 2; }
  .notice-kids { width: 200px; }
  .notice-content { padding-bottom: 110px; }
  .intro-body { padding-top: 10px; }
  .intro-text { font-size: 14px; line-height: 1.6; }
  .message-paper { padding: 22px 18px 90px; margin-bottom: -75px; }
  .message-envelope { width: 310px; height: 155px; bottom: 12px; }
  .message-envelope-bottom { width: 310px; height: 75px; bottom: 12px; }
  .envelope-left { clip-path: polygon(0 0, 0 100%, 100% calc(100% - 75px)); }
  .envelope-right { clip-path: polygon(0 calc(100% - 75px), 100% 0, 100% 100%); }
  .banner-left, .banner-right { width: 76px; }
  .banner-center { padding: 0; }
  .banner-scroll { font-size: 13px; height: 32px; line-height: 30px; min-width: 160px; padding: 0 18px; }
  .banner-roll { width: 8px; height: 36px; border-radius: 2px; }
  .letter-book { width: 48px; }
  .letter-book.left { top: 60px; left: 18px; transform: rotate(-4deg); }
  .letter-book.right { top: 60px; right: 18px; transform: rotate(4deg); }
  .letter-content { padding: 64px 0 90px; }
  .letter-card { padding: 1px 12px 2px; }
  .letter-text { font-size: 14px; }
  .section-label { font-size: 16px; }
  .title-text { font-size: 24px; }
  .title-line { width: 28px; }
  .letter-header { margin-bottom: 1px; }
  .letter-title { margin-bottom: 12px; }
}

@media (min-width: 510px) {
  .pages {
    max-width: 510px;
    left: 50%;
    margin-left: -255px;
  }
  .app-header {
    max-width: 510px;
    left: 50%;
    margin-left: -255px;
  }
  .page-indicator,
  .music-toggle {
    right: calc(50% - 255px);
  }
}
