:root {
  color-scheme: only light;
  --ink: #333333;
  --label: #333333;
  --muted: #999999;
  --cyan: #00BEC9;
  --tab-selected: #00BEC9;
  --page: #fff;
  --line: #eeeeee;
  --chip-on: #e6e6e6;
  --title: #333333;
  --chip-mint: #EBFFFB;
  --chip-sky: #F2FBFF;
  --chip-ice: #F1FAFF;
  --chip-sand: #FFFAF4;
  /* 1px = 1 Android dp：viewport 已是 width=device-width，不再按 375 拉伸 */
  --u: 1px;
  --nav-h: calc(44 * var(--u));
  --tab-h: calc(56 * var(--u));
  --cred-icon: calc(65 * var(--u));
  --cred-icon-radius: calc(10 * var(--u));
  --cred-glyph: calc(45 * var(--u));
  --cred-gap: calc(8 * var(--u));
  --cred-top: calc(14 * var(--u));
  --label-size: calc(15 * var(--u));
  --section-title: calc(18 * var(--u));
  --nav-title: calc(20 * var(--u));
  --tab-ico: calc(24 * var(--u));
  --tab-font: calc(12 * var(--u));
  --abroad-pad: calc(85 * var(--u));
  --abroad-pad-radius: calc(10 * var(--u));
  --abroad-ico: calc(65 * var(--u));
  --abroad-label: calc(15 * var(--u));
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--page);
  color: var(--ink);
  font-family: "Roboto", "Noto Sans SC", "Noto Sans CJK SC", "Source Han Sans SC", "PingFang SC", "Hiragino Sans GB", sans-serif;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  -ms-text-size-adjust: 100%;
  touch-action: manipulation;
  -ms-touch-action: manipulation;
  -ms-overflow-style: none;
  scrollbar-width: none;
  overscroll-behavior-y: none;
}

html::-webkit-scrollbar,
body::-webkit-scrollbar,
*::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
  background: transparent;
}

body {
  padding-top: calc(var(--nav-h) + env(safe-area-inset-top));
  padding-bottom: calc(var(--tab-h) + env(safe-area-inset-bottom));
}

html.ios26 body {
  padding-bottom: calc(78px + env(safe-area-inset-bottom));
}

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  height: calc(var(--nav-h) + env(safe-area-inset-top));
  padding: env(safe-area-inset-top) calc(48 * var(--u)) 0;
  background: #fff;
  overflow: hidden;
}

.nav::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  height: 1px;
  background: #e5e5e5;
  pointer-events: none;
}

html.ios26 .nav {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.86), rgba(255, 255, 255, 0.62));
  -webkit-backdrop-filter: blur(28px) saturate(160%) brightness(1.12);
  backdrop-filter: blur(28px) saturate(160%) brightness(1.12);
}

.nav-title {
  margin: 0;
  font-size: var(--nav-title);
  font-weight: 500;
  line-height: var(--nav-h);
  color: var(--title);
  letter-spacing: 0;
}

.scan {
  position: absolute;
  top: env(safe-area-inset-top);
  right: 0;
  width: calc(44 * var(--u));
  height: var(--nav-h);
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

.scan[hidden] {
  display: none;
}

.scan img {
  width: calc(22 * var(--u));
  height: calc(22 * var(--u));
  object-fit: contain;
}

html.ios26 .scan {
  right: 12px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(255, 255, 255, 0.55));
  -webkit-backdrop-filter: blur(20px) saturate(160%) brightness(1.12);
  backdrop-filter: blur(20px) saturate(160%) brightness(1.12);
  box-shadow:
    inset 0 0.6px 0 rgba(255, 255, 255, 0.95),
    0 1px 3px rgba(0, 0, 0, 0.06),
    0 4px 12px rgba(0, 0, 0, 0.06);
}

html.ios26 .scan img {
  width: 20px;
  height: 20px;
}

.mj-header {
  position: fixed;
  top: calc(var(--nav-h) + env(safe-area-inset-top));
  left: 0;
  right: 0;
  z-index: 9;
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  transform: translate3d(0, calc(-54px + var(--mj-pull, 0px)), 0);
  transition: var(--mj-ease, none);
  pointer-events: none;
}

html.on-me .mj-header {
  display: none;
}

.mj-arrow {
  width: 15px;
  height: 40px;
  margin-right: 25px;
  object-fit: contain;
  transition: transform 0.25s;
}

.mj-header.is-pulling .mj-arrow {
  transform: rotate(180deg);
}

.mj-header.is-refreshing .mj-arrow {
  display: none;
}

.mj-spinner {
  display: none;
  width: 20px;
  height: 20px;
  margin-right: 25px;
  border: 2px solid #c8c8c8;
  border-top-color: #5a5a5a;
  border-radius: 50%;
  animation: mj-spin 0.8s linear infinite;
}

.mj-header.is-refreshing .mj-spinner {
  display: block;
}

@keyframes mj-spin {
  to {
    transform: rotate(360deg);
  }
}

.mj-state {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
  color: #5a5a5a;
}

.mj-time {
  margin-top: 5px;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.2;
  color: #5a5a5a;
}

.page {
  min-height: calc(100vh - var(--nav-h) - env(safe-area-inset-top) - var(--tab-h) - env(safe-area-inset-bottom));
  transform: translate3d(0, var(--mj-pull, 0px), 0);
  transition: var(--mj-ease, none);
}

html.ios26 .page {
  min-height: calc(100vh - var(--nav-h) - env(safe-area-inset-top) - 78px - env(safe-area-inset-bottom));
}

.block {
  padding: calc(10 * var(--u)) calc(10 * var(--u)) calc(4 * var(--u));
}

.block-abroad {
  padding-top: 18px;
}

.block-title {
  margin: 0 0 calc(6 * var(--u));
  padding: 0 calc(4 * var(--u));
  font-size: var(--section-title);
  font-weight: 700;
  line-height: 1.2;
  color: var(--title);
}

.grid-cred {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
}

.cred {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--cred-gap);
  padding-top: var(--cred-top);
  color: inherit;
  text-decoration: none;
}

.is-dead {
  pointer-events: none;
  cursor: default;
}

.cred-icon {
  width: var(--cred-icon);
  height: var(--cred-icon);
  border-radius: var(--cred-icon-radius);
  background: var(--chip-mint);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  forced-color-adjust: none;
}

.chip-mint .cred-icon,
.chip-mint.abroad {
  background: var(--chip-mint);
}

.chip-sky .cred-icon,
.chip-sky.abroad {
  background: var(--chip-sky);
}

.chip-ice .cred-icon,
.chip-ice.abroad {
  background: var(--chip-ice);
}

.chip-sand .cred-icon,
.chip-sand.abroad {
  background: var(--chip-sand);
}

.cred-icon img {
  width: var(--cred-glyph);
  height: var(--cred-glyph);
  object-fit: contain;
}

.cred span:last-child {
  font-size: var(--label-size);
  line-height: 1.2;
  text-align: center;
  color: var(--label);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.banner {
  display: block;
  margin: calc(10 * var(--u)) calc(4 * var(--u)) calc(4 * var(--u));
  overflow: hidden;
  border-radius: calc(10 * var(--u));
  max-height: calc(80 * var(--u));
}

.banner img {
  display: block;
  width: 100%;
  height: auto;
  max-height: calc(80 * var(--u));
  object-fit: cover;
}

.grid-abroad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  column-gap: calc(12 * var(--u));
  row-gap: calc(12 * var(--u));
  width: 100%;
  margin-left: 0;
  margin-right: 0;
}

.abroad {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 0;
  padding: calc(14 * var(--u)) calc(8 * var(--u)) calc(12 * var(--u));
  color: inherit;
  text-decoration: none;
  border-radius: calc(8 * var(--u));
  background: var(--chip-sky);
  forced-color-adjust: none;
}

.abroad-icon {
  box-sizing: border-box;
  width: var(--abroad-pad);
  height: var(--abroad-pad);
  padding: calc(10 * var(--u));
  border-radius: var(--abroad-pad-radius);
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}

.abroad-icon img {
  width: var(--abroad-ico);
  height: var(--abroad-ico);
  object-fit: contain;
}

.abroad span {
  margin-top: calc(8 * var(--u));
  font-size: var(--abroad-label);
  font-weight: 400;
  line-height: 1.2;
  text-align: center;
  color: var(--label);
}

.news-item {
  display: block;
  padding: 16px 20px 14px;
  background: #fff;
  border-bottom: 0.5px solid var(--line);
  text-decoration: none;
  color: inherit;
}

.news-item h3 {
  margin: 0 0 8px;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.45;
  color: var(--title);
}

.news-item time {
  font-size: 12px;
  color: #b3b3b3;
}

.news-empty {
  margin: 80px 20px 0;
  text-align: center;
  font-size: 14px;
  color: #999;
}

html.on-me,
html.on-me body {
  background: #f5f5f5;
}

.page-me {
  background: #f5f5f5;
  padding-top: 0;
}

.me-login {
  position: relative;
  display: flex;
  align-items: center;
  height: 70px;
  padding: 0 15px;
  background: #fff;
  color: var(--ink);
  text-decoration: none;
  overflow: hidden;
}

.me-bg {
  position: absolute;
  right: -8px;
  bottom: -18px;
  width: 118px;
  height: 98px;
  background: rgba(0, 0, 0, 0.06);
  -webkit-mask: url("./assets/MeBg2_MeBg2.png?v=20261012001849") center / contain no-repeat;
  mask: url("./assets/MeBg2_MeBg2.png?v=20261012001849") center / contain no-repeat;
  pointer-events: none;
}

.me-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  flex: 0 0 36px;
}

.me-login-txt {
  margin-left: 12px;
  font-size: 16px;
  font-weight: 500;
  z-index: 1;
}

.me-user {
  display: flex;
  flex-direction: column;
  justify-content: center;
  margin-left: 12px;
  min-width: 0;
  z-index: 1;
}

.me-name {
  display: flex;
  align-items: center;
  font-size: 18px;
  font-weight: 400;
  line-height: 1.2;
  color: var(--ink);
}

.me-auth {
  height: 16px;
  width: auto;
  margin-left: 6px;
  object-fit: contain;
}

.me-phone {
  margin-top: 4px;
  font-size: 12px;
  line-height: 1.2;
  color: var(--ink);
}

.me-chevron {
  width: 8px;
  height: 16px;
  margin-left: auto;
  object-fit: contain;
}

.me-list {
  margin-top: 10px;
  background: #fff;
}

.me-list a {
  display: flex;
  align-items: center;
  height: 50px;
  padding: 0 15px;
  color: var(--ink);
  text-decoration: none;
  font-size: 16px;
  background: #fff;
}

.me-list a + a {
  box-shadow: inset 0 0.33px 0 #ebebeb;
}

.me-list a > img:first-child {
  width: 20px;
  height: 20px;
  margin-right: 12px;
  object-fit: contain;
}

.tabbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10;
  display: flex;
  justify-content: center;
  height: calc(var(--tab-h) + env(safe-area-inset-bottom));
  padding: 0 0 env(safe-area-inset-bottom);
  background: rgba(249, 249, 249, 0.94);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  backdrop-filter: blur(20px) saturate(180%);
  box-shadow: 0 -0.33px 0 rgba(0, 0, 0, 0.18);
}

.tabbar-pill {
  width: 100%;
  height: var(--tab-h);
  padding: 0;
  display: flex;
  align-items: stretch;
  background: none;
}

.tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  border: 0;
  background: none;
  color: var(--ink);
  font: inherit;
  font-size: var(--tab-font);
  font-weight: 400;
  line-height: 1;
  padding: 0;
}

.tab-ico {
  width: var(--tab-ico);
  height: var(--tab-ico);
  display: flex;
  align-items: center;
  justify-content: center;
}

.tab img {
  width: var(--tab-ico);
  height: var(--tab-ico);
  object-fit: contain;
}

.tab .i-on {
  display: none;
}

.tab .i-off {
  display: block;
}

.tab.on {
  color: var(--tab-selected);
}

.tab.on .i-on {
  display: block;
}

.tab.on .i-off {
  display: none;
}

html.ios26 .tabbar {
  height: auto;
  padding: 0 13.4vw calc(10px + env(safe-area-inset-bottom));
  background: none;
  box-shadow: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  pointer-events: none;
}

html.ios26 .tabbar-pill {
  pointer-events: auto;
  max-width: 360px;
  height: 64px;
  padding: 4px 8px 6px;
  border-radius: 32px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(255, 255, 255, 0.52));
  -webkit-backdrop-filter: blur(28px) saturate(160%) brightness(1.14);
  backdrop-filter: blur(28px) saturate(160%) brightness(1.14);
  box-shadow:
    inset 0 0.7px 0 rgba(255, 255, 255, 0.95),
    inset 0 0 0 0.5px rgba(255, 255, 255, 0.55),
    0 1px 2px rgba(0, 0, 0, 0.04),
    0 10px 28px rgba(0, 0, 0, 0.08);
}

html.ios26 .tab {
  gap: 3px;
}

html.ios26 .tab-ico {
  width: 56px;
  height: 32px;
  border-radius: 16px;
  flex: 0 0 32px;
}

html.ios26 .tab.on .tab-ico {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.62));
  -webkit-backdrop-filter: blur(16px) saturate(160%) brightness(1.16);
  backdrop-filter: blur(16px) saturate(160%) brightness(1.16);
  box-shadow:
    inset 0 0.6px 0 rgba(255, 255, 255, 1),
    0 2px 8px rgba(0, 0, 0, 0.1),
    0 6px 16px rgba(0, 0, 0, 0.06);
}

/* iOS PWA：安卓 65dp 在 iPhone 上偏大，按原壳更紧的一档 */
html.ios-chsi {
  --cred-icon: 54px;
  --cred-icon-radius: 8px;
  --cred-glyph: 36px;
  --cred-gap: 6px;
  --cred-top: 10px;
  --label-size: 13px;
  --section-title: 16px;
  --nav-title: 17px;
  --abroad-pad: 70px;
  --abroad-pad-radius: 8px;
  --abroad-ico: 52px;
  --abroad-label: 13px;
}

html.ios-chsi .block {
  padding: 8px 12px 2px;
}

html.ios-chsi .block-title {
  margin-bottom: 4px;
}

html.ios-chsi .banner {
  margin: 8px 8px 2px;
  max-height: 68px;
}

html.ios-chsi .banner img {
  max-height: 68px;
}

html.ios-chsi .grid-abroad {
  column-gap: 10px;
  row-gap: 10px;
}

html.ios-chsi .abroad {
  padding: 10px 6px 8px;
}
