:root {
  --bg: #0b0713;
  --bg-2: #120b1d;
  --surface: rgba(255, 255, 255, 0.045);
  --surface-2: #171021;
  --line: rgba(255, 255, 255, 0.09);
  --text: #f6f3fa;
  --muted: #b6aacb;
  --purple: #9b6cff;
  --purple-2: #e85cff;
  --pink: #ff2d6f;
  --green: #37d39a;
  --orange: #ff8f4d;
  --radius: 16px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --maxw: 1120px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  line-height: 1.55;
}
html[lang="ja"] body { font-family: "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Yu Gothic UI", "Yu Gothic", "Noto Sans JP", Meiryo, sans-serif; }
html[lang="ko"] body { font-family: "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", sans-serif; }
html[lang="zh-Hant"] body { font-family: "PingFang TC", "Microsoft JhengHei", "Noto Sans TC", sans-serif; }
html[lang="th"] body { font-family: "Sukhumvit Set", "Noto Sans Thai", "Leelawadee UI", Tahoma, sans-serif; }
html[lang="ar"] body { font-family: "SF Arabic", "Geeza Pro", "Noto Naskh Arabic", "Segoe UI", Tahoma, sans-serif; }

a { color: inherit; text-decoration: none; }
button, a { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--purple-2); outline-offset: 2px; }
img, svg { display: block; }
.wrap { max-width: var(--maxw); margin: 0 auto; padding-inline: clamp(22px, 5vw, 40px); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  min-height: 52px; padding: 0 22px;
  border-radius: 14px; border: none; cursor: pointer;
  font-family: inherit; font-size: 1rem; font-weight: 800;
  transition: transform 0.15s ease, filter 0.15s ease, box-shadow 0.15s ease;
}
.btn-primary { background: linear-gradient(90deg, var(--purple), var(--purple-2) 55%, var(--pink)); color: #fff; box-shadow: 0 12px 30px rgba(155, 108, 255, 0.35); }
.btn-primary:active { transform: translateY(1px); }
.btn-ghost { background: rgba(255, 255, 255, 0.05); color: var(--text); border: 1px solid var(--line); }
.btn-ghost:active { background: rgba(255, 255, 255, 0.1); }
.btn svg { width: 18px; height: 18px; fill: currentColor; flex: none; }
.btn-lg { min-height: 60px; padding: 0 32px; font-size: 1.08rem; }

/* ---------- Header ---------- */
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 18px clamp(22px, 5vw, 40px); }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.05rem; }
.brand .mark {
  width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--purple), var(--purple-2)); color: #fff;
  font-size: 0.82rem; font-weight: 900;
}
.brand .mark i { font-style: normal; filter: drop-shadow(0 0 4px rgba(255,255,255,0.5)); }
.top-right { display: flex; align-items: center; gap: 10px; }
.live-pill {
  display: none; align-items: center; gap: 8px; min-height: 38px; padding: 0 15px;
  border: 1px solid var(--line); border-radius: 999px;
  background: rgba(255, 255, 255, 0.04); color: var(--muted); font-size: 0.8rem; white-space: nowrap;
}
.live-pill .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px rgba(55, 211, 154, 0.16); animation: pulse 2.2s infinite; }

.lang-select { position: relative; }
.lang-select select {
  appearance: none; -webkit-appearance: none;
  min-height: 38px; 
  padding: 0 32px 0 16px; 
  border: 1px solid var(--line); border-radius: 999px;
  background: #0b0713; color: var(--text);
  font-family: inherit; font-size: 0.82rem; cursor: pointer;
  text-align: left;
}
.lang-select select option { background: #0b0713; color: var(--text); }
.lang-select::after {
  content: ""; position: absolute; inset-inline-end: 13px; top: 50%;
  width: 7px; height: 7px; border-inline-end: 1.5px solid var(--muted); border-bottom: 1.5px solid var(--muted);
  transform: translateY(-70%) rotate(45deg); pointer-events: none;
}

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; }
.hero-bg { position: absolute; inset: 0; pointer-events: none; }
.hero-bg .blob { position: absolute; border-radius: 50%; filter: blur(90px); opacity: 0.4; }
.hero-bg .b1 { width: 520px; height: 520px; background: #4a1a6e; top: -180px; inset-inline-start: -150px; }
.hero-bg .b2 { width: 430px; height: 430px; background: #1a2a6e; bottom: -150px; inset-inline-end: -90px; }
.hero-grid { position: relative; z-index: 2; display: grid; grid-template-columns: minmax(0, 1fr); gap: 30px; padding: clamp(24px, 5vw, 64px) clamp(22px, 5vw, 40px) clamp(36px, 6vw, 72px); }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 16px; color: var(--purple-2); font-size: 0.76rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.6px; }
.eyebrow::before { content: ""; width: 24px; height: 2px; border-radius: 2px; background: linear-gradient(90deg, var(--purple), var(--purple-2)); }
h1 { margin: 0 0 16px; font-size: clamp(2.15rem, 9.5vw, 4.1rem); line-height: 1.08; font-weight: 900; letter-spacing: -0.5px; }
.accent { background: linear-gradient(90deg, var(--purple), var(--purple-2) 55%, var(--pink)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.sub { max-width: 42ch; margin: 0 0 24px; color: var(--muted); font-size: clamp(0.98rem, 4vw, 1.15rem); line-height: 1.6; }
.hero-actions { display: grid; gap: 11px; max-width: 420px; }
.trust { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.trust .pill { display: inline-flex; align-items: center; gap: 7px; padding: 8px 13px; border-radius: 999px; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.04); color: var(--muted); font-size: 0.78rem; font-weight: 600; white-space: nowrap; }
.trust .pill svg { width: 13px; height: 13px; flex: none; }
.trust .pill.good svg { fill: var(--green); }
.trust .pill.hot svg { fill: var(--orange); }
.trust .pill.num svg { fill: var(--purple-2); }

/* ---------- Mini chart ---------- */
.stage { position: relative; max-width: 560px; }
.chart-card { position: relative; z-index: 2; padding: 22px 20px 18px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 34px 80px rgba(0, 0, 0, 0.5); overflow: hidden; }
.chart-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.chart-head .lbl { font-size: 0.8rem; font-weight: 800; color: var(--text); }
.chart-head .sub { inset: unset; margin: 0; color: var(--muted); font-size: 0.7rem; font-weight: 500; text-align: end; }
.bars { display: flex; align-items: flex-end; gap: clamp(6px, 2vw, 10px); height: 130px; }
.bar { flex: 1; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 7px; }
.bar-track { width: 100%; height: 100%; display: flex; align-items: flex-end; }
.bar .h { width: 100%; border-radius: 6px; background: linear-gradient(180deg, var(--purple-2), var(--purple)); transform-origin: bottom; height: var(--h); }
.chart-card.in .bar .h { height: var(--h); animation: barGrow 0.9s cubic-bezier(.2,.7,.3,1) both; animation-delay: calc(var(--i) * 0.09s); }
@keyframes barGrow { from { height: 6px; } to { height: var(--h); } }
.bar .l { color: var(--muted); font-size: 0.68rem; white-space: nowrap; }
.chart-card .note { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.72rem; display: flex; align-items: center; gap: 8px; }
.chart-card .note svg { width: 13px; height: 13px; fill: var(--green); flex: none; }

/* ---------- Sections ---------- */
.section { padding-top: clamp(16px, 3vw, 22px); padding-bottom: clamp(44px, 7vw, 76px); }
.sec-head { max-width: 620px; margin-bottom: clamp(20px, 3.4vw, 34px); }
.sec-head .kicker { color: var(--purple-2); font-size: 0.76rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.6px; margin: 0 0 8px; }
.sec-head h2 { margin: 0 0 10px; font-size: clamp(1.55rem, 6vw, 2.4rem); line-height: 1.16; font-weight: 900; letter-spacing: -0.4px; }
.sec-head p { margin: 0; color: var(--muted); font-size: 0.97rem; }
.sec-head.center { margin-inline: auto; text-align: center; }

/* ================== Featured Slider ================== */
.slider { position: relative; overflow: hidden; margin-bottom: 20px; }
.slides { display: flex; gap: 16px; transition: transform .4s ease; }
.slide { flex: 0 0 100%; min-width: 0; }
@media(min-width: 768px) { .slide { flex-basis: calc(50% - 8px); } }
@media(min-width: 1024px) { .slide { flex-basis: calc(33.333% - 11px); } }

.slider-nav { display: flex; justify-content: center; gap: 8px; margin-top: 24px; }
.slider-nav button { height: 8px; border: 0; border-radius: 99px; cursor: pointer; background: rgba(154,154,154,.3); transition: .25s; }
.slider-nav button.on { width: 24px; background: linear-gradient(90deg, var(--purple), var(--purple-2)); }
.slider-nav button:not(.on) { width: 8px; }

#featured-slides .card { 
  background: rgba(20,20,20,.8); 
  border: 1px solid var(--line); 
  border-radius: 16px; 
  overflow: hidden; 
  display: flex; 
  flex-direction: column; 
  transition: .25s; 
  height: 100%; 
}
#featured-slides .card:hover { 
  border-color: rgba(139,92,246,.6); 
  transform: translateY(-4px); 
  box-shadow: 0 20px 60px -15px rgba(139,92,246,.45); 
}
#featured-slides .card .thumb { position: relative; background: #1c1c1c; aspect-ratio: 16/9; overflow: hidden; }
#featured-slides .card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: .5s; }
#featured-slides .card:hover .thumb img { transform: scale(1.05); }
#featured-slides .card .thumb .hot { position: absolute; top: 8px; right: 8px; display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: 99px; font-size: 10px; font-weight: 800; background: linear-gradient(90deg, var(--purple), var(--purple-2)); color: #fff; }
#featured-slides .card .body { padding: 20px; display: flex; flex-direction: column; flex: 1; gap: 10px; }
#featured-slides .card .body .top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
#featured-slides .card .body h3 { font-size: 16px; line-height: 1.3; font-weight: 700; }
#featured-slides .card .badge { font-size: 10px; font-weight: 700; padding: 3px 10px; border-radius: 99px; white-space: nowrap; }
#featured-slides .card .badge.active { background: var(--purple); color: #fff; }
#featured-slides .card .badge.ended { background: #2a2a2a; color: var(--muted); border: 1px solid var(--line); }
#featured-slides .card .info { display: flex; flex-direction: column; gap: 6px; }
#featured-slides .card .info div { display: flex; gap: 8px; align-items: center; background: rgba(25,25,25,.7); border: 1px solid #222; border-radius: 9px; padding: 7px 10px; font-size: 12px; }
#featured-slides .card .info .k { color: var(--muted); flex-shrink: 0; }
#featured-slides .card .info .v { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#featured-slides .card .actions { display: flex; gap: 8px; margin-top: auto; }
#featured-slides .card .actions a { flex: 1; text-align: center; padding: 10px; border-radius: 11px; font-size: 12px; font-weight: 800; transition: .2s; }
#featured-slides .card .btn-d { background: #1d1d1d; border: 1px solid var(--line); color: var(--text); }
#featured-slides .card .btn-d:hover { border-color: var(--purple); color: var(--purple); }
#featured-slides .card .btn-j { background: linear-gradient(90deg, var(--purple), var(--purple-2)); color: #fff; }
#featured-slides .card .btn-j:hover { opacity: .9; }
#featured-slides .card .warn { margin-top: 10px; font-size: 10px; color: #6f6f6f; display: flex; gap: 5px; align-items: center; }

/* ---------- Stats ---------- */
.stats-inner { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 10px; padding: clamp(20px, 4vw, 32px); border: 1px solid var(--line); border-radius: 20px; background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02)); margin-bottom: clamp(40px, 7vw, 76px); }
.stat { text-align: center; }
.stat .val { font-size: clamp(1.35rem, 7vw, 2.1rem); font-weight: 900; letter-spacing: -0.5px; line-height: 1.1; }
.stat .val em { font-style: normal; background: linear-gradient(90deg, var(--purple), var(--purple-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat .lbl { margin-top: 4px; color: var(--muted); font-size: 0.78rem; }

/* ================== Feature cards ================== */
.cards { 
  display: grid; 
  grid-template-columns: 1fr; 
  gap: 16px; 
}
@media(min-width: 768px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
}
@media(min-width: 1024px) {
  .cards { grid-template-columns: repeat(3, 1fr); }
}

.feature-card { 
  display: flex; 
  gap: 16px; 
  align-items: flex-start; 
  padding: 24px; 
  border-radius: 16px; 
  border: 1px solid var(--line); 
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.015)); 
  transition: transform .2s, border-color .2s; 
}
.feature-card:hover { 
  border-color: rgba(155, 108, 255, 0.4); 
  transform: translateY(-2px); 
}
.feature-card .ic { 
  width: 48px; 
  height: 48px; 
  flex: none; 
  border-radius: 12px; 
  display: grid; 
  place-items: center; 
  background: linear-gradient(135deg, rgba(155, 108, 255, 0.18), rgba(232, 92, 255, 0.18)); 
  border: 1px solid rgba(232, 92, 255, 0.25); 
}
.feature-card .ic svg { 
  width: 22px; 
  height: 22px; 
  stroke: var(--purple-2); 
}
.feature-card > div {
  display: flex;
  flex-direction: column;
  gap: 6px; 
}
.feature-card h3 { 
  margin: 0; 
  font-size: 1.05rem; 
  font-weight: 800; 
  color: var(--text);
  line-height: 1.3;
}
.feature-card p { 
  margin: 0; 
  color: var(--muted); 
  font-size: 0.9rem; 
  line-height: 1.55; 
}

/* ---------- Steps ---------- */
.steps { display: grid; gap: 12px; counter-reset: step; }
@media(min-width: 720px) { .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.step { position: relative; padding: 22px 20px 20px; border-radius: var(--radius); border: 1px solid var(--line); background: rgba(255, 255, 255, 0.03); }
.step::before { counter-increment: step; content: counter(step, decimal-leading-zero); position: absolute; top: 18px; inset-inline-end: 18px; font-size: 1.4rem; font-weight: 900; color: rgba(255, 255, 255, 0.14); }
.step h3 { margin: 0 0 6px; font-size: 1.08rem; font-weight: 800; }
.step p { margin: 0; color: var(--muted); font-size: 0.9rem; }

/* ---------- CTA band ---------- */
.band { position: relative; overflow: hidden; text-align: center; padding: clamp(40px, 7vw, 68px) clamp(18px, 4vw, 40px); border: 1px solid var(--line); border-radius: 24px; background: radial-gradient(60% 120% at 50% 0%, rgba(155, 108, 255, 0.2), transparent 60%), radial-gradient(60% 120% at 50% 110%, rgba(232, 92, 255, 0.16), transparent 60%), linear-gradient(180deg, #16102a, #0d0a16); margin-bottom: clamp(40px, 7vw, 76px); }
.band h2 { margin: 0 0 12px; font-size: clamp(1.7rem, 7vw, 2.7rem); font-weight: 900; letter-spacing: -0.4px; line-height: 1.15; }
.band p { margin: 0 0 26px; color: var(--muted); font-size: 1rem; }
.band .btn { width: 100%; max-width: 420px; margin-inline: auto; }

/* ---------- FAQ ---------- */
.faq { max-width: 720px; margin: 0 auto; }
.faq-item { border: 1px solid var(--line); border-radius: 14px; margin-bottom: 10px; background: rgba(255, 255, 255, 0.03); overflow: hidden; }
.faq-q { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 17px 18px; background: none; border: none; cursor: pointer; color: var(--text); font-family: inherit; font-size: 0.96rem; font-weight: 700; text-align: start; }
.faq-q .chev { flex: none; width: 16px; height: 16px; border-inline-end: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); transition: transform 0.2s ease; }
.faq-item.open .faq-q .chev { transform: rotate(-135deg); margin-top: 4px; }
.faq-a { max-height: 0; overflow: hidden; transition: max-height 0.28s ease; }
.faq-a p { margin: 0; padding: 0 18px 18px; color: var(--muted); font-size: 0.9rem; line-height: 1.6; }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--line); padding: 30px clamp(22px, 5vw, 40px) calc(96px + var(--safe-b)); background: linear-gradient(180deg, transparent, rgba(255,255,255,0.02)); }
.footer-inner { max-width: var(--maxw); margin: 0 auto; display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between; }
.footer-note { max-width: var(--maxw); margin: 18px auto 0; color: var(--muted); font-size: 0.76rem; line-height: 1.6; }
.footer-rights { color: var(--muted); font-size: 0.76rem; }

/* ---------- Sticky CTA ---------- */
.sticky-cta { position: fixed; z-index: 50; bottom: 0; inset-inline: 0; padding: 10px clamp(22px, 5vw, 40px) calc(10px + var(--safe-b)); background: rgba(11, 7, 19, 0.92); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-top: 1px solid var(--line); transform: translateY(105%); transition: transform 0.3s ease; }
.sticky-cta.visible { transform: translateY(0); }
.sticky-inner { max-width: var(--maxw); margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.sticky-txt { display: grid; gap: 1px; line-height: 1.25; }
.sticky-txt strong { font-size: 0.92rem; }
.sticky-txt span { color: var(--muted); font-size: 0.72rem; }
.sticky-cta .btn { min-height: 50px; padding-inline: 26px; flex: none; }

/* ---------- Animations ---------- */
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 4px rgba(55, 211, 154, 0.16); } 50% { box-shadow: 0 0 0 7px rgba(55, 211, 154, 0.05); } }
html.js-anim .reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.6s ease, transform 0.6s ease; }
html.js-anim .reveal.in { opacity: 1; transform: none; }
html.js-anim .hero .hero-copy > *, html.js-anim .hero .stage { opacity: 0; animation: riseIn 0.7s cubic-bezier(.2,.7,.3,1) forwards; }
html.js-anim .hero .hero-copy > :nth-child(1) { animation-delay: 0.05s; }
html.js-anim .hero .hero-copy > :nth-child(2) { animation-delay: 0.14s; }
html.js-anim .hero .hero-copy > :nth-child(3) { animation-delay: 0.22s; }
html.js-anim .hero .hero-copy > :nth-child(4) { animation-delay: 0.3s; }
html.js-anim .hero .hero-copy > :nth-child(5) { animation-delay: 0.38s; }
html.js-anim .hero .stage { animation-delay: 0.2s; }
@keyframes riseIn { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: translateY(0); } }

/* ---------- Responsive Global ---------- */
@media (min-width: 560px) {
  .stats-inner { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .band .btn { width: auto; }
}
@media (min-width: 920px) {
  .live-pill { display: inline-flex; }
  .hero-grid { grid-template-columns: minmax(0, 1fr) minmax(360px, 0.95fr); gap: clamp(30px, 5vw, 64px); align-items: center; }
  .hero-actions { display: flex; flex-wrap: wrap; }
  .hero-actions .btn { width: auto; }
  .stats-inner { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .sticky-cta { display: none; }
  .footer { padding-bottom: 30px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; } }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ==================== 偏好登记弹窗 (Pref Modal) ==================== */
#pref-modal {
  z-index: 999999;
}

.pref-card {
  max-width: 640px;
  background: #0b0713;
  border: 1px solid var(--line);
  padding: 28px 24px;
}

.pref-header { margin-bottom: 24px; }
.pref-step {
  display: block;
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 8px;
  font-weight: 700;
}
.pref-header h2 {
  font-size: 24px;
  font-weight: 800;
  margin: 0 0 8px;
  color: var(--text);
  line-height: 1.3;
}
.pref-header p {
  font-size: 14px;
  color: var(--muted);
  margin: 0;
  line-height: 1.5;
}

.pref-section { margin-bottom: 20px; }
.pref-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.pref-label-row label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}
.pref-tag {
  font-size: 10px;
  color: var(--purple-2);
  background: rgba(155, 108, 255, 0.12);
  padding: 2px 8px;
  border-radius: 6px;
  font-weight: 700;
}
.pref-tag.optional {
  color: var(--muted);
  background: rgba(255, 255, 255, 0.05);
}

.pref-toggle-group {
  display: flex;
  background: #141414;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 10px;
}
.pref-toggle {
  flex: 1;
  padding: 12px;
  background: transparent;
  border: none;
  color: var(--muted);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: 0.2s;
}
.pref-toggle.active {
  background: rgba(155, 108, 255, 0.15);
  color: var(--text);
  box-shadow: inset 0 0 0 1px var(--purple);
}

.pref-input-wrap { margin-bottom: 6px; }
.pref-input-wrap input {
  width: 100%;
  background: #141414;
  border: 1px solid var(--line);
  padding: 12px 14px;
  border-radius: 10px;
  color: var(--text);
  font-size: 14px;
  outline: none;
  transition: 0.2s;
  font-family: inherit;
}
.pref-input-wrap input:focus { border-color: var(--purple); }
.pref-hint {
  font-size: 12px;
  color: var(--muted);
  margin: 6px 0 0;
  line-height: 1.5;
}

.pref-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  background: #141414;
  border: 1px solid var(--line);
  color: var(--text);
  padding: 8px 14px;
  border-radius: 99px;
  font-size: 13px;
  cursor: pointer;
  transition: 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: inherit;
}
.chip:hover { border-color: var(--purple); }
.chip.active {
  background: rgba(155, 108, 255, 0.15);
  border-color: var(--purple);
  color: var(--purple-2);
}

.pref-wallet-add {
  display: inline-block;
  color: var(--purple-2);
  font-size: 14px;
  cursor: pointer;
  padding: 8px 0;
  font-weight: 600;
}
.pref-wallet-add:hover { text-decoration: underline; }

.pref-agree {
  margin: 24px 0 12px;
  font-size: 13px;
  color: var(--muted);
  display: flex;
  align-items: flex-start;
  gap: 10px;
  line-height: 1.5;
}
.pref-agree input {
  margin-top: 3px;
  width: 16px;
  height: 16px;
  accent-color: var(--purple);
  flex-shrink: 0;
}

.pref-submit {
  width: 100%;
  padding: 16px;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 800;
  margin-top: 12px;
  border: none;
  cursor: pointer;
}

.pref-footer {
  text-align: center;
  font-size: 12px;
  color: var(--muted);
  margin-top: 16px;
  text-decoration: underline;
  cursor: pointer;
}

/* ==================== 弹窗基础 (Modal Base) ==================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 200000;
  display: none;
  justify-content: center;
  align-items: flex-start;
  overflow-y: auto;
  padding: 40px 16px;
}
.modal-overlay.open {
  display: flex;
}

.modal-card {
  background: #0b0713;
  width: calc(100vw - 32px);
  max-width: 600px;
  border-radius: 16px;
  border: 1px solid var(--line);
  padding: 24px;
  position: relative;
  margin-top: 40px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
  overflow-wrap: break-word;
}

.modal-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 20px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
}
.modal-back:hover { color: var(--text); }

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.modal-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}
.modal-logo {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--purple), var(--purple-2));
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 14px;
  font-weight: 900;
}
.modal-title-area h2 {
  font-size: 20px;
  margin: 0;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 8px;
}
.modal-badge {
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 99px;
  font-weight: 700;
  text-transform: uppercase;
}
.modal-badge.hot {
  background: rgba(255, 143, 77, 0.15);
  color: #ff8f4d;
  border: 1px solid rgba(255, 143, 77, 0.35);
}
.modal-badge.active {
  background: rgba(155, 108, 255, 0.15);
  color: var(--purple-2);
  border: 1px solid rgba(155, 108, 255, 0.35);
}

.modal-cover {
  width: 100%;
  border-radius: 12px;
  margin-bottom: 24px;
  border: 1px solid var(--line);
}

.modal-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}
.modal-info-box {
  background: #141414;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px;
}
.modal-info-box .k {
  font-size: 11px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
}
.modal-info-box .v { font-size: 13px; font-weight: 700; }

.modal-link-box {
  background: #141414;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  margin-bottom: 24px;
}
.modal-link-box a {
  color: var(--purple-2);
  font-weight: 600;
  text-decoration: underline;
}

.modal-notes {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 24px;
}
.modal-note-item {
  background: rgba(155, 108, 255, 0.05);
  border: 1px solid rgba(155, 108, 255, 0.2);
  padding: 12px;
  border-radius: 10px;
  font-size: 13px;
  color: var(--muted);
  display: flex;
  gap: 10px;
}
.modal-note-item::before { content: "🔹"; flex-shrink: 0; }

.modal-tasks {
  background: #141414;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 24px;
}
.modal-tasks h4 {
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  margin: 0 0 12px;
}
.modal-task-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-left: 20px;
  margin: 0;
  font-size: 13px;
  color: var(--text);
}
.modal-task-list li::marker { color: var(--purple); }

.modal-warning {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: 10px;
  padding: 16px;
  font-size: 12px;
  color: #fca5a5;
  margin-bottom: 24px;
  line-height: 1.6;
}
.modal-warning strong { color: #ef4444; display: block; margin-bottom: 4px; }

.modal-actions {
  display: flex;
  gap: 12px;
}
.modal-actions a, .modal-actions button {
  flex: 1;
  text-align: center;
  padding: 14px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
}
.btn-join {
  background: linear-gradient(90deg, var(--purple), var(--purple-2));
  color: #fff;
  border: none;
}
.btn-share {
  background: #1d1d1d;
  border: 1px solid var(--line);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex: 0 0 auto;
  width: 120px;
}


#pref-modal {
  z-index: 999999;
}
#pref-modal .modal-card,
.pref-card {
  max-width: 640px;
}

@media (max-width: 600px) {
  .modal-grid { grid-template-columns: 1fr; }
  .modal-actions { flex-direction: column; }
  .btn-share { width: 100%; }
  .modal-card { padding: 20px 16px; }
}