* { box-sizing: border-box; }
:root {
  --blue: #287cf2;
  --blue-deep: #2149a6;
  --blue-light: #edf5ff;
  --ink: #252a32;
  --muted: #8c96a6;
  --bg: #f2f4f9;
  --line: #e9edf3;
  --orange: #ff873e;
  --u: 1px;
}
html, body {
  margin: 0; width: 100%; height: 100%; overflow: hidden;
  background: #eef1f6; color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", sans-serif;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
button, input, select { font: inherit; }
button { cursor: pointer; -webkit-tap-highlight-color: transparent; }
.app-shell {
  width: min(100vw, 480px); height: 100dvh; margin: 0 auto;
  display: flex; flex-direction: column; position: relative; overflow: hidden;
  background: var(--bg); box-shadow: 0 0 34px rgba(24, 41, 70, .08);
}
.safe-top { height: env(safe-area-inset-top, 0px); flex: 0 0 auto; background: #fff; }
.topbar {
  height: 58px; flex: 0 0 58px; background: #fff; display: flex; align-items: center;
  justify-content: space-between; padding: 0 16px; position: relative; z-index: 10;
  border-bottom: 1px solid rgba(30, 55, 90, .04);
}
.topbar.home-top {
  height: 68px; flex-basis: 68px; background: transparent; color: #fff; border: 0;
}
.app-shell.home-active::before {
  content: ""; position: absolute; z-index: 0; pointer-events: none;
  top: 0; left: 0; right: 0; height: 405px;
  background: url('./assets/home-hero-original.jpg') center center / cover no-repeat;
}
.app-shell.home-active .safe-top { background: transparent; }
.app-shell.home-active .topbar.home-top { background: transparent; }
.app-shell.home-active .page-scroll.home-page { position: relative; z-index: 1; background: transparent; }
.topbar-title {
  position: absolute; left: 70px; right: 70px; text-align: center; font-size: 21px;
  font-weight: 750; color: #101114; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.topbar.home-top .topbar-title { position: static; text-align: left; font-family: serif; font-size: 27px; color: #fff; }
.top-action {
  border: 0; background: transparent; min-width: 34px; height: 42px; padding: 0 3px;
  display: grid; place-items: center; color: #34383e; font-size: 28px; line-height: 1;
}
.top-action.right { margin-left: auto; font-size: 24px; letter-spacing: 2px; }
.topbar.home-top .top-action { color: #fff; }
.mode-switch {
  border: 1px solid rgba(255,255,255,.28); border-radius: 22px; padding: 3px;
  display: flex; gap: 2px; background: rgba(255,255,255,.17);
}
.mode-switch button {
  border: 0; border-radius: 18px; background: transparent; color: #fff; padding: 7px 13px;
  font-weight: 700; font-size: 14px;
}
.mode-switch button.active { background: #fff; color: var(--blue); box-shadow: 0 1px 5px #163e8a55; }
.page-scroll {
  flex: 1 1 auto; min-height: 0; overflow-y: auto; overflow-x: hidden;
  -webkit-overflow-scrolling: touch; overscroll-behavior-y: contain;
  scrollbar-width: none; background: var(--bg); padding-bottom: 22px;
}
.page-scroll::-webkit-scrollbar { display: none; }
.page-scroll.home-page { background: #fff; padding-bottom: 18px; }
.bottom-nav {
  flex: 0 0 auto; min-height: calc(66px + env(safe-area-inset-bottom, 0px));
  padding: 7px 8px calc(7px + env(safe-area-inset-bottom, 0px));
  display: flex; justify-content: space-around; align-items: center; background: #fff;
  border-top: 1px solid #e7ebf1; z-index: 12;
}
.bottom-nav.hidden { display: none; }
.tab-item {
  flex: 1; display: flex; align-items: center; justify-content: center; flex-direction: column;
  gap: 3px; border: 0; background: transparent; color: #112b50; font-size: 12px; font-weight: 600;
  padding: 0; min-width: 0;
}
.tab-item .tab-icon { width: 26px; height: 26px; display: grid; place-items: center; }
.tab-item svg { width: 25px; height: 25px; stroke: currentColor; }
.tab-item.active { color: var(--blue); }
.tab-item.center .tab-icon {
  width: 43px; height: 43px; border-radius: 50%; color: white; background: var(--blue);
  box-shadow: 0 3px 9px #287cf244; margin-top: -13px;
}
.tab-item.center svg { width: 27px; height: 27px; }
.toast {
  position: absolute; z-index: 100; left: 50%; bottom: calc(78px + env(safe-area-inset-bottom, 0px));
  transform: translate(-50%, 10px); background: rgba(25,31,43,.88); color: #fff;
  padding: 10px 16px; border-radius: 22px; font-size: 13px; line-height: 1.4;
  max-width: 86%; text-align: center; opacity: 0; pointer-events: none; transition: .18s ease;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* Home */
.home-hero {
  position: relative; color: #fff; padding: 17px 18px 24px; min-height: 310px; overflow: hidden;
  background: transparent;
}
.home-hero::before, .home-hero::after { display: none; }
.hero-actions { display: flex; gap: 28px; margin-top: 28px; position: relative; z-index: 3; }
.hero-action { display: flex; flex: 1; flex-direction: column; align-items: center; gap: 7px; color: #fff; font-size: 16px; font-weight: 700; }
.hero-action svg { width: 39px; height: 39px; stroke: #fff; stroke-width: 1.8; }
.home-search {
  position: relative; z-index: 5; margin-top: 125px; height: 50px; border-radius: 30px;
  background: #1d214f88; border: 1px solid #ffffff77; display: flex; align-items: center;
  padding: 0 16px; gap: 10px; backdrop-filter: blur(12px);
}
.home-search input { flex: 1; min-width: 0; color: #fff; border: 0; outline: 0; background: transparent; font-size: 17px; }
.home-search input::placeholder { color: #fff; opacity: .92; }
.home-search button { color: #fff; border: 0; background: transparent; font-size: 16px; font-weight: 800; }
.home-panel {
  position: relative; z-index: 6; margin-top: 0; background: #fff; border-radius: 26px 26px 0 0;
  padding: 25px 18px 24px;
}
.service-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px 8px; }
.service-tile { display: flex; flex-direction: column; align-items: center; gap: 9px; border: 0; background: transparent; color: #333; padding: 0; font-weight: 600; font-size: 14px; }
.service-icon {
  width: 56px; height: 56px; border-radius: 17px; color: white; display: grid; place-items: center;
  box-shadow: 0 4px 10px rgba(25,80,170,.09);
}
.service-icon svg { width: 31px; height: 31px; stroke: currentColor; }
.icon-blue { background: #327eff; } .icon-purple { background: #9272fa; }
.icon-cyan { background: #08c4ce; } .icon-orange { background: #ff9254; }
.news-strip { margin: 25px 0 28px; background: #eff5ff; border-radius: 13px; padding: 12px 13px; display: flex; align-items: center; gap: 8px; color: #303a4c; font-size: 13px; overflow: hidden; }
.news-tag { color: #1556a9; font-weight: 900; white-space: nowrap; }
.news-text { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; flex: 1; }
.home-section-head { display: flex; align-items: center; justify-content: space-between; margin: 8px 0 16px; }
.home-section-head strong { font-size: 20px; color: #111; }
.home-section-head span { color: #9299a5; font-weight: 700; }
.quick-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.quick-item {
  background: #f2f8ff; border: 1px solid #e0edff; border-radius: 18px; padding: 17px 14px;
  display: flex; align-items: center; gap: 12px; font-size: 16px; font-weight: 650; color: #333;
}
.quick-item svg { width: 28px; height: 28px; stroke: #2c8bfa; flex: 0 0 auto; }

/* Generic page layout */
.page-pad { padding: 18px 16px 28px; }
.section-title { font-size: 19px; font-weight: 800; margin: 4px 0 18px; display: flex; align-items: center; gap: 9px; }
.section-title::before { content: ""; width: 5px; height: 21px; background: linear-gradient(#56a2ff, #1768e7); border-radius: 4px; }
.card { background: #fff; border-radius: 17px; box-shadow: 0 8px 22px rgba(38,70,120,.07); }
.blue-profile {
  color: #fff; border-radius: 22px; padding: 24px 22px 20px; min-height: 175px;
  background: linear-gradient(120deg, #3157bf, #17337f); position: relative; overflow: hidden; margin-bottom: 25px;
}
.blue-profile::after { content: "ZJ"; position: absolute; right: 10px; top: 4px; font-weight: 900; font-size: 82px; color: #ffffff1d; font-style: italic; }
.blue-profile h2 { margin: 0 0 24px; font-size: 20px; letter-spacing: 1px; position: relative; z-index: 1; }
.profile-row { display: flex; justify-content: space-between; align-items: center; color: #d4e0ff; font-size: 15px; margin-top: 20px; position: relative; z-index: 1; }
.profile-row strong { color: #fff; font-size: 17px; }
.insurance-card { overflow: hidden; margin-bottom: 22px; border-radius: 18px; background: #fff; box-shadow: 0 9px 22px rgba(31,67,120,.08); }
.insurance-head {
  min-height: 112px; padding: 20px 18px 14px; color: #fff; position: relative;
  background: linear-gradient(112deg, #397ee6, #2457b6);
}
.insurance-head::after { content: "♙"; position: absolute; right: 25px; top: 14px; color: #ffffff55; font-size: 58px; font-weight: 300; }
.insurance-name { display: flex; align-items: center; gap: 12px; font-size: 19px; font-weight: 800; position: relative; z-index: 1; }
.insurance-name .symbol { width: 30px; height: 30px; display: grid; place-items: center; }
.insurance-meta { display: flex; justify-content: space-between; gap: 8px; margin-top: 20px; position: relative; z-index: 1; }
.pill {
  display: inline-flex; align-items: center; gap: 7px; background: #ffffff32; border-radius: 20px;
  padding: 6px 12px; font-size: 12px; font-weight: 700; color: #fff; white-space: nowrap;
}
.dot { width: 8px; height: 8px; border-radius: 50%; background: #0bc48c; }
.dot.orange { background: #ff8b24; }
.insurance-actions { display: grid; grid-template-columns: 1fr 1fr; height: 56px; align-items: center; }
.insurance-actions button { height: 32px; border: 0; background: #fff; color: #2469d8; font-size: 15px; font-weight: 800; }
.insurance-actions button + button { border-left: 1px solid #d8dfeb; }
.notice {
  padding: 13px 16px; background: #fffdf0; color: #ff781d; font-size: 13px; line-height: 1.7;
  margin: 0 -16px 15px; font-weight: 600;
}
.blue-banner {
  background: linear-gradient(115deg, #1689e5, #0877d0); min-height: 190px; color: #fff;
  padding: 38px 20px 30px; position: relative; overflow: hidden;
}
.blue-banner::after { content: ""; position: absolute; right: -25px; bottom: -80px; width: 250px; height: 250px; border: 1px solid #ffffff22; border-radius: 50%; box-shadow: 0 0 0 35px #ffffff08, 0 0 0 75px #ffffff06; }
.blue-banner h1 { margin: 0 0 22px; font-size: 32px; text-align: center; font-weight: 500; }
.blue-banner p { margin: 0; text-align: center; font-size: 18px; font-weight: 750; }
.pay-services {
  margin: -28px 16px 22px; position: relative; background: #fff; border-radius: 25px;
  padding: 25px 14px 28px; box-shadow: 0 9px 22px rgba(0,0,0,.11);
}
.pay-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px 6px; }
.pay-service { display: flex; flex-direction: column; align-items: center; gap: 9px; border: 0; background: transparent; color: #343434; font-size: 13px; font-weight: 650; }
.pay-icon { width: 62px; height: 62px; border-radius: 24px; display: grid; place-items: center; color: white; }
.pay-icon svg { width: 32px; height: 32px; stroke: currentColor; }
.pay-icon.orange { background: #ff7c32; } .pay-icon.violet { background: #7885f6; }
.pay-icon.green { background: #76d5b6; } .pay-icon.pink { background: #f16e8e; }
.pay-icon.blue { background: #58aaf4; } .pay-icon.yellow { background: #f7b95e; }
.pay-icon.red { background: #f15445; }
.service-description { color: #333; font-size: 14px; line-height: 1.95; text-align: justify; padding: 0 22px 22px; }

/* Contributions: real DOM list with normal touch scrolling */
.contribution-tabs {
  height: 48px; display: flex; align-items: center; justify-content: center; background: #fff;
  border-bottom: 2px solid #168ee9; color: #168ee9; font-size: 15px; font-weight: 700;
}
.contribution-wrap { padding: 22px 14px 30px; }
.contribution-card {
  background: #fff; border: 1px solid #dce7f9; border-top: 5px solid #3d80e7;
  border-radius: 19px; padding: 21px 19px 22px; margin: 0 0 22px;
  box-shadow: 0 8px 20px rgba(33,68,120,.08);
}
.contribution-card .field { font-size: 15px; line-height: 1.5; margin: 0 0 20px; color: #303030; font-weight: 600; overflow-wrap: anywhere; }
.contribution-card .field:last-child { margin-bottom: 0; }
.contribution-card .field strong { font-weight: 800; }
.contribution-card .field .value { margin-left: 7px; font-weight: 600; }
.page-end { text-align: center; color: #98a8c1; font-size: 12px; padding: 5px 0 25px; }

/* Payment list */
.person-banner { background: linear-gradient(120deg, #168ce5, #0879d2); padding: 23px 20px; color: #fff; min-height: 145px; }
.person-info { display: flex; align-items: center; gap: 15px; }
.avatar { width: 54px; height: 54px; border-radius: 50%; background: #fff; color: #65b6ee; display: grid; place-items: center; font-size: 27px; }
.person-info strong { font-size: 18px; }
.person-info small { display: block; margin-top: 7px; font-size: 15px; }
.payment-tabs { display: flex; justify-content: space-around; background: #fff; padding: 14px 0 10px; color: #444; font-weight: 700; }
.payment-tabs button { border: 0; background: transparent; color: inherit; padding: 5px 12px 11px; font-size: 15px; }
.payment-tabs button.active { color: var(--blue); border-bottom: 3px solid var(--blue); }
.due-card {
  background: #fff; padding: 20px 18px; margin: 14px 14px 17px; border-radius: 14px;
  border-top: 4px solid #dce5f1; box-shadow: 0 3px 12px #263e6610; position: relative;
}
.due-card.selected { border-top-color: #2e7ff0; }
.due-month { font-size: 17px; font-weight: 850; margin-bottom: 17px; }
.due-details { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 8px; }
.due-detail label { display: block; color: #9299a3; font-size: 12px; margin-bottom: 5px; }
.due-detail strong { color: #f0443e; font-size: 19px; }
.due-detail.wide { grid-column: 1 / -1; }
.due-detail.wide strong { color: #555; font-size: 14px; }
.due-check {
  position: absolute; right: 14px; top: 14px; width: 25px; height: 25px; border: 1px solid #d7dce5;
  border-radius: 50%; display: grid; place-items: center; color: #fff; background: #fff;
}
.due-check.checked { background: #2d80ef; border-color: #2d80ef; }
.pay-fixed {
  position: sticky; bottom: 0; z-index: 8; background: #fff; border-top: 1px solid #e7eaf0;
  padding: 12px 15px calc(12px + env(safe-area-inset-bottom, 0px)); display: flex; align-items: center; gap: 10px;
  box-shadow: 0 -3px 12px #15294b0b;
}
.pay-fixed .all-select { border: 0; background: transparent; display: flex; align-items: center; gap: 7px; color: #444; padding: 0; white-space: nowrap; font-size: 14px; }
.round-check { width: 21px; height: 21px; border: 1px solid #d4d9e1; border-radius: 50%; display: grid; place-items: center; color: white; }
.round-check.checked { background: #2e7ff0; border-color: #2e7ff0; }
.total-text { font-size: 13px; color: #555; white-space: nowrap; }
.total-text strong { font-size: 22px; color: #ff4a42; margin-left: 3px; }
.pay-cta { margin-left: auto; border: 0; border-radius: 7px; background: #79b8f1; color: #fff; padding: 12px 23px; font-size: 15px; font-weight: 800; }
.pay-cta.enabled { background: #1688e8; }

/* Records */
.filter-row { display: flex; align-items: center; justify-content: space-between; padding: 17px 20px; background: #fff; color: #555; }
.filter-row select { border: 0; background: transparent; color: #666; font-size: 15px; outline: 0; padding: 5px; }
.record-card { padding: 20px 18px 17px; background: #fff; margin-bottom: 10px; }
.record-title { font-size: 17px; font-weight: 800; margin-bottom: 18px; }
.record-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
.record-grid label { display: block; color: #999; font-size: 12px; margin-bottom: 5px; }
.record-grid strong { font-size: 18px; color: #424242; }
.record-bottom { display: flex; justify-content: space-between; margin-top: 17px; color: #777; font-size: 13px; }
.record-bottom b { color: #444; }

/* Certificate query */
.form-card { background: #fff; padding: 0 17px; }
.form-row { min-height: 60px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid #f0f1f4; font-size: 15px; }
.form-row:last-child { border-bottom: 0; }
.form-label { color: #3f434a; font-weight: 650; white-space: nowrap; }
.form-value { color: #858d9a; display: flex; align-items: center; gap: 8px; text-align: right; }
.form-value strong { color: #333; font-weight: 650; }
.chevron { color: #a4abb4; font-size: 22px; }
.primary-button { display: block; width: calc(100% - 32px); margin: 27px 16px; border: 0; border-radius: 30px; background: #168de6; color: #fff; padding: 16px; font-size: 18px; font-weight: 800; box-shadow: 0 4px 12px #168de633; }
.secondary-note { padding: 8px 18px 22px; font-size: 12px; color: #9299a3; line-height: 1.7; }
.segment-tabs { display: flex; background: #fff; }
.segment-tabs button { flex: 1; border: 0; background: #fff; padding: 16px 5px; color: #333; font-size: 15px; font-weight: 700; border-bottom: 2px solid transparent; }
.segment-tabs button.active { color: #168de6; border-color: #168de6; }

/* Modal pickers and preview route switch */
.overlay {
  position: absolute; inset: 0; z-index: 40; background: rgba(10,20,36,.38);
  display: flex; align-items: flex-end; justify-content: center;
}
.sheet {
  width: 100%; max-width: 480px; background: #fff; border-radius: 20px 20px 0 0;
  padding: 13px 18px calc(20px + env(safe-area-inset-bottom, 0px)); max-height: 78%;
  overflow-y: auto; animation: rise .18s ease-out;
}
@keyframes rise { from { transform: translateY(20px); opacity: .5; } to { transform: translateY(0); opacity: 1; } }
.sheet-head { display: flex; justify-content: space-between; align-items: center; padding: 5px 0 13px; font-size: 16px; font-weight: 800; }
.sheet-head button { border: 0; background: transparent; color: #78808c; font-size: 14px; }
.sheet-option { width: 100%; border: 0; border-top: 1px solid #f0f1f3; background: #fff; padding: 15px 5px; text-align: center; font-size: 16px; color: #4d5562; }
.sheet-option.active { color: #111; font-weight: 800; }
.sheet-confirm { width: 100%; margin-top: 14px; border: 0; border-radius: 25px; background: #168de6; color: #fff; padding: 13px; font-size: 16px; font-weight: 800; }
.route-list { max-height: 55vh; overflow-y: auto; }
.route-list button { width: 100%; text-align: left; padding: 13px 8px; border: 0; border-top: 1px solid #f0f2f5; background: #fff; color: #313946; font-size: 15px; }
.route-list button small { display: block; color: #9aa3b1; font-size: 11px; margin-top: 3px; }
.page-intro { color: #8b95a4; font-size: 12px; line-height: 1.6; padding: 0 16px 15px; }
@media (min-width: 481px) {
  body { display: flex; align-items: center; justify-content: center; }
  .app-shell { height: min(100dvh, 960px); border-radius: 22px; overflow: hidden; }
}
@media (max-width: 360px) {
  .service-icon { width: 49px; height: 49px; }
  .service-tile { font-size: 12px; }
  .pay-icon { width: 55px; height: 55px; }
  .contribution-card { padding: 18px 16px; }
}


/* V6 screenshot framing and native navigation corrections */
.app-shell.chrome-hidden .safe-top,
.app-shell.chrome-hidden .topbar {
  display: none;
}
.app-shell.home-active::before {
  display: none;
}
.screenshot-hero {
  width: 100%;
  overflow: hidden;
  background: #fff;
}
.screenshot-hero img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
  object-position: top center;
}
.home-screenshot-hero,
.social-screenshot-hero {
  height: auto;
  background: transparent;
}
.home-screenshot-hero img,
.social-screenshot-hero img {
  width: 100%;
  height: auto;
  object-fit: contain;
}
.home-panel {
  position: relative;
  z-index: 6;
  margin-top: -1px;
  background: #fff;
  border-radius: 26px 26px 0 0;
  padding: 25px 18px 24px;
}
.social-content-pad {
  padding-top: 14px;
}
.social-group-card {
  padding: 14px 12px;
  margin-bottom: 14px;
}
.social-group-title {
  margin: 0 0 12px;
}
.social-grid {
  grid-template-columns: 1fr 1fr;
  gap: 18px 5px;
}
.social-service-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 0;
  background: transparent;
  color: #27354e;
  text-align: left;
  padding: 4px 5px;
  font-size: 14px;
  font-weight: 650;
}
.social-service-icon {
  color: #3a8bf0;
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 34px;
}
.social-service-icon svg {
  width: 30px;
  height: 30px;
  stroke: currentColor;
}
.full-screenshot-page {
  width: 100%;
  background: #fff;
}
.full-screenshot-page img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
}
