/* Site chrome — plain CSS (no Tailwind) */
:root {
  --background: #ffffff;
  --foreground: #1a1f1c;
  --card: #ffffff;
  --muted: #64748b;
  --primary: #00bb61;
  --primary-hover: #00a356;
  --primary-light: #e8faf1;
  --primary-dark: #087a44;
  --border: #dde5e1;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
  --radius: 3px;
  --site-width: 1280px;
  /* 桌面版心即 1280：左右不再二次缩进，避免顶栏/内容比 1280 窄一截 */
  --site-padding-x: 0px;
  --site-padding-y: 24px;
  --site-padding-bottom: 40px;
}

* { box-sizing: border-box; }
html {
  margin: 0;
  padding: 0;
  max-width: 100%;
  /* 必须同时设 y，否则 overflow-x:hidden 会被算成 auto 并出现横向滚动条 */
  overflow-x: hidden;
  overflow-y: auto;
}
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  max-width: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  background: var(--card);
  color: var(--foreground);
  font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans SC", sans-serif;
  line-height: 1.6;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; }

/* 管理员顶部待审通知 */
.admin-review-alert {
  width: 100%;
  background: #fff7ed;
  border-bottom: 1px solid #fed7aa;
}
.admin-review-alert-inner {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 10px var(--site-padding-x);
  box-sizing: border-box;
}
.admin-review-alert-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ea580c;
  flex-shrink: 0;
  box-shadow: 0 0 0 3px rgba(234, 88, 12, 0.18);
  animation: admin-review-pulse 1.6s ease-in-out infinite;
}
@keyframes admin-review-pulse {
0%, 100% {
  box-shadow: 0 0 0 3px rgba(234, 88, 12, 0.18);
}

50% {
  box-shadow: 0 0 0 6px rgba(234, 88, 12, 0.08);
}
}

.admin-review-alert-text {
  margin: 0;
  flex: 1;
  min-width: 0;
  font-size: 13px;
  color: #9a3412;
  line-height: 1.5;
}
.admin-review-alert-text strong {
  color: #c2410c;
  font-weight: 700;
}
.admin-review-alert-link {
  flex-shrink: 0;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  background: var(--primary);
  padding: 5px 12px;
  border-radius: 3px;
  text-decoration: none;
}
.admin-review-alert-link:hover {
  background: var(--primary-hover);
}
.admin-review-alert-close {
  flex-shrink: 0;
  border: none;
  background: none;
  font-size: 20px;
  line-height: 1;
  color: #c2410c;
  cursor: pointer;
  padding: 0 4px;
}

/* 用户「审核未通过」顶栏通知：比管理员待审条更醒目 */
.user-reject-alert {
  background: #fef2f2;
  border-bottom: 1px solid #fecaca;
}
.user-reject-alert .admin-review-alert-dot {
  background: #dc2626;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.2);
  animation: user-reject-pulse 1.4s ease-in-out infinite;
}
@keyframes user-reject-pulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.2); }
  50% { box-shadow: 0 0 0 7px rgba(220, 38, 38, 0.08); }
}
.user-reject-alert .admin-review-alert-text {
  color: #991b1b;
}
.user-reject-alert .admin-review-alert-text strong {
  color: #b91c1c;
}
.user-reject-alert-count {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 7px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  background: #dc2626;
  vertical-align: middle;
}
.user-reject-alert .admin-review-alert-link {
  background: #dc2626;
}
.user-reject-alert .admin-review-alert-link:hover {
  background: #b91c1c;
}
.user-reject-alert .admin-review-alert-close {
  color: #b91c1c;
}

@media (max-width: 640px) {
.admin-review-alert-inner {
  flex-wrap: wrap;
  padding: 10px 14px;
  gap: 8px;
}

.admin-review-alert-text {
  flex: 1 1 calc(100% - 40px);
}

.admin-review-alert-link {
  margin-left: 18px;
}
}

.ktv-portal .hero-image img,
.ktv-portal .hero-image .img-wrap img {
  max-width: 100%;
  height: 270px;
  object-fit: cover;
}

.site-frame {
  width: 100%;
  max-width: 100%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: var(--card);
}
.site-shell {
  width: 100%;
  max-width: min(var(--site-width), 100%);
  margin: 0 auto;
  background: var(--card);
  min-width: 0;
  box-sizing: border-box;
}
@media (min-width: 1280px) {
.site-shell {
  width: var(--site-width);
  max-width: var(--site-width);
  flex: 0 0 var(--site-width);
}
}

.site-header,
.site-main,
.site-footer {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  min-width: 0;
}
.site-header {
  position: relative;
  width: 100%;
  max-width: 100%;
  background: var(--card);
  /* 勿对 header 设 overflow-x，否则会裁切下拉，且与 overflow-y:visible 配对会变成 auto 出现横条 */
}
.site-main {
  min-height: 480px;
  padding: var(--site-padding-y) var(--site-padding-x) var(--site-padding-bottom);
  box-sizing: border-box;
  max-width: 100%;
  min-width: 0;
}
.page-content--flush { padding: 0; }
.ktv-portal { width: 100%; max-width: 100%; }

/* Header */
.site-header-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 520px) minmax(0, 1fr);
  align-items: start;
  min-height: 96px;
  padding: 14px 0;
  gap: 16px;
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}
.header-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: var(--logo-h, 40px);
  justify-self: start;
  --logo-w: 120px;
  --logo-h: 40px;
}
.header-logo-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: var(--primary);
  color: #fff;
  font-size: 1rem;
  font-weight: 800;
  border-radius: var(--radius);
}
.header-logo-text {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--primary);
  white-space: nowrap;
}
.header-logo-img {
  width: auto;
  height: auto;
  max-width: min(var(--logo-w, 120px), 100%);
  max-height: var(--logo-h, 40px);
  object-fit: contain;
  object-position: left center;
  display: block;
}
.header-logo--has-img {
  gap: 0;
}
.header-search {
  display: flex;
  justify-content: center;
  width: 100%;
  justify-self: center;
}
.header-search-wrap { width: 100%; max-width: 520px; }
.header-search-form {
  display: flex;
  align-items: stretch;
  width: 100%;
  height: 40px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--background);
}
.header-search-input {
  flex: 1;
  height: 100%;
  border: none !important;
  background: transparent;
  padding: 0 12px;
  font-size: 0.875rem;
  outline: none;
  width: auto;
  border-radius: 0 !important;
}
.header-search-btn {
  flex-shrink: 0;
  height: 100%;
  padding: 0 18px;
  border: none;
  background: var(--primary);
  color: #fff;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
}
.header-search-btn:hover { background: var(--primary-hover); }
.header-search-hot {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  font-size: 12px;
  color: var(--muted);
  flex-wrap: wrap;
}
.header-search-hot-list {
  display: flex;
  gap: 10px;
  list-style: none;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
}
.header-search-hot-word { color: var(--muted); }
.header-search-hot-word:hover { color: var(--primary); }
.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-self: end;
  min-height: 40px;
  font-size: 14px;
  min-width: 0;
  max-width: 100%;
}
.header-username { font-weight: 600; }
.header-points { color: var(--muted); font-size: 13px; }

.header-actions-inline {
  display: flex;
  align-items: center;
  gap: 10px;
}
.header-user-menu {
  display: none;
  position: relative;
  align-items: center;
  z-index: 50;
}
.header-user-menu.is-open {
  z-index: 320;
}
.header-user-trigger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 140px;
  height: 34px;
  padding: 0 8px 0 4px;
  border: 1px solid var(--border);
  border-radius: 3px;
  background: var(--card);
  color: var(--foreground);
  font: inherit;
  cursor: pointer;
  box-sizing: border-box;
  position: relative;
}
.header-user-avatar {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  line-height: 26px;
  text-align: center;
  text-transform: uppercase;
}
.header-username-text {
  display: inline-block;
  max-width: 72px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 600;
}
.header-user-caret {
  font-size: 12px;
  color: var(--muted);
  flex-shrink: 0;
}
.header-user-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 300;
  min-width: 168px;
  padding: 6px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 3px;
  box-shadow: 0 12px 28px rgba(15, 23, 20, 0.14);
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.header-user-dropdown.is-fixed-panel {
  position: fixed;
  top: auto;
  right: auto;
  left: auto;
  margin: 0;
}
.header-user-dropdown[hidden] {
  display: none !important;
}
.header-user-panel-head {
  padding: 8px 10px 10px;
  margin-bottom: 4px;
  border-bottom: 1px solid var(--border);
}
.header-user-panel-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--foreground);
  word-break: break-all;
}
.header-user-panel-points {
  margin-top: 4px;
  font-size: 12px;
  color: var(--muted);
}
.header-user-item {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 9px 10px;
  border-radius: 3px;
  font-size: 13px;
  color: var(--foreground);
  text-decoration: none;
  box-sizing: border-box;
}
.header-user-item:hover {
  background: var(--primary-light);
  color: var(--primary-dark);
}
.header-user-item--danger {
  color: #b91c1c;
}
.header-user-item--danger:hover {
  background: #fef2f2;
  color: #b91c1c;
}

@media (max-width: 768px) {
.header-actions-inline {
  display: none !important;
}

.header-user-menu {
  display: inline-flex;
}
}

.site-header-nav {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 4px 8px;
  padding: 0 var(--site-padding-x) 12px;
  border-bottom: 1px solid var(--border);
  position: relative;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  min-width: 0;
}
.site-header-nav-measure {
  position: fixed;
  left: 0;
  top: 0;
  z-index: -1;
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 8px;
  padding: 0 var(--site-padding-x);
  width: max-content;
  height: 36px;
  overflow: hidden;
  visibility: hidden;
  pointer-events: none;
  white-space: nowrap;
  opacity: 0;
}
.site-header-nav-measure .nav-link {
  display: inline-flex;
  align-items: center;
  height: 36px;
  padding: 0 12px;
  font-size: 14px;
  white-space: nowrap;
  flex-shrink: 0;
}
/* 有滚动公告时，去掉导航底部分隔线，避免公告上方多一条横线 */
.site-header:has(.notice-wrap) .site-header-nav {
  border-bottom: none;
}
.site-header-nav .nav-link {
  display: inline-flex;
  align-items: center;
  height: 36px;
  padding: 0 12px;
  border-radius: var(--radius);
  font-size: 14px;
  color: var(--foreground);
  white-space: nowrap;
  flex-shrink: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  font: inherit;
  text-decoration: none;
}
.site-header-nav .nav-link:hover,
.site-header-nav .nav-link.active,
.site-header-nav .nav-link[aria-current="page"] {
  color: #fff;
  background: var(--primary);
}
.site-header-nav .nav-more-trigger:hover,
.site-header-nav .nav-more.is-open .nav-more-trigger {
  color: #fff;
  background: var(--primary);
}
.nav-more-item:hover,
.nav-more-item.active,
.nav-more-item[aria-current="page"] {
  background: var(--primary);
  color: #fff;
}

.nav-more {
  position: relative;
  flex-shrink: 0;
}
.nav-more-trigger {
  cursor: pointer;
}
.nav-more-caret {
  display: inline-block;
  margin-left: 2px;
  font-size: 12px;
  line-height: 1;
  transition: transform 0.15s;
}
.nav-more.is-open .nav-more-caret {
  transform: rotate(180deg);
}
.nav-more-backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  border: none;
  background: transparent;
  cursor: default;
  padding: 0;
}
.nav-more-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 50;
  min-width: 160px;
  max-width: min(280px, calc(100vw - 16px));
  max-height: min(70vh, 420px);
  overflow-y: auto;
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
}
.nav-more-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 10px 12px;
  border-radius: 3px;
  color: var(--foreground);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  box-sizing: border-box;
}

/* Promo */
.site-promo {
  display: flex;
  flex-direction: column;
  width: 100%;
  margin: 0;
  padding: 0;
}
.banner-area {
  width: 100%;
  max-width: none;
  margin-bottom: 0;
}
.banner-carousel {
  position: relative;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  background: #eef2f0;
  aspect-ratio: var(--banner-aspect, 1280 / 300);
  max-height: var(--banner-max-height, 300px);
}
.banner-carousel-track {
  display: flex;
  height: 100%;
  width: 100%;
  transition-property: transform;
  transition-timing-function: ease;
  will-change: transform;
}
.banner-carousel-slide {
  flex: 0 0 100%;
  width: 100%;
  max-width: 100%;
  height: 100%;
  min-width: 0;
  box-sizing: border-box;
  overflow: hidden;
  position: relative;
}
.banner-carousel-slide a {
  display: block;
  width: 100%;
  height: 100%;
}
.banner-carousel-slide img {
  width: 100%;
  height: 100%;
  max-height: none;
  object-fit: var(--banner-object-fit, cover);
  object-position: center;
  display: block;
}
.banner-carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.35);
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.banner-carousel-arrow:hover {
  background: rgba(0, 0, 0, 0.55);
}
.banner-carousel-arrow-prev { left: 10px; }
.banner-carousel-arrow-next { right: 10px; }
.banner-carousel-arrow-icon { display: block; }
.banner-carousel-dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 10px;
  z-index: 2;
  display: flex;
  justify-content: center;
  gap: 6px;
  pointer-events: none;
}
.banner-carousel-dot {
  pointer-events: auto;
  width: 8px;
  height: 8px;
  border: none;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
  cursor: pointer;
  padding: 0;
}
.banner-carousel-dot.active {
  background: var(--primary, #00bb61);
  width: 18px;
}
.notice-wrap {
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  background: var(--notice-bg, #fafcfb);
  height: var(--notice-height, 40px);
  min-height: var(--notice-height, 40px);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
  box-sizing: border-box;
  border: none;
}
.notice-icon { flex-shrink: 0; display: flex; align-items: center; }
.notice-icon-label {
  flex-shrink: 0;
  background: var(--notice-icon-label-bg, var(--primary));
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--notice-icon-label-radius, var(--radius));
}
.notice-icon-img {
  display: block;
  width: 22px;
  height: 22px;
  object-fit: contain;
}
.notice-icon-svg {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  line-height: 0;
}
.notice-wrap.notice-icon-none .notice-icon { display: none; }
.notice-viewport {
  overflow: hidden;
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  height: 100%;
  container-type: inline-size;
  container-name: notice-marquee;
}
.notice-track {
  display: flex;
  width: max-content;
  align-items: center;
  animation: notice-scroll-left 35s linear infinite;
  will-change: transform;
}
.notice-dir-right .notice-track {
  animation-name: notice-scroll-right;
}
.notice-track span {
  display: inline-block;
  flex-shrink: 0;
  /* 段尾留出整段可视宽度，下一段文字才从右侧进入，不会在中间突然出现 */
  padding-right: 100%; /* 相对公告可视区，避免 60vw 撑开页面滚动宽度 */
  padding-right: max(4rem, 100cqw);
  white-space: nowrap;
  font-size: var(--notice-font-size, 13px);
  color: var(--notice-color, var(--foreground));
  font-weight: 400;
  line-height: 1.4;
  box-sizing: content-box;
}
@keyframes notice-scroll-left {
0% {
  transform: translateX(0);
}

100% {
  transform: translateX(-50%);
}
}

@keyframes notice-scroll-right {
0% {
  transform: translateX(-50%);
}

100% {
  transform: translateX(0);
}
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  margin-top: 24px;
  background: transparent;
}
.site-footer-main {
  display: grid;
  width: 100%;
  box-sizing: border-box;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 20px;
  padding: 28px var(--site-padding-x) 10px;
}
.site-footer-col-title {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  margin: 0 0 12px;
  font-size: 14px;
  font-weight: 700;
  color: var(--foreground);
}
.site-footer-col-title::after {
  content: "";
  display: block;
  width: 20px;
  height: 3px;
  border-radius: 3px;
  background: var(--primary);
}
.site-footer-col-links {
  list-style: none;
  margin: 0;
  padding: 0;
}
.site-footer-col-links li { margin: 0 0 8px; }
.site-footer-col-links a {
  font-size: 13px;
  color: var(--muted);
  text-decoration: none;
}
.site-footer-col-links a:hover { color: var(--primary); }
.site-footer-aside { min-width: 0; }
.site-footer-qr img, .site-footer-qr-ph {
  width: 100px;
  height: 100px;
  object-fit: cover;
  border-radius: 3px;
  background: #eef5f1;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 12px;
}
.site-footer-qr-cap { font-size: 12px; color: var(--muted); margin-top: 6px; }
.site-footer-contact-line { font-size: 13px; margin: 6px 0; color: var(--muted); }
.site-footer-contact-line a { text-decoration: none; color: inherit; }
.site-footer-contact-line a:hover { color: var(--primary); }
.site-footer-friends {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  align-items: center;
  /* 与滚动公告一致：左右 12px 内边距（站点 --site-padding-x 桌面为 0） */
  padding: 10px 12px;
  border: none;
  font-size: 13px;
  background: var(--friends-bg, #fafcfb);
  box-sizing: border-box;
  min-height: var(--friends-height, 40px);
}
.site-footer:has(.site-footer-friends) {
  border-top: none;
}
.site-footer-friends-label { color: var(--muted); margin-right: 4px; }
.site-footer-friends a { color: var(--foreground); text-decoration: none; }
.site-footer-friends a:hover { color: var(--primary); }
.site-footer-slogan { margin-left: 10px; color: var(--footer-bottom-slogan-color, var(--muted)); font-size: 13px; }
.site-footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  padding: 18px var(--site-padding-x);
  font-size: 13px;
  color: var(--muted);
  border-top: 1px solid var(--border);
}
.site-footer-brand-name { color: var(--footer-bottom-brand-color, var(--foreground)); font-weight: 700; }
.site-footer-brand-link { text-decoration: none; color: inherit; }
.site-footer-brand-link:hover .site-footer-brand-name { opacity: 0.85; }
html.dark .site-footer-brand-name {
  color: var(--footer-bottom-brand-color-dark, var(--footer-bottom-brand-color, var(--foreground)));
}
html.dark .site-footer-slogan {
  color: var(--footer-bottom-slogan-color-dark, var(--footer-bottom-slogan-color, var(--muted)));
}
.site-footer-bottom-meta { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.site-footer-bottom-meta a { color: var(--muted); text-decoration: none; }
.site-footer-bottom-meta a:hover { color: var(--primary); }

/* Search page */
.search-page { max-width: 1120px; width: 100%; margin: 0 auto; }
.search-result-link:hover { border-color: var(--primary); }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  padding: 0 14px;
  border-radius: var(--radius);
  border: 1px solid var(--primary);
  background: var(--primary);
  color: #fff !important;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none !important;
}
.btn:hover { background: var(--primary-hover); border-color: var(--primary-hover); color: #fff !important; }
.btn-sm { height: 32px; padding: 0 12px; font-size: 13px; }
.btn-outline { background: #fff; color: var(--primary) !important; }
.btn-outline:hover { background: var(--primary) !important; border-color: var(--primary) !important; color: #fff !important; }
.btn-primary { background: var(--primary); color: #fff !important; }
.btn-primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); color: #fff !important; }

@media (max-width: 1100px) {
.site-header-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, auto);
  grid-template-areas:
  "logo actions"
  "search search";
  align-items: center;
  column-gap: 8px;
  row-gap: 8px;
  min-height: 0;
  padding: 10px var(--site-padding-x);
  width: 100%;
  max-width: 100%;
  min-width: 0;
  /* 不可 hidden：会裁切右上角用户头像下拉 */
  overflow: visible;
}

.header-logo {
  grid-area: logo;
  min-width: 0;
  max-width: 100%;
  min-height: 0;
  overflow: hidden;
  align-self: center;
}

.header-logo-img {
  width: auto;
  height: auto;
  max-width: min(var(--logo-w, 120px), 46vw);
  max-height: calc(var(--logo-h, 40px) * 0.88);
  object-fit: contain;
  object-position: left center;
}

.header-actions {
  grid-area: actions;
  justify-self: end;
  justify-content: flex-end;
  flex-shrink: 1;
  min-width: 0;
  max-width: 100%;
  width: auto;
  gap: 6px;
  font-size: 13px;
  min-height: 36px;
  overflow: visible;
}

.header-search {
  grid-area: search;
  justify-self: stretch;
  width: 100%;
}

.header-search-wrap {
  max-width: none;
}

.header-points {
  font-size: 12px;
}

.site-header-nav {
  padding: 0 var(--site-padding-x) 10px;
  height: 40px;
  gap: 4px;
}

.site-header-nav-measure {
  padding: 0 var(--site-padding-x);
  gap: 4px;
}

.site-header-nav .nav-link,
  .site-header-nav-measure .nav-link {
  padding: 0 10px;
  font-size: 13px;
  height: 32px;
}

.site-main {
  padding: 16px;
}
}

@media (max-width: 768px) {
.header-logo-img {
  max-width: min(var(--logo-w, 120px), 50vw);
  max-height: calc(var(--logo-h, 40px) * 0.72);
}
}

@media (max-width: 480px) {
.header-actions {
  gap: 4px;
  font-size: 12px;
  min-width: 0;
  max-width: 52%;
  justify-content: flex-end;
  flex-wrap: nowrap;
}

.header-logo {
  max-width: 46%;
}

.header-logo-text {
  font-size: 0.9375rem;
  overflow: hidden;
  text-overflow: ellipsis;
}

.header-logo-img {
  max-width: min(var(--logo-w, 120px), 40vw);
  max-height: calc(var(--logo-h, 40px) * 0.55);
}

.header-user-trigger {
  max-width: 118px;
  padding-right: 6px;
}

.header-username-text {
  max-width: 56px;
}

.header-actions .btn-sm,
.header-actions .header-register {
  padding: 0 8px;
  height: 28px;
  font-size: 12px;
  flex-shrink: 0;
}

.header-actions > .header-username {
  font-size: 12px;
  white-space: nowrap;
}

/* 未登录：窄屏隐藏「登录」文字链，避免顶栏撑出横向滚动 */
.header-actions > a.header-username[href="/login"],
.header-actions > a.header-username[href*="/login"] {
  display: none !important;
}

.theme-toggle {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
}

.header-search-hot {
  margin-top: 6px;
  gap: 4px 6px;
  max-height: none;
  overflow: visible;
  flex-wrap: wrap;
}

.header-search-hot-list {
  gap: 6px;
  flex-wrap: wrap;
}

.site-header-nav {
  padding: 0 2px 8px;
  height: 36px;
}

.site-header-nav .nav-link,
.site-header-nav-measure .nav-link {
  padding: 0 8px;
  font-size: 12px;
  height: 30px;
}

.nav-more {
  margin-left: 0;
}

.nav-more-dropdown {
  right: 0;
  left: auto;
  max-width: min(240px, calc(100vw - 24px));
}

.site-footer-col-links li {
  margin: 0 0 4px;
}

.site-footer-main {
  gap: 14px 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}
}

/* 极窄屏继续等比缩小 Logo */
@media (max-width: 400px) {
.site-header-top {
  column-gap: 6px;
  row-gap: 6px;
  padding: 8px 2px;
}

.header-logo-img {
  max-width: min(var(--logo-w, 120px), 38vw);
  max-height: calc(var(--logo-h, 40px) * 0.48);
}

.header-user-trigger {
  max-width: 36px;
  padding: 0 4px;
  gap: 0;
  justify-content: center;
}

.header-username-text,
.header-user-caret {
  display: none;
}

.header-user-avatar {
  width: 28px;
  height: 28px;
  line-height: 28px;
}

.header-actions > .header-username {
  display: none;
}

/* 小屏保留搜索框下方热搜，允许换行完整显示 */
.header-search-hot {
  display: flex !important;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
  max-height: none !important;
  overflow: visible !important;
  margin-top: 6px;
}

.header-search-btn {
  padding: 0 12px;
  font-size: 12px;
}

.site-footer-main {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 12px 10px;
  padding: 14px 2px 8px;
}

.site-footer-aside {
  gap: 10px 14px;
}

.site-footer-qr img,
.site-footer-qr-ph {
  width: 84px;
  height: 84px;
}

.site-footer-bottom {
  padding: 12px 2px 16px;
}

.site-footer-brand-name {
  font-size: 13px;
  line-height: 1.4;
  word-break: break-word;
}
}

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

.site-breadcrumb {
  width: 100%;
  background: transparent;
  border-bottom: none;
}

.site-breadcrumb-inner {
  width: 100%;
  max-width: var(--site-content-max, 1280px);
  margin: 0 auto;
  padding: 10px 16px 6px;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 12px;
  line-height: 1.45;
  color: #777;
}

.site-breadcrumb-list {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
  min-width: 0;
  overflow: hidden;
  flex: 1 1 auto;
  width: auto;
}

.site-breadcrumb-welcome {
  margin: 0 0 0 auto;
  padding: 0;
  flex-shrink: 0;
  max-width: 42%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  line-height: 1.45;
  color: #777;
  text-align: right;
}

.site-breadcrumb-welcome-name {
  color: var(--primary, #00bb61);
  font-weight: 600;
}

.site-breadcrumb-item {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  flex-shrink: 0;
}

.site-breadcrumb-item:last-child {
  flex-shrink: 1;
  min-width: 0;
}

.site-breadcrumb-sep {
  margin: 0 7px;
  color: #999;
  font-size: 12px;
  line-height: 1;
  flex-shrink: 0;
}

.site-breadcrumb-home-icon {
  display: block;
  color: #777;
}

.site-breadcrumb-link {
  display: inline-flex;
  align-items: center;
  color: #777;
  text-decoration: none;
  white-space: nowrap;
}

.site-breadcrumb-link:hover {
  color: var(--primary);
}

.site-breadcrumb-link:hover .site-breadcrumb-home-icon {
  color: var(--primary);
}

.site-breadcrumb-current {
  color: #777;
  font-weight: 400;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

/* ===== Color mode: light / dark ===== */
html.dark {
  color-scheme: dark;
  --background: #0c0f0e;
  --foreground: #e8eeeb;
  --card: #141918;
  --muted: #94a39a;
  --primary-light: rgba(0, 187, 97, 0.16);
  --border: #2a3330;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.35);
  --bg: #0c0f0e;
  --text: #e8eeeb;
}
html.dark body,
html.dark .site-frame,
html.dark .site-shell,
html.dark .site-main {
  background: var(--background);
  color: var(--foreground);
}
html.dark .site-header {
  background: transparent;
}
html.dark .site-footer {
  background: transparent;
}
html.dark .site-footer-friends {
  background: var(--friends-bg, #1a221e);
}
html.dark .header-search-form {
  background: transparent;
  border-color: var(--border);
}
html.dark .header-search-input,
html.dark .header-user-trigger,
html.dark .header-user-dropdown,
html.dark .nav-more-dropdown {
  background: transparent;
  color: var(--foreground);
  border-color: var(--border);
}
html.dark .header-user-dropdown,
html.dark .nav-more-dropdown {
  background: var(--card);
}
html.dark .header-search-btn {
  color: #fff;
}
html.dark .admin-review-alert {
  background: #3a2718;
  border-bottom-color: #7a4a22;
}
html.dark .user-reject-alert {
  background: #3b1515;
  border-bottom-color: #7f1d1d;
}
html.dark .user-reject-alert .admin-review-alert-text {
  color: #fecaca;
}
html.dark .user-reject-alert .admin-review-alert-text strong {
  color: #fca5a5;
}
html.dark .user-reject-alert .admin-review-alert-close {
  color: #fca5a5;
}
html.dark .notice-wrap {
  background: #1a221e !important;
  border-color: #2a3330;
}
html.dark .notice-track span {
  color: #d7e0db !important;
}
html.dark .notice-icon-svg {
  color: var(--primary);
}
html.dark .site-breadcrumb,
html.dark .site-breadcrumb-inner {
  background: transparent;
  color: #9aa8a0;
}
html.dark .site-breadcrumb-link,
html.dark .site-breadcrumb-current,
html.dark .site-breadcrumb-home-icon,
html.dark .site-breadcrumb-sep,
html.dark .site-breadcrumb-welcome {
  color: #9aa8a0;
}
html.dark .site-breadcrumb-welcome-name {
  color: var(--primary);
}
html.dark .site-breadcrumb-link:hover,
html.dark .site-breadcrumb-link:hover .site-breadcrumb-home-icon {
  color: var(--primary);
}
html.dark .site-header-nav {
  background: transparent;
  border-color: transparent;
}
html.dark .site-header-nav .nav-link {
  color: var(--foreground);
}
html.dark .site-header-nav .nav-link:hover,
html.dark .site-header-nav .nav-link.active,
html.dark .site-header-nav .nav-link[aria-current="page"],
html.dark .site-header-nav .nav-more-trigger:hover,
html.dark .site-header-nav .nav-more.is-open .nav-more-trigger {
  color: #fff;
  background: var(--primary);
}
html.dark .banner-carousel {
  background: #1a221e;
}
html.dark .site-footer-qr-ph {
  background: #1a221e;
}
html.dark .btn-outline {
  background: transparent !important;
  color: var(--primary) !important;
}
html.dark .header-actions-inline a,
html.dark .header-username {
  color: var(--foreground);
}
html.dark .header-points {
  color: var(--muted);
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: none;
  border-radius: var(--radius);
  background: transparent;
  color: var(--primary);
  cursor: pointer;
  flex-shrink: 0;
  box-sizing: border-box;
}
.theme-toggle:hover {
  color: var(--primary-hover);
}
.theme-toggle svg {
  display: block;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}
.theme-toggle svg[hidden] {
  display: none !important;
}

/* ===== Responsive: footer / chrome extras ===== */
@media (max-width: 900px) {
  :root {
    --site-padding-x: 2px;
  }
  html, body {
    overflow-x: hidden !important;
    overflow-y: auto !important;
    max-width: 100% !important;
    width: 100%;
  }
  .site-frame, .site-shell, .site-header, .site-main, .site-footer {
    max-width: 100%;
    min-width: 0;
  }
  .site-header-top,
  .site-header-nav,
  .site-main,
  .site-footer-main,
  .site-footer-bottom,
  .site-breadcrumb-inner {
    padding-left: 2px;
    padding-right: 2px;
    box-sizing: border-box;
    max-width: 100%;
  }
  .site-footer-friends,
  .notice-wrap {
    padding-left: 12px;
    padding-right: 12px;
    box-sizing: border-box;
    max-width: 100%;
  }
  .site-header-top {
    width: 100%;
    min-width: 0;
  }
  .header-search,
  .header-search-wrap,
  .header-search-form {
    max-width: 100%;
    min-width: 0;
  }
  .site-footer-friends {
    overflow-wrap: anywhere;
  }
  .site-footer-main {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 16px 12px;
    padding-top: 18px;
    padding-bottom: 10px;
  }
  .site-footer-col {
    min-width: 0;
  }
  .site-footer-aside {
    grid-column: 1 / -1;
    min-width: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 12px 16px;
    align-items: flex-start;
  }
  .site-footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    padding-top: 14px;
    padding-bottom: 16px;
    min-width: 0;
  }
  .site-footer-bottom-brand,
  .site-footer-brand-name,
  .site-footer-slogan {
    max-width: 100%;
    overflow-wrap: anywhere;
    word-break: break-word;
  }
  .site-footer-col-links li {
    margin: 0 0 4px;
  }
  .notice-wrap,
  .notice-viewport {
    overflow: hidden;
    max-width: 100%;
  }
}

@media (max-width: 560px) {
  :root {
    --site-padding-x: 2px;
  }
  .site-footer-main {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 14px 10px;
  }
  .site-footer-col-title {
    font-size: 13px;
    gap: 6px;
    margin: 0 0 8px;
  }
  .site-footer-col-links a {
    font-size: 12px;
    line-height: 1.35;
  }
  .site-footer-slogan {
    display: block;
    margin-left: 0;
    margin-top: 4px;
  }
  .header-search-form {
    height: 36px;
  }
  .theme-toggle {
    width: 30px;
    height: 30px;
  }
  .banner-carousel-arrow {
    width: 30px;
    height: 30px;
  }
  .site-header-top {
    padding-left: 2px;
    padding-right: 2px;
  }
}

@media (max-width: 400px) {
  .site-footer-main {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

/* ===== 宽屏右侧悬浮工具（≥1281px，落在 1280 版心外侧） ===== */
.site-float-tools {
  display: none;
}

@media (min-width: 1281px) {
.site-float-tools {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  position: fixed;
  z-index: 60;
  right: max(12px, calc((100vw - var(--site-width)) / 2 - 52px));
  top: 50%;
  bottom: auto;
  transform: translateY(-50%);
  pointer-events: none;
}

.site-float-tools > * {
  pointer-events: auto;
}

.site-float-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 3px;
  background: var(--primary);
  color: #fff;
  cursor: pointer;
  text-decoration: none;
  box-shadow: 0 2px 10px color-mix(in srgb, var(--primary) 35%, transparent);
  transition: background 0.15s ease, transform 0.15s ease, opacity 0.15s ease, box-shadow 0.15s ease;
}

.site-float-btn:hover,
.site-float-btn:focus-visible {
  background: var(--primary-hover);
  color: #fff;
  outline: none;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px color-mix(in srgb, var(--primary) 45%, transparent);
}

.site-float-btn svg {
  display: block;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.site-float-btn--wechat .site-float-wechat-icon {
  width: 22px;
  height: 22px;
}

/* 主题按钮：浅色=月亮，深色=太阳（不依赖 SVG.hidden） */
.site-float-btn--theme [data-theme-icon-sun] {
  display: none !important;
}
.site-float-btn--theme [data-theme-icon-moon] {
  display: block !important;
}
html.dark .site-float-btn--theme [data-theme-icon-moon],
html[data-theme="dark"] .site-float-btn--theme [data-theme-icon-moon] {
  display: none !important;
}
html.dark .site-float-btn--theme [data-theme-icon-sun],
html[data-theme="dark"] .site-float-btn--theme [data-theme-icon-sun] {
  display: block !important;
}

.site-float-btn--top {
  opacity: 0.55;
}

.site-float-btn--top.is-active {
  opacity: 1;
}

.site-float-wechat {
  position: relative;
}

.site-float-wechat-panel {
  position: absolute;
  right: calc(100% + 12px);
  top: 50%;
  transform: translateY(-50%);
  width: 148px;
  padding: 10px;
  background: var(--card, #fff);
  border: 1px solid var(--border, #dde5e1);
  border-radius: 3px;
  box-shadow: 0 10px 28px rgba(15, 23, 20, 0.16);
  text-align: center;
}

.site-float-wechat-panel[hidden] {
  display: none !important;
}

.site-float-wechat-panel img {
  display: block;
  width: 128px;
  height: 128px;
  object-fit: contain;
  margin: 0 auto;
  background: #fff;
}

.site-float-wechat-ph {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 128px;
  height: 128px;
  margin: 0 auto;
  background: #f3f5f4;
  color: var(--muted, #64748b);
  font-size: 13px;
}

.site-float-wechat-cap {
  margin-top: 8px;
  font-size: 12px;
  line-height: 1.4;
  color: var(--foreground, #1a1f1c);
}

.site-float-wechat-link {
  display: inline-block;
  margin-top: 6px;
  font-size: 12px;
  color: var(--primary, #00bb61);
  text-decoration: none;
}

.site-float-wechat-link:hover {
  text-decoration: underline;
}

.site-float-wechat-panel::after {
  content: "";
  position: absolute;
  right: -6px;
  top: 50%;
  width: 10px;
  height: 10px;
  background: var(--card, #fff);
  border-right: 1px solid var(--border, #dde5e1);
  border-bottom: 1px solid var(--border, #dde5e1);
  transform: translateY(-50%) rotate(-45deg);
}

html.dark .site-float-btn {
  background: var(--primary);
  color: #fff;
}

html.dark .site-float-btn:hover,
html.dark .site-float-btn:focus-visible {
  background: var(--primary-hover);
  color: #fff;
}

html.dark .site-float-wechat-panel {
  background: var(--card);
  border-color: var(--border);
}

html.dark .site-float-wechat-panel::after {
  background: var(--card);
  border-color: var(--border);
}

html.dark .site-float-wechat-ph {
  background: #1a221e;
}
}