/* ============================================
   AIPlay — AI Image Lab (International)
   Xingtu / Meitu-style mobile design
   ============================================ */

:root {
  color-scheme: dark;
  --bg-base: #000000;
  --bg-surface: #0a0a0a;
  --bg-card: #141414;
  --bg-card-hover: #1a1a1a;
  --bg-input: #1c1c1c;
  --border: rgba(255, 255, 255, 0.08);
  --border-bright: rgba(255, 255, 255, 0.16);

  --text-primary: #ffffff;
  --text-secondary: rgba(255, 255, 255, 0.55);
  --text-muted: rgba(255, 255, 255, 0.42);

  --accent: #32bd86;
  --accent-soft: rgba(50, 189, 134, 0.13);
  --accent-dark: #1d9569;
  --accent-border: rgba(50, 189, 134, 0.4);
  --pink: #ff2d78;
  --purple: #9d4edd;
  --cyan: #00d9ff;

  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --radius-full: 999px;

  --shadow-card: 0 4px 20px rgba(0, 0, 0, 0.35);
  --shadow-float: 0 8px 30px rgba(0, 0, 0, 0.5);

  --nav-height: 60px;
  --header-height: 52px;
  --max-width: 480px;

  --font: 'Plus Jakarta Sans', 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font);
  background: var(--bg-base);
  color: var(--text-primary);
  line-height: 1.45;
  overflow-x: hidden;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
button, input { font-family: inherit; border: none; }
button { cursor: pointer; background: none; color: inherit; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

/* 键盘焦点可见性：仅键盘导航时显示品牌色焦点环 */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

#app {
  max-width: var(--max-width);
  margin: 0 auto;
  min-height: 100vh;
  padding-bottom: calc(var(--nav-height) + env(safe-area-inset-bottom, 0px));
  position: relative;
  background: var(--bg-base);
}

.view {
  animation: viewIn 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  padding: 0 16px;
  padding-bottom: calc(var(--nav-height) + 16px + env(safe-area-inset-bottom, 0px)); /* 底部导航常驻，内容不被遮挡 */
}

@keyframes viewIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- Header ---------- */
.top-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  background: rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

.top-header-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.global-legal-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 12px 76px;
  font-size: 0.68rem;
  color: rgba(255, 255, 255, 0.45);
}
.global-legal-links a {
  color: rgba(255, 255, 255, 0.62);
  text-decoration: underline;
}
.global-legal-links span { opacity: 0.5; }

.header-price-btn {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 999px;
  background: linear-gradient(145deg, #67e8c8, #37c8a7);
  border: none;
  color: #06251b;
  font-size: 0.72rem;
  font-weight: 800;
  font-family: inherit;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(50, 189, 134, 0.28);
  transition: transform 0.18s ease, filter 0.18s ease;
}
.header-price-btn:hover { transform: scale(1.03); filter: brightness(1.05); }
.header-price-btn:active { transform: scale(0.97); }

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.15rem;
  font-weight: 800;
}

.brand-icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
}

/* 语言选择器 — Apple 风格自定义下拉（圆角毛玻璃面板，不用原生 select） */
.lang-selector {
  position: relative;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.14);
  font-size: 0.78rem;
  font-weight: 600;
  color: #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}
.lang-globe { font-size: 0.85rem; line-height: 1; }
.lang-current {
  display: flex;
  align-items: center;
  gap: 5px;
  background: transparent;
  border: none;
  color: #fff;
  font-size: 0.78rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  padding: 0;
}
.lang-chev {
  width: 9px;
  height: 9px;
  border-right: 1.6px solid rgba(255, 255, 255, 0.85);
  border-bottom: 1.6px solid rgba(255, 255, 255, 0.85);
  transform: rotate(45deg) translateY(-2px);
  transition: transform 0.2s ease;
  opacity: 0.85;
}
.lang-selector.open .lang-chev { transform: rotate(225deg) translateY(-1px); }

.lang-menu {
  position: absolute;
  top: calc(100% + 8px);
  inset-inline-end: 0;
  min-width: 168px;
  padding: 4px;
  border-radius: 16px;
  background: rgba(28, 28, 30, 0.96);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.55);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px) scale(0.98);
  transform-origin: top right;
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
  z-index: 200;
}
.lang-menu.open { opacity: 1; visibility: visible; transform: translateY(0) scale(1); }
.lang-opt {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 5px 12px;
  border-radius: 10px;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.92);
  cursor: pointer;
  transition: background 0.15s ease;
}
.lang-opt:hover { background: rgba(255, 255, 255, 0.08); }
.lang-opt.active { color: var(--accent, #32bd86); font-weight: 700; }
.lang-check { font-size: 0.8rem; color: var(--accent, #32bd86); }
.back-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-height);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 16px;
  background: rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

.back-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  color: var(--text-primary);
  transition: background 0.2s;
}

.back-btn:active { background: var(--bg-card); }

.back-header h1 {
  font-size: 1.05rem;
  font-weight: 700;
}

.me-top-header h1 {
  flex: 1;
  text-align: center;
  font-size: 1.05rem;
  font-weight: 700;
}

/* 我的最近作品：双列瀑布 */
.user-works-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 4px;
}

.user-work-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  cursor: pointer;
}

.my-order-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px 16px;
  margin-bottom: 10px;
}

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

.my-order-top b {
  font-size: .9rem;
  font-weight: 800;
}

.my-order-status {
  padding: 2px 9px;
  border-radius: 999px;
  font-size: .6rem;
  font-weight: 800;
  color: #4ade80;
  background: rgba(34, 197, 94, .12);
  border: 1px solid rgba(34, 197, 94, .28);
}

.my-order-amount {
  margin-top: 8px;
  font-size: 1.35rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.my-order-meta {
  margin-top: 4px;
  font-size: .64rem;
  color: var(--text-muted);
}
.my-order-status.warn { color: #ffd166; background: rgba(255,209,102,.1); border-color: rgba(255,209,102,.28); }
.my-ticket-message {
  margin-top: 8px;
  font-size: .72rem;
  color: var(--text-primary);
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
}
.my-ticket-reply {
  margin-top: 8px;
  padding: 8px 10px;
  border-radius: 10px;
  font-size: .68rem;
  line-height: 1.5;
  color: #4ade80;
  background: rgba(34,197,94,.08);
  border: 1px solid rgba(34,197,94,.18);
  white-space: pre-wrap;
  word-break: break-word;
}
.my-ticket-reply.pending {
  color: rgba(232,250,243,.5);
  background: rgba(255,255,255,.04);
  border-color: rgba(255,255,255,.1);
}
.credit-type-badge {
  display: inline-block;
  padding: 1px 7px;
  border-radius: 999px;
  font-size: .54rem;
  font-weight: 800;
  color: rgba(232, 250, 243, .55);
  background: rgba(255, 255, 255, .07);
  flex: 0 0 auto;
}

.user-work-thumb {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: #111;
}

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

.user-work-empty {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  color: rgba(255,255,255,0.25);
}

.user-work-progress {
  position: absolute;
  right: 8px;
  bottom: 8px;
  left: 8px;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(0,0,0,0.62);
}

.user-work-fill {
  flex: 1;
  height: 4px;
  border-radius: 999px;
  background: var(--accent);
  transition: width 0.3s;
}

.user-work-progress span {
  color: #fff;
  font-size: 0.62rem;
  font-weight: 700;
}

/* 生成失败：整块遮罩 + 「重新生成」按钮（不退款、不重复扣额度） */
.user-work-failed {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 10px;
  background: rgba(8, 10, 14, .74);
  text-align: center;
}
.user-work-failed span {
  color: #ffb4b4;
  font-size: 0.64rem;
  font-weight: 700;
  line-height: 1.4;
  text-wrap: balance;
}
.user-work-retry {
  border: 0;
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 0.64rem;
  font-weight: 800;
  font-family: inherit;
  color: #fff;
  background: rgba(255, 255, 255, .18);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .28);
  cursor: pointer;
  transition: filter .18s, transform .18s;
}
.user-work-retry.primary {
  color: #06231b;
  background: var(--accent);
  box-shadow: 0 6px 16px var(--accent-soft);
}
.user-work-retry:hover { filter: brightness(1.08); }
.user-work-retry:active { transform: scale(.97); }

.user-work-name {
  padding: 8px 8px 2px;
  font-size: 0.72rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-work-time {
  padding: 0 8px 8px;
  font-size: 0.6rem;
  color: var(--text-muted);
}

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

/* 生成中：呼吸旋转动画 */
.user-work-card.is-generating .user-work-thumb img,
.user-work-card.is-generating .user-work-thumb video {
  filter: brightness(0.72) saturate(0.85);
}
.user-work-spinner {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 34px;
  height: 34px;
  margin: -17px 0 0 -17px;
  border-radius: 50%;
  border: 3px solid var(--accent-soft);
  border-top-color: var(--accent);
  animation: workSpin 0.9s linear infinite;
  pointer-events: none;
  z-index: 2;
}
@keyframes workSpin {
  to { transform: rotate(360deg); }
}
.user-work-card.is-generating {
  box-shadow: 0 0 0 1px var(--accent-border), 0 8px 26px var(--accent-soft);
}
.user-work-eta {
  color: var(--accent);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

/* 生成中作品详情弹窗 */
.work-detail-modal {
  display: flex;
  align-items: center;
  justify-content: center;
  overscroll-behavior: contain;
}
.work-detail-card {
  position: relative;
  width: 86%;
  max-width: 360px;
  max-height: 88vh;
  overflow-y: auto;
  border-radius: 22px;
  background: #0e1420;
  border: 1px solid rgba(94, 240, 202, 0.28);
  box-shadow: 0 24px 70px rgba(0,0,0,0.6);
  padding: 18px;
  box-sizing: border-box;
  animation: wpPop 0.25s cubic-bezier(.22,.61,.36,1);
}
.work-detail-head {
  font-size: 0.86rem;
  font-weight: 800;
  color: var(--accent);
  margin-bottom: 12px;
}
.work-detail-thumb {
  position: relative;
  aspect-ratio: 3 / 4;
  border-radius: 14px;
  overflow: hidden;
  background: #111;
}
.work-detail-thumb img { width: 100%; height: 100%; object-fit: cover; }
.work-detail-name {
  font-size: 1.02rem;
  font-weight: 800;
  margin: 12px 0 8px;
}
.work-detail-progress {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.06);
}
.work-detail-progress .user-work-fill { flex: 1; }
.work-detail-progress span { font-size: 0.68rem; font-weight: 800; color: #fff; }
.work-detail-eta {
  margin: 8px 0 4px;
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--accent);
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.work-detail-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 7px 0;
  border-top: 1px solid rgba(255,255,255,0.06);
  font-size: 0.74rem;
}
.work-detail-row > span { color: var(--text-muted); flex: 0 0 auto; }
.work-detail-row > b { color: var(--text-primary); font-weight: 700; text-align: right; word-break: break-all; }
.work-detail-photos { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.work-detail-photos img {
  width: 44px;
  height: 58px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.12);
}
.work-detail-hint {
  margin-top: 10px;
  font-size: 0.62rem;
  color: var(--text-muted);
  text-align: center;
}

/* 用户登录模块 */
.user-login-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 20px;
}

.user-login-input {
  width: 100%;
  padding: 9px 12px;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: var(--bg-input);
  color: var(--text-primary);
  font-size: 0.78rem;
  margin-bottom: 8px;
  outline: none;
}
.user-login-input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
  border-color: var(--accent-border);
}

.user-login-btns {
  display: flex;
  gap: 8px;
}

.user-login-btn {
  flex: 1;
  padding: 9px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.07);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
}

.user-usage-row {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  flex-wrap: wrap;
}

.user-usage-row span {
  font-size: 0.66rem;
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
}

.user-logout-btn {
  flex: 0 0 auto;
  width: auto;
  padding: 7px 14px;
  border-color: rgba(255,107,107,0.35);
  background: rgba(255,107,107,0.12);
  color: #ff9b9b;
}

/* ===== 个人信息卡片：浅色高对比重构 ===== */
.user-login-card {
  background: linear-gradient(165deg, #ffffff 0%, #f2fbf8 58%, #eef4ff 100%);
  color: #14372d;
  border: 1px solid rgba(46, 230, 178, 0.45);
  border-radius: 20px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.user-login-card,
.user-login-card div {
  color: #14372d !important;
}

.user-login-card [style*="background: var(--accent)"] {
  background: #16b98d !important;
  color: #fff !important;
}

.user-login-card .user-usage-row span {
  background: #16b98d !important;
  color: #fff !important;
}

.user-login-card .user-login-btn {
  color: #fff !important;
  background: #16b98d !important;
  border-color: rgba(20, 80, 62, 0.25) !important;
}

.user-login-card .user-logout-btn {
  color: #b42318 !important;
  background: #fff !important;
  border-color: rgba(180, 35, 24, 0.4) !important;
}

/* 登录页：4:3 登录卡片 */
.login-page {
  display: flex;
  justify-content: center;
  padding: 24px 16px;
}

.login-card {
  width: 100%;
  max-width: 400px;
  aspect-ratio: 4 / 3;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow-y: auto;
}

.login-brand {
  font-size: 1.4rem;
  font-weight: 900;
  text-align: center;
}

.login-sub {
  text-align: center;
  font-size: 0.68rem;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.login-social {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.login-social-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.05);
  color: #fff;
  font-size: 0.74rem;
  font-weight: 700;
  cursor: pointer;
}

.login-social-icon {
  display: inline-flex;
  width: 16px;
  height: 16px;
}

.login-social-icon .brand-svg-icon {
  width: 16px;
  height: 16px;
}

.login-divider {
  text-align: center;
  font-size: 0.6rem;
  color: var(--text-muted);
  margin: 4px 0;
}

.login-code-row {
  display: flex;
  gap: 8px;
}

.login-code-row .user-login-input {
  flex: 1;
  margin-bottom: 0;
}

.login-code-btn {
  flex: 0 0 auto;
  padding: 0 12px;
  border-radius: 9px;
  border: 1px solid var(--accent-border);
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.68rem;
  font-weight: 700;
  cursor: pointer;
}

.login-bottom {
  display: flex;
  gap: 10px;
  margin-top: auto;
}

.login-bottom-btn {
  flex: 1;
  padding: 11px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.06);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 800;
  cursor: pointer;
}

.login-bottom-btn.primary {
  background: var(--accent);
  color: #103c2c;
  border-color: transparent;
}

/* ===== 品牌风格覆盖：Mint Flow 登录卡 ===== */
.login-page {
  background: transparent;
}

.login-card {
  position: relative;
  background:
    radial-gradient(circle at 88% 8%, rgba(158, 223, 255, 0.35), transparent 34%),
    radial-gradient(circle at 8% 90%, rgba(200, 170, 255, 0.28), transparent 36%),
    linear-gradient(165deg, #ffffff 0%, #f2fbf8 45%, #f0f3ff 100%);
  border: 1px solid rgba(90, 200, 175, 0.35);
  border-radius: 26px 26px 26px 8px;
  box-shadow:
    0 22px 55px rgba(42, 165, 140, 0.18),
    0 6px 18px rgba(0, 0, 0, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  overflow: hidden;
}

.login-card::before {
  content: '';
  position: absolute;
  top: -34px;
  right: -30px;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(92, 224, 190, 0.35), rgba(158, 223, 255, 0.2), rgba(190, 165, 255, 0.3));
  filter: blur(8px);
  pointer-events: none;
}

.login-brand {
  position: relative;
  z-index: 1;
  font-size: 1.55rem;
  font-weight: 900;
  letter-spacing: -0.03em;
  color: #0e2f28;
  background: linear-gradient(120deg, #16b98d, #4ec9f0 55%, #9b8cff);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.login-sub {
  position: relative;
  z-index: 1;
  color: #4a6a62;
  font-weight: 600;
}

.login-social-btn {
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.86);
  color: #16332c;
  border: 1px solid rgba(40, 140, 120, 0.16);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  font-weight: 800;
}

.login-social-btn[data-provider="google"] {
  background: #ffffff;
  color: #222;
}
.login-social-btn[data-provider="instagram"] {
  background: linear-gradient(90deg, #f9ce34, #ee2a7b 55%, #6228d7);
  color: #fff;
  border-color: transparent;
}
.login-social-btn[data-provider="facebook"] {
  background: #1877f2;
  color: #fff;
  border-color: transparent;
}
.login-social-btn[data-provider="x"] {
  background: #0f1419;
  color: #fff;
  border-color: transparent;
}

.login-divider {
  color: #6a8b82;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.login-phone .user-login-input {
  background: rgba(255, 255, 255, 0.92);
  color: #16332c;
  border-color: rgba(40, 140, 120, 0.22);
}

.login-code-btn {
  background: #2ee6b2;
  color: #083b2e;
  border: none;
}

.login-bottom-btn {
  background: rgba(255, 255, 255, 0.9);
  color: #16332c;
  border: 1px solid rgba(40, 140, 120, 0.2);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.login-bottom-btn.primary {
  background: linear-gradient(120deg, #22d8a8, #2ec9ef);
  color: #073528;
  border: none;
  box-shadow: 0 8px 20px rgba(34, 216, 168, 0.35);
}

/* ===== 登录卡片 V2：小胶囊 + 垂直居中 + 薄荷黑渐变 ===== */
.login-page {
  min-height: calc(100dvh - var(--header-height) - var(--nav-height));
  align-items: center;
}

.login-card {
  background: linear-gradient(170deg, #2ee6b2 0%, #14c497 48%, #0a2b22 100%);
  border-color: rgba(255, 255, 255, 0.18);
  box-shadow: 0 24px 60px rgba(10, 60, 46, 0.35);
}

.login-card::before {
  display: none;
}

.login-brand {
  color: #fff;
  background: linear-gradient(120deg, #ffffff, #d9fff2);
  -webkit-text-fill-color: transparent;
}

.login-sub {
  color: rgba(255, 255, 255, 0.78);
}

.login-social {
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.login-social-btn {
  flex: 0 0 auto;
  width: auto;
  min-width: 0;
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 800;
}

.login-social-btn[data-provider="google"] {
  background: #fff;
  color: #222;
}
.login-social-btn[data-provider="instagram"] {
  background: linear-gradient(90deg, #f9ce34, #ee2a7b 55%, #6228d7);
  color: #fff;
}
.login-social-btn[data-provider="facebook"] {
  background: #1877f2;
  color: #fff;
}
.login-social-btn[data-provider="x"] {
  background: #0f1419;
  color: #fff;
}

.login-divider {
  color: rgba(255, 255, 255, 0.7);
}

.login-code-btn {
  background: #fff;
  color: #0b3b2e;
  border: none;
}

.login-bottom-btn {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.28);
}

.login-bottom-btn.primary {
  background: #fff;
  color: #0b3b2e;
  border: none;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
}

/* ===== 登录卡片 V3：统一胶囊/圆角 + 登录注册选择 ===== */
.login-card {
  border-radius: 24px;
  padding: 12px;
  gap: 4px;
  overflow: hidden;
}

.login-brand {
  font-size: 1.05rem;
}

.login-sub {
  font-size: 0.56rem;
  margin-bottom: 0;
}

.login-seg {
  display: flex;
  background: rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  padding: 3px;
}

.login-seg-btn {
  flex: 1;
  padding: 4px 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.68rem;
  font-weight: 800;
  cursor: pointer;
}

.login-seg-btn.active {
  background: #fff;
  color: #0b3b2e;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.login-social {
  gap: 6px;
}

.login-social-btn {
  width: 44px;
  height: 30px;
  padding: 0;
  border-radius: 999px;
  font-size: 0.7rem;
}

.login-social-icon {
  width: 13px;
  height: 13px;
}

.login-divider {
  margin: 1px 0;
  font-size: 0.56rem;
}

.login-phone .user-login-input {
  padding: 5px 9px;
  font-size: 0.7rem;
  margin-bottom: 4px;
}

.login-code-btn {
  font-size: 0.62rem;
}

.login-bottom {
  gap: 8px;
  margin-top: 2px;
}

.login-bottom-btn {
  padding: 8px;
  font-size: 0.72rem;
}

/* ===== 登录卡片 V5：Skill 重构 — 深色玻璃 + Mint 光感 ===== */
.login-card {
  position: relative;
  background: rgba(255, 255, 255, 0.07);
  -webkit-backdrop-filter: blur(24px) saturate(1.2);
  backdrop-filter: blur(24px) saturate(1.2);
  border: 1px solid rgba(94, 240, 202, 0.32);
  box-shadow:
    0 24px 60px rgba(0, 0, 0, 0.45),
    0 0 42px rgba(46, 230, 178, 0.14);
  font-family: 'Nunito', 'Plus Jakarta Sans', sans-serif;
  gap: 2px;
  padding: 34px 10px 10px;
}

.login-sub {
  display: none;
}

.login-card-head {
  position: absolute;
  top: -1px;
  right: -1px;
  left: -1px;
  height: 30px;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(120deg, #8dffdc, #4ec9f0, #b9a6ff);
  border-bottom: 3px solid rgba(7, 53, 40, 0.3);
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.6),
    inset 0 -4px 0 rgba(7, 53, 40, 0.16),
    0 5px 16px rgba(0, 0, 0, 0.18);
  color: #073528;
  font-family: 'Nunito', sans-serif;
  font-weight: 900;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
  border-radius: 24px 24px 0 0;
  flex: none;
}

.login-brand {
  font-family: 'Nunito', sans-serif;
  background: linear-gradient(120deg, #8dffdc, #4ec9f0, #b9a6ff);
  -webkit-text-fill-color: transparent;
}

.login-seg {
  background: rgba(255, 255, 255, 0.08);
}

.login-seg-btn.active {
  background: #fff;
  color: #0b3b2e;
}

.login-label {
  display: block;
  font-size: 0.56rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: rgba(255, 255, 255, 0.7);
  margin: 1px 0 2px;
}

.login-phone .user-login-input {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border-color: rgba(94, 240, 202, 0.28);
  margin-bottom: 2px;
}

.login-phone .user-login-input:focus-visible {
  outline: 2px solid rgba(94, 240, 202, 0.7);
  outline-offset: 1px;
  border-color: #5ef0ca;
}

.login-code-btn {
  background: linear-gradient(120deg, #22d8a8, #2ec9ef);
  color: #073528;
}

.login-bottom-btn {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.18);
}

.login-bottom-btn.primary {
  background: linear-gradient(120deg, #22d8a8, #2ec9ef);
  color: #073528;
  box-shadow: 0 8px 22px rgba(34, 216, 168, 0.35);
}

.login-social-btn,
.login-bottom-btn {
  transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

.login-social-btn:active,
.login-bottom-btn:active {
  transform: scale(0.96);
}

@media (prefers-reduced-motion: reduce) {
  .login-social-btn,
  .login-bottom-btn {
    transition: none;
  }
}

/* 全局登录弹窗 */
.login-modal {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(0, 0, 0, 0.62);
  overscroll-behavior: contain;
}

.login-card-modal {
  width: 100%;
  max-width: 360px;
}

.login-modal-close {
  position: absolute;
  top: 8px;
  right: 10px;
  z-index: 5;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 50%;
  background: rgba(7, 53, 40, 0.28);
  color: #073528;
  font-size: 1rem;
  font-weight: 900;
  cursor: pointer;
}

/* ---------- Select Photo Button ---------- */
.select-photo-btn {
  position: sticky;
  top: var(--header-height);
  z-index: 40;
  width: 100%;
  padding: 14px 16px;
  margin: 16px 0;
  border-radius: var(--radius-md);
  background: var(--bg-card);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  transition: background-color 0.2s, border-color 0.2s, color 0.2s, transform 0.2s, box-shadow 0.2s, opacity 0.2s;
}

.select-photo-btn:active {
  background: var(--bg-card-hover);
  transform: scale(0.99);
}

.select-photo-btn .plus {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #000;
  font-size: 1.2rem;
  font-weight: 800;
}

/* ---------- Category Tabs ---------- */
.category-tabs {
  position: sticky;
  top: var(--header-height);
  z-index: 40;
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 12px 0;
  margin: 0 -16px;
  padding-left: 16px;
  padding-right: 16px;
  background: rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  scrollbar-width: none;
}

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

.tab {
  flex-shrink: 0;
  padding: 8px 16px;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  background: transparent;
  transition: background-color 0.2s, border-color 0.2s, color 0.2s, transform 0.2s, box-shadow 0.2s, opacity 0.2s;
  white-space: nowrap;
}

.tab.active {
  color: #000;
  background: var(--accent);
  font-weight: 700;
}

.tab:active { opacity: 0.7; }

/* ---------- Section Headers ---------- */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 24px 0 12px;
}

.section-title {
  font-size: 1.25rem;
  font-weight: 800;
}

.section-more {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 2px;
}

/* ---------- Template Grid ---------- */
.template-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 20px;
}

.template-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  cursor: pointer;
  transition: transform 0.2s;
}

.template-card:active { transform: scale(0.97); }

.template-card .thumb {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  aspect-ratio: 3 / 4;
  background: var(--bg-card);
}

.template-card .thumb img,
.template-card .thumb .thumb-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.template-card .thumb .use-badge {
  position: absolute;
  bottom: 8px;
  right: 8px;
  padding: 4px 8px;
  border-radius: var(--radius-full);
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  font-size: 0.65rem;
  font-weight: 700;
  color: #fff;
}

.template-card .thumb .hot-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  padding: 3px 7px;
  border-radius: var(--radius-full);
  background: var(--accent);
  font-size: 0.6rem;
  font-weight: 800;
  color: #000;
  text-transform: uppercase;
}

.template-card .t-title {
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.template-card .t-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.template-card .t-creator {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.7rem;
  color: var(--text-secondary);
}

.template-card .t-avatar {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--pink), var(--purple));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.55rem;
}

.template-card .use-btn {
  padding: 5px 12px;
  border-radius: var(--radius-full);
  background: transparent;
  border: 1px solid var(--border-bright);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-primary);
  transition: background-color 0.2s, border-color 0.2s, color 0.2s, transform 0.2s, box-shadow 0.2s, opacity 0.2s;
}

.template-card .use-btn:active {
  background: var(--bg-card-hover);
}

/* ---------- Horizontal Carousel ---------- */
.carousel {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 4px 0 12px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  margin: 0 -16px;
  padding-left: 16px;
  padding-right: 16px;
}

.carousel::-webkit-scrollbar { display: none; }

.carousel-card {
  flex-shrink: 0;
  scroll-snap-align: start;
  width: 120px;
  cursor: pointer;
  transition: transform 0.2s;
}

.carousel-card:active { transform: scale(0.96); }

.carousel-card .c-thumb {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  aspect-ratio: 3 / 4;
  margin-bottom: 8px;
  background: var(--bg-card);
}
.carousel-card .c-thumb .thumb-bg {
  width: 100%;
  height: 100%;
  position: absolute;
  inset: 0;
}

.carousel-card .c-thumb img,
.carousel-card .c-thumb .c-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.carousel-card .c-title {
  font-size: 0.8rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.carousel-card .c-subtitle {
  font-size: 0.68rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ---------- Upload Zone ---------- */
.upload-zone {
  border: 2px dashed var(--border-bright);
  border-radius: var(--radius-lg);
  padding: 48px 20px;
  text-align: center;
  transition: background-color 0.2s, border-color 0.2s, color 0.2s, transform 0.2s, box-shadow 0.2s, opacity 0.2s;
  cursor: pointer;
  background: var(--bg-card);
  margin: 16px 0;
}

.upload-zone:active { border-color: var(--accent); background: var(--accent-soft); }

.upload-zone .upload-icon { font-size: 2.5rem; margin-bottom: 12px; }
.upload-zone .upload-title { font-size: 1rem; font-weight: 700; margin-bottom: 4px; }
.upload-zone .upload-hint { font-size: 0.78rem; color: var(--text-muted); }

.upload-preview {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin: 16px 0;
}

.upload-preview img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: var(--radius-lg); }

.upload-preview .change-btn {
  position: absolute;
  bottom: 12px;
  right: 12px;
  padding: 8px 16px;
  border-radius: var(--radius-full);
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(10px);
  font-size: 0.75rem;
  font-weight: 700;
  border: 1px solid var(--border);
}

/* ---------- Generate View ---------- */
.gen-template-preview {
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 14px;
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  border: 1px solid var(--border);
  margin-bottom: 16px;
}

.gen-preview-thumb {
  width: 72px;
  height: 96px;
  border-radius: 12px;
  overflow: hidden;
  flex-shrink: 0;
  position: relative;
}

.gen-preview-thumb .thumb-bg {
  width: 100%;
  height: 100%;
}

.gen-preview-info {
  flex: 1;
  min-width: 0;
}

.gen-preview-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}

.gen-preview-uses {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.gen-upload-area {
  margin-bottom: 4px;
}

.gen-upload-btn {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 40px 20px;
  border-radius: var(--radius-lg);
  border: 2px dashed var(--border);
  background: var(--bg-card);
  color: var(--text);
}

.gen-upload-icon { font-size: 2.5rem; }
.gen-upload-text { font-size: 1rem; font-weight: 700; }
.gen-upload-hint { font-size: 0.78rem; color: var(--text-muted); }

/* ---------- Template Detail View ---------- */
.detail-page {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  z-index: 50;
}

.detail-hero {
  position: relative;
  flex: 1.4;
  min-height: 0;
  background: #000;
}

.detail-hero-media {
  width: 100%;
  height: 100%;
}

.detail-hero-media .thumb-bg {
  width: 100%;
  height: 100%;
  border-radius: 0;
}

.detail-hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0.35) 0%, rgba(0,0,0,0) 40%, rgba(0,0,0,0.55) 100%);
  pointer-events: none;
}

.detail-back {
  position: absolute;
  top: 14px;
  left: 14px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(10px);
  color: #fff;
  font-size: 1.4rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  cursor: pointer;
}

.detail-share {
  position: absolute;
  top: 14px;
  right: 14px;
  padding: 8px 14px;
  border-radius: var(--radius-full);
  border: none;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(10px);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 600;
  z-index: 2;
  cursor: pointer;
}

.detail-body {
  flex: 0 0 auto;
  padding: 24px 20px 16px;
  background: var(--bg);
  border-radius: 24px 24px 0 0;
  margin-top: -20px;
  position: relative;
  z-index: 1;
}

.detail-emoji {
  font-size: 2rem;
  margin-bottom: 8px;
}

.detail-title {
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 12px;
  line-height: 1.25;
}

.detail-tags {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.detail-tag {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 700;
}

.tag-collection {
  background: var(--accent);
  color: #000;
}

.tag-hash {
  background: var(--bg-card);
  color: var(--text-muted);
  border: 1px solid var(--border);
}

.detail-creator-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.detail-creator-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, #9d4edd, #ff2d78);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: #fff;
}

.detail-creator-name {
  flex: 1;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text);
}

.detail-uses {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.detail-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.detail-footer {
  flex: 0 0 auto;
  padding: 12px 20px calc(12px + env(safe-area-inset-bottom, 0px));
  background: var(--bg);
  border-top: 1px solid var(--border);
}

.detail-footer .btn {
  width: 100%;
  justify-content: center;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 22px;
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  font-weight: 700;
  transition: background-color 0.2s, border-color 0.2s, color 0.2s, transform 0.2s, box-shadow 0.2s, opacity 0.2s;
  width: 100%;
}

.btn:active { transform: scale(0.98); opacity: 0.9; }

.btn-primary {
  background: var(--accent);
  color: #000;
}

.btn-ghost {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-primary);
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--border-bright);
  color: var(--text-primary);
}

.btn-lg { padding: 16px 26px; font-size: 1rem; }

.btn:disabled { opacity: 0.45; pointer-events: none; }

/* ---------- Quiz ---------- */
.quiz-progress {
  display: flex;
  gap: 6px;
  margin: 20px 0 16px;
}

.quiz-step {
  flex: 1;
  height: 3px;
  border-radius: 2px;
  background: var(--border-bright);
  transition: background-color 0.3s, border-color 0.3s, color 0.3s, transform 0.3s, box-shadow 0.3s, opacity 0.3s;
}

.quiz-step.active { background: var(--accent); }

.quiz-question {
  font-size: 1.35rem;
  font-weight: 800;
  margin-bottom: 6px;
  line-height: 1.25;
}

.quiz-hint {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.quiz-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.quiz-option {
  padding: 16px;
  border-radius: var(--radius-md);
  background: var(--bg-card);
  border: 1px solid var(--border);
  font-size: 0.95rem;
  font-weight: 600;
  text-align: left;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s, transform 0.15s, box-shadow 0.15s, opacity 0.15s;
  display: flex;
  align-items: center;
  gap: 12px;
}

.quiz-option:active { background: var(--bg-card-hover); }

.quiz-option.selected {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.quiz-option .opt-emoji { font-size: 1.4rem; }
.quiz-option .opt-text { flex: 1; }

/* ---------- Hairstyle Grid ---------- */
.style-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 16px 0;
}

.style-item {
  border-radius: var(--radius-md);
  padding: 16px 8px;
  text-align: center;
  background: var(--bg-card);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: background-color 0.2s, border-color 0.2s, color 0.2s, transform 0.2s, box-shadow 0.2s, opacity 0.2s;
}

.style-item:active { background: var(--bg-card-hover); }

.style-item.selected {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.style-item .style-emoji { font-size: 1.8rem; margin-bottom: 4px; }
.style-item .style-name { font-size: 0.7rem; font-weight: 700; }

/* ---------- Loading Screen ---------- */
.loading-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(0, 0, 0, 0.95);
  backdrop-filter: blur(20px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.loading-orb {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  background: conic-gradient(from 0deg, var(--accent), var(--cyan), var(--accent));
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 28px;
  position: relative;
  animation: spin 1.8s linear infinite;
}

.loading-orb::before {
  content: '';
  position: absolute;
  inset: 5px;
  border-radius: 50%;
  background: var(--bg-base);
}

.loading-orb .orb-emoji {
  position: relative;
  z-index: 1;
  font-size: 2.4rem;
  animation: pulse 1.4s ease-in-out infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

.loading-title {
  font-size: 1.15rem;
  font-weight: 800;
  margin-bottom: 6px;
  text-align: center;
}

.loading-subtitle {
  font-size: 0.82rem;
  color: var(--text-secondary);
  text-align: center;
  margin-bottom: 24px;
}

.loading-progress-bar {
  width: 100%;
  max-width: 280px;
  height: 3px;
  border-radius: 2px;
  background: var(--border-bright);
  overflow: hidden;
}

.loading-progress-fill {
  height: 100%;
  border-radius: 2px;
  background: var(--accent);
  transition: width 0.4s ease;
  width: 0%;
}

/* ---------- Result Card ---------- */
.result-container { padding: 16px 0; }

.result-card {
  position: relative;
  border-radius: var(--radius-xl);
  overflow: hidden;
  aspect-ratio: 9 / 16;
  max-width: 340px;
  margin: 0 auto;
  box-shadow: var(--shadow-float);
}

.result-card .result-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.result-card .result-content {
  position: relative;
  z-index: 1;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 22px 18px;
}

.result-card .result-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  opacity: 0.85;
  text-align: center;
}

.result-card .result-score {
  font-size: 3.6rem;
  font-weight: 800;
  line-height: 1;
  text-align: center;
}

.result-card .result-percentile {
  font-size: 0.82rem;
  font-weight: 600;
  opacity: 0.9;
  text-align: center;
  margin-top: 6px;
}

.result-card .result-stats {
  display: flex;
  gap: 6px;
  margin: 12px 0;
}

.result-card .stat-pill {
  flex: 1;
  padding: 8px 6px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  text-align: center;
}

.result-card .stat-pill .stat-val { font-size: 0.85rem; font-weight: 800; }
.result-card .stat-pill .stat-label { font-size: 0.55rem; opacity: 0.65; text-transform: uppercase; }

.result-card .result-roast {
  padding: 12px;
  border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(10px);
  font-size: 0.8rem;
  line-height: 1.5;
  margin-bottom: 12px;
}

.result-card .watermark {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.68rem;
  opacity: 0.55;
}

.result-card .watermark .wm-brand { font-weight: 800; }
.result-card .watermark .wm-cta {
  padding: 4px 10px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.12);
  font-weight: 600;
}

.score-ring {
  width: 130px;
  height: 130px;
  margin: 0 auto 14px;
  position: relative;
}

.score-ring svg { transform: rotate(-90deg); }
.score-ring .ring-bg { fill: none; stroke: rgba(255, 255, 255, 0.1); stroke-width: 8; }
.score-ring .ring-fill {
  fill: none;
  stroke-width: 8;
  stroke-linecap: round;
  transition: stroke-dashoffset 1.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.score-ring .ring-text {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.score-ring .ring-text .num { font-size: 2.2rem; font-weight: 800; line-height: 1; }
.score-ring .ring-text .label { font-size: 0.65rem; opacity: 0.6; text-transform: uppercase; }

/* ---------- Share & Unlock ---------- */
.share-bar {
  display: flex;
  gap: 8px;
  margin: 18px 0;
}

.share-btn {
  flex: 1;
  padding: 12px 6px;
  border-radius: var(--radius-md);
  background: var(--bg-card);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--text-secondary);
  transition: background-color 0.2s, border-color 0.2s, color 0.2s, transform 0.2s, box-shadow 0.2s, opacity 0.2s;
}

.share-btn:active { background: var(--bg-card-hover); }
.share-btn .share-icon { font-size: 1.4rem; }

.unlock-cta {
  border-radius: var(--radius-lg);
  padding: 18px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  margin: 16px 0;
  text-align: center;
}

.unlock-cta .unlock-title { font-size: 1rem; font-weight: 800; margin-bottom: 4px; }
.unlock-cta .unlock-desc { font-size: 0.78rem; color: var(--text-secondary); margin-bottom: 14px; }
.unlock-cta .unlock-buttons { display: flex; gap: 10px; }
.unlock-cta .unlock-buttons .btn { font-size: 0.8rem; padding: 12px 14px; }

/* ---------- Recommend ---------- */
.recommend-section { margin: 20px 0; }
.recommend-list {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  scrollbar-width: none;
  margin: 0 -16px;
  padding: 0 16px;
}
.recommend-list::-webkit-scrollbar { display: none; }

.recommend-card {
  flex-shrink: 0;
  width: 130px;
  border-radius: var(--radius-md);
  padding: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: background-color 0.2s, border-color 0.2s, color 0.2s, transform 0.2s, box-shadow 0.2s, opacity 0.2s;
}

.recommend-card:active { background: var(--bg-card-hover); }
.recommend-card .r-icon { font-size: 1.6rem; margin-bottom: 6px; }
.recommend-card .r-name { font-size: 0.78rem; font-weight: 700; margin-bottom: 2px; }
.recommend-card .r-desc { font-size: 0.62rem; color: var(--text-muted); }

/* ---------- Bottom Nav ---------- */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: var(--max-width);
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 8px 20px calc(8px + env(safe-area-inset-bottom, 0px));
  background: rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-top: 1px solid var(--border);
}

.nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 6px 0;
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--text-secondary);
  transition: background-color 0.2s, border-color 0.2s, color 0.2s, transform 0.2s, box-shadow 0.2s, opacity 0.2s;
  position: relative;
}

.nav-item.active { color: var(--accent); font-weight: 700; }

.nav-item::after {
  content: '';
  position: absolute;
  top: -8px;
  width: 0;
  height: 3px;
  border-radius: 2px;
  background: var(--accent);
  transition: width 0.2s;
}

.nav-item.active::after { width: 20px; }

/* ---------- Toast & Modal ---------- */
.toast {
  position: fixed;
  bottom: calc(var(--nav-height) + 20px + env(safe-area-inset-bottom, 0px));
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  padding: 12px 24px;
  border-radius: var(--radius-full);
  background: rgba(30, 30, 30, 0.95);
  border: 1px solid var(--border-bright);
  font-size: 0.82rem;
  font-weight: 600;
  z-index: 200;
  opacity: 0;
  transition: background-color 0.3s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.3s cubic-bezier(0.16, 1, 0.3, 1), color 0.3s cubic-bezier(0.16, 1, 0.3, 1), transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
}

.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 150;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: fadeIn 0.2s ease;
}

.modal {
  width: 100%;
  max-width: 340px;
  border-radius: var(--radius-xl);
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 26px 22px;
  text-align: center;
  animation: modalIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalIn {
  from { opacity: 0; transform: scale(0.92) translateY(20px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal .modal-icon { font-size: 2.8rem; margin-bottom: 12px; }
.modal .modal-title { font-size: 1.15rem; font-weight: 800; margin-bottom: 8px; }
.modal .modal-desc { font-size: 0.82rem; color: var(--text-secondary); margin-bottom: 20px; line-height: 1.5; }
.modal .modal-actions { display: flex; flex-direction: column; gap: 10px; }

.ad-modal .ad-timer {
  width: 72px;
  height: 72px;
  margin: 0 auto 14px;
  position: relative;
}

.ad-modal .ad-timer svg { transform: rotate(-90deg); }
.ad-modal .ad-timer .timer-text {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  font-weight: 800;
}

/* ---------- Confetti ---------- */
.confetti {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 99;
  overflow: hidden;
}

.confetti-piece {
  position: absolute;
  width: 7px;
  height: 12px;
  top: -20px;
  animation: confettiFall 2.8s linear forwards;
}

@keyframes confettiFall {
  to { transform: translateY(105vh) rotate(720deg); opacity: 0; }
}

/* ---------- Utility ---------- */
.text-center { text-align: center; }
.text-accent { color: var(--accent); }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mb-16 { margin-bottom: 16px; }
.hidden { display: none !important; }

/* ---------- Trending Timeline ---------- */
.trending-view {
  padding: 0;
  min-height: calc(100vh - var(--header-height) - var(--nav-height) - env(safe-area-inset-bottom, 0px));
}

.trending-header {
  padding: 16px 16px 12px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.trending-title {
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.trending-subtitle {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-top: 4px;
}

.region-tabs {
  display: flex;
  gap: 8px;
  padding: 0 16px 12px;
  overflow-x: auto;
  scrollbar-width: none;
}

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

.region-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: var(--radius-full);
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 0.82rem;
  font-weight: 600;
  white-space: nowrap;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.region-pill.active {
  background: var(--accent);
  color: #000;
  border-color: var(--accent);
  font-weight: 700;
}

.trending-body {
  display: flex;
  height: calc(100vh - var(--header-height) - var(--nav-height) - 130px - env(safe-area-inset-bottom, 0px));
  overflow: hidden;
}

.date-wheel {
  width: 90px;
  flex-shrink: 0;
  position: relative;
  overflow-y: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: y mandatory;
  background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(20,20,20,0.5) 20%, rgba(20,20,20,0.5) 80%, rgba(0,0,0,0) 100%);
  mask-image: linear-gradient(180deg, transparent 0%, black 20%, black 80%, transparent 100%);
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, black 20%, black 80%, transparent 100%);
}

.date-wheel::-webkit-scrollbar { display: none; }

.date-wheel-items {
  /* 上下大留白：让首尾项也能滚到中部（iOS 滚轮必须可滚动） */
  padding: 280px 0;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}

.date-item {
  scroll-snap-align: center;
}

.date-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 8px 0;
  cursor: pointer;
  transition: background-color 0.25s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.25s cubic-bezier(0.16, 1, 0.3, 1), color 0.25s cubic-bezier(0.16, 1, 0.3, 1), transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  opacity: 0.35;
  transform: scale(0.85);
}

.date-item.active {
  opacity: 1;
  transform: scale(1.1);
}

.date-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-secondary);
  text-align: center;
  line-height: 1.2;
  max-width: 70px;
}

.date-item.active .date-label {
  color: var(--text-primary);
}

.date-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-muted);
}

.date-dot.active {
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent);
}

.trending-content {
  flex: 1;
  overflow-y: auto;
  padding: 0 16px 24px 8px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  scrollbar-width: none;
}

.trending-content::-webkit-scrollbar { display: none; }

.trending-empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  font-size: 0.9rem;
  text-align: center;
  min-height: 300px;
}

.trending-card {
  display: flex;
  gap: 12px;
  padding: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  animation: trendIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) both;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.trending-card:active {
  transform: scale(0.98);
  border-color: var(--border-bright);
}

@keyframes trendIn {
  from { opacity: 0; transform: translateX(16px); }
  to { opacity: 1; transform: translateX(0); }
}

.trend-thumb {
  width: 86px;
  height: 86px;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.trend-emoji {
  font-size: 2.4rem;
  filter: drop-shadow(0 4px 12px rgba(0,0,0,0.35));
}

.trend-tag {
  position: absolute;
  top: 6px;
  left: 6px;
  padding: 3px 7px;
  border-radius: 4px;
  font-size: 0.55rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.tag-hot { background: var(--pink); color: #fff; }
.tag-rising { background: var(--accent); color: #000; }
.tag-new { background: var(--cyan); color: #000; }

.trend-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}

.trend-title {
  font-size: 0.98rem;
  font-weight: 700;
  margin-bottom: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.trend-meta {
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 0.72rem;
  color: var(--text-secondary);
  margin-bottom: 10px;
}

.trend-region {
  display: flex;
  align-items: center;
  gap: 4px;
}

.trend-btn {
  align-self: flex-start;
  padding: 7px 14px;
  border-radius: var(--radius-full);
  background: var(--accent);
  color: #000;
  font-size: 0.78rem;
  font-weight: 700;
  border: none;
  transition: transform 0.15s ease;
}

.trend-btn:active { transform: scale(0.95); }

/* ---------- Responsive ---------- */
@media (min-width: 481px) {
  body { background: var(--bg-surface); }
  #app { border-left: 1px solid var(--border); border-right: 1px solid var(--border); }
}

@media (max-width: 360px) {
  .template-grid { gap: 10px; }
  .template-card .t-title { font-size: 0.8rem; }
  .category-tabs .tab { padding: 7px 12px; font-size: 0.78rem; }
}

/* 全局尊重系统“减弱动态效果”：所有动画/过渡瞬间完成 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ===== 用户画像引导（必填、极简）===== */
.profile-onboard {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 900;
  display: flex; justify-content: center; align-items: flex-end;
  padding: 0 12px calc(env(safe-area-inset-bottom, 0px) + 8px);
  pointer-events: none;
}
.profile-onboard-card {
  width: min(100%, 480px); pointer-events: auto;
  padding: 16px 16px calc(14px + env(safe-area-inset-bottom, 0px));
  border: 1px solid rgba(94, 240, 202, .28);
  border-radius: 22px;
  color: var(--pale-sky, #e4f6ff);
  background: linear-gradient(165deg, rgba(20, 45, 36, .98), rgba(6, 18, 13, .99));
  box-shadow: 0 -18px 60px rgba(0, 0, 0, .55), inset 0 1px 0 rgba(255, 255, 255, .08);
  overscroll-behavior: contain;
}
.profile-onboard-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.profile-onboard-title { font-size: 1.02rem; font-weight: 850; }
.profile-onboard-sub { margin-top: 2px; font-size: .68rem; color: rgba(228, 246, 255, .55); }
.profile-onboard-minimize {
  width: 30px; height: 30px; flex: none;
  border-radius: 50%; background: rgba(255, 255, 255, .08);
  color: rgba(228, 246, 255, .7); font-size: 1rem; cursor: pointer;
}
.profile-onboard-group { margin-top: 14px; }
.profile-onboard-label {
  margin-bottom: 8px; font-size: .66rem; font-weight: 800;
  letter-spacing: .04em; color: rgba(228, 246, 255, .62);
}
.profile-onboard-options, .profile-onboard-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.profile-onboard-opt, .profile-onboard-chip {
  padding: 8px 14px; border-radius: 999px;
  border: 1px solid rgba(228, 246, 255, .16);
  background: rgba(255, 255, 255, .05);
  color: rgba(228, 246, 255, .78); font-size: .78rem; font-weight: 700;
  cursor: pointer;
  transition: background-color .18s ease, border-color .18s ease, color .18s ease, transform .18s ease;
}
.profile-onboard-chip { padding: 7px 12px; font-size: .74rem; }
.profile-onboard-opt.active, .profile-onboard-chip.active {
  color: #073528; border-color: transparent;
  background: linear-gradient(120deg, #8dffdc, #5ef0ca);
}
.profile-onboard-opt:active, .profile-onboard-chip:active { transform: scale(.97); }
.profile-onboard-submit {
  width: 100%; margin-top: 16px; padding: 12px; border: 0; border-radius: 999px;
  background: linear-gradient(120deg, #22d8a8, #2ec9ef); color: #073528;
  font-size: .9rem; font-weight: 850; cursor: pointer;
  box-shadow: 0 8px 22px rgba(34, 216, 168, .32);
  transition: transform .15s ease, box-shadow .18s ease, opacity .18s ease;
}
.profile-onboard-submit:active { transform: scale(.98); }
.profile-onboard-mini {
  display: none; pointer-events: auto; margin: 0 auto;
  padding: 10px 18px; border-radius: 999px;
  border: 1px solid rgba(94, 240, 202, .4);
  background: linear-gradient(145deg, rgba(24, 78, 58, .95), rgba(5, 24, 17, .97));
  color: #eafff2; font-size: .78rem; font-weight: 800; cursor: pointer;
  box-shadow: 0 12px 34px rgba(0, 0, 0, .5), inset 0 1px 0 rgba(255, 255, 255, .1);
}
.profile-onboard.is-minimized .profile-onboard-card { display: none; }
.profile-onboard.is-minimized .profile-onboard-mini { display: block; }

/* ---------- 今日排行榜（广告位直达页） ---------- */
.leaderboard-view { padding: 14px 14px 40px; min-height: calc(100vh - var(--header-height) - var(--nav-height) - env(safe-area-inset-bottom, 0px)); }
.leaderboard-hero { display: flex; flex-direction: column; align-items: center; }
.leaderboard-podium { display: flex; flex-direction: column; gap: 14px; width: 100%; max-width: 520px; margin-top: 8px; }
.leaderboard-card { display: flex; align-items: center; gap: 14px; padding: 12px; border-radius: 18px; background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.09); cursor: pointer; transition: transform .18s ease, border-color .18s ease; }
.leaderboard-card:hover { transform: translateY(-2px); border-color: rgba(255,255,255,.2); }
.leaderboard-card:active { transform: scale(.98); }
.leaderboard-rank { display: flex; flex-direction: column; align-items: center; gap: 2px; width: 58px; flex: 0 0 58px; font-size: 1.55rem; }
.leaderboard-rank span { font-size: .55rem; font-weight: 800; color: rgba(255,255,255,.55); letter-spacing: .04em; }
.leaderboard-card.rank-1 { background: linear-gradient(135deg, rgba(255,199,79,.18), rgba(255,255,255,.04)); border-color: rgba(255,199,79,.38); }
.leaderboard-card.rank-2 { background: linear-gradient(135deg, rgba(200,215,230,.16), rgba(255,255,255,.03)); border-color: rgba(200,215,230,.32); }
.leaderboard-card.rank-3 { background: linear-gradient(135deg, rgba(205,140,90,.16), rgba(255,255,255,.03)); border-color: rgba(205,140,90,.3); }
.leaderboard-cover { position: relative; width: 74px; height: 88px; flex: 0 0 74px; border-radius: 13px; overflow: hidden; background: #141a22; box-shadow: 0 6px 16px rgba(0,0,0,.28); }
.leaderboard-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.leaderboard-cover-fallback { width: 100%; height: 100%; display: grid; place-items: center; font-size: 1.7rem; }
.leaderboard-name { flex: 1; min-width: 0; font-size: .95rem; font-weight: 800; color: #f2f7f5; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.leaderboard-stats { flex: 0 0 auto; font-size: .66rem; color: rgba(232,250,243,.55); font-variant-numeric: tabular-nums; }
.leaderboard-note { margin-top: 22px; font-size: .72rem; color: rgba(232,250,243,.5); text-align: center; }

/* ===== 性能与手感（全局） ===== */
/* 点击/滑动手感：去掉移动端点击高亮与 300ms 延迟，点击目标保持可点 */
button, a, [role="button"], [data-action], select, input[type="checkbox"], input[type="radio"], label[for] {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
/* 页面级 overscroll 收口，保留惯性滚动 */
html, body { overscroll-behavior-y: none; }

/* 「我的」页管理员提示卡：仅对拿到后台权限的账号渲染（见 features/account 的 adminHintHtml） */
.admin-hint-card {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--accent-border);
  background: rgba(103, 232, 200, .10);
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 16%, transparent), color-mix(in srgb, var(--accent) 5%, transparent));
}
.admin-hint-badge { flex-shrink: 0; font-size: 1.3rem; line-height: 1; }
.admin-hint-body { flex: 1; min-width: 0; }
.admin-hint-title { font-size: .82rem; font-weight: 800; color: var(--accent); }
.admin-hint-desc { font-size: .66rem; color: var(--text-muted); margin-top: 3px; }
.admin-hint-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 7px; }
.admin-hint-tag {
  font-size: .6rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid var(--accent-border);
  background: rgba(103, 232, 200, .12);
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  color: var(--accent);
  white-space: nowrap;
}
.admin-hint-btn {
  flex-shrink: 0;
  padding: 9px 15px;
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: #103c2c;
  font-family: inherit;
  font-size: .68rem;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
}

/* 动效只走合成器属性，避免滚动中触发布局 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}
