/* ── Generic visibility ───────────────────────────────────── */
[hidden] {
  display: none !important;
}

.avatar {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 21px;
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.25), 0 10px 26px rgba(0, 0, 0, 0.28);
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

/* ── Home ─────────────────────────────────────────────────── */
.home-page {
  padding-top: 0;
}

.hero-carousel {
  position: relative;
  height: 292px;
  margin: 0 var(--page-gutter);
  overflow: hidden;
  background: var(--panel);
  border: 1px solid var(--line-soft);
  border-radius: 26px;
  box-shadow: 0 24px 54px rgba(0, 0, 0, 0.35);
}

.hero-slides {
  position: absolute;
  inset: 0;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.55s var(--ease-out), visibility 0.55s;
  pointer-events: none;
}

.hero-slide.is-active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.hero-art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 28%;
  filter: saturate(0.88) contrast(1.04);
  transform: scale(1.015);
  transition: transform 7s linear;
}

.hero-slide.is-active .hero-art {
  transform: scale(1.07);
}

.hero-vignette {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(8, 8, 10, 0.82) 0%, rgba(8, 8, 10, 0.14) 68%, rgba(8, 8, 10, 0.02) 100%),
    linear-gradient(0deg, rgba(8, 8, 10, 0.97) 0%, rgba(8, 8, 10, 0.64) 29%, rgba(8, 8, 10, 0) 67%),
    linear-gradient(180deg, rgba(8, 8, 10, 0.44) 0%, transparent 36%);
}

.hero-orbit {
  position: absolute;
  top: -76px;
  right: -60px;
  width: 228px;
  height: 228px;
  border: 1px solid color-mix(in srgb, var(--accent) 28%, transparent);
  border-radius: 50%;
  box-shadow: inset 0 0 48px color-mix(in srgb, var(--accent) 10%, transparent);
  opacity: 0.55;
  pointer-events: none;
}

.hero-orbit::after {
  content: "";
  position: absolute;
  inset: 34px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 50%;
}

.hero-content {
  position: absolute;
  right: 18px;
  bottom: 19px;
  left: 18px;
  z-index: 2;
}

.hero-eyebrow {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 7px;
  color: var(--pink-strong);
  font-size: var(--fs-2xs);
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.pulse-dot {
  width: 5px;
  height: 5px;
  background: var(--pink);
  border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(255, 158, 180, 0.7);
  animation: pulse 2.2s ease-out infinite;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(255, 158, 180, 0.5); }
  70% { box-shadow: 0 0 0 6px rgba(255, 158, 180, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 158, 180, 0); }
}

.hero-content h2 {
  display: -webkit-box;
  overflow: hidden;
  max-width: 310px;
  color: #fff;
  font-size: 27px;
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 1.08;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.34);
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
}

.hero-meta {
  overflow: hidden;
  margin-top: 7px;
  color: rgba(247, 247, 245, 0.72);
  font-size: 10px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hero-tagline {
  display: -webkit-box;
  overflow: hidden;
  max-width: 300px;
  margin-top: 4px;
  color: rgba(247, 247, 245, 0.72);
  font-size: 10px;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
  line-clamp: 1;
}

.hero-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.hero-actions .btn {
  min-height: 34px;
  padding: 0 14px;
  font-size: 10.5px;
}

.hero-dots {
  position: absolute;
  right: 19px;
  bottom: 21px;
  z-index: 4;
  display: flex;
  gap: 5px;
}

.hero-dot {
  width: 5px;
  height: 5px;
  padding: 0;
  background: rgba(255, 255, 255, 0.33);
  border-radius: var(--radius-pill);
  transition: width 0.28s var(--ease-out), background 0.25s;
}

.hero-dot.is-active {
  width: 17px;
  background: var(--pink);
}

.hero-counter {
  position: absolute;
  top: 14px;
  right: 15px;
  z-index: 4;
  padding: 4px 7px;
  color: rgba(255, 255, 255, 0.65);
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 5px;
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.08em;
  backdrop-filter: blur(6px);
}

.home-ai-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 0 var(--page-gutter);
}

.home-ai-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 66px;
  padding: 12px;
  overflow: hidden;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  transition: transform 0.22s var(--ease-out), border-color 0.2s, background 0.2s;
}

.home-ai-card:hover {
  transform: translateY(-2px);
  border-color: var(--line-strong);
  background: var(--panel-raised);
}

.home-ai-card .ai-icon {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 36px;
  height: 36px;
  color: var(--pink);
  background: var(--pink-wash);
  border: 1px solid rgba(255, 158, 180, 0.16);
  border-radius: 12px;
}

.home-ai-card.ai-video .ai-icon {
  color: #9CC7FF;
  background: rgba(122, 169, 255, 0.09);
  border-color: rgba(122, 169, 255, 0.16);
}

.home-ai-card > div {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
  gap: 2px;
}

.home-ai-card strong {
  color: var(--text);
  font-size: var(--fs-caption);
  font-weight: 700;
}

.home-ai-card div span {
  overflow: hidden;
  color: var(--muted);
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-ai-card > svg {
  flex: 0 0 auto;
  color: var(--muted-dim);
}

/* Discover / search entry pinned under the home brand bar. */
.home-search {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 var(--page-gutter) 16px;
  padding: 10px 14px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  transition: background 0.2s, border-color 0.2s;
}

.home-search:hover {
  background: rgba(255, 255, 255, 0.075);
  border-color: var(--line-strong);
}

.home-search .home-search-icon {
  display: inline-grid;
  flex: 0 0 auto;
  place-items: center;
  color: var(--pink);
}

.home-search .home-search-copy {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  font-size: var(--fs-caption);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-search .home-search-go {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 4px;
  color: var(--pink);
  font-size: var(--fs-caption);
  font-weight: 600;
  white-space: nowrap;
}

/* ── Discover ─────────────────────────────────────────────── */
.discover-page {
  padding-top: 0;
}

.discover-page .page-topbar {
  margin-bottom: 2px;
}

.search-field-row {
  position: relative;
  margin-top: 17px;
}

.search-loading {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-top: 9px;
  color: var(--muted);
  font-size: 9px;
}

.search-loading .indeterminate {
  height: 2px;
}

.discover-chips {
  margin-top: 14px;
}

.discover-results {
  margin-top: 23px;
}

.discover-results .section-head button.section-link {
  min-height: 28px;
  padding: 0;
}

.discover-rankings {
  margin-top: 34px;
}

.ranking-wrap {
  margin: 0 var(--page-gutter);
  padding: 12px 12px 6px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.012));
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
}

.ranking-tabs button {
  min-height: 34px;
  font-size: 10.5px;
}

.ranking-note {
  padding: 11px 4px 2px;
  color: var(--muted-dim);
  font-size: 9px;
  letter-spacing: 0.02em;
  text-align: center;
}

.ranking-wrap .rank-list {
  padding: 2px 2px 0;
}

.ranking-wrap .rank-row {
  min-height: 70px;
}

.ranking-wrap .rank-thumb {
  flex-basis: 44px;
  width: 44px;
  height: 59px;
}

/* ── Favorites / history ──────────────────────────────────── */
.favorites-page {
  padding-top: 0;
}

.favorites-page .page-topbar {
  margin-bottom: 2px;
}

.favorites-tabs-wrap {
  position: sticky;
  top: calc(58px + var(--safe-top));
  z-index: 20;
  margin-top: 20px;
  background: rgba(11, 11, 13, 0.92);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.favorites-summary {
  padding: 14px var(--page-gutter) 10px;
}

.favorites-summary .section-link {
  padding: 0;
  color: var(--muted);
}

.favorite-grid {
  padding-top: 2px;
}

.favorite-item {
  position: relative;
  min-width: 0;
}

.favorite-link {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.favorite-poster {
  position: relative;
  display: block;
  overflow: hidden;
  width: 100%;
  aspect-ratio: 3 / 4;
  background: var(--panel);
  border: 1px solid var(--line-soft);
  border-radius: 15px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.22);
}

.favorite-poster::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 56%, rgba(0, 0, 0, 0.55));
  pointer-events: none;
}

.favorite-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.55s var(--ease-out);
}

.favorite-item:hover .favorite-poster img {
  transform: scale(1.045);
}

.favorite-copy {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 8px 2px 0;
}

.favorite-copy strong {
  overflow: hidden;
  color: var(--text);
  font-size: var(--fs-sm);
  font-weight: 700;
  letter-spacing: -0.01em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.favorite-meta {
  overflow: hidden;
  color: var(--text-dim);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.favorite-stats {
  overflow: hidden;
  color: var(--muted-dim);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fav-remove {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 27px;
  height: 27px;
  color: var(--text);
  background: rgba(8, 8, 10, 0.58);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 50%;
  backdrop-filter: blur(8px);
  transition: background 0.2s, transform 0.2s;
}

.fav-remove:hover {
  background: rgba(255, 160, 172, 0.18);
}

.fav-remove:active {
  transform: scale(0.9);
}

.history-list {
  padding: 2px var(--page-gutter) 0;
}

.history-row {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line-soft);
}

.history-row:last-child {
  border-bottom: 0;
}

.history-thumb {
  position: relative;
  flex: 0 0 64px;
  width: 64px;
  height: 86px;
  overflow: hidden;
  background: var(--panel);
  border-radius: 11px;
}

.history-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.history-play {
  position: absolute;
  right: 5px;
  bottom: 5px;
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.9);
  border-radius: 50%;
}

.history-copy {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
  gap: 4px;
}

.history-copy strong {
  overflow: hidden;
  color: var(--text);
  font-size: var(--fs-base);
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.history-copy > span {
  overflow: hidden;
  color: var(--muted);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.history-copy em {
  overflow: hidden;
  color: var(--text-dim);
  font-size: 9.5px;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.history-copy em span {
  color: var(--muted-dim);
}


.history-action {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 1px;
  color: var(--muted);
  font-size: 9px;
  white-space: nowrap;
}

/* ── Profile ──────────────────────────────────────────────── */
.profile-page {
  padding-top: calc(var(--safe-top) + 12px);
}

.profile-hero {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 17px var(--page-gutter) 2px;
}

.profile-avatar-wrap {
  position: relative;
  flex: 0 0 auto;
}

.profile-online {
  position: absolute;
  right: 1px;
  bottom: 1px;
  width: 15px;
  height: 15px;
  background: var(--green);
  border: 3px solid var(--ink);
  border-radius: 50%;
  box-shadow: 0 0 10px rgba(139, 216, 176, 0.35);
}

.profile-identity {
  flex: 1;
  min-width: 0;
}

.profile-identity h2 {
  overflow: hidden;
  color: var(--text);
  font-size: var(--fs-xl);
  font-weight: 800;
  letter-spacing: -0.04em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-identity p {
  overflow: hidden;
  margin-top: 3px;
  color: var(--muted);
  font-size: var(--fs-caption);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wallet-card {
  position: relative;
  margin: 20px var(--page-gutter) 0;
  padding: 17px 17px 16px;
  overflow: hidden;
  background:
    radial-gradient(80% 110% at 96% 0%, rgba(255, 158, 180, 0.2), transparent 54%),
    linear-gradient(135deg, #211A20 0%, #17151B 54%, #15151A 100%);
  border: 1px solid rgba(255, 158, 180, 0.18);
  border-radius: 21px;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.25), inset 0 1px rgba(255, 255, 255, 0.05);
}

.wallet-glow {
  position: absolute;
  top: -54px;
  right: -34px;
  width: 150px;
  height: 150px;
  border: 1px solid rgba(255, 209, 138, 0.16);
  border-radius: 50%;
  box-shadow: inset 0 0 50px rgba(255, 209, 138, 0.06);
  pointer-events: none;
}

.wallet-top {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.wallet-label {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-dim);
  font-size: var(--fs-caption);
  font-weight: 600;
}

.wallet-label svg {
  color: var(--gold);
}

.wallet-value {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-top: 6px;
}

.wallet-value strong {
  color: #fff;
  font-size: 36px;
  font-weight: 800;
  letter-spacing: -0.055em;
  line-height: 1.08;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 2px 18px rgba(255, 209, 138, 0.1);
}

.wallet-value > span {
  color: var(--muted);
  font-size: var(--fs-caption);
}

.wallet-bottom {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 13px;
}

.wallet-bottom p {
  max-width: 215px;
  color: var(--muted-dim);
  font-size: 9px;
  line-height: 1.45;
}

.wallet-bottom .btn {
  min-height: 32px;
  padding: 0 12px;
  font-size: 9.5px;
}

.premium-card {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  width: calc(100% - var(--page-gutter) * 2);
  margin: 12px var(--page-gutter) 0;
  padding: 17px;
  overflow: hidden;
  text-align: left;
  background:
    radial-gradient(80% 100% at 0% 100%, rgba(154, 123, 255, 0.17), transparent 62%),
    linear-gradient(134deg, #221D25 0%, #17151A 100%);
  border: 1px solid var(--line);
  border-radius: 19px;
  transition: border-color 0.2s, transform 0.2s var(--ease-out);
}

.premium-card:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 158, 180, 0.25);
}

.premium-shine {
  position: absolute;
  top: -40px;
  right: 24px;
  width: 120px;
  height: 120px;
  background: radial-gradient(circle, rgba(255, 158, 180, 0.1), transparent 65%);
  pointer-events: none;
}

.premium-copy {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.premium-kicker {
  color: var(--pink);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.16em;
}

.premium-copy strong {
  color: var(--text);
  font-size: var(--fs-md);
  font-weight: 800;
  letter-spacing: -0.025em;
}

.premium-copy > span:last-child {
  color: var(--muted);
  font-size: 9px;
}

.premium-cta {
  position: relative;
  z-index: 1;
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 2px;
  color: var(--text);
  font-size: 9px;
  font-weight: 600;
  white-space: nowrap;
}

.ai-hub {
  margin-top: 27px;
}

.ai-hub-head {
  padding-bottom: 11px;
}

.ai-entry-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 0 var(--page-gutter);
}

.ai-entry {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 176px;
  padding: 14px;
  overflow: hidden;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  transition: transform 0.22s var(--ease-out), border-color 0.2s;
}

.ai-entry:hover {
  transform: translateY(-2px);
  border-color: var(--line-strong);
}

.ai-entry::after {
  content: "";
  position: absolute;
  right: -30px;
  bottom: -50px;
  width: 130px;
  height: 130px;
  border: 1px solid rgba(255, 158, 180, 0.13);
  border-radius: 50%;
  box-shadow: inset 0 0 42px rgba(255, 158, 180, 0.05);
  pointer-events: none;
}

.ai-entry-video::after {
  border-color: rgba(122, 169, 255, 0.13);
  box-shadow: inset 0 0 42px rgba(122, 169, 255, 0.05);
}

.ai-entry-icon {
  display: grid;
  place-items: center;
  width: 39px;
  height: 39px;
  margin-bottom: 16px;
  color: var(--pink);
  background: var(--pink-wash);
  border: 1px solid rgba(255, 158, 180, 0.17);
  border-radius: 13px;
}

.ai-entry-video .ai-entry-icon {
  color: #9CC7FF;
  background: rgba(122, 169, 255, 0.09);
  border-color: rgba(122, 169, 255, 0.17);
}

.ai-entry-kicker {
  color: var(--muted-dim);
  font-size: 7px;
  font-weight: 700;
  letter-spacing: 0.15em;
}

.ai-entry strong {
  margin-top: 4px;
  color: var(--text);
  font-size: var(--fs-lg);
  font-weight: 800;
  letter-spacing: -0.03em;
}

.ai-entry-desc {
  margin-top: 4px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.45;
}

.ai-entry-link {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  margin-top: auto;
  padding-top: 14px;
  color: var(--text-dim);
  font-size: 9px;
  font-weight: 600;
}

.ai-coin-entry {
  display: flex;
  align-items: center;
  gap: 11px;
  margin: 10px var(--page-gutter) 0;
  padding: 13px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  transition: border-color 0.2s, background 0.2s;
}

.ai-coin-entry:hover {
  background: var(--panel-raised);
  border-color: var(--line-strong);
}

.ai-coin-icon {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 38px;
  height: 38px;
  color: var(--gold);
  background: rgba(255, 209, 138, 0.08);
  border: 1px solid rgba(255, 209, 138, 0.18);
  border-radius: 12px;
}

.ai-coin-entry .flex-1 {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.ai-coin-entry strong {
  color: var(--text);
  font-size: var(--fs-sm);
}

.ai-coin-entry .flex-1 span {
  overflow: hidden;
  color: var(--muted);
  font-size: 8.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ai-coin-entry .tag {
  flex: 0 0 auto;
  font-variant-numeric: tabular-nums;
}

.profile-menu {
  margin: 24px var(--page-gutter) 0;
  overflow: hidden;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}

.profile-menu-row {
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 60px;
  padding: 10px 13px;
  border-bottom: 1px solid var(--line-soft);
  transition: background 0.2s;
}

.profile-menu-row:last-child {
  border-bottom: 0;
}

.profile-menu-row:hover {
  background: rgba(255, 255, 255, 0.025);
}

.menu-icon {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 33px;
  height: 33px;
  color: var(--pink);
  background: var(--pink-wash);
  border-radius: 10px;
}

.profile-menu-row .flex-1 {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.profile-menu-row strong {
  color: var(--text);
  font-size: var(--fs-caption);
  font-weight: 600;
}

.profile-menu-row small {
  color: var(--muted-dim);
  font-size: 8.5px;
}

.menu-count {
  min-width: 20px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 10px;
  text-align: right;
}

.profile-menu-row > svg {
  color: var(--muted-dim);
}

.profile-about {
  margin: 24px var(--page-gutter) 0;
  padding-top: 16px;
  border-top: 1px solid var(--line-soft);
}

.profile-about-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-size: 9px;
}

.profile-about-head > span {
  color: var(--text-dim);
  font-weight: 600;
}

.profile-about-head a {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  color: var(--pink);
  font-size: 9px;
}

.source-note {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 9px;
  color: var(--muted-dim);
  font-size: 8.5px;
  line-height: 1.5;
}

.version {
  margin-top: 10px;
  color: var(--muted-dim);
  font-size: 8.5px;
  letter-spacing: 0.02em;
}

.benefit-list {
  display: grid;
  gap: 12px;
}

.benefit-row {
  display: flex;
  gap: 10px;
}

.benefit-check {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 25px;
  height: 25px;
  color: var(--pink);
  background: var(--pink-wash);
  border-radius: 8px;
}

.benefit-row strong {
  color: var(--text);
  font-size: var(--fs-sm);
}

.benefit-row p {
  margin-top: 1px;
  color: var(--muted);
  font-size: 10px;
}

.setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 0;
  border-bottom: 1px solid var(--line-soft);
  font-size: var(--fs-sm);
}

.setting-row:last-of-type {
  border-bottom: 0;
}

.setting-row span {
  color: var(--muted);
}

.setting-row strong {
  color: var(--text);
}

/* ── Drama detail ─────────────────────────────────────────── */
.detail-page {
  position: relative;
  min-height: 100%;
  padding-bottom: calc(28px + var(--safe-bottom));
  background: var(--ink);
}

.detail-hero {
  position: relative;
  height: 390px;
  overflow: hidden;
  background: var(--panel);
}

.detail-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 24%;
  filter: saturate(0.9) contrast(1.03);
}

.detail-cover-shade {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(70% 45% at 90% 10%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 65%),
    linear-gradient(180deg, rgba(11, 11, 13, 0.18) 0%, rgba(11, 11, 13, 0) 38%, rgba(11, 11, 13, 0.55) 70%, var(--ink) 100%);
}

.detail-topbar {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: calc(var(--safe-top) + 12px) var(--page-gutter) 10px;
  background: linear-gradient(180deg, rgba(6, 6, 8, 0.55), transparent);
}

.detail-top-actions {
  display: flex;
  gap: 8px;
}

.favorite-toggle.is-favorite {
  color: var(--pink);
  background: rgba(255, 158, 180, 0.13);
  border-color: rgba(255, 158, 180, 0.3);
}

.detail-hero-meta {
  position: absolute;
  right: 18px;
  bottom: 48px;
  left: 18px;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 7px;
}

.detail-rating {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
  color: var(--gold);
  font-size: var(--fs-caption);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.detail-body {
  position: relative;
  z-index: 2;
  margin-top: -26px;
  padding: 0 var(--page-gutter);
}

.detail-body > .kicker {
  display: block;
  margin-bottom: 6px;
}

.detail-body > h1 {
  max-width: 360px;
  color: #fff;
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.05em;
  line-height: 1.08;
}

.detail-tagline {
  margin-top: 8px;
  color: var(--text-dim);
  font-size: var(--fs-base);
  line-height: 1.55;
}

.detail-meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  margin-top: 12px;
  color: var(--muted);
  font-size: var(--fs-caption);
  font-variant-numeric: tabular-nums;
}

.detail-meta-row i {
  width: 2px;
  height: 2px;
  background: var(--muted-dim);
  border-radius: 50%;
}

.detail-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  margin-top: 19px;
  overflow: hidden;
  background: var(--line-soft);
  border: 1px solid var(--line-soft);
  border-radius: 13px;
}

.detail-stats > div {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 11px 6px;
  background: var(--panel);
}

.detail-stats strong {
  color: var(--text);
  font-size: var(--fs-lg);
  font-weight: 800;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}

.detail-stats span {
  color: var(--muted-dim);
  font-size: 8px;
}

.detail-actions {
  display: flex;
  gap: 9px;
  margin-top: 16px;
}

.detail-actions .btn-primary {
  min-width: 0;
}

.detail-actions .btn-ghost {
  flex: 0 0 auto;
  padding: 0 14px;
}

.detail-actions .btn-ghost span {
  font-size: var(--fs-caption);
}

.detail-section {
  margin-top: 27px;
}

.detail-section-head {
  padding: 0 0 10px;
}

.detail-section-head .section-title::before {
  height: 15px;
}

.detail-section-head .section-head {
  padding-right: 0;
  padding-left: 0;
}

.detail-summary p {
  color: var(--text-dim);
  font-size: var(--fs-base);
  line-height: 1.78;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 13px;
}

.episode-hint {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--muted-dim);
  font-size: 8.5px;
}

.episode-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.episode-cell {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  min-height: 46px;
  color: var(--text-dim);
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 9px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  transition: color 0.18s, border-color 0.18s, background 0.18s;
}

.episode-cell:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--line-strong);
}

.episode-cell small {
  color: var(--pink);
  font-family: var(--font-sans);
  font-size: 6.5px;
  font-weight: 600;
  line-height: 1;
}

.episode-cell.is-current {
  color: var(--pink);
  background: var(--pink-wash);
  border-color: rgba(255, 158, 180, 0.48);
  box-shadow: 0 0 18px rgba(255, 158, 180, 0.07);
}

.detail-disclaimer {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin-top: 26px;
  padding: 11px 12px;
  color: var(--muted-dim);
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  font-size: 8px;
  line-height: 1.55;
}

.detail-disclaimer svg {
  flex: 0 0 auto;
  margin-top: 1px;
}

/* ── Player ───────────────────────────────────────────────── */
.player-page {
  height: 100%;
  min-height: 100%;
  background: #030304;
}

.player-stage {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 560px;
  overflow: hidden;
  background: #030304;
}

.player-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #030304;
}

.player-vignette {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(180deg, rgba(2, 2, 3, 0.72) 0%, transparent 25%, transparent 52%, rgba(2, 2, 3, 0.94) 100%),
    linear-gradient(90deg, rgba(2, 2, 3, 0.26), transparent 20%, transparent 80%, rgba(2, 2, 3, 0.26));
  pointer-events: none;
}

.player-topbar {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: calc(var(--safe-top) + 13px) var(--page-gutter) 12px;
}

.player-round-btn {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 38px;
  height: 38px;
  color: var(--text);
  background: rgba(10, 10, 12, 0.46);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 50%;
  backdrop-filter: blur(12px);
  transition: background 0.2s, transform 0.18s;
}

.player-round-btn:hover {
  background: rgba(255, 255, 255, 0.12);
}

.player-round-btn:active {
  transform: scale(0.92);
}

.player-round-btn.is-favorite {
  color: var(--pink);
  background: rgba(255, 158, 180, 0.14);
  border-color: rgba(255, 158, 180, 0.32);
}

.player-round-btn.is-muted {
  color: var(--muted);
}

.player-top-copy {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
  gap: 2px;
}

.player-top-copy span {
  color: var(--pink);
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.08em;
}

.player-top-copy strong {
  overflow: hidden;
  color: var(--text);
  font-size: var(--fs-base);
  font-weight: 700;
  text-overflow: ellipsis;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.55);
  white-space: nowrap;
}

.player-sample-badge {
  position: absolute;
  top: calc(var(--safe-top) + 72px);
  left: var(--page-gutter);
  z-index: 5;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 8px;
  color: rgba(247, 247, 245, 0.7);
  background: rgba(5, 5, 7, 0.38);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-pill);
  font-size: 8px;
  backdrop-filter: blur(8px);
}

.sample-dot {
  width: 5px;
  height: 5px;
  background: var(--pink);
  border-radius: 50%;
  box-shadow: 0 0 8px rgba(255, 158, 180, 0.6);
}

.player-big-play {
  position: absolute;
  top: 44%;
  left: 50%;
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  transform: translate(-50%, -50%);
  color: #fff;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.45);
  transition: opacity 0.25s, transform 0.25s;
}

.player-big-play::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 70px;
  height: 70px;
  transform: translate(-50%, -60%);
  background: rgba(10, 10, 12, 0.44);
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 50%;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(12px);
  transition: background 0.2s, transform 0.25s;
}

.player-big-play:hover::before {
  background: rgba(255, 158, 180, 0.24);
  transform: translate(-50%, -60%) scale(1.05);
}

.player-big-play svg,
.player-big-play span {
  position: relative;
  z-index: 1;
}

.player-big-play span {
  margin-top: 8px;
  color: rgba(255, 255, 255, 0.76);
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0.06em;
}

.player-page.is-playing .player-big-play {
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -50%) scale(0.9);
}

.player-buffering {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 6;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  transform: translate(-50%, -50%);
  color: var(--text);
  background: rgba(5, 5, 7, 0.62);
  border-radius: var(--radius-pill);
  font-size: 9px;
  backdrop-filter: blur(8px);
}

.spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 1.5px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.spinner.large {
  width: 18px;
  height: 18px;
}

.player-error {
  position: absolute;
  top: 44%;
  left: 50%;
  z-index: 7;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  width: 280px;
  padding: 18px;
  transform: translate(-50%, -50%);
  color: var(--text);
  background: rgba(15, 15, 18, 0.92);
  border: 1px solid var(--line-strong);
  border-radius: 17px;
  text-align: center;
  backdrop-filter: blur(12px);
}

.player-error svg {
  color: var(--error);
}

.player-error strong {
  font-size: var(--fs-sm);
}

.player-error span {
  color: var(--muted);
  font-size: 9px;
  line-height: 1.5;
}

.player-error code {
  color: var(--pink);
  font-family: var(--font-mono);
  font-size: 8px;
}

.player-controls {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 5;
  padding: 68px var(--page-gutter) calc(14px + var(--safe-bottom));
  background: linear-gradient(180deg, transparent, rgba(2, 2, 3, 0.8) 28%, rgba(2, 2, 3, 0.96) 100%);
}

.player-info .tag {
  min-height: 20px;
  padding: 0 7px;
  font-size: 8px;
}

.player-info h1 {
  margin-top: 7px;
  color: #fff;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 1.1;
}

.player-info p {
  overflow: hidden;
  margin-top: 4px;
  color: rgba(247, 247, 245, 0.7);
  font-size: 9.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.player-progress-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 17px;
}

.player-time {
  flex: 0 0 32px;
  color: rgba(247, 247, 245, 0.65);
  font-family: var(--font-mono);
  font-size: 8px;
  font-variant-numeric: tabular-nums;
  text-align: center;
}

.player-range {
  flex: 1;
  width: 100%;
  height: 18px;
  padding: 0;
  background: transparent;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
}

.player-range::-webkit-slider-runnable-track {
  height: 3px;
  background: rgba(255, 255, 255, 0.18);
  border-radius: var(--radius-pill);
}

.player-range::-moz-range-track {
  height: 3px;
  background: rgba(255, 255, 255, 0.18);
  border-radius: var(--radius-pill);
}

.player-range::-webkit-slider-thumb {
  width: 11px;
  height: 11px;
  margin-top: -4px;
  background: var(--pink);
  border: 2px solid #fff;
  border-radius: 50%;
  box-shadow: 0 0 12px rgba(255, 158, 180, 0.6);
  appearance: none;
  -webkit-appearance: none;
}

.player-range::-moz-range-thumb {
  width: 9px;
  height: 9px;
  background: var(--pink);
  border: 2px solid #fff;
  border-radius: 50%;
  box-shadow: 0 0 12px rgba(255, 158, 180, 0.6);
}

.player-bottom-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 8px;
}

.player-nav-buttons {
  display: flex;
  align-items: center;
  gap: 6px;
}

.player-nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  min-height: 36px;
  padding: 0 10px;
  color: var(--text-dim);
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 10px;
  font-size: 9px;
  font-weight: 600;
  transition: background 0.2s, color 0.2s;
}

.player-nav-btn:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.1);
}

.player-nav-btn.is-disabled {
  opacity: 0.32;
  pointer-events: none;
}

.player-action-buttons {
  display: flex;
  gap: 7px;
}

.player-action-buttons .player-round-btn {
  width: 36px;
  height: 36px;
}

.player-footnote {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 12px;
  color: rgba(247, 247, 245, 0.58);
  font-size: 8.5px;
  line-height: 1.45;
}

.player-footnote svg {
  flex: 0 0 auto;
}

.sheet-episode-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  padding: 2px 0 4px;
}

.sheet-episode-grid .episode-cell {
  min-height: 44px;
  color: var(--text-dim);
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  cursor: pointer;
}

.sheet-episode-grid .episode-cell.is-current {
  color: var(--pink);
  background: var(--pink-wash);
  border-color: rgba(255, 158, 180, 0.46);
}

/* ── AI shared ────────────────────────────────────────────── */
.topbar-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  justify-self: end;
  min-width: 38px;
  height: 24px;
  padding: 0 8px;
  color: var(--pink);
  background: var(--pink-wash);
  border: 1px solid rgba(255, 158, 180, 0.22);
  border-radius: var(--radius-pill);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.ai-page {
  padding-top: 0;
  /* 生图 / 视频 now live in the tab bar, so the page clears the floating nav. */
  padding-bottom: var(--page-bottom-safe);
}

.ai-page .page-topbar {
  margin-bottom: 2px;
}

.ai-hero {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  padding: 20px var(--page-gutter) 22px;
  overflow: hidden;
}

.ai-hero::before {
  content: "";
  position: absolute;
  top: -70px;
  right: -70px;
  width: 230px;
  height: 230px;
  background: radial-gradient(circle, rgba(255, 158, 180, 0.12), transparent 67%);
  border-radius: 50%;
  pointer-events: none;
}

.ai-hero .kicker {
  display: block;
  margin-bottom: 8px;
}

.ai-hero h1 {
  color: var(--text);
  font-size: 27px;
  font-weight: 800;
  letter-spacing: -0.05em;
  line-height: 1.14;
}

.ai-hero p {
  max-width: 280px;
  margin-top: 8px;
  color: var(--muted);
  font-size: var(--fs-caption);
  line-height: 1.55;
}

.ai-orb {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 54px;
  height: 54px;
  margin-bottom: 5px;
  color: var(--pink);
  background:
    radial-gradient(circle at 35% 30%, rgba(255, 255, 255, 0.14), transparent 45%),
    linear-gradient(135deg, rgba(255, 158, 180, 0.2), rgba(154, 123, 255, 0.09));
  border: 1px solid rgba(255, 158, 180, 0.2);
  border-radius: 18px;
  box-shadow: 0 12px 34px rgba(255, 158, 180, 0.12), inset 0 1px rgba(255, 255, 255, 0.08);
}

.video-hero::before {
  background: radial-gradient(circle, rgba(122, 169, 255, 0.13), transparent 67%);
}

.video-orb {
  color: #9CC7FF;
  background:
    radial-gradient(circle at 35% 30%, rgba(255, 255, 255, 0.14), transparent 45%),
    linear-gradient(135deg, rgba(122, 169, 255, 0.18), rgba(154, 123, 255, 0.08));
  border-color: rgba(122, 169, 255, 0.2);
  box-shadow: 0 12px 34px rgba(122, 169, 255, 0.1);
}

.ai-preview-card {
  margin: 0 var(--page-gutter);
  padding: 13px;
  background: linear-gradient(180deg, #161619, #111114);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: 0 22px 54px rgba(0, 0, 0, 0.27);
}

.ai-preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 9px;
  margin-bottom: 12px;
}

.ai-preview-head > span:first-child {
  color: var(--text-dim);
  font-size: var(--fs-caption);
  font-weight: 700;
}

.ai-preview-stage {
  display: flex;
  justify-content: center;
  min-height: 280px;
  padding: 4px;
}

.ai-preview-frame {
  position: relative;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  background: #0A0A0C;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 15px;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.28);
  transition: max-width 0.28s var(--ease-out), aspect-ratio 0.28s var(--ease-out);
}

.ai-preview-frame.size-1-1 {
  max-width: 340px;
  aspect-ratio: 1 / 1;
}

.ai-preview-frame.size-3-4 {
  max-width: 296px;
  aspect-ratio: 3 / 4;
}

.ai-preview-frame.size-9-16 {
  max-width: 248px;
  aspect-ratio: 9 / 16;
}

.ai-preview-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: filter 0.5s, transform 0.8s;
}

.ai-preview-frame[data-size="1:1"] .ai-preview-img {
  object-position: center 34%;
}

.filter-cinematic {
  filter: contrast(1.1) saturate(0.82) sepia(0.06);
}

.filter-japanese {
  filter: brightness(1.08) saturate(0.78) hue-rotate(-8deg);
}

.filter-cyber {
  filter: contrast(1.15) saturate(1.42) hue-rotate(8deg);
}

.filter-ink {
  filter: grayscale(1) contrast(1.2) brightness(0.92);
}

.filter-film {
  filter: sepia(0.34) contrast(1.06) saturate(0.78) brightness(0.95);
}

.ai-preview-tint {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(255, 158, 180, 0.03), transparent 35%),
    linear-gradient(0deg, rgba(4, 4, 6, 0.82), transparent 48%),
    radial-gradient(90% 80% at 75% 10%, rgba(255, 158, 180, 0.11), transparent 60%);
  pointer-events: none;
}

.ai-scanline {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  z-index: 3;
  height: 30%;
  background: linear-gradient(180deg, transparent, rgba(255, 158, 180, 0.13), rgba(255, 255, 255, 0.24), transparent);
  filter: blur(1px);
  animation: scan 1.8s ease-in-out infinite;
  pointer-events: none;
}

@keyframes scan {
  0% { transform: translateY(-110%); opacity: 0; }
  25% { opacity: 1; }
  80% { opacity: 1; }
  100% { transform: translateY(370%); opacity: 0; }
}

.ai-preview-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 4px;
  padding: 13px;
  pointer-events: none;
}

.ai-preview-overlay p {
  color: rgba(247, 247, 245, 0.5);
  font-size: 9px;
}

.preview-state-chip {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  min-height: 23px;
  padding: 0 8px;
  color: rgba(247, 247, 245, 0.85);
  background: rgba(5, 5, 7, 0.48);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius-pill);
  font-size: 8px;
  font-weight: 600;
  backdrop-filter: blur(8px);
}

.ai-result-card {
  position: absolute;
  right: 12px;
  bottom: 12px;
  left: 12px;
  z-index: 4;
  padding: 10px 11px;
  background: rgba(9, 9, 11, 0.68);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 10px;
  backdrop-filter: blur(12px);
}

.ai-result-card > span {
  color: var(--pink);
  font-size: 7.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.ai-result-card p {
  display: -webkit-box;
  overflow: hidden;
  margin-top: 2px;
  color: rgba(247, 247, 245, 0.82);
  font-size: 9px;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
}

.ai-error-overlay {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  background: rgba(9, 9, 11, 0.74);
  color: var(--error);
  text-align: center;
  backdrop-filter: blur(3px);
}

.ai-error-overlay strong {
  color: var(--text);
  font-size: var(--fs-md);
}

.ai-error-overlay span {
  color: var(--muted);
  font-size: 9px;
}

.ai-preview-corner {
  position: absolute;
  top: 9px;
  right: 9px;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 6px;
  color: rgba(255, 255, 255, 0.5);
  background: rgba(0, 0, 0, 0.35);
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 6.5px;
  letter-spacing: 0.1em;
  backdrop-filter: blur(5px);
}

.ai-preview-corner span {
  width: 4px;
  height: 4px;
  background: var(--pink);
  border-radius: 50%;
}

.ai-status {
  margin-top: 12px;
  padding: 11px 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line-soft);
  border-radius: 12px;
}

.ai-status[data-status="generating"] {
  border-color: rgba(255, 158, 180, 0.2);
  background: rgba(255, 158, 180, 0.035);
}

.ai-status[data-status="success"] {
  border-color: rgba(139, 216, 176, 0.18);
  background: rgba(139, 216, 176, 0.035);
}

.ai-status[data-status="error"] {
  border-color: rgba(255, 160, 172, 0.2);
  background: rgba(255, 160, 172, 0.035);
}

.ai-status-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.ai-status-label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--text);
  font-size: var(--fs-caption);
  font-weight: 700;
}

.ai-status[data-status="success"] .ai-status-label {
  color: var(--green);
}

.ai-status[data-status="error"] .ai-status-label {
  color: var(--error);
}

.ai-status[data-status="generating"] .ai-status-label {
  color: var(--pink);
}

.ai-elapsed {
  color: var(--muted-dim);
  font-family: var(--font-mono);
  font-size: 8px;
  font-variant-numeric: tabular-nums;
}

.ai-status > p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.45;
}

.ai-status .indeterminate {
  margin-top: 9px;
}

.ai-steps {
  display: flex;
  gap: 0;
  margin-top: 10px;
}

.ai-steps li {
  display: flex;
  flex: 1;
  align-items: center;
  gap: 5px;
  color: var(--muted-dim);
  font-size: 7.5px;
}

.ai-steps li::after {
  content: "";
  flex: 1;
  height: 1px;
  margin: 0 5px;
  background: rgba(255, 255, 255, 0.08);
}

.ai-steps li:last-child::after {
  display: none;
}

.ai-steps li span {
  display: grid;
  place-items: center;
  width: 16px;
  height: 16px;
  color: var(--muted-dim);
  background: rgba(255, 255, 255, 0.06);
  border-radius: 50%;
  font-size: 7px;
}

.ai-steps li[data-state="active"] {
  color: var(--pink);
}

.ai-steps li[data-state="active"] span {
  color: var(--ink);
  background: var(--pink);
  box-shadow: 0 0 10px rgba(255, 158, 180, 0.35);
}

.ai-steps li[data-state="done"] {
  color: var(--text-dim);
}

.ai-steps li[data-state="done"] span {
  color: var(--ink);
  background: var(--green);
}

.ai-steps li[data-state="failed"] {
  color: var(--error);
}

.ai-steps li[data-state="failed"] span {
  color: var(--ink);
  background: var(--error);
}

.ai-cancel {
  margin-top: 9px;
  min-height: 30px;
  font-size: 9px;
}

.ai-form {
  margin-top: 22px;
  padding: 0 var(--page-gutter);
}

.ai-field {
  padding: 16px 0 17px;
  border-top: 1px solid var(--line-soft);
}

.ai-field-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 11px;
}

.ai-field-head h2 {
  color: var(--text);
  font-size: var(--fs-md);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.ai-field-head p {
  max-width: 290px;
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.45;
}

.upload-btn {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 4px;
  min-height: 30px;
  padding: 0 9px;
  color: var(--text-dim);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 8.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.upload-btn:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.09);
}

.upload-btn.is-selected {
  color: var(--pink);
  background: var(--pink-wash);
  border-color: rgba(255, 158, 180, 0.28);
}

.sample-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.sample-option {
  position: relative;
  overflow: hidden;
  aspect-ratio: 1.15;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  transition: border-color 0.2s, transform 0.2s;
}

.sample-option:hover {
  transform: translateY(-1px);
}

.sample-option img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.85);
  transition: filter 0.2s, transform 0.3s;
}

.sample-option span {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  padding: 16px 6px 5px;
  color: rgba(255, 255, 255, 0.82);
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.72));
  font-size: 7.5px;
  font-weight: 600;
  text-align: left;
}

.sample-option.is-selected {
  border-color: var(--pink);
  box-shadow: 0 0 0 2px rgba(255, 158, 180, 0.11);
}

.sample-option.is-selected::after {
  content: "✓";
  position: absolute;
  top: 5px;
  right: 5px;
  display: grid;
  place-items: center;
  width: 17px;
  height: 17px;
  color: var(--ink);
  background: var(--pink);
  border-radius: 50%;
  font-size: 9px;
  font-weight: 900;
}

.sample-option.is-selected img {
  filter: saturate(1);
}

.ai-upload-note,
.ai-selection-note {
  margin-top: 7px;
  color: var(--muted-dim);
  font-size: 8px;
  line-height: 1.4;
}

.ai-chip-row {
  padding: 0;
  flex-wrap: wrap;
  overflow: visible;
}

.ai-chip-row .chip {
  min-height: 32px;
  font-size: 10px;
}

.ai-size-row {
  grid-auto-columns: 1fr;
}

.ai-size-row button {
  flex-direction: column;
  gap: 2px;
  min-height: 48px;
  font-size: 11px;
}

.ai-size-row button small {
  color: var(--muted-dim);
  font-size: 6.5px;
  font-weight: 500;
}

.ai-size-row button.is-active small {
  color: rgba(247, 247, 245, 0.6);
}

.prompt-count {
  flex: 0 0 auto;
  color: var(--muted-dim);
  font-family: var(--font-mono);
  font-size: 8px;
  font-variant-numeric: tabular-nums;
}

.prompt-box {
  width: 100%;
  min-height: 104px;
  padding: 12px;
  resize: vertical;
  color: var(--text);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 11px;
  outline: 0;
  font-size: var(--fs-base);
  line-height: 1.65;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.prompt-box:focus {
  border-color: rgba(255, 158, 180, 0.48);
  box-shadow: 0 0 0 3px rgba(255, 158, 180, 0.07);
}

.prompt-box::placeholder {
  color: var(--muted-dim);
}

.ai-help {
  display: flex;
  gap: 5px;
  margin-top: 7px;
  color: var(--muted-dim);
  font-size: 8px;
  line-height: 1.5;
}

.ai-form-actions {
  margin-top: 8px;
  padding-bottom: 8px;
}

.ai-form-actions .btn {
  min-height: 50px;
}

.ai-form-actions > p {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin-top: 9px;
  color: var(--muted-dim);
  font-size: 8px;
  text-align: center;
}

/* ── AI video ─────────────────────────────────────────────── */
.video-preview-card {
  padding-bottom: 12px;
}

.video-preview-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #08080A;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
}

.video-preview-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  animation: kenburns 18s ease-in-out infinite alternate;
}

@keyframes kenburns {
  from { transform: scale(1.02) translate3d(0, 0, 0); }
  to { transform: scale(1.13) translate3d(-1.5%, -1.2%, 0); }
}

.video-preview-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(4, 4, 6, 0.68), transparent 33%, transparent 55%, rgba(4, 4, 6, 0.66)),
    radial-gradient(80% 100% at 40% 50%, transparent 30%, rgba(4, 4, 6, 0.3) 100%);
  pointer-events: none;
}

.video-topline {
  position: absolute;
  top: 9px;
  right: 10px;
  left: 10px;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: rgba(255, 255, 255, 0.54);
  font-family: var(--font-mono);
  font-size: 6.5px;
  letter-spacing: 0.06em;
}

.video-rec {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 6px;
  background: rgba(0, 0, 0, 0.35);
  border-radius: 4px;
  backdrop-filter: blur(5px);
}

.video-rec i {
  width: 4px;
  height: 4px;
  background: var(--error);
  border-radius: 50%;
  box-shadow: 0 0 6px var(--error);
}

.video-center-state {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  width: 72%;
  transform: translate(-50%, -50%);
  color: var(--text);
  text-align: center;
}

.video-play-ring {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin-bottom: 4px;
  color: #fff;
  background: rgba(8, 8, 10, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 50%;
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.24);
}

.video-center-state strong {
  font-size: var(--fs-sm);
  font-weight: 700;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.5);
}

.video-center-state > span:last-child {
  color: rgba(247, 247, 245, 0.58);
  font-size: 8px;
  line-height: 1.45;
}

.video-center-state.is-success .video-play-ring {
  color: var(--ink);
  background: var(--pink);
  border-color: var(--pink);
}

.video-scan {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 2;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--pink), transparent);
  filter: drop-shadow(0 0 6px var(--pink));
  animation: video-scan 1.8s ease-in-out infinite;
}

@keyframes video-scan {
  0% { transform: translateY(-238px); opacity: 0; }
  20% { opacity: 1; }
  80% { opacity: 1; }
  100% { transform: translateY(0); opacity: 0; }
}

.video-progress-line {
  position: absolute;
  right: 14px;
  bottom: 10px;
  left: 14px;
  z-index: 4;
  height: 2px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.17);
  border-radius: 2px;
}

.video-progress-line i {
  display: block;
  width: 38%;
  height: 100%;
  background: var(--pink);
  border-radius: 2px;
  animation: video-progress 1.7s ease-in-out infinite;
}

@keyframes video-progress {
  0% { transform: translateX(-110%); }
  100% { transform: translateX(320%); }
}

.video-preview-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 9px;
  margin-top: 8px;
  color: var(--muted-dim);
  font-size: 7.5px;
}

.video-preview-foot > span:first-child {
  display: flex;
  align-items: center;
  gap: 4px;
}

.video-preview-foot > span:last-child {
  flex: 0 0 auto;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 7px;
}

.video-status {
  margin-top: 10px;
}

.video-eta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  margin-top: 7px;
  padding: 7px 8px;
  color: var(--text-dim);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  font-size: 7.5px;
}

.video-eta > span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.video-eta > span:first-child {
  color: var(--pink);
  font-weight: 600;
}

.video-eta > span:last-child {
  color: var(--muted-dim);
}

.resolution-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.resolution-option {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  min-height: 78px;
  padding: 10px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 11px;
  transition: border-color 0.2s, background 0.2s;
}

.resolution-option:hover {
  background: var(--panel-raised);
}

.resolution-option.is-selected {
  background: rgba(255, 158, 180, 0.06);
  border-color: rgba(255, 158, 180, 0.42);
}

.resolution-icon {
  display: grid;
  place-items: center;
  width: 27px;
  height: 27px;
  margin-bottom: 3px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.06);
  border-radius: 8px;
}

.resolution-option.is-selected .resolution-icon {
  color: var(--pink);
  background: var(--pink-wash);
}

.resolution-option strong {
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
}

.resolution-option > span:last-child {
  color: var(--muted-dim);
  font-size: 8px;
}

.duration-value {
  color: var(--muted);
  font-size: 9px;
}

.duration-value strong {
  color: var(--pink);
  font-family: var(--font-mono);
  font-size: 17px;
  font-weight: 700;
}

.duration-row {
  display: flex;
  align-items: center;
  gap: 9px;
}

.duration-row > span {
  flex: 0 0 auto;
  color: var(--muted-dim);
  font-family: var(--font-mono);
  font-size: 8px;
}

.duration-range {
  flex: 1;
  width: 100%;
  height: 20px;
  padding: 0;
  background: transparent;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
}

.duration-range::-webkit-slider-runnable-track {
  height: 3px;
  background: linear-gradient(90deg, var(--pink) 0%, var(--pink) 44%, rgba(255, 255, 255, 0.12) 44%);
  border-radius: 3px;
}

.duration-range::-moz-range-track {
  height: 3px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 3px;
}

.duration-range::-moz-range-progress {
  height: 3px;
  background: var(--pink);
  border-radius: 3px;
}

.duration-range::-webkit-slider-thumb {
  width: 13px;
  height: 13px;
  margin-top: -5px;
  background: var(--pink);
  border: 2px solid #fff;
  border-radius: 50%;
  box-shadow: 0 0 9px rgba(255, 158, 180, 0.5);
  appearance: none;
  -webkit-appearance: none;
}

.duration-range::-moz-range-thumb {
  width: 11px;
  height: 11px;
  background: var(--pink);
  border: 2px solid #fff;
  border-radius: 50%;
}

.fixed-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 11px;
}

.fixed-option > span:first-child {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--text);
  font-family: var(--font-mono);
  font-size: var(--fs-caption);
  font-weight: 600;
}

.fixed-option > span:first-child svg {
  color: var(--muted);
}

/* ── Coins ────────────────────────────────────────────────── */
.coins-page {
  padding-top: 0;
  padding-bottom: calc(22px + var(--safe-bottom));
}

.balance-card {
  position: relative;
  margin: 10px var(--page-gutter) 0;
  padding: 18px;
  overflow: hidden;
  background:
    radial-gradient(110% 130% at 100% 0%, rgba(255, 209, 138, 0.19), transparent 52%),
    radial-gradient(80% 90% at 0% 100%, rgba(255, 158, 180, 0.1), transparent 60%),
    linear-gradient(135deg, #221D1B 0%, #17161A 54%, #15151A 100%);
  border: 1px solid rgba(255, 209, 138, 0.2);
  border-radius: 23px;
  box-shadow: 0 22px 54px rgba(0, 0, 0, 0.28), inset 0 1px rgba(255, 255, 255, 0.05);
}

.balance-orbit {
  position: absolute;
  top: -42px;
  right: -30px;
  display: grid;
  place-items: center;
  width: 145px;
  height: 145px;
  color: rgba(255, 209, 138, 0.2);
  border: 1px solid rgba(255, 209, 138, 0.15);
  border-radius: 50%;
  box-shadow: inset 0 0 55px rgba(255, 209, 138, 0.07);
  pointer-events: none;
}

.balance-orbit::after {
  content: "";
  position: absolute;
  inset: 22px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 50%;
}

.balance-top {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--text-dim);
  font-size: var(--fs-caption);
  font-weight: 600;
}

.balance-number {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: baseline;
  gap: 7px;
  margin-top: 5px;
}

.balance-number strong {
  color: #fff;
  font-size: 42px;
  font-weight: 800;
  letter-spacing: -0.06em;
  line-height: 1.05;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 2px 24px rgba(255, 209, 138, 0.14);
}

.balance-number span {
  color: var(--muted);
  font-size: var(--fs-caption);
}

.balance-note {
  position: relative;
  z-index: 1;
  margin-top: 4px;
  color: var(--muted-dim);
  font-size: 8.5px;
}

.balance-rule {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 19px;
  margin-top: 17px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.balance-rule span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--muted);
  font-size: 8.5px;
}

.balance-rule svg {
  color: var(--gold);
  opacity: 0.7;
}

.payment-notice {
  display: flex;
  gap: 9px;
  margin: 10px var(--page-gutter) 0;
  padding: 11px 12px;
  color: var(--text-dim);
  background: rgba(255, 160, 172, 0.045);
  border: 1px solid rgba(255, 160, 172, 0.15);
  border-radius: 11px;
}

.payment-notice > svg {
  flex: 0 0 auto;
  margin-top: 1px;
  color: var(--error);
}

.payment-notice div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.payment-notice strong {
  color: var(--error);
  font-size: 9.5px;
}

.payment-notice span {
  color: var(--muted);
  font-size: 8.5px;
  line-height: 1.45;
}

.coin-packages-section {
  margin-top: 25px;
}

.package-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 0 var(--page-gutter);
}

.package-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-height: 118px;
  padding: 13px;
  overflow: hidden;
  text-align: left;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 13px;
  transition: border-color 0.2s, background 0.2s, transform 0.2s var(--ease-out);
}

.package-card:hover {
  transform: translateY(-1px);
  border-color: var(--line-strong);
}

.package-card.is-selected {
  background: rgba(255, 158, 180, 0.055);
  border-color: rgba(255, 158, 180, 0.48);
  box-shadow: inset 0 0 0 1px rgba(255, 158, 180, 0.06), 0 10px 24px rgba(0, 0, 0, 0.16);
}

.package-label {
  position: absolute;
  top: 0;
  right: 0;
  padding: 4px 8px;
  color: var(--ink);
  background: var(--pink);
  border-bottom-left-radius: 8px;
  font-size: 7px;
  font-weight: 800;
}

.package-coins {
  color: var(--text);
  font-size: 23px;
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.package-coins small {
  color: var(--muted);
  font-size: 8px;
  font-weight: 500;
  letter-spacing: 0;
}

.package-bonus {
  margin-top: 4px;
  color: var(--gold);
  font-size: 8px;
  font-weight: 600;
}

.package-price {
  margin-top: auto;
  padding-top: 12px;
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
}

.price-disclaimer {
  padding: 9px var(--page-gutter) 0;
  color: var(--muted-dim);
  font-size: 7.5px;
  line-height: 1.5;
}

/* "演示定价，待统一调整" — shown on the coins page and both AI pages. */
.pricing-note,
.ai-price-note {
  display: flex;
  align-items: flex-start;
  gap: 5px;
  margin: 10px var(--page-gutter) 0;
  padding: 8px 10px;
  color: var(--muted);
  background: rgba(255, 158, 180, 0.08);
  border: 1px solid rgba(255, 158, 180, 0.22);
  border-radius: var(--radius-sm);
  font-size: 8px;
  line-height: 1.55;
}

.pricing-note svg,
.ai-price-note svg {
  flex: 0 0 auto;
  margin-top: 1px;
}

.pricing-note b,
.ai-price-note b {
  color: var(--pink);
  font-weight: 700;
}

.ledger-section {
  margin-top: 27px;
}

.transaction-list {
  padding: 0 var(--page-gutter);
}

.transaction-row {
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 58px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line-soft);
}

.transaction-row:last-child {
  border-bottom: 0;
}

.transaction-icon {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
}

.transaction-icon.is-positive {
  color: var(--gold);
  background: rgba(255, 209, 138, 0.08);
}

.transaction-icon.is-negative {
  color: var(--muted);
  background: rgba(255, 255, 255, 0.045);
}

.transaction-copy {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
  gap: 2px;
}

.transaction-copy strong {
  overflow: hidden;
  color: var(--text-dim);
  font-size: var(--fs-caption);
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.transaction-copy span {
  overflow: hidden;
  color: var(--muted-dim);
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.transaction-amount {
  flex: 0 0 auto;
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: var(--fs-caption);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.transaction-amount.is-positive {
  color: var(--gold);
}

.transaction-amount.is-negative {
  color: var(--muted);
}

.coin-checkout {
  position: sticky;
  bottom: calc(8px + var(--safe-bottom));
  z-index: 25;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 24px var(--page-gutter) 0;
  padding: 9px 9px 9px 14px;
  background: rgba(20, 20, 23, 0.92);
  border: 1px solid var(--line-strong);
  border-radius: 17px;
  box-shadow: 0 14px 38px rgba(0, 0, 0, 0.42);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.checkout-summary {
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: 1px;
}

.checkout-summary > span {
  color: var(--muted-dim);
  font-size: 7px;
}

.checkout-summary strong {
  overflow: hidden;
  color: var(--text);
  font-size: var(--fs-caption);
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.checkout-summary small {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 8px;
}

.coin-checkout .btn {
  flex: 0 0 auto;
  min-height: 40px;
  font-size: 10.5px;
}

.coin-footnote {
  display: flex;
  align-items: flex-start;
  gap: 5px;
  margin: 14px var(--page-gutter) 0;
  color: var(--muted-dim);
  font-size: 8.5px;
  line-height: 1.5;
}

.coin-footnote svg {
  flex: 0 0 auto;
  margin-top: 1px;
}

.test-channel-card {
  display: flex;
  gap: 11px;
  padding: 12px;
  background: rgba(255, 160, 172, 0.05);
  border: 1px solid rgba(255, 160, 172, 0.16);
  border-radius: 12px;
}

.test-channel-icon {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 38px;
  height: 38px;
  color: var(--error);
  background: rgba(255, 160, 172, 0.08);
  border-radius: 11px;
}

.test-channel-card strong {
  color: var(--text);
  font-size: var(--fs-caption);
}

.test-channel-card p {
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.5;
}

/* ── Small screens ────────────────────────────────────────── */
@media (max-width: 380px) {
  :root {
    --page-gutter: 14px;
  }

  .hero-carousel {
    height: 278px;
  }

  .hero-content h2 {
    font-size: 24px;
  }

  .hero-actions .btn {
    padding: 0 11px;
  }

  .hero-dots {
    right: 16px;
  }

  .spotlight-card {
    flex-basis: 228px;
    width: 228px;
    height: 144px;
  }

  .drama-card .stats {
    font-size: 8px;
  }

  .grid-3 {
    gap: 16px 9px;
  }

  .episode-grid {
    gap: 6px;
  }

  .detail-body > h1 {
    font-size: 27px;
  }

  .package-coins {
    font-size: 20px;
  }

  .ai-hero h1 {
    font-size: 24px;
  }

  .ai-preview-frame.size-3-4 {
    max-width: 270px;
  }

  .ai-preview-frame.size-9-16 {
    max-width: 226px;
  }

  .player-info h1 {
    font-size: 20px;
  }

  .player-nav-btn {
    padding: 0 8px;
    font-size: 8px;
  }

  .player-action-buttons .player-round-btn {
    width: 33px;
    height: 33px;
  }
}

@media (max-width: 340px) {
  .home-ai-grid,
  .ai-entry-grid {
    grid-template-columns: 1fr;
  }

  .ai-entry {
    min-height: 140px;
  }

  .resolution-options {
    grid-template-columns: 1fr;
  }

  .episode-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* ── Desktop frame adjustments ────────────────────────────── */
@media (min-width: 760px) {
  .phone .brand-mark {
    width: 36px;
    height: 36px;
  }

  .phone .tabbar {
    bottom: 10px;
  }

  .phone .coin-checkout {
    bottom: 10px;
  }
}

/* ── Very tall phones ─────────────────────────────────────── */
@media (max-height: 700px) and (max-width: 759px) {
  .hero-carousel {
    height: 260px;
  }

  .player-controls {
    padding-top: 42px;
  }
}

/* ── Section empty fallbacks ─────────────────────────────── */
.hero-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: var(--muted);
  border-style: dashed;
}

.hero-empty svg {
  color: var(--pink);
  opacity: 0.7;
}

.hero-empty span {
  color: var(--text-dim);
  font-size: var(--fs-sm);
  font-weight: 700;
}

.hero-empty small {
  color: var(--muted-dim);
  font-size: var(--fs-2xs);
}

.section-empty {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 74px;
  padding: 18px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.025);
  border: 1px dashed var(--line);
  border-radius: var(--radius-md);
  font-size: var(--fs-caption);
}

.grid-3 .section-empty,
.rail .section-empty {
  width: 100%;
}
