/* =========================================================
   CUNYIN MOBILE HEADER + TREE VOICE SLIM V2
   全站手机端头部瘦身 + 树语小圆版

   V2 修复重点：
   1. 头部继续瘦身
   2. 退出按钮恢复清晰，不再发白
   3. 手机端树语默认小圆，不再半屏霸屏
   4. 图片场景优先露出
   5. 电脑端不影响
   ========================================================= */

@media (max-width: 980px){

  .header,
  header.header,
  .site-header,
  header.site-header{
    min-height: auto !important;
    padding: 6px 10px 8px !important;
    gap: 6px !important;
    align-items: center !important;
    justify-content: center !important;
  }

  .logo,
  .site-logo,
  .brand,
  .brand-logo{
    max-width: 150px !important;
    margin: 0 auto 4px !important;
    transform: scale(.86) !important;
    transform-origin: center center !important;
  }

  .logo img,
  .site-logo img,
  .brand img,
  .brand-logo img,
  .site-logo-img{
    height: 30px !important;
    max-height: 30px !important;
    width: auto !important;
    object-fit: contain !important;
  }

  .nav,
  nav.nav,
  .main-nav,
  .top-nav{
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    gap: 12px !important;
    padding: 2px 2px 4px !important;
    margin: 0 auto !important;
    width: 100% !important;
    max-width: 100% !important;
    scrollbar-width: none !important;
    -webkit-overflow-scrolling: touch !important;
  }

  .nav::-webkit-scrollbar,
  nav.nav::-webkit-scrollbar,
  .main-nav::-webkit-scrollbar,
  .top-nav::-webkit-scrollbar{
    display: none !important;
  }

  .nav a,
  nav.nav a,
  .main-nav a,
  .top-nav a{
    flex: 0 0 auto !important;
    font-size: 13px !important;
    line-height: 1.05 !important;
    padding: 2px 0 5px !important;
    min-width: auto !important;
    white-space: nowrap !important;
  }

  .nav a span,
  nav.nav a span,
  .main-nav a span,
  .top-nav a span{
    display: block !important;
    margin-top: 2px !important;
    font-size: 8px !important;
    line-height: 1.05 !important;
    opacity: .76 !important;
  }

  .nav a.active::after,
  nav.nav a.active::after,
  .main-nav a.active::after,
  .top-nav a.active::after{
    height: 3px !important;
    border-radius: 999px !important;
    bottom: -1px !important;
  }

  .mobile-swipe-tip,
  .swipe-tip,
  .nav-tip{
    font-size: 10px !important;
    line-height: 1.2 !important;
    margin: 1px 0 4px !important;
    opacity: .70 !important;
  }

  .header-actions,
  .top-actions,
  .user-actions{
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    flex-wrap: nowrap !important;
    width: 100% !important;
    margin-top: 2px !important;
  }

  .language-select,
  select.language-select,
  .lang-select,
  select.lang-select{
    height: 32px !important;
    min-height: 32px !important;
    max-width: 98px !important;
    padding: 0 24px 0 11px !important;
    border-radius: 999px !important;
    font-size: 11px !important;
    font-weight: 900 !important;
    background-color: rgba(255,255,250,.78) !important;
    border: 1px solid rgba(31,112,58,.12) !important;
    box-shadow: none !important;
    opacity: 1 !important;
  }

  .login-pill,
  .cy-pill,
  .user-pill,
  .account-pill{
    min-height: 32px !important;
    padding: 6px 10px !important;
    border-radius: 999px !important;
    font-size: 11.5px !important;
    line-height: 1 !important;
    font-weight: 950 !important;
    background: rgba(236,249,234,.82) !important;
    border: 1px solid rgba(31,112,58,.12) !important;
    box-shadow: none !important;
    max-width: 160px !important;
    overflow: hidden !important;
    white-space: nowrap !important;
    text-overflow: ellipsis !important;
    opacity: 1 !important;
  }

  .logout-btn,
  a.logout-btn,
  button.logout-btn{
    min-height: 32px !important;
    padding: 0 14px !important;
    border-radius: 999px !important;
    font-size: 11.5px !important;
    line-height: 1 !important;
    font-weight: 950 !important;
    color: #fff !important;
    background: #ff6262 !important;
    border-color: #ff6262 !important;
    opacity: 1 !important;
    filter: none !important;
    box-shadow: 0 8px 18px rgba(255,99,99,.16) !important;
  }

  main,
  .main,
  .page,
  .page-wrap,
  .scene-page,
  .hero-page{
    padding-top: 10px !important;
  }

  .scene-wrap,
  .hero-wrap,
  .visual-wrap,
  .record-wrap,
  .asset-wrap,
  .brief-wrap,
  .about-wrap,
  .global-wrap,
  .tree-wrap,
  .power-wrap{
    margin-top: 10px !important;
  }

  .page-title,
  .section-title,
  .scene-title{
    font-size: 20px !important;
    line-height: 1.18 !important;
  }
}

/* 全站手机端树语小圆：默认只露图标，不再占半屏 */
@media (max-width: 980px){

  .tree-float,
  .record-float,
  .asset-float,
  .about-float,
  .global-float,
  .power-float,
  .cunyin-tree-voice,
  #treeFloat,
  #recordFloat,
  #assetFloat,
  #aboutFloat,
  #globalFloat,
  #powerFloat,
  #cunyinTreeVoice{
    position: fixed !important;
    right: 10px !important;
    bottom: 10px !important;
    left: auto !important;
    top: auto !important;
    z-index: 9999 !important;
    width: 46px !important;
    min-width: 46px !important;
    max-width: 46px !important;
    min-height: 46px !important;
    max-height: 46px !important;
    padding: 0 !important;
    border-radius: 999px !important;
    overflow: hidden !important;
    background: rgba(255,253,237,.88) !important;
    border: 1px solid rgba(31,112,58,.16) !important;
    box-shadow: 0 14px 34px rgba(38,82,46,.14) !important;
    backdrop-filter: blur(12px) !important;
  }

  .tree-float-title,
  .tree-float-body,
  .tree-float-text,
  .tree-float-en,
  .tree-float-chips,
  .record-float-title,
  .record-float-body,
  .record-float-text,
  .record-float-en,
  .record-float-chips,
  .asset-float-title,
  .asset-float-body,
  .asset-float-text,
  .asset-float-en,
  .asset-float-chips,
  .about-float-title,
  .about-float-body,
  .about-float-text,
  .about-float-en,
  .about-float-chips,
  .global-float-title,
  .global-float-body,
  .global-float-text,
  .global-float-en,
  .global-float-chips,
  .power-float-title,
  .power-float-body,
  .power-float-text,
  .power-float-en,
  .power-float-chips,
  .voice-label,
  .voice-text,
  .voice-en{
    display: none !important;
  }

  .tree-float-head,
  .record-float-head,
  .asset-float-head,
  .about-float-head,
  .global-float-head,
  .power-float-head{
    width: 46px !important;
    height: 46px !important;
    min-height: 46px !important;
    padding: 0 !important;
    display: grid !important;
    place-items: center !important;
    background: transparent !important;
    border: 0 !important;
  }

  .tree-float-icon,
  .record-float-icon,
  .asset-float-icon,
  .about-float-icon,
  .global-float-icon,
  .power-float-icon,
  .voice-icon{
    width: 36px !important;
    height: 36px !important;
    border-radius: 999px !important;
    display: grid !important;
    place-items: center !important;
    margin: 0 !important;
    font-size: 19px !important;
    background: rgba(255,255,255,.72) !important;
    border: 1px solid rgba(31,112,58,.10) !important;
    box-shadow: none !important;
  }

  .tree-float > *:first-child,
  .record-float > *:first-child,
  .asset-float > *:first-child,
  .about-float > *:first-child,
  .global-float > *:first-child,
  .power-float > *:first-child,
  #cunyinTreeVoice > *:first-child{
    width: 46px !important;
    height: 46px !important;
    min-height: 46px !important;
    display: grid !important;
    place-items: center !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .tree-float:not(.is-folded),
  .record-float:not(.is-folded),
  .asset-float:not(.is-folded),
  .about-float:not(.is-folded),
  .global-float:not(.is-folded),
  .power-float:not(.is-folded){
    width: 46px !important;
    max-width: 46px !important;
    min-height: 46px !important;
    max-height: 46px !important;
    border-radius: 999px !important;
  }
}

@media (max-width: 430px){

  .nav,
  nav.nav,
  .main-nav,
  .top-nav{
    gap: 10px !important;
  }

  .nav a,
  nav.nav a,
  .main-nav a,
  .top-nav a{
    font-size: 12.5px !important;
  }

  .nav a span,
  nav.nav a span,
  .main-nav a span,
  .top-nav a span{
    font-size: 7.5px !important;
  }

  .site-logo-img,
  .logo img,
  .site-logo img,
  .brand img,
  .brand-logo img{
    height: 28px !important;
    max-height: 28px !important;
  }

  .language-select,
  select.language-select,
  .lang-select,
  select.lang-select{
    max-width: 92px !important;
    font-size: 10.5px !important;
  }

  .login-pill,
  .cy-pill,
  .user-pill,
  .account-pill{
    max-width: 145px !important;
    font-size: 11px !important;
    padding-left: 9px !important;
    padding-right: 9px !important;
  }

  .logout-btn,
  a.logout-btn,
  button.logout-btn{
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
}

@media (min-width: 981px){
  /* 电脑端不影响 */
}
/* CUNYIN V30：电脑端隐藏手机树语，手机端继续显示
   解决电脑端出现裸文字 Tree Voice / Record Voice / Asset Voice 的问题。
*/

/* 默认全部隐藏，尤其保护电脑端 */
.mytree-soft-voice,
.asset-soft-voice,
.global-soft-voice,
.power-soft-voice,
.record-soft-voice,
.about-soft-voice {
  display: none !important;
}

/* 手机端恢复浮动树语 */
@media (max-width: 980px) {
  .mytree-soft-voice,
  .asset-soft-voice,
  .global-soft-voice,
  .power-soft-voice,
  .record-soft-voice,
  .about-soft-voice {
    display: flex !important;
  }
}
/* CUNYIN V30.6：手机版详情区舒展补丁
   只处理算力卡 / 资产简报 / 全球善意等下方详情板块上下被压的问题。
   不改顶部主图，不改按钮，不改数据库，不改 JS。
*/

@media (max-width: 980px) {
  main.page {
    overflow-x: hidden !important;
    padding-bottom: calc(132px + env(safe-area-inset-bottom)) !important;
  }

  /* 算力卡详情区 */
  .detail-section,
  .life-module {
    height: auto !important;
    min-height: auto !important;
    max-height: none !important;
    overflow: visible !important;
  }

  .life-module {
    padding: 18px 14px 22px !important;
    margin: 18px 10px !important;
    border-radius: 26px !important;
  }

  .life-top {
    gap: 12px !important;
    margin-bottom: 14px !important;
    align-items: flex-start !important;
  }

  .life-top h3,
  .life-head-island h3,
  .album-head h3,
  .growth-journal-head h3,
  .postcard-head h3 {
    font-size: 23px !important;
    line-height: 1.28 !important;
    margin-bottom: 8px !important;
  }

  .life-sub,
  .life-top p,
  .life-head-island p,
  .album-head p,
  .growth-journal-head p,
  .postcard-head p {
    font-size: 14px !important;
    line-height: 1.62 !important;
  }

  .life-grid,
  .album-grid-2,
  .postcard-grid-2,
  .tree-grid-2 {
    grid-template-columns: 1fr !important;
    gap: 14px !important;
  }

  .life-card,
  .tree-island,
  .album-card,
  .postcard-card,
  .modal-list-item,
  .letter-card {
    height: auto !important;
    min-height: auto !important;
    max-height: none !important;
    overflow: visible !important;
    padding: 18px 16px !important;
    border-radius: 24px !important;
    line-height: 1.62 !important;
  }

  .life-card b,
  .tree-island b,
  .album-card b,
  .postcard-card b,
  .modal-list-item b,
  .letter-card b,
  .card-title {
    font-size: 18px !important;
    line-height: 1.35 !important;
    margin-bottom: 8px !important;
  }

  .life-card p,
  .tree-island p,
  .album-card p,
  .postcard-card p,
  .modal-list-item,
  .letter-card p {
    font-size: 14px !important;
    line-height: 1.68 !important;
  }

  /* 三根线 / 时间线 / 证明线 */
  .story-time-line,
  .ripple-path,
  .postcard-flow {
    gap: 12px !important;
  }

  .story-step,
  .path-row,
  .postcard-flow-row,
  .proof-item {
    height: auto !important;
    min-height: 74px !important;
    padding: 14px !important;
    border-radius: 20px !important;
    align-items: flex-start !important;
  }

  .story-step i,
  .proof-icon {
    width: 42px !important;
    height: 42px !important;
    min-width: 42px !important;
    font-size: 20px !important;
  }

  .story-step b,
  .proof-item b {
    font-size: 17px !important;
    line-height: 1.35 !important;
  }

  .story-step span,
  .proof-item span {
    font-size: 13px !important;
    line-height: 1.55 !important;
  }

  /* 资产简报卡牌册 */
  .album-page,
  .postcard-page,
  .letter-page,
  .tree-field {
    height: auto !important;
    min-height: auto !important;
    max-height: none !important;
    overflow: visible !important;
    padding: 16px 12px !important;
    border-radius: 24px !important;
  }

  .collectible-card {
    height: auto !important;
    min-height: auto !important;
    padding: 18px 14px !important;
    border-radius: 26px !important;
  }

  .collectible-art {
    width: 150px !important;
    height: 150px !important;
    max-width: 72vw !important;
    margin: 8px auto 14px !important;
  }

  .collectible-card h4 {
    font-size: 24px !important;
    line-height: 1.26 !important;
  }

  .album-note,
  .postcard-note,
  .life-voice,
  .letter-note {
    height: auto !important;
    min-height: auto !important;
    padding: 15px 14px !important;
    border-radius: 20px !important;
    font-size: 14px !important;
    line-height: 1.68 !important;
    margin-top: 14px !important;
  }

  .album-note b,
  .postcard-note b,
  .life-voice span,
  .letter-note b {
    display: inline-block !important;
    margin-right: 6px !important;
  }

  /* 全球善意统计卡 */
  .postcard-place-cloud,
  .postcard-stream,
  .modal-list {
    gap: 12px !important;
  }

  .world-map-card {
    min-height: 220px !important;
    border-radius: 24px !important;
  }

  .postcard-ripple,
  .ripple-orb {
    width: 128px !important;
    height: 128px !important;
    font-size: 42px !important;
    margin: 8px auto !important;
  }

  /* 底部按钮不要贴住内容 */
  .life-actions,
  .modal-actions,
  .tree-float-actions {
    margin-top: 16px !important;
    gap: 10px !important;
  }
}

@media (max-width: 420px) {
  .life-module {
    margin: 16px 8px !important;
    padding: 16px 12px 20px !important;
  }

  .life-card,
  .tree-island,
  .album-card,
  .postcard-card,
  .modal-list-item,
  .letter-card {
    padding: 16px 14px !important;
  }

  .life-top h3,
  .life-head-island h3,
  .album-head h3,
  .growth-journal-head h3,
  .postcard-head h3 {
    font-size: 22px !important;
  }

  .collectible-art {
    width: 138px !important;
    height: 138px !important;
  }
}
/* CUNYIN V30.8：手机端性能轻量化补丁
   目标：降低手机卡顿，不改结构、不改按钮、不改登录、不改提交。
*/

@media (max-width: 980px) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.12s !important;
    scroll-behavior: auto !important;
  }

  body,
  main,
  .page,
  .scene-card,
  .stage,
  .login-card,
  .brand-panel,
  .life-module,
  .album-page,
  .postcard-page,
  .tree-field,
  .detail-section {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }

  .scene-card,
  .stage,
  .login-card,
  .life-module,
  .album-page,
  .postcard-page,
  .tree-field,
  .detail-section,
  .life-card,
  .album-card,
  .postcard-card,
  .tree-island,
  .modal-list-item,
  .letter-card {
    box-shadow: 0 8px 22px rgba(33,92,52,.08) !important;
  }

  .hotspot,
  .node,
  .asset-float,
  .global-float,
  .power-voice,
  .record-float,
  .about-float,
  .mytree-soft-voice,
  .asset-soft-voice,
  .global-soft-voice,
  .power-soft-voice,
  .record-soft-voice,
  .about-soft-voice {
    filter: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }

  .mytree-soft-voice,
  .asset-soft-voice,
  .global-soft-voice,
  .power-soft-voice,
  .record-soft-voice,
  .about-soft-voice {
    will-change: auto !important;
  }

  img,
  .scene-bg,
  .hero-bg,
  .world-map-card,
  .collectible-art {
    image-rendering: auto !important;
  }
}
/* CUNYIN V30.9：电脑端性能轻量化补丁
   目标：减少电脑端卡顿。
   不改结构、不改按钮、不改登录、不改提交。
*/

@media (min-width: 981px) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.08s !important;
    scroll-behavior: auto !important;
  }

  body,
  main,
  .page,
  .stage,
  .scene-card,
  .scene-bg,
  .brand-panel,
  .login-card,
  .life-module,
  .album-page,
  .postcard-page,
  .tree-field,
  .detail-section {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }

  .stage,
  .scene-card,
  .brand-panel,
  .login-card,
  .life-module,
  .album-page,
  .postcard-page,
  .tree-field,
  .detail-section,
  .life-card,
  .album-card,
  .postcard-card,
  .tree-island,
  .modal-list-item,
  .letter-card {
    box-shadow: 0 10px 26px rgba(33,92,52,.08) !important;
  }

  .hotspot,
  .node,
  .asset-float,
  .global-float,
  .record-float,
  .about-float,
  .power-voice,
  .mytree-soft-voice,
  .asset-soft-voice,
  .global-soft-voice,
  .power-soft-voice,
  .record-soft-voice,
  .about-soft-voice {
    filter: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    will-change: auto !important;
  }

  .hotspot,
  .node {
    box-shadow: 0 6px 18px rgba(90, 78, 38, .12) !important;
  }

  img,
  .scene-bg,
  .hero-bg,
  .world-map-card,
  .collectible-art {
    image-rendering: auto !important;
  }
}