:root {
  --ink: #132238;
  --ink-soft: #405269;
  --paper: #f4f7f9;
  --surface: #ffffff;
  --surface-soft: #eaf0f3;
  --gold: #b17a19;
  --gold-light: #f1d18c;
  --teal: #146655;
  --danger: #b43c4b;
  --border: #cbd7dd;
  --focus: #126bd1;
  /* 阴影收柔一档，并叠一层近距投影，让卡片"贴"得更自然、不发飘 */
  --shadow: 0 12px 32px rgba(19,34,56,.09), 0 2px 6px rgba(19,34,56,.05);
  --shadow-sm: 0 4px 14px rgba(19,34,56,.06), 0 1px 3px rgba(19,34,56,.04);
  --r-sm: 10px;
  --r-md: 18px;
  --r-lg: 28px;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --topbar-offset: 76px;
  /* 统一字号与控件高度。以前每处各写各的，改一个地方另一个地方还是旧值，
     所以全部收敛到这里；手机端只覆盖 token，不再逐条重写规则。 */
  --text-meta: 11px;
  --text-small: 13px;
  --text-body: 15px;
  --text-card-title: 16px;
  --text-page-title: 22px;
  --control-sm: 34px;
  --control-md: 40px;
  --control-lg: 44px;
  --display: "Songti SC", "STSong", "Noto Serif SC", serif;
  --body: "PingFang SC", "Microsoft YaHei", sans-serif;
  --utility: ui-monospace, "SFMono-Regular", monospace;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; color: var(--ink); background: var(--paper); font: var(--text-body)/1.6 var(--body); }
button, input, textarea, select { font: inherit; }
button, select, input[type=file] { cursor: pointer; }
button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible, a:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.hidden { display: none !important; }
.skip-link { position: fixed; left: 12px; top: -60px; z-index: 99; background: var(--ink); color: white; padding: 10px 14px; }
.skip-link:focus { top: 12px; }
.topbar { min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px max(20px, calc((100vw - 1240px)/2)); background: rgba(244,247,249,.94); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 20; backdrop-filter: blur(12px); }
.brand { display: inline-flex; align-items: center; gap: 11px; color: var(--ink); font: 700 18px/1.15 var(--display); text-decoration: none; white-space: nowrap; }
.brand small { display: block; font: 9px/1.4 var(--utility); letter-spacing: .14em; color: var(--ink-soft); }
/* 站点标记用金元宝，与 App 图标和 PWA 图标保持同一套视觉 */
.brand-mark { width: 38px; height: 38px; border-radius: 9px; background: url("/assets/icon.svg") center/cover no-repeat; }
.account-switch { display: flex; align-items: center; gap: 8px; color: var(--ink-soft); font-size: 13px; }
.account-area { display: flex; align-items: center; gap: 12px; }
.account-area > span { display: grid; text-align: right; line-height: 1.35; }
.account-area strong { font-size: 13px; }
.account-area small { color: var(--ink-soft); font-size: 11px; }
.account-area .button { min-height: 40px; padding: 7px 12px; }
.account-download { display: inline-flex; align-items: center; text-decoration: none; }
select, input, textarea { min-height: 46px; border: 1px solid var(--border); border-radius: var(--r-sm); color: var(--ink); background: white; padding: 10px 12px; width: 100%; }
.account-switch select { width: auto; min-width: 180px; }
main { overflow: clip; }
.hero { max-width: 1240px; margin: 0 auto; padding: 64px 24px 54px; display: grid; grid-template-columns: 1.05fr .95fr; align-items: center; gap: 72px; }
.kicker { margin: 0 0 18px; color: var(--teal); font-weight: 700; letter-spacing: .18em; }
h1 { margin: 0; max-width: 720px; font: 700 clamp(34px, 4.6vw, 58px)/1.12 var(--display); letter-spacing: -.05em; }
h1 em { display: block; color: var(--gold); font-style: normal; }
.hero-copy { max-width: 570px; margin: 24px 0 0; color: var(--ink-soft); font-size: 18px; }
.hero-actions { display: flex; gap: 12px; margin-top: 32px; flex-wrap: wrap; }
.button { min-height: var(--control-md); padding: 9px 16px; border: 1px solid transparent; border-radius: var(--r-sm); font-size: 14px; font-weight: 700; transition: transform .18s, background .18s, box-shadow .18s; }
/* 紧凑按钮：视觉更小，但触屏下由 pointer:coarse 规则保证可点区域 */
.button.quiet, .button.small { min-height: var(--control-sm); padding: 7px 13px; font-size: var(--text-small); }
.app-download-link { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.button:hover { transform: translateY(-1px); }
.button.primary { color: white; background: var(--ink); box-shadow: 0 10px 22px rgba(19,34,56,.2); }
.button.accent { color: white; background: var(--teal); }
.button.danger { color: white; background: var(--danger); }
/* 破坏性操作降一档：不和「分享/上传」争视觉焦点，减少误触 */
.button.danger-outline { color: var(--danger); background: transparent; border-color: #dca7ae; box-shadow: none; }
.button.danger-outline:hover { color: white; background: var(--danger); border-color: var(--danger); }
.button.quiet { color: var(--ink); border-color: var(--border); background: transparent; }
.button:disabled { cursor: not-allowed; opacity: .5; transform: none; }
.film-window { position: relative; padding: 22px 22px 16px; background: var(--ink); color: white; border-radius: 8px; transform: rotate(1.2deg); box-shadow: var(--shadow); }
.film-window:before, .film-window:after { content: ""; position: absolute; left: 10px; right: 10px; height: 8px; background: repeating-linear-gradient(90deg, transparent 0 12px, var(--paper) 12px 21px); }
.film-window:before { top: 7px; } .film-window:after { bottom: 7px; }
.film-frame { aspect-ratio: 4/3; position: relative; overflow: hidden; background: linear-gradient(135deg,#b7d3d3,#eef4ee 44%,#d6b56d); border: 9px solid white; }
.memory-shape { position: absolute; inset: 24% 16% 15%; border-radius: 50% 50% 8px 8px; background: #29445c; clip-path: polygon(0 100%,26% 36%,43% 65%,67% 18%,100% 100%); }
.memory-shape span { position: absolute; bottom: 8px; right: 10px; color: white; font: 13px var(--display); }
.date-stamp { position: absolute; z-index: 2; right: 14px; top: 12px; padding: 5px 8px; color: white; background: rgba(19,34,56,.74); font: 11px var(--utility); }
.film-window p { margin: 12px 8px 8px; font-size: 13px; color: #dce6eb; }
.tabs { max-width: 1240px; margin: 0 auto; padding: 0 24px; display: flex; gap: 4px; overflow-x: auto; position: sticky; top: var(--topbar-offset); z-index: 19; background: rgba(244,247,249,.96); border-bottom: 1px solid var(--border); backdrop-filter: blur(12px); scrollbar-width: none; }
.tabs button { flex: 0 0 auto; min-height: 48px; padding: 10px 15px; border: 0; border-bottom: 3px solid transparent; background: transparent; color: var(--ink-soft); }
.tabs button svg { display: none; }
.tabs button span { display: inline; }
.tabs button.active { border-color: var(--gold); color: var(--ink); font-weight: 700; }
.view { min-height: 420px; max-width: 1240px; margin: 0 auto; padding: 36px 24px 96px; scroll-margin-top: calc(var(--topbar-offset) + 48px); }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 24px; }
.section-head h2, .card h2 { margin: 0; font: 700 var(--text-page-title)/1.3 var(--display); }
.section-head p { margin: 6px 0 0; color: var(--ink-soft); }
.grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 18px; }
.grid.two { grid-template-columns: repeat(2,minmax(0,1fr)); }
.download-grid { max-width: 620px; display: grid; }
.profile-grid { max-width: 980px; display: grid; grid-template-columns: .9fr 1.1fr; align-items: start; gap: 18px; }
.profile-password { grid-column: 2; }
.profile-summary { display: flex; align-items: flex-start; gap: 16px; }
.profile-avatar { width: 76px; height: 76px; flex: 0 0 76px; display: grid; place-items: center; overflow: hidden; color: white; background: var(--teal); border-radius: 50%; font: 700 26px var(--display); box-shadow: 0 0 0 4px #e1eee9; }
.profile-avatar img, .author-avatar.image img { width: 100%; height: 100%; object-fit: cover; }
.profile-download { margin-top: 10px; display: inline-flex; text-decoration: none; }
.author-avatar.image { overflow: hidden; padding: 0; }
.profile-summary h3 { margin: 3px 0 12px; font: 700 23px/1.2 var(--display); }
.profile-summary p { margin: 7px 0; font-size: 14px; }
.card { min-width: 0; padding: 22px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); box-shadow: var(--shadow-sm); }
.card h3 { margin: 0 0 8px; font-size: var(--text-card-title); }
.card p { color: var(--ink-soft); }
.metric { font: 700 34px/1 var(--display); color: var(--teal); }
.muted { color: var(--ink-soft); }
.status { display: inline-flex; align-items: center; min-height: 28px; padding: 3px 10px; border-radius: 999px; background: var(--surface-soft); color: var(--ink-soft); font-size: var(--text-meta); font-weight: 700; }
.status.approved, .status.active { color: #075443; background: #d8f1e9; }
.status.published { color: #075443; background: #d8f1e9; }
.status.unpublished { color: #405269; background: #e4eaee; }
.status.pending, .status.awaiting_payment { color: #75510e; background: #f9ebc8; }
.status.rejected { color: #892937; background: #f8dde1; }
.form { display: grid; gap: 15px; }
.form label { display: grid; gap: 7px; color: var(--ink-soft); font-size: 14px; font-weight: 700; }
.form textarea { min-height: 110px; resize: vertical; }
.form .button { justify-self: start; }
.visually-hidden { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0,0,0,0) !important; white-space: nowrap !important; border: 0 !important; }
.upload-field { gap: 9px !important; }
.upload-title { color: var(--ink-soft); font-size: 14px; font-weight: 700; }
.upload-drop { min-height: 126px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px; padding: 20px; text-align: center; color: var(--ink); background: linear-gradient(145deg,#f8fbfc,#edf3f5); border: 1.5px dashed #9aadb7; border-radius: 14px; transition: .18s ease; }
.upload-drop:hover { border-color: var(--teal); background: #edf7f4; transform: translateY(-1px); }
.upload-drop svg { width: 30px; height: 30px; fill: none; stroke: var(--teal); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.upload-drop strong { font-size: 15px; }
.upload-drop .upload-name { max-width: 100%; color: var(--ink-soft); font-size: 13px; font-weight: 400; overflow-wrap: anywhere; }
.upload-drop.compact { min-height: 104px; }
.upload-field:has(.media-picker:focus-visible) .upload-drop { outline: 3px solid var(--focus); outline-offset: 3px; }
.media-preview { display: none; }
.media-preview.has-files { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; padding: 12px; background: var(--paper); border: 1px solid var(--border); border-radius: var(--r-sm); }
.preview-item { min-width: 0; position: relative; display: grid; grid-template-columns: 72px minmax(0,1fr); align-items: center; gap: 10px; padding: 7px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-sm); }
.preview-item img, .preview-item video { width: 72px; height: 72px; display: block; object-fit: cover; background: var(--surface-soft); border-radius: 7px; }
.preview-meta { min-width: 0; display: grid; gap: 3px; padding-right: 26px; }
.preview-meta strong { overflow: hidden; color: var(--ink); font-size: 13px; line-height: 1.35; text-overflow: ellipsis; white-space: nowrap; }
.preview-meta span, .video-mark { color: var(--ink-soft); font: 11px/1.4 var(--utility); }
.video-mark { position: absolute; left: 12px; bottom: 12px; padding: 2px 5px; color: white; background: rgba(19,34,56,.82); border-radius: 4px; }
.preview-remove { width: 44px; height: 44px; position: absolute; right: 0; top: 0; display: grid; place-items: center; border: 0; color: var(--ink-soft); background: transparent; border-radius: 999px; transition: color .18s ease, background .18s ease; }
.preview-remove:hover { color: var(--danger); background: #f8dde1; }
.preview-remove svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.field-help { display: flex; justify-content: space-between; gap: 12px; color: var(--ink-soft); font-size: 12px; font-weight: 400; }
.char-count { font-family: var(--utility); }
.album-actions { display: grid; grid-template-columns: auto auto 1fr; align-items: center; gap: 10px; }
.album-actions .button { margin: 0; }
.file-count { justify-self: end; color: var(--ink-soft); font-size: 13px; white-space: nowrap; }
.media-hint { color: var(--teal); font-size: 12px; white-space: nowrap; }
.share-card { margin-top: 18px; display: grid; grid-template-columns: minmax(0,1fr) 240px; align-items: center; gap: 22px; padding: 24px; overflow: hidden; color: white; background: var(--ink); border: 1px solid #2b4057; border-radius: var(--r-md); box-shadow: var(--shadow); }
.share-card-copy span { color: var(--gold-light); font: 11px/1.4 var(--utility); letter-spacing: .12em; }
.share-card-copy h4 { margin: 10px 0 6px; color: white; font: 700 24px/1.25 var(--display); }
.share-card-copy p { max-width: 38ch; margin: 0; color: #dce6eb; font-size: 13px; }
.share-card.paper { color: var(--ink); background: #f6f0e0; border-color: #d8c69e; }
.share-card.paper .share-card-copy span, .share-card.paper .share-card-copy h4 { color: #76510e; }
.share-card.paper .share-card-copy p { color: #5c4c32; }
.share-card.teal { background: #0f5347; border-color: #5c9b8e; }
.share-card > img { width: 240px; max-width: 100%; justify-self: end; border-radius: 8px; box-shadow: 0 12px 28px rgba(0,0,0,.24); }
.qr-styles { display: flex; gap: 7px; flex-wrap: wrap; margin-top: 18px; }
.qr-style { min-height: 40px; padding: 7px 11px; color: inherit; background: transparent; border: 1px solid currentColor; border-radius: 999px; font-size: 12px; opacity: .72; transition: opacity .18s ease, background .18s ease; }
.qr-style:hover, .qr-style.active { opacity: 1; background: rgba(255,255,255,.13); }
.share-card.paper .qr-style:hover, .share-card.paper .qr-style.active { background: rgba(118,81,14,.1); }
.share-card-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.share-card-actions .button { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.share-card-actions .quiet { color: white; border-color: #607286; }
.share-card.paper .share-card-actions .quiet { color: #76510e; border-color: #d8c69e; }
.qr-save-sheet img { display: block; width: min(100%,360px); max-height: 62vh; object-fit: contain; margin: 0 auto 16px; border-radius: var(--r-sm); box-shadow: var(--shadow-sm); }
.qr-save-sheet .button { width: 100%; text-align: center; }
.media-grid img.media-open { cursor: zoom-in; }
.plan-note { margin: 14px 0 18px; padding: 11px 13px; color: #5c4316 !important; background: #fff8e8; border-radius: var(--r-sm); font-size: 13px; }
/* 免费期提示条：金色系呼应元宝品牌，放在套餐卡片之前 */
.free-banner { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px; margin-bottom: 18px; padding: 16px 20px; border: 1px solid #E8C877; border-radius: var(--r-sm); background: linear-gradient(120deg,#FFF9E8 0%,#FDF0CE 100%); }
/* 微信扫码支付 */
.wechat-qr-box { display: flex; gap: 20px; align-items: center; margin: 8px 0 20px; padding: 16px; background: var(--surface-soft); border-radius: var(--r-md); flex-wrap: wrap; }
.wechat-qr-img { width: 180px; height: auto; border-radius: 10px; background: #07C160; }
.wechat-qr-tip { flex: 1; min-width: 200px; }
.wechat-qr-tip p { margin: 0 0 8px; }
.wechat-qr-tip .notice { font-size: 13px; color: var(--ink-soft); }
.wechat-qr-tip .button { margin-top: 6px; }
.payment-wechat h3 { color: #07923f; }
.cs-line { margin-top: 4px; }
.cs-line strong { color: #229ED9; }
/* 客服卡片 */
.cs-card .cs-contact { display: flex; align-items: center; gap: 10px; margin-top: 10px; padding: 12px 16px; background: var(--surface-soft); border-radius: 10px; }
.cs-badge { padding: 3px 10px; border-radius: 999px; color: #fff; background: #229ED9; font-size: 12px; font-weight: 700; }
.cs-card .cs-contact strong { font-size: 16px; color: var(--ink); }
.free-banner strong { padding: 3px 10px; border-radius: 999px; color: #7A4E05; background: #F5D68A; font-size: 13px; }
.free-banner span { flex: 1; min-width: 240px; color: #6B4A12; font-size: 14px; line-height: 1.6; }
.pricing { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 18px; }
/* 只剩一档套餐时不要把卡片拉满整行，居中收窄更像刻意排版 */
.sandbox-note { margin-top: 10px; color: var(--ink-soft); font-size: 12px; text-align: center; }
.pricing.pricing-single { grid-template-columns: minmax(0,420px); justify-content: center; }
.price-card { position: relative; padding: 28px; overflow: hidden; }
.price-card.featured { border: 2px solid var(--gold); }
.price { margin: 16px 0; font: 700 34px/1.05 var(--display); }.price small { font: 14px var(--body); color: var(--ink-soft); }
.plan-saving { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: -5px 0 18px; padding: 10px 12px; color: #5c4316; background: #fff8e8; border: 1px solid #ead8ae; border-radius: var(--r-sm); }
.plan-saving strong { font-size: 15px; }.plan-saving span { color: #775917; font-size: 12px; }
.plan-actions { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
.plan-actions .button { width: 100%; padding-inline: 12px; }
.list { margin: 18px 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.list li:before { content: "✓"; color: var(--teal); font-weight: 900; margin-right: 9px; }
.media-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; margin: 16px 0; }
.media-grid img, .media-grid video { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--r-sm); background: var(--surface-soft); }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.empty { padding: 48px 24px; text-align: center; background: var(--surface); border: 1px dashed var(--border); border-radius: var(--r-md); color: var(--ink-soft); }
.notice { padding: 14px 16px; border-left: 4px solid var(--gold); background: #fff8e8; border-radius: 0 var(--r-sm) var(--r-sm) 0; color: #5c4316; margin-bottom: 20px; }
.payment-item { display: grid; grid-template-columns: 1fr auto; gap: 14px; padding: 18px 0; border-bottom: 1px solid var(--border); }
.payment-item:last-child { border: 0; }
.payment-history { margin-top: 36px; }
.proof-gallery { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 8px; }
.proof-gallery img, .proof-gallery video { width: 88px; height: 88px; display: block; object-fit: cover; background: var(--surface-soft); border: 1px solid var(--border); border-radius: 10px; }
.paymentProofForm { width: min(100%, 340px); }
.comment { margin: 14px 0; padding: 14px; border-radius: var(--r-sm); background: var(--paper); border: 1px solid var(--border); }
.forum-head .kicker { margin-bottom: 6px; font-size: 11px; }
.post-feed { display: grid; gap: 12px; max-width: 920px; }
.post-card { overflow: hidden; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); box-shadow: var(--shadow-sm); transition: transform .18s ease,border-color .18s ease,box-shadow .18s ease; }
.post-card:hover { transform: translateY(-2px); border-color: var(--gold); box-shadow: var(--shadow); }
.post-open { width: 100%; min-height: 138px; display: grid; grid-template-columns: 112px minmax(0,1fr) 44px; align-items: center; gap: 18px; padding: 13px; color: var(--ink); text-align: left; background: transparent; border: 0; }
.post-list-thumb { width: 112px; aspect-ratio: 1; display: grid; place-items: center; overflow: hidden; background: linear-gradient(145deg,#dce8e8,#f4ecd7); border-radius: 12px; }
.post-list-thumb > img { width: 100%; height: 100%; display: block; object-fit: cover; }
.post-list-thumb .author-avatar { width: 58px; height: 58px; flex-basis: 58px; font-size: 22px; }
.post-copy { min-width: 0; display: grid; align-content: center; gap: 6px; }
.post-author { display: flex; align-items: center; gap: 8px; margin-bottom: 1px; }
.post-author > span:last-child { min-width: 0; display: grid; line-height: 1.35; }
.post-author strong { overflow: hidden; color: var(--ink); font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.post-author small { color: var(--ink-soft); font: 10px var(--utility); }
.post-copy .post-author .author-avatar { width: 30px; height: 30px; flex-basis: 30px; font-size: 12px; }
.author-avatar { width: 42px; height: 42px; flex: 0 0 42px; display: grid; place-items: center; color: white; background: var(--teal); border-radius: 50%; font: 700 17px var(--display); box-shadow: inset 0 0 0 2px rgba(255,255,255,.24); }
.author-avatar.tone-0 { background: #146655; }.author-avatar.tone-1 { background: #29445c; }.author-avatar.tone-2 { background: #8a5a16; }
.author-avatar.tone-3 { background: #7a4050; }.author-avatar.tone-4 { background: #4b568c; }.author-avatar.tone-5 { background: #536a35; }
.post-title-row { min-width: 0; display: flex; align-items: center; gap: 8px; }
.post-title-row > strong { min-width: 0; overflow: hidden; font: 700 19px/1.3 var(--display); text-overflow: ellipsis; white-space: nowrap; }
.post-excerpt { display: -webkit-box; overflow: hidden; color: var(--ink-soft); font-size: 13px; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.post-list-meta { color: var(--teal); font-size: 11px; font-weight: 700; }
.post-list-arrow { color: var(--teal); font-size: 22px; text-align: center; }
.post-date { color: var(--ink-soft); font: 11px var(--utility); }
.post-media { min-width: 0; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 5px; }
.post-media.count-1 { grid-template-columns: 1fr; }
.post-media span { min-width: 0; position: relative; display: block; }
.post-media img { width: 100%; height: 110px; display: block; object-fit: cover; background: var(--surface-soft); border-radius: 7px; }
.post-media.count-1 img { height: 190px; }
.post-media b { position: absolute; inset: 0; display: grid; place-items: center; color: white; background: rgba(19,34,56,.62); border-radius: 7px; font-size: 24px; }
.post-actions { min-height: 56px; display: flex; align-items: center; gap: 10px; padding: 10px 22px; border-top: 1px solid var(--border); color: var(--ink-soft); }
.post-actions button { min-height: 44px; display: inline-flex; align-items: center; gap: 7px; padding: 7px 12px; color: var(--ink-soft); background: transparent; border: 0; border-radius: 999px; }
.post-actions button:hover { color: var(--teal); background: #edf7f4; }
.post-actions svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.post-actions .liked { color: var(--danger); background: #f8dde1; }
.post-actions .liked svg { fill: currentColor; }
.text-action { width: auto; }
.composer-dialog { width: min(680px,calc(100vw - 32px)); max-height: min(88vh,820px); padding: 28px; overflow-y: auto; color: var(--ink); background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); box-shadow: var(--shadow); }
.composer-dialog::backdrop { background: rgba(19,34,56,.62); backdrop-filter: blur(4px); }
.dialog-close { width: 40px; height: 40px; min-height: 0; padding: 0; display: grid; place-items: center; position: absolute; right: 14px; top: 14px; border: 1px solid var(--border); border-radius: 999px; color: var(--ink-soft); background: rgba(255,255,255,.92); font-size: 22px; line-height: 1; box-shadow: var(--shadow-sm); transition: background .18s, color .18s, transform .18s, box-shadow .18s; }
.dialog-close:hover { color: white; background: var(--ink); transform: scale(1.04); box-shadow: var(--shadow); }
.dialog-head { padding-right: 42px; margin-bottom: 22px; }
.dialog-head > span { color: var(--teal); font: 11px var(--utility); letter-spacing: .12em; }
.dialog-head h3 { margin: 7px 0 4px; font: 700 27px/1.25 var(--display); }
.dialog-head p { margin: 0; color: var(--ink-soft); }
.back-link { min-height: 44px; margin-bottom: 18px; padding: 6px 0; color: var(--teal); background: transparent; border: 0; font-weight: 700; }
.post-detail, .comment-panel { max-width: 900px; padding: 28px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); box-shadow: var(--shadow-sm); }
.post-detail h2 { margin: 18px 0 10px; font: 700 clamp(30px,5vw,48px)/1.15 var(--display); }
.post-body { color: var(--ink) !important; white-space: pre-wrap; }
.detail-media { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; margin-top: 24px; }
.detail-media img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--r-sm); background: var(--surface-soft); }

/* 媒体格子：包住图片/视频，右上角浮出删除按钮 */
.media-cell { position: relative; margin: 0; }
.media-cell video { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--r-sm); background: var(--surface-soft); display: block; }
.media-cell img.media-open { cursor: zoom-in; transition: transform .18s; }
.media-cell:hover img.media-open { transform: scale(1.02); }
/* 删除按钮默认半隐，hover 才明显；触屏设备没有 hover，所以基础态也要可见可点 */
.media-del { position: absolute; top: 6px; right: 6px; z-index: 2; width: 28px; height: 28px; min-height: 0; padding: 0; display: grid; place-items: center; font-size: 18px; line-height: 1; color: white; background: rgba(20,20,24,.55); border: none; border-radius: 50%; opacity: .75; transition: opacity .15s, background .15s; }
.media-cell:hover .media-del { opacity: 1; background: var(--danger); }
.media-del:hover { background: var(--danger); opacity: 1; }

/* 看大图 */
.lightbox { max-width: 92vw; max-height: 92vh; padding: 0; border: none; border-radius: var(--r-md); background: transparent; overflow: visible; }
.lightbox::backdrop { background: rgba(12,14,20,.82); }
.lightbox img { display: block; max-width: 92vw; max-height: 82vh; object-fit: contain; border-radius: var(--r-md); background: #000; }
.lightbox-name { margin: 10px 0 0; color: rgba(255,255,255,.9); font-size: 13px; text-align: center; }
.lightbox-close { position: absolute; top: -14px; right: -14px; width: 36px; height: 36px; min-height: 0; padding: 0; font-size: 22px; line-height: 1; color: var(--ink); background: white; border: none; border-radius: 50%; box-shadow: var(--shadow); }

/* 相册页概览条 */
.album-summary { display: grid; grid-template-columns: repeat(auto-fit,minmax(96px,1fr)); gap: 4px; margin: 18px 0 6px; padding: 18px 8px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); box-shadow: var(--shadow-sm); }
/* 数字之间用细竖线分隔，更像一块数据面板；首个不加线 */
.summary-item { position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 2px 8px; }
.summary-item + .summary-item::before { content: ""; position: absolute; left: 0; top: 50%; transform: translateY(-50%); width: 1px; height: 30px; background: var(--border); }
.summary-item strong { font: 700 26px/1.05 var(--display); color: var(--ink); letter-spacing: -.5px; }
.summary-item span { color: var(--ink-soft); font-size: 12px; }
/* 有冻结账号时给个视觉提醒，别让它混在一堆数字里 */
.stat-tile-warn { border-color: #E8B4B8; background: linear-gradient(120deg,#fff 0%,#FDF1F2 100%); }
.post-detail .post-actions { margin: 24px -28px -28px; }
.comment-panel { margin-top: 18px; }
.comment-composer { margin-top: 24px; padding-top: 24px; border-top: 1px solid var(--border); }
.metric-card { display: grid; gap: 12px; width: 100%; text-align: left; color: var(--ink); font-weight: 400; transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease; }
.metric-card:hover { transform: translateY(-2px); border-color: var(--gold); box-shadow: var(--shadow); }
.metric-card .metric { display: block; }
.album-home-head .kicker { margin-bottom: 6px; font-size: 11px; }
.album-head-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.gallery-qr-slot:not(:empty) { margin-bottom: 22px; }
.gallery-qr-slot .share-card { margin-top: 0; }
.album-search { max-width: 760px; position: relative; display: block; margin-bottom: 18px; }
.album-search-top { margin-bottom: 12px; }
.album-search svg { width: 21px; height: 21px; position: absolute; z-index: 1; left: 15px; top: 50%; fill: none; stroke: var(--ink-soft); stroke-width: 1.8; transform: translateY(-50%); }
.album-search input { padding-left: 46px; border-radius: 999px; }
/* 宽屏两列：单列时卡片右侧大片留白很浪费，两列把横向空间填满、
   一屏能看到更多相册。窄屏在下面的媒体查询里回落到单列。 */
.album-library { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 16px; }
.album-cover-card { min-width: 0; display: grid; grid-template-columns: 156px minmax(0,1fr); gap: 0; padding: 0; overflow: hidden; color: var(--ink); text-align: left; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); box-shadow: var(--shadow-sm); transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease; }
.album-cover-card:hover { transform: translateY(-2px); border-color: var(--gold); box-shadow: var(--shadow); }
.album-cover-visual { width: 144px; position: relative; display: grid; grid-template-columns: 1.25fr .75fr; grid-template-rows: 1fr 1fr; gap: 3px; aspect-ratio: 1.25; align-self: center; margin: 10px 0 10px 10px; overflow: hidden; background: linear-gradient(145deg,#dce8e8,#f4ecd7); border-radius: 12px; }
.album-cover-visual > img { width: 100%; height: 100%; display: block; object-fit: cover; }
.album-cover-visual > img:first-child { grid-row: 1 / 3; }
.album-cover-visual.image-count-1 > img:first-child { grid-column: 1 / 3; }
.album-cover-visual.image-count-2 > img:last-child { grid-row: 1 / 3; }
.empty-cover { width: 66px; height: 52px; position: absolute; left: 50%; top: 50%; display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 9px; background: var(--ink); border: 4px solid white; border-radius: 6px; box-shadow: var(--shadow); transform: translate(-50%,-50%) rotate(-3deg); }
.empty-cover i { background: var(--gold-light); border-radius: 3px; }
.album-file-total { color: var(--teal); font-size: 11px; font-weight: 700; }
.album-cover-copy { min-width: 0; display: grid; align-content: center; gap: 8px; padding: 18px; }
.album-cover-copy strong { min-width: 0; overflow: hidden; font: 700 19px/1.3 var(--display); text-overflow: ellipsis; white-space: nowrap; }
.album-cover-copy small { min-height: 44px; display: -webkit-box; overflow: hidden; color: var(--ink-soft); font-size: 13px; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.album-empty { display: grid; justify-items: center; gap: 9px; }
.album-empty strong { color: var(--ink); font: 700 24px var(--display); }
.album-empty .button { margin-top: 10px; }
.album-detail-card { max-width: 1000px; margin: 0 auto; padding: 28px; }
.album-detail-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; }
.album-detail-head h2 { margin: 12px 0 8px; font: 700 clamp(26px,3.6vw,38px)/1.16 var(--display); }
.album-detail-head p { max-width: 680px; margin: 0; white-space: pre-wrap; }
.album-detail-media { margin: 28px 0; }
.album-detail-media video { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--r-sm); background: var(--surface-soft); }
.album-detail-media .empty { grid-column: 1 / -1; }
/* 上传区在照片墙之前，所以分隔线在下方（这块以前排在照片后面，是 border-top） */
.album-detail-tools { margin-top: 24px; padding-bottom: 24px; border-bottom: 1px solid var(--border); }
/* 相册详情顶部那排操作按钮：默认按钮尺寸在这里太抢戏，标题才是主角 */
.album-detail-actions .button { min-height: 34px; padding: 6px 12px; font-size: 13px; font-weight: 600; border-radius: 8px; }
.app-banner { margin-top: 18px; display: flex; align-items: center; justify-content: space-between; gap: 24px; background: linear-gradient(120deg,#fff 0%,#f4ecd7 100%); }
.app-banner h2 { margin-top: 10px; }
.app-banner p { margin-bottom: 0; }
.proof { font-family: var(--utility); overflow-wrap: anywhere; }
.toast { position: fixed; z-index: 50; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); transform: translate(-50%,20px); max-width: min(90vw,520px); padding: 12px 18px; color: white; background: var(--ink); border-radius: var(--r-sm); opacity: 0; pointer-events: none; transition: .2s; box-shadow: var(--shadow); }
.toast.show { opacity: 1; transform: translate(-50%,0); }
.share-page { max-width: 980px; min-height: 100vh; margin: auto; padding: 54px 24px; }
.auth-page { min-height: calc(100vh - 76px); padding: clamp(32px,7vw,84px) 24px; background: radial-gradient(circle at 16% 20%,#e3eee9 0,transparent 34%),var(--paper); }
/* 登录页：单列居中，只有表单和下载卡片，不做营销落地页 */
.auth-shell { max-width: 420px; margin: auto; display: grid; gap: 14px; }
.auth-card { padding: 26px 24px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); box-shadow: var(--shadow); }
.auth-brand { display: grid; justify-items: center; gap: 4px; margin-bottom: 20px; }
.auth-brand-name { font: 700 22px var(--display); color: var(--ink); }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; margin-bottom: 20px; padding: 4px; background: var(--paper); border-radius: var(--r-sm); }
.auth-tabs button { min-height: 44px; border: 0; border-radius: 7px; color: var(--ink-soft); background: transparent; font-weight: 700; }
.auth-tabs button.active { color: var(--ink); background: white; box-shadow: var(--shadow-sm); }
.auth-note { margin: 16px 0 0; color: var(--ink-soft); font-size: 12px; text-align: center; }
/* 下载 App 独立成卡片：和登录表单拉开层级，不让人以为必须先下载才能用 */
.auth-download-card {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px; text-decoration: none;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-md); box-shadow: var(--shadow-sm);
}
.auth-download-card:hover { border-color: var(--teal); }
.auth-download-icon {
  display: grid; place-items: center; flex: none;
  width: 40px; height: 40px; border-radius: 12px;
  background: var(--gold-light, #f6e6c3); color: var(--gold);
  font-size: 20px; font-weight: 800;
}
.auth-download-copy { display: grid; gap: 2px; flex: 1; min-width: 0; }
.auth-download-copy strong { color: var(--ink); font-size: 15px; }
.auth-download-copy small { color: var(--ink-soft); font-size: 12px; }
.auth-download-go {
  flex: none; padding: 7px 14px; border-radius: 999px;
  background: var(--teal); color: white; font-size: 13px; font-weight: 700;
}
.share-cover { padding: 40px; color: white; background: var(--ink); border-radius: var(--r-lg); }
.share-cover h1 { font-size: clamp(38px,8vw,72px); }
@media (max-width: 800px) {
  :root { --topbar-offset: 86px; }
  .topbar { align-items: flex-start; padding: 10px 16px; }
  .account-switch { display: grid; gap: 2px; }
  .account-switch select { min-width: 0; width: 158px; min-height: 42px; }
  .account-area { gap: 7px; }
  .account-area > span { display: none; }
  .hero { padding: 42px 20px 40px; grid-template-columns: 1fr; gap: 36px; }
  h1 { font-size: clamp(39px,12vw,58px); }
  .hero-copy { font-size: 16px; }
  .film-window { width: calc(100% - 8px); }
  .tabs { padding: 0 12px; }
  .view { padding: 28px 16px 100px; }
  .grid, .grid.two, .pricing { grid-template-columns: 1fr; }
  .plan-actions { grid-template-columns: 1fr; }
  .profile-grid { grid-template-columns: 1fr; }
  .profile-password { grid-column: auto; }
  .section-head { align-items: flex-start; flex-direction: column; gap: 12px; }
  .media-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .media-preview.has-files { grid-template-columns: 1fr; }
  .payment-item { grid-template-columns: 1fr; }
  .app-banner { align-items: flex-start; flex-direction: column; }
  .album-actions { grid-template-columns: 1fr 1fr; }
  .album-actions .button { width: 100%; }
  .file-count { grid-column: 1 / -1; justify-self: start; }
  .media-hint { grid-column: 1 / -1; }
  .share-card { grid-template-columns: 1fr; padding: 18px; }
  .share-card > img { width: min(100%,280px); justify-self: center; }
  .share-card-actions .button { flex: 1 1 130px; }
  .post-open { min-height: 118px; grid-template-columns: 88px minmax(0,1fr); gap: 12px; padding: 10px; }
  .post-list-thumb { width: 88px; }
  .post-list-arrow { display: none; }
  .composer-dialog { padding: 22px 16px; }
  .post-detail, .comment-panel { padding: 20px 16px; }
  .post-detail .post-actions { margin: 20px -16px -20px; }
  .detail-media { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .album-library { grid-template-columns: 1fr; }
  .stat-tile { padding: 14px 16px; }
  /* 用户表格手机上横向滚动，不挤压列 */
  .user-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .user-table { min-width: 560px; }
  /* 审核卡片按钮转横排 */
  .payment-card { grid-template-columns: 1fr; }
  .payment-card-actions { flex-direction: row; }
  .payment-card-actions .button { flex: 1; }
  .album-detail-card { padding: 20px 16px; }
  .album-detail-head { display: grid; }
  .auth-page { min-height: calc(100vh - 86px); padding: 32px 16px 60px; }
  .auth-card { padding: 22px 18px; }
}
@media (max-width: 520px) {
  .album-library { grid-template-columns: 1fr; }
  /* 放这里而不是 800px 块：基础 .stat-tiles 规则在源码里靠后，
     同优先级会覆盖前面媒体查询的写法，必须放在它之后才生效（踩过） */
  .stat-tiles { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat-value { font-size: 24px; }
  .album-head-actions { width: 100%; }
  .album-head-actions .button { flex: 1 1 140px; }
  .album-cover-card { grid-template-columns: 118px minmax(0,1fr); }
  .album-cover-visual { width: 108px; margin: 9px 0 9px 9px; }
  .album-cover-copy { padding: 14px; }
  .post-open { min-height: 104px; grid-template-columns: 76px minmax(0,1fr); gap: 10px; }
  .post-list-thumb { width: 76px; }
  .post-copy .post-author small { display: none; }
  .post-title-row > strong { font-size: 17px; }
}
/* 管理端运营数据 */
/* 审核台：每笔支付独立成卡，待审核的高亮金边，一眼分清待办和历史 */
.payment-list { display: grid; gap: 12px; }
.payment-all-clear { margin-bottom: 12px; }
.payment-history-fold {
  margin-top: 14px; padding: 0; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--r-md); overflow: hidden;
}
.payment-history-fold > summary {
  padding: 14px 18px; cursor: pointer; color: var(--ink);
  font-weight: 700; list-style-position: inside; background: var(--surface-soft);
}
.payment-history-fold[open] > summary { border-bottom: 1px solid var(--border); }
.payment-history-fold > .payment-list { padding: 14px; }
.payment-card { display: grid; grid-template-columns: 1fr auto; gap: 16px; align-items: start; padding: 18px 20px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); box-shadow: var(--shadow-sm); }
.payment-card.is-pending { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold), var(--shadow-sm); }
.payment-card-main { min-width: 0; display: grid; gap: 7px; }
.payment-card-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.payment-card-head strong { font-size: 15px; }
.payment-amount { margin-left: auto; font: 700 18px var(--display); color: var(--gold); }
.payment-user { font-size: 14px; font-weight: 600; color: var(--ink); }
.payment-card .proof { margin: 0; padding: 8px 12px; background: var(--surface-soft); border-radius: 8px; font-family: var(--utility); font-size: 13px; word-break: break-all; }
.payment-card-actions { display: flex; flex-direction: column; gap: 8px; }
.payment-card-actions .button { min-height: 38px; padding: 8px 20px; white-space: nowrap; }
/* minmax 用 140px：手机窄屏也能塞下两列（180px 太宽只能一列，
   导致 7 个卡片挤成一长条）。宽屏 auto-fit 照样铺满多列。 */
.stat-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: var(--space-3); margin-bottom: var(--space-6, 32px); }
.stat-tile { display: flex; flex-direction: column; gap: var(--space-1); padding: var(--space-4, 16px) var(--space-5, 24px); background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); box-shadow: var(--shadow-sm); }
.stat-label { color: var(--ink-soft); font-size: 13px; }
.stat-value { font-family: Georgia, "Songti SC", serif; font-size: 32px; line-height: 1.1; color: var(--ink); }
.stat-tile small { color: var(--ink-soft); font-size: 12px; }
.rank-title { margin: var(--space-5, 24px) 0 var(--space-3); font-size: 16px; color: var(--ink); }
.stat-rank { padding: 0; overflow-x: auto; }
.rank-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.rank-table th, .rank-table td { padding: var(--space-3) var(--space-4, 16px); text-align: left; border-bottom: 1px solid var(--border); }
.rank-table th { color: var(--ink-soft); font-size: 12px; font-weight: 700; letter-spacing: .08em; background: var(--surface-soft); }
.rank-table tr:last-child td { border-bottom: 0; }
.rank-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.rank-table .rank-no { color: var(--gold); font-weight: 700; }
/* 空相册的下一步引导：新用户建完相册常常不知道该干什么就停住了 */
.notice.next-step { display: grid; gap: 4px; margin: 14px 0; }
.notice.next-step strong { color: var(--ink); font-size: var(--text-card-title); }

/* 加密相册标记 */
.status.locked { color: #7a4e05; background: #fff4d6; }
.access-hint { margin: 6px 0 0; color: var(--ink-soft); font-size: var(--text-small); }
.access-clear { display: flex; align-items: center; gap: 8px; font-size: var(--text-small); color: var(--ink-soft); }
.access-clear input { width: auto; min-height: 0; }

/* 关注来的相册：标出作者，和自己的相册区分开 */
.album-owner-tag {
  display: inline-flex; align-items: center; align-self: start;
  padding: 2px 8px; border-radius: 999px;
  background: #edf7f3; color: var(--teal);
  font-size: var(--text-meta); font-weight: 700;
}
.album-owner-line { margin: 4px 0 0; color: var(--ink-soft); font-size: var(--text-small); }
.album-owner-line strong { color: var(--teal); }

/* 首页公告条 */
.announcement {
  display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 10px; align-items: start;
  margin-bottom: 14px; padding: 14px 16px;
  background: var(--notice, #fff8e8); border-left: 3px solid var(--gold);
  border-radius: var(--r-sm);
}
.announcement strong { display: block; font-size: var(--text-card-title); color: var(--ink); }
.announcement p { margin: 4px 0 0; color: #5c4316; font-size: var(--text-small); white-space: pre-wrap; }
.announcement-close {
  width: 30px; height: 30px; display: grid; place-items: center;
  border: 0; border-radius: 50%; background: transparent;
  color: #8a7448; font-size: 20px; line-height: 1;
}

/* 支付弹窗：点击开通后直接进入完整付款流程 */
.pay-dialog {
  width: min(460px, 94vw); max-height: 92vh; padding: 0; overflow: auto;
  border: 0; border-radius: var(--r-md); background: var(--surface);
  box-shadow: 0 24px 64px rgba(19,34,56,.24);
}
.pay-dialog::backdrop { background: rgba(19,34,56,.55); }
.pay-dialog > h3 { margin: 0; padding: 18px 20px 0; font: 700 var(--text-page-title)/1.3 var(--display); }
.pay-dialog-close {
  position: absolute; right: 10px; top: 10px; z-index: 2;
  width: 36px; height: 36px; display: grid; place-items: center;
  border: 0; border-radius: 50%; background: var(--surface-soft);
  color: var(--ink-soft); font-size: 22px; line-height: 1;
}
.pay-dialog .payment-wechat { margin: 0; border: 0; box-shadow: none; }
/* 付款账号：管理员按这个账号对账，所以付款前先让用户确认 */
.pay-identity {
  display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap;
  margin: 12px 20px 0; padding: 10px 14px;
  background: var(--surface-soft); border-radius: var(--r-sm);
}
.pay-identity > span { color: var(--ink-soft); font-size: var(--text-small); }
.pay-identity > strong { font-size: var(--text-card-title); }
.pay-identity > small { color: var(--ink-soft); font-family: var(--utility); font-size: 12px; }

/* 管理端子导航：把原来一整页的统计/用户/支付拆成独立分区 */
.admin-subnav {
  display: flex; gap: 6px; margin-bottom: 18px; padding: 4px;
  overflow-x: auto; -webkit-overflow-scrolling: touch;
  background: var(--surface-soft); border-radius: var(--r-sm);
}
.admin-subnav-item {
  flex: 1 0 auto; min-height: var(--control-sm); padding: 7px 16px;
  border: 0; border-radius: 8px; background: transparent;
  color: var(--ink-soft); font-size: 14px; font-weight: 700; white-space: nowrap;
}
.admin-subnav-item.active { color: var(--ink); background: white; box-shadow: var(--shadow-sm); }

/* 管理端通用条目卡片：相册、公告、手机端用户共用 */
.admin-card-list { display: grid; gap: 10px; margin-top: 14px; }
.admin-item {
  display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 12px; align-items: center;
  padding: 14px 16px; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-sm); box-shadow: var(--shadow-sm);
}
.admin-item-main { min-width: 0; display: grid; gap: 4px; }
.admin-item-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.admin-item-head strong { font-size: var(--text-card-title); }
.admin-item-meta { font-size: var(--text-small); color: var(--ink); }
.admin-item-meta.muted { color: var(--ink-soft); }
.admin-item-body { margin: 4px 0 0; font-size: var(--text-small); color: var(--ink-soft); white-space: pre-wrap; }
.admin-item-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }

/* 状态筛选标签 */
.admin-chip-row { display: flex; gap: 7px; padding: 12px 16px 0; flex-wrap: wrap; }
.admin-chip {
  min-height: 32px; padding: 5px 14px; border: 1px solid var(--border);
  border-radius: 999px; background: transparent; color: var(--ink-soft); font-size: var(--text-small);
}
.admin-chip.active { color: white; background: var(--ink); border-color: var(--ink); font-weight: 700; }

/* 手机端改用卡片，桌面端保留表格 */
.user-card-list { display: none; }
.admin-user-search {
  display: grid; grid-template-columns: auto minmax(180px,360px) 1fr;
  align-items: center; gap: 10px; padding: 14px 16px;
  border-bottom: 1px solid var(--border); color: var(--ink); font-weight: 700;
}
.admin-user-search input {
  min-height: 38px; padding: 7px 11px; border: 1px solid var(--border);
  border-radius: 9px; background: white; color: var(--ink); font-weight: 400;
}
.admin-user-search small { justify-self: end; color: var(--ink-soft); font-weight: 400; }
.table-swipe-hint { display: none; margin: 0; padding: 8px 12px; color: var(--teal); background: #edf7f3; font-size: 11px; }
.user-table td { vertical-align: middle; }
.user-table .frozen-row { background: #fbf2f3; }
.user-table .button { padding: 6px 14px; font-size: 13px; }
.album-detail-actions { display: flex; flex-wrap: wrap; gap: var(--space-2); align-items: flex-start; }
/* 手机上两个一行。这条必须放在上面那行 flex 之后——同优先级下后写的赢，
   写在前面的媒体查询里会被它覆盖掉（踩过一次）。 */
@media (max-width: 800px) {
  .album-detail-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .album-detail-actions .button { width: 100%; }
}
/* 图片加载中的骨架动画。线路慢时图片区域会空白好几秒，
   没有反馈用户会以为坏了。加载完成后浏览器盖住背景，动画自然消失。 */
.media-cell img, .album-cover-visual img, .media-grid img {
  background-color: #e8eef1;
  background-image: linear-gradient(100deg, #e8eef1 30%, #f2f6f8 50%, #e8eef1 70%);
  background-size: 220% 100%;
  animation: img-skeleton 1.3s ease-in-out infinite;
}
@keyframes img-skeleton { to { background-position: -120% 0; } }
@media (prefers-reduced-motion: reduce) {
  .media-cell img, .album-cover-visual img, .media-grid img { animation: none; }
}

/* 未开通用户的空状态：用三步说明把人引到开通，而不是给一个点不了的按钮 */
.album-empty.onboarding { padding: 28px 20px; }
.onboard-steps {
  display: grid; gap: 10px; max-width: 320px;
  margin: 18px auto; padding: 0; list-style: none; counter-reset: step;
  text-align: left;
}
.onboard-steps li {
  display: flex; align-items: center; gap: 10px;
  color: var(--ink); font-size: 14px; counter-increment: step;
}
.onboard-steps li::before {
  content: counter(step);
  flex: 0 0 22px; width: 22px; height: 22px;
  display: grid; place-items: center;
  background: var(--teal); color: white;
  border-radius: 50%; font: 700 12px var(--utility);
}
.album-qr-slot:not(:empty) { margin: var(--space-4, 16px) 0; }
.album-qr-slot .share-card { margin-top: 0; }

@media (max-width: 640px) {
  .stat-value { font-size: 26px; }
  .rank-table th, .rank-table td { padding: var(--space-2) var(--space-3); }
  .rank-table, .user-table { font-size: 13px; }
}

/* 触屏设备：视觉可以更紧凑，但可点区域必须够大，否则按钮变小就难点。
   手指目标按无障碍规范至少 44px。 */
@media (pointer: coarse) {
  .button { min-height: var(--control-lg); }
  .button.quiet, .button.small { min-height: var(--control-md); }
  .media-del, .preview-remove { min-width: 36px; min-height: 36px; }
}

/* 真正的 H5 手机布局：紧凑顶部 + 固定底部导航。放在所有基础规则之后，
   避免被后面的桌面样式同优先级覆盖。 */
@media (max-width: 800px) {
  :root { --topbar-offset: 60px; }
  body { padding-bottom: env(safe-area-inset-bottom); }
  .topbar {
    min-height: 60px;
    align-items: center;
    padding: 8px 16px;
    background: rgba(255,255,255,.96);
    box-shadow: 0 1px 10px rgba(19,34,56,.05);
  }
  .brand { gap: 9px; font-size: 17px; }
  .brand-mark { width: 34px; height: 34px; border-radius: 9px; }
  .brand small { display: none; }
  .account-area .button { min-height: 36px; padding: 6px 11px; font-size: 13px; }

  .tabs {
    position: fixed;
    z-index: 50;
    left: 0;
    right: 0;
    top: auto;
    bottom: 0;
    max-width: none;
    min-height: 62px;
    padding: 6px 8px calc(5px + env(safe-area-inset-bottom));
    display: grid;
    grid-template-columns: repeat(4, minmax(0,1fr));
    gap: 2px;
    overflow: visible;
    background: rgba(255,255,255,.97);
    border-top: 1px solid var(--border);
    border-bottom: 0;
    box-shadow: 0 -5px 20px rgba(19,34,56,.08);
    backdrop-filter: blur(16px);
  }
  .tabs button {
    min-width: 0;
    min-height: 50px;
    padding: 4px 2px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    border: 0;
    border-radius: 10px;
    color: #738196;
    font-size: 11px;
    line-height: 1.2;
  }
  .tabs button svg {
    width: 22px;
    height: 22px;
    display: block;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
  }
  .tabs button span { display: block; }
  .tabs button.active { color: var(--teal); background: #edf7f3; border: 0; }
  .tabs button.hidden { display: none !important; }
  /* 非管理员只有三个 Tab，自动均分；管理员四个。 */
  .tabs:not(:has(.admin-only:not(.hidden))) { grid-template-columns: repeat(3,minmax(0,1fr)); }

  /* 手机端只调 token，不再逐条重写规则——以前同一个字号散落多处，
     改了一处另一处仍是旧值。 */
  :root {
    --text-page-title: 20px;
    --text-card-title: 16px;
  }
  .view { padding: 18px 14px calc(86px + env(safe-area-inset-bottom)); }
  .section-head { margin-bottom: 14px; }
  .section-head p { font-size: var(--text-small); }
  .kicker { margin-bottom: 6px; font-size: 10px; }
  .card { padding: 14px; border-radius: 14px; }
  .card > p { font-size: var(--text-small); }

  /* 表单控件同步收小 */
  .form label { font-size: var(--text-small); }
  .form input, .form textarea, .form select { min-height: 42px; padding: 9px 12px; font-size: var(--text-body); }
  .upload-drop { padding: 16px 12px; }
  .upload-drop strong { font-size: 14px; }
  .upload-name { font-size: 12px; }

  .empty, .notice { padding: 14px; font-size: var(--text-small); }

  /* 落地页手机版：标题收小，卖点保留但更紧凑，
     保证登录表单在首屏内可见、不用翻很久。 */
  .auth-lead { margin-top: 12px; font-size: 14px; }

  /* 5项相册数据一行展示，避免 3+2 换行。 */
  .album-summary { grid-template-columns: repeat(5, minmax(0,1fr)); padding: 10px 2px; gap: 0; }
  .summary-item { padding: 2px 3px; }
  .summary-item strong { font-size: 18px; }
  .summary-item span { font-size: 9px; white-space: nowrap; }
  .summary-item + .summary-item::before { height: 22px; }

  .album-search { margin-top: 10px; }
  .album-search input { min-height: 40px; font-size: 14px; }

  /* 相册卡片：封面和文字都收小，一屏多看一张。
     文字列改成按内容高度排布并垂直居中，去掉多余空白。 */
  .album-cover-card { border-radius: 14px; grid-template-columns: 88px minmax(0,1fr); }
  .album-cover-visual { width: 80px; margin: 7px 0 7px 7px; border-radius: 9px; }
  .album-cover-copy { padding: 9px 11px; gap: 3px; align-content: center; }
  .album-cover-copy strong { font-size: 15px; }
  .album-cover-copy small {
    font-size: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .album-file-total { font-size: 11px; }

  .album-detail-card { border-radius: 14px; padding: 16px 14px; }
  .album-detail-head h2 { font-size: 20px; }
  .profile-grid { gap: 12px; }
  .profile-summary { gap: 14px; padding: 14px; }
  .profile-summary h3 { font-size: 17px; }
  .profile-summary p { font-size: 13px; margin: 2px 0; }
  .profile-avatar { width: 60px; height: 60px; flex-basis: 60px; font-size: 21px; box-shadow: 0 0 0 3px #e1eee9; }
  .profile-download { min-height: 38px; padding: 8px 14px; font-size: 13px; }
  /* 头像上传框比相册上传小：只传一张图，不需要大热区 */
  .upload-drop.compact { padding: 12px 10px; }
  .payment-card { border-radius: 12px; padding: 14px; }
  .payment-history-fold > summary { padding: 12px 14px; font-size: 13px; }
  .payment-history-fold > .payment-list { padding: 10px; }
  .admin-user-search { grid-template-columns: 1fr auto; padding: 12px; }
  .admin-user-search > span { grid-column: 1 / -1; font-size: 13px; }
  .admin-user-search input { min-width: 0; width: 100%; font-size: 14px; }
  .admin-user-search small { font-size: 11px; }
  /* 手机端隐藏横向表格，改用卡片——冻结按钮不再需要左右滑动才能看到 */
  .user-table-wrap { display: none; }
  .user-card-list { display: grid; gap: 10px; padding: 12px; }
  .admin-item { grid-template-columns: 1fr; gap: 10px; padding: 12px 14px; }
  .admin-item-actions { justify-content: flex-start; }
  .admin-item-actions .button { flex: 1 1 auto; }
  .admin-subnav { margin-bottom: 14px; }
  .admin-subnav-item { padding: 7px 12px; font-size: var(--text-small); }
  .payment-card-head strong { font-size: 14px; }
  .payment-amount { font-size: 16px; }
  .stat-value { font-size: 22px; }
  .stat-label { font-size: 12px; }
  .toast { bottom: calc(74px + env(safe-area-inset-bottom)); font-size: 14px; padding: 10px 16px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *:before, *:after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

/* ============ 移动端与 App 一致的外壳 ============ */
/* 手机上顶部标签改成底部导航栏，和 App 的首页/套餐/我的 完全一致；
   桌面端保持顶部标签，宽屏底部固定栏反而碍事。 */
@media (max-width: 800px) {
  .topbar { min-height: 56px; padding: 8px 14px; }
  .brand { font-size: 16px; }
  .brand small { display: none; }
  .brand-mark { width: 30px; height: 30px; }

  .tabs {
    position: fixed; top: auto; bottom: 0; left: 0; right: 0;
    max-width: none; margin: 0; padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
    display: flex; justify-content: space-around; gap: 0;
    background: var(--surface); border-top: 1px solid var(--border); border-bottom: 0;
    box-shadow: 0 -1px 12px rgba(19,34,56,.08);
    overflow: visible; z-index: 30;
  }
  .tabs button {
    flex: 1 1 0; min-height: 50px; padding: 5px 2px;
    display: grid; justify-items: center; align-content: center; gap: 2px;
    border-bottom: 0; border-radius: 12px;
  }
  .tabs button svg {
    display: block; width: 22px; height: 22px;
    fill: none; stroke: currentColor; stroke-width: 1.8;
    stroke-linecap: round; stroke-linejoin: round;
  }
  .tabs button span { font-size: 11px; line-height: 1.35; font-weight: 600; }
  .tabs button.active { color: var(--teal); border-color: transparent; }
  .tabs button.active span { font-weight: 800; }

  /* 内容不能被底部导航挡住 */
  .view { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
}

/* 手机上相册卡片与 App 一致：90px 封面、紧凑信息、右侧箭头 */
@media (max-width: 800px) {
  .album-library { gap: 10px; }
  .album-cover-card { grid-template-columns: 98px minmax(0,1fr); border-radius: 14px; }
  .album-cover-visual { width: 90px; height: 90px; margin: 8px 0 8px 8px; aspect-ratio: 1; border-radius: 12px; }
  .album-cover-copy { gap: 4px; padding: 10px 30px 10px 12px; position: relative; }
  .album-cover-copy > .row > strong { font-size: 16px; line-height: 1.35; }
  .album-cover-copy > small { font-size: 13px; line-height: 1.5; }
  .album-file-total { font-size: 11px; }
  /* 右箭头提示可点击，和 App 的列表一致 */
  .album-cover-copy::after {
    content: "›"; position: absolute; right: 10px; top: 50%;
    transform: translateY(-52%); color: var(--ink-soft);
    font-size: 24px; line-height: 1;
  }
}

/* 个人中心设置列表：与 App 的个人中心一致 */
.profile-page { max-width: 680px; margin: 0 auto; display: grid; gap: 10px; }
.profile-page .profile-summary { display: flex; align-items: center; gap: 14px; padding: 16px; }
.setting-row {
  display: flex; align-items: center; gap: 12px; width: 100%;
  min-height: 58px; padding: 10px 14px; text-align: left; text-decoration: none;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 14px; color: var(--ink); cursor: pointer;
}
.setting-row:hover { border-color: var(--teal); }
.setting-icon {
  display: grid; place-items: center; flex: none;
  width: 36px; height: 36px; border-radius: 12px;
  background: var(--teal-soft, #e2f0ec); color: var(--teal);
  font-size: 15px; font-weight: 800;
}
.setting-icon.blue { background: #e5f3fb; color: #2b7fb0; }
.setting-icon.gold { background: var(--gold-light, #f6e6c3); color: var(--gold); }
.setting-copy { flex: 1; min-width: 0; display: grid; gap: 2px; }
.setting-copy strong { font-size: 15px; }
.setting-copy small { color: var(--ink-soft); font-size: 12px; line-height: 1.45; }
.setting-arrow { flex: none; color: var(--ink-soft); font-size: 24px; line-height: 1; }
.follow-dialog .form { margin-top: 14px; }
.scan-actions { display: grid; gap: 8px; margin-bottom: 12px; padding: 12px; background: var(--surface-soft); border-radius: 12px; }
.scan-actions small { color: var(--ink-soft); font-size: 12px; line-height: 1.45; }
.web-qr-scanner { display: grid; gap: 10px; margin-bottom: 14px; padding: 12px; background: #0d1520; border-radius: 14px; }
.web-qr-scanner video { width: 100%; max-height: 360px; display: block; object-fit: cover; background: #05080d; border-radius: 10px; }
.web-qr-scanner p { margin: 0; color: #dce6eb; font-size: 13px; }
.web-qr-scanner .button.quiet { color: white; border-color: rgba(255,255,255,.35); }

/* 首页头部：一行问候 + 单个相册数量 + 常用操作，压缩高度让相册进第一屏 */
.home-topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.home-topbar-info { min-width: 0; display: grid; gap: 3px; }
.home-actions, .home-count-row { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.home-actions { justify-content: flex-end; flex-shrink: 0; }
/* 生成二维码/创建相册/下载 App 三个按钮并排，统一稍小的尺寸，不能被长相册列表推到页面底部。 */
.home-actions .button, .home-actions .home-download-btn { white-space: nowrap; margin: 0; min-height: 34px; padding: 7px 14px; font-size: 13px; text-decoration: none; display: inline-flex; align-items: center; }
.home-greeting { margin: 0; font: 800 19px/1.3 var(--display); color: var(--ink); }
.home-count { margin: 0; color: var(--ink-soft); font-size: 13px; }
/* 兼容旧引用 */
.home-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.home-header-copy { min-width: 0; display: grid; gap: 3px; }
.home-subtitle { margin: 0; color: var(--ink-soft); font-size: 13px; }
.home-lead-note { margin: 0 0 12px; color: var(--ink-soft); font-size: 12px; line-height: 1.55; }
.quick-action {
  display: flex; align-items: center; gap: 12px; width: 100%;
  min-height: 62px; margin-bottom: 14px; padding: 10px 14px;
  text-align: left; background: var(--surface);
  border: 1px solid var(--border); border-radius: 14px;
  color: var(--ink); cursor: pointer;
}
.quick-action:hover { border-color: var(--teal); }
.quick-action-icon {
  display: grid; place-items: center; flex: none;
  width: 36px; height: 36px; border-radius: 12px;
  background: var(--teal-soft, #e2f0ec); color: var(--teal);
  font-size: 22px; font-weight: 700;
}
.quick-action-copy { flex: 1; min-width: 0; display: grid; gap: 2px; }
.quick-action-copy strong { font-size: 15px; }
.quick-action-copy small { color: var(--ink-soft); font-size: 12px; }
.quick-action-arrow { flex: none; color: var(--ink-soft); font-size: 24px; line-height: 1; }
.setting-row.danger .setting-copy strong { color: var(--danger); }
.setting-icon.danger { background: #fdecef; color: var(--danger); }

@media (max-width: 800px) {
  /* 与 App 顶栏一致：只显示当前页面标题，退出移到个人中心 */
  .topbar { justify-content: center; }
  .topbar .brand-mark { display: none; }
  .topbar .brand { font-size: 18px; pointer-events: none; }
  .topbar .account-area { display: none !important; }
}
.auth-download-fallback {
  justify-self: center; margin-top: -4px;
  color: var(--ink-soft); font-size: 12px; text-decoration: underline;
  text-underline-offset: 3px;
}
/* 相册详情操作顺序：内容 → 上传/生成二维码 → 设置 */
.album-primary-tools { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border); }
.album-primary-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 10px; }
.album-primary-actions .file-count { margin-right: auto; color: var(--ink-soft); font-size: 12px; }
.album-settings { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--border); }
.album-settings > h3 { margin: 0 0 6px; color: var(--ink-soft); font-size: 12px; }
.album-setting-row {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: 56px;
  padding: 9px 0; text-align: left; color: var(--ink); background: transparent;
  border: 0; border-bottom: 1px solid var(--border); cursor: pointer;
}
.album-setting-row > span { flex: 1; display: grid; gap: 2px; }
.album-setting-row strong { font-size: 15px; }
.album-setting-row small { color: var(--ink-soft); font-size: 12px; }
.album-setting-row i { color: var(--ink-soft); font: normal 24px/1 sans-serif; }
.album-setting-row.danger { border-bottom: 0; }
.album-setting-row.danger strong { color: var(--danger); }
@media (max-width: 800px) {
  .album-detail-card { padding: 18px 16px; }
  .album-detail-head { display: block; }
  .album-primary-actions { display: grid; grid-template-columns: 1fr; }
  .album-primary-actions .button { width: 100%; }
  .album-primary-actions .file-count { margin: 0; text-align: center; }
}

/* 统一加载反馈：首次启动、二维码生成和表单提交使用同一个轻量动画。 */
@keyframes loading-spin { to { transform: rotate(360deg); } }
.loading-spinner, .button.is-loading::before {
  width: 18px; height: 18px; flex: none; display: inline-block;
  border: 2px solid currentColor; border-right-color: transparent;
  border-radius: 50%; animation: loading-spin .7s linear infinite;
}
.button.is-loading { display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.initial-loading { min-height: calc(100dvh - 76px); display: grid; place-content: center; justify-items: center; gap: 12px; color: var(--ink-soft); }
.initial-loading .loading-spinner { width: 28px; height: 28px; color: var(--teal); }
.loading-state { min-height: 220px; display: flex; align-items: center; justify-content: center; gap: 10px; color: var(--ink-soft); }

/* 二维码预览只在模态弹窗里出现，不再把首页内容向下推。 */
.qr-dialog { width: min(780px,calc(100vw - 28px)); padding: 22px; }
.qr-dialog-head { margin: 0 48px 14px 0; }
.qr-dialog-head span { color: var(--teal); font-size: 12px; font-weight: 700; }
.qr-dialog-head h3 { margin: 4px 0 0; font: 700 22px/1.3 var(--display); }
.qr-dialog .gallery-qr-slot:not(:empty) { margin: 0; }
.qr-dialog .share-card { margin: 0; }

/* 长账号在窄屏换行，不能靠 overflow:clip 把内容截掉。 */
.profile-summary > div:last-child { min-width: 0; }
.profile-summary h3, .profile-summary p { overflow-wrap: anywhere; }

@media (max-width: 640px) {
  body { min-width: 0; }
  .view { padding-left: max(14px,env(safe-area-inset-left)); padding-right: max(14px,env(safe-area-inset-right)); }
  .home-topbar { display: grid; grid-template-columns: minmax(0,1fr); gap: 9px; }
  .home-actions { width: 100%; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 7px; }
  .home-actions .button, .home-actions .home-download-btn {
    width: 100%; min-width: 0; min-height: 44px; padding: 7px 4px;
    justify-content: center; overflow: hidden; font-size: 12px; text-overflow: ellipsis;
  }
  .qr-dialog { width: calc(100vw - 20px); max-height: calc(100dvh - 20px); padding: 18px 12px; }
  .qr-dialog .share-card { padding: 15px; }
}
@media (prefers-reduced-motion: reduce) {
  .loading-spinner, .button.is-loading::before { animation-duration: 1.4s; }
}
