:root {
  --bg: #f4f6f2;
  --surface: #fff;
  --surface-soft: #f0f3ee;
  --surface-dim: #e9ece6;
  --ink: #16211c;
  --muted: #667069;
  --line: #e1e6df;
  --line-dark: #bdc7bd;
  --accent: #df603d;
  --accent-hover: #c94e2c;
  --accent-soft: #fae9e1;
  /* 主按钮单独给一组颜色：白字在 #df603d 上只有 3.57:1，压深到 4.9:1 才够 AA */
  --btn-accent: #c4462a;
  --btn-accent-hover: #ad3b22;
  --btn-accent-ink: #fff;
  --green: #287b5a;
  --danger: #b83c32;
  --radius: 10px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(22, 33, 28, .04), 0 10px 30px rgba(22, 33, 28, .05);
  --sk: linear-gradient(90deg, #ecefe9 25%, #f6f8f4 37%, #ecefe9 63%);
  color-scheme: light;
}

[data-theme="dark"] {
  --bg: #14181b;
  --surface: #1c2226;
  --surface-soft: #232b30;
  --surface-dim: #2a333a;
  --ink: #e7ede8;
  --muted: #94a29a;
  --line: #2b3439;
  --line-dark: #3a464c;
  --accent: #ef7350;
  --accent-hover: #ff8a68;
  --accent-soft: #3a2620;
  /* 深色底下用亮橙，字色改深墨才够 AA */
  --btn-accent: #ef7350;
  --btn-accent-hover: #ff8a68;
  --btn-accent-ink: #14181b;
  --green: #4fbf90;
  --danger: #ef6b60;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 12px 30px rgba(0, 0, 0, .26);
  --sk: linear-gradient(90deg, #2a343a 25%, #38444b 37%, #2a343a 63%);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scrollbar-gutter: stable; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.7 "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  -webkit-font-smoothing: antialiased;
  transition: background .2s ease, color .2s ease;
}
body.modal-open { overflow: hidden; }
button, input { font: inherit; }
a { color: inherit; text-decoration: none; }
button, a, input { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
[hidden] { display: none !important; }
svg { display: block; }

/* ---------- 加载反馈 ---------- */

.progress {
  position: fixed;
  inset: 0 0 auto;
  height: 2px;
  z-index: 60;
  overflow: hidden;
  opacity: 0;
  transition: opacity .18s ease;
  pointer-events: none;
}
.progress::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 40%;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  animation: progress-slide 1.1s ease-in-out infinite;
}
.progress.on { opacity: 1; }
@keyframes progress-slide {
  from { transform: translateX(-100%); }
  to { transform: translateX(350%); }
}

.boot {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  background: var(--bg);
  transition: opacity .28s ease;
}
.boot.hide { opacity: 0; pointer-events: none; }
.boot-spinner {
  width: 30px;
  height: 30px;
  border: 3px solid var(--line-dark);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
.boot-text { margin: 0; color: var(--muted); font-size: 13px; letter-spacing: 1px; }
.noscript-note { margin: 0; padding: 12px 20px; background: var(--accent-soft); color: var(--danger); text-align: center; }
@keyframes spin { to { transform: rotate(360deg); } }

.spinner {
  width: 13px;
  height: 13px;
  flex: 0 0 auto;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  opacity: .8;
  animation: spin .7s linear infinite;
}

.btn.is-loading { cursor: progress; }
.btn.is-loading .btn-label { opacity: .78; }
.btn .spinner { display: none; margin-right: 7px; }
.btn.is-loading .spinner { display: block; }
.btn.is-loading:hover { transform: none; }

/* 目录读取中的占位行 */
.sk-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}
.sk-row:last-child { border-bottom: 0; }
.sk {
  height: 10px;
  border-radius: 999px;
  background: var(--sk);
  background-size: 400% 100%;
  animation: shimmer 1.3s ease-in-out infinite;
}
.sk.icon { width: 28px; height: 28px; border-radius: 8px; animation-delay: .05s; }
.sk.name { flex: 1; max-width: 46%; }
.sk.size { width: 62px; margin-left: auto; animation-delay: .1s; }
@keyframes shimmer {
  from { background-position: 100% 50%; }
  to { background-position: 0 50%; }
}

/* ---------- 布局 ---------- */

.banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 9px 20px;
  background: var(--green);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.55;
  text-align: center;
}
.banner-tag {
  flex: 0 0 auto;
  padding: 1px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .22);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .5px;
  line-height: 1.7;
}
[data-theme="dark"] .banner { color: #0d1c16; }
[data-theme="dark"] .banner-tag { background: rgba(13, 28, 22, .16); }

.topbar {
  width: min(880px, calc(100% - 40px));
  margin: 0 auto;
  height: 76px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--line-dark);
}
.brand { display: flex; align-items: center; gap: 10px; font-size: 21px; font-weight: 800; letter-spacing: 2px; }
.logo { width: 28px; height: 28px; fill: none; stroke: var(--ink); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.nav { display: flex; gap: 24px; margin-left: auto; }
.nav a { font-size: 13px; color: var(--muted); }
#quotaBtn { margin-left: auto; }
.theme-btn { margin-left: 0; }
#quotaBtn:not([hidden]) + .theme-btn { margin-left: 8px; }
#quotaBtn[hidden] + .theme-btn { margin-left: auto; }
.theme-btn svg { width: 16px; height: 16px; fill: none; stroke: var(--muted); stroke-width: 1.7; stroke-linecap: round; }

main { width: min(880px, calc(100% - 40px)); margin: 0 auto; padding-bottom: 90px; }
.title { margin: 52px 0 30px; font-size: clamp(30px, 6vw, 42px); font-weight: 700; letter-spacing: -.6px; line-height: 1.2; }

.picker { display: block; }
.row { display: flex; gap: 10px; min-width: 0; }
.row input {
  flex: 1;
  min-width: 0;
  height: 48px;
  padding: 0 14px;
  border: 1px solid var(--line-dark);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  font-size: 14px;
  transition: border-color .16s, box-shadow .16s;
}
.row input::placeholder { color: var(--muted); }
.row input:focus { outline: 0; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
#pwd { flex: 0 1 130px; }

.btn {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 20px;
  border: 1px solid var(--line-dark);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  transition: background .16s, border-color .16s, transform .16s, opacity .16s;
}
.btn:hover:not(:disabled) { transform: translateY(-1px); background: var(--surface-soft); }
.btn:active:not(:disabled) { transform: none; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn.primary { background: var(--btn-accent); border-color: transparent; color: var(--btn-accent-ink); }
.btn.primary:hover:not(:disabled) { background: var(--btn-accent-hover); }
.btn.ghost { min-height: 36px; padding: 0 14px; font-size: 12px; }

.hint { min-height: 0; margin: 10px 0 0; color: var(--muted); font-size: 12px; }
.hint:not(:empty) { min-height: 18px; }
.hint.error { color: var(--danger); }
.hint.ok { color: var(--green); }

/* ---------- 目录 ---------- */

.files { margin-top: 24px; }
.files-bar { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; min-height: 34px; }
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 2px; min-width: 0; font-size: 12px; }
.crumb {
  max-width: 190px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 4px 6px;
  border: 0;
  border-radius: var(--radius-sm);
  background: none;
  color: var(--muted);
  cursor: pointer;
  font-size: 12px;
}
.crumb:hover { background: var(--surface-soft); color: var(--ink); }
.crumb[aria-current="page"] { color: var(--ink); font-weight: 600; cursor: default; }
.crumb[aria-current="page"]:hover { background: none; }
.crumb-sep { color: var(--line-dark); user-select: none; }
.files-tools { display: flex; align-items: center; gap: 8px; margin-left: auto; flex: 0 0 auto; }
.files-count { color: var(--muted); font-size: 12px; white-space: nowrap; }
.icon-btn {
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  cursor: pointer;
  transition: background .16s, border-color .16s;
}
.icon-btn:hover { background: var(--surface-soft); }
.icon-btn:disabled { opacity: .5; cursor: progress; }
.icon-btn svg { width: 15px; height: 15px; fill: none; stroke: var(--muted); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.icon-btn.is-spinning svg { animation: spin 1s linear infinite; }

.entries {
  list-style: none;
  margin: 0;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: opacity .18s ease;
}
.entries:empty { display: none; }
.entries:focus { outline: 0; }
.entries.is-stale { opacity: .38; pointer-events: none; }
.entries li.entry {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
  transition: background .14s ease;
}
.entries li.entry:last-child { border-bottom: 0; }
.entries li.entry:hover { background: var(--surface-soft); }
.entries li.dir { cursor: pointer; }
.entries li.dir:focus-visible { outline-offset: -3px; }

.entry-icon {
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: var(--radius-sm);
  background: var(--surface-soft);
  color: var(--muted);
}
.entry-icon svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
li.dir .entry-icon { background: var(--accent-soft); color: var(--accent-hover); }
.entry-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); font-size: 13.5px; }
.entry-size { flex: 0 0 auto; min-width: 76px; text-align: right; color: var(--muted); font: 11px/1 Consolas, monospace; }
.entry-chevron { flex: 0 0 auto; display: grid; place-items: center; color: var(--line-dark); }
.entry-chevron svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.entry-action {
  flex: 0 0 auto;
  min-height: 30px;
  padding: 0 12px;
  border: 1px solid var(--line-dark);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--accent-hover);
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  transition: background .16s, border-color .16s, opacity .16s;
}
.entry-action:hover:not(:disabled) { border-color: var(--accent); background: var(--accent-soft); }
.entry-action:disabled { opacity: .55; cursor: progress; }
.entry-action.is-loading { display: inline-flex; align-items: center; gap: 6px; }
.entry-action .spinner { display: none; }
.entry-action.is-loading .spinner { display: block; }
.entry-action.is-loading .btn-label { opacity: .78; }

.entry-select {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  margin-left: -6px;
  cursor: pointer;
}
.entry-select input, .select-all input {
  width: 17px;
  height: 17px;
  margin: 0;
  accent-color: var(--accent);
  cursor: pointer;
}
.batch-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--muted);
  font-size: 12px;
}
.batch-bar .btn { min-height: 36px; margin-left: auto; }
.select-all { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.result-card { width: min(600px, 100%); }
.result-summary { margin: -4px 0 12px; color: var(--muted); font-size: 12px; }
.link-results { list-style: none; max-height: min(440px, 55vh); margin: 0; padding: 0; overflow-y: auto; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.link-result { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.link-result:last-child { border-bottom: 0; }
.link-result-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.link-result-error { max-width: 48%; color: var(--danger); font-size: 12px; text-align: right; overflow-wrap: anywhere; }
.result-actions { display: flex; gap: 10px; margin-top: 16px; }
.result-actions .btn { flex: 1; }

.files-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 40px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  text-align: center;
}
.files-state svg { width: 26px; height: 26px; fill: none; stroke: var(--muted); opacity: .55; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.files-state p { margin: 0; font-size: 13px; color: var(--muted); }
.files-state .btn { margin-top: 8px; min-height: 36px; padding: 0 16px; font-size: 12px; }
.files-state.error p { color: var(--danger); }

/* ---------- 弹窗 ---------- */

.modal {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(11, 17, 14, .42);
  animation: fade-in .16s ease;
}
.modal-under { pointer-events: none; }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
.modal-card {
  width: min(420px, 100%);
  max-height: calc(100vh - 40px);
  max-height: calc(100dvh - 40px);
  overflow-y: auto;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: 0 20px 60px rgba(11, 17, 14, .28);
  animation: card-in .18s ease;
}
@keyframes card-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.modal-card:focus { outline: none; }
.modal-head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.modal-head h2 { margin: 0; font-size: 17px; letter-spacing: -.2px; }
.modal-head .icon-btn { margin-left: auto; }
.unlock-lead {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: -4px 0 16px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}
.unlock-lead svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  stroke: var(--accent);
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.unlock-lead strong {
  color: var(--accent);
  font-weight: 700;
}
.modal-card input {
  width: 100%;
  height: 46px;
  margin-bottom: 12px;
  padding: 0 13px;
  border: 1px solid var(--line-dark);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink);
  font-size: 14px;
}
.modal-card input:focus { outline: 0; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
#password { font: 18px Consolas, monospace; text-align: center; }
#password:not(:placeholder-shown) { letter-spacing: 6px; }
.modal-card input::placeholder { color: var(--muted); }
.block-btn { width: 100%; }
.modal-actions { display: flex; gap: 10px; margin-top: 4px; }
.modal-actions .btn { flex: 1; }
.field-label { display: block; margin: 0 0 6px; color: var(--muted); font-size: 12px; }
.file-name { margin: 0 0 16px; font-size: 13px; word-break: break-all; }
/* 下载弹窗：复制链接是主操作；发送到下载器次之；浏览器直下沉到底部小字 */
#linkModal #linkCopy,
#linkModal #linkSend { width: 100%; }
#linkModal #linkSend { margin-top: 10px; }
.quiet-link {
  display: block;
  margin-top: 14px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
  text-align: center;
  text-decoration: none;
}
.quiet-link:hover { color: var(--ink); text-decoration: underline; }
.quiet-link:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

/* 首次打开的使用流程。层级高于开屏遮罩，避免被挡住 */
#guideModal { z-index: 80; }
.guide-card { width: min(460px, 100%); }
.guide-lead { margin: -4px 0 16px; color: var(--muted); font-size: 13px; }
.guide-steps {
  margin: 0 0 14px;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.guide-steps li { display: flex; gap: 12px; align-items: flex-start; }
.guide-num {
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  margin-top: 1px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-hover);
  font-size: 12px;
  font-weight: 700;
  line-height: 24px;
  text-align: center;
}
.guide-steps strong { display: block; font-size: 14px; line-height: 1.5; }
.guide-steps p { margin: 2px 0 0; color: var(--muted); font-size: 13px; line-height: 1.65; }
.guide-note { margin: 0 0 16px; color: var(--muted); font-size: 12px; line-height: 1.6; }

/* 首次解析前的用户协议确认 */
.consent-lead { margin: 0 0 10px; color: var(--muted); font-size: 13px; line-height: 1.7; }
.consent-points { margin: 0 0 12px; padding-left: 18px; color: var(--muted); font-size: 13px; line-height: 1.7; }
.consent-points li { margin: 3px 0; }
.consent-links { margin: 0 0 14px; color: var(--muted); font-size: 12px; line-height: 1.7; }
.consent-links a { color: var(--accent-hover); }
.consent-check {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 16px;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.6;
  cursor: pointer;
}
.consent-check input {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  margin: 2px 0 0;
  padding: 0;
  accent-color: var(--accent);
}
.consent-check input:focus { outline: 0; box-shadow: 0 0 0 3px var(--accent-soft); }

.captcha-slot { display: flex; justify-content: center; }
.captcha-slot:not(:empty) { margin-bottom: 12px; }

/* 领取密码：PC 二维码 / 手机口令 */
.claim {
  display: grid;
  justify-items: center;
  gap: 10px;
  margin-bottom: 18px;
  padding: 18px 14px;
  border: 1px dashed var(--line-dark);
  border-radius: var(--radius);
  background: var(--surface-soft);
}
.claim-qr {
  width: 180px;
  height: 180px;
  padding: 8px;
  border-radius: 6px;
  background: #fff;
}
.claim-tip { margin: 0; font-size: 13px; font-weight: 700; text-align: center; }
.claim-note {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
  text-align: center;
  word-break: break-all;
}
.kouling {
  width: 100%;
  margin: 0;
  padding: 12px;
  border: 1px solid var(--line-dark);
  border-radius: var(--radius-sm);
  background: var(--surface);
  font: 14px/1.5 Consolas, monospace;
  letter-spacing: .5px;
  text-align: center;
  word-break: break-all;
  cursor: pointer;
  -webkit-user-select: all;
  user-select: all;
}
.kouling:empty { display: none; }
.link-btn {
  padding: 0;
  border: 0;
  background: none;
  color: var(--accent-hover);
  font-size: 12px;
  text-decoration: underline;
  cursor: pointer;
}

.quota-rows { display: grid; gap: 10px; }
.quota-rows > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px;
  border-radius: var(--radius-sm);
  background: var(--surface-soft);
  font-size: 13px;
}
.quota-rows strong { font: 14px Consolas, monospace; }

.seg { display: flex; gap: 8px; margin-bottom: 18px; }
.seg-btn {
  flex: 1;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--muted);
  cursor: pointer;
  font-size: 12px;
}
.seg-btn.active { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-hover); font-weight: 600; }

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translate(-50%, 10px);
  max-width: min(500px, calc(100% - 32px));
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  background: var(--ink);
  color: var(--bg);
  font-size: 12px;
  opacity: 0;
  transition: .2s;
  z-index: 40;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.error { background: var(--danger); color: #fff; }

/* ---------- 看板 ---------- */

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; margin-top: 20px; }
.card h2 { margin: 0 0 18px; font-size: 19px; }
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.quota-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px; background: var(--surface-soft); border-radius: var(--radius-sm); font-size: 13px; }
.quota-label { color: var(--muted); }
.muted { color: var(--muted); font-size: 12px; }
.muted.error { color: var(--danger); }
#pubShare a { color: var(--accent-hover); text-decoration: underline; overflow-wrap: anywhere; }
.mono { font-family: Consolas, monospace; }
.table { width: 100%; border-collapse: collapse; margin-top: 16px; font-size: 12px; }
.table th, .table td { text-align: left; padding: 10px; border-bottom: 1px solid var(--line); }
.table th { color: var(--muted); font-weight: 500; }
.table td.bad { color: var(--danger); }
.footer { width: min(880px, calc(100% - 40px)); margin: 0 auto; padding: 22px 0 34px; border-top: 1px solid var(--line-dark); color: var(--muted); font-size: 12px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.footer a { color: var(--muted); text-decoration: none; border-bottom: 1px solid transparent; }
.footer a:hover, .footer a:focus-visible { color: var(--accent); border-bottom-color: var(--accent); }
.footer-sep { opacity: .5; }

/* ---------- 管理员面板 ---------- */

.login-form { display: flex; gap: 10px; margin-top: 14px; }
.login-form input {
  flex: 1;
  min-width: 0;
  height: 48px;
  padding: 0 14px;
  border: 1px solid var(--line-dark);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  font-size: 14px;
}
.login-form input:focus { outline: 0; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.login-form input::placeholder { color: var(--muted); }
.login-form .btn { flex: 0 0 auto; }

.alerts { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border-left: 3px solid var(--line-dark);
  border-radius: var(--radius-sm);
  background: var(--surface-soft);
  font-size: 13px;
  line-height: 1.6;
}
.alert-tag {
  flex: 0 0 auto;
  padding: 1px 8px;
  border-radius: 999px;
  background: var(--surface-dim);
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.6;
}
.alert.error { border-left-color: var(--danger); }
.alert.error .alert-tag { background: rgba(184, 60, 50, .12); color: var(--danger); }
.alert.warn { border-left-color: var(--accent); }
.alert.warn .alert-tag { background: var(--accent-soft); color: var(--accent-hover); }

.table-wrap { overflow-x: auto; }
#accountTbl { min-width: 520px; }
#parseTbl { min-width: 860px; }
#parseTbl td.mono { max-width: 280px; }
.quota-item > span:last-child { min-width: 0; text-align: right; overflow-wrap: anywhere; }
.mono { word-break: break-all; }
.good { color: var(--green); }


@media (max-width: 600px) {
  .banner { gap: 8px; padding: 8px 14px; font-size: 12px; }
  .topbar, main, .footer { width: calc(100% - 32px); }
  .topbar { min-height: 64px; height: auto; padding: 10px 0; flex-wrap: wrap; }
  .nav { gap: 8px; flex-wrap: wrap; }
  .nav .btn { min-height: 36px; padding: 0 10px; }
  .title { margin: 36px 0 22px; }
  .row { flex-wrap: wrap; }
  .row input { flex: 1 1 100%; }
  #pwd { flex: 1 1 100px; }
  .row .btn { flex: 1 1 100%; }
  .files-bar { flex-wrap: wrap; }
  .files-tools { margin-left: 0; width: 100%; justify-content: space-between; }
  .entries li.entry { gap: 8px; padding: 9px 10px; }
  .entry-size { min-width: 0; font-size: 10px; }
  .entry-action { min-height: 40px; padding: 0 10px; }
  .entry-select { width: 36px; height: 44px; }
  .icon-btn { width: 40px; height: 40px; }
  .batch-bar { flex-wrap: wrap; gap: 10px; }
  .batch-bar .btn { flex: 1 1 100%; margin-left: 0; }
  .result-actions { flex-direction: column; }
  .link-result { align-items: flex-start; }
  .link-result .btn { min-height: 36px; }
  .crumb { max-width: 120px; }
  .modal-actions { flex-direction: column; }
  .claim { padding: 14px 12px; }
  .grid { grid-template-columns: 1fr; }
  .login-form { flex-wrap: wrap; }
  .login-form input { flex: 1 1 100%; }
  .login-form .btn { flex: 1 1 100%; }
}

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