:root {
  color-scheme: dark;
  --app-vw: 1vw;
  --app-width: 100vw;
  --bg: #111211;
  --surface: #181a19;
  --surface-2: #212421;
  --surface-3: #2a2f2b;
  --line: rgba(255, 255, 255, 0.12);
  --text: #f7f2ea;
  --muted: #b9b1a5;
  --soft: #7f887e;
  --accent: #e84d67;
  --accent-2: #34c6a8;
  --gold: #f2bf5b;
  --blue: #64a9ff;
  --danger: #ff6b6b;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
  --demo-stage-width: 100vw;
  --demo-stage-center: 50vw;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at top left, rgba(232, 77, 103, 0.18), transparent 26rem),
    radial-gradient(circle at 78% 15%, rgba(52, 198, 168, 0.12), transparent 22rem),
    var(--bg);
  color: var(--text);
  min-width: 320px;
}

body.modal-open {
  overflow: hidden;
}

button,
a {
  font: inherit;
}

button {
  color: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: 64px;
  padding: 0 clamp(18px, 4vw, 56px);
  background: rgba(17, 18, 17, 0.78);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0;
  white-space: nowrap;
}

.brand-mark {
  display: block;
  width: 27px;
  height: 27px;
  object-fit: contain;
}

/* 顶部导航的方案标识：紧跟 PayerMax Logo，标明当前演示的是哪套行业方案。
   颜色取 var(--text)，可跟随深色 / 浅色两套主题自动切换，无需额外覆盖。
   flex: 0 0 auto —— 顶栏可用宽度被右侧日志面板压到约 620px；若允许它收缩，
   容器会被挤成 0 宽、文字溢出压到场景切换按钮上。 */
.nav-title {
  display: grid;
  gap: 2px;
  flex: 0 0 auto;
}

.nav-title strong {
  color: var(--text);
  font-size: 15px;
  font-weight: 800;
  line-height: 1.2;
  white-space: nowrap;
}

/* 顶栏空间紧张，UID 徽标让出宽度给方案标识。
   .uid-value 本身已带 overflow:hidden + text-overflow:ellipsis，
   但徽标作为 flex 项默认 min-width:auto 无法收缩，这里补上 min-width:0 才真正生效
   （省略的是显示文本，完整 UID 仍可用右侧复制按钮取到）。 */
.topbar .uid-chip {
  min-width: 0;
}

/* 窄屏下顶部导航元素拥挤，方案标识让位给场景切换与 UID 徽标。 */
@media (max-width: 760px) {
  .nav-title {
    display: none;
  }
}

.nav {
  display: flex;
  align-items: center;
  gap: 18px;
  color: var(--muted);
  font-size: 14px;
  margin-left: auto;
}

.nav a,
.scene-tab {
  transition: color 0.2s ease;
}

.nav a:hover,
.scene-tab:hover {
  color: var(--text);
}

.nav a.active,
.scene-tab.active {
  color: var(--text);
  font-weight: 750;
}

.scene-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  width: min(460px, 100%);
}

.scene-tab {
  min-width: 0;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  text-align: center;
  white-space: normal;
}

.scene-tab.active {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.08);
}

.icon-button {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  cursor: pointer;
}

.icon-button svg {
  width: 19px;
  height: 19px;
}

main {
  overflow: hidden;
}

.demo-home {
  min-height: calc(100vh - 64px);
}

.demo-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
  align-items: start;
  min-height: calc(100dvh - 64px);
  padding: clamp(16px, 2.4vw, 28px) clamp(16px, 3vw, 42px);
}

.scene-frame {
  min-width: 0;
  min-height: calc(100dvh - 120px);
}

.scene-panel {
  min-width: 0;
  min-height: calc(100dvh - 120px);
}

.single-scene {
  display: grid;
  grid-template-columns: minmax(260px, 340px) minmax(0, 1fr);
  gap: clamp(14px, 2vw, 24px);
  align-items: center;
  min-height: calc(100dvh - 120px);
  padding: 0;
}

.watch-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 330px);
  gap: clamp(16px, 2.2vw, 24px);
  align-items: center;
  min-height: calc(100dvh - 120px);
  padding: 0;
}

.watch-copy {
  max-width: 520px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--accent-2);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 18px;
  font-size: clamp(34px, 4vw, 56px);
  line-height: 1.02;
  letter-spacing: -0.02em;
}

.watch-lead {
  max-width: 520px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.7;
}

.watch-actions,
.stats-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.watch-actions {
  margin-top: 28px;
}

.primary-button,
.ghost-button,
.small-button,
.vip-state button,
.offer-card,
.tab {
  border: 0;
  cursor: pointer;
}

.primary-button,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 48px;
  padding: 0 18px;
  border-radius: 8px;
  font-weight: 750;
}

.primary-button {
  background: var(--accent);
  color: white;
}

.ghost-button {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  border: 1px solid var(--line);
}

.primary-button svg,
.ghost-button svg {
  width: 18px;
  height: 18px;
}

.stats-row {
  margin-top: 26px;
  color: var(--muted);
}

.stats-row span {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding-right: 16px;
  border-right: 1px solid var(--line);
}

.stats-row span:last-child {
  border-right: 0;
}

.stats-row strong {
  color: var(--text);
  font-size: 20px;
}

.phone-frame {
  width: min(100%, 330px);
  justify-self: center;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 36px;
  padding: 12px;
  background: #090909;
  box-shadow: var(--shadow);
}

.phone-top {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 6px 0 12px;
}

.phone-top span:first-child {
  width: 58px;
  height: 6px;
  border-radius: 999px;
  background: #272727;
}

.phone-top span:last-child {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: #333;
}

.video-stage {
  position: relative;
  overflow: hidden;
  height: min(54vh, 500px);
  min-height: 390px;
  border-radius: 26px;
  background: #222;
}

.video-stage img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.video-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.12), transparent 36%, rgba(0, 0, 0, 0.82));
}

.play-float {
  position: absolute;
  top: 47%;
  left: 50%;
  display: grid;
  place-items: center;
  width: 74px;
  height: 74px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  color: white;
  transform: translate(-50%, -50%);
  backdrop-filter: blur(12px);
  cursor: pointer;
}

.play-float svg {
  width: 32px;
  height: 32px;
  fill: currentColor;
}

.episode-meta,
.lock-chip {
  position: absolute;
  left: 18px;
  right: 18px;
}

.episode-meta {
  bottom: 72px;
}

.episode-meta span,
.lock-chip {
  color: white;
  font-size: 13px;
  font-weight: 800;
}

.episode-meta strong {
  display: block;
  margin-top: 5px;
  font-size: 20px;
}

.lock-chip {
  bottom: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: fit-content;
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.56);
  backdrop-filter: blur(10px);
}

.episode-strip {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 7px;
  padding-top: 12px;
}

.episode {
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--muted);
  cursor: pointer;
}

.episode.active {
  background: var(--accent);
  color: white;
}

.episode.locked {
  border-color: rgba(242, 191, 91, 0.36);
  color: var(--gold);
}

.live-panel {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-self: auto;
  gap: 12px;
}

.panel-head,
.vip-state,
.balance {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px;
  color: var(--muted);
}

.small-button,
.vip-state button {
  min-height: 34px;
  padding: 0 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  color: var(--text);
}

.balance {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
}

.balance svg {
  width: 32px;
  height: 32px;
  color: var(--gold);
}

.balance strong {
  display: block;
  font-size: 24px;
}

.balance span,
.vip-state span {
  color: var(--muted);
}

.vip-state {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 12px;
  padding: 16px;
}

.offer-card span {
  display: block;
  color: var(--accent-2);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.offer-card {
  min-height: 154px;
  text-align: left;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.offer-card strong {
  display: block;
  margin: 12px 0;
  font-size: clamp(20px, 2vw, 26px);
}

.offer-card small {
  color: var(--muted);
  font-size: 16px;
}

.offer-card.featured {
  border-color: rgba(232, 77, 103, 0.62);
  box-shadow: inset 0 0 0 1px rgba(232, 77, 103, 0.22);
}

.player-video {
  position: relative;
  overflow: hidden;
  width: min(100%, 480px);
  aspect-ratio: 9 / 16;
  min-height: 620px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 26px;
  background: #080908;
  box-shadow: var(--shadow);
}

.player-video img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.player-vignette {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to bottom, rgba(0, 0, 0, 0.68), transparent 22%, rgba(0, 0, 0, 0.82)),
    linear-gradient(to right, rgba(0, 0, 0, 0.45), transparent 40%);
}

.player-topline {
  position: absolute;
  top: 16px;
  left: 16px;
  right: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.player-topline span {
  min-height: 34px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.42);
  color: white;
  font-size: 13px;
  font-weight: 850;
  backdrop-filter: blur(10px);
}

.player-icon {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.34);
  color: white;
  cursor: pointer;
  backdrop-filter: blur(10px);
}

.player-icon svg {
  width: 19px;
  height: 19px;
}

.player-play {
  top: 40%;
}

.player-lock-card {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 16px;
  background: rgba(12, 13, 12, 0.72);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.36);
  backdrop-filter: blur(18px);
}

.player-lock-card span,
.membership-top span,
.wallet-top span {
  display: block;
  color: var(--accent-2);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.player-lock-card strong {
  display: block;
  margin: 7px 0;
  font-size: clamp(17px, 1.8vw, 21px);
}

.player-lock-card p,
.membership-card p {
  color: var(--muted);
  line-height: 1.7;
}

.player-lock-card p {
  font-size: 12px;
}

.player-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 14px;
}

.player-actions .primary-button,
.player-actions .ghost-button {
  font-size: 13px;
  min-height: 44px;
}

.player-actions .primary-button svg,
.player-actions .ghost-button svg {
  width: 16px;
  height: 16px;
}

.episode-panel {
  display: grid;
  gap: 18px;
  min-width: 0;
}

.profile-hero h1 {
  margin-bottom: 0;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.02;
}

.episode-row,
.checkout-paths button {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
}

.episode-list {
  display: grid;
  gap: 8px;
}

.episode-row {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 4px;
  min-height: 74px;
  padding: 9px 10px;
  text-align: left;
}

.episode-row span {
  color: var(--soft);
  font-size: 11px;
  font-weight: 850;
}

.episode-row strong {
  overflow: hidden;
  white-space: normal;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  font-size: 12px;
  line-height: 1.3;
}

.episode-row em {
  margin-top: auto;
  align-self: flex-start;
  min-width: 0;
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--muted);
  font-style: normal;
  font-size: 10px;
  line-height: 1.5;
  text-align: center;
}

.episode-row.locked em {
  color: var(--gold);
}

.episode-row.watched {
  opacity: 0.58;
  cursor: default;
}

.episode-row.watched em {
  color: var(--accent-2);
}

.episode-row.active {
  border-color: rgba(232, 77, 103, 0.58);
  background: rgba(232, 77, 103, 0.13);
}

.episode-progress {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
}

.episode-progress span {
  color: var(--muted);
  font-size: 13px;
}

.episode-progress strong {
  color: var(--text);
  font-size: 14px;
}

.episode-scroll {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  max-height: min(58vh, 480px);
  overflow-y: auto;
  padding-right: 4px;
}

.episode-scroll::-webkit-scrollbar {
  width: 8px;
}

.episode-scroll::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
}

@media (max-width: 760px) {
  .episode-scroll {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.profile-hero {
  display: flex;
  align-items: center;
  gap: 18px;
  max-width: 900px;
  margin-bottom: 24px;
}

.profile-hero p:last-child {
  max-width: 720px;
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.avatar-mark {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 76px;
  height: 76px;
  border-radius: 20px;
  background: linear-gradient(135deg, var(--accent), #fb8d55);
  color: white;
  font-size: 28px;
  font-weight: 900;
}

.profile-grid {
  display: grid;
  grid-template-columns: minmax(320px, 0.9fr) minmax(320px, 1.1fr);
  gap: 16px;
}

.membership-card,
.wallet-card {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.membership-card {
  display: grid;
  gap: 18px;
  background:
    linear-gradient(135deg, rgba(242, 191, 91, 0.12), transparent 46%),
    var(--surface);
}

.membership-top,
.wallet-top {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: start;
}

.membership-top strong,
.wallet-top strong {
  display: block;
  font-size: 22px;
}

.membership-meta {
  display: grid;
  /* 信息项由 2 个增加到 3 个（到期时间 / 续订周期 / 总期数）：
     用 auto-fit 让宽屏自动排 3 列、窄屏自动回落，避免固定列数出现半行空位。 */
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  gap: 10px;
}

.membership-meta div {
  padding: 14px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.055);
}

.membership-meta span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 13px;
}

.coin-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.compact-offer {
  width: 100%;
  min-height: 124px;
}

.checkout-paths {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
}

.checkout-paths button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 12px;
  font-weight: 800;
}

.checkout-paths svg {
  width: 18px;
  height: 18px;
}

.scene-side {
  min-width: 0;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.055);
}

.scene-side h2 {
  margin-bottom: 12px;
  font-size: clamp(24px, 2.4vw, 32px);
  line-height: 1.12;
}

.scene-side p {
  color: var(--muted);
  line-height: 1.75;
}

.episode-store .eyebrow {
  font-size: 11px;
}

.episode-store h2 {
  font-size: clamp(20px, 2vw, 26px);
}

.episode-store p {
  font-size: 13px;
}

.compact-player {
  justify-self: center;
  width: min(100%, 320px);
  min-height: min(560px, calc(100dvh - 120px));
}

.compact-list {
  margin-top: 18px;
}

.account-scene {
  grid-template-columns: minmax(0, 1fr);
  align-content: start;
  padding-top: clamp(24px, 5vh, 58px);
}

.account-panel {
  min-width: 0;
  display: grid;
  gap: 18px;
}

.compact-profile {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 0;
  max-width: none;
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  background:
    radial-gradient(circle at 0 0, rgba(232, 77, 103, 0.18), transparent 18rem),
    linear-gradient(135deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.032));
}

.compact-profile h2 {
  margin-bottom: 6px;
  font-size: clamp(24px, 2.4vw, 32px);
  line-height: 1.1;
}

.compact-profile-grid {
  grid-template-columns: minmax(320px, 1fr) minmax(360px, 1fr);
  align-items: stretch;
  gap: 18px;
}

.account-scene .checkout-brief {
  display: none;
}

.account-scene .membership-card,
.account-scene .wallet-card {
  min-height: 220px;
  padding: 20px;
  border-radius: 14px;
}

.account-scene .membership-card {
  position: relative;
  overflow: hidden;
  border-color: rgba(242, 191, 91, 0.26);
}

.account-scene .membership-card::after {
  content: "";
  position: absolute;
  inset: auto -70px -80px auto;
  width: 190px;
  height: 190px;
  border-radius: 50%;
  background: rgba(242, 191, 91, 0.1);
  pointer-events: none;
}

.account-scene .membership-card > * {
  position: relative;
  z-index: 1;
}

.account-scene .wallet-card {
  display: grid;
  align-content: space-between;
  background:
    radial-gradient(circle at 100% 0, rgba(52, 198, 168, 0.14), transparent 18rem),
    var(--surface);
}

.account-scene .wallet-top strong {
  text-align: right;
}

.account-scene .coin-actions {
  margin-top: 0;
}

.account-scene .compact-offer {
  min-height: 112px;
  padding: 16px;
}

.vip-tier-badge {
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid rgba(242, 191, 91, 0.4);
  background: linear-gradient(135deg, rgba(242, 191, 91, 0.24), rgba(242, 191, 91, 0.08));
  color: #ffe7b1;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.vip-billing {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.vip-billing strong {
  font-size: 24px;
  line-height: 1;
  color: var(--text);
  letter-spacing: -0.02em;
}

.vip-billing span {
  font-size: 16px;
  color: var(--muted);
}

.vip-rule {
  margin-top: -8px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.wallet-balance {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 2px 0 18px;
}

.wallet-balance strong {
  font-size: 26px;
  line-height: 1;
  color: var(--text);
  letter-spacing: -0.02em;
}

.wallet-balance span {
  font-size: 16px;
  color: var(--muted);
}

.saved-cards-card {
  grid-column: 1 / -1;
  display: grid;
  gap: 14px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
}

.saved-cards-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.saved-cards-head > span {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}

.add-card-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  cursor: pointer;
  font-weight: 600;
  font-family: inherit;
  font-size: 13px;
}

/* "我的/VIP" 页已存卡不再提供"添加新卡"入口：保留样式定义，仅隐藏按钮，便于后续恢复。 */
.saved-cards-head .add-card-btn {
  display: none;
}

.add-card-btn:hover {
  background: rgba(255, 255, 255, 0.1);
}

.add-card-btn svg {
  width: 15px;
  height: 15px;
}

.saved-card-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.saved-card-empty {
  padding: 14px;
  border: 1px dashed var(--line);
  border-radius: 10px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

.saved-card-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
}

.card-brand {
  flex: 0 0 auto;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 800;
  color: #fff;
  letter-spacing: 0.04em;
  background: #3a3f3b;
}

.card-brand.visa { background: #1a1f71; }
.card-brand.mc { background: #eb001b; }

.card-info {
  display: grid;
  gap: 2px;
  flex: 1;
}

.card-info strong {
  font-size: 14px;
  color: var(--text);
}

.card-info span {
  color: var(--muted);
  font-size: 12px;
}

.card-tag {
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(52, 198, 168, 0.14);
  color: #d8fff5;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.pay-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(0, 0, 0, 0.64);
  backdrop-filter: blur(10px);
}

.pay-backdrop.cashier-backdrop {
  right: calc(100vw - var(--demo-stage-width));
  background: rgba(0, 0, 0, 0.34);
  backdrop-filter: none;
}

.result-backdrop {
  position: fixed;
  inset: 0;
  z-index: 120;
  background: rgba(0, 0, 0, 0.68);
  backdrop-filter: blur(12px);
}

.result-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 130;
  width: min(92vw, 380px);
  padding: 28px 24px 22px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 20px;
  background:
    linear-gradient(160deg, rgba(31, 34, 32, 0.98), rgba(16, 18, 17, 0.98)),
    var(--surface);
  box-shadow: var(--shadow);
  transform: translate(-50%, -50%);
  text-align: center;
}

.result-icon {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: rgba(52, 198, 168, 0.14);
  color: var(--accent-2);
}

.result-icon svg {
  width: 32px;
  height: 32px;
}

.result-modal[data-type="fail"] .result-icon {
  background: rgba(255, 107, 107, 0.14);
  color: var(--danger);
}

.result-modal[data-type="pending"] .result-icon {
  background: rgba(242, 191, 91, 0.14);
  color: var(--gold);
}

.result-title {
  margin: 0 0 6px;
  font-size: 20px;
  font-weight: 800;
}

.result-desc {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.result-meta {
  margin: 0 0 16px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--soft);
  font-size: 12px;
  word-break: break-all;
}

.result-detail {
  display: grid;
  gap: 8px;
  margin: 0 0 16px;
  text-align: left;
}

.detail-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
}

.detail-row span {
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}

.detail-row strong {
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
  text-align: right;
}

.result-close {
  width: 100%;
  min-height: 46px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--accent), #fb8d55);
  color: #fff;
  font-weight: 800;
  cursor: pointer;
}

.result-modal[data-type="success"] .result-close {
  background: linear-gradient(135deg, var(--accent-2), #2baa8f);
}

.pay-drawer {
  position: fixed;
  inset: auto clamp(14px, 3vw, 42px) 22px;
  z-index: 90;
  max-height: calc(100vh - 44px);
  overflow: auto;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 16px;
  background: #141615;
  box-shadow: var(--shadow);
}

.pay-drawer.cashier-modal {
  top: 50%;
  bottom: auto;
  left: var(--demo-stage-center);
  right: auto;
  width: min(calc(var(--demo-stage-width) - clamp(32px, 3.4vw, 64px)), 760px);
  max-height: min(90vh, 840px);
  overflow: auto;
  border-radius: 20px;
  background:
    linear-gradient(145deg, rgba(31, 34, 32, 0.96), rgba(16, 18, 17, 0.97)),
    var(--surface);
  transform: translate(-50%, -50%);
}

.drawer-head {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 22px;
  border-bottom: 1px solid var(--line);
  background: rgba(20, 22, 21, 0.92);
  backdrop-filter: blur(16px);
}

.pay-drawer.cashier-modal .drawer-head {
  position: relative;
  padding: 14px 18px 10px;
  background: transparent;
  backdrop-filter: none;
}

.drawer-head h2 {
  margin-bottom: 0;
  font-size: 22px;
}

.drawer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 410px);
  gap: 18px;
  padding: 20px;
}

.pay-drawer.cashier-modal .drawer-grid {
  display: block;
  padding: 0 18px 18px;
}

.pay-drawer.cashier-modal .product-tabs {
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
}

.pay-drawer.cashier-modal .tab {
  flex: 1 1 0;
  min-width: 112px;
  min-height: 34px;
}

.pay-drawer.cashier-modal .product-options {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 10px 0 12px;
}

.pay-drawer.cashier-modal[data-current-product="coins"] .product-options,
.pay-drawer.cashier-modal[data-current-product="unlock"] .product-options {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.pay-drawer.cashier-modal[data-current-product="vip"] .product-options {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.pay-drawer.cashier-modal .product-option {
  min-height: 78px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.065);
}

.pay-drawer.cashier-modal[data-current-product="vip"] .product-option {
  min-height: 88px;
}

.pay-drawer.cashier-modal .checkout-surface {
  min-height: 0;
  margin-top: 0;
  border: 0;
  background: transparent;
}

.checkout-main {
  min-width: 0;
}

.product-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tab {
  min-height: 38px;
  padding: 0 13px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.07);
  color: var(--muted);
}

.tab.active {
  background: var(--text);
  color: #111;
}

.product-options {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 16px 0 24px;
}

.product-option {
  min-height: 122px;
  padding: 15px;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
}

.product-option.active {
  border-color: var(--accent);
  box-shadow: inset 0 0 0 1px rgba(232, 77, 103, 0.28);
}

.product-option strong,
.product-option span,
.product-option em {
  display: block;
}

.product-option strong {
  margin: 9px 0;
  font-size: 20px;
}

.pay-drawer.cashier-modal .product-option strong {
  margin: 5px 0 4px;
  font-size: 17px;
  line-height: 1.15;
}

.product-option em {
  margin: -2px 0 9px;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  line-height: 1.45;
}

.product-option span,
.product-option small {
  color: var(--muted);
}

.pay-drawer.cashier-modal .product-option span,
.pay-drawer.cashier-modal .product-option small,
.pay-drawer.cashier-modal .product-option em {
  font-size: 12px;
}

.checkout-surface {
  margin-top: 16px;
  min-height: 280px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0f100f;
}

.pmx-cashier-surface {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 16px;
  background:
    radial-gradient(circle at 18% 0, rgba(232, 77, 103, 0.18), transparent 18rem),
    rgba(255, 255, 255, 0.055);
}

.component-surface {
  background:
    radial-gradient(circle at 18% 0, rgba(52, 198, 168, 0.18), transparent 18rem),
    rgba(255, 255, 255, 0.055);
}

.component-lab {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(52, 198, 168, 0.2);
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(17, 35, 31, 0.9), rgba(30, 21, 26, 0.86));
}

.component-empty.loading svg {
  animation: spin 0.9s linear infinite;
}

.component-empty {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 74px;
  padding: 14px;
  border: 1px dashed rgba(255, 255, 255, 0.22);
  border-radius: 12px;
  color: var(--muted);
}

.component-empty svg {
  width: 18px;
  height: 18px;
}

.component-retry {
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  cursor: pointer;
  font-weight: 800;
}

.component-method-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.component-method-row {
  flex: 1 1 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 8px 10px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.055);
  color: var(--text);
  cursor: pointer;
  text-align: center;
  font-size: 13px;
  font-weight: 700;
}

.component-method-row.active {
  border-color: rgba(52, 198, 168, 0.82);
  background:
    linear-gradient(135deg, rgba(52, 198, 168, 0.2), rgba(52, 198, 168, 0.08)),
    rgba(52, 198, 168, 0.1);
  box-shadow: inset 0 0 0 1px rgba(52, 198, 168, 0.22);
}

.component-method-row > svg {
  width: 18px;
  height: 18px;
  color: var(--accent-2);
  flex-shrink: 0;
}

.component-method-row span {
  white-space: nowrap;
}

.component-method-row strong {
  font-size: 17px;
  line-height: 1.2;
}

.component-method-row small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.component-method-row .method-badge {
  padding: 1px 5px;
  border: 1px solid rgba(52, 198, 168, 0.35);
  border-radius: 6px;
  background: rgba(52, 198, 168, 0.1);
  color: var(--accent-2);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.03em;
  line-height: 1.4;
  white-space: nowrap;
}

.component-method-dot {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  background: transparent;
}

.component-method-dot.loading {
  border-color: var(--accent);
  border-top-color: transparent;
  animation: spin 0.9s linear infinite;
}

.component-method-dot.available {
  border-color: rgba(255, 255, 255, 0.32);
}

.component-method-dot.selected {
  border-color: var(--accent-2);
  background: radial-gradient(circle, var(--accent-2) 0 42%, transparent 46%);
  box-shadow: 0 0 0 4px rgba(52, 198, 168, 0.12);
}

.component-stage {
  position: relative;
}

.dropin-panel {
  display: grid;
  gap: 10px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.18);
}

.dropin-panel:not(.active) {
  position: absolute;
  inset: 0;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

.dropin-card-frame {
  min-height: 190px;
  overflow: hidden;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  background: #000;
}

.saved-cards-area {
  display: grid;
  gap: 10px;
  margin-bottom: 12px;
}

.saved-cards-list {
  display: grid;
  gap: 8px;
}

.saved-card-row {
  display: flex;
  align-items: center;
  gap: 4px;
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  transition: border-color 0.15s ease, background 0.15s ease;
  overflow: hidden;
}

.saved-card-row:hover {
  border-color: rgba(52, 198, 168, 0.5);
  background: rgba(52, 198, 168, 0.08);
}

.saved-card-row.selected {
  border-color: var(--accent-2);
  background: rgba(52, 198, 168, 0.12);
}

.saved-card-select {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 6px 12px 14px;
  background: transparent;
  border: none;
  text-align: left;
  cursor: pointer;
}

.saved-card-delete {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  margin-right: 8px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.15s ease, background 0.15s ease;
}

.saved-card-delete:hover {
  color: var(--danger);
  background: rgba(255, 107, 107, 0.12);
}

.saved-card-delete:disabled {
  cursor: default;
  opacity: 0.6;
}

.saved-card-delete svg {
  width: 18px;
  height: 18px;
}

.saved-card-radio {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-radius: 50%;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.saved-card-row.selected .saved-card-radio {
  border-color: var(--accent-2);
  background: radial-gradient(circle, var(--accent-2) 0 45%, transparent 52%);
}

.saved-card-brand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 46px;
  padding: 4px 8px;
  border-radius: 6px;
  background: rgba(52, 198, 168, 0.14);
  color: var(--accent-2);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.saved-card-number {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--text);
}

.saved-card-expiry {
  margin-left: auto;
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}

.add-new-card {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 40px;
  padding: 0 14px;
  border: 1px dashed rgba(255, 255, 255, 0.28);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  font-weight: 700;
  cursor: pointer;
}

.add-new-card svg {
  width: 16px;
  height: 16px;
}

.add-new-card.ghost {
  border-style: solid;
  border-color: rgba(52, 198, 168, 0.35);
  color: var(--accent-2);
}

.saved-cards-empty {
  margin: 0;
  padding: 12px 14px;
  border: 1px dashed rgba(255, 255, 255, 0.18);
  border-radius: 12px;
  color: var(--muted);
  font-size: 13px;
}

.new-card-area {
  display: grid;
  gap: 10px;
}

.new-card-area[hidden] {
  display: none;
}

.dropin-googlepay-frame {
  min-height: 54px;
}

.dropin-googlepay-box {
  display: grid;
  padding: 0;
  border-radius: 12px;
  background: transparent;
}

.component-pay-button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.component-runtime-message {
  padding: 11px 12px;
  border: 1px solid rgba(255, 107, 107, 0.35);
  border-radius: 10px;
  background: rgba(255, 107, 107, 0.12);
  color: #ffd0d0;
  font-size: 13px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.component-runtime-message.token {
  border-color: rgba(52, 198, 168, 0.28);
  background: rgba(52, 198, 168, 0.1);
  color: #d8fff5;
}

.component-runtime-message.order {
  border-color: rgba(242, 191, 91, 0.3);
  background: rgba(242, 191, 91, 0.1);
  color: #ffe7b1;
}

.component-runtime-message a {
  color: #ffffff;
  font-weight: 700;
  text-decoration: underline;
}

.pmx-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  width: 100%;
  min-height: 50px;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--accent), #fb8d55);
  color: white;
  font-weight: 850;
  cursor: pointer;
}

.pmx-submit.processing {
  background: var(--blue);
}

.pmx-submit.success {
  background: var(--accent-2);
}

.pmx-submit.failed {
  background: var(--danger);
}

.pmx-submit svg {
  width: 18px;
  height: 18px;
}

.apm-panel {
  display: grid;
  gap: 12px;
  padding: 4px;
}

.apm-hint {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
  text-align: center;
}

.apm-org-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.apm-org-row {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.apm-org-row:hover {
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.28);
}

.apm-org-row.active {
  border-color: rgba(52, 198, 168, 0.82);
  background: rgba(52, 198, 168, 0.14);
  color: var(--accent-2);
}

[hidden] {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 1120px) {
  .demo-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }

  .watch-shell {
    grid-template-columns: minmax(0, 1fr) minmax(240px, 300px);
  }

  .single-scene {
    grid-template-columns: minmax(230px, 300px) minmax(0, 1fr);
  }

  .live-panel {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .drama-grid,
  .method-matrix {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .offer-grid,
  .product-options {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  html {
    overflow-x: hidden;
  }

  body {
    background:
      radial-gradient(circle at top, rgba(232, 77, 103, 0.16), transparent 18rem),
      var(--bg);
    padding-bottom: 0;
    overflow-x: hidden;
  }

  .topbar,
  .demo-home {
    max-width: var(--app-width);
    overflow-x: hidden;
  }

  .demo-layout {
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 14px;
  }

  .topbar {
    gap: 10px;
    flex-wrap: wrap;
    padding: 10px 12px;
  }

  .scene-tabs {
    order: 3;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    flex: 0 0 calc(var(--app-width) - 24px);
    width: calc(var(--app-width) - 24px);
    max-width: calc(var(--app-width) - 24px);
    margin-left: 0;
    gap: 6px;
    overflow: hidden;
  }

  .scene-tab {
    min-width: 0;
    min-height: 40px;
    padding: 0 8px;
    font-size: 13px;
    text-align: center;
    line-height: 1.25;
    white-space: normal;
  }

  .mode-selector {
    order: 4;
    width: 100%;
  }

  .mode-trigger {
    justify-content: space-between;
    width: 100%;
    min-height: 42px;
  }

  .mode-menu {
    left: 0;
    right: 0;
    width: 100%;
  }

  .watch-shell,
  .ops-layout,
  .player-layout,
  .profile-grid,
  .single-scene,
  .account-scene,
  .drawer-grid {
    grid-template-columns: 1fr;
  }

  .watch-shell {
    gap: 18px;
    min-height: auto;
    padding: 0;
  }

  .demo-home,
  .scene-frame,
  .scene-panel {
    min-height: auto;
  }

  .single-scene {
    min-height: auto;
    gap: 14px;
    padding: 14px;
  }

  .scene-side {
    padding: 16px;
  }

  .scene-side h2 {
    font-size: 24px;
  }

  .scene-side p {
    margin-bottom: 0;
    font-size: 14px;
  }

  .phone-frame {
    order: -1;
    width: min(100%, 330px);
    padding: 10px;
    border-radius: 30px;
  }

  .video-stage {
    height: min(48vh, 430px);
    min-height: 310px;
    border-radius: 22px;
  }

  h1 {
    margin-bottom: 12px;
    font-size: 34px;
  }

  .watch-lead {
    font-size: 15px;
    line-height: 1.65;
  }

  .watch-actions {
    display: grid;
    grid-template-columns: 1fr;
    margin-top: 18px;
  }

  .primary-button,
  .ghost-button {
    width: 100%;
    min-height: 48px;
  }

  .stats-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-top: 18px;
  }

  .episode-meta {
    bottom: 62px;
  }

  .episode-meta strong {
    font-size: 18px;
  }

  .stats-row span {
    display: block;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.045);
    text-align: center;
  }

  .stats-row strong {
    display: block;
    font-size: 18px;
  }

  .content-band,
  .store-section,
  .methods-section,
  .ops-section,
  .player-layout,
  .profile-layout {
    padding: 46px 14px;
  }

  .page {
    min-height: calc(100dvh - 70px);
  }

  .player-layout {
    gap: 16px;
    padding-top: 14px;
  }

  .player-panel {
    margin: 0 -14px;
  }

  .player-video {
    width: 100%;
    min-height: 0;
    max-height: calc(100dvh - 144px);
    border-right: 0;
    border-left: 0;
    border-radius: 0;
  }

  .player-lock-card {
    left: 14px;
    right: 14px;
    bottom: 14px;
    padding: 14px;
  }

  .player-lock-card p {
    margin-bottom: 0;
    font-size: 12px;
  }

  .player-actions,
  .quick-purchase,
  .checkout-paths,
  .coin-actions,
  .membership-meta {
    grid-template-columns: 1fr;
  }

  .episode-panel {
    gap: 14px;
  }

  .compact-title {
    display: grid;
    gap: 10px;
  }

  .compact-title h1,
  .profile-hero h1 {
    font-size: 30px;
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .player-desc {
    margin-bottom: 0;
    font-size: 14px;
  }

  .quick-card {
    min-height: 104px;
    padding: 14px;
  }

  .profile-layout {
    padding-top: 22px;
  }

  .profile-hero {
    display: block;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 18px;
  }

  .profile-hero > div,
  .profile-hero h1,
  .profile-hero p {
    min-width: 0;
    max-width: 100%;
  }

  .avatar-mark {
    width: 58px;
    height: 58px;
    margin-bottom: 12px;
    border-radius: 16px;
    font-size: 24px;
  }

  .profile-hero p:last-child {
    font-size: 14px;
    overflow-wrap: anywhere;
    word-break: break-all;
  }

  .profile-grid,
  .membership-card,
  .wallet-card,
  .unified-checkout-card,
  .history-card {
    min-width: 0;
  }

  .membership-card p,
  .unified-checkout-card p {
    overflow-wrap: anywhere;
    word-break: break-all;
  }

  .membership-card,
  .wallet-card,
  .unified-checkout-card,
  .history-card {
    padding: 16px;
  }

  .membership-top,
  .wallet-top {
    display: grid;
    gap: 6px;
  }

  .membership-top strong,
  .wallet-top strong,
  .unified-checkout-card > strong {
    font-size: 20px;
  }

  .live-panel,
  .drama-grid,
  .offer-grid,
  .method-matrix,
  .product-options {
    grid-template-columns: 1fr;
  }

  .section-title {
    display: block;
  }

  .drama-card img {
    height: 240px;
  }

  .offer-card {
    min-height: 122px;
  }

  .event-console div {
    display: block;
  }

  .event-console strong {
    display: block;
    margin-top: 5px;
    text-align: left;
    word-break: break-word;
  }

  .pay-backdrop,
  .pay-backdrop.cashier-backdrop {
    right: 0;
    background: rgba(0, 0, 0, 0.48);
    backdrop-filter: blur(2px);
  }

  .pay-drawer {
    inset: auto 0 0;
    max-height: 90dvh;
    border-right: 0;
    border-bottom: 0;
    border-left: 0;
    border-radius: 22px 22px 0 0;
  }

  .pay-drawer.cashier-modal {
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    width: auto;
    max-height: 90dvh;
    border-radius: 22px 22px 0 0;
    transform: none;
  }

  .drawer-head,
  .drawer-grid {
    padding: 16px;
  }

  .drawer-head {
    position: sticky;
    top: 0;
    padding-bottom: 12px;
  }

  .drawer-head::before {
    content: "";
    position: absolute;
    top: 7px;
    left: 50%;
    width: 44px;
    height: 4px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.22);
    transform: translateX(-50%);
  }

  .drawer-head h2 {
    font-size: 22px;
  }

  .pay-drawer.cashier-modal .drawer-head {
    position: sticky;
    padding: 20px 16px 10px;
    background: rgba(20, 22, 21, 0.96);
    backdrop-filter: blur(14px);
  }

  .pay-drawer.cashier-modal .drawer-grid {
    padding: 0 14px calc(18px + env(safe-area-inset-bottom));
  }

  .product-tabs,
  .pay-drawer.cashier-modal .product-tabs {
    display: flex;
    flex-wrap: nowrap;
    gap: 6px;
    overflow-x: auto;
    padding: 4px;
    scrollbar-width: none;
  }

  .product-tabs::-webkit-scrollbar {
    display: none;
  }

  .tab,
  .pay-drawer.cashier-modal .tab {
    flex: 0 0 auto;
    min-width: 86px;
    min-height: 38px;
    padding: 0 10px;
  }

  .pay-drawer.cashier-modal .product-options,
  .pmx-cashier-hero,
  .pmx-method-preview {
    grid-template-columns: 1fr 1fr;
  }

  .pay-drawer.cashier-modal .product-options {
    gap: 8px;
    margin: 10px 0;
  }

  .pay-drawer.cashier-modal .product-option {
    min-height: 86px;
    padding: 12px;
  }

  .product-option strong {
    font-size: 17px;
  }

  .product-option span,
  .product-option em,
  .product-option small {
    font-size: 12px;
  }

  .cashier-mode-switch {
    display: grid;
    gap: 8px;
    margin-top: 10px;
    padding: 8px;
  }

  .cashier-mode-switch > span {
    display: block;
    margin-bottom: 0;
  }

  .cashier-segments {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: 100%;
  }

  .cashier-segment {
    min-height: 38px;
    padding: 0 8px;
    font-size: 13px;
  }

  .pmx-cashier-surface {
    gap: 12px;
    padding: 13px;
    border-radius: 14px;
  }

  .pmx-cashier-hero {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .pmx-amount {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-width: 0;
    padding: 12px;
    text-align: left;
  }

  .pmx-amount strong {
    margin-top: 0;
    font-size: 22px;
  }

  .pmx-method-preview {
    gap: 8px;
  }

  .pmx-method {
    min-height: 42px;
    padding: 0 8px;
    font-size: 13px;
  }

  .pmx-full-note {
    align-items: flex-start;
    padding: 12px;
    font-size: 13px;
  }

  .component-lab {
    padding: 12px;
  }

  .component-lab-head {
    grid-template-columns: 1fr;
  }

  .component-status-pill {
    justify-self: start;
  }

  .component-empty {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .component-retry {
    grid-column: 1 / -1;
    width: 100%;
  }

  .component-method-row {
    min-height: 58px;
    padding: 10px 12px;
  }

  .component-method-row strong {
    font-size: 15px;
  }

  .component-method-row small {
    font-size: 11px;
  }

  .dropin-card-frame {
    min-height: 206px;
    padding: 10px;
  }

  .pmx-submit {
    position: sticky;
    bottom: 0;
    min-height: 52px;
    padding: 0 12px;
    box-shadow: 0 -12px 24px rgba(16, 18, 17, 0.72);
  }

  .field-grid {
    grid-template-columns: 1fr;
  }
}

/* DramaPay visual refresh */
:root {
  --bg: #080909;
  --surface: #151715;
  --surface-2: #20231f;
  --surface-3: #2b3028;
  --line: rgba(255, 255, 255, 0.13);
  --text: #fff8ee;
  --muted: #c9bfb2;
  --soft: #8f9489;
  --accent: #ff3f68;
  --accent-2: #2fe0bd;
  --gold: #ffd166;
  --shadow: 0 28px 90px rgba(0, 0, 0, 0.58);
  --bg-popup: #151715;
  --color-text-primary: #fff8ee;
}

body {
  background:
    linear-gradient(115deg, rgba(8, 9, 9, 0.94) 0%, rgba(8, 9, 9, 0.78) 42%, rgba(8, 9, 9, 0.92) 100%),
    url("https://images.unsplash.com/photo-1516589178581-6cd7833ae3b2?auto=format&fit=crop&w=1800&q=80") center / cover fixed,
    var(--bg);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(circle at 18% 20%, rgba(255, 63, 104, 0.26), transparent 24rem),
    radial-gradient(circle at 78% 10%, rgba(47, 224, 189, 0.16), transparent 22rem),
    linear-gradient(to bottom, transparent 0%, rgba(8, 9, 9, 0.92) 88%);
  pointer-events: none;
}

.topbar {
  position: sticky;
  min-height: 64px;
  padding: 0 clamp(18px, 4vw, 64px);
  background: rgba(8, 9, 9, 0.68);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.2);
}

.brand {
  gap: 12px;
  font-size: 18px;
}

.brand-mark {
  width: 27px;
  height: 27px;
  object-fit: contain;
}

.scene-tabs {
  width: min(480px, 52vw);
  padding: 4px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.055);
  backdrop-filter: blur(16px);
}

.scene-tab {
  min-height: 42px;
  border-radius: 999px;
}

.scene-tab.active {
  border-color: rgba(255, 255, 255, 0.12);
  background: linear-gradient(135deg, rgba(255, 63, 104, 0.28), rgba(255, 255, 255, 0.08));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.demo-layout {
  max-width: 1440px;
  margin: 0 auto;
  padding: clamp(14px, 2vw, 24px) clamp(18px, 3vw, 42px);
}

.scene-frame,
.scene-panel {
  min-height: calc(100dvh - 124px);
}

.watch-shell {
  grid-template-columns: minmax(320px, 0.88fr) minmax(280px, 360px);
  gap: clamp(22px, 4vw, 58px);
  align-items: center;
  min-height: calc(100dvh - 124px);
}

.watch-copy {
  max-width: 660px;
}

.eyebrow {
  color: var(--accent-2);
  letter-spacing: 0.1em;
  margin-bottom: 16px;
}

h1 {
  max-width: 780px;
  margin-bottom: 20px;
  font-size: clamp(40px, 4.6vw, 64px);
  line-height: 1.08;
  letter-spacing: -0.02em;
  text-shadow: 0 22px 70px rgba(0, 0, 0, 0.72);
}

.watch-lead {
  max-width: 620px;
  color: rgba(255, 248, 238, 0.72);
  font-size: 16px;
  line-height: 1.8;
  margin-top: 4px;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 22px;
}

.hero-tags span {
  min-height: 32px;
  padding: 7px 12px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  color: rgba(255, 248, 238, 0.78);
  font-size: 13px;
}

.watch-actions {
  margin-top: 34px;
  gap: 14px;
}

.primary-button,
.ghost-button,
.small-button,
.vip-state button,
.checkout-paths button {
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.primary-button {
  min-height: 52px;
  border-radius: 14px;
  background: linear-gradient(135deg, #ff3f68, #ff844f);
  box-shadow: 0 18px 42px rgba(255, 63, 104, 0.34);
}

.ghost-button {
  min-height: 52px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.09);
  backdrop-filter: blur(14px);
}

.primary-button:hover,
.ghost-button:hover,
.small-button:hover,
.vip-state button:hover,
.checkout-paths button:hover {
  transform: translateY(-1px);
}

.stats-row {
  gap: 10px;
  margin-top: 26px;
}

.stats-row span {
  min-height: 54px;
  padding: 9px 14px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.065);
  backdrop-filter: blur(16px);
}

.storyline-card {
  display: grid;
  gap: 5px;
  max-width: 520px;
  margin-top: 18px;
  padding: 16px 18px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-left-color: rgba(255, 63, 104, 0.75);
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.04));
  backdrop-filter: blur(18px);
}

.storyline-card span {
  color: var(--accent-2);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.storyline-card strong {
  font-size: 20px;
}

.storyline-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.phone-frame {
  position: relative;
  width: min(100%, 360px);
  padding: 13px;
  border-color: rgba(255, 255, 255, 0.18);
  border-radius: 40px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.1), transparent 18%),
    #080908;
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.74), 0 0 0 10px rgba(255, 255, 255, 0.025);
}

.video-stage {
  min-height: 460px;
  height: min(62vh, 590px);
  border-radius: 30px;
}

.video-gradient {
  background:
    linear-gradient(to bottom, rgba(0, 0, 0, 0.08), transparent 30%, rgba(0, 0, 0, 0.9)),
    radial-gradient(circle at 50% 42%, transparent 0 10%, rgba(0, 0, 0, 0.38) 55%);
}

.play-float {
  width: 78px;
  height: 78px;
  background: rgba(255, 255, 255, 0.2);
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.32);
}

.episode-meta strong {
  font-size: 22px;
}

.lock-chip {
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.62);
  color: white;
  font-family: inherit;
  cursor: pointer;
}

.episode {
  height: 46px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.07);
}

.episode.active {
  background: linear-gradient(135deg, #ff3f68, #ff6d58);
  box-shadow: 0 12px 28px rgba(255, 63, 104, 0.3);
}

.live-panel {
  grid-column: 1;
  align-self: start;
  grid-template-columns: minmax(150px, 0.95fr) minmax(170px, 1.05fr) minmax(160px, 0.95fr);
  max-width: 660px;
  margin-top: 18px;
}

.panel-head,
.vip-state,
.timeline-mini,
.balance {
  border-color: rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.075);
  backdrop-filter: blur(18px);
}

.balance svg {
  color: var(--gold);
  filter: drop-shadow(0 0 16px rgba(255, 209, 102, 0.28));
}

.vip-state {
  min-height: 72px;
  padding: 14px;
}

.timeline-mini {
  min-height: 72px;
}

.single-scene {
  grid-template-columns: minmax(280px, 390px) minmax(0, 520px);
  justify-content: center;
  gap: clamp(24px, 5vw, 72px);
}

.player-scene {
  align-items: stretch;
}

.scene-side {
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.075);
  backdrop-filter: blur(18px);
}

.compact-player {
  width: min(100%, 360px);
  min-height: min(650px, calc(100dvh - 120px));
  border-radius: 34px;
}

.episode-row {
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.07);
}

.episode-row.active {
  background: linear-gradient(135deg, rgba(255, 63, 104, 0.22), rgba(255, 255, 255, 0.07));
}

.account-scene {
  width: 100%;
  grid-template-columns: minmax(0, 1fr);
  justify-content: stretch;
  padding-top: clamp(18px, 4vh, 42px);
}

.compact-profile {
  border-radius: 24px;
  background:
    linear-gradient(135deg, rgba(255, 63, 104, 0.16), rgba(47, 224, 189, 0.09)),
    rgba(255, 255, 255, 0.075);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
}

.avatar-mark {
  border-radius: 18px;
  box-shadow: 0 16px 34px rgba(255, 63, 104, 0.3);
}

.compact-profile-grid {
  grid-template-columns: minmax(320px, 0.9fr) minmax(340px, 1.1fr);
  gap: 18px;
}

.membership-card,
.wallet-card {
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.072);
  backdrop-filter: blur(18px);
}

.account-scene .membership-card,
.account-scene .wallet-card {
  min-height: 270px;
}

.membership-top strong,
.wallet-top strong {
  font-size: clamp(22px, 2.4vw, 30px);
  line-height: 1.08;
}

.membership-meta div {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
}

.coin-actions {
  gap: 12px;
}

.account-scene .compact-offer {
  min-height: 128px;
  border-radius: 18px;
  background: rgba(10, 11, 10, 0.44);
}

.offer-card.featured {
  background: linear-gradient(135deg, rgba(255, 63, 104, 0.17), rgba(255, 255, 255, 0.06));
}

.pay-backdrop,
.pay-backdrop.cashier-backdrop {
  right: 0;
  background: rgba(4, 4, 4, 0.58);
  backdrop-filter: blur(7px);
}

.pay-drawer.cashier-modal {
  width: min(94vw, 780px);
  border-color: rgba(255, 255, 255, 0.18);
  border-radius: 28px;
  background:
    radial-gradient(circle at 0 0, rgba(255, 63, 104, 0.18), transparent 18rem),
    radial-gradient(circle at 100% 14%, rgba(47, 224, 189, 0.12), transparent 18rem),
    linear-gradient(145deg, rgba(24, 25, 23, 0.98), rgba(10, 11, 10, 0.98));
  box-shadow: 0 34px 120px rgba(0, 0, 0, 0.72);
}

.pay-drawer.cashier-modal .drawer-head {
  padding: 18px 22px 12px;
}

.drawer-head h2 {
  font-size: 24px;
}

.pay-drawer.cashier-modal .drawer-grid {
  padding: 0 22px 22px;
}

.pay-drawer.cashier-modal .product-tabs {
  gap: 6px;
  padding: 5px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.075);
}

.pay-drawer.cashier-modal .tab {
  min-height: 42px;
  border-radius: 12px;
}

.pay-drawer.cashier-modal .tab.active {
  background: #fff8ee;
  color: #14120f;
}

.pay-drawer.cashier-modal .product-options {
  gap: 10px;
  margin: 12px 0;
}

.pay-drawer.cashier-modal .product-option {
  min-height: 88px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.072);
}

.pay-drawer.cashier-modal .product-option.active {
  border-color: rgba(255, 63, 104, 0.9);
  background:
    linear-gradient(135deg, rgba(255, 63, 104, 0.18), rgba(255, 255, 255, 0.07));
  box-shadow: inset 0 0 0 1px rgba(255, 63, 104, 0.22), 0 16px 38px rgba(255, 63, 104, 0.12);
}

.component-surface {
  border-radius: 22px;
  background:
    linear-gradient(145deg, rgba(20, 44, 37, 0.74), rgba(27, 19, 24, 0.78)),
    rgba(255, 255, 255, 0.06);
}

.component-lab {
  border-radius: 20px;
  background: rgba(7, 8, 8, 0.5);
}

.component-lab-head {
  grid-template-columns: minmax(0, 1fr) auto;
  padding-bottom: 2px;
}

.component-lab-head strong {
  font-size: 18px;
}

.component-method-row {
  min-height: 44px;
  border-radius: 11px;
}

.component-method-row.active {
  border-color: rgba(47, 224, 189, 0.86);
  background: linear-gradient(135deg, rgba(47, 224, 189, 0.2), rgba(255, 255, 255, 0.075));
}

.dropin-panel {
  border-radius: 20px;
  background: rgba(0, 0, 0, 0.24);
}

.dropin-card-frame {
  min-height: 210px;
  border-radius: 18px;
}

.dropin-googlepay-frame {
  min-height: 58px;
}

.pmx-submit {
  min-height: 54px;
  border-radius: 16px;
  background: linear-gradient(135deg, #ff3f68, #ff844f);
}

@media (max-width: 1120px) {
  .watch-shell {
    grid-template-columns: minmax(0, 1fr) minmax(260px, 340px);
  }

  .live-panel {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  body {
    background:
      linear-gradient(180deg, rgba(8, 9, 9, 0.76), rgba(8, 9, 9, 0.96)),
      url("https://images.unsplash.com/photo-1516589178581-6cd7833ae3b2?auto=format&fit=crop&w=900&q=78") center top / cover fixed,
      var(--bg);
  }

  .topbar {
    min-height: auto;
    padding: 10px 12px;
  }

  .brand {
    font-size: 18px;
  }

  .brand-mark {
    width: 23px;
    height: 23px;
  }

  .scene-tabs {
    width: calc(var(--app-width) - 24px);
    border-radius: 16px;
  }

  .scene-tab {
    min-height: 40px;
    border-radius: 12px;
  }

  .demo-layout {
    padding: 14px;
  }

  .watch-shell {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .watch-copy {
    order: 1;
  }

  h1 {
    font-size: 34px;
  }

  .phone-frame {
    order: -1;
    width: min(100%, 348px);
  }

  .video-stage {
    min-height: 390px;
    height: min(54vh, 500px);
  }

  .live-panel,
  .stats-row,
  .hero-tags {
    display: grid;
    grid-template-columns: 1fr;
  }

  .single-scene {
    grid-template-columns: 1fr;
  }

  .compact-profile {
    display: grid;
    padding: 18px;
  }

  .compact-profile-grid,
  .component-method-list {
    grid-template-columns: 1fr;
  }

  .pay-drawer.cashier-modal {
    width: auto;
    border-radius: 24px 24px 0 0;
  }

  .pay-drawer.cashier-modal .product-options,
  .pay-drawer.cashier-modal[data-current-product="coins"] .product-options,
  .pay-drawer.cashier-modal[data-current-product="unlock"] .product-options,
  .pay-drawer.cashier-modal[data-current-product="vip"] .product-options {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .component-lab-head {
    grid-template-columns: 1fr;
  }
}

/* ===== 右侧 PayerMax API 调用追踪栏 ===== */
:root {
  --right-panel-width: 460px;
  --demo-stage-width: calc(100vw - var(--right-panel-width));
  --demo-stage-center: calc((100vw - var(--right-panel-width)) / 2);
}

body {
  padding-right: var(--right-panel-width);
}

.right-panel {
  position: fixed;
  top: 0;
  right: 0;
  width: var(--right-panel-width);
  height: 100vh;
  z-index: 30;
  background: #1e293b;
  color: #e2e8f0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  font-family: "Monaco", "Menlo", "Courier New", monospace;
  font-size: 13px;
}

/* 左侧展示区到右侧日志栏之间的渐变过渡带：从展示区背景柔和过渡到日志栏背景色，
   避免深色日志栏直接切割浅色展示区显得突兀。仅做视觉过渡，不拦截任何交互。 */
.panel-transition {
  position: fixed;
  top: 0;
  right: var(--right-panel-width);
  width: 220px;
  height: 100vh;
  z-index: 29;
  pointer-events: none;
  background: linear-gradient(to right, rgba(30, 41, 59, 0), #1e293b);
}

/* 收银台抽屉打开时，磨砂遮罩只覆盖左侧演示区，右侧追踪栏保持清晰可见 */
.pay-backdrop.cashier-backdrop {
  right: var(--right-panel-width);
}

/* 结果弹窗（充值成功等）同理：磨砂只覆盖左侧，弹窗居中在演示区，右侧栏保持清晰 */
.result-backdrop {
  right: var(--right-panel-width);
}

.result-modal {
  left: var(--demo-stage-center);
}

.api-header {
  min-height: 68px;
  padding: 0 1rem;
  background: #0f172a;
  font-weight: 600;
  border-bottom: 1px solid #334155;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.api-header i {
  margin-right: 8px;
}

.clear-btn {
  background: #334155;
  border: none;
  color: #ffffff;
  padding: 4px 12px;
  border-radius: 20px;
  cursor: pointer;
  font-size: 12px;
  white-space: nowrap;
}

.api-log {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
}

.empty-log {
  color: #94a3b8;
  text-align: center;
  padding: 1rem;
  line-height: 1.6;
}

.log-entry {
  margin-bottom: 1.2rem;
  border-left: 3px solid #4f46e5;
  background: #0f172a;
  border-radius: 8px;
  padding: 12px;
  transition: opacity 0.2s;
}

.log-title {
  font-weight: 700;
  color: #facc15;
  margin-bottom: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.log-method {
  color: #34d399;
  font-size: 0.8rem;
  white-space: nowrap;
}

.log-url {
  color: #94a3b8;
  font-size: 11px;
  word-break: break-all;
}

.log-req,
.log-res {
  background: #0a0f1a;
  padding: 8px;
  border-radius: 6px;
  margin: 8px 0;
  overflow-x: auto;
  white-space: pre-wrap;
  font-size: 11px;
}

.log-res {
  border-left: 2px solid #4f46e5;
}

.log-waiting {
  color: #94a3b8;
}

.log-status {
  font-size: 11px;
  margin-top: 5px;
  color: #cbd5e1;
}

.log-status .loading {
  color: #facc15;
}

.log-status .done {
  color: #34d399;
}

.log-status .error {
  color: #f87171;
}

@media (max-width: 1180px) {
  :root {
    --right-panel-width: 0px;
    --demo-stage-width: 100vw;
    --demo-stage-center: 50vw;
  }

  body {
    padding-right: 0;
  }

  .panel-transition {
    display: none;
  }

  .right-panel {
    display: none;
  }
}

/* 顶部“手机端”切换入口 */
.view-switch {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: 4px;
  padding: 6px 12px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}
.view-switch:hover {
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.06);
}
.view-switch svg {
  width: 15px;
  height: 15px;
}

/* 顶部导航栏：浏览器 UID 徽标（可点击复制） */
.uid-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 340px;
  padding: 6px 12px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}
.uid-chip:hover {
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.06);
}
.uid-chip svg {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
  color: var(--muted);
}
.uid-chip svg:first-child {
  color: var(--accent-2);
}
.uid-chip .uid-label {
  flex: 0 0 auto;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--text);
}
.uid-chip .uid-value {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  font-family: "Monaco", "Menlo", "Courier New", monospace;
  color: var(--muted);
}
.uid-chip.copied {
  border-color: var(--accent-2);
  color: var(--accent-2);
}
.uid-chip.copied .uid-value {
  color: var(--accent-2);
}
.uid-chip.copied svg:last-child {
  color: var(--accent-2);
}

/* ===== Blue-white light theme (final override) ===== */
:root {
  color-scheme: light;
  --bg: #eef4ff;
  --surface: #ffffff;
  --surface-2: #eef4ff;
  --surface-3: #eaf2ff;
  --line: #e1eaf6;
  --text: #0f1b33;
  --muted: #5b6b84;
  --soft: #243b5e;
  --accent: #2e6bff;
  --accent-2: #1d4ed8;
  --gold: #d18a12;
  --blue: #2e6bff;
  --danger: #e5484d;
  --shadow: 0 24px 80px rgba(46, 107, 255, 0.16);
  --bg-popup: #ffffff;
  --color-text-primary: #0f1b33;
}

body {
  background:
    linear-gradient(120deg, rgba(251, 253, 255, 0.90) 0%, rgba(238, 244, 255, 0.82) 45%, rgba(242, 247, 255, 0.88) 100%),
    url("https://images.unsplash.com/photo-1506905925346-21bda4d32df4?auto=format&fit=crop&w=1800&q=80") center / cover fixed,
    #eef4ff;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(circle at 18% 18%, rgba(46, 107, 255, 0.16), transparent 26rem),
    radial-gradient(circle at 80% 10%, rgba(106, 162, 255, 0.12), transparent 22rem),
    linear-gradient(to bottom, transparent 0%, rgba(251, 253, 255, 0.86) 90%);
  pointer-events: none;
}

.topbar {
  background: rgba(255, 255, 255, 0.82);
  border-bottom: 1px solid #e1eaf6;
  box-shadow: 0 18px 50px rgba(46, 107, 255, 0.08);
}

.icon-button {
  border-color: #e1eaf6;
  background: #eef4ff;
}

.scene-tabs {
  border-color: #e1eaf6;
  background: #eef4ff;
}

.scene-tab.active {
  border-color: #c7d8f0;
  background: linear-gradient(135deg, #eaf2ff, #ffffff);
  box-shadow: inset 0 0 0 1px rgba(46, 107, 255, 0.10);
}

h1 {
  text-shadow: none;
}

.watch-lead {
  color: #5b6b84;
}

.hero-tags span {
  border-color: #e1eaf6;
  background: #eef4ff;
  color: #243b5e;
}

.storyline-card {
  border-color: #e1eaf6;
  border-left-color: #2e6bff;
  background: linear-gradient(135deg, #ffffff, #eef4ff);
}

.storyline-card span {
  color: #1d4ed8;
}

.storyline-card p {
  color: #5b6b84;
}

.primary-button {
  background: linear-gradient(135deg, #2e6bff, #6aa2ff);
  box-shadow: 0 18px 42px rgba(46, 107, 255, 0.22);
  color: #ffffff;
}

.ghost-button {
  background: #ffffff;
  border-color: #e1eaf6;
  color: #0f1b33;
}

.stats-row span {
  border-color: #e1eaf6;
  background: #ffffff;
}

.stats-row strong {
  color: #0f1b33;
}

.phone-frame {
  border-color: #c7d8f0;
  background: linear-gradient(145deg, #f6f9fd, #dde7f5);
  box-shadow: 0 28px 90px rgba(46, 107, 255, 0.18), 0 0 0 10px rgba(46, 107, 255, 0.04);
}

.phone-top span:first-child {
  background: #c7d8f0;
}

.phone-top span:last-child {
  background: #9fb4d0;
}

.video-stage {
  background: #eef4ff;
}

.video-gradient {
  background:
    linear-gradient(to bottom, rgba(15, 27, 51, 0.10), transparent 30%, rgba(15, 27, 51, 0.55)),
    radial-gradient(circle at 50% 42%, transparent 0 10%, rgba(15, 27, 51, 0.22) 55%);
}

.play-float {
  border-color: rgba(255, 255, 255, 0.55);
  background: rgba(255, 255, 255, 0.30);
  color: #ffffff;
  box-shadow: 0 16px 42px rgba(15, 27, 51, 0.28);
}

.lock-chip {
  border-color: rgba(255, 255, 255, 0.55);
  background: rgba(255, 255, 255, 0.82);
  color: #0f1b33;
}

.episode {
  border-color: #e1eaf6;
  background: #eef4ff;
  color: #243b5e;
}

.episode.active {
  background: linear-gradient(135deg, #2e6bff, #6aa2ff);
  color: #ffffff;
  box-shadow: 0 12px 28px rgba(46, 107, 255, 0.24);
}

.episode.locked {
  border-color: rgba(209, 138, 18, 0.5);
  color: #b07d1a;
}

.panel-head,
.vip-state,
.timeline-mini,
.balance {
  border-color: #e1eaf6;
  background: #ffffff;
}

.small-button,
.vip-state button {
  background: #eef4ff;
  color: #0f1b33;
}

.balance svg {
  filter: none;
}

.offer-card {
  border-color: #e1eaf6;
  background: #ffffff;
}

.offer-card span {
  color: #1d4ed8;
}

.offer-card small {
  color: #5b6b84;
}

.offer-card.featured {
  border-color: #2e6bff;
  background: linear-gradient(135deg, #eaf2ff, #ffffff);
  box-shadow: inset 0 0 0 1px rgba(46, 107, 255, 0.14);
}

.account-scene .compact-offer {
  background: #f7faff;
}

.player-video {
  border-color: #c7d8f0;
  background: linear-gradient(145deg, #f6f9fd, #dde7f5);
  box-shadow: 0 28px 90px rgba(46, 107, 255, 0.18);
}

.player-vignette {
  background:
    linear-gradient(to bottom, rgba(15, 27, 51, 0.18), transparent 22%, rgba(15, 27, 51, 0.55)),
    linear-gradient(to right, rgba(15, 27, 51, 0.18), transparent 40%);
}

.player-topline span {
  background: rgba(255, 255, 255, 0.82);
  color: #0f1b33;
}

.player-icon {
  border-color: rgba(255, 255, 255, 0.55);
  background: rgba(255, 255, 255, 0.30);
  color: #0f1b33;
}

.player-lock-card {
  border-color: #e1eaf6;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 18px 48px rgba(46, 107, 255, 0.16);
}

.episode-row {
  border-color: #e1eaf6;
  background: #ffffff;
  color: #0f1b33;
}

.episode-row em {
  background: #eef4ff;
  color: #5b6b84;
}

.episode-row.locked em {
  color: #b07d1a;
}

.episode-row.watched em {
  color: #1d4ed8;
}

.episode-row.active {
  border-color: #2e6bff;
  background: #eaf2ff;
}

.episode-progress {
  border-color: #e1eaf6;
  background: #eef4ff;
}

.episode-scroll::-webkit-scrollbar-thumb {
  background: #c7d8f0;
}

.avatar-mark {
  background: linear-gradient(135deg, #2e6bff, #6aa2ff);
  box-shadow: 0 16px 34px rgba(46, 107, 255, 0.24);
}

.membership-card,
.wallet-card {
  border-color: #e1eaf6;
  background: #ffffff;
}

.membership-card {
  background: linear-gradient(135deg, #eef4ff, transparent 46%), #ffffff;
}

.membership-meta div {
  border-color: #e1eaf6;
  background: #eef4ff;
}

.scene-side {
  border-color: #e1eaf6;
  background: #ffffff;
}

.compact-profile {
  border-color: #e1eaf6;
  background: linear-gradient(135deg, #eaf2ff, #ffffff);
  box-shadow: 0 24px 70px rgba(46, 107, 255, 0.12);
}

.account-scene .membership-card {
  border-color: #e1eaf6;
}

.account-scene .membership-card::after {
  background: rgba(46, 107, 255, 0.10);
}

.account-scene .wallet-card {
  background: radial-gradient(circle at 100% 0, rgba(46, 107, 255, 0.10), transparent 18rem), #ffffff;
}

.vip-tier-badge {
  border-color: rgba(209, 138, 18, 0.45);
  background: linear-gradient(135deg, #fff3d6, #ffe9b3);
  color: #8a5b0e;
}

.saved-cards-card {
  border-color: #e1eaf6;
  background: #ffffff;
}

.add-card-btn {
  border-color: #c7d8f0;
  background: #eef4ff;
  color: #0f1b33;
}

.add-card-btn:hover {
  background: #eaf2ff;
}

.saved-card-empty {
  border-color: #c7d8f0;
  color: #5b6b84;
}

.saved-card-item {
  border-color: #e1eaf6;
  background: #f7faff;
}

.card-brand {
  background: #5b6b84;
}

.card-tag {
  background: #eaf2ff;
  color: #1d4ed8;
}

.pay-backdrop,
.pay-backdrop.cashier-backdrop {
  background: rgba(15, 27, 51, 0.50);
}

.result-backdrop {
  background: rgba(15, 27, 51, 0.55);
}

.result-modal {
  border-color: #e1eaf6;
  background: #ffffff;
  box-shadow: 0 28px 90px rgba(46, 107, 255, 0.20);
}

.result-icon {
  background: #eaf2ff;
  color: #2e6bff;
}

.result-modal[data-type="fail"] .result-icon {
  background: rgba(229, 72, 77, 0.12);
  color: #e5484d;
}

.result-modal[data-type="pending"] .result-icon {
  background: rgba(209, 138, 18, 0.14);
  color: #b07d1a;
}

.result-desc {
  color: #5b6b84;
}

.result-meta {
  border-color: #e1eaf6;
  background: #eef4ff;
  color: #243b5e;
}

.detail-row {
  border-color: #e1eaf6;
  background: #f7faff;
}

.result-close {
  background: linear-gradient(135deg, #2e6bff, #6aa2ff);
}

.result-modal[data-type="success"] .result-close {
  background: linear-gradient(135deg, #1d4ed8, #6aa2ff);
}

.pay-drawer {
  border-color: #e1eaf6;
  background: #ffffff;
  box-shadow: 0 28px 90px rgba(46, 107, 255, 0.18);
}

.pay-drawer.cashier-modal {
  border-color: #e1eaf6;
  background:
    radial-gradient(circle at 0 0, rgba(46, 107, 255, 0.10), transparent 18rem),
    radial-gradient(circle at 100% 14%, rgba(46, 107, 255, 0.08), transparent 18rem),
    linear-gradient(145deg, #ffffff, #f2f7ff);
  box-shadow: 0 34px 120px rgba(46, 107, 255, 0.20);
}

.drawer-head {
  background: rgba(255, 255, 255, 0.90);
  border-bottom: 1px solid #e1eaf6;
}

.tab {
  background: #eef4ff;
  color: #243b5e;
}

.tab.active {
  background: #2e6bff;
  color: #ffffff;
}

.pay-drawer.cashier-modal .product-tabs {
  border-color: #e1eaf6;
  background: #eef4ff;
}

.pay-drawer.cashier-modal .tab.active {
  background: #2e6bff;
  color: #ffffff;
}

.product-option {
  border-color: #e1eaf6;
  background: #ffffff;
  color: #0f1b33;
}

.product-option.active {
  border-color: #2e6bff;
  box-shadow: inset 0 0 0 1px rgba(46, 107, 255, 0.28);
}

.pay-drawer.cashier-modal .product-option {
  background: #f7faff;
}

.pay-drawer.cashier-modal .product-option.active {
  border-color: #2e6bff;
  background: #eaf2ff;
  box-shadow: inset 0 0 0 1px rgba(46, 107, 255, 0.16), 0 16px 38px rgba(46, 107, 255, 0.12);
}

.checkout-surface {
  border-color: #e1eaf6;
  background: #f7faff;
}

.pmx-cashier-surface {
  border-color: #e1eaf6;
  background: radial-gradient(circle at 18% 0, rgba(46, 107, 255, 0.08), transparent 18rem), #ffffff;
}

.component-surface {
  background: radial-gradient(circle at 18% 0, rgba(46, 107, 255, 0.08), transparent 18rem), #f7faff;
}

.component-lab {
  border-color: #e1eaf6;
  background: #f7faff;
}

.component-empty {
  border-color: #c7d8f0;
  color: #5b6b84;
}

.component-retry {
  border-color: #c7d8f0;
  background: #eef4ff;
  color: #0f1b33;
}

.component-method-row {
  border-color: #e1eaf6;
  background: #ffffff;
  color: #0f1b33;
}

.component-method-row.active {
  border-color: #2e6bff;
  background: linear-gradient(135deg, #eaf2ff, #ffffff);
  box-shadow: inset 0 0 0 1px rgba(46, 107, 255, 0.16);
}

.component-method-row > svg {
  color: #1d4ed8;
}

.component-method-row .method-badge {
  border-color: rgba(46, 107, 255, 0.40);
  background: #eaf2ff;
  color: #1d4ed8;
}

.apm-org-row {
  border-color: #e1eaf6;
  background: #ffffff;
  color: #243b5e;
}

.apm-org-row:hover {
  color: #1d4ed8;
  border-color: #2e6bff;
}

.apm-org-row.active {
  border-color: #2e6bff;
  background: #eaf2ff;
  color: #1d4ed8;
}

.component-method-dot {
  border-color: #c7d8f0;
}

.component-method-dot.loading {
  border-color: #2e6bff;
  border-top-color: transparent;
}

.component-method-dot.available {
  border-color: #c7d8f0;
}

.component-method-dot.selected {
  border-color: #1d4ed8;
  background: radial-gradient(circle, #1d4ed8 0 42%, transparent 46%);
  box-shadow: 0 0 0 4px rgba(46, 107, 255, 0.12);
}

.dropin-panel {
  border-color: #e1eaf6;
  background: #ffffff;
}

.dropin-card-frame {
  border-color: #c7d8f0;
  background: #ffffff;
}

.saved-card-row {
  border-color: #e1eaf6;
  background: #ffffff;
}

.saved-card-row:hover {
  border-color: #2e6bff;
  background: #eaf2ff;
}

.saved-card-row.selected {
  border-color: #1d4ed8;
  background: #eaf2ff;
}

.saved-card-radio {
  border-color: #c7d8f0;
}

.saved-card-row.selected .saved-card-radio {
  border-color: #1d4ed8;
  background: radial-gradient(circle, #1d4ed8 0 45%, transparent 52%);
}

.saved-card-brand {
  background: #eaf2ff;
  color: #1d4ed8;
}

.add-new-card {
  border-color: #c7d8f0;
  background: #f7faff;
  color: #5b6b84;
}

.add-new-card.ghost {
  border-color: #2e6bff;
  color: #2e6bff;
}

.saved-cards-empty {
  border-color: #c7d8f0;
  color: #5b6b84;
}

.component-runtime-message {
  border-color: rgba(229, 72, 77, 0.35);
  background: rgba(229, 72, 77, 0.10);
  color: #b91c1c;
}

.component-runtime-message.token {
  border-color: rgba(46, 107, 255, 0.30);
  background: #eaf2ff;
  color: #1d4ed8;
}

.component-runtime-message.order {
  border-color: rgba(209, 138, 18, 0.30);
  background: #fff6e5;
  color: #8a5b0e;
}

.component-runtime-message a {
  color: #1d4ed8;
}

.pmx-submit {
  background: linear-gradient(135deg, #2e6bff, #6aa2ff);
}

.pmx-submit.processing {
  background: #2e6bff;
}

.pmx-submit.success {
  background: #1d4ed8;
}

.pmx-submit.failed {
  background: #e5484d;
}

.view-switch {
  border-color: #c7d8f0;
  color: #243b5e;
}

.view-switch:hover {
  color: #1d4ed8;
  border-color: #2e6bff;
  background: #eef4ff;
}

.uid-chip {
  border-color: #c7d8f0;
  background: #ffffff;
  color: #5b6b84;
}

.uid-chip:hover {
  color: #1d4ed8;
  border-color: #2e6bff;
  background: #eef4ff;
}

.uid-chip svg:first-child {
  color: #1d4ed8;
}

.uid-chip .uid-label {
  color: #0f1b33;
}

.uid-chip .uid-value {
  color: #5b6b84;
}

@media (max-width: 760px) {
  .pay-drawer.cashier-modal .drawer-head {
    background: rgba(255, 255, 255, 0.96);
  }

  .drawer-head::before {
    background: #c7d8f0;
  }

  .pmx-submit {
    box-shadow: 0 -12px 24px rgba(46, 107, 255, 0.10);
  }
}

/* ===== 剧集解锁：仿真手机边框（与手机版质感一致） ===== */
@media (min-width: 1121px) {
  .player-scene .player-video {
    border: 8px solid #0b1220;
    border-radius: 44px;
    box-shadow: 0 24px 80px rgba(46, 107, 255, 0.18);
  }

  /* 手机顶部灵动岛/刘海 */
  .player-scene .player-video::before {
    content: "";
    position: absolute;
    top: 12px;
    left: 50%;
    transform: translateX(-50%);
    width: 108px;
    height: 24px;
    border-radius: 999px;
    background: #0b1220;
    z-index: 6;
  }
}

/* ============================================================
   桌面版内嵌手机预览模式（body[data-view-mode="mobile"]）
   不跳转页面，将左侧展示区切换为手机壳形态；
   桌面端标题栏 / 顶部导航保持不变。
   ============================================================ */

/* 桌面模式默认隐藏手机端顶部栏与底部导航 */
.mobile-topbar,
.mobile-tabbar {
  display: none;
}

/* 切换按钮复用 .view-switch 视觉（button 原生样式重置） */
button.view-switch {
  background: transparent;
  cursor: pointer;
  font: inherit;
}

/* 手机预览模式：device-shell 变为手机壳（整体偏小，控制在视口内不产生外层滚动条） */
body[data-view-mode="mobile"] .device-shell {
  position: relative;
  display: flex;
  flex-direction: column;
  max-width: 390px;
  height: calc(100dvh - 104px);
  margin: 20px auto;
  background: #ffffff;
  border: 8px solid #0b1220;
  border-radius: 44px;
  box-shadow: 0 24px 80px rgba(46, 107, 255, 0.16);
  overflow: hidden;
}

/* 灵动岛 / 刘海 */
body[data-view-mode="mobile"] .device-shell::before {
  content: "";
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  width: 108px;
  height: 24px;
  border-radius: 999px;
  background: #0b1220;
  z-index: 50;
}

/* 手机端顶部栏（留出灵动岛额头区域） */
body[data-view-mode="mobile"] .mobile-topbar {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 12px;
  min-height: 56px;
  padding: 44px 16px 10px;
  background: rgba(255, 255, 255, 0.90);
  border-bottom: 1px solid #e1eaf6;
}
body[data-view-mode="mobile"] .mobile-topbar .brand {
  gap: 8px;
  font-size: 17px;
}
body[data-view-mode="mobile"] .mobile-topbar .brand-mark {
  width: 23px;
  height: 23px;
}

/* 主内容在手机壳内滚动 */
body[data-view-mode="mobile"] .mobile-main {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden auto;
}
body[data-view-mode="mobile"] .mobile-main .demo-layout {
  max-width: none;
  min-height: 0;
  padding: 56px 16px 20px;
}
body[data-view-mode="mobile"] .mobile-main .scene-frame,
body[data-view-mode="mobile"] .mobile-main .scene-panel {
  min-height: auto;
}

/* 底部导航（固定在手机壳底部，不随内容滚动） */
body[data-view-mode="mobile"] .mobile-tabbar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  width: 100%;
  padding: 7px 12px calc(7px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid #e1eaf6;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(18px);
}
body[data-view-mode="mobile"] .mobile-tabbar button {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  min-height: 46px;
  border: none;
  background: transparent;
  color: #5b6b84;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}
body[data-view-mode="mobile"] .mobile-tabbar button.active {
  color: #2e6bff;
}
body[data-view-mode="mobile"] .mobile-tabbar svg {
  width: 20px;
  height: 20px;
}

/* 场景单列布局 */
body[data-view-mode="mobile"] .mobile-main .watch-shell {
  grid-template-columns: 1fr;
  gap: 20px;
  min-height: auto;
  align-items: start;
}
body[data-view-mode="mobile"] .mobile-main .single-scene,
body[data-view-mode="mobile"] .mobile-main .account-scene {
  grid-template-columns: 1fr;
  justify-content: stretch;
  align-items: start;
  gap: 16px;
  min-height: auto;
  padding: 0;
}
body[data-view-mode="mobile"] .mobile-main .profile-grid,
body[data-view-mode="mobile"] .mobile-main .compact-profile-grid {
  grid-template-columns: 1fr;
}

/* 首页：视频在上、文案在下 */
body[data-view-mode="mobile"] .mobile-main .watch-shell .phone-frame {
  order: -1;
  width: 100%;
  padding: 0;
  border: none;
  border-radius: 20px;
  background: transparent;
  box-shadow: none;
}
body[data-view-mode="mobile"] .mobile-main .phone-top {
  display: none;
}
body[data-view-mode="mobile"] .mobile-main .video-stage {
  height: min(54vh, 460px);
  min-height: 320px;
  border-radius: 20px;
}

/* 播放器场景：去掉桌面版的外框与刘海（手机壳已提供） */
body[data-view-mode="mobile"] .mobile-main .compact-player {
  width: 100%;
  min-height: 0;
  height: min(58vh, 480px);
  border: none;
  border-radius: 20px;
  box-shadow: none;
}
body[data-view-mode="mobile"] .mobile-main .player-scene .player-video::before {
  display: none;
}

/* 我的/VIP：桌面版独有的侧栏「统一购买入口」在手机模式隐藏 */
body[data-view-mode="mobile"] .mobile-main .checkout-brief {
  display: none;
}

/* 解锁页：Episode Store 紧凑化 */
body[data-view-mode="mobile"] .mobile-main .episode-store {
  padding: 16px;
}
body[data-view-mode="mobile"] .mobile-main .episode-store .eyebrow {
  font-size: 10px;
  margin-bottom: 6px;
}
body[data-view-mode="mobile"] .mobile-main .episode-store h2 {
  margin-bottom: 8px;
  font-size: 20px;
  line-height: 1.15;
}
body[data-view-mode="mobile"] .mobile-main .episode-store p {
  margin-bottom: 0;
  font-size: 12px;
  line-height: 1.6;
}
body[data-view-mode="mobile"] .mobile-main .episode-store .compact-list {
  margin-top: 12px;
}

/* 手机端字号与首页布局 */
body[data-view-mode="mobile"] .mobile-main h1 {
  font-size: 28px;
  line-height: 1.08;
  white-space: normal;
}
body[data-view-mode="mobile"] .mobile-main .eyebrow {
  font-size: 11px;
  margin-bottom: 10px;
}
body[data-view-mode="mobile"] .mobile-main .watch-lead {
  font-size: 13px;
  line-height: 1.62;
}
body[data-view-mode="mobile"] .mobile-main .hero-tags {
  gap: 8px;
  margin-bottom: 18px;
}
body[data-view-mode="mobile"] .mobile-main .hero-tags span {
  min-height: 27px;
  padding: 5px 10px;
  font-size: 11px;
}

/* 首页三个付费入口按钮：压缩后保持同一行 */
body[data-view-mode="mobile"] .mobile-main .watch-actions {
  flex-wrap: nowrap;
  gap: 8px;
  margin-top: 22px;
}
body[data-view-mode="mobile"] .mobile-main .watch-actions .primary-button,
body[data-view-mode="mobile"] .mobile-main .watch-actions .ghost-button {
  flex: 1 1 0;
  min-width: 0;
  min-height: 42px;
  padding: 0 10px;
  gap: 6px;
  border-radius: 10px;
  font-size: 13px;
  white-space: nowrap;
}
body[data-view-mode="mobile"] .mobile-main .watch-actions .primary-button svg,
body[data-view-mode="mobile"] .mobile-main .watch-actions .ghost-button svg {
  width: 16px;
  height: 16px;
}

/* “付费剧集 · 解锁观看”融入视频画面底部，去掉胶囊底色 */
body[data-view-mode="mobile"] .mobile-main .lock-chip {
  left: 50%;
  right: auto;
  bottom: 20px;
  padding: 0;
  border-radius: 0;
  background: transparent;
  backdrop-filter: none;
  color: rgba(255, 255, 255, 0.92);
  font-size: 12px;
  font-weight: 700;
  gap: 6px;
  transform: translateX(-50%);
  white-space: nowrap;
}
body[data-view-mode="mobile"] .mobile-main .lock-chip svg {
  width: 14px;
  height: 14px;
}

/* 我的页面：整体紧凑化 */
body[data-view-mode="mobile"] .mobile-main .account-panel {
  gap: 14px;
}
body[data-view-mode="mobile"] .mobile-main .compact-profile {
  gap: 12px;
  padding: 14px;
  border-radius: 12px;
}
body[data-view-mode="mobile"] .mobile-main .avatar-mark {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  font-size: 22px;
}
body[data-view-mode="mobile"] .mobile-main .compact-profile h2 {
  margin-bottom: 4px;
  font-size: 20px;
}
body[data-view-mode="mobile"] .mobile-main .compact-profile p:last-child {
  margin-top: 6px;
  font-size: 12px;
  line-height: 1.5;
}
body[data-view-mode="mobile"] .mobile-main .compact-profile-grid {
  gap: 12px;
}
body[data-view-mode="mobile"] .mobile-main .account-scene .membership-card,
body[data-view-mode="mobile"] .mobile-main .account-scene .wallet-card {
  min-height: 0;
  padding: 16px;
  border-radius: 12px;
}
body[data-view-mode="mobile"] .mobile-main .account-scene .membership-card {
  gap: 12px;
}
body[data-view-mode="mobile"] .mobile-main .vip-billing strong {
  font-size: 22px;
}
body[data-view-mode="mobile"] .mobile-main .vip-rule {
  font-size: 12px;
  line-height: 1.5;
}
body[data-view-mode="mobile"] .mobile-main .membership-meta {
  gap: 8px;
}
body[data-view-mode="mobile"] .mobile-main .membership-meta div {
  padding: 10px;
}
body[data-view-mode="mobile"] .mobile-main .membership-meta span {
  margin-bottom: 4px;
  font-size: 11px;
}
body[data-view-mode="mobile"] .mobile-main .wallet-balance {
  margin: 2px 0 12px;
}
body[data-view-mode="mobile"] .mobile-main .wallet-balance strong {
  font-size: 24px;
}
body[data-view-mode="mobile"] .mobile-main .account-scene .coin-actions {
  gap: 8px;
}
body[data-view-mode="mobile"] .mobile-main .account-scene .compact-offer {
  min-height: 0;
  padding: 12px;
  border-radius: 10px;
}
body[data-view-mode="mobile"] .mobile-main .account-scene .compact-offer strong {
  margin: 8px 0;
  font-size: 18px;
}
body[data-view-mode="mobile"] .mobile-main .account-scene .compact-offer small {
  font-size: 14px;
}
body[data-view-mode="mobile"] .mobile-main .account-scene .membership-card .primary-button {
  min-height: 44px;
  border-radius: 10px;
  font-size: 14px;
}
body[data-view-mode="mobile"] .mobile-main .saved-cards-card {
  gap: 10px;
  padding: 16px;
  border-radius: 12px;
}
body[data-view-mode="mobile"] .mobile-main .saved-cards-head > span {
  font-size: 14px;
}
/* 我的/VIP：已存卡在手机模式改为单列横版，避免半宽挤压换行 */
body[data-view-mode="mobile"] .mobile-main .saved-card-list {
  grid-template-columns: 1fr;
  gap: 10px;
}
body[data-view-mode="mobile"] .mobile-main .saved-card-item {
  flex-wrap: nowrap;
}
body[data-view-mode="mobile"] .mobile-main .saved-card-item .card-info strong {
  white-space: nowrap;
}

/* 收银台：在手机壳内部从底部弹出（随手机壳裁剪圆角） */
body[data-view-mode="mobile"] .device-shell .pay-backdrop,
body[data-view-mode="mobile"] .device-shell .pay-backdrop.cashier-backdrop {
  position: absolute;
  inset: 0;
  right: 0;
  left: 0;
}
body[data-view-mode="mobile"] .device-shell .pay-drawer.cashier-modal {
  position: absolute;
  top: auto;
  bottom: 0;
  left: 0;
  right: 0;
  transform: none;
  width: 100%;
  max-width: none;
  margin: 0;
  max-height: 100%;
  border: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 24px 24px 0 0;
}
body[data-view-mode="mobile"] .device-shell .pay-drawer.cashier-modal .drawer-head {
  padding: 16px 18px 12px;
}
body[data-view-mode="mobile"] .device-shell .pay-drawer.cashier-modal .product-options,
body[data-view-mode="mobile"] .device-shell .pay-drawer.cashier-modal[data-current-product="coins"] .product-options,
body[data-view-mode="mobile"] .device-shell .pay-drawer.cashier-modal[data-current-product="unlock"] .product-options,
body[data-view-mode="mobile"] .device-shell .pay-drawer.cashier-modal[data-current-product="vip"] .product-options {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
body[data-view-mode="mobile"] .device-shell .pay-drawer.cashier-modal .component-method-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

/* 收银台内部：在窄手机壳里进一步压缩字体与间距（对齐独立手机端 mobile.css） */
body[data-view-mode="mobile"] .device-shell .pay-drawer.cashier-modal .drawer-head h2 {
  font-size: 18px;
}
body[data-view-mode="mobile"] .device-shell .pay-drawer.cashier-modal .drawer-head .eyebrow {
  font-size: 10px;
  margin-bottom: 4px;
}
body[data-view-mode="mobile"] .device-shell .pay-drawer.cashier-modal .tab {
  min-width: 0;
  min-height: 30px;
  padding: 0 10px;
  font-size: 12px;
}
body[data-view-mode="mobile"] .device-shell .pay-drawer.cashier-modal .product-option {
  min-height: 60px;
  padding: 8px 10px;
}
body[data-view-mode="mobile"] .device-shell .pay-drawer.cashier-modal[data-current-product="vip"] .product-option {
  min-height: 70px;
}
body[data-view-mode="mobile"] .device-shell .pay-drawer.cashier-modal .product-option strong {
  margin: 4px 0 3px;
  font-size: 14px;
  line-height: 1.15;
}
body[data-view-mode="mobile"] .device-shell .pay-drawer.cashier-modal .product-option span,
body[data-view-mode="mobile"] .device-shell .pay-drawer.cashier-modal .product-option small,
body[data-view-mode="mobile"] .device-shell .pay-drawer.cashier-modal .product-option em {
  font-size: 11px;
}
body[data-view-mode="mobile"] .device-shell .pay-drawer.cashier-modal .product-option em {
  margin: -1px 0 5px;
  line-height: 1.35;
}
body[data-view-mode="mobile"] .device-shell .pay-drawer.cashier-modal .component-method-row {
  min-height: 38px;
  padding: 6px 8px;
  gap: 6px;
  font-size: 12px;
}
body[data-view-mode="mobile"] .device-shell .pay-drawer.cashier-modal .component-method-row > svg {
  width: 16px;
  height: 16px;
}
body[data-view-mode="mobile"] .device-shell .pay-drawer.cashier-modal .component-method-row strong {
  font-size: 14px;
}
body[data-view-mode="mobile"] .device-shell .pay-drawer.cashier-modal .component-method-row small {
  font-size: 11px;
}
body[data-view-mode="mobile"] .device-shell .pay-drawer.cashier-modal .component-method-row .method-badge {
  font-size: 8px;
}
body[data-view-mode="mobile"] .device-shell .pay-drawer.cashier-modal .component-runtime-message {
  padding: 9px 10px;
  font-size: 12px;
}
body[data-view-mode="mobile"] .device-shell .pay-drawer.cashier-modal .pmx-submit {
  min-height: 42px;
  font-size: 14px;
  border-radius: 10px;
}
body[data-view-mode="mobile"] .device-shell .pay-drawer.cashier-modal .apm-hint {
  font-size: 12px;
  line-height: 1.5;
}
body[data-view-mode="mobile"] .device-shell .pay-drawer.cashier-modal .saved-card-number {
  font-size: 14px;
}
body[data-view-mode="mobile"] .device-shell .pay-drawer.cashier-modal .add-new-card {
  min-height: 38px;
  font-size: 13px;
}

/* 我的/VIP：VIP 徽章在手机模式更紧凑 */
body[data-view-mode="mobile"] .mobile-main .vip-tier-badge {
  padding: 4px 10px;
  font-size: 11px;
}
