.pdf-shell { height: auto; }

.merge-card {
  flex: 1;
  padding: 27px 18px 22px;
  background:
    radial-gradient(circle at 1px 1px, rgba(17, 18, 16, .07) 0 .65px, transparent .8px) 0 0 / 6px 6px,
    rgba(205, 206, 201, .96);
  border: 2px solid var(--ink);
  box-shadow: 7px 7px 0 rgba(17, 18, 16, .13);
}

.merge-heading h1 {
  max-width: 380px;
  margin: 0;
  font-family: "Archivo Black", "Inter", sans-serif;
  font-size: clamp(34px, 10.5vw, 48px);
  line-height: .92;
  letter-spacing: -.07em;
}

.merge-intro {
  max-width: 350px;
  margin: 17px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.privacy-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-top: 23px;
  border: 1px solid var(--ink);
  background: rgba(17, 18, 16, .045);
}

.privacy-strip span {
  padding: 9px 3px;
  font-family: "DM Mono", monospace;
  font-size: 8px;
  font-weight: 500;
  letter-spacing: .04em;
  text-align: center;
}

.privacy-strip span + span { border-left: 1px solid var(--ink); }

.drop-zone {
  width: 100%;
  min-height: 150px;
  margin-top: 15px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px dashed var(--ink);
  background: rgba(205, 206, 201, .52);
  cursor: pointer;
  transition: background .16s ease, color .16s ease;
}

.drop-zone:hover,
.drop-zone.dragging { background: var(--ink); color: var(--white); }
.drop-zone strong { font-size: 12px; letter-spacing: .04em; }
.drop-zone > span:last-child { color: var(--muted); font-size: 10px; }
.drop-zone:hover > span:last-child,
.drop-zone.dragging > span:last-child { color: #adaeaa; }

.add-mark {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  margin-bottom: 4px;
  border: 1px solid currentColor;
  font-family: "DM Mono", monospace;
  font-size: 22px;
  line-height: 1;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.file-queue { margin-top: 20px; }
.queue-heading { display: flex; align-items: center; justify-content: space-between; }
.queue-heading h2 { margin: 0; font-family: "DM Mono", monospace; font-size: 11px; letter-spacing: .09em; }
.queue-heading h2 span { color: var(--muted); }
.queue-heading > button { padding: 4px 0; border: 0; background: transparent; color: var(--muted); font-family: "DM Mono", monospace; font-size: 9px; cursor: pointer; }

.file-list { margin: 9px 0 0; padding: 0; border-top: 1px solid var(--ink); list-style: none; }
.file-item { min-width: 0; display: grid; grid-template-columns: 24px minmax(0, 1fr) auto; align-items: center; gap: 9px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.file-number { font-family: "DM Mono", monospace; font-size: 9px; color: var(--muted); }
.file-details { min-width: 0; }
.file-name { display: block; overflow: hidden; color: var(--ink); font-size: 11px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.file-size { display: block; margin-top: 3px; color: var(--muted); font-family: "DM Mono", monospace; font-size: 8px; }
.file-actions { display: flex; gap: 3px; }
.file-actions button { width: 26px; height: 26px; padding: 0; border: 1px solid var(--line); background: transparent; font-family: "DM Mono", monospace; font-size: 11px; cursor: pointer; }
.file-actions button:hover:not(:disabled) { border-color: var(--ink); background: var(--ink); color: var(--white); }
.file-actions button:disabled { opacity: .25; cursor: default; }

.merge-status { min-height: 17px; margin: 17px 0 8px; color: var(--muted); font-family: "DM Mono", monospace; font-size: 9px; line-height: 1.5; }
.merge-status.error { color: #5a1d18; }
.merge-button { width: 100%; min-height: 52px; border: 1px solid var(--ink); background: var(--ink); color: var(--white); font-size: 12px; font-weight: 900; letter-spacing: .05em; cursor: pointer; }
.merge-button:hover:not(:disabled) { background: var(--accent); }
.merge-button:disabled { background: transparent; color: var(--muted); cursor: not-allowed; opacity: .55; }
.merge-button.processing { animation: processing 1s steps(2) infinite; }
.memory-note { margin: 11px 4px 0; color: var(--muted); font-size: 8px; line-height: 1.5; text-align: center; }

.pdf-mode-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin: 0 0 26px;
  border: 1px solid var(--ink);
  background: rgba(205, 206, 201, .72);
}

.pdf-mode-switch a {
  min-height: 48px;
  padding: 0 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-family: "DM Mono", monospace;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .09em;
  text-decoration: none;
}

.pdf-mode-switch a + a { border-left: 1px solid var(--ink); }
.pdf-mode-switch a:hover { background: rgba(17, 18, 16, .1); color: var(--ink); }
.pdf-mode-switch a.active { background: var(--ink); color: var(--white); }
.pdf-mode-switch a.active:hover { background: var(--accent); color: var(--white); }

@keyframes processing { 50% { opacity: .58; } }

@media (min-width: 520px) {
  .merge-card { padding: 31px 22px 24px; }
}

@media (prefers-reduced-motion: reduce) {
  .merge-button.processing { animation: none; }
}
