/* ============================================================
   拆包台 · 本地 .dzip 解压
   单列工具重心 · 极简克制 · 手机优先
   ============================================================ */

:root {
  --bg: #fafafa;
  --surface: #ffffff;
  --bg-soft: #f3f2ef;
  --ink: #18181b;
  --ink-2: #52525b;
  --ink-3: #8c8c96;
  --line: #e4e4e7;
  --line-strong: #d4d4d8;
  --accent: #d8492c;
  --accent-ink: #b83217;
  --accent-soft: #fdf0ed;
  --moss: #157f4b;
  --moss-soft: #ecf8f1;
  --coffee: #6b3e1e;
  --coffee-bg: #fff5ea;
  --coffee-border: #ebd1b5;
  --alipay: #1677ff;
  --alipay-dark: #0958d9;
  --alipay-soft: #eff6ff;

  --font-body: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", sans-serif;
  --font-mono: "SF Mono", "SFMono-Regular", Menlo, Consolas, monospace;

  --radius: 16px;
  --radius-sm: 12px;
  --shadow: 0 2px 6px rgba(0, 0, 0, 0.03), 0 16px 36px -24px rgba(0, 0, 0, 0.16);
  --maxw: 700px;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
}

body.modal-open { overflow: hidden; }

::selection { background: var(--accent-soft); color: var(--accent-ink); }

code {
  font-family: var(--font-mono);
  font-size: 0.88em;
  background: var(--bg-soft);
  padding: 1px 5px;
  border-radius: 5px;
}

/* ---------- top bar ---------- */

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 40;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
  min-width: 0;
}

.brand-img {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  display: block;
  flex: none;
}

.brand-text {
  display: flex;
  flex-direction: column;
  font-weight: 700;
  font-size: 16.5px;
  line-height: 1.15;
  white-space: nowrap;
}

.brand-text small {
  font-weight: 400;
  font-size: 11px;
  color: var(--ink-3);
  margin-top: 2px;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: none;
}

.safe-dot {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--moss);
  font-weight: 500;
  white-space: nowrap;
}

.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--moss);
  flex: none;
}

.btn-coffee-nav {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 16px;
  border-radius: 999px;
  border: 1px solid var(--coffee-border);
  background: linear-gradient(180deg, #fffaf2 0%, var(--coffee-bg) 100%);
  color: var(--coffee);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 3px 10px -6px rgba(107, 62, 30, 0.35);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
  touch-action: manipulation;
}

.btn-coffee-nav:hover {
  border-color: #d4a373;
  transform: translateY(-1px);
  box-shadow: 0 8px 18px -10px rgba(107, 62, 30, 0.45);
}

.btn-coffee-nav:active { transform: translateY(0); }

@media (max-width: 520px) {
  .safe-dot { display: none; }
  .btn-coffee-nav { padding: 8px 14px; font-size: 13.5px; }
}

/* ---------- centered workspace ---------- */

.workspace-shell {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 30px 18px 10px;
}

.hero-intro {
  text-align: center;
  margin-bottom: 22px;
}

h1 {
  font-weight: 800;
  font-size: clamp(28px, 7vw, 38px);
  line-height: 1.18;
  letter-spacing: -0.02em;
  margin: 0 0 8px;
}

.hl {
  color: var(--accent-ink);
}

.lede {
  color: var(--ink-2);
  font-size: 14.5px;
  margin: 0 auto;
  max-width: 56ch;
}

/* dropzone */

.dropzone {
  position: relative;
  border: 2px dashed var(--line-strong);
  border-radius: 20px;
  background: var(--surface);
  box-shadow: var(--shadow);
  cursor: pointer;
  padding: 40px 22px;
  transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease, padding 0.2s ease;
  outline: none;
}

.dropzone:hover,
.dropzone:focus-visible {
  border-color: var(--accent);
  background: #fffdfb;
  box-shadow: 0 8px 30px -18px rgba(216, 73, 44, 0.35);
}

.dropzone.drag {
  border-style: solid;
  border-color: var(--accent);
  background: var(--accent-soft);
}

.dropzone-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.dz-icon-wrap {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  margin-bottom: 14px;
  border-radius: 16px;
  background: var(--bg-soft);
  color: var(--ink);
  transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.dz-icon { width: 28px; height: 28px; display: block; }

.dropzone:hover .dz-icon-wrap {
  background: var(--accent-soft);
  color: var(--accent-ink);
  transform: translateY(-2px);
}

.dz-title {
  font-weight: 700;
  font-size: 18px;
  margin: 0 0 5px;
}

.dz-sub {
  font-size: 12.5px;
  color: var(--ink-3);
  margin: 0 0 18px;
}

.dz-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 11px 24px;
  border-radius: 12px;
  background: var(--ink);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  transition: background 0.15s ease, transform 0.15s ease;
}

.dropzone:hover .dz-cta {
  background: var(--accent-ink);
}

/* 结果出来后，上传框收窄为轻量条，把重心让给取件区 */
body.has-results .dropzone {
  padding: 14px 18px;
  border-radius: 14px;
}

body.has-results .dropzone-inner {
  flex-direction: row;
  justify-content: space-between;
  text-align: left;
  gap: 12px;
}

body.has-results .dz-icon-wrap {
  width: 38px;
  height: 38px;
  margin-bottom: 0;
  border-radius: 10px;
  flex: none;
}

body.has-results .dz-icon { width: 20px; height: 20px; }
body.has-results .dz-copy { flex: 1; min-width: 0; }
body.has-results .dz-title { font-size: 14px; margin: 0; }
body.has-results .dz-sub { display: none; }
body.has-results .dz-cta { padding: 7px 14px; font-size: 12.5px; border-radius: 9px; flex: none; }

.safe-inline {
  margin: 14px 4px 0;
  text-align: center;
  font-size: 12px;
  color: var(--ink-3);
}

/* ---------- workbench & results inside workspace ---------- */

.workbench,
.results-wrap {
  margin-top: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 16px;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.panel-title {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}

.panel-head h2 {
  font-size: 16px;
  font-weight: 700;
  margin: 0;
}

.count { color: var(--accent-ink); }

.total-size {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-3);
}

.panel-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* queue jobs */

.queue { display: grid; gap: 10px; }

.job {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  animation: rise-in 0.22s ease both;
}

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

.job-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.job-name {
  font-weight: 600;
  font-size: 13.5px;
  word-break: break-all;
}

.job-size {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-3);
  white-space: nowrap;
}

.job-status {
  font-size: 12px;
  color: var(--ink-2);
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 7px;
}

.job-status .ok { color: var(--moss); font-weight: 600; }
.job-status .warn { color: var(--accent-ink); font-weight: 600; }

.spinner {
  width: 11px;
  height: 11px;
  border: 2px solid var(--line-strong);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: inline-block;
  flex: none;
}

@keyframes spin { to { transform: rotate(360deg); } }

.progress {
  margin-top: 9px;
  height: 5px;
  border-radius: 999px;
  background: var(--line);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: var(--accent);
  transition: width 0.2s ease;
}

.progress.indeterminate .progress-fill {
  width: 34%;
  animation: slide-bar 1.1s ease-in-out infinite;
}

@keyframes slide-bar {
  0% { transform: translateX(-110%); }
  100% { transform: translateX(320%); }
}

.pw-box {
  margin-top: 10px;
  border-top: 1px solid var(--line);
  padding-top: 10px;
  display: grid;
  gap: 8px;
}

.pw-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--accent-ink);
}

.pw-row { display: flex; gap: 8px; }

.pw-input {
  flex: 1;
  min-width: 0;
  font-size: 14px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  padding: 8px 11px;
  outline: none;
}

.pw-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.pw-error {
  font-size: 12px;
  color: var(--accent-ink);
  margin: 0;
}

.job-log {
  font-size: 11.5px;
  color: var(--accent-ink);
  margin-top: 7px;
}

/* primary download bar */

.primary-download-bar {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin-bottom: 12px;
}

@media (min-width: 560px) {
  .primary-download-bar:has(#downloadAllBtn:not([hidden])) {
    grid-template-columns: 1.5fr 1fr;
  }
}

.results {
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
}

.file-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 10px;
  align-items: center;
  padding: 11px 13px;
  border-bottom: 1px solid var(--line);
}

.file-row:last-child { border-bottom: 0; }
.file-row:hover { background: var(--bg); }

.file-name {
  min-width: 0;
  font-size: 13.5px;
  font-weight: 600;
  word-break: break-all;
}

.file-name small {
  display: block;
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: 11px;
  color: var(--ink-3);
  margin-top: 2px;
}

.tag {
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  color: var(--ink-2);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 2px 7px;
  background: var(--bg);
  white-space: nowrap;
}

.tag.warn { border-color: #f3cbc2; color: var(--accent-ink); background: var(--accent-soft); }

.mobile-hint {
  font-size: 11.5px;
  color: var(--ink-3);
  margin: 10px 2px 0;
}

/* coffee banner inside results */

.coffee-banner-btn {
  margin-top: 14px;
  width: 100%;
  appearance: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 16px;
  border-radius: 14px;
  border: 1px solid var(--coffee-border);
  background: linear-gradient(90deg, #fffaf3 0%, var(--coffee-bg) 100%);
  color: var(--coffee);
  cursor: pointer;
  text-align: left;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
  touch-action: manipulation;
}

.coffee-banner-btn:hover {
  border-color: #d4a373;
  transform: translateY(-1px);
  box-shadow: 0 8px 20px -12px rgba(107, 62, 30, 0.35);
}

.cb-left {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
}

.cb-icon {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: #fff;
  border: 1px solid var(--coffee-border);
  display: grid;
  place-items: center;
  font-size: 20px;
  flex: none;
}

.cb-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.cb-text b { font-size: 14px; line-height: 1.3; }
.cb-text small { font-size: 11.5px; color: var(--ink-2); margin-top: 2px; }

.cb-arrow {
  font-size: 12.5px;
  font-weight: 700;
  white-space: nowrap;
  flex: none;
}

/* ---------- buttons ---------- */

.btn {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 13.5px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  padding: 9px 15px;
  cursor: pointer;
  transition: transform 0.14s ease, background 0.14s ease, border-color 0.14s ease;
  touch-action: manipulation;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.btn:hover { border-color: var(--ink); }
.btn:active { transform: scale(0.99); }
.btn[disabled] { opacity: 0.48; cursor: not-allowed; transform: none; }

.btn.primary { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn.primary:hover { background: #000; }
.btn.outline { background: #fff; }
.btn.big { padding: 12px 16px; font-size: 14.5px; border-radius: 12px; }
.btn.small { font-size: 12.5px; padding: 6px 12px; border-radius: 8px; }
.btn.mini { font-size: 12px; padding: 6px 12px; border-radius: 8px; }

.btn.is-downloaded {
  border-color: #bfe3ce;
  background: var(--moss-soft);
  color: var(--moss);
}

.btn-text {
  appearance: none;
  background: transparent;
  border: 0;
  padding: 4px 2px;
  font-family: var(--font-body);
  font-size: 12.5px;
  color: var(--ink-3);
  cursor: pointer;
}

.btn-text:hover { color: var(--accent-ink); text-decoration: underline; }

.btn-link-subtle {
  appearance: none;
  background: transparent;
  border: 0;
  padding: 3px 0;
  font-family: var(--font-body);
  font-size: 12.5px;
  color: var(--ink-3);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.btn-link-subtle:hover { color: var(--ink); }

/* ---------- secondary sections ---------- */

.ad-section,
.how,
.faq,
.legal {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 22px 18px 4px;
}

.sec-head {
  margin-bottom: 10px;
}

.sec-head h2 {
  font-size: 15.5px;
  font-weight: 700;
  margin: 0;
  color: var(--ink);
}

/* adsense */

.ad-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  padding: 10px 14px 12px;
  min-height: 98px;
}

.ad-label {
  display: flex;
  justify-content: space-between;
  font-size: 10.5px;
  color: var(--ink-3);
  margin-bottom: 6px;
}

.ad-placeholder {
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  background: var(--bg);
  padding: 12px 14px;
  text-align: center;
}

.ad-placeholder b { display: block; font-size: 12px; color: var(--ink-2); }
.ad-placeholder span { font-size: 11px; color: var(--ink-3); }

/* tabs */

.tabs {
  position: relative;
  display: flex;
  gap: 6px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 12px;
}

.tab {
  appearance: none;
  background: transparent;
  border: 0;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 13.5px;
  color: var(--ink-3);
  padding: 8px 12px 10px;
  cursor: pointer;
}

.tab.is-active { color: var(--ink); }

.tab-ink {
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--ink);
  transition: left 0.24s ease, width 0.24s ease;
}

.tab-panel { display: none; }
.tab-panel.is-active { display: block; }

.how-line {
  margin: 0;
  font-size: 13.5px;
  color: var(--ink-2);
  line-height: 1.75;
}

/* faq */

.faq-item { border-bottom: 1px solid var(--line); }

.faq-item summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  font-size: 13.5px;
  font-weight: 600;
}

.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; color: var(--ink-3); font-size: 16px; }
.faq-item[open] summary::after { content: "−"; color: var(--accent-ink); }

.faq-body > p {
  margin: 0 0 12px;
  font-size: 13px;
  color: var(--ink-2);
  line-height: 1.7;
}

.legal { padding-bottom: 24px; }
.legal p { margin: 0; font-size: 11.5px; color: var(--ink-3); line-height: 1.7; }

.footer {
  border-top: 1px solid var(--line);
  background: var(--surface);
  padding: 14px 18px calc(14px + env(safe-area-inset-bottom));
  font-size: 11.5px;
  color: var(--ink-3);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.footer .sep { color: var(--line-strong); }

.footer-coffee {
  appearance: none;
  background: var(--coffee-bg);
  border: 1px solid var(--coffee-border);
  padding: 4px 10px;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  color: var(--coffee);
  cursor: pointer;
  border-radius: 999px;
}

/* ---------- enlarged coffee & completion modal ---------- */

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(24, 24, 27, 0.52);
  backdrop-filter: blur(5px);
  padding: 12px 10px 0;
  animation: fade-in 0.18s ease both;
}

@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }

.modal-card {
  position: relative;
  width: 100%;
  max-width: 520px;
  max-height: 94vh;
  overflow-y: auto;
  background: #fff;
  border-radius: 24px 24px 0 0;
  box-shadow: 0 -10px 40px -10px rgba(0, 0, 0, 0.3);
  padding: 22px 20px calc(22px + env(safe-area-inset-bottom));
  animation: sheet-up 0.24s cubic-bezier(0.22, 0.61, 0.36, 1) both;
}

@keyframes sheet-up {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: none; }
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--ink-2);
  font-size: 20px;
  line-height: 1;
  display: grid;
  place-items: center;
  cursor: pointer;
}

.modal-close:hover { background: var(--bg-soft); color: var(--ink); }

.modal-result-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--moss-soft);
  border: 1px solid #cce6d7;
  color: var(--moss);
  font-size: 13px;
  font-weight: 600;
  padding: 9px 12px;
  border-radius: 12px;
  margin-bottom: 16px;
  margin-right: 36px;
}

.banner-ok {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--moss);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 12px;
  flex: none;
}

.coffee-head {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  padding-right: 28px;
}

.coffee-cup {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: var(--coffee-bg);
  border: 1px solid var(--coffee-border);
  display: grid;
  place-items: center;
  font-size: 25px;
  flex: none;
}

.coffee-title {
  font-size: 22px;
  font-weight: 800;
  margin: 0;
  color: var(--coffee);
  line-height: 1.25;
}

.coffee-desc {
  font-size: 13px;
  color: var(--ink-2);
  margin: 5px 0 0;
  line-height: 1.55;
}

.coffee-tiers {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 18px 0 14px;
}

.tier-btn {
  appearance: none;
  background: #fff;
  border: 1.5px solid var(--line-strong);
  border-radius: 13px;
  padding: 12px 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  cursor: pointer;
  transition: border-color 0.14s ease, background 0.14s ease, transform 0.14s ease;
  touch-action: manipulation;
}

.tier-btn:hover { border-color: #d4a373; transform: translateY(-1px); }

.tier-btn.is-selected {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.tier-price {
  font-size: 18px;
  font-weight: 800;
  color: var(--ink);
  line-height: 1.2;
}

.tier-btn.is-selected .tier-price { color: var(--accent-ink); }

.tier-name {
  font-size: 11px;
  color: var(--ink-3);
  font-weight: 500;
}

.custom-amount-wrap {
  margin-bottom: 14px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.custom-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-2);
  white-space: nowrap;
}

.custom-input-box {
  display: flex;
  align-items: center;
  background: #fff;
  border: 1.5px solid var(--line-strong);
  border-radius: 9px;
  padding: 0 10px;
  flex: 1;
  max-width: 210px;
}

.custom-input-box:focus-within {
  border-color: var(--accent);
}

.currency-prefix {
  font-weight: 700;
  color: var(--ink-2);
  margin-right: 4px;
}

#customAmountInput {
  width: 100%;
  border: 0;
  outline: none;
  padding: 8px 0;
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
  background: transparent;
}

.alipay-box {
  background: var(--alipay-soft);
  border: 1px solid #cce0ff;
  border-radius: 16px;
  padding: 16px 14px;
  text-align: center;
}

.btn-alipay {
  appearance: none;
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 14px 18px;
  border-radius: 12px;
  border: 0;
  background: var(--alipay);
  color: #fff;
  font-family: var(--font-body);
  font-size: 15.5px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 10px 22px -12px rgba(22, 119, 255, 0.75);
  transition: background 0.15s ease;
  touch-action: manipulation;
}

.btn-alipay:hover { background: var(--alipay-dark); }

.alipay-mark {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: #fff;
  color: var(--alipay);
  font-size: 14px;
  font-weight: 800;
}

.alipay-mark.small {
  width: 20px;
  height: 20px;
  border-radius: 5px;
  background: var(--alipay);
  color: #fff;
  font-size: 12px;
}

.alipay-note {
  margin: 8px 0 4px;
  font-size: 12px;
  color: var(--ink-2);
}

.qr-frame {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  background: #fff;
  border: 1px solid #d6e6ff;
  border-radius: 14px;
  padding: 14px 18px 12px;
  max-width: 100%;
}

.qr-brand-bar {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--alipay-dark);
  margin-bottom: 10px;
}

.qr-demo-badge {
  font-family: var(--font-mono);
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-ink);
  border: 1px solid #f0cfc6;
}

.qr-canvas {
  width: 210px;
  height: 210px;
  padding: 8px;
  border-radius: 10px;
  background: #fff;
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
}

.qr-canvas svg,
.qr-canvas img {
  width: 100%;
  height: 100%;
  display: block;
}

.qr-tip {
  margin: 10px 0 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
}

.qr-actions {
  margin-top: 8px;
  display: flex;
  justify-content: center;
  gap: 14px;
}

.modal-skip-bar {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: stretch;
}

.btn-skip {
  appearance: none;
  width: 100%;
  padding: 11px 16px;
  border-radius: 12px;
  border: 1px solid var(--line-strong);
  background: var(--bg);
  color: var(--ink-2);
  font-family: var(--font-body);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.14s ease, color 0.14s ease;
}

.btn-skip:hover {
  background: var(--bg-soft);
  color: var(--ink);
}

/* ---------- toast & drop overlay ---------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(20px + env(safe-area-inset-bottom));
  transform: translate(-50%, 14px);
  background: var(--ink);
  color: #fff;
  font-size: 13px;
  padding: 9px 18px;
  border-radius: 999px;
  box-shadow: 0 18px 36px -18px rgba(0, 0, 0, 0.5);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 120;
  max-width: min(88vw, 460px);
  text-align: center;
}

.toast.show { opacity: 1; transform: translate(-50%, 0); }

.drop-overlay {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.16s ease, visibility 0.16s ease;
  pointer-events: none;
}

.drop-overlay.show { opacity: 1; visibility: visible; }

.drop-overlay-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  font-size: 22px;
  font-weight: 700;
  color: var(--ink);
  border: 2px dashed var(--accent);
  border-radius: 22px;
  padding: 40px 34px;
  background: #fff;
}

.drop-overlay-icon {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: var(--accent-soft);
  color: var(--accent-ink);
}

.drop-overlay-icon svg { width: 30px; height: 30px; }

/* ---------- desktop ---------- */

@media (min-width: 720px) {
  .topbar { padding: 13px 28px; }
  .workspace-shell { padding-top: 42px; }
  .dropzone { padding: 50px 28px; }
  .workbench, .results-wrap { padding: 20px 22px; }

  .modal-backdrop {
    align-items: center;
    padding: 20px;
  }
  .modal-card {
    border-radius: 24px;
    padding: 26px 26px 24px;
    box-shadow: 0 30px 70px -20px rgba(0, 0, 0, 0.42);
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
