:root {
  /* UnivDesign ant-design.md — 色彩、间距、阴影、圆角阶梯（github.com/Yue-Zeyi/UnivDesign） */
  --unit: 4px;
  --token-bg: #ffffff;
  --token-surface: #f5f5f5;

  --primary: #1677ff;
  --primary-hover: #4096ff;
  --primary-active: #0958d9;
  --primary-dark: var(--primary-active);
  --primary-soft: rgba(22, 119, 255, 0.1);
  --primary-rgb: 22, 119, 255;

  --success: #52c41a;
  --success-soft: rgba(82, 196, 26, 0.12);
  --success-rgb: 82, 196, 26;

  --warning: #faad14;
  --warning-soft: rgba(250, 173, 20, 0.12);
  --warning-rgb: 250, 173, 20;

  --danger: #ff4d4f;
  --danger-soft: rgba(255, 77, 79, 0.1);
  --danger-rgb: 255, 77, 79;

  --bg: var(--token-surface);
  --surface: var(--token-bg);
  --surface-soft: #fafafa;

  --text: rgba(0, 0, 0, 0.88);
  --text-soft: rgba(0, 0, 0, 0.65);
  --muted: rgba(0, 0, 0, 0.45);

  --line: #d9d9d9;
  --line-secondary: #f0f0f0;
  --line-strong: #bfbfbf;

  /* 深度 1 卡片 / 2 下拉 / 3 弹窗 */
  --shadow-1:
    0 1px 2px 0 rgba(0, 0, 0, 0.03), 0 1px 6px -1px rgba(0, 0, 0, 0.02), 0 2px 4px 0 rgba(0, 0, 0, 0.02);
  --shadow-2: 0 6px 16px 0 rgba(0, 0, 0, 0.08), 0 3px 6px -4px rgba(0, 0, 0, 0.12);
  --shadow-3:
    0 6px 16px 0 rgba(0, 0, 0, 0.08), 0 3px 6px -4px rgba(0, 0, 0, 0.12), 0 9px 28px 8px rgba(0, 0, 0, 0.05);

  --shadow-soft: var(--shadow-1);
  --shadow: var(--shadow-3);

  --focus-ring: 0 0 0 2px rgba(5, 145, 255, 0.1);

  --radius-xs: 2px;
  --radius-sm-comp: 4px;
  --radius-btn: 6px;
  --radius-card: 8px;
  --radius: var(--radius-card);
  --radius-sm: var(--radius-btn);
  --radius-lg: var(--radius-card);

  /* 排版：正文 14 / 400 / 1.57；标题 600（宪法） */
  --font-h1: 600 38px/1.3 ui-sans-serif, system-ui, sans-serif;
  --font-h2: 600 30px/1.3 ui-sans-serif, system-ui, sans-serif;
  --font-h3: 600 24px/1.3 ui-sans-serif, system-ui, sans-serif;
  --font-h4: 600 20px/1.3 ui-sans-serif, system-ui, sans-serif;

  --space: calc(var(--unit) * 2);

  /* 全站弹窗：蒙层、圆角、描边与阴影（居中叠层共用） */
  --modal-overlay-bg: rgba(15, 23, 42, 0.46);
  --modal-overlay-blur: 12px;
  --modal-radius: 14px;
  --modal-panel-border: 1px solid rgba(226, 232, 240, 0.98);
  --modal-panel-shadow: 0 24px 64px rgba(15, 23, 42, 0.18), 0 0 0 1px rgba(15, 23, 42, 0.05);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--bg);
}

body {
  margin: 0;
  color: var(--text);
  background: var(--bg);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei",
    "PingFang SC", sans-serif;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.5714285714285714;
  letter-spacing: 0;
}

code,
kbd,
pre,
samp {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, Courier, monospace;
}

body.has-dialog,
body.is-generating {
  overflow: hidden;
}

a {
  color: var(--primary);
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  border: 0;
}

button:not(:disabled) {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.hidden {
  display: none !important;
}

.app-shell {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  padding: calc(var(--unit) * 4) 0 calc(var(--unit) * 10);
}

.app-topbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: calc(var(--unit) * 4);
  align-items: center;
  min-height: 64px;
  margin-bottom: calc(var(--unit) * 4);
  padding: calc(var(--unit) * 3) calc(var(--unit) * 4);
  border: none;
  border-radius: var(--radius-card);
  background: var(--surface);
  box-shadow: var(--shadow-1);
}

.topbar-brand {
  min-width: 0;
  width: fit-content;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-card);
  background: var(--primary);
  color: #fff;
  font-size: 18px;
  font-weight: 800;
  box-shadow: 0 2px 8px rgba(var(--primary-rgb), 0.45);
}

.brand-mark svg {
  width: 30px;
  height: 30px;
  display: block;
}

.brand-mark img,
.center-auth-mark img {
  width: 100%;
  height: 100%;
  display: block;
  border-radius: inherit;
  object-fit: cover;
}

.brand-mark .icon-frame,
.brand-mark .icon-line,
.brand-mark .icon-dot {
  fill: none;
  stroke: #ffffff;
  stroke-width: 2.1;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.brand-mark .ai-spark {
  fill: #93c5fd;
  stroke: #ffffff;
  stroke-width: 0.6;
}

.brand-mark .ai-spark.small {
  fill: #ffffff;
  stroke: none;
  opacity: 0.92;
}

.brand-copy {
  min-width: 0;
}

.eyebrow,
.brand-copy .eyebrow {
  margin: 0 0 var(--unit);
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
  line-height: 1.67;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  color: var(--text);
  letter-spacing: 0;
}

h1 {
  overflow: hidden;
  font-size: 38px;
  font-weight: 600;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

h2 {
  font-size: 30px;
  font-weight: 600;
  line-height: 1.3;
}

h3 {
  font-size: 24px;
  font-weight: 600;
  line-height: 1.3;
}

h4 {
  font-size: 20px;
  font-weight: 600;
  line-height: 1.3;
}

/* 顶栏站点名不是「页级 H1」，用 H4 尺度避免撑破顶栏 */
.app-topbar .brand-copy h1 {
  font-size: 20px;
  font-weight: 600;
  line-height: 1.3;
}

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

.two-col {
  grid-template-columns: minmax(320px, 400px) minmax(0, 1fr);
  align-items: stretch;
}

.narrow-left {
  grid-template-columns: minmax(280px, 380px) minmax(0, 1fr);
}

.card,
.stat-card {
  border: none;
  border-radius: var(--radius-card);
  background: var(--surface);
  box-shadow: var(--shadow-1);
}

.card {
  padding: calc(var(--unit) * 6);
}

.section-card {
  margin-top: 16px;
}

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 50px;
  margin-bottom: 16px;
}

.card-head h2 {
  font-size: 24px;
  font-weight: 600;
  line-height: 1.3;
}

.card-head>div {
  min-width: 0;
}

.card-head-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  min-width: 0;
  flex-wrap: wrap;
}

.form {
  display: grid;
  gap: 14px;
}

.field,
.field-grid {
  display: grid;
  gap: 8px;
}

.field-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.field span {
  color: var(--text-soft);
  font-size: 14px;
  font-weight: 600;
}

.field-hint {
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
  line-height: 1.67;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius-btn);
  outline: none;
  background: #fff;
  color: var(--text);
  font-weight: 400;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

input,
select {
  height: 32px;
  padding: var(--unit) calc(var(--unit) * 3 - 1px);
  font-size: 14px;
}

textarea {
  min-height: 120px;
  padding: calc(var(--unit) * 2);
  resize: vertical;
  border-radius: var(--radius-btn);
}

input:hover,
select:hover,
textarea:hover {
  border-color: var(--primary-hover);
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--primary);
  background: #fff;
  box-shadow: var(--focus-ring);
}

input[readonly] {
  background: var(--surface-soft);
  color: var(--muted);
}

.button {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: var(--radius-btn);
  padding: var(--unit) calc(var(--unit) * 4 - 1px);
  font-weight: 500;
  font-size: 14px;
  line-height: 1;
  text-align: center;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.button.large {
  min-height: 40px;
  padding: calc(var(--unit) + 2px) calc(var(--unit) * 4 - 1px);
}

.button.primary {
  background: var(--primary);
  color: #fff;
  border-radius: var(--radius-btn);
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.02);
}

.button.primary:hover {
  background: var(--primary-hover);
}

.button.primary:active {
  background: var(--primary-active);
}

.button.secondary {
  border-color: var(--line);
  background: #fff;
  color: var(--text-soft);
}

.button.secondary:hover,
.button.secondary.active {
  border-color: rgba(var(--primary-rgb), 0.30);
  background: var(--primary-soft);
  color: var(--primary);
}

.button.secondary.disabled {
  pointer-events: none;
  opacity: 0.5;
}

.button.danger {
  border-color: #fecaca;
  background: #fff;
  color: var(--danger);
}

.button.danger:hover {
  background: var(--danger-soft);
}

.button.small {
  min-height: 24px;
  padding: 0 calc(var(--unit) * 2 - 1px);
  font-size: 12px;
  font-weight: 500;
}

.button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* 首页：移动端更精致的充值 CTA */
.recharge-cta {
  border-width: 1px;
  border-color: rgba(var(--primary-rgb), 0.2);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(245, 249, 255, 0.96));
  color: var(--primary-active);
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.04);
  padding-left: 10px;
  padding-right: 10px;
}

.recharge-cta.recharge-cta-compact {
  padding-left: 6px;
  padding-right: 6px;
}

.recharge-cta:hover {
  border-color: rgba(var(--primary-rgb), 0.45);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(235, 244, 255, 0.98));
  color: var(--primary-active);
}

.recharge-cta:active {
  transform: translateY(1px);
}

/* 后台：用户列表“加余额”钱币按钮 + 更精致弹窗 */
.admin-money-btn {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid rgba(var(--primary-rgb), 0.22);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(245, 249, 255, 0.98));
  color: var(--primary-active);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.05);
  transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease;
}

.admin-money-btn:hover {
  border-color: rgba(var(--primary-rgb), 0.42);
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.08);
  transform: translateY(-1px);
}

.admin-money-btn:active {
  transform: translateY(0px);
}

.admin-money-btn svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.admin-credits-panel {
  max-width: 520px;
  border-radius: var(--radius-card);
  border: none;
  background: var(--surface);
  box-shadow: var(--shadow-3);
}

/* 后台：用户管理实名状态 */
.rn-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  border: 1px solid rgba(228, 231, 236, 0.96);
  background: rgba(248, 250, 252, 0.92);
  color: #64748b;
  white-space: nowrap;
}

.rn-badge svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.rn-badge.is-ok {
  border-color: rgba(var(--primary-rgb), 0.22);
  background: linear-gradient(180deg, rgba(var(--primary-rgb), 0.10), rgba(var(--primary-rgb), 0.06));
  color: var(--primary-active);
}

.rn-badge.is-no {
  opacity: 0.9;
}

/* 后台：按截图重做“增加余额”弹窗 */
.admin-addcredits-modal {
  width: min(420px, calc(100vw - 32px));
  border-radius: var(--modal-radius);
  background: var(--surface);
  box-shadow: var(--modal-panel-shadow);
  padding: calc(var(--unit) * 5) calc(var(--unit) * 5) calc(var(--unit) * 4);
  position: relative;
  border: var(--modal-panel-border);
}

.admin-addcredits-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 1px solid rgba(228, 231, 236, 0.96);
  background: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #0f172a;
}

.admin-addcredits-close svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.admin-addcredits-title {
  font-size: 22px;
  font-weight: 950;
  color: #0f172a;
  letter-spacing: 0.2px;
  margin-bottom: 14px;
}

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

.admin-addcredits-pill {
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-btn);
  border: 1px solid var(--line);
  color: var(--text);
  font-weight: 600;
  background: var(--surface-soft);
}

.admin-addcredits-field span {
  display: none;
}

.admin-addcredits-field input {
  width: 100%;
  height: 40px;
  border-radius: var(--radius-btn);
  border: 1px solid var(--line);
  background: #fff;
  padding: 0 calc(var(--unit) * 4);
  font-weight: 500;
  outline: none;
}

.admin-addcredits-field input:focus {
  border-color: var(--primary);
  box-shadow: var(--focus-ring);
}

.admin-addcredits-submit {
  height: 40px;
  border-radius: var(--radius-btn);
  border: 0;
  color: #fff;
  font-weight: 500;
  font-size: 14px;
  background: var(--primary);
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.02);
  cursor: pointer;
  transition: background 0.12s ease, box-shadow 0.12s ease, transform 0.12s ease;
}

.admin-addcredits-submit:hover {
  filter: none;
  background: var(--primary-hover);
  box-shadow: 0 2px 8px rgba(var(--primary-rgb), 0.35);
  transform: translateY(-1px);
}

.admin-addcredits-submit:active {
  transform: translateY(0);
  background: var(--primary-active);
  box-shadow: none;
}

.badge,
.status {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0 10px;
  background: var(--surface-soft);
  color: var(--text-soft);
  font-size: 13px;
  font-weight: 750;
  white-space: nowrap;
}

/* 顶部余额：桌面/移动端统一蓝色高亮 */
.badge[data-balance-display] {
  border: 1px solid rgba(var(--primary-rgb), 0.22);
  background: rgba(var(--primary-rgb), 0.10);
  color: var(--primary);
}

.status.succeeded,
.alert.success,
.inline-message.success {
  background: rgba(239, 246, 255, 0.95);
  color: var(--primary-active);
  border-color: rgba(var(--primary-rgb), 0.28);
}

.status.failed,
.alert.error,
.inline-message.error {
  background: var(--danger-soft);
  color: var(--danger);
  border-color: #fecaca;
}

.status.running,
.status.queued,
.alert.warning,
.inline-message.warning {
  background: var(--warning-soft);
  color: var(--warning);
  border-color: #fed7aa;
}

.status.deleted {
  background: #f2f4f7;
  color: var(--muted);
  border-color: var(--line-strong);
}

.alert,
.inline-message {
  margin-bottom: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 14px;
  background: #fff;
  color: var(--text-soft);
  font-weight: 650;
}

.inline-message {
  margin: 14px 0 0;
}

.generation-notice {
  margin-bottom: 14px;
  border: 1px solid #f6d58b;
  border-radius: 10px;
  padding: 11px 12px;
  background: #fff8e6;
  color: #9a6700;
  font-size: 13px;
  font-weight: 750;
  line-height: 1.6;
}

.mode-toggle {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.mode-toggle label {
  min-height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--text-soft);
  font-weight: 800;
}

.mode-toggle input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.mode-toggle label:has(input:checked) {
  border-color: rgba(var(--primary-rgb), 0.35);
  background: var(--primary-soft);
  color: var(--primary);
}

.edit-upload-box {
  position: relative;
  width: 88px;
  min-width: 88px;
  height: 88px;
  display: grid;
  place-items: center;
  gap: 6px;
  border: 1px dashed #98a2b3;
  border-radius: 10px;
  padding: 10px;
  background: #f8fafc;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

/* 上传区用 label[for=file] 触发原生选图，避免程序化 click 在微信等 WebView 中失效；勿放入会提交的 form 内 */
button.edit-upload-box,
label.edit-upload-box {
  margin: 0;
  font: inherit;
  color: inherit;
  cursor: pointer;
  text-align: center;
  -webkit-appearance: none;
  appearance: none;
  -webkit-tap-highlight-color: transparent;
}

button.edit-upload-box:focus-visible,
label.edit-upload-box:focus-visible {
  outline: 2px solid rgba(var(--primary-rgb), 0.45);
  outline-offset: 2px;
}

.edit-upload-box:hover {
  border-color: var(--primary);
  background: rgba(239, 246, 255, 0.95);
  box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.1);
}

/* 参考图 file 置于 form 外且不与 form 关联（无 form/name），避免微信等 WebView 选图后误提交表单；屏幕外占位 */
.edit-upload-file-input {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0.01;
  overflow: hidden;
}

.edit-upload-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: rgba(var(--primary-rgb), 0.12);
  color: var(--primary-active);
  font-size: 24px;
  font-weight: 700;
  line-height: 1;
}

.edit-upload-box strong {
  display: block;
  color: #101828;
  font-size: 12px;
  font-weight: 850;
  line-height: 1.2;
  text-align: center;
}

.edit-upload-box small {
  display: none;
}

.edit-upload-preview {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(78px, 88px));
  gap: 10px;
  min-width: 0;
}

.edit-upload-field:has(.edit-upload-preview:not(.hidden)) {
  grid-template-columns: 88px minmax(0, 1fr);
  align-items: start;
}

.edit-upload-field:has(.edit-upload-preview:not(.hidden))>span {
  grid-column: 1 / -1;
}

.edit-upload-field:has(.edit-upload-preview:not(.hidden)) .edit-upload-box {
  grid-column: 1;
  grid-row: 2;
}

.edit-upload-field:has(.edit-upload-preview:not(.hidden)) .edit-upload-preview {
  grid-column: 2;
  grid-row: 2;
}

.edit-preview-item {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.edit-preview-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.edit-preview-item button {
  position: absolute;
  right: 6px;
  bottom: 6px;
  border: 0;
  border-radius: 6px;
  padding: 4px 7px;
  background: rgba(17, 24, 39, 0.78);
  color: #fff;
  font-size: 12px;
  font-weight: 750;
  cursor: pointer;
}

.generate-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.prompt-field-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-top: 8px;
  padding-top: 2px;
}

.prompt-field-title {
  margin: 0;
  font: inherit;
  cursor: text;
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
}

.prompt-field-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-shrink: 0;
  margin-top: 2px;
}

.prompt-optimize-button {
  width: auto;
  min-width: 88px;
  height: 30px;
  border: 1px solid #d0d5dd;
  border-radius: 8px;
  background: #ffffff;
  color: var(--primary-active);
  padding: 0 10px;
  font-size: 12px;
  font-weight: 820;
  cursor: pointer;
}

.prompt-optimize-button:hover,
.prompt-optimize-button:focus-visible {
  border-color: rgba(var(--primary-rgb), 0.35);
  background: var(--primary-soft);
}

.prompt-optimize-button:disabled {
  cursor: not-allowed;
  opacity: 0.62;
}

.prompt-field textarea {
  margin: 0;
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #d0d5dd;
  border-radius: 10px;
  min-height: 140px;
  resize: vertical;
  padding: 12px;
  background: #fff;
  box-shadow: none;
}

.prompt-field textarea:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(var(--primary-rgb), 0.2);
  border-color: rgba(var(--primary-rgb), 0.45);
}

.auth-wrap {
  min-height: 62vh;
  display: grid;
  place-items: center;
}

.simple-auth {
  min-height: calc(100vh - 150px);
}

.auth-dashboard {
  min-height: calc(100vh - 142px);
  width: 100%;
  grid-template-columns: minmax(0, 1.08fr) minmax(360px, 440px);
  gap: 24px;
  align-items: stretch;
  place-items: stretch;
}

.auth-info,
.auth-form-card {
  min-height: 520px;
}

.auth-info {
  position: relative;
  overflow: hidden;
  display: grid;
  align-content: space-between;
  border: 1px solid rgba(208, 213, 221, 0.92);
  border-radius: var(--radius);
  padding: 28px;
  background:
    linear-gradient(135deg, rgba(var(--primary-rgb), 0.12), transparent 42%),
    linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
  box-shadow: var(--shadow);
}

.auth-info::after {
  content: "";
  position: absolute;
  right: 28px;
  bottom: 28px;
  width: min(320px, 46%);
  height: 160px;
  border: 1px solid rgba(var(--primary-rgb), 0.16);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(249, 251, 250, 0.8)),
    repeating-linear-gradient(0deg, transparent 0 23px, rgba(var(--primary-rgb), 0.12) 24px);
  opacity: 0.76;
}

.auth-info::before {
  content: "";
  position: absolute;
  inset: 24px 24px auto auto;
  width: min(360px, 42%);
  aspect-ratio: 1;
  border: 1px solid rgba(var(--primary-rgb), 0.18);
  border-radius: 50%;
  background:
    linear-gradient(90deg, rgba(var(--primary-rgb), 0.16) 1px, transparent 1px),
    linear-gradient(180deg, rgba(var(--primary-rgb), 0.16) 1px, transparent 1px);
  background-size: 28px 28px;
  opacity: 0.72;
}

.auth-info-head,
.auth-metrics {
  position: relative;
  z-index: 2;
}

.auth-tag {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(var(--primary-rgb), 0.35);
  border-radius: 999px;
  padding: 0 12px;
  background: #fff;
  color: var(--primary);
  font-size: 13px;
  font-weight: 800;
}

.auth-info h2 {
  max-width: 560px;
  margin-top: 22px;
  font-size: 42px;
  line-height: 1.08;
}

.auth-info p {
  max-width: 500px;
  margin: 14px 0 0;
  color: var(--text-soft);
  font-size: 16px;
  font-weight: 650;
}

.auth-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.auth-metrics div {
  min-height: 92px;
  display: grid;
  align-content: center;
  gap: 7px;
  border: 1px solid rgba(208, 213, 221, 0.88);
  border-radius: var(--radius);
  padding: 14px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: var(--shadow-soft);
}

.auth-metrics span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.auth-metrics strong {
  overflow: hidden;
  color: var(--text);
  font-size: 18px;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.auth-card {
  width: min(440px, 100%);
}

.auth-form-card {
  width: 100%;
  display: grid;
  align-content: center;
  align-self: stretch;
  padding: 30px;
}

.auth-card.wide {
  width: min(640px, 100%);
}

.auth-card h2 {
  margin-bottom: 18px;
}

.auth-card-head {
  margin-bottom: 22px;
}

.auth-card-head h2 {
  margin-bottom: 8px;
  font-size: 26px;
  color: var(--text);
}

.auth-form-card .field input {
  background: #fff;
}

.auth-form-card .field input::placeholder {
  color: #98a2b3;
}

.auth-card-head span,
.auth-switch {
  color: var(--muted);
  font-weight: 650;
}

.auth-form-card .button.primary {
  width: 100%;
  min-height: 40px;
  margin-top: var(--unit);
}

.auth-switch {
  margin: 18px 0 0;
  text-align: center;
}

.setup-card {
  width: min(920px, 100%);
  margin: 0 auto;
}

.setup-form {
  gap: 18px;
}

.setup-section {
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  background: #fbfdfc;
}

.setup-section h3 {
  margin: 0;
  color: var(--text);
  font-size: 16px;
}

.setup-flash {
  margin: 0 auto 16px;
  width: min(920px, 100%);
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 14px;
  line-height: 1.55;
  font-weight: 600;
}

.setup-mono-input {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  letter-spacing: 0.02em;
}

.muted {
  color: var(--muted);
}

.preview-card {
  display: grid;
  grid-template-rows: auto minmax(390px, 1fr);
}

.preview-stage {
  min-height: 390px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(45deg, rgba(208, 213, 221, 0.42) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(208, 213, 221, 0.42) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, rgba(208, 213, 221, 0.42) 75%),
    linear-gradient(-45deg, transparent 75%, rgba(208, 213, 221, 0.42) 75%),
    #f9fbff;
  background-position: 0 0, 0 10px, 10px -10px, -10px 0;
  background-size: 20px 20px;
}

.preview-stage img {
  width: 100%;
  height: 100%;
  max-height: 620px;
  object-fit: contain;
  background: #fff;
}

.empty-state,
.preview-loading {
  width: min(240px, 90%);
  min-height: 116px;
  display: grid;
  place-items: center;
  gap: 8px;
  border: 1px dashed #b8c7dc;
  border-radius: var(--radius);
  padding: 18px;
  background: rgba(255, 255, 255, 0.86);
  color: var(--muted);
  text-align: center;
  font-weight: 700;
}

.preview-loading span {
  font-size: 13px;
  font-weight: 600;
}

.preview-error {
  width: min(360px, 92%);
  min-height: 128px;
  display: grid;
  place-items: center;
  gap: 8px;
  border: 1px solid #fecaca;
  border-radius: var(--radius);
  padding: 18px;
  background: var(--danger-soft);
  color: var(--danger);
  text-align: center;
  font-weight: 700;
}

.preview-error span {
  color: #991b1b;
  font-size: 13px;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.preview-spinner {
  width: 34px;
  height: 34px;
  border: 3px solid #dbeafe;
  border-top-color: var(--primary);
  border-radius: 999px;
  animation: spin 0.8s linear infinite;
}

.history-list {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.history-list .record-card {
  height: 236px;
  min-height: 236px;
  display: grid;
  grid-template-rows: 128px minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0;
  background: #fff;
  color: inherit;
  cursor: pointer;
  text-align: left;
  box-shadow: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.history-list .record-card:hover {
  border-color: rgba(var(--primary-rgb), 0.35);
  background: #fbfdfc;
  box-shadow: var(--shadow-soft);
}

.history-list .record-card:focus-visible {
  outline: 3px solid rgba(var(--primary-rgb), 0.16);
  outline-offset: 2px;
}

.record-image {
  display: grid;
  place-items: center;
  overflow: hidden;
  background: linear-gradient(135deg, #e8f7f0, #f9fbfa);
  color: var(--muted);
  font-weight: 750;
}

.record-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.record-body {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 7px;
  padding: 10px;
}

.record-meta {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
}

.record-meta span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.record-meta span:first-child:not(.status) {
  color: var(--primary);
}

.record-body p {
  max-height: 42px;
  margin: 0;
  overflow: hidden;
  color: #1f2937;
  font-size: 13px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.record-body time {
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.record-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: auto;
}

.record-foot--with-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
  row-gap: 6px;
}

.record-foot--with-actions time {
  margin-right: auto;
}

.record-featured-btn {
  flex-shrink: 0;
  min-height: 32px !important;
  padding: 0 14px !important;
  font-size: 12px !important;
  font-weight: 800 !important;
  letter-spacing: 0.03em;
  border-radius: 999px !important;
  transition:
    transform 0.16s ease,
    box-shadow 0.16s ease,
    border-color 0.16s ease,
    background 0.16s ease,
    color 0.16s ease;
}

.record-featured-btn:disabled {
  cursor: default;
  opacity: 1;
}

.record-featured-btn__inner {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}

.record-featured-star-icon {
  flex-shrink: 0;
  display: block;
}

.record-featured-btn--idle {
  border-color: rgba(148, 163, 184, 0.55) !important;
  background: linear-gradient(180deg, #ffffff, #f8fafc) !important;
  color: #475569 !important;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
}

.record-featured-btn--idle .record-featured-star-icon {
  color: #94a3b8;
}

.record-featured-btn--idle:not(:disabled):hover {
  transform: translateY(-1px);
  border-color: rgba(var(--primary-rgb), 0.38) !important;
  background: linear-gradient(180deg, #ffffff, #f0f9ff) !important;
  color: var(--primary) !important;
  box-shadow: 0 4px 14px rgba(var(--primary-rgb), 0.12);
}

.record-featured-btn--idle:not(:disabled):hover .record-featured-star-icon {
  color: var(--primary);
}

.record-featured-btn--pending {
  border-color: rgba(251, 191, 36, 0.5) !important;
  background: linear-gradient(145deg, #fffbeb 0%, #fef9c3 100%) !important;
  color: #a16207 !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.88),
    0 2px 6px rgba(245, 158, 11, 0.12);
}

.record-featured-btn--pending .record-featured-star-icon {
  color: #d97706;
}

/* 待审核：描边星，与「已加入」实心星区分 */
.record-featured-btn--pending .record-featured-star-icon path {
  fill: rgba(254, 243, 199, 0.65);
  stroke: #d97706;
  stroke-width: 1.15;
  stroke-linejoin: round;
}

.record-featured-btn--approved {
  border-color: rgba(251, 191, 36, 0.65) !important;
  background: linear-gradient(145deg, #fffdf7 0%, #fef3c7 42%, #fde68a 100%) !important;
  color: #78350f !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.92),
    0 2px 10px rgba(245, 158, 11, 0.2),
    0 0 0 1px rgba(255, 255, 255, 0.35) inset;
}

.record-featured-btn--approved .record-featured-star-icon {
  width: 16px;
  height: 16px;
  color: #f59e0b;
}

/* 已加入精选：实心填充（显式 fill，避免部分 WebView 对 currentColor / filter 表现异常） */
.record-featured-btn--approved .record-featured-star-icon path {
  fill: #f59e0b;
  stroke: #ea580c;
  stroke-width: 0.35;
  stroke-linejoin: round;
}

/* 记录页：横向卡片（左图右文），绘画橙标 / 编辑紫标 */
body.page-records .records-page-card .history-list {
  grid-template-columns: 1fr;
  gap: 14px;
}

@media (min-width: 880px) {
  body.page-records .records-page-card .history-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

body.page-records .records-page-card .history-list .record-card--row {
  height: auto;
  min-height: 0;
  overflow: visible;
  display: grid;
  /* 左栏不加宽：增高只靠更竖的比例（见下方 aspect-ratio），文案区更宽 */
  grid-template-columns: clamp(88px, 22vw, 118px) minmax(0, 1fr);
  grid-template-rows: auto;
  gap: 12px 14px;
  align-items: stretch;
  padding: 12px 14px;
  border-radius: 14px;
  box-shadow: 0 4px 18px rgba(15, 23, 42, 0.06);
  /* 收敛整张卡的 transition，避免点脚栏时与全局 .record-card 长动画叠加造成迟钝感 */
  transition: border-color 0.12s ease, box-shadow 0.12s ease, background-color 0.12s ease;
  -webkit-tap-highlight-color: transparent;
}

body.page-records .records-page-card .history-list .record-card--row .record-image {
  grid-column: 1;
  grid-row: 1;
  width: 100%;
  /* 固定栏宽下增高：竖图比例 2:3（宽:高），比 3:4 更高、不增加列宽 */
  aspect-ratio: 2 / 3;
  min-height: 0;
  border-radius: 12px;
  overflow: hidden;
  align-self: start;
}

@media (min-width: 880px) {
  body.page-records .records-page-card .history-list .record-card--row .record-image {
    aspect-ratio: 3 / 4;
  }
}

body.page-records .records-page-card .history-list .record-card--row .record-body {
  grid-column: 2;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 0;
  min-width: 0;
  min-height: 0;
  align-self: stretch;
  justify-content: flex-start;
}

/* 顶栏：标签一行；时间在下一行左对齐，与下方提示词同一垂线 */
body.page-records .record-card__top {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
}

body.page-records .record-card__pills {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 6px;
  min-width: 0;
  flex: none;
  width: 100%;
}

body.page-records .record-mode-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 5px 11px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 850;
  line-height: 1.15;
  border: 1px solid transparent;
  white-space: nowrap;
}

body.page-records .record-mode-pill--draw {
  border-color: rgba(234, 88, 12, 0.42);
  background: linear-gradient(180deg, #fff7ed, #ffedd5);
  color: #c2410c;
}

body.page-records .record-mode-pill--edit {
  border-color: rgba(147, 51, 234, 0.4);
  background: linear-gradient(180deg, #faf5ff, #f3e8ff);
  color: #7e22ce;
}

body.page-records .record-card--row .record-status-pill.status {
  flex: 0 0 auto;
  min-height: 22px;
  padding: 5px 11px;
  font-size: 11px;
  font-weight: 850;
  line-height: 1.15;
  border-radius: 999px;
  border: 1px solid transparent;
}

body.page-records .record-card--row .record-status-pill.status.succeeded {
  border-color: rgba(var(--primary-rgb), 0.32);
  background: rgba(239, 246, 255, 0.98);
  color: var(--primary-active);
}

body.page-records .record-card--row .record-status-pill.status.failed {
  border-color: #fecaca;
  background: var(--danger-soft);
  color: var(--danger);
}

body.page-records .record-card--row .record-status-pill.status.running,
body.page-records .record-card--row .record-status-pill.status.queued {
  border-color: rgba(var(--primary-rgb), 0.32);
  background: rgba(239, 246, 255, 0.98);
  color: var(--primary-active);
}

body.page-records .record-card--row .record-status-pill.status.deleted {
  border-color: var(--line-strong);
  background: #f2f4f7;
  color: var(--muted);
}

body.page-records .record-card__time {
  margin: 0;
  align-self: stretch;
  width: 100%;
  text-align: left;
  font-size: 11px;
  font-weight: 650;
  color: #94a3b8;
  font-variant-numeric: tabular-nums;
  white-space: normal;
  overflow-wrap: anywhere;
  line-height: 1.35;
}

body.page-records .records-page-card .history-list .record-card--row .record-body .record-prompt-snippet {
  margin: 0;
  padding-top: 0;
  font-size: 14px;
  font-weight: 650;
  color: #334155;
  line-height: 1.45;
  max-height: none;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  text-overflow: ellipsis;
  overflow-wrap: anywhere;
  word-break: break-word;
}

body.page-records .records-page-card .record-foot--records.record-foot--with-actions {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  /* 与左侧缩略图底部对齐：占位顶满网格行后把按钮推到底 */
  margin-top: auto;
  padding-top: 0;
  isolation: isolate;
}

/*
 * 记录页横向卡：整卡不再随 hover/active 加重阴影（避免点脚栏按钮时像误触整张卡片；触摸场景下子元素 hover 往往滞后）。
 */
body.page-records .records-page-card .history-list .record-card--row:hover {
  transform: none !important;
  border-color: var(--line);
  background: #fff;
  box-shadow: 0 4px 18px rgba(15, 23, 42, 0.06);
}

body.page-records .records-page-card .history-list .record-card--row:hover .record-image img {
  transform: none !important;
}

/* 按下脚栏内按钮的瞬间：强制保持与静态一致的阴影，避免继承全局 .history-list .record-card 的加重样式 */
body.page-records .records-page-card .history-list .record-card--row:has(.record-foot--records button:active) {
  transform: none !important;
  border-color: var(--line);
  background: #fff;
  box-shadow: 0 4px 18px rgba(15, 23, 42, 0.06);
}

@media (max-width: 720px) {
  body.page-records .records-page-card .history-list .record-card--row:hover,
  body.page-records .records-page-card .history-list .record-card--row:has(.record-foot--records button:active) {
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
  }
}

body.page-records .records-page-card .record-foot--records .record-featured-btn {
  flex: 1 1 auto;
  width: auto !important;
  min-width: 0;
  justify-content: center;
  min-height: 30px !important;
  padding: 0 10px !important;
  font-size: 11px !important;
  font-weight: 750 !important;
}

body.page-records .records-page-card .record-foot--records .record-featured-btn .record-featured-star-icon {
  width: 13px;
  height: 13px;
}

body.page-records .records-page-card .record-foot--records .record-featured-btn--approved .record-featured-star-icon {
  width: 14px;
  height: 14px;
}

body.page-records .records-page-card .record-foot--records .record-delete {
  flex: 0 0 auto;
  width: auto !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 0 11px;
  border-radius: 999px;
  border: 1px solid #fecaca;
  font-size: 11px;
  font-weight: 750;
}

/* 记录页：未提交精选（提交精选 / 再次提交）——中性灰，与已通过琥珀色区分 */
body.page-records .records-page-card .record-featured-btn--idle {
  border-color: rgba(148, 163, 184, 0.55) !important;
  background: linear-gradient(180deg, #f8fafc, #f1f5f9) !important;
  color: #64748b !important;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

body.page-records .records-page-card .record-featured-btn--idle .record-featured-star-icon {
  color: #94a3b8;
}

body.page-records .records-page-card .record-featured-btn--idle:not(:disabled):hover {
  transform: translateY(-1px);
  border-color: rgba(var(--primary-rgb), 0.42) !important;
  background: linear-gradient(180deg, #eff6ff, #dbeafe) !important;
  color: var(--primary-active) !important;
  box-shadow:
    0 0 0 2px rgba(var(--primary-rgb), 0.22),
    0 6px 16px rgba(var(--primary-rgb), 0.12);
}

body.page-records .records-page-card .record-featured-btn--idle:not(:disabled):hover .record-featured-star-icon {
  color: var(--primary);
}

body.page-records .records-page-card .record-featured-btn--idle:not(:disabled):focus-visible {
  outline: none;
  box-shadow:
    0 0 0 2px rgba(var(--primary-rgb), 0.35),
    0 4px 12px rgba(var(--primary-rgb), 0.14);
}

body.page-records .records-page-card .record-featured-btn--idle:not(:disabled):active {
  transform: translateY(0) scale(0.98);
  border-color: rgba(var(--primary-rgb), 0.5) !important;
  box-shadow:
    0 0 0 2px rgba(var(--primary-rgb), 0.28),
    0 2px 8px rgba(15, 23, 42, 0.08);
}

.record-delete {
  min-height: 28px;
  border: 1px solid #fecaca;
  border-radius: 6px;
  padding: 0 9px;
  background: #fff;
  color: var(--danger);
  font-size: 12px;
  font-weight: 800;
}

.record-delete:hover {
  background: var(--danger-soft);
}

.history-empty-inline {
  grid-column: 1 / -1;
  min-height: 92px;
  display: grid;
  place-items: center;
  border: 1px dashed #b8c7dc;
  border-radius: var(--radius);
  color: var(--muted);
  background: #fbfdff;
  font-weight: 750;
}

.records-page-main {
  align-items: stretch;
  gap: 14px;
}

.records-page-card {
  margin-top: 0;
  border-radius: 18px;
  border: 1px solid rgba(226, 232, 240, 0.85);
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.05);
}

body.page-records .records-page-card .card-head h2 {
  letter-spacing: -0.02em;
}

@media (max-width: 720px) {
  /* 记录列表底部与固定底栏之间的额外间距 */
  body.page-records .records-page-card .history-list {
    padding-bottom: 12px;
  }
}

/* Auth Pro (login/register page refresh) */
body.page-auth:has(.auth-pro-page) {
  min-height: 100vh;
  min-height: 100dvh;
  background:
    radial-gradient(circle at 14% 12%, rgba(56, 189, 248, 0.16), transparent 36%),
    radial-gradient(circle at 82% 88%, rgba(var(--primary-rgb), 0.08), transparent 32%),
    linear-gradient(180deg, #eef4fb 0%, #f5f8fd 38%, #f2f6fb 100%);
}

body.page-auth:has(.auth-pro-page) .app-shell {
  width: min(100% - 48px, 1180px);
  max-width: 1180px;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-content: stretch;
  justify-content: center;
  padding: 30px 0;
  margin-left: auto;
  margin-right: auto;
  box-sizing: border-box;
}

body.page-auth:has(.auth-pro-page) .auth-pro-page {
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.auth-pro-page {
  width: 100%;
}

.auth-pro-shell {
  min-height: 640px;
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(380px, 0.88fr);
  overflow: hidden;
  border: 1px solid #e4e9f1;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.7);
  box-shadow: 0 26px 60px rgba(20, 43, 75, 0.12);
  -webkit-backdrop-filter: blur(12px) saturate(1.08);
  backdrop-filter: blur(12px) saturate(1.08);
}

.auth-pro-showcase {
  display: grid;
  align-content: center;
  gap: 18px;
  padding: clamp(32px, 6vw, 58px);
  background:
    radial-gradient(circle at 18% 10%, rgba(56, 189, 248, 0.2), transparent 40%),
    radial-gradient(circle at 90% 80%, rgba(var(--primary-rgb), 0.08), transparent 32%),
    linear-gradient(180deg, #f0f8ff 0%, #eaf5ff 100%);
}

.auth-pro-brand {
  width: fit-content;
  display: grid;
  grid-template-columns: 60px minmax(0, 1fr);
  align-items: start;
  gap: 12px;
  margin-top: -20px;
  color: #101828;
  text-decoration: none;
}

.auth-pro-brand > span {
  display: grid;
  align-content: start;
  gap: 4px;
  padding-top: 0;
}

.auth-pro-mark {
  width: 60px;
  height: 60px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.22) 0%, rgba(var(--primary-rgb), 0.18) 100%);
  box-shadow: 0 12px 24px rgba(var(--primary-rgb), 0.18);
}

.auth-pro-mark img {
  width: 100%;
  height: 100%;
  display: block;
  border-radius: inherit;
  object-fit: cover;
}

.auth-pro-mark svg {
  width: 42px;
  height: 42px;
}

.auth-pro-brand strong {
  display: block;
  font-size: 34px;
  font-weight: 900;
  line-height: 1.05;
}

.auth-pro-brand small {
  display: block;
  margin-top: 5px;
  color: #667085;
  font-size: 13px;
  font-weight: 700;
}

.auth-pro-tag {
  width: fit-content;
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  border: 1px solid #d7e8f8;
  border-radius: 999px;
  padding: 0 14px;
  background: rgba(255, 255, 255, 0.72);
  color: #3b82b1;
  font-size: 12px;
  font-weight: 760;
}

.auth-pro-showcase h1 {
  margin: 2px 0 0;
  color: #0f172a;
  font-size: clamp(40px, 4.3vw, 62px);
  font-weight: 920;
  line-height: 1.04;
  letter-spacing: -0.02em;
}

.auth-pro-showcase p {
  max-width: 600px;
  margin: 0;
  color: #475467;
  font-size: 17px;
  line-height: 1.72;
}

.auth-pro-metrics {
  margin-top: 8px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.auth-pro-metrics article {
  min-height: 96px;
  display: grid;
  align-content: center;
  gap: 6px;
  border: 1px solid #dce6f3;
  border-radius: 14px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 8px 18px rgba(16, 24, 40, 0.06);
}

.auth-pro-metrics strong {
  color: #0f172a;
  font-size: 18px;
  font-weight: 880;
}

.auth-pro-metrics span {
  color: #667085;
  font-size: 13px;
  font-weight: 700;
}

.auth-pro-form-side {
  display: grid;
  align-content: center;
  gap: 18px;
  padding: clamp(28px, 4vw, 42px);
  background: rgba(255, 255, 255, 0.9);
}

.auth-pro-mobile-brand {
  display: none;
}

.auth-pro-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  min-height: 54px;
  border: 1px solid #dbe2ea;
  border-radius: 14px;
  padding: 6px;
  background: #eef2f7;
}

.auth-pro-tabs a {
  min-height: 40px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: #667085;
  font-size: 14px;
  font-weight: 780;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.22s ease, background-color 0.22s ease, color 0.22s ease;
}

.auth-pro-tabs a.active {
  color: #fff;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
  box-shadow: 0 10px 20px rgba(var(--primary-rgb), 0.26);
}

.auth-pro-tabs a:not(.active):hover {
  color: #344054;
  background: rgba(255, 255, 255, 0.66);
}

.auth-pro-tabs a:hover {
  transform: translateY(-1px);
}

.auth-pro-header h2 {
  margin: 0;
  color: #0f172a;
  font-size: 42px;
  font-weight: 900;
}

.auth-pro-header p {
  margin: 8px 0 0;
  color: #667085;
  font-size: 15px;
  font-weight: 600;
}

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

.auth-pro-login-panel {
  display: grid;
  gap: 12px;
}

.auth-pro-login-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0;
}

.auth-pro-register-link {
  color: var(--primary-hover, #1e80ff);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.auth-pro-register-link:hover {
  text-decoration: underline;
}

.auth-pro-forgot {
  color: var(--primary-hover, #1e80ff);
  font-size: 13px;
  font-weight: 650;
  text-decoration: none;
  white-space: nowrap;
}

.auth-pro-forgot:hover {
  text-decoration: underline;
}

.auth-pro-forgot[hidden] {
  display: none;
}

.auth-pro-social-login {
  display: grid;
  gap: 10px;
  margin-top: 2px;
}

.auth-pro-social-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 46px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #344054;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  font-family: inherit;
  transition: border-color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
}

.auth-pro-social-btn svg {
  flex-shrink: 0;
}

.auth-pro-social-btn--wechat {
  border-color: #bbf7d0;
  background: linear-gradient(180deg, #f0fdf4 0%, #fff 100%);
  color: #15803d;
}

.auth-pro-social-btn--wechat svg {
  color: #22c55e;
}

.auth-pro-social-btn--sms {
  border-color: #dbeafe;
  background: linear-gradient(180deg, #eff6ff 0%, #fff 100%);
  color: #1d4ed8;
}

.auth-pro-social-btn--sms svg {
  color: #3b82f6;
}

.auth-pro-social-btn--sms.auth-pro-social-btn--active {
  border-color: #93c5fd;
  background: linear-gradient(180deg, #dbeafe 0%, #eff6ff 100%);
  box-shadow: inset 0 0 0 1px rgba(59, 130, 246, 0.12);
}

.auth-pro-social-btn:hover {
  filter: brightness(0.98);
}

.auth-pro-social-btn:active {
  transform: scale(0.99);
}

.auth-pro-social-login--icons {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 28px;
  margin-top: 6px;
}

.auth-pro-social-icon {
  display: inline-grid;
  place-items: center;
  width: 50px;
  height: 50px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #344054;
  text-decoration: none;
  cursor: pointer;
  font-family: inherit;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.06);
  transition: border-color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.auth-pro-social-icon svg {
  display: block;
}

.auth-pro-social-icon--wechat svg {
  width: 26px;
  height: 26px;
}

.auth-pro-social-icon--sms svg {
  width: 22px;
  height: 22px;
}

.auth-pro-social-icon--wechat {
  border-color: #bbf7d0;
  background: linear-gradient(180deg, #f0fdf4 0%, #fff 100%);
  color: #28c445;
}

.auth-pro-social-icon--sms {
  border-color: #bfdbfe;
  background: linear-gradient(180deg, #eff6ff 0%, #fff 100%);
  color: #1e80ff;
}

.auth-pro-social-icon--sms.auth-pro-social-icon--active {
  border-color: #93c5fd;
  background: linear-gradient(180deg, #dbeafe 0%, #eff6ff 100%);
  box-shadow:
    0 0 0 3px rgba(30, 128, 255, 0.12),
    0 2px 10px rgba(15, 23, 42, 0.06);
}

.auth-pro-social-icon:hover {
  filter: brightness(0.98);
}

.auth-pro-social-icon:active {
  transform: scale(0.96);
}

.auth-pro-mobile-support {
  appearance: none;
  -webkit-appearance: none;
  font: inherit;
  cursor: pointer;
}

.auth-pro-login-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 2px 0 0;
  flex-wrap: wrap;
}

.auth-pro-login-mode-link {
  border: 0;
  padding: 0;
  background: none;
  color: var(--primary-hover);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
}

.auth-pro-login-mode-link:hover {
  text-decoration: underline;
}

.auth-pro-login-bottom .auth-pro-switch {
  margin: 0;
  text-align: right;
}

.auth-pro-field {
  display: grid;
  gap: 7px;
}

.auth-pro-field span {
  color: #344054;
  font-size: 13px;
  font-weight: 760;
}

.auth-pro-field input {
  width: 100%;
  height: 50px;
  border: 1px solid #d0d5dd;
  border-radius: 12px;
  padding: 0 14px;
  background: #eaf2ff;
  color: #101828;
  outline: none;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background-color 0.16s ease;
}

.auth-pro-field input::placeholder {
  color: #98a2b3;
}

.auth-pro-field input:hover {
  border-color: #9ca3af;
}

.auth-pro-field input:focus {
  border-color: var(--primary);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.14);
}

/* 验证码/短信行：单外框 + 柔分隔；左右同色系，避免「两块拼贴」感 */
.auth-pro-captcha-row {
  display: flex;
  align-items: stretch;
  gap: 0;
  min-height: 50px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  overflow: hidden;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
  box-sizing: border-box;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background-color 0.16s ease;
}

.auth-pro-captcha-row:focus-within {
  border-color: var(--primary);
  background: #fff;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    0 0 0 3px rgba(var(--primary-rgb), 0.14);
}

.auth-pro-captcha-row input {
  flex: 1 1 auto;
  min-width: 0;
  height: auto;
  min-height: 50px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  padding-left: 14px;
  padding-right: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.auth-pro-captcha-row input:hover {
  border-color: transparent;
}

.auth-pro-captcha-row input:focus {
  border-color: transparent;
  background: transparent;
  box-shadow: none;
  outline: none;
}

.auth-pro-captcha-trigger {
  flex: 0 0 128px;
  width: 128px;
  min-height: 50px;
  height: auto;
  align-self: stretch;
  border: 0;
  border-left: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 0;
  padding: 0;
  overflow: hidden;
  /* 与左侧输入区同色系，避免灰色块偏「沉」 */
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  box-shadow: none;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: #334155;
  transition: background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}

.auth-pro-captcha-trigger img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  object-position: center;
  background: #fafbfc;
}

.auth-pro-captcha-trigger:hover {
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
  border-left-color: rgba(148, 163, 184, 0.32);
  color: #1e293b;
}

.auth-pro-captcha-trigger:hover img {
  background: #f4f6f9;
}

.auth-pro-captcha-trigger:focus-visible {
  outline: 2px solid rgba(var(--primary-rgb), 0.45);
  outline-offset: -2px;
  z-index: 1;
}

.auth-pro-check {
  min-height: 26px;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 0;
  border-radius: 0;
  padding: 0;
  background: transparent;
}

.auth-pro-check input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--primary);
}

.auth-pro-check span {
  color: #475467;
  font-size: 13px;
  font-weight: 640;
}

.auth-pro-check a {
  color: #0284c7;
  font-weight: 780;
}

.auth-pro-check--muted span {
  font-size: 12px;
  font-weight: 520;
  color: #667085;
  line-height: 1.45;
}

.auth-pro-submit {
  position: relative;
  overflow: hidden;
  width: 100%;
  min-height: 52px;
  margin-top: 4px;
  margin-bottom: 10px;
  border: 0;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
  color: #fff;
  font-size: 16px;
  font-weight: 860;
  box-shadow: 0 4px 12px rgba(var(--primary-rgb), 0.18);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.24s ease, filter 0.2s ease;
}

.auth-pro-submit:hover {
  filter: brightness(1.02);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(var(--primary-rgb), 0.22);
}

.auth-pro-submit:active {
  transform: translateY(0) scale(0.988);
}

.auth-pro-submit::after {
  content: "";
  position: absolute;
  top: -45%;
  left: -32%;
  width: 28%;
  height: 190%;
  opacity: 0;
  transform: rotate(18deg);
  background: linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0));
  pointer-events: none;
}

.auth-pro-submit:hover::after {
  animation: authSubmitShine 0.72s ease;
}

body.page-auth.is-auth-switching .auth-pro-form-side,
body.page-auth.is-auth-switching .auth-pro-showcase {
  opacity: 0;
  transform: translateY(8px) scale(0.992);
  filter: blur(1px);
}

body.page-auth .auth-pro-form-side,
body.page-auth .auth-pro-showcase {
  transition: opacity 0.2s ease, transform 0.2s ease, filter 0.2s ease;
}

.auth-pro-switch {
  margin: 2px 0 0;
  color: #667085;
  text-align: center;
  font-size: 13px;
  font-weight: 700;
}

.auth-pro-switch a {
  color: var(--primary-hover);
  font-weight: 840;
}

@media (max-width: 980px) {
  body.page-auth:has(.auth-pro-page) .app-shell {
    width: min(100% - 24px, 920px);
    align-content: start;
    padding: 16px 0 22px;
    min-height: 100dvh;
    margin-left: auto;
    margin-right: auto;
  }

  .auth-pro-shell {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .auth-pro-showcase {
    padding: 22px 22px 20px;
    gap: 12px;
  }

  .auth-pro-showcase h1 {
    font-size: clamp(30px, 6.5vw, 48px);
  }

  .auth-pro-showcase p {
    font-size: 14px;
    line-height: 1.55;
  }

  .auth-pro-metrics {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .auth-pro-metrics article {
    min-height: 0;
    padding: 12px;
  }

  .auth-pro-form-side {
    padding: 20px 20px 18px;
    gap: 14px;
  }

  .auth-pro-header h2 {
    font-size: clamp(28px, 5vw, 36px);
  }

  .auth-pro-header p {
    font-size: 14px;
  }
}

@media (max-width: 720px) {
  body.page-auth:has(.auth-pro-page) .app-shell {
    width: min(100% - 40px, 336px);
    max-width: 336px;
    min-height: 100dvh;
    padding: max(12px, env(safe-area-inset-top, 0px)) 0 max(16px, env(safe-area-inset-bottom, 0px));
    align-content: center;
    justify-items: stretch;
    margin-left: auto;
    margin-right: auto;
  }

  .auth-pro-shell {
    grid-template-columns: 1fr;
    min-height: 0;
    border-radius: 14px;
    box-shadow: 0 14px 36px rgba(20, 43, 75, 0.09);
  }

  .auth-pro-showcase {
    display: none;
  }

  .auth-pro-form-side {
    gap: 10px;
    padding: 14px 14px 12px;
    background: #fff;
  }

  .auth-pro-mobile-brand {
    width: fit-content;
    display: inline-grid;
    grid-template-columns: 36px minmax(0, 1fr);
    align-items: center;
    justify-self: center;
    margin: 0 auto 2px;
    gap: 8px;
    color: #101828;
    text-decoration: none;
  }

  .auth-pro-mobile-brand .auth-pro-mark {
    width: 36px;
    height: 36px;
    border-radius: 10px;
  }

  .auth-pro-mobile-brand span {
    color: #0f172a;
    font-size: 16px;
    font-weight: 850;
    line-height: 1.15;
  }

  .auth-pro-tabs {
    min-height: 48px;
    padding: 4px;
    border-radius: 12px;
  }

  .auth-pro-tabs a {
    min-height: 40px;
    font-size: 13px;
    border-radius: 9px;
  }

  .auth-pro-header h2 {
    font-size: clamp(22px, 5.2vw, 26px);
    font-weight: 880;
    letter-spacing: -0.02em;
  }

  .auth-pro-header p {
    margin: 4px 0 0;
    font-size: 13px;
    line-height: 1.45;
    font-weight: 600;
  }

  .auth-pro-form {
    gap: 10px;
  }

  .auth-pro-login-panel {
    gap: 10px;
  }

  .auth-pro-field {
    gap: 5px;
  }

  .auth-pro-field span {
    font-size: 12px;
  }

  .auth-pro-field input {
    height: 40px;
    padding: 0 12px;
    border-radius: 10px;
    font-size: 16px;
  }

  .auth-pro-captcha-row {
    min-height: 40px;
    border-radius: 10px;
  }

  .auth-pro-captcha-row input {
    min-height: 40px;
    height: 40px;
    padding-left: 12px;
    padding-right: 8px;
  }

  .auth-pro-captcha-trigger {
    flex: 0 0 108px;
    width: 108px;
    min-height: 40px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.15;
    padding: 0 4px;
  }

  .auth-pro-captcha-trigger img {
    object-fit: contain;
  }

  .auth-pro-check {
    min-height: 22px;
    padding: 0;
    gap: 6px;
  }

  .auth-pro-check span {
    font-size: 11.5px;
    line-height: 1.4;
  }

  .auth-pro-submit {
    min-height: 48px;
    margin-top: 2px;
    margin-bottom: 6px;
    border-radius: 11px;
    font-size: 15px;
  }

  .auth-pro-login-bottom {
    margin-top: 0;
    gap: 8px;
  }

  .auth-pro-login-mode-link {
    font-size: 12px;
  }

  .auth-pro-switch {
    font-size: 12px;
  }
}

@media (max-width: 420px) {
  body.page-auth:has(.auth-pro-page) .app-shell {
    width: min(100% - 36px, 336px);
    max-width: 336px;
    min-height: 100dvh;
    padding: max(10px, env(safe-area-inset-top, 0px)) 0 max(8px, env(safe-area-inset-bottom, 0px));
    justify-content: center;
    margin-left: auto;
    margin-right: auto;
  }

  .auth-pro-shell {
    border-radius: 12px;
  }

  .auth-pro-form-side {
    padding: 12px 12px 10px;
    gap: 9px;
  }

  .auth-pro-header h2 {
    font-size: 21px;
  }

  .auth-pro-header p {
    font-size: 12.5px;
  }
}

@keyframes authSubmitShine {
  from {
    left: -32%;
    opacity: 0;
  }

  18% {
    opacity: 1;
  }

  to {
    left: 122%;
    opacity: 0;
  }
}

/* Policy pages */
.policy-page {
  width: min(860px, 100%);
  margin: 0 auto;
}

.policy-card {
  border: 1px solid #e4e7ec;
  border-radius: 14px;
  padding: clamp(20px, 3vw, 28px);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 12px 30px rgba(16, 24, 40, 0.08);
}

.policy-card h1 {
  margin: 0 0 10px;
  font-size: 30px;
  font-weight: 900;
  color: #0f172a;
}

.policy-updated {
  margin: 0 0 16px;
  color: #667085;
  font-size: 13px;
  font-weight: 700;
}

.policy-card h2 {
  margin: 20px 0 8px;
  font-size: 18px;
  font-weight: 850;
  color: #111827;
}

.policy-card p,
.policy-card li {
  color: #475467;
  font-size: 14px;
  line-height: 1.75;
}

.policy-card ul {
  margin: 8px 0 0;
  padding-left: 20px;
}

.policy-back {
  margin-top: 20px;
  text-align: right;
}

.grid.help-center-page {
  max-width: min(680px, 100%);
  margin-inline: auto;
  gap: 14px;
}

.help-center-hero .card-head {
  margin-bottom: 2px;
}

/* 帮助中心各段标题：避免 .card-head::after 与版式叠出多余横线 */
body.page-help .help-center-page .card-head::after {
  display: none;
}

.help-intro {
  margin: 0 0 14px;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(248, 250, 252, 0.95);
  border: 1px solid rgba(226, 232, 240, 0.9);
  color: #475569;
  font-size: 14px;
  line-height: 1.65;
}

.help-intro a {
  font-weight: 750;
  color: var(--primary);
  text-decoration: none;
}

.help-intro a:hover {
  text-decoration: underline;
}

.help-toc {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.help-toc a {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(226, 232, 240, 0.95);
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  font-weight: 750;
  font-size: 14px;
  color: var(--primary-active);
  text-decoration: none;
  text-align: center;
  line-height: 1.35;
  -webkit-tap-highlight-color: transparent;
}

.help-toc a:active {
  background: rgba(239, 246, 255, 0.95);
}

.help-faq-block {
  font-size: 15px;
  line-height: 1.68;
  color: #334155;
}

.help-faq-block > p:first-child,
.help-faq-block > .inline-message:first-child {
  margin-top: 0;
}

.help-faq-block > p:last-child {
  margin-bottom: 0;
}

.help-lead {
  margin: 0 0 12px;
}

.help-footnote {
  margin: 14px 0 0;
  font-size: 13px;
  line-height: 1.55;
}

.help-actions {
  margin-top: 14px;
  margin-bottom: 0;
}

.help-faq-block .help-list {
  margin: 10px 0 0;
  padding-left: 1.15em;
  line-height: 1.65;
  color: #475569;
}

.help-faq-block .help-list.help-list--tight-top {
  margin-top: 4px;
}

.help-faq-block .help-list li {
  margin-bottom: 12px;
  padding-left: 0.15em;
}

.help-faq-block .help-list li:last-child {
  margin-bottom: 0;
}

body.page-help #faq-realname,
body.page-help #faq-credits,
body.page-help #faq-invite,
body.page-help #faq-ai-label {
  scroll-margin-top: 96px;
}

.grid.help-center-page > .section-card:first-child {
  margin-top: 0;
}

@media (max-width: 720px) {
  body.page-help .grid.help-center-page {
    gap: 12px;
  }

  body.page-help .card {
    padding: 16px 14px;
  }

  body.page-help .card-head h2 {
    font-size: 17px;
    line-height: 1.25;
  }

  body.page-help .help-intro {
    margin-bottom: 12px;
    padding: 10px 12px;
    font-size: 14px;
  }

  body.page-help .help-toc {
    gap: 8px;
  }

  body.page-help .help-toc a {
    min-height: 40px;
    padding: 8px 10px;
    font-size: 13px;
  }

  body.page-help .help-faq-block {
    font-size: 14px;
  }

  body.page-help .help-footnote {
    font-size: 12px;
  }
}

.legal-pages-form .legal-pages-textarea {
  width: 100%;
  min-height: 280px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
  line-height: 1.55;
  resize: vertical;
}

.policy-back a {
  color: var(--primary-hover);
  font-weight: 800;
  text-decoration: none;
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 18px;
}

.pagination > span {
  color: var(--muted);
  font-weight: 750;
}

.pagination-summary {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  text-align: center;
  line-height: 1.35;
}

.pagination-summary .pagination-count {
  font-size: 12px;
  font-weight: 650;
  opacity: 0.88;
}

.admin-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.admin-nav-shell {
  margin-bottom: 16px;
}

.admin-nav-shell .admin-nav {
  margin-bottom: 0;
}

.admin-nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  margin-bottom: 0;
}

.admin-nav-toggle-icon {
  display: inline-flex;
  line-height: 0;
}

.admin-nav-toggle-text {
  font-weight: 780;
}

.admin-nav-links .admin-nav-account-link:first-of-type {
  margin-top: 6px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.admin-nav-drawer {
  position: relative;
}

.admin-nav-drawer-backdrop {
  display: none;
}

.admin-nav-drawer-head {
  display: none;
}

.admin-nav-drawer-panel {
  position: relative;
}

.admin-nav-drawer-close {
  display: none;
}

/* 管理后台：左侧导航 + 右侧操作区（桌面）；手机仍为抽屉 */
.admin-layout {
  display: grid;
  grid-template-columns: minmax(220px, 268px) minmax(0, 1fr);
  gap: 22px;
  align-items: start;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin-bottom: 8px;
}

.admin-layout-main {
  min-width: 0;
  width: 100%;
  max-width: 100%;
}

.admin-layout-sidebar {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px 12px;
  border: 1px solid #e4e7ec;
  border-radius: 12px;
  background: #fff;
  box-shadow: var(--shadow-soft);
  align-self: start;
  position: sticky;
  top: 96px;
}

.admin-layout-sidebar-brand {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.admin-layout-sidebar-title {
  font-size: 17px;
  font-weight: 850;
  color: var(--text);
  text-decoration: none;
  line-height: 1.25;
}

.admin-layout-sidebar-title:hover {
  color: var(--primary);
}

.admin-layout-sidebar-sub {
  font-size: 12px;
  font-weight: 650;
  color: var(--muted);
  line-height: 1.3;
}

.admin-layout-sidebar-brand-main {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  text-decoration: none;
  color: inherit;
}

.admin-layout-sidebar-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.admin-layout-sidebar-platform {
  font-size: 16px;
  font-weight: 800;
  line-height: 1.2;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-layout-sidebar-brand-main:hover .admin-layout-sidebar-platform {
  color: var(--primary);
}

.admin-layout-sidebar .admin-nav-shell {
  margin-bottom: 0;
}

.admin-layout-sidebar .admin-nav.admin-nav-links {
  margin-bottom: 0;
  border: 0;
  box-shadow: none;
  padding: 0;
  background: transparent;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}

.stat-card {
  padding: 16px;
}

.stat-card span {
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.stat-card strong {
  display: block;
  margin-top: 6px;
  color: var(--text);
  font-size: 30px;
  line-height: 1.1;
}

/* 后台数据看板：指标统一在同一卡片内分区展示 */
.admin-dash-metrics-unified .card-head {
  align-items: flex-start;
}

.admin-dash-card-lead {
  margin: 8px 0 0;
  max-width: 52ch;
}

.admin-reg-stat-date-field {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  margin: 0;
}

.admin-reg-stat-date-field span {
  white-space: nowrap;
  font-size: 13px;
  font-weight: 700;
  color: #64748b;
}

.admin-reg-stat-date-field input[type="date"] {
  height: 34px;
  padding: 0 8px;
  border: 1px solid #d9d9d9;
  border-radius: 8px;
  font: inherit;
  font-weight: 600;
  color: #262626;
  background: #fff;
}

.admin-dash-kpi-stack {
  display: flex;
  flex-direction: column;
  margin-top: 4px;
}

.admin-dash-kpi-block {
  padding: 18px 0 0;
  margin-top: 16px;
  border-top: 1px solid rgba(226, 232, 240, 0.95);
}

.admin-dash-kpi-block:first-child {
  margin-top: 0;
  padding-top: 4px;
  border-top: 0;
}

.admin-dash-kpi-block-title {
  margin: 0 0 12px;
  font-size: 13px;
  font-weight: 850;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #64748b;
}

.admin-dash-kpi-block-sub {
  margin-left: 6px;
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0;
  text-transform: none;
  color: #94a3b8;
}

.admin-dash-kpi-block--last {
  padding-bottom: 2px;
}

body.page-admin .admin-dash-stat-grid .admin-dash-stat-card--with-foot strong {
  margin-top: 8px;
  padding-top: 0;
}

body.page-admin .admin-dash-stat-grid .stat-card .admin-dash-stat-card-hint {
  display: block;
  margin-top: 8px;
  font-size: 11px;
  line-height: 1.4;
  color: #94a3b8;
  font-weight: 600;
}

body.page-admin .admin-dash-stat-grid.stats-grid {
  grid-template-columns: repeat(auto-fill, minmax(208px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

body.page-admin .admin-dash-stat-grid--dense.stats-grid {
  gap: 11px;
}

.admin-dash-metrics-unified .admin-dash-stat-grid.stats-grid {
  margin-bottom: 0;
}

body.page-admin .admin-dash-stat-grid .stat-card {
  display: flex;
  flex-direction: column;
  min-height: 102px;
  padding: 14px 13px 13px;
  border-radius: 12px;
  border: 1px solid #ebeef3;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.035);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

body.page-admin .admin-dash-stat-grid .stat-card:hover {
  border-color: #dce3ee;
  box-shadow: 0 5px 14px rgba(15, 23, 42, 0.055);
}

body.page-admin .admin-dash-stat-grid .stat-card span {
  font-size: 12px;
  font-weight: 760;
  color: #64748b;
  line-height: 1.35;
}

body.page-admin .admin-dash-stat-grid .stat-card strong {
  margin-top: auto;
  padding-top: 10px;
  font-size: 23px;
  font-weight: 880;
  letter-spacing: -0.02em;
  color: #0f172a;
}

.admin-reg-stat-card-head {
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-end;
}

.admin-reg-stat-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 10px;
}

.admin-reg-stat-bar .field {
  margin: 0;
}

.table-wrap {
  width: 100%;
  overflow: auto;
  border: none;
  border-radius: var(--radius-card);
  background: #fff;
  box-shadow: var(--shadow-1);
}

body.page-admin .table-wrap {
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
}

body.page-admin .table-scroll {
  width: 100%;
  overflow-x: auto;
  overflow-y: visible;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  border: none;
  border-radius: var(--radius-card);
  background: #fff;
  box-shadow: var(--shadow-1);
}

body.page-admin .table-wrap table,
body.page-admin .table-scroll table {
  width: max-content;
  min-width: 100%;
  max-width: none;
  table-layout: auto;
}

body.page-admin .table-wrap th,
body.page-admin .table-wrap td,
body.page-admin .table-scroll th,
body.page-admin .table-scroll td {
  overflow: visible;
  text-overflow: clip;
  max-width: none;
}

/* 管理后台 · 生成记录表：整表不随提示词撑出视口，提示词列省略号（操作列留在屏内） */
body.page-admin .table-wrap table[data-admin-records] {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  table-layout: fixed;
}

body.page-admin .table-wrap table[data-admin-records] td.admin-prompt-cell,
body.page-admin .table-wrap table[data-admin-records] th:nth-child(7) {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: middle;
}

/* 管理后台 · 精选审核：提示词 2 行省略（悬停 title 看全文），避免长文案撑乱表格 */
body.page-admin .table-wrap table[data-admin-featured] {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  table-layout: fixed;
}

body.page-admin .table-wrap table[data-admin-featured] td.admin-featured-prompt-cell {
  min-width: 0;
  vertical-align: top;
}

body.page-admin .table-wrap table[data-admin-featured] .admin-featured-prompt-text {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  text-overflow: ellipsis;
  overflow-wrap: anywhere;
  word-break: break-word;
  line-height: 1.45;
  font-size: 13px;
  color: var(--text-soft);
}

body.page-admin .admin-users-table-wrap {
  overflow-x: visible;
  overflow-y: visible;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
}

body.page-admin .admin-users-table-wrap .admin-users-unified-table {
  width: 100%;
  min-width: min(100%, 880px);
  max-width: none;
  table-layout: fixed;
}

body.page-admin .admin-users-table-wrap .admin-users-unified-table th,
body.page-admin .admin-users-table-wrap .admin-users-unified-table td {
  overflow: visible;
  text-overflow: clip;
  max-width: none;
}

.admin-table-scroll-hint {
  display: none;
}

@media (max-width: 720px) {
  body.page-admin .admin-table-scroll-hint {
    display: block;
    margin: 0 0 10px;
    padding: 8px 12px;
    font-size: 12px;
    font-weight: 750;
    color: var(--muted);
    line-height: 1.45;
    border-radius: 10px;
    border: 1px dashed rgba(var(--primary-rgb), 0.3);
    background: rgba(var(--primary-rgb), 0.06);
  }
}

table {
  width: 100%;
  min-width: 760px;
  table-layout: fixed;
  border-collapse: collapse;
  background: #fff;
}

th,
td {
  border-bottom: 1px solid var(--line-secondary);
  padding: 17px 16px;
  text-align: left;
  vertical-align: middle;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.5714285714285714;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

tr:last-child td {
  border-bottom: 0;
}

th {
  position: sticky;
  top: 0;
  z-index: 1;
  border-bottom-color: var(--line-secondary);
  background: #fafafa;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0;
  white-space: nowrap;
}

tbody tr {
  transition: background 0.16s ease, box-shadow 0.16s ease;
}

tbody tr:hover td {
  background: #fafafa;
}

tr.is-deleted td {
  background: #fafafa;
  color: var(--muted);
}

tr.is-deleted:hover td {
  background: #f6f6f6;
}

[data-admin-records] th,
[data-admin-users] th,
[data-admin-codes] th {
  text-transform: none;
}

[data-admin-records] {
  min-width: 0;
}

[data-admin-records] th:nth-child(1),
[data-admin-records] td:nth-child(1) {
  width: 64px;
  text-align: center;
}

[data-admin-records] th:nth-child(2),
[data-admin-records] td:nth-child(2) {
  width: 110px;
}

[data-admin-records] th:nth-child(3),
[data-admin-records] td:nth-child(3) {
  width: 92px;
}

[data-admin-records] th:nth-child(4),
[data-admin-records] td:nth-child(4) {
  width: 130px;
}

[data-admin-records] th:nth-child(5),
[data-admin-records] td:nth-child(5) {
  width: 88px;
}

[data-admin-records] th:nth-child(6),
[data-admin-records] td:nth-child(6) {
  width: 92px;
}

[data-admin-records] th:nth-child(8),
[data-admin-records] td:nth-child(8) {
  width: 176px;
}

[data-admin-records] th:nth-child(9),
[data-admin-records] td:nth-child(9) {
  width: 150px;
}

/* 用户管理：统一卡片表格，占满容器宽度 */
[data-admin-users].admin-users-unified-table {
  min-width: 0;
  width: 100%;
}

[data-admin-users].admin-users-unified-table th:first-child,
[data-admin-users].admin-users-unified-table td:first-child {
  width: 100%;
}

[data-admin-codes] {
  min-width: 1160px;
}

[data-admin-codes] th:nth-child(1),
[data-admin-codes] td:nth-child(1) {
  width: 230px;
}

[data-admin-codes] th:nth-child(2),
[data-admin-codes] td:nth-child(2),
[data-admin-codes] th:nth-child(3),
[data-admin-codes] td:nth-child(3),
[data-admin-codes] th:nth-child(4),
[data-admin-codes] td:nth-child(4),
[data-admin-codes] th:nth-child(5),
[data-admin-codes] td:nth-child(5) {
  width: 96px;
}

[data-admin-codes] th:nth-child(6),
[data-admin-codes] td:nth-child(6),
[data-admin-codes] th:nth-child(8),
[data-admin-codes] td:nth-child(8) {
  width: 170px;
}

[data-admin-codes] th:nth-child(7),
[data-admin-codes] td:nth-child(7) {
  width: 120px;
}

[data-admin-codes] th:nth-child(9),
[data-admin-codes] td:nth-child(9) {
  width: 150px;
}

.admin-prompt-cell {
  color: var(--text-soft);
  max-width: 360px;
  line-height: 1.45;
}

.admin-record-row td {
  vertical-align: middle;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.admin-user-cell {
  max-width: 130px;
  font-weight: 750;
}

.table-primary-text {
  display: block;
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.table-muted-cell {
  color: var(--muted);
}

.admin-record-id-cell {
  line-height: 1.35;
}

.admin-record-id {
  display: inline-block;
  color: var(--text);
  font-weight: 850;
}

.admin-record-id-cell .status {
  margin-top: 5px;
}

.table-check-cell input,
[data-check-all-records] {
  width: 17px;
  height: 17px;
  accent-color: var(--primary);
}

.admin-number-cell {
  color: #344054;
  font-variant-numeric: tabular-nums;
}

.admin-number-cell strong {
  color: var(--text);
  font-weight: 880;
}

.admin-table-actions {
  overflow: visible;
}

.admin-table-actions>.button,
.admin-table-actions>.inline-delete-form,
.admin-table-actions>.table-action-group {
  vertical-align: middle;
}

.deleted-time {
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

.table-thumb {
  width: 60px;
  height: 60px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-soft);
  color: var(--muted);
  padding: 0;
  cursor: pointer;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.table-thumb:hover {
  border-color: rgba(var(--primary-rgb), 0.35);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
  transform: translateY(-1px);
}

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

.inline-delete-form {
  display: inline-flex;
  margin: 0 0 0 6px;
}

.filter-bar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(150px, 190px) auto;
  gap: 10px;
  align-items: end;
  margin-bottom: 12px;
  border: 1px solid #eef2f6;
  border-radius: 10px;
  background: #fbfdff;
  padding: 12px;
}

.filter-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
}

.filter-bar.admin-record-filter {
  grid-template-columns: minmax(180px, 1fr) minmax(120px, 150px) minmax(130px, 160px) auto;
}

.filter-bar.admin-user-filter {
  grid-template-columns: minmax(180px, 1fr) minmax(220px, 1.2fr) auto;
}

.filter-bar.admin-orders-filter {
  grid-template-columns: minmax(130px, 150px) repeat(2, minmax(0, 1fr)) minmax(0, 1fr) auto;
  gap: 12px 14px;
  align-items: end;
}

@media (max-width: 1100px) {
  .filter-bar.admin-orders-filter {
    grid-template-columns: repeat(2, minmax(0, 1fr)) auto;
  }
}

@media (max-width: 640px) {
  .filter-bar.admin-orders-filter {
    grid-template-columns: 1fr;
  }

  .filter-bar.admin-orders-filter .filter-actions {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }
}

.admin-orders-bulk-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 12px;
  margin-bottom: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line, #e4e7ec);
  border-radius: 10px;
  background: #f8fafc;
}

.admin-orders-export-form {
  margin-top: 4px;
}

.admin-orders-table .admin-orders-check-col {
  width: 40px;
  text-align: center;
  vertical-align: middle;
}

.admin-orders-table .admin-orders-check-col input[type="checkbox"] {
  width: 16px;
  height: 16px;
  cursor: pointer;
}

/* 用户管理：单行统一卡片，信息集中、操作横向排列 */
.admin-users-table-wrap .admin-users-unified-table {
  table-layout: fixed;
}

.admin-users-unified-table thead th {
  text-align: left;
  padding: 10px 12px 8px;
  vertical-align: bottom;
  border-bottom: 1px solid var(--line, #f0f0f0);
}

.admin-users-unified-table thead th.admin-users-thead-th {
  font-weight: 650;
  color: #595959;
  font-size: 12px;
  letter-spacing: 0.01em;
  text-transform: none;
}

.admin-users-thead-bar {
  display: grid;
  grid-template-columns: minmax(10.5rem, 1.05fr) minmax(10rem, 0.95fr) minmax(12.5rem, 1.15fr) minmax(13.5rem, 1.15fr) minmax(5.75rem, auto);
  align-items: end;
  column-gap: 14px;
  row-gap: 0;
  min-width: 0;
  justify-items: start;
}

.admin-users-thead-h {
  flex-shrink: 0;
  white-space: nowrap;
  line-height: 1.25;
}

.admin-users-thead-stats {
  display: contents;
}

.admin-users-thead-stats .admin-users-thead-h {
  flex: unset;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.admin-users-thead-h--actions {
  margin-left: 0;
  flex: unset;
  padding-left: 8px;
  border-left: 1px dashed rgba(148, 163, 184, 0.45);
  justify-self: end;
  text-align: right;
}

.admin-users-unified-td {
  padding: 10px 12px !important;
  vertical-align: middle;
}

/* 解封 / 重置密码 / 删除 等：由「更多操作」内菜单项 requestSubmit，不在单元格内显示 */
body.page-admin .admin-users-hidden-post-form {
  display: none !important;
}

.admin-users-unified-card {
  display: grid;
  grid-template-columns: minmax(10.5rem, 1.05fr) minmax(10rem, 0.95fr) minmax(12.5rem, 1.15fr) minmax(13.5rem, 1.15fr) minmax(5.75rem, auto);
  align-items: center;
  column-gap: 14px;
  row-gap: 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(180deg, #fff 0%, #fbfcfe 100%);
  padding: 10px 14px;
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.04);
  overflow: visible;
  min-width: 0;
  justify-items: start;
}

tr.is-deleted .admin-users-unified-card {
  opacity: 0.72;
  background: #f8fafc;
}

.admin-users-unified-identity {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  flex-shrink: 0;
  min-width: 0;
}

.admin-users-unified-phone {
  font-size: 13px;
  color: var(--muted);
  font-weight: 650;
}

.admin-users-unified-badges {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  flex-shrink: 0;
}

.admin-users-unified-badges-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.admin-users-unified-stats {
  display: contents;
}

.admin-users-unified-stats-block {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  min-width: 0;
  flex: unset;
  width: 100%;
}

.admin-users-unified-stats-row {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  min-width: 0;
  max-width: 100%;
  overflow-x: visible;
}

.admin-users-stat {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  min-width: 0;
  padding: 4px 10px;
  border-radius: 10px;
  background: rgba(248, 250, 252, 0.95);
  border: 1px solid #eef2f6;
}

.admin-users-stat-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.admin-users-stat-value {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  min-width: 0;
  font-size: 14px;
}

.admin-users-unified-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  gap: 4px;
  flex-shrink: 0;
  margin-left: 0;
  padding-left: 8px;
  border-left: 1px dashed rgba(148, 163, 184, 0.45);
  justify-self: end;
}

.admin-users-unified-actions-row {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 8px;
  justify-content: flex-end;
}

.admin-users-unified-actions .inline-admin-form {
  flex-wrap: nowrap;
}

/* 用户管理 ·「更多操作」：向上展开菜单，避免被 table-wrap / 卡片 overflow 裁切 */
.admin-users-more-menu {
  position: relative;
  flex-shrink: 0;
  z-index: 0;
}

.admin-users-more-menu.is-open {
  z-index: 60;
}

.admin-users-more-panel {
  position: absolute;
  right: 0;
  bottom: calc(100% + 6px);
  top: auto;
  left: auto;
  min-width: 176px;
  margin: 0;
  padding: 6px 0;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.45);
  background: #fff;
  box-shadow:
    0 4px 14px rgba(15, 23, 42, 0.08),
    0 12px 32px rgba(15, 23, 42, 0.12);
  z-index: 70;
}

.admin-users-more-item {
  display: block;
  width: 100%;
  margin: 0;
  padding: 10px 14px;
  border: none;
  background: transparent;
  text-align: left;
  font: inherit;
  font-size: 13px;
  font-weight: 650;
  color: #262626;
  cursor: pointer;
}

.admin-users-more-item:hover {
  background: rgba(22, 119, 255, 0.06);
}

.admin-users-more-item--danger {
  color: #cf1322;
}

.admin-users-more-item--danger:hover {
  background: rgba(207, 19, 34, 0.06);
}

.admin-users-more-item:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.admin-users-more-hint {
  display: block;
  padding: 8px 14px 4px;
  font-size: 12px;
  color: var(--muted);
}

body.page-admin .admin-users-unified-table tbody tr:has([data-admin-users-more].is-open) {
  position: relative;
  z-index: 8;
}

.admin-users-more-panel.admin-users-more-panel--open-down {
  top: calc(100% + 6px);
  bottom: auto;
}

.admin-users-realname-inline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
}

.admin-users-realname-inline .admin-users-realname-select {
  min-width: 92px;
  max-width: 120px;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 650;
  background: #fff;
}

@media (max-width: 900px) {
  .admin-users-unified-card {
    align-items: start;
  }

  .admin-users-unified-badges-row {
    flex-wrap: wrap;
  }
}

/* 管理后台：手机端抽屉导航 */
@media (max-width: 768px) {
  .admin-nav-shell {
    margin-bottom: 12px;
  }

  .admin-nav-toggle {
    display: inline-flex;
  }

  body.page-admin .admin-nav-shell > .admin-nav-toggle {
    display: none !important;
  }

  body.page-admin .site-header {
    position: relative;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: auto;
    align-items: center;
  }

  body.page-admin .site-header .site-brand {
    grid-column: 1;
    grid-row: 1;
  }

  body.page-admin .site-header .site-nav,
  body.page-admin .site-header .site-actions {
    display: none !important;
  }

  body.page-admin .site-header .site-menu-button {
    display: flex !important;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    width: 44px;
    height: 40px;
    padding: 0;
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
    align-self: center;
    border: 1px solid var(--line);
    border-radius: 13px;
    background: #fff;
    box-shadow: 0 8px 18px rgba(16, 24, 40, 0.08);
    cursor: pointer;
  }

  body.page-admin .site-header .site-menu-button span {
    width: 18px;
    height: 2px;
    flex: 0 0 2px;
    min-height: 2px;
    max-height: 2px;
    display: block;
    box-sizing: border-box;
    border-radius: 1px;
    background: var(--text);
    transition: transform 0.18s ease, opacity 0.18s ease;
  }

  body.page-admin .site-header.is-menu-open .site-menu-button span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

  body.page-admin .site-header.is-menu-open .site-menu-button span:nth-child(2) {
    opacity: 0;
  }

  body.page-admin .site-header.is-menu-open .site-menu-button span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  .admin-nav-drawer {
    position: fixed;
    inset: 0;
    z-index: 10070;
    pointer-events: none;
    visibility: hidden;
    transition: visibility 0.3s linear;
  }

  .admin-nav-shell.is-open .admin-nav-drawer {
    pointer-events: auto;
    visibility: visible;
  }

  .admin-nav-drawer-backdrop {
    display: block;
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.48);
    opacity: 0;
    transition: opacity 0.28s cubic-bezier(0.22, 1, 0.36, 1);
  }

  .admin-nav-shell.is-open .admin-nav-drawer-backdrop {
    opacity: 1;
  }

  .admin-nav-drawer-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 12px 14px 16px;
    border-bottom: 1px solid var(--line);
    flex-shrink: 0;
    background: #fff;
  }

  .admin-nav-drawer-title {
    font-weight: 850;
    font-size: 16px;
    color: var(--text);
  }

  .admin-nav-drawer-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 40px;
    margin: -6px -4px -6px 0;
    padding: 0;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--text);
    cursor: pointer;
    flex-shrink: 0;
  }

  .admin-nav-drawer-close:hover {
    background: rgba(148, 163, 184, 0.16);
  }

  .admin-nav-drawer-panel {
    position: absolute;
    top: 0;
    left: 0;
    display: flex;
    flex-direction: column;
    width: min(88vw, 300px);
    height: 100%;
    max-height: 100%;
    background: #fff;
    box-shadow: 8px 0 36px rgba(15, 23, 42, 0.2);
    transform: translateX(-105%);
    transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1);
    overflow: hidden;
  }

  .admin-nav-shell.is-open .admin-nav-drawer-panel {
    transform: translateX(0);
  }

  .admin-nav-shell .admin-nav.admin-nav-links {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 8px;
    margin: 0;
    margin-bottom: 0;
    padding: 12px 12px 24px;
    border: 0;
    box-shadow: none;
    background: transparent;
  }

  .admin-nav-shell .admin-nav-links .button {
    width: 100%;
    justify-content: flex-start;
    flex-shrink: 0;
    white-space: normal;
    text-align: left;
    min-height: 40px;
  }

  .admin-nav-shell .admin-nav-links .admin-nav-link {
    width: 100%;
    min-height: 40px;
  }

  body.page-admin .admin-layout {
    grid-template-columns: 1fr;
    /* 1fr 在多数引擎中等价于 minmax(auto,1fr)，第二行最小高度=子项内容高，会撑破视口且 main 无法出现滚动条 */
    grid-template-rows: auto minmax(0, 1fr);
    gap: 0;
    min-height: 0;
  }

  body.page-admin .admin-layout-sidebar {
    position: static;
    top: auto;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    gap: 0;
  }

  body.page-admin .admin-layout-sidebar-brand {
    display: none;
  }

  body.page-admin .admin-layout {
    height: 100%;
    max-height: 100%;
  }

  body.page-admin .admin-layout-workspace {
    min-width: 0;
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    max-height: 100%;
    overflow: hidden;
  }

  body.page-admin .admin-layout-main {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-y: contain;
    padding-bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  }

  body.page-admin .admin-layout-main > .grid {
    min-height: 0;
  }
}

@media (min-width: 769px) {
  .admin-nav-shell .admin-nav-toggle {
    display: none !important;
  }

  .admin-nav-shell .admin-nav-drawer-head {
    display: none !important;
  }

  .admin-nav-shell .admin-nav-drawer-close {
    display: none !important;
  }

  .admin-nav-shell .admin-nav-drawer {
    position: relative;
    z-index: auto;
    pointer-events: auto;
    visibility: visible;
  }

  .admin-nav-shell .admin-nav-drawer-backdrop {
    display: none !important;
  }

  .admin-nav-shell .admin-nav-drawer-panel {
    position: static;
    width: auto;
    height: auto;
    max-height: none;
    transform: none !important;
    box-shadow: none;
    border: 0;
    background: transparent;
    overflow: visible;
  }

  .admin-layout-sidebar .admin-nav-shell .admin-nav.admin-nav-links {
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: stretch;
    overflow-x: visible;
    overflow-y: visible;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding-bottom: 0;
    gap: 4px;
    flex: 0 0 auto;
    max-height: none;
  }

  .admin-layout-sidebar .admin-nav-shell .admin-nav.admin-nav-links::-webkit-scrollbar {
    width: 0;
    height: 0;
  }

  .admin-layout-sidebar .admin-nav-shell .admin-nav-links .admin-nav-link {
    width: 100%;
    justify-content: flex-start;
    text-align: left;
    white-space: normal;
    min-height: 40px;
  }
}

/* ========== 管理后台：Pro 壳（白侧栏 + 浮动顶栏 + 浅灰主区）========== */
html:has(body.page-admin) {
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

body.page-admin {
  --primary: #1677ff;
  --primary-hover: #4096ff;
  --primary-active: #0958d9;
  --primary-soft: #e6f4ff;
  --primary-rgb: 22, 119, 255;
  --admin-sidebar-bg: #ffffff;
  --admin-sidebar-border: #e8e8e8;
  --admin-sidebar-nav-fg: rgba(0, 0, 0, 0.72);
  --admin-sidebar-nav-icon: rgba(0, 0, 0, 0.45);
  --admin-sidebar-nav-active-fg: #1677ff;
  --admin-sidebar-nav-active-icon: #1677ff;
  --admin-sidebar-nav-active-pill: #e6f4ff;
  --admin-sidebar-nav-hover-bg: rgba(0, 0, 0, 0.04);
  --admin-main-bg: #e8f2fc;
  --admin-main-bg-mid: #eef6fd;
  --admin-main-bg-soft: #f2f7fc;
  --brand-gradient: linear-gradient(135deg, var(--primary-active) 0%, var(--primary) 50%, var(--primary-hover) 100%);
  background: var(--admin-main-bg);
  background-image: linear-gradient(180deg, var(--admin-main-bg) 0%, var(--admin-main-bg-mid) 42%, var(--admin-main-bg-soft) 100%);
  height: 100%;
  margin: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* 一屏布局：仅主内容区滚动，侧栏与顶栏固定 */
body.page-admin .app-shell {
  flex: 1 1 0%;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  width: 100%;
  max-width: 100%;
  margin: 0;
  box-sizing: border-box;
}

body.page-admin .admin-layout {
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

/*
 * 少数页面把整块 admin-layout 包在 app-shell 下一层的 .grid 里。
 * 该包装层默认高度随内容增高，会使内部 main 无法形成「定高 + overflow」从而无法纵向滚动。
 */
body.page-admin .app-shell > .grid {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-rows: minmax(0, 1fr);
}

body.page-admin .app-shell > .grid > .admin-layout {
  min-height: 0;
}

body.page-admin .admin-layout-workspace {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  flex: 1;
  overflow: hidden;
  padding: 8px 24px 0;
  gap: 10px;
  box-sizing: border-box;
  background: transparent;
}

body.page-admin .admin-layout-main {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior-y: contain;
  -webkit-overflow-scrolling: touch;
}

/* ========== 管理后台 · 数据看板 v2（主栏 + 侧栏）========== */
body.page-admin .admin-dash-v2 {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 8px 24px;
  box-sizing: border-box;
}

body.page-admin .admin-dash-v2-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 312px;
  gap: 20px;
  align-items: start;
}

/* 数据看板：首行按内容高度；第二行营销+销售占比可等高；第三行趋势+邀请榜 */
body.page-admin .admin-dash-v2-layout--dashboard {
  align-items: start;
}

body.page-admin .admin-dash-v2-layout--dashboard > .admin-dash-v2-card--realtime-sync {
  grid-column: 1;
  grid-row: 1;
  margin-bottom: 0;
  min-width: 0;
  height: auto;
  display: block;
  box-sizing: border-box;
}

body.page-admin .admin-dash-v2-layout--dashboard > .admin-dash-v2-card--profile-sync {
  grid-column: 2;
  grid-row: 1;
  margin-bottom: 0;
  min-width: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
}

body.page-admin .admin-dash-v2-layout--dashboard > .admin-dash-v2-card--profile-sync .admin-dash-v2-profile-pro {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

body.page-admin .admin-dash-v2-layout--dashboard > .admin-dash-v2-card--profile-sync .admin-dash-v2-profile-pro__foot {
  margin-top: auto;
}

body.page-admin .admin-dash-v2-layout--dashboard > .admin-dash-v2-card--marketing-sync {
  grid-column: 1;
  grid-row: 2;
  margin-bottom: 0;
  min-width: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
}

body.page-admin .admin-dash-v2-layout--dashboard > .admin-dash-v2-card--marketing-sync .admin-dash-v2-mk-tray {
  margin-top: auto;
  flex-shrink: 0;
}

body.page-admin .admin-dash-v2-layout--dashboard > .admin-dash-v2-card--realtime-sync .admin-dash-v2-rt6 {
  margin-bottom: 0;
}

body.page-admin .admin-dash-v2-layout--dashboard > .admin-dash-v2-card--sales-sync {
  grid-column: 2;
  grid-row: 2;
  margin-bottom: 0;
  min-width: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
}

body.page-admin .admin-dash-v2-layout--dashboard > .admin-dash-v2-card--sales-sync .admin-dash-v2-donut-wrap {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
}

body.page-admin .admin-dash-v2-layout--dashboard > .admin-dash-v2-card--trend-sync {
  grid-column: 1;
  grid-row: 3;
  margin-bottom: 0;
  min-width: 0;
}

body.page-admin .admin-dash-v2-layout--dashboard > .admin-dash-v2-card--invite-sync {
  grid-column: 2;
  grid-row: 3;
  margin-bottom: 0;
  min-width: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
}

body.page-admin .admin-dash-v2-layout--dashboard > .admin-dash-v2-card--invite-sync .admin-dash-v2-aside-empty {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
}

body.page-admin .admin-dash-v2-layout--dashboard > .admin-dash-v2-card--invite-sync .admin-dash-v2-invite-rank {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

body.page-admin .admin-dash-v2-invite-rank__full {
  flex: 1 1 auto;
  min-height: 0;
  max-height: min(52vh, 420px);
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

body.page-admin .admin-dash-v2-invite-viewall {
  flex-shrink: 0;
}

@media (max-width: 1100px) {
  body.page-admin .admin-dash-v2-layout {
    grid-template-columns: 1fr;
  }

  body.page-admin .admin-dash-v2-layout--dashboard > .admin-dash-v2-card--realtime-sync,
  body.page-admin .admin-dash-v2-layout--dashboard > .admin-dash-v2-card--profile-sync,
  body.page-admin .admin-dash-v2-layout--dashboard > .admin-dash-v2-card--marketing-sync,
  body.page-admin .admin-dash-v2-layout--dashboard > .admin-dash-v2-card--sales-sync,
  body.page-admin .admin-dash-v2-layout--dashboard > .admin-dash-v2-card--trend-sync,
  body.page-admin .admin-dash-v2-layout--dashboard > .admin-dash-v2-card--invite-sync {
    grid-column: 1;
    grid-row: auto;
    height: auto;
    align-self: stretch;
  }

  body.page-admin .admin-dash-v2-layout--dashboard > .admin-dash-v2-card--profile-sync .admin-dash-v2-profile-pro__foot {
    margin-top: 0;
  }

  body.page-admin .admin-dash-v2-layout--dashboard > .admin-dash-v2-card--sales-sync .admin-dash-v2-donut-wrap {
    flex: 0 1 auto;
  }

  body.page-admin .admin-dash-v2-layout--dashboard > .admin-dash-v2-card--invite-sync .admin-dash-v2-aside-empty {
    flex: 0 1 auto;
    display: block;
  }
}

body.page-admin .admin-dash-v2-card {
  background: #fff;
  border-radius: 16px;
  border: none;
  box-shadow:
    0 2px 4px rgba(22, 88, 140, 0.04),
    0 12px 40px rgba(22, 88, 140, 0.1);
  padding: 22px 24px;
  margin-bottom: 20px;
  box-sizing: border-box;
}

body.page-admin .admin-dash-v2-card--aside {
  margin-bottom: 16px;
  padding: 22px 20px;
}

body.page-admin .admin-dash-v2-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 0;
}

body.page-admin .admin-dash-v2-card__title {
  margin: 0;
  font-size: 17px;
  font-weight: 800;
  color: #1a1f2e;
  letter-spacing: -0.02em;
}

body.page-admin .admin-dash-v2-card__title--sm {
  font-size: 15px;
}

body.page-admin .admin-dash-v2-card__meta {
  font-size: 12px;
  color: #8c9aad;
  font-weight: 650;
  white-space: normal;
  line-height: 1.35;
}

body.page-admin .admin-dash-v2-live-clock {
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: #5c6b7f;
  letter-spacing: 0.02em;
}

body.page-admin .admin-dash-v2-card__link {
  font-size: 13px;
  font-weight: 750;
  color: #1677ff;
  text-decoration: none;
  padding: 6px 12px;
  border-radius: 8px;
  border: none;
  background: rgba(22, 119, 255, 0.06);
  transition: background 0.15s ease;
}

body.page-admin .admin-dash-v2-card__link:hover {
  text-decoration: none;
  background: rgba(22, 119, 255, 0.12);
}

body.page-admin .admin-dash-v2-card__link:focus-visible {
  outline: 2px solid rgba(22, 119, 255, 0.45);
  outline-offset: 2px;
}

body.page-admin .admin-dash-v2-pill {
  font-size: 12px;
  font-weight: 700;
  color: #1677ff;
  background: #e6f4ff;
  padding: 5px 12px;
  border-radius: 999px;
  border: none;
}

body.page-admin .admin-dash-v2-rt6 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

@media (min-width: 720px) {
  body.page-admin .admin-dash-v2-rt6 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 900px) {
  body.page-admin .admin-dash-v2-rt6--eight {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

body.page-admin .admin-dash-v2-rt6__cell {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
  padding: 14px 12px 12px;
  border-radius: 12px;
  background: linear-gradient(180deg, #fbfdff 0%, #f5f9ff 100%);
  border: none;
  box-shadow: 0 2px 8px rgba(22, 88, 140, 0.05);
}

body.page-admin .admin-dash-v2-rt6__label {
  display: block;
  order: 2;
  font-size: 12px;
  color: #7a8799;
  font-weight: 650;
  margin-top: 6px;
  line-height: 1.35;
}

body.page-admin .admin-dash-v2-rt6__val {
  display: block;
  order: 1;
  font-size: 22px;
  font-weight: 850;
  color: #1a1f2e;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

body.page-admin .admin-dash-v2-rt6__sub {
  display: block;
  order: 3;
  margin-top: 4px;
  font-size: 11px;
  color: #9aa7b8;
  font-weight: 600;
}

body.page-admin .admin-dash-v2-rt6__cell--chart {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 14px 12px;
  background: linear-gradient(145deg, #f8fbff 0%, #ffffff 55%, #fafdff 100%);
  box-shadow:
    0 2px 8px rgba(22, 88, 140, 0.05),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

body.page-admin .admin-dash-v2-rt6__chart-main {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  min-width: 0;
  flex: 1 1 auto;
}

body.page-admin .admin-dash-v2-rt6__cell--chart .admin-dash-v2-rt6__label {
  order: 1;
  margin-top: 0;
  margin-bottom: 4px;
}

body.page-admin .admin-dash-v2-rt6__cell--chart .admin-dash-v2-rt6__val {
  order: 2;
  font-size: 24px;
}

body.page-admin .admin-dash-v2-rt6__cell--chart .admin-dash-v2-trend {
  order: 3;
  margin-top: 4px;
}

body.page-admin .admin-dash-v2-rt6__cell--chart .admin-dash-v2-spark {
  flex: 0 0 auto;
  max-width: 42%;
  height: auto;
}

body.page-admin .admin-dash-v2-hero2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

@media (max-width: 720px) {
  body.page-admin .admin-dash-v2-hero2 {
    grid-template-columns: 1fr;
  }
}

body.page-admin .admin-dash-v2-hero2__item {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  border-radius: 12px;
  border: none;
  background: linear-gradient(145deg, #f8fbff 0%, #ffffff 55%, #fafdff 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

body.page-admin .admin-dash-v2-hero2__text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  flex: 1;
}

body.page-admin .admin-dash-v2-hero2__label {
  display: block;
  font-size: 12px;
  color: #7a8799;
  font-weight: 700;
  margin-bottom: 6px;
}

body.page-admin .admin-dash-v2-hero2__val {
  display: block;
  font-size: 24px;
  font-weight: 850;
  color: #1a1f2e;
  letter-spacing: -0.03em;
}

body.page-admin .admin-dash-v2-trend {
  display: block;
  margin-top: 8px;
  font-size: 12px;
  font-weight: 700;
}

body.page-admin .admin-dash-v2-trend--up {
  color: #52c41a;
}

body.page-admin .admin-dash-v2-trend--up::before {
  content: "↑ ";
}

body.page-admin .admin-dash-v2-trend--down {
  color: #ff4d4f;
}

body.page-admin .admin-dash-v2-trend--down::before {
  content: "↓ ";
}

body.page-admin .admin-dash-v2-trend--muted {
  color: #b0b8c4;
}

body.page-admin .admin-dash-v2-trend--muted::before {
  content: "";
}

body.page-admin .admin-dash-v2-spark {
  flex-shrink: 0;
  align-self: flex-end;
  opacity: 1;
  filter: drop-shadow(0 2px 6px rgba(22, 119, 255, 0.08));
}

body.page-admin .admin-dash-v2-daystrip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 18px;
  margin-top: 16px;
  padding: 12px 16px;
  border-radius: 12px;
  background: linear-gradient(90deg, #e8f4ff 0%, #f0f7ff 100%);
  border: none;
  font-size: 12px;
  color: #5c6b7f;
  font-weight: 650;
}

body.page-admin .admin-dash-v2-daystrip strong {
  margin-left: 4px;
  color: #1a1f2e;
  font-weight: 800;
}

body.page-admin .admin-dash-v2-daystrip__tag {
  font-weight: 800;
  color: #1677ff;
}

body.page-admin .admin-dash-v2-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 14px;
  padding: 12px 16px;
  border-radius: 12px;
  background: linear-gradient(90deg, #e6f4ff 0%, #f0f9ff 100%);
  border: none;
  margin-bottom: 16px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

body.page-admin .admin-dash-v2-banner p {
  margin: 0;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  color: #0958d9;
  font-weight: 650;
  flex: 1;
  min-width: 200px;
  line-height: 1.5;
}

body.page-admin .admin-dash-v2-banner__lead {
  display: inline-flex;
  margin-top: 1px;
  color: #1677ff;
  flex-shrink: 0;
}

body.page-admin .admin-dash-v2-banner a {
  font-size: 13px;
  font-weight: 800;
  color: #1677ff;
  text-decoration: none;
  white-space: nowrap;
  padding: 6px 12px;
  border-radius: 8px;
  background: #fff;
  border: none;
  box-shadow: 0 1px 3px rgba(22, 88, 140, 0.08);
}

body.page-admin .admin-dash-v2-banner a:hover {
  background: #f0f7ff;
}

/* 营销数据卡片（五列 + 底栏四格） */
body.page-admin .admin-dash-v2-banner--mk {
  flex-wrap: nowrap;
}

body.page-admin .admin-dash-v2-banner--mk .admin-dash-v2-banner__marquee-outer {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, #000 10px, #000 calc(100% - 10px), transparent);
}

body.page-admin .admin-dash-v2-banner--mk .admin-dash-v2-banner__marquee {
  display: block;
  width: max-content;
  max-width: none;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 650;
  color: #0958d9;
  will-change: transform;
  animation: admin-dash-v2-banner-marquee-once var(--marquee-duration, 48s) linear infinite;
}

body.page-admin .admin-dash-v2-banner--mk .admin-dash-v2-banner__marquee-text {
  display: inline-block;
  padding-right: 3rem;
}

@keyframes admin-dash-v2-banner-marquee-once {
  0% {
    transform: translateX(100%);
  }

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

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

@media (prefers-reduced-motion: reduce) {
  body.page-admin .admin-dash-v2-banner--mk .admin-dash-v2-banner__marquee {
    animation: none;
    transform: none;
  }
}

body.page-admin .admin-dash-v2-mk5 {
  display: grid;
  grid-template-columns: 1.35fr repeat(4, minmax(0, 1fr));
  gap: 12px 16px;
  padding-bottom: 18px;
  margin-bottom: 18px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

body.page-admin .admin-dash-v2-mk5__col {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
  padding: 12px 10px 8px;
  border-radius: 12px;
  background: #fafbfc;
  box-shadow: 0 1px 4px rgba(22, 88, 140, 0.05);
}

body.page-admin .admin-dash-v2-mk5__col--lead {
  padding: 16px 14px 14px;
  background: linear-gradient(180deg, #fffaf5 0%, #fff7ed 100%);
  box-shadow: 0 2px 10px rgba(230, 126, 34, 0.08);
}

body.page-admin .admin-dash-v2-mk5__lead-top {
  display: flex;
  align-items: center;
  gap: 8px;
}

body.page-admin .admin-dash-v2-mk5__dots {
  display: inline-flex;
  gap: 3px;
}

body.page-admin .admin-dash-v2-mk5__dots i {
  display: block;
  width: 6px;
  height: 6px;
  border-radius: 2px;
  background: linear-gradient(135deg, #fa8c16, #ffc069);
}

body.page-admin .admin-dash-v2-mk5__lead-label {
  font-size: 13px;
  font-weight: 800;
  color: #595959;
}

body.page-admin .admin-dash-v2-mk5__hero {
  margin: 0;
  font-size: 14px;
  font-weight: 650;
  color: #8c8c8c;
  line-height: 1.35;
}

body.page-admin .admin-dash-v2-mk5__hero strong {
  font-size: 28px;
  font-weight: 850;
  color: #fa8c16;
  letter-spacing: -0.03em;
}

body.page-admin .admin-dash-v2-mk5__k {
  font-size: 12px;
  color: #8c8c8c;
  font-weight: 700;
  line-height: 1.3;
}

body.page-admin .admin-dash-v2-mk5__v {
  margin: 0;
  font-size: 24px;
  font-weight: 850;
  color: #1a1f2e;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

body.page-admin .admin-dash-v2-mk5__hint {
  font-size: 11px;
  color: #bfbfbf;
  font-weight: 650;
}

body.page-admin .admin-dash-v2-mk-tray {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px 10px;
}

body.page-admin .admin-dash-v2-mk-tray__item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-width: 0;
  padding: 4px 2px;
}

body.page-admin .admin-dash-v2-mk-tray__icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
}

body.page-admin .admin-dash-v2-mk-tray__icon svg {
  display: block;
}

body.page-admin .admin-dash-v2-mk-tray__icon--blue {
  background: linear-gradient(135deg, #1677ff, #4096ff);
}

body.page-admin .admin-dash-v2-mk-tray__icon--green {
  background: linear-gradient(135deg, #52c41a, #95de64);
}

body.page-admin .admin-dash-v2-mk-tray__icon--orange {
  background: linear-gradient(135deg, #fa8c16, #ffc069);
}

body.page-admin .admin-dash-v2-mk-tray__icon--red {
  background: linear-gradient(135deg, #ff4d4f, #ff7875);
}

body.page-admin .admin-dash-v2-mk-tray__text {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

body.page-admin .admin-dash-v2-mk-tray__title {
  font-size: 13px;
  font-weight: 800;
  color: #262626;
}

body.page-admin .admin-dash-v2-mk-tray__sub {
  font-size: 12px;
  color: #8c8c8c;
  font-weight: 650;
  line-height: 1.45;
  word-break: break-word;
}

body.page-admin .admin-dash-v2-mk-tray__em {
  color: #1677ff;
  font-weight: 800;
}

@media (max-width: 1100px) {
  body.page-admin .admin-dash-v2-mk5 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body.page-admin .admin-dash-v2-mk5__col--lead {
    grid-column: 1 / -1;
  }

  body.page-admin .admin-dash-v2-mk-tray {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  body.page-admin .admin-dash-v2-mk5 {
    grid-template-columns: 1fr;
  }

  body.page-admin .admin-dash-v2-mk-tray {
    grid-template-columns: 1fr;
  }

  body.page-admin .admin-dash-v2-banner--mk {
    flex-wrap: wrap;
  }
}

body.page-admin .admin-dash-v2-m5 {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}

body.page-admin .admin-dash-v2-m5__cell {
  padding: 12px 14px;
  border-radius: 12px;
  border: none;
  background: #fbfdff;
  box-shadow: 0 1px 4px rgba(22, 88, 140, 0.04);
}

body.page-admin .admin-dash-v2-m5__label {
  display: block;
  font-size: 11px;
  color: #8c9aad;
  font-weight: 700;
  margin-bottom: 8px;
  line-height: 1.35;
}

body.page-admin .admin-dash-v2-m5__val {
  font-size: 18px;
  font-weight: 850;
  color: #1a1f2e;
}

body.page-admin .admin-dash-v2-chips {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}

body.page-admin .admin-dash-v2-chip {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 14px;
  border-radius: 12px;
  background: #f7fafc;
  border: none;
  box-shadow: 0 1px 3px rgba(22, 88, 140, 0.05);
}

body.page-admin .admin-dash-v2-chip__k {
  font-size: 11px;
  color: #8c9aad;
  font-weight: 700;
}

body.page-admin .admin-dash-v2-chip__v {
  font-size: 14px;
  font-weight: 800;
  color: #1a1f2e;
}

body.page-admin .admin-dash-v2-tablewrap {
  border-radius: 12px;
  border: none;
  box-shadow: 0 1px 4px rgba(22, 88, 140, 0.06);
  overflow: hidden;
}

body.page-admin .admin-dash-v2-table {
  border-collapse: collapse;
}

body.page-admin .admin-dash-v2-table th,
body.page-admin .admin-dash-v2-table td {
  border-left: none;
  border-right: none;
  border-top: none;
  border-bottom: 1px solid #eef2f7;
}

body.page-admin .admin-dash-v2-table thead th {
  border-bottom: 1px solid #e4eaf2;
}

body.page-admin .admin-dash-v2-table tbody tr:last-child td {
  border-bottom: none;
}

body.page-admin .admin-dash-v2-table th {
  font-size: 12px;
  color: #5c6b7f;
  background: #f7fafc;
  font-weight: 750;
  padding: 12px 14px;
}

body.page-admin .admin-dash-v2-table td {
  font-size: 13px;
  padding: 11px 14px;
  color: #2f3a4a;
}

body.page-admin .admin-dash-v2-hint {
  margin: 14px 0 0;
  font-size: 12px;
  color: #8c9aad;
  line-height: 1.6;
}

/* 数据看板：管理员资料卡（参考排版：身份区 + 修改信息、登录 IP/时间、三列指标） */
body.page-admin .admin-dash-v2-profile-pro {
  display: flex;
  flex-direction: column;
  gap: 0;
  min-height: 0;
}

body.page-admin .admin-dash-v2-profile-pro__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

body.page-admin .admin-dash-v2-profile-pro__identity {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-width: 0;
  flex: 1;
}

body.page-admin .admin-dash-v2-profile-pro__avatar {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: linear-gradient(135deg, #1677ff, #4096ff);
  color: #fff;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

body.page-admin .admin-dash-v2-profile-pro__avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

body.page-admin .admin-dash-v2-profile-pro__letter {
  font-size: 20px;
  font-weight: 800;
  line-height: 1;
}

body.page-admin .admin-dash-v2-profile-pro__titles {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

body.page-admin .admin-dash-v2-profile-pro__role {
  font-size: 17px;
  font-weight: 800;
  color: #1a1f2e;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

body.page-admin .admin-dash-v2-profile-pro__account {
  font-size: 13px;
  font-weight: 650;
  color: #8c9aad;
  line-height: 1.2;
}

body.page-admin .admin-dash-v2-profile-pro__verify {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 2px;
  font-size: 12px;
  font-weight: 750;
  color: #94a3b8;
}

body.page-admin .admin-dash-v2-profile-pro__verify--on {
  color: #fa8c16;
}

body.page-admin .admin-dash-v2-profile-pro__verify .admin-dash-v2-profile-pro__star {
  color: #cbd5e1;
}

body.page-admin .admin-dash-v2-profile-pro__verify--on .admin-dash-v2-profile-pro__star {
  color: #ffc069;
}

body.page-admin .admin-dash-v2-profile-pro__edit {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: 10px;
  border: 1px solid #e4eaf2;
  background: #fff;
  font-size: 13px;
  font-weight: 700;
  color: #1a1f2e;
  text-decoration: none;
  white-space: nowrap;
  transition:
    background 0.12s ease,
    border-color 0.12s ease,
    color 0.12s ease;
}

body.page-admin .admin-dash-v2-profile-pro__edit:hover {
  background: #f7fafc;
  border-color: #d0dbe8;
  color: #1677ff;
}

body.page-admin .admin-dash-v2-profile-pro__edit-icon {
  display: flex;
  color: #5c6b7f;
}

body.page-admin .admin-dash-v2-profile-pro__session {
  margin-bottom: 14px;
}

body.page-admin .admin-dash-v2-profile-pro__ip {
  margin: 0 0 6px;
  font-size: 12px;
  font-weight: 650;
  color: #8c8c8c;
  line-height: 1.45;
}

body.page-admin .admin-dash-v2-profile-pro__time {
  margin: 0;
  font-size: 13px;
  font-weight: 650;
  color: #1a1f2e;
  line-height: 1.45;
}

body.page-admin .admin-dash-v2-profile-pro__time strong {
  font-weight: 800;
}

body.page-admin .admin-dash-v2-profile-pro__rule {
  border: none;
  border-top: 1px solid #eef2f6;
  margin: 0 0 16px;
  padding: 0;
  height: 0;
}

body.page-admin .admin-dash-v2-profile-pro__foot {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px 10px;
  text-align: center;
}

body.page-admin .admin-dash-v2-profile-pro__col {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

body.page-admin .admin-dash-v2-profile-pro__val {
  font-size: 1.125rem;
  font-weight: 800;
  color: #1a1f2e;
  letter-spacing: -0.02em;
  line-height: 1.2;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.page-admin .admin-dash-v2-profile-pro__lbl {
  font-size: 11px;
  font-weight: 650;
  color: #94a3b8;
  line-height: 1.25;
}

@media (max-width: 360px) {
  body.page-admin .admin-dash-v2-profile-pro__head {
    flex-wrap: wrap;
  }

  body.page-admin .admin-dash-v2-profile-pro__edit {
    width: 100%;
    justify-content: center;
  }
}

body.page-admin .admin-dash-v2-profile {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

body.page-admin .admin-dash-v2-profile__avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1677ff, #4096ff);
  color: #fff;
  font-size: 20px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

body.page-admin .admin-dash-v2-profile__main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

body.page-admin .admin-dash-v2-profile__name-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

body.page-admin .admin-dash-v2-profile__name {
  font-size: 16px;
  font-weight: 800;
  color: #1a1f2e;
}

body.page-admin .admin-dash-v2-profile__badge {
  font-size: 11px;
  font-weight: 800;
  color: #d48806;
  background: linear-gradient(180deg, #fff7e6 0%, #fffbe6 100%);
  border: none;
  padding: 2px 8px;
  border-radius: 6px;
  box-shadow: 0 1px 2px rgba(212, 136, 6, 0.12);
}

body.page-admin .admin-dash-v2-profile__btn {
  align-self: flex-start;
  padding: 4px 12px;
  font-size: 12px;
  min-height: 30px;
}

body.page-admin .admin-dash-v2-profile__dl {
  margin: 0;
  display: grid;
  gap: 8px;
}

body.page-admin .admin-dash-v2-profile__dl > div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 12px;
  padding: 6px 0;
  border-top: 1px solid #f0f0f0;
}

body.page-admin .admin-dash-v2-profile__dl > div:first-of-type {
  border-top: 0;
  padding-top: 0;
}

body.page-admin .admin-dash-v2-profile__dl dt {
  margin: 0;
  color: #8c8c8c;
  font-weight: 650;
}

body.page-admin .admin-dash-v2-profile__dl dd {
  margin: 0;
  font-weight: 750;
  color: #262626;
  text-align: right;
}

body.page-admin .admin-dash-v2-donut-wrap {
  display: flex;
  justify-content: center;
  padding: 8px 0 4px;
}

body.page-admin .admin-dash-v2-donut-ring {
  width: 136px;
  height: 136px;
  border-radius: 50%;
  position: relative;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.65),
    0 8px 24px rgba(22, 88, 140, 0.12);
}

body.page-admin .admin-dash-v2-donut-hole {
  position: absolute;
  inset: 24%;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.06);
}

body.page-admin .admin-dash-v2-donut-legend {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

body.page-admin .admin-dash-v2-donut-legend li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #595959;
}

body.page-admin .admin-dash-v2-donut-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

body.page-admin .admin-dash-v2-donut-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.page-admin .admin-dash-v2-donut-pct {
  font-weight: 800;
  color: #141414;
}

body.page-admin .admin-dash-v2-aside-empty {
  margin: 0;
  font-size: 13px;
}

body.page-admin .admin-dash-v2-mini-rank {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

body.page-admin .admin-dash-v2-mini-rank li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: none;
  font-size: 13px;
}

body.page-admin .admin-dash-v2-mini-rank li:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

body.page-admin .admin-dash-v2-mini-rank__n {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: #f5f5f5;
  font-size: 12px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #595959;
  flex-shrink: 0;
}

body.page-admin .admin-dash-v2-mini-rank__name {
  flex: 1;
  min-width: 0;
  font-weight: 700;
  color: #262626;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.page-admin .admin-dash-v2-mini-rank__cnt {
  font-weight: 800;
  color: #1677ff;
}

body.page-admin .admin-topbar {
  flex-shrink: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px 16px;
  min-height: 56px;
  padding: 0 18px;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 14px;
  box-shadow: 0 4px 18px rgba(15, 23, 42, 0.08);
}

body.page-admin .admin-topbar-menu-btn {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid #d9d9d9;
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
}

body.page-admin .admin-topbar-menu-btn span {
  display: block;
  width: 18px;
  height: 2px;
  flex: 0 0 2px;
  min-height: 2px;
  max-height: 2px;
  box-sizing: border-box;
  border-radius: 1px;
  background: #262626;
}

body.page-admin .admin-topbar-title {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

body.page-admin .admin-topbar-title-text {
  font-size: 16px;
  font-weight: 750;
  color: #262626;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

body.page-admin .admin-topbar-right {
  display: flex;
  align-items: center;
  gap: 4px;
  justify-self: end;
  min-width: 0;
}

body.page-admin .admin-topbar-notify {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: #595959;
  text-decoration: none;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s ease, color 0.15s ease;
}

body.page-admin .admin-topbar-notify:hover {
  background: rgba(0, 0, 0, 0.04);
  color: var(--primary);
}

body.page-admin .admin-topbar-user-root {
  position: relative;
  flex-shrink: 0;
}

body.page-admin .admin-topbar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 4px 4px 4px 8px;
  border-radius: 12px;
  transition: background 0.15s ease;
  margin: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  font: inherit;
  color: inherit;
  text-align: left;
  box-sizing: border-box;
}

body.page-admin .admin-topbar-user:hover {
  background: rgba(0, 0, 0, 0.03);
}

body.page-admin .admin-topbar-user:focus-visible {
  outline: 2px solid rgba(22, 119, 255, 0.45);
  outline-offset: 2px;
}

body.page-admin .admin-topbar-user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-active) 100%);
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  flex-shrink: 0;
  overflow: hidden;
}

body.page-admin .admin-topbar-user-avatar-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}

body.page-admin .admin-topbar-user-chevron {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #bfbfbf;
  flex-shrink: 0;
  margin-right: 2px;
}

body.page-admin .admin-topbar-user-chevron svg {
  display: block;
  transition: transform 0.18s ease;
}

body.page-admin .admin-topbar-user-root.is-open .admin-topbar-user-chevron svg {
  transform: rotate(180deg);
}

body.page-admin .admin-topbar-user-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

body.page-admin .admin-topbar-user-name {
  font-size: 14px;
  font-weight: 800;
  color: #262626;
  line-height: 1.2;
}

body.page-admin .admin-topbar-user-role {
  font-size: 12px;
  font-weight: 600;
  color: #8c8c8c;
  line-height: 1.2;
}

body.page-admin .admin-topbar-user-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 80;
  min-width: 152px;
  padding: 6px;
  margin: 0;
  background: #fff;
  border-radius: 12px;
  box-shadow:
    0 4px 14px rgba(15, 23, 42, 0.1),
    0 0 0 1px rgba(15, 23, 42, 0.05);
  box-sizing: border-box;
}

body.page-admin .admin-topbar-user-menu[hidden] {
  display: none !important;
}

body.page-admin .admin-topbar-user-root.is-open .admin-topbar-user-menu {
  display: block !important;
}

body.page-admin .admin-topbar-user-menu__item {
  display: block;
  width: 100%;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 650;
  color: #262626;
  text-decoration: none;
  box-sizing: border-box;
  transition: background 0.12s ease, color 0.12s ease;
}

body.page-admin .admin-topbar-user-menu__item:hover {
  background: rgba(0, 0, 0, 0.04);
  color: var(--primary);
  text-decoration: none;
}

body.page-admin .admin-topbar-user-menu__item--danger {
  color: #ff4d4f;
  font-weight: 750;
}

body.page-admin .admin-topbar-user-menu__item--danger:hover {
  background: rgba(255, 77, 79, 0.08);
  color: #cf1322;
}

body.page-admin .admin-nav-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 650;
  text-decoration: none;
  color: inherit;
  box-sizing: border-box;
  transition:
    background 0.15s ease,
    color 0.15s ease;
}

body.page-admin .admin-nav-link-icon {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  overflow: visible;
  opacity: 1;
  color: inherit;
}

body.page-admin .admin-nav-link:not(.admin-nav-link--sub) .admin-nav-link-icon svg,
body.page-admin .admin-nav-group-heading .admin-nav-link-icon svg {
  width: 20px;
  height: 20px;
  min-width: 20px;
  min-height: 20px;
  display: block;
  overflow: visible;
  flex-shrink: 0;
}

body.page-admin .admin-nav-link-icon svg [stroke] {
  stroke: currentColor;
}

body.page-admin .admin-nav-link-icon svg [fill]:not([fill="none"]) {
  fill: currentColor;
}

body.page-admin .admin-nav-link-text {
  flex: 1;
  min-width: 0;
  text-align: left;
}

body.page-admin .admin-nav-group {
  display: flex;
  flex-direction: column;
  gap: 2px;
  width: 100%;
}

body.page-admin .admin-nav-group-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  margin: 0;
  padding: 10px 12px 8px;
  border: none;
  border-radius: 10px;
  background: transparent;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  text-align: left;
  color: rgba(15, 23, 42, 0.88);
  cursor: pointer;
  box-sizing: border-box;
  transition:
    background 0.15s ease,
    color 0.15s ease;
}

body.page-admin .admin-nav-group-heading:hover {
  background: rgba(0, 0, 0, 0.04);
  color: rgba(15, 23, 42, 0.92);
}

body.page-admin .admin-nav-group-heading .admin-nav-link-icon {
  color: rgba(15, 23, 42, 0.55);
}

body.page-admin .admin-nav-group-chevron {
  display: inline-flex;
  margin-left: auto;
  flex-shrink: 0;
  color: rgba(15, 23, 42, 0.42);
  transition: transform 0.18s ease;
}

body.page-admin .admin-nav-group-heading[aria-expanded="false"] .admin-nav-group-chevron {
  transform: rotate(-90deg);
}

body.page-admin .admin-nav-group-panel {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 0 0 4px;
}

body.page-admin .admin-nav-group-panel[hidden] {
  display: none !important;
}

body.page-admin .admin-nav-group--expanded .admin-nav-group-panel {
  display: flex !important;
}

body.page-admin .admin-nav-group-title {
  flex: 1;
  min-width: 0;
  text-align: left;
  line-height: 1.25;
}

body.page-admin .admin-nav-link--sub {
  padding-left: 6px;
  color: rgba(15, 23, 42, 0.48);
  font-weight: 600;
}

body.page-admin .admin-nav-link--sub:hover {
  color: rgba(15, 23, 42, 0.72);
}

body.page-admin .admin-nav-link-icon--sub {
  display: inline-flex;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  opacity: 1;
  color: rgba(15, 23, 42, 0.35);
}

body.page-admin .admin-nav-link--sub:hover .admin-nav-link-icon--sub {
  color: rgba(22, 119, 255, 0.55);
}

body.page-admin .admin-nav-link-icon--sub::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.95;
}

body.page-admin .admin-nav-link--sub.active {
  color: var(--admin-sidebar-nav-active-fg, #1677ff);
}

body.page-admin .admin-nav-link--sub.active .admin-nav-link-icon--sub {
  color: var(--admin-sidebar-nav-active-icon, #1677ff);
}

.announcements-feed {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.announcements-feed-item--link {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  margin: 0;
  padding: 0 0 18px;
  text-align: left;
  border: none;
  border-bottom: 1px solid var(--line, #e5e7eb);
  border-radius: 10px;
  background: transparent;
  font: inherit;
  color: inherit;
  cursor: pointer;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

.announcements-feed-item--link:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.announcements-feed-item--link:active {
  opacity: 0.94;
}

@media (hover: hover) {
  .announcements-feed-item--link:hover .announcements-feed-title {
    color: var(--primary, #2563eb);
  }
}

.announcements-feed-item__main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.announcements-feed-item__chev {
  flex-shrink: 0;
  align-self: center;
  width: 0.45em;
  height: 0.45em;
  margin-inline-end: 6px;
  margin-top: 2px;
  opacity: 0.42;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(-45deg);
}

.announcements-feed-title {
  margin: 0 0 6px;
  font-size: 17px;
  font-weight: 800;
  display: block;
}

.announcements-feed-meta {
  margin: 0 0 8px;
  font-size: 12px;
}

.announcements-feed-excerpt {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.announcements-feed-body {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text);
}

.announcements-feed-body p {
  margin: 0 0 0.65em;
}

.announcements-detail-modal__meta {
  margin: 0 0 2px;
  font-size: 12px;
  text-align: center;
  color: var(--muted, #94a3b8);
}

@media (min-width: 769px) {
  body.page-admin .app-shell {
    padding: 0;
  }

  body.page-admin .admin-layout {
    display: grid;
    grid-template-columns: 232px minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr);
    gap: 0;
    align-items: stretch;
    margin: 0;
    max-width: 100%;
    border-radius: 0;
    border: none;
    background: transparent;
    box-shadow: none;
  }

  body.page-admin .admin-layout-sidebar {
    position: sticky;
    top: 0;
    align-self: stretch;
    min-height: 0;
    height: 100%;
    max-height: none;
    overflow-x: hidden;
    overflow-y: visible;
    scrollbar-width: none;
    -ms-overflow-style: none;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
    gap: 8px;
    padding: 16px 12px 20px;
    border: 0;
    border-radius: 0;
    border-right: 1px solid var(--admin-sidebar-border);
    background: var(--admin-sidebar-bg);
    box-shadow: none;
  }

  body.page-admin .admin-layout-sidebar::-webkit-scrollbar {
    width: 0;
    height: 0;
  }

  body.page-admin .admin-layout-sidebar-brand {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 8px 16px;
    margin-bottom: 4px;
    border-bottom: 1px solid var(--admin-sidebar-border);
  }

  body.page-admin .admin-layout-sidebar-brand-main {
    flex: 1;
    min-width: 0;
  }

  body.page-admin .admin-layout-sidebar-brand-main:hover .admin-layout-sidebar-platform {
    color: var(--primary);
  }

  body.page-admin .admin-layout-sidebar-mark.brand-mark {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    box-shadow: 0 2px 10px rgba(22, 119, 255, 0.22);
  }

  body.page-admin .admin-layout-sidebar-mark.brand-mark svg {
    width: 26px;
    height: 26px;
  }

  body.page-admin .admin-layout-sidebar-platform {
    color: #262626;
    font-size: 15px;
    font-weight: 800;
    letter-spacing: 0.02em;
  }

  body.page-admin .admin-layout-sidebar-sub {
    display: block;
    font-size: 11px;
    font-weight: 650;
    color: #8c8c8c;
    line-height: 1.25;
  }

  body.page-admin .admin-layout-sidebar-brand-main:hover .admin-layout-sidebar-sub {
    color: #595959;
  }

  body.page-admin .admin-layout-sidebar .admin-nav-shell {
    flex: 0 0 auto;
    margin-top: 0;
    margin-bottom: 0;
    overflow: visible;
  }

  body.page-admin .admin-layout-sidebar .admin-nav-drawer,
  body.page-admin .admin-layout-sidebar .admin-nav-drawer-panel {
    overflow: visible;
    max-height: none;
  }

  body.page-admin .admin-layout-workspace {
    min-height: 0;
    background: transparent;
  }

  body.page-admin .admin-layout-sidebar .admin-nav-links .admin-nav-account-link:first-of-type {
    border-top: 1px solid var(--admin-sidebar-border);
    margin-top: 12px;
    padding-top: 12px;
  }

  body.page-admin .admin-layout-sidebar .admin-nav-shell .admin-nav.admin-nav-links {
    gap: 4px;
    overflow-x: visible;
    overflow-y: visible;
    scrollbar-width: none;
    -ms-overflow-style: none;
    flex: 0 0 auto;
    max-height: none;
  }

  body.page-admin .admin-layout-sidebar .admin-nav-shell .admin-nav.admin-nav-links::-webkit-scrollbar {
    width: 0;
    height: 0;
  }

  body.page-admin .admin-layout-sidebar .admin-nav-shell .admin-nav-links .admin-nav-link {
    color: var(--admin-sidebar-nav-fg, rgba(0, 0, 0, 0.72));
    min-height: 42px;
  }

  body.page-admin .admin-layout-sidebar .admin-nav-shell .admin-nav-links .admin-nav-link-icon {
    color: var(--admin-sidebar-nav-icon, rgba(0, 0, 0, 0.45));
  }

  body.page-admin .admin-layout-sidebar .admin-nav-shell .admin-nav-links .admin-nav-link:hover {
    background: var(--admin-sidebar-nav-hover-bg, rgba(0, 0, 0, 0.04));
    color: var(--text);
  }

  body.page-admin .admin-layout-sidebar .admin-nav-shell .admin-nav-links .admin-nav-link:hover .admin-nav-link-icon {
    color: var(--primary);
  }

  body.page-admin .admin-layout-sidebar .admin-nav-shell .admin-nav-links .admin-nav-link.active {
    background: var(--admin-sidebar-nav-active-pill, #e6f4ff);
    color: var(--admin-sidebar-nav-active-fg, #1677ff);
    font-weight: 750;
    padding-right: 20px;
    box-shadow: none;
  }

  body.page-admin .admin-layout-sidebar .admin-nav-shell .admin-nav-links .admin-nav-link.active::after {
    content: "";
    position: absolute;
    top: 50%;
    right: 10px;
    width: 3px;
    height: 22px;
    margin-top: -11px;
    border-radius: 999px;
    background: var(--primary);
  }

  body.page-admin .admin-layout-sidebar .admin-nav-shell .admin-nav-links .admin-nav-link.active .admin-nav-link-icon {
    color: var(--admin-sidebar-nav-active-icon, #1677ff);
  }

  body.page-admin .admin-layout-sidebar .admin-nav-shell .admin-nav-links > .admin-nav-link:not(.admin-nav-link--sub) {
    color: rgba(15, 23, 42, 0.88);
  }

  body.page-admin .admin-layout-sidebar .admin-nav-shell .admin-nav-links > .admin-nav-link:not(.admin-nav-link--sub) .admin-nav-link-icon {
    color: rgba(15, 23, 42, 0.55);
  }

  body.page-admin .admin-layout-sidebar .admin-nav-shell .admin-nav-links .admin-nav-link--sub {
    color: rgba(15, 23, 42, 0.48);
    font-weight: 600;
  }

  body.page-admin .admin-layout-sidebar .admin-nav-shell .admin-nav-links .admin-nav-link--sub .admin-nav-link-icon--sub {
    color: rgba(15, 23, 42, 0.34);
  }

  body.page-admin .admin-layout-sidebar .admin-nav-shell .admin-nav-links .admin-nav-link--sub:hover {
    color: rgba(15, 23, 42, 0.74);
  }

  body.page-admin .admin-layout-sidebar .admin-nav-shell .admin-nav-links .admin-nav-link--sub:hover .admin-nav-link-icon--sub {
    color: rgba(22, 119, 255, 0.62);
  }

  body.page-admin .admin-layout-sidebar .admin-nav-shell .admin-nav-links .admin-nav-link--sub.active {
    color: var(--admin-sidebar-nav-active-fg, #1677ff);
  }

  body.page-admin .admin-layout-sidebar .admin-nav-shell .admin-nav-links .admin-nav-link--sub.active .admin-nav-link-icon--sub {
    color: var(--admin-sidebar-nav-active-icon, #1677ff);
  }

  body.page-admin .admin-layout-sidebar .admin-nav-group-heading {
    color: rgba(15, 23, 42, 0.9);
    margin-top: 2px;
    padding-top: 10px;
    border-top: none;
  }

  body.page-admin .admin-layout-sidebar .admin-nav-group-heading .admin-nav-link-icon {
    color: rgba(15, 23, 42, 0.56);
  }

  body.page-admin .admin-layout-sidebar .admin-nav-group-heading .admin-nav-group-chevron {
    color: rgba(15, 23, 42, 0.4);
  }

  body.page-admin .admin-layout-sidebar .admin-nav-group--active .admin-nav-group-heading {
    color: rgba(15, 23, 42, 0.92);
  }

  body.page-admin .admin-layout-sidebar .admin-nav-group--active .admin-nav-group-heading .admin-nav-link-icon {
    color: rgba(15, 23, 42, 0.62);
  }

  body.page-admin .admin-layout-sidebar .admin-nav-shell .admin-nav-links .admin-nav-link--account {
    font-size: 13px;
    font-weight: 600;
  }

  body.page-admin .admin-layout-main {
    padding: 16px 0 32px;
    background: transparent;
    min-width: 0;
    max-width: 100%;
  }

  body.page-admin .admin-layout-main .card {
    border: 1px solid #e8e8e8;
    border-radius: 12px;
    box-shadow:
      0 1px 2px rgba(15, 23, 42, 0.03),
      0 4px 14px rgba(15, 23, 42, 0.05);
    background: #fff;
  }

  body.page-admin .admin-layout-main .settings-tabs-page {
    border: 1px solid #e8e8e8;
    border-radius: 12px;
    padding: 16px;
    background: #fff;
    box-shadow:
      0 1px 2px rgba(15, 23, 42, 0.03),
      0 4px 14px rgba(15, 23, 42, 0.05);
  }

  body.page-admin .admin-layout-main .stat-card {
    border: 1px solid #e8e8e8;
    border-radius: 12px;
    box-shadow:
      0 1px 2px rgba(15, 23, 42, 0.03),
      0 4px 12px rgba(15, 23, 42, 0.04);
  }

  body.page-admin .admin-layout-main .card-head {
    border-bottom-color: #f0f0f0;
  }

  body.page-admin .table-wrap thead th,
  body.page-admin .table-scroll thead th {
    background: #fafafa;
    color: #595959;
    font-size: 12px;
    font-weight: 650;
    letter-spacing: 0.02em;
    border-bottom: 1px solid #f0f0f0;
    text-align: left;
    vertical-align: middle;
    white-space: nowrap;
  }

  body.page-admin .table-wrap tbody tr:nth-child(even),
  body.page-admin .table-scroll tbody tr:nth-child(even) {
    background: #fafafa;
  }

  body.page-admin .admin-layout-main .table-wrap,
  body.page-admin .admin-layout-main .table-scroll {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    border-radius: 12px;
    border-color: #e8e8e8;
    background: #fff;
  }

  body.page-admin .admin-layout-main .table-wrap th,
  body.page-admin .admin-layout-main .table-wrap td,
  body.page-admin .admin-layout-main .table-scroll th,
  body.page-admin .admin-layout-main .table-scroll td {
    vertical-align: middle;
    padding: 11px 14px;
    text-align: left;
  }

  body.page-admin .admin-layout-main .table-wrap td,
  body.page-admin .admin-layout-main .table-scroll td {
    font-variant-numeric: tabular-nums;
  }

  body.page-admin .admin-layout-main .table-wrap td:last-child .button,
  body.page-admin .admin-layout-main .table-scroll td:last-child .button {
    vertical-align: middle;
  }

  body.page-admin .admin-layout-main .pagination {
    width: 100%;
    max-width: 100%;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-top: 16px;
  }

  body.page-admin .admin-layout-main .admin-users-table-wrap {
    width: 100%;
    max-width: 100%;
    border-radius: 12px;
    border-color: #e8e8e8;
    background: #fff;
  }

  body.page-admin .admin-layout-main .admin-users-unified-table th,
  body.page-admin .admin-layout-main .admin-users-unified-table td {
    vertical-align: middle;
    padding: 11px 14px;
  }

  body.page-admin .filter-bar {
    border-radius: 12px;
    border-color: #e8e8e8;
    background: #fff;
  }

  body.page-admin .settings-tab-nav {
    border-radius: 12px;
    border-color: #e8e8e8;
    background: #fafafa;
  }

  body.page-admin .admin-dash-stat-grid .stat-card {
    border-radius: 12px;
    border-color: #e8e8e8;
    background: #fff;
    box-shadow:
      0 1px 2px rgba(15, 23, 42, 0.03),
      0 4px 12px rgba(15, 23, 42, 0.04);
    transition:
      border-color 0.18s ease,
      box-shadow 0.18s ease;
  }

  body.page-admin .admin-dash-stat-grid .stat-card:hover {
    border-color: #d9d9d9;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.07);
    transform: none;
  }

  body.page-admin .admin-dash-stat-grid .stat-card span {
    color: #8c8c8c;
  }

  body.page-admin .admin-dash-stat-grid .stat-card .admin-dash-kpi-card-pro-trend--muted {
    color: #bfbfbf;
  }

  body.page-admin .admin-dash-stat-grid .stat-card strong {
    color: #262626;
    font-weight: 800;
    letter-spacing: -0.02em;
  }

  body.page-admin .admin-dash-kpi-block-title {
    position: relative;
    padding-left: 12px;
    margin: 0 0 14px;
    font-size: 16px;
    font-weight: 800;
    color: #262626;
  }

  body.page-admin .admin-dash-kpi-block-title::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 16px;
    border-radius: 2px;
    background: var(--primary);
  }

  body.page-admin .admin-dash-stat-grid--kpi-pro {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
  }

  body.page-admin .admin-dash-kpi-card-pro {
    padding: 16px 18px 14px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-height: 132px;
  }

  body.page-admin .admin-dash-kpi-card-pro-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
  }

  body.page-admin .admin-dash-kpi-card-pro-icon {
    display: inline-flex;
    line-height: 0;
  }

  body.page-admin .admin-dash-kpi-card-pro-trend {
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
  }

  body.page-admin .admin-dash-kpi-card-pro-trend--muted {
    color: #bfbfbf;
  }

  body.page-admin .admin-dash-kpi-card-pro-trend--up {
    color: #52c41a;
  }

  body.page-admin .admin-dash-kpi-card-pro-trend--down {
    color: #ff4d4f;
  }

  body.page-admin .admin-dash-stat-grid .stat-card .admin-dash-kpi-card-pro-label {
    display: block;
    margin-top: 6px;
    font-size: 13px;
    font-weight: 650;
    color: #8c8c8c;
  }

  body.page-admin .admin-dash-kpi-card-pro strong {
    margin-top: 4px;
    padding-top: 0;
    font-size: 26px;
    font-weight: 900;
    letter-spacing: -0.03em;
    color: #262626;
  }
}

@media (max-width: 768px) {
  body.page-admin .admin-layout-workspace {
    padding: 10px 12px 0;
    gap: 10px;
  }

  body.page-admin .admin-topbar-menu-btn {
    display: flex;
    grid-column: 1;
    grid-row: 1;
  }

  body.page-admin .admin-topbar.is-menu-open .admin-topbar-menu-btn span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

  body.page-admin .admin-topbar.is-menu-open .admin-topbar-menu-btn span:nth-child(2) {
    opacity: 0;
  }

  body.page-admin .admin-topbar.is-menu-open .admin-topbar-menu-btn span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  body.page-admin .admin-topbar-menu-btn span {
    transition: transform 0.18s ease, opacity 0.18s ease;
  }

  body.page-admin .admin-topbar {
    grid-template-columns: auto minmax(0, 1fr) auto;
    grid-template-rows: auto;
    row-gap: 0;
    padding: 8px 12px;
    align-items: center;
  }

  body.page-admin .admin-topbar-title {
    grid-column: 2;
    grid-row: 1;
  }

  body.page-admin .admin-topbar-right {
    grid-column: 3;
    grid-row: 1;
  }

  body.page-admin .admin-topbar-user-root {
    display: flex;
  }

  body.page-admin .admin-topbar-user-text {
    display: none;
  }

  body.page-admin .admin-topbar-user {
    padding: 4px;
  }

  body.page-admin .admin-nav-drawer-head {
    background: #fafafa;
    border-bottom: 1px solid var(--admin-sidebar-border);
  }

  body.page-admin .admin-nav-drawer-title {
    color: #262626;
  }

  body.page-admin .admin-nav-drawer-close {
    color: #595959;
  }

  body.page-admin .admin-nav-drawer-panel {
    background: #fff;
    box-shadow: 8px 0 36px rgba(0, 0, 0, 0.18);
  }

  body.page-admin .admin-nav-shell .admin-nav-links .admin-nav-link {
    color: var(--admin-sidebar-nav-fg, rgba(0, 0, 0, 0.72));
  }

  body.page-admin .admin-nav-shell .admin-nav-links .admin-nav-link-icon {
    color: var(--admin-sidebar-nav-icon, rgba(0, 0, 0, 0.45));
  }

  body.page-admin .admin-nav-shell .admin-nav-links .admin-nav-link:hover {
    background: var(--admin-sidebar-nav-hover-bg, rgba(0, 0, 0, 0.04));
    color: var(--text);
  }

  body.page-admin .admin-nav-shell .admin-nav-links .admin-nav-link:hover .admin-nav-link-icon {
    color: var(--primary);
  }

  body.page-admin .admin-nav-shell .admin-nav-links .admin-nav-link.active {
    background: var(--admin-sidebar-nav-active-pill, #e6f4ff);
    color: var(--admin-sidebar-nav-active-fg, #1677ff);
    font-weight: 750;
    padding-right: 20px;
    box-shadow: none;
  }

  body.page-admin .admin-nav-shell .admin-nav-links .admin-nav-link.active::after {
    content: "";
    position: absolute;
    top: 50%;
    right: 14px;
    width: 3px;
    height: 22px;
    margin-top: -11px;
    border-radius: 999px;
    background: var(--primary);
  }

  body.page-admin .admin-nav-shell .admin-nav-links .admin-nav-link.active .admin-nav-link-icon {
    color: var(--admin-sidebar-nav-active-icon, #1677ff);
  }

  body.page-admin .admin-nav-links .admin-nav-account-link:first-of-type {
    border-top-color: var(--admin-sidebar-border);
  }

  body.page-admin .admin-dash-stat-grid--kpi-pro {
    grid-template-columns: 1fr;
  }

  body.page-admin .admin-layout-main {
    background: transparent;
  }

  body.page-admin .admin-layout-main .card,
  body.page-admin .admin-layout-main .stat-card {
    border: 1px solid #e8e8e8;
    border-radius: 12px;
    box-shadow:
      0 1px 2px rgba(15, 23, 42, 0.03),
      0 4px 14px rgba(15, 23, 42, 0.05);
  }

  body.page-admin .admin-layout-main .settings-tabs-page {
    border: 1px solid #e8e8e8;
    border-radius: 12px;
    padding: 12px;
    background: #fff;
    box-shadow:
      0 1px 2px rgba(15, 23, 42, 0.03),
      0 4px 14px rgba(15, 23, 42, 0.05);
  }

  body.page-admin .table-wrap thead th,
  body.page-admin .table-scroll thead th {
    background: #fafafa;
    color: #595959;
    font-size: 12px;
    font-weight: 650;
    vertical-align: middle;
    border-bottom-color: #f0f0f0;
  }

  body.page-admin .admin-layout-main .table-wrap th,
  body.page-admin .admin-layout-main .table-wrap td,
  body.page-admin .admin-layout-main .table-scroll th,
  body.page-admin .admin-layout-main .table-scroll td {
    vertical-align: middle;
    padding: 11px 12px;
  }

  body.page-admin.admin-drawer-open {
    overflow: hidden;
  }
}

/* 用户管理卡片：窄屏改为纵向堆叠，取消「整张卡横向滚动条」 */
@media (max-width: 640px) {
  .admin-users-unified-card,
  .admin-users-thead-bar {
    grid-template-columns: 1fr;
    row-gap: 10px;
    justify-items: stretch;
    align-items: start;
  }

  .admin-users-thead-bar {
    align-items: start;
  }

  .admin-users-unified-card {
    overflow-x: visible;
  }

  .admin-users-unified-identity {
    width: 100%;
  }

  .admin-users-unified-badges {
    width: 100%;
  }

  .admin-users-unified-stats-block {
    width: 100%;
  }

  .admin-users-unified-stats-row {
    flex-wrap: wrap;
    overflow-x: visible;
  }

  .admin-users-stat {
    flex: 1 1 auto;
    min-width: calc(50% - 6px);
  }

  .admin-users-unified-actions {
    margin-left: 0;
    padding-left: 0;
    padding-top: 10px;
    border-left: 0;
    border-top: 1px dashed rgba(148, 163, 184, 0.45);
    flex-wrap: wrap;
    width: 100%;
    justify-content: flex-start;
    align-items: flex-start;
    justify-self: stretch;
  }

  .admin-users-unified-actions-row {
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  .admin-users-unified-actions .button {
    flex: 1 1 auto;
    min-width: min(100%, 120px);
  }

  .admin-users-thead-h--actions {
    margin-left: 0;
    padding-left: 0;
    border-left: none;
    justify-self: stretch;
    text-align: left;
    padding-top: 6px;
    border-top: 1px dashed rgba(148, 163, 184, 0.45);
  }
}

.admin-record-bulk-form {
  margin-bottom: 12px;
  border: 1px solid #fee2e2;
  border-radius: 10px;
  background: #fffafa;
  padding: 10px 12px;
}

.bulk-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.code-create-card .card-head {
  margin-bottom: 12px;
}

.code-create-form {
  grid-template-columns: repeat(4, minmax(0, 1fr)) auto;
  align-items: end;
}

.code-create-form .button {
  min-width: 96px;
}

.code-export-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  color: var(--muted);
  font-size: 13px;
}

.code-export-actions span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.logo-preview {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
}

.logo-preview img {
  width: 44px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  object-fit: cover;
}

.user-identity {
  min-width: 0;
  display: grid;
  gap: 6px;
}

.user-identity strong,
.user-identity span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-identity strong {
  color: var(--text);
  font-weight: 850;
  line-height: 1.2;
}

.user-identity>span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

.inline-admin-form,
.table-action-group {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  margin: 0;
  vertical-align: middle;
}

.table-action-group {
  width: 100%;
  flex-wrap: wrap;
}

.compact-input {
  width: 88px;
  height: 36px;
  border-radius: 8px;
  padding: 0 9px;
  font-size: 13px;
}

.compact-input.password-input {
  width: 146px;
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 13px;
}

.code-token {
  display: inline-flex;
  max-width: 100%;
  min-height: 30px;
  align-items: center;
  border: 1px solid #e4e7ec;
  border-radius: 8px;
  background: #f8fafc;
  padding: 0 9px;
  color: #1d2939;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.code-copy-button {
  cursor: pointer;
  text-align: left;
  transition: border-color 0.16s ease, background 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
}

.code-copy-button:hover,
.code-copy-button:focus-visible {
  border-color: rgba(var(--primary-rgb), 0.35);
  background: var(--primary-soft);
  color: var(--primary);
  box-shadow: var(--shadow-2);
}

.redeem-dialog,
.record-dialog,
.generation-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  place-items: center;
  align-content: center;
  justify-content: center;
  padding: max(20px, env(safe-area-inset-top, 0px)) max(20px, env(safe-area-inset-right, 0px))
    max(20px, env(safe-area-inset-bottom, 0px)) max(20px, env(safe-area-inset-left, 0px));
  box-sizing: border-box;
  background: var(--modal-overlay-bg);
  backdrop-filter: blur(var(--modal-overlay-blur));
  -webkit-backdrop-filter: blur(var(--modal-overlay-blur));
}

.generation-overlay {
  z-index: 10002;
  pointer-events: auto;
}

.redeem-panel,
.record-dialog-panel,
.generation-modal {
  width: min(430px, 100%);
  overflow: hidden;
  border: var(--modal-panel-border);
  border-radius: var(--modal-radius);
  background: var(--surface);
  box-shadow: var(--modal-panel-shadow);
}

.record-dialog-panel {
  width: min(920px, 100%);
  max-height: min(860px, calc(100dvh - 48px), calc(100vh - 48px));
  overflow: auto;
}

.generation-modal {
  display: grid;
  justify-items: center;
  gap: 14px;
  padding: 26px 22px;
  text-align: center;
}

.generation-modal h2 {
  font-size: 22px;
}

.generation-modal p {
  margin: 0;
  color: var(--muted);
  font-weight: 650;
}

.generation-loader {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
  height: 42px;
}

.generation-loader span {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--primary);
  animation: pulse 0.9s ease-in-out infinite;
}

.generation-loader span:nth-child(2) {
  animation-delay: 0.12s;
}

.generation-loader span:nth-child(3) {
  animation-delay: 0.24s;
}

.generation-progress {
  width: 100%;
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--primary-soft);
}

.generation-progress i {
  width: 42%;
  height: 100%;
  display: block;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--primary-hover), var(--primary));
  animation: progress 1.3s ease-in-out infinite;
}

.redeem-head,
.record-dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-bottom: 1px solid var(--line);
  padding: 18px 20px;
  background: rgba(255, 255, 255, 0.96);
}

.record-dialog-head {
  position: sticky;
  top: 0;
  z-index: 1;
  backdrop-filter: blur(12px);
}

.redeem-form {
  padding: 20px;
}

.dialog-close {
  min-width: 72px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 0 12px;
  background: #fff;
  color: var(--text-soft);
  font-size: 14px;
  font-weight: 750;
}

.dialog-close:hover {
  border-color: rgba(var(--primary-rgb), 0.35);
  background: var(--primary-soft);
  color: var(--primary);
}

.record-dialog-body {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  padding: 20px;
}

.record-dialog .dialog-close {
  border-radius: 10px;
}

.record-dialog .record-full-prompt,
.record-dialog .record-error {
  border-radius: 10px;
}

.record-dialog-image {
  min-height: 420px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: linear-gradient(135deg, #e8f7f0, #f9fbfa);
  color: var(--muted);
  font-weight: 750;
}

.record-dialog-output-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
  width: 100%;
  padding: 10px;
  min-height: 0;
  align-items: start;
}

.record-dialog-output-grid .record-dialog-image-button {
  min-height: 140px;
  width: 100%;
  border-radius: 10px;
  border: 1px solid rgba(16, 24, 40, 0.08);
  background: #fff;
}

.record-dialog-output-grid .record-dialog-image-inner img {
  max-height: 220px;
  width: 100%;
  height: auto;
  object-fit: contain;
}

.record-dialog-image:has(.record-dialog-output-grid) {
  min-height: 0;
}

.record-dialog-save-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.record-dialog-save-actions .button {
  border-radius: 10px;
}

.record-dialog-save-actions.hidden {
  display: none;
}

.record-dialog-save-hint {
  margin: 0;
  max-width: 36rem;
  text-align: center;
  font-size: 12px;
  line-height: 1.55;
  color: var(--muted);
}

.record-dialog-image-button {
  width: 100%;
  height: 100%;
  min-height: inherit;
  display: grid;
  place-items: center;
  border: 0;
  padding: 0;
  background: transparent;
}

.record-dialog-image-button img,
.record-dialog-image img {
  width: 100%;
  height: 100%;
  max-height: 640px;
  object-fit: contain;
  background: #fff;
}

.record-input-images {
  display: grid;
  gap: 10px;
}

.record-input-images>span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.record-input-images [data-dialog-input-list] {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
  gap: 10px;
}

.record-input-image-button {
  aspect-ratio: 1;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  padding: 0;
  cursor: zoom-in;
}

.record-input-image-button img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.image-viewer {
  position: fixed;
  inset: 0;
  z-index: 10020;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 12px;
  padding: 16px;
  background: rgba(51, 65, 85, 0.72);
}

.image-viewer-toolbar {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.image-viewer-toolbar button,
.image-viewer-toolbar span {
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.38);
  border-radius: var(--radius);
  padding: 0 14px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-weight: 800;
}

.image-viewer-toolbar span {
  min-width: 72px;
}

/* 精选 / 作品详情大图：不显示顶部工具栏；底部仅圆形关闭 */
.image-viewer-footer {
  display: none;
  min-width: 0;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding: 0 0 calc(20px + env(safe-area-inset-bottom, 0px));
  border: none;
  background: transparent;
}

body.page-featured .image-viewer-footer {
  display: flex;
  background: transparent;
  border: none;
}

.image-viewer-footer-btn {
  flex: 1;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 12px;
  padding: 0 14px;
  background: rgba(255, 255, 255, 0.1);
  color: #f1f5f9;
  font-size: 15px;
  font-weight: 750;
}

.image-viewer-footer-btn:hover {
  background: rgba(255, 255, 255, 0.16);
}

.image-viewer-footer-btn--close {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.45);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
  font-size: 0;
}

.image-viewer-footer-btn--close:hover {
  background: rgba(15, 23, 42, 0.55);
}

.image-viewer-footer-btn-icon {
  font-size: 18px;
  line-height: 1;
  font-weight: 800;
}

.image-viewer-footer-btn-icon--xl {
  font-size: 28px;
  font-weight: 300;
  line-height: 1;
}

.image-viewer-footer-btn-text {
  font-size: 14px;
  font-weight: 750;
}

/* 精选页大图：不显示顶部工具栏（仍可用滚轮/双指缩放、拖拽，点空白处或 Esc 关闭） */
body.page-featured .image-viewer {
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 0;
  padding: 12px 12px 0;
}

body.page-featured .image-viewer-stage {
  border: none;
  background: transparent;
}

body.page-featured .image-viewer .image-viewer-stage {
  grid-row: 1;
}

body.page-featured .image-viewer .image-viewer-footer {
  grid-row: 2;
}

body.page-featured .image-viewer-toolbar {
  display: none !important;
}

.image-viewer-stage {
  min-width: 0;
  min-height: 0;
  overflow: auto;
  border: none;
  border-radius: 0;
  background: transparent;
  cursor: grab;
  /* 双指缩放由脚本处理，避免浏览器整页缩放抢走手势 */
  touch-action: none;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.image-viewer-stage::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

.image-viewer-canvas {
  min-width: 100%;
  min-height: 100%;
  display: grid;
  place-items: center;
}

.image-viewer-imgwrap {
  position: relative;
  display: inline-block;
  line-height: 0;
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.34);
  user-select: none;
}

.image-viewer-stage.is-dragging {
  cursor: grabbing;
}

.image-viewer-stage img {
  display: block;
  max-width: none;
  max-height: none;
  object-fit: contain;
  background: #fff;
  box-shadow: none;
  user-select: none;
}

.image-viewer-imgwrap canvas.image-viewer-pix {
  display: block;
  max-width: none;
  max-height: none;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #fff;
  user-select: none;
  -webkit-touch-callout: default;
}

/* 微信内「下载含标识」：程序化 <a download> 无效，改为长按指引层 */
.wechat-stamp-save-overlay {
  position: fixed;
  inset: 0;
  z-index: 10035;
  display: grid;
  place-items: center;
  align-content: center;
  justify-content: center;
  padding: max(16px, env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px))
    max(16px, env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px));
  box-sizing: border-box;
}

.wechat-stamp-save-overlay.hidden {
  display: none;
}

.wechat-stamp-save-backdrop {
  position: absolute;
  inset: 0;
  background: var(--modal-overlay-bg);
  backdrop-filter: blur(var(--modal-overlay-blur));
  -webkit-backdrop-filter: blur(var(--modal-overlay-blur));
}

.wechat-stamp-save-panel {
  position: relative;
  z-index: 1;
  width: min(100%, 420px);
  max-height: min(92vh, 720px);
  display: grid;
  gap: 12px;
  padding: 18px 16px 16px;
  border: var(--modal-panel-border);
  border-radius: var(--modal-radius);
  background: #fff;
  color: #0f172a;
  box-shadow: var(--modal-panel-shadow);
  overflow: auto;
}

.wechat-stamp-save-title {
  margin: 0;
  font-size: 17px;
  font-weight: 800;
  text-align: center;
}

.wechat-stamp-save-hint {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
  color: #475569;
  text-align: center;
}

.wechat-stamp-save-img-wrap {
  max-height: min(58vh, 480px);
  overflow: auto;
  border-radius: 10px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
}

.wechat-stamp-save-img-wrap img {
  display: block;
  width: 100%;
  height: auto;
  vertical-align: top;
  -webkit-touch-callout: default;
}

.wechat-stamp-save-close {
  margin: 0;
  height: 40px;
  border-radius: var(--radius-btn);
  border: 1px solid var(--line);
  background: var(--surface-soft);
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
}

.record-detail-grid {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 8px 10px;
  padding-bottom: 2px;
}

.record-detail-grid > .record-detail-field {
  flex: 1 1 auto;
  min-width: min(100%, 148px);
  min-height: 40px;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 12px;
  background: #fbfdff;
}

.record-detail-grid > .record-detail-field--wide {
  flex: 1 1 220px;
  min-width: min(100%, 200px);
}

.record-detail-grid > .record-detail-featured {
  flex: 1 1 100%;
  align-items: flex-start;
  flex-direction: column;
  align-content: flex-start;
}

.record-detail-featured-apply {
  min-height: 0 !important;
  padding: 0 !important;
  margin: 0;
  border: 0 !important;
  background: transparent !important;
}

.record-detail-featured-apply .record-dialog-apply-featured {
  width: 100%;
  justify-content: center;
  border-radius: 10px;
}

.record-detail-grid .record-detail-field > span {
  flex-shrink: 0;
  white-space: nowrap;
}

.record-detail-grid .record-detail-field > strong {
  flex: 1 1 auto;
  min-width: 0;
  text-align: left;
}

.record-detail-grid .record-detail-status strong {
  width: fit-content;
  flex: 0 1 auto;
}

.record-detail-featured-value {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
  font-weight: 850;
  font-size: 13px;
  line-height: 1.35;
}

.record-detail-featured-value.is-muted {
  color: #94a3b8;
  font-weight: 700;
}

.record-detail-featured-value.is-featured-approved {
  color: #92400e;
}

.record-detail-featured-value.is-featured-approved .record-featured-star-icon {
  color: #f59e0b;
}

.record-detail-featured-value.is-featured-approved .record-featured-star-icon path {
  fill: #f59e0b;
  stroke: #ea580c;
  stroke-width: 0.35;
  stroke-linejoin: round;
}

.record-detail-featured-value.is-featured-pending {
  color: #a16207;
}

.record-detail-featured-value.is-featured-pending .record-featured-star-icon {
  color: #d97706;
}

.record-detail-featured-value.is-featured-pending .record-featured-star-icon path {
  fill: rgba(254, 243, 199, 0.65);
  stroke: #d97706;
  stroke-width: 1.15;
  stroke-linejoin: round;
}

.record-detail-featured-value.is-featured-rejected,
.record-detail-featured-value.is-featured-none {
  color: #64748b;
}

.record-detail-grid span,
.record-full-prompt span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.record-detail-grid strong {
  overflow-wrap: anywhere;
  color: var(--text);
  font-size: 13px;
}

.record-detail-grid strong.status {
  color: inherit;
  font-size: 13px;
}

.record-full-prompt {
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  background: #fff;
}

.record-full-prompt p {
  max-height: 132px;
  overflow: auto;
  margin: 0;
  color: #1f2937;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.record-error {
  grid-column: 1 / -1;
  border: 1px solid #fecaca;
  border-radius: var(--radius);
  padding: 12px;
  background: var(--danger-soft);
  color: var(--danger);
}

.history-list::-webkit-scrollbar,
.record-full-prompt p::-webkit-scrollbar,
.record-dialog-panel::-webkit-scrollbar,
.admin-nav::-webkit-scrollbar,
.table-wrap::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

.history-list::-webkit-scrollbar-thumb,
.record-full-prompt p::-webkit-scrollbar-thumb,
.record-dialog-panel::-webkit-scrollbar-thumb,
.admin-nav::-webkit-scrollbar-thumb,
.table-wrap::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: #c8d5e6;
}

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

@keyframes pulse {

  0%,
  100% {
    transform: translateY(0);
    opacity: 0.45;
  }

  50% {
    transform: translateY(-7px);
    opacity: 1;
  }
}

@keyframes progress {
  0% {
    transform: translateX(-110%);
  }

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

@media (max-width: 1180px) {
  .history-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 980px) {
  .app-topbar {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .topbar-right {
    justify-content: flex-start;
  }

  .two-col,
  .narrow-left,
  .auth-dashboard {
    grid-template-columns: 1fr;
  }

  .auth-info,
  .auth-form-card {
    min-height: auto;
  }

  .auth-info {
    gap: 28px;
  }

  .preview-card {
    grid-template-rows: auto minmax(300px, auto);
  }

  .preview-stage {
    min-height: 300px;
  }

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

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

  .code-create-form .button {
    width: 100%;
  }
}

@media (max-width: 720px) {
  .app-shell {
    width: min(100% - 16px, 1180px);
    padding-top: 8px;
    padding-bottom: 24px;
  }

  .app-topbar {
    min-height: auto;
    padding: 12px;
  }

  .topbar-brand {
    grid-template-columns: 38px minmax(0, 1fr);
  }

  .brand-mark {
    width: 38px;
    height: 38px;
    font-size: 18px;
  }

  h1 {
    font-size: 22px;
  }

  h2 {
    font-size: 19px;
  }

  .topbar-right {
    display: grid;
    gap: 8px;
    width: 100%;
  }

  .topbar-nav,
  .topbar-account {
    width: 100%;
    min-height: 40px;
  }

  .topbar-nav {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 1fr;
  }

  .topbar-account {
    display: grid;
    grid-template-columns: minmax(78px, 1fr) auto auto auto;
  }

  .topbar-nav a,
  .topbar-account .balance,
  .topbar-account .nav-redeem,
  .topbar-account .logout-link {
    height: 32px;
    min-height: 32px;
    padding: 0 10px;
    font-size: 13px;
  }

  .card {
    padding: 14px;
  }

  .card-head {
    align-items: flex-start;
    min-height: auto;
    gap: 10px;
    margin-bottom: 14px;
  }

  .field-grid,
  .stats-grid,
  .auth-metrics,
  .filter-bar,
  .code-create-form {
    grid-template-columns: 1fr;
  }

  .card-head-actions,
  .filter-actions {
    width: 100%;
  }

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

  .code-export-actions .button {
    width: 100%;
  }

  .card-head-actions .button,
  .filter-actions .button {
    flex: 1;
  }

  /* 工作台：标题 + 积分 + 充值同一行，必要时标题省略 */
  .workspace-card .card-head.workspace-section-head--toolbar {
    flex-wrap: nowrap;
    align-items: center;
  }

  .workspace-card .card-head.workspace-section-head--toolbar .workspace-toolbar-heading {
    flex: 1 1 auto;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .workspace-card .card-head.workspace-section-head:not(.workspace-section-head--toolbar) > div:first-child {
    flex: 1 1 200px;
    min-width: 0;
  }

  .workspace-card .card-head-actions {
    width: auto;
    max-width: 100%;
    flex: 0 1 auto;
    min-width: 0;
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  .workspace-card.workspace-card--creative .card-head.workspace-section-head--toolbar .card-head-actions {
    flex-wrap: nowrap;
    flex-shrink: 0;
  }

  .workspace-card--creative .card-head.workspace-section-head--toolbar .card-head-actions .button {
    flex: 0 0 auto;
  }

  .workspace-card .card-head-actions .badge {
    flex: 0 1 auto;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .workspace-card .card-head-actions .recharge-cta {
    flex: 0 0 auto;
    min-height: 32px;
    padding-left: 10px;
    padding-right: 10px;
    font-size: 12px;
  }

  /* 手机端创作工作台：右上角与余额并列的「充值」去掉（顶栏菜单/「我的」等仍可充值） */
  .workspace-card--creative .card-head.workspace-section-head--toolbar .card-head-actions .recharge-cta {
    display: none !important;
  }

  .prompt-field-head {
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 8px;
  }

  .prompt-field-head > .prompt-field-title {
    min-width: 0;
  }

  .prompt-field-actions {
    flex-shrink: 1;
    min-width: 0;
    gap: 6px;
  }

  .prompt-optimize-button {
    min-width: 0;
    height: 26px;
    padding: 0 8px;
    font-size: 11px;
  }

  .workspace-card .workspace-advanced-preview {
    font-size: 11px;
  }

  .workspace-card .workspace-advanced-dropdown {
    width: 34px;
    height: 34px;
  }

  .auth-dashboard {
    gap: 12px;
  }

  .auth-info,
  .auth-form-card {
    padding: 16px;
  }

  .auth-info h2 {
    font-size: 28px;
  }

  input,
  select {
    height: 40px;
  }

  textarea {
    min-height: 138px;
  }

  .button {
    min-height: 40px;
  }

  .button.small {
    min-height: 24px;
  }

  .button.large {
    min-height: 40px;
  }

  .history-list {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .history-list .record-card {
    height: 108px;
    min-height: 108px;
    grid-template-columns: 92px minmax(0, 1fr);
    grid-template-rows: 1fr;
    gap: 10px;
    padding: 8px;
  }

  .history-list .record-image {
    width: 92px;
    height: 92px;
    border-radius: var(--radius);
  }

  .history-list .record-body {
    align-content: center;
    padding: 0;
  }

  .redeem-dialog,
  .record-dialog,
  .generation-overlay {
    align-items: center;
    justify-content: center;
    align-content: center;
    padding: max(12px, env(safe-area-inset-top, 0px)) max(12px, env(safe-area-inset-right, 0px))
      max(12px, env(safe-area-inset-bottom, 0px)) max(12px, env(safe-area-inset-left, 0px));
  }

  .redeem-dialog.poster-modal-dialog {
    padding: max(16px, env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px))
      max(16px, env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px));
  }

  .poster-modal-panel {
    max-height: min(calc(100dvh - 24px), calc(100vh - 24px), 900px);
    width: min(560px, calc(100vw - 20px));
  }

  .redeem-panel,
  .generation-modal {
    width: min(430px, calc(100vw - 24px));
  }

  .record-dialog-panel {
    width: min(920px, calc(100vw - 24px));
    max-height: min(860px, calc(100dvh - 32px), calc(100vh - 32px));
  }

  .redeem-head,
  .record-dialog-head,
  .redeem-form {
    padding: 14px;
  }

  .record-dialog-body {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 14px;
  }

  .record-dialog-image {
    min-height: 280px;
  }

  .pagination {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: 16px;
    flex-wrap: nowrap;
  }

  .pagination > span {
    flex: 1;
    min-width: 0;
    font-size: 12px;
  }

  .pagination-summary .pagination-pages {
    font-size: 13px;
  }

  .pagination-summary .pagination-count {
    font-size: 11px;
  }

  .pagination .button.secondary {
    flex: 0 0 auto;
    min-height: 34px;
    padding: 6px 12px;
    font-size: 13px;
    font-weight: 650;
  }

  .image-viewer {
    padding: 10px;
  }

  body.page-featured .image-viewer {
    padding: 10px 10px 0;
  }

  .image-viewer-toolbar {
    justify-content: stretch;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .image-viewer-toolbar button,
  .image-viewer-toolbar span {
    width: 100%;
    padding: 0 8px;
    font-size: 13px;
  }

  .record-detail-grid > .record-detail-field {
    flex: 1 1 100%;
    min-width: 0;
  }
}

@media (max-width: 380px) {
  .app-shell {
    width: min(100% - 12px, 1180px);
  }

  .topbar-account {
    grid-template-columns: 1fr 1fr;
  }

  .topbar-account .balance {
    grid-column: 1 / -1;
  }
}

/* 全站 UI — UnivDesign ant-design.md 令牌（须与文件首段 :root 一致） */
:root {
  --unit: 4px;
  --bg: #f5f5f5;
  --surface: #ffffff;
  --surface-soft: #fafafa;
  --text: rgba(0, 0, 0, 0.88);
  --text-soft: rgba(0, 0, 0, 0.65);
  --muted: rgba(0, 0, 0, 0.45);
  --line: #d9d9d9;
  --line-secondary: #f0f0f0;
  --line-strong: #bfbfbf;
  --primary: #1677ff;
  --primary-hover: #4096ff;
  --primary-active: #0958d9;
  --primary-dark: var(--primary-active);
  --primary-soft: rgba(22, 119, 255, 0.1);
  --primary-rgb: 22, 119, 255;
  --success: #52c41a;
  --success-soft: rgba(82, 196, 26, 0.12);
  --warning: #faad14;
  --warning-soft: rgba(250, 173, 20, 0.12);
  --danger: #ff4d4f;
  --danger-soft: rgba(255, 77, 79, 0.1);
  --shadow-1:
    0 1px 2px 0 rgba(0, 0, 0, 0.03), 0 1px 6px -1px rgba(0, 0, 0, 0.02), 0 2px 4px 0 rgba(0, 0, 0, 0.02);
  --shadow-2: 0 6px 16px 0 rgba(0, 0, 0, 0.08), 0 3px 6px -4px rgba(0, 0, 0, 0.12);
  --shadow-3:
    0 6px 16px 0 rgba(0, 0, 0, 0.08), 0 3px 6px -4px rgba(0, 0, 0, 0.12), 0 9px 28px 8px rgba(0, 0, 0, 0.05);
  --shadow-soft: var(--shadow-1);
  --shadow: var(--shadow-3);
  --focus-ring: 0 0 0 2px rgba(5, 145, 255, 0.1);
  --radius-btn: 6px;
  --radius-card: 8px;
  --radius: var(--radius-card);
  --radius-sm: var(--radius-btn);
  --radius-lg: var(--radius-card);
  --space: calc(var(--unit) * 2);
}

html {
  background: var(--bg);
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

body {
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

.app-shell {
  width: calc(100% - 32px);
  max-width: 1200px;
  padding-top: calc(var(--unit) * 4);
}

.app-topbar,
.topbar-brand,
.topbar-right,
.topbar-nav,
.topbar-account,
.grid,
.two-col,
.section-card,
.preview-card {
  min-width: 0;
  max-width: 100%;
}

.app-topbar {
  position: sticky;
  top: calc(var(--unit) * 3);
  z-index: 1000;
  min-height: 62px;
  margin-bottom: calc(var(--unit) * 4);
  border: none;
  border-radius: var(--radius-card);
  background: var(--surface);
  box-shadow: var(--shadow-1);
}

.brand-mark {
  border-radius: 8px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
  box-shadow: 0 10px 20px rgba(var(--primary-rgb), 0.24);
}

h1 {
  font-size: 38px;
  font-weight: 600;
  line-height: 1.3;
}

h2 {
  font-size: 30px;
  font-weight: 600;
  line-height: 1.3;
}

.eyebrow {
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
  line-height: 1.67;
  text-transform: none;
}

.topbar-nav,
.topbar-account {
  border-color: #eaecf0;
  border-radius: 8px;
  background: #f8fafc;
}

.topbar-nav a,
.topbar-account .balance,
.topbar-account .nav-redeem,
.topbar-account .logout-link {
  border-radius: 6px;
  color: #475467;
  font-size: 13px;
  font-weight: 750;
}

.topbar-nav a.active {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 2px 8px rgba(var(--primary-rgb), 0.35);
}

.topbar-nav a:not(.active):hover,
.topbar-account .logout-link:hover {
  background: #eef2f6;
  color: var(--text);
}

.topbar-account .balance {
  border: 1px solid rgba(var(--primary-rgb), 0.22);
  background: rgba(239, 246, 255, 0.92);
  color: var(--primary-dark);
}

.topbar-account .nav-redeem {
  border: 1px solid var(--primary-active);
  background: var(--primary);
  color: #ffffff;
  font-weight: 500;
  box-shadow: 0 2px 8px rgba(var(--primary-rgb), 0.35);
}

.topbar-account .nav-redeem:hover {
  border-color: var(--primary-active);
  background: linear-gradient(135deg, var(--primary-active) 0%, #0284c7 100%);
  color: #ffffff;
}

.grid {
  gap: 18px;
}

.two-col {
  grid-template-columns: minmax(360px, 430px) minmax(0, 1fr);
}

.settings-page {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: stretch;
}

.settings-tabs-page {
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
}

.settings-tab-nav {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  border: 1px solid #e4e7ec;
  border-radius: 10px;
  background: #f8fafc;
  padding: 8px;
  box-shadow: var(--shadow-soft);
}

.settings-tab-nav button {
  min-height: 42px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: #475467;
  font-weight: 820;
  cursor: pointer;
  white-space: nowrap;
}

.settings-tab-nav button:hover,
.settings-tab-nav button.active {
  border-color: rgba(var(--primary-rgb), 0.35);
  background: #ffffff;
  color: var(--primary);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06);
}

.settings-tab-nav.settings-tab-nav-links {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.settings-tab-nav.settings-tab-nav-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: #475467;
  font-weight: 820;
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;
  box-sizing: border-box;
}

.settings-tab-nav.settings-tab-nav-links a:hover,
.settings-tab-nav.settings-tab-nav-links a.active {
  border-color: rgba(var(--primary-rgb), 0.35);
  background: #ffffff;
  color: var(--primary);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06);
}

.settings-tab-nav.settings-tab-nav-links a:focus-visible {
  outline: 2px solid rgba(var(--primary-rgb), 0.45);
  outline-offset: 2px;
}

.settings-tab-panel {
  grid-column: 1 / -1;
}

[data-settings-tabs] > .settings-tab-panel:not(.active),
[data-legal-center-tabs] > .settings-tab-panel:not(.active) {
  display: none !important;
}

/* 提示词优化/安全审核（原系统配置 Tab）：分块与双线路说明 */
.admin-prompt-intro {
  margin: 0 0 20px;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.45);
  background: linear-gradient(165deg, rgba(248, 250, 252, 0.95), rgba(239, 246, 255, 0.5));
  font-size: 14px;
  line-height: 1.65;
  color: #334155;
}

.admin-prompt-intro ol {
  margin: 10px 0 0 1.1rem;
  padding: 0;
  display: grid;
  gap: 8px;
}

.admin-prompt-intro strong {
  color: #0f172a;
}

.admin-prompt-ref-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 22px;
}

@media (max-width: 900px) {
  .admin-prompt-ref-grid {
    grid-template-columns: 1fr;
  }
}

.admin-prompt-ref-card {
  margin: 0;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  background: #fff;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.9) inset;
}

.admin-prompt-ref-card h3 {
  margin: 0 0 10px;
  font-size: 15px;
  font-weight: 850;
  color: #0f172a;
  letter-spacing: -0.02em;
}

.admin-prompt-ref-dl {
  margin: 0;
  display: grid;
  gap: 8px;
  font-size: 13px;
  line-height: 1.5;
}

.admin-prompt-ref-dl > div {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 8px 10px;
  align-items: start;
}

.admin-prompt-ref-dl dt {
  margin: 0;
  color: #64748b;
  font-weight: 750;
}

.admin-prompt-ref-dl dd {
  margin: 0;
  color: #1e293b;
  word-break: break-word;
}

.admin-prompt-ref-dl code {
  font-size: 12px;
  padding: 2px 6px;
  border-radius: 6px;
  background: #f1f5f9;
  color: #0f172a;
}

.admin-settings-section {
  margin: 0 0 22px;
  padding: 0 0 18px;
  border-bottom: 1px solid rgba(226, 232, 240, 0.95);
}

.admin-settings-section:last-of-type {
  border-bottom: 0;
  padding-bottom: 0;
  margin-bottom: 8px;
}

.admin-settings-section h3 {
  margin: 0 0 12px;
  font-size: 16px;
  font-weight: 850;
  color: #0f172a;
  letter-spacing: -0.02em;
}

.admin-settings-section .section-lead {
  margin: 0 0 14px;
  font-size: 13px;
  line-height: 1.55;
  color: #64748b;
}

.admin-settings-section .section-lead code {
  font-size: 12px;
  padding: 1px 5px;
  border-radius: 4px;
  background: #f8fafc;
}

.admin-announce-quill-wrap {
  border: 1px solid var(--line, #e5e7eb);
  border-radius: var(--radius, 10px);
  background: #fff;
  /* 外框与 Quill 内置边框叠在一起会在编辑器底部多出一条横线 */
  overflow: hidden;
}

.admin-announce-quill-wrap .ql-toolbar.ql-snow {
  border-top: none;
  border-left: none;
  border-right: none;
  border-bottom: 1px solid var(--line, #e5e7eb);
}

.admin-announce-quill-wrap .ql-toolbar.ql-snow + .ql-container.ql-snow,
.admin-announce-quill-wrap .ql-container.ql-snow {
  border: none;
}

.admin-announce-quill-editor .ql-editor {
  min-height: 280px;
  font-size: 15px;
  line-height: 1.55;
}

/* 管理后台 · 协议与公告：公告列表头与弹窗发布 */
body.page-admin .admin-announce-panel-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

/* 管理后台 · 商品管理：标题 +「新增商品」同行，右侧件数 */
body.page-admin .admin-packages-panel-head.card-head,
body.page-admin .admin-codes-panel-head.card-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 12px 16px;
}

body.page-admin .admin-packages-panel-head.card-head::after,
body.page-admin .admin-codes-panel-head.card-head::after {
  display: none;
}

body.page-admin .admin-packages-panel-head__lead {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  flex: 1 1 200px;
  min-width: 0;
}

body.page-admin .admin-packages-panel-head__title {
  flex: 0 1 auto;
  min-width: 0;
}

body.page-admin .admin-codes-panel-head__lead {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  flex: 1 1 240px;
  min-width: 0;
}

body.page-admin .admin-codes-panel-head__title {
  flex: 0 1 auto;
  min-width: 0;
}

body.page-admin .admin-packages-panel-head__badge,
body.page-admin .admin-codes-panel-head__badge {
  margin-left: auto;
}

body.page-admin .admin-announce-filter {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 10px 14px;
  margin-bottom: 14px;
}

body.page-admin .admin-announce-filter__q {
  flex: 1 1 220px;
  min-width: 180px;
}

body.page-admin .admin-announce-filter__date {
  min-width: 150px;
}

body.page-admin .admin-announce-list-head {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 8px;
}

body.page-admin .admin-announce-col-id {
  width: 72px;
}

body.page-admin .admin-announce-col-title {
  min-width: 120px;
}

body.page-admin .admin-announce-col-time {
  width: 170px;
}

body.page-admin .admin-announce-col-action {
  width: 100px;
}

body.page-admin .admin-announce-content-preview {
  max-width: min(480px, 42vw);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.page-admin .admin-announce-publish-dialog {
  max-width: 720px;
  width: calc(100% - 2rem);
  padding: 0;
  border: none;
  border-radius: 16px;
  box-shadow:
    0 4px 24px rgba(15, 23, 42, 0.12),
    0 24px 64px rgba(15, 23, 42, 0.18);
  box-sizing: border-box;
}

body.page-admin .admin-announce-publish-dialog::backdrop {
  background: rgba(15, 23, 42, 0.45);
}

body.page-admin .admin-announce-publish-dialog__form {
  padding: 22px 22px 20px;
  box-sizing: border-box;
}

body.page-admin .admin-announce-publish-dialog__title {
  margin: 0 0 6px;
  font-size: 18px;
  font-weight: 800;
  color: #1a1f2e;
  letter-spacing: -0.02em;
}

body.page-admin .admin-announce-publish-dialog__foot {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 8px;
}

/* 公告配置：去掉主 card-head 装饰下划线 */
[data-legal-center-tabs] [data-legal-panel="announce"] > .card-head::after {
  display: none;
}

.home-announcement-modal {
  position: fixed;
  inset: 0;
  z-index: 10040;
  display: grid;
  place-items: center;
  align-content: center;
  justify-content: center;
  padding: max(24px, env(safe-area-inset-top, 0px)) max(28px, env(safe-area-inset-right, 0px))
    max(24px, env(safe-area-inset-bottom, 0px)) max(28px, env(safe-area-inset-left, 0px));
  box-sizing: border-box;
}

.home-announcement-modal.hidden {
  display: none !important;
}

.home-announcement-modal__backdrop {
  position: absolute;
  inset: 0;
  background: var(--modal-overlay-bg);
  backdrop-filter: blur(var(--modal-overlay-blur));
  -webkit-backdrop-filter: blur(var(--modal-overlay-blur));
}

.home-announcement-modal__panel {
  position: relative;
  width: min(300px, calc(100vw - 56px));
  max-height: min(72vh, 540px);
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 18px 18px 16px;
  border: var(--modal-panel-border);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: 0 20px 48px rgba(15, 23, 42, 0.14), 0 0 0 1px rgba(15, 23, 42, 0.04);
  overflow: hidden;
}

.home-announcement-modal__heading {
  margin: 0 0 6px;
  font-size: 17px;
  font-weight: 800;
  text-align: center;
  color: var(--text, #0f172a);
  line-height: 1.35;
}

.home-announcement-modal__subtitle {
  margin: 0 0 4px;
  font-size: 15px;
  font-weight: 700;
  text-align: center;
  color: var(--primary, var(--primary));
  line-height: 1.4;
}

.announcements-detail-modal .home-announcement-modal__heading {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--muted, #64748b);
}

.announcements-detail-modal .home-announcement-modal__subtitle {
  margin: 0 0 6px;
  font-size: 16px;
  font-weight: 750;
  color: var(--text, #0f172a);
}

.home-announcement-modal__body {
  flex: 1;
  min-height: 0;
  overflow: auto;
  margin-top: 12px;
  padding: 14px 2px 14px;
  border-top: 1px solid rgba(226, 232, 240, 0.92);
  font-size: 13px;
  line-height: 1.68;
  color: #475569;
  -webkit-overflow-scrolling: touch;
}

.home-announcement-modal__body p {
  margin: 0 0 0.55em;
}

.home-announcement-modal__body p:last-child {
  margin-bottom: 0;
}

.home-announcement-modal__body pre,
.home-announcement-modal__body .ql-syntax {
  max-width: 100%;
  overflow: auto;
  font-size: 12px;
}

.home-announcement-modal__ok {
  flex-shrink: 0;
  width: auto;
  min-width: 128px;
  max-width: none;
  margin: 14px auto 0;
  padding: 0 26px;
  border: none;
  border-radius: 999px;
  min-height: 42px;
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.02em;
  box-shadow: 0 6px 18px rgba(24, 119, 242, 0.24);
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.home-announcement-modal__ok:active {
  transform: scale(0.98);
  box-shadow: 0 3px 10px rgba(24, 119, 242, 0.2);
}

button.account-quick-tile {
  border-style: solid;
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  font: inherit;
  cursor: pointer;
}

.cs-qr-dialog {
  position: fixed;
  inset: 0;
  z-index: 10040;
  display: grid;
  place-items: center;
  align-content: center;
  justify-content: center;
  padding: max(20px, env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px))
    max(20px, env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px));
  box-sizing: border-box;
}

.cs-qr-dialog.hidden {
  display: none !important;
}

.cs-qr-dialog__backdrop {
  position: absolute;
  inset: 0;
  background: var(--modal-overlay-bg);
  backdrop-filter: blur(var(--modal-overlay-blur));
  -webkit-backdrop-filter: blur(var(--modal-overlay-blur));
}

.cs-qr-dialog__panel {
  position: relative;
  width: min(360px, calc(100vw - 32px));
  max-height: min(86vh, 520px);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 14px;
  padding: calc(var(--unit) * 5) calc(var(--unit) * 5) calc(var(--unit) * 4);
  border: var(--modal-panel-border);
  border-radius: var(--modal-radius);
  background: var(--surface);
  box-shadow: var(--modal-panel-shadow);
  overflow: hidden;
}

.cs-qr-dialog__title {
  margin: 0;
  font-size: 17px;
  font-weight: 850;
  text-align: center;
  color: var(--text, #0f172a);
}

.cs-qr-dialog__img-wrap {
  flex: 1;
  min-height: 0;
  overflow: auto;
  border-radius: 12px;
  border: 1px solid var(--line, #e5e7eb);
  background: #fafafa;
  -webkit-overflow-scrolling: touch;
}

.cs-qr-dialog__img {
  display: block;
  width: 100%;
  height: auto;
  vertical-align: top;
}

.cs-qr-dialog__close {
  align-self: center;
  min-width: 160px;
  border-radius: 999px;
}

.login-required-dialog {
  position: fixed;
  inset: 0;
  z-index: 10050;
  display: grid;
  place-items: center;
  padding: max(20px, env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px))
    max(20px, env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px));
  box-sizing: border-box;
}

.login-required-dialog.hidden {
  display: none !important;
}

.login-required-dialog__backdrop {
  position: absolute;
  inset: 0;
  background: var(--modal-overlay-bg);
  backdrop-filter: blur(var(--modal-overlay-blur));
  -webkit-backdrop-filter: blur(var(--modal-overlay-blur));
}

.login-required-dialog__panel {
  position: relative;
  width: min(360px, calc(100vw - 32px));
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: calc(var(--unit) * 5) calc(var(--unit) * 5) calc(var(--unit) * 4);
  border: var(--modal-panel-border);
  border-radius: var(--modal-radius);
  background: var(--surface);
  box-shadow: var(--modal-panel-shadow);
}

.login-required-dialog__title {
  margin: 0;
  font-size: 18px;
  font-weight: 850;
  text-align: center;
  color: var(--text, #0f172a);
}

.login-required-dialog__message {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
  text-align: center;
  color: var(--muted, #667085);
}

.login-required-dialog__actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.login-required-dialog__actions .button {
  justify-content: center;
  text-align: center;
}

.login-required-dialog__sub {
  margin: 0;
  font-size: 13px;
  text-align: center;
  color: var(--muted, #667085);
}

.login-required-dialog__sub a {
  font-weight: 700;
  color: var(--primary, #2563eb);
}

.mobile-records-empty__login {
  display: inline-block;
  margin-top: 10px;
  font-weight: 700;
  color: var(--primary, #2563eb);
}

.mobile-account-guest {
  margin: 12px 16px 20px;
  padding: 28px 20px 24px;
  border-radius: 16px;
  background: linear-gradient(165deg, #f8fafc 0%, #eef2ff 100%);
  border: 1px solid var(--line, #e5e7eb);
  text-align: center;
}

.mobile-account-guest__avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: #fff;
  color: var(--primary, #2563eb);
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.12);
}

.mobile-account-guest__title {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 850;
  color: var(--text, #0f172a);
}

.mobile-account-guest__desc {
  margin: 0 0 18px;
  font-size: 13px;
  line-height: 1.65;
  color: var(--muted, #667085);
}

.mobile-account-guest__actions {
  display: grid;
  gap: 10px;
}

.mobile-account-guest__actions .button {
  justify-content: center;
}

.settings-page>.card {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.settings-page>.card>.form {
  flex: 1;
}

.settings-page>.card>.form>.button:last-child {
  margin-top: auto;
}

.cloud-storage-card {
  grid-column: 1 / -1;
}

.cloud-storage-form {
  align-content: start;
}

.cloud-storage-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  align-items: end;
}

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

/* 管理后台 · 基本 / 运行 / 存储配置（上标签 + 下控件） */
body.page-admin .admin-settings-panel.card {
  padding: 0;
  overflow: hidden;
}

body.page-admin .admin-settings-panel .card-head.admin-settings-panel__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px 16px;
  margin: 0;
  padding: 20px 24px 16px;
  border-bottom: 1px solid #f0f0f0;
}

body.page-admin .admin-settings-panel .card-head.admin-settings-panel__head::after {
  display: none;
}

body.page-admin .admin-settings-panel__head h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 650;
  letter-spacing: -0.02em;
}

body.page-admin .admin-settings-panel__desc {
  margin: 6px 0 0;
  font-size: 13px;
  line-height: 1.5;
  color: #8c8c8c;
  font-weight: 400;
}

body.page-admin .admin-settings-form {
  margin: 0;
}

body.page-admin .admin-settings-sheet {
  max-width: 720px;
  padding: 4px 24px 8px;
}

body.page-admin .admin-form-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 6px;
  align-items: start;
  padding: 14px 0;
  border-bottom: 1px solid #fafafa;
}

body.page-admin .admin-form-row__label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #434343;
  line-height: 1.45;
}

body.page-admin .admin-form-row__control {
  min-width: 0;
  width: min(100%, 400px);
}

body.page-admin .admin-form-row__hint {
  margin: 4px 0 0;
  font-size: 12px;
  line-height: 1.5;
  color: #8c8c8c;
}

body.page-admin .admin-form-row--switch-group {
  padding: 14px 0;
}

body.page-admin .admin-settings-switch-grid {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 12px;
  width: 100%;
  max-width: none;
}

body.page-admin .admin-settings-switch-item {
  flex: 1 1 0;
  min-width: 0;
  padding: 12px 14px;
  border: 1px solid #f0f0f0;
  border-radius: 8px;
  background: #fafafa;
}

body.page-admin .admin-settings-switch-item__label {
  display: block;
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 600;
  color: #434343;
  line-height: 1.4;
}

body.page-admin .admin-settings-switch-item__hint {
  margin: 8px 0 0;
  font-size: 11px;
  line-height: 1.45;
  color: #8c8c8c;
}

body.page-admin .admin-settings-form .admin-input--sm {
  width: 120px;
  max-width: 100%;
}

body.page-admin .admin-settings-form .admin-input--md {
  width: 240px;
  max-width: 100%;
}

body.page-admin .admin-settings-form .admin-input--lg {
  width: min(100%, 400px);
  max-width: 400px;
}

body.page-admin .admin-settings-form .admin-input--textarea {
  width: min(100%, 400px);
  max-width: 400px;
  min-height: 88px;
  resize: vertical;
}

body.page-admin .admin-settings-form .admin-input--file {
  width: min(100%, 360px);
  max-width: 360px;
  height: auto;
  padding: 8px 0;
  border: 0;
  background: transparent;
}

body.page-admin .admin-check-line,
body.page-admin .admin-radio-line {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 13px;
  color: #262626;
  cursor: pointer;
  user-select: none;
}

body.page-admin .admin-check-line--sub {
  margin-top: 8px;
  font-size: 12px;
  color: #595959;
}

body.page-admin .admin-check-line input,
body.page-admin .admin-radio-line input {
  width: 16px;
  height: 16px;
  margin: 0;
  flex-shrink: 0;
  accent-color: #1677ff;
}

body.page-admin .admin-radio-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

body.page-admin .admin-settings-inline-note {
  margin: 4px 0 0;
  padding: 8px 12px;
  border-radius: 8px;
  background: #f5f9ff;
  border: 1px solid #e6f4ff;
  font-size: 12px;
  line-height: 1.55;
  color: #595959;
}

body.page-admin .admin-settings-inline-note code {
  font-size: 11px;
  padding: 1px 4px;
  border-radius: 4px;
  background: #fff;
}

body.page-admin .admin-settings-inline-note a {
  font-weight: 600;
}

body.page-admin .admin-settings-subpanel {
  margin: 4px 0 8px;
  padding: 12px 14px 4px;
  border-radius: 8px;
  border: 1px solid #f0f0f0;
  background: #fafafa;
}

body.page-admin .admin-settings-subpanel .admin-form-row__control {
  width: min(100%, 360px);
}

body.page-admin .admin-settings-subpanel .admin-form-row {
  border-bottom-color: #f0f0f0;
}

body.page-admin .admin-settings-subpanel .admin-form-row:last-child {
  border-bottom: 0;
}

body.page-admin .admin-settings-thumb {
  width: 120px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #e8e8e8;
  background: #fff;
}

body.page-admin .admin-settings-thumb--logo {
  width: 72px;
}

body.page-admin .admin-settings-thumb img {
  display: block;
  width: 100%;
  height: auto;
}

body.page-admin .admin-settings-actions {
  position: sticky;
  bottom: 0;
  z-index: 2;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 8px;
  padding: 14px 24px 20px;
  border-top: 1px solid #f0f0f0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92) 0%, #fff 24%);
}

body.page-admin .admin-settings-actions .button.primary {
  min-width: 148px;
}

@media (max-width: 768px) {
  body.page-admin .admin-settings-sheet {
    padding-left: 16px;
    padding-right: 16px;
  }

  body.page-admin .admin-form-row__control,
  body.page-admin .admin-settings-subpanel .admin-form-row__control {
    width: 100%;
  }

  body.page-admin .admin-settings-switch-grid {
    flex-wrap: wrap;
  }

  body.page-admin .admin-settings-switch-item {
    flex: 1 1 calc(50% - 6px);
    min-width: 140px;
  }

  body.page-admin .admin-settings-form .admin-input--sm,
  body.page-admin .admin-settings-form .admin-input--md,
  body.page-admin .admin-settings-form .admin-input--lg,
  body.page-admin .admin-settings-form .admin-input--textarea,
  body.page-admin .admin-settings-form .admin-input--file {
    width: 100%;
    max-width: none;
  }

  body.page-admin .admin-settings-actions {
    padding-left: 16px;
    padding-right: 16px;
  }
}

.switch-field {
  min-height: 40px;
  display: flex;
  align-items: center;
  gap: 10px;
  align-self: end;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: #fbfdff;
  padding: 0 12px;
  color: #475467;
  font-size: 13px;
  font-weight: 760;
}

.switch-field input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--primary);
}

.settings-page textarea {
  min-height: 104px;
}

.card,
.stat-card {
  min-width: 0;
  border: none;
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-1);
}

.card {
  padding: calc(var(--unit) * 6);
}

.section-card {
  margin-top: 18px;
}

.card-head {
  min-height: 40px;
  margin-bottom: 16px;
}

.card-head h2 {
  display: flex;
  align-items: center;
  gap: 8px;
}

.form {
  gap: 13px;
}

.field span {
  color: #475467;
  font-size: 13px;
  font-weight: 760;
}

input,
select,
textarea {
  border-color: var(--line);
  border-radius: var(--radius-btn);
  background: #fff;
  color: var(--text);
}

input,
select {
  height: 32px;
}

textarea {
  min-height: 144px;
}

input:hover,
select:hover,
textarea:hover {
  border-color: var(--primary-hover);
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--primary);
  box-shadow: var(--focus-ring);
}

.button {
  min-height: 32px;
  border-radius: var(--radius-btn);
  font-size: 14px;
  font-weight: 500;
  box-shadow: none;
}

.button.large {
  min-height: 40px;
}

.button.primary {
  border-color: transparent;
  background: var(--primary);
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.02);
}

.button.primary:hover {
  filter: none;
  background: var(--primary-hover);
}

.button.secondary {
  border-color: #d0d5dd;
  background: #fff;
  color: #344054;
}

.button.secondary:hover,
.button.secondary.active {
  border-color: #98a2b3;
  background: #f2f4f7;
  color: #101828;
}

.button.online-action {
  border-color: rgba(var(--primary-rgb), 0.32);
  background: rgba(239, 246, 255, 0.95);
  color: var(--primary-active);
}

.button.online-action:hover,
.button.online-action:focus-visible {
  border-color: rgba(var(--primary-rgb), 0.45);
  background: #dbeafe;
  color: var(--primary-active);
}

.button.danger {
  border-color: #fecdca;
  background: #fff;
}

.badge,
.status {
  min-height: 26px;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0 9px;
  font-size: 12px;
  font-weight: 800;
}

.badge {
  border-color: #d0d5dd;
  background: #fff;
}

.alert,
.inline-message,
.generation-notice {
  border-radius: 8px;
  box-shadow: none;
}

.generation-notice {
  border-color: #f6d58b;
  background: #fffaf0;
}

.mode-toggle {
  gap: 10px;
}

.mode-toggle label {
  min-height: 40px;
  border-radius: 8px;
  background: #f8fafc;
}

.mode-toggle label:has(input:checked) {
  border-color: rgba(var(--primary-rgb), 0.35);
  background: rgba(239, 246, 255, 0.95);
  color: var(--primary-dark);
}

.edit-upload-preview {
  grid-template-columns: repeat(auto-fill, minmax(78px, 88px));
}

.preview-card {
  display: grid;
  grid-template-rows: auto minmax(520px, 1fr);
}

.preview-stage {
  min-height: 520px;
  border: 1px solid #e4e7ec;
  border-radius: 10px;
  background:
    linear-gradient(45deg, #f8fafc 25%, transparent 25%),
    linear-gradient(-45deg, #f8fafc 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #f8fafc 75%),
    linear-gradient(-45deg, transparent 75%, #f8fafc 75%),
    #fff;
  background-position: 0 0, 0 12px, 12px -12px, -12px 0;
  background-size: 24px 24px;
}

.preview-stage img {
  max-width: calc(100% - 24px);
  max-height: calc(100% - 24px);
  border-radius: 8px;
  box-shadow: 0 18px 42px rgba(16, 24, 40, 0.14);
}

.history-list {
  gap: 14px;
  padding-bottom: 4px;
}

.history-list .record-card {
  border-color: #e4e7ec;
  border-radius: 10px;
  background: #fff;
  box-shadow: none;
}

.history-list .record-card:hover {
  border-color: #b9c3d0;
  box-shadow: 0 12px 26px rgba(16, 24, 40, 0.08);
}

.history-list .record-image {
  border-radius: 8px;
  background: #f2f4f7;
}

.record-meta span:first-child:not(.status) {
  font-weight: 850;
}

.record-body p,
.admin-prompt-cell {
  color: #475467;
}

.admin-nav {
  gap: 8px;
  margin-bottom: 18px;
  padding: 6px;
  border: 1px solid #e4e7ec;
  border-radius: 10px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.admin-nav .button {
  min-height: 36px;
  border: 0;
}

.admin-nav .button.secondary.active {
  background: var(--primary);
  color: #fff;
}

.site-footer {
  margin-top: 22px;
  padding: 14px 0 4px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

.site-footer p {
  margin: 0;
}

.site-footer a {
  color: var(--primary-dark);
  font-weight: 750;
}

.site-footer--page {
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
  padding: 12px 16px 16px;
  color: #98a2b3;
  font-size: 12px;
  line-height: 1.55;
  text-align: center;
  box-sizing: border-box;
}

.site-footer--page p {
  margin: 0;
}

body.page-auth .site-footer--auth {
  flex-shrink: 0;
  width: min(100%, 520px);
  max-width: 520px;
  margin: 0 auto;
  padding: 10px 16px max(14px, env(safe-area-inset-bottom, 0px));
  color: #98a2b3;
  font-size: 12px;
  line-height: 1.55;
  text-align: center;
  box-sizing: border-box;
}

body.page-auth .site-footer--auth p {
  margin: 0;
}

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

.stat-card {
  min-height: 96px;
  padding: 16px;
  background: linear-gradient(180deg, #fff 0%, #fbfcfe 100%);
}

.stat-card span {
  color: #667085;
  font-size: 12px;
  font-weight: 760;
}

.stat-card strong {
  margin-top: 8px;
  color: #101828;
  font-size: 26px;
  font-weight: 880;
}

.table-wrap {
  border: 1px solid #e4e7ec;
  border-radius: 10px;
  background: #fff;
}

table {
  border-collapse: separate;
  border-spacing: 0;
}

th,
td {
  border-bottom: 1px solid #eaecf0;
  padding: 12px 14px;
}

th {
  background: #f8fafc;
  color: #667085;
  font-size: 12px;
  text-transform: uppercase;
}

tbody tr:hover td {
  background: #fbfcfe;
}

tr:last-child td {
  border-bottom: 0;
}

.table-thumb {
  width: 52px;
  height: 52px;
  border-radius: 8px;
}

.inline-admin-form,
.table-action-group {
  gap: 7px;
}

.compact-input {
  height: 34px;
  border-radius: 7px;
}

.filter-bar {
  grid-template-columns: minmax(260px, 1fr) minmax(170px, 220px) auto;
  padding: 12px;
  border: 1px solid #e4e7ec;
  border-radius: 10px;
  background: #fbfdff;
}

.filter-bar.admin-record-filter {
  grid-template-columns: minmax(180px, 1fr) minmax(120px, 150px) minmax(130px, 160px) auto;
}

.filter-bar.admin-user-filter {
  grid-template-columns: minmax(180px, 1fr) minmax(220px, 1.2fr) auto;
}

.filter-bar.admin-orders-filter {
  grid-template-columns: minmax(130px, 150px) repeat(2, minmax(0, 1fr)) minmax(0, 1fr) auto;
  gap: 12px 14px;
  align-items: end;
}

@media (max-width: 1100px) {
  .filter-bar.admin-orders-filter {
    grid-template-columns: repeat(2, minmax(0, 1fr)) auto;
  }
}

@media (max-width: 640px) {
  .filter-bar.admin-orders-filter {
    grid-template-columns: 1fr;
  }

  .filter-bar.admin-orders-filter .filter-actions {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }
}

.admin-orders-bulk-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 12px;
  margin-bottom: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line, #e4e7ec);
  border-radius: 10px;
  background: #f8fafc;
}

.admin-orders-export-form {
  margin-top: 4px;
}

.admin-orders-table .admin-orders-check-col {
  width: 40px;
  text-align: center;
  vertical-align: middle;
}

.admin-orders-table .admin-orders-check-col input[type="checkbox"] {
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.code-create-card {
  background: linear-gradient(180deg, #fff 0%, #fbfcfe 100%);
}

.code-create-form {
  grid-template-columns: repeat(4, minmax(160px, 1fr)) auto;
}

.auth-dashboard {
  min-height: calc(100vh - 140px);
  grid-template-columns: minmax(0, 1fr) minmax(380px, 440px);
}

.auth-info,
.auth-form-card {
  min-height: 540px;
  border-radius: 10px;
}

.auth-info {
  background:
    linear-gradient(135deg, rgba(var(--primary-rgb), 0.12), transparent 42%),
    linear-gradient(180deg, #fff 0%, #f7fafc 100%);
}

.auth-info h2 {
  max-width: 620px;
  color: #101828;
}

.auth-info p {
  max-width: 560px;
  color: #475467;
}

.auth-tag {
  border-color: rgba(var(--primary-rgb), 0.22);
  background: rgba(239, 246, 255, 0.95);
  color: var(--primary-dark);
}

.auth-metrics div {
  border-color: #e4e7ec;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
}

.record-dialog-panel,
.redeem-panel {
  border-radius: 10px;
}

.record-dialog-head,
.redeem-head {
  border-bottom: 1px solid #eaecf0;
  background: #f8fafc;
}

.record-dialog-image {
  border-radius: 10px;
  background: #f8fafc;
}

.record-detail-grid > div,
.record-full-prompt,
.record-input-images {
  border-color: #e4e7ec;
  border-radius: 10px;
}

.image-viewer-toolbar button,
.image-viewer-toolbar span {
  border-radius: 8px;
}

@media (max-width: 1180px) {
  .app-shell {
    width: calc(100% - 24px);
    max-width: 1180px;
  }

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

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

@media (max-width: 980px) {
  .app-topbar {
    position: static;
  }

  .two-col,
  .settings-page,
  .auth-dashboard {
    grid-template-columns: 1fr;
  }

  .cloud-storage-card {
    grid-column: auto;
  }

  .cloud-storage-grid,
  .storage-options-grid {
    grid-template-columns: 1fr;
  }

  .settings-tab-nav {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
    padding: 6px;
  }

  .settings-tab-nav button {
    min-height: 38px;
    padding: 0 6px;
    font-size: 13px;
  }

  .preview-card {
    grid-template-rows: auto minmax(340px, auto);
  }

  .preview-stage {
    min-height: 340px;
  }
}

@media (max-width: 720px) {
  .app-shell {
    width: calc(100% - 16px);
    max-width: 720px;
    padding-top: 8px;
  }

  .app-topbar,
  .card,
  .stat-card,
  .admin-nav-shell,
  .admin-nav,
  .table-wrap {
    border-radius: 8px;
  }

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

  .stats-grid,
  .filter-bar,
  .code-create-form,
  .field-grid {
    grid-template-columns: 1fr;
  }

  .auth-info,
  .auth-form-card {
    min-height: auto;
  }

  .auth-info h2 {
    font-size: 26px;
  }

  .history-list .record-card {
    min-height: 112px;
  }

  th,
  td {
    padding: 10px 12px;
  }
}

@media (max-width: 720px) {

  html,
  body.page-app,
  body.page-records,
  body.page-help,
  body.page-account,
  body.page-admin {
    min-width: 0;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    overscroll-behavior-x: none;
  }

  body.page-app,
  body.page-records,
  body.page-account,
  body.page-help {
    /*
     * pan-y 易触发「先判滚动再派发点击」，底部固定导航上表现为明显的 ~300ms 延迟甚至丢点击。
     * manipulation 保留纵向滚动与缩放手势，并取消双击缩放等待，显著改善底栏与其它可点区域的响应。
     */
    position: relative;
    touch-action: manipulation;
  }

  body.page-admin {
    position: relative;
    touch-action: pan-y;
  }

  body.page-app .app-shell,
  body.page-records .app-shell,
  body.page-help .app-shell,
  body.page-account .app-shell,
  body.page-admin .app-shell {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    padding-right: 8px;
    padding-left: 8px;
  }

  body.page-app main,
  body.page-app section,
  body.page-app form,
  body.page-app label,
  body.page-app input,
  body.page-app select,
  body.page-app textarea,
  body.page-app button,
  body.page-records main,
  body.page-records section,
  body.page-records form,
  body.page-records label,
  body.page-records input,
  body.page-records select,
  body.page-records textarea,
  body.page-records button,
  body.page-help main,
  body.page-help section,
  body.page-help form,
  body.page-help label,
  body.page-help input,
  body.page-help select,
  body.page-help textarea,
  body.page-help button,
  body.page-account main,
  body.page-account section,
  body.page-account form,
  body.page-account label,
  body.page-account input,
  body.page-account select,
  body.page-account textarea,
  body.page-account button,
  body.page-admin main,
  body.page-admin section,
  body.page-admin form,
  body.page-admin label,
  body.page-admin input,
  body.page-admin select,
  body.page-admin textarea,
  body.page-admin button {
    max-width: 100%;
    min-width: 0;
  }

  body.page-app .app-topbar,
  body.page-app .card,
  body.page-app .preview-stage,
  body.page-app .history-list,
  body.page-app .history-list .record-card,
  body.page-records .card,
  body.page-records .history-list,
  body.page-records .history-list .record-card,
  body.page-help .card,
  body.page-account .card,
  body.page-admin .card,
  body.page-admin .stat-card {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-x: visible;
  }

  body.page-admin .admin-layout,
  body.page-admin .admin-nav-shell,
  body.page-admin .admin-nav,
  body.page-admin .table-wrap,
  body.page-admin .table-scroll {
    width: 100%;
    max-width: min(100%, calc(100vw - 16px));
    min-width: 0;
  }

  body.page-admin .card-head {
    flex-wrap: wrap;
    gap: 10px;
  }

  body.page-admin .card-head-actions {
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-start;
  }

  body.page-admin .filter-bar {
    grid-template-columns: 1fr !important;
  }

  body.page-admin .filter-actions {
    width: 100%;
    justify-content: stretch;
  }

  body.page-admin .filter-actions .button {
    flex: 1;
    min-width: 0;
  }

  body.page-admin .code-create-form {
    grid-template-columns: 1fr !important;
  }

  body.page-admin .settings-tab-nav:not(.settings-tab-nav-links) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body.page-app .topbar-right,
  body.page-app .topbar-nav,
  body.page-app .topbar-account {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  body.page-app .topbar-account {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  body.page-app .topbar-nav a,
  body.page-app .topbar-account .balance,
  body.page-app .topbar-account .nav-redeem,
  body.page-app .topbar-account .logout-link {
    min-width: 0;
    padding-right: 6px;
    padding-left: 6px;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  body.page-app .card-head,
  body.page-records .card-head,
  body.page-help .card-head,
  body.page-admin .card-head {
    min-width: 0;
    max-width: 100%;
  }

  body.page-app textarea {
    overflow-wrap: anywhere;
  }

  body.page-app .workspace-main {
    grid-template-columns: minmax(0, 1fr);
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  body.page-app .workspace-card.workspace-card--creative {
    min-width: 0;
    max-width: 100%;
    overflow-x: hidden;
  }

  body.page-app .workspace-card--creative .workspace-card-generation-notice {
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  body.page-app .workspace-create-shell {
    min-width: 0;
    max-width: 100%;
  }

  body.page-app .workspace-ai-hint-wrap {
    min-width: 0;
    max-width: 100%;
  }
}

/* Polished motion and depth layer（焦点环与 UnivDesign 宪法一致） */
:root {
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-soft: cubic-bezier(0.16, 1, 0.3, 1);
  --ring: var(--focus-ring);
  --shadow-lift: var(--shadow-3);
}

html {
  scroll-behavior: smooth;
}

body {
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a,
button,
.button,
.topbar-nav a,
.topbar-account .balance,
.topbar-account .nav-redeem,
.topbar-account .logout-link,
.mode-toggle label,
.record-card,
.stat-card,
.table-thumb,
.record-input-image-button,
.record-dialog-image-button,
.dialog-close {
  transition:
    transform 0.22s var(--ease-out),
    border-color 0.22s var(--ease-out),
    background-color 0.22s var(--ease-out),
    color 0.22s var(--ease-out),
    box-shadow 0.22s var(--ease-out),
    opacity 0.22s var(--ease-out);
}

input,
select,
textarea {
  transition:
    border-color 0.2s var(--ease-out),
    box-shadow 0.2s var(--ease-out),
    background-color 0.2s var(--ease-out);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
.record-card:focus-visible {
  outline: none;
  box-shadow: var(--ring);
}

.app-topbar {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0.9));
  backdrop-filter: blur(18px) saturate(1.18);
}

.topbar-brand:hover .brand-mark {
  transform: translateY(-1px) scale(1.03);
  box-shadow: 0 14px 26px rgba(var(--primary-rgb), 0.26);
}

.topbar-nav a.active,
.topbar-account .nav-redeem,
.button.primary {
  background: var(--primary);
}

.topbar-nav a.active:hover,
.topbar-account .nav-redeem:hover,
.button.primary:hover {
  background: var(--primary-hover);
}

.topbar-nav a:not(.active):hover,
.topbar-account .logout-link:hover,
.button.secondary:hover,
.dialog-close:hover {
  transform: translateY(-1px);
}

.button:not(:disabled):active,
.topbar-nav a:active,
.topbar-account .nav-redeem:active,
.dialog-close:active,
.mode-toggle label:active {
  transform: translateY(0) scale(0.985);
}

.button.primary:hover,
.topbar-account .nav-redeem:hover {
  box-shadow: 0 2px 8px rgba(var(--primary-rgb), 0.4);
}

.card,
.stat-card,
.auth-info,
.auth-form-card,
.history-list .record-card {
  background: var(--surface);
  border: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

.card,
.stat-card,
.history-list .record-card {
  box-shadow: var(--shadow-1);
}

.history-list .record-card:hover {
  background: var(--surface);
  box-shadow: var(--shadow-2);
}

.record-meta .status {
  flex: 0 0 auto;
  min-height: 24px;
  padding: 0 8px;
  font-size: 12px;
  line-height: 1.25;
  font-weight: 600;
}

.record-meta .status.succeeded {
  border-color: rgba(var(--primary-rgb), 0.28);
  background: rgba(239, 246, 255, 0.95);
  color: var(--primary-active);
}

.record-meta .status.failed {
  border-color: #fecaca;
  background: var(--danger-soft);
  color: var(--danger);
}

.record-meta .status.running,
.record-meta .status.queued {
  border-color: rgba(var(--primary-rgb), 0.28);
  background: rgba(239, 246, 255, 0.95);
  color: var(--primary-active);
}

/* 记录页缩略图占位：与「已生成」同系蓝，覆盖全局 .status.running 黄底 */
body.page-records .record-image .status.running,
body.page-records .record-image .status.queued {
  border-color: rgba(var(--primary-rgb), 0.28);
  background: rgba(239, 246, 255, 0.95);
  color: var(--primary-active);
}

.record-meta .status.deleted {
  border-color: var(--line-strong);
  background: #f2f4f7;
  color: var(--muted);
}

.card-head {
  position: relative;
}

.card-head::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -9px;
  left: 0;
  height: 1px;
  background: linear-gradient(90deg, rgba(var(--primary-rgb), 0.2), rgba(228, 231, 236, 0.72), transparent);
}

.badge {
  background: linear-gradient(180deg, #fff, #f8fafc);
}

.generation-notice {
  position: relative;
  overflow: hidden;
}

.generation-notice::before {
  content: "";
  position: absolute;
  top: 10px;
  bottom: 10px;
  left: 0;
  width: 3px;
  border-radius: 999px;
  background: #d99a18;
}

.mode-toggle label {
  position: relative;
  overflow: hidden;
}

.mode-toggle label:has(input:checked) {
  box-shadow: inset 0 0 0 1px rgba(var(--primary-rgb), 0.12), 0 8px 20px rgba(var(--primary-rgb), 0.1);
}

.mode-toggle label:has(input:checked)::after {
  content: "";
  position: absolute;
  right: 12px;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--primary);
  box-shadow: 0 0 0 4px rgba(var(--primary-rgb), 0.12);
}

select {
  appearance: none;
  padding-right: 36px;
  background-image:
    linear-gradient(45deg, transparent 50%, #667085 50%),
    linear-gradient(135deg, #667085 50%, transparent 50%);
  background-position:
    calc(100% - 18px) 18px,
    calc(100% - 13px) 18px;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}

textarea::placeholder,
input::placeholder {
  color: #98a2b3;
}

.edit-upload-box {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(248, 250, 252, 0.92)),
    #f8fafc;
}

.edit-upload-box:hover {
  transform: translateY(-1px);
}

.edit-preview-item,
.table-thumb,
.record-input-image-button {
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
}

.preview-stage {
  position: relative;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.preview-stage::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.28), transparent 34%),
    radial-gradient(circle at 50% 0%, rgba(var(--primary-rgb), 0.08), transparent 46%);
}

.preview-stage>* {
  position: relative;
  z-index: 1;
}

.preview-stage img {
  animation: fadeLift 0.42s var(--ease-soft);
}

.empty-state,
.preview-loading,
.preview-error,
.history-empty-inline {
  box-shadow: 0 10px 28px rgba(16, 24, 40, 0.06);
}

.preview-spinner {
  border-color: rgba(var(--primary-rgb), 0.14);
  border-top-color: var(--primary);
}

.history-list .record-card {
  transform: translateZ(0);
}

.history-list .record-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lift);
}

.history-list .record-card:hover .record-image img,
.table-thumb:hover img,
.record-input-image-button:hover img {
  transform: scale(1.035);
}

.record-image img,
.table-thumb img,
.record-input-image-button img,
.record-dialog-image img {
  transition: transform 0.42s var(--ease-soft);
}

.record-delete:hover,
.button.danger:hover {
  transform: translateY(-1px);
}

.stat-card:hover {
  transform: translateY(-2px);
  border-color: #d0d5dd;
  box-shadow: var(--shadow-lift);
}

tbody tr td {
  transition: background-color 0.18s var(--ease-out);
}

.redeem-dialog,
.record-dialog,
.generation-overlay,
.image-viewer {
  animation: overlayIn 0.22s var(--ease-out);
}

.redeem-panel,
.record-dialog-panel,
.generation-modal {
  animation: panelIn 0.28s var(--ease-soft);
}

.image-viewer-stage img {
  animation: viewerIn 0.28s var(--ease-soft);
}

.jpt-layer-root {
  position: relative;
  z-index: 10040;
}

.jpt-toast-stack {
  position: fixed;
  top: 22px;
  right: 22px;
  z-index: 10060;
  display: grid;
  gap: 10px;
  width: min(360px, calc(100vw - 32px));
  pointer-events: none;
}

.jpt-toast {
  min-height: 40px;
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  border: 1px solid rgba(228, 231, 236, 0.94);
  border-radius: 10px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.96);
  color: var(--text-soft);
  box-shadow: 0 18px 44px rgba(16, 24, 40, 0.14);
  backdrop-filter: blur(18px) saturate(1.12);
  cursor: pointer;
  font-size: 14px;
  font-weight: 760;
  line-height: 1.45;
  overflow-wrap: anywhere;
  pointer-events: auto;
  animation: toastIn 0.28s var(--ease-soft);
}

.jpt-toast.is-leaving {
  animation: toastOut 0.18s var(--ease-out) forwards;
}

.jpt-toast-icon {
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: var(--primary);
}

.jpt-toast-icon {
  width: 18px;
  height: 18px;
  box-shadow: 0 0 0 4px rgba(var(--primary-rgb), 0.11);
}

.jpt-toast-icon::after {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: inherit;
  background: #fff;
}

.jpt-toast.success {
  border-color: rgba(var(--primary-rgb), 0.28);
  color: var(--primary-active);
}

.jpt-toast.error {
  border-color: #fecdca;
  color: var(--danger);
}

.jpt-toast.warning {
  border-color: #fed7aa;
  color: var(--warning);
}

.jpt-toast.info {
  border-color: #d0d5dd;
}

.jpt-toast.success .jpt-toast-icon {
  background: var(--success);
}

.jpt-toast.error .jpt-toast-icon {
  background: var(--danger);
  box-shadow: 0 0 0 4px rgba(217, 45, 32, 0.1);
}

.jpt-toast.warning .jpt-toast-icon {
  background: var(--warning);
  box-shadow: 0 0 0 4px rgba(183, 121, 31, 0.12);
}

.jpt-toast.info .jpt-toast-icon {
  background: #475467;
  box-shadow: 0 0 0 4px rgba(71, 84, 103, 0.1);
}

.jpt-layer-overlay {
  position: fixed;
  inset: 0;
  z-index: 10050;
  display: grid;
  place-items: center;
  align-content: center;
  justify-content: center;
  padding: max(20px, env(safe-area-inset-top, 0px)) max(20px, env(safe-area-inset-right, 0px))
    max(20px, env(safe-area-inset-bottom, 0px)) max(20px, env(safe-area-inset-left, 0px));
  box-sizing: border-box;
  background: var(--modal-overlay-bg);
  backdrop-filter: blur(var(--modal-overlay-blur));
  -webkit-backdrop-filter: blur(var(--modal-overlay-blur));
  animation: overlayIn 0.22s var(--ease-out);
}

.jpt-layer-overlay.is-leaving {
  animation: overlayOut 0.18s var(--ease-out) forwards;
}

.jpt-layer-panel {
  width: min(340px, calc(100vw - 32px));
  overflow: hidden;
  border: var(--modal-panel-border);
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 24px 48px rgba(16, 24, 40, 0.16);
  animation: panelIn 0.28s var(--ease-soft);
}

.jpt-layer-overlay.is-leaving .jpt-layer-panel {
  animation: panelOut 0.18s var(--ease-out) forwards;
}

.jpt-layer-body {
  padding: 28px 24px 4px;
  text-align: center;
}

.jpt-layer-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  margin: 0 auto;
  border-radius: 16px;
  background: #eff6ff;
  color: #1e80ff;
}

.jpt-layer-panel.warning .jpt-layer-badge {
  background: #fff4eb;
  color: #f79009;
}

.jpt-layer-panel.error .jpt-layer-badge,
.jpt-layer-panel--destructive .jpt-layer-badge {
  background: #fef3f2;
  color: #f04438;
}

.jpt-layer-panel.success .jpt-layer-badge {
  background: #ecfdf3;
  color: #12b76a;
}

.jpt-layer-panel.info .jpt-layer-badge {
  background: #f2f4f7;
  color: #475467;
}

.jpt-layer-body h2 {
  margin: 18px 0 0;
  font-size: 18px;
  font-weight: 800;
  color: #101828;
  line-height: 1.35;
}

.jpt-layer-body p {
  margin: 8px 0 0;
  color: #667085;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.65;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.jpt-layer-foot {
  display: flex;
  gap: 10px;
  padding: 20px 16px 16px;
}

.jpt-layer-btn {
  flex: 1 1 0;
  min-width: 0;
  min-height: 44px;
  border: 0;
  border-radius: 12px;
  padding: 0 14px;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
  transition: transform 0.12s ease, opacity 0.12s ease, box-shadow 0.12s ease;
  -webkit-tap-highlight-color: transparent;
}

.jpt-layer-btn:active {
  transform: scale(0.98);
}

.jpt-layer-btn--ghost {
  background: #f2f4f7;
  color: #344054;
}

.jpt-layer-btn--primary {
  color: #fff;
  background: linear-gradient(135deg, #1e80ff 0%, #3b9bff 100%);
  box-shadow: 0 6px 16px rgba(30, 128, 255, 0.24);
}

.jpt-layer-btn--danger {
  color: #fff;
  background: linear-gradient(135deg, #f04438 0%, #f97066 100%);
  box-shadow: 0 6px 16px rgba(240, 68, 56, 0.24);
}

.jpt-layer-foot:has(.jpt-layer-btn:only-child) .jpt-layer-btn {
  flex: 1 1 auto;
}

@keyframes fadeLift {
  from {
    transform: translateY(8px) scale(0.985);
    opacity: 0;
  }

  to {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

@keyframes overlayIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes panelIn {
  from {
    transform: translateY(12px) scale(0.98);
    opacity: 0;
  }

  to {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

@keyframes viewerIn {
  from {
    transform: scale(0.985);
    opacity: 0;
  }

  to {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes overlayOut {
  to {
    opacity: 0;
  }
}

@keyframes panelOut {
  to {
    transform: translateY(10px) scale(0.985);
    opacity: 0;
  }
}

@keyframes toastIn {
  from {
    transform: translateX(18px);
    opacity: 0;
  }

  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes toastOut {
  to {
    transform: translateX(18px);
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.001ms !important;
  }
}

@media (max-width: 720px) {
  .card-head::after {
    bottom: -8px;
  }

  .jpt-toast-stack {
    top: 12px;
    right: 10px;
    left: 10px;
    width: auto;
  }

  .jpt-layer-overlay {
    align-items: center;
    justify-content: center;
    align-content: center;
    padding: max(12px, env(safe-area-inset-top, 0px)) max(12px, env(safe-area-inset-right, 0px))
      max(12px, env(safe-area-inset-bottom, 0px)) max(12px, env(safe-area-inset-left, 0px));
  }

  .jpt-layer-panel {
    width: min(340px, calc(100vw - 24px));
    border-radius: 20px;
  }

  .jpt-layer-body {
    padding: 26px 20px 4px;
  }

  .jpt-layer-foot {
    padding: 18px 14px 14px;
  }

  .mode-toggle label:has(input:checked)::after {
    right: 10px;
  }

  .history-list .record-card:hover,
  .stat-card:hover,
  .edit-upload-box:hover {
    transform: none;
  }
}

body.page-auth:has(.center-auth-page) {
  min-height: 100vh;
  background:
    linear-gradient(180deg, #ffffff 0%, rgba(248, 250, 252, 0) 260px),
    #f6f8fb;
}

body.page-auth:has(.center-auth-page) .app-shell {
  width: min(100% - 36px, 430px);
  min-height: 100vh;
  display: grid;
  grid-template-rows: minmax(0, 1fr);
  padding: 28px 0 34px;
}

body.page-auth:has(.center-auth-register) .app-shell {
  width: min(100% - 36px, 450px);
}

.center-auth-page {
  width: 100%;
  align-self: center;
  display: grid;
  place-items: center;
  padding: 0;
}

.center-auth-panel {
  width: 100%;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.center-auth-top {
  margin-bottom: 26px;
  padding: 0;
  background: transparent;
}

.center-auth-brand {
  display: grid;
  justify-items: center;
  gap: 12px;
  width: 100%;
  max-width: 100%;
  margin: 0 auto 28px;
  color: #101828;
  text-align: center;
  text-decoration: none;
}

.center-auth-mark {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
  color: #fff;
  font-size: 19px;
  font-weight: 850;
  box-shadow: 0 14px 28px rgba(var(--primary-rgb), 0.22);
}

.center-auth-mark svg {
  width: 37px;
  height: 37px;
  display: block;
}

.center-auth-mark .icon-frame,
.center-auth-mark .icon-line,
.center-auth-mark .icon-dot {
  fill: none;
  stroke: #fff;
  stroke-width: 2.1;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.center-auth-mark .ai-spark {
  fill: #93c5fd;
  stroke: #fff;
  stroke-width: 0.6;
}

.center-auth-mark .ai-spark.small {
  fill: #fff;
  stroke: none;
  opacity: 0.92;
}

.center-auth-brand strong {
  display: block;
  color: #101828;
  font-size: 28px;
  font-weight: 850;
  line-height: 1.08;
}

.center-auth-brand small {
  display: block;
  margin-top: 5px;
  color: #667085;
  font-size: 13px;
  font-weight: 650;
  line-height: 1.2;
}

.center-auth-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  width: 100%;
  min-height: 42px;
  border: 1px solid #dfe5ec;
  border-radius: 8px;
  padding: 4px;
  background: #edf1f5;
}

.center-auth-tabs a {
  display: grid;
  place-items: center;
  border-radius: 6px;
  color: #667085;
  font-size: 14px;
  font-weight: 780;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.center-auth-tabs a.active {
  background: #fff;
  color: #101828;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.08);
}

.center-auth-tabs a:not(.active):hover {
  color: #344054;
}

.center-auth-body {
  padding: 0;
}

.center-auth-form {
  display: grid;
  gap: 13px;
}

.center-auth-register .center-auth-form {
  gap: 12px;
}

.center-auth-field {
  display: grid;
  gap: 8px;
}

.center-auth-register .center-auth-field {
  gap: 7px;
}

.center-auth-field span {
  color: #344054;
  font-size: 13px;
  font-weight: 740;
}

.center-auth-field input {
  width: 100%;
  height: 48px;
  border: 1px solid #d0d5dd;
  border-radius: 8px;
  padding: 0 14px;
  background: #fff;
  color: #101828;
  font: inherit;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.center-auth-register .center-auth-field input {
  height: 40px;
}

.center-auth-field input::placeholder {
  color: #98a2b3;
}

.center-auth-field input:hover {
  border-color: #98a2b3;
}

.center-auth-field input:focus {
  border-color: var(--primary);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.12);
}

.center-auth-submit {
  width: 100%;
  min-height: 48px;
  margin-top: 7px;
  border: 0;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
  color: #fff;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 12px 22px rgba(var(--primary-rgb), 0.2);
  transition: box-shadow 0.15s ease, filter 0.15s ease, transform 0.15s ease;
}

.center-auth-submit:hover {
  filter: brightness(0.98);
  box-shadow: 0 14px 26px rgba(var(--primary-rgb), 0.24);
}

.center-auth-submit:active {
  transform: translateY(1px);
}

@media (max-width: 720px) {
  body.page-auth:has(.center-auth-page) .app-shell {
    width: min(100% - 32px, 390px);
    padding: 14px 0 20px;
  }

  body.page-auth:has(.center-auth-register) .app-shell {
    width: min(100% - 32px, 390px);
  }

  .center-auth-page {
    padding: 0;
    align-self: start;
    padding-top: clamp(18px, 8vh, 54px);
  }

  .center-auth-top {
    margin-bottom: 20px;
  }

  .center-auth-brand {
    gap: 9px;
    margin-bottom: 24px;
  }

  .center-auth-mark {
    width: 42px;
    height: 42px;
  }

  .center-auth-mark svg {
    width: 30px;
    height: 30px;
  }

  .center-auth-brand strong {
    font-size: 22px;
  }

  .center-auth-brand small {
    margin-top: 3px;
    font-size: 11px;
  }

  .center-auth-tabs {
    min-height: 40px;
    border-radius: 8px;
  }

  .center-auth-tabs a {
    font-size: 13px;
  }

  .center-auth-form {
    gap: 12px;
  }

  .center-auth-field {
    gap: 6px;
  }

  .center-auth-field span {
    font-size: 12px;
  }

  .center-auth-field input {
    height: 40px;
    border-radius: 8px;
    font-size: 14px;
  }

  .center-auth-submit {
    min-height: 40px;
    margin-top: 6px;
    font-size: 14px;
  }
}

.mobile-menu-toggle {
  display: none;
}

@media (max-width: 720px) {
  .app-topbar {
    position: sticky;
    top: 8px;
    z-index: 1000;
    display: grid !important;
    grid-template-columns: 44px 42px !important;
    justify-content: space-between;
    align-items: center;
    gap: 0;
    min-height: 58px;
    padding: 8px 10px;
    border-radius: 14px;
    overflow: visible !important;
  }

  .topbar-brand {
    width: 44px;
    grid-template-columns: 44px !important;
    gap: 0;
    padding: 0;
  }

  .brand-copy {
    display: none;
  }

  .brand-mark {
    width: 42px;
    height: 42px;
    border-radius: 12px;
  }

  .brand-mark svg {
    width: 31px;
    height: 31px;
  }

  .mobile-menu-toggle {
    width: 42px;
    height: 42px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 8px 18px rgba(16, 24, 40, 0.08);
  }

  .mobile-menu-toggle span {
    width: 18px;
    height: 2px;
    flex: 0 0 2px;
    min-height: 2px;
    max-height: 2px;
    box-sizing: border-box;
    border-radius: 1px;
    background: var(--text);
    transition: transform 0.18s ease, opacity 0.18s ease;
  }

  .app-topbar.is-menu-open .mobile-menu-toggle span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

  .app-topbar.is-menu-open .mobile-menu-toggle span:nth-child(2) {
    opacity: 0;
  }

  .app-topbar.is-menu-open .mobile-menu-toggle span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  .topbar-right {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    left: auto;
    width: min(280px, calc(100vw - 24px));
    display: none !important;
    gap: 8px;
    padding: 10px;
    border: 1px solid rgba(228, 231, 236, 0.96);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 18px 42px rgba(16, 24, 40, 0.16);
    backdrop-filter: blur(16px) saturate(1.12);
  }

  .app-topbar.is-menu-open .topbar-right {
    display: grid !important;
  }

  .topbar-nav {
    width: 100%;
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 6px;
    padding: 4px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #f8fafc;
  }

  .topbar-nav a {
    height: 38px;
    min-height: 38px;
    justify-content: flex-start;
    border-radius: 10px;
    padding: 0 12px;
    font-size: 13px;
    font-weight: 800;
  }

  .topbar-account {
    width: 100%;
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 6px;
    padding: 4px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #f8fafc;
  }

  .topbar-account .balance {
    grid-column: auto;
    justify-content: flex-start;
  }

  .topbar-account .balance,
  .topbar-account .nav-redeem,
  .topbar-account .logout-link {
    height: 36px;
    min-height: 36px;
    justify-content: flex-start;
    padding: 0 12px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 800;
  }

  body.has-mobile-menu .app-shell {
    overflow: visible;
  }
}

@media (max-width: 420px) {
  .topbar-right {
    right: 0;
    width: min(260px, calc(100vw - 20px));
  }

  .topbar-nav a,
  .topbar-account .balance,
  .topbar-account .nav-redeem,
  .topbar-account .logout-link {
    padding: 0 6px;
    font-size: 12px;
  }
}

@media (max-width: 720px) {
  .app-topbar .topbar-right {
    min-height: 0 !important;
  }

  .app-topbar .topbar-right .topbar-nav,
  .app-topbar .topbar-right .topbar-account {
    min-height: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
    gap: 6px !important;
    padding: 6px !important;
  }

  .app-topbar .topbar-right .topbar-nav a,
  .app-topbar .topbar-right .topbar-account .balance,
  .app-topbar .topbar-right .topbar-account .nav-redeem,
  .app-topbar .topbar-right .topbar-account .logout-link {
    width: 100% !important;
    min-width: 0 !important;
    height: 38px !important;
    min-height: 38px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    padding: 0 12px !important;
    overflow: hidden !important;
    border-radius: 10px !important;
    text-align: left !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  .app-topbar .topbar-right .topbar-account .balance {
    grid-column: auto !important;
  }
}

.mobile-topbar-menu {
  display: none;
}

@media (min-width: 721px) {

  .mobile-menu-toggle,
  .mobile-topbar-menu {
    display: none !important;
  }
}

@media (max-width: 720px) {
  .app-topbar {
    position: sticky !important;
    top: 8px !important;
    z-index: 1000 !important;
    display: grid !important;
    grid-template-columns: 44px 44px !important;
    align-items: center !important;
    justify-content: space-between !important;
    min-height: 60px !important;
    padding: 8px 10px !important;
    overflow: visible !important;
    border-radius: 14px !important;
  }

  .app-topbar>.topbar-brand {
    width: 44px !important;
    min-width: 44px !important;
    display: block !important;
    padding: 0 !important;
  }

  .app-topbar>.topbar-brand .brand-copy {
    display: none !important;
  }

  .app-topbar>.topbar-brand .brand-mark {
    width: 44px !important;
    height: 40px !important;
    border-radius: 13px !important;
  }

  .app-topbar>.topbar-brand .brand-mark svg {
    width: 32px !important;
    height: 32px !important;
  }

  .app-topbar>.topbar-right {
    display: none !important;
  }

  .mobile-menu-toggle {
    width: 44px !important;
    height: 40px !important;
    display: flex !important;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px !important;
    padding: 0 !important;
    border: 1px solid var(--line) !important;
    border-radius: 13px !important;
    background: #fff !important;
    box-shadow: 0 8px 18px rgba(16, 24, 40, 0.08) !important;
  }

  .mobile-menu-toggle span {
    width: 18px !important;
    height: 2px !important;
    flex: 0 0 2px;
    min-height: 2px;
    max-height: 2px;
    display: block !important;
    box-sizing: border-box;
    border-radius: 1px !important;
    background: var(--text) !important;
    transition: transform 0.18s ease, opacity 0.18s ease !important;
  }

  .app-topbar.is-menu-open .mobile-menu-toggle span:nth-child(1) {
    transform: translateY(7px) rotate(45deg) !important;
  }

  .app-topbar.is-menu-open .mobile-menu-toggle span:nth-child(2) {
    opacity: 0 !important;
  }

  .app-topbar.is-menu-open .mobile-menu-toggle span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg) !important;
  }

  .mobile-topbar-menu {
    position: absolute !important;
    top: calc(100% + 8px) !important;
    right: 0 !important;
    width: min(280px, calc(100vw - 24px)) !important;
    display: none !important;
    padding: 10px !important;
    border: 1px solid rgba(228, 231, 236, 0.96) !important;
    border-radius: 14px !important;
    background: rgba(255, 255, 255, 0.98) !important;
    box-shadow: 0 18px 42px rgba(16, 24, 40, 0.16) !important;
    backdrop-filter: blur(16px) saturate(1.12) !important;
  }

  .app-topbar.is-menu-open .mobile-topbar-menu {
    display: grid !important;
    gap: 8px !important;
  }

  .mobile-menu-balance {
    min-width: 0 !important;
    min-height: 40px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    padding: 0 12px !important;
    overflow: hidden !important;
    border: 1px solid rgba(var(--primary-rgb), 0.22) !important;
    border-radius: 11px !important;
    background: rgba(239, 246, 255, 0.95) !important;
    color: var(--primary-dark) !important;
    font-size: 13px !important;
    font-weight: 850 !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  .mobile-menu-nav,
  .mobile-menu-actions {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 6px !important;
  }

  .mobile-menu-nav a,
  .mobile-menu-actions a,
  .mobile-menu-actions button {
    width: 100% !important;
    min-width: 0 !important;
    min-height: 40px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    padding: 0 12px !important;
    border: 1px solid transparent !important;
    border-radius: 11px !important;
    background: #f8fafc !important;
    color: var(--text-soft) !important;
    font-size: 13px !important;
    font-weight: 800 !important;
    text-align: left !important;
    text-decoration: none !important;
  }

  .mobile-menu-nav a.active,
  .mobile-menu-actions button {
    border-color: #065f46 !important;
    background: #065f46 !important;
    color: #fff !important;
  }

  .mobile-menu-nav a:not(.active):hover,
  .mobile-menu-actions a:hover {
    border-color: #d0d5dd !important;
    background: #eef2f6 !important;
    color: var(--text) !important;
  }
}

@media (max-width: 380px) {
  .mobile-topbar-menu {
    width: min(260px, calc(100vw - 18px)) !important;
  }
}

.site-header {
  position: sticky;
  top: 12px;
  z-index: 1000;
  display: grid;
  grid-template-columns: minmax(180px, auto) minmax(260px, 1fr) auto;
  align-items: center;
  gap: 14px;
  min-height: 66px;
  margin-bottom: 18px;
  padding: 10px 12px;
  border: 1px solid rgba(228, 231, 236, 0.92);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 10px 30px rgba(16, 24, 40, 0.07);
  backdrop-filter: blur(16px) saturate(1.12);
}

.site-brand {
  min-width: 0;
  display: inline-grid;
  grid-template-columns: 42px minmax(0, auto);
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
}

.site-brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.22) 0%, rgba(var(--primary-rgb), 0.18) 100%);
  box-shadow: 0 10px 20px rgba(var(--primary-rgb), 0.16);
}

.site-brand-mark svg {
  width: 31px;
  height: 31px;
  display: block;
}

.site-brand-mark img {
  width: 100%;
  height: 100%;
  display: block;
  border-radius: inherit;
  object-fit: cover;
}

.site-brand-mark .icon-frame,
.site-brand-mark .icon-line,
.site-brand-mark .icon-dot {
  fill: none;
  stroke: #ffffff;
  stroke-width: 2.1;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.site-brand-mark .ai-spark {
  fill: #93c5fd;
  stroke: #ffffff;
  stroke-width: 0.6;
}

.site-brand-mark .ai-spark.small {
  fill: #ffffff;
  stroke: none;
  opacity: 0.92;
}

.site-brand-name {
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  font-size: 20px;
  font-weight: 850;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.site-nav {
  justify-self: center;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f8fafc;
}

.site-nav a {
  height: 36px;
  min-width: 76px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  padding: 0 14px;
  color: var(--text-soft);
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
}

.site-nav a.active {
  background: var(--primary-dark);
  color: #fff;
  box-shadow: 0 8px 18px rgba(var(--primary-rgb), 0.22);
}

.site-actions {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.site-balance,
.site-action {
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  padding: 0 12px;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.site-balance {
  min-width: 0;
  max-width: 180px;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--primary) 18%, #ffffff);
  background: color-mix(in srgb, var(--primary) 8%, #ffffff);
  color: var(--primary-dark);
  text-overflow: ellipsis;
}

.site-mobile-balance {
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  padding: 0 12px;
  font-size: 13px;
  font-weight: 900;
  border: 1px solid rgba(var(--primary-rgb), 0.22);
  background: rgba(var(--primary-rgb), 0.10);
  color: var(--primary);
}

.site-action {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text-soft);
  text-decoration: none;
}

.site-action-primary {
  border-color: var(--primary-dark);
  background: var(--primary-dark);
  color: #fff;
}

/* 电脑端 / 平板横屏（≥721px）：顶栏右侧「余额 + 多按钮」收拢为三横杠下拉（余额见工作台或移动端侧栏） */
.site-actions.site-actions--account-menu {
  position: relative;
  gap: 0;
}

.site-header-actions-toggle {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 40px;
  padding: 0;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fff;
  box-shadow: 0 8px 18px rgba(16, 24, 40, 0.08);
  cursor: pointer;
  flex-shrink: 0;
}

.site-header-actions-toggle span {
  width: 18px;
  height: 2px;
  flex: 0 0 2px;
  min-height: 2px;
  max-height: 2px;
  display: block;
  box-sizing: border-box;
  border-radius: 1px;
  background: var(--text);
  transition: transform 0.18s ease, opacity 0.18s ease;
}

.site-actions--account-menu.is-open .site-header-actions-toggle span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.site-actions--account-menu.is-open .site-header-actions-toggle span:nth-child(2) {
  opacity: 0;
}

.site-actions--account-menu.is-open .site-header-actions-toggle span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.site-header-account-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 1010;
  min-width: 208px;
  max-width: min(280px, calc(100vw - 24px));
  padding: 6px;
  border-radius: 14px;
  border: 1px solid rgba(226, 232, 240, 0.95);
  background: #fff;
  box-shadow: 0 10px 36px rgba(15, 23, 42, 0.12);
  overflow: visible;
}

.site-header-account-menu:not([hidden]) {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.site-header-account-menu__item {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  min-height: 40px;
  padding: 10px 14px;
  margin: 0;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: #595959;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  text-align: left;
  box-sizing: border-box;
  width: 100%;
  cursor: pointer;
  transition: background-color 0.14s ease, color 0.14s ease;
}

.site-header-account-menu__item:hover {
  background: #e8f2ff;
  color: var(--primary);
}

.site-header-account-menu__item:focus-visible {
  outline: 2px solid rgba(var(--primary-rgb), 0.45);
  outline-offset: 2px;
  z-index: 1;
}

.site-header-account-menu__item--primary {
  margin-top: 4px;
  border: none;
  border-radius: 8px;
  background: var(--primary-dark);
  color: #fff;
  font-weight: 700;
}

.site-header-account-menu__item--primary:hover {
  filter: brightness(1.06);
  background: var(--primary-dark);
  color: #fff;
}

.site-header-account-menu__item--btn {
  font: inherit;
  appearance: none;
  -webkit-appearance: none;
}

@media (min-width: 721px) {
  .site-header-actions-toggle {
    display: flex;
  }
}

/* App 页：与顶栏主色一致（ant-design.md #1677FF 体系） */
body.page-app,
body.page-records,
body.page-featured,
body.page-account,
body.page-help {
  --primary: #1677ff;
  --primary-hover: #4096ff;
  --primary-active: #0958d9;
  --primary-dark: var(--primary-active);
  --primary-soft: #e6f4ff;
  --primary-rgb: 22, 119, 255;
  --brand-gradient: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
}

body.page-app .button.primary,
body.page-records .button.primary,
body.page-featured .button.primary,
body.page-admin .button.primary,
body.page-account .button.primary,
body.page-help .button.primary,
body.page-app .topbar-account .nav-redeem,
body.page-records .topbar-account .nav-redeem,
body.page-featured .topbar-account .nav-redeem,
body.page-admin .topbar-account .nav-redeem,
body.page-account .topbar-account .nav-redeem,
body.page-help .topbar-account .nav-redeem,
body.page-app .topbar-nav a.active,
body.page-records .topbar-nav a.active,
body.page-featured .topbar-nav a.active,
body.page-admin .topbar-nav a.active,
body.page-account .topbar-nav a.active,
body.page-help .topbar-nav a.active,
body.page-app .site-action-primary,
body.page-records .site-action-primary,
body.page-featured .site-action-primary,
body.page-admin .site-action-primary,
body.page-account .site-action-primary,
body.page-help .site-action-primary {
  background: var(--primary);
  border-color: transparent;
}

body.page-app .site-nav a.active,
body.page-records .site-nav a.active,
body.page-featured .site-nav a.active,
body.page-admin .site-nav a.active,
body.page-account .site-nav a.active,
body.page-help .site-nav a.active {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 2px 8px rgba(var(--primary-rgb), 0.35);
}

body.page-app .mode-toggle label:has(input:checked),
body.page-records .mode-toggle label:has(input:checked),
body.page-admin .mode-toggle label:has(input:checked) {
  border-color: rgba(var(--primary-rgb), 0.35);
  background: color-mix(in srgb, var(--primary) 12%, #ffffff);
  color: #0f172a;
  box-shadow: inset 0 0 0 1px rgba(var(--primary-rgb), 0.12), 0 10px 22px rgba(var(--primary-rgb), 0.1);
}

body.page-app .mode-toggle label:has(input:checked) span,
body.page-records .mode-toggle label:has(input:checked) span,
body.page-admin .mode-toggle label:has(input:checked) span {
  color: #0f172a;
}

body.page-app .button.secondary.active,
body.page-records .button.secondary.active,
body.page-account .button.secondary.active {
  border-color: rgba(var(--primary-rgb), 0.35);
  background: color-mix(in srgb, var(--primary) 10%, #ffffff);
  color: var(--primary-active);
}

body.page-admin .button.secondary.active {
  border-color: rgba(var(--primary-rgb), 0.35);
  background: color-mix(in srgb, var(--primary) 10%, #ffffff);
  color: var(--primary-dark);
}

body.page-app .button.primary:hover,
body.page-records .button.primary:hover,
body.page-admin .button.primary:hover,
body.page-account .button.primary:hover,
body.page-app .site-action-primary:hover,
body.page-records .site-action-primary:hover,
body.page-admin .site-action-primary:hover,
body.page-account .site-action-primary:hover {
  filter: none;
  background: var(--primary-hover);
  box-shadow: 0 2px 8px rgba(var(--primary-rgb), 0.4);
}

body.page-app input:focus,
body.page-records input:focus,
body.page-admin input:focus,
body.page-account input:focus,
body.page-app select:focus,
body.page-records select:focus,
body.page-admin select:focus,
body.page-account select:focus,
body.page-app textarea:focus,
body.page-records textarea:focus,
body.page-admin textarea:focus,
body.page-account textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.14);
}

.poster-editor-preview-wrap {
  display: grid;
  gap: 8px;
}

.poster-create-layout {
  display: grid;
  grid-template-columns: minmax(320px, 0.95fr) minmax(360px, 1.05fr);
  gap: 14px;
  align-items: start;
}

.poster-create-left {
  display: grid;
  gap: 12px;
}

.poster-editor-preview {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  padding: 0;
  min-height: 220px;
  max-height: 62vh;
  overflow: auto;
}

.poster-editor-preview img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 14px;
  user-select: none;
  -webkit-user-drag: none;
  object-fit: contain;
}

.poster-editor-qr {
  position: absolute;
  left: 0;
  top: 0;
  width: 100px;
  height: 100px;
  border: 2px dashed var(--primary);
  border-radius: 8px;
  background-color: rgba(var(--primary-rgb), 0.12);
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.7);
  pointer-events: none;
}

.poster-modal-figure {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.4);
  background: #f1f5f9;
}

.poster-modal-figure.is-loading {
  aspect-ratio: 800 / 420;
  min-height: 140px;
}

.poster-modal-skeleton {
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: inherit;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  background: linear-gradient(145deg, #e2e8f0 0%, #f8fafc 50%, #e2e8f0 100%);
}

.poster-modal-figure.is-loading .poster-modal-skeleton {
  opacity: 1;
}

.poster-modal-skeleton-shimmer {
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(
    100deg,
    transparent 0%,
    rgba(255, 255, 255, 0.55) 45%,
    transparent 90%
  );
  animation: posterSkeletonShimmer 1.35s ease-in-out infinite;
}

@keyframes posterSkeletonShimmer {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(100%);
  }
}

.poster-modal-skeleton-block {
  position: absolute;
  left: 10%;
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
  opacity: 0.85;
}

.poster-modal-skeleton-block--wide {
  top: 22%;
  width: 72%;
}

.poster-modal-skeleton-block--mid {
  top: 38%;
  width: 48%;
}

.poster-modal-skeleton-block--short {
  top: 52%;
  width: 32%;
}

.poster-modal-image {
  position: relative;
  z-index: 1;
  border: 0;
  border-radius: 0;
  transition: opacity 0.22s ease;
}

.poster-modal-figure.is-loading .poster-modal-image {
  opacity: 0;
}

.poster-modal-loading {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 10px;
  background: rgba(248, 250, 252, 0.55);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease;
}

.poster-modal-figure.is-loading .poster-modal-loading {
  opacity: 1;
}

.poster-modal-loading-hint {
  margin: 0;
  font-size: 12px;
  font-weight: 750;
  color: #64748b;
}

.poster-spinner {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 3px solid rgba(var(--primary-rgb), 0.18);
  border-top-color: rgba(var(--primary-rgb), 0.85);
  animation: posterSpin .9s linear infinite;
}

@keyframes posterSpin {
  to { transform: rotate(360deg); }
}

@media (max-width: 980px) {
  .poster-create-layout {
    grid-template-columns: 1fr;
  }
}

.site-menu-button,
.site-mobile-menu {
  display: none;
}

@media (max-width: 980px) {
  .site-header {
    grid-template-columns: minmax(160px, 1fr) auto;
  }

  .site-nav {
    order: 3;
    grid-column: 1 / -1;
    justify-self: stretch;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .site-actions {
    grid-column: 2;
  }
}

@media (max-width: 720px) {
  .site-header {
    top: 8px;
    grid-template-columns: minmax(0, 1fr);
    justify-content: stretch;
    min-height: 60px;
    padding: 8px 10px;
    border-radius: 14px;
  }

  .site-brand {
    width: 100%;
    grid-template-columns: 44px minmax(0, 1fr);
    justify-content: start;
    gap: 10px;
  }

  .site-nav,
  .site-actions,
  .site-menu-button,
  .site-mobile-menu {
    display: none;
  }

  .site-brand-name {
    display: block;
    align-self: center;
    font-size: 18px;
  }

  .site-brand-mark {
    width: 44px;
    height: 40px;
    border-radius: 13px;
  }

  .app-shell {
    /* 底栏约 74px + 余量；含安全区避免最后一张卡片的操作按钮被遮挡 */
    padding-bottom: calc(100px + env(safe-area-inset-bottom, 0px));
  }
}

@media (max-width: 720px) {
  body.page-admin .mobile-bottom-nav {
    display: none !important;
  }

  body.page-admin .app-shell {
    padding-bottom: 24px !important;
  }
}

/*
 * 窄屏性能（尤其微信内置浏览器）：backdrop-filter 会显著拖慢首帧、滚动与点击合成。
 * 以下在 ≤720px 对常用前台页改用实色卡片/顶栏，并收敛阴影与 hover 位移动画。
 */
@media (max-width: 720px) {
  body.page-app,
  body.page-records,
  body.page-account,
  body.page-help {
    background: var(--bg);
  }

  body.page-app .site-header,
  body.page-records .site-header,
  body.page-account .site-header,
  body.page-help .site-header {
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 4px 14px rgba(16, 24, 40, 0.06);
  }

  body.page-app .card,
  body.page-app .stat-card,
  body.page-records .card,
  body.page-records .stat-card,
  body.page-account .card,
  body.page-help .card,
  body.page-app .history-list .record-card,
  body.page-records .history-list .record-card {
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
    background: #fff;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
  }

  body.page-app .history-list .record-card:hover,
  body.page-records .history-list .record-card:hover {
    transform: none;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.07);
  }

  body.page-app .history-list .record-card:hover .record-image img,
  body.page-records .history-list .record-card:hover .record-image img {
    transform: none;
  }

  body.page-app .stat-card:hover,
  body.page-records .stat-card:hover {
    transform: none;
  }

  body.page-app .record-image img,
  body.page-records .record-image img,
  body.page-account .record-image img {
    transition: none;
  }

  body.page-auth:has(.auth-pro-page) .auth-pro-shell {
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
    background: #fff;
  }
}

.mobile-bottom-nav {
  display: none;
}

@media (max-width: 720px) {
  .mobile-bottom-nav {
    position: fixed;
    right: 12px;
    bottom: 12px;
    left: 12px;
    /* 高于主内容区（含 backdrop-filter 卡片）叠层，且低于全屏弹层 10000 */
    z-index: 9990;
    pointer-events: auto;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 5px;
    padding: 7px;
    border: 1px solid rgba(228, 231, 236, 0.96);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 16px 38px rgba(16, 24, 40, 0.16);
    /* 底栏毛玻璃在低端机/微信内核上易拖慢点击合成，改为实底 */
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    /* 独立合成层，减少与主内容滚动/滤镜抢合成 */
    isolation: isolate;
    transform: translateZ(0);
    /* 底栏内部重排不牵动整页，切换页面前最后一帧更稳 */
    contain: layout;
  }

  .mobile-bottom-nav.mobile-bottom-nav--2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    padding: 8px;
  }

  .mobile-bottom-nav.mobile-bottom-nav--3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 5px;
    padding: 7px 6px;
  }

  .mobile-bottom-nav.mobile-bottom-nav--4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 4px;
    padding: 7px 4px;
  }

  .mobile-bottom-nav.mobile-bottom-nav--5 {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 2px;
    padding: 7px 4px;
  }

  .mobile-bottom-nav.mobile-bottom-nav--3 a,
  .mobile-bottom-nav.mobile-bottom-nav--3 button {
    font-size: 11px;
    letter-spacing: -0.02em;
  }

  .mobile-bottom-nav a,
  .mobile-bottom-nav button {
    min-width: 0;
    min-height: 48px;
    display: grid;
    place-items: center;
    gap: 3px;
    border: 0;
    border-radius: 13px;
    background: transparent;
    color: var(--text-soft);
    font-size: 12px;
    font-weight: 850;
    text-decoration: none;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
    transition:
      background-color 0.2s cubic-bezier(0.4, 0, 0.2, 1),
      color 0.2s cubic-bezier(0.4, 0, 0.2, 1),
      transform 0.14s cubic-bezier(0.4, 0, 0.2, 1),
      filter 0.14s ease,
      box-shadow 0.2s ease;
  }

  .mobile-bottom-nav a:active:not(.active),
  .mobile-bottom-nav button:active:not(.active) {
    transform: scale(0.97);
    background: rgba(15, 23, 42, 0.07);
  }

  .mobile-bottom-nav a.active:active,
  .mobile-bottom-nav button.active:active {
    transform: scale(0.985);
    filter: brightness(0.96);
  }

  /* 快路径 pointer/touch 按下态（部分 WebView 上 :active 滞后，用类名补一手感） */
  .mobile-bottom-nav a.mobile-bottom-nav__item--pressing:not(.active) {
    transform: scale(0.97);
    background: rgba(15, 23, 42, 0.07);
  }

  .mobile-bottom-nav a.mobile-bottom-nav__item--pressing.active {
    transform: scale(0.985);
    filter: brightness(0.96);
  }

  .mobile-bottom-nav .mobile-nav-icon {
    width: 23px;
    height: 23px;
    display: grid;
    place-items: center;
    line-height: 1;
    transition: transform 0.16s cubic-bezier(0.4, 0, 0.2, 1);
  }

  .mobile-bottom-nav a.mobile-bottom-nav__item--pressing .mobile-nav-icon,
  .mobile-bottom-nav a:active .mobile-nav-icon {
    transform: scale(1.06);
  }

  .mobile-bottom-nav .mobile-nav-icon svg {
    width: 23px;
    height: 23px;
    display: block;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
  }

  .mobile-bottom-nav a.active,
  .mobile-bottom-nav button.active {
    background: var(--brand-gradient, linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%));
    color: #fff;
    box-shadow: 0 2px 10px rgba(var(--primary-rgb), 0.28);
  }

  @media (prefers-reduced-motion: reduce) {
    .mobile-bottom-nav a,
    .mobile-bottom-nav button,
    .mobile-bottom-nav .mobile-nav-icon {
      transition-duration: 0.01ms !important;
    }

    .mobile-bottom-nav a:active:not(.active),
    .mobile-bottom-nav button:active:not(.active),
    .mobile-bottom-nav a.active:active,
    .mobile-bottom-nav button.active:active,
    .mobile-bottom-nav a.mobile-bottom-nav__item--pressing:not(.active),
    .mobile-bottom-nav a.mobile-bottom-nav__item--pressing.active,
    .mobile-bottom-nav a.mobile-bottom-nav__item--pressing .mobile-nav-icon,
    .mobile-bottom-nav a:active .mobile-nav-icon {
      transform: none;
      filter: none;
    }
  }

  /* mobile-account-sheet 已废弃：改为 /account 独立页面 */
}

/* 敏感信息页面（实名、充值等）：同行控件 + 稳重视觉 */
.sensitive-surface {
  align-content: start;
}

.sensitive-card {
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  background: #fff;
  box-shadow:
    0 1px 2px rgba(15, 23, 42, 0.05),
    0 6px 20px rgba(15, 23, 42, 0.04);
}

.sensitive-card .card-head {
  padding-bottom: 14px;
  margin-bottom: 4px;
  border-bottom: 1px solid #f1f5f9;
}

.sensitive-card .card-head::after {
  display: none;
}

.sensitive-card .eyebrow {
  color: #64748b;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.sensitive-card .card-head h2 {
  color: #0f172a;
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.sensitive-card .badge {
  border-radius: 6px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  color: #334155;
  font-weight: 650;
}

.sensitive-notice {
  margin-top: 0;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
  border-left: 3px solid #64748b;
  background: #f8fafc;
  color: #334155;
  font-size: 13px;
  line-height: 1.55;
  padding: 12px 14px;
}

.sensitive-form {
  gap: 16px;
}

.sensitive-form .field span {
  color: #475569;
  font-size: 13px;
  font-weight: 650;
}

.sensitive-card input,
.sensitive-card select {
  border-color: #cbd5e1;
  border-radius: 6px;
  font-size: 15px;
}

.sensitive-card input:focus,
.sensitive-card select:focus {
  border-color: #475569;
  box-shadow: 0 0 0 3px rgba(71, 85, 105, 0.14);
}

.realname-phone-combo {
  gap: 8px;
}

.realname-phone-sms-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: stretch;
  width: 100%;
}

.realname-phone-input {
  min-width: 0;
  width: 100%;
}

.realname-phone-input.realname-phone-input--readonly {
  cursor: default;
  color: #475569;
  background: #f1f5f9;
  border-color: #e2e8f0;
}

.sensitive-card .realname-sms-btn {
  min-height: 40px;
  height: 40px;
  align-self: stretch;
  padding: 0 12px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 650;
  white-space: nowrap;
  border-color: #cbd5e1;
  background: #f8fafc;
  color: #0f172a;
}

.sensitive-card .realname-sms-btn:hover:not(:disabled) {
  border-color: #94a3b8;
  background: #f1f5f9;
}

body.page-account .account-page-card {
  padding: 12px 16px 20px;
  min-width: 0;
  overflow-x: hidden;
  border: 0;
  background: transparent;
  box-shadow: none;
}

/* 资料卡外层不再左右缩进，与下方「最近生成记录」白卡同宽对齐 */
body.page-account .account-page-card.account-page-card--profile {
  padding-left: 0;
  padding-right: 0;
  padding-bottom: 8px;
}

.account-profile-merged {
  padding: 0;
  overflow: hidden;
  border-radius: 12px;
  border: 1px solid rgba(226, 232, 240, 0.95);
  background: linear-gradient(145deg, #eef2ff 0%, #f5f3ff 42%, #fafbff 100%);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.85) inset,
    0 2px 8px -2px rgba(15, 23, 42, 0.06),
    0 8px 20px -12px rgba(15, 23, 42, 0.07);
}

/* 设计稿：内边距约 20px；首行 头像+昵称/认证 | 设置；次行 积分与数值 | 明细链；底栏通栏充值 */
.account-profile-card-inner {
  position: relative;
  z-index: 1;
  box-sizing: border-box;
  padding: 20px;
  min-width: 0;
}

.account-profile-head-row {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

.account-profile-head-left {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  gap: 14px;
  flex: 1;
  min-width: 0;
}

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

.account-profile-merged .account-avatar--hero {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  overflow: hidden;
  border: 0;
  box-shadow: none;
  font-size: 21px;
}

.account-avatar {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  /* 与 default-avatar.svg 底色一致（主色浅底 #eff6ff）；裂图或透明 PNG 时与系统蓝一致 */
  background: #eff6ff;
  color: var(--primary);
  font-weight: 900;
  font-size: 20px;
  box-shadow: inset 0 0 0 1px rgba(var(--primary-rgb), 0.22);
  flex-shrink: 0;
}

.account-avatar--hero {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  overflow: hidden;
  font-size: 21px;
  box-shadow: none;
}

.account-meta--hero {
  flex: 1;
  min-width: 0;
  padding-top: 0;
}

.account-meta--hero .account-name {
  font-size: 1.05rem;
  font-weight: 780;
  letter-spacing: -0.015em;
  line-height: 1.35;
}

.account-profile-merged-balance.account-points-slab {
  margin-top: 0;
  padding: 16px 16px 18px;
  border: 0;
  border-radius: 0;
  border-top: 1px solid var(--line);
  background: transparent;
  box-shadow: none;
  display: grid;
  gap: 14px;
}

.account-points-slab-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

.account-points-slab-value {
  flex: 1;
  min-width: 0;
  font-size: 1.35rem;
  font-weight: 900;
  line-height: 1.25;
  color: var(--primary);
  letter-spacing: -0.02em;
}

.account-points-value-prefix,
.account-points-value-num {
  color: inherit;
}

.account-points-value-num {
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

a.account-points-detail-btn {
  flex-shrink: 0;
  align-self: center;
  min-height: 36px;
  padding-left: 12px;
  padding-right: 12px;
  font-size: 13px;
  font-weight: 750;
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
}

a.account-points-detail-btn.button.secondary:hover,
a.account-points-detail-btn.button.secondary.active {
  color: var(--text);
  background: var(--surface-soft);
  border-color: var(--line-strong);
}

a.account-points-recharge-btn.button.secondary {
  display: inline-flex;
  width: 100%;
  box-sizing: border-box;
  justify-content: center;
  text-decoration: none;
  min-height: 40px;
  font-size: 15px;
  font-weight: 750;
  color: var(--text);
}

a.account-points-recharge-btn.button.secondary:hover,
a.account-points-recharge-btn.button.secondary.active {
  color: var(--text);
  background: var(--surface-soft);
  border-color: var(--line-strong);
}

body.page-account .account-page-card > .account-promo-banner,
body.page-account .account-page-card > a.account-promo-banner {
  display: block;
  margin-top: 14px;
  margin-left: 0;
  margin-right: 0;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--line);
  line-height: 0;
  -webkit-tap-highlight-color: transparent;
  text-decoration: none;
  min-width: 0;
  background: var(--surface-soft);
}

body.page-account .account-page-card > .account-promo-banner img,
body.page-account .account-page-card > a.account-promo-banner img {
  width: 100%;
  max-width: 100%;
  height: auto;
  display: block;
  vertical-align: top;
  object-fit: contain;
  object-position: center top;
}

a.account-promo-banner:active {
  opacity: 0.94;
}

/* 首页工作台：与「我的」页同一套后台横幅（account_banner_*） */
body.page-app .workspace-main > .workspace-page-banner,
body.page-app .workspace-main > a.workspace-page-banner {
  display: block;
  margin-top: 6px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--line);
  line-height: 0;
  -webkit-tap-highlight-color: transparent;
  text-decoration: none;
  min-width: 0;
  background: var(--surface-soft);
}

body.page-app .workspace-main > .workspace-page-banner img,
body.page-app .workspace-main > a.workspace-page-banner img {
  width: 100%;
  max-width: 100%;
  height: auto;
  display: block;
  vertical-align: top;
  object-fit: contain;
  object-position: center top;
}

body.page-app .workspace-main > a.workspace-page-banner:active {
  opacity: 0.94;
}

/* 首页工作台：系统邀请条（与卡片风格一致，替代大图横幅） */
.workspace-invite-strip {
  margin-top: 0;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(226, 232, 240, 0.95);
  background: linear-gradient(135deg, rgba(248, 250, 252, 0.96) 0%, rgba(255, 255, 255, 0.99) 100%);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.9) inset,
    0 8px 26px -14px rgba(15, 23, 42, 0.1);
  min-width: 0;
}

.workspace-invite-strip__inner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  min-width: 0;
}

.workspace-invite-strip__icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: var(--primary);
  background: rgba(239, 246, 255, 0.98);
  border: 1px solid rgba(191, 219, 254, 0.75);
}

.workspace-invite-strip__text {
  flex: 1;
  min-width: 0;
}

.workspace-invite-strip__title {
  margin: 0 0 2px;
  font-size: 0.95rem;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.02em;
}

.workspace-invite-strip__desc {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.45;
  color: #64748b;
}

.workspace-invite-strip .workspace-invite-strip__btn.button.small {
  flex-shrink: 0;
  align-self: center;
  white-space: nowrap;
  /* 与左侧图标块（40px）视觉对齐，避免「按钮偏下」观感 */
  min-height: 40px;
  box-sizing: border-box;
}

@media (max-width: 420px) {
  .workspace-invite-strip__inner {
    flex-wrap: wrap;
  }

  .workspace-invite-strip__btn {
    width: 100%;
    justify-content: center;
  }
}

.account-meta {
  min-width: 0;
}

.account-name {
  font-weight: 750;
  color: var(--text-soft);
  letter-spacing: -0.01em;
}

.account-name-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.account-settings-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--muted);
  text-decoration: none;
  line-height: 0;
  -webkit-tap-highlight-color: transparent;
}

.account-settings-icon {
  display: block;
  width: 21px;
  height: 21px;
  flex-shrink: 0;
}

.account-settings-link:hover {
  border-color: rgba(148, 163, 184, 0.75);
  color: var(--text-soft);
  background: var(--surface-soft);
}

.account-settings-link:active {
  opacity: 0.9;
}

.account-sub {
  font-size: 12px;
}

.account-verify {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  font-size: 12px;
  color: var(--muted);
  margin-top: 6px;
}

.account-verify .dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #cbd5e1;
  box-shadow: 0 0 0 4px rgba(203, 213, 225, 0.35);
}

.account-verify.is-verified {
  color: var(--primary-active);
}

.account-verify.is-verified .dot {
  background: var(--primary);
  box-shadow: 0 0 0 4px rgba(var(--primary-rgb), 0.18);
}

a.account-verify--link {
  text-decoration: none;
  color: #0284c7;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  border-radius: 10px;
  margin-left: -4px;
  margin-right: -4px;
  padding: 4px 4px 4px 4px;
}

a.account-verify--link:active {
  opacity: 0.9;
}

.account-balance-card {
  margin-top: 12px;
  padding: 14px;
  border-radius: 16px;
  border: 1px solid rgba(var(--primary-rgb), 0.18);
  background: linear-gradient(180deg, rgba(var(--primary-rgb), 0.08), rgba(var(--primary-rgb), 0.06));
}

.account-balance-value {
  font-size: 20px;
  font-weight: 950;
  color: #0f172a;
}

.account-balance-num {
  font-size: 22px;
  font-weight: 950;
  color: #0f172a;
  letter-spacing: 0.2px;
}

/* 资料编辑页：更现代的头像选择（自动上传） */
.profile-modern {
  display: grid;
  gap: 14px;
}

.profile-avatar-form {
  display: grid;
  justify-items: center;
  gap: 8px;
}

.profile-avatar-picker {
  position: relative;
  width: 86px;
  height: 86px;
  border-radius: 50%;
  cursor: pointer;
  user-select: none;
}

.profile-avatar-input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.profile-avatar-preview {
  width: 100%;
  height: 100%;
  border-radius: inherit;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
  box-shadow: 0 8px 20px rgba(var(--primary-rgb), 0.18);
  color: #fff;
  font-weight: 950;
  font-size: 30px;
}

.profile-avatar-preview img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.profile-avatar-badge {
  position: absolute;
  right: -6px;
  bottom: -6px;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 1px solid rgba(228, 231, 236, 0.96);
  background: rgba(255, 255, 255, 0.96);
  display: grid;
  place-items: center;
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.12);
  color: var(--primary);
}

.profile-avatar-badge svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.profile-avatar-hint {
  font-size: 12px;
}

.profile-phone-form {
  margin-top: 2px;
}

.profile-account-footer {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.profile-account-footer .account-section-title {
  margin-bottom: 10px;
}

body.page-account main.grid:not(.account-page-main) {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  padding-bottom: max(20px, env(safe-area-inset-bottom, 0px));
}

/* 积分明细（/credits）：全局 table 在窄屏为 nowrap+ellipsis，时间列会被「…」截断；此表单独允许换行 */
@media (max-width: 720px) {
  body.page-account .credits-ledger-scroll {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
  }

  body.page-account .credits-ledger-table {
    min-width: 0;
    width: 100%;
    table-layout: fixed;
  }

  body.page-account .credits-ledger-table th,
  body.page-account .credits-ledger-table td {
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    word-break: break-word;
    vertical-align: top;
  }

  body.page-account .credits-ledger-table td:nth-child(3) strong,
  body.page-account .credits-ledger-table td:nth-child(4) strong {
    white-space: nowrap;
  }
}

/* 邀请好友页（/invite_friends） */
.invite-friends-main {
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
  display: grid;
  gap: 8px;
  align-content: start;
}

.invite-hero-card {
  border-radius: 16px;
  padding: 18px 16px 20px;
  background: var(--brand-gradient);
  box-shadow: 0 14px 34px rgba(var(--primary-rgb), 0.22);
  border: 1px solid rgba(255, 255, 255, 0.22);
}

.invite-hero-top {
  display: flex;
  flex-wrap: nowrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.invite-hero-title {
  margin: 0;
  font-size: 1.28rem;
  font-weight: 950;
  letter-spacing: -0.02em;
  color: #fff;
  flex: 1 1 auto;
  min-width: 0;
}

.invite-hero-rebate {
  flex: 0 1 auto;
  max-width: min(19.5rem, 88vw);
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.35);
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.12);
}

.invite-hero-rebate-text {
  margin: 0;
  font-size: 11px;
  font-weight: 750;
  line-height: 1.35;
  color: rgba(255, 255, 255, 0.96);
  text-align: right;
}

/* 充值返利角标：强制单行（配合加宽容器） */
.invite-hero-rebate-text--nowrap {
  white-space: nowrap;
  letter-spacing: -0.03em;
}

@media (max-width: 360px) {
  .invite-hero-rebate-text--nowrap {
    font-size: 10px;
  }
}

.invite-hero-rebate-text strong {
  font-weight: 950;
  color: #fff;
}

.invite-hero-top--stacked {
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
}

.invite-hero-top--stacked .invite-hero-rules {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.5;
}

.invite-hero-rules {
  margin: 10px 0 0;
  font-size: 12px;
  font-weight: 650;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.92);
}

.invite-hero-badge {
  max-width: 100%;
  font-size: 11px;
  font-weight: 780;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.95);
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  padding: 6px 12px;
}

.invite-hero-stats {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
}

.invite-hero-stat {
  flex: 1 1 0;
  min-width: 0;
  text-align: center;
}

.invite-hero-stat-value {
  font-size: clamp(26px, 7vw, 32px);
  font-weight: 950;
  color: #fff;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.invite-hero-stat-label {
  margin-top: 6px;
  font-size: 12px;
  font-weight: 750;
  color: rgba(255, 255, 255, 0.88);
}

.invite-hero-stat-divider {
  width: 1px;
  align-self: stretch;
  min-height: 40px;
  margin-top: 4px;
  background: rgba(255, 255, 255, 0.35);
  border-radius: 999px;
}

.invite-poster-card {
  padding: 10px 14px 14px;
  overflow-x: hidden;
}

.invite-poster-viewport {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  display: flex;
  justify-content: center;
  align-items: center;
}

.invite-poster-figure.poster-modal-figure {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin: 0;
  box-sizing: border-box;
}

.invite-poster-figure.is-loading {
  aspect-ratio: unset;
  min-height: min(38vh, 260px);
}

.invite-poster-figure .poster-modal-image {
  width: 100%;
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
  vertical-align: top;
}

.invite-poster-tpl-row {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 10px;
  min-width: 0;
}

.invite-poster-tpl-row .invite-poster-tpl-cycle {
  flex: 0 0 auto;
  width: auto;
  white-space: nowrap;
  font-weight: 780;
}

.invite-poster-tpl-row .invite-poster-tpl-caption {
  flex: 1;
  min-width: 0;
  margin: 0;
  font-size: 12px;
  line-height: 1.45;
  text-align: right;
}

.invite-poster-tpl-row--single {
  justify-content: flex-end;
}

.invite-poster-actions {
  margin-top: 12px;
  display: flex;
  justify-content: stretch;
}

.invite-poster-actions .button {
  width: 100%;
}

.invite-copy-card {
  padding: 16px 14px;
}

.invite-copy-card--compact {
  padding: 14px 12px;
}

.invite-copy-card--link-first {
  padding: 14px 12px;
}

.invite-copy-card-title {
  margin: 0 0 10px;
  font-size: 14px;
  font-weight: 900;
  color: #0f172a;
}

.invite-url-copy-row {
  display: flex;
  align-items: stretch;
  gap: 8px;
  min-width: 0;
}

.invite-url-copy-value {
  flex: 1;
  min-width: 0;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid #e4e7ec;
  background: #f8fafc;
  font-size: 12px;
  font-weight: 700;
  word-break: break-all;
  line-height: 1.45;
  color: #0f172a;
}

.invite-copy-card--link-first .invite-url-copy-row + .invite-url-copy-row {
  margin-top: 12px;
}

.invite-url-copy-tag {
  font-weight: 750;
  font-size: 12px;
  color: #64748b;
  margin-right: 8px;
}

.invite-url-copy-code {
  font-weight: 800;
  letter-spacing: 0.06em;
}

.invite-share-rows {
  display: grid;
  gap: 8px;
}

.invite-share-row {
  display: flex;
  align-items: stretch;
  gap: 8px;
  min-width: 0;
}

.invite-share-tag {
  flex: 0 0 auto;
  width: 28px;
  display: grid;
  place-items: center;
  align-self: stretch;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 900;
  color: var(--primary-active);
  background: rgba(var(--primary-rgb), 0.1);
  border: 1px solid rgba(var(--primary-rgb), 0.2);
}

.invite-share-value {
  flex: 1 1 auto;
  min-width: 0;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid #e4e7ec;
  background: #f8fafc;
  font-weight: 850;
  font-size: 14px;
  letter-spacing: 0.06em;
  color: #0f172a;
  display: flex;
  align-items: center;
}

.invite-share-value--url {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0;
  word-break: break-all;
  line-height: 1.4;
}

.invite-copy-btn--sm {
  min-width: 56px !important;
  padding-left: 10px !important;
  padding-right: 10px !important;
  font-size: 12px !important;
  min-height: 36px !important;
}

.invite-copy-block + .invite-copy-block {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid rgba(228, 231, 236, 0.95);
}

.invite-copy-label {
  font-size: 13px;
  font-weight: 850;
  color: #0f172a;
  margin-bottom: 8px;
}

.invite-copy-row {
  display: flex;
  align-items: stretch;
  gap: 10px;
}

.invite-copy-value {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid #e4e7ec;
  background: #f8fafc;
  font-weight: 850;
  font-size: 15px;
  letter-spacing: 0.04em;
  color: #0f172a;
}

.invite-copy-value--url {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
  word-break: break-all;
  line-height: 1.45;
}

.invite-copy-btn {
  flex: 0 0 auto;
  min-width: 72px;
  border-radius: 12px !important;
  font-weight: 850 !important;
  background: var(--brand-gradient) !important;
  border-color: transparent !important;
  color: #fff !important;
}

.invite-copy-btn:hover {
  filter: brightness(1.03);
}

.invite-copy-hint {
  margin: 8px 0 0;
  font-size: 12px;
  line-height: 1.5;
}

.invite-rewards-card {
  padding: 16px 14px;
}

.invite-rewards-title {
  margin: 0 0 12px;
  font-size: 15px;
  font-weight: 900;
  color: #0f172a;
}

.invite-rewards-empty {
  margin: 0;
  text-align: center;
  font-size: 13px;
  padding: 18px 8px;
}

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

.invite-rewards-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(228, 231, 236, 0.95);
  background: rgba(248, 250, 252, 0.85);
  font-size: 13px;
}

.invite-rewards-main {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.invite-rewards-time {
  font-weight: 750;
  color: #64748b;
  font-size: 12px;
}

.invite-rewards-delta {
  flex: 0 0 auto;
  font-weight: 950;
  color: var(--primary-active);
  font-size: 15px;
}

.invite-rewards-note {
  font-size: 12px;
  line-height: 1.45;
}

.invite-back-wrap {
  text-align: center;
  margin: 4px 0 8px;
}

.invite-back-link {
  font-size: 14px;
  font-weight: 800;
  color: var(--primary);
  text-decoration: none;
}

.invite-back-link:hover {
  text-decoration: underline;
}

.account-body {
  margin-top: 2px;
}

.account-section {
  margin-top: 20px;
}

.account-section:first-child {
  margin-top: 14px;
}

.account-section--help {
  margin-top: 18px;
}

.account-section--quick {
  margin-top: 14px;
}

.account-section--account {
  margin-top: 22px;
  padding-top: 4px;
  border-top: 1px solid rgba(226, 232, 240, 0.95);
}

.account-quick-grid {
  display: grid;
  gap: 10px;
}

.account-quick-tile {
  display: grid;
  gap: 4px;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid rgba(228, 231, 236, 0.96);
  background: rgba(248, 250, 252, 0.92);
  text-decoration: none;
  color: var(--text);
  text-align: left;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

body.page-account .account-quick-tile--media {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
}

body.page-account .account-quick-tile--media:hover {
  border-color: rgba(148, 163, 184, 0.55);
}

body.page-account .account-quick-tile-icon {
  flex-shrink: 0;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
  color: #fff;
  box-shadow: 0 6px 18px rgba(var(--primary-rgb), 0.38);
}

body.page-account .account-quick-tile-icon svg {
  display: block;
}

body.page-account .account-quick-tile-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  flex: 1;
}

.account-quick-tile:hover {
  border-color: rgba(148, 163, 184, 0.55);
}

.account-quick-tile.is-featured {
  border-color: rgba(var(--primary-rgb), 0.38);
  background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.1), rgba(var(--primary-rgb), 0.06));
  box-shadow: 0 8px 22px rgba(var(--primary-rgb), 0.12);
}

body.page-account .account-quick-tile--media.is-featured {
  border-color: rgba(var(--primary-rgb), 0.22);
  background: var(--surface);
  box-shadow: 0 6px 20px rgba(var(--primary-rgb), 0.12);
}

.account-quick-tile-title {
  font-weight: 900;
  font-size: 15px;
  color: #0f172a;
}

.account-quick-tile-desc {
  font-size: 12px;
  line-height: 1.45;
  color: #64748b;
}

.account-section-actions--inline {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (max-width: 380px) {
  .account-section-actions--inline {
    grid-template-columns: 1fr;
  }
}

.account-section-title {
  margin: 0 0 8px 4px;
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.04em;
  color: #64748b;
}

.account-section-actions {
  display: grid;
  gap: 10px;
}

.account-action {
  display: grid;
  gap: 4px;
  padding: 14px;
  border-radius: 16px;
  border: 1px solid rgba(228, 231, 236, 0.96);
  background: rgba(248, 250, 252, 0.9);
  text-decoration: none;
  color: var(--text);
  text-align: left;
  width: 100%;
  box-sizing: border-box;
}

button.account-action {
  cursor: pointer;
  font: inherit;
  -webkit-tap-highlight-color: transparent;
}

.account-action span {
  font-weight: 900;
}

.account-action.is-highlight {
  border-color: rgba(var(--primary-rgb), 0.36);
  background: rgba(var(--primary-rgb), 0.08);
}

.account-action--compact {
  padding: 12px 14px;
  gap: 0;
}

.account-action--danger {
  border-color: rgba(248, 113, 113, 0.35);
  background: rgba(254, 242, 242, 0.65);
}

.account-action--danger span {
  color: #b91c1c;
}

@media (max-width: 720px) {
  body.page-account .account-page-card {
    padding-left: 12px;
    padding-right: 12px;
    padding-top: 10px;
  }

  body.page-account .account-page-card.account-page-card--profile {
    padding-left: 0;
    padding-right: 0;
    padding-bottom: 6px;
  }

  /* 顶部资料 + 积分：同一资料卡内分区，不再套第二层卡片 */
  body.page-account .account-profile-merged {
    position: relative;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.75);
    background:
      radial-gradient(100% 85% at 100% -5%, rgba(99, 102, 241, 0.2), transparent 52%),
      radial-gradient(90% 70% at -8% 10%, rgba(14, 165, 233, 0.16), transparent 48%),
      linear-gradient(155deg, #eef2ff 0%, #f5f3ff 44%, #ffffff 100%);
    box-shadow:
      0 1px 0 rgba(255, 255, 255, 0.85) inset,
      0 2px 10px -4px rgba(15, 23, 42, 0.07),
      0 10px 24px -14px rgba(15, 23, 42, 0.09);
    overflow: hidden;
  }

  body.page-account .account-profile-merged::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(105deg, transparent 40%, rgba(255, 255, 255, 0.45) 48%, transparent 56%);
    opacity: 0.55;
  }

  body.page-account .account-profile-card-inner {
    padding: 14px 14px 14px;
  }

  body.page-account .account-profile-merged .account-avatar--hero {
    width: 52px;
    height: 52px;
    font-size: 18px;
    border-radius: 50%;
    overflow: hidden;
    border: 0;
    box-shadow: none;
  }

  body.page-account .account-meta--hero .account-name {
    font-size: 1.12rem;
    font-weight: 850;
    letter-spacing: -0.03em;
    color: #0f172a;
  }

  body.page-account .account-settings-link {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.85);
    background: rgba(255, 255, 255, 0.82);
    color: #475569;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06);
  }

  body.page-account .account-verify,
  body.page-account a.account-verify--link {
    margin-top: 8px;
    padding: 5px 10px 5px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    background: rgba(248, 250, 252, 0.92);
    border: 1px solid rgba(226, 232, 240, 0.95);
  }

  body.page-account .account-verify.is-verified {
    color: var(--primary-active);
    background: rgba(239, 246, 255, 0.95);
    border-color: rgba(147, 197, 253, 0.65);
  }

  body.page-account .account-verify.is-unverified:not(.account-verify--link) {
    color: #64748b;
  }

  body.page-account a.account-verify--link {
    background: rgba(240, 253, 250, 0.95);
    border-color: rgba(45, 212, 191, 0.35);
    color: #0f766e;
  }

  body.page-account .account-profile-merged-balance.account-points-slab {
    position: relative;
    z-index: 1;
    margin: 0;
    padding: 12px 14px 14px;
    border: 0;
    border-radius: 0;
    border-top: 1px solid rgba(148, 163, 184, 0.28);
    background: transparent;
    box-shadow: none;
    gap: 10px;
  }

  body.page-account .account-points-slab-value {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 3px;
    line-height: 1.1;
  }

  body.page-account .account-points-value-prefix {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
    color: #64748b;
  }

  body.page-account .account-points-value-num {
    font-size: 1.55rem;
    font-weight: 600;
    letter-spacing: -0.04em;
    line-height: 1.05;
    background: linear-gradient(120deg, var(--primary-active) 0%, var(--primary-hover) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
  }

  body.page-account a.account-points-detail-btn.button.secondary {
    min-height: 34px;
    padding: 0 14px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    border-color: rgba(226, 232, 240, 0.98);
    background: rgba(255, 255, 255, 0.9);
    color: #334155;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.05);
  }

  body.page-account a.account-points-recharge-btn.button.secondary {
    min-height: 40px;
    border-radius: var(--radius-btn);
    border: 0;
    font-size: 14px;
    font-weight: 500;
    color: #fff;
    background: var(--primary);
    box-shadow: 0 2px 8px rgba(var(--primary-rgb), 0.35);
  }

  body.page-account a.account-points-recharge-btn.button.secondary:hover,
  body.page-account a.account-points-recharge-btn.button.secondary.active {
    color: #fff;
    filter: none;
    border-color: transparent;
    background: var(--primary-hover);
  }

  body.page-account a.account-points-detail-btn.button.secondary:hover {
    background: #fff;
    border-color: rgba(var(--primary-rgb), 0.25);
    color: #1e293b;
  }

  body.page-account .account-profile-head-row .account-verify.account-verify--inline,
  body.page-account .account-profile-head-row a.account-verify.account-verify--link.account-verify--inline {
    margin-top: 0 !important;
  }

  body.page-account .account-name-badge-row .account-name {
    font-size: 1.12rem;
    font-weight: 850;
  }

  body.page-account .account-profile-head-row {
    gap: 8px;
  }

  body.page-account .account-balance-strip {
    margin-top: 12px;
  }

  body.page-account .account-points-hero__num {
    font-size: 1.22rem;
  }
}

/* 「我的」：设计图布局（资料、最近记录最多 8 条栅格、邀请条、功能列表）；顶栏 Logo 沿用全局 site-header */
/* 主列宽度与精选「灵感广场」、生图工作台一致：居中 + max 1120 + 与 .ps-inspiration 相同的左右内边距 */
body.page-account .account-page-main {
  display: flex;
  flex-direction: column;
  gap: 0;
  min-width: 0;
  width: min(100%, 1120px);
  max-width: min(100%, 1120px);
  margin-left: auto;
  margin-right: auto;
  padding-left: 0;
  padding-right: 0;
  box-sizing: border-box;
  padding-bottom: max(20px, env(safe-area-inset-bottom, 0px));
}

/* 与生图工作台白卡一致：与顶栏同宽对齐 */
body.page-account .app-page-surface--account {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  background: var(--surface);
  border: 1px solid rgba(226, 232, 240, 0.95);
  border-radius: 14px;
  box-shadow: var(--shadow-1);
  padding: 14px 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

body.page-account .account-page-card--profile {
  margin: 0;
}

body.page-account .account-name-badge-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
}

body.page-account .account-name-badge-row .account-name {
  font-weight: 800;
  font-size: 1.08rem;
  letter-spacing: -0.02em;
  color: #0f172a;
  line-height: 1.25;
}

body.page-account .account-verify.account-verify--inline {
  margin-top: 0 !important;
}

body.page-account .account-balance-strip {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  margin-top: 18px;
}

body.page-account .account-points-hero {
  display: inline-flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 4px 6px;
  min-width: 0;
}

body.page-account .account-points-hero__label {
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: -0.01em;
  flex-shrink: 0;
}

body.page-account .account-points-hero__num {
  font-size: 1.38rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.15;
  background: linear-gradient(120deg, var(--primary-active) 0%, var(--primary-hover) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

body.page-account .account-credits-detail-link {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  padding: 5px 11px;
  font-size: 13px;
  font-weight: 600;
  color: #0f172a;
  text-decoration: none;
  white-space: nowrap;
  line-height: 1.2;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.55);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  -webkit-tap-highlight-color: transparent;
}

body.page-account .account-credits-detail-link:active {
  opacity: 0.82;
}

body.page-account .account-settings-link--corner {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.85);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06);
}

body.page-account .account-recharge-full-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  box-sizing: border-box;
  margin-top: 16px;
  padding: 12px 18px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 650;
  text-decoration: none;
  white-space: nowrap;
  color: #fff;
  background: var(--primary);
  box-shadow: 0 4px 16px rgba(var(--primary-rgb), 0.32);
  -webkit-tap-highlight-color: transparent;
}

body.page-account .account-recharge-full-btn:active {
  opacity: 0.92;
}

@media (max-width: 720px) {
  body.page-account .account-settings-link--corner,
  body.page-account a.account-settings-link.account-settings-link--corner {
    width: 36px;
    height: 36px;
  }

  body.page-account .account-recharge-full-btn {
    max-width: 220px;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    margin-top: 12px;
    padding: 10px 16px;
    font-size: 14px;
  }
}

body.page-account .account-recent-card {
  padding: 14px 14px 16px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

body.page-account .account-recent-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

body.page-account .account-recent-head-titles {
  min-width: 0;
}

body.page-account .account-recent-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 850;
  color: #0f172a;
  letter-spacing: -0.02em;
}

body.page-account .account-recent-sub {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  color: #94a3b8;
}

body.page-account .account-recent-more {
  flex-shrink: 0;
  font-size: 13px;
  font-weight: 650;
  color: #475569;
  text-decoration: none;
}

body.page-account .account-recent-more:active {
  opacity: 0.85;
}

body.page-account .history-list--account-grid {
  display: grid;
  /* 8 条记录：4×2，单元格为正方形 */
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

body.page-account .history-list--account-grid .record-card {
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 10px;
  overflow: hidden;
  background: #f1f5f9;
  box-shadow: none;
  /* 覆盖全局 .history-list .record-card 的固定高度与「上图下文」栅格，否则窄屏会变成细长横条缩略图 */
  height: auto !important;
  min-height: 0 !important;
  display: block !important;
  grid-template-rows: unset !important;
  grid-template-columns: unset !important;
  gap: 0 !important;
}

body.page-account .history-list--account-grid .record-body {
  display: none !important;
}

body.page-account .history-list--account-grid .record-image {
  width: 100%;
  aspect-ratio: 1 / 1;
  height: auto;
  min-height: 0;
  max-height: none;
  border-radius: 10px;
}

body.page-account .history-list--account-grid .record-image img {
  width: 100%;
  height: 100%;
  max-height: none;
  object-fit: cover;
  object-position: center center;
}

body.page-account .history-list--account-grid .record-image span:not(.record-image-spinner) {
  font-size: 10px;
  padding: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

body.page-account .account-recent-empty {
  grid-column: 1 / -1;
}

/* 后台横板图：放在最近记录与菜单之间（替代原邀请条位置），整宽按比例展示 */
body.page-account .account-page-main > .account-promo-banner--hero-slot,
body.page-account .account-page-main > a.account-promo-banner--hero-slot {
  display: block;
  margin: 0;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, 0.96);
  line-height: 0;
  background: var(--surface-soft);
  text-decoration: none;
  min-width: 0;
  -webkit-tap-highlight-color: transparent;
}

body.page-account .account-page-main .account-promo-banner--hero-slot img {
  width: 100%;
  height: auto;
  display: block;
  vertical-align: top;
  object-fit: contain;
  object-position: center center;
}

body.page-account .account-invite-hero-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  border-radius: var(--radius-lg);
  text-decoration: none;
  color: #fff;
  background: linear-gradient(115deg, #0f3c82 0%, #1d4ed8 42%, #2563eb 100%);
  box-shadow: 0 12px 34px rgba(29, 78, 216, 0.35);
  min-width: 0;
}

body.page-account .account-invite-hero-card:active {
  opacity: 0.96;
}

body.page-account .account-invite-hero-card__title {
  display: block;
  font-size: 1.05rem;
  font-weight: 850;
  letter-spacing: -0.02em;
}

body.page-account .account-invite-hero-card__desc {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  line-height: 1.45;
  opacity: 0.92;
}

body.page-account .account-invite-hero-card__badge {
  flex-shrink: 0;
  width: 72px;
  height: 72px;
  border-radius: 16px;
  background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.35), transparent 55%),
    rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.28);
  display: grid;
  place-items: center;
}

body.page-account .account-invite-hero-card__gift {
  font-size: 11px;
  font-weight: 800;
  padding: 6px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.95);
  color: #1d4ed8;
}

body.page-account .account-more-menu {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 2px;
}

body.page-account .account-more-row {
  /* 固定行高：三路（图标 / 文案 / 箭头）在同一中线对齐，避免 WebView 里 flex 与 SVG 留白不一致 */
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  box-sizing: border-box;
  height: 54px;
  min-height: 54px;
  max-height: 54px;
  padding: 0 12px;
  border-radius: 14px;
  border: 1px solid rgba(226, 232, 240, 0.98);
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
  text-decoration: none;
  color: #0f172a;
  font-size: 14px;
  font-weight: 640;
  line-height: 1;
  -webkit-tap-highlight-color: transparent;
}

body.page-account .account-more-menu a.account-more-row,
body.page-account .account-more-menu a.account-more-row:visited {
  color: #0f172a;
}

body.page-account button.account-more-row {
  width: 100%;
  cursor: pointer;
  text-align: left;
  font-size: 14px;
  font-weight: 640;
  line-height: 1;
  font-family: inherit;
  color: #0f172a;
  -webkit-appearance: none;
  appearance: none;
  margin: 0;
  box-sizing: border-box;
}

body.page-account .account-more-row:active {
  opacity: 0.92;
}

body.page-account .account-more-row__icon {
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
  color: #fff;
  background: linear-gradient(155deg, #7dd3fc 0%, #38bdf8 22%, #3b82f6 55%, #2563eb 100%);
  border: 1px solid rgba(255, 255, 255, 0.38);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.45) inset,
    0 4px 14px rgba(37, 99, 235, 0.22),
    0 1px 2px rgba(15, 23, 42, 0.06);
}

body.page-account .account-more-row__icon svg {
  display: block;
  opacity: 0.98;
  flex-shrink: 0;
  margin: 0;
  padding: 0;
}

/* 自定义彩色 SVG（邀请好友）：去掉蓝底方块，保留投影不受裁切 */
body.page-account .account-more-row__icon--invite-custom {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  overflow: visible;
}

body.page-account .account-more-row__icon--invite-custom svg {
  width: 38px;
  height: auto;
  max-height: 36px;
  opacity: 1;
}

body.page-account .account-more-row__icon--cs-custom {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  overflow: visible;
}

body.page-account .account-more-row__icon--cs-custom svg {
  width: 40px;
  height: auto;
  max-height: 36px;
  opacity: 1;
}

body.page-account .account-more-row__icon--app-custom {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  overflow: visible;
}

body.page-account .account-more-row__icon--app-custom svg {
  width: 40px;
  height: auto;
  max-height: 36px;
  opacity: 1;
}

body.page-account .account-more-row__icon--announce-custom {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  overflow: visible;
}

body.page-account .account-more-row__icon--announce-custom svg {
  width: 40px;
  height: auto;
  max-height: 36px;
  opacity: 1;
}

body.page-account .account-more-row__icon--help-custom {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  overflow: visible;
}

body.page-account .account-more-row__icon--help-custom svg {
  width: 40px;
  height: auto;
  max-height: 36px;
  opacity: 1;
}

/*
 * 自定义 SVG viewBox 顶部留白多、底部有 blur，几何中心偏上；略下移使与 14px 汉字视觉中线重合。
 * 邀请图标单独 translateY(5px)，其余项 5.5px。
 */
body.page-account .account-more-row__icon--invite-custom svg {
  transform: translateY(5px);
}

body.page-account .account-more-row__icon--cs-custom svg,
body.page-account .account-more-row__icon--app-custom svg,
body.page-account .account-more-row__icon--announce-custom svg,
body.page-account .account-more-row__icon--help-custom svg {
  transform: translateY(5.5px);
}

body.page-account .account-more-row__label {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  align-self: center;
  height: 54px;
  line-height: 54px;
  font-size: 14px;
  font-weight: 640;
  letter-spacing: -0.01em;
  color: inherit;
}

body.page-account .account-more-row__chev {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  align-self: center;
  height: 54px;
  line-height: 54px;
  color: #cbd5e1;
  font-size: 17px;
  font-weight: 700;
}

@media (max-width: 720px) {
  body.page-account .history-list--account-grid {
    gap: 7px;
  }
}

@media (min-width: 721px) {
  body.page-account .account-profile-head-row {
    align-items: center;
  }
}

/* 推广海报弹窗：安全区内边距略紧，便于大图预览 */
.redeem-dialog.poster-modal-dialog {
  align-items: center;
  justify-content: center;
  padding: max(16px, env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px))
    max(16px, env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px));
}

.poster-modal-panel {
  width: min(560px, calc(100vw - 28px));
  max-height: min(85vh, calc(100dvh - 32px), 900px);
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  border: var(--modal-panel-border);
  border-radius: var(--modal-radius);
  background: var(--surface);
  padding: calc(var(--unit) * 3);
  box-shadow: var(--modal-panel-shadow);
}

.poster-modal-tpl-bar {
  margin-top: 10px;
  display: grid;
  gap: 8px;
  justify-items: stretch;
}

.poster-modal-tpl-cycle {
  width: 100%;
  font-weight: 780;
}

.poster-modal-tpl-caption {
  margin: 0;
  font-size: 12px;
  text-align: center;
  line-height: 1.45;
}

.poster-modal-panel .poster-modal-image {
  width: 100%;
  height: auto;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.4);
  background: #fff;
  display: block;
}

.poster-modal-actions {
  margin-top: 10px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.poster-template-switch,
.poster-modal-template-switch {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  max-width: 100%;
}

.poster-tpl-arrow {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  font-size: 22px;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.poster-tpl-arrow:hover {
  border-color: rgba(var(--primary-rgb), 0.35);
  background: rgba(var(--primary-rgb), 0.06);
}

.poster-tpl-pills {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: center;
}

.poster-tpl-pill {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 750;
  background: #f8fafc;
  color: var(--text-soft);
  cursor: pointer;
  max-width: 100%;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.poster-tpl-pill:hover {
  border-color: rgba(var(--primary-rgb), 0.25);
  color: var(--primary-active);
}

.poster-tpl-pill.is-active {
  border-color: rgba(var(--primary-rgb), 0.45);
  background: rgba(var(--primary-rgb), 0.1);
  color: var(--primary-active);
}

.poster-tpl-hint {
  margin: 0;
  font-size: 13px;
  text-align: center;
  width: 100%;
}

.poster-modal-template-switch {
  margin-bottom: 4px;
}

/* —— 精选页：窄栏信息流 + 小预览图 —— */
body.page-featured {
  background: linear-gradient(180deg, #f1f5f9 0%, #f8fafc 42%, #f1f5f9 100%);
}

body.page-featured .featured-page-main {
  align-items: stretch;
  gap: 12px;
  width: min(100%, 560px);
  margin: 0 auto;
  padding: 0 0 22px;
  box-sizing: border-box;
}

body.page-featured .featured-page-main.ps-inspiration {
  width: min(100%, 1120px);
  gap: 16px;
  padding: 0 0 28px;
}

/* 与生图工作台白卡一致：主列内整段白色圆角底托，与顶栏 site-header 同宽对齐 */
body.page-featured .app-page-surface--featured {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  background: var(--surface);
  border: 1px solid rgba(226, 232, 240, 0.95);
  border-radius: 14px;
  box-shadow: var(--shadow-1);
  padding: 14px 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

body.page-featured .app-page-surface--featured .ps-inspiration-banner {
  border: none;
  box-shadow: none;
}

body.page-featured .app-page-surface--featured .ps-inspiration-panel {
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
}

@media (min-width: 720px) {
  body.page-featured:not(.mobile-featured-page):not(.mobile-featured-detail-page) .featured-page-main {
    width: min(100%, 720px);
  }

  body.page-featured:not(.mobile-featured-page):not(.mobile-featured-detail-page) .featured-page-main.ps-inspiration {
    width: min(100%, 1120px);
  }
}

.featured-hero {
  border-radius: 14px;
  padding: 12px 14px 10px;
  border: 1px solid rgba(226, 232, 240, 0.95);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.05);
}

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

.featured-hero__titles {
  min-width: 0;
}

.featured-hero__eyebrow {
  margin: 0 0 2px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #64748b;
}

.featured-hero__title {
  margin: 0;
  font-size: clamp(1.05rem, 3.2vw, 1.25rem);
  font-weight: 900;
  letter-spacing: -0.02em;
  color: #0f172a;
  line-height: 1.2;
}

.featured-hero__aside {
  flex-shrink: 0;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.featured-hero__count {
  font-size: 12px;
  font-weight: 800;
  color: #475569;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(241, 245, 249, 0.95);
  border: 1px solid rgba(226, 232, 240, 0.9);
}

/* 精选页首屏 CTA：纯色主色（UnivDesign — 主按钮仅为蓝） */
body.page-featured .featured-hero__cta.button.primary {
  border-radius: var(--radius-btn) !important;
  border-color: transparent !important;
  background: var(--primary) !important;
  color: #fff !important;
  box-shadow: 0 2px 8px rgba(var(--primary-rgb), 0.35) !important;
}

body.page-featured .featured-hero__cta.button.primary:hover {
  filter: none;
  background: var(--primary-hover) !important;
  box-shadow: 0 2px 10px rgba(var(--primary-rgb), 0.45) !important;
}

.featured-hero__cta {
  padding: var(--unit) calc(var(--unit) * 4 - 1px) !important;
  min-height: 40px !important;
  font-size: 14px !important;
  font-weight: 500 !important;
}

.featured-hero__cta-inner {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}

/* 精选「去创作」内 AI 标：与 .brand-mark 同语义，独立 class 避免被其它 svg 规则误伤 */
body.page-featured .featured-hero__cta-ai-mark {
  flex-shrink: 0;
  display: block;
  margin-top: 1px;
}

body.page-featured .featured-hero__cta-ai-frame,
body.page-featured .featured-hero__cta-ai-line,
body.page-featured .featured-hero__cta-ai-dot {
  fill: none;
  stroke: #fff;
  stroke-width: 2.1;
  stroke-linecap: round;
  stroke-linejoin: round;
}

body.page-featured .featured-hero__cta-ai-spark {
  fill: rgba(255, 255, 255, 0.88);
  stroke: #fff;
  stroke-width: 0.55;
}

body.page-featured .featured-hero__cta-ai-spark-sm {
  fill: #fff;
  stroke: none;
  opacity: 0.95;
}

.featured-hero-search {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
}

.featured-hero-search__input {
  flex: 1 1 160px;
  min-width: 0;
  max-width: 100%;
  padding: 8px 11px;
  border: 1px solid rgba(226, 232, 240, 0.95);
  border-radius: 10px;
  font-size: 13px;
  background: #fff;
  color: #0f172a;
}

.featured-hero-search__input::placeholder {
  color: #94a3b8;
}

.featured-hero-search__input:focus {
  outline: none;
  border-color: rgba(var(--primary-rgb), 0.45);
  box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.12);
}

.featured-hero-search__submit,
.featured-hero-search__clear {
  flex-shrink: 0;
  min-height: 36px !important;
}

.featured-hero__hint {
  margin: 8px 0 0;
  padding-top: 8px;
  border-top: 1px solid rgba(241, 245, 249, 0.98);
  font-size: 12px;
  line-height: 1.45;
  color: #64748b;
}

.featured-hero__hint strong {
  color: var(--primary-active);
  font-weight: 850;
}

.featured-empty-panel {
  text-align: center;
  padding: 28px 16px 32px;
  border-radius: 14px;
  border: 1px dashed rgba(148, 163, 184, 0.5);
  background: rgba(255, 255, 255, 0.88);
  color: #64748b;
}

.featured-empty-panel__icon {
  width: 52px;
  height: 52px;
  margin: 0 auto 12px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: rgba(241, 245, 249, 0.95);
  color: #94a3b8;
}

.featured-empty-panel__icon svg {
  width: 28px;
  height: 28px;
}

.featured-empty-panel__title {
  margin: 0 0 6px;
  font-size: 1rem;
  font-weight: 900;
  color: #334155;
}

.featured-empty-panel__text {
  margin: 0 auto;
  max-width: 20rem;
  font-size: 13px;
  line-height: 1.5;
}

.featured-masonry {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.featured-tile {
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(226, 232, 240, 0.85);
  background: linear-gradient(180deg, #fff 0%, #fafbfc 100%);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.95) inset, 0 4px 14px rgba(15, 23, 42, 0.06);
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    border-color 0.18s ease;
}

.featured-tile:hover {
  transform: translateY(-2px);
  border-color: rgba(148, 163, 184, 0.55);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.9) inset, 0 10px 22px rgba(15, 23, 42, 0.07);
}

/* 双列卡片：略矮的横向预览 */
.featured-tile__media {
  position: relative;
  height: clamp(72px, 28vw, 102px);
  background: linear-gradient(145deg, #f1f5f9, #e8eef5);
}

.featured-tile__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

body.page-featured .featured-tile__img[data-preview-src] {
  cursor: zoom-in;
}

body.page-admin img.admin-featured-thumb[data-preview-src] {
  cursor: zoom-in;
}

.featured-tile__img--placeholder {
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 700;
  color: #94a3b8;
}

.featured-tile__shine {
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.35) 0%, transparent 42%);
  pointer-events: none;
}

.featured-tile__content {
  padding: 10px 11px 11px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
  min-height: 0;
}

.featured-tile__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px;
  font-size: 11px;
}

.featured-tile__author {
  font-weight: 900;
  color: #334155;
}

.featured-tile__date {
  color: #94a3b8;
  font-variant-numeric: tabular-nums;
}

.featured-tile__prompt {
  margin: 0;
  flex: 1;
  min-height: 0;
  max-height: 4.5em;
  overflow: auto;
  font-size: 12px;
  line-height: 1.45;
  color: #334155;
  word-break: break-word;
  padding: 7px 9px;
  border-radius: 8px;
  background: rgba(248, 250, 252, 0.98);
  border: 1px solid rgba(241, 245, 249, 0.98);
  -webkit-overflow-scrolling: touch;
}

.featured-tile__same {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 1px;
  padding: 5px 11px;
  border-radius: 8px;
  border: 1px solid rgba(var(--primary-rgb), 0.32);
  background: linear-gradient(135deg, var(--primary), var(--primary-hover));
  color: #fff;
  font-size: 12px;
  font-weight: 850;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(var(--primary-rgb), 0.22);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.featured-tile__same:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(var(--primary-rgb), 0.28);
}

.featured-tile__same-icon {
  font-size: 11px;
  opacity: 0.95;
}

.featured-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 6px 0 2px;
}

.featured-pagination__btn {
  padding: 6px 14px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
  color: var(--primary-active);
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(226, 232, 240, 0.95);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}

.featured-pagination__btn:hover:not(.is-disabled) {
  border-color: rgba(var(--primary-rgb), 0.45);
  color: var(--primary-active);
}

.featured-pagination__btn.is-disabled {
  opacity: 0.38;
  pointer-events: none;
}

.featured-pagination__info {
  font-size: 12px;
  font-weight: 800;
  color: #64748b;
  font-variant-numeric: tabular-nums;
}

/* —— 灵感广场（精选）对齐参考稿：横幅 + 搜索 + 横向标签 + 响应式卡片栅格 —— */
.ps-inspiration-banner {
  position: relative;
  overflow: hidden;
  border-radius: 14px;
  padding: 22px 20px 20px;
  margin-bottom: 2px;
  border: 1px solid rgba(191, 219, 254, 0.65);
  background: linear-gradient(90deg, #eff6ff 0%, #ecfeff 100%);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

.ps-inspiration-banner__glow {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.45;
  background:
    radial-gradient(circle at 22% 18%, rgba(59, 130, 246, 0.35) 0%, transparent 42%),
    radial-gradient(circle at 78% 88%, rgba(34, 211, 238, 0.28) 0%, transparent 46%);
}

.ps-inspiration-banner__inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

@media (min-width: 900px) {
  .ps-inspiration-banner__inner {
    flex-direction: row;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
  }
}

.ps-inspiration-banner__eyebrow {
  margin: 0 0 6px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #2563eb;
}

.ps-inspiration-banner__title {
  margin: 0 0 8px;
  font-size: clamp(1.45rem, 4vw, 1.85rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #1d2129;
  line-height: 1.2;
}

.ps-inspiration-banner__lead {
  margin: 0;
  max-width: 36rem;
  font-size: 13px;
  line-height: 1.65;
  color: #4e5969;
}

.ps-inspiration-stats {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: stretch;
  justify-content: stretch;
  gap: 8px;
  width: 100%;
}

.ps-inspiration-stat {
  flex: 1 1 0;
  min-width: 0;
  padding: 10px 8px;
  border-radius: 12px;
  text-align: center;
  background: #fff;
  border: 1px solid rgba(226, 232, 240, 0.95);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}

.ps-inspiration-stat__num {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 800;
  color: #1d2129;
  font-variant-numeric: tabular-nums;
}

.ps-inspiration-stat__lbl {
  margin: 4px 0 0;
  font-size: 10px;
  color: #86909c;
  line-height: 1.35;
}

@media (min-width: 380px) {
  .ps-inspiration-stat {
    padding: 10px 10px;
  }

  .ps-inspiration-stat__lbl {
    font-size: 11px;
  }
}

.ps-inspiration-panel {
  border-radius: 14px;
  padding: 16px 16px 14px;
  background: #fff;
  border: 1px solid rgba(226, 232, 240, 0.95);
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.05);
}

.ps-inspiration-search__row {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 14px;
}

@media (min-width: 768px) {
  .ps-inspiration-search__row {
    flex-direction: row;
    align-items: stretch;
    gap: 12px;
  }

  .ps-inspiration-search__row .ps-inspiration-search__composite {
    flex: 1 1 auto;
    min-width: 0;
    max-width: 100%;
  }

  .ps-inspiration-search__row .ps-inspiration-search__actions {
    flex-shrink: 0;
    flex-wrap: nowrap;
  }
}

.ps-inspiration-search__field {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
  display: block;
}

.ps-inspiration-search__icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #c9cdd4;
  display: flex;
  pointer-events: none;
}

.ps-inspiration-search__input {
  width: 100%;
  box-sizing: border-box;
  padding: 11px 12px 11px 40px;
  border-radius: 10px;
  border: 1px solid #e5e6eb;
  font-size: 14px;
  color: #1d2129;
  background: #fff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.ps-inspiration-search__input::placeholder {
  color: #86909c;
}

.ps-inspiration-search__input:focus {
  outline: none;
  border-color: rgba(var(--primary-rgb), 0.55);
  box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.12);
}

/* 搜索框 + 内置「搜索」按钮；输入区省略号避免与图标/按钮重叠 */
.ps-inspiration-search__composite {
  display: flex;
  flex-direction: row;
  align-items: center;
  width: 100%;
  min-width: 0;
  min-height: 44px;
  box-sizing: border-box;
  border: 1px solid #e5e6eb;
  border-radius: 10px;
  background: #fff;
  overflow: hidden;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.ps-inspiration-search__composite:focus-within {
  border-color: rgba(var(--primary-rgb), 0.55);
  box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.12);
}

.ps-inspiration-search__composite .ps-inspiration-search__icon {
  position: static;
  transform: none;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  align-self: center;
  padding: 0 4px 0 12px;
  color: #c9cdd4;
  pointer-events: none;
  line-height: 0;
}

.ps-inspiration-search__composite .ps-inspiration-search__icon svg {
  display: block;
  width: 18px;
  height: 18px;
}

.ps-inspiration-search__composite .ps-inspiration-search__input {
  flex: 1 1 0;
  width: 0;
  min-width: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  padding: 10px 8px 10px 0;
  margin: 0;
  background: transparent;
  font-size: 14px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
  align-self: center;
}

.ps-inspiration-search__composite .ps-inspiration-search__input:focus {
  outline: none;
  border: 0;
  box-shadow: none;
}

.ps-inspiration-search__submit-infield {
  flex-shrink: 0;
  align-self: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 3px 6px 3px 0;
  padding: 0 12px;
  min-height: 32px;
  border: 0;
  border-left: 1px solid #e5e6eb;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 650;
  color: #fff;
  background: var(--primary);
  cursor: pointer;
  white-space: nowrap;
  line-height: 1.2;
  -webkit-tap-highlight-color: transparent;
}

.ps-inspiration-search__submit-infield:hover {
  background: var(--primary-hover);
}

.ps-inspiration-search__submit-infield:focus-visible {
  outline: none;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.55);
}

.ps-inspiration-search__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.ps-inspiration-sort-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  color: #4e5969;
  background: #f5f7fa;
  border: 1px solid transparent;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.ps-inspiration-sort-btn:hover {
  background: #e5e6eb;
  color: #1d2129;
}

.ps-inspiration-sort-btn.is-active {
  background: var(--primary);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 2px 8px rgba(var(--primary-rgb), 0.28);
}

.ps-inspiration-search__submit {
  min-height: 40px !important;
  border-radius: 10px !important;
  font-weight: 600 !important;
}

.ps-inspiration-tags {
  position: relative;
}

.ps-inspiration-tags__select-wrap {
  display: block;
  margin-bottom: 10px;
}

.ps-inspiration-tags__select-label {
  display: block;
  font-size: 12px;
  margin-bottom: 6px;
}

.ps-inspiration-tags__select {
  width: 100%;
  max-width: 100%;
  /* 覆盖全局 select 固定 height:32px，否则与上下 padding 叠加会把选项文字裁成一条线 */
  height: auto;
  min-height: 44px;
  line-height: 1.45;
  padding: 10px 36px 10px 12px;
  border-radius: 10px;
  border: 1px solid #e5e6eb;
  font-size: 14px;
  font-weight: 600;
  color: #1d2129;
  background-color: #f5f7fa;
  background-position:
    calc(100% - 18px) calc(50% - 2.5px),
    calc(100% - 13px) calc(50% - 2.5px);
}

.ps-inspiration-tags__strip-wrap {
  display: none;
  position: relative;
}

.ps-inspiration-tags__strip {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  margin: 0 -4px;
  padding-left: 4px;
  padding-right: 4px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

.ps-inspiration-tags__strip::-webkit-scrollbar {
  height: 6px;
}

.ps-inspiration-tags__strip::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.45);
  border-radius: 999px;
}

@media (min-width: 640px) {
  .ps-inspiration-tags__select-wrap {
    display: none;
  }

  .ps-inspiration-tags__strip-wrap {
    display: block;
  }
}

.ps-inspiration-pill {
  flex: 0 0 auto;
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  color: #4e5969;
  background: #f5f7fa;
  border: 1px solid transparent;
  white-space: nowrap;
  transition: background 0.15s ease, color 0.15s ease;
}

.ps-inspiration-pill:hover {
  background: #e5e6eb;
  color: #1d2129;
}

.ps-inspiration-pill.is-active {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 2px 8px rgba(var(--primary-rgb), 0.25);
}

.ps-inspiration-empty {
  text-align: center;
  padding: 36px 16px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px dashed rgba(148, 163, 184, 0.45);
  color: #64748b;
}

.ps-inspiration-empty__title {
  margin: 0 0 8px;
  font-size: 1.1rem;
  color: #1d2129;
}

.ps-inspiration-empty__text {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
}

.ps-inspiration-empty a {
  color: var(--primary-active);
  font-weight: 700;
}

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

@media (min-width: 640px) {
  .ps-inspiration-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .ps-inspiration-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
  }
}

/* 卡片内 JSON 载荷，不参与排版 */
.ps-inspiration-card__prompt-json {
  display: none !important;
}

.ps-inspiration-card {
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
  border: 1px solid rgba(226, 232, 240, 0.95);
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.05);
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ps-inspiration-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.1);
}

.ps-inspiration-card__media {
  position: relative;
  height: 192px;
  background: linear-gradient(145deg, #f1f5f9, #e8eef5);
}

.ps-inspiration-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

body.page-featured .ps-inspiration-card__img[data-preview-src] {
  cursor: zoom-in;
}

.ps-inspiration-card__img--placeholder {
  display: grid;
  place-items: center;
  font-size: 14px;
  font-weight: 700;
  color: #94a3b8;
}

.ps-inspiration-card__badge {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  max-width: calc(100% - 20px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  background: #2b7fff;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.18);
}

.ps-inspiration-card__badge--1 {
  background: #2b7fff;
}

.ps-inspiration-card__badge--2 {
  background: #db2777;
}

.ps-inspiration-card__badge--3 {
  background: #9333ea;
}

.ps-inspiration-card__badge--4 {
  background: #16a34a;
}

.ps-inspiration-card__badge--0 {
  background: #0d9488;
}

.ps-inspiration-card__body {
  padding: 14px 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.ps-inspiration-card__title {
  margin: 0;
  font-size: 14px;
  font-weight: 800;
  color: var(--primary, #1677ff);
  line-height: 1.35;
}

.ps-inspiration-card__desc {
  margin: 0;
  font-size: 12px;
  line-height: 1.55;
  color: #86909c;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ps-inspiration-card__kw {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.ps-inspiration-kw {
  font-size: 11px;
  padding: 2px 7px;
  border-radius: 6px;
  font-weight: 650;
}

.ps-inspiration-kw--c0 {
  background: #e8f3ff;
  color: #165dff;
}
.ps-inspiration-kw--c1 {
  background: #e8ffea;
  color: #00b42a;
}
.ps-inspiration-kw--c2 {
  background: #fff7e8;
  color: #d25f00;
}
.ps-inspiration-kw--c3 {
  background: #fce8ff;
  color: #9d1edc;
}
.ps-inspiration-kw--c4 {
  background: #ffe8f1;
  color: #e91e8c;
}
.ps-inspiration-kw--c5 {
  background: #e8fffb;
  color: #0da5aa;
}
.ps-inspiration-kw--c6 {
  background: #f2f3f5;
  color: #4e5969;
}
.ps-inspiration-kw--c7 {
  background: #e8f5ff;
  color: #134563;
}

.ps-inspiration-card__like {
  border: none;
  padding: 0;
  margin: 0;
  background: transparent;
  font: inherit;
  color: inherit;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border-radius: 8px;
}

.ps-inspiration-card__like:focus-visible {
  outline: 2px solid #165dff;
  outline-offset: 2px;
}

/* 爱心：已喜欢时强制主色（覆盖 .stat-icon 的 color / SVG presentation） */
.ps-inspiration-card__like.is-liked .ps-inspiration-card__stat-icon.ps-inspiration-card__stat-icon--heart {
  color: #f53f3f !important;
}

.ps-inspiration-card__like.is-liked .ps-inspiration-card__stat-icon--heart path {
  fill: #f53f3f !important;
  stroke: #f53f3f !important;
}

.ps-inspiration-card__like.is-liked {
  color: #f53f3f;
}

.ps-inspiration-card__like.is-liked .ps-inspiration-card__like-num {
  color: #f53f3f;
}

.ps-inspiration-card__meta2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

/* 模型 / 比例：独立浅底圆角框（与稿一致） */
.ps-inspiration-card__meta2 > div {
  min-width: 0;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(226, 232, 240, 0.98);
  background: #f8fafc;
  display: grid;
  gap: 4px;
  align-content: start;
  text-align: left;
  box-sizing: border-box;
}

.ps-inspiration-card__meta2-l {
  display: block;
  font-size: 11px;
  font-weight: 650;
  color: #86909c;
  line-height: 1.3;
}

.ps-inspiration-card__meta2-v {
  display: block;
  font-size: 13px;
  font-weight: 800;
  color: #1d2129;
  margin-top: 0;
  line-height: 1.35;
  word-break: break-all;
}

.ps-inspiration-card__stats {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  margin-top: 2px;
  font-size: 12px;
  color: #4e5969;
}

.ps-inspiration-card__stat {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
}

.ps-inspiration-card__stat-icon {
  flex-shrink: 0;
  color: #64748b;
  display: block;
}

.ps-inspiration-card__stat-num {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  color: #4e5969;
}

.ps-inspiration-card__stats-dot {
  opacity: 0.45;
}

.ps-inspiration-card__actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 4px;
}

.ps-inspiration-btn-copy,
.ps-inspiration-btn-apply {
  width: 100%;
  justify-content: center;
  min-height: 36px !important;
  border-radius: 10px !important;
  font-size: 12px !important;
  font-weight: 600 !important;
}

.ps-inspiration-pagination {
  margin-top: 8px;
}

body.page-admin .admin-media-card__form--approve {
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
}

body.page-admin .admin-media-card__form--approve .button.primary {
  align-self: flex-start;
}

/* —— 工作台 UI 刷新（创作流 / 折叠参数 / 预览与历史） —— */
.workspace-main {
  align-items: stretch;
  /* 覆盖 .grid 默认间距，让邀请条更贴近创作卡 */
  gap: 10px;
}

/* 工作台：全端保持手机端单列，不展示右侧桌面预览栏 */
.workspace-desk-split {
  display: block;
  min-width: 0;
}

.workspace-desk-result {
  display: none;
}

.workspace-card--creative .workspace-section-head {
  padding-bottom: 10px;
  margin-bottom: 0;
}

.workspace-card--creative:not(:has(.workspace-card-generation-notice)) .workspace-section-head {
  border-bottom: 1px solid rgba(226, 232, 240, 0.85);
  margin-bottom: 2px;
  padding-bottom: 10px;
}

.workspace-card--creative:has(.workspace-card-generation-notice) .workspace-section-head {
  border-bottom: none;
}

.workspace-card--creative .workspace-card-generation-notice {
  margin: 0 0 10px;
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.45;
  border: 1px solid rgba(246, 211, 139, 0.65);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.75) inset;
}

.workspace-card--creative #generateForm.form {
  margin-top: 0;
}

.workspace-card--creative:not(:has(.workspace-card-generation-notice)) .workspace-create-shell {
  margin-top: 6px;
}

.workspace-eyebrow {
  text-transform: none;
  letter-spacing: 0.02em;
  font-weight: 800;
  color: #64748b;
}

.help-eyebrow {
  text-transform: none;
  letter-spacing: 0.04em;
  font-weight: 800;
  color: #64748b;
}

.workspace-section-head {
  padding-bottom: 14px;
  margin-bottom: 4px;
  border-bottom: 1px solid rgba(226, 232, 240, 0.85);
  align-items: flex-start;
}

.workspace-section-head--toolbar {
  align-items: center;
}

.workspace-toolbar-heading {
  margin: 0;
  min-width: 0;
}

.workspace-card--creative .workspace-section-head--toolbar .workspace-toolbar-heading {
  flex: 1 1 auto;
  min-width: 0;
}

.workspace-card--creative .workspace-section-head--toolbar .card-head-actions {
  flex-shrink: 0;
}

.workspace-section-head .workspace-eyebrow {
  margin-bottom: 4px;
}

.workspace-card--creative .card-head h2,
.preview-card--creative .card-head h2,
.history-section-workspace .card-head h2 {
  letter-spacing: -0.02em;
  margin: 0;
  font-size: clamp(18px, 4.2vw, 20px);
}

.workspace-create-shell {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 0;
  padding: 12px 12px 10px;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background:
    linear-gradient(165deg, rgba(255, 255, 255, 0.96) 0%, rgba(248, 250, 252, 0.99) 48%, rgba(239, 246, 255, 0.72) 100%);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.9) inset,
    0 12px 36px rgba(15, 23, 42, 0.06);
}

/*
 * 编辑模式参考图：用 :has() 在选中「编辑」时强制显示，覆盖 .hidden（display:none !important）。
 * 避免微信等强缓存旧版 user.js、脚本未执行时整块仍被隐藏；与 JS 去 hidden 双保险。
 */
body.page-app .workspace-card--creative .workspace-create-shell:has(input[name="mode"][value="edit"]:checked) > .field.edit-upload-field[data-edit-upload] {
  display: grid !important;
  gap: 8px;
}

.workspace-create-shell .prompt-field-head {
  margin-top: 0;
}

.workspace-create-shell .mode-toggle--segmented {
  flex-shrink: 0;
}

.mode-toggle--segmented {
  padding: 4px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid rgba(226, 232, 240, 0.95);
  gap: 4px;
}

.mode-toggle--segmented label {
  border-radius: 10px;
  border: 0;
  min-height: 36px;
}

.mode-toggle--segmented label:has(input:checked) {
  box-shadow: 0 6px 16px rgba(var(--primary-rgb), 0.2);
}

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

.workspace-create-shell .mode-toggle.mode-toggle--3.mode-toggle--segmented label span {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.workspace-chat-placeholder {
  padding: 22px 14px;
  text-align: center;
  border-radius: 12px;
  background: rgba(248, 250, 252, 0.96);
  border: 1px dashed rgba(148, 163, 184, 0.55);
  margin-top: 4px;
}

.workspace-chat-placeholder__text {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
}

.workspace-advanced-details {
  margin-top: 12px;
  border: 0;
  border-radius: 0;
  background: transparent;
  overflow: visible;
}

.workspace-advanced-summary {
  list-style: none;
  cursor: pointer;
  padding: 0;
  margin: 0;
  font-weight: 850;
  font-size: 13px;
  color: #334155;
  display: block;
  user-select: none;
}

.workspace-advanced-summary::-webkit-details-marker {
  display: none;
}

.workspace-advanced-summary-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-width: 0;
  padding: 10px 12px 10px 14px;
  border-radius: 10px;
  border: 1px solid #d0d5dd;
  background: #f8fafc;
  box-shadow: none;
  box-sizing: border-box;
}

.workspace-advanced-details[open] .workspace-advanced-summary-row {
  border-radius: 10px 10px 0 0;
  border-bottom-color: transparent;
  box-shadow: none;
}

.workspace-advanced-title {
  flex: 0 0 auto;
  font-weight: 850;
  font-size: 13px;
  color: #1e293b;
  letter-spacing: 0.02em;
}

.workspace-advanced-preview {
  flex: 1 1 auto;
  min-width: 0;
  font-weight: 600;
  font-size: 12px;
  color: #64748b;
  text-align: right;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  letter-spacing: 0.02em;
}

.workspace-advanced-dropdown {
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #475569;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
  transition:
    background-color 0.15s ease,
    border-color 0.15s ease,
    color 0.15s ease,
    box-shadow 0.15s ease;
}

.workspace-advanced-summary:hover .workspace-advanced-dropdown {
  border-color: #cbd5e1;
  background: #f8fafc;
  color: var(--primary);
}

.workspace-advanced-chevron {
  display: block;
  transition: transform 0.2s var(--ease-out, ease);
}

.workspace-advanced-details[open] .workspace-advanced-chevron {
  transform: rotate(180deg);
}

.workspace-advanced-details[open] .workspace-advanced-dropdown {
  border-color: rgba(var(--primary-rgb), 0.28);
  color: var(--primary);
  background: rgba(239, 246, 255, 0.85);
}

.workspace-advanced-hint {
  font-weight: 650;
  color: #94a3b8;
  font-size: 12px;
}

.workspace-advanced-body {
  padding: 12px 12px 14px;
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-top: 0;
  border-radius: 0 0 var(--radius-card) var(--radius-card);
  background: var(--surface-soft);
  margin: -1px 0 2px;
}

.workspace-advanced-details[open] .workspace-advanced-body {
  box-shadow: var(--shadow-2);
}

.workspace-create-shell .field textarea {
  line-height: 1.45;
  min-height: 6.5rem;
}

.generate-actions-wrap {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.generate-cost-hint {
  margin: 0 auto;
  max-width: 26rem;
  text-align: center;
  font-size: 12px;
  line-height: 1.35;
  color: #64748b;
  font-weight: 650;
  padding: 0 6px;
}

.generate-actions {
  gap: 12px;
}

.generate-actions--queue-only {
  display: flex;
  justify-content: center;
  width: 100%;
}

.generate-actions--queue-only .generate-btn-primary {
  width: min(96%, 24rem);
  margin: 0 auto;
  min-height: 48px;
  border-radius: 12px;
}

.workspace-ai-hint-wrap {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  text-align: center;
  padding: 0 2px 0;
}

.workspace-ai-hint-wrap::-webkit-scrollbar {
  display: none;
}

.workspace-ai-hint {
  display: inline-block;
  margin: 0;
  padding: 0 4px;
  font-size: 10.5px;
  line-height: 1.3;
  letter-spacing: 0.01em;
  color: #94a3b8;
  white-space: nowrap;
}

.record-card .record-prompt-snippet {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 0;
  font-size: 13px;
  line-height: 1.45;
  color: #334155;
  word-break: break-word;
}

.generate-actions .generate-btn-primary,
.generate-actions .generate-btn-secondary {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding-left: 12px;
  padding-right: 12px;
}

.generate-btn-title {
  font-size: 15px;
  font-weight: 900;
  letter-spacing: -0.01em;
}

.generate-actions .generate-btn-primary {
  min-height: 52px;
  border-radius: 12px;
  box-shadow: 0 10px 26px rgba(8, 127, 91, 0.22);
}

.generate-actions .generate-btn-secondary {
  min-height: 50px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.85);
  border: 1px dashed #cbd5e1;
  color: #475569;
  font-weight: 820;
}

.generate-actions .generate-btn-secondary .generate-btn-title {
  font-size: 14px;
  font-weight: 880;
}

.generate-actions .generate-btn-secondary:hover {
  border-color: #94a3b8;
  background: #f8fafc;
}

.preview-card--creative {
  border-radius: 14px;
}

.preview-stage--creative {
  min-height: 360px;
  border-radius: 14px;
  border: 1px solid rgba(226, 232, 240, 0.95);
  background:
    radial-gradient(ellipse 80% 60% at 50% 0%, rgba(var(--primary-rgb), 0.09), transparent 55%),
    linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
  background-size: auto, auto;
}

.preview-empty-creative {
  width: min(100%, 340px);
  padding: 20px 18px 22px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
  border-radius: 14px;
  border: 1px dashed rgba(148, 163, 184, 0.55);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.05);
}

.preview-empty-visual {
  width: 100%;
  max-width: 200px;
  height: 100px;
  border-radius: 12px;
  background:
    linear-gradient(135deg, rgba(var(--primary-rgb), 0.12), rgba(var(--primary-rgb), 0.1)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.4), transparent);
  border: 1px solid rgba(148, 163, 184, 0.25);
}

.preview-empty-title {
  margin: 8px 0 0;
  font-size: 16px;
  font-weight: 900;
  color: #0f172a;
  letter-spacing: -0.02em;
}

.preview-empty-steps {
  margin: 4px 0 0;
  padding: 0 0 0 1.2em;
  text-align: left;
  font-size: 13px;
  line-height: 1.7;
  color: #475569;
  font-weight: 650;
  width: 100%;
  max-width: 288px;
}

.preview-empty-steps li + li {
  margin-top: 6px;
}

.preview-loading.preview-loading--creative {
  width: min(100%, 320px);
  min-height: auto;
  padding: 22px 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  border-style: solid;
  border-color: rgba(var(--primary-rgb), 0.22);
  background: rgba(255, 255, 255, 0.92);
}

.preview-loading--creative .preview-spinner {
  margin-top: 4px;
}

.preview-skeleton {
  position: relative;
  width: 100%;
  max-width: 220px;
  height: 120px;
  border-radius: 12px;
  overflow: hidden;
  background: linear-gradient(180deg, #e2e8f0, #f1f5f9);
}

.preview-skeleton-bar {
  position: absolute;
  left: 12px;
  right: 12px;
  height: 10px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.65);
  top: 16px;
}

.preview-skeleton-bar--short {
  top: 36px;
  right: 40%;
}

.preview-skeleton-shine {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    transparent 0%,
    rgba(255, 255, 255, 0.55) 45%,
    transparent 90%
  );
  animation: previewShine 1.6s ease-in-out infinite;
}

@keyframes previewShine {
  0% {
    transform: translateX(-100%);
  }

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

.preview-queued-creative {
  width: min(100%, 320px);
  padding: 20px 18px;
  display: grid;
  gap: 10px;
  text-align: center;
  border-radius: 14px;
  border: 1px solid rgba(251, 191, 36, 0.45);
  background: linear-gradient(180deg, #fffbeb, #fff7ed);
  color: #92400e;
  font-weight: 700;
}

.preview-queued-creative span {
  font-size: 13px;
  font-weight: 650;
  line-height: 1.55;
  color: #9a3412;
}

.history-section-workspace {
  margin-top: 4px;
}

/* 「最新记录」与「查看全部」同一行垂直居中，避免按钮相对标题偏上/偏下 */
.history-section-workspace .card-head.workspace-section-head {
  align-items: center;
}

.history-section-workspace .card-head.workspace-section-head .button.secondary {
  flex-shrink: 0;
  border-radius: 8px;
  min-height: 34px;
  padding: 0 12px;
  font-size: 12.5px;
  font-weight: 650;
  line-height: 1;
}

/* 避免「最新记录」标题同时存在 border-bottom（.workspace-section-head）与 .card-head::after 叠成双横线或左侧残线 */
.history-section-workspace .card-head.workspace-section-head::after {
  display: none;
}

.history-list.history-list--strip {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 12px;
  overflow-x: auto;
  overflow-y: visible;
  padding: 6px 4px calc(18px + env(safe-area-inset-bottom, 0px));
  margin: 0 -4px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

.history-list--strip .history-empty-inline {
  flex: 1 0 100%;
  width: 100%;
  min-width: 100%;
  min-height: 120px;
  margin: 4px 0 0;
  border-radius: 12px;
  background: linear-gradient(180deg, #fbfdff, #f8fafc);
  font-size: 13px;
  color: #64748b;
}

.history-list--strip .record-card {
  flex: 0 0 min(200px, 46vw);
  width: min(200px, 46vw);
  max-width: 220px;
  min-height: 0;
  height: auto;
  scroll-snap-align: start;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  /* auto 行高：避免第二行被 1fr 压扁导致底部时间与删除按钮被裁切 */
  grid-template-rows: 112px auto;
  overflow-x: hidden;
  overflow-y: visible;
}

.history-list--strip .record-image {
  width: 100%;
  height: 112px;
  border-radius: 10px 10px 0 0;
}

.history-list--strip .record-body {
  padding: 8px 10px 10px;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.history-list--strip .record-body p {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 12px;
  line-height: 1.45;
  margin: 4px 0 0;
}

.history-list--strip .record-meta {
  font-size: 11px;
}

.history-list--strip .record-foot {
  font-size: 11px;
  margin-top: auto;
  flex-shrink: 0;
}

@media (max-width: 720px) {
  .workspace-create-shell {
    padding: 14px 12px 12px;
  }

  .history-list.history-list--strip {
    gap: 10px;
  }

  .history-list--strip .record-card {
    flex: 0 0 min(168px, 72vw);
    width: min(168px, 72vw);
    height: auto;
    min-height: 0;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: 100px auto;
  }

  .history-list--strip .record-image {
    height: 100px;
  }

  /* 首页底部「最新记录」：手机只展示 1 条，纵向整宽卡片（对齐设计稿） */
  body.page-app .history-section-workspace .workspace-section-head .workspace-eyebrow {
    display: none;
  }

  body.page-app .history-section-workspace .workspace-section-head h2 {
    font-size: 17px;
    font-weight: 800;
    color: #1a1a1a;
    letter-spacing: -0.02em;
  }

  body.page-app .history-section-workspace .workspace-section-head .button.secondary {
    border-radius: 8px;
    border-color: #e8e8e8;
    color: #333;
    font-size: 12px;
    font-weight: 650;
    padding: 0 12px;
    min-height: 34px;
  }

  body.page-app #historyList.workspace-history-strip.history-list--strip {
    flex-direction: column;
    flex-wrap: nowrap;
    overflow-x: visible;
    overflow-y: visible;
    scroll-snap-type: none;
    margin: 0;
    /* 与 app-shell 底栏留白一致，避免最后一屏手势与底栏抢触摸 */
    padding: 2px 0 calc(22px + env(safe-area-inset-bottom, 0px));
    gap: 0;
  }

  body.page-app #historyList.workspace-history-strip .record-card ~ .record-card {
    display: none !important;
  }

  body.page-app #historyList.workspace-history-strip .record-card {
    flex: none !important;
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    scroll-snap-align: unset;
    border-radius: 14px;
    border: 1px solid #ebebeb;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
    grid-template-rows: auto minmax(0, auto);
    overflow: hidden;
  }

  body.page-app #historyList.workspace-history-strip .record-card:hover {
    transform: none;
  }

  body.page-app #historyList.workspace-history-strip .record-card:hover .record-image img {
    transform: none;
  }

  body.page-app #historyList.workspace-history-strip .record-image {
    width: 100%;
    height: auto;
    min-height: 132px;
    max-height: 200px;
    aspect-ratio: 16 / 9;
    border-radius: 12px 12px 0 0;
  }

  body.page-app #historyList.workspace-history-strip .record-body {
    padding: 10px 12px 12px;
    gap: 8px;
  }

  body.page-app #historyList.workspace-history-strip .record-meta--workspace-strip {
    flex-direction: column;
    align-items: stretch;
    gap: 5px;
  }

  body.page-app #historyList.workspace-history-strip .record-status-label {
    color: #4a90e2;
    font-weight: 800;
    font-size: 11px;
    line-height: 1.35;
    white-space: nowrap;
    overflow: visible;
    text-overflow: clip;
  }

  body.page-app #historyList.workspace-history-strip .record-card[data-status="failed"] .record-status-label,
  body.page-app #historyList.workspace-history-strip .record-card[data-status="deleted"] .record-status-label {
    color: #ff4d4f;
  }

  body.page-app #historyList.workspace-history-strip .record-meta-detail {
    color: #999;
    font-size: 10px;
    font-weight: 500;
    line-height: 1.45;
    white-space: normal;
    overflow: visible;
    text-overflow: unset;
    word-break: break-word;
  }

  body.page-app #historyList.workspace-history-strip .record-body .record-prompt-snippet {
    font-size: 13px;
    font-weight: 600;
    color: #333;
    line-height: 1.45;
    margin-top: 2px;
  }

  body.page-app #historyList.workspace-history-strip .record-foot time {
    font-size: 10px;
    color: #999;
    white-space: normal;
    overflow: visible;
    text-overflow: unset;
    font-variant-numeric: tabular-nums;
  }

  body.page-app #historyList.workspace-history-strip .record-delete {
    border: 1px solid #ffb3b3;
    border-radius: 8px;
    color: #ff4d4f;
    background: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 10px;
    min-height: 24px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .preview-skeleton-shine {
    animation: none;
  }
}

/* —— 修改密码（手机验证）：与全站令牌统一、圆角柔和 —— */
.change-password-wrap {
  min-height: calc(100vh - 140px);
  padding: 24px 16px 40px;
  background: transparent;
}

.change-password-card {
  max-width: 420px;
  margin: 0 auto;
  padding: 28px 24px 30px;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.change-password-card.auth-card {
  width: min(420px, 100%);
}

.change-password-head .eyebrow {
  display: none;
}

.change-password-head h2 {
  margin: 0 0 8px;
  font-size: 1.35rem;
  font-weight: 750;
  color: var(--text);
  letter-spacing: -0.02em;
}

.change-password-lead {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
  color: var(--muted);
  font-weight: 550;
}

.change-password-phone-block {
  margin: 18px 0 0;
  padding: 14px 16px;
  border-radius: var(--radius);
  background: var(--surface-soft);
  border: 1px solid var(--line);
}

.change-password-label {
  display: block;
  font-size: 12px;
  font-weight: 750;
  color: var(--muted);
  margin-bottom: 6px;
  letter-spacing: 0.02em;
}

.change-password-phone {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.06em;
  color: var(--text-soft);
}

.change-password-form {
  gap: 16px;
}

.cpw-sms-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px;
}

.cpw-sms-field {
  flex: 1 1 160px;
  min-width: 0;
  margin: 0;
}

.cpw-sms-btn {
  flex: 0 0 auto;
  min-height: 40px;
  padding-left: 16px;
  padding-right: 16px;
  border-radius: var(--radius-sm);
  border-color: var(--line-strong);
  color: var(--text-soft);
  font-weight: 700;
  background: var(--surface);
}

.cpw-sms-btn:hover:not(:disabled) {
  border-color: rgba(var(--primary-rgb), 0.35);
  background: var(--primary-soft);
  color: var(--primary-dark);
}

.change-password-divider {
  height: 0;
  margin: 14px 0 0;
  border: 0;
  border-top: 1px solid var(--line);
  background: transparent;
}

.change-password-pw-block {
  margin-top: 0;
  padding-top: 14px;
  opacity: 0.78;
  transition: opacity 0.22s ease;
}

.change-password-pw-block.is-unlocked {
  opacity: 1;
}

.change-password-step-hint {
  margin: 0 0 12px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted);
}

.change-password-step-hint.is-active {
  color: var(--text-soft);
}

.change-password-form .field input {
  border-radius: var(--radius-sm);
  border-color: var(--line-strong);
  background: var(--surface);
}

.change-password-form .field input:read-only {
  background: var(--surface-soft);
  color: var(--muted);
}

body.page-account .change-password-submit.button.primary,
.change-password-submit.button.primary {
  margin-top: 4px;
  width: 100%;
  min-height: 48px;
  border-radius: var(--radius-lg);
  font-weight: 800;
  border-color: transparent;
  box-shadow: 0 6px 20px rgba(var(--primary-rgb), 0.22);
}

body.page-account .change-password-submit.button.primary:hover {
  filter: brightness(1.04);
  box-shadow: 0 8px 24px rgba(var(--primary-rgb), 0.28);
}

@media (max-width: 480px) {
  .change-password-card {
    padding: 22px 18px 24px;
    border-radius: 18px;
  }

  .cpw-sms-btn {
    width: 100%;
  }
}

/* 人工智能生成合成内容显式提示 */
.ai-synthetic-disclaimer {
  margin: 0 0 12px;
  padding: 10px 12px;
  font-size: 12px;
  line-height: 1.55;
  color: var(--muted);
  background: rgba(var(--primary-rgb), 0.06);
  border: 1px solid rgba(var(--primary-rgb), 0.12);
  border-radius: var(--radius);
}

.record-image:has(> img) {
  display: grid;
  grid-template: 1fr / 1fr;
  position: relative;
}

.record-image > img {
  grid-area: 1 / 1;
}

/* 记录列表缩略图：加载完成前转圈占位，减轻「白块/半拉图」卡顿感 */
.record-image:has(> img) > .record-image-spinner {
  grid-area: 1 / 1;
  place-self: center;
  z-index: 2;
  box-sizing: border-box;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 2px solid rgba(15, 23, 42, 0.12);
  border-top-color: rgba(var(--primary-rgb), 0.88);
  animation: spin 0.68s linear infinite;
  pointer-events: none;
  transition: opacity 0.18s ease;
}

.record-image.record-image--thumb-loading > img {
  opacity: 0;
}

.record-image.record-image--thumb-loaded > img {
  opacity: 1;
  transition: opacity 0.22s ease;
}

.record-image.record-image--thumb-loaded > .record-image-spinner {
  opacity: 0;
}

.record-dialog-image-inner {
  position: relative;
  display: inline-block;
  width: 100%;
  max-width: 100%;
}

.record-dialog-image-inner img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 640px;
  margin: 0 auto;
  object-fit: contain;
  background: #fff;
}

/* 管理后台：精选审核 — 筛选栏（控件统一高度，下拉右侧留白避免箭头贴边裁切） */
.admin-featured-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px 14px;
  margin: 0 0 16px;
}

.admin-featured-toolbar__field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.admin-featured-toolbar__field--grow {
  flex: 1 1 200px;
}

.admin-featured-toolbar__label {
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
  line-height: 1.3;
}

.admin-featured-toolbar__select,
.admin-featured-toolbar__input {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
  color: #1a1f2e;
  background: #fff;
}

.admin-featured-toolbar__select {
  min-width: 11rem;
  max-width: 100%;
  padding-right: 2.5rem;
  cursor: pointer;
}

.admin-featured-toolbar__input {
  max-width: 400px;
  font-weight: 500;
}

.admin-featured-toolbar__input::placeholder {
  color: #94a3b8;
  font-weight: 500;
}

.admin-featured-toolbar__select:focus,
.admin-featured-toolbar__input:focus {
  outline: none;
  border-color: rgba(22, 119, 255, 0.55);
  box-shadow: 0 0 0 3px rgba(22, 119, 255, 0.12);
}

.admin-featured-toolbar__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.admin-featured-toolbar .button.small {
  min-height: 42px;
  padding: 0 16px;
  font-size: 13px;
  font-weight: 650;
}

/* 管理后台：精选审核 / 生成记录 — 卡片栅格与稳定缩略图（URL 含 v + 服务端 ETag，避免反复整图下载） */
.admin-records-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.admin-records-select-all {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 650;
  color: var(--muted);
  cursor: pointer;
  user-select: none;
}

.admin-media-board {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}

.admin-media-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  overflow: hidden;
  min-height: 100%;
}

.admin-record-card {
  position: relative;
}

.admin-record-card__check {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--line);
  cursor: pointer;
}

.admin-record-card__check input {
  width: 16px;
  height: 16px;
}

.admin-media-card__visual {
  position: relative;
  aspect-ratio: 1 / 1;
  background: rgba(15, 23, 42, 0.04);
}

.admin-media-card__thumb-btn {
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  margin: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
}

.admin-media-card__img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.admin-media-card__placeholder {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  font-size: 13px;
  font-weight: 650;
  color: var(--muted);
}

.admin-media-card__badge {
  position: absolute;
  right: 10px;
  top: 10px;
  z-index: 2;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 750;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--line);
}

.admin-media-card__rid {
  position: absolute;
  left: 10px;
  bottom: 10px;
  z-index: 2;
  padding: 3px 8px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 750;
  background: rgba(15, 23, 42, 0.72);
  color: #fff;
}

.admin-media-card__body {
  padding: 12px 12px 4px;
  flex: 1;
}

.admin-record-card__headline {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
}

.admin-media-card__user {
  margin: 0 0 6px;
  font-size: 14px;
}

.admin-media-card__prompt {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.admin-media-card__time {
  margin: 8px 0 0;
  font-size: 12px;
}

.admin-media-card__note {
  margin: 8px 0 0;
  font-size: 12px;
  line-height: 1.45;
}

.admin-media-card__meta {
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
  font-size: 12px;
}

.admin-media-card__meta div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.admin-media-card__meta dt {
  margin: 0;
  color: var(--muted);
  font-weight: 650;
}

.admin-media-card__meta dd {
  margin: 0;
  text-align: right;
  font-weight: 650;
}

.admin-media-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 12px 12px;
  border-top: 1px solid var(--line);
}

.admin-media-card__form {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.admin-media-card__form--grow {
  flex: 1;
  min-width: 0;
}

.admin-media-card__reject-input {
  flex: 1;
  min-width: 120px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 13px;
}

@media (max-width: 640px) {
  .admin-media-board {
    grid-template-columns: 1fr;
  }
}

/* 管理后台 · 精选审核：三列网格、略低卡片、右上状态、标签列网格对齐、文案单行省略、底栏双按钮 */
.admin-featured-board.admin-media-board {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  justify-content: stretch;
  align-items: start;
  gap: 12px 14px;
  max-width: none;
}

@media (max-width: 1100px) {
  .admin-featured-board.admin-media-board {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.admin-featured-board .admin-media-card.admin-featured-card {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: none;
  height: 234px;
  min-height: 0;
  box-sizing: border-box;
  padding: 10px 12px;
  margin: 0;
  overflow: hidden;
  border-radius: 14px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  background: #fff;
  text-align: left;
  box-shadow:
    0 1px 2px rgba(15, 23, 42, 0.04),
    0 6px 18px rgba(22, 88, 140, 0.07);
}

.admin-featured-card__row {
  flex: 1 1 auto;
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 10px;
  min-height: 0;
  padding: 0;
  overflow: hidden;
}

.admin-featured-board .admin-featured-card__visual {
  width: 86px;
  height: 86px;
  flex-shrink: 0;
  align-self: flex-start;
  aspect-ratio: 1 / 1;
  border-radius: 9px;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.04);
  border: 1px solid rgba(15, 23, 42, 0.06);
}

.admin-featured-card__thumb-btn {
  position: relative;
}

.admin-featured-card__thumb-fallback {
  display: none;
  position: absolute;
  inset: 0;
  align-items: center;
  justify-content: center;
  padding: 6px;
  font-size: 11px;
  font-weight: 650;
  line-height: 1.35;
  text-align: center;
  color: #8c8c8c;
  background: rgba(15, 23, 42, 0.06);
  pointer-events: none;
}

.admin-featured-card__thumb-btn--broken .admin-media-card__img {
  display: none !important;
}

.admin-featured-card__thumb-btn--broken .admin-featured-card__thumb-fallback {
  display: flex;
}

.admin-featured-card__main {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  align-self: stretch;
  padding: 0 72px 0 0;
  overflow: hidden;
  text-align: left;
}

.admin-featured-card__status {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 2;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 750;
  border: 1px solid transparent;
  white-space: nowrap;
  line-height: 1.35;
}

.admin-featured-card__status.is-approved {
  color: #1677ff;
  background: rgba(22, 119, 255, 0.1);
  border-color: rgba(22, 119, 255, 0.22);
}

.admin-featured-card__status.is-pending {
  color: #d46b08;
  background: rgba(250, 140, 22, 0.14);
  border-color: rgba(250, 140, 22, 0.28);
}

.admin-featured-card__status.is-rejected {
  color: #cf1322;
  background: rgba(207, 19, 34, 0.08);
  border-color: rgba(207, 19, 34, 0.2);
}

.admin-featured-card__fields {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  padding-top: 0;
  width: 100%;
  max-width: 100%;
  align-items: stretch;
  text-align: left;
}

.admin-featured-card__kv {
  display: grid;
  grid-template-columns: 4.5rem minmax(0, 1fr);
  column-gap: 5px;
  align-items: center;
  justify-items: start;
  width: 100%;
  min-width: 0;
  font-size: 11.5px;
  line-height: 1.3;
  text-align: left;
}

.admin-featured-card__k {
  margin: 0;
  padding: 0;
  text-align: left;
  justify-self: start;
  color: #8c8c8c;
  font-weight: 650;
  white-space: nowrap;
}

.admin-featured-card__k::after {
  content: "：";
}

.admin-featured-card__v {
  margin: 0;
  min-width: 0;
  width: 100%;
  max-width: 100%;
  text-align: left;
  justify-self: start;
  font-weight: 650;
  color: #1a1f2e;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-featured-card__v--mono {
  font-variant-numeric: tabular-nums;
  font-size: 11.5px;
  font-weight: 650;
  color: #3d4a5c;
}

.admin-featured-card__kv--prompt {
  align-items: center;
  min-height: 0;
  min-width: 0;
}

/* 文案：强制单行省略（内层 span 承载 ellipsis，避免 flex/grid 子项 min-width 未收缩） */
body.page-admin .admin-featured-board .admin-featured-card__prompt {
  margin: 0;
  padding: 0;
  min-width: 0;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  text-align: left;
}

body.page-admin .admin-featured-board .admin-featured-card__prompt-trim {
  display: block;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap !important;
  word-break: normal !important;
  overflow-wrap: normal !important;
  text-align: left;
  font-size: 11.5px;
  font-weight: 650;
  line-height: 1.3;
  color: #1a1f2e;
}

.admin-featured-card__reject-note {
  flex-shrink: 0;
  margin: 2px 0 0;
  padding: 0;
  font-size: 10.5px;
  line-height: 1.3;
  color: #8c8c8c;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  border: none;
  background: transparent;
  text-align: left;
  width: 100%;
  max-width: 100%;
}

.admin-featured-card__actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  flex-shrink: 0;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(15, 23, 42, 0.08);
  width: 100%;
  justify-items: stretch;
}

.admin-featured-card__actions--single {
  grid-template-columns: 1fr;
}

.admin-featured-card__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  box-sizing: border-box;
  min-height: 30px;
  padding: 5px 8px;
  margin: 0;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 750;
  line-height: 1.2;
  cursor: pointer;
  text-decoration: none;
  border: 1px solid transparent;
  transition:
    background 0.15s ease,
    border-color 0.15s ease,
    color 0.15s ease,
    opacity 0.15s ease;
}

.admin-featured-card__btn--primary {
  border-color: #1677ff;
  background: #1677ff;
  color: #fff;
}

.admin-featured-card__btn--primary:hover {
  background: #4096ff;
  border-color: #4096ff;
}

.admin-featured-card__btn--primary:active {
  background: #0958d9;
  border-color: #0958d9;
}

.admin-featured-card__btn--secondary {
  border-color: #9ca3af;
  background: #9ca3af;
  color: #fff;
}

.admin-featured-card__btn--secondary:hover {
  background: #6b7280;
  border-color: #6b7280;
}

.admin-featured-card__btn--secondary:active {
  background: #4b5563;
  border-color: #4b5563;
}

.admin-featured-card__btn:focus-visible {
  outline: 2px solid rgba(22, 119, 255, 0.45);
  outline-offset: 2px;
}

.admin-featured-card__inline-form {
  margin: 0;
  display: block;
  min-width: 0;
}

.admin-featured-card__inline-form--fill {
  display: block;
}

.admin-featured-card__inline-form .admin-featured-card__btn {
  width: 100%;
}

@media (max-width: 500px) {
  .admin-featured-board.admin-media-board {
    grid-template-columns: minmax(0, 1fr);
    justify-content: stretch;
  }

  .admin-featured-board .admin-media-card.admin-featured-card {
    width: 100%;
    max-width: min(100%, 520px);
    height: auto;
    min-height: 240px;
    margin-left: auto;
    margin-right: auto;
  }

  .admin-featured-card__row {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
  }

  .admin-featured-board .admin-featured-card__visual {
    width: 86px;
    height: 86px;
  }

  .admin-featured-card__main {
    flex: 1 1 220px;
    min-width: min(100%, 260px);
    padding-right: 72px;
  }
}

.admin-featured-tags-field {
  margin: 0 0 14px;
}

.admin-featured-tags-field__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 12px;
  margin-bottom: 10px;
}

.admin-featured-tags-field__label {
  font-size: 13px;
  font-weight: 650;
  color: var(--text);
}

.admin-featured-tags-field__hint {
  font-size: 12px;
}

.admin-featured-tags-field__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.admin-featured-tag-chip {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  font-size: 13px;
  font-weight: 600;
  color: #475467;
  cursor: pointer;
  user-select: none;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

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

.admin-featured-tag-chip:hover {
  border-color: rgba(22, 119, 255, 0.35);
  background: rgba(22, 119, 255, 0.04);
}

.admin-featured-tag-chip.is-selected,
.admin-featured-tag-chip:has(input:checked) {
  border-color: #1677ff;
  background: rgba(22, 119, 255, 0.1);
  color: #1677ff;
  box-shadow: 0 0 0 1px rgba(22, 119, 255, 0.12);
}

.admin-featured-tags-field__extra {
  margin-top: 0;
}

.admin-featured-tags-field__extra input {
  margin-top: 6px;
}

/* 管理后台：生成记录 — 横向紧凑列表（每行一条） */
.admin-records-list-wrap {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  overflow: hidden;
}

.admin-records-toolbar--inlist {
  padding: 8px 12px;
  margin-bottom: 0;
  border-bottom: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.02);
}

.admin-records-rows {
  display: flex;
  flex-direction: column;
}

.admin-record-row-compact {
  display: grid;
  grid-template-columns: 34px 48px minmax(0, 1fr) auto;
  gap: 8px 12px;
  align-items: center;
  padding: 6px 12px;
  border-bottom: 1px solid var(--line);
}

.admin-record-row-compact:last-child {
  border-bottom: 0;
}

.admin-record-row-compact.is-deleted {
  opacity: 0.9;
}

.admin-record-row-compact__check {
  display: flex;
  align-items: center;
  justify-content: center;
}

.admin-record-row-compact__check input {
  width: 16px;
  height: 16px;
}

.admin-record-row-compact__thumb {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
}

.admin-record-row-compact__thumb-btn {
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.04);
  cursor: zoom-in;
  overflow: hidden;
}

.admin-record-row-compact__img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.admin-record-row-compact__placeholder {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  font-size: 10px;
  font-weight: 650;
  color: var(--muted);
}

.admin-record-row-compact__meta {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  gap: 8px 12px;
  min-width: 0;
  overflow: hidden;
  font-size: 12px;
}

.admin-record-row-compact__id {
  flex-shrink: 0;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
}

.admin-record-row-compact__gen,
.admin-record-row-compact__feat,
.admin-record-row-compact__substatus {
  flex-shrink: 0;
}

.admin-record-row-compact__mode {
  flex-shrink: 0;
  font-weight: 650;
}

.admin-record-row-compact__user {
  flex-shrink: 0;
  font-size: 13px;
  font-weight: 700;
  max-width: 8rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-record-row-compact__prompt {
  flex: 1 1 120px;
  min-width: 0;
  font-size: 13px;
  font-weight: 650;
  line-height: 1.35;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.admin-record-row-compact__time {
  flex-shrink: 0;
  margin-left: auto;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.admin-record-row-compact__actions {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 6px 8px;
  align-items: center;
  justify-content: flex-end;
}

.admin-record-row-compact__actions .inline-delete-form {
  display: inline-flex;
}

@media (max-width: 720px) {
  .admin-record-row-compact {
    grid-template-columns: 32px 44px 1fr;
    grid-template-rows: auto auto;
    grid-template-areas:
      "ck th meta"
      "ck th actions";
  }

  .admin-record-row-compact__check {
    grid-area: ck;
  }

  .admin-record-row-compact__thumb {
    grid-area: th;
    width: 44px;
    height: 44px;
  }

  .admin-record-row-compact__thumb-btn {
    width: 44px;
    height: 44px;
  }

  .admin-record-row-compact__meta {
    grid-area: meta;
    flex-wrap: wrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 2px;
  }

  .admin-record-row-compact__time {
    margin-left: 0;
  }

  .admin-record-row-compact__actions {
    grid-area: actions;
    justify-content: flex-start;
    align-self: center;
  }
}

/* 管理后台 · 精选审核 / 上架弹窗（与 admin-ui.css 同步） */
body.page-admin .admin-record-featured-dialog {
  max-width: 480px;
  width: calc(100% - 2rem);
  padding: 0;
  border: none;
  border-radius: 16px;
  background: #fff;
  box-shadow:
    0 4px 24px rgba(15, 23, 42, 0.1),
    0 20px 48px rgba(15, 23, 42, 0.14);
  box-sizing: border-box;
  overflow: hidden;
  color: #1a1f2e;
}

body.page-admin .admin-record-featured-dialog::backdrop {
  background: rgba(15, 23, 42, 0.42);
  backdrop-filter: blur(2px);
}

body.page-admin .admin-record-featured-dialog__form {
  display: flex;
  flex-direction: column;
  max-height: min(90vh, 720px);
  box-sizing: border-box;
}

body.page-admin .admin-record-featured-dialog__head {
  padding: 22px 22px 0;
}

body.page-admin .admin-record-featured-dialog__title {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 800;
  color: #1a1f2e;
  letter-spacing: -0.02em;
  line-height: 1.35;
}

body.page-admin .admin-record-featured-dialog__hint {
  margin: 0;
  font-size: 13px;
  line-height: 1.6;
  color: #64748b;
}

body.page-admin .admin-record-featured-dialog__body {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 18px 22px 8px;
  overflow-y: auto;
  flex: 1 1 auto;
}

body.page-admin .admin-record-featured-dialog__footer {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
  padding: 14px 22px 18px;
  border-top: 1px solid #eef2f7;
  background: #fafbfc;
}

body.page-admin .admin-record-featured-dialog__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 6px;
}

/* ========== 手机端首页（发现 hub）========== */
.mobile-home-shell {
  display: none;
}

body.page-app.mobile-home-hub {
  background: #f5f7fa;
}

body.page-app.mobile-home-hub .index-workspace-block {
  display: none !important;
}

body.page-app.mobile-home-hub .mobile-home-shell {
  display: block;
  max-width: 520px;
  margin: 0 auto;
  padding: max(12px, env(safe-area-inset-top, 0px)) 16px 12px;
  box-sizing: border-box;
}

body.page-app.mobile-home-hub .app-shell {
  padding: 0;
  max-width: none;
}

@media (max-width: 720px) {
  body.page-app.mobile-home-hub {
    background: #f5f7fa;
  }

  body.page-app.mobile-home-hub .site-header {
    display: none !important;
  }

  body.page-app.mobile-home-hub .index-workspace-block {
    display: none !important;
  }

  body.page-app.mobile-home-hub .mobile-home-shell {
    max-width: none;
    margin: 0;
    padding: max(8px, env(safe-area-inset-top, 0px)) 16px 12px;
  }

  body.page-app.mobile-home-hub .app-shell {
    padding: 0;
    max-width: none;
  }
}

/* 首页/创作页「最近生成」标题：统一两行省略，完整文案见 title 属性 */
.mobile-home-recent-item__title {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  color: #101828;
  line-height: 1.35;
  min-width: 0;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
  word-break: break-word;
  overflow-wrap: anywhere;
}

/* 首页 Hub 组件样式（手机 / 电脑共用，避免仅 ≤720px 时电脑端无排版） */
  .mobile-home-header {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 16px;
  }

  .mobile-home-header__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
  }

  .mobile-home-header__actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
  }

  .mobile-home-brand {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    text-decoration: none;
  }

  .mobile-home-brand__logo {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
    background: linear-gradient(135deg, #e8f2fc, #eef6fd);
  }

  .mobile-home-brand__mark {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: linear-gradient(135deg, #1e80ff, #4096ff);
    color: #fff;
    font-size: 16px;
    font-weight: 900;
    display: grid;
    place-items: center;
    flex-shrink: 0;
  }

  .mobile-home-brand__name {
    font-size: 18px;
    font-weight: 800;
    color: #1a1a1a;
    letter-spacing: -0.02em;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .mobile-home-member {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 11px 6px 9px;
    border-radius: 999px;
    border: 1px solid rgba(30, 128, 255, 0.18);
    background: linear-gradient(180deg, #f0f7ff 0%, #e8f3ff 100%);
    color: #1e80ff;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
    box-shadow: 0 1px 2px rgba(30, 128, 255, 0.08);
  }

  .mobile-home-member__icon {
    flex-shrink: 0;
    opacity: 0.95;
  }

  .mobile-home-bell {
    position: relative;
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #475467;
    display: grid;
    place-items: center;
    text-decoration: none;
    flex-shrink: 0;
  }

  .mobile-home-bell--dot::after {
    content: "";
    position: absolute;
    top: 6px;
    right: 6px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #ff4d4f;
    border: 1.5px solid #f5f7fa;
  }

  .mobile-home-search {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 2px 2px 2px 12px;
    min-height: 36px;
    border-radius: 999px;
    background: #fff;
    border: 1px solid #e4e7ec;
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
  }

  .mobile-home-search__icon {
    color: #98a2b3;
    display: inline-flex;
    flex-shrink: 0;
  }

  .mobile-home-search__icon svg {
    width: 16px;
    height: 16px;
  }

  .mobile-home-search__input {
    flex: 1;
    min-width: 0;
    width: auto;
    height: auto;
    min-height: 0;
    padding: 6px 0;
    border: 0 !important;
    background: transparent;
    font-size: 13px;
    line-height: 1.3;
    color: #101828;
    outline: none;
    box-shadow: none !important;
  }

  .mobile-home-search__input:hover,
  .mobile-home-search__input:focus,
  .mobile-home-search__input:focus-visible {
    border: 0 !important;
    outline: none;
    box-shadow: none !important;
    background: transparent;
  }

  body.page-app .mobile-home-search .mobile-home-search__input:focus,
  body.page-records .mobile-home-search .mobile-home-search__input:focus,
  body.page-index .mobile-home-search .mobile-home-search__input:focus,
  body.page-featured .mobile-home-search .mobile-home-search__input:focus,
  body.page-announcements .mobile-home-search .mobile-home-search__input:focus {
    border: 0 !important;
    box-shadow: none !important;
    background: transparent;
  }

  .mobile-home-search__input::placeholder {
    color: #98a2b3;
    font-size: 13px;
  }

  .mobile-home-search__btn {
    flex-shrink: 0;
    border: 0;
    border-radius: 999px;
    padding: 5px 14px;
    background: #1e80ff;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.2;
    cursor: pointer;
  }

  .mobile-home-hero {
    position: relative;
    margin-bottom: 14px;
    border-radius: 16px;
    overflow: hidden;
    min-height: 0;
    box-shadow: 0 4px 16px rgba(30, 128, 255, 0.1);
    background: linear-gradient(135deg, #e8f4ff 0%, #f5f9ff 100%);
  }

  .mobile-home-hero__slide {
    min-height: 0;
    position: relative;
    display: none;
    align-items: stretch;
  }

  .mobile-home-hero__slide.is-active {
    display: block;
  }

  .mobile-home-hero__slide--banner {
    position: relative;
    width: 100%;
    min-height: 0;
    overflow: hidden;
  }

  .mobile-home-hero__banner-link {
    display: block;
    position: relative;
    width: 100%;
    height: auto;
    text-decoration: none;
    color: inherit;
  }

  .mobile-home-hero__banner-img {
    width: 100%;
    height: auto;
    aspect-ratio: 1000 / 280;
    object-fit: cover;
    object-position: center;
    display: block;
    vertical-align: middle;
  }

  .mobile-home-hero__slide--banner-rich .mobile-home-hero__banner-img {
    object-fit: cover;
  }

  .mobile-home-hero__overlay {
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 16px;
    max-width: 62%;
    pointer-events: none;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.92) 0%, rgba(255, 255, 255, 0.55) 70%, transparent 100%);
  }

  .mobile-home-hero__overlay h2 {
    margin: 0 0 6px;
    font-size: 20px;
    font-weight: 800;
    line-height: 1.25;
    color: #1e80ff;
  }

  .mobile-home-hero__overlay p {
    margin: 0;
    font-size: 12px;
    color: #475467;
    line-height: 1.5;
  }

  .mobile-home-hero__slide--banner-rich .mobile-home-hero__overlay .mobile-home-hero__cta {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 12px;
    padding: 6px 14px;
    border-radius: 999px;
    background: #1e80ff;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    width: fit-content;
  }

  .mobile-home-hero__slide--brand,
  .mobile-home-hero__slide--inspire {
    width: 100%;
    background: linear-gradient(135deg, #dbeafe 0%, #eff6ff 48%, #f0f9ff 100%);
    color: #1e40af;
    padding: 20px 16px;
    box-sizing: border-box;
  }

  .mobile-home-hero__brand-bg {
    position: absolute;
    inset: 0;
    background:
      radial-gradient(circle at 85% 50%, rgba(96, 165, 250, 0.35), transparent 55%),
      linear-gradient(135deg, #dbeafe 0%, #eff6ff 100%);
    pointer-events: none;
  }

  .mobile-home-hero__brand-bg--alt {
    background:
      radial-gradient(circle at 80% 40%, rgba(59, 130, 246, 0.25), transparent 50%),
      linear-gradient(135deg, #e0f2fe 0%, #eff6ff 100%);
  }

  .mobile-home-hero__brand-art {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 110px;
    height: 100px;
    display: grid;
    place-items: center;
    pointer-events: none;
  }

  .mobile-home-hero__brand-art img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
  }

  .mobile-home-hero__copy {
    position: relative;
    z-index: 1;
    max-width: 58%;
  }

  .mobile-home-hero__copy h2 {
    margin: 0 0 6px;
    font-size: 20px;
    font-weight: 800;
    line-height: 1.25;
    color: #1e80ff;
  }

  .mobile-home-hero__copy p {
    margin: 0;
    font-size: 12px;
    color: #475467;
    line-height: 1.5;
  }

  .mobile-home-hero__cta {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 12px;
    padding: 6px 14px;
    border-radius: 999px;
    background: #1e80ff;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
  }

  .mobile-home-hero__dots {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 10px;
    display: flex;
    justify-content: center;
    gap: 5px;
    z-index: 2;
  }

  .mobile-home-hero__dots span {
    width: 6px;
    height: 6px;
    border-radius: 999px;
    background: rgba(30, 128, 255, 0.25);
    transition: width 0.2s ease, background 0.2s ease;
  }

  .mobile-home-hero__dots span.is-active {
    width: 16px;
    background: #1e80ff;
  }

  .mobile-home-quick-card {
    margin-bottom: 16px;
    padding: 10px 4px 8px;
    border-radius: 14px;
    background: #fff;
    border: 1px solid rgba(255, 255, 255, 0.85);
    box-shadow: 0 2px 10px rgba(16, 24, 40, 0.04);
  }

  .mobile-home-quick {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 2px;
  }

  .mobile-home-quick__item {
    border: 0;
    background: transparent;
    padding: 4px 2px 6px;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: inherit;
    min-width: 0;
    transition: background 0.15s ease;
  }

  .mobile-home-quick__item:active {
    background: rgba(248, 250, 252, 0.72);
  }

  .mobile-home-quick__icon {
    position: relative;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    flex-shrink: 0;
    overflow: hidden;
    isolation: isolate;
    border: 1px solid rgba(255, 255, 255, 0.78);
    box-shadow:
      0 4px 14px rgba(15, 23, 42, 0.08),
      inset 0 1px 0 rgba(255, 255, 255, 0.92),
      inset 0 -1px 0 rgba(255, 255, 255, 0.28);
    -webkit-backdrop-filter: blur(10px) saturate(1.35);
    backdrop-filter: blur(10px) saturate(1.35);
  }

  .mobile-home-quick__icon--glass-design {
    padding: 0;
    border: none;
    background: transparent;
    box-shadow: none;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    overflow: visible;
    flex-shrink: 0;
  }

  .mobile-home-quick__icon--glass-design::before {
    display: none;
  }

  /* 1.html 毛玻璃四图标 · 200px 稿 scale(0.2) → 40px；外框用真实 1px 描边避免缩放发虚 */
  .mh-gi {
    width: 40px;
    height: 40px;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
    border-radius: 12px;
    background: linear-gradient(145deg, #ffffff 0%, #e6f4ff 100%);
    border: 1px solid rgba(22, 119, 255, 0.32);
    box-shadow:
      0 2px 8px rgba(22, 119, 255, 0.14),
      inset 0 1px 0 rgba(255, 255, 255, 1),
      inset 0 0 0 1px rgba(255, 255, 255, 0.72);
  }

  .mh-gi__glass {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 200px;
    height: 200px;
    margin: -100px 0 0 -100px;
    transform: scale(0.2) translateZ(0);
    transform-origin: center center;
    border-radius: 48px;
    background: linear-gradient(135deg, #ffffff 0%, #d6ebff 100%);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    border: 3px solid rgba(105, 177, 255, 0.72);
    box-shadow:
      inset 0 3px 6px rgba(255, 255, 255, 0.98),
      inset 0 -3px 6px rgba(22, 119, 255, 0.12);
    display: flex;
    justify-content: center;
    align-items: center;
    -webkit-font-smoothing: antialiased;
  }

  .mh-gi__glass::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.55) 0%, rgba(255, 255, 255, 0) 100%);
    border-radius: 48px 48px 0 0;
    pointer-events: none;
    z-index: 10;
  }

  .mh-gi__inner {
    border-radius: 32px;
    background: linear-gradient(135deg, #f7fbff 0%, #d6ebff 100%);
    border: 2px solid rgba(64, 150, 255, 0.52);
    box-shadow:
      inset 0 2px 4px rgba(255, 255, 255, 0.95),
      inset 0 -2px 4px rgba(22, 119, 255, 0.1);
    position: relative;
    overflow: hidden;
  }

  .mh-gi__inner::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.45) 0%, rgba(255, 255, 255, 0) 100%);
    border-radius: 32px 32px 0 0;
    pointer-events: none;
    z-index: 5;
  }

  .mh-gi__inner--document {
    width: 130px;
    height: 150px;
    background: linear-gradient(135deg, #4096ff 0%, #1677ff 100%);
    border: 2px solid rgba(255, 255, 255, 0.45);
    box-shadow:
      inset 0 2px 4px rgba(255, 255, 255, 0.88),
      inset 0 -2px 4px rgba(9, 88, 217, 0.22);
  }

  .mh-gi__document-square {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.95);
    position: absolute;
    top: 30px;
    left: 26px;
    box-shadow: 0 2px 8px rgba(22, 119, 255, 0.16);
  }

  .mh-gi__document-line {
    width: 78px;
    height: 14px;
    border-radius: 7px;
    background: rgba(255, 255, 255, 0.95);
    position: absolute;
    left: 26px;
    box-shadow: 0 2px 8px rgba(22, 119, 255, 0.14);
  }

  .mh-gi__document-line-1 {
    top: 92px;
  }

  .mh-gi__document-line-2 {
    top: 118px;
  }

  .mh-gi__inner--image {
    width: 140px;
    height: 140px;
  }

  .mh-gi__image-sun {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, #69b1ff 0%, #1677ff 100%);
    position: absolute;
    top: 26px;
    left: 30px;
    box-shadow:
      0 3px 12px rgba(22, 119, 255, 0.38),
      inset 0 -2px 4px rgba(9, 88, 217, 0.22),
      inset 0 2px 4px rgba(255, 255, 255, 0.55);
  }

  .mh-gi__image-mountains {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 78px;
  }

  .mh-gi__mountain-left {
    position: absolute;
    bottom: 0;
    left: 12px;
    width: 58px;
    height: 58px;
    background: linear-gradient(135deg, #1e80ff 0%, #1677ff 100%);
    clip-path: polygon(0% 100%, 50% 0%, 100% 100%);
    border-radius: 0 0 8px 8px;
  }

  .mh-gi__mountain-right {
    position: absolute;
    bottom: 0;
    right: 12px;
    width: 78px;
    height: 78px;
    background: linear-gradient(135deg, #4096ff 0%, #1e80ff 100%);
    clip-path: polygon(0% 100%, 50% 0%, 100% 100%);
    border-radius: 0 0 8px 8px;
  }

  .mh-gi__inner--user {
    width: 140px;
    height: 140px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 12px;
  }

  .mh-gi__user-head {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, #4096ff 0%, #1677ff 100%);
    box-shadow:
      0 4px 16px rgba(22, 119, 255, 0.38),
      inset 0 -2px 4px rgba(9, 88, 217, 0.22),
      inset 0 2px 4px rgba(255, 255, 255, 0.55);
    position: relative;
  }

  .mh-gi__user-body {
    width: 84px;
    height: 48px;
    border-radius: 42px 42px 16px 16px;
    background: linear-gradient(135deg, #4096ff 0%, #1677ff 100%);
    box-shadow:
      0 4px 16px rgba(22, 119, 255, 0.34),
      inset 0 -2px 4px rgba(9, 88, 217, 0.2),
      inset 0 2px 4px rgba(255, 255, 255, 0.55);
    position: relative;
  }

  .mh-gi__inner--star {
    width: 140px;
    height: 140px;
    display: flex;
    justify-content: center;
    align-items: center;
  }

  .mh-gi__star {
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, #69b1ff 0%, #1677ff 100%);
    clip-path: polygon(
      50% 0%,
      61% 35%,
      98% 35%,
      68% 57%,
      79% 91%,
      50% 70%,
      21% 91%,
      32% 57%,
      2% 35%,
      39% 35%
    );
    box-shadow:
      0 5px 22px rgba(22, 119, 255, 0.4),
      inset 0 2px 6px rgba(255, 255, 255, 0.62),
      inset 0 -2px 6px rgba(9, 88, 217, 0.22);
    position: relative;
  }

  .mh-gi__star::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.35) 0%, rgba(255, 255, 255, 0) 100%);
    clip-path: polygon(
      50% 0%,
      61% 35%,
      98% 35%,
      68% 57%,
      79% 91%,
      50% 70%,
      21% 91%,
      32% 57%,
      2% 35%,
      39% 35%
    );
    pointer-events: none;
  }

  .mobile-home-quick__icon svg {
    position: relative;
    z-index: 1;
    width: 20px;
    height: 20px;
    display: block;
    filter: drop-shadow(0 1px 1px rgba(255, 255, 255, 0.65));
  }

  .mobile-home-quick__icon--glass svg {
    width: 20px;
    height: 20px;
  }

  .mobile-home-quick__icon--asset {
    width: 50px;
    height: 50px;
    border: none;
    background: transparent;
    box-shadow: none;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    overflow: hidden;
  }

  .mobile-home-quick__icon--asset::before {
    display: none;
  }

  .mobile-home-quick__icon--asset img,
  .mobile-home-quick__icon--asset svg,
  .mobile-home-quick-icon-svg {
    width: 50px;
    height: 50px;
    display: block;
    flex-shrink: 0;
  }

  .mobile-home-quick__icon--draw {
    background: linear-gradient(145deg, rgba(29, 78, 216, 0.22) 0%, rgba(219, 234, 254, 0.48) 100%);
    color: #1d4ed8;
  }

  .mobile-home-quick__icon--edit {
    background: linear-gradient(145deg, rgba(124, 58, 237, 0.22) 0%, rgba(237, 233, 254, 0.48) 100%);
    color: #7c3aed;
  }

  .mobile-home-quick__icon--style {
    background: linear-gradient(145deg, rgba(234, 88, 12, 0.2) 0%, rgba(255, 237, 213, 0.48) 100%);
    color: #ea580c;
  }

  .mobile-home-quick__icon--hd {
    background: linear-gradient(145deg, rgba(13, 148, 136, 0.26) 0%, rgba(204, 251, 241, 0.46) 100%);
    color: #0f766e;
    box-shadow:
      0 4px 14px rgba(13, 148, 136, 0.14),
      inset 0 1px 0 rgba(255, 255, 255, 0.92),
      inset 0 -1px 0 rgba(255, 255, 255, 0.28);
  }

  .mobile-home-quick__icon--cutout {
    background: linear-gradient(145deg, rgba(219, 39, 119, 0.22) 0%, rgba(252, 231, 243, 0.48) 100%);
    color: #be185d;
    box-shadow:
      0 4px 14px rgba(219, 39, 119, 0.12),
      inset 0 1px 0 rgba(255, 255, 255, 0.92),
      inset 0 -1px 0 rgba(255, 255, 255, 0.28);
  }

  .mobile-home-quick__icon--poster {
    background: linear-gradient(145deg, rgba(37, 99, 235, 0.24) 0%, rgba(219, 234, 254, 0.48) 100%);
    color: #1d4ed8;
    box-shadow:
      0 4px 14px rgba(37, 99, 235, 0.12),
      inset 0 1px 0 rgba(255, 255, 255, 0.92),
      inset 0 -1px 0 rgba(255, 255, 255, 0.28);
  }

  .mobile-home-quick__icon--model {
    background: linear-gradient(145deg, rgba(124, 58, 237, 0.24) 0%, rgba(237, 233, 254, 0.5) 100%);
    color: #6d28d9;
    box-shadow:
      0 4px 14px rgba(124, 58, 237, 0.12),
      inset 0 1px 0 rgba(255, 255, 255, 0.92),
      inset 0 -1px 0 rgba(255, 255, 255, 0.28);
  }

  .mobile-home-quick__label {
    margin-top: 0;
    font-size: 10px;
    font-weight: 700;
    color: #101828;
    line-height: 1.25;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    position: relative;
    z-index: 1;
  }

  .mobile-home-quick__desc {
    font-size: 8px;
    color: #98a2b3;
    line-height: 1.25;
    text-align: center;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 1;
    overflow: hidden;
    max-width: 100%;
    margin-top: -4px;
    position: relative;
    z-index: 1;
  }

  .mobile-home-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 12px;
  }

  .mobile-home-section-title {
    margin: 0;
    font-size: 17px;
    font-weight: 800;
    color: #101828;
  }

  .mobile-home-section-more {
    font-size: 13px;
    font-weight: 600;
    color: #98a2b3;
    text-decoration: none;
    flex-shrink: 0;
  }

  .mobile-home-section-more::after {
    content: " >";
  }

  .mobile-home-templates {
    margin-bottom: 22px;
  }

  .mobile-home-templates__empty,
  .mobile-home-recent__empty {
    margin: 0;
    padding: 24px 0;
    text-align: center;
    font-size: 13px;
    color: #98a2b3;
  }

  .mobile-home-templates__grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
  }

  .mobile-home-template-card {
    min-width: 0;
    text-decoration: none;
    color: inherit;
  }

  .mobile-home-template-card__media {
    position: relative;
    aspect-ratio: 3 / 4;
    border-radius: 14px;
    overflow: hidden;
    background: #eef2ff;
    margin-bottom: 8px;
  }

  .mobile-home-template-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
  }

  .mobile-home-template-card__ph {
    display: grid;
    place-items: center;
    height: 100%;
    font-size: 12px;
    color: #98a2b3;
  }

  .mobile-home-template-card__tag {
    position: absolute;
    left: 8px;
    bottom: 8px;
    padding: 3px 8px;
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.45);
    color: #fff;
    font-size: 10px;
    font-weight: 600;
    line-height: 1.2;
  }

  .mobile-home-template-card__title {
    margin: 0 0 3px;
    font-size: 11px;
    font-weight: 700;
    color: #101828;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
  }

  .mobile-home-template-card__stat {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 2px;
    font-size: 10px;
    color: #98a2b3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .mobile-home-template-card__stat svg {
    flex-shrink: 0;
    width: 10px;
    height: 10px;
    color: #ff7a45;
  }

  .mobile-home-recent {
    margin-bottom: 8px;
  }

  .mobile-home-recent__list {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }

  .mobile-home-recent-item {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr) auto;
    gap: 12px;
    align-items: start;
    padding: 12px;
    border-radius: 14px;
    background: #fff;
    border: 1px solid #eef2f6;
    box-shadow: 0 2px 8px rgba(16, 24, 40, 0.04);
  }

  .mobile-home-recent-item__thumb {
    display: block;
    width: 72px;
    height: 72px;
    border-radius: 10px;
    overflow: hidden;
    background: #f2f4f7;
    text-decoration: none;
  }

  .mobile-home-recent-item__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
  }

  .mobile-home-recent-item__ph {
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
    font-size: 11px;
    color: #98a2b3;
    text-align: center;
    padding: 4px;
    box-sizing: border-box;
  }

  .mobile-home-recent-item__body {
    min-width: 0;
  }

  .mobile-home-recent-item__top {
    margin-bottom: 6px;
  }

  .mobile-home-recent-item__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 6px;
  }

  .mobile-home-recent-item__tags span {
    padding: 2px 8px;
    border-radius: 999px;
    background: #f2f4f7;
    color: #667085;
    font-size: 10px;
    font-weight: 600;
    line-height: 1.4;
  }

  .mobile-home-recent-item__time {
    display: block;
    font-size: 11px;
    color: #98a2b3;
  }

  .mobile-home-recent-item__retry {
    align-self: end;
    padding: 6px 12px;
    border-radius: 999px;
    border: 1px solid #1e80ff;
    background: #fff;
    color: #1e80ff;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
  }

@media (max-width: 720px) {
  body.mobile-tab-shell .mobile-bottom-nav.mobile-bottom-nav--3,
  body.mobile-tab-shell .mobile-bottom-nav.mobile-bottom-nav--4,
  body.mobile-tab-shell .mobile-bottom-nav.mobile-bottom-nav--5 {
    right: 0;
    left: 0;
    bottom: 0;
    width: auto;
    border-radius: 0;
    border: 0;
    border-top: 1px solid #eef2f6;
    padding: 6px 6px calc(6px + env(safe-area-inset-bottom, 0px));
    box-shadow: 0 -4px 16px rgba(16, 24, 40, 0.06);
    background: #fff;
    align-items: center;
    gap: 0;
  }

  body.mobile-tab-shell .mobile-bottom-nav.mobile-bottom-nav--3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  body.mobile-tab-shell .mobile-bottom-nav.mobile-bottom-nav--4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  body.mobile-tab-shell .mobile-bottom-nav.mobile-bottom-nav--5 {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  body.mobile-tab-shell .mobile-bottom-nav.mobile-bottom-nav--3 .mobile-bottom-nav__item,
  body.mobile-tab-shell .mobile-bottom-nav.mobile-bottom-nav--4 .mobile-bottom-nav__item,
  body.mobile-tab-shell .mobile-bottom-nav.mobile-bottom-nav--5 .mobile-bottom-nav__item {
    min-height: 50px;
    font-size: 10px;
    font-weight: 600;
    color: #98a2b3;
    border-radius: 12px;
  }

  body.mobile-tab-shell .mobile-bottom-nav.mobile-bottom-nav--3 .mobile-bottom-nav__item.active,
  body.mobile-tab-shell .mobile-bottom-nav.mobile-bottom-nav--4 .mobile-bottom-nav__item.active,
  body.mobile-tab-shell .mobile-bottom-nav.mobile-bottom-nav--5 .mobile-bottom-nav__item.active {
    color: #1e80ff;
    background: #f0f7ff;
    box-shadow: 0 1px 4px rgba(30, 128, 255, 0.1);
  }

  body.mobile-tab-shell .mobile-bottom-nav.mobile-bottom-nav--3 .mobile-nav-icon svg,
  body.mobile-tab-shell .mobile-bottom-nav.mobile-bottom-nav--4 .mobile-nav-icon svg,
  body.mobile-tab-shell .mobile-bottom-nav.mobile-bottom-nav--5 .mobile-nav-icon svg {
    width: 22px;
    height: 22px;
  }

  /* 底栏 Tab 页：主内容区只留小间距，由页脚 padding 统一为固定底栏让位，避免 shell+footer 双重留白 */
  body.mobile-tab-shell {
    --mobile-tab-bar-clearance: calc(58px + env(safe-area-inset-bottom, 0px));
    --mobile-shell-bottom-gap: 12px;
  }

  body.mobile-tab-shell .mobile-create-shell,
  body.mobile-tab-shell .mobile-home-shell,
  body.mobile-tab-shell.page-app.mobile-home-hub .mobile-home-shell,
  body.mobile-tab-shell .mobile-feat-shell,
  body.mobile-tab-shell .mobile-feat-detail-shell,
  body.mobile-tab-shell .mobile-account-shell,
  body.mobile-tab-shell .mobile-record-detail-shell {
    padding-bottom: var(--mobile-shell-bottom-gap) !important;
  }

  body.mobile-tab-shell .app-shell:not(:has(.site-footer--mobile-tab)):not(:has(.mobile-account-footer)) .mobile-create-shell,
  body.mobile-tab-shell .app-shell:not(:has(.site-footer--mobile-tab)):not(:has(.mobile-account-footer)) .mobile-home-shell,
  body.mobile-tab-shell.page-app.mobile-home-hub .app-shell:not(:has(.site-footer--mobile-tab)):not(:has(.mobile-account-footer)) .mobile-home-shell,
  body.mobile-tab-shell .app-shell:not(:has(.site-footer--mobile-tab)):not(:has(.mobile-account-footer)) .mobile-feat-shell,
  body.mobile-tab-shell .app-shell:not(:has(.site-footer--mobile-tab)):not(:has(.mobile-account-footer)) .mobile-feat-detail-shell,
  body.mobile-tab-shell .app-shell:not(:has(.site-footer--mobile-tab)):not(:has(.mobile-account-footer)) .mobile-account-shell,
  body.mobile-tab-shell .app-shell:not(:has(.site-footer--mobile-tab)):not(:has(.mobile-account-footer)) .mobile-record-detail-shell {
    padding-bottom: calc(var(--mobile-tab-bar-clearance) + var(--mobile-shell-bottom-gap)) !important;
  }

  .site-footer--mobile-tab {
    flex-shrink: 0;
    width: min(100%, 520px);
    max-width: 520px;
    margin: 6px auto 0;
    padding: 6px 16px calc(var(--mobile-tab-bar-clearance, calc(58px + env(safe-area-inset-bottom, 0px))) + 6px);
    color: #98a2b3;
    font-size: 12px;
    line-height: 1.55;
    text-align: center;
    box-sizing: border-box;
  }

  .site-footer--mobile-tab p {
    margin: 0;
  }

  .site-footer--mobile-tab a {
    color: #667085;
    font-weight: 600;
  }

  .mobile-nav-icon--dot-wrap {
    position: relative;
  }

  .mobile-bottom-nav__item[href="/announcements"] .mobile-nav-icon--dot-wrap::after,
  .mobile-nav-icon--dot-wrap.mobile-nav-icon--has-dot::after {
    content: "";
    position: absolute;
    top: -1px;
    right: -1px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #ff4d4f;
    border: 1.5px solid #fff;
  }
}
