/* ============================================
   津沽诡话 · 共享响应式框架
   移动端适配（≤768px）
   ============================================ */

/* --- 基础重置 --- */
@media screen and (max-width: 768px) {
  html, body {
    overflow-x: hidden !important;
    -webkit-text-size-adjust: 100% !important;
  }

  /* --- 顶部 Header --- */
  .header {
    padding: 8px 0 !important;
  }
  .header-inner {
    flex-wrap: wrap !important;
    padding: 0 12px !important;
    gap: 8px !important;
  }
  .logo-area {
    gap: 8px !important;
  }
  .logo-svg {
    width: 36px !important;
    height: 36px !important;
  }
  .site-name {
    font-size: 16px !important;
    letter-spacing: 1px !important;
  }
  .site-sub {
    font-size: 10px !important;
    display: none !important;
  }
  .header-search {
    display: none !important;
  }
  .header-right {
    font-size: 11px !important;
    gap: 8px !important;
    flex-wrap: wrap !important;
  }
  .header-right a {
    font-size: 11px !important;
  }
  .user-badge span {
    font-size: 11px !important;
  }

  /* --- 校园官网顶部栏 --- */
  .top-bar {
    padding: 4px 0 !important;
    font-size: 10px !important;
  }
  .top-bar-inner {
    padding: 0 12px !important;
    flex-wrap: wrap !important;
    gap: 4px !important;
  }
  .top-bar a {
    font-size: 10px !important;
    margin-left: 8px !important;
  }

  /* --- 导航栏（论坛）--- */
  .nav {
    position: sticky !important;
    top: 0 !important;
    z-index: 99 !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }
  .nav-inner {
    padding: 0 8px !important;
    flex-wrap: nowrap !important;
    justify-content: flex-start !important;
    min-width: max-content !important;
  }
  .nav a {
    padding: 10px 10px !important;
    font-size: 12px !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
  }
  .nav a.active {
    font-size: 12px !important;
  }

  /* --- 主布局：隐藏侧边栏，内容全宽 --- */
  .main {
    flex-direction: column !important;
    padding: 0 10px !important;
    margin: 12px auto !important;
    gap: 12px !important;
  }
  .sidebar-left,
  .sidebar-right,
  .sidebar {
    display: none !important;
  }
  .content {
    width: 100% !important;
    flex: none !important;
    min-width: 100% !important;
  }

  /* --- 帖子详情 --- */
  .post-detail,
  .post-header,
  .post-body {
    padding: 12px !important;
  }
  .post-header h1 {
    font-size: 17px !important;
  }
  .post-body {
    font-size: 13px !important;
    line-height: 1.8 !important;
  }
  .post-body p {
    text-indent: 1.5em !important;
    margin-bottom: 8px !important;
  }
  .post-body .list-item {
    font-size: 12px !important;
    padding: 6px 0 6px 10px !important;
  }
  .post-body .highlight {
    font-size: 12px !important;
    padding: 10px 12px !important;
  }
  .post-footer {
    font-size: 11px !important;
    gap: 10px !important;
    flex-wrap: wrap !important;
  }

  /* --- 评论区 --- */
  .comments {
    margin-top: 10px !important;
  }
  .comments-header {
    padding: 10px 12px !important;
    font-size: 13px !important;
  }
  .comment-item {
    padding: 10px 12px !important;
    gap: 8px !important;
  }
  .comment-item .comment-floor {
    width: 24px !important;
    font-size: 10px !important;
  }
  .comment-item .comment-ava {
    width: 28px !important;
    height: 28px !important;
    font-size: 12px !important;
  }
  .comment-item .comment-user {
    font-size: 12px !important;
  }
  .comment-item .comment-text {
    font-size: 13px !important;
    line-height: 1.7 !important;
  }
  .comment-item .comment-time {
    font-size: 10px !important;
  }

  /* --- 论坛帖子列表（板块首页）--- */
  .post-list-item {
    padding: 10px 12px !important;
  }
  .post-list-item .post-title {
    font-size: 14px !important;
  }
  .post-list-item .post-meta {
    font-size: 11px !important;
  }

  /* --- 锁定页面 --- */
  .lock-overlay {
    padding: 40px 16px !important;
  }
  .lock-overlay .lock-icon {
    font-size: 48px !important;
  }
  .lock-overlay h2 {
    font-size: 16px !important;
  }
  .lock-overlay p {
    font-size: 13px !important;
  }

  /* --- 校园官网内容卡片 --- */
  .content-card,
  .card {
    padding: 16px !important;
  }
  .page-title {
    font-size: 18px !important;
  }
  .bread {
    font-size: 11px !important;
  }

  /* --- 校园官网侧边菜单（改为顶部横排）--- */
  .side-menu {
    border-radius: 4px !important;
    margin-bottom: 12px !important;
  }
  .side-menu h3 {
    font-size: 13px !important;
    padding: 10px 14px !important;
  }
  .side-menu a {
    padding: 8px 14px !important;
    font-size: 12px !important;
  }

  /* --- 底部 Footer --- */
  .footer {
    padding: 14px 10px !important;
    font-size: 11px !important;
    margin-top: 12px !important;
  }
  .footer-inner div {
    font-size: 11px !important;
  }

  /* --- 隐藏滑动条 --- */
  .hidden-slider {
    height: 8px !important;
  }
  .hidden-slider:hover {
    height: 16px !important;
  }
  .hidden-slider .slider-thumb {
    width: 40px !important;
  }
  .hidden-slider .slider-label-l,
  .hidden-slider .slider-label-r {
    font-size: 9px !important;
    top: -14px !important;
  }

  /* --- 用户卡片 --- */
  .user-card .ava {
    width: 44px !important;
    height: 44px !important;
    font-size: 20px !important;
  }
  .user-card .uname {
    font-size: 14px !important;
  }

  /* --- 表格 --- */
  table {
    font-size: 11px !important;
  }
  table th, table td {
    padding: 6px 8px !important;
  }

  /* --- 排行榜 --- */
  .rank-table th,
  .rank-table td {
    padding: 8px 6px !important;
    font-size: 11px !important;
  }

  /* --- 按钮 --- */
  button, .btn {
    font-size: 12px !important;
    padding: 6px 12px !important;
  }

  /* --- 搜索框 --- */
  .search-box-simple input {
    font-size: 12px !important;
    padding: 6px 10px !important;
  }

  /* --- 里世界内容 --- */
  .underworld-hidden,
  .underworld-content {
    font-size: 13px !important;
    line-height: 1.8 !important;
  }
  .underworld-hidden .section,
  .underworld-content .section {
    padding: 10px !important;
    margin-bottom: 10px !important;
  }
  .underworld-hidden .record-item,
  .underworld-content .record-item {
    padding: 8px 10px !important;
    font-size: 12px !important;
  }

  /* --- 404/403 页面 --- */
  .error-page {
    padding: 40px 16px !important;
  }
  .error-code {
    font-size: 72px !important;
  }

  /* --- 登录/表单 --- */
  .login-form,
  .form-card {
    padding: 20px 16px !important;
    max-width: 100% !important;
  }
  .login-form input,
  .form-card input,
  .form-card textarea {
    font-size: 14px !important;
    padding: 10px !important;
  }

  /* --- 档案/教师列表网格 --- */
  .teacher-grid,
  .archive-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px !important;
  }
  .teacher-card,
  .archive-card {
    padding: 10px !important;
  }

  /* --- 广场/首页轮播 --- */
  .banner-area {
    height: auto !important;
    min-height: 140px !important;
  }
  .banner-slide h2 {
    font-size: 16px !important;
  }

  /* --- 板块卡片 --- */
  .section-cards {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px !important;
  }
  .section-card {
    padding: 12px !important;
  }
  .section-card h3 {
    font-size: 13px !important;
  }

  /* --- 标签 --- */
  .tag {
    font-size: 10px !important;
    padding: 2px 6px !important;
  }
  .author-tag {
    font-size: 10px !important;
    padding: 1px 6px !important;
  }

  /* --- 置顶帖 --- */
  .sticky-post {
    padding: 10px 12px !important;
  }
  .sticky-post .sticky-title {
    font-size: 13px !important;
  }

  /* --- 统计行 --- */
  .stats-row {
    gap: 4px !important;
  }
  .stat-item .stat-num {
    font-size: 15px !important;
  }
  .stat-item .stat-label {
    font-size: 10px !important;
  }

  /* --- 校史馆照片网格 --- */
  .photo-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px !important;
  }

  /* --- 校长信箱 --- */
  .mail-form textarea {
    font-size: 14px !important;
  }

  /* --- 空状态 --- */
  .empty-state {
    padding: 40px 0 !important;
  }
  .empty-state .empty-icon {
    font-size: 48px !important;
  }
  .empty-state h2 {
    font-size: 16px !important;
  }
}