:root {
  --red: #c41e3a;
  --red-dark: #9b1730;
  --red-deep: #7a1226;
  --gold: #e8b84a;
  --text: #222;
  --muted: #888;
  --line: #eee;
  --bg: #f5f5f5;
  --tab: 56px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  width: 100%;
  height: 100%;
  height: 100dvh;
  overflow: hidden;
  overscroll-behavior: none;
  background: #d8d8d8;
  font-family: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text);
  scrollbar-width: none;
  -ms-overflow-style: none;
}

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

* {
  scrollbar-width: none;
  -ms-overflow-style: none;
}

*::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font-family: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: default;
}

#app {
  height: 100%;
  height: 100dvh;
  overflow: hidden;
}

.app-root {
  height: 100%;
}

.phone.no-tab {
  padding-bottom: 0;
}

.phone {
  max-width: 430px;
  width: 100%;
  height: 100%;
  height: 100dvh;
  max-height: 100dvh;
  margin: 0 auto;
  background: #fff;
  position: relative;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: none;
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.12);
  padding-bottom: calc(var(--tab) + env(safe-area-inset-bottom, 0px));
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 88px;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.78);
  color: #fff;
  padding: 10px 16px;
  border-radius: 6px;
  font-size: 13px;
  z-index: 80;
  max-width: 80%;
  text-align: center;
}

/* header */
.site-hd {
  background: #fff;
  padding: 10px 14px 8px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.head-fixed {
  position: sticky;
  top: 0;
  z-index: 46;
  background: #fff;
}

.head-fixed .site-hd,
.head-fixed .top-nav {
  position: relative;
  z-index: 1;
}

.site-hd img {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  object-fit: contain;
  background: transparent;
}

.brand-name {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 1px;
  line-height: 1.15;
}

.brand-en {
  font-size: 10px;
  color: #999;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}

.top-nav {
  background: var(--red);
  color: #fff;
  display: flex;
  overflow-x: auto;
  scrollbar-width: none;
}

.top-nav::-webkit-scrollbar {
  display: none;
}

.top-nav a {
  flex: 1;
  text-align: center;
  padding: 10px 4px;
  font-size: 12px;
  white-space: nowrap;
  font-weight: 500;
}

.top-nav a.on {
  background: rgba(0, 0, 0, 0.12);
}

.hero {
  position: relative;
  height: 210px;
  overflow: hidden;
  background: #1a2330;
  cursor: pointer;
}

.hero img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 28%;
  display: block;
  opacity: 0;
  transition: opacity 0.55s ease;
}

.hero img.on {
  opacity: 1;
  z-index: 1;
}

.hero-cap {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.72));
  color: #fff;
  font-size: 13px;
  line-height: 1.45;
  padding: 28px 72px 10px 12px;
}

.hero-dots {
  position: absolute;
  right: 10px;
  bottom: 12px;
  z-index: 3;
  display: flex;
  gap: 5px;
}

.hero-dots i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.45);
  cursor: pointer;
}

.hero-dots i.on {
  width: 14px;
  border-radius: 4px;
  background: #fff;
}

.news-tabs {
  display: flex;
  border-bottom: 1px solid #f0f0f0;
  background: #fff;
  position: sticky;
  top: var(--head-h, 94px);
  z-index: 45;
}

.news-tabs button {
  flex: 1;
  border: 0;
  background: none;
  padding: 12px 0 10px;
  font-size: 14px;
  color: #333;
  position: relative;
}

.news-tabs button.on {
  color: var(--red);
  font-weight: 700;
}

.news-tabs button.on::after {
  content: "";
  position: absolute;
  left: 22%;
  right: 22%;
  bottom: 0;
  height: 2px;
  background: var(--red);
}

.news-list {
  padding: 0 16px 16px;
  background: #fff;
  min-height: 0;
}

.news-item {
  padding: 14px 0;
  border-bottom: 1px solid #f3f3f3;
}

.news-item h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.45;
}

.news-item .date {
  margin-top: 6px;
  color: #999;
  font-size: 12px;
}

.article {
  padding: 16px 16px 16px;
}

.article h1 {
  font-size: 20px;
  line-height: 1.4;
  margin: 0 0 8px;
}

.article .meta {
  color: #999;
  font-size: 12px;
  margin-bottom: 16px;
}

.article p {
  font-size: 15px;
  line-height: 1.8;
  color: #333;
}

.article p a {
  color: var(--red);
  text-decoration: underline;
}

/* mine */
.mine {
  background: var(--bg);
  min-height: 0;
  padding-bottom: 12px;
}

.mine-hd {
  background:
    radial-gradient(circle at 12% 20%, rgba(255, 255, 255, 0.08) 0 18px, transparent 19px),
    radial-gradient(circle at 80% 40%, rgba(255, 255, 255, 0.06) 0 22px, transparent 23px),
    linear-gradient(160deg, #c41e3a 0%, #8e152c 100%);
  color: #fff;
  padding: 22px 16px 48px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.avatar {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: #e8d5b5;
  display: grid;
  place-items: center;
  font-size: 26px;
  flex-shrink: 0;
  border: 2px solid rgba(255, 255, 255, 0.4);
}

.mine-hd h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
}

.mine-hd .uid {
  margin-top: 4px;
  font-size: 13px;
  opacity: 0.9;
}

.sign-chip {
  margin-left: auto;
  background: linear-gradient(90deg, #f3d27a, #e8b84a);
  color: #7a4a00;
  border: 0;
  border-radius: 20px;
  padding: 7px 12px;
  font-size: 12px;
  font-weight: 700;
}

.card {
  background: #fff;
  margin: -28px 12px 12px;
  border-radius: 10px;
  padding: 14px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.card + .card {
  margin-top: 0;
}

.card-hd {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.card-hd h3 {
  margin: 0;
  font-size: 15px;
}

.card-hd a,
.card-hd .link {
  color: #999;
  font-size: 13px;
  background: none;
  border: 0;
  padding: 0;
}

.wallet-box {
  text-align: center;
  padding: 8px 0 4px;
}

.wallet-box .label {
  color: #666;
  font-size: 13px;
}

.wallet-box .amt {
  margin-top: 6px;
  color: var(--red);
  font-size: 26px;
  font-weight: 700;
}

.row-btns {
  display: flex;
  gap: 10px;
  margin-top: 12px;
}

.row-btns button {
  flex: 1;
  height: 38px;
  border: 0;
  border-radius: 6px;
  font-size: 14px;
}

.btn-red {
  background: var(--red);
  color: #fff;
}

.btn-outline {
  background: #fff;
  color: var(--red);
  border: 1px solid var(--red) !important;
}

.invite-plain {
  padding: 4px 0 8px;
}

.code-line {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  margin-bottom: 10px;
}

.code-line b {
  letter-spacing: 1px;
}

.copy-mini {
  margin-left: auto;
  background: var(--red);
  color: #fff;
  border: 0;
  border-radius: 12px;
  padding: 3px 10px;
  font-size: 12px;
}

.rule {
  margin: 12px 12px 0;
  background: #fff7f0;
  border: 1px dashed #f0c9a8;
  border-radius: 8px;
  padding: 12px;
  font-size: 13px;
  color: #7a3b12;
  line-height: 1.7;
}

.rule strong {
  color: var(--red);
}

.team-tabs {
  display: flex;
  margin-top: 14px;
  gap: 8px;
}

.team-tabs button {
  flex: 1;
  height: 36px;
  border: 0;
  border-radius: 4px;
  background: #f6f6f6;
  color: #666;
  font-size: 13px;
}

.team-tabs button.on {
  background: var(--red-dark);
  color: #fff;
}

.team-stats {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.pill {
  flex: 1;
  text-align: center;
  border-radius: 16px;
  padding: 8px 4px;
  font-size: 12px;
}

.pill.pink {
  background: #f8d4d8;
  color: #8a1d2d;
}

.pill.yellow {
  background: #f6e7a8;
  color: #7a5a10;
}

.team-row {
  display: flex;
  justify-content: space-between;
  padding: 12px 2px 4px;
  font-size: 14px;
  color: #555;
}

.more {
  text-align: center;
  padding: 8px 0 4px;
  color: #444;
  font-size: 13px;
}

.page {
  min-height: 0;
  background: var(--bg);
  padding-bottom: 12px;
}

.bar {
  position: sticky;
  top: 0;
  z-index: 46;
  height: 46px;
  background: var(--red);
  color: #fff;
  display: flex;
  align-items: center;
  padding: 0 8px;
  font-size: 16px;
  font-weight: 600;
}

.bar .back {
  width: 36px;
  height: 36px;
  border: 0;
  background: none;
  color: #fff;
  font-size: 22px;
}

.bar span {
  flex: 1;
  text-align: center;
  margin-right: 36px;
}

.panel {
  background: #fff;
  margin: 12px;
  border-radius: 10px;
  padding: 16px;
}

.field {
  margin-bottom: 12px;
}

.field label {
  display: block;
  font-size: 13px;
  color: #666;
  margin-bottom: 6px;
}

.field input {
  width: 100%;
  height: 42px;
  border: 1px solid #e5e5e5;
  border-radius: 6px;
  padding: 0 12px;
  font-size: 15px;
  outline: none;
}

.field input:focus {
  border-color: var(--red);
}

.primary {
  width: 100%;
  height: 44px;
  border: 0;
  border-radius: 6px;
  background: var(--red);
  color: #fff;
  font-size: 16px;
}

.primary:disabled {
  opacity: 0.55;
}

.hint {
  text-align: center;
  color: #888;
  font-size: 13px;
  margin-top: 14px;
}

.hint a {
  color: var(--red);
}

.auth {
  min-height: 100%;
  background: linear-gradient(180deg, var(--red) 0 160px, var(--bg) 160px);
  padding: 36px 20px 40px;
}

.auth h1 {
  color: #fff;
  margin: 0 0 6px;
  font-size: 26px;
}

.auth .sub {
  color: rgba(255, 255, 255, 0.85);
  margin: 0 0 28px;
  font-size: 13px;
}

.auth .panel {
  margin: 0;
}

.list-row {
  display: flex;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid #f2f2f2;
  font-size: 14px;
}

.list-row .in {
  color: #16a34a;
}

.list-row .out {
  color: var(--red);
}

.fund-tabs {
  display: flex;
  gap: 8px;
  margin: 12px 0 4px;
  border-bottom: 1px solid #f2f2f2;
}

.fund-tabs button {
  flex: 1;
  border: 0;
  background: none;
  padding: 10px 0;
  font-size: 14px;
  color: #888;
}

.fund-tabs button.on {
  color: var(--red);
  font-weight: 700;
  box-shadow: inset 0 -2px 0 var(--red);
}

.fund-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 14px 0;
  border-bottom: 1px solid #f2f2f2;
}

.fund-title {
  font-size: 15px;
}

.fund-time {
  color: #999;
  font-size: 12px;
  margin-top: 4px;
}

.fund-right {
  text-align: right;
}

.fund-right .in,
.fund-right .out {
  font-size: 16px;
  font-weight: 600;
}

.fund-right .in {
  color: #16a34a;
}

.fund-right .out {
  color: var(--red);
}

.fund-right .status {
  margin-top: 6px;
}

.status {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 12px;
  background: #fff4e5;
  color: #d97706;
}

.status.ok {
  background: #e8f8ee;
  color: #15803d;
}

.status.off {
  background: #f3f3f3;
  color: #888;
}

.sign-page {
  padding-top: 0;
  min-height: 0;
  padding-bottom: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.phone.sign-fit {
  height: 100dvh;
  max-height: 100dvh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding-bottom: 0;
}

html:has(.sign-fit),
body:has(.sign-fit),
#app:has(.sign-fit) {
  height: 100%;
  max-height: 100dvh;
  overflow: hidden;
}

.phone.sign-fit .bar {
  flex-shrink: 0;
  position: relative;
}

.sign-banner {
  margin: 0;
  padding: 12px 12px 14px;
  background: linear-gradient(160deg, #c41e3a 0%, #8e152c 100%);
  color: #fff;
  flex-shrink: 0;
}

.sign-banner-nums {
  display: flex;
  align-items: center;
  justify-content: space-around;
  text-align: center;
}

.sign-banner-nums .n {
  font-size: 28px;
  font-weight: 800;
  line-height: 1.1;
}

.sign-banner-nums .unit {
  font-size: 14px;
  font-weight: 600;
  opacity: 0.85;
}

.sign-banner-nums .l {
  margin-top: 2px;
  font-size: 12px;
  opacity: 0.85;
}

.sign-banner-nums .split {
  width: 1px;
  height: 28px;
  background: rgba(255, 255, 255, 0.25);
}

.sign-main {
  flex: 1;
  min-height: 0;
  margin: 10px 12px calc(var(--tab) + 10px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.sign-week {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
  flex-shrink: 0;
}

.sign-day {
  flex: 1;
  text-align: center;
}

.sign-day .dot {
  width: 32px;
  height: 32px;
  margin: 0 auto 4px;
  border-radius: 50%;
  background: #f4f4f4;
  color: #999;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 700;
}

.sign-day.done .dot {
  background: var(--red);
  color: #fff;
}

.sign-day.today:not(.done) .dot {
  background: #fff;
  color: var(--red);
  border: 2px solid var(--red);
}

.sign-day .w {
  font-size: 11px;
  color: #888;
}

.sign-day.done .w,
.sign-day.today .w {
  color: var(--red);
}

.sign-main .primary {
  flex-shrink: 0;
}

.sign-balance {
  margin: 8px 0 10px;
  flex-shrink: 0;
}

.cal-hd {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin: 4px 0 8px;
  flex-shrink: 0;
}

.cal-hd h3 {
  margin: 0;
  font-size: 15px;
}

.cal-hd span {
  font-size: 12px;
  color: #888;
}

.cal-week {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  font-size: 12px;
  color: #999;
  margin-bottom: 4px;
  flex-shrink: 0;
}

.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  grid-template-rows: repeat(6, 1fr);
  flex: 1;
  min-height: 0;
}

.cal-cell {
  display: grid;
  place-items: center;
  font-size: 13px;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  margin: auto;
  color: #333;
}

.cal-cell.empty {
  visibility: hidden;
}

.cal-cell.done {
  background: var(--red);
  color: #fff;
  font-weight: 700;
}

.cal-cell.today:not(.done) {
  border: 1px solid var(--red);
  color: var(--red);
}

.tabbar {
  position: fixed;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 100%;
  max-width: 430px;
  height: calc(var(--tab) + env(safe-area-inset-bottom, 0px));
  padding-bottom: env(safe-area-inset-bottom, 0px);
  background: #fff;
  border-top: 1px solid #eee;
  display: flex;
  z-index: 50;
}

.tabbar a {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: #999;
  gap: 2px;
}

.tabbar a.on {
  color: var(--red);
}

.tabbar svg {
  width: 22px;
  height: 22px;
}

.empty {
  text-align: center;
  color: #aaa;
  padding: 24px 0;
  font-size: 13px;
}

.bank-stage {
  perspective: 900px;
  margin: 8px 0 4px;
  cursor: pointer;
}

.bank-inner {
  position: relative;
  aspect-ratio: 1.586;
  transform-style: preserve-3d;
  transition: transform 0.55s ease;
}

.bank-stage.flip .bank-inner {
  transform: rotateY(180deg);
}

.bank-face {
  position: absolute;
  inset: 0;
  border-radius: 14px;
  padding: 16px 18px;
  color: #fff;
  backface-visibility: hidden;
  box-shadow: 0 10px 24px rgba(140, 20, 40, 0.28);
  overflow: hidden;
}

.bank-front {
  background:
    radial-gradient(circle at 90% 0%, rgba(212, 175, 90, 0.35), transparent 46%),
    linear-gradient(135deg, #0b1f3a 0%, #163a6b 48%, #1f4f86 100%);
}

.bank-front::after {
  content: "";
  position: absolute;
  right: -40px;
  bottom: -50px;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
}

.bank-back {
  background: linear-gradient(135deg, #081526 0%, #14345c 100%);
  transform: rotateY(180deg);
  padding: 0 0 16px;
}

.bank-face-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.bank-name {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 1px;
}

.bank-sub {
  margin-top: 2px;
  font-size: 10px;
  letter-spacing: 1.5px;
  opacity: 0.8;
}

.bank-brand {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 2px;
  font-style: italic;
}

.bank-brand.visa {
  color: #fff;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.2);
  font-family: "Times New Roman", Georgia, serif;
  font-size: 22px;
  letter-spacing: 1px;
}

.bank-hk {
  align-self: flex-end;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  opacity: 0.9;
  border: 1px solid rgba(255, 255, 255, 0.45);
  padding: 3px 6px;
  border-radius: 3px;
}

.bank-chip-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 18px 0 12px;
}

.bank-chip {
  width: 38px;
  height: 28px;
  border-radius: 5px;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.12) 0 2px, transparent 2px 8px, rgba(0, 0, 0, 0.12) 8px 10px, transparent 10px),
    linear-gradient(180deg, rgba(0, 0, 0, 0.12) 0 2px, transparent 2px 12px, rgba(0, 0, 0, 0.12) 12px 14px, transparent 14px),
    linear-gradient(135deg, #f6e3a6, #c9a24a 45%, #f3d98a);
  box-shadow: inset 0 0 0 1px rgba(120, 80, 20, 0.35);
}

.bank-wave {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.55);
  border-left-color: transparent;
  border-bottom-color: transparent;
  transform: rotate(-20deg);
}

.bank-no {
  font-family: Consolas, "Courier New", monospace;
  font-size: 17px;
  letter-spacing: 2px;
  font-weight: 600;
}

.bank-meta {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-top: 16px;
  gap: 8px;
}

.bank-meta .k {
  font-size: 10px;
  opacity: 0.75;
  letter-spacing: 1px;
}

.bank-meta .v {
  margin-top: 3px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 1px;
}

.bank-mag {
  height: 42px;
  background: #1a1a1a;
  margin-top: 22px;
}

.bank-cvv-row {
  display: flex;
  align-items: center;
  margin: 18px 16px 0;
  background: #eee;
  border-radius: 4px;
  overflow: hidden;
}

.bank-sign {
  flex: 1;
  color: #888;
  font-size: 9px;
  padding: 10px 8px;
  font-style: italic;
}

.bank-cvv {
  min-width: 54px;
  background: #fff;
  color: #222;
  font-family: Consolas, monospace;
  font-size: 16px;
  font-weight: 700;
  text-align: center;
  padding: 8px 6px;
}

.bank-back-tip {
  margin: 14px 16px 0;
  font-size: 12px;
  opacity: 0.85;
}

.card-copy-row {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.card-copy-row button {
  flex: 1;
  height: 32px;
  border: 1px solid #f0c9d0;
  background: #fff8f8;
  color: var(--red);
  border-radius: 6px;
  font-size: 12px;
}

@media (min-width: 480px) {
  .toast {
    max-width: 390px;
  }
}
