/* Shared membership identity, with compact badges for light and dark surfaces. */
.membership-gem {
  display: inline-block;
  width: 1.35em;
  height: 1.35em;
  max-width: none;
  object-fit: contain;
  vertical-align: -0.25em;
  flex-shrink: 0;
}
.membership-badge {
  --badge-height: 25px;
  --badge-font-size: 12px;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  flex-shrink: 0;
  white-space: nowrap;
  vertical-align: middle;
  height: var(--badge-height);
  padding: 0 8px;
  border: 1px solid var(--badge-border);
  border-radius: calc(var(--badge-height) * .24);
  box-sizing: border-box;
  font-family: 'Microsoft YaHei', 'PingFang SC', 'Noto Sans SC', sans-serif;
  font-size: var(--badge-font-size);
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0;
  color: var(--badge-text);
  /* Live text and SVG masks stay crisp at small sizes and any screen density. */
  background: var(--badge-background);
  box-shadow: none;
  text-shadow: none;
}
.membership-badge--basic {
  --badge-text: #3868a8;
  --badge-background: #edf3fc;
  --badge-border: #cbdaf0;
}
.membership-badge--premium {
  --badge-text: #7955a4;
  --badge-background: #f3eef9;
  --badge-border: #dfd2ed;
}
.membership-badge--svip {
  --badge-text: #84602d;
  --badge-background: #faf3e5;
  --badge-border: #e6d5b5;
}
[data-theme="dark"] .membership-badge--basic {
  --badge-text: #a8c6f2;
  --badge-background: #202c3d;
  --badge-border: #384b65;
}
[data-theme="dark"] .membership-badge--premium {
  --badge-text: #ceb6eb;
  --badge-background: #2d2639;
  --badge-border: #4f3f64;
}
[data-theme="dark"] .membership-badge--svip,
.promo-svip-card .membership-badge--svip {
  --badge-text: #e7c88b;
  --badge-background: #302a20;
  --badge-border: #5a4b33;
}
.membership-badge-symbol {
  display: inline-block;
  width: calc(var(--badge-font-size) + 2px);
  height: calc(var(--badge-font-size) + 2px);
  flex-shrink: 0;
  background: currentColor;
  -webkit-mask: url('/img/membership/diamond-outline-symbol.svg') center / contain no-repeat;
  mask: url('/img/membership/diamond-outline-symbol.svg') center / contain no-repeat;
}
.creator-name { flex-wrap: wrap; column-gap: 5px; row-gap: 6px; overflow-wrap: anywhere; }
.creator-name .membership-badge { margin-left: 2px; }
.account-member-tag:empty { display: none; }
#accountMemberTag { background: none; border: 0; padding: 0; margin: 0; flex-shrink: 0; }
.welcome-sub-name-row { flex-wrap: wrap; }
.my-subs-header-top { flex-wrap: wrap; gap: 12px; }
.my-sub-info .membership-badge { --badge-height: 24px; }
.my-sub-name { font-size: 18px; line-height: 1.4; font-weight: 700; }
@media (max-width: 400px) {
  .my-sub-item { padding: 12px 10px; gap: 8px; }
  .my-sub-avatar { width: 34px; height: 34px; }
  .my-sub-info { gap: 8px; font-size: .875rem; }
  .my-sub-chat-btn { width: 28px; height: 28px; }
  .my-sub-info .membership-badge { --badge-height: 23px; }
}
@media (max-width: 360px) {
  .my-sub-item { padding: 12px 8px; gap: 6px; }
  .my-sub-avatar { width: 28px; height: 28px; }
  .my-sub-info { gap: 5px; font-size: .8rem; }
  .my-sub-chat-btn { width: 24px; height: 24px; }
  .my-sub-name { gap: 2px; min-width: 0; }
  .my-sub-name { font-size: 17px; }
}
.welcome-sub-badge { padding: 0; border: 0; background: none; }
.promo-plan-heading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  margin: 5px 0 8px;
  font-size: 17px;
  line-height: 1.45;
}
.promo-plan-heading .membership-gem { width: 20px; height: 20px; }
.promo-plan-heading .promo-plan-name { font-size: inherit; line-height: inherit; font-weight: 800; margin: 0; white-space: nowrap; }
.promo-svip-info .promo-plan-heading { justify-content: flex-start; margin: 0 0 3px; }
.promo-price-item:not(.promo-price-hot) .promo-buy-btn { background: linear-gradient(120deg,#0879ff,#005be5); color: #fff; }
.promo-svip-info { min-width: max-content; }
.promo-svip-badge { background: none; border: 0; padding: 0; }
.promo-price-hot, [data-theme="dark"] .promo-price-hot { border-color: #8d51d3; background: rgba(145,80,211,.08); }
.promo-price-hot .promo-plan-perks { color: #9857d9; background: rgba(145,80,211,.1); border-color: rgba(145,80,211,.25); }
.promo-price-hot .promo-new-price { color: #9857d9; }
.promo-hot-tag, .promo-buy-hot { background: linear-gradient(120deg,#8f48d4,#692bb1); }
.promo-svip-card { background: linear-gradient(145deg,#292116,#17140f); border-color: rgba(255,208,83,.4); }
.promo-svip-card::before { background: radial-gradient(circle,rgba(255,206,71,.18),transparent 70%); }
.promo-buy-svip, .btn-subscribe.svip-upgrade-tip-btn {
  background: linear-gradient(115deg,#ffe38a,#ffcc3b);
  color: #573300;
  box-shadow: 0 4px 16px rgba(190,137,22,.2);
  letter-spacing: 0;
}
/* Neutral surfaces keep gold focused on the emblem, price and primary action. */
.svip-upgrade-sheet {
  --svip-accent: #e7c88b;
  --svip-text: #f4f4f5;
  --svip-muted: #a7a9b1;
  background: linear-gradient(160deg, #26272c, #1b1c20 70%);
  border-color: rgba(255,255,255,.12);
  box-shadow: 0 24px 64px rgba(0,0,0,.38);
  max-height: calc(100vh - 32px);
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #505158 transparent;
}
.svip-upgrade-sheet::before, .svip-upgrade-sheet::after { content: none; }
.svip-upgrade-crown {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  margin: 0 auto 10px;
  color: var(--svip-accent);
  line-height: 1;
}
.svip-upgrade-emblem { display: block; width: 48px; height: 48px; }
.svip-upgrade-title, .svip-upgrade-new {
  background: none;
  -webkit-text-fill-color: currentColor;
}
.svip-upgrade-title { color: var(--svip-text); font-weight: 800; }
.svip-upgrade-new { color: var(--svip-accent); }
.svip-upgrade-subtitle { color: var(--svip-muted); }
.svip-upgrade-timer, .svip-upgrade-timer:not(.expired), .svip-upgrade-timer.expired {
  background: rgba(255,255,255,.04);
  border-color: rgba(255,255,255,.1);
  color: var(--svip-muted);
}
.svip-upgrade-countdown { color: #d5d6db; }
.svip-upgrade-price-card {
  background: rgba(255,255,255,.035);
  border: 1px solid rgba(255,255,255,.1);
}
.svip-upgrade-old { color: #94969f; }
.svip-upgrade-save {
  color: #d2d3d9;
  background: rgba(255,255,255,.07);
  font-weight: 500;
}
.svip-upgrade-perk { color: #c3c5cd; }
.svip-upgrade-perk .material-icons-round { color: #a7a9b1; }
.svip-upgrade-btn {
  background: linear-gradient(115deg, #efdaac, #d7b777);
  color: #302719;
  box-shadow: 0 4px 16px rgba(0,0,0,.16), inset 0 1px 0 rgba(255,255,255,.25);
  letter-spacing: 0;
}
.svip-upgrade-btn::before { content: none; }
.svip-upgrade-btn:active { box-shadow: 0 2px 8px rgba(0,0,0,.2); }
.svip-upgrade-btn:focus-visible, .svip-upgrade-close:focus-visible {
  outline: 2px solid var(--svip-accent);
  outline-offset: 3px;
}
.svip-upgrade-btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.svip-upgrade-close { color: #b9bbc3; }
.svip-upgrade-note { color: #92949e; line-height: 1.6; }
@media (prefers-reduced-motion: reduce) {
  .svip-upgrade-sheet, .svip-upgrade-btn { transition: none; }
}
.my-subs-svip-title strong { color: var(--svip-tip-accent); font-weight: 700; }
.my-subs-svip-desc b { color: var(--text-primary); font-weight: 600; }
.my-subs-svip-upgrade { width:100%; font:inherit; text-align:left; cursor:pointer; border-color:color-mix(in srgb,var(--svip-tip-accent) 35%,var(--card-border)); background:linear-gradient(110deg,color-mix(in srgb,var(--svip-tip-accent) 9%,var(--card-bg)),var(--card-bg)); }
.my-subs-svip-upgrade .my-subs-svip-copy { flex:1; }
.my-subs-svip-arrow { color:var(--svip-tip-accent); font-size:22px; flex-shrink:0; }
.my-subs-svip-upgrade:focus-visible { outline:2px solid var(--svip-tip-accent); outline-offset:3px; }
.my-subs-svip-upgrade:active { transform:scale(.99); }
.private-custom-symbol { width:26px; height:26px; flex-shrink:0; }
.upgrade-badge { background: rgba(145,80,211,.12); }
.upgrade-badge .membership-gem { width: 46px; height: 46px; }
.account-grid-icon .membership-gem { width: 28px; height: 28px; }
.recharge-icon.membership-gem { width: 56px; height: 56px; }
.membership-card .card-image { display: flex; align-items: center; justify-content: center; background: radial-gradient(ellipse at 50% 60%,#e1f6ff,#e8efff); }
.membership-card[data-plan="permanent"] .card-image { background: radial-gradient(ellipse at 50% 60%,#f5e6ff,#ede3fc); }
.membership-card .card-image img { width: 130px; height: 140px; object-fit: contain; }
.card-plan-name .membership-gem { margin-right: 5px; }
.membership-success-badge { margin: 12px 0; }
.membership-success-badge .membership-badge { --badge-height: 32px; --badge-font-size: 14px; }
@media (max-width: 380px) {
  .promo-svip-row { gap: 8px; flex-wrap: wrap; }
  .promo-svip-price-col { margin-left: auto; }
  .promo-buy-svip { font-size: .76rem; }
}
