/* Photo to Scanned PDF — tool-only styles. Shared rules stay in style.css. */

/* Staged reveal (mechanic in style.css). */
main[data-stage="empty"] .scan-studio { display: none; }

.scan-hero .dz-art { font-size: 34px; }

.studio.scan-studio {
  grid-template-areas: "side stage ext";
  grid-template-columns: 280px minmax(0, 1fr) 310px;
  align-items: start;
}
.studio .tile.side { grid-area: side; }
.studio .tile.stage { grid-area: stage; }
.studio .tile.ext { grid-area: ext; }

/* Page list */
.pagelist { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }
.pagerow {
  display: flex; align-items: center; gap: 10px;
  border: 1px solid var(--line); border-radius: 10px; padding: 6px 8px;
  background: var(--surface); cursor: pointer; text-align: left; width: 100%;
}
.pagerow.on { border-color: var(--brand); background: var(--accent); }
.pagerow img { width: 44px; height: 58px; object-fit: cover; border-radius: 5px; border: 1px solid var(--line); background: #fff; }
.pagerow .pmeta { flex: 1; min-width: 0; }
.pagerow .pname { display: block; font-size: 13px; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pagerow .plook { display: block; font-size: 11.5px; color: var(--muted); }
.pagerow .pbtns { display: flex; gap: 4px; }
.pagerow .pbtns button {
  border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  border-radius: 7px; width: 26px; height: 26px; font-size: 13px; cursor: pointer; line-height: 1;
}

/* Filter thumbs */
.filterthumbs { display: flex; gap: 8px; margin: 4px 0 8px; }
.fthumb {
  flex: 1; border: 1.5px solid var(--line); border-radius: 10px; padding: 5px;
  background: var(--surface); cursor: pointer; text-align: center;
}
.fthumb canvas { width: 100%; height: auto; border-radius: 5px; display: block; background: #fff; }
.fthumb span { display: block; font-size: 11.5px; font-weight: 650; margin-top: 4px; color: var(--ink); }
.fthumb.on { border-color: var(--brand); background: var(--accent); }

/* Stage + loupe */
.stagewrap { position: relative; }
#stageCanvas { width: 100%; height: auto; display: block; border-radius: 10px; touch-action: none; cursor: crosshair; }
.loupe {
  position: absolute; width: 120px; height: 120px; border-radius: 50%;
  border: 2px solid var(--brand); overflow: hidden; pointer-events: none;
  box-shadow: 0 8px 24px rgba(10, 20, 40, .28); background: #000; z-index: 5;
}
.loupe canvas { width: 120px; height: 120px; display: block; }
.hintline { font-size: 12.5px; color: var(--muted); }

.segrow { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 6px; }
.chip-btn {
  border: 1.5px solid var(--line); background: var(--surface); color: var(--ink);
  border-radius: 8px; padding: 6px 12px; font-size: 13px; font-weight: 650; cursor: pointer;
}
.chip-btn.on { border-color: var(--brand); background: var(--accent); color: var(--brand); }
.estline { font-size: 12.5px; color: var(--muted); min-height: 16px; margin: 6px 0; }
#maxKb {
  border: 1.5px solid var(--line); border-radius: 8px; padding: 7px 9px;
  font: inherit; font-size: 13.5px; background: var(--surface); color: var(--ink);
}

@media (max-width: 1100px) {
  .studio.scan-studio { grid-template-areas: "stage" "side" "ext"; grid-template-columns: minmax(0, 1fr); }
}
