* { box-sizing: border-box; }
body.site-body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: #f5f5f5;
  color: #333;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.site-icon {
  width: 1.25rem;
  height: 1.25rem;
  flex-shrink: 0;
}
.site-icon--sm {
  width: 1rem;
  height: 1rem;
}
.site-icon--play {
  width: 1.375rem;
  height: 1.375rem;
}

.app-layout {
  min-height: 100vh;
  background: #f5f5f5;
}
.app-layout__main {
  min-height: 100vh;
  width: 100%;
}

/* 移动端顶栏 */
.page-header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  height: 57px;
  padding: 0 16px;
  background: #fff;
  border-bottom: 1px solid #f0f0f0;
}
.page-header__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.page-header__logo-text {
  font-size: 20px;
  font-weight: 700;
  color: #111;
  flex-shrink: 0;
}
.page-header__tagline {
  font-size: 13px;
  color: #666;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* PC 侧边栏 */
.desktop-sidebar {
  display: none;
}

.site-main {
  width: 100%;
  padding: 0 0 72px;
}
.site-main--subpage {
  padding-top: 0;
}

/* 列表页 PC 标题栏 */
.page-title-bar {
  display: none;
}

/* 子页面顶栏 */
.subpage-header {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 46px;
  padding: 0 12px;
  margin: 0 0 12px;
  background: #fff;
  border-bottom: 1px solid #f0f0f0;
  position: sticky;
  top: 57px;
  z-index: 90;
}
.subpage-header--fixed {
  position: sticky;
}
.subpage-header h1 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
}
.subpage-header__back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: none;
  background: none;
  color: #333;
  flex-shrink: 0;
  cursor: pointer;
}

.mobile-tabbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 100;
  display: flex;
  height: 50px;
  background: #fff;
  border-top: 1px solid #eee;
}
.mobile-tabbar__item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  font-size: 11px;
  color: #999;
}
.mobile-tabbar__item.is-active { color: #3b82f6; }
.mobile-tabbar__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  line-height: 1;
}

.home-announcement {
  margin: 0;
  padding: 12px 14px;
  background: #7b8de8;
  color: #fff;
}

.home-announcement__header {
  margin-bottom: 10px;
}

.home-announcement__title-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.home-announcement__title-icon {
  width: 20px;
  height: 20px;
}

.home-announcement__title {
  font-size: 18px;
  font-weight: 700;
}

.home-announcement__item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.home-announcement__item + .home-announcement__item {
  margin-top: 10px;
}

.home-announcement__icon {
  width: 18px;
  height: 18px;
  margin-top: 3px;
  flex-shrink: 0;
}

.home-announcement__content {
  min-width: 0;
}

.home-announcement__link {
  display: inline-block;
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  text-decoration: underline;
}

.home-announcement__link:hover {
  color: #f3f4ff;
}

.home-announcement__desc {
  margin: 4px 0 0;
  font-size: 15px;
  line-height: 1.55;
  color: #fff;
}

.announcement-item--html p {
  margin: 0 0 8px;
}
.announcement-item--html p:last-child {
  margin-bottom: 0;
}
.announcement-item--html a {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.announcement-item--html strong {
  font-weight: 700;
}
.announcement-item--html .ann-badge {
  display: inline-flex;
  align-items: center;
  margin: 0 4px;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.6;
  vertical-align: middle;
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
}
.announcement-item--html .ann-badge--rose { background: rgba(251, 113, 133, 0.35); }
.announcement-item--html .ann-badge--amber { background: rgba(251, 191, 36, 0.35); color: #fef3c7; }
.announcement-item--html .ann-badge--emerald { background: rgba(52, 211, 153, 0.35); }
.announcement-item--html .ann-badge--orange { background: rgba(251, 146, 60, 0.4); }
.announcement-item--html .ann-badge--violet { background: rgba(167, 139, 250, 0.4); }
.announcement-item--html .ann-badge--sky { background: rgba(56, 189, 248, 0.35); }
.announcement-item--html .ann-icon {
  display: inline-block;
  margin: 0 2px;
  font-size: 1.05em;
  vertical-align: middle;
}

.home-page .feed-page {
  margin-top: 0;
}

.home-page .feed-grid {
  margin-top: 0;
}

.feed-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.discover-page {
  padding: 12px 12px 0;
}

.discover-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.discover-card {
  background: #fff;
  border-radius: 14px;
  border: 1px solid #f0f0f0;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
  display: flex;
  flex-direction: column;
}

.discover-card__cover-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 21 / 9;
  overflow: hidden;
  background: #f3f4f6;
}

.discover-card__cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  background: #f0f0f0;
}

.discover-card__cover--placeholder {
  background: linear-gradient(135deg, #f3d4dc, #e8b4c4);
}

.discover-card__watch {
  position: absolute;
  top: 10px;
  right: 10px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 11px;
  line-height: 1;
  white-space: nowrap;
}

.discover-card__watch-icon {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
}

.discover-card__watch-icon svg {
  width: 12px;
  height: 12px;
  display: block;
}

.discover-card__body {
  position: relative;
  padding: 0 14px 14px;
  margin-top: -34px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.discover-card__avatar-wrap {
  position: relative;
  z-index: 1;
}

.discover-card__avatar {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  border: 4px solid #fff;
  object-fit: cover;
  background: #eee;
  display: block;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.discover-card__avatar--placeholder {
  background: #ddd;
}

.discover-card__name-row {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  max-width: 100%;
  margin-top: 8px;
}

.discover-card__name {
  font-size: 16px;
  font-weight: 700;
  color: #111;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.discover-card__verified {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #3b82f6;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  flex-shrink: 0;
}

.discover-card__medal {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fef3c7;
  color: #f59e0b;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  flex-shrink: 0;
}

.discover-card__tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 8px;
}

.discover-card__tag {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 999px;
  background: #f3f4f6;
  color: #6b7280;
  font-size: 11px;
  line-height: 1.2;
  white-space: nowrap;
}

.discover-card__tag--hot {
  background: #fff7ed;
  color: #ea580c;
}

.discover-card__stats {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 18px;
  margin-top: 10px;
}

.discover-card__stat {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #9ca3af;
  font-size: 13px;
  line-height: 1;
}

.discover-card__stat-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.discover-card__stat-icon svg {
  width: 16px;
  height: 16px;
  display: block;
}

.discover-card__stat-number {
  font-size: 13px;
  font-weight: 500;
  color: #6b7280;
}

.discover-card__bio {
  margin: 10px 0 0;
  width: 100%;
  font-size: 13px;
  color: #9ca3af;
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.discover-card__actions {
  display: flex;
  justify-content: center;
  width: 100%;
  margin-top: 12px;
}

.discover-card__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 10px 16px;
  border-radius: 6px;
  border: 1px solid #1a1a1a;
  background: #fff;
  color: #1a1a1a;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
}

.discover-card__btn:hover {
  background: #f9fafb;
}

.post-card {
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
}
.post-card__author { padding: 12px 12px 0; }
.post-card__author-link { display: flex; align-items: center; gap: 10px; }
.post-card__avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  background: #eee;
  flex-shrink: 0;
}
.post-card__avatar--placeholder { display: block; }
.post-card__name { font-size: 14px; font-weight: 600; }
.post-card__handle { font-size: 12px; color: #999; margin-top: 2px; }
.post-card__title {
  margin: 8px 12px 0;
  font-size: 15px;
  line-height: 1.4;
}
.post-card__title-link:hover { color: #3b82f6; }
.post-card__media { position: relative; margin-top: 10px; }
.post-card__video-shell {
  position: relative;
}
.post-card__cover,
.post-card__video {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  display: block;
  background: #eee;
}
.post-card__cover--clickable {
  cursor: pointer;
}
.post-card__cover--placeholder { aspect-ratio: 16 / 10; }
.post-card__play {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  padding: 0;
  background: rgba(0,0,0,.55);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  cursor: pointer;
}
.post-card__badge {
  position: absolute;
  right: 10px;
  bottom: 10px;
  padding: 2px 8px;
  border-radius: 12px;
  background: rgba(0,0,0,.6);
  color: #fff;
  font-size: 12px;
  pointer-events: none;
}

.media-lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.92);
  padding: 16px;
  box-sizing: border-box;
}
.media-lightbox.is-open {
  display: flex;
}
.media-lightbox__stage {
  max-width: min(100%, 1200px);
  max-height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.media-lightbox__image {
  max-width: 100%;
  max-height: calc(100vh - 80px);
  object-fit: contain;
  user-select: none;
}
.media-lightbox__close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}
.media-lightbox__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 64px;
  border: none;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 32px;
  cursor: pointer;
}
.media-lightbox__nav--prev { left: 8px; }
.media-lightbox__nav--next { right: 8px; }
.media-lightbox__counter {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.85);
  font-size: 14px;
}
body.media-lightbox-open {
  overflow: hidden;
}

.video-player-modal {
  position: fixed;
  inset: 0;
  z-index: 1100;
  display: none;
}
.video-player-modal.is-open {
  display: block;
}
.video-player-modal__mask {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
}
.video-player-modal__panel {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(90vw, calc(90vh * 16 / 9));
  max-width: 90vw;
  max-height: 90vh;
  background: #000;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}
.video-player-modal__stage {
  width: 100%;
  max-height: 90vh;
}
.video-player-modal__video {
  width: 100%;
  max-width: 90vw;
  max-height: 90vh;
  aspect-ratio: 16 / 10;
  object-fit: contain;
  display: block;
  background: #000;
}
.video-player-modal__close {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}
body.video-player-modal-open {
  overflow: hidden;
}

body.video-player-modal-open {
  overflow: hidden;
}

.post-card__stats {
  display: flex;
  gap: 16px;
  padding: 10px 12px 12px;
  font-size: 13px;
  color: #666;
}
.post-card__stat {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.feed-empty, .notice__hint {
  text-align: center;
  color: #999;
  font-size: 14px;
  padding: 24px 12px;
}
.notice {
  background: #fff;
  border-radius: 10px;
  padding: 16px;
  margin: 12px 0;
}
.notice--info p { margin: 0 0 8px; }

.pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 20px 12px 28px;
  margin-top: 0;
}

.pagination__arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  font-size: 18px;
  line-height: 1;
  color: #1a1a1a;
  text-decoration: none;
}

a.pagination__arrow:hover {
  opacity: 0.7;
}

.pagination__arrow--disabled {
  color: #d1d5db;
  pointer-events: none;
}

.pagination__page {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 36px;
  padding: 0 6px;
  font-size: 16px;
  line-height: 1;
  color: #1a1a1a;
  text-decoration: none;
}

a.pagination__page:hover {
  opacity: 0.7;
}

.pagination__page--active {
  min-width: 36px;
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 50%;
  background: #1a1a1a;
  color: #7dd3fc;
  font-weight: 500;
}

.pagination__ellipsis {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 36px;
  font-size: 16px;
  line-height: 1;
  color: #666;
  letter-spacing: 1px;
}

.post-detail-page {
  background: #f5f5f5;
}

.post-detail {
  background: #fff;
}

.post-detail__media {
  position: relative;
  width: 100%;
  background: #000;
}

.post-detail__cover,
.post-detail__video {
  width: 100%;
  aspect-ratio: 21 / 9;
  object-fit: cover;
  object-position: center;
  display: block;
  border-radius: 0;
}

.post-detail__unlock {
  display: block;
  width: 100%;
  box-sizing: border-box;
  padding: 10px 16px;
  background: #1e3a8a;
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.4;
  text-align: center;
  text-decoration: none;
  border: none;
  cursor: pointer;
}

.post-detail__gallery {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  aspect-ratio: 21 / 9;
  -webkit-overflow-scrolling: touch;
}

.post-detail__cover--gallery {
  flex: 0 0 100%;
  scroll-snap-align: start;
}

.post-detail__info {
  padding: 16px;
  background: #fff;
}

.post-detail__title {
  margin: 0 0 12px;
  font-size: 18px;
  line-height: 1.4;
  font-weight: 600;
}

.post-detail__author-block {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 14px;
}

.post-detail__author-link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  max-width: 100%;
}

.post-detail__avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  background: #f0f0f0;
  flex-shrink: 0;
}

.post-detail__avatar--placeholder {
  display: block;
}

.post-detail__author-text {
  min-width: 0;
}

.post-detail__name {
  font-weight: 600;
}

.post-detail__handle {
  font-size: 12px;
  color: #999;
  margin-top: 2px;
}

.post-detail__subscribe-btn {
  width: 100%;
  padding: 10px 16px;
  border: none;
  border-radius: 999px;
  background: #3b82f6;
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}

.post-detail__recommend {
  margin-top: 8px;
  background: #f5f5f5;
}

.post-detail__recommend-title {
  margin: 0;
  padding: 16px 12px 8px;
  font-size: 16px;
  font-weight: 600;
  color: #333;
  background: #f5f5f5;
}

.post-detail__recommend-grid {
  gap: 8px;
  padding: 0;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.post-stats {
  display: flex;
  align-items: center;
}

.post-stats--card {
  gap: 20px;
  padding: 10px 12px 12px;
}

.post-stats--detail {
  gap: 24px;
  padding: 12px 16px;
  background: #fff;
  border-top: 1px solid #f0f0f0;
}

.post-stat {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0;
  border: none;
  background: transparent;
  font-size: 13px;
  color: #666;
  cursor: pointer;
}

.post-stat--readonly {
  cursor: default;
}

.post-stat--active {
  color: #ec4899;
}

.post-stat__icon {
  width: 18px;
  height: 18px;
}

.post-card__unlock {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  background: #1e3a8a;
  color: #fff;
  font-size: 14px;
  line-height: 2.4;
  text-align: center;
  text-decoration: none;
  border-radius: 0;
}

.post-card__unlock--placeholder {
  background: transparent;
  color: transparent;
  pointer-events: none;
  user-select: none;
}

.post-card--flush {
  border-radius: 0;
  box-shadow: none;
  border: none;
}

.post-card--flush .post-card__media {
  margin-top: 10px;
}

.post-card--flush .post-card__unlock {
  margin: 0;
  padding: 0;
  width: 100%;
  border-radius: 0;
}

.post-card--flush .post-stats--card {
  padding-left: 12px;
  padding-right: 12px;
}

.site-main--post-detail {
  padding-bottom: 0;
}

@media (max-width: 767px) {
  .site-main--post-detail .subpage-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    margin: 0;
    z-index: 100;
  }

  .site-main--post-detail {
    padding-top: 46px;
  }
}

.author-page {
  min-height: 100vh;
  background: #f5f5f5;
  padding-bottom: 24px;
  --author-gutter: 16px;
}

.author-hero__cover-wrap {
  width: 100%;
  aspect-ratio: 21 / 9;
  overflow: hidden;
  background: #e5e5e5;
}

.author-hero__cover {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.author-hero__cover--placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #d4d4d4, #a3a3a3);
}

.author-hero__panel {
  background: #fff;
}

.author-hero__profile {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 var(--author-gutter) 20px;
  margin-top: -40px;
  text-align: center;
}

.author-hero__avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 3px solid #fff;
  object-fit: cover;
  background: #fff;
  flex-shrink: 0;
}

.author-hero__avatar--placeholder {
  display: block;
  background: #ddd;
}

.author-hero__meta {
  width: 100%;
  max-width: 480px;
  margin-top: 12px;
}

.author-hero__name {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  color: #1a1a1a;
  line-height: 1.3;
}

.author-hero__verified {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #3b82f6;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
}

.author-hero__stats {
  margin: 6px 0 0;
  font-size: 13px;
  color: #999;
}

.author-hero__bio {
  margin: 8px 0 0;
  font-size: 14px;
  line-height: 1.6;
  font-style: italic;
  color: #666;
}

.author-hero__actions {
  margin-top: 16px;
}

.author-hero__action-hint {
  margin: 8px 0 0;
  font-size: 13px;
  color: #dc2626;
}

.author-btn {
  width: 100%;
  height: 44px;
  border: none;
  border-radius: 22px;
  padding: 0 20px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}

.author-btn--primary {
  background: #3b82f6;
  color: #fff;
}

.author-btn--subscribed {
  background: #f5f5f5;
  color: #999;
  cursor: default;
}

.author-btn--danger {
  background: #fff;
  color: #ee0a24;
  border: 1px solid #ee0a24;
}

.author-toolbar {
  background: #fff;
  border-top: 1px solid #f0f0f0;
}

.author-toolbar__tabs {
  display: flex;
  justify-content: center;
  gap: 4px;
  padding: 0 8px;
}

.author-tab {
  flex: 1;
  max-width: 120px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 12px 8px 10px;
  border: none;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: #999;
  text-decoration: none;
}

.author-tab--active {
  color: #1a1a1a;
  border-bottom-color: #1a1a1a;
}

.author-tab__count {
  font-size: 12px;
  line-height: 1;
}

.author-tab__icon {
  width: 22px;
  height: 22px;
}

.author-tab__label {
  font-size: 12px;
  line-height: 1;
}

.author-toolbar__sort {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding: 8px var(--author-gutter) 12px;
  border-top: 1px solid #f0f0f0;
  position: relative;
}

.author-toolbar__filter-icon {
  width: 18px;
  height: 18px;
  color: #bbb;
}

.author-toolbar__dropdown {
  position: relative;
}

.author-toolbar__trigger {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0;
  border: none;
  background: transparent;
  font-size: 14px;
  color: #333;
  cursor: pointer;
}

.author-toolbar__arrow {
  width: 12px;
  height: 12px;
  color: #999;
  transition: transform 0.2s;
}

.author-toolbar__sort.is-open .author-toolbar__arrow {
  transform: rotate(180deg);
}

.author-toolbar__menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 20;
  min-width: 120px;
  margin: 0;
  padding: 4px 0;
  list-style: none;
  background: #fff;
  border: 1px solid #eee;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.author-toolbar__item {
  display: block;
  padding: 10px 14px;
  font-size: 14px;
  color: #333;
  text-decoration: none;
}

.author-toolbar__item:hover {
  background: #f5f5f5;
}

.author-toolbar__item--active {
  color: #1a1a1a;
  font-weight: 600;
}

.author-feed {
  background: #f5f5f5;
}

.author-feed__grid {
  padding: 12px var(--author-gutter);
  gap: 12px;
}

.author-page .post-card {
  border: 1px solid #f0f0f0;
  box-shadow: none;
}

.author-page .pagination {
  padding: 0 var(--author-gutter) 12px;
}

@media (min-width: 768px) {
  .site-main--author {
    padding: 0;
  }

  .author-page {
    --author-gutter: 24px;
  }

  .author-hero__profile {
    flex-direction: row;
    align-items: flex-start;
    text-align: left;
    padding: 16px var(--author-gutter) 24px;
    margin-top: 0;
    gap: 20px;
  }

  .author-hero__avatar,
  .author-hero__avatar--placeholder {
    width: 96px;
    height: 96px;
    margin-top: -48px;
  }

  .author-hero__meta {
    margin-top: 0;
    padding-top: 0;
    padding-bottom: 4px;
    max-width: none;
    flex: 1;
    min-width: 0;
  }

  .author-hero__name {
    justify-content: flex-start;
    font-size: 22px;
  }

  .author-btn {
    width: auto;
    min-width: 220px;
    border-radius: 8px;
  }

  .author-hero__actions {
    margin-top: 14px;
  }

  .author-toolbar {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    padding: 0 var(--author-gutter);
  }

  .author-toolbar__tabs {
    justify-content: flex-start;
    flex: 1;
    padding: 0;
    gap: 8px;
  }

  .author-tab {
    flex: 0 0 auto;
    min-width: 88px;
    max-width: none;
  }

  .author-toolbar__sort {
    border-top: none;
    padding: 0 0 10px;
    flex-shrink: 0;
  }

  .author-feed__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 16px var(--author-gutter) 24px;
    gap: 16px;
  }
}

@media (min-width: 1024px) {
  .author-feed__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.profile-card {
  background: #fff;
  border-radius: 10px;
  padding: 20px 16px;
  margin-bottom: 12px;
}
.profile-card h2 { margin: 0 0 6px; font-size: 18px; }
.profile-card__meta { margin: 0; color: #999; font-size: 13px; }
.profile-card__vip { margin: 10px 0 0; color: #d4a017; font-weight: 600; }
.profile-card__vip--muted { color: #999; font-weight: 400; }
.profile-card__wallet { margin: 10px 0 0; color: #ff6b00; font-weight: 600; }
.profile-links { display: flex; flex-direction: column; gap: 8px; }
.profile-links__item {
  display: block;
  background: #fff;
  border-radius: 10px;
  padding: 14px 16px;
  font-size: 15px;
}
.profile-links__item--highlight { color: #d4a017; font-weight: 600; }
.profile-links__item--disabled { color: #bbb; }

.profile-layout {
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 120px);
  background: #fff;
}

.profile-layout--index,
.site-main--profile .profile-layout {
  background: #f5f5f5;
}

.profile-nav {
  display: flex;
  flex-direction: column;
  background: #fff;
}

.profile-nav__item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  padding: 14px 16px;
  color: #333;
  text-decoration: none;
  border: none;
  background: #fff;
  width: 100%;
  text-align: left;
  cursor: pointer;
}

.profile-nav__item--member { flex-direction: column; align-items: flex-start; }
.profile-nav__item--active {
  background: #eff6ff;
  color: #1d4ed8;
  font-weight: 600;
}
.profile-nav__item--active .site-icon {
  color: #2563eb;
}
.profile-nav__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}
.profile-nav__icon--lg {
  width: 28px;
  height: 28px;
}
.profile-nav__label { flex: 1; font-size: 15px; }
.profile-nav__meta { font-size: 13px; color: #666; width: 100%; }
.profile-nav__promo { font-size: 12px; color: #999; width: 100%; }
.profile-nav__divider { height: 8px; background: #f5f5f5; }
.profile-nav__group { display: flex; flex-direction: column; }

.profile-nav__toggle {
  display: none;
}

.profile-nav__chevron {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  color: #2563eb;
  transition: transform 0.2s ease;
}

.profile-nav__panel {
  display: flex;
  flex-direction: column;
}

.profile-layout__content {
  flex: 1;
  min-width: 0;
  padding: 12px;
}

.profile-layout__content > .feed-page--flat {
  margin: -12px;
}

@media (min-width: 768px) {
  .profile-layout__content > .feed-page--flat {
    margin: 0;
  }
}

.profile-panel { background: #fff; border-radius: 10px; padding: 12px; }
.profile-index-hint { padding: 0 4px; }

.account-info__list { margin: 0; }
.account-info__row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 14px 16px;
  border-bottom: 1px solid #eee;
}
.account-info__row:last-child { border-bottom: none; }
.account-info__row dt {
  margin: 0;
  font-size: 14px;
  color: #666;
  flex-shrink: 0;
}
.account-info__row dd {
  margin: 0;
  font-size: 14px;
  color: #333;
  text-align: right;
  word-break: break-all;
}
.account-info__action {
  padding: 12px 16px 16px;
  margin: 0;
}
.account-info__link {
  color: #3b82f6;
  font-size: 14px;
}

.account-page {
  max-width: 720px;
  padding: 0;
}

.account-profile-header {
  background: #fff;
  color: #333;
  border-radius: 8px;
  margin-bottom: 12px;
  overflow: hidden;
}

.account-profile-header__main {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 14px 16px;
  border-bottom: 1px solid #f0f0f0;
}

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

.account-profile-header__username {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.3;
  word-break: break-all;
  color: #333;
}

.account-profile-header__email {
  margin-top: 4px;
  font-size: 13px;
  color: #999;
  word-break: break-all;
  line-height: 1.3;
}

.account-profile-header__wallet {
  flex-shrink: 0;
  text-align: right;
}

.account-profile-header__wallet-label {
  display: block;
  font-size: 12px;
  color: #999;
  line-height: 1.2;
}

.account-profile-header__wallet-amount {
  display: block;
  margin-top: 2px;
  font-size: 24px;
  font-weight: 700;
  color: #ff6b00;
  line-height: 1.2;
}

.account-profile-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  background: #fff;
  border-top: 1px solid #f0f0f0;
}

.account-profile-stats__item {
  padding: 12px 8px;
  text-align: center;
}

.account-profile-stats__item + .account-profile-stats__item {
  border-left: 1px solid #f0f0f0;
}

.account-profile-stats__value {
  display: block;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.2;
  color: #333;
}

.account-profile-stats__label {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  color: #999;
  line-height: 1.2;
}

.account-body {
  padding: 16px;
}

.account-balance-card {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  background: linear-gradient(135deg, #4da3ff, #2f80ed);
  color: #fff;
  padding: 20px 18px;
  margin-bottom: 12px;
}

.account-balance-card__amount {
  font-size: 34px;
  font-weight: 700;
  line-height: 1.2;
}

.account-balance-card__hint {
  margin-top: 8px;
  font-size: 14px;
  opacity: 0.95;
}

.account-balance-card__icon {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 72px;
  height: 72px;
  opacity: 0.18;
}

.account-banner {
  border-radius: 8px;
  padding: 14px 16px;
  margin-bottom: 12px;
  line-height: 1.6;
}

.account-banner strong {
  display: block;
  margin-bottom: 6px;
}

.account-banner p {
  margin: 0;
  font-size: 13px;
}

.account-banner--green {
  background: #22c55e;
  color: #fff;
}

.account-banner--yellow {
  background: #facc15;
  color: #333;
}

.account-banner--yellow strong {
  color: #dc2626;
}

.account-tiers {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 16px 0 12px;
}

.account-tier {
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  background: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  cursor: pointer;
  padding: 10px 8px;
}

.account-tier.is-active {
  border-color: #3b82f6;
  box-shadow: 0 0 0 1px #3b82f6 inset;
}

.account-tier__amount {
  font-size: 28px;
  font-weight: 700;
  color: #111;
  line-height: 1;
}

.account-tier__bonus {
  font-size: 12px;
  color: #d4a017;
  font-weight: 600;
}

.account-pay-methods {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 16px;
}

.account-pay-method {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 0;
  cursor: pointer;
  font-size: 15px;
  color: #333;
}

.account-pay-method input {
  width: 18px;
  height: 18px;
  margin: 0;
}

.account-pay-method__icon {
  width: 24px;
  height: 24px;
}

.account-submit {
  width: 100%;
  border: none;
  border-radius: 6px;
  background: #22c55e;
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  padding: 14px 16px;
  cursor: pointer;
}

.account-submit-wrap {
  width: 100%;
}

.account-submit-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  box-sizing: border-box;
  cursor: pointer;
  user-select: none;
  text-align: center;
}

.account-submit-btn__title {
  font-size: 1.125rem;
  font-weight: 900;
  line-height: 1.2;
  color: inherit;
}

.account-submit-btn__tip {
  font-size: 12px;
  font-weight: 700;
  line-height: 1.3;
  color: #f4ff36;
}

.account-submit-btn.is-disabled,
.account-submit-btn[aria-disabled="true"] {
  opacity: 0.6;
  cursor: not-allowed;
  pointer-events: none;
}

/* 移动端创建订单/跳转支付前：禁止点击与滚动 */
html.pay-waiting-lock,
body.pay-waiting-lock {
  overflow: hidden !important;
  height: 100% !important;
  touch-action: none;
  overscroll-behavior: none;
}

body.pay-waiting-lock {
  position: fixed;
  width: 100%;
  left: 0;
  right: 0;
}

#account-pay-loading.modal-mask.show {
  z-index: 200;
  touch-action: none;
  pointer-events: auto;
  -webkit-user-select: none;
  user-select: none;
}


.account-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.account-hint {
  margin: 10px 0 0;
  font-size: 13px;
  color: #dc2626;
  min-height: 18px;
}

.account-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 16px;
}

.account-modal[hidden] {
  display: none !important;
}

.subscribe-modal {
  position: fixed;
  inset: 0;
  z-index: 1100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.subscribe-modal[hidden] {
  display: none !important;
}

.subscribe-modal__mask {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
}

.subscribe-modal__panel {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 400px;
  max-height: calc(100vh - 32px);
  overflow: auto;
}

.subscribe-modal__card {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
}

.subscribe-modal__cover-wrap {
  aspect-ratio: 21 / 9;
  overflow: hidden;
  background: linear-gradient(135deg, #3b82f6, #2563eb);
}

.subscribe-modal__cover {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.subscribe-modal__cover--placeholder {
  width: 100%;
  height: 100%;
}

.subscribe-modal__body {
  padding: 0 24px 24px;
}

.subscribe-modal__profile {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  text-align: center;
}

.subscribe-modal__avatar-wrap {
  position: relative;
  width: 100px;
  height: 100px;
  margin: -50px auto 0;
  flex-shrink: 0;
}

.subscribe-modal__avatar-wrap > .subscribe-modal__avatar {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  box-sizing: border-box;
  border-radius: 50%;
  border: 4px solid #fff;
  object-fit: cover;
  background: #e5e7eb;
}

.subscribe-modal__avatar--placeholder {
  position: absolute;
  inset: 0;
  display: block;
  box-sizing: border-box;
}

.subscribe-modal__title {
  margin: 12px 0 0;
  font-size: 16px;
  font-weight: 600;
  color: #1a1a1a;
  line-height: 1.4;
}

.subscribe-modal__payment {
  margin-top: 20px;
}

.subscribe-modal__wallet {
  display: block;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 12px 14px;
  cursor: default;
}

.subscribe-modal__wallet input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.subscribe-modal__wallet-main {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 600;
  color: #1a1a1a;
}

.subscribe-modal__wallet-icon {
  width: 18px;
  height: 18px;
  color: #3b82f6;
}

.subscribe-modal__wallet-balance {
  display: block;
  margin-top: 6px;
  font-size: 13px;
  color: #666;
}

.subscribe-modal__recharge {
  margin-left: 6px;
  color: #3b82f6;
  text-decoration: none;
}

.subscribe-modal__recharge:hover {
  text-decoration: underline;
}

.subscribe-modal__error {
  margin: 12px 0 0;
  font-size: 13px;
  color: #dc2626;
  text-align: center;
}

.subscribe-modal__error-link {
  color: #3b82f6;
  text-decoration: none;
}

.subscribe-modal__error-link:hover {
  text-decoration: underline;
}

.subscribe-modal__submit {
  width: 100%;
  margin-top: 20px;
  height: 48px;
  border: none;
  border-radius: 8px;
  background: #1a1a1a;
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
}

.subscribe-modal__submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.subscribe-modal__cancel {
  display: block;
  width: 100%;
  margin-top: 12px;
  padding: 0;
  border: none;
  background: transparent;
  color: #666;
  font-size: 14px;
  cursor: pointer;
}

body.subscribe-modal-open {
  overflow: hidden;
}

.profile-nav__logout-form {
  margin: 0;
}

.profile-nav__item--button {
  cursor: pointer;
  font: inherit;
}

.auth-page {
  max-width: 420px;
  margin: 0 auto;
  padding: 16px;
}

.auth-form {
  background: #fff;
  border-radius: 10px;
  padding: 20px 16px;
}

.auth-form__field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 14px;
  font-size: 14px;
  color: #666;
}

.auth-form__field input {
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 10px 12px;
  font-size: 15px;
}

.auth-form__error {
  background: #fef2f2;
  color: #b42318;
  border-radius: 6px;
  padding: 10px 12px;
  margin-bottom: 14px;
  font-size: 13px;
}

.auth-form__submit {
  width: 100%;
  border: none;
  border-radius: 6px;
  background: #3b82f6;
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  padding: 12px;
  cursor: pointer;
}

.account-modal__card {
  width: 100%;
  max-width: 320px;
  background: #fff;
  border-radius: 12px;
  padding: 20px;
  text-align: center;
}

.account-modal__card--qr canvas {
  display: block;
  margin: 12px auto;
}

.account-modal__desc,
.account-modal__amount {
  margin: 8px 0 0;
  font-size: 14px;
  color: #666;
}

.account-modal__amount {
  font-size: 18px;
  font-weight: 700;
  color: #111;
}

.account-modal__close {
  margin-top: 14px;
  border: 1px solid #ddd;
  background: #fff;
  border-radius: 6px;
  padding: 8px 16px;
  cursor: pointer;
}

.account-modal__spinner {
  width: 36px;
  height: 36px;
  border: 3px solid #e5e7eb;
  border-top-color: #3b82f6;
  border-radius: 50%;
  margin: 0 auto 12px;
  animation: account-spin 0.8s linear infinite;
}

@keyframes account-spin {
  to { transform: rotate(360deg); }
}

@media (max-width: 767px) {
  .account-page {
    padding: 0;
  }

  .account-body {
    padding: 12px 16px 16px;
  }

  .account-profile-header__main {
    padding: 12px 16px;
  }

  .account-profile-header__username {
    font-size: 15px;
  }

  .account-profile-header__wallet-amount {
    font-size: 20px;
  }

  .account-profile-stats__value {
    font-size: 16px;
  }

  .account-profile-stats__label {
    font-size: 11px;
  }

  .profile-layout--index .profile-layout__content {
    padding: 0;
  }

  .site-main--profile.site-main--subpage {
    padding: 0;
  }

  .account-tier__amount {
    font-size: 22px;
  }

  .account-tier {
    padding: 8px 6px;
    gap: 2px;
  }
}

@media (min-width: 768px) {
  .site-main--profile .account-page {
    padding: 20px 24px;
  }

  .site-main--profile .account-body {
    padding: 0;
  }
}

.payment-table-wrap { overflow-x: auto; }
.payment-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.payment-table th,
.payment-table td { padding: 12px 10px; border-bottom: 1px solid #eee; text-align: left; }
.payment-table th { color: #666; font-weight: 600; background: #fafafa; }
.payment-status { font-size: 12px; padding: 2px 8px; border-radius: 999px; }
.payment-status--paid { background: #ecfdf3; color: #067647; }
.payment-status--pending { background: #fff7ed; color: #c2410c; }
.payment-status--failed { background: #fef2f2; color: #b42318; }

.subscription-list { list-style: none; margin: 0; padding: 0; }
.subscription-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid #eee;
}
.subscription-item__main {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
  color: inherit;
  text-decoration: none;
}
.subscription-item__avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
.subscription-item__avatar--placeholder { background: #ddd; display: inline-block; }
.subscription-item__name { font-weight: 600; }
.subscription-item__handle { font-size: 12px; color: #999; }
.subscription-item__meta { font-size: 12px; color: #666; margin-top: 4px; }
.subscription-item__unsub {
  border: 1px solid #ee0a24;
  background: #fff;
  color: #ee0a24;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 12px;
  cursor: pointer;
  flex-shrink: 0;
}

@media (max-width: 767px) {
  .site-main--profile .profile-nav {
    display: flex;
    border-bottom: 1px solid #f0f0f0;
  }

  .profile-nav__toggle {
    display: flex;
  }

  .profile-nav__panel {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease;
  }

  .profile-nav.is-open .profile-nav__panel {
    max-height: 480px;
    border-top: 1px solid #f0f0f0;
  }

  .profile-nav.is-open .profile-nav__chevron {
    transform: rotate(180deg);
  }

  .profile-nav__panel .profile-nav__item--active {
    display: none;
  }

  .site-main--profile:has(.profile-layout) > .subpage-header {
    display: none;
  }
}

@media (min-width: 768px) {
  .profile-nav__toggle {
    display: none !important;
  }

  .profile-nav__panel {
    max-height: none !important;
    overflow: visible;
    border-top: none !important;
  }

  .profile-nav__panel .profile-nav__item--active {
    display: flex;
  }

  .profile-layout {
    flex-direction: row;
    align-items: stretch;
    min-height: 100vh;
  }

  .profile-nav {
    width: 260px;
    flex-shrink: 0;
    border-right: 1px solid #eee;
    min-height: 100vh;
  }

  .profile-layout__content {
    padding: 0;
    overflow-y: auto;
  }

  .site-main--profile {
    padding: 0;
  }

  .site-main--profile .profile-layout {
    min-height: 100vh;
  }

  .site-main--profile .profile-panel {
    border-radius: 0;
    min-height: 100%;
  }

  .site-main--profile .profile-card {
    border-radius: 0;
    margin-bottom: 0;
  }

  .site-main--profile .profile-index-hint {
    padding: 12px 16px;
  }
}

.checkout-page { background: #fff; border-radius: 10px; padding: 16px; }
.checkout-page h2 { margin: 0; font-size: 18px; }
.checkout-desc { color: #999; font-size: 14px; margin: 4px 0 16px; }
.plan-list { display: flex; flex-direction: column; gap: 12px; }
.plan-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  border: 2px solid #f0f0f0;
  border-radius: 8px;
}
.plan-name { font-weight: 600; }
.plan-duration { font-size: 12px; color: #999; margin-top: 4px; }
.plan-price { text-align: right; }
.plan-price-original { font-size: 12px; color: #999; text-decoration: line-through; }
.plan-price-current { font-size: 22px; font-weight: 700; color: #d4a017; }
.checkout-notice {
  border-radius: 10px;
  margin-top: 20px;
  padding: 12px 14px;
  font-size: 13px;
  line-height: 1.6;
}
.checkout-notice--compliance { background: #f9c00c; }
.checkout-notice p { margin: 0; }
.checkout-notice p + p { margin-top: 10px; }

@media (min-width: 768px) {
  .app-layout {
    padding-left: 200px;
  }

  .desktop-sidebar {
    display: flex;
    flex-direction: column;
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: 200px;
    background: #fff;
    border-right: 1px solid #eee;
    z-index: 110;
  }
  .desktop-sidebar__logo {
    padding: 20px 16px;
  }
  .desktop-sidebar__logo-text {
    font-size: 22px;
    font-weight: 700;
    color: #111;
  }
  .desktop-sidebar__menu {
    display: flex;
    flex-direction: column;
    padding: 8px 0;
  }
  .desktop-sidebar__item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    font-size: 15px;
    color: #333;
  }
  .desktop-sidebar__item:hover {
    background: #f5f7fa;
  }
  .desktop-sidebar__item.is-active {
    color: #3b82f6;
    background: #eff6ff;
    font-weight: 600;
  }
  .desktop-sidebar__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    flex-shrink: 0;
  }

  .page-header {
    display: none;
  }

  .mobile-tabbar {
    display: none;
  }

  .site-main {
    max-width: none;
    margin: 0;
    padding: 0 0 24px;
  }

  .site-main.site-main--profile {
    padding: 0;
  }

  .page-title-bar {
    display: none;
  }

  .subpage-header {
    display: none;
  }

  .post-detail__subscribe-btn {
    max-width: 280px;
  }

  .post-detail__recommend {
    margin-top: 0;
    padding: 0 16px 24px;
  }

  .post-detail__recommend-title {
    padding: 24px 16px 12px;
  }

  .post-detail__recommend-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
  }

  .site-main--subpage {
    padding-top: 0;
  }

  .feed-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .feed-page--flat .post-card {
    border-radius: 0;
  }
}

@media (min-width: 768px) {
  .discover-page {
    padding: 16px 16px 0;
  }

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

@media (min-width: 1024px) {
  .discover-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .feed-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1400px) {
  .feed-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.site-main--auth-login {
  min-height: 0;
}

.auth-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: none;
  background: rgba(0, 0, 0, 0.68);
  overflow-y: auto;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.auth-modal.is-open {
  display: flex;
}

.auth-modal__panel {
  width: 100%;
  max-width: 440px;
  max-height: calc(100vh - 32px);
  margin-top: -6vh;
  display: flex;
  flex-direction: column;
  background: #eef1f6;
  border-radius: 16px;
  overflow: hidden;
}

.auth-modal__header {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  height: 48px;
  padding: 0 12px;
  background: #fff;
  border-bottom: 1px solid #f0f0f0;
  flex-shrink: 0;
}

.auth-modal__close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: none;
  background: transparent;
  color: #666;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

.auth-modal__main {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 24px 20px 16px;
}

.auth-modal__card {
  width: 100%;
  max-width: 400px;
  padding: 32px 28px 28px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
}

.auth-modal__title {
  margin: 0;
  font-size: 28px;
  font-weight: 700;
  color: #1a1a1a;
  text-align: center;
  line-height: 1.2;
}

.auth-modal__subtitle {
  margin: 8px 0 24px;
  font-size: 14px;
  color: #999;
  text-align: center;
}

.auth-modal__error {
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: 8px;
  background: #fef2f2;
  color: #b42318;
  font-size: 13px;
  line-height: 1.4;
}

.auth-modal__form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.auth-field {
  position: relative;
  display: flex;
  align-items: center;
}

.auth-field__icon {
  position: absolute;
  left: 14px;
  width: 18px;
  height: 18px;
  color: #bbb;
  pointer-events: none;
}

.auth-field__hint {
  margin: -4px 0 0;
  padding-left: 4px;
  font-size: 12px;
  color: #999;
}

.auth-code-row {
  display: flex;
  align-items: stretch;
  gap: 8px;
  width: 100%;
}

.auth-code-row__field {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
}

.auth-code-row__input {
  width: 100%;
  min-width: 0;
}

.auth-code-row__btn {
  flex: 0 0 auto;
  align-self: stretch;
  min-width: 104px;
  height: 48px;
  padding: 0 12px;
  border: 1px solid #1a1a1a;
  border-radius: 10px;
  background: #1a1a1a;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  cursor: pointer;
}

.auth-code-row__btn:disabled,
.auth-code-row__btn.is-cooling {
  background: #d1d5db;
  border-color: #d1d5db;
  color: #6b7280;
  cursor: not-allowed;
}

.auth-code-row--dark .auth-code-row__btn {
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.auth-code-row--dark .auth-code-row__btn:disabled,
.auth-code-row--dark .auth-code-row__btn.is-cooling {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.35);
}

.auth-field__input {
  width: 100%;
  height: 48px;
  padding: 0 44px 0 42px;
  border: 1px solid #e8e8e8;
  border-radius: 10px;
  font-size: 15px;
  color: #1a1a1a;
  background: #fff;
  outline: none;
  transition: border-color 0.2s;
  box-sizing: border-box;
}

.auth-field__input::placeholder {
  color: #c0c0c0;
}

.auth-field__input:focus {
  border-color: #1a1a1a;
}

.auth-field__toggle {
  position: absolute;
  right: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: none;
  background: transparent;
  color: #bbb;
  cursor: pointer;
}

.auth-field__toggle-icon {
  width: 18px;
  height: 18px;
}

.auth-remember {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
  font-size: 14px;
  color: #666;
  cursor: pointer;
  user-select: none;
}

.auth-remember__input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: #1a1a1a;
}

.auth-modal__submit {
  width: 100%;
  height: 48px;
  margin-top: 8px;
  border: none;
  border-radius: 10px;
  background: #1a1a1a;
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s;
}

.auth-modal__submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.auth-modal__resend {
  width: 100%;
  margin-top: 8px;
  padding: 0;
  border: none;
  background: transparent;
  color: #3b82f6;
  font-size: 14px;
  cursor: pointer;
}

.auth-modal__resend:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.auth-modal__links {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 400px;
  margin-top: 20px;
  padding: 0 4px;
}

.auth-modal__link {
  padding: 0;
  border: none;
  background: transparent;
  font-size: 14px;
  color: #999;
  cursor: pointer;
}

.auth-modal__footer {
  flex-shrink: 0;
  padding: 20px 16px;
  background: #fff;
  text-align: center;
  font-size: 13px;
  color: #666;
}

body.auth-modal-open {
  overflow: hidden;
}

.auth-toast {
  position: fixed;
  top: 20px;
  left: 50%;
  z-index: 3000;
  transform: translate(-50%, -12px);
  max-width: calc(100vw - 32px);
  padding: 12px 18px;
  border-radius: 10px;
  background: rgba(26, 26, 26, 0.92);
  color: #fff;
  font-size: 14px;
  line-height: 1.4;
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
}

.auth-toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.auth-toast--success {
  background: #e0f2fe;
  color: #16a34a;
}

.auth-toast--warning {
  background: rgba(146, 64, 14, 0.95);
}

.auth-login-body {
  min-height: 100vh;
  margin: 0;
  background: #f0f2f5;
}

.auth-login-header {
  padding: 24px 32px;
}

.auth-login-logo {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: #111;
  text-decoration: none;
}

.auth-login-main {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 88px);
  padding: 24px 16px 48px;
  box-sizing: border-box;
}

.auth-login-card {
  width: 100%;
  max-width: 420px;
  padding: 40px 36px 28px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
}

.auth-login-card__title {
  margin: 0;
  font-size: 28px;
  font-weight: 700;
  color: #1a1a1a;
  text-align: center;
  line-height: 1.2;
}

.auth-login-card__subtitle {
  margin: 8px 0 28px;
  font-size: 14px;
  color: #999;
  text-align: center;
}

.auth-login-card__error {
  margin: 0 0 16px;
  padding: 10px 12px;
  border-radius: 8px;
  background: #fef2f2;
  color: #b42318;
  font-size: 13px;
  line-height: 1.4;
}

.auth-login-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.auth-login-form__submit {
  width: 100%;
  height: 48px;
  margin-top: 8px;
  border: none;
  border-radius: 10px;
  background: #1a1a1a;
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
}

.auth-login-card__links {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 20px;
  padding: 0 4px;
}

.auth-login-card__register-hint {
  font-size: 14px;
  color: #999;
}

.auth-login-card__mode-toggle {
  padding: 0;
  border: none;
  background: transparent;
  font-size: 14px;
  color: #999;
  cursor: pointer;
}

.auth-login-card__error--success {
  background: #e0f2fe;
  color: #16a34a;
}

.auth-field__hint {
  margin: -4px 0 0;
  padding-left: 4px;
  font-size: 12px;
  color: #999;
}

.auth-field__toggle-icon--hide {
  display: none;
}

.auth-field__toggle.is-revealed .auth-field__toggle-icon--show {
  display: none;
}

.auth-field__toggle.is-revealed .auth-field__toggle-icon--hide {
  display: block;
}

@media (max-width: 767px) {
  .auth-login-header {
    padding: 20px 16px;
  }

  .auth-login-card {
    padding: 32px 24px 24px;
  }
}

.payment-record-row.payment-row--paid {
  background: rgba(34, 197, 94, 0.12);
}

.payment-record-row.payment-row--pending {
  background: rgba(244, 63, 94, 0.12);
}

.payment-record-row.payment-row--failed {
  background: rgba(148, 163, 184, 0.12);
}

.payment-record-head,
.payment-record-grid {
  display: grid;
  grid-template-columns: 1.1fr 1.1fr 1.2fr auto;
  gap: 0.5rem;
  align-items: center;
}

.payment-record-actions {
  display: flex;
  justify-content: flex-end;
  min-height: 1.75rem;
}

.payment-resume-btn {
  white-space: nowrap;
}

@media (max-width: 640px) {
  .payment-record-head,
  .payment-record-grid {
    grid-template-columns: 1fr 1fr auto;
    font-size: 0.8rem;
  }

  .payment-record-head span:nth-child(2),
  .payment-record-grid > span:nth-child(2) {
    display: none;
  }
}

.pay-tips--success {
  color: #4ade80;
}

.pay-tips--error {
  color: #fb7185;
}

.profile-data-view-btn {
  color: #3dffb8 !important;
  font-weight: 700;
}

.profile-data-view-btn:hover {
  color: #7dffd0 !important;
}

/* Auth modal tabs + register coupon promo */
.auth-modal__tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 18px;
  position: relative;
  z-index: 3;
  overflow: visible;
}

.auth-modal__tab {
  position: relative;
  overflow: visible;
  border: none;
  border-radius: 999px;
  padding: 10px 12px;
  background: #f3f4f6;
  color: #666;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  pointer-events: auto;
  z-index: 3;
}

.auth-modal__tab.is-active {
  background: linear-gradient(135deg, #ff5f8f, #ff3d71);
  color: #fff;
  box-shadow: 0 8px 24px rgba(255, 61, 113, 0.35);
}

.auth-modal__tab-badge {
  position: absolute;
  top: -10px;
  right: -4px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #ffe600;
  color: #e11d48;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
  box-shadow: 0 4px 12px rgba(255, 230, 0, 0.45);
}

.auth-modal__tab.is-active .auth-modal__tab-badge {
  display: none;
}

.auth-modal__register-promo {
  margin: -6px 0 14px;
  text-align: center;
  font-size: 14px;
  color: #888;
}

.auth-modal__register-promo em {
  font-style: normal;
  color: #f59e0b;
  font-weight: 800;
}

.auth-modal__card {
  position: relative;
}

.auth-modal__promo-burst {
  display: none !important;
}

.auth-modal__promo-burst-tag {
  font-size: 10px;
  opacity: 0.95;
}

/* Coupon alert modal */
.coupon-alert {
  position: fixed;
  inset: 0;
  z-index: 4000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.coupon-alert[hidden] {
  display: none !important;
}

.coupon-alert__mask {
  position: absolute;
  inset: 0;
  background: rgba(8, 6, 20, 0.82);
  backdrop-filter: blur(4px);
}

.coupon-alert__panel {
  position: relative;
  width: min(100%, 420px);
  padding: 28px 22px 22px;
  border-radius: 28px;
  border: 2px solid rgba(251, 191, 36, 0.55);
  background: linear-gradient(165deg, #2a1038 0%, #1a0f2e 45%, #120a22 100%);
  box-shadow: 0 24px 80px rgba(255, 61, 113, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  text-align: center;
}

.coupon-alert__countdown {
  position: absolute;
  top: 14px;
  right: 16px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(251, 191, 36, 0.45);
  color: #fde68a;
  font-size: 12px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.coupon-alert__burst {
  width: 110px;
  height: 110px;
  margin: 0 auto 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: radial-gradient(circle at 30% 30%, #ffe566, #ff8a00 55%, #ff3d71 100%);
  clip-path: polygon(
    50% 0%, 61% 18%, 82% 12%, 78% 34%, 100% 40%, 82% 55%,
    92% 78%, 68% 70%, 50% 88%, 32% 70%, 8% 78%, 18% 55%,
    0% 40%, 22% 34%, 18% 12%, 39% 18%
  );
  box-shadow: 0 12px 32px rgba(255, 120, 0, 0.5);
}

.coupon-alert__burst-tag {
  font-size: 11px;
  font-weight: 700;
}

.coupon-alert__burst-amount {
  font-size: 28px;
  line-height: 1.1;
  font-weight: 900;
}

.coupon-alert__title {
  font-size: 22px;
  font-weight: 900;
  color: #fff;
}

.coupon-alert__text {
  margin-top: 10px;
  font-size: 14px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.78);
}

.coupon-alert__expire {
  margin-top: 6px;
  font-size: 12px;
  color: #fbbf24;
}

.coupon-alert__actions {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.coupon-alert__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 14px 16px;
  border-radius: 16px;
  font-size: 15px;
  font-weight: 800;
  text-decoration: none;
  border: none;
  cursor: pointer;
}

.coupon-alert__btn--primary {
  background: linear-gradient(135deg, #ff5f8f, #ff3d71);
  color: #fff;
  box-shadow: 0 10px 28px rgba(255, 61, 113, 0.4);
}

.coupon-alert__btn--ghost {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.85);
}

body.coupon-alert-open {
  overflow: hidden;
}

.account-coupon__check {
  width: 18px;
  height: 18px;
  accent-color: #f59e0b;
}

.coupon-list__status--available {
  background: rgba(34, 197, 94, 0.18);
  color: #86efac;
}

.coupon-list__status--used {
  background: rgba(148, 163, 184, 0.18);
  color: #cbd5e1;
}

.coupon-list__status--expired {
  background: rgba(244, 63, 94, 0.15);
  color: #fda4af;
}

/* Standalone auth login page (/auth/login) */
.auth-page-card {
  position: relative;
  overflow: visible;
}

.auth-page-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 18px;
  position: relative;
  z-index: 3;
  overflow: visible;
}

.auth-page-tab {
  position: relative;
  overflow: visible;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.65);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
  pointer-events: auto;
  z-index: 3;
}

.auth-page-tab.is-active {
  border-color: transparent;
  background: linear-gradient(135deg, #ff5f8f, #ff3d71);
  color: #fff;
  box-shadow: 0 8px 24px rgba(255, 61, 113, 0.35);
}

.auth-page-tab-badge {
  position: absolute;
  top: -10px;
  right: -4px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #ffe600;
  color: #e11d48;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
  box-shadow: 0 4px 12px rgba(255, 230, 0, 0.45);
  z-index: 4;
}

.auth-page-tab.is-active .auth-page-tab-badge {
  display: none;
}

.auth-page-register-promo {
  margin-top: 8px;
  text-align: center;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.55);
}

.auth-page-register-promo em {
  font-style: normal;
  color: #fbbf24;
  font-weight: 800;
}

.auth-page-promo-burst {
  display: none !important;
}

.auth-page-promo-burst-tag {
  font-size: 10px;
  opacity: 0.95;
}
