:root { color-scheme: light; --ink: #090e38; --muted: #697792; --blue: #199cff; --line: #e4edfc; }
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scrollbar-gutter: stable; }
body { margin: 0; overflow-x: hidden; color: var(--ink); background: #f6faff; font-family: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
img { display: block; max-width: 100%; }
.ui-icon { display: block; overflow: visible; flex: 0 0 auto; }
h1, h2, h3, p { margin: 0; }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 3px solid #199cff; outline-offset: 4px; }
.wrap { width: min(90.3%, 1200px); margin-inline: auto; }
.hero {
  position: relative; isolation: isolate; overflow: hidden; min-height: clamp(480px, 26vw + 240px, 520px);
  background:
    url('/static/img/referral/hero-background.png?v=20260909-151445') center / cover no-repeat,
    linear-gradient(116deg, #f2f8ff 0%, #e8f3ff 46%, #dcecff 100%);
}
.button {
  border: 1px solid #199cff; border-radius: 28px; background: #199cff; color: #fff;
  min-height: 43px; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  font-weight: 600; box-shadow: 0 5px 10px rgba(25, 156, 255, .24); padding: 8px 26px; transition: filter .15s, transform .15s;
}
.button:not(.disabled):hover { filter: brightness(1.07); transform: translateY(-1px); }
/* .button 自带 display:inline-flex，会盖掉浏览器默认的 [hidden]{display:none}。
   票根上的「注册并领取邀请码」与「复制邀请链接」靠 hidden 互换，缺了这行两枚会同时出现。 */
.button[hidden] { display: none; }
.hero-content {
  display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); align-items: center;
  min-height: clamp(480px, 26vw + 240px, 520px); padding: 88px 0 28px; gap: clamp(16px, 2.5vw, 36px);
}
.hero-copy { position: relative; z-index: 2; width: 100%; max-width: 580px; }
h1 { font-size: clamp(24px, 2.5vw, 32px); line-height: 1.28; font-weight: 700; color: #172148; letter-spacing: -0.3px; }
h1 strong {
  display: block; margin-top: 8px; font-size: clamp(28px, 3.2vw, 42px); font-weight: 850;
  line-height: 1.22; letter-spacing: -0.5px;
  background: linear-gradient(105deg, #199cff 0%, #087fd9 100%);
  background-clip: text; -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.lead { font-size: clamp(14px, 1.1vw, 16px); margin: 14px 0 20px; line-height: 1.6; color: #4b5565; max-width: 560px; text-wrap: pretty; }
.lead > span { display: block; }
.lead > span + span { margin-top: 3px; }
.rewards {
  display: flex; background: rgba(255, 255, 255, 0.94); border: 1px solid rgba(255, 255, 255, 0.95);
  border-radius: 16px; width: min(100%, 480px); padding: 9px 16px; gap: 12px; margin-bottom: 20px;
  box-shadow: 0 6px 20px rgba(90, 126, 176, 0.07); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.rewards > div { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }
.rewards > div + div { border-left: 1px solid #dce8fa; padding-left: 14px; }
.rewards img { width: 40px; height: 40px; object-fit: contain; flex-shrink: 0; }
.rewards span { font-size: 13.5px; font-weight: 600; color: #374151; }
.rewards b { display: block; color: #0b7fda; font-size: 15px; font-weight: 700; white-space: nowrap; margin-top: 1px; }
.rewards small { display: block; margin-top: 2px; color: #697792; font-size: 10.5px; font-weight: 500; line-height: 1.35; }
.rewards > div + div b { color: #199cff; }
.ticket {
  position: relative; width: min(100%, 408px); aspect-ratio: 1859 / 846; min-height: 0; text-align: center;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  border: 0; border-radius: 0; background: transparent;
  padding: 20px 40px 18px; box-shadow: none;
}
.ticket::before, .ticket::after { content: none; }
.ticket-frame {
  position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%;
  object-fit: contain; pointer-events: none;
}
.ticket > :not(.ticket-frame) { position: relative; z-index: 3; }
.ticket-label { display: block; margin-bottom: 3px; font-size: 12px; line-height: 20px; font-weight: 600; color: #172148; }
.invite-code { margin-bottom: 5px; font-size: clamp(26px, 2.9vw, 31px); line-height: 1.22; font-weight: 800; letter-spacing: 1px; overflow-wrap: anywhere; }
.ticket-empty .invite-code { font-size: 22px; line-height: 1.5; letter-spacing: 0; }
.ticket .button { width: 78%; min-height: 34px; padding-inline: 7px; font-size: 14px; }
.ticket button .ui-icon, .ticket button img { width: 16px; height: 16px; }
.status {
  width: min(100%, 408px); font-size: 12.5px; line-height: 1.55; color: #7a4f01;
  background: rgba(254, 243, 199, 0.85); border: 1px solid rgba(245, 158, 11, 0.28);
  border-radius: 10px; padding: 8px 14px; margin-top: 14px; box-sizing: border-box;
}
.disabled { background: #7685a4; border-color: transparent; box-shadow: none; cursor: default; }
.hero-visual { position: relative; z-index: 1; min-width: 0; align-self: end; display: flex; justify-content: flex-end; align-items: center; gap: 12px; }
.hero-visual > img { width: min(64%, 340px); height: auto; flex: 0 1 auto; }
.hero-note {
  position: relative; z-index: 2; left: auto; top: auto; right: auto; bottom: auto;
  width: clamp(168px, 18vw, 210px); margin-top: 6%;
  padding: 0; border: 0; background: none; box-shadow: none;
  pointer-events: none; flex: 0 0 auto; align-self: center;
}
.hero-note img { width: 100%; height: auto; }
.section { padding: clamp(32px, 3.2vw, 44px) 0; }
.hero + .section, .section + .section { margin-top: clamp(18px, 2vw, 28px); }
.section-heading { display: flex; justify-content: center; align-items: center; gap: 14px; font-size: clamp(23px, 2.1vw, 30px); line-height: 1.35; font-weight: 750; margin-bottom: clamp(14px, 1.6vw, 20px); }
.section-heading .ui-icon { width: 30px; height: 30px; }
.benefits { background: #f7fbff; }
.benefit-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(13px, 1.5vw, 20px); }
.benefit-grid article { min-height: 112px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 12px; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 22px 16px 20px; box-shadow: 0 8px 22px rgba(25, 156, 255, .05); }
.benefit-grid img { width: 72px; height: 72px; object-fit: contain; flex-shrink: 0; }
.benefit-grid article:first-child img { transform: scale(1.18); }
.benefit-grid article > div { min-width: 0; }
h3 { font-size: 15px; line-height: 1.55; font-weight: 650; }
article p { color: var(--muted); font-size: 13px; line-height: 1.7; margin-top: 5px; }
.benefit-grid h3 { font-size: clamp(14px, 1.15vw, 16px); }
.benefit-grid p { font-size: 12px; }
.benefit-grid article:nth-child(3) img { width: 72px; height: 72px; }
.welfare { background: #eef7ff; }
.welfare-card {
  width: min(100%, 980px); margin-inline: auto; display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, .98fr);
  overflow: hidden; border: 1px solid #dcecff; border-radius: 22px;
  background: #fff; box-shadow: 0 18px 44px rgba(25, 156, 255, .10);
}
.welfare-photo { min-height: 390px; background: #dcecff; }
.welfare-photo img { width: 100%; height: 100%; object-fit: cover; }
.welfare-copy { display: flex; flex-direction: column; justify-content: center; padding: 34px 36px; }
.welfare-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.welfare-brand img { width: 118px; height: auto; }
.welfare-brand span {
  padding-left: 12px; border-left: 1px solid #d8e3f1;
  color: #47617d; font-size: 13px; font-weight: 650; letter-spacing: .08em;
}
.u-nowrap { white-space: nowrap; }
.welfare-copy h2 { font-size: clamp(23px, 2.05vw, 29px); line-height: 1.36; color: #15233f; }
.welfare-lead { margin-top: 14px; color: #455b74; font-size: 14px; line-height: 1.75; text-wrap: pretty; word-break: break-word; }
.welfare-project {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  margin-top: 18px; padding: 13px 16px; border-radius: 14px;
  background: rgba(25, 156, 255, .06); border: 1px solid rgba(25, 156, 255, .15);
}
.welfare-project-body { min-width: 0; flex: 1; }
.welfare-project-header { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.welfare-project-tag {
  display: inline-flex; align-items: center; padding: 1px 6px;
  font-size: 11px; font-weight: 600; color: #199cff; background: #fff;
  border: 1px solid rgba(25, 156, 255, .25); border-radius: 5px; line-height: 1.35;
}
.welfare-project strong { color: #0b7fda; font-size: 13px; font-weight: 650; }
.welfare-project-desc { margin: 5px 0 0; color: #5d7187; font-size: 12px; line-height: 1.55; text-wrap: pretty; word-break: break-word; }
.welfare-note { margin-top: 14px; color: #788798; font-size: 11.5px; line-height: 1.65; text-wrap: pretty; word-break: break-word; }
.welfare-link {
  display: inline-flex; align-items: center; flex-shrink: 0;
  padding: 6px 12px; border-radius: 8px; background: #fff;
  border: 1px solid rgba(25, 156, 255, .25); color: #199cff;
  font-size: 12px; font-weight: 650; white-space: nowrap; text-decoration: none;
  transition: all .15s ease;
}
.welfare-link:hover { background: #199cff; color: #fff; border-color: #199cff; }
.steps { padding-block: clamp(38px, 3.6vw, 50px); background: #eaf3ff; }
.step-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(16px, 2vw, 25px); }
.step-grid article { position: relative; display: flex; align-items: center; flex-direction: column; background: #ffffffd9; border-radius: 16px; padding: 18px 10px 20px; min-height: 198px; text-align: center; }
.step-icon {
  display: block; width: 88px; height: 88px; margin: 6px 0; flex: 0 0 88px;
  background: url('/static/img/referral/steps/step-icons-v2.png?v=20260910-1615') no-repeat;
  background-size: 200% 200%;
}
.step-icon-ticket { background-position: 0 0; }
.step-icon-share { background-position: 100% 0; }
.step-icon-phone-verified { background-position: 0 100%; }
.step-icon-gift { background-position: 100% 100%; }
.step-grid .connector { position: absolute; width: 28px; height: 28px; right: calc(clamp(16px, 2vw, 25px) * -1 - 2px); top: 54px; }
/* 被邀请人页只有三步（填码、验证、到账），没有「分享给好友」那一格。 */
.step-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.rules { padding-bottom: clamp(34px, 3.2vw, 44px); }
.rule-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(13px, 1.5vw, 20px); }
.rule-grid article { min-height: 116px; display: flex; align-items: center; gap: 16px; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 14px 18px; box-shadow: 0 8px 22px rgba(25, 156, 255, .05); }
.rule-grid .ui-icon { width: 64px; height: 64px; flex-shrink: 0; }
.rule-grid article > div { min-width: 0; text-align: left; }
.rule-grid h3 { color: #172148; font-size: clamp(14px, 1.05vw, 16px); line-height: 1.35; }
.rule-grid strong { display: block; margin-top: 2px; color: #172148; font-size: clamp(13px, .98vw, 15px); line-height: 1.45; font-weight: 650; }
.rule-grid p { margin: 3px 0 0; color: #8b96aa; font-size: 12px; line-height: 1.45; text-align: left; }
.notice { position: relative; margin: 38px 0 16px; background: #fff9e9; border: 1px solid #ffe1a1; border-radius: 14px; color: #25221c; }
.notice-summary { display: flex; align-items: center; gap: 12px; min-height: 72px; padding: 12px 18px; }
.notice-summary > .ui-icon { width: 44px; height: 44px; flex-shrink: 0; }
.notice-toggle { display: inline-flex; align-items: center; gap: 9px; margin-left: auto; padding: 8px 5px; border: 0; background: transparent; color: #a76f13; font: inherit; cursor: pointer; }
.notice-toggle[hidden] { display: none; }
.notice-toggle:focus-visible { outline: 2px solid #c68411; outline-offset: 3px; border-radius: 5px; }
.notice-open-label, .notice-close-label { font-size: 12px; font-weight: 600; }
.notice-close-label { display: none; }
.notice.is-expanded .notice-open-label { display: none; }
.notice.is-expanded .notice-close-label { display: inline; }
.notice-toggle::after { content: ""; width: 9px; height: 9px; margin: -5px 5px 0 0; border-right: 2px solid #c68411; border-bottom: 2px solid #c68411; transform: rotate(45deg); transition: transform .18s; }
.notice.is-expanded .notice-toggle::after { margin-top: 5px; transform: rotate(225deg); }
.notice h3 { font-size: 17px; }
.notice-content { padding: 0 18px 16px 74px; }
.notice.is-collapsible:not(.is-expanded) .notice-content p:nth-child(n + 4) { display: none; }
.notice p { font-size: 13px; line-height: 1.7; }
.notice p + p { margin-top: 6px; }
.bottom-banner {
  position: relative; width: min(100%, 640px); min-height: 160px; margin-inline: auto; border-radius: 18px; overflow: hidden;
  background:
    url('/static/img/referral/cta-banner-background-v4.png?v=20260910-4k') center / cover no-repeat,
    linear-gradient(115deg, #0969da, #199cff);
  display: grid; grid-template-columns: minmax(0, 1fr) auto;
  align-items: center; padding: 20px 30px; color: #fff; gap: 8px 16px;
}
.bottom-copy { position: relative; z-index: 1; min-width: 0; }
.bottom-banner h2 { font-size: clamp(24px, 2vw, 28px); line-height: 1.45; }
.bottom-banner p { font-size: 14px; letter-spacing: .5px; }
.bottom-button { position: relative; z-index: 1; background: #fff; color: #0754f8; border-color: #fff; min-height: 56px; min-width: 190px; font-size: 15px; padding-inline: 22px; gap: 8px; }
.bottom-button .ui-icon { display: none; }
.bottom-button[href]::after { content: ''; width: 7px; height: 7px; border-top: 2px solid currentColor; border-right: 2px solid currentColor; transform: rotate(45deg); margin-left: 2px; }
.bottom-button.disabled { color: #536483; }
.copy-status { position: fixed; bottom: 25px; left: 50%; transform: translateX(-50%); background: #142446; color: #fff; padding: 12px 22px; border-radius: 12px; box-shadow: 0 5px 30px #101d4433; z-index: 10; width: max-content; max-width: calc(100% - 32px); font-size: 14px; }
.copy-status:empty { display: none; }
.skip-link { position: absolute; top: -80px; z-index: 101; padding: 12px; background: #fff; }
.skip-link:focus { top: 10px; }

@media (min-width: 1600px) {
  .hero, .hero-content { min-height: 640px; }
  .hero-content { padding: 96px 0 28px; }
  .hero-visual { align-self: center; gap: 16px; }
  .hero-visual > img { width: min(72%, 440px); }
  .hero-note { width: clamp(180px, 10vw, 230px); margin-top: 4%; transform: translateY(28px); }
}

@media (max-width: 1023px) {
  .hero, .hero-content { min-height: 480px; }
  .hero-content {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    gap: 16px; padding: 88px 0 20px;
  }
  h1 { font-size: clamp(22px, 2.8vw, 28px); }
  h1 strong { font-size: clamp(24px, 3.4vw, 34px); margin-top: 6px; }
  .hero-visual > img { width: min(62%, 320px); }
  .hero-note { width: clamp(150px, 22vw, 188px); margin-top: 8%; }
  .benefit-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .benefit-grid article { padding-inline: 12px; }
  .benefit-grid img { width: 62px; height: 62px; }
  .benefit-grid article:nth-child(3) img { width: 58px; height: 58px; }
  .rule-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rule-grid article { padding-inline: 12px; gap: 8px; }
  .rule-grid .ui-icon { width: 58px; height: 58px; }
}

@media (max-width: 900px) {
  .step-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
  .step-grid .connector { display: none; }
}

@media (max-width: 640px) {
  .wrap { width: calc(100% - 36px); }
  .hero { min-height: 0; }
  .hero-content { display: flex; flex-direction: column; min-height: 0; padding: 76px 0 0; gap: 0; }
  .hero-copy { max-width: 500px; margin-inline: auto; }
  h1 { font-size: clamp(20px, 5.2vw, 25px); letter-spacing: -0.3px; }
  h1 strong { font-size: clamp(22px, 6.2vw, 30px); margin-top: 6px; letter-spacing: -0.5px; }
  .lead { font-size: 14px; margin: 12px 0 16px; }
  .rewards { width: 100%; flex-direction: column; gap: 8px; margin-bottom: 16px; padding: 10px 12px; }
  .rewards > div { width: 100%; }
  .rewards > div + div { border-left: 0; border-top: 1px solid #dce8fa; padding: 8px 0 0; }
  .rewards img { width: 36px; height: 36px; }
  .rewards span, .rewards b { font-size: 13px; }
  .ticket { width: 100%; min-height: 0; padding: 18px 30px 16px; }
  .status { width: 100%; }
  .invite-code { font-size: 26px; }
  .ticket-empty .invite-code { font-size: 19px; }
  .ticket .button { width: 82%; font-size: 13px; min-height: 34px; }
  .hero-visual { width: calc(100% + 36px); margin: 8px -18px 0; align-self: center; justify-content: center; }
  .hero-visual > img { width: min(62%, 250px); }
  .hero-note { width: min(38vw, 148px); margin-top: 4%; }
  .section { padding: 30px 0; }
  .hero + .section, .section + .section { margin-top: 14px; }
  .steps { padding-block: 34px; }
  .section-heading { font-size: 22px; gap: 10px; margin-bottom: 16px; }
  .section-heading .ui-icon { width: 27px; height: 27px; }
  .benefit-grid { grid-template-columns: 1fr; gap: 10px; }
  .benefit-grid article, .benefit-grid article:nth-child(3) { min-height: 96px; flex-direction: row; text-align: left; padding: 12px 16px; gap: 13px; }
  .benefit-grid img, .benefit-grid article:nth-child(3) img { width: 64px; height: 64px; }
  .benefit-grid h3, .benefit-grid article:nth-child(3) h3 { font-size: 14px; }
  .welfare-card { grid-template-columns: 1fr; }
  .welfare-photo { min-height: 0; aspect-ratio: 16 / 9; }
  .welfare-copy { padding: 26px 22px 28px; }
  .welfare-brand { margin-bottom: 14px; }
  .welfare-copy h2 { font-size: 23px; }
  .welfare-project { flex-direction: column; align-items: flex-start; gap: 10px; }
  .welfare-link { align-self: flex-start; }
  .step-grid { gap: 12px; }
  .step-grid article { min-height: 192px; padding: 16px 8px; }
  .step-icon { width: 80px; height: 80px; flex-basis: 80px; }
  .step-grid h3 { font-size: 14px; }
  .step-grid p { font-size: 12px; }
  .rule-grid { grid-template-columns: 1fr; gap: 10px; }
  .rule-grid article { min-height: 96px; padding: 12px 16px; gap: 13px; }
  .rule-grid .ui-icon { width: 56px; height: 56px; }
  .rule-grid h3 { font-size: 14px; }
  .rule-grid strong { font-size: 13px; }
  .notice { margin-top: 30px; }
  .notice-summary { min-height: 64px; padding: 10px 14px; gap: 10px; }
  .notice-summary > .ui-icon { width: 40px; height: 40px; }
  .notice-content { padding: 0 14px 14px 64px; }
  .notice p { font-size: 13px; }
  .bottom-banner { padding: 22px 16px 20px; grid-template-columns: 1fr; justify-items: center; text-align: center; gap: 8px; }
  .bottom-banner h2 { font-size: 23px; }
  .bottom-banner p { font-size: 12px; }
  .bottom-button { min-height: 48px; }
}

@media (max-width: 420px) {
  .wrap { width: calc(100% - 28px); }
  .hero-content { padding-top: 72px; }
  .rewards { padding-inline: 10px; }
  .rewards img { width: 34px; height: 34px; }
  .rewards span, .rewards b { font-size: 12.5px; }
  .hero-visual { width: calc(100% + 28px); margin: 8px -14px 0; }
  .step-icon { width: 72px; height: 72px; flex-basis: 72px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .button { transition: none; }
}
