/* 格天学业规划 · 高考报名公告系统 顶级纯净排版 */
:root {
  --primary: #0A59F7;
  --primary-light: #F0F5FF;
  --text-title: #1A1A1A;
  --text-body: #333333;
  --text-secondary: #666666;
  --text-tertiary: #999999;
  --bg-page: #FFFFFF;
  --bg-subtle: #F6F7F9;
  --divider: #F0F2F5;
  --safe-bottom: env(safe-area-inset-bottom, 20px);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  background: var(--bg-page);
  color: var(--text-body);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
  padding-bottom: var(--safe-bottom);
  overflow-x: hidden;
}


/* -------------------------------------------
   一体化纯净顶栏系统（品牌+搜索+Tab自然衔接，零断层空隙）
------------------------------------------- */
.app-header-unified {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid #EEF0F3;
}

.header-main-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 680px;
  margin: 0 auto;
  height: 52px;
  padding: 0 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-avatar {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: block;
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-name {
  font-size: 15px;
  font-weight: 700;
  color: #1A1A1A;
  line-height: 1.2;
}

.brand-subtitle {
  font-size: 11px;
  color: #64748B;
}

.header-capsule {
  display: inline-flex;
  align-items: center;
  background: #EFF6FF;
  color: #0A59F7;
  text-decoration: none;
  font-size: 12px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 16px;
  transition: all 0.2s;
}
.header-capsule:active {
  transform: scale(0.95);
  background: #DBEAFE;
}

.search-row {
  max-width: 680px;
  margin: 0 auto;
  padding: 0 16px 8px;
}

.search-box {
  display: flex;
  align-items: center;
  background: #F1F3F5;
  border-radius: 20px;
  padding: 0 16px;
  height: 38px;
  transition: all 0.2s;
  border: 1px solid transparent;
}
.search-box:focus-within {
  background: #FFFFFF;
  border-color: #0A59F7;
  box-shadow: 0 0 0 3px rgba(10, 89, 247, 0.1);
}

.search-icon {
  width: 15px;
  height: 15px;
  color: #8C9CAE;
  margin-right: 10px;
  margin-left: 2px;
  flex-shrink: 0;
  display: block;
}

.search-box input {
  flex: 1;
  border: none;
  background: transparent;
  outline: none;
  font-size: 14px;
  color: #1A1A1A;
}

.search-clear-btn {
  background: none;
  border: none;
  color: #8C9CAE;
  font-size: 14px;
  padding: 6px;
  cursor: pointer;
}

/* 16地市Tab 横滑轨道与末端安全呼吸间距 */
.tabs-scroll {
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  position: relative;
  /* 左右边缘微渐变蒙版，横滑时自然隐显，绝不生硬截断 */
  mask-image: linear-gradient(to right, transparent, black 16px, black calc(100% - 24px), transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, black 16px, black calc(100% - 24px), transparent);
}
.tabs-scroll::-webkit-scrollbar { display: none; }

.tabs-track {
  display: flex;
  align-items: center;
  padding: 4px 16px 8px 16px;
  gap: 18px;
  white-space: nowrap;
}

/* 解决 Webkit flex 滚动容器在滑动到最末尾时 padding-right 丢失的经典贴边 bug */
.tabs-track::after {
  content: "";
  display: inline-block;
  flex: 0 0 32px;
  width: 32px;
  height: 1px;
}

.tab-chip:last-of-type {
  margin-right: 8px;
}

.tab-chip {
  background: none;
  border: none;
  font-size: 14px;
  color: var(--text-secondary);
  padding: 4px 0;
  cursor: pointer;
  position: relative;
  transition: all 0.2s;
}

.tab-chip.active {
  color: var(--primary);
  font-weight: 700;
}
.tab-chip.active::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 18px;
  height: 2.5px;
  background: var(--primary);
  border-radius: 2px;
}


/* 顶级大厂微质感卡片流系统 */
body {
  background: #F8F9FA !important;
}

.feed-wrapper {
  max-width: 680px;
  margin: 0 auto;
  padding: 14px 16px 40px;
}

/* 官方引流服务卡片微光质感 */
.service-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #FFFFFF;
  border-radius: 14px;
  padding: 14px 16px;
  margin-bottom: 14px;
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(10, 89, 247, 0.04), 0 1px 2px rgba(0, 0, 0, 0.02);
  border: 1px solid rgba(10, 89, 247, 0.08);
  transition: transform 0.15s, box-shadow 0.15s;
}
.service-banner:active {
  transform: scale(0.985);
  box-shadow: 0 1px 4px rgba(10, 89, 247, 0.04);
}

.service-title {
  font-size: 14px;
  font-weight: 700;
  color: #1A1A1A;
}

.service-sub {
  font-size: 12px;
  color: #718096;
  margin-top: 3px;
}
.service-sub strong {
  color: var(--primary);
  font-weight: 600;
}

.service-copy-tag {
  background: linear-gradient(135deg, #2563EB 0%, #0A59F7 100%);
  color: #FFFFFF;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  padding: 7px 15px;
  white-space: nowrap;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(10, 89, 247, 0.25);
}

/* 卡片流间距与圆角 */
.notice-feed {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* 独立微光卡片 */
.notice-item {
  background: #FFFFFF;
  border-radius: 16px;
  padding: 18px 20px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03), 0 1px 2px rgba(0, 0, 0, 0.02);
  border: 1px solid rgba(0, 0, 0, 0.03);
  transition: transform 0.15s, box-shadow 0.15s, background-color 0.15s;
  position: relative;
}
.notice-item:active {
  transform: scale(0.985);
  background-color: #F8FAFC;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
}

.item-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.item-unit-group {
  display: flex;
  align-items: center;
  gap: 6px;
}

.tag-city {
  font-size: 11px;
  font-weight: 700;
  color: #0A59F7;
  background: #EFF6FF;
  padding: 2px 7px;
  border-radius: 6px;
  letter-spacing: 0.2px;
}

.tag-unit {
  font-size: 12px;
  color: #64748B;
  font-weight: 500;
  max-width: 220px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.item-arrow {
  color: #CBD5E1;
  font-size: 16px;
  font-weight: 400;
  line-height: 1;
}

.item-title {
  font-size: 16px;
  font-weight: 700;
  color: #0F172A;
  line-height: 1.45;
  letter-spacing: -0.2px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.item-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: #94A3B8;
  padding-top: 4px;
  border-top: 1px dashed #F1F5F9;
}

.item-date {
  display: flex;
  align-items: center;
  gap: 4px;
}

.item-badge {
  color: #0D9488;
  background: #F0FDFA;
  border: 1px solid rgba(13, 148, 136, 0.15);
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 500;
}

/* 页脚 */
.app-footer {
  text-align: center;
  padding: 30px 16px;
  font-size: 12px;
  color: var(--text-tertiary);
}
.footer-brand {
  font-weight: 600;
  margin-bottom: 4px;
}

/* 阅读器抽屉 */
.reader-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: flex-end;
}
.reader-modal[hidden] { display: none !important; }

.reader-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(4px);
}

.reader-sheet {
  position: relative;
  width: 100%;
  max-width: 680px;
  margin: 0 auto;
  max-height: 90vh;
  background: #FFFFFF;
  border-radius: 20px 20px 0 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: sheetSlideUp 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  padding-bottom: var(--safe-bottom);
}

.sheet-drag-handle {
  padding: 10px 0 4px;
  display: flex;
  justify-content: center;
}
.handle-bar {
  width: 36px;
  height: 4px;
  background: #E0E0E0;
  border-radius: 2px;
}

.sheet-header {
  padding: 12px 20px 14px;
  border-bottom: 1px solid var(--divider);
  position: relative;
}

/* 关闭按钮右上角绝对定位，彻底避让文本 */
.sheet-close-action {
  position: absolute;
  top: 12px;
  right: 16px;
  background: #F2F4F7;
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  color: #555555;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

.sheet-meta-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  padding-right: 48px; /* 留出充足安全边距，绝不重叠！ */
  flex-wrap: wrap;
}

.badge-city {
  font-size: 11px;
  font-weight: 600;
  color: var(--primary);
  background: var(--primary-light);
  padding: 2px 6px;
  border-radius: 4px;
}
.badge-unit, .badge-date {
  font-size: 12px;
  color: var(--text-secondary);
}

.sheet-headline {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-title);
  line-height: 1.4;
  padding-right: 40px;
}

.sheet-scroll-body {
  padding: 20px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  flex: 1;
}

/* 严格隐藏规则：防止 CSS display 覆盖 HTML hidden */
[hidden], .attach-micro-card[hidden], .reader-modal[hidden] {
  display: none !important;
}

.attach-micro-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-subtle);
  padding: 12px 14px;
  border-radius: 8px;
  margin-bottom: 20px;
}
.attach-main {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  overflow: hidden;
}
.attach-filename {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.attach-btn {
  background: var(--primary);
  color: #fff;
  text-decoration: none;
  font-size: 12px;
  padding: 5px 12px;
  border-radius: 12px;
  flex-shrink: 0;
}

.document-article {
  font-size: 15px;
  color: #2D3748;
  line-height: 1.8;
  word-break: break-word;
}
.document-article p { margin-bottom: 14px; }
.document-article table {
  width: 100% !important;
  border-collapse: collapse;
  margin: 14px 0;
  font-size: 13px;
}
.document-article td, .document-article th {
  border: 1px solid #E2E8F0;
  padding: 8px;
}

.certificate-seal {
  margin-top: 36px;
  padding-top: 20px;
  border-top: 1px dashed var(--divider);
  text-align: center;
}
.seal-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-title);
}
.seal-sub {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 4px;
}
.source-link {
  display: inline-block;
  margin-top: 8px;
  color: var(--primary);
  font-size: 12px;
  text-decoration: none;
}

/* 全屏防盗清晰水印 */
.watermark-layer {
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  background-repeat: repeat;
}

/* 置顶 FAB */
.floating-fab {
  position: fixed;
  bottom: calc(var(--safe-bottom) + 16px);
  right: 16px;
  z-index: 95;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #FFFFFF;
  box-shadow: 0 4px 12px rgba(0,0,0,0.12);
  border: 1px solid var(--divider);
  color: var(--primary);
  font-size: 18px;
  cursor: pointer;
}

@keyframes sheetSlideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

/* -------------------------------------------
   公文级清爽通透排版系统 (解决堆叠不换行问题)
------------------------------------------- */
.document-article {
  font-size: 15px;
  color: #2D3748;
  line-height: 1.85;
  word-break: break-word;
  padding: 4px 0 20px;
}

/* 一级条目（一、二、三、） */
.doc-h4 {
  font-size: 16px;
  font-weight: 700;
  color: #1A1A1A;
  margin: 24px 0 10px;
  padding-left: 8px;
  border-left: 3px solid #0A59F7;
  line-height: 1.4;
}
.doc-h4:first-child {
  margin-top: 4px;
}

/* 二级条目（（一）（二）） */
.doc-h5 {
  font-size: 15px;
  font-weight: 600;
  color: #2D3748;
  margin: 16px 0 8px;
  line-height: 1.5;
}

/* 数字序号列表（1. 2. 3.）- 悬挂缩进，条理极度清晰 */
.doc-num-item {
  display: flex;
  align-items: flex-start;
  margin-bottom: 12px;
  line-height: 1.75;
}
.doc-num-idx {
  flex-shrink: 0;
  font-weight: 700;
  color: #0A59F7;
  min-width: 20px;
  margin-right: 4px;
}
.doc-num-text {
  flex: 1;
  color: #333333;
}

/* 子序号列表（(1) (2)） */
.doc-sub-item {
  margin: 6px 0 8px 14px;
  color: #4A5568;
  line-height: 1.7;
}

/* 常规段落 - 首行留白或呼吸间距 */
.doc-paragraph {
  margin-bottom: 14px;
  color: #333333;
  line-height: 1.8;
  text-align: justify;
}

/* 官方落款与日期 - 右对齐 */
.doc-seal-text {
  text-align: right;
  font-size: 14px;
  color: #718096;
  margin-top: 16px;
  line-height: 1.6;
}

/* 表格移动端自适应 */
.document-article table {
  width: 100% !important;
  border-collapse: collapse;
  margin: 16px 0;
  font-size: 13px;
}
.document-article td, .document-article th {
  border: 1px solid #E2E8F0;
  padding: 8px 10px;
}


/* -------------------------------------------
   PC 端宽屏大厂规整排版适配（消除乱感与局促感）
------------------------------------------- */
@media (min-width: 768px) {
  .header-main-row, .search-row, .feed-wrapper, .nav-container {
    max-width: 840px !important;
  }

  .app-header-unified {
    padding: 6px 0;
  }

  .header-main-row {
    height: 60px;
  }

  .brand-avatar {
    width: 38px;
    height: 38px;
  }

  .brand-name {
    font-size: 17px;
  }

  .search-row {
    padding-bottom: 12px;
  }

  .search-box {
    height: 44px;
    border-radius: 22px;
  }

  .search-box input {
    font-size: 15px;
  }

  .tabs-track {
    justify-content: center;
    gap: 24px;
  }

  .notice-feed {
    gap: 14px;
  }

  .notice-item {
    padding: 20px 24px;
    border-radius: 16px;
  }

  .item-title {
    font-size: 17px;
  }

  .reader-sheet {
    max-width: 720px;
    border-radius: 24px 24px 0 0;
  }
}
