/* POP Maker product portal · projects, assets, subscription and coins */

.portal-view {
  --project-layout-gap: 16px;
  --billing-gift-icon: url("data:image/svg+xml,%3Csvg viewBox='0 0 16 16' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M7.2 2.4C6.7 1.4 5.8.9 4.9 1.1 3.9 1.2 3.2 2 3.2 3c0 .6.2 1.1.5 1.5H2.6c-.8 0-1.4.6-1.4 1.4v1.8h13.6V5.9c0-.8-.6-1.4-1.4-1.4h-1.1c.3-.4.5-.9.5-1.5 0-1-.7-1.8-1.7-1.9-.9-.2-1.8.3-2.3 1.3L8 3.7l-.8-1.3zM5.3 2.6c.4 0 .7.3.9.7l.4.8H5.2c-.4 0-.7-.3-.7-.7s.3-.8.8-.8zm5.4 0c.5 0 .8.4.8.8s-.3.7-.7.7H9.4l.4-.8c.2-.4.5-.7.9-.7zM2 8.7v4.4c0 1 .8 1.8 1.8 1.8h3.1V8.7H2zm7.1 0v6.2h3.1c1 0 1.8-.8 1.8-1.8V8.7H9.1z'/%3E%3C/svg%3E");
  flex: 1; min-width: 0; margin-left: calc(var(--sidebar-w) + 24px); padding: 38px 44px 72px;
  overflow-y: auto; transition: margin-left .2s var(--ease-out);
}
body.nav-collapsed .portal-view { margin-left: calc(var(--sidebar-collapsed-w) + 24px); }
.portal-page-head, .portal-stats, .portal-toolbar, .portal-project-grid, .asset-filter-row,
.asset-library-grid, .asset-project-list, .asset-detail-nav, .asset-library-guide,
.wallet-overview, .billing-section, .billing-explainer { width: min(1200px,100%); margin-inline: auto; }
.portal-page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 26px; }
.portal-eyebrow { display: block; margin-bottom: 6px; color: var(--brand); font-family: var(--font-mono); font-size: 9px; font-weight: 800; letter-spacing: .18em; }
.portal-page-head h1 { font-size: 30px; line-height: 1.25; }
.portal-page-head p { margin-top: 7px; color: var(--text-2); font-size: 12.5px; }
.portal-primary-btn, .wallet-action {
  min-height: 39px; padding: 0 16px; border: 0; border-radius: 9px; background: var(--grad);
  color: #fff; font: inherit; font-size: 12px; font-weight: 800; cursor: pointer; box-shadow: 0 8px 24px rgba(255,179,32,.22);
}
.portal-primary-btn:hover, .wallet-action:hover { filter: brightness(1.08); }
.portal-secondary-btn { border: 1px solid var(--line); background: var(--card); color: var(--text-2); box-shadow: none; }
.portal-secondary-btn:hover { border-color: rgba(124,92,255,.45); color: var(--text); background: var(--card-2); }

.portal-stats { display: grid; grid-template-columns: repeat(4,1fr); gap: var(--project-layout-gap); margin-bottom: 18px; }
.portal-stat-card {
  padding: 16px 17px;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(135deg,rgba(255,255,255,.055),rgba(255,255,255,.018));
  box-shadow: inset 0 1px rgba(255,255,255,.05),0 12px 28px rgba(0,0,0,.10);
  backdrop-filter: blur(12px);
}
.portal-stat-card span { display: block; color: var(--meta); font-size: 10px; }
.portal-stat-card strong { display: block; margin-top: 5px; font-size: 21px; line-height: 1.2; }
.portal-stat-card em { display: block; margin-top: 4px; color: var(--text-2); font-size: 9px; font-style: normal; }

.portal-toolbar, .asset-filter-row { display: flex; align-items: center; gap: var(--project-layout-gap); margin-bottom: 18px; }
.portal-search { height: 38px; flex: 1; display: flex; align-items: center; gap: 8px; padding: 0 12px; border: 1px solid var(--line); border-radius: 9px; background: var(--card); color: var(--meta); }
.portal-search:focus-within { border-color: rgba(124,92,255,.6); }
.portal-search input { width: 100%; border: 0; outline: 0; background: transparent; color: var(--text); font: inherit; font-size: 11.5px; }
.portal-toolbar select {
  height: 38px; min-width: 132px; padding: 0 42px 0 11px; border: 1px solid var(--line); border-radius: 9px;
  background-color: var(--card);
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%23A6ABB8' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 20px center; background-size: 12px 8px;
  -webkit-appearance: none; appearance: none;
  color: var(--text-2); font: inherit; font-size: 11px;
}
.portal-toolbar select:focus,.portal-toolbar select:focus-visible {
  border: 3px solid var(--brand); outline: none; box-shadow: none;
}
.portal-project-grid { grid-template-columns: repeat(auto-fill,minmax(250px,1fr)); gap: var(--project-layout-gap); }
.project-card-menu { position: absolute; top: 8px; right: 8px; display: flex; gap: 5px; opacity: 0; transition: opacity .15s; }
.project-card:hover .project-card-menu { opacity: 1; }
.project-card-action { width: 28px; height: 28px; border: 1px solid rgba(255,255,255,.2); border-radius: 8px; background: rgba(13,14,18,.78); color: var(--text-2); cursor: pointer; backdrop-filter: blur(4px); }
.project-card-action:hover { background: var(--card-2); color: var(--text); }
.project-card-action.danger:hover { background: rgba(240,85,93,.8); color: #fff; }
.project-empty-state, .asset-empty-state { grid-column: 1 / -1; padding: 70px 24px; border: 1px dashed var(--line); border-radius: 14px; text-align: center; color: var(--meta); }
.project-empty-state strong, .asset-empty-state strong { display: block; color: var(--text-2); font-size: 15px; }
.project-empty-state p, .asset-empty-state p { margin-top: 6px; font-size: 11px; }

.asset-project-toolbar { justify-content: space-between; }
.asset-project-toolbar .portal-search { max-width: 720px; }
@media (min-width: 921px) {
  .asset-project-toolbar .portal-search {
    flex: 0 0 calc(66.6667% - 5.34px);
    max-width: none;
  }
}
.asset-library-guide {
  display: flex; align-items: center; gap: 8px; margin-bottom: 18px; padding: 11px 14px;
  border: 1px solid var(--line-soft); border-radius: 11px; background: rgba(255,255,255,.018);
  color: var(--meta); font-size: 9.5px;
}
.asset-library-guide span {
  width: 21px; height: 21px; display: grid; place-items: center; border-radius: 50%;
  background: var(--brand-dim); color: #c5baff; font-size: 9px; font-weight: 800;
}
.asset-library-guide strong { color: var(--text-2); font-weight: 600; }
.asset-library-guide i { margin-inline: 4px; color: rgba(255,255,255,.22); font-size: 14px; font-style: normal; }
.asset-project-list { display: grid; grid-template-columns: repeat(auto-fill,minmax(270px,1fr)); gap: 15px; }
.asset-project-card {
  min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 15px;
  background: var(--card); cursor: pointer; transition: transform .18s,border-color .18s,box-shadow .18s;
}
.asset-project-card:hover, .asset-project-card:focus-visible {
  transform: translateY(-3px); border-color: rgba(124,92,255,.48);
  box-shadow: 0 18px 45px rgba(0,0,0,.22); outline: 0;
}
.asset-project-preview {
  position: relative; display: grid; height: 168px; overflow: hidden; background: #101217;
}
.asset-project-preview.has-multiple { grid-template-columns: 1.5fr 1fr; grid-template-rows: 1fr 1fr; gap: 2px; }
.asset-project-preview.has-multiple img:first-child { grid-row: 1 / 3; }
.asset-project-preview.count-2 { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr; }
.asset-project-preview.count-2 img:first-child { grid-row: auto; }
.asset-project-preview img { width: 100%; height: 100%; min-height: 0; object-fit: cover; }
.asset-project-preview::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg,rgba(7,8,11,.03) 38%,rgba(7,8,11,.72)); pointer-events: none; }
.asset-project-kind {
  position: absolute; z-index: 1; top: 10px; left: 10px; max-width: calc(100% - 20px);
  overflow: hidden; white-space: nowrap; text-overflow: ellipsis; padding: 4px 8px;
  border: 1px solid rgba(255,255,255,.18); border-radius: 99px; background: rgba(9,10,14,.68);
  color: #eceef5; font-size: 8.5px; backdrop-filter: blur(5px);
}
.asset-project-preview > strong {
  position: absolute; z-index: 1; right: 10px; bottom: 9px; color: #fff; font-size: 10px;
}
.asset-project-card-body { padding: 14px; }
.asset-project-card .asset-project-copy strong { font-size: 13.5px; }
.asset-project-card .asset-project-copy span { margin-top: 5px; }
.asset-project-card .asset-project-counts { margin-top: 13px; }
.asset-project-card .asset-project-counts span { flex: 1; min-width: 0; }
.asset-project-row {
  display: grid; grid-template-columns: 116px minmax(180px,1fr) auto 76px 18px; align-items: center; gap: 20px;
  min-height: 92px; padding: 11px 18px 11px 11px; border: 1px solid var(--line); border-radius: 14px;
  background: linear-gradient(110deg,rgba(27,29,37,.92),rgba(20,22,28,.78)); cursor: pointer;
  transition: transform .18s, border-color .18s, background .18s;
}
.asset-project-row:hover, .asset-project-row:focus-visible { transform: translateY(-2px); border-color: rgba(124,92,255,.42); background: linear-gradient(110deg,rgba(31,32,43,.98),rgba(23,24,32,.9)); outline: 0; }
.asset-project-cover { position: relative; height: 70px; overflow: hidden; border-radius: 10px; background: #101217; }
.asset-project-cover img { width: 100%; height: 100%; object-fit: cover; }
.asset-project-cover::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg,transparent 38%,rgba(8,9,12,.78)); }
.asset-project-cover span { position: absolute; z-index: 1; left: 8px; bottom: 7px; max-width: calc(100% - 16px); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; color: #fff; font-size: 8.5px; font-weight: 700; }
.asset-project-copy { min-width: 0; }
.asset-project-copy strong { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 14px; }
.asset-project-copy span { display: block; margin-top: 7px; color: var(--meta); font-size: 10px; }
.asset-project-counts { display: flex; align-items: center; gap: 8px; }
.asset-project-counts span { min-width: 72px; padding: 9px 11px; border: 0; border-radius: 9px; background: rgba(255,255,255,.025); color: var(--meta); font-size: 9px; }
.asset-project-counts i { margin-right: 4px; color: var(--text); font-size: 12px; font-style: normal; font-weight: 800; }
.asset-project-total { text-align: right; }
.asset-project-total strong { display: block; font-size: 17px; line-height: 1; }
.asset-project-total span { display: block; margin-top: 5px; color: var(--meta); font-size: 8.5px; }
.asset-project-arrow { color: var(--meta); font-size: 22px; transition: transform .18s, color .18s; }
.asset-project-row:hover .asset-project-arrow { color: #b8aaff; transform: translateX(3px); }
.asset-detail-nav { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; color: var(--meta); font-size: 10px; }
.asset-back-btn {
  display: inline-flex; align-items: center; min-height: 32px; padding: 0 11px;
  border: 1px solid var(--line); border-radius: 8px; background: var(--card);
  color: var(--text-2); font: inherit; font-size: 10.5px; font-weight: 700; cursor: pointer;
}
.asset-back-btn:hover { border-color: rgba(255,179,32,.55); background: var(--card-2); color: #FFC552; }
.asset-breadcrumb-root { color: var(--text-2); }
.asset-detail-nav strong { max-width: 420px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; color: #FFC552; font-weight: 600; }
.asset-detail-head { margin-bottom: 20px; }
.asset-detail-stats { margin-bottom: 22px; }
#asset-project-stats, #asset-stats { grid-template-columns: repeat(3,1fr); }
#asset-project-stats .portal-stat-card span,
#asset-stats .portal-stat-card span,
#project-stats .portal-stat-card span { font-size: 13px; }
#asset-project-stats .portal-stat-card strong,
#asset-stats .portal-stat-card strong,
#project-stats .portal-stat-card strong { font-size: 21px; line-height: 1.2; }
.asset-filter-row { justify-content: space-between; }
.asset-type-tabs { display: flex; flex-wrap: wrap; gap: 5px; }
.asset-type-tabs button { padding: 7px 13px; border: 1px solid transparent; border-radius: 99px; background: transparent; color: var(--text-2); font: inherit; font-size: 11px; cursor: pointer; }
.asset-type-tabs button:hover { background: var(--card); color: var(--text); }
.asset-type-tabs button.active { border-color: rgba(255,179,32,.4); background: var(--brand-dim); color: #FFC552; font-weight: 700; }
.asset-type-tabs button span { margin-left: 4px; color: var(--meta); font-size: 9px; }
#asset-type-tabs { flex-wrap: nowrap; padding: 4px; border: 1px solid var(--line-soft); border-radius: 11px; background: rgba(255,255,255,.018); }
#asset-type-tabs button { min-width: 118px; padding: 9px 14px; border-radius: 8px; }
#asset-type-tabs .asset-type-icon {
  display: inline-block; width: 13px; height: 13px; margin-right: 7px; vertical-align: -2px;
  background: center / contain no-repeat;
}
#asset-type-tabs .asset-type-icon-image { background-image: url("icon-image.svg"); }
#asset-type-tabs .asset-type-icon-video { background-image: url("icon-video.svg"); }
#asset-type-tabs button.active .asset-type-icon { filter: none; }
#asset-type-tabs button.active .asset-type-icon-image {
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Crect x='1.5' y='2.5' width='13' height='11' rx='2' stroke='%23FFC552' stroke-width='1.5'/%3E%3Ccircle cx='5.2' cy='6' r='1.2' fill='%23FFC552'/%3E%3Cpath d='M2.8 12l3.2-3.1 2.2 2 2.3-2.1 2.6 3.2' stroke='%23FFC552' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
#asset-type-tabs button.active .asset-type-icon-video {
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Crect x='1.5' y='3' width='9.5' height='10' rx='2' stroke='%23FFC552' stroke-width='1.5'/%3E%3Cpath d='M11 6.2l3.2-1.8v7.2L11 9.8V6.2Z' fill='%23FFC552'/%3E%3C/svg%3E");
}
#asset-type-tabs button.active span { color: #FFC552; }
.asset-detail-tools { flex: 1; display: flex; align-items: center; justify-content: flex-end; gap: 12px; }
.asset-subtype-tabs { display: flex; align-items: center; gap: 4px; padding: 3px; border: 1px solid var(--line-soft); border-radius: 9px; background: rgba(255,255,255,.02); }
.asset-subtype-tabs button { padding: 6px 8px; border: 0; border-radius: 6px; background: transparent; color: var(--meta); font: inherit; font-size: 9px; cursor: pointer; white-space: nowrap; }
.asset-subtype-tabs button:hover { color: var(--text-2); }
.asset-subtype-tabs button.active { background: var(--card-2); color: var(--text); }
.asset-subtype-tabs button span { margin-left: 3px; color: #FFC552; }
.asset-search { max-width: 280px; }
.asset-library-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(210px,1fr)); gap: 15px; }
.library-asset-card { overflow: hidden; border: 1px solid var(--line); border-radius: 13px; background: var(--card); transition: transform .18s, border-color .18s; }
.library-asset-card:hover { transform: translateY(-3px); border-color: rgba(255,255,255,.2); }
.library-asset-preview { position: relative; aspect-ratio: 16/10; overflow: hidden; background: #101217; cursor: pointer; }
.library-asset-preview img { width: 100%; height: 100%; object-fit: cover; }
.asset-type-chip { position: absolute; top: 9px; left: 9px; padding: 3px 8px; border: 1px solid rgba(255,255,255,.17); border-radius: 99px; background: rgba(10,11,15,.72); color: #dfe2ea; font-size: 9px; backdrop-filter: blur(5px); }
.asset-video-mark { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; }
.asset-video-mark svg { width:40px; height:40px; }
.asset-video-mark svg path:first-of-type { fill:#000; fill-opacity:.52; }
.library-asset-body { padding: 12px; }
.library-asset-title { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 12.5px; font-weight: 700; }
.library-asset-meta { margin-top: 4px; color: var(--meta); font-size: 9.5px; }
.library-asset-actions { display: flex; gap: 6px; margin-top: 11px; }
.library-asset-actions button { flex: 1; padding: 6px; border: 1px solid var(--line); border-radius: 7px; background: transparent; color: var(--text-2); font: inherit; font-size: 9.5px; cursor: pointer; }
.library-asset-actions button:hover { background: var(--card-2); color: var(--text); }
.library-asset-actions button.danger:hover { border-color: rgba(240,85,93,.3); color: #ff8d93; }

.wallet-overview { display: grid; grid-template-columns: 1fr 1.35fr; gap: 15px; margin-bottom: 30px; }
.wallet-card { position: relative; overflow: hidden; padding: 23px; border: 1px solid var(--line); border-radius: 15px; background: rgba(23,26,33,.82); }
.wallet-card::after { content: ''; position: absolute; width: 170px; height: 170px; right: -80px; bottom: -100px; border-radius: 50%; background: rgba(124,92,255,.12); filter: blur(4px); }
.coin-wallet-card::after { background: rgba(255,186,65,.12); }
.wallet-card-top { display: flex; align-items: center; gap: 8px; color: var(--text-2); font-size: 11.5px; }
.wallet-icon { width: 25px; height: 25px; display: inline-grid; place-items: center; border-radius: 8px; font-size: 11px; }
.coin-icon { background: rgba(255,190,73,.13); color: #ffc55f; }
.quota-icon { background: var(--brand-dim); color: #b7a8ff; }
.wallet-card > strong, .quota-number strong { display: inline-block; margin-top: 13px; font-size: 31px; line-height: 1.1; }
.wallet-card p { margin-top: 7px; color: var(--meta); font-size: 10.5px; }
.wallet-action { position: relative; z-index: 2; min-height: 32px; margin-top: 15px; padding-inline: 13px; background: linear-gradient(120deg,#e7aa3c,#ffcb66); color: #251803; font-size: 10px; }
.quota-number span { margin-left: 6px; color: var(--meta); font-size: 12px; }
.wallet-progress { height: 6px; margin-top: 14px; overflow: hidden; border-radius: 99px; background: rgba(255,255,255,.08); }
.wallet-progress i { display: block; height: 100%; border-radius: inherit; background: var(--grad); }

.billing-section { margin-top: 28px; }
.billing-section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 15px; }
.billing-section-head span { color: #9782ff; font-size: 9px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.billing-section-head h2 { margin-top: 3px; font-size: 20px; }
.billing-section-head em { color: var(--meta); font-size: 10px; font-style: normal; }
.billing-section-head em b { color: var(--text); }
.plan-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 14px; align-items: stretch; }
.plan-card { position: relative; display: flex; flex-direction: column; min-width: 0; padding: 22px; border: 1px solid var(--line); border-radius: 16px; background: var(--card); }
.plan-card.recommended { border-color: rgba(124,92,255,.55); box-shadow: 0 0 0 1px rgba(124,92,255,.14), 0 18px 60px rgba(32,19,78,.2); }
.plan-card.current { border-color: rgba(62,207,142,.4); }
.plan-card-badge-slot { display: flex; min-height: 28px; align-items: flex-start; justify-content: flex-end; }
.plan-badge { padding: 3px 7px; border-radius: 99px; background: var(--brand-dim); color: #c6bbff; font-size: 8px; font-weight: 800; }
.plan-name { margin-top: 0; font-size: 18px; font-weight: 850; }
.plan-description { min-height: 48px; margin-top: 7px; color: var(--meta); font-size: 10.5px; line-height: 1.65; }
.plan-price { margin-top: 8px; font-size: 30px; font-weight: 850; letter-spacing: -.04em; }
.plan-price small { color: var(--meta); font-size: 10px; font-weight: 500; }
.plan-price-note { min-height: 30px; margin-top: 6px; color: var(--meta); font-size: 9px; line-height: 1.5; }
.plan-quota { display: flex; flex-direction: column; gap: 5px; margin-top: 13px; padding: 11px; border-radius: 10px; background: rgba(255,255,255,.035); color: var(--text-2); font-size: 9px; line-height: 1.45; }
.plan-quota strong { color: var(--text); font-size: 11px; }
.plan-includes { margin-top: 18px; color: var(--text); font-size: 10px; font-weight: 800; }
.plan-features { display: flex; flex-direction: column; gap: 9px; margin: 11px 0 20px; color: var(--text-2); font-size: 10px; line-height: 1.45; }
.plan-features span { display: flex; align-items: flex-start; }
.plan-features span::before { content: '✓'; flex: 0 0 auto; margin-right: 7px; color: var(--ok); font-weight: 900; }
.plan-button { width: 100%; min-height: 36px; margin-top: auto; border: 1px solid var(--line); border-radius: 8px; background: var(--card-2); color: var(--text); font: inherit; font-size: 11px; font-weight: 700; cursor: pointer; }
.plan-card.recommended .plan-button { border: 0; background: var(--grad); }
.plan-button:disabled { opacity: .55; cursor: default; }

.coin-package-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 13px; }
.coin-package { display: flex; align-items: center; gap: 14px; padding: 17px; border: 1px solid var(--line); border-radius: 13px; background: var(--card); }
.coin-package-mark { width: 43px; height: 43px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 13px; background: linear-gradient(145deg,#ffd572,#d99b31); color: #342000; font-size: 18px; font-weight: 900; box-shadow: 0 8px 22px rgba(219,155,48,.18); }
.coin-package-copy { min-width: 0; }
.coin-package-copy strong { display: block; font-size: 14px; }
.coin-package-copy span { display: block; margin-top: 3px; color: #e9bc62; font-size: 9.5px; }
.coin-buy { margin-left: auto; padding: 7px 10px; border: 1px solid rgba(255,198,89,.25); border-radius: 8px; background: rgba(255,198,89,.08); color: #ffd171; font: inherit; font-size: 10px; cursor: pointer; }
.billing-explainer { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; margin-top: 24px; }
.billing-explainer > div { padding: 16px; border: 1px dashed var(--line); border-radius: 12px; }
.billing-explainer strong { font-size: 12px; }
.billing-explainer p { margin-top: 4px; color: var(--meta); font-size: 10px; }

@media (max-width: 1280px) {
  .plan-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}

@media (max-width: 920px) {
  .portal-view, body.nav-collapsed .portal-view { margin-left: 0; padding: 28px 18px 60px; }
  .portal-stats { grid-template-columns: 1fr 1fr; }
  .wallet-overview, .plan-grid, .coin-package-grid { grid-template-columns: 1fr; }
  .asset-filter-row { align-items: stretch; flex-direction: column; }
  .asset-detail-tools { align-items: stretch; flex-direction: column; }
  .asset-subtype-tabs { overflow-x: auto; }
  .asset-search { max-width: none; }
  .asset-project-row { grid-template-columns: 96px minmax(0,1fr) auto 14px; gap: 13px; }
  .asset-project-counts { display: none; }
  .asset-project-card .asset-project-counts { display: flex; }
}

@media (max-width: 620px) {
  .portal-page-head { align-items: flex-start; flex-direction: column; }
  .portal-primary-btn { width: 100%; }
  .portal-toolbar { align-items: stretch; flex-direction: column; }
  .portal-toolbar select { width: 100%; }
  .portal-stats { grid-template-columns: 1fr 1fr; }
  .portal-stat-card { padding: 13px; }
  .portal-stat-card strong { font-size: 18px; }
  .asset-project-row { grid-template-columns: 82px minmax(0,1fr) 14px; min-height: 78px; padding: 9px 12px 9px 9px; }
  .asset-project-cover { height: 58px; }
  .asset-project-total { display: none; }
  .asset-project-copy strong { font-size: 12.5px; }
  .asset-project-copy span { font-size: 9px; }
  .asset-library-guide { overflow-x: auto; }
  .asset-library-guide > * { flex: 0 0 auto; }
  .asset-project-list { grid-template-columns: 1fr; }
  .asset-library-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; }
  .library-asset-body { padding: 10px; }
  .billing-section-head { align-items: flex-start; flex-direction: column; }
  .billing-explainer { grid-template-columns: 1fr; }
}

/* ChatGPT-inspired plan selection */
#billing-view {
  background: #f7f7f8;
  color: #202123;
  font-family: "Segoe UI",Arial,sans-serif;
}
#billing-view .portal-page-head,
#billing-view .wallet-overview,
#billing-view .billing-section,
#billing-view .billing-explainer { width: min(1240px,100%); }
#billing-view .billing-page-head {
  align-items: center; justify-content: center; flex-direction: column;
  margin-bottom: 42px; text-align: center;
}
#billing-view .portal-eyebrow { color: #6e6e80; letter-spacing: .12em; }
#billing-view .portal-page-head h1 { color: #202123; font-size: 36px; font-weight: 650; letter-spacing: -.03em; }
#billing-view .portal-page-head p { color: #6e6e80; font-size: 13px; }
#billing-view .local-prototype-badge {
  margin-top: 10px; border-color: #d9d9e3; background: #fff; color: #565869;
}
#billing-view .billing-plan-section { margin-top: 0; }
#billing-view .billing-section-head { margin-bottom: 18px; }
#billing-view .billing-section-head span { color: #6e6e80; letter-spacing: .08em; }
#billing-view .billing-section-head h2 { color: #202123; font-size: 22px; font-weight: 600; }
#billing-view .billing-section-head em { color: #6e6e80; }
#billing-view .billing-section-head em b { color: #202123; }
#billing-view .plan-grid { gap: 16px; }
#billing-view .plan-card {
  min-height: 480px; padding: 28px; border: 1px solid #d9d9e3; border-radius: 16px;
  background: #fff; color: #202123; box-shadow: none;
}
#billing-view .plan-card.recommended { border-color: #202123; box-shadow: none; }
#billing-view .plan-card.current { border-color: #10a37f; box-shadow: 0 0 0 1px #10a37f; }
#billing-view .plan-badge {
  padding: 5px 9px;
  background: #202123; color: #fff;
}
#billing-view .plan-name { font-size: 22px; font-weight: 650; }
#billing-view .plan-description { min-height: 42px; margin-top: 9px; color: #6e6e80; font-size: 11px; line-height: 1.65; }
#billing-view .plan-price { margin-top: 5px; font-size: 34px; font-weight: 650; letter-spacing: -.025em; }
#billing-view .plan-price small { color: #6e6e80; font-size: 11px; }
#billing-view .plan-button {
  min-height: 44px; margin-top: 10px; border: 1px solid #202123; border-radius: 8px;
  background: #202123; color: #fff; font-size: 12px;
}
#billing-view .plan-card.recommended .plan-button { background: #10a37f; border-color: #10a37f; }
#billing-view .plan-button:hover:not(:disabled) { filter: brightness(.94); }
#billing-view .plan-button:disabled { border-color: #d9d9e3; background: #ececf1; color: #6e6e80; opacity: 1; }
#billing-view .plan-bonus {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  height: 43px;
  align-items: center;
  gap: 7px;
  margin-top: 7px;
  padding: 6px 10px;
  box-sizing: border-box;
  border: 0;
  border-radius: 9px;
  background: rgba(255,190,73,.09);
}
#billing-view .plan-bonus img { width: 22px; height: 22px; object-fit: contain; }
#billing-view .plan-bonus-gift { width: 12px; height: 12px; background: #cda965; mask: center / contain no-repeat var(--billing-gift-icon); -webkit-mask: center / contain no-repeat var(--billing-gift-icon); }
#billing-view .plan-bonus span { min-width: 0; color: var(--meta); font-size: 9px; white-space: nowrap; }
#billing-view .plan-bonus strong { display: inline-flex; align-items: center; justify-self: end; gap: 5px; color: #ffc55f; font-size: 10.5px; line-height: 1; white-space: nowrap; }
#billing-view .plan-bonus strong b { font: inherit; }
#billing-view .plan-bonus-coin { width: 16px; height: 16px; object-fit: contain; }
#billing-view .plan-bonus.bonus-low {
  background: radial-gradient(90% 120% at 94% -18%,rgba(197,211,228,.11),transparent 52%),linear-gradient(108deg,#26262c 0%,#302e31 48%,#1f2027 100%);
  box-shadow: inset 0 1px rgba(236,242,250,.07),inset 0 -10px 18px rgba(4,5,8,.2),0 8px 18px rgba(0,0,0,.12);
}
#billing-view .plan-bonus.bonus-low .plan-bonus-gift { background: #aaa8ae; }
#billing-view .plan-bonus.bonus-low .plan-bonus-coin { filter: saturate(.48) brightness(.92); }
#billing-view .plan-bonus.bonus-low span { color: #aaa9b0; }
#billing-view .plan-bonus.bonus-low strong { color: #d1c8b7; }
#billing-view .plan-bonus.bonus-medium {
  background: radial-gradient(78% 140% at 100% -24%,rgba(246,204,125,.18),transparent 53%),linear-gradient(108deg,#282335 0%,#3d3044 48%,#2a2733 100%);
  box-shadow: inset 0 1px rgba(255,231,193,.09),inset 0 -11px 19px rgba(11,7,18,.24),0 9px 20px rgba(37,23,53,.17);
}
#billing-view .plan-bonus.bonus-medium .plan-bonus-gift { background: #d6bd8e; }
#billing-view .plan-bonus.bonus-medium .plan-bonus-coin { filter: saturate(.9) brightness(1.02); }
#billing-view .plan-bonus.bonus-medium span { color: #c6b6c2; }
#billing-view .plan-bonus.bonus-medium strong { color: #ead093; font-size: 11px; text-shadow: 0 0 12px rgba(234,188,103,.17); }
#billing-view .plan-bonus.bonus-high {
  border-color: transparent;
  background: radial-gradient(80% 150% at 100% 0%,rgba(255,218,141,.23),transparent 55%),linear-gradient(108deg,#2d2117 0%,#624420 45%,#8e652d 68%,#382719 100%);
  box-shadow: inset 0 1px rgba(255,236,189,.16),inset 0 -12px 20px rgba(20,13,7,.18),0 10px 24px rgba(116,78,25,.18);
}
#billing-view .plan-bonus.bonus-high .plan-bonus-gift { background: #ffe6a1; }
#billing-view .plan-bonus.bonus-high .plan-bonus-coin { filter: saturate(1.48) brightness(1.18); transform: scale(1.06); }
#billing-view .plan-bonus.bonus-high span { color: #f0d7aa; }
#billing-view .plan-bonus.bonus-high strong { color: #fff0a6; font-size: 14px; text-shadow: 0 0 14px rgba(255,194,58,.52); }
#billing-view .plan-bonus.bonus-max {
  border-color: transparent;
  background: radial-gradient(68% 180% at 100% -20%,rgba(255,216,121,.32),transparent 54%),linear-gradient(108deg,#0a0a0d 0%,#17130d 42%,#4a3210 68%,#111014 100%);
  box-shadow: inset 0 1px rgba(255,236,188,.17),inset 0 -14px 24px rgba(0,0,0,.3),0 11px 27px rgba(77,53,16,.2);
}
#billing-view .plan-bonus.bonus-max .plan-bonus-gift { background: #fff1ba; }
#billing-view .plan-bonus.bonus-max .plan-bonus-coin { filter: saturate(1.45) brightness(1.15); transform: scale(1.1); }
#billing-view .plan-bonus.bonus-max span { color: #ecd3bd; }
#billing-view .plan-bonus.bonus-max strong { color: #fff0a8; font-size: 15px; text-shadow: 0 0 14px rgba(255,209,91,.55); }
#billing-view .plan-includes { margin-top: 18px; color: #202123; font-size: 10.5px; font-weight: 650; }
#billing-view .plan-features { gap: 11px; margin: 13px 0 0; color: #353740; font-size: 10.5px; }
#billing-view .plan-features span { line-height: 1.5; }
#billing-view .plan-features span::before { content: '✓'; margin-right: 8px; color: #202123; }
#billing-view .plan-quota { display: flex; }
#billing-view .wallet-overview { grid-template-columns: 1.35fr 1fr; margin-top: 34px; margin-bottom: 36px; }
#billing-view .wallet-card {
  border-color: #d9d9e3; border-radius: 16px; background: #fff; color: #202123;
}
#billing-view .wallet-card::after { display: none; }
#billing-view .wallet-card-top { color: #565869; }
#billing-view .quota-icon { background: #ececf1; color: #202123; }
#billing-view .coin-icon { background: #fff5d6; color: #8a5b00; }
#billing-view .wallet-card > strong,
#billing-view .quota-number strong { color: #202123; font-weight: 650; }
#billing-view .wallet-card p,
#billing-view .quota-number span { color: #6e6e80; }
#billing-view .wallet-progress { background: #ececf1; }
#billing-view .wallet-progress i { background: #10a37f; }
#billing-view .wallet-action {
  min-height: 36px; border: 1px solid #202123; border-radius: 8px;
  background: #fff; color: #202123; box-shadow: none;
}
#billing-view .coin-package {
  border-color: #d9d9e3; border-radius: 14px; background: #fff; color: #202123;
}
#billing-view .coin-package-mark { background: #fff5d6; color: #8a5b00; box-shadow: none; }
#billing-view .coin-package-copy span { color: #6e6e80; }
#billing-view .coin-buy {
  border-color: #202123; background: #202123; color: #fff; font-weight: 700;
}
#billing-view .billing-explainer > div { border-color: #d9d9e3; background: #fff; }
#billing-view .billing-explainer strong { color: #202123; }
#billing-view .billing-explainer p { color: #6e6e80; }

@media (max-width: 920px) {
  #billing-view .wallet-overview { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  #billing-view .billing-page-head { align-items: center; }
  #billing-view .portal-page-head h1 { font-size: 29px; }
  #billing-view .plan-card { min-height: 0; }
}

/* Theme-colored ChatGPT-style plan layout */
#billing-view {
  /* 透出 body 的微弱点阵背景，避免会员页形成一整块深色面板。 */
  background: transparent;
  color: var(--text);
  font-family: var(--font-ui);
}
#billing-view .portal-eyebrow { color: #9c89ff; }
#billing-view .billing-page-head .portal-eyebrow,
#billing-view .billing-page-head .local-prototype-badge { display: none; }
#billing-view .portal-page-head h1,
#billing-view .billing-section-head h2,
#billing-view .billing-section-head em b { color: var(--text); }
#billing-view .portal-page-head p,
#billing-view .billing-section-head em { color: var(--text-2); }
#billing-view .local-prototype-badge {
  border-color: rgba(124,92,255,.3); background: var(--brand-dim); color: #c8bdff;
}
#billing-view .billing-section-head span { color: #9c89ff; }
#billing-view .billing-plan-section .billing-section-head > div > span { display: none; }
#billing-view .plan-card {
  overflow: hidden;
  isolation: isolate;
  border-color: var(--line);
  background: linear-gradient(145deg,rgba(31,32,42,.96),rgba(20,21,29,.97));
  color: var(--text);
}
#billing-view .plan-card::before {
  position: absolute;
  z-index: 0;
  inset: 0;
  content: '';
  pointer-events: none;
  opacity: .76;
  background:
    radial-gradient(112% 70% at 100% -18%,rgba(188,202,232,.105),transparent 67%),
    linear-gradient(126deg,transparent 0 31%,rgba(210,220,240,.026) 46%,transparent 61%),
    radial-gradient(105% 44% at 50% 108%,rgba(130,146,180,.075),transparent 76%);
  filter: blur(1.4px);
}
#billing-view .plan-card::after {
  position: absolute;
  z-index: 0;
  inset: 0;
  content: '';
  pointer-events: none;
  background:
    radial-gradient(112% 28% at 50% 108%,rgba(167,187,222,.19),transparent 72%),
    linear-gradient(0deg,rgba(3,4,8,.48) 0%,rgba(6,7,12,.2) 29%,transparent 57%);
}
#billing-view .plan-grid .plan-card:nth-child(2)::after {
  background:
    radial-gradient(112% 28% at 50% 108%,rgba(203,143,61,.22),transparent 72%),
    linear-gradient(0deg,rgba(11,7,3,.5) 0%,rgba(17,11,5,.2) 29%,transparent 57%);
}
#billing-view .plan-grid .plan-card:nth-child(3)::after {
  background:
    radial-gradient(112% 28% at 50% 108%,rgba(119,111,208,.2),transparent 72%),
    linear-gradient(0deg,rgba(6,5,18,.51) 0%,rgba(10,9,25,.2) 29%,transparent 57%);
}
#billing-view .plan-grid .plan-card:nth-child(4)::after {
  background:
    radial-gradient(112% 28% at 50% 108%,rgba(142,95,190,.2),transparent 70%),
    radial-gradient(52% 15% at 82% 106%,rgba(211,166,92,.1),transparent 76%),
    linear-gradient(0deg,rgba(10,5,17,.52) 0%,rgba(17,9,26,.2) 29%,transparent 57%);
}
#billing-view .plan-card > * {
  position: relative;
  z-index: 1;
}
#billing-view .plan-card.recommended {
  border-color: rgba(124,92,255,.72);
  box-shadow: 0 0 0 1px rgba(124,92,255,.18),0 20px 60px rgba(45,27,112,.2);
}
#billing-view .plan-card.current {
  border-color: var(--ok); box-shadow: 0 0 0 1px rgba(62,207,142,.18);
}
#billing-view .plan-badge { display: inline-flex; align-items: center; height: 26px; box-sizing: border-box; background: var(--grad); color: #fff; box-shadow: 0 5px 14px rgba(255,185,62,.24); }
#billing-view .plan-badge.badge-white {
  background: #fff;
  color: #1b1b22;
  box-shadow: 0 5px 14px rgba(255,255,255,.16);
}
#billing-view .plan-badge.badge-vivid {
  padding-inline: 5px;
  border: 1px solid rgba(255,255,255,.24);
  background: linear-gradient(105deg,#d9533c 0%,#e46438 38%,#ed743c 70%,#f18443 100%);
  color: #fff;
  box-shadow: 0 5px 14px rgba(222,87,52,.28);
}
#billing-view .plan-badge.badge-black-gold {
  height: 28px;
  border: 0;
  background: linear-gradient(105deg,#09090c 0%,#25200f 48%,#09090c 100%);
  color: #fff;
  box-shadow: inset 0 1px rgba(255,255,255,.16),0 5px 14px rgba(213,164,52,.2);
}
#billing-view .plan-badge-premium-mark {
  width: 11px;
  height: 13px;
  flex: 0 0 auto;
  margin-right: 5px;
  display: block;
  object-fit: contain;
  filter: none;
}
#billing-view .plan-description,
#billing-view .plan-price small { color: var(--meta); }
#billing-view .plan-button {
  border-color: rgba(124,92,255,.5); border-radius: 999px; background: var(--grad); color: #fff;
  box-shadow: 0 12px 26px rgba(0,0,0,.2),inset 0 1px rgba(255,255,255,.16);
}
#billing-view .plan-card.recommended .plan-button {
  border-color: rgba(124,92,255,.5);
  background: linear-gradient(110deg,#ffe790 0%,#ffbf48 30%,#ff9d32 53%,#ffd064 76%,#ffe790 100%);
  background-size: 220% 100%;
  animation: plan-button-gradient-flow 3.6s ease-in-out infinite;
  box-shadow: 0 12px 26px rgba(242,145,36,.2),inset 0 1px rgba(255,248,202,.34);
}
@keyframes plan-button-gradient-flow {
  from { background-position: 100% 0; }
  to { background-position: -120% 0; }
}
#billing-view .plan-card.recommended .plan-button-label {
  display: inline-block;
  color: transparent;
  background: linear-gradient(110deg,#161619 0%,#161619 38%,#9a9aa1 49%,#161619 60%,#161619 100%);
  background-size: 220% 100%;
  background-clip: text;
  -webkit-background-clip: text;
  animation: plan-button-text-sweep 3.2s ease-in-out infinite;
}
@keyframes plan-button-text-sweep {
  from { background-position: 100% 0; }
  to { background-position: -120% 0; }
}
@media (prefers-reduced-motion: reduce) {
  #billing-view .plan-card.recommended .plan-button { animation: none; }
  #billing-view .plan-card.recommended .plan-button-label,
  #billing-view .coin-vip-cta-primary-label { animation: none; }
}
#billing-view .plan-button:disabled {
  border-color: var(--line); background: var(--card-2); color: var(--meta);
}
#billing-view .plan-quota {
  margin-top: 8px;
  background: linear-gradient(124deg,rgba(49,50,63,.38),rgba(26,27,36,.47));
  box-shadow: inset 0 1px rgba(255,255,255,.035),0 10px 24px rgba(0,0,0,.09);
  backdrop-filter: blur(3px);
}
#billing-view .plan-includes { color: var(--text); }
#billing-view .plan-features { color: var(--text-2); }
#billing-view .plan-features span::before {
  content: '';
  display: inline-block;
  width: 14px;
  height: 14px;
  margin-right: 7px;
  vertical-align: -2px;
  background: center / contain no-repeat url('check.svg');
}
#billing-view .wallet-card {
  border-color: var(--line); background: var(--card); color: var(--text);
}
#billing-view .wallet-card-top { color: var(--text-2); }
#billing-view .quota-icon { background: var(--brand-dim); color: #b7a8ff; }
#billing-view .coin-icon { background: rgba(255,190,73,.13); color: #ffc55f; }
#billing-view .wallet-card > strong,
#billing-view .quota-number strong { color: var(--text); }
#billing-view .wallet-card p,
#billing-view .quota-number span { color: var(--meta); }
#billing-view .wallet-progress { background: rgba(255,255,255,.08); }
#billing-view .wallet-progress i { background: var(--grad); }
#billing-view .wallet-action {
  border-color: rgba(124,92,255,.45); background: var(--brand-dim); color: #d7d0ff;
}
#billing-view .coin-package {
  border-color: var(--line); background: var(--card); color: var(--text);
}
#billing-view .coin-package-mark { background: rgba(255,190,73,.13); color: #ffc55f; }
#billing-view .coin-package-copy span { color: var(--meta); }
#billing-view .coin-buy {
  border-color: rgba(124,92,255,.45); background: var(--brand-dim); color: #d7d0ff;
}
#billing-view .billing-explainer > div { border-color: var(--line); background: var(--card); }
#billing-view .billing-explainer strong { color: var(--text); }
#billing-view .billing-explainer p { color: var(--meta); }

/* Separate membership plans from coin purchases */
#billing-view .billing-switch {
  width: min(420px,100%);
  margin: 2px auto 32px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--card);
}
#billing-view .billing-switch button {
  min-height: 40px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--meta);
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: background .18s,color .18s,box-shadow .18s;
}
#billing-view .billing-switch button:hover { color: var(--text-2); }
#billing-view .billing-switch button.active {
  background: #fff;
  color: #0f0f13;
  box-shadow: none;
}
#billing-view .billing-film-hero {
  position: relative;
  /* 与胶卷素材等高，避免形成比胶卷更高的深色底框。 */
  height: 165px;
  margin-bottom: 42px;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: transparent;
  isolation: isolate;
}
#billing-view .billing-film-rail {
  position: absolute;
  z-index: 0;
  top: 50%;
  left: 0;
  display: flex;
  gap: 8px;
  width: max-content;
  height: 165px;
  transform: translate(-1647px, -50%);
  animation: billing-film-scroll 34s linear infinite;
  will-change: transform;
}
#billing-view .billing-film-frame {
  position: relative;
  width: 1639px;
  height: 165px;
  flex: 0 0 auto;
}
#billing-view .billing-film-base {
  display: block;
  width: 1639px;
  height: 165px;
}
#billing-view .billing-film-photos {
  position: absolute;
  inset: 0 auto auto 0;
  display: grid;
  grid-template-columns: repeat(9, 175px);
  gap: 8px;
  width: 1647px;
  height: 165px;
  padding: 17px 4px;
  box-sizing: border-box;
  transform: scaleX(.995143);
  transform-origin: left top;
}
#billing-view .billing-film-photo {
  position: relative;
  width: 175px;
  height: 131px;
  overflow: hidden;
  border-radius: 4px;
}
#billing-view .billing-film-photo-image {
  display: block;
  width: 175px;
  height: 131px;
  object-fit: cover;
}
#billing-view .billing-film-like {
  position: absolute;
  z-index: 1;
  left: 8px;
  bottom: 8px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 3px 6px;
  border-radius: 99px;
  background: rgba(8,9,13,.42);
  color: rgba(255,255,255,.92);
  font-size: 8px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: .01em;
  text-shadow: 0 1px 3px rgba(0,0,0,.44);
  backdrop-filter: blur(4px);
}
#billing-view .billing-film-like img {
  width: 10px;
  height: 10px;
  display: block;
}
#billing-view .billing-film-hero::after {
  position: absolute;
  z-index: 2;
  inset: 0;
  content: '';
  pointer-events: none;
}
#billing-view .billing-film-hero::after {
  background: linear-gradient(90deg, var(--bg) 0%, rgba(13,14,18,.72) 4%, transparent 13%, transparent 84%, rgba(13,14,18,.16) 90%, rgba(13,14,18,.62) 96%, var(--bg) 100%);
}
#billing-view .billing-film-content {
  position: relative;
  z-index: 3;
  isolation: isolate;
  display: flex;
  height: 100%;
  box-sizing: border-box;
  align-items: center;
  flex-direction: column;
  justify-content: center;
  padding: 10px 20px;
  text-align: center;
}
#billing-view .billing-film-content::before {
  position: absolute;
  z-index: 0;
  top: 13px;
  bottom: 12px;
  left: 50%;
  width: min(900px,calc(100% - 40px));
  content: '';
  pointer-events: none;
  border-radius: 22px;
  background:
    linear-gradient(90deg,transparent 0%,rgba(8,9,14,.34) 13%,rgba(8,9,14,.61) 50%,rgba(8,9,14,.34) 87%,transparent 100%),
    linear-gradient(180deg,rgba(8,9,14,.34),rgba(8,9,14,.55) 48%,rgba(8,9,14,.26));
  transform: translateX(-50%);
  filter: blur(7px);
}
#billing-view .billing-film-content > * { position: relative; z-index: 1; }
#billing-view .billing-film-content :is(h1, p) { text-shadow: 0 2px 16px rgba(0,0,0,.72); }
#billing-view .billing-film-hero .billing-page-head { margin: 0; }
#billing-view .billing-film-hero .billing-switch { margin: 8px auto 0; }
@keyframes billing-film-scroll {
  from { transform: translate(-1647px, -50%); }
  to { transform: translate(0, -50%); }
}
@media (prefers-reduced-motion: reduce) {
  #billing-view .billing-film-rail { animation: none; }
}
#billing-view .billing-panel {
  width: min(1240px,100%);
  margin: 0 auto;
}
#billing-view .billing-panel.active { display: block; }
#billing-view .billing-single-wallet {
  width: min(620px,100%);
  grid-template-columns: 1fr;
  margin-top: 30px;
}
#billing-view .billing-coin-wallet { margin-bottom: 28px; }
#billing-view .billing-single-explainer {
  grid-template-columns: 1fr;
  width: min(620px,100%);
}

@media (max-width: 620px) {
  #billing-view .billing-film-hero { height: 148px; margin-bottom: 30px; }
  #billing-view .billing-film-content { padding-inline: 12px; }
  #billing-view .billing-film-hero .billing-switch { width: min(360px,100%); margin-top: 7px; }
  #billing-view .billing-switch { margin-bottom: 24px; }
  #billing-view .billing-switch button { min-height: 38px; }
}

/* Purchase-first billing layout */
#billing-view .coin-store-section { margin-top: 0; }
#billing-view .coin-vip-cta {
  position: relative;
  isolation: isolate;
  width: min(1240px,100%);
  min-height: 92px;
  margin: 20px auto 0;
  padding: 16px 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  box-sizing: border-box;
  overflow: hidden;
  border: 1px solid rgba(255,202,102,.16);
  border-radius: 18px;
  background: radial-gradient(62% 210% at 97% 48%,rgba(177,113,28,.2),transparent 62%),radial-gradient(44% 190% at 1% 105%,rgba(131,73,20,.17),transparent 68%),linear-gradient(111deg,#17130f 0%,#21170d 50%,#13110f 100%);
  box-shadow: inset 0 1px rgba(255,235,185,.12),inset 0 -26px 48px rgba(3,3,5,.24),0 20px 44px rgba(0,0,0,.25);
  color: var(--text);
}
#billing-view .coin-vip-cta::before {
  position: absolute;
  z-index: 0;
  inset: 0;
  content: '';
  pointer-events: none;
  background: linear-gradient(120deg,transparent 0 25%,rgba(255,222,158,.035) 38%,transparent 51%),linear-gradient(90deg,rgba(255,220,145,.08),transparent 22%,transparent 78%,rgba(255,207,99,.09));
}
#billing-view .coin-vip-cta::after {
  position: absolute;
  z-index: 0;
  top: 0;
  right: 9%;
  left: 9%;
  height: 1px;
  content: '';
  background: linear-gradient(90deg,transparent,rgba(255,227,163,.48),transparent);
  opacity: .72;
}
#billing-view .coin-vip-cta > * { position: relative; z-index: 1; }
#billing-view .coin-vip-cta-copy { display: flex; align-items: center; min-width: 0; gap: 14px; }
#billing-view .coin-vip-cta-badge {
  flex: 0 0 auto;
  min-width: 43px;
  padding: 5px 8px;
  border-radius: 99px;
  box-sizing: border-box;
  background: linear-gradient(135deg,#ffe092,#ffc554 58%,#f3a52b);
  color: #0b0810;
  font-size: 10px;
  font-weight: 850;
  line-height: 1.2;
  text-align: center;
  box-shadow: 0 6px 18px rgba(255,189,66,.22),inset 0 1px rgba(255,250,217,.58);
}
#billing-view .coin-vip-cta-copy strong { display: block; color: #ffe6a8; font-size: 20px; font-weight: 700; line-height: 1.25; letter-spacing: -.018em; text-shadow: 0 2px 18px rgba(255,190,70,.09); }
#billing-view .coin-vip-cta-copy p { margin-top: 4px; color: #b4a596; font-size: 11px; line-height: 1.4; }
#billing-view .coin-vip-cta-actions { display: flex; flex: 0 0 auto; gap: 12px; padding-left: 0; border-left: 0; }
#billing-view .coin-vip-cta-actions button {
  min-width: 142px;
  height: 42px;
  padding: 0 17px;
  border: 1px solid transparent;
  border-radius: 13px;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  transition: transform .18s ease,filter .18s ease,box-shadow .18s ease;
}
#billing-view .coin-vip-cta-primary { background: linear-gradient(110deg,#ffe69a 0%,#ffc554 52%,#f7ad37 100%); color: #0b0810; box-shadow: 0 10px 26px rgba(255,183,55,.22),inset 0 1px rgba(255,251,216,.5); }
#billing-view .coin-vip-cta-primary-label {
  display: inline-block;
  color: transparent;
  background: linear-gradient(110deg,#161619 0%,#161619 38%,#9898a0 49%,#161619 60%,#161619 100%);
  background-size: 220% 100%;
  background-clip: text;
  -webkit-background-clip: text;
  animation: plan-button-text-sweep 3.2s ease-in-out infinite;
}
#billing-view .coin-vip-cta-actions button:hover { transform: translateY(-1px); filter: brightness(1.04); }
#billing-view .coin-store-head { align-items: flex-end; }
#billing-view .coin-store-head > div > span { display: none; }
#billing-view .coin-store-head p,
#billing-view .coin-store-head > em { display: none; }
#billing-view .coin-package-grid { gap: 18px; }
#billing-view .coin-package {
  position: relative;
  min-height: 360px;
  padding: 22px;
  display: flex;
  align-items: stretch;
  flex-direction: column;
  gap: 0;
  border-radius: 18px;
  background: radial-gradient(320px 160px at 100% 0,rgba(255,193,78,.08),transparent 70%),var(--card);
  transition: transform .2s,border-color .2s,box-shadow .2s;
}
#billing-view .coin-package:hover {
  transform: translateY(-4px);
  border-color: rgba(255,255,255,.2);
  box-shadow: 0 22px 55px rgba(0,0,0,.24);
}
#billing-view .coin-package.featured {
  border-color: rgba(255,179,32,.72);
  box-shadow: 0 0 0 1px rgba(255,179,32,.13),0 20px 55px rgba(104,53,5,.20);
  background: radial-gradient(360px 190px at 100% 0,rgba(255,179,32,.18),transparent 70%),var(--card);
}
#billing-view .coin-package,
#billing-view .coin-package.featured {
  border-color: var(--line);
  background: var(--card);
  box-shadow: none;
}
#billing-view .coin-package:hover {
  border: 2px solid transparent;
  background:
    linear-gradient(var(--card),var(--card)) padding-box,
    linear-gradient(110deg,#ffb338,#ff7a30,#9c6bff,#6e4dd7,#ffb338) border-box;
  background-size: 100% 100%,260% 100%;
  animation: coin-package-border-flow 1.35s linear infinite;
  box-shadow: 0 22px 55px rgba(0,0,0,.32),0 0 18px rgba(255,179,56,.12),0 0 24px rgba(156,107,255,.1);
}
#billing-view .coin-package.featured:hover {
  background:
    linear-gradient(var(--card),var(--card)) padding-box,
    linear-gradient(110deg,#ffb338,#ff7a30,#9c6bff,#6e4dd7,#ffb338) border-box;
  background-size: 100% 100%,260% 100%;
}
@keyframes coin-package-border-flow {
  from { background-position: 0 0,0% 50%; }
  to { background-position: 0 0,260% 50%; }
}
@media (prefers-reduced-motion: reduce) {
  #billing-view .coin-package:hover { animation: none; }
}
#billing-view .coin-package-head {
  min-height: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
#billing-view .coin-package-head > span { color: var(--text); font-size: 13px; font-weight: 800; line-height: 1.25; letter-spacing: .035em; }
#billing-view .coin-package-head em,
#billing-view .coin-package.featured .coin-package-head em,
#billing-view .coin-package.bonus-featured .coin-package-head em {
  min-height: 20px;
  padding: 0 9px;
  display: inline-flex;
  align-items: center;
  box-sizing: border-box;
  border-radius: 10px;
  background: linear-gradient(128deg,#d33f00 0%,#ff8400 100%);
  color: #fff;
  font-size: 8px;
  font-style: normal;
  font-weight: 800;
  line-height: 1;
  box-shadow: 0 5px 12px rgba(218,77,8,.24),inset 0 1px rgba(255,235,205,.2);
}
#billing-view .coin-package-balance { margin-top: 19px; display: flex; align-items: center; gap: 10px; }
#billing-view .coin-package-mark {
  width: 30px;
  height: 30px;
  display: block;
  flex: 0 0 auto;
  border-radius: 0;
  background: transparent;
  object-fit: contain;
  color: transparent;
  box-shadow: none;
}
#billing-view .coin-package-copy strong {
  display: block;
  color: var(--text);
  font-size: 30px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -.025em;
}
#billing-view .coin-package-copy span { margin-top: 6px; color: var(--meta); font-size: 9.5px; }
#billing-view .coin-package-description { margin: 3px 0 0; color: var(--text-2); font-size: 11px; line-height: 1.45; opacity: .64; }
#billing-view .coin-package-reward {
  margin-top: 16px;
  padding: 12px 13px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid var(--line-soft);
  border-radius: 11px;
  background: rgba(255,255,255,.025);
}
#billing-view .coin-package-reward span { display: inline-flex; align-items: center; color: var(--meta); font-size: 9.5px; }
#billing-view .coin-package-reward.has-bonus span { color: #f0c66d; }
#billing-view .coin-package-gift {
  width: 11px;
  height: 11px;
  flex: 0 0 auto;
  margin-right: 5px;
  background: currentColor;
  mask: center / contain no-repeat var(--billing-gift-icon);
  -webkit-mask: center / contain no-repeat var(--billing-gift-icon);
}
#billing-view .coin-package-reward strong { color: var(--text-2); font-size: 10px; white-space: nowrap; }
#billing-view .coin-package-reward.reward-base {
  background: linear-gradient(110deg,rgba(255,255,255,.028),rgba(255,255,255,.012));
}
#billing-view .coin-package-reward.reward-base span,
#billing-view .coin-package-reward.reward-base strong { color: #83828b; }
#billing-view .coin-package-reward.reward-standard {
  border-color: rgba(220,161,66,.25);
  background: radial-gradient(64% 180% at 0% 0%,rgba(237,185,94,.15),transparent 66%),linear-gradient(108deg,rgba(78,55,27,.58),rgba(48,39,31,.46));
  box-shadow: inset 0 1px rgba(255,230,174,.08),0 8px 20px rgba(112,76,26,.10);
}
#billing-view .coin-package-reward.reward-standard span { color: #edc56e; }
#billing-view .coin-package-reward.reward-standard strong { color: #e7d0a1; }
#billing-view .coin-package-reward.reward-premium {
  border-color: transparent;
  background: radial-gradient(120% 230% at 92% -92%,rgba(255,208,103,.25) 0%,rgba(255,208,103,.1) 35%,transparent 66%),linear-gradient(102deg,#101014 0%,#14130f 44%,#21190e 75%,#2c1e0e 100%);
  box-shadow: inset 0 1px rgba(255,238,198,.1),inset 0 -10px 18px rgba(0,0,0,.24),0 8px 20px rgba(77,53,16,.13);
}
#billing-view .coin-package-reward.reward-premium span { color: #ffe09b; text-shadow: 0 0 12px rgba(255,199,83,.2); }
#billing-view .coin-package-reward.reward-premium strong { color: #f5dfbb; }
#billing-view .coin-package-footer {
  margin-top: auto;
  padding-top: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
#billing-view .coin-package-price-line { display: flex; align-items: center; gap: 12px; }
#billing-view .coin-package-price strong { display: block; color: var(--text); font-size: 24px; line-height: 1; }
#billing-view .coin-package-price > span { display: block; margin-top: 5px; color: var(--meta); font-size: 8.5px; }
#billing-view .coin-package-member-price {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  padding: 5px 8px;
  border-radius: 7px;
  background: linear-gradient(110deg,rgba(255,220,137,.14),rgba(245,168,53,.08));
  color: #f5cc79;
  font-size: 15px;
  font-weight: 850;
  line-height: 1;
  white-space: nowrap;
}
#billing-view .coin-package-member-price i { color: #c5a979; font-size: 8.5px; font-style: normal; font-weight: 700; }
#billing-view .coin-buy {
  min-width: 104px;
  min-height: 40px;
  margin-left: 0;
  padding: 0 15px;
  border: 0;
  border-radius: 9px;
  background: #fff;
  color: #21180f;
  font-size: 10.5px;
  font-weight: 800;
  cursor: pointer;
}
#billing-view .coin-buy:hover { filter: brightness(1.08); }
#billing-view .billing-assurance-row {
  margin-top: 28px;
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: 0;
  overflow: hidden;
  border: 1px solid var(--line-soft);
  border-radius: 13px;
  background: rgba(255,255,255,.018);
}
#billing-view .billing-assurance-row > div {
  padding: 16px;
  min-width: 0;
}
#billing-view .billing-assurance-row > div + div {
  border-left: 1px solid var(--line-soft);
}
#billing-view .billing-assurance-row span { color: var(--brand); font-size: 9px; font-weight: 800; }
#billing-view .billing-assurance-row strong { display: block; margin-top: 5px; color: var(--text); font-size: 11.5px; }
#billing-view .billing-assurance-row p { margin-top: 4px; color: var(--meta); font-size: 9.5px; line-height: 1.65; }

@media (max-width: 920px) {
  #billing-view .billing-assurance-row { grid-template-columns: 1fr; }
  #billing-view .billing-assurance-row > div + div {
    border-top: 1px solid var(--line-soft);
    border-left: 0;
  }
  #billing-view .coin-package { min-height: 0; }
}

@media (max-width: 620px) {
  #billing-view .coin-store-head { align-items: flex-start; }
  #billing-view .coin-vip-cta { align-items: flex-start; flex-direction: column; gap: 16px; padding: 16px 22px; }
  #billing-view .coin-vip-cta-copy { align-items: flex-start; gap: 11px; }
  #billing-view .coin-vip-cta-copy strong { font-size: 17px; }
  #billing-view .coin-vip-cta-copy p { margin-top: 4px; font-size: 11px; }
  #billing-view .coin-vip-cta-actions { width: 100%; padding-left: 0; border-left: 0; }
  #billing-view .coin-vip-cta-actions button { min-width: 0; height: 43px; flex: 1; padding-inline: 10px; }
  #billing-view .coin-package { padding: 19px; }
  #billing-view .coin-package-footer { align-items: stretch; flex-direction: column; }
  #billing-view .coin-buy { width: 100%; }
}

/* The reference keeps the four offers readable as two wide cards at 1280px. */
@media (min-width: 921px) and (max-width: 1280px) {
  #billing-view .plan-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}

/* Member prices stay local to the coin store; the active membership is highlighted. */
#billing-view .coin-package-member-prices {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
}
#billing-view .coin-package-member-price {
  opacity: .62;
  transition: opacity .18s ease, background .18s ease;
}
#billing-view .coin-package-member-price.active {
  opacity: 1;
  background: linear-gradient(110deg,rgba(255,220,137,.24),rgba(245,168,53,.13));
  box-shadow: inset 0 1px rgba(255,246,208,.12);
}
#billing-view .coin-vip-cta-actions button:disabled {
  cursor: default;
  opacity: .72;
}
@media (max-width: 620px) {
  #billing-view .coin-package-price-line { align-items: flex-start; flex-direction: column; gap: 8px; }
  #billing-view .coin-package-member-prices { gap: 5px; }
}

/* Current API cards keep a tier row in the DOM; reserve the reference spacing without showing it. */
#billing-view .plan-card .plan-tier { display: block; visibility: hidden; height: 28px; min-height: 28px; overflow: hidden; }
#billing-view .plan-card .plan-badge {
  position: absolute; top: 28px; right: 28px; width: max-content; align-self: auto;
  display: inline-flex; height: auto; padding: 5px 9px; border-radius: 999px;
}
