:root {
  --bg: #faf6f1;
  --bg-deep: #f0e4d8;
  --panel: rgba(255, 252, 248, 0.85);
  --panel-solid: #fffaf5;
  --panel-2: #fff5eb;
  --text: #3d342c;
  --muted: #6b5d52;
  --brand: #c9785c;
  --brand-2: #d9a066;
  --brand-soft: rgba(201, 120, 92, 0.12);
  --line: rgba(90, 70, 55, 0.12);
  --line-strong: rgba(90, 70, 55, 0.18);
  --ok: #5a9d6e;
  --shadow-sm: 0 4px 20px rgba(61, 52, 44, 0.06);
  --shadow-md: 0 12px 40px rgba(61, 52, 44, 0.08);
  --glow-warm: rgba(255, 200, 160, 0.45);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text);
  line-height: 1.65;
  background-color: var(--bg);
  background-image:
    radial-gradient(ellipse 120% 80% at 100% 0%, var(--glow-warm) 0%, transparent 55%),
    radial-gradient(ellipse 90% 70% at 0% 100%, rgba(255, 218, 185, 0.35) 0%, transparent 50%),
    radial-gradient(ellipse 60% 50% at 70% 60%, rgba(232, 196, 176, 0.25) 0%, transparent 45%),
    linear-gradient(165deg, #fdf9f5 0%, #f6ebe1 38%, #eddcc8 100%);
  background-attachment: fixed;
}

/* 细腻纹理，增加纸质/织物感 */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.4;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 200px 200px;
  mix-blend-mode: multiply;
}

body > * {
  position: relative;
  z-index: 1;
}

/* 手机布局：device-layout.js 在视口 ≤768px 时为 html 添加 .layout-mobile */
html.layout-mobile body {
  overflow-x: clip;
  max-width: 100vw;
  touch-action: manipulation;
}

html.layout-mobile .wx-login-embed {
  min-height: 260px;
  max-width: min(300px, 88vw);
}

html.layout-mobile .login-qr-modal.is-open,
html.layout-mobile #loginModal.is-open {
  padding: max(8px, env(safe-area-inset-top, 0px)) max(8px, env(safe-area-inset-right, 0px))
    max(10px, env(safe-area-inset-bottom, 0px)) max(8px, env(safe-area-inset-left, 0px));
  align-items: end;
}

html.layout-mobile .login-qr-modal .qr-dialog,
html.layout-mobile #loginModal .login-dialog {
  width: 100%;
  max-width: 100%;
  max-height: min(92dvh, 720px);
  border-radius: 16px 16px 0 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* 用 file:// 打开首页时的提示条（需盖过 body > * 的 z-index） */
body > .file-protocol-banner {
  position: relative;
  z-index: 25;
}

.file-protocol-banner {
  background: linear-gradient(90deg, #fff3e0 0%, #ffe8d6 100%);
  border-bottom: 1px solid var(--line-strong);
  color: var(--text);
  font-size: 0.9rem;
  line-height: 1.55;
  padding: 0.65rem 0;
}

.file-protocol-inner code {
  font-size: 0.85em;
  padding: 0.1em 0.35em;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.7);
}

.file-protocol-inner a {
  color: var(--brand);
  text-decoration: underline;
  text-underline-offset: 2px;
}

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

.container {
  width: min(1120px, 92%);
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 250, 245, 0.78);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.6) inset;
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  gap: 20px;
  position: relative;
}

.header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-shrink: 0;
}

/* .btn 的 display 会盖掉 [hidden]，登入按钮需在已登录时真正隐藏 */
.header-actions #btnLogin[hidden] {
  display: none !important;
}

.user-bar[hidden] {
  display: none !important;
}

.user-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.user-meta {
  font-size: 0.86rem;
  color: var(--muted);
  max-width: min(160px, 28vw);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 首页「我的反馈」：有未读商家回复时显示角标 */
.header-nav-badge-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  vertical-align: middle;
}

.feedback-unread-badge {
  position: absolute;
  top: -4px;
  right: -8px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: #c53030;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 16px;
  text-align: center;
  box-shadow: 0 0 0 2px var(--panel-solid);
  pointer-events: none;
  box-sizing: border-box;
}

/* 首页右上角：通知铃铛 + 下拉 */
.header-notif-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  vertical-align: middle;
}

.header-notif-btn {
  position: relative;
  padding-left: 10px;
  padding-right: 10px;
}

.header-notif-icon {
  font-size: 1.05rem;
  line-height: 1;
  display: inline-block;
}

.header-notif-dot {
  position: absolute;
  top: 4px;
  right: 6px;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #c53030;
  box-shadow: 0 0 0 2px var(--panel-solid);
  pointer-events: none;
}

.header-notif-count {
  position: absolute;
  top: -2px;
  right: -2px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: #c53030;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 16px;
  text-align: center;
  box-shadow: 0 0 0 2px var(--panel-solid);
  pointer-events: none;
  box-sizing: border-box;
}

.header-notif-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: min(92vw, 360px);
  max-height: min(70vh, 420px);
  display: flex;
  flex-direction: column;
  background: var(--panel-solid);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow-md);
  z-index: 85;
  overflow: hidden;
}

/* 默认收起：仅 HTML hidden 时整块不占位、不可见 */
.header-notif-panel[hidden] {
  display: none !important;
}

.header-notif-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
}

.header-notif-panel-title {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text);
}

.header-notif-clear {
  font-size: 0.78rem !important;
  padding: 4px 8px !important;
}

.header-notif-list {
  list-style: none;
  margin: 0;
  padding: 6px 0;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
}

.header-notif-item {
  display: block;
  padding: 10px 14px;
  text-decoration: none;
  color: inherit;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  transition: background 0.15s ease;
}

.header-notif-item:hover {
  background: rgba(0, 0, 0, 0.04);
}

.header-notif-item strong {
  display: block;
  font-size: 0.88rem;
  margin-bottom: 4px;
  color: var(--text);
}

.header-notif-item-desc {
  display: block;
  font-size: 0.82rem;
  color: var(--text);
  line-height: 1.45;
}

.header-notif-item-meta {
  display: block;
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 4px;
  line-height: 1.35;
}

.header-notif-empty {
  margin: 0;
  padding: 20px 14px;
  font-size: 0.88rem;
  color: var(--muted);
  text-align: center;
}

.btn-sm {
  padding: 8px 12px;
  font-size: 0.86rem;
  border-radius: 10px;
}

.logo-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
  flex-shrink: 0;
  min-width: 0;
}

.logo-game-thumb {
  display: block;
  height: 44px;
  width: auto;
  max-width: min(100px, 22vw);
  object-fit: cover;
  object-position: center;
  border-radius: 10px;
  border: 1px solid var(--line);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
  flex-shrink: 0;
}

.logo {
  font-size: clamp(0.88rem, 2.4vw, 1.05rem);
  font-weight: 700;
  letter-spacing: 0.3px;
  color: var(--text);
  background: linear-gradient(135deg, var(--brand), #a85d45);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  max-width: min(52vw, 280px);
  line-height: 1.25;
}

.main-nav {
  display: flex;
  gap: 18px;
  color: var(--muted);
  font-size: 0.95rem;
}

.main-nav a,
.main-nav .main-nav-linklike {
  white-space: nowrap;
}

.main-nav a:hover,
.footer-links a:hover {
  color: var(--brand);
}

.main-nav a.is-active {
  color: var(--brand);
  font-weight: 700;
}

.main-nav .main-nav-linklike {
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  font: inherit;
  font-size: inherit;
  color: inherit;
  cursor: pointer;
  text-align: left;
}

.main-nav .main-nav-linklike:hover {
  color: var(--brand);
}

.feedback-modal-label {
  display: block;
  margin: 12px 0 8px;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text);
}

.feedback-modal-textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 0.9rem;
  font-family: inherit;
  line-height: 1.5;
  resize: vertical;
  min-height: 120px;
}

.feedback-modal-meta {
  margin: 6px 0 0;
  font-size: 0.78rem;
  color: var(--muted);
}

.feedback-modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 16px;
}

.menu-toggle {
  display: none;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.7);
  color: var(--text);
  border-radius: 10px;
  width: 40px;
  height: 40px;
  cursor: pointer;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  padding: 10px 18px;
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

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

.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--brand), #b86a4f);
  box-shadow: 0 4px 16px rgba(201, 120, 92, 0.35);
}

.btn-primary:hover {
  box-shadow: 0 6px 22px rgba(201, 120, 92, 0.42);
}

.btn-ghost {
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.6);
  color: var(--text);
}

.btn-ghost:hover {
  border-color: var(--brand);
  color: var(--brand);
}

.block {
  width: 100%;
}

.hero {
  padding: 72px 0 56px;
  position: relative;
}

.hero::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 20%;
  transform: translateX(-50%);
  width: min(900px, 90vw);
  height: 280px;
  background: radial-gradient(ellipse, rgba(255, 220, 190, 0.35) 0%, transparent 70%);
  pointer-events: none;
  z-index: -1;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 28px;
  align-items: start;
}

.kicker {
  display: inline-flex;
  margin: 0 0 10px;
  color: var(--ok);
  font-weight: 600;
  font-size: 0.92rem;
  letter-spacing: 0.02em;
}

.hero-copy h1 {
  margin: 0;
  font-size: clamp(1.9rem, 3.6vw, 2.85rem);
  line-height: 1.2;
  color: var(--text);
  font-weight: 800;
}

.lead {
  color: var(--muted);
  max-width: 56ch;
  font-size: 1.05rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 22px 0;
}

.hero-tags {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-tags li {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 12px;
  color: var(--muted);
  font-size: 0.88rem;
  background: rgba(255, 255, 255, 0.5);
}

.hero-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 22px;
  height: fit-content;
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(8px);
}

.hero-card h2 {
  margin-top: 0;
  margin-bottom: 14px;
  font-size: 1.15rem;
  color: var(--text);
}

.hero-card ul {
  list-style: none;
  margin: 0 0 18px;
  padding: 0;
}

.hero-card li {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 0;
  border-bottom: 1px dashed var(--line);
  font-size: 0.95rem;
}

.hero-card li:last-child {
  border-bottom: 0;
}

.hero-card strong {
  color: var(--brand);
  font-weight: 700;
}

.hero-hot-badge {
  display: inline-block;
  margin-left: 6px;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--brand), #b86a4f);
  color: #fff;
  vertical-align: middle;
}

.section {
  padding: 56px 0;
}

.section-alt {
  background: linear-gradient(180deg, rgba(255, 248, 240, 0.65) 0%, rgba(245, 232, 220, 0.4) 100%);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.section-title {
  margin-bottom: 26px;
  text-align: center;
}

.section-title h2 {
  margin: 0;
  font-size: 1.65rem;
  font-weight: 800;
  color: var(--text);
}

.section-title p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 1rem;
}

/* 首页「玩家评价」：标题居中，右上角「全部评论」 */
.reviews-section-head {
  position: relative;
  margin-bottom: 26px;
}

.reviews-section-head .section-title {
  margin-bottom: 0;
}

.reviews-all-link {
  position: absolute;
  top: 4px;
  right: 0;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 16px;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--brand);
  text-decoration: none;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--panel-solid);
  box-shadow: var(--shadow-sm);
  transition: color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.reviews-all-link:hover {
  color: #a85f46;
  border-color: rgba(201, 120, 92, 0.35);
  box-shadow: var(--shadow-md);
}

@media (max-width: 640px) {
  .reviews-all-link {
    position: static;
    margin: 14px auto 0;
  }

  .reviews-section-head {
    display: flex;
    flex-direction: column;
    align-items: center;
  }
}

.cards {
  display: grid;
  gap: 16px;
}

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

.cards-services {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.card {
  display: flex;
  flex-direction: column;
  min-height: 180px;
  background: var(--panel-solid);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 22px;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.card:hover {
  border-color: rgba(201, 120, 92, 0.25);
  box-shadow: var(--shadow-md);
}

.card .card-title {
  margin: 0 0 12px;
  color: var(--text);
  font-size: 1.12rem;
  text-align: center;
  flex-shrink: 0;
}

.card .card-desc {
  flex: 1;
  margin: 0;
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.5;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 0;
}

/* 未使用 card-title / card-desc 类名的卡片（如套餐价目）保持默认排版 */
.pricing-grid .card,
#reviewsGrid .card {
  display: block;
  min-height: 0;
}

.pricing-grid .card h3,
#reviewsGrid .card h3 {
  margin-top: 0;
  text-align: inherit;
}

.pricing-grid .card p,
#reviewsGrid .card p {
  display: block;
  text-align: inherit;
}

.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px;
}

.step {
  display: flex;
  flex-direction: column;
  min-height: 140px;
  background: var(--panel-solid);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px 16px;
  box-shadow: var(--shadow-sm);
}

.step .step-index {
  display: block;
  width: 100%;
  text-align: center;
  font-weight: 800;
  font-size: 0.85rem;
  color: var(--brand);
  margin: 0 0 10px;
  letter-spacing: 0.06em;
  flex-shrink: 0;
}

.step .step-desc {
  flex: 1;
  margin: 0;
  color: var(--text);
  font-size: 0.95rem;
  line-height: 1.45;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 0;
}

.price-card .price {
  font-size: 1.85rem;
  font-weight: 800;
  color: var(--text);
  margin: 4px 0 12px;
}

.price-card ul {
  list-style: none;
  margin: 0 0 16px;
  padding: 0;
}

.price-card li {
  color: var(--muted);
  padding: 7px 0;
  font-size: 0.95rem;
  border-bottom: 1px solid var(--line);
}

.price-card li:last-child {
  border-bottom: 0;
}

.featured {
  border-color: rgba(201, 120, 92, 0.45);
  background: linear-gradient(180deg, #fffaf6 0%, var(--panel-2) 100%);
  box-shadow: 0 10px 36px rgba(201, 120, 92, 0.18);
  position: relative;
}

.badge {
  position: absolute;
  right: 14px;
  top: -11px;
  font-size: 0.78rem;
  padding: 4px 12px;
  background: linear-gradient(135deg, var(--brand), #b86a4f);
  border-radius: 999px;
  color: #fff;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(201, 120, 92, 0.35);
}

.quote-card-head {
  margin-bottom: 8px;
}

.quote-kind {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  letter-spacing: 0.02em;
}

.quote-kind--good {
  background: rgba(90, 157, 110, 0.18);
  color: #2f6b42;
}

.quote-kind--bad {
  background: rgba(180, 90, 90, 0.14);
  color: #8f3a3a;
}

.quote p {
  margin-bottom: 10px;
  color: var(--text);
  font-style: italic;
}

.quote span {
  color: var(--muted);
  font-size: 0.92rem;
}

.quote .quote-card-author {
  color: var(--muted);
  font-size: 0.92rem;
}

/* 全部评论：好评 / 差评 筛选 */
.reviews-filter-tabs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 0 0 22px;
}

.reviews-filter-tab {
  margin: 0;
  padding: 8px 20px;
  font-size: 0.9rem;
  font-weight: 700;
  font-family: inherit;
  color: var(--muted);
  background: var(--panel-solid);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition:
    color 0.15s ease,
    border-color 0.15s ease,
    box-shadow 0.15s ease,
    background 0.15s ease;
}

.reviews-filter-tab:hover {
  color: var(--text);
  border-color: rgba(201, 120, 92, 0.3);
}

.reviews-filter-tab.is-active {
  color: #fff;
  background: linear-gradient(135deg, var(--brand), #b86a4f);
  border-color: transparent;
  box-shadow: 0 4px 14px rgba(201, 120, 92, 0.35);
}

.reviews-filter-empty {
  grid-column: 1 / -1;
  margin: 0;
  padding: 28px 16px;
  text-align: center;
  color: var(--muted);
  font-size: 0.95rem;
}

/* 订单页：发表评价 — 好评 / 差评 */
.orders-review-kind {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 4px;
}

.orders-review-kind-btn {
  margin: 0;
  padding: 8px 22px;
  font-size: 0.88rem;
  font-weight: 700;
  font-family: inherit;
  color: var(--muted);
  background: var(--panel-solid);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  cursor: pointer;
  transition:
    color 0.15s ease,
    border-color 0.15s ease,
    box-shadow 0.15s ease;
}

.orders-review-kind-btn:hover {
  color: var(--text);
}

.orders-review-kind-btn.is-active {
  color: var(--brand);
  border-color: rgba(201, 120, 92, 0.45);
  box-shadow: 0 2px 10px rgba(201, 120, 92, 0.12);
  background: var(--brand-soft);
}

.orders-review-kind-btn.is-active[data-review-kind="bad"] {
  color: #8f3a3a;
  border-color: rgba(180, 90, 90, 0.35);
  background: rgba(180, 90, 90, 0.08);
}

/* 我的反馈（仅本人可见列表） */
.my-feedback-main .my-feedback-hint {
  margin: 0 0 16px;
  padding: 14px 16px;
  background: var(--panel-solid);
  border: 1px solid var(--line);
  border-radius: 14px;
  font-size: 0.9rem;
  color: var(--text);
  line-height: 1.55;
}

.my-feedback-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.my-feedback-item {
  margin: 0;
  padding: 16px 18px;
  background: var(--panel-solid);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow-sm);
}

.my-feedback-item-meta {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 8px;
}

.my-feedback-item-text {
  font-size: 0.95rem;
  color: var(--text);
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.55;
}

.my-feedback-item-reply {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.my-feedback-item-reply-meta {
  font-size: 0.78rem;
  font-weight: 600;
  color: #2d6a4f;
  margin-bottom: 6px;
}

.my-feedback-item-reply-text {
  font-size: 0.9rem;
  color: var(--text);
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.55;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(45, 106, 79, 0.08);
  border: 1px solid rgba(45, 106, 79, 0.2);
}

.faq {
  max-width: 840px;
  margin: 0 auto;
}

.faq-accordion details {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px 18px;
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.faq-accordion details + details {
  margin-top: 12px;
}

.faq-accordion summary {
  list-style: none;
  cursor: pointer;
  font-weight: 600;
  color: var(--text);
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.faq-accordion summary::-webkit-details-marker {
  display: none;
}

.faq-accordion summary::before {
  content: "";
  width: 0;
  height: 0;
  margin-top: 0.42em;
  flex-shrink: 0;
  border-style: solid;
  border-width: 5px 0 5px 8px;
  border-color: transparent transparent transparent #1a1a1a;
}

.faq-accordion details[open] summary::before {
  border-width: 6px 5px 0 5px;
  border-color: #1a1a1a transparent transparent transparent;
  margin-top: 0.38em;
}

.faq-accordion details p {
  color: var(--muted);
  margin: 10px 0 0;
  font-size: 0.96rem;
  line-height: 1.55;
  padding-left: 18px;
}

.site-footer {
  border-top: 1px solid var(--line);
  padding: 22px 0;
  color: var(--muted);
  background: rgba(255, 250, 245, 0.5);
  font-size: 0.92rem;
}

.footer-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.footer-links {
  display: flex;
  gap: 16px;
}

/* 未打开时 display:none，整层不参与布局与命中，避免挡死全页点击 */
.order-modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  padding: 16px;
  background: rgba(61, 52, 44, 0.38);
  display: none;
  place-items: center;
}

.order-modal.is-open {
  display: grid;
  opacity: 1;
  visibility: visible;
}

.login-qr-modal {
  z-index: 55;
}

.contact-id-modal {
  z-index: 58;
}

.contact-id-display {
  margin: 14px 0 18px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 250, 245, 0.95);
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  word-break: break-all;
  color: var(--text);
}

.contact-id-actions {
  margin-top: 4px;
}

.order-dialog {
  width: min(560px, 100%);
  background: var(--panel-solid);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow-md);
  padding: 22px;
  position: relative;
}

.order-dialog h3 {
  margin: 0;
}

.dialog-subtitle {
  margin-top: 8px;
  color: var(--muted);
}

.payment-proof-pay-link {
  display: inline-block;
  margin-top: 6px;
  font-weight: 600;
  color: var(--brand);
}

.payment-proof-file-input {
  display: block;
  margin: 10px 0 14px;
  max-width: 100%;
}

.payment-proof-preview-wrap {
  margin: 12px 0;
  text-align: center;
}

.payment-proof-preview {
  max-width: 100%;
  max-height: 240px;
  object-fit: contain;
  border-radius: 10px;
  border: 1px solid var(--line);
}

.payment-proof-upload-err {
  margin-top: 10px;
}

.order-dialog--proof kbd {
  display: inline-block;
  padding: 2px 6px;
  margin: 0 2px;
  font-size: 0.82em;
  font-family: inherit;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  background: rgba(255, 250, 245, 0.95);
}

.contact-quick {
  margin: 0 0 16px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px dashed var(--line-strong);
  background: rgba(255, 250, 245, 0.9);
}

.contact-quick-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 8px;
}

.contact-quick-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.contact-link.btn {
  flex: 1 1 auto;
  min-width: 120px;
  font-size: 0.9rem;
}

.contact-link.is-disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.submit-hint {
  margin: 0;
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.45;
}

.dialog-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.06);
  cursor: pointer;
}

.order-form {
  display: grid;
  gap: 12px;
}

.order-form label {
  display: grid;
  gap: 6px;
  font-weight: 600;
  font-size: 0.92rem;
}

.order-form input,
.order-form select,
.order-form textarea {
  width: 100%;
  border-radius: 10px;
  border: 1px solid var(--line-strong);
  padding: 10px 12px;
  font: inherit;
  color: var(--text);
  background: #fff;
}

.order-form input:focus,
.order-form select:focus,
.order-form textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-soft);
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  max-width: 280px;
  background: #fff;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  box-shadow: var(--shadow-md);
  transform: translateY(14px);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.2s ease, opacity 0.2s ease;
  z-index: 60;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

.back-top {
  position: fixed;
  right: 18px;
  bottom: 92px;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--brand);
  font-size: 1.2rem;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 40;
}

.back-top.show {
  opacity: 1;
  pointer-events: auto;
}

.login-dialog .dialog-subtitle {
  margin-bottom: 4px;
}

.login-providers {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 8px;
}

.login-provider {
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  gap: 4px;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid var(--line-strong);
  background: #fff;
  color: var(--text);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.login-provider:hover {
  border-color: rgba(201, 120, 92, 0.45);
  box-shadow: var(--shadow-md);
}

.login-provider-qq {
  border-color: rgba(36, 136, 255, 0.25);
}

.login-provider-wx {
  border-color: rgba(7, 193, 96, 0.28);
}

.login-provider-name {
  font-weight: 700;
  font-size: 1rem;
}

.login-provider-hint {
  font-size: 0.82rem;
  color: var(--muted);
  font-weight: 500;
}

.section-title-left {
  text-align: left;
}

.user-orders-section .section-title {
  text-align: left;
}

.orders-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px 20px;
  margin-bottom: 20px;
  padding: 14px 16px;
  background: var(--panel-solid);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow-sm);
}

.orders-nav-tabs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.orders-nav-tab {
  margin: 0;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.78);
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  color: var(--text);
  font-family: inherit;
  line-height: 1.25;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.orders-nav-tab:hover {
  border-color: rgba(201, 120, 92, 0.45);
  color: #b86a4f;
}

.orders-nav-tab.is-active {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
}

.orders-nav-tab.is-active:hover {
  color: #fff;
  border-color: var(--brand);
}

.orders-search {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  flex: 1 1 220px;
  justify-content: flex-end;
  min-width: 0;
}

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

.orders-search-input {
  flex: 1 1 160px;
  max-width: 280px;
  min-width: 140px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 0.88rem;
  font-family: inherit;
  background: rgba(255, 255, 255, 0.95);
}

.orders-search-input:focus {
  outline: 2px solid rgba(201, 120, 92, 0.35);
  outline-offset: 1px;
}

.orders-search-clear {
  flex-shrink: 0;
}

.order-single-panel {
  max-width: 720px;
  margin: 0 auto;
}

.order-single-panel .order-column-title.history {
  color: var(--muted);
}

/* 仅展示「玩家评价」的独立页 */
.page-reviews-only {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
}

.page-reviews-only-main {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 32px 0 48px;
  box-sizing: border-box;
}

.page-reviews-only-section {
  flex: 0 0 auto;
}

.order-dashboard {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  align-items: start;
}

/* 「全部订单」：电商式纵向列表（表头 + 分栏行） */
.order-dashboard--list {
  display: block;
  grid-template-columns: none;
}

.orders-table-wrap {
  background: var(--panel-solid);
  border-radius: 16px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.orders-table-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 92px 92px 118px;
  gap: 12px;
  align-items: center;
  padding: 12px 16px;
  background: rgba(245, 245, 245, 0.92);
  border-bottom: 1px solid var(--line);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--muted);
}

.orders-th--amount,
.orders-th--status,
.orders-th--action {
  text-align: center;
}

.orders-table-body {
  list-style: none;
  margin: 0;
  padding: 0;
}

.orders-table-row {
  background: rgba(255, 255, 255, 0.98);
}

.orders-table-row + .orders-table-row {
  border-top: 1px solid var(--line);
}

.orders-row-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  padding: 10px 16px;
  background: rgba(248, 248, 248, 0.9);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  font-size: 0.8rem;
}

.orders-row-head-main {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 18px;
  flex: 1 1 auto;
  min-width: 0;
}

.orders-row-date {
  color: var(--text);
  font-weight: 700;
}

.orders-row-no {
  color: var(--muted);
}

.orders-row-status-badge {
  margin-left: auto;
  font-weight: 800;
  font-size: 0.82rem;
}

.orders-row-status-badge.orders-row-status--unpaid {
  color: #c2410c;
}

.orders-row-status-badge.orders-row-status--progress {
  color: #b86a4f;
}

.orders-row-status-badge.orders-row-status--done {
  color: var(--ok);
}

.orders-row-status-badge.orders-row-status--refunded {
  color: var(--muted);
}

.orders-row-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 92px 92px 118px;
  gap: 12px 16px;
  align-items: center;
  padding: 16px;
}

.orders-row-main {
  min-width: 0;
}

.orders-td--amount,
.orders-td--status {
  text-align: center;
  justify-self: stretch;
}

.orders-row-title {
  margin: 0 0 6px;
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.35;
}

.orders-row-meta,
.orders-row-progress,
.orders-row-subtime {
  margin: 0 0 4px;
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.45;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.orders-row-subtime {
  margin-bottom: 0;
}

.orders-row-price {
  font-weight: 800;
  font-size: 0.95rem;
  color: var(--text);
}

.orders-status-pill {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 700;
}

.orders-status-pill--unpaid {
  background: rgba(194, 65, 12, 0.12);
  color: #c2410c;
}

.orders-status-pill--progress {
  background: rgba(201, 120, 92, 0.15);
  color: #b86a4f;
}

.orders-status-pill--done {
  background: rgba(34, 160, 90, 0.12);
  color: var(--ok);
}

.orders-status-pill--refunded {
  background: rgba(120, 120, 120, 0.1);
  color: var(--muted);
}

.orders-row-action-btn {
  box-sizing: border-box;
  width: 100%;
  max-width: 10.5rem;
  min-width: 0;
  min-height: 36px;
  padding-top: 8px;
  padding-bottom: 8px;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.orders-td--action {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  gap: 8px;
  text-align: center;
  justify-self: stretch;
}

.orders-btn-review {
  min-width: 0;
}

.orders-reviewed-tag {
  display: block;
  margin-top: 6px;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--muted);
}

.orders-review-label {
  display: block;
  margin: 12px 0 8px;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text);
}

.orders-review-textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 0.9rem;
  font-family: inherit;
  line-height: 1.5;
  resize: vertical;
  min-height: 120px;
}

.orders-review-meta {
  margin: 6px 0 0;
  font-size: 0.78rem;
  color: var(--muted);
}

.orders-review-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 16px;
}

.orders-table-empty {
  margin: 0;
  padding: 40px 16px;
  text-align: center;
}

@media (max-width: 720px) {
  .orders-table-head {
    display: none;
  }

  .orders-row-body {
    grid-template-columns: 1fr;
    justify-items: start;
    gap: 14px;
  }

  .orders-td--amount,
  .orders-td--status,
  .orders-td--action {
    text-align: left;
    width: 100%;
  }

  .orders-row-status-badge {
    margin-left: 0;
  }

  .orders-row-head {
    flex-direction: column;
    align-items: flex-start;
  }
}

.order-column {
  background: var(--panel-solid);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px 18px 14px;
  box-shadow: var(--shadow-sm);
}

.order-column-title {
  margin: 0 0 12px;
  font-size: 1.05rem;
  font-weight: 800;
}

.order-column-title.unpaid {
  color: #c2410c;
}

.order-column-title.pending {
  color: #b86a4f;
}

.order-column-title.done {
  color: var(--ok);
}

/* 订单详情：卡片内各行上下间距一致 */
.order-column--detail {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding-top: 20px;
  padding-bottom: 18px;
}

.order-column--detail .order-column-title {
  margin: 0;
}

.order-column--detail .order-item-meta,
.order-column--detail .order-item-time {
  margin: 0;
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.order-column--detail .order-detail-actions {
  margin-top: 0;
}

.order-column--detail .order-detail-pending-notice {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.5;
}

.order-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.order-item {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.75);
}

.order-item-title {
  margin: 0 0 4px;
  font-weight: 700;
  font-size: 0.95rem;
}

.order-status-tag {
  display: inline-block;
  margin-left: 8px;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 6px;
  vertical-align: middle;
}

.order-status-tag--refunded {
  background: rgba(120, 120, 120, 0.12);
  color: var(--muted);
}

.order-status-tag--pending-refund {
  background: rgba(201, 120, 92, 0.15);
  color: #b86a4f;
}

.order-detail-refund-hint {
  color: #b86a4f;
  font-weight: 600;
}

.order-detail-actions {
  margin-top: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.order-detail-actions[hidden] {
  display: none !important;
}

/* .btn 的 display 会盖掉 [hidden]，详情操作区按钮需强制隐藏 */
.order-detail-actions-row > .btn[hidden],
.order-detail-actions-row > .btn-refund[hidden],
.order-detail-actions-row > button[hidden] {
  display: none !important;
}

/* 详情页：继续支付 / 删除 / 申请退款 同一行（窄屏再换行） */
.order-detail-actions-row {
  flex-wrap: nowrap;
  flex-direction: row;
  justify-content: flex-start;
  align-items: stretch;
  gap: 10px;
}

.order-detail-actions-row .btn,
.order-detail-actions-row .btn-refund {
  flex: 0 1 auto;
  white-space: nowrap;
  min-height: 44px;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

@media (max-width: 520px) {
  .order-detail-actions-row {
    flex-wrap: wrap;
  }
}

.order-item-refund-audit {
  color: #b86a4f;
  font-size: 0.88rem;
  font-weight: 600;
}

.order-item-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.order-list-delete {
  margin: 0;
}

.btn-refund {
  font: inherit;
  cursor: pointer;
  padding: 8px 14px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.85);
  color: var(--text);
  font-weight: 600;
}

.btn-refund:hover {
  border-color: #b86a4f;
  color: #b86a4f;
}

.btn-refund:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.btn-delete-order {
  border-color: rgba(180, 80, 70, 0.45);
  color: #a85c52;
}

.btn-delete-order:hover:not(:disabled) {
  border-color: #b86a4f;
  color: #8f3d32;
}

.order-item-meta {
  margin: 0;
  font-size: 0.86rem;
  color: var(--muted);
}

.order-item-time {
  margin: 8px 0 0;
  font-size: 0.78rem;
  color: var(--muted);
}

.order-empty {
  margin: 0;
  padding: 12px 0;
  font-size: 0.9rem;
  color: var(--muted);
  text-align: center;
}

.order-empty.is-hidden {
  display: none;
}

.qr-dialog .dialog-subtitle {
  margin-bottom: 12px;
}

.qr-wrap {
  display: grid;
  place-items: center;
  min-height: 220px;
  margin: 8px 0 16px;
}

.qr-image {
  display: block;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.qr-fallback {
  text-align: center;
  padding: 16px;
  border-radius: 12px;
  border: 1px dashed var(--line-strong);
  color: var(--muted);
  max-width: 280px;
}

.qr-fallback-tip {
  margin: 8px 0 0;
  font-size: 0.86rem;
}

.qr-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: stretch;
}

.qr-actions .btn {
  flex: 1 1 120px;
}

.wx-login-embed {
  min-height: 240px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 300px;
}

.wx-login-embed iframe {
  max-width: 100%;
}

.qq-login-panel {
  text-align: center;
  padding: 8px 0 4px;
  width: 100%;
  max-width: 320px;
}

.qq-login-lead {
  margin-bottom: 14px !important;
}

.oauth-err {
  color: #b83232;
  font-size: 0.9rem;
  text-align: center;
  padding: 12px;
}

.orders-page {
  min-height: 100vh;
}

.orders-header {
  border-bottom: 1px solid var(--line);
  background: rgba(255, 250, 245, 0.9);
  backdrop-filter: blur(10px);
}

.orders-header-inner {
  width: min(1120px, 92%);
  margin: 0 auto;
  padding: 16px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.orders-header-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem 1.25rem;
}

.orders-header-inner--detail {
  align-items: flex-start;
}

@media (min-width: 640px) {
  .orders-header-inner--detail {
    align-items: center;
  }
}

.orders-header h1 {
  margin: 0;
  font-size: 1.25rem;
}

.orders-back {
  font-weight: 600;
  color: var(--brand);
}

.orders-back:hover {
  text-decoration: underline;
}

.orders-main {
  padding: 28px 0 48px;
}

.orders-guest {
  text-align: center;
  padding: 48px 16px;
  background: var(--panel-solid);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow-sm);
}

.orders-guest p {
  margin: 0 0 16px;
  color: var(--muted);
}

.order-all-note {
  margin: 0 0 18px;
  font-size: 0.95rem;
  color: var(--muted);
}

.pay-account-line {
  color: var(--text);
  font-weight: 600;
}

.pay-methods {
  display: flex;
  gap: 10px;
  margin: 12px 0 8px;
  flex-wrap: wrap;
}

.pay-method.is-active {
  border-color: var(--brand);
  color: var(--brand);
  background: #fff3ea;
}

.pay-status {
  margin: 0 0 12px;
  color: var(--muted);
}

.pay-amount-big {
  margin: 4px 0 10px;
  font-size: clamp(1.75rem, 5vw, 2.25rem);
  font-weight: 800;
  color: var(--brand);
  letter-spacing: 0.02em;
}

.pay-hint {
  margin: 0 0 14px;
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.55;
  max-width: 36em;
  white-space: pre-wrap;
}

.pay-error {
  margin: 0 0 12px;
  font-size: 0.9rem;
  color: #b83232;
  max-width: 36em;
}

.pay-qr-wrap {
  width: 200px;
  height: 200px;
  min-height: unset;
  margin: 12px auto 20px;
  padding: 0;
  box-sizing: content-box;
}

.pay-qr-wrap .pay-qr-image {
  width: 200px;
  height: 200px;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  box-sizing: border-box;
}

.pay-done-row {
  display: flex;
  justify-content: center;
  margin: 4px auto 24px;
  max-width: 36em;
}

.pay-done-btn {
  min-width: 168px;
}

/* —— 账号登录 / 注册弹窗 —— */
.login-dialog--phone,
.login-dialog--account {
  width: min(400px, 100%);
  padding: 24px 22px 22px;
  background: linear-gradient(165deg, #fffefb 0%, #fff8f2 48%, #fff 100%);
  border: 1px solid rgba(184, 115, 86, 0.22);
  box-shadow: 0 22px 48px rgba(61, 52, 44, 0.14), 0 0 0 1px rgba(255, 255, 255, 0.6) inset;
}

.login-dialog-close {
  top: 14px;
  right: 14px;
  border-radius: 10px;
  background: rgba(61, 52, 44, 0.06);
  font-size: 1.15rem;
  line-height: 1;
  transition: background 0.15s ease, transform 0.15s ease;
}

.login-dialog-close:hover {
  background: rgba(184, 115, 86, 0.12);
}

.login-dialog-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  padding-right: 36px;
}

.login-dialog-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  font-size: 1.5rem;
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(255, 243, 234, 1) 0%, rgba(255, 228, 212, 0.85) 100%);
  border: 1px solid rgba(184, 115, 86, 0.2);
  box-shadow: 0 4px 12px rgba(184, 115, 86, 0.12);
}

.login-dialog-head h3 {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: var(--text);
}

.login-dialog-kicker {
  margin: 4px 0 0;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.04em;
}

.login-tip-box {
  margin: 0 0 18px;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(255, 243, 234, 0.65);
  border: 1px solid rgba(184, 115, 86, 0.14);
  font-size: 0.86rem;
  line-height: 1.55;
  color: var(--muted);
}

.login-tip-box p {
  margin: 0;
}

.login-tip-box code {
  font-size: 0.9em;
  padding: 0.12em 0.4em;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(184, 115, 86, 0.12);
}

.login-phone-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 2px;
}

.login-field-name {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0.02em;
}

.login-phone-label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0;
}

.login-phone-input {
  width: 100%;
  box-sizing: border-box;
  border-radius: 12px;
  border: 1px solid var(--line-strong);
  padding: 12px 14px;
  font: inherit;
  font-size: 1rem;
  color: var(--text);
  background: #fff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.login-phone-input::placeholder {
  color: #a8988c;
}

.login-phone-input:hover {
  border-color: rgba(184, 115, 86, 0.45);
}

.login-phone-input:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-soft);
}

.login-code-row {
  display: grid;
  grid-template-columns: 1fr minmax(108px, auto);
  gap: 10px;
  align-items: end;
}

.login-code-field {
  min-width: 0;
}

.btn-send-code {
  height: 46px;
  padding: 0 14px;
  align-self: end;
  font-size: 0.88rem;
  font-weight: 700;
  white-space: nowrap;
  border-radius: 12px;
  border: 1px solid rgba(184, 115, 86, 0.45);
  background: linear-gradient(180deg, #fff 0%, #fff9f5 100%);
  color: var(--brand);
  box-shadow: 0 2px 8px rgba(184, 115, 86, 0.1);
  transition: transform 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease, opacity 0.12s ease;
}

.btn-send-code:hover:not(:disabled) {
  border-color: var(--brand);
  box-shadow: 0 4px 14px rgba(184, 115, 86, 0.18);
  transform: translateY(-1px);
}

.btn-send-code:disabled {
  opacity: 0.72;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.login-phone-err {
  margin: -4px 0 0;
  font-size: 0.88rem;
  color: #b83232;
  line-height: 1.45;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(184, 50, 50, 0.06);
  border: 1px solid rgba(184, 50, 50, 0.12);
}

.login-submit-btn {
  margin-top: 4px;
  padding: 14px 16px;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  border-radius: 12px;
  box-shadow: 0 6px 20px rgba(184, 115, 86, 0.28);
}

.login-submit-btn:hover:not(:disabled) {
  box-shadow: 0 8px 24px rgba(184, 115, 86, 0.34);
}

.login-register-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 4px;
  flex-wrap: wrap;
}

.login-register-footer--single {
  justify-content: center;
  margin-top: 8px;
}

.login-register-hint {
  font-size: 0.86rem;
  color: var(--muted);
}

.btn-link-like {
  border: none;
  background: none;
  padding: 4px 8px;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--brand);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.btn-link-like:hover {
  color: #9a5a42;
}

@media (max-width: 380px) {
  .login-code-row {
    grid-template-columns: 1fr;
  }

  .btn-send-code {
    width: 100%;
    height: 44px;
  }
}

@media (max-width: 980px) {
  .hero-grid,
  .cards-3,
  .cards-services {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 1180px) {
  .menu-toggle {
    display: inline-grid;
    place-items: center;
    min-width: 44px;
    min-height: 44px;
    -webkit-tap-highlight-color: transparent;
  }

  .main-nav {
    position: absolute;
    top: 72px;
    right: max(12px, env(safe-area-inset-right, 0px));
    display: none;
    background: var(--panel-solid);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 10px;
    box-shadow: var(--shadow-md);
    flex-direction: column;
    min-width: min(220px, 85vw);
    max-height: min(70vh, 420px);
    overflow-y: auto;
    z-index: 35;
  }

  .main-nav.is-open {
    display: flex;
  }

  .main-nav a,
  .main-nav .main-nav-linklike {
    padding: 10px 8px;
    min-height: 44px;
    display: flex;
    align-items: center;
  }
}

@media (max-width: 768px) {
  .container {
    width: 100%;
    padding-left: max(14px, env(safe-area-inset-left, 0px));
    padding-right: max(14px, env(safe-area-inset-right, 0px));
    box-sizing: border-box;
  }

  .site-header .container {
    padding-left: max(12px, env(safe-area-inset-left, 0px));
    padding-right: max(12px, env(safe-area-inset-right, 0px));
  }

  .nav-wrap {
    min-height: 56px;
    gap: 8px;
    flex-wrap: nowrap;
  }

  .logo-brand .logo {
    font-size: clamp(0.82rem, 3.6vw, 1rem);
    max-width: min(200px, 46vw);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .logo-game-thumb {
    width: 72px !important;
    height: auto !important;
  }

  .header-actions {
    gap: 4px;
    flex-shrink: 0;
  }

  .header-actions .btn {
    padding: 8px 10px;
    font-size: 0.86rem;
  }

  .user-bar {
    gap: 4px;
  }

  .user-meta {
    max-width: min(100px, 28vw);
  }

  .hero {
    padding-top: 36px;
  }

  .hero-grid {
    gap: 18px;
  }

  .hero-copy h1 {
    font-size: clamp(1.28rem, 6.2vw, 1.75rem);
    line-height: 1.22;
  }

  .hero-copy .lead {
    font-size: 0.95rem;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-actions .btn {
    width: 100%;
    text-align: center;
    justify-content: center;
  }

  .hero-tags {
    flex-wrap: wrap;
    gap: 8px;
  }

  .hero-card {
    padding: 16px;
  }

  .order-modal.is-open {
    padding: max(10px, env(safe-area-inset-top, 0px)) max(10px, env(safe-area-inset-right, 0px))
      max(16px, env(safe-area-inset-bottom, 0px)) max(10px, env(safe-area-inset-left, 0px));
    place-items: center;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .order-dialog,
  .login-dialog,
  .qr-dialog {
    width: min(calc(100vw - 20px), 440px);
    max-height: min(88vh, 640px);
    overflow-y: auto;
    padding: 18px 16px;
    -webkit-overflow-scrolling: touch;
  }

  /** 首页客服弹窗：避免与通用 .order-dialog 的 overflow 一起把消息区压扁 */
  .site-chat-modal .site-chat-dialog.order-dialog {
    width: min(calc(100vw - 16px), 520px);
    min-height: min(68vh, 620px);
    max-height: min(92vh, 720px);
    overflow: hidden;
    display: flex;
    flex-direction: column;
  }

  .site-chat-modal .site-chat-messages.chat-messages-scroll {
    min-height: min(220px, 40vh);
    max-height: min(50vh, 480px);
  }

  .section {
    padding: 40px 0;
  }

  .section-title h2 {
    font-size: clamp(1.25rem, 5vw, 1.5rem);
  }

  .site-chat-fab {
    right: max(12px, env(safe-area-inset-right, 0px)) !important;
    bottom: max(16px, env(safe-area-inset-bottom, 0px)) !important;
  }

  .login-providers {
    grid-template-columns: 1fr;
  }

  .order-dashboard {
    grid-template-columns: 1fr;
  }

  .main-nav {
    min-width: min(200px, 85vw);
  }

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

/* 更窄手机：顶栏两行（Logo+菜单 / 用户操作），避免挤在一行 */
@media (max-width: 520px) {
  .nav-wrap {
    flex-wrap: wrap;
    align-items: center;
    row-gap: 0;
    padding-bottom: 6px;
  }

  .logo-brand {
    flex: 1 1 auto;
    min-width: 0;
    max-width: calc(100% - 52px);
  }

  .header-actions {
    flex: 1 1 100%;
    flex-wrap: wrap;
    justify-content: flex-start;
    align-items: center;
    gap: 6px 8px;
    padding-top: 10px;
    margin-top: 6px;
    border-top: 1px solid var(--line);
  }

  .user-bar {
    flex-wrap: wrap;
    width: 100%;
    max-width: 100%;
    justify-content: flex-start;
    gap: 6px;
  }

  .user-meta {
    flex: 1 1 100%;
    max-width: 100%;
    font-size: 0.82rem;
    margin: 0 0 2px;
  }

  .header-actions .btn-sm,
  .header-actions .header-notif-btn {
    padding: 8px 10px;
    font-size: 0.8rem;
    min-height: 40px;
  }

  .main-nav {
    top: 100%;
    margin-top: 4px;
    right: max(10px, env(safe-area-inset-right, 0px));
  }
}

/* —— 管理后台 admin.html —— */
.admin-page {
  min-height: 100vh;
  background: linear-gradient(180deg, rgba(255, 248, 240, 0.9) 0%, rgba(245, 232, 220, 0.45) 100%);
}

/* —— 管理后台登录页 admin.html（admin-login-page）—— */
.admin-login-page {
  position: relative;
  min-height: 100vh;
  background: linear-gradient(168deg, #faf6f1 0%, #f3e9df 38%, #e8ddd2 100%);
}

.admin-login-bg {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 0;
  opacity: 0.55;
  background-image:
    radial-gradient(ellipse 90% 60% at 12% 8%, rgba(201, 120, 92, 0.14) 0%, transparent 52%),
    radial-gradient(ellipse 70% 50% at 88% 92%, rgba(74, 124, 106, 0.1) 0%, transparent 48%),
    radial-gradient(ellipse 50% 40% at 70% 18%, rgba(255, 220, 180, 0.25) 0%, transparent 45%);
}

.admin-login-page > *:not(.admin-login-bg) {
  position: relative;
  z-index: 1;
}

.admin-login-header-inner {
  max-width: 560px;
  margin: 0 auto;
}

.admin-login-brand {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.admin-login-brand-icon {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  color: var(--brand);
  background: linear-gradient(145deg, rgba(201, 120, 92, 0.12) 0%, rgba(255, 255, 255, 0.9) 100%);
  border: 1px solid rgba(201, 120, 92, 0.22);
  box-shadow: 0 4px 14px rgba(61, 52, 44, 0.06);
}

.admin-login-brand-icon svg {
  width: 34px;
  height: 34px;
}

.admin-login-brand-text h1 {
  margin: 0 0 6px;
  font-size: 1.5rem;
  font-weight: 750;
  letter-spacing: 0.02em;
  color: var(--text);
  line-height: 1.25;
}

.admin-login-brand-text .admin-header-hint {
  font-size: 0.92rem;
  line-height: 1.55;
  max-width: 36em;
}

.admin-login-main {
  padding: 32px 16px 56px;
}

.admin-login-wrap {
  max-width: 480px;
  margin: 0 auto;
}

.admin-login-card {
  position: relative;
  max-width: none;
  margin: 0;
  padding: 28px 26px 24px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.85);
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.97) 0%, rgba(255, 250, 245, 0.98) 100%);
  box-shadow:
    0 2px 4px rgba(61, 52, 44, 0.04),
    0 12px 40px rgba(61, 52, 44, 0.08),
    0 0 0 1px rgba(90, 70, 55, 0.04) inset;
  overflow: hidden;
}

.admin-login-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--brand) 0%, rgba(90, 143, 122, 0.85) 45%, var(--brand-2) 100%);
  opacity: 0.92;
}

.admin-login-card-head {
  margin-bottom: 18px;
}

.admin-login-title {
  margin: 0 0 10px;
  font-size: 1.35rem;
  font-weight: 750;
  color: var(--text);
  letter-spacing: 0.03em;
}

.admin-login-lead {
  font-size: 0.9rem;
  line-height: 1.65;
  margin: 0;
  color: var(--muted);
}

.admin-login-lead strong {
  color: var(--text);
  font-weight: 700;
}

.admin-login-lead-code {
  display: block;
  margin-top: 8px;
  font-size: 0.82rem;
  color: var(--muted);
}

.admin-login-lead code {
  font-size: 0.8em;
  padding: 0.12em 0.4em;
  border-radius: 6px;
  background: rgba(201, 120, 92, 0.1);
  border: 1px solid rgba(201, 120, 92, 0.15);
  color: #5c4034;
}

.admin-sub-account-form-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px 16px;
}

.admin-sub-account-form-row .admin-label {
  flex: 1 1 200px;
  min-width: 160px;
}

.admin-sub-account-submit {
  flex: 0 0 auto;
  align-self: flex-end;
}

@media (max-width: 640px) {
  .admin-sub-account-form-row {
    flex-direction: column;
    align-items: stretch;
  }

  .admin-sub-account-submit {
    width: 100%;
  }
}

.admin-login-page .admin-login-form {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 14px 16px;
  align-items: end;
}

.admin-login-page .admin-login-field .admin-login-field-label {
  font-size: 0.78rem;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.admin-login-page .admin-login-field input {
  min-width: 0;
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(90, 70, 55, 0.14);
  background: rgba(255, 255, 255, 0.95);
  font: inherit;
  font-size: 0.95rem;
  color: var(--text);
  transition:
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    background 0.18s ease;
}

.admin-login-page .admin-login-field input::placeholder {
  color: rgba(107, 93, 82, 0.45);
}

.admin-login-page .admin-login-field input:hover {
  border-color: rgba(201, 120, 92, 0.35);
}

.admin-login-page .admin-login-field input:focus {
  outline: none;
  border-color: rgba(201, 120, 92, 0.55);
  box-shadow:
    0 0 0 3px rgba(201, 120, 92, 0.15),
    0 0 0 1px rgba(90, 143, 122, 0.12);
  background: #fff;
}

.admin-login-submit {
  padding: 12px 22px;
  border-radius: 12px;
  font-weight: 650;
  font-size: 0.92rem;
  letter-spacing: 0.04em;
  box-shadow: 0 4px 14px rgba(201, 120, 92, 0.28);
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease,
    filter 0.15s ease;
}

.admin-login-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(201, 120, 92, 0.35);
  filter: brightness(1.03);
}

.admin-login-submit:active {
  transform: translateY(0);
  box-shadow: 0 2px 10px rgba(201, 120, 92, 0.25);
}

.admin-login-page .admin-login-feedback {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px dashed rgba(90, 70, 55, 0.12);
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--brand);
}

@media (max-width: 560px) {
  .admin-login-brand {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .admin-login-brand-text .admin-header-hint {
    max-width: none;
  }

  .admin-login-page .admin-login-form {
    grid-template-columns: 1fr;
  }

  .admin-login-submit {
    width: 100%;
    justify-self: stretch;
  }
}

.admin-header {
  padding: 28px 0 12px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.55);
}

.admin-header.admin-login-header {
  padding: 22px 0 18px;
  border-bottom: 1px solid rgba(90, 70, 55, 0.09);
  background: rgba(255, 252, 248, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.6) inset;
}

.admin-header-inner h1 {
  margin: 0 0 6px;
  font-size: 1.35rem;
}

.admin-login-page .admin-login-brand-text h1 {
  font-size: 1.5rem;
  font-weight: 750;
  letter-spacing: 0.02em;
}

.admin-header-hint {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.admin-header-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.admin-header-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: flex-end;
  gap: 8px;
  max-width: min(100%, 520px);
}

/* 管理后台页头：与首页同结构的铃铛下拉，提高层级以免被侧栏遮挡 */
.admin-header {
  position: relative;
  z-index: 30;
}

.admin-header-notif-wrap {
  z-index: 120;
}

.admin-header-notif-wrap .header-notif-panel {
  z-index: 200;
}

.admin-file-hint {
  margin: 0 0 14px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px dashed rgba(201, 120, 92, 0.45);
  background: rgba(255, 248, 240, 0.95);
  font-size: 0.86rem;
  line-height: 1.5;
  color: var(--text);
}

.admin-file-hint code {
  font-size: 0.82rem;
  word-break: break-all;
}

.admin-login-feedback {
  margin: 14px 0 0;
  font-size: 0.9rem;
  color: var(--brand);
  font-weight: 600;
  min-height: 1.35em;
  white-space: pre-wrap;
  word-break: break-word;
}

.admin-login-feedback.is-error {
  color: #b83232;
}

.admin-gate h2 {
  margin-top: 0;
}

.admin-main {
  padding: 16px 0 28px;
}

/* 后台总导航：资源管理器式树形侧栏 */
.admin-sidebar.admin-sidebar--explorer {
  flex: 0 0 248px;
  min-width: 220px;
  max-width: 280px;
  padding: 6px 4px 10px 6px;
  background: #f5f5f5;
  border: 1px solid #d0d0d0;
  border-radius: 4px;
}

.admin-tree-nav {
  margin: 0;
}

.admin-tree {
  list-style: none;
  margin: 0;
  padding: 0;
}

.admin-tree-children {
  list-style: none;
  margin: 0;
  padding: 0;
}

.admin-tree-branch[data-expanded="false"] > .admin-tree-children {
  display: none;
}

.admin-tree-row {
  display: flex;
  align-items: center;
  gap: 2px;
  min-height: 26px;
  margin: 1px 0;
  border-radius: 2px;
}

.admin-tree-row:hover {
  background: rgba(0, 0, 0, 0.04);
}

.admin-tree-row--child {
  padding-left: 4px;
}

.admin-tree-caret {
  flex: 0 0 20px;
  width: 20px;
  height: 24px;
  padding: 0;
  margin: 0;
  border: none;
  border-radius: 2px;
  background: transparent;
  cursor: pointer;
  position: relative;
  flex-shrink: 0;
}

.admin-tree-caret:hover {
  background: rgba(0, 0, 0, 0.06);
}

.admin-tree-caret::before {
  content: "▸";
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  font-size: 9px;
  color: #333;
  line-height: 1;
  transition: transform 0.12s ease;
}

.admin-tree-branch[data-expanded="true"] > .admin-tree-row .admin-tree-caret::before {
  transform: translate(-50%, -50%) rotate(90deg);
}

.admin-tree-caret-spacer {
  flex: 0 0 20px;
  width: 20px;
  flex-shrink: 0;
}

.admin-tree-label {
  flex: 1;
  min-width: 0;
  text-align: left;
  font: inherit;
  font-size: 0.84rem;
  line-height: 1.35;
  padding: 3px 6px 3px 2px;
  margin: 0;
  border: none;
  border-radius: 2px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
}

.admin-tree-label:hover {
  color: #000;
}

/* 资源管理器选中行：浅蓝底（类似系统树视图） */
.admin-tree-label.is-active {
  background: #cce8ff;
  font-weight: 600;
}

.admin-main .container.admin-layout-with-sidebar {
  width: min(100%, 1960px);
  max-width: 1960px;
  padding-left: 12px;
  padding-right: 12px;
  box-sizing: border-box;
}

.admin-layout-with-sidebar {
  display: flex;
  align-items: flex-start;
  gap: 20px;
}

.admin-sidebar {
  flex: 0 0 200px;
  min-width: 196px;
  max-width: 260px;
  position: sticky;
  top: 88px;
  align-self: flex-start;
  max-height: calc(100vh - 96px);
  overflow-y: auto;
  overflow-x: hidden;
  padding: 8px 8px 10px 10px;
  box-sizing: border-box;
  background: rgba(255, 252, 248, 0.45);
  border: 1px solid rgba(90, 70, 55, 0.1);
  border-radius: 14px;
}

.admin-side-nav {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.admin-side-hint {
  margin: 0 0 1px;
  padding: 0 2px 0 10px;
  font-size: 0.7rem;
  line-height: 1.3;
  color: var(--muted);
}

.admin-side-link {
  display: block;
  width: 100%;
  box-sizing: border-box;
  text-align: left;
  padding: 7px 11px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.88);
  font: inherit;
  font-size: 0.86rem;
  cursor: pointer;
  color: var(--text);
  transition: background 0.15s, border-color 0.15s;
}

/* .admin-side-link 的 display:block 会盖掉 [hidden]，侧栏「账号管理」等需在无权限时真正隐藏 */
.admin-sidebar .admin-side-link[hidden],
.admin-sidebar button.admin-sidebar-products-btn[hidden],
.admin-sidebar .admin-side-hint[hidden],
.admin-sidebar hr.admin-sidebar-divider[hidden],
.admin-sidebar .admin-tree-primary-only[hidden],
.admin-sidebar #adminTreeLiAccounts[hidden] {
  display: none !important;
}

.admin-side-link:hover {
  background: rgba(255, 248, 240, 0.98);
  border-color: rgba(201, 120, 92, 0.35);
}

.admin-side-link.is-active {
  background: rgba(201, 120, 92, 0.12);
  border-color: rgba(201, 120, 92, 0.45);
  font-weight: 700;
}

a.admin-side-link {
  text-decoration: none;
  color: inherit;
  box-sizing: border-box;
}

.pricing-grid--dynamic {
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}

.pricing-empty {
  grid-column: 1 / -1;
  margin: 0;
  padding: 20px;
  text-align: center;
  color: var(--muted);
  font-size: 0.95rem;
}

/* 首页：套餐与「本周热门」异步填充时减少布局跳动与滚动锚定抖动 */
main {
  overflow-anchor: none;
}

#pricingGrid.pricing-grid {
  min-height: min(26rem, 55vh);
  /* 固定三列 grid 会导致末行仅 1～2 张时整体贴左；改用 flex 换行使卡片组在容器内水平居中 */
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
}

#pricingGrid.pricing-grid > .card {
  flex: 0 1 min(300px, 100%);
  max-width: 360px;
  width: 100%;
  box-sizing: border-box;
}

/* 玩家评价：与套餐区相同，末行不足一行时居中 */
#reviewsGrid.cards-3 {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
}

#reviewsGrid.cards-3 > .card {
  flex: 0 1 min(300px, 100%);
  max-width: 360px;
  width: 100%;
  box-sizing: border-box;
}

#heroHotList {
  min-height: 10rem;
}

.admin-products-preview-block {
  margin: 22px 0 20px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.admin-products-preview-heading {
  font-size: 1.02rem;
  font-weight: 700;
  margin: 0 0 14px;
  color: var(--text);
}

.admin-products-preview-grid {
  margin-bottom: 0;
}

.admin-btn-preview {
  user-select: none;
  cursor: default;
  pointer-events: none;
  display: block;
  width: 100%;
  text-align: center;
  box-sizing: border-box;
}

.admin-panel.admin-card,
.admin-gate.admin-card {
  flex: 1;
  min-width: 0;
  max-width: none;
}

.admin-card {
  background: var(--panel-solid);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 20px 20px 18px;
  box-shadow: var(--shadow-sm);
  max-width: 960px;
  margin: 0 auto;
}

.admin-muted {
  color: var(--muted);
  font-size: 0.86rem;
  margin: 0 0 12px;
}

.admin-login-form {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-end;
}

.admin-label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-weight: 600;
  font-size: 0.9rem;
}

.admin-label input {
  min-width: 220px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  font: inherit;
}

.admin-toolbar {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 12px;
}

.admin-toolbar--orders {
  flex-wrap: wrap;
}

.admin-alert-hint {
  margin: 0 0 10px;
  font-size: 0.78rem;
  line-height: 1.45;
  color: var(--muted);
}

.admin-alert-hint strong {
  color: var(--text);
  font-weight: 700;
}

.admin-alert-banner {
  margin: 0 0 12px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(201, 120, 92, 0.55);
  background: rgba(255, 243, 235, 0.98);
  color: #7a3e2f;
  font-size: 0.86rem;
  font-weight: 600;
  line-height: 1.5;
}

#adminNotifyEnable.is-on {
  border-color: rgba(34, 160, 90, 0.55);
  color: var(--ok);
}

.admin-order-search {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-left: auto;
}

.admin-order-search-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
}

.admin-order-search-input {
  min-width: 180px;
  max-width: 360px;
  width: min(32vw, 360px);
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid var(--line);
  font: inherit;
  background: var(--panel-solid);
}

.admin-msg {
  margin-bottom: 10px;
  min-height: 1.2em;
}

.admin-table-wrap {
  overflow-x: auto;
  overflow-y: visible;
  -webkit-overflow-scrolling: touch;
  margin-bottom: 12px;
}

/* 宽屏下表格随容器收缩，避免整行横向滚动条 */
.admin-table-wrap--fit {
  overflow-x: visible;
}

@media (max-width: 1280px) {
  .admin-table-wrap--fit {
    overflow-x: auto;
  }
}

.admin-table {
  width: 100%;
  max-width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  font-size: 0.78rem;
  min-width: 0;
}

.admin-col--order {
  width: 6%;
}
.admin-col--createdAt {
  width: 7%;
  min-width: 5.5rem;
}
.admin-col--client {
  width: 7%;
}
.admin-col--plan {
  width: 7%;
}
.admin-col--contact {
  width: 8%;
}
.admin-col--time {
  width: 8%;
}
.admin-col--pay {
  width: 5%;
}
.admin-col--proof {
  width: 5.5%;
  min-width: 4.75rem;
}
.admin-col--boost {
  width: 7%;
}
.admin-col--fulfill {
  width: 8%;
}
.admin-col--refund {
  width: 16%;
}
.admin-col--customer-note {
  width: 11%;
  min-width: 5.5rem;
}
.admin-col--note {
  width: 9%;
}
.admin-col--save {
  width: 7%;
}
.admin-col--del {
  width: 6.5%;
  min-width: 3.25rem;
}

.admin-table th,
.admin-table td {
  border: 1px solid var(--line);
  padding: 8px 6px;
  text-align: left;
  vertical-align: middle;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.admin-table th {
  background: rgba(255, 250, 245, 0.95);
  font-weight: 700;
  font-size: 0.74rem;
  line-height: 1.25;
}

.admin-td-mono {
  font-family: ui-monospace, monospace;
  font-size: 0.74rem;
  white-space: normal;
  word-break: break-all;
}

.admin-td-created {
  font-size: 0.72rem;
  white-space: nowrap;
}

.admin-td-wrap {
  max-width: none;
  word-break: break-word;
}

.admin-td-customer-note {
  max-width: none;
  vertical-align: top;
}

.admin-customer-note {
  max-height: 120px;
  overflow: auto;
  padding: 4px 6px;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.85);
  font-size: 0.72rem;
  line-height: 1.35;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
  cursor: pointer;
  box-sizing: border-box;
}

.admin-customer-note:focus {
  outline: 2px solid rgba(139, 90, 43, 0.35);
  outline-offset: 1px;
}

.admin-td-note {
  max-width: none;
}

.admin-select {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  padding: 4px 4px;
  border-radius: 6px;
  border: 1px solid var(--line);
  font: inherit;
  font-size: 0.74rem;
  background: #fff;
  box-sizing: border-box;
}

.admin-note {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  padding: 4px 4px;
  border-radius: 6px;
  border: 1px solid var(--line);
  font: inherit;
  font-size: 0.74rem;
  resize: vertical;
  box-sizing: border-box;
  max-height: 52px;
}

.admin-footnote {
  margin-top: 8px;
  margin-bottom: 0;
}

.admin-product-add {
  margin-bottom: 20px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.admin-product-add-title {
  margin: 0 0 12px;
  font-size: 1rem;
}

.admin-product-form {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-end;
}

.admin-label-check {
  flex-direction: row;
  align-items: center;
  gap: 8px;
}

.admin-label-full {
  flex: 1 1 100%;
}

.admin-label-full textarea {
  width: 100%;
  min-height: 88px;
  min-width: 0;
  box-sizing: border-box;
}

.admin-input-inline {
  width: 100%;
  max-width: 100%;
  padding: 6px 8px;
  border-radius: 8px;
  border: 1px solid var(--line);
  font: inherit;
  font-size: 0.82rem;
  box-sizing: border-box;
}

.admin-td-bullets textarea {
  min-width: 0;
  width: 100%;
}

.admin-product-table {
  margin-top: 8px;
}

.admin-feedback-table .admin-feedback-text {
  white-space: pre-wrap;
  word-break: break-word;
  vertical-align: top;
}

.admin-feedback-table .admin-feedback-reply-preview {
  max-width: 200px;
  font-size: 0.82rem;
  color: var(--text);
  white-space: pre-wrap;
  word-break: break-word;
  vertical-align: top;
}

.admin-feedback-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  vertical-align: middle;
  white-space: nowrap;
}

.admin-feedback-reply-modal {
  z-index: 120;
}

.admin-note-preview-modal {
  z-index: 120;
}

.admin-note-preview-content {
  min-height: 92px;
  max-height: min(52vh, 340px);
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.6;
  margin: 6px 0 14px;
  padding: 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.03);
  color: var(--text);
  font-size: 0.9rem;
}

.admin-feedback-reply-form {
  margin: 0;
}

.admin-feedback-reply-original-label {
  margin: 0 0 4px;
  font-size: 0.78rem;
}

.admin-feedback-reply-original {
  margin: 0 0 14px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.03);
  font-size: 0.85rem;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 120px;
  overflow: auto;
}

.admin-feedback-reply-textarea {
  width: 100%;
  max-width: 100%;
  min-height: 100px;
  margin: 6px 0 12px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  font: inherit;
  font-size: 0.9rem;
  box-sizing: border-box;
  resize: vertical;
}

.admin-feedback-reply-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.admin-td-refund {
  min-width: 140px;
  white-space: normal;
}

.admin-td-client {
  font-weight: 600;
  color: var(--text);
}

.admin-td-refund-request {
  min-width: 0;
}

.admin-refund-request-cell {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: flex-start;
  min-height: 70px;
}

.admin-refund-line {
  margin: 0;
  font-size: 0.73rem;
  line-height: 1.45;
}

.admin-refund-line .admin-muted {
  margin-right: 4px;
}

.admin-refund-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: flex-start;
  width: 100%;
}

.admin-refund-actions--inline {
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.admin-refund-pending {
  font-weight: 700;
  color: #b86a4f;
  font-size: 0.73rem;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 0.86rem;
}

.admin-table .btn-sm {
  padding: 4px 8px;
  font-size: 0.76rem;
}

.admin-td-actions,
.admin-td-delete {
  vertical-align: middle;
  white-space: nowrap;
}

.admin-td-actions--wrap {
  white-space: normal;
  line-height: 1.65;
}

.admin-td-actions--wrap .btn-sm {
  margin: 2px 4px 2px 0;
}

.admin-actions-gap {
  height: 6px;
}

.admin-td-proof {
  vertical-align: middle;
  text-align: center;
  max-width: 96px;
}

.admin-proof-link {
  display: inline-flex;
  justify-content: center;
  line-height: 0;
}

.admin-proof-thumb {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--line);
}

.admin-proof-open {
  display: block;
  margin-top: 4px;
  font-size: 0.72rem;
  color: var(--brand);
  text-decoration: underline;
}

.admin-proof-empty {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.04);
  color: var(--muted);
  font-size: 0.72rem;
}

.admin-td-delete .btn {
  color: #c45c4a;
}

@media (max-width: 900px) {
  .admin-layout-with-sidebar {
    flex-direction: column;
  }

  .admin-sidebar {
    position: static;
    width: 100%;
    flex: none;
  }

  .admin-side-nav {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .admin-side-link {
    flex: 1 1 auto;
    min-width: 120px;
  }

  .admin-side-hint {
    width: 100%;
  }
}

.admin-sidebar-divider {
  border: none;
  border-top: 1px solid var(--line);
  margin: 5px 0;
  opacity: 0.75;
}

.admin-sidebar-products-btn {
  width: 100%;
  box-sizing: border-box;
  text-align: left;
  padding: 7px 11px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.88);
  font: inherit;
  font-size: 0.86rem;
  cursor: pointer;
  color: var(--text);
  transition: background 0.15s, border-color 0.15s;
}

.admin-sidebar-products-btn:hover {
  background: rgba(255, 248, 240, 0.98);
  border-color: rgba(201, 120, 92, 0.35);
}

.admin-sidebar-products-btn.is-active {
  background: rgba(201, 120, 92, 0.12);
  border-color: rgba(201, 120, 92, 0.45);
  font-weight: 700;
}

.admin-products-form {
  display: block;
  margin-bottom: 18px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 252, 248, 0.65);
}

.admin-products-form-top {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) minmax(96px, 140px) minmax(180px, 1.4fr);
  gap: 12px 16px;
  align-items: start;
  margin-bottom: 4px;
}

.admin-products-form-top .admin-label input {
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
}

@media (max-width: 960px) {
  .admin-products-form-top {
    grid-template-columns: 1fr;
  }
}

.admin-label--bullets-card .admin-product-bullets-field {
  width: 100%;
  min-height: 120px;
  resize: vertical;
  font: inherit;
  font-size: 0.92rem;
  line-height: 1.55;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--panel-solid);
  box-shadow: var(--shadow-sm);
  box-sizing: border-box;
}

.admin-product-controls-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px 28px;
  padding: 12px 14px;
  margin-top: 12px;
  margin-bottom: 14px;
  border-radius: 10px;
  border: 1px solid rgba(201, 120, 92, 0.22);
  background: rgba(255, 250, 245, 0.95);
}

@media (min-width: 640px) {
  .admin-product-controls-row {
    display: grid;
    grid-template-columns: minmax(5rem, auto) minmax(12rem, 1fr) minmax(6rem, auto);
    align-items: end;
    column-gap: 24px;
    row-gap: 8px;
  }

  .admin-label--control {
    min-width: 0;
  }
}

.admin-label--control {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0;
  min-width: 0;
}

.admin-control-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
  line-height: 1.2;
}

.admin-control-select {
  min-width: 11rem;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid var(--line);
  font: inherit;
  font-size: 0.85rem;
  background: #fff;
  box-sizing: border-box;
}

.admin-control-input-num {
  width: 5.5rem;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid var(--line);
  font: inherit;
  font-size: 0.85rem;
  box-sizing: border-box;
}

.admin-control-input--check {
  display: flex;
  align-items: center;
  min-height: 38px;
}

.admin-control-input--check input[type="checkbox"] {
  width: 1.1rem;
  height: 1.1rem;
  accent-color: var(--brand, #b86a4f);
}

.admin-products-form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  padding-top: 4px;
}

/* 后台：公告编辑 */
.admin-announcement-form {
  display: block;
  margin-top: 8px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 252, 248, 0.65);
}

.admin-home-section-form {
  display: block;
  margin-top: 8px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 252, 248, 0.65);
}

.admin-home-section-form .admin-label input,
.admin-home-section-form .admin-label textarea {
  width: 100%;
  box-sizing: border-box;
  font: inherit;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid var(--line);
}

.admin-home-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin-bottom: 12px;
}

.admin-home-card-block {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.5);
}

.admin-home-card-block-title {
  margin: 0 0 10px;
  font-size: 0.95rem;
  color: var(--muted);
}

/* 后台：首页「核心服务 / 下单流程」实时预览 */
.admin-home-preview-wrap {
  margin-top: 16px;
}

.admin-home-preview-inner {
  padding: 14px 16px 18px;
  border-radius: 12px;
  border: 1px dashed rgba(201, 120, 92, 0.35);
  background: rgba(255, 252, 248, 0.75);
}

.admin-home-preview-scale h2 {
  font-size: 1.2rem;
  margin: 0 0 6px;
}

.admin-home-preview-scale > p {
  font-size: 0.88rem;
  margin: 0;
  color: var(--muted);
}

.admin-home-preview-inner .cards,
.admin-home-preview-inner .steps {
  margin-top: 12px;
}

.admin-home-preview-inner .step .step-index {
  font-size: 0.85rem;
}

.admin-announcement-textarea {
  width: 100%;
  min-height: 200px;
  margin-top: 8px;
  font: inherit;
  font-size: 0.92rem;
  line-height: 1.55;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--panel-solid);
  box-sizing: border-box;
  resize: vertical;
}

/* 首页：导航「公告」锚点 + 顶部悬浮窗 */
.announcement-anchor {
  scroll-margin-top: 96px;
  height: 0;
  overflow: hidden;
  pointer-events: none;
}

.announcement-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 88px 16px 24px;
  box-sizing: border-box;
  overflow: auto;
  background: rgba(15, 12, 10, 0.5);
  -webkit-overflow-scrolling: touch;
}

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

.announcement-popup {
  position: relative;
  width: min(92vw, 440px);
  max-height: min(52vh, 380px);
  overflow: auto;
  padding: 14px 42px 16px 16px;
  border-radius: 14px;
  background: var(--panel-solid);
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow-md);
  -webkit-overflow-scrolling: touch;
}

.announcement-popup-close {
  position: absolute;
  top: 6px;
  right: 8px;
  width: 32px;
  height: 32px;
  padding: 0;
  border: none;
  border-radius: 8px;
  background: rgba(61, 52, 44, 0.06);
  color: var(--text);
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.announcement-popup-close:hover {
  background: rgba(201, 120, 92, 0.18);
}

.announcement-popup-title {
  margin: 0 0 10px;
  font-size: 1.05rem;
  color: var(--text);
}

.announcement-popup-body {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 0.92rem;
  color: var(--muted);
  line-height: 1.6;
}

@media (max-width: 720px) {
  .announcement-modal-backdrop {
    padding-top: 76px;
  }

  .announcement-popup {
    width: min(94vw, 400px);
  }
}

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

.main-nav-msg-link {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.site-chat-fab {
  position: fixed;
  right: 18px;
  bottom: 148px;
  width: 56px;
  height: 56px;
  padding: 0;
  border: none;
  border-radius: 999px;
  background: #fff;
  cursor: pointer;
  box-shadow: var(--shadow-md);
  z-index: 45;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.site-chat-fab:hover {
  transform: scale(1.04);
  box-shadow: var(--shadow-md), 0 0 0 3px rgba(201, 120, 92, 0.2);
}

.site-chat-fab img {
  width: 56px;
  height: 56px;
  border-radius: 999px;
  display: block;
}

.site-chat-fab-dot {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 11px;
  height: 11px;
  background: #e53935;
  border-radius: 50%;
  border: 2px solid #fff;
  z-index: 1;
}

.site-chat-modal .site-chat-dialog {
  max-width: min(520px, 96vw);
  width: min(100%, 520px);
  min-height: min(440px, 82vh);
  max-height: min(92vh, 760px);
  display: flex;
  flex-direction: column;
  padding-bottom: 12px;
  box-sizing: border-box;
}

.site-chat-messages {
  flex: 1 1 auto;
  min-height: min(280px, 52vh);
  max-height: min(60vh, 560px);
  margin: 0 0 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel-solid);
  overflow-y: auto;
  overflow-x: hidden;
}

/**
 * 首页弹窗同时带 .chat-messages-scroll：独立聊天页里该类的 min-height:0 会叠在弹窗 flex 上，
 * 把消息区压成一条缝，必须用更高优先级覆盖。
 */
.site-chat-modal .site-chat-messages.chat-messages-scroll {
  flex: 1 1 auto;
  min-height: min(280px, 52vh);
  max-height: min(60vh, 560px);
}

.site-chat-compose {
  margin-top: 0;
  flex-shrink: 0;
}

.messages-page .messages-app-header,
.chat-page .messages-app-header {
  background: var(--panel-solid);
  border-bottom: 1px solid var(--line);
  padding: 14px 0;
}

.messages-app-header-inner {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 18px;
}

.messages-app-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.messages-app-title {
  margin: 0;
  font-size: 1.25rem;
  color: var(--text);
}

.messages-app-title--single {
  flex: 1;
  text-align: center;
}

.messages-back-home,
.chat-back-link {
  font-size: 0.9rem;
  color: var(--brand);
  text-decoration: none;
  margin-top: 6px;
  display: inline-block;
}

.chat-page-header .messages-app-title-row {
  justify-content: flex-start;
  align-items: center;
  gap: 14px;
}

.chat-back-link {
  margin-top: 0;
  font-weight: 600;
}

.messages-app-main {
  padding: 18px 0 48px;
}

/* 独立客服页：整页 flex，消息区固定可视高度 + 内部滚动 */
.chat-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
}

.chat-page-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 18px 0 24px;
  box-sizing: border-box;
}

.messages-app-container {
  max-width: 720px;
}

.msg-thread-list {
  list-style: none;
  margin: 0;
  padding: 0;
  background: var(--panel-solid);
  border-radius: 16px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.msg-thread-row {
  margin: 0;
  border-bottom: 1px solid var(--line);
}

.msg-thread-row:last-child {
  border-bottom: none;
}

.msg-thread-row-link {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  text-decoration: none;
  color: inherit;
  transition: background 0.15s ease;
}

.msg-thread-row-link:hover {
  background: var(--brand-soft);
}

.msg-thread-avatar {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
}

.msg-thread-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.msg-thread-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.msg-thread-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
}

.msg-thread-name {
  font-weight: 700;
  color: var(--text);
}

.msg-thread-time {
  font-size: 0.8rem;
  color: var(--muted);
  flex-shrink: 0;
}

.msg-thread-preview {
  font-size: 0.88rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.msg-thread-badge {
  flex-shrink: 0;
  min-width: 22px;
  height: 22px;
  padding: 0 7px;
  border-radius: 999px;
  background: #e53935;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.chat-page-shell {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  max-width: 720px;
  width: 100%;
  margin: 0 auto;
  padding: 0 18px;
  box-sizing: border-box;
  gap: 12px;
}

.chat-messages-scroll {
  flex: 1 1 0;
  min-height: 0;
  max-height: 100%;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel-solid);
  overflow-y: auto;
  overflow-x: hidden;
  box-shadow: var(--shadow-sm);
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.chat-empty-hint {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  text-align: center;
  padding: 24px 8px;
}

.chat-bubble-row {
  display: flex;
  flex-direction: column;
  margin-bottom: 12px;
  max-width: 88%;
}

.chat-bubble-row--user {
  align-self: flex-end;
  align-items: flex-end;
}

.chat-bubble-row--admin {
  align-self: flex-start;
  align-items: flex-start;
}

.chat-bubble {
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 0.95rem;
  line-height: 1.5;
  word-break: break-word;
}

.chat-bubble--user {
  background: linear-gradient(135deg, var(--brand) 0%, #b8654a 100%);
  color: #fff;
  border-bottom-right-radius: 4px;
}

.chat-bubble--admin {
  background: #fff;
  border: 1px solid var(--line);
  color: var(--text);
  border-bottom-left-radius: 4px;
}

.chat-bubble-meta {
  font-size: 0.72rem;
  color: var(--muted);
  margin-top: 4px;
  padding: 0 4px;
}

.chat-compose {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex-shrink: 0;
}

.chat-compose-input {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  padding: 10px 12px;
  font: inherit;
  resize: vertical;
  min-height: 64px;
  background: #fff;
}

.chat-compose-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
  align-items: center;
}

.chat-compose-send {
  align-self: flex-end;
}

.chat-bubble-img {
  display: block;
  max-width: min(260px, 88vw);
  height: auto;
  border-radius: 10px;
  vertical-align: middle;
}

.chat-bubble-text {
  margin: 0.35rem 0 0;
}

.chat-bubble-text:first-child {
  margin-top: 0;
}

.quote-quote-reply {
  margin: 10px 0 0;
  font-size: 0.92rem;
  color: var(--muted);
  line-height: 1.45;
}

.quote-quote-reply-label {
  font-weight: 600;
  color: var(--text);
  margin-right: 6px;
}

.quote-quote-reply-text {
  font-style: italic;
}

/* ---------- 后台 · 评论管理 ---------- */
.admin-reviews-section {
  max-width: 1200px;
}

.admin-reviews-intro {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  margin-bottom: 16px;
  border-radius: 14px;
  border: 1px solid rgba(201, 120, 92, 0.28);
  background: linear-gradient(135deg, rgba(255, 250, 246, 0.98) 0%, rgba(255, 243, 235, 0.65) 100%);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.8) inset;
}

.admin-reviews-intro-icon {
  font-size: 1.35rem;
  line-height: 1.2;
  flex-shrink: 0;
}

.admin-reviews-intro-text {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.88rem;
  line-height: 1.55;
  color: var(--text);
}

.admin-reviews-intro-text strong {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text);
}

.admin-reviews-intro-text code {
  font-size: 0.82em;
  padding: 2px 6px;
  border-radius: 6px;
  background: rgba(201, 120, 92, 0.12);
  border: 1px solid rgba(201, 120, 92, 0.2);
}

.admin-reviews-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.admin-reviews-stat {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  color: #6b4a3a;
  background: rgba(201, 120, 92, 0.12);
  border: 1px solid rgba(201, 120, 92, 0.22);
}

.admin-reviews-msg:empty {
  display: none;
}

.admin-reviews-msg:not(:empty) {
  margin-bottom: 14px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(255, 243, 235, 0.9);
  border: 1px solid rgba(201, 120, 92, 0.35);
  color: #7a3e2f;
  font-size: 0.86rem;
  line-height: 1.5;
}

.admin-reviews-add-block {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 0;
  background: var(--panel-solid, #fff);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  margin-bottom: 20px;
}

.admin-reviews-add-head {
  padding: 16px 18px 12px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 1) 0%, rgba(255, 252, 249, 1) 100%);
}

.admin-reviews-add-title {
  margin: 0 0 6px;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--text);
}

.admin-reviews-add-sub {
  margin: 0;
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.45;
}

.admin-reviews-add-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 18px;
  padding: 18px 18px 16px;
  align-items: end;
}

.admin-reviews-add-form .admin-reviews-field input,
.admin-reviews-add-form .admin-reviews-field select.admin-reviews-select {
  min-width: 0;
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  font: inherit;
  background: #fff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.admin-reviews-add-form .admin-reviews-field select.admin-reviews-select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

.admin-reviews-add-form .admin-reviews-field input:focus,
.admin-reviews-add-form .admin-reviews-field select.admin-reviews-select:focus {
  outline: none;
  border-color: rgba(201, 120, 92, 0.65);
  box-shadow: 0 0 0 3px rgba(201, 120, 92, 0.15);
}

.admin-reviews-add-form .admin-reviews-field--full {
  grid-column: 1 / -1;
}

.admin-reviews-add-form .admin-reviews-field--full textarea {
  width: 100%;
  max-width: none;
  min-height: 88px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  font: inherit;
  line-height: 1.5;
  resize: vertical;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.admin-reviews-add-form .admin-reviews-field--full textarea:focus {
  outline: none;
  border-color: rgba(201, 120, 92, 0.65);
  box-shadow: 0 0 0 3px rgba(201, 120, 92, 0.15);
}

.admin-reviews-add-actions {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-end;
  padding-top: 4px;
}

@media (max-width: 720px) {
  .admin-reviews-add-form {
    grid-template-columns: 1fr;
  }
}

.admin-reviews-table-shell {
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--panel-solid, #fff);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.admin-reviews-table-wrap {
  margin: 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.admin-table.admin-reviews-table {
  margin: 0;
  min-width: 860px;
}

.admin-reviews-table thead th {
  font-size: 0.78rem;
  text-transform: none;
  letter-spacing: 0.04em;
  font-weight: 700;
  color: var(--muted);
  background: linear-gradient(180deg, rgba(250, 248, 246, 1) 0%, rgba(245, 240, 235, 0.92) 100%);
  border-bottom: 2px solid rgba(201, 120, 92, 0.22);
  padding: 12px 14px;
  white-space: nowrap;
}

.admin-reviews-table tbody tr {
  transition: background 0.12s ease;
}

.admin-reviews-table tbody tr:hover {
  background: rgba(201, 120, 92, 0.06);
}

.admin-reviews-table tbody td {
  vertical-align: top;
  padding: 12px 14px;
  font-size: 0.88rem;
}

.admin-reviews-cell-time {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
  font-size: 0.84rem;
}

.admin-reviews-cell-author {
  font-weight: 600;
  color: var(--text);
  max-width: 140px;
}

.admin-reviews-cell-content {
  max-width: 280px;
  line-height: 1.5;
}

.admin-review-kind-pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.admin-review-kind-pill--good {
  color: #1b6b3a;
  background: rgba(46, 160, 90, 0.14);
  border: 1px solid rgba(46, 160, 90, 0.28);
}

.admin-review-kind-pill--bad {
  color: #9a2c2c;
  background: rgba(198, 80, 80, 0.12);
  border: 1px solid rgba(198, 80, 80, 0.28);
}

.admin-reviews-cell-reply .admin-review-reply-text {
  max-width: 100%;
  min-width: 200px;
  min-height: 64px;
}

.admin-reviews-table .admin-td-actions {
  white-space: nowrap;
}

.admin-reviews-table .admin-td-actions .btn + .btn {
  margin-left: 6px;
}

.admin-review-reply-text {
  width: 100%;
  min-width: 160px;
  max-width: 280px;
  font: inherit;
  padding: 6px 8px;
  border-radius: 8px;
  border: 1px solid var(--line);
  resize: vertical;
}

.chat-page-err {
  margin: 0;
  color: #c62828;
  font-size: 0.9rem;
}

/* 固定高度 + 内部滚动，避免长会话把整页撑得无限长 */
.admin-chat-layout {
  display: grid;
  grid-template-columns: minmax(200px, 280px) 1fr;
  gap: 16px;
  align-items: stretch;
  height: clamp(380px, calc(100vh - 260px), 860px);
  min-height: 380px;
  max-height: min(calc(100vh - 260px), 860px);
}

@media (max-width: 900px) {
  .admin-chat-layout {
    grid-template-columns: 1fr;
    height: auto;
    max-height: none;
    min-height: 0;
  }

  .admin-chat-thread-list {
    max-height: min(260px, 42vh);
  }

  .admin-chat-pane {
    height: min(58vh, 560px);
    min-height: 280px;
    max-height: min(68vh, 640px);
  }
}

.admin-chat-thread-list {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  min-height: 0;
  height: 100%;
  max-height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  -webkit-overflow-scrolling: touch;
}

.admin-toolbar--chat {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
}

.admin-chat-batch-select-all {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.88rem;
  color: var(--text);
  cursor: pointer;
  user-select: none;
}

.admin-chat-thread-item {
  display: flex;
  align-items: stretch;
  border-bottom: 1px solid var(--line);
}

.admin-chat-thread-cb {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  margin: 0 0 0 10px;
  align-self: center;
  cursor: pointer;
  accent-color: var(--accent, #c9785c);
}

.admin-chat-thread-item:last-child {
  border-bottom: none;
}

.admin-chat-thread-btn {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 4px;
  text-align: left;
  padding: 10px 12px;
  border: none;
  border-bottom: none;
  background: transparent;
  cursor: pointer;
  font: inherit;
  color: var(--text);
  transition: background 0.12s ease;
  flex: 1;
  min-width: 0;
}

.admin-chat-thread-delete {
  flex-shrink: 0;
  width: 38px;
  align-self: stretch;
  border: none;
  border-left: 1px solid var(--line);
  background: transparent;
  cursor: pointer;
  color: var(--muted);
  font-size: 1.25rem;
  line-height: 1;
  padding: 0;
  transition: background 0.12s ease, color 0.12s ease;
}

.admin-chat-thread-delete:hover {
  background: rgba(229, 57, 53, 0.08);
  color: #c62828;
}

.admin-chat-thread-btn:hover {
  background: rgba(201, 120, 92, 0.08);
}

.admin-chat-thread-btn.is-active {
  background: rgba(201, 120, 92, 0.16);
  font-weight: 600;
}

.admin-chat-thread-row-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
}

.admin-chat-thread-title {
  font-size: 0.9rem;
  margin-bottom: 0;
  flex: 1;
  min-width: 0;
  text-align: left;
}

.admin-chat-thread-badge {
  flex-shrink: 0;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: #e53935;
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
  box-sizing: border-box;
}

.admin-chat-thread-preview {
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.35;
}

.admin-chat-pane {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  padding: 12px;
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: 100%;
  max-height: 100%;
  overflow: hidden;
}

.admin-chat-msg-scroll {
  flex: 1 1 0;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  margin-bottom: 12px;
  padding: 0;
  border: 1px solid rgba(201, 120, 92, 0.22);
  border-radius: 12px;
  background: linear-gradient(180deg, #faf8f6 0%, #f0ebe6 100%);
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.admin-chat-empty-hint {
  margin: 0;
  padding: 28px 16px;
  text-align: center;
  font-size: 0.88rem;
  color: var(--muted);
}

.admin-chat-msg-scroll.admin-chat-bubbles-inner {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 12px 10px;
}

.admin-chat-bubble-row {
  display: flex;
  flex-direction: column;
  max-width: min(92%, 420px);
}

/* 后台视角：客户在左，客服（我）在右 */
.admin-chat-bubble-row--user {
  align-self: flex-start;
  align-items: flex-start;
}

.admin-chat-bubble-row--admin {
  align-self: flex-end;
  align-items: flex-end;
}

.admin-chat-bubble {
  padding: 9px 13px;
  border-radius: 14px;
  font-size: 0.9rem;
  line-height: 1.45;
  word-break: break-word;
  box-shadow: 0 1px 3px rgba(60, 40, 30, 0.08);
}

.admin-chat-bubble--user {
  background: #fff;
  border: 1px solid var(--line);
  color: var(--text);
  border-bottom-left-radius: 5px;
}

.admin-chat-bubble--admin {
  background: linear-gradient(135deg, var(--brand) 0%, #b8654a 100%);
  color: #fff;
  border: none;
  border-bottom-right-radius: 5px;
}

.admin-chat-bubble-text {
  margin: 0;
  white-space: pre-wrap;
}

.admin-chat-bubble-meta {
  font-size: 0.7rem;
  color: var(--muted);
  margin-top: 4px;
  padding: 0 4px;
  line-height: 1.35;
  max-width: 100%;
}

.admin-chat-bubble-row--user .admin-chat-bubble-meta {
  text-align: left;
}

.admin-chat-bubble-row--admin .admin-chat-bubble-meta {
  text-align: right;
}

.admin-chat-bubble-img {
  display: block;
  max-width: min(260px, 100%);
  height: auto;
  border-radius: 8px;
  margin-top: 4px;
}

.admin-chat-reply-form {
  flex-shrink: 0;
}

.admin-chat-reply-label-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 12px;
  margin-bottom: 6px;
}

.admin-chat-reply-label.admin-label {
  margin-bottom: 0;
}

.admin-chat-reply-kbd-hint {
  font-size: 0.75rem;
  color: var(--muted);
  font-weight: 500;
}

.admin-chat-reply-textarea {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  padding: 10px 12px;
  font: inherit;
  resize: vertical;
  min-height: 72px;
  max-height: 200px;
  line-height: 1.45;
}

.admin-chat-reply-actions {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  justify-content: flex-end;
}

@media (max-width: 720px) {
  .site-chat-fab {
    bottom: 132px;
    right: 14px;
    width: 52px;
    height: 52px;
  }

  .site-chat-fab img {
    width: 52px;
    height: 52px;
  }
}
