.app-dialog[data-kind="pdf"] { max-width: 1160px; width: calc(100vw - 24px); }
.pdf-review-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.pdf-review-grid canvas { width: 100%; height: auto; border: 1px solid #494c43; background: #fff; }
.pdf-fields { display: flex; gap: 12px; align-items: end; flex-wrap: wrap; margin: 12px 0; }
.pdf-fields label { flex: 1; min-width: 120px; }
[data-kind="pdf"] input, [data-kind="pdf"] select, [data-kind="pdf"] button, [data-kind="pdf"] summary { min-height: 44px; }
[data-kind="pdf"] textarea { width: 100%; min-height: 80px; }
.pdf-checklist { margin: 16px 0; padding: 12px; border: 1px solid #aa641d; }
.pdf-checklist label { display: flex; gap: 10px; align-items: center; }
.pdf-checklist input { width: 24px; flex: 0 0 24px; }
@media (max-width: 700px) { .pdf-review-grid { grid-template-columns: 1fr; } }

#pdfAnimationCanvas { touch-action: none; cursor: grab; }
#pdfSourceCanvas { touch-action: none; }
#pdfScrub { width: 100%; }
#pdfStatus { position: sticky; top: 0; z-index: 2; margin-top: 0; padding: 12px; background: #20261e; border: 1px solid #646d5e; }
#pdfAnalysisStatus { padding: 12px; overflow-wrap: anywhere; border-left: 3px solid #ff7b33; }
.pdf-checklist details { padding: 10px 0; border-top: 1px solid #494c43; }
.pdf-checklist details label { display: block; margin: 8px 0; }
.pdf-checklist details input { width: 100%; }

/* The source and playback are the primary workspace. Numeric edits stay below it. */
.pdf-preview-pane { min-width: 0; margin: 0; padding: 12px; background: #161c16; border: 1px solid #424b3f; border-radius: 6px; }
.pdf-preview-pane h3 { margin: 0 0 12px; font-size: 14px; letter-spacing: .07em; text-transform: uppercase; color: #c0c8bb; }
.pdf-preview-pane label { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.pdf-preview-pane select { flex: 1; min-width: 0; }
.pdf-review-grid canvas { display: block; }
.pdf-source-only { grid-template-columns: 1fr; max-width: 760px; margin: auto; }
.pdf-file-tools { margin: 0 0 16px; border-bottom: 1px solid #424b3f; }
.pdf-file-tools summary, .pdf-edit summary { cursor: pointer; padding: 12px 0; }
.pdf-transport { padding: 16px; margin-top: 12px; background: #1a2119; border: 1px solid #59634f; border-radius: 6px; }
#pdfStepCount { color: #ff914d; font-size: 14px; }
#pdfStepCaption { margin: 6px 0 14px; font-size: 20px; line-height: 1.35; min-height: 1.35em; }
.pdf-transport-controls { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pdf-transport-controls select { flex: 1; min-width: 180px; }
#pdfPlay { background: #ff7b33; color: #111610; border-color: #ff7b33; font-weight: 700; min-width: 84px; }
.pdf-transport label { display: block; margin-top: 12px; }
#pdfElapsed { display: block; text-align: right; font-variant-numeric: tabular-nums; color: #b9c4b0; font-size: 13px; }
.pdf-edit { border-block: 1px solid #424b3f; margin-block: 20px; padding-block: 16px; }
.pdf-hint { color: #b9c4b0; font-size: 14px; }
.pdf-preview-tabs { display: none; }
[data-kind="pdf"] button:focus-visible, [data-kind="pdf"] summary:focus-visible, [data-kind="pdf"] select:focus-visible { outline: 2px solid #ff914d; outline-offset: 3px; }
[data-kind="pdf"] button:disabled { opacity: .45; cursor: default; }
@media (max-width: 700px) {
  .pdf-preview-tabs { display: flex; gap: 8px; margin-bottom: 8px; }
  .pdf-preview-tabs button { flex: 1; }
  .pdf-preview-tabs [aria-pressed="true"] { border-color: #ff914d; color: #ff914d; background: #30271e; }
  .pdf-review-grid[data-mobile-view="animation"] .pdf-preview-pane:first-child { display: none; }
  .pdf-review-grid[data-mobile-view="source"] .pdf-preview-pane:last-child { display: none; }
  .pdf-preview-pane { padding: 8px; }
  .pdf-transport { padding: 12px; }
  .pdf-transport-controls select { order: -1; flex-basis: 100%; width: 100%; }
  .pdf-transport-controls button { flex: 1; min-width: 0; }
  #pdfStepCaption { font-size: 18px; }
  #pdfStatus { padding: 8px 10px; font-size: 13px; }
}

.pdf-interaction { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:8px; margin-bottom:12px; font-size:14px; color:#c0c8bb; }
#pdfAnimationCanvas[data-editable="false"] { cursor:default; }
#pdfEditPositions { border-color:#ff914d; color:#ff914d; }
#pdfEditPositions[hidden] { display:none; }
.photo-order { border:1px solid var(--line,#555); border-radius:12px; padding:16px; margin:16px 0; }
.photo-order fieldset { border:0; padding:0; min-width:0; }
.photo-order label { display:flex; flex-direction:column; gap:6px; margin:12px 0; }
.photo-order textarea { width:100%; min-height:100px; }
.photo-order select { max-width:240px; }
.app-dialog .photo-order-toggle,.photo-order .photo-order-confirm { display:flex; flex-direction:row; align-items:center; gap:10px; min-height:44px; }
.photo-order-toggle input,.photo-order-confirm input { width:22px; height:22px; min-height:22px; flex:0 0 22px; }
.photo-order-summary { line-height:1.6; margin:16px 0; }
