/* 云端大厨 · 粉紫可爱主题。最后加载，覆盖 portal / save-app / modern-pages / 教程 / 续费 / 换绑页的配色。
   变量用 html:root 提高优先级，因为 /save 页会在之后动态插入 portal.css 和 modern-pages.css。 */
html:root {
  --cx-pink: #f0609a;
  --cx-pink-d: #d9437f;
  --cx-pink-dd: #b8336a;
  --cx-pink-soft: #ffe6f0;
  --cx-pink-line: #f8cde0;
  --cx-lilac: #a98bf5;
  --cx-lilac-soft: #efe9ff;
  --cx-sky: #6cb8f0;
  --cx-sky-soft: #e4f3ff;
  --cx-mint: #2fb58a;
  --cx-mint-soft: #e2f7ee;
  --cx-lemon: #f2a520;
  --cx-lemon-soft: #fff3d6;
  --cx-ink: #4a2b44;
  --cx-muted: #977b8f;
  --cx-card: #ffffff;
  --cx-shadow: 0 10px 28px rgb(214 90 150 / 12%);

  /* portal.css */
  --ink: var(--cx-ink);
  --muted: var(--cx-muted);
  --line: #f6dbe7;
  --surface: #fff;
  --blue: var(--cx-pink);
  /* modern-pages.css */
  --modern-ink: var(--cx-ink);
  --modern-muted: var(--cx-muted);
  --modern-line: #f6dbe7;
  --modern-blue: var(--cx-pink);
  --modern-green: var(--cx-mint);
  /* 教程 site.css */
  --paper: #fff6fa;
  --card: #fff;
  --green: var(--cx-pink);
  --green-dark: var(--cx-pink-d);
  --lime: var(--cx-pink-soft);
  --shadow: var(--cx-shadow);
  --tutorial-blue: var(--cx-pink);
  --tutorial-blue-hover: var(--cx-pink-d);
  --tutorial-blue-soft: var(--cx-pink-soft);
  --tutorial-blue-line: var(--cx-pink-line);
  --tutorial-success: var(--cx-mint);
  --tutorial-success-soft: var(--cx-mint-soft);
  --tutorial-success-line: #bfe9d7;
  font-family: "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  color: var(--cx-ink);
  background: #fff3f8;
}

/* ---------- 背景：粉紫渐变 + 圆点 + 云朵 ---------- */
html body {
  min-height: 100vh;
  color: var(--cx-ink);
  background:
    radial-gradient(circle at 1px 1px, rgb(240 96 154 / 13%) 1.2px, transparent 1.6px) 0 0 / 22px 22px,
    radial-gradient(120% 70% at 0% 0%, #ffd9ea 0%, transparent 60%),
    radial-gradient(90% 60% at 100% 100%, #dcebff 0%, transparent 65%),
    radial-gradient(70% 50% at 100% 0%, #eee4ff 0%, transparent 70%),
    #fff6fa;
  background-attachment: fixed;
}
html body::before,
html body::after {
  position: fixed;
  z-index: 0;
  width: 220px;
  height: 80px;
  border-radius: 999px;
  background:
    radial-gradient(circle at 30% 40%, #fff 0 34px, transparent 35px),
    radial-gradient(circle at 58% 30%, #fff 0 42px, transparent 43px),
    radial-gradient(circle at 80% 55%, #fff 0 30px, transparent 31px),
    linear-gradient(#fff, #fff) 10% 100% / 86% 40px no-repeat;
  opacity: .75;
  filter: drop-shadow(0 6px 14px rgb(214 90 150 / 10%));
  pointer-events: none;
  content: "";
  animation: cx-drift 16s ease-in-out infinite alternate;
}
html body::before { top: 150px; left: -90px; }
html body::after { right: -80px; bottom: 120px; transform: scale(.8); animation-delay: -6s; }
@keyframes cx-drift { from { translate: 0 0; } to { translate: 26px -8px; } }
#portal-root, #app, main, .rb-shell { position: relative; z-index: 1; }

html body a { -webkit-tap-highlight-color: transparent; }

/* ---------- 通用外壳 (portal.css) ---------- */
html body .portal-shell { background: transparent; }
html body .portal-shell::before { display: none; }
.portal-header { min-height: 76px; }
.portal-brand { gap: 8px; color: var(--cx-ink); font-size: 17px; font-weight: 900; }
.portal-brand .brand-symbol { width: 44px; height: 34px; background: url(mascot.svg?v=1) center / contain no-repeat; border-radius: 0; box-shadow: none; transform: none; font-size: 0; color: transparent; }
.header-back, .header-status {
  color: var(--cx-pink-d);
  background: rgb(255 255 255 / 85%);
  border: 1.5px solid var(--cx-pink-line);
  box-shadow: 0 4px 12px rgb(214 90 150 / 10%);
  font-weight: 800;
}
.header-back { padding: 8px 14px; }
.header-status i { background: var(--cx-mint); }

/* 卡片、按钮通用质感：圆角 + 底部“厚度” */
.board-ticker, .board-facts, .board-list-card, .board-empty, .board-message,
.faq-search, .faq-q, .faq-empty,
.lookup-form, .identity-card, .editor-section, .quote-panel {
  border-color: #f6dbe7 !important;
  border-radius: 22px !important;
  box-shadow: 0 2px 0 #f7d5e4, var(--cx-shadow) !important;
}
.board-round { color: var(--cx-muted); border: 1.5px solid var(--cx-pink-line); font-weight: 800; }
.board-round.is-on { background: linear-gradient(180deg, #ff86b4, var(--cx-pink)); border-color: var(--cx-pink); box-shadow: 0 3px 0 var(--cx-pink-dd); }
.board-guide-btn { color: var(--cx-pink-dd); background: linear-gradient(180deg, #fff, var(--cx-pink-soft)); border: 1.5px solid var(--cx-pink-line); box-shadow: 0 3px 0 #f4bcd5; animation: none; }
.board-guide-btn:hover { box-shadow: 0 3px 0 #f4bcd5, 0 8px 16px rgb(214 90 150 / 18%); }
.board-list-head { color: var(--cx-muted); background: #fff6fa; border-bottom-color: #fbe6ef; }
.board-row { border-top-color: #fbe6ef; }
.board-rank { color: var(--cx-muted); background: #fbeef4; }
.board-cups { color: var(--cx-pink-d); }
.board-ticker-dots i.is-on { background: var(--cx-pink); box-shadow: 0 0 0 3px rgb(240 96 154 / 16%); }
.board-facts { background: #f6dbe7; }
.board-retry, .board-guide-ok, .home-notice-ok {
  background: linear-gradient(180deg, #ff86b4, var(--cx-pink)) !important;
  border-radius: 16px !important;
  box-shadow: 0 4px 0 var(--cx-pink-dd);
  font-weight: 900;
}
.board-retry:active, .board-guide-ok:active, .home-notice-ok:active { transform: translateY(2px); box-shadow: 0 2px 0 var(--cx-pink-dd); }

/* 弹窗 */
.home-notice-backdrop, .board-guide-backdrop { background: rgb(74 43 68 / 38%); backdrop-filter: blur(4px); }
.home-notice, .board-guide { border-radius: 26px; box-shadow: 0 4px 0 #f7d5e4, 0 30px 80px rgb(74 43 68 / 26%); }
.home-notice h2, .board-guide h2 { color: var(--cx-ink); font-weight: 900; }
.home-notice-close, .board-guide-close { color: var(--cx-pink-d); background: var(--cx-pink-soft); border-color: var(--cx-pink-line); }
.home-notice-item, .board-guide-item { border-radius: 18px; border-width: 1.5px; }
.board-guide-item.is-open, .board-guide-item.is-round { color: var(--cx-pink-d); background: #fff7fb; border-color: var(--cx-pink-line); }
.board-guide-index { background: var(--cx-pink); }
.board-guide-hl { color: var(--cx-pink-dd); background: var(--cx-pink-soft); }
.board-guide-tip { color: var(--cx-pink-dd) !important; background: #fff7fb; border-color: var(--cx-pink-line); }
.home-notice-item.is-group { color: var(--cx-sky); background: #f5fbff; border-color: #cfe7fb; }
.home-notice-item.is-group .home-notice-index { background: var(--cx-sky); }
.home-notice-item.is-pay { color: var(--cx-mint); }
.home-notice-item.is-cup { color: var(--cx-pink-d); background: #fff7fb; border-color: var(--cx-pink-line); }
.home-notice-item.is-cup .home-notice-index { background: var(--cx-pink); }

/* FAQ */
.faq-search:focus-within { border-color: var(--cx-pink) !important; box-shadow: 0 0 0 4px rgb(240 96 154 / 14%) !important; }
.faq-search:focus-within svg { stroke: var(--cx-pink); }
.faq-q:hover { border-color: var(--cx-pink-line) !important; }
.faq-index { color: #fff; background: linear-gradient(180deg, #ff86b4, var(--cx-pink)); }
.faq-body a { color: var(--cx-pink-dd); background: var(--cx-pink-soft); }
.faq-body em { color: var(--cx-pink-dd); background: var(--cx-pink-soft); }

/* ---------- 首页 ---------- */
.cx-home { width: min(100% - 32px, 560px); margin: 0 auto; padding: 4px 0 28px; }
.cx-notice {
  display: flex; align-items: center; gap: 10px; width: 100%; min-height: 54px; margin: 0 0 6px; padding: 7px 14px 7px 7px;
  color: var(--cx-ink); background: rgb(255 255 255 / 92%); border: 0; border-radius: 999px;
  box-shadow: 0 3px 0 #f7d5e4, 0 10px 24px rgb(214 90 150 / 12%); font: inherit; text-align: left; cursor: pointer;
}
.cx-notice-icon { display: grid; flex: none; place-items: center; width: 40px; height: 40px; color: #fff; background: linear-gradient(160deg, #ff8fbb, var(--cx-pink-d)); border-radius: 50%; }
.cx-notice-icon svg { width: 20px; height: 20px; stroke: currentColor; stroke-width: 2.4; }
.cx-notice-tag { flex: none; padding: 4px 9px; color: #fff; background: linear-gradient(180deg, #ffc45a, #f29a12); border-radius: 9px; font-size: 12px; font-weight: 900; }
.cx-notice-view { flex: 1; min-width: 0; overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 10px, #000 calc(100% - 14px), transparent); mask-image: linear-gradient(90deg, transparent, #000 10px, #000 calc(100% - 14px), transparent); }
.cx-notice-track { display: flex; width: max-content; animation: notice-strip-scroll 24s linear infinite; }
.cx-notice-track span { padding-right: 56px; font-size: 14px; font-weight: 800; white-space: nowrap; }
.cx-notice:hover .cx-notice-track { animation-play-state: paused; }
.cx-notice-count { flex: none; color: var(--cx-muted); font-size: 13px; font-weight: 800; white-space: nowrap; }

.cx-hero { position: relative; display: grid; justify-items: center; padding: 18px 0 0; text-align: center; }
.cx-bubble {
  position: relative; padding: 8px 18px; color: var(--cx-pink-d); background: rgb(255 255 255 / 88%);
  border-radius: 999px; box-shadow: 0 6px 16px rgb(214 90 150 / 12%); font-size: 15px; font-weight: 900; letter-spacing: .04em;
}
.cx-bubble::after { position: absolute; left: 50%; bottom: -7px; width: 14px; height: 14px; background: inherit; border-radius: 3px; transform: translateX(-50%) rotate(45deg); content: ""; }
.cx-mascot { display: block; width: 168px; height: auto; margin: 8px 0 -6px; animation: cx-float 3.2s ease-in-out infinite; }
@keyframes cx-float { 0%, 100% { transform: translateY(0) rotate(-2deg); } 50% { transform: translateY(-8px) rotate(2deg); } }
.cx-spark { position: absolute; color: var(--cx-lilac); animation: cx-twinkle 2.4s ease-in-out infinite; }
.cx-spark svg { display: block; width: 100%; height: 100%; fill: currentColor; }
.cx-spark.is-1 { top: 70px; right: 14%; width: 26px; height: 26px; }
.cx-spark.is-2 { top: 120px; left: 16%; width: 14px; height: 14px; color: #ffc44d; animation-delay: -1.2s; }
.cx-spark.is-3 { top: 168px; right: 20%; width: 16px; height: 16px; color: #ff8fb8; animation-delay: -.6s; }
@keyframes cx-twinkle { 0%, 100% { opacity: .35; transform: scale(.75); } 50% { opacity: 1; transform: scale(1); } }

.cx-panel { position: relative; padding: 26px 18px 20px; background: #fff; border-radius: 30px; box-shadow: 0 4px 0 #f7d5e4, 0 18px 44px rgb(214 90 150 / 14%); }
.cx-title { margin: 0; color: var(--cx-ink); font-size: 30px; font-weight: 900; line-height: 1.25; text-align: center; letter-spacing: .02em; }
.cx-title span { position: relative; display: inline-block; }
.cx-title span::after { position: absolute; left: 4%; right: 4%; bottom: -8px; height: 8px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 8'%3E%3Cpath d='M0 4q6-5 12 0t12 0' fill='none' stroke='%23ff9cc2' stroke-width='2.4'/%3E%3C/svg%3E") 0 0 / 24px 8px repeat-x; content: ""; }
.cx-sub { margin: 16px 0 20px; color: var(--cx-muted); font-size: 14px; line-height: 1.7; text-align: center; }

.cx-start {
  position: relative; display: flex; align-items: center; gap: 14px; overflow: hidden; padding: 16px 16px 16px 14px; color: #fff;
  background: linear-gradient(120deg, #ff8fbb 0%, var(--cx-pink) 45%, #b48cff 100%); border-radius: 22px;
  box-shadow: 0 5px 0 var(--cx-pink-dd), 0 12px 24px rgb(240 96 154 / 28%);
  transition: transform .15s ease, box-shadow .15s ease;
}
.cx-start::after { position: absolute; inset: 0; background: linear-gradient(115deg, transparent 30%, rgb(255 255 255 / 45%) 50%, transparent 70%); transform: translateX(-120%); animation: notice-strip-shine 3.6s ease-in-out infinite; content: ""; }
.cx-start:active { transform: translateY(3px); box-shadow: 0 2px 0 var(--cx-pink-dd), 0 6px 14px rgb(240 96 154 / 24%); }
.cx-start-icon { display: grid; flex: none; place-items: center; width: 50px; height: 50px; background: rgb(255 255 255 / 24%); border-radius: 16px; }
.cx-start-icon svg { width: 28px; height: 28px; stroke: #fff; stroke-width: 2.6; }
.cx-start-body { flex: 1; min-width: 0; }
.cx-start-body strong { display: block; font-size: 19px; font-weight: 900; }
.cx-start-body small { display: block; margin-top: 3px; opacity: .92; font-size: 12px; font-weight: 700; }
.cx-start-tag { display: inline-block; margin-left: 6px; padding: 1px 7px; color: var(--cx-pink-dd); background: #fff; border-radius: 8px; font-size: 12px; vertical-align: 2px; }
.cx-arrow { display: grid; flex: none; place-items: center; width: 34px; height: 34px; border-radius: 50%; }
.cx-arrow svg { width: 16px; height: 16px; stroke: currentColor; stroke-width: 3; }
.cx-start .cx-arrow { color: var(--cx-pink-d); background: #fff; }

/* 手把手指引: the first thing a new visitor should tap, so it gets a warm colour of its own and a breathing glow */
.cx-coach {
  position: relative; display: flex; align-items: center; gap: 12px; margin: 6px 0 14px; padding: 16px 14px; color: #fff;
  background: linear-gradient(120deg, #ffb347 0%, #ff7a8a 55%, #ff5fa2 100%); border-radius: 22px;
  box-shadow: 0 5px 0 #d9466f, 0 12px 26px rgb(255 122 138 / 35%);
  animation: cx-coach-glow 1.8s ease-in-out infinite; transition: transform .15s ease;
}
.cx-coach:active { transform: translateY(3px); }
@keyframes cx-coach-glow {
  0%, 100% { box-shadow: 0 5px 0 #d9466f, 0 12px 26px rgb(255 122 138 / 35%), 0 0 0 0 rgb(255 122 138 / 55%); }
  50% { box-shadow: 0 5px 0 #d9466f, 0 12px 26px rgb(255 122 138 / 35%), 0 0 0 10px rgb(255 122 138 / 0%); }
}
.cx-coach-hand { display: grid; flex: none; place-items: center; width: 50px; height: 50px; font-size: 30px; background: rgb(255 255 255 / 28%); border-radius: 16px; animation: cx-coach-tap 1s ease-in-out infinite; }
@keyframes cx-coach-tap { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px) scale(1.06); } }
.cx-coach-body { flex: 1; min-width: 0; }
.cx-coach-body strong { display: block; font-size: 19px; font-weight: 900; }
.cx-coach-body small { display: block; margin-top: 3px; opacity: .95; font-size: 12px; font-weight: 700; }
.cx-coach-tag { position: absolute; top: -11px; right: 18px; padding: 2px 10px; color: #fff; background: #e8344f; border: 2px solid #fff; border-radius: 10px; box-shadow: 0 3px 8px rgb(232 52 79 / 35%); font-size: 13px; font-weight: 900; transform: rotate(3deg); }
.cx-coach .cx-arrow { color: #ff5f86; background: #fff; }

.cx-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 14px; }
.cx-card {
  --c: var(--cx-pink); --cs: var(--cx-pink-soft); --cl: var(--cx-pink-line);
  position: relative; display: grid; grid-template-columns: 44px minmax(0, 1fr); column-gap: 10px; align-items: center;
  min-height: 92px; padding: 14px 12px; overflow: hidden; color: var(--cx-ink);
  background: linear-gradient(160deg, #fff 30%, var(--cs) 140%); border: 1.5px solid var(--cl); border-radius: 20px;
  box-shadow: 0 3px 0 var(--cl); transition: transform .15s ease, box-shadow .15s ease;
}
.cx-card:hover { transform: translateY(-2px); box-shadow: 0 5px 0 var(--cl), 0 10px 20px rgb(74 43 68 / 8%); }
.cx-card:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--cl); }
.cx-card::after { position: absolute; right: -18px; bottom: -22px; width: 70px; height: 70px; background: var(--cs); border-radius: 50%; opacity: .8; content: ""; }
.cx-card-icon { position: relative; z-index: 1; display: grid; place-items: center; width: 44px; height: 44px; color: #fff; background: var(--c); border-radius: 14px; box-shadow: 0 3px 0 rgb(0 0 0 / 12%); }
.cx-card-icon svg { width: 24px; height: 24px; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.cx-card-body { position: relative; z-index: 1; min-width: 0; }
.cx-card-body strong { display: block; font-size: 16px; font-weight: 900; line-height: 1.3; }
.cx-card-body small { display: block; margin-top: 4px; color: var(--cx-muted); font-size: 11.5px; line-height: 1.45; }
.cx-card.is-save { --c: #9b7bf0; --cs: var(--cx-lilac-soft); --cl: #ddd0fb; }
.cx-card.is-renew { --c: var(--cx-mint); --cs: var(--cx-mint-soft); --cl: #c4ead9; }
.cx-card.is-cup { --c: #f2708f; --cs: #ffe6ec; --cl: #f9cad6; }
.cx-card.is-duel { --c: #f29a12; --cs: var(--cx-lemon-soft); --cl: #f8dfaa; }
.cx-card.is-rebind { --c: var(--cx-sky); --cs: var(--cx-sky-soft); --cl: #cbe5f8; }
.cx-card.is-faq { --c: #e98ad0; --cs: #fdebf8; --cl: #f5d0ec; }

.cx-group { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 16px; padding-top: 14px; color: var(--cx-muted); border-top: 1.5px dashed #f6dbe7; font-size: 13px; }
.cx-group a { display: inline-flex; align-items: center; gap: 4px; padding: 5px 12px; color: var(--cx-pink-d); background: var(--cx-pink-soft); border-radius: 999px; font-weight: 900; }
.cx-foot { margin: 18px 0 0; color: #c2a8b9; font-size: 11px; text-align: center; letter-spacing: .1em; }

/* ---------- 修改存档 / 激活 (save-app + modern-pages) ---------- */
html body .lookup-intro .eyebrow { color: var(--cx-pink) !important; }
html body .lookup-intro h1 { color: var(--cx-ink) !important; font-weight: 900; }
html body .lookup-form textarea, html body .lookup-form input {
  background: #fff8fb !important; border: 1.5px solid #f6d3e2 !important; border-radius: 16px !important;
}
html body .lookup-form textarea:focus, html body .lookup-form input:focus { border-color: var(--cx-pink) !important; box-shadow: 0 0 0 4px rgb(240 96 154 / 14%) !important; }
html body .button.primary {
  color: #fff !important; background: linear-gradient(180deg, #ff86b4, var(--cx-pink)) !important; border: 0 !important;
  border-radius: 16px !important; box-shadow: 0 4px 0 var(--cx-pink-dd) !important; font-weight: 900 !important;
}
html body .button.primary:hover { background: linear-gradient(180deg, #ff7aab, var(--cx-pink-d)) !important; }
html body .button.primary:active { transform: translateY(2px); box-shadow: 0 2px 0 var(--cx-pink-dd) !important; }
html body .button.primary:disabled { opacity: .5; box-shadow: 0 4px 0 #e7a9c4 !important; }
html body .button.secondary { color: var(--cx-pink-d) !important; background: var(--cx-pink-soft) !important; border-color: var(--cx-pink-line) !important; border-radius: 16px !important; }
html body .save-page > .back-link { color: var(--cx-pink-d) !important; background: #fff; border: 1.5px solid var(--cx-pink-line); border-radius: 999px; }
html body .save-page > .identity-card { border-top: 0 !important; background: linear-gradient(160deg, #fff 40%, #ffeef6) !important; }
html body .save-page > .identity-card .eyebrow { color: var(--cx-pink) !important; }
html body .save-page::before, html body .save-page > .identity-card::after { display: none; }
html body .save-page .city-button { background: #fff8fb; border: 1.5px solid #f6d3e2; border-radius: 18px; box-shadow: 0 3px 0 #f7d5e4; }
html body .save-page .city-button:hover { border-color: var(--cx-pink); }
html body .save-page .resource-field input, html body .inline-form select, html body .save-page .challenge-form select { border-radius: 12px !important; border-color: #f6d3e2 !important; background: #fff8fb !important; }
html body .extracted-key { color: #1f8a64 !important; border-radius: 12px !important; }
html body .switch-input:checked + .switch { background: var(--cx-pink) !important; }
html body .intro-dialog, html body .success-dialog, html body .activation-error, html body .confirm-dialog,
html body .redeem-dialog, html body .save-example-dialog { border-radius: 24px !important; border-color: #f6dbe7 !important; }
html body .modal-backdrop, html body .confirm-backdrop { background: rgb(74 43 68 / 38%) !important; }

/* ---------- 安装教程 (tutorial-assets/site.css) ---------- */
html body .tutorial-notice { border-radius: 20px !important; }
html body .download-heading .eyebrow { color: var(--cx-pink); }
html body .download-heading h1 { color: var(--cx-ink); font-weight: 900; }
html body .download-heading p { color: var(--cx-muted); }
html body .download-option {
  --c: var(--cx-pink); --cs: var(--cx-pink-soft); --cl: var(--cx-pink-line);
  color: var(--c); background: linear-gradient(160deg, #fff 35%, var(--cs) 150%); border: 1.5px solid var(--cl);
  border-radius: 22px; box-shadow: 0 3px 0 var(--cl), 0 10px 22px rgb(214 90 150 / 8%);
}
html body .download-option:hover { border-color: var(--c); }
html body .download-option:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--cl); }
html body .download-option .option-icon { color: var(--c); background: var(--cs); border-radius: 16px; }
html body .download-option .card-arrow { color: var(--c); }
html body .download-option .option-copy small { color: var(--cx-muted); }
html body .option-android { --c: var(--cx-mint); --cs: var(--cx-mint-soft); --cl: #c4ead9; }
html body .option-apple { --c: #6f5a6b; --cs: #f3eef2; --cl: #e7dde5; }
html body .option-save { --c: #9b7bf0; --cs: var(--cx-lilac-soft); --cl: #ddd0fb; }
html body .option-files { --c: var(--cx-sky); --cs: var(--cx-sky-soft); --cl: #cbe5f8; }
html body .support-strip, html body .support-number { color: var(--cx-pink-dd); background: var(--cx-pink-soft); border-color: var(--cx-pink-line); }
html body .browser-notice-tip { color: #7a4a68; background: #fff1f7; border-color: var(--cx-pink-line); border-left-color: var(--cx-pink); }
html body .activation-input-modal textarea:focus { border-color: var(--cx-pink); box-shadow: 0 0 0 4px rgb(240 96 154 / 14%); }
body > div:first-child > a[href="/lines.html"] {
  display: inline-block; padding: 6px 14px; color: var(--cx-pink-d); background: #fff; border: 1.5px solid var(--cx-pink-line);
  border-radius: 999px; font-size: 13px; font-weight: 800; text-decoration: none;
}
body > div:first-child:has(> a[href="/lines.html"]) { position: relative; z-index: 2; background: transparent !important; }

/* ---------- 会员续费 /renew ---------- */
body.cx-renew main {
  max-width: 560px; margin: 24px auto; padding: 26px 20px; border-radius: 28px;
  box-shadow: 0 4px 0 #f7d5e4, 0 18px 44px rgb(214 90 150 / 14%);
}
body.cx-renew main > a:first-child { display: inline-block; padding: 6px 12px; color: var(--cx-pink-d); background: var(--cx-pink-soft); border-radius: 999px; font-size: 13px; font-weight: 800; text-decoration: none; }
body.cx-renew h1 { color: var(--cx-ink); font-weight: 900; }
body.cx-renew p, body.cx-renew small { color: var(--cx-muted); }
body.cx-renew label { color: var(--cx-ink); }
body.cx-renew input, body.cx-renew textarea, body.cx-renew select { background: #fff8fb; border: 1.5px solid #f6d3e2; border-radius: 16px; }
body.cx-renew input:focus, body.cx-renew textarea:focus, body.cx-renew select:focus { border-color: var(--cx-pink); outline: 0; box-shadow: 0 0 0 4px rgb(240 96 154 / 14%); }
body.cx-renew button { background: linear-gradient(180deg, #ff86b4, var(--cx-pink)); border-radius: 16px; box-shadow: 0 4px 0 var(--cx-pink-dd); font-weight: 900; cursor: pointer; }
body.cx-renew button:active { transform: translateY(2px); box-shadow: 0 2px 0 var(--cx-pink-dd); }
body.cx-renew .methods button { padding: 16px 10px; color: var(--cx-pink-d); background: #fff; border: 1.5px solid var(--cx-pink-line); box-shadow: 0 3px 0 var(--cx-pink-line); }
body.cx-renew .methods button[aria-pressed="true"] { color: #fff; background: linear-gradient(180deg, #ff86b4, var(--cx-pink)); border-color: var(--cx-pink); box-shadow: 0 3px 0 var(--cx-pink-dd); }
body.cx-renew .err { color: #c2334f; }

/* ---------- 设备换绑 /rebind ---------- */
html body .rb-head strong { display: inline-flex; align-items: center; gap: 8px; color: var(--cx-ink); font-weight: 900; }
html body .rb-head strong::before { width: 40px; height: 30px; background: url(mascot.svg?v=1) center / contain no-repeat; content: ""; }
html body .rb-head a { padding: 6px 12px; color: var(--cx-pink-d); background: #fff; border: 1.5px solid var(--cx-pink-line); border-radius: 999px; font-size: 13px; font-weight: 800; }
html body .rb-shell h1 { font-weight: 900; }
html body .rb-rule { color: #7a4a68; background: #fff1f7; border: 1.5px dashed var(--cx-pink-line); border-radius: 18px; }
html body .rb-card { border-color: #f6dbe7; border-radius: 26px; box-shadow: 0 3px 0 #f7d5e4, var(--cx-shadow); }
html body .rb-shell textarea, html body .rb-shell input[type=password] { background: #fff8fb; border: 1.5px solid #f6d3e2; border-radius: 16px; }
html body .rb-shell input:focus, html body .rb-shell textarea:focus { outline: 0; border-color: var(--cx-pink); box-shadow: 0 0 0 4px rgb(240 96 154 / 14%); }
html body .rb-actions button { background: linear-gradient(180deg, #ff86b4, var(--cx-pink)); border-radius: 16px; box-shadow: 0 4px 0 var(--cx-pink-dd); font-weight: 900; }
html body .rb-actions button.secondary { color: var(--cx-pink-d); background: var(--cx-pink-soft); box-shadow: 0 3px 0 var(--cx-pink-line); }
html body .rb-actions button:active { transform: translateY(2px); }

@media (max-width: 620px) {
  .portal-header { min-height: 64px; }
  .cx-home { width: calc(100% - 24px); }
  .cx-title { font-size: 26px; }
  .cx-mascot { width: 148px; }
  .cx-panel { padding: 22px 14px 16px; border-radius: 26px; }
  .cx-grid { gap: 10px; }
  .cx-card { grid-template-columns: 38px minmax(0, 1fr); min-height: 84px; padding: 12px 10px; border-radius: 18px; }
  .cx-card-icon { width: 38px; height: 38px; border-radius: 12px; }
  .cx-card-icon svg { width: 21px; height: 21px; }
  .cx-card-body strong { font-size: 15px; }
  .cx-card-body small { font-size: 11px; }
  .cx-notice-tag { display: none; }
  body.cx-renew main { margin: 16px 12px; padding: 22px 16px; border-radius: 24px; }
  html body::before { top: 90px; transform: scale(.6); }
}
@media (prefers-reduced-motion: reduce) {
  .cx-mascot, .cx-spark, .cx-start::after, .cx-coach, .cx-coach-hand, .cx-notice-track, html body::before, html body::after { animation: none !important; }
}

/* ---------- 静态页顶栏 (renew / payment / group) ---------- */
.cx-topbar { position: relative; z-index: 2; display: flex; align-items: center; justify-content: space-between; max-width: 560px; min-height: 64px; margin: 0 auto; padding: 8px 4px 0; box-sizing: border-box; }
.cx-topbar .portal-brand { display: inline-flex; align-items: center; text-decoration: none; }
.cx-topbar .header-back { border-radius: 999px; font-size: 13px; text-decoration: none; }
body.cx-renew { margin: 0; }
body.cx-renew .cx-topbar + main { margin-top: 8px; }
body.cx-renew .cx-btn { display: inline-block; padding: 12px 28px; color: #fff; background: linear-gradient(180deg, #ff86b4, var(--cx-pink)); border-radius: 16px; box-shadow: 0 4px 0 var(--cx-pink-dd); font-weight: 900; text-decoration: none; }
body.cx-renew .cx-btn:active { transform: translateY(2px); box-shadow: 0 2px 0 var(--cx-pink-dd); }
@media (max-width: 620px) {
  .cx-topbar { padding: 8px 12px 0; }
  /* 赛事规则等长公告：手机上允许两行，不再被省略号截断 */
  .board-ticker { --ticker-h: 56px; }
  .board-ticker-item p { display: -webkit-box; white-space: normal; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: 1.35; }
}