/* yanyu-mobile-simple-final-v2
   手机端二次收口：重点修复首页入口卡片横向拥挤、底部浮球过多、装饰过重。
*/

@media (max-width: 760px) {
  html,
  body {
    overflow-x: hidden !important;
    background: #f4edde !important;
  }

  body {
    font-size: 14px !important;
    line-height: 1.58 !important;
  }

  /* 手机首页入口：隐藏大标题说明，直接给入口列表 */
  .yanyu-hub {
    padding: 14px 12px 24px !important;
    margin: 0 !important;
    background: linear-gradient(180deg, rgba(249,244,235,.96), rgba(238,229,211,.92)) !important;
  }

  .yanyu-hub-inner {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
  }

  .yanyu-hub-head,
  .yanyu-hub-tip,
  .yanyu-gateway-status-vb1 {
    display: none !important;
  }

  .yanyu-hub-grid {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 8px !important;
    width: 100% !important;
  }

  .yanyu-hub-card,
  .yanyu-hub-card.yanyu-gateway-card-vb1 {
    position: relative !important;
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
    min-height: 0 !important;
    box-sizing: border-box !important;
    padding: 13px 42px 12px 14px !important;
    border-radius: 15px !important;
    border: 1px solid rgba(95, 58, 42, .13) !important;
    background: rgba(255, 252, 246, .82) !important;
    box-shadow: 0 6px 16px rgba(55, 34, 22, .055) !important;
    text-align: left !important;
    overflow: hidden !important;
    transform: none !important;
  }

  .yanyu-hub-card::before,
  .yanyu-hub-card.yanyu-gateway-card-vb1::before {
    display: none !important;
  }

  .yanyu-hub-card::after {
    content: "›" !important;
    position: absolute !important;
    right: 15px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    color: rgba(126, 42, 34, .72) !important;
    font-size: 24px !important;
    font-weight: 700 !important;
    line-height: 1 !important;
  }

  .yanyu-hub-card.active {
    background: linear-gradient(135deg, rgba(42, 25, 21, .94), rgba(133, 42, 33, .9)) !important;
    border-color: rgba(133, 42, 33, .22) !important;
    color: #fff8ed !important;
  }

  .yanyu-hub-card.active::after {
    color: rgba(255, 248, 237, .86) !important;
  }

  .yanyu-hub-card strong,
  .yanyu-hub-card .yanyu-gateway-title-vb1 {
    display: block !important;
    width: 100% !important;
    margin: 0 0 5px !important;
    color: inherit !important;
    font-size: 18px !important;
    font-weight: 800 !important;
    line-height: 1.22 !important;
    letter-spacing: 0 !important;
    white-space: normal !important;
    text-shadow: none !important;
  }

  .yanyu-hub-card span,
  .yanyu-hub-card .yanyu-gateway-desc-vb1 {
    display: -webkit-box !important;
    width: 100% !important;
    margin: 0 !important;
    color: rgba(64, 49, 40, .70) !important;
    font-size: 13px !important;
    line-height: 1.45 !important;
    white-space: normal !important;
    word-break: break-word !important;
    overflow: hidden !important;
    -webkit-box-orient: vertical !important;
    -webkit-line-clamp: 2 !important;
  }

  .yanyu-hub-card.active span,
  .yanyu-hub-card.active .yanyu-gateway-desc-vb1 {
    color: rgba(255, 248, 237, .78) !important;
  }

  /* 卡片本身已经可点击，手机端隐藏小按钮，减少拥挤 */
  .yanyu-hub-card em,
  .yanyu-hub-card .yanyu-gateway-btn-vb1 {
    display: none !important;
  }

  /* 公告和近报减少留白 */
  .yanyu-notice-center {
    padding: 16px 12px 18px !important;
  }

  .yanyu-notice-head {
    display: none !important;
  }

  .yanyu-notice-grid {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 8px !important;
  }

  .yanyu-notice-card,
  .yanyu-notice-card.primary {
    min-height: 0 !important;
    padding: 13px 14px !important;
    border-radius: 15px !important;
    box-shadow: 0 6px 16px rgba(55, 34, 22, .055) !important;
  }

  .yanyu-notice-card::before {
    display: none !important;
  }

  .yanyu-notice-card strong {
    font-size: 17px !important;
    line-height: 1.25 !important;
  }

  .yanyu-notice-card p,
  .yanyu-notice-card ul {
    font-size: 13px !important;
    line-height: 1.5 !important;
  }

  #updates.section-ink,
  .updates.section-ink {
    padding-top: 28px !important;
  }

  .section-ink {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }

  .section-head {
    margin-bottom: 12px !important;
    text-align: left !important;
  }

  .section-head h2 {
    font-size: 26px !important;
    line-height: 1.18 !important;
  }

  .section-head p:not(.eyebrow) {
    font-size: 13px !important;
    line-height: 1.55 !important;
  }

  .eyebrow {
    font-size: 10px !important;
    letter-spacing: .12em !important;
  }

  /* 底部只留一个返回顶部球，隐藏额外入口和水墨调试按钮 */
  #yanyu-mobile-home-orb-v1,
  .ink-max-debug-toggle {
    display: none !important;
  }

  #yanyu-top-ball-final {
    width: 40px !important;
    height: 40px !important;
    right: 14px !important;
    bottom: 18px !important;
    line-height: 40px !important;
    font-size: 18px !important;
    box-shadow: 0 8px 20px rgba(55, 25, 18, .22) !important;
  }

  /* 手机端面板统一降噪 */
  .ink-panel,
  .notice-panel,
  .pulse-panel,
  .forum-auth,
  .forum-main,
  .profile-section,
  .chapter-paper,
  .yanyu-activity-v1-card,
  .checkin-card,
  .checkin-list-card,
  .checkin-shop-card,
  .yanyu-final-card,
  .yanyu-raid-final-team {
    border-radius: 15px !important;
    box-shadow: 0 6px 16px rgba(55, 34, 22, .055) !important;
  }
}
