/* Easy: upload recovery and one-set review. Loaded after style.css. */
.topbar-inner .ez-me { width: auto; min-width: 40px; max-width: 145px; border-radius: 10px; padding: 0 10px; white-space: nowrap; font-size: 13px; }
.ez-queue-link { border: 1px solid #85929d; border-radius: 8px; padding: 6px 10px; color: #fff; background: transparent; font-size: 13px; white-space: nowrap; cursor: pointer; min-height: 40px; }
.ez-upload-choices { display: grid; gap: 10px; margin-top: 16px; }
.ez-upload-choices .ez-btn { gap: 8px; }
.ez-upload-dialog { border: 0; border-radius: 16px; width: min(520px, calc(100vw - 24px)); max-height: calc(100dvh - 40px); padding: 16px; color: var(--ink); background: var(--surface); overflow: auto; }
.ez-upload-dialog::backdrop { background: rgba(29,43,54,.45); }
.ez-upload-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.ez-upload-pages { margin: 8px 0 14px; }
.ez-upload-page { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 2px 12px; border-bottom: 1px solid var(--line); padding: 10px 0; }
.ez-upload-page > span { overflow-wrap: anywhere; }
.ez-upload-page small { grid-column: 1; color: var(--ink-2); }
.ez-upload-page a { grid-column: 2; grid-row: 1 / span 2; align-self: center; min-height: 44px; display: flex; align-items: center; }
.ez-upload-page.bad > span, .ez-upload-page .ez-error, .ez-fail-count { color: var(--danger); }
.ez-upload-dialog > .ez-btn { width: 100%; }
.ez-batch { border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.ez-batch summary { padding: 12px 14px; cursor: pointer; }
.ez-batch-list { padding: 0 14px 8px; }
.ez-batch-list > div { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 12px; padding: 8px 0; border-top: 1px solid var(--line); }
.ez-batch-list a, .ez-batch-list span { overflow-wrap: anywhere; min-width: 0; }
.ez-batch-list a[aria-current] { font-weight: 700; }
.ez-batch-list small { color: var(--ink-2); }
.ez-batch > button { margin: 0 14px 12px; }
.ez-report-link { display: block; align-self: center; padding: 10px; font-size: 14px; color: var(--ink-2); text-underline-offset: 3px; }
.ez-viewer { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--surface); }
/* เต็มความกว้างตั้งแต่แรก ภาพสูงเลื่อนในกรอบได้ */
.ez-view-window { height: clamp(180px, 28dvh, 260px); overflow: auto; background: #e8e4dc; cursor: grab; overscroll-behavior: contain; touch-action: pan-x pan-y; }
.ez-view-window:active { cursor: grabbing; }
.ez-view-canvas { width: 100%; }
.ez-view-canvas img { width: 100%; height: auto; max-width: none; display: block; user-select: none; -webkit-user-select: none; }
.ez-view-pdf { width: 100%; height: 100%; }
.ez-view-tools { display: flex; align-items: center; gap: 10px; padding: 4px 10px; font-size: 13px; }
.ez-view-tools > span { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.ez-view-tools button { min-height: 36px; padding: 3px 12px; }
.ez-review-group { display: grid; grid-template-columns: 36px minmax(0,1fr); align-items: center; gap: 6px; margin-top: 8px; }
.ez-review-group h2 { font-size: 13px; margin: 0; }
.ez-review-points { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; }
.ez-review-point { min-width: 0; border: 1px solid var(--line); border-radius: 10px; padding: 6px; background: var(--surface-2); }
.ez-review-point.doubtful { background: #fff8df; border-color: #b88917; }
.ez-measure-label { display: block; }
.ez-measure-label > span { display: block; color: var(--ink-2); font-size: 13px; }
.ez-measure-label > b { font-size: 22px; line-height: 1.7; display: block; }
.ez-measure-label > input { width: 100%; min-width: 0; min-height: 34px; padding: 0 4px; border: 1px solid #b88917; border-radius: 6px; background: var(--surface); font-size: 21px; font-weight: 700; }
.ez-point-mark { display: flex; flex-wrap: wrap; gap: 0 6px; align-items: center; margin-top: 3px; }
.ez-original-tick { display: block; margin-top: 0; font-size: 12px; color: #1f6b3a; overflow-wrap: anywhere; }
.ez-original-tick.bad { color: #9a3412; }
.ez-tick-edit { margin-top: 0; font-size: 12px; }
.ez-tick-edit summary { cursor: pointer; min-height: 28px; display: flex; align-items: center; text-decoration: underline; text-underline-offset: 3px; }
.ez-tick-edit select { width: 100%; min-height: 40px; padding: 2px; font-size: 13px; background: var(--surface); border: 1px solid #9c7b22; border-radius: 6px; }
.ez-tick-edit[open] summary { color: #805500; }
#ezDraftStatus { display: block; min-height: 0; margin-top: 6px; font-size: 12px; }
#ezDraftStatus:empty { display: none; }
.ez-cell-review { padding-bottom: 86px; }
.ez-cell-review > .ez-actions { position: fixed; z-index: 15; bottom: 0; left: 50%; transform: translateX(-50%); width: min(760px,calc(100% - 24px)); background: var(--bg); border-top: 1px solid var(--line); padding: 8px 0 calc(8px + env(safe-area-inset-bottom)); grid-template-columns: minmax(0,.8fr) minmax(0,1.2fr); grid-auto-columns: auto; }
.ez-cell-review > .ez-card { padding: 10px 12px; }
.ez-cell-review .ez-cell-h { font-size: 20px; }
.ez-cell-review .ez-cell-p { font-size: 14px; }
.ez-cell-review .ez-actions .ez-btn { font-size: 16px; min-height: 56px; height: auto; padding: 8px; }
.ez-question { white-space: pre-wrap; overflow-wrap: anywhere; margin: 8px 0 14px; }
.ez-question-points { display: grid; gap: 4px; margin-bottom: 12px; }
.ez-question-points label { display: flex; gap: 8px; align-items: center; min-height: 40px; }
.ez-question-points input { width: 19px; height: 19px; accent-color: var(--brand); }
.ez-answer-values { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; }
.ez-answer-values input { min-width: 0; width: 100%; }
.ez-optional-file { font-size: 13px; margin-top: 12px; }
.ez-optional-file input { max-width: 100%; font-size: 13px; }
.ez-attachment { display: block; padding: 6px 0; overflow-wrap: anywhere; }
.ez-queue-link:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
.ez-view-window:focus-visible, .ez-tick-edit summary:focus-visible, .ez-tick-edit select:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }
@media (max-width:560px) {
  .ez-queue-link { padding: 4px 6px; font-size: 12px; }
  .ez-view-window { height: 180px; }
  .ez-cell-review > .ez-card { padding: 8px 10px; }
  .ez-cell-review .ez-back h1 { font-size: 18px; }
  .ez-review-group { margin-top: 6px; }
  .ez-review-points { gap: 5px; }
  .ez-review-point { padding: 5px; }
  .ez-measure-label > input { font-size: 17px; }
  .ez-review-group { grid-template-columns: 28px minmax(0,1fr); gap: 4px; }
  .ez-original-tick { font-size: 11px; }
  .ez-answer-values { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .ez-view-tools { gap: 8px; }
}
@media (prefers-reduced-motion:reduce) { .ez-cell-review .ez-spin { animation: none; } }
