.capture-tabs{display:flex;gap:4px;padding:5px;border-radius:14px;background:#e8efec;width:max-content;max-width:100%;margin:16px 0}
.capture-tabs button{border:0;padding:12px 18px;background:transparent;color:#31584f;border-radius:10px;font:inherit;cursor:pointer}
.capture-tabs button.active{background:white;color:#004b40;box-shadow:0 2px 8px #1232;font-weight:700}
.prepare-modern>[hidden],.capture-panel[hidden]{display:none!important}
.capture-panel{max-width:1100px;margin:0 auto}
.capture-intro{padding:28px 0;display:flex;justify-content:space-between;align-items:center;gap:24px}
.capture-intro h2{font-size:28px;margin:8px 0}
.capture-intro small{letter-spacing:.08em;color:#53736b}
.capture-intro p,.capture-empty p{color:#637b74}
.capture-start{display:flex;gap:10px;flex-wrap:wrap}
.capture-start button{min-height:54px}
.capture-cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,360px),1fr));gap:20px}
.capture-card{background:white;border:1px solid #dfe9e5;border-radius:18px;padding:24px;overflow:hidden}
.capture-card header{display:flex;justify-content:space-between;color:#52736a}
.capture-card header span{background:#edf4ef;padding:4px 10px;border-radius:8px}
.capture-card h3{margin:16px 0 8px}
.capture-card footer{display:flex;gap:8px;flex-wrap:wrap;margin-top:16px}
.capture-text{white-space:pre-wrap}
.capture-thumbs,.capture-edit-images{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.capture-thumbs figure,.capture-edit-images figure{margin:0;min-width:0}
.capture-thumbs img,.capture-edit-images img{width:100%;height:180px;object-fit:contain;background:#f5f7f6;border-radius:10px}
.capture-thumbs figcaption{font-size:12px;line-height:1.5;color:#5b706a}
.capture-queue:not(:empty){padding:18px;border-radius:14px;background:#fff4de;margin-bottom:20px}
.capture-queue button{margin:4px}
.capture-empty{padding:55px 20px;text-align:center;background:white;border:1px dashed #cbded6;border-radius:18px}
.capture-editor{display:grid;gap:18px}
.capture-editor label{display:grid;gap:7px}
.capture-editor input,.capture-editor textarea,.capture-plan-controls select,.capture-plan-controls input{width:100%;padding:12px;border:1px solid #cbdad4;border-radius:10px;box-sizing:border-box;font:inherit}
.capture-editor textarea{resize:vertical}
.capture-editor-actions{display:flex;gap:10px;flex-wrap:wrap}
.capture-status{border-radius:10px;background:#edf4ef;color:#225c4d;padding:12px;margin:0}
.capture-status.error{background:#fff0dc;color:#803c0c}
.capture-privacy{font-size:12px;color:#62786e;margin:0;line-height:1.5}
.capture-edit-images figure>div{display:flex;gap:4px;flex-wrap:wrap;margin-top:6px}
.capture-annotation canvas{width:100%;height:auto;max-height:65vh;object-fit:contain}
.capture-plan-controls{display:flex;gap:10px;align-items:end;flex-wrap:wrap;margin-bottom:14px}
.capture-plan-controls label{flex:1;min-width:100px}
.capture-plan-map{overflow:auto;background:#eef2f0;max-height:55vh;border:1px solid #cbdad4}
.capture-plan-render{width:1200px;height:900px;max-width:none}
.capture-plan-render canvas{cursor:crosshair}
.capture-plan-preview canvas{max-width:100%;height:auto;max-height:320px;object-fit:contain}
.capture-review-link{margin:12px 0}
.capture-audio audio{max-width:100%}
@media(max-width:650px){.capture-intro{display:block;padding:18px 0}
.capture-intro h2{font-size:23px}
.capture-start{margin-top:20px}
.capture-start button{flex:1;min-width:135px}
.capture-card{padding:18px}
.capture-editor-actions button{flex:1;min-height:48px}
.capture-modal .hb-modal{width:100%;max-width:100%;max-height:100dvh;border-radius:0}
.capture-modal{padding:0}
.capture-thumbs,.capture-edit-images{grid-template-columns:1fr}
.capture-tabs{width:100%;box-sizing:border-box}
.capture-tabs button{flex:1;padding:12px 8px}
.capture-modal footer{flex-wrap:wrap}
.capture-modal footer [data-finish]{flex:1;min-height:48px}
}

.capture-annotation canvas{display:block;width:auto;max-width:100%;height:auto;max-height:65vh;margin:auto}

.capture-plan-render{position:relative;width:100%;height:55vh;min-height:250px}
.capture-plan-render .cp-pdf-canvas{pointer-events:auto;touch-action:manipulation}
.capture-task-actions{margin-top:16px}
.capture-linked-tasks{display:flex;flex-direction:column;gap:8px;margin-top:10px}
.capture-task-link{text-align:left;white-space:normal;overflow-wrap:anywhere;justify-content:flex-start}
@media(max-width:650px){
  .capture-quick #open-prepare-sources,.capture-quick #pv-history,.capture-quick #duplicate-pv,.capture-quick #new-pv{display:none!important}
  .capture-quick .capture-intro{padding:12px 0}
  /* Long actions must stay readable in the narrow, shared modal footer. */
  .capture-modal footer,
  .hb-modal-overlay:has(.capture-plan-map) footer,
  .hb-modal-overlay:has(.capture-annotation) footer{display:flex;flex-direction:column;align-items:stretch;gap:8px}
  .capture-modal footer .button,
  .hb-modal-overlay:has(.capture-plan-map) footer .button,
  .hb-modal-overlay:has(.capture-annotation) footer .button{width:100%;min-width:0;min-height:44px;white-space:normal;overflow-wrap:anywhere}
}

