/**
 * 旧版 iOS 兼容 + iOS 26+ App 下载引导
 */

/* 未判定前先隐藏正文，避免闪一下再跳下载页 */
html:not(.is-site-ok):not(.is-app-download) #site-root,
html:not(.is-site-ok):not(.is-app-download) #app-download-gate {
  visibility: hidden;
}

html.is-site-ok #site-root {
  display: block;
  visibility: visible;
}

html.is-app-download #site-root {
  display: none !important;
}

html.is-app-download #app-download-gate {
  display: block !important;
  visibility: visible;
}

html.is-site-ok #app-download-gate {
  display: none !important;
}

/* ---- 下载引导页 ---- */
.app-dl-gate {
  display: none;
  position: fixed;
  left: 0;
  top: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  z-index: 99999;
  background: #24282c;
  color: #fff;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  font-family: Arial, "PingFang SC", "Helvetica Neue", "微软雅黑", sans-serif;
}

.app-dl-inner {
  max-width: 420px;
  margin: 0 auto;
  padding: 48px 24px 40px;
  text-align: center;
  box-sizing: border-box;
}

.app-dl-logo {
  width: 72px;
  height: 72px;
  margin: 0 auto 18px;
  display: block;
}

.app-dl-brand {
  font-size: 22px;
  font-weight: 700;
  margin: 0 0 8px;
}

.app-dl-badge {
  display: inline-block;
  margin: 0 0 18px;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(38, 173, 96, 0.18);
  color: #73eca7;
  font-size: 12px;
  line-height: 1.4;
}

.app-dl-title {
  font-size: 26px;
  line-height: 1.35;
  margin: 0 0 12px;
  font-weight: 700;
}

.app-dl-desc {
  font-size: 14px;
  line-height: 1.7;
  color: #bcc2cc;
  margin: 0 0 22px;
}

.app-dl-meta {
  list-style: none;
  margin: 0 0 24px;
  padding: 0;
  text-align: left;
  background: #2f3337;
  border-radius: 10px;
  overflow: hidden;
}

.app-dl-meta li {
  display: block;
  padding: 12px 14px;
  border-bottom: 1px solid #3f4349;
  font-size: 13px;
  overflow: hidden;
}

.app-dl-meta li:last-child {
  border-bottom: 0;
}

.app-dl-meta .label {
  float: left;
  color: #8a9098;
}

.app-dl-meta .value {
  float: right;
  color: #fff;
  max-width: 62%;
  text-align: right;
  word-break: break-all;
}

.app-dl-actions {
  margin: 0 0 14px;
}

.app-dl-btn {
  display: block;
  width: 100%;
  box-sizing: border-box;
  height: 50px;
  line-height: 50px;
  text-align: center;
  border-radius: 8px;
  font-size: 17px;
  text-decoration: none;
  margin: 0 0 12px;
}

.app-dl-btn-primary {
  background: #f39b35;
  color: #fff;
}

.app-dl-btn-primary:hover,
.app-dl-btn-primary:active {
  background: #db8523;
  color: #fff;
}

.app-dl-btn-backup {
  background: transparent;
  color: #fff;
  border: 1px solid #fff;
}

.app-dl-btn-backup:hover,
.app-dl-btn-backup:active {
  background: #fff;
  color: #24282c;
}

.app-dl-note {
  font-size: 12px;
  color: #8a9098;
  line-height: 1.6;
  margin: 8px 0 0;
}

/* ---- 低版本 iOS 兼容补丁 ---- */
#banner .panel-left .hp-cta-row {
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-align: center;
  -webkit-align-items: center;
  align-items: center;
}

#banner .panel-left .hp-cta-row a.hp-link2 {
  margin-left: 18px;
}

#register .content {
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-align: center;
  -webkit-align-items: center;
  align-items: center;
  -webkit-box-pack: center;
  -webkit-justify-content: center;
  justify-content: center;
}

#register .content .hp-cta-btns a.hp-btn-sub {
  margin-left: 14px;
}

#center .KEFU {
  display: block;
}

@media (max-width: 768px) {
  #center {
    right: 12px;
    top: auto;
    bottom: 16px;
    width: 44px;
    height: auto;
  }
  #center .DF_SMS,
  #center .KEFU {
    width: 44px;
    height: 44px;
    margin: 0 0 10px;
    border-radius: 22px;
    overflow: hidden;
  }
  #center .DF_SMS span,
  #center .KEFU span {
    display: none;
  }
  #center .DF_SMS img,
  #center .KEFU img {
    margin-top: 7px;
  }
  #center_more {
    right: 12px;
    left: 12px;
    width: auto;
    top: auto;
    bottom: 70px;
    height: auto;
    max-height: 70%;
    overflow: auto;
  }
}

/* 旧系统不支持 sticky/fixed 组合时，至少保证可滚动 */
body {
  -webkit-text-size-adjust: 100%;
}
