:root,
[data-theme="ink"] {
  --bg: #f1f2ed;
  --card: #fdfdfb;
  --text: #212520;
  --muted: #737a73;
  --line: #e0e2da;
  --primary: #2f5d50;
  --primary-dark: #23483e;
  --blue: #2f5d50;
  --amber: #8a6a3a;
  --red: #9e3b32;
  --on-primary: #ffffff;
  --shadow: 0 8px 24px rgba(30, 35, 30, .06);
  --radius: 14px;
  --topbar-bg: rgba(255, 255, 253, .94);
  --surface-soft: #f4f8f4;
  --surface-th: #f7f9f6;
  --btn-primary-bg: #edf3ee;
  --btn-primary-border: #a9c2b4;
  --btn-primary-text: #2f5d50;
  --btn-primary-hover-bg: #2f5d50;
  --btn-primary-hover-text: #ffffff;
  --search-btn-bg: #2f5d50;
  --search-btn-text: #ffffff;
  --badge-green-bg: #e8f1ea;
  --badge-green-text: #2f5d50;
  --badge-amber-bg: #f5eddd;
  --badge-amber-text: #8a6a3a;
  --badge-red-bg: #f6e3df;
  --badge-red-text: #9e3b32;
  --badge-gray-bg: #eef0eb;
  --badge-gray-text: #6f766e;
  --flash-bg: #f1f7f3;
  --flash-border: #d5e3da;
  --flash-text: #496257;
  --view-active-bg: #e8f1ea;
  --view-active-text: #2f5d50;
  --cover-bg: #fcfcf8;
  --cover-border: #dadcd5;
  --cover-frame: rgba(33, 37, 32, .55);
  --cover-line: rgba(33, 37, 32, .10);
  --cover-spine: rgba(47, 93, 80, .28);
  --cover-title: #2f5d50;
  --cover-kicker: #2f5d50;
  --cover-footer: #77857b;
  --cover-shadow: rgba(35, 42, 36, .08);
  --paper-noise: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
  --ink-wash: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='150' height='225' viewBox='0 0 150 225'%3E%3Cdefs%3E%3Cfilter id='b' x='-40%25' y='-40%25' width='180%25' height='180%25'%3E%3CfeGaussianBlur stdDeviation='13'/%3E%3C/filter%3E%3Cfilter id='c' x='-40%25' y='-40%25' width='180%25' height='180%25'%3E%3CfeGaussianBlur stdDeviation='3'/%3E%3C/filter%3E%3C/defs%3E%3Cg fill='%232f5d50'%3E%3Cellipse cx='116' cy='34' rx='58' ry='36' opacity='0.045' filter='url(%23b)'/%3E%3Cpath d='M-10 225 L-10 198 L18 170 L38 190 L58 158 L78 188 L100 162 L122 190 L150 170 L160 190 L160 225 Z' opacity='0.035' filter='url(%23b)'/%3E%3Cpath d='M12 70 Q 48 38 72 76 T 132 88' fill='none' stroke='%232f5d50' stroke-width='18' opacity='0.035' filter='url(%23b)'/%3E%3Cpath d='M30 200 Q 55 170 75 190' fill='none' stroke='%232f5d50' stroke-width='8' opacity='0.03' filter='url(%23c)'/%3E%3Ccircle cx='78' cy='112' r='42' fill='none' stroke='%232f5d50' stroke-width='7' stroke-linecap='round' stroke-dasharray='210 26' opacity='0.03' filter='url(%23c)'/%3E%3C/g%3E%3C/svg%3E");
}

[data-theme="warm"] {
  --bg: #f3ede1;
  --card: #fbf7ef;
  --text: #2d2924;
  --muted: #7c7165;
  --line: #ded3c1;
  --primary: #3f3229;
  --primary-dark: #2b211b;
  --blue: #8a4b3a;
  --amber: #9a6b2f;
  --red: #9e3b32;
  --on-primary: #ffffff;
  --shadow: 0 8px 24px rgba(60, 48, 35, .07);
  --topbar-bg: rgba(250, 248, 241, .95);
  --surface-soft: #f7f0e1;
  --surface-th: #f7f1e6;
  --btn-primary-bg: #f3ead9;
  --btn-primary-border: #c9bca8;
  --btn-primary-text: #3f3229;
  --btn-primary-hover-bg: #3f3229;
  --btn-primary-hover-text: #ffffff;
  --search-btn-bg: #3f3229;
  --search-btn-text: #ffffff;
  --badge-green-bg: #e5e5d5;
  --badge-green-text: #4f5a45;
  --badge-amber-bg: #f0e2ca;
  --badge-amber-text: #8a5a2b;
  --badge-red-bg: #f1ded8;
  --badge-red-text: #8f2f27;
  --badge-gray-bg: #eee8dc;
  --badge-gray-text: #6f6559;
  --flash-bg: #f8f3e8;
  --flash-border: #e4dac7;
  --flash-text: #4d5f57;
  --view-active-bg: #efe5d4;
  --view-active-text: #5a4636;
  --cover-bg: #f7f0e1;
  --cover-border: #d6c8ae;
  --cover-frame: rgba(45, 41, 36, .45);
  --cover-line: rgba(45, 41, 36, .12);
  --cover-spine: rgba(58, 47, 40, .45);
  --cover-title: #2d2924;
  --cover-kicker: #7c7468;
  --cover-footer: #7c7468;
  --cover-shadow: rgba(40, 35, 24, .14);
}

[data-theme="dark"] {
  --bg: #141815;
  --card: #1d231f;
  --text: #e7ece7;
  --muted: #98a39a;
  --line: #333c35;
  --primary: #9fc7b0;
  --primary-dark: #c2e0cd;
  --blue: #a9d0b9;
  --amber: #d3b47c;
  --red: #d98b7f;
  --on-primary: #142018;
  --shadow: 0 8px 24px rgba(0, 0, 0, .28);
  --topbar-bg: rgba(20, 24, 21, .94);
  --surface-soft: #222a25;
  --surface-th: #1f2621;
  --btn-primary-bg: #27352d;
  --btn-primary-border: #486353;
  --btn-primary-text: #cfe6d8;
  --btn-primary-hover-bg: #9fc7b0;
  --btn-primary-hover-text: #142018;
  --search-btn-bg: #9fc7b0;
  --search-btn-text: #142018;
  --badge-green-bg: #24352b;
  --badge-green-text: #a9d0b9;
  --badge-amber-bg: #3a3022;
  --badge-amber-text: #d3b47c;
  --badge-red-bg: #3a2623;
  --badge-red-text: #d98b7f;
  --badge-gray-bg: #2a322d;
  --badge-gray-text: #a0aaa2;
  --flash-bg: #202a24;
  --flash-border: #3a4c40;
  --flash-text: #b7cbbd;
  --view-active-bg: #2b3a31;
  --view-active-text: #cfe6d8;
  --cover-bg: #202620;
  --cover-border: #3b453d;
  --cover-frame: rgba(220, 235, 225, .35);
  --cover-line: rgba(220, 235, 225, .14);
  --cover-spine: rgba(200, 225, 210, .22);
  --cover-title: #cfe3d5;
  --cover-kicker: #9fc7b0;
  --cover-footer: #8f9d92;
  --cover-shadow: rgba(0, 0, 0, .35);
}

* { box-sizing: border-box; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

html, body {
  margin: 0;
  padding: 0;
  background-color: var(--bg);
  background-image: var(--paper-noise);
  background-size: 160px 160px;
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
  font-size: 14px;
  overflow-x: hidden;
}

a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }
.main.wide { max-width: 1320px; }
.topbar.wide .topbar-inner { max-width: 1320px; }

.topbar {
  background: var(--topbar-bg);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 20;
}
.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 62px;
  gap: 18px;
  min-width: 0;
}
.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 700;
  color: var(--text);
  font-size: 16px;
}
.brand:hover { text-decoration: none; }
.brand-dot {
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #9b3b35;
  box-shadow: 0 0 0 1px rgba(155, 59, 53, .16);
}
.nav {
  display: flex;
  align-items: center;
  gap: 16px;
  flex: 1;
  min-width: 0;
  overflow-x: auto;
  white-space: nowrap;
  padding: 6px 0 2px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.nav::-webkit-scrollbar { display: none; }
.nav > * { flex: 0 0 auto; }
.nav-link { color: var(--muted); font-size: 14px; white-space: nowrap; line-height: 1.2; }
.nav-link:hover { color: var(--text); text-decoration: none; }
.nav-link.active { color: var(--text); font-weight: 600; }
.notif-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
}
.notif-badge {
  position: absolute;
  top: -4px;
  right: -8px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: #ad6258;
  color: #fff;
  font-size: 10px;
  line-height: 16px;
  text-align: center;
  font-weight: 600;
}
.notif-card {
  width: 100%;
  max-width: 430px;
  padding: 18px;
  text-align: left;
}
.notif-kicker {
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: .08em;
}
.notif-title {
  margin-bottom: 8px;
  color: var(--text);
  font-size: 17px;
  font-weight: 700;
}
.notif-content {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.75;
}
.notif-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 16px;
}
.notif-actions .btn { width: auto; margin: 0; }
.notif-warning .notif-title { color: #8a6428; }
.notif-important .notif-title { color: #8a3a34; }
.notif-success .notif-title { color: var(--primary); }
.notice-list { display: grid; gap: 12px; }
.notice-item {
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card);
}
.notice-row { display: flex; justify-content: space-between; gap: 10px; align-items: center; }
.notice-kind {
  color: var(--primary);
  font-size: 11px;
  letter-spacing: .06em;
}
.notice-item h2 { margin: 6px 0; font-size: 17px; }
.notice-content { white-space: pre-wrap; overflow-wrap: anywhere; color: var(--muted); font-size: 14px; line-height: 1.75; }
.notice-important { border-left: 3px solid #a95f55; }
.notice-warning { border-left: 3px solid #b0894a; }
.notice-success { border-left: 3px solid var(--primary); }
.notice-create { padding: 0; margin-bottom: 14px; }
.notice-create > summary {
  padding: 14px 16px;
  cursor: pointer;
  color: var(--text);
  font-weight: 600;
}
.notice-form { padding: 0 16px 16px; }
.notice-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 10px;
  margin-bottom: 10px;
}
.notice-form label,
.notice-full {
  display: flex;
  flex-direction: column;
  gap: 4px;
  color: var(--muted);
  font-size: 12px;
}
.notice-form input,
.notice-form select,
.notice-form textarea {
  width: 100%;
  padding: 8px 9px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--card);
  color: var(--text);
  font: inherit;
  font-size: 13px;
}
.notice-form textarea { resize: vertical; }
.notice-form .notice-active {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: 6px;
  margin: 0 0 10px;
  padding: 0;
  color: var(--text);
  font-size: 12px;
  white-space: nowrap;
}
.notice-form .notice-active input { width: auto; margin: 0; accent-color: var(--primary); }
.notice-full { margin-bottom: 10px; }
.notice-preview {
  max-width: 420px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ticket-create { padding: 0; margin-bottom: 14px; }
.ticket-create > summary {
  padding: 14px 16px;
  cursor: pointer;
  color: var(--text);
  font-weight: 600;
}
.ticket-form { padding: 0 16px 16px; }
.ticket-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 10px;
  margin-bottom: 10px;
}
.ticket-form label,
.ticket-form-grid label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  color: var(--muted);
  font-size: 12px;
}
.ticket-form input,
.ticket-form select,
.ticket-form textarea,
.ticket-reply textarea {
  width: 100%;
  padding: 8px 9px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--card);
  color: var(--text);
  font: inherit;
  font-size: 13px;
}
.ticket-form textarea,
.ticket-reply textarea { resize: vertical; }
.ticket-list { display: grid; gap: 0; }
.ticket-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 12px;
  padding: 12px 2px;
  border-top: 1px solid var(--line);
  color: var(--text);
}
.ticket-row:hover { text-decoration: none; background: var(--surface-soft); }
.ticket-thread { display: grid; gap: 12px; }
.ticket-message {
  max-width: 82%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-soft);
}
.ticket-message.user { margin-left: auto; background: rgba(47, 93, 70, .07); }
.ticket-message.admin { margin-right: auto; background: var(--card); }
.ticket-message-head { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 5px; font-size: 12px; }
.ticket-message-body { white-space: pre-wrap; overflow-wrap: anywhere; color: var(--text); font-size: 14px; line-height: 1.7; }
.ticket-reply-card { margin-top: 12px; }
.ticket-reply { display: grid; gap: 8px; }
.ticket-reply .btn { justify-self: end; }
.ticket-admin-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.ticket-settings { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 12px 14px; margin-bottom: 12px; }
.ticket-settings .checkline { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.ticket-settings .btn { margin-left: auto; }
.card-generate { scroll-margin-top: 84px; }
.card-generate[open] > summary { border-bottom: 1px solid var(--line); margin-bottom: 12px; }
.ticket-detail-head { align-items: flex-start; flex-wrap: wrap; }
.ticket-head-main { flex: 1 1 260px; min-width: 0; }
.ticket-head-main h1 { overflow-wrap: anywhere; }
.ticket-head-actions { align-items: center; flex: 0 0 auto; }
.ticket-head-actions .btn { white-space: nowrap; }
.ticket-head-actions .badge { flex: 0 0 auto; white-space: nowrap; }
@media (max-width: 640px) {
  .ticket-detail-head { flex-direction: column; align-items: stretch; gap: 10px; }
  .ticket-head-main { flex: 0 1 auto; }
  .ticket-head-main h1 { font-size: 22px; }
  .ticket-head-actions { justify-content: space-between; width: 100%; }
  .ticket-head-actions .badge { align-self: flex-start; }
  .ticket-head-actions .btn { width: auto; }
}
.userbox { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.user-chip {
  background: var(--badge-green-bg);
  color: var(--badge-green-text);
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 12px;
}
.inline { display: inline; }
.linklike {
  border: 0; background: none; color: var(--muted);
  cursor: pointer; padding: 0; font: inherit;
}
.linklike:hover { color: var(--text); }

.main { padding: 30px 20px 60px; }
.footer {
  border-top: 1px solid var(--line);
  color: var(--muted);
  padding: 20px 0 30px;
  font-size: 12px;
}

h1 { font-size: 30px; line-height: 1.25; margin: 0 0 10px; letter-spacing: -.02em; }
h2 { font-size: 18px; margin: 0; }
p { margin: 0 0 10px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--text);
  border-radius: 9px;
  padding: 8px 14px;
  font-size: 13px;
  cursor: pointer;
  text-decoration: none;
  transition: .15s ease;
}
.btn:hover { border-color: var(--btn-primary-border); text-decoration: none; }
.btn.primary { background: var(--btn-primary-bg); border-color: var(--btn-primary-border); color: var(--btn-primary-text); }
.btn.primary:hover { background: var(--btn-primary-hover-bg); border-color: var(--btn-primary-hover-bg); color: var(--btn-primary-hover-text); }
.btn:disabled { opacity: .65; cursor: wait; }
.btn.small { padding: 5px 10px; font-size: 12px; }
.btn.danger { color: #a23d37; border-color: #d8b8b3; background: #fff7f5; }
.btn.danger:hover { color: #fff; background: #a23d37; border-color: #a23d37; }
.btn.wide { width: 100%; }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
}
.grid { display: grid; gap: 14px; }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid.five { grid-template-columns: repeat(5, minmax(0, 1fr)); }
@media (max-width: 1100px) {
  .grid.five { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.grid.plans { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.hero {
  display: grid;
  grid-template-columns: 1.4fr .8fr;
  gap: 28px;
  align-items: center;
  padding: 26px 0 10px;
}
.eyebrow { color: var(--primary); font-weight: 600; font-size: 12px; letter-spacing: .08em; }
.lead { color: var(--muted); font-size: 15px; max-width: 620px; }
.hero-actions { display: flex; gap: 10px; margin: 18px 0 12px; }
.hero-card {
  background: #1f1e1c;
  color: #f0e8da;
  border-radius: 18px;
  padding: 20px;
  box-shadow: var(--shadow);
}
.mini-row {
  display: flex;
  justify-content: space-between;
  padding: 9px 0;
  border-bottom: 1px solid rgba(255,255,255,.12);
  font-size: 13px;
}
.mini-row:last-child { border-bottom: 0; }
.mini-row span { color: #b8aa95; }
.mini-row b { color: #fff; font-weight: 600; }

.section { margin-top: 30px; }
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.muted { color: var(--muted); }
.small { font-size: 12px; }
.k { color: var(--muted); font-size: 12px; }
.v { font-size: 17px; font-weight: 600; margin-top: 2px; }

.plan-name { font-size: 16px; font-weight: 700; }
.plan-price { font-size: 28px; font-weight: 800; margin: 8px 0 4px; letter-spacing: -.03em; }
.plan-price span { font-size: 12px; color: var(--muted); font-weight: 400; }
.plan-list { margin: 10px 0 16px; padding-left: 18px; color: var(--muted); }
.plan-list li { margin: 3px 0; }

.page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}
.page-head > div:first-child { flex: 1 1 auto; min-width: 0; }
.page-head > div:not(:first-child),
.page-head > .btn { flex: 0 0 auto; }
.page-head > div:not(:first-child) {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}
.page-head .btn { white-space: nowrap; }
.page-head > div:not(:first-child),
.page-head > .btn { align-items: center; }
.page-head > div:not(:first-child) .btn,
.page-head > .btn,
.page-head .account-hero-actions .btn,
.page-head .account-hero-actions .btn.small {
  min-height: 32px;
  height: 32px;
  padding: 0 12px;
  font-size: 13px;
  line-height: 1;
}
.page-head .account-hero-actions form,
.page-head > div:not(:first-child) form { display: inline-flex; margin: 0; }
.page-head .account-hero-actions .badge { align-self: center; }
.member-confirm-buttons form { display: inline-flex; margin: 0; }
@media (max-width: 640px) {
  .page-head { flex-wrap: wrap; gap: 10px; }
  .page-head > div:first-child { flex: 1 1 220px; }
  .page-head > div:not(:first-child),
  .page-head > .btn { max-width: 100%; }
}
.page-head h1 { font-size: 26px; margin-bottom: 4px; }
.stat .v { font-size: 24px; }
.linkcard { color: var(--text); }
.linkcard:hover { text-decoration: none; border-color: #c9bca8; }

.member-head { display: grid; grid-template-columns: 1.2fr .8fr; gap: 14px; }
.member-card { background: var(--surface-soft); }
.member-level { font-size: 26px; font-weight: 800; margin: 6px 0; }

/* 用户中心 */
.account-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  padding: 8px 0 18px;
}
.account-eyebrow {
  color: var(--muted);
  font-size: 12px;
  letter-spacing: .18em;
}
.account-hero h1 { margin: 4px 0; }
.account-hero-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.account-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  margin: 14px 0 20px;
}
.account-stat {
  display: block;
  padding: 14px;
  color: var(--text);
  text-decoration: none;
}
.account-stat:hover { border-color: var(--accent); }
.account-stat .k { color: var(--muted); font-size: 12px; }
.account-stat .v { font-size: 28px; line-height: 1.2; font-weight: 800; margin: 2px 0; }
.account-stat.hot { border-color: var(--accent); }

.admin-menu-search { margin: 14px 0 4px; padding: 8px 12px; }
.admin-menu-search input {
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 14px;
  outline: none;
  padding: 6px 2px;
}
.admin-category-tabs { margin: 14px 0 0; }
.member-tabs { margin: 14px 0 16px; }
.admin-category { margin-top: 14px; padding-top: 2px; }
.admin-menu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 10px;
}
.admin-menu-card {
  min-height: 88px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
}
.admin-menu-card .k { font-size: 15px; }
.admin-menu-card .muted { font-size: 12px; line-height: 1.45; }
.jobs-filter { margin: 0 0 14px; max-width: none; gap: 10px; align-items: end; }
.jobs-filter .jobs-filter-actions { margin: 0; align-self: end; }
.filter-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
  align-items: end;
  margin: 0 0 14px;
  max-width: none;
}
.filter-form .form-actions { margin: 0; align-self: end; }
.settings-card { display: grid; gap: 10px; margin-bottom: 14px; }
.settings-card .section-head { margin-bottom: 0; }
.settings-card .btn { justify-self: start; }
@media (max-width: 900px) {
  .jobs-filter { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .jobs-filter { grid-template-columns: 1fr; }
}

.benefits-section {
  margin: 4px 0 18px;
}
.benefit-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 10px;
}
.benefit-card {
  --bot-accent: var(--primary);
  --bot-soft: rgba(47, 93, 70, .08);
  position: relative;
  overflow: hidden;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-top: 2px solid var(--bot-accent);
  border-radius: 12px;
  background: var(--card);
  box-shadow: var(--shadow-sm, 0 2px 8px rgba(0, 0, 0, .03));
}
.benefit-card[data-bot="pdf_bot"] { --bot-accent: #AD6258; --bot-soft: rgba(173, 98, 88, .1); }
.benefit-card[data-bot="ebook_bot"] { --bot-accent: #2f5d46; --bot-soft: rgba(47, 93, 70, .1); }
.benefit-card[data-bot="ancient_bot"] { --bot-accent: #9a6b2f; --bot-soft: rgba(154, 107, 47, .1); }
.benefit-card[data-bot="magazine_bot"] { --bot-accent: #46647a; --bot-soft: rgba(70, 100, 122, .1); }
.benefit-card.expired {
  border-color: rgba(166, 61, 61, .25);
  background: rgba(255, 246, 242, .7);
}
.benefit-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.benefit-identity { display: flex; align-items: center; gap: 9px; min-width: 0; }
.benefit-avatar {
  flex: none;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: var(--bot-soft);
  color: var(--bot-accent);
  font-size: 14px;
  font-weight: 800;
}
.benefit-bot {
  color: var(--text);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.3;
}
.benefit-tier {
  margin-top: 1px;
  color: var(--muted);
  font-size: 11px;
}
.benefit-status {
  flex: none;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--bot-soft);
  color: var(--bot-accent);
  font-size: 10px;
  font-weight: 600;
  white-space: nowrap;
}
.benefit-card.expired .benefit-status {
  background: rgba(166, 61, 61, .1);
  color: #8a2f2f;
}
.benefit-expiry {
  margin-top: 6px;
  color: var(--muted);
  font-size: 11px;
}
.benefit-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin-top: 10px;
  padding-top: 9px;
  border-top: 1px solid var(--line);
}
.benefit-metrics b {
  display: block;
  color: var(--text);
  font-size: 17px;
  line-height: 1.2;
}
.benefit-metrics span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
  white-space: nowrap;
}
.benefit-limits {
  margin-top: 7px;
  padding-top: 7px;
  border-top: 1px dashed var(--line);
  color: var(--muted);
  font-size: 10px;
}
.benefit-empty {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 18px;
  border: 1px dashed var(--line);
  border-radius: 12px;
  color: var(--muted);
  background: rgba(255, 255, 255, .35);
  font-size: 13px;
}
.benefit-empty b { color: var(--text); }
.activate-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.activate-card h2 { margin: 0 0 4px; font-size: 18px; }
.activate-card p { margin: 0; }
.activate-form {
  display: flex;
  gap: 8px;
  flex: 1 1 360px;
  max-width: 520px;
}
.activate-form input {
  flex: 1;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--card);
  color: var(--text);
  font: inherit;
}
.activate-form input:focus { outline: 2px solid #cfe0d5; border-color: var(--primary); }
.account-tabs {
  display: flex;
  gap: 5px;
  margin-top: 6px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-soft);
  overflow-x: auto;
  scrollbar-width: none;
}
.account-tabs::-webkit-scrollbar { display: none; }
.account-tab {
  flex: 1 1 0;
  min-width: 112px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  padding: 9px 8px;
  font: inherit;
  cursor: pointer;
  text-align: center;
  font-size: 13px;
  white-space: nowrap;
}
.account-tab:hover { color: var(--text); }
.account-tab.active {
  background: var(--card);
  color: var(--text);
  font-weight: 700;
  box-shadow: var(--shadow);
}
.member-tabs .account-tab {
  padding: 10px 10px;
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .02em;
}
.member-tabs .account-tab.active {
  color: var(--primary);
  font-weight: 700;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--primary) 24%, transparent), var(--shadow);
}
.account-panel { padding-top: 14px; }
.account-panel[hidden] { display: none; }
.job-list { display: grid; gap: 9px; }
.job-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
}
.job-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.job-card .job-files { margin-top: 8px; }
.account-extra { margin-top: 18px; }
.account-extra summary { cursor: pointer; font-weight: 600; }
.account-extra-body { margin-top: 14px; }
.account-extra h3 { margin: 0 0 8px; font-size: 15px; }
.account-info-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 0;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}
.account-info-row span { color: var(--muted); }
.account-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 12px;
}
.account-meta span {
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--card);
  color: var(--muted);
  font-size: 11px;
}
.account-meta b { color: var(--text); font-weight: 600; }
.account-contact-tip {
  margin-bottom: 12px;
  padding: 10px 13px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--primary);
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--text);
  font-size: 12.5px;
  line-height: 1.65;
}
.account-settings-card {
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card);
}
.account-settings-head { margin-bottom: 4px; }
.account-settings-head h3 { margin: 0; font-size: 15px; }
.account-settings-head p { margin: 4px 0 0; }
.account-settings-section { margin-top: 20px; }
.account-settings-section h3 { margin: 0 0 8px; font-size: 15px; }
.backup-code {
  display: block;
  margin: 10px 0;
  padding: 9px 10px;
  border-radius: 6px;
  background: var(--surface-soft);
  color: var(--text);
  font-size: 11px;
  white-space: normal;
  word-break: break-all;
}
.account-pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 14px;
}
.account-pager .pager { margin: 0; }
#account .account-extra-body { margin-top: 4px; }

.table-wrap {
  overflow-x: auto;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
table { width: 100%; border-collapse: collapse; min-width: 680px; }
th, td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { color: var(--muted); font-size: 12px; font-weight: 600; background: var(--surface-th); }
tr:last-child td { border-bottom: 0; }

.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}
.badge.green { background: var(--badge-green-bg); color: var(--badge-green-text); }
.badge.amber { background: var(--badge-amber-bg); color: var(--badge-amber-text); }
.badge.red { background: var(--badge-red-bg); color: var(--badge-red-text); }
.badge.blue { background: rgba(70, 100, 122, .12); color: #46647a; }
.badge.gray { background: var(--badge-gray-bg); color: var(--badge-gray-text); }

.auth { max-width: 440px; margin: 30px auto; }
.auth-card { padding: 26px; }
.auth-body {
  min-height: 100vh;
  background-color: #f2f0e6;
  background-image:
    linear-gradient(180deg, rgba(248, 245, 234, .45), rgba(235, 238, 227, .20)),
    url("/static/ink-mountains.svg");
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}
.auth-body .topbar {
  background: rgba(248, 246, 238, .70);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}
@media (min-width: 861px) {
  .auth-body::before {
    content: "";
    position: fixed;
    inset: 18px;
    border: 1px solid rgba(72, 91, 76, .22);
    box-shadow: inset 0 0 0 4px rgba(255, 252, 241, .18);
    pointer-events: none;
    z-index: 0;
  }
  .auth-body .topbar,
  .auth-body .main { position: relative; z-index: 1; }
}
.auth-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 420px;
  justify-content: center;
  gap: 64px;
  align-items: center;
  max-width: 1000px;
  min-height: calc(100vh - 80px);
  margin: 0 auto;
  padding: 60px 0;
}
.auth-story {
  position: relative;
  isolation: isolate;
  max-width: 480px;
  min-height: 340px;
  padding: 20px 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.auth-story::before {
  content: "";
  position: absolute;
  left: -70px;
  top: -30px;
  width: 360px;
  height: 360px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(76, 98, 81, .13), rgba(76, 98, 81, .04) 52%, transparent 70%);
  filter: blur(8px);
  z-index: -1;
  pointer-events: none;
}
.auth-story::after {
  content: "山";
  position: absolute;
  right: -34px;
  bottom: -46px;
  z-index: -1;
  color: rgba(58, 78, 63, .045);
  font-family: "Songti SC", "STSong", "SimSun", "Noto Serif SC", Georgia, serif;
  font-size: 250px;
  line-height: 1;
  pointer-events: none;
}
.auth-overline {
  margin-bottom: 18px;
  color: #839185;
  font-family: "Songti SC", "STSong", "SimSun", "Noto Serif SC", Georgia, serif;
  font-size: 11px;
  letter-spacing: .34em;
}
.auth-story h1 {
  margin: 0;
  font-family: "Songti SC", "STSong", "SimSun", "Noto Serif SC", Georgia, serif;
  font-size: clamp(56px, 6.4vw, 84px);
  line-height: 1.04;
  letter-spacing: .06em;
  font-weight: 700;
}
.auth-story p {
  margin: 0;
  color: #67766a;
  font-family: "Songti SC", "STSong", "SimSun", "Noto Serif SC", Georgia, serif;
  font-size: 16px;
  letter-spacing: .18em;
}
.auth-rule {
  width: 64px;
  height: 1px;
  margin: 16px 0 14px;
  background: #9b3b35;
  opacity: .55;
}
.auth-title-row {
  display: flex;
  align-items: center;
  gap: 20px;
}
.auth-title-line {
  width: 3px;
  height: 86px;
  flex: 0 0 auto;
  border-radius: 2px;
  background: #9b3b35;
  opacity: .72;
}
.auth-title-row h1 { margin: 0; }
.auth-card {
  width: 100%;
  min-height: 420px;
  padding: 38px 34px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: rgba(255, 253, 246, .78);
  border: 1px solid rgba(83, 105, 91, .24);
  box-shadow: 0 26px 70px rgba(57, 76, 62, .18);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
}
.auth-card h1 {
  margin: 0 0 4px;
  font-family: "Songti SC", "STSong", "SimSun", "Noto Serif SC", Georgia, serif;
  font-size: 34px;
  letter-spacing: .06em;
}
.auth-card .form input {
  min-height: 46px;
  background: rgba(255, 255, 255, .62);
}
.auth-card .form .btn { min-height: 48px; font-size: 15px; }
.auth-actions { display: grid; gap: 10px; margin-top: 22px; }
.auth-actions .btn { width: 100%; min-height: 48px; font-size: 15px; }

.landing {
  min-height: 58vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 0;
}
.landing-card {
  width: 100%;
  max-width: 380px;
  text-align: center;
  padding: 40px 32px;
}
.landing-mark {
  width: 46px;
  height: 46px;
  margin: 0 auto 14px;
  border-radius: 6px;
  background: var(--primary);
  color: var(--on-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 700;
}
.landing-card h1 { font-size: 24px; margin-bottom: 6px; }
.landing-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 22px;
}
.form { display: grid; gap: 12px; margin-top: 16px; }
.form label { display: grid; gap: 6px; font-size: 13px; color: var(--text); font-weight: 600; }
.form label.checkline { font-weight: 500; }
.form input, .form select, .searchbar input, .inline-form input, .inline-form select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 11px;
  font: inherit;
  font-weight: 400;
  background: var(--card);
  color: var(--text);
}
.form input:focus, .form select:focus { outline: 2px solid #cfe0d5; border-color: var(--primary); }
.form input:disabled { color: var(--muted); background: var(--surface-soft); cursor: not-allowed; }
.form-actions { display: flex; align-items: center; gap: 10px; margin-top: 4px; }

.searchbar { display: flex; gap: 8px; margin-bottom: 14px; max-width: 560px; }
.searchbar input { flex: 1; }
.inline-form { display: flex; gap: 6px; align-items: center; }
.inline-form .days { width: 74px; }

.storage-card { display: grid; gap: 10px; }
.storage-head { display: flex; justify-content: space-between; gap: 10px; }
.storage-card .form.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.storage-card .form-actions { grid-column: 1 / -1; }

.flash {
  background: var(--flash-bg);
  border: 1px solid var(--flash-border);
  color: var(--flash-text);
  border-radius: 10px;
  padding: 10px 14px;
  margin-bottom: 16px;
}
.flash.error { background: var(--badge-red-bg); border-color: var(--badge-red-text); color: var(--badge-red-text); }

.flow { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.flow-step {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 8px 12px;
  font-size: 13px;
  box-shadow: var(--shadow);
}
.arrow { color: var(--muted); }

/* 搜索页 */
.search-page {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  min-width: 0;
}
.search-page > * { min-width: 0; }
.search-form {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 8px;
  width: 100%;
  max-width: 820px;
}
.search-form .search-input { flex: 1 1 auto; min-width: 0; }
.search-form-stack {
  display: grid;
  gap: 8px;
  width: 100%;
  max-width: 100%;
}
.search-form-stack .search-form { max-width: none; }
.bot-choice-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  width: 100%;
  min-height: 26px;
}
.bot-choice-title {
  margin-right: 2px;
  color: var(--muted);
  font-size: 12px;
}
.bot-choice {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--card);
  color: var(--text);
  font-size: 12px;
  cursor: pointer;
}
.bot-choice input { margin: 0; accent-color: var(--primary); }
.bot-choice small { color: var(--muted); font-size: 11px; }
.bot-choice.disabled {
  cursor: not-allowed;
  opacity: .55;
  background: rgba(0, 0, 0, .02);
}
.bot-select-all {
  border: 0;
  background: transparent;
  color: var(--primary);
  font-size: 11px;
  cursor: pointer;
  padding: 3px 4px;
}
.range-actions { margin-left: auto; display: flex; align-items: center; }
.bot-choice-empty {
  padding: 8px 10px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  font-size: 12px;
}
.bot-scope-note {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}
.bot-tabs {
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.bot-tabs::-webkit-scrollbar { display: none; }
.bot-tab {
  flex: 0 0 auto;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--card);
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
  cursor: pointer;
}
.bot-tab span { color: inherit; opacity: .7; }
span.bot-tab { cursor: default; }
.bot-tab.active {
  border-color: var(--primary);
  background: var(--primary);
  color: #fff;
}
.bot-result-group {
  display: grid;
  gap: 10px;
}
.bot-result-group[hidden] { display: none !important; }
.bot-result-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px;
  margin-top: 4px;
}
.bot-result-head h2 {
  margin: 0;
  font-size: 17px;
}
.bot-result-head .muted { display: block; margin-top: 2px; }
.bot-result-error,
.bot-empty {
  padding: 12px;
  border: 1px dashed var(--line);
  border-radius: 10px;
  color: var(--muted);
  font-size: 12px;
}

.search-input {
  position: relative;
  display: flex;
  align-items: center;
  flex: 1;
  min-width: 0;
}
.search-icon {
  position: absolute;
  left: 14px;
  display: inline-flex;
  color: var(--muted);
  pointer-events: none;
}
.search-form .search-input input {
  flex: 1;
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 11px 14px 11px 42px;
  font: inherit;
  background: var(--card);
  box-shadow: var(--shadow);
}
.search-form .search-input input:focus { outline: 2px solid #cfe0d5; border-color: var(--primary); }
.search-form .btn { padding: 0 22px; }
.search-form .btn.primary { background: var(--search-btn-bg); border-color: var(--search-btn-bg); color: var(--search-btn-text); }
.search-form .btn.primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); color: var(--on-primary); }

.search-home-page {
  display: block;
  padding: 34px 0 10px;
}
.search-home-minimal { padding: 54px 0 0; }
.search-home {
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
}
.search-form-lg {
  max-width: 100%;
  margin: 10px auto 0;
  gap: 8px;
}
.search-form-lg .search-input input {
  height: 46px;
  min-height: 46px;
  padding: 0 16px 0 46px;
  font-size: 16px;
  border-radius: 12px;
}
.search-form-lg .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 46px;
  min-height: 46px;
  min-width: 88px;
  padding: 0 22px;
  border-radius: 12px;
  font-size: 14px;
}
.search-legal {
  max-width: 820px;
  margin: 28px auto 0;
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card);
  text-align: left;
}
.search-legal-title {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}
.search-legal p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.7;
}
.search-empty {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 22px 20px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--card);
}
.search-empty-icon {
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 20px;
}
.search-empty-title { font-weight: 700; }
.search-empty p { margin: 3px 0 0; font-size: 12px; }

.search-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.search-meta.compact {
  gap: 8px;
  width: 100%;
  flex-wrap: nowrap;
}
.search-meta.compact .bot-tabs {
  flex: 1 1 auto;
  min-width: 0;
}
.result-count {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}
.quota-note {
  margin-top: -8px;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: .02em;
}
.view-toggle {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: var(--card);
}
.view-toggle a {
  padding: 4px 9px;
  color: var(--muted);
  font-size: 11px;
}
.view-toggle a:hover { text-decoration: none; background: var(--surface-soft); }
.view-toggle a.active { background: var(--view-active-bg); color: var(--view-active-text); font-weight: 600; }

.result-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 20px 18px;
  min-width: 0;
}
.result-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}
.result-title {
  font-weight: 600;
  line-height: 1.45;
  word-break: break-word;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.result-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 12px;
}
.points-badge {
  display: inline-flex;
  align-items: center;
  padding: 1px 6px;
  border: 1px solid rgba(168, 132, 58, .28);
  border-radius: 999px;
  color: #8a6726;
  background: rgba(196, 160, 82, .08);
  font-size: 11px;
  line-height: 1.6;
  white-space: nowrap;
}
.result-action { margin-top: auto; }
.result-action .btn { width: 100%; }

/* 用户获取清单 / 收藏 */
.item-actions { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.item-actions .result-action { margin: 0; width: auto; }
.item-actions .result-action .btn { width: auto; }
.get-btn {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 28px;
  min-width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #5f7869;
  cursor: pointer;
  transition: background .15s ease, color .15s ease, opacity .15s ease;
  -webkit-appearance: none;
  appearance: none;
}
.get-btn:hover { background: rgba(83, 105, 91, .08); color: var(--primary); }
.get-btn:disabled { opacity: 1; cursor: default; }
.get-btn.is-loading { opacity: .5; }
.get-btn .action-icon { width: 18px; height: 18px; stroke-width: 1.7; }
.action-icon {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.favorite-form { margin: 0; width: auto; }
.favorite-btn {
  display: inline-grid;
  place-items: center;
  width: 28px;
  min-width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #9aa69c;
  cursor: pointer;
  transition: color .15s ease, background .15s ease;
  -webkit-appearance: none;
  appearance: none;
}
.favorite-btn .action-icon { width: 18px; height: 18px; }
.favorite-btn:hover { color: #ad6258; background: rgba(173, 98, 88, .08); }
.favorite-btn.is-active { color: #ad6258; background: transparent; }
.favorite-btn.is-active .action-icon { fill: currentColor; stroke: currentColor; }
.favorite-btn.is-loading { opacity: .55; }
.favorite-btn:disabled { opacity: 1; cursor: default; }
.result-meta.meta-line {
  gap: 6px;
  flex-wrap: nowrap;
  width: 100%;
  min-width: 0;
}
.result-meta.meta-line > span:first-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.result-meta.meta-line .points-badge { flex: 0 0 auto; }
.result-meta.meta-line .item-actions {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  flex: 0 0 auto;
  flex-wrap: nowrap;
}
.result-meta.meta-line .get-btn {
  padding: 0;
  min-height: 0;
  width: 28px;
  height: 28px;
}
.result-meta.meta-line .get-btn .action-icon { width: 18px; height: 18px; }
.library-list { display: grid; gap: 8px; }
.library-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
}
.library-item .list-cover { flex: 0 0 44px; width: 44px; height: 56px; }
.library-main { flex: 1; min-width: 0; }
.library-main .result-title { font-size: 14px; }
.download-card .copy-link { margin-top: 8px; }
.job-files { display: flex; flex-direction: column; gap: 4px; }
.job-file { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.job-file .btn { padding: 3px 6px; font-size: 11px; }
.job-download-link { display: inline-flex; align-items: center; gap: 5px; font-weight: 600; }
.download-icon {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.share-expire { color: #8a6a3a; font-size: 11px; white-space: nowrap; }
.job-error {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid rgba(166, 61, 61, .22);
  border-left: 3px solid #a63d3d;
  border-radius: 8px;
  background: rgba(255, 243, 240, .78);
  color: #702d2d;
  font-size: 12px;
  line-height: 1.6;
}
.job-error-title { font-weight: 700; margin-bottom: 2px; }
.job-error-hint { margin-top: 5px; color: var(--muted); font-size: 11px; }
.job-error form { margin-top: 8px; }
.job-upload-warning {
  flex: 1 1 100%;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 10px;
  border: 1px solid rgba(168, 132, 58, .22);
  border-radius: 8px;
  background: rgba(196, 160, 82, .07);
  color: #745a21;
  font-size: 11px;
  line-height: 1.55;
}
.job-upload-warning b { font-size: 12px; }
.job-upload-warning small { color: var(--muted); }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scrollbar-gutter: stable;
}
.toast {
  position: fixed;
  left: 50%;
  top: 50%;
  z-index: 2000;
  width: auto;
  max-width: calc(100vw - 32px);
  padding: 12px 18px;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 10px;
  background: var(--text);
  color: var(--card);
  box-shadow: 0 14px 44px rgba(0, 0, 0, .26);
  font-size: 14px;
  line-height: 1.6;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -50%) scale(.96);
  transition: opacity .16s ease, transform .16s ease;
}
.toast.show { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.toast.error { background: #7d2f2f; color: #fff; }
[hidden] { display: none !important; }
.action-modal {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 3000;
  display: grid;
  place-items: center;
  padding: 20px;
  pointer-events: none;
  background: rgba(248, 246, 238, .06);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
}
.action-modal[hidden] { display: none; }
.action-modal-card {
  position: relative;
  width: auto;
  max-width: 360px;
  padding: 13px 34px 13px 18px;
  pointer-events: auto;
  border: 1px solid rgba(255, 255, 255, .46);
  border-radius: 13px;
  background: rgba(255, 253, 246, .78);
  color: #405046;
  box-shadow: 0 12px 32px rgba(57, 76, 62, .10);
  text-align: center;
  -webkit-backdrop-filter: blur(14px) saturate(1.06);
  backdrop-filter: blur(14px) saturate(1.06);
  animation: feedbackIn .16s ease-out;
}
.action-modal.is-error .action-modal-card {
  border-color: rgba(255, 255, 255, .42);
  background: rgba(255, 250, 241, .82);
  box-shadow: 0 12px 32px rgba(92, 74, 45, .09);
}
.action-modal-close {
  position: absolute;
  top: 6px;
  right: 8px;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border: 0;
  border-radius: 50%;
  padding: 0;
  background: transparent;
  color: #8b978d;
  font: inherit;
  font-size: 17px;
  line-height: 1;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}
.action-modal-close:hover { background: rgba(83, 105, 91, .09); color: #53695b; }
#action-modal-text {
  font-size: 14px;
  line-height: 1.6;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.action-modal.is-error #action-modal-text { color: #6c5a3e; }
.member-confirm-card {
  max-width: 430px;
  padding: 16px 18px;
  text-align: left;
}
.member-confirm-title {
  margin-bottom: 8px;
  font-size: 15px;
  font-weight: 700;
}
#member-confirm-text {
  white-space: pre-wrap;
  color: #53695b;
  font-size: 13px;
  line-height: 1.75;
}
.member-confirm-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}
.member-confirm-copy,
.member-confirm-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.member-confirm-copy .btn { padding: 5px 9px; font-size: 12px; }
.member-confirm-actions .btn { width: auto; margin: 0; }
#card-activate-text {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  color: var(--text);
  font-size: 13px;
  line-height: 1.8;
}
#user-card-text {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  color: var(--text);
  font-size: 13px;
  line-height: 1.8;
}
#user-card-confirm.error-mode .member-confirm-card {
  max-width: 340px;
  padding: 18px 20px;
  text-align: center;
}
#user-card-confirm.error-mode .member-confirm-title {
  text-align: center;
  margin-bottom: 6px;
}
#user-card-confirm.error-mode #user-card-text {
  color: var(--muted);
  text-align: center;
}
#user-card-confirm.error-mode .member-confirm-actions {
  justify-content: center;
}
#user-card-confirm.error-mode .member-confirm-actions > div:first-child {
  display: none;
}
#user-card-confirm.error-mode .member-confirm-buttons {
  width: 100%;
  justify-content: center;
}
#user-card-confirm.error-mode #user-card-ok { display: none !important; }
.member-copy-status {
  min-height: 16px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
}
@keyframes feedbackIn {
  from { opacity: 0; transform: translateY(4px) scale(.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.result-list {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.result-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
}
.result-row:last-child { border-bottom: 0; }
.result-main { flex: 1; min-width: 0; }
.result-row .result-action { flex: 0 0 auto; }
.result-row .result-action .btn { width: auto; min-width: 70px; }

/* 閹兼粎鍌ㄧ紒鎾寸亯閿涙矮鍔熺亸渚€娼伴崡锛勫 */
.book-card {
  background: transparent;
  border: 0;
  padding: 0;
  box-shadow: none;
  gap: 9px;
  transition: transform .18s ease;
}
.book-card:hover { transform: translateY(-4px); }

.book-cover {
  position: relative;
  display: flex;
  aspect-ratio: 2 / 3;
  border-radius: 2px 5px 5px 2px;
  overflow: hidden;
  color: var(--text);
  background-color: var(--cover-bg);
  background-image: var(--paper-noise), var(--ink-wash);
  background-size: 140px 140px, 100% 100%;
  background-repeat: repeat, no-repeat;
  border: 1px solid var(--cover-border);
  box-shadow: 0 8px 18px var(--cover-shadow), inset 0 0 0 1px rgba(255, 255, 255, .35);
}
.book-cover::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 1px;
  background: var(--cover-spine);
  z-index: 2;
}
.book-cover::after {
  content: "";
  position: absolute;
  top: 8px;
  right: 5px;
  bottom: 8px;
  width: 1px;
  background: var(--cover-spine);
  z-index: 2;
}
.book-cover-inner {
  position: relative;
  z-index: 1;
  flex: 1;
  min-width: 0;
  margin: 8px 8px 8px 9px;
  padding: 10px 9px 8px;
  border: 1px solid var(--cover-frame);
  display: flex;
  flex-direction: column;
}
.book-cover-inner::after {
  content: "";
  position: absolute;
  inset: 4px;
  border: 1px solid var(--cover-line);
  pointer-events: none;
}
.book-kicker {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  color: var(--cover-kicker);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.book-size {
  color: var(--cover-footer);
  font-family: "Songti SC", "STSong", "SimSun", "Noto Serif SC", Georgia, serif;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0;
  white-space: nowrap;
}
.book-size-meta {
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
}
.book-cover-title {
  color: var(--cover-title);
  font-family: "Songti SC", "STSong", "SimSun", "Noto Serif SC", Georgia, serif;
  font-size: clamp(18px, 1.7vw, 23px);
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: .12em;
  white-space: nowrap;
  writing-mode: vertical-rl;
  text-orientation: upright;
  max-height: 100%;
  overflow: hidden;
}
.book-cover-title.short-2 { font-size: 30px; }
.book-cover-title.short-3 { font-size: 27px; }
.book-cover-title.short-4 { font-size: 23px; }
.book-cover-body {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 4px 2px 4px 0;
}
.book-cover-body.vertical {
  align-items: flex-end;
  justify-content: center;
}
.book-cover-body.horizontal {
  align-items: flex-start;
  justify-content: center;
}
.book-cover-title.horizontal {
  width: 100%;
  max-height: none;
  writing-mode: horizontal-tb;
  text-orientation: mixed;
  white-space: normal;
  font-size: 14px;
  line-height: 1.5;
  letter-spacing: 0;
  text-align: left;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.book-cover-sub {
  max-width: 100%;
  color: var(--cover-footer);
  font-family: "Songti SC", "STSong", "SimSun", "Noto Serif SC", Georgia, serif;
  font-size: 9px;
  line-height: 1.35;
  letter-spacing: 0;
  text-align: right;
  writing-mode: horizontal-tb;
  text-orientation: mixed;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.book-cover-body.horizontal .book-cover-sub { text-align: left; }
.book-cover-footer {
  margin-top: auto;
  padding-top: 8px;
  border-top: 1px solid var(--cover-line);
  color: var(--cover-footer);
  font-size: 10px;
  letter-spacing: .08em;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}
.book-seal {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  border: 1px solid var(--red);
  border-radius: 2px;
  color: var(--red);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: "Songti SC", "STSong", "SimSun", "Noto Serif SC", Georgia, serif;
  font-size: 9px;
  line-height: 1;
}
.book-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
  flex-wrap: nowrap;
}
.book-info .result-meta.meta-line {
  width: auto;
  flex: 0 1 auto;
  min-width: 0;
  gap: 5px;
  flex-wrap: nowrap;
}
.book-info .result-action { margin-top: 0; }
.book-info .result-action .btn { padding: 7px 8px; }
.book-info .item-actions {
  display: inline-flex;
  align-items: center;
  width: auto;
  gap: 2px;
  margin-left: 0;
}
.book-info .item-actions .result-action { width: auto; }
.book-info .item-actions .favorite-form {
  width: auto;
  display: inline-flex;
  align-items: center;
}
.book-info .item-actions > .favorite-btn { justify-self: auto; }
.book-info .item-actions .btn {
  width: auto;
  padding: 3px 8px;
  font-size: 11px;
  white-space: nowrap;
}
.book-actions {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  width: auto;
  flex: 0 0 auto;
  min-height: 0;
}
.book-actions .item-actions {
  width: auto;
  margin: 0;
  gap: 5px;
  flex-wrap: nowrap;
}
.book-actions .get-btn,
.book-actions .favorite-btn {
  width: 26px;
  min-width: 26px;
  height: 26px;
}
.book-actions .action-icon { width: 17px; height: 17px; }

.list-cover {
  position: relative;
  width: 34px;
  height: 48px;
  flex: 0 0 auto;
  border-radius: 2px 4px 4px 2px;
  color: var(--cover-title);
  background-color: var(--cover-bg);
  background-image: var(--paper-noise), var(--ink-wash);
  background-size: 140px 140px, 100% 100%;
  background-repeat: repeat, no-repeat;
  border: 1px solid var(--cover-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Songti SC", "STSong", "SimSun", "Noto Serif SC", Georgia, serif;
  font-size: 14px;
  font-weight: 700;
  overflow: hidden;
  box-shadow: 0 4px 9px var(--cover-shadow);
}
.list-cover::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 1px;
  background: var(--cover-spine);
}
.list-cover span { position: relative; z-index: 1; }

/* 封面统一纸色 */
.cover-0,
.cover-1,
.cover-2,
.cover-3,
.cover-4,
.cover-5 {
  background-color: var(--cover-bg);
}

.empty { padding: 34px 20px; text-align: center; color: var(--muted); }

.pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
  padding: 8px 0 20px;
}
.page-btn {
  min-width: 34px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--card);
  color: var(--text);
  font-size: 12px;
}
.page-btn:hover { text-decoration: none; border-color: var(--btn-primary-border); }
.page-btn.current { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.page-btn.disabled { color: var(--muted); background: var(--surface-soft); }
.page-gap { color: var(--muted); padding: 0 2px; }
.page-summary { display: none; }
@media (max-width: 640px) {
  .pager {
    flex-wrap: nowrap;
    gap: 8px;
  }
  .pager .page-number { display: none; }
  .pager .page-summary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 52px;
    height: 32px;
    color: var(--muted);
    font-size: 12px;
    white-space: nowrap;
  }
  .pager .page-btn { flex: 0 0 auto; }
}

.download-page { max-width: 820px; }
.download-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.download-card { display: grid; gap: 8px; }

/* 顶栏皮肤选择 */
.theme-picker { display: inline-flex; align-items: center; }
.theme-switcher { display: inline-flex; align-items: center; gap: 6px; }
.theme-switcher select {
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--text);
  border-radius: 7px;
  padding: 5px 8px;
  font-size: 12px;
  cursor: pointer;
}

/* 后台：外观皮肤 */
.theme-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.theme-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 10px;
}
.theme-radio, .theme-enable, .checkline {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
}
.theme-radio input, .theme-enable input, .checkline input { accent-color: var(--primary); }
.checkline input[type="checkbox"] {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  padding: 0;
  box-shadow: none;
}
.access-card { padding: 16px 18px; }
.access-card h3 { margin: 0; }
.access-card .checkline { display: flex; align-items: center; }
.access-card .field-help { display: block; margin-top: 4px; }
.theme-preview {
  position: relative;
  aspect-ratio: 2 / 3;
  max-height: 180px;
  border: 1px solid var(--line);
  border-radius: 3px 6px 6px 3px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 16px var(--cover-shadow);
}
.theme-preview-word {
  font-family: "Songti SC", "STSong", "SimSun", "Noto Serif SC", Georgia, serif;
  font-size: 34px;
  font-weight: 700;
  writing-mode: vertical-rl;
  letter-spacing: .08em;
}
.theme-preview-line {
  position: absolute;
  inset: 10px;
  border: 1px solid currentColor;
  opacity: .35;
}
.theme-preview-seal {
  position: absolute;
  right: 12px;
  bottom: 12px;
  width: 13px;
  height: 13px;
  border-radius: 2px;
}
.theme-name { font-weight: 700; font-size: 15px; }
.appearance-options { margin-top: 16px; display: grid; gap: 8px; max-width: 620px; }

/* 后台：多机器人会员 */
.tier-form {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  align-items: end;
  min-width: 620px;
}
.tier-form label {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 12px;
}
.tier-form input, .tier-form select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 6px 8px;
  background: var(--card);
  color: var(--text);
  font: inherit;
}
.bot-member-card { display: grid; gap: 8px; }
.bot-member-card .tier-form { min-width: 0; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.bot-member-card .form-actions { grid-column: 1 / -1; }
.drag-cell { width: 34px; text-align: center; }
.drag-handle {
  display: inline-block;
  cursor: grab;
  font-size: 20px;
  line-height: 1;
  color: var(--muted);
  user-select: none;
}
.drag-handle:active { cursor: grabbing; }
tr.dragging { opacity: .45; }
.row-actions { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }

.tier-table { min-width: 1040px; font-size: 12px; }
.tier-table th, .tier-table td { padding: 8px 9px; white-space: nowrap; }
.tier-table td:nth-child(2) { min-width: 96px; white-space: normal; }
.tier-actions { display: flex; align-items: center; gap: 4px; }
.tier-actions form { display: inline; }
.add-tier-panel summary { cursor: pointer; font-weight: 600; }
.add-tier-panel[open] summary { margin-bottom: 14px; }
.tier-dialog {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0;
  width: min(640px, calc(100vw - 24px));
  background: var(--card);
  color: var(--text);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .22);
}
.tier-dialog::backdrop { background: rgba(0, 0, 0, .35); }
.tier-dialog form { padding: 20px; }
.tier-dialog h2 { margin-bottom: 12px; }
.batch-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.storage-auth-box {
  margin-top: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface-soft);
}
.auth-code {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: .16em;
  margin: 8px 0;
}
.field-help { color: var(--muted); font-size: 11px; line-height: 1.45; }
.storage-list { display: grid; gap: 12px; }
.storage-provider { padding: 0; overflow: hidden; }
.storage-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 15px 18px;
  cursor: pointer;
  list-style: none;
  background: var(--surface-soft);
}
.storage-summary::-webkit-details-marker { display: none; }
.storage-summary::after {
  content: "⌄";
  font-size: 18px;
  color: var(--muted);
  transition: transform .18s ease;
}
.storage-provider[open] .storage-summary::after { transform: rotate(180deg); }
.storage-summary-main { display: flex; align-items: center; gap: 12px; min-width: 0; }
.storage-index {
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--card);
  border: 1px solid var(--line);
  font-size: 12px;
  color: var(--muted);
}
.storage-name { font-weight: 700; font-size: 15px; }
.storage-desc { color: var(--muted); font-size: 12px; margin-top: 2px; }
.storage-summary-side { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.storage-body { padding: 16px 18px 18px; }
.storage-meta { color: var(--muted); font-size: 11px; margin-bottom: 12px; }
.storage-group {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.storage-group:first-of-type { margin-top: 0; padding-top: 0; border-top: 0; }
.storage-group-head { margin-bottom: 8px; }
.storage-group-title { font-weight: 700; font-size: 13px; }
.storage-group-desc { color: var(--muted); font-size: 11px; line-height: 1.5; margin-top: 2px; }
.member-admin-table { min-width: 980px; font-size: 13px; }
.member-admin-table th, .member-admin-table td { padding: 9px 10px; vertical-align: middle; }
.member-admin-table select,
.member-admin-table input[type="date"],
.member-admin-table input[type="number"] {
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--card);
  color: var(--text);
  padding: 6px 8px;
  font: inherit;
}
.member-admin-table .member-num { width: 78px; }
.comp-filters {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  padding: 14px;
  margin-bottom: 12px;
  align-items: end;
}
.comp-filters label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
}
.comp-filters input,
.comp-filters select {
  min-width: 0;
  width: 100%;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card);
  color: var(--text);
  font: inherit;
  font-size: 13px;
}
.comp-points { display: grid !important; grid-template-columns: 72px 1fr; gap: 5px; }
.comp-points select { grid-column: 1; }
.comp-date-pair,
.comp-days-pair {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 6px;
}
.comp-date-pair span,
.comp-days-pair span { color: var(--muted); font-size: 12px; }
@media (max-width: 1100px) {
  .comp-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 650px) {
  .comp-filters { grid-template-columns: minmax(0, 1fr); }
}
.comp-points input { grid-column: 2; }
.comp-filter-actions { display: flex; gap: 8px; align-items: end; }
.comp-filter-actions .btn { white-space: nowrap; }
.comp-bulk-card { padding: 12px 14px; margin-bottom: 12px; }
.comp-bulk-card .bulk-bar { align-items: end; }
.comp-bulk-card .bulk-bar > label {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  color: var(--muted);
  font-size: 12px;
}
.comp-bulk-card .bulk-bar > label.checkline { flex-direction: row; align-items: center; }
.comp-bulk-card .comp-reason { flex: 1 1 220px; }
.comp-bulk-card .comp-reason input { width: 100%; }
.comp-bulk-card input[type="number"],
.comp-bulk-card input[type="text"] {
  padding: 7px 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--card);
  color: var(--text);
  font: inherit;
  font-size: 12px;
}
.comp-table { width: 100%; min-width: 760px; }
.comp-table th, .comp-table td { padding: 9px 10px; vertical-align: middle; }
.comp-table th { white-space: nowrap; }
.comp-table input[type="checkbox"] { accent-color: var(--primary); }
.copy-card { margin-left: 4px; vertical-align: middle; }
.number-stepper {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  vertical-align: middle;
}
.number-stepper input.member-num {
  width: 44px;
  min-width: 0;
  padding: 6px 2px;
  text-align: center;
  -webkit-appearance: none;
  appearance: textfield;
  -moz-appearance: textfield;
}
.number-stepper input::-webkit-outer-spin-button,
.number-stepper input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.member-step {
  display: grid;
  place-items: center;
  width: 26px;
  height: 32px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--card);
  color: var(--text);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}
.member-step:hover { background: var(--surface-soft); }
.member-admin-table .member-actions { white-space: nowrap; }
.member-admin-table .member-actions .btn { margin-right: 4px; }
.bulk-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.bulk-bar label { display: flex; align-items: center; gap: 6px; font-size: 13px; }
.bulk-bar .muted { margin-right: auto; }
code {
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 1px 5px;
  font-size: 12px;
}

@media (max-width: 860px) {
  .theme-grid { grid-template-columns: 1fr; }
  .tier-form, .bot-member-card .tier-form { grid-template-columns: 1fr; min-width: 0; }
}

@media (max-width: 860px) {
  .hero, .grid.two, .grid.three, .grid.four, .grid.five, .grid.plans, .member-head {
    grid-template-columns: 1fr;
  }
  .auth-shell {
    grid-template-columns: 1fr;
    gap: 22px;
    max-width: 440px;
    min-height: auto;
    padding: 28px 0 20px;
  }
  .auth-story {
    max-width: none;
    min-height: 0;
    text-align: center;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
  }
  .auth-story p { font-size: 13px; }
  .auth-story::after { display: none; }
  .auth-overline { margin-bottom: 11px; font-size: 10px; letter-spacing: .28em; }
  .auth-title-row { justify-content: center; }
  .auth-title-line { display: none; }
  .auth-title-row h1 { margin: 0; }
  .auth-rule { margin: 12px auto 10px; width: 46px; }
  .auth-story h1 { font-size: 34px; }
  .auth-card { min-height: 0; }

  /* 手机顶栏：第一行品牌 + 主题/用户，第二行导航横向滚动 */
  .topbar-inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "brand user"
      "nav nav";
    gap: 6px 12px;
    height: auto;
    padding: 9px 0 7px;
  }
  .brand { grid-area: brand; min-width: 0; justify-self: start; }
  .userbox {
    grid-area: user;
    justify-self: end;
    min-width: 0;
    gap: 6px;
  }
  .user-chip {
    max-width: 88px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .theme-switcher select { max-width: 104px; }
  .nav {
    grid-area: nav;
    width: 100%;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 14px;
    overflow-x: auto;
    white-space: nowrap;
    padding: 6px 0 2px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .nav::-webkit-scrollbar { display: none; }
  .nav-link, .nav .btn, .nav .inline { flex: 0 0 auto; }
  .nav-link { font-size: 13px; }
  h1 { font-size: 25px; }
}

@media (max-width: 640px) {
  body { overflow-x: hidden; }
  .topbar .wrap { padding-left: 14px; padding-right: 14px; }
  .brand { font-size: 15px; }
  .brand-dot { width: 6px; height: 6px; }
  .theme-switcher select { max-width: 92px; padding: 4px 6px; font-size: 11px; }
  .user-chip { max-width: 70px; font-size: 11px; }
  .auth-shell { padding: 20px 0 12px; gap: 18px; }
  .auth-story h1 { font-size: 38px; }
  .auth-card h1 { font-size: 30px; }
  .auth-card { padding: 20px; }
}

@media (max-width: 640px) {
  .search-form { flex-wrap: wrap; }
  .search-form .search-input { flex: 1 1 auto; min-width: 0; }
  .search-form .search-input input { flex: 1 1 auto; font-size: 16px; }
  .search-form .btn { width: auto; flex: 0 0 auto; padding: 0 16px; }
  .activate-form input { font-size: 16px; }
  .search-form, .search-form-lg, .search-home, .search-home-page { max-width: 100%; min-width: 0; }
  .search-home-page { padding: 14px 0 4px; }
  .search-home-minimal { padding: 20px 0 0; }
  .search-form-lg { margin-top: 10px; }
  .search-form-lg .search-input input { height: 42px; min-height: 42px; font-size: 16px; padding: 0 12px 0 38px; }
  .search-form-lg .btn { height: 42px; min-height: 42px; min-width: 76px; font-size: 14px; padding: 0 14px; }
  .search-legal { margin-top: 16px; padding: 12px 14px; }
  .search-meta { flex-direction: column; align-items: flex-start; }
  .search-meta.compact { flex-direction: row; align-items: center; gap: 8px; }

  /* 手机列表：封面在左，书名/大小在右，获取按钮在最右 */
  .result-row {
    align-items: center;
    flex-wrap: nowrap;
    gap: 12px;
    padding: 10px 12px;
  }
  .list-cover {
    width: 46px;
    height: 66px;
    font-size: 16px;
  }
  .result-main { flex: 1 1 auto; min-width: 0; }
  .result-title { -webkit-line-clamp: 3; }
  .result-meta { font-size: 11px; gap: 5px; }
  .result-row .result-action {
    width: auto;
    flex: 0 0 auto;
    align-self: center;
  }
  .result-row .result-action .btn {
    width: auto;
    min-width: 64px;
    padding: 7px 8px;
  }

  .book-info .item-actions {
    display: inline-flex;
    width: auto;
    gap: 2px;
    margin-left: 0;
  }
  .book-info .item-actions .result-action,
  .book-info .item-actions .btn {
    width: auto;
    padding: 3px 8px;
    font-size: 11px;
    white-space: nowrap;
  }
  .result-row .item-actions {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: auto;
    gap: 4px;
  }
  .result-row .item-actions .btn { min-width: 56px; padding: 6px 7px; }
  .library-item { flex-wrap: wrap; align-items: flex-start; }
  .library-main { flex: 1 1 calc(100% - 60px); }
  .library-item .item-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
    gap: 6px;
  }
  .library-item .item-actions .btn { width: 100%; }

  .account-hero {
    flex-direction: row;
    align-items: flex-end;
    gap: 10px;
  }
  .account-hero > div:first-child { flex: 1 1 auto; min-width: 0; }
  .account-hero > .account-hero-actions {
    display: flex;
    flex: 0 0 auto;
    flex-wrap: nowrap;
    gap: 6px;
  }
  .account-hero > .account-hero-actions .btn {
    width: auto;
    padding: 7px 10px;
    font-size: 12px;
    text-align: center;
    white-space: nowrap;
  }
  .account-stats { grid-template-columns: 1fr 1fr; }
  .account-stat .v { font-size: 24px; }
  .benefit-grid { grid-template-columns: 1fr; }
  .benefit-card { padding: 14px; }
  .benefit-metrics b { font-size: 18px; }
  .benefit-metrics span { white-space: normal; }
  .activate-card { align-items: stretch; }
  .activate-form { flex-direction: column; max-width: none; }
  .activate-form .btn { width: 100%; }
  .account-tab { font-size: 12px; padding: 8px 4px; }
  .account-settings-card { padding: 14px; }
  .job-card-head { gap: 8px; }
  .job-card { padding: 11px 12px; }
  .storage-summary { align-items: flex-start; flex-wrap: wrap; padding: 13px 14px; }
  .storage-summary-main { gap: 9px; }
  .storage-summary-side { margin-left: 39px; }
  .storage-body { padding: 14px; }
}

@media (max-width: 520px) {
  .theme-switcher { display: none; }
  .userbox { gap: 4px; }
}

@media (max-width: 900px) {
  .result-meta.meta-line { flex-wrap: wrap; }
  .result-meta.meta-line .item-actions {
    width: 100%;
    justify-content: center;
  }
}
@media (max-width: 640px) {
  .ticket-row { grid-template-columns: 1fr; gap: 6px; }
  .ticket-message { max-width: 100%; }
  .ticket-settings .btn { margin-left: 0; }
  .ticket-form, .ticket-form-grid { grid-template-columns: 1fr; }
}

/* 使用条款 */
.terms-page { max-width: 920px; margin: 0 auto; }
.terms-doc { padding: 26px 30px; line-height: 1.9; }
.terms-doc h2 { margin: 24px 0 8px; font-size: 17px; }
.terms-doc h2:first-child { margin-top: 0; }
.terms-doc p { margin: 0 0 12px; line-height: 1.9; color: var(--text); }
.terms-accept { margin-top: 16px; padding: 18px 20px; display: grid; gap: 12px; }
.terms-accept-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.terms-accept-head h2 { margin-bottom: 3px; }
.terms-check { display: flex; align-items: flex-start; gap: 8px; line-height: 1.7; color: var(--text); }
.terms-check input { margin-top: 4px; flex: 0 0 auto; }
.terms-accept .form-actions { margin-top: 0; }
.terms-admin-form { margin-top: 14px; }
.terms-admin-form textarea { min-height: 420px; font-family: "Songti SC", "STSong", "SimSun", Georgia, serif; line-height: 1.7; }
.terms-admin-options { display: flex; gap: 18px; flex-wrap: wrap; align-items: center; padding: 4px 0; }
.terms-admin-preview { margin-top: 14px; }
.terms-admin-preview > summary { cursor: pointer; padding: 14px 18px; font-weight: 600; }
.terms-admin-preview .terms-doc { border-top: 1px solid var(--line); }

/* 账号安全 */
.security-page { max-width: 720px; margin: 8vh auto 0; }
.security-card { padding: 28px; text-align: center; }
.security-card h1 { margin: 14px 0 8px; }
.security-card p { line-height: 1.8; }
.security-actions { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin: 20px 0 12px; }
.security-toggle-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 18px; }
.security-settings { margin-bottom: 14px; }
.temp-login-card { text-align: left; }
.temp-cred { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px dashed var(--line); font-size: 16px; }
.temp-cred b { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }
.temp-instructions { white-space: pre-wrap; word-break: break-word; line-height: 1.8; font-family: inherit; margin: 0; }
.user-actions { min-width: 190px; }
.user-actions .btn { margin: 2px 2px 2px 0; }
.impersonation-bar { position: sticky; top: 0; z-index: 50; display: flex; align-items: center; justify-content: center; gap: 12px; padding: 8px 14px; background: #8a4b18; color: #fff; font-size: 13px; }
.impersonation-bar form { margin: 0; }
.impersonation-bar .btn { background: rgba(255,255,255,.92); color: #5b3512; border-color: transparent; }
@media (max-width: 640px) { .impersonation-bar { flex-wrap: wrap; text-align: center; } }
@media (max-width: 640px) {
  .security-toggle-grid { grid-template-columns: 1fr; }
  .security-page { margin-top: 20px; }
  .security-card { padding: 20px 16px; }
}
@media (max-width: 640px) {
  .terms-doc { padding: 18px 16px; }
  .terms-doc h2 { font-size: 16px; }
  .terms-accept { padding: 14px; }
  .terms-accept .form-actions { display: grid; grid-template-columns: 1fr; }
  .terms-accept .form-actions .btn { width: 100%; }
}
