:root {
  --brand: #0052d9;
  --ink: #1d1a16;
  --ink-2: #5b544c;
  --ink-3: #8d857a;
  --paper: #f4f1ec;
  --card: #ffffff;
  --line: #e3ddd3;
  --accent: #c2410c;
  --ok: #17795e;
  --danger: #c0392b;
  --font: "PingFang SC", "Microsoft YaHei", -apple-system, Arial, sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.7;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  padding-top: 44px;
}

body.modal-open { overflow: hidden; }

/* ---------- 通道关闭 ---------- */
.closed-mask {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(29, 26, 22, .55);
  backdrop-filter: blur(3px);
}

.closed-card {
  width: min(400px, 100%);
  padding: 32px 26px 26px;
  text-align: center;
  background: var(--card);
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .28);
}

.closed-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  margin: 0 auto 16px;
  color: var(--accent);
  background: #fdf1e8;
  border-radius: 50%;
}

.closed-icon svg { width: 26px; height: 26px; }

.closed-card h2 {
  margin: 0 0 10px;
  font-size: 18px;
  font-weight: 600;
  color: var(--ink);
}

.closed-card p {
  margin: 0 0 22px;
  font-size: 13.5px;
  line-height: 1.75;
  color: var(--ink-3);
}

.closed-actions { display: flex; gap: 10px; }
.closed-actions > * { flex: 1; }

.closed-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 8px 14px;
  font-size: 14px;
  color: #fff;
  text-decoration: none;
  background: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 6px;
}

.closed-btn:hover { opacity: .9; }

.closed-btn--ghost {
  color: var(--ink-2);
  background: #fff;
  border-color: var(--line);
}

.closed-btn--ghost:hover { background: #faf8f5; opacity: 1; }

.countdown-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 44px;
  font-size: 13.5px;
  color: #7a3b00;
  background: #fdf0e2;
  border-bottom: 1px solid #f0dcc4;
}

.countdown-bar.expired {
  color: #fff;
  background: var(--danger);
  border-bottom-color: var(--danger);
}

.cd-icon { font-size: 14px; }

.cd-timer {
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: .5px;
  color: var(--accent);
}

.countdown-bar.expired .cd-timer { color: #fff; }

.container {
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  padding: 26px 18px 40px;
}

.page-head { margin-bottom: 22px; }

.page-head h1 {
  margin: 0 0 6px;
  font-size: 22px;
  font-weight: 600;
  line-height: 1.5;
  letter-spacing: -.2px;
}

.hero-sub { margin: 0; font-size: 13.5px; color: var(--ink-3); }

.main-content {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 1px 2px rgba(29, 26, 22, .04);
}

.upload-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 34px 18px;
  border: 1.5px dashed #d5cbbd;
  border-radius: 10px;
  background: #fbf9f6;
  cursor: pointer;
  transition: border-color .2s, background-color .2s;
}

.upload-area:hover { border-color: var(--brand); background: #f6f8ff; }
.upload-area.is-drag { border-color: var(--brand); background: #eef3ff; }

.upload-icon { color: var(--ink-3); }
.upload-icon svg { width: 34px; height: 34px; }

.upload-text p { margin: 0; font-size: 14px; color: var(--ink-2); }

.upload-button {
  margin-top: 2px;
  padding: 7px 20px;
  font-size: 14px;
  color: var(--brand);
  background: #fff;
  border: 1px solid #c3d4f5;
  border-radius: 6px;
  cursor: pointer;
}

.upload-button:hover { background: #f2f6ff; }

.preview-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 12px;
}

.preview-item {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: #eee;
  border-radius: 8px;
}

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

.preview-del {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 22px;
  height: 22px;
  padding: 0;
  font-size: 15px;
  line-height: 20px;
  color: #fff;
  background: rgba(0, 0, 0, .55);
  border: 0;
  border-radius: 50%;
  cursor: pointer;
}

.preview-del:hover { background: rgba(0, 0, 0, .75); }

.file-counter {
  margin: 16px 0 8px;
  font-size: 13px;
  color: var(--ink-3);
}

.counter { color: var(--ink); font-weight: 600; }

.progress-container {
  height: 5px;
  background: #ece7df;
  border-radius: 3px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #0052d9, #4d8bff);
  border-radius: 3px;
  transition: width .3s cubic-bezier(.4, 0, .2, 1);
}

.submit-section { margin-top: 20px; }

.submit-button {
  width: 100%;
  min-height: 46px;
  font-size: 15.5px;
  font-weight: 500;
  color: #fff;
  background: var(--brand);
  border: 1px solid var(--brand);
  border-radius: 8px;
  cursor: pointer;
  transition: opacity .2s, background-color .2s;
}

.submit-button:disabled { opacity: .42; cursor: not-allowed; }
.submit-button:not(:disabled):hover { background: #366ef4; }

.submit-warn {
  margin: 10px 0 0;
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--danger);
  text-align: center;
}

.info-section {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid #eee8df;
}

.info-title { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; }
.info-title h3 { margin: 0; font-size: 14px; font-weight: 600; }
.info-icon { color: var(--ink-3); display: inline-flex; }
.info-icon svg { width: 16px; height: 16px; }

.info-list { margin: 0; padding-left: 18px; color: var(--ink-2); font-size: 13px; }
.info-list li { margin-bottom: 4px; }

footer { margin-top: 24px; text-align: center; }
footer p { margin: 0; font-size: 12.5px; color: #a9a196; }

/* ---------- 审核遮罩 ---------- */
.review-mask {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(24, 20, 16, .62);
  backdrop-filter: blur(2px);
}

.review-mask.show { display: flex; }

.audit-card {
  width: min(380px, 100%);
  padding: 26px 22px 22px;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .28);
  animation: pop .2s ease-out;
}

.review-mask.is-approved .audit-card { display: none; }

@keyframes pop {
  from { opacity: 0; transform: translateY(10px) scale(.97); }
  to { opacity: 1; transform: none; }
}

.audit-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  font-size: 15px;
  font-weight: 600;
}

.audit-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--brand);
  animation: blink 1s infinite;
}

@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }

.audit-meter-wrap { display: flex; align-items: center; gap: 10px; }

.audit-meter {
  flex: 1;
  height: 6px;
  background: #eef1f5;
  border-radius: 3px;
  overflow: hidden;
}

.audit-meter__fill {
  height: 100%;
  width: 0;
  background: var(--brand);
  border-radius: 3px;
  transition: width .35s cubic-bezier(.4, 0, .2, 1);
}

.audit-pct {
  flex: 0 0 42px;
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 13px;
  color: var(--brand);
  text-align: right;
}

.audit-log {
  margin: 16px 0 0;
  padding: 0;
  max-height: 132px;
  overflow-y: auto;
  list-style: none;
  font-size: 12.5px;
  color: var(--ink-2);
}

.audit-log li {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 3px 0;
  animation: slide-in .25s ease-out;
}

.audit-log li::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #b7c8e8;
  flex: 0 0 5px;
}

@keyframes slide-in {
  from { opacity: 0; transform: translateX(-6px); }
  to { opacity: 1; transform: none; }
}

.audit-thumbs {
  display: flex;
  gap: 6px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid #f0f0f0;
}

.audit-thumbs img {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid #eee;
}

/* ---------- 结果 ---------- */
.result-card {
  width: min(380px, 100%);
  padding: 28px 22px 20px;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .28);
  text-align: center;
  animation: pop .22s ease-out;
}

.result-head { margin-bottom: 18px; }

.result-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  margin: 0 auto 12px;
  color: var(--ok);
  background: #e6f5ef;
  border-radius: 50%;
}

.result-icon svg { width: 26px; height: 26px; }

.result-head h2 { margin: 0 0 4px; font-size: 19px; font-weight: 600; }
.result-head p { margin: 0; font-size: 13px; color: var(--ink-3); }

.password-panel {
  padding: 18px 16px;
  background: #fbf9f6;
  border: 1px solid #eae3d9;
  border-radius: 10px;
}

.password-label { font-size: 12.5px; color: var(--ink-3); margin-bottom: 6px; }

.password-code {
  font-family: "PingFang SC", "Microsoft YaHei", serif;
  font-size: 30px;
  font-weight: 700;
  letter-spacing: 6px;
  color: var(--accent);
  padding-left: 6px;
}

.password-hint { margin-top: 8px; font-size: 12px; color: var(--ink-3); }

.password-actions { display: flex; gap: 8px; margin-top: 16px; }

.password-copy,
.password-return {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  font-size: 14px;
  border-radius: 6px;
  cursor: pointer;
  text-decoration: none;
}

.password-copy { color: #fff; background: var(--brand); border: 1px solid var(--brand); }
.password-copy:hover { background: #366ef4; }

.password-return { color: var(--ink); background: #fff; border: 1px solid #ddd6cb; }
.password-return:hover { background: #f6f3ee; }

.result-close {
  margin-top: 16px;
  width: 100%;
  min-height: 40px;
  font-size: 14px;
  color: var(--ink-2);
  background: transparent;
  border: 0;
  border-radius: 6px;
  cursor: pointer;
}

.result-close:hover { background: #f4f1ec; }

@media (max-width: 420px) {
  .container { padding: 20px 14px 32px; }
  .page-head h1 { font-size: 19px; }
  .main-content { padding: 16px; border-radius: 10px; }
  .upload-area { padding: 26px 14px; }
  .password-code { font-size: 26px; }
}

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