/* ============================================================
 * 中经学堂 · 移动端样式层（仅 < 768px 生效）
 * 断点规范：手机 <768 走本文件；平板竖屏起（>=768）与 PC 完全一致
 * 说明：本文件内的移动端规则统一用 !important，以覆盖 Tailwind 原子类
 * ========================================================== */
/* 底部 TabBar 默认隐藏（PC >=1024 不显示，仅手机/平板出现） */
.mob-tabbar { display: none; }

/* 移动端精简页脚（方案 A 结构）：桌面/平板隐藏，仅 <768px 由媒体查询开启 */
.ft-mini { display: none; }

@media (max-width: 767px) {
  /* ---------------- 基础 ---------------- */
  html { -webkit-text-size-adjust: 100%; }
  body { font-size: 13px; overflow-x: hidden; }
  img, svg, video, iframe { max-width: 100%; }
  /* 底部安全留白：给移动端 TabBar 让位 */
  body { padding-bottom: calc(56px + env(safe-area-inset-bottom, 0px)); }

  /* 桌面端专属元素 */
  .mob-hide { display: none !important; }

  /* ---------------- 统一留白：容器 / 区块（对齐跨境端的高密度排版） ---------------- */
  [class~="px-4"], [class~="px-5"], [class~="px-6"], [class~="px-8"],
  [class~="px-3"], [class~="px-10"] { padding-left: 10px !important; padding-right: 10px !important; }
  [class~="pl-4"], [class~="pl-6"] { padding-left: 10px !important; }
  [class~="pr-4"], [class~="pr-6"] { padding-right: 10px !important; }
  [class~="py-12"], [class~="py-14"], [class~="py-16"], [class~="py-10"] { padding-top: 16px !important; padding-bottom: 16px !important; }
  [class~="py-6"], [class~="py-8"] { padding-top: 12px !important; padding-bottom: 12px !important; }
  [class~="p-6"], [class~="p-8"], [class~="p-5"] { padding: 10px !important; }
  [class~="p-4"] { padding: 10px !important; }
  [class~="p-3"] { padding: 8px !important; }
  [class~="mt-12"], [class~="mt-14"], [class~="mt-16"] { margin-top: 14px !important; }
  [class~="mt-8"], [class~="mt-10"] { margin-top: 12px !important; }
  [class~="mb-8"], [class~="mb-10"], [class~="mb-12"] { margin-bottom: 12px !important; }
  [class~="gap-8"], [class~="gap-10"], [class~="gap-12"] { gap: 10px !important; }
  [class~="gap-6"] { gap: 10px !important; }
  [class~="gap-4"], [class~="gap-5"] { gap: 8px !important; }

  /* ---------------- 网格：多列降为两列 ---------------- */
  [class~="grid-cols-3"], [class~="grid-cols-4"], [class~="grid-cols-5"],
  [class~="grid-cols-6"], [class~="grid-cols-7"], [class~="grid-cols-8"] {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
  /* 列表网格：手机上单列全宽卡片太大，统一降为两列（与课程列表一致）
     仅命中真正的内容列表网格（同时带 lg: 前缀）；
     详情页主布局（gap-8 / items-start）与首页主推网格（auto-rows-min）排除 */
  [class~="grid-cols-1"][class~="md:grid-cols-2"][class~="lg:grid-cols-3"],
  [class~="grid-cols-1"][class~="lg:grid-cols-3"]:not([class~="gap-8"]):not([class~="items-start"]),
  [class~="grid-cols-1"][class~="lg:grid-cols-4"]:not([class~="auto-rows-min"]),
  .fresh-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
  /* 网格内的新品卡按列宽自适应（横滑容器里才用 232 固定宽） */
  .fresh-grid .fresh-card { width: 100% !important; }
  /* 首页好课推荐：主推大卡占满整行，6 张小卡两列排布 */
  [class~="auto-rows-min"] { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  [class~="auto-rows-min"] > [class~="md:col-span-2"] { grid-column: span 2 !important; }
  /* 训练营卡片文字区：固定高在窄卡会溢出，改为自适应 */
  [class~="h-[120px]"] { height: auto !important; min-height: 96px !important; }
  /* 两列卡片上的文字再收紧一档 */
  [class~="text-[76px]"] { font-size: 34px !important; }   /* 新品卡无封面时的首字水印 */
  [class~="text-[24px]"] { font-size: 17px !important; }   /* 首页深蓝卡/协议页/定制页大标题 */
  .fresh-card [class~="text-[24px]"] { font-size: 18px !important; }
  /* 卡片文字整体降一档（对齐跨境端卡片密度） */
  [class~="text-[20px]"] { font-size: 17px !important; }
  [class~="text-[17px]"] { font-size: 15px !important; }
  [class~="text-[16px]"] { font-size: 14px !important; }
  [class~="text-[15px]"] { font-size: 13.5px !important; }
  [class~="text-[14px]"] { font-size: 13px !important; }
  /* 两列卡片的多行简介限为两行，压缩卡片高度 */
  [class~="min-h-[68px]"] { min-height: 0 !important; }
  [class~="min-h-[46px]"] { min-height: 38px !important; }
  [class~="min-h-[150px]"] { min-height: 0 !important; }
  .fresh-grid .line-clamp-2, [class~="auto-rows-min"] .line-clamp-2 { -webkit-line-clamp: 2 !important; }
  /* 两列列表卡里的三行简介收为两行，压缩卡片高度 */
  [class~="grid-cols-1"][class~="md:grid-cols-2"][class~="lg:grid-cols-3"] .line-clamp-3,
  .fresh-grid .line-clamp-3 { -webkit-line-clamp: 2 !important; }
  /* 横向溢出：一律改为可左右滑动（筛选器、分类条、Marc 等） */
  .mob-scroll {
    overflow-x: auto !important; overflow-y: hidden; -webkit-overflow-scrolling: touch;
    flex-wrap: nowrap !important; scrollbar-width: none;
  }
  .mob-scroll::-webkit-scrollbar { display: none; }
  .mob-scroll > * { flex: none !important; }

  /* ---------------- 顶部 ---------------- */
  /* 顶部蓝条：手机上只保留常用入口 */
  .top-mini > div { gap: 14px !important; }
  [class~="h-11"] { height: 36px !important; }
  /* 主导航条 */
  .site-head [class~="h-[72px]"] { height: 50px !important; }
  .site-head img { max-height: 32px !important; }

  /* 汉堡按钮 */
  .mob-menu-btn {
    display: flex !important; align-items: center; justify-content: center;
    width: 36px; height: 36px; border-radius: 10px; background: #F2F6FF; color: #1b45f5; flex: none;
  }
  /* 抽屉 */
  .mob-drawer {
    position: fixed; top: 0; bottom: 0; left: 0; width: 78%; max-width: 320px; z-index: 90;
    background: #fff; box-shadow: 6px 0 30px -10px rgba(15,23,42,.35);
    transform: translateX(-100%); transition: transform .28s cubic-bezier(.4,0,.2,1);
    display: flex; flex-direction: column; overflow-y: auto; -webkit-overflow-scrolling: touch;
  }
  .mob-drawer.open { transform: none; }
  .mob-drawer-mask {
    position: fixed; inset: 0; z-index: 88; background: rgba(11,18,32,.45);
    opacity: 0; pointer-events: none; transition: opacity .25s;
  }
  .mob-drawer-mask.open { opacity: 1; pointer-events: auto; }
  .mob-nav-item {
    display: flex; align-items: center; gap: 10px; padding: 11px 13px; border-radius: 12px;
    font-size: 14px; font-weight: 600; color: #0b1220;
  }
  .mob-nav-item.active { background: #F2F6FF; color: #1b45f5; }

  /* ---------------- 底部 TabBar ---------------- */
  .mob-tabbar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 80; display: flex !important;
    background: rgba(255,255,255,.96); border-top: 1px solid #E9EEF7;
    padding-bottom: env(safe-area-inset-bottom, 0px);
    box-shadow: 0 -6px 18px -12px rgba(15,23,42,.35); backdrop-filter: blur(8px);
  }
  .mob-tab {
    flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 2px; height: 56px; font-size: 11px; font-weight: 600; color: #64748b; text-decoration: none;
  }
  .mob-tab svg { width: 21px; height: 21px; }
  .mob-tab.on { color: #1b45f5; }

  /* ---------------- 首页板块 ---------------- */
  /* banner 图多为 PC 宽幅设计图：手机上左对齐显示，避免标题文字被居中裁切 */
  #banner .bg-cover, #banner img.bn-img { background-position: left center !important; object-position: left center !important; }
  #banner, .home-banner { height: 168px !important; min-height: 168px !important; }
  #banner h2, .home-banner h2 { font-size: 17px !important; }
  #banner p, .home-banner p { font-size: 12px !important; margin-bottom: 8px !important; }
  #banner > div > div > div > a, .home-banner a { padding: 7px 14px !important; font-size: 12px !important; }
  .stat-card { padding: 8px 10px !important; }
  .stat-card .stat-ic { width: 30px !important; height: 30px !important; }
  .stat-card .stat-ic svg { width: 15px; height: 15px; }
  .stat-num { font-size: var(--snfs, 15px) !important; }
  .stat-lb { font-size: var(--slfs, 10.5px) !important; }
  .section-title { font-size: 15px !important; }
  /* 首页主推大卡（500×600 竖图）：手机上主推封面改扁（16:9），整体不再巨高 */
  .pick-hero-wrap { flex-direction: column !important; }
  .pick-hero-media { width: 100% !important; }
  [class~="auto-rows-min"] > a > div:first-child { aspect-ratio: 16/9 !important; }
  /* 新品预告横滑卡：300 → 232 宽（一屏露出 1.6 张，提示可滑动） */
  .fresh-card { width: 232px !important; }

  /* 课程分类块：左封面由半屏大图压成 96px 横条，分类名与细分标签横排 */
  .cat-cover { height: 96px !important; min-height: 96px !important; border-width: 3px !important; }
  .cat-cover-in { padding: 6px 10px !important; }
  .cat-cover-row {
    flex: 1 1 auto !important; flex-direction: row !important; flex-wrap: nowrap !important;
    align-items: center !important; justify-content: flex-start !important; gap: 8px !important; overflow: hidden;
  }
  .cat-cover-row > .font-black { font-size: 16px !important; flex: none !important; white-space: nowrap; }
  .cat-chips {
    flex: 1 1 auto !important; flex-direction: row !important; width: auto !important;
    margin-top: 0 !important; gap: 5px !important; overflow-x: auto !important;
    scrollbar-width: none; -webkit-overflow-scrolling: touch;
  }
  .cat-chips::-webkit-scrollbar { display: none; }
  .cat-chip {
    flex: none !important; font-size: 11px !important; padding: 3px 7px !important;
    white-space: nowrap; border-radius: 999px !important;
  }
  .cat-all { display: none !important; }
  /* 楼层标题「查看更多」等小链接保持可点 */

  /* ---------------- 二级页页头 ---------------- */
  .page-head { padding: 16px 0 12px !important; }
  .page-head h1 { font-size: 16px !important; }
  .page-head p { font-size: 12px !important; max-width: 88% !important;
    display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
  .tp-hero, .tp-hero-img { min-height: 118px !important; }
  .tp-hero h1, .tp-hero-img h1 { font-size: 17px !important; }
  /* 专题/培训/定制班详情 hero 大标题与价格：手机上收紧 */
  h1[class~="max-w-[820px]"], h1[class~="sm:text-[34px]"] { font-size: 17px !important; }
  [class~="text-[32px]"] { font-size: 20px !important; }   /* 培训详情价格 */
  h1[class~="text-[22px]"] { font-size: 18px !important; } /* 课程详情/登录/注册等 h1 */

  /* ---------------- 卡片与列表 ---------------- */
  .card-lift:hover, .train-card:hover { transform: none !important; }
  /* 触屏无 hover：详情类浮层直接常显，避免内容看不到 */
  .pick-bar { position: static !important; transform: none !important; opacity: 1 !important;
    margin: 8px -12px -10px !important; padding: 6px 12px !important; border-radius: 8px !important;
    background: linear-gradient(92deg, rgba(27,69,245,.08) 0%, rgba(14,165,233,.10) 100%) !important; }
  .pick-bar .text-white { color: #1b45f5 !important; }
  .pick-bar .text-white\/90 { color: rgba(27,69,245,.9) !important; }
  .pick-bar .text-white\/75 { color: rgba(27,69,245,.75) !important; }
  .pick-bar .bg-white { background: #1b45f5 !important; color: #fff !important; }
  .train-more { opacity: 1 !important; transform: none !important; }

  /* 筛选 / 分段导航：横滑，不再换行挤压 */
  .seg-nav { flex-wrap: nowrap !important; overflow-x: auto !important; scrollbar-width: none; }
  .seg-nav::-webkit-scrollbar { display: none; }
  .seg-item { flex: none !important; font-size: 12.5px !important; }
  /* 详情页 tab 条：横滑 */
  #tabs, .tp-tabs { flex-wrap: nowrap !important; overflow-x: auto !important; scrollbar-width: none; }
  #tabs::-webkit-scrollbar, .tp-tabs::-webkit-scrollbar { display: none; }
  #tabs .tab-btn, .tp-tabs button { flex: none !important; }

  /* ---------------- 详情页 ---------------- */
  .detail-body { grid-template-columns: 1fr !important; }
  .detail-side { position: static !important; }
  video { width: 100% !important; height: auto !important; }
  /* 培训/专题详情的配套课程行：窄屏改为「序号+图+文字」一行，时长与按钮换到下一行 */
  .tp-item { flex-wrap: wrap !important; gap: 8px 10px !important; }
  .tp-item [class~="w-[108px]"] { width: 84px !important; height: 47px !important; }
  .tp-item > .shrink-0:last-child { width: 100% !important; display: flex; align-items: center; justify-content: space-between; text-align: left !important; }
  .tp-item .tr-btn { margin-top: 0 !important; }
  /* 移动端吸底操作条（位于 TabBar 之上） */
  .mob-bar {
    position: fixed; left: 0; right: 0; bottom: calc(56px + env(safe-area-inset-bottom, 0px)); z-index: 85; display: flex !important;
    align-items: center; gap: 10px; padding: 8px 12px;
    background: #fff; border-top: 1px solid #E6EAF2; box-shadow: 0 -8px 24px -14px rgba(15,23,42,.5);
  }
  .mob-bar .mob-bar-main { flex: 1; text-align: center; border: 0; border-radius: 999px; padding: 10px 12px;
    font-size: 14px; font-weight: 800; background: #1b45f5; color: #fff; text-decoration: none; cursor: pointer; }
  .mob-bar .mob-bar-ghost { flex: none; padding: 10px 14px; border-radius: 999px; border: 1px solid #1b45f5;
    font-size: 13.5px; font-weight: 800; background: #fff; color: #1b45f5; text-decoration: none; cursor: pointer; white-space: nowrap; }
  .mob-bar .mob-bar-sub { flex: none; }

  /* 筛选折叠面板（移动端 details） */
  .mob-fold > summary { list-style: none; display: flex; align-items: center; justify-content: space-between;
    background: #fff; border: 1px solid #E2E8F5; border-radius: 12px; padding: 10px 12px;
    font-size: 13px; font-weight: 700; color: #0b1220; cursor: pointer; }
  .mob-fold > summary::-webkit-details-marker { display: none; }
  .mob-fold > summary + * { margin-top: 10px; }
  .mob-fold-chev { color: #64748b; transition: transform .2s ease; }
  .mob-fold[open] .mob-fold-chev { transform: rotate(180deg); }

  /* ---------------- 页脚（方案 A：手机端简化为一行版权备案） ---------------- */
  /* 桌面端五列链接 / 二维码 / 客服电话 / 深色版权条全部隐藏，仅留浅色版权 + 备案一行 */
  footer.site-footer { background: #fff !important; margin-top: 14px !important; padding-bottom: 2px; }
  footer.site-footer > .ft-main, footer.site-footer > .ft-bar { display: none !important; }
  .ft-mini { display: block !important; border-top: 1px solid #EEF1F6; }

  /* ---------------- 表单与按钮 ---------------- */
  input[type="text"], input[type="password"], input[type="tel"], input[type="email"], textarea, select {
    font-size: 16px !important; /* 防止 iOS 聚焦放大 */
    min-height: 44px;
  }
  .pc-btn, .btn-lg { min-height: 44px; }

  /* ---------------- 图文说明页 ---------------- */
  .ip-block-img.float-left, .ip-block-img.float-right {
    float: none !important; width: 100% !important; max-width: 100% !important; margin: 0 0 12px !important;
  }
  .ip-feature { grid-template-columns: 1fr !important; }
  .ip-feature img { width: 100% !important; }
}

/* 桌面 / 平板（>=768px）：移动端专属元素一律不出现 */
@media (min-width: 768px) {
  .mob-only { display: none !important; }
}

/* 平板竖幅（768–1023）：与 PC 同构，仅做紧凑化，防止导航与门户站名换行 */
@media (min-width: 768px) and (max-width: 1023px) {
  .site-head [class~="h-[72px]"] { height: 60px !important; }
  .site-head .nav-item { padding-left: 9px !important; padding-right: 9px !important; font-size: 14px !important; }
  .site-head form { display: none !important; } /* 平板竖幅收起搜索框（iPad 横屏 1024+ 恢复显示） */
  .site-head nav a { font-size: 11.5px !important; padding-left: 4px !important; padding-right: 4px !important; }
  .site-head a[class*="px-3.5"] { padding-left: 10px !important; padding-right: 10px !important; }
  .site-head [class~="gap-6"] { gap: 8px !important; }
  .site-head nav a, .site-head nav span { white-space: nowrap; }
  .site-head img { max-height: 42px !important; }

  /* 平板也保留底部菜单栏（与手机一致，避免“下边没有菜单”） */
  .mob-tabbar {
    display: flex !important; position: fixed; left: 0; right: 0; bottom: 0; z-index: 80;
    background: rgba(255,255,255,.96); border-top: 1px solid #E9EEF7;
    padding-bottom: env(safe-area-inset-bottom, 0px);
    box-shadow: 0 -6px 18px -12px rgba(15,23,42,.35); backdrop-filter: blur(8px);
  }
  .mob-tab {
    flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 2px; height: 54px; font-size: 11px; font-weight: 600; color: #64748b; text-decoration: none;
  }
  .mob-tab svg { width: 20px; height: 20px; }
  .mob-tab.on { color: #1b45f5; }
  body { padding-bottom: calc(54px + env(safe-area-inset-bottom, 0px)) !important; }
}

/* 窄平板（768–819）：导航里的门户胶囊收起，保证头部不横向溢出（抽屉/页脚仍有入口） */
@media (min-width: 768px) and (max-width: 819px) {
  .site-head nav > div { display: none !important; }
}

/* ============================================================
 * 首页三块（轮播 / 数据卡 / 广告位）在手机 + 平板（<1024）的紧凑化
 * 轮播：<768 手机按原图 1920×420 等比全显；≥768 平板/PC 恢复原始大轮播
 * （固定高度 + 铺满裁切）。数据卡 / 广告 <1024 紧凑化；电脑端 ≥1024 完全不变
 * =========================================================== */
@media (max-width: 1023px) {
  /* ---- 2. 资源信息条：5 张数据卡排一行，竖排紧凑 ---- */
  [class*="lg:grid-cols-5"] { grid-template-columns: repeat(5, minmax(0, 1fr)) !important; gap: 6px !important; }
  .stat-card { flex-direction: column !important; align-items: center !important; text-align: center !important;
    gap: 3px !important; padding: 9px 3px !important; }
  /* 文案区撑满卡宽：长标签（nowrap）不把卡片撑变形，5 张卡才能等宽 */
  .stat-card > div.min-w-0 { width: 100% !important; max-width: 100% !important; }
  .stat-card .stat-ic { width: 24px !important; height: 24px !important; border-radius: 7px !important; }
  .stat-card .stat-ic svg { width: 13px !important; height: 13px !important; }
  .stat-card .stat-num { font-size: var(--snfs, 15px) !important; line-height: 1.1 !important;
    display: inline-block !important; white-space: nowrap !important; max-width: 100% !important; }
  .stat-card .stat-num span { font-size: var(--snsp, 10px) !important; }
  /* 标签单行显示（不折行）：字号按可用宽度在 views.js fitStatLabels() 里自适应横向压缩 */
  .stat-card .stat-lb { font-size: var(--slfs, 10px) !important; margin-top: 2px !important; line-height: 1.2 !important;
    display: inline-block !important; white-space: nowrap !important; letter-spacing: -0.2px;
    max-width: 100% !important; }

  /* 广告位角标：等比缩小的版面里不换行（平板字号稍大） */
  .home-ads [class~="px-2"][class~="py-0.5"] { white-space: nowrap; max-width: 110px; overflow: hidden; text-overflow: ellipsis; }
}

@media (max-width: 767px) {
  /* ---- 1. 轮播：按原图 1920×420 等比全显（不裁切）；≥768 平板/PC 恢复原始大轮播 ---- */
  #banner { height: auto !important; aspect-ratio: 1920 / 420; min-height: 0 !important; }
  #banner img.bn-img { width: 100% !important; height: 100% !important; object-fit: contain !important; }
  /* 公告框原为 216px 高，等比轮播里放不下，隐藏（公告另有入口） */
  #banner .float-slow { display: none !important; }
  /* 兜底：若后台配置了标题等文案，等比矮轮播内不溢出 */
  #banner h2 { font-size: 14px !important; margin-bottom: 0 !important; }
  #banner p { display: none !important; }
  #banner a[class~="inline-flex"] { padding: 3px 10px !important; font-size: 11px !important; border-radius: 6px !important; }
  #banner [class~="bottom-5"] { bottom: 5px !important; }

  /* 数据卡：手机上再收一号 */
  .stat-card { padding: 8px 2px !important; gap: 2px !important; }
  .stat-card .stat-ic { width: 22px !important; height: 22px !important; }
  .stat-card .stat-num { font-size: var(--snfs, 14px) !important; }
  .stat-card .stat-lb { font-size: var(--slfs, 8.5px) !important; letter-spacing: -0.4px; line-height: 1.15 !important; }

  /* ---- 3. 两个广告位：左右各一排一行，内部等比例缩小 ---- */
  .home-ads { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 8px !important; }
  .home-ads > a { min-height: 84px !important; padding: 9px !important; gap: 6px !important; }
  .home-ads .home-ad-desc, .home-ads .home-ad-cta { display: none !important; }
  .home-ads [class~="text-[24px]"] { font-size: 13.5px !important; margin-bottom: 0 !important; }
  .home-ads [class~="text-[20px]"] { font-size: 13px !important; margin-bottom: 2px !important; }
  .home-ads .home-ad-tag { font-size: 10px !important; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .home-ads [class~="px-2"][class~="py-0.5"] { font-size: 10px !important; padding: 1px 4px !important; white-space: nowrap; max-width: 64px; overflow: hidden; text-overflow: ellipsis; }
  .home-ads .home-ad-ic { width: 26px !important; height: 26px !important; margin-left: 4px !important; border-radius: 8px !important; }
  .home-ads .home-ad-ic svg { width: 13px !important; height: 13px !important; }
  .home-ads .home-ad-body { padding-top: 0 !important; padding-bottom: 0 !important; }
  .home-ads .book { width: 34px !important; min-height: 62px !important; }
  .home-ads .book [class~="z-[2]"] { font-size: 10px !important; padding-left: 4px !important; }
}

/* ============================================================
 * 平板（768–1279）：首页轮播按原图 1920×420 等比全显
 *   · 宽度铺满 → 高度 = 宽 ÷ 4.571（768→168，1024→224，1279→280）
 *   · 图片完整不裁切（此刻 contain 与 cover 视觉等价，contain 更稳妥）
 *   · 公告框框体等比缩小、文字保底可读（严格等比会把字号缩到 5px）
 *   · ≥1280 电脑端保持原始 420 高大轮播不变
 * ========================================================== */
@media (min-width: 768px) and (max-width: 1279px) {
  #banner { height: auto !important; aspect-ratio: 1920 / 420; min-height: 0 !important; }
  #banner img.bn-img { width: 100% !important; height: 100% !important; object-fit: contain !important; }
  #banner [class~="bottom-5"] { bottom: 12px !important; }
  /* 兜底：后台若给轮播配了文案，等比矮轮播内不溢出 */
  #banner h2 { font-size: 20px !important; margin-bottom: 2px !important; }
  #banner p { font-size: 12px !important; margin-bottom: 8px !important; }
  #banner a[class~="inline-flex"] { padding: 6px 16px !important; font-size: 13px !important; }
}

/* 平板竖幅（768–1023）：公告框 300×216 → 240×112，标题栏 36→26，行高 28→22，显 3 行 */
@media (min-width: 768px) and (max-width: 1023px) {
  #banner .float-slow { width: 240px !important; height: 112px !important; }
  #banner .float-slow [class~="h-9"] { height: 26px !important; }
  #banner .float-slow [class~="text-[13px]"] { font-size: 12px !important; }
  #banner .float-slow [class~="h-7"] { height: 22px !important; }
  #banner .float-slow [class~="text-[12.5px]"] { font-size: 11.5px !important; }
  #banner .float-slow [class~="py-1"] { padding-top: 0 !important; padding-bottom: 0 !important; }
}

/* iPad 横屏（1024–1279）：公告框 300×150，标题栏 30，行高 24，显 4–5 行 */
@media (min-width: 1024px) and (max-width: 1279px) {
  #banner .float-slow { width: 300px !important; height: 150px !important; }
  #banner .float-slow [class~="h-9"] { height: 30px !important; }
  #banner .float-slow [class~="h-7"] { height: 24px !important; }
  #banner .float-slow [class~="text-[12.5px]"] { font-size: 12px !important; }
}
