/* 2026-10-03 live UX review fixes. Loaded after app.css and readability.css. */

/* Job page actions, notices and in-page submit errors. */
.status_actions{display:flex;flex-wrap:wrap;gap:12px;margin-block-start:24px}
.status_actions .status_home_button{margin:0}
.secondary_button{display:inline-flex;align-items:center;justify-content:center;min-block-size:48px;padding:0 20px;border:1px solid #c9d3e0;border-radius:10px;background:#fff;color:#1f3a5f;font-weight:600;text-decoration:none}
.secondary_button:hover{background:#f3f6fa}
.secondary_button:focus-visible{outline:3px solid #2f6bf0;outline-offset:2px}
.job_poll_notice{margin:16px 0 0;padding:12px 14px;border-radius:8px;background:#fff4d6;color:#6b4500;line-height:1.6}
.job_submit_error{margin:16px 0;padding:12px 14px;border:1px solid #f1b4b4;border-radius:8px;background:#fdecec;color:#9b1c1c;line-height:1.6;font-weight:600}
.job_submit_error[hidden]{display:none}
.result_list .result_link{overflow-wrap:anywhere}

/* Mobile PDF editor: the legacy fixed 44px dock clipped wrapped tool rows. */
@media (max-width:820px){
  .edit__dock,.tool_detail_card .edit__dock{position:static!important;height:auto!important;max-height:none!important;overflow:visible!important;flex-wrap:wrap!important}
}

/* 1001-1100px: the inspector spans its own row instead of overlapping the canvas. */
@media (min-width:1001px) and (max-width:1100px){
  .tool_detail_card .edit__layout{grid-template-areas:"command command" "modes modes" "dock dock" "rail main" "inspector inspector"!important}
  .tool_detail_card .edit__inspector{grid-area:inspector}
}

/* 2026-10-04 recheck fixes. */

/* Skip link: visible only on keyboard focus. */
.skip_link{position:absolute;left:12px;top:-60px;z-index:100;padding:10px 16px;border-radius:8px;background:#1f3a5f;color:#fff;font-weight:700;text-decoration:none}
.skip_link:focus{top:12px}

/* Logout is a quiet secondary action, not the primary call to action. */
.site_header .logout_button,.mobile_account .logout_button{background:#fff!important;color:#1f3a5f!important;border:1px solid #c9d3e0!important;box-shadow:none!important;font-weight:600}
.site_header .logout_button:hover,.mobile_account .logout_button:hover{background:#f3f6fa!important}

/* Error page. */
.error_card .error_message{font-size:1.05rem;line-height:1.7;color:#1f2937}
.error_card .error_hint{line-height:1.7;color:#4b5563}

/* Image crop: keep "품질 (90%)" on one line above its slider. */
.crop_settings label{display:flex;flex-direction:column;gap:8px}
.crop_settings label > span{white-space:nowrap}

/* Redaction: thumbnails | large working page | settings (was 2 columns for 3 parts). */
@media (min-width:1101px){
  .tool_detail_card .redact-layout{grid-template-columns:150px minmax(0,1fr) 260px!important;gap:20px}
  .tool_detail_card .redact-rail{max-height:75vh}
  .tool_detail_card .redact-page-image{max-height:78vh}
}

/* Redaction upload looks like the other tools' drop zones. */
.redact-drop{position:relative;align-items:center!important;justify-content:center;min-height:150px;padding:28px!important;text-align:center;background:#f8fafc!important;cursor:pointer}
.redact-drop input[type="file"]{position:absolute;inset:0;width:100%;height:100%;opacity:0;cursor:pointer}
.redact-drop:focus-within{outline:3px solid #2f6bf0;outline-offset:2px}
.redact-file-label{display:flex;flex-direction:column;gap:6px;align-items:center;pointer-events:none}
.redact-file-label strong{font-size:1rem;color:#1f2937}
.redact-file-label span{font-size:.9rem;font-weight:400;color:#6b7280}

/* Markdown preview: Mermaid images carry their PDF size; keep aspect ratio when narrower. */
.mdpdf-preview .mermaid-diagram{text-align:center}
.mdpdf-preview .mermaid-diagram img{max-width:100%;height:auto}

/* Skip-link target: focus lands on main without a visible ring. */
main:focus{outline:none}

/* "내 작업" link and recent-jobs page. */
.header_jobs_link{margin-right:14px;color:#1f3a5f;font-weight:600;text-decoration:none;white-space:nowrap}
.header_jobs_link:hover{text-decoration:underline}
.mobile_jobs_link{display:block;margin:0 0 10px;color:#1f3a5f;font-weight:700;text-decoration:none}
.jobs_card{max-width:820px}
.jobs_lead{color:#4b5563;line-height:1.7;margin:0 0 18px}
.jobs_list{list-style:none;margin:0 0 20px;padding:0;display:flex;flex-direction:column;gap:10px}
.jobs_item{border:1px solid #d8e0ea;border-radius:12px;padding:14px 16px;background:#fff}
.jobs_item_head{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}
.jobs_item_title{font-weight:700;color:#1f2937;text-decoration:none;font-size:1.02rem}
.jobs_item_title:hover{text-decoration:underline}
.jobs_item_time{margin:4px 0 0;color:#6b7280;font-size:.9rem}
.jobs_results{margin:8px 0 0;padding-left:18px;display:flex;flex-direction:column;gap:4px;overflow-wrap:anywhere}
.jobs_results a{color:#1d4ed8}
.jobs_item_error{margin:8px 0 0;color:#b42318}
.jobs_empty{padding:24px;border:1px dashed #cbd5e1;border-radius:12px;text-align:center;color:#6b7280}
@media (max-width:860px){.header_jobs_link{display:none}}

/* ===== 2026-10-05 deep UX pass ===== */

/* Menu chevron drawn as a real arrow instead of a letter-like glyph. */
.nav_chevron{display:inline-block;width:7px;height:7px;margin-left:6px;border-right:2px solid currentColor;border-bottom:2px solid currentColor;transform:translateY(-3px) rotate(45deg);transition:transform .15s}
details[open] > summary .nav_chevron{transform:translateY(1px) rotate(-135deg)}

/* What the tool accepts + privacy line, directly above the upload area. */
.tool_upload_limit{margin:4px 0 2px;color:#1f2937;font-size:.98rem}
.tool_upload_limit_label{display:inline-block;margin-right:8px;padding:2px 8px;border-radius:6px;background:#eef3fb;color:#1f3a5f;font-weight:700;font-size:.85rem}
.tool_privacy_note,.catalog_privacy{margin:2px 0 14px;color:#4b5563;font-size:.9rem;line-height:1.6}
.catalog_privacy{margin-top:10px}

/* File check messages sit right under the upload area. */
.ux_file_error{display:flex;flex-direction:column;gap:4px;margin:8px 0 4px;padding:10px 12px;border:1px solid #f1b8b3;border-radius:8px;background:#fff4f3;color:#9b1c13;font-size:.92rem;line-height:1.55}
.ux_file_error[hidden]{display:none}

/* Upload progress under the submit button. */
.upload_progress{margin:10px 0 0}
.upload_progress[hidden]{display:none}
.upload_progress_bar{height:10px;border-radius:999px;background:#e5eaf2;overflow:hidden}
.upload_progress_bar span{display:block;height:100%;width:0;background:#2f6bf0;transition:width .2s}
.upload_progress_text{margin:6px 0 0;color:#1f2937;font-size:.92rem;line-height:1.55}

/* Why the submit button is disabled. */
.submit_hint{margin:8px 0 0;color:#374151;font-size:.92rem;line-height:1.55}
.submit_hint[hidden]{display:none}
.submit_hint::before{content:"";display:inline-block;width:6px;height:6px;margin:0 8px 2px 2px;border-radius:50%;background:#c27c0e;vertical-align:middle}

/* Job page: steps, waiting text, results, storage notice. */
.job_steps{display:flex;gap:6px;list-style:none;margin:14px 0 6px;padding:0;flex-wrap:wrap}
.job_steps li{flex:1 1 0;min-width:72px;padding:8px 6px;border-radius:8px;background:#f1f4f9;color:#4b5563;font-size:.86rem;text-align:center;font-weight:600}
.job_steps li.is-done{background:#e6f4ea;color:#14532d}
.job_steps li.is-current{background:#1f3a5f;color:#fff}
.job_elapsed{color:#4b5563;font-size:.9rem;margin-left:6px}
.job_wait_hint{margin:8px 0 0;color:#1f2937;line-height:1.6}
.job_leave_notice{margin:8px 0 0;padding:10px 12px;border-radius:8px;background:#f1f6ff;color:#1f3a5f;line-height:1.6}
.job_leave_notice[hidden],.job_wait_hint[hidden]{display:none}
.result_list{list-style:none;margin:8px 0 0;padding:0;display:flex;flex-direction:column;gap:8px}
.result_item{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;padding:10px 12px;border:1px solid #d8e0ea;border-radius:10px}
.result_name{font-weight:600;color:#1f2937;overflow-wrap:anywhere}
.result_size{color:#4b5563;font-weight:400}
.result_actions{display:flex;gap:8px;flex-wrap:wrap}
.result_actions .result_link{display:inline-flex;align-items:center;min-height:44px;padding:0 14px;border-radius:8px;border:1px solid #c9d3e0;color:#1f3a5f;text-decoration:none;font-weight:600}
.result_actions .result_download{background:#1f3a5f;border-color:#1f3a5f;color:#fff}
.result_saving{margin:10px 0 0;color:#14532d;font-weight:600}
.job_storage_notice{margin:16px 0 0;color:#374151;font-size:.92rem;line-height:1.65}
.jobs_results li{display:flex;gap:10px;align-items:center;flex-wrap:wrap}
.jobs_results a{display:inline-flex;align-items:center;min-height:44px}
.jobs_item_progress{margin:8px 0 0;color:#374151}

/* Home: zero results help. */
.catalog_empty p{margin:0 0 8px;color:#374151}
.catalog_empty_links a{display:inline-flex;align-items:center;min-height:44px;margin-right:10px}

/* Contrast (WCAG 4.5:1): hints that measured 2.45–4.39:1. */
.excel-drop-hint,.officepdf-drop-hint,.officepdf-options-summary,.mdpdf-empty,.mdpdf-counters dt,.imgcompress-stats dt,.imgcompress-drop-inner span{color:#4b5563!important}

/* Touch targets: at least 44x44 for everything a finger presses. */
.brand{min-width:44px;min-height:44px}
main label:has(> input[type=checkbox]),main label:has(> input[type=radio]){min-height:44px;display:flex;align-items:center;gap:8px}
main input[type=range]{min-height:44px}
main input[type=color]{min-width:44px;min-height:44px}
.imgrotate-presets button,.pdfimg-presets button,.rotate_angles button,[data-rotate-preset],[data-pdf-image-dpi-preset]{min-width:44px;min-height:44px}
button[aria-label="비밀번호 표시"],button[aria-label="비밀번호 숨기기"],[data-password-toggle]{min-width:44px;min-height:44px}
.header_jobs_link{display:inline-flex;align-items:center;min-height:44px;padding:0 6px}

/* PDF editor: 17 tools grouped by purpose; hide tools a mode cannot use (sign mode showed 16 disabled). */
.edit__dock{display:flex;flex-wrap:wrap;gap:10px}
.edit__tool_group{display:inline-flex;flex-wrap:wrap;align-items:center;gap:6px;padding:4px 8px 4px 6px;border:1px solid #dce3ed;border-radius:10px;background:#fbfcfe}
.edit__tool_group_label{font-size:.78rem;font-weight:700;color:#4b5563;margin-right:2px;white-space:nowrap}
.edit__dock .edit__tool:disabled{display:none}
.edit__tool_group:not(:has(.edit__tool:not(:disabled))){display:none}
.edit__tool[aria-pressed="true"]{background:#1f3a5f;color:#fff;border-color:#1f3a5f}
.officepdf-output-note{margin:8px 0 0;color:#374151;font-size:.92rem;line-height:1.6}
.redact-filename{margin:8px 0 0;font-weight:600;color:#1f2937}

/* Markdown panes moved from h3 to h2 (no heading skip); keep the compact pane look. */
h2.mdpdf-pane-header{font-size:.95rem;margin:0}

/* Job page: the download button lost to readability.css "#job-results a" (blue on navy, 2.1:1).
   Same id specificity here, plus hover/focus states and no external-link arrow for a download. */
#job-results .result_actions .result_download{background:#1f3a5f;border-color:#1f3a5f;color:#fff}
#job-results .result_actions .result_download:hover,
#job-results .result_actions .result_download:focus-visible{background:#152a46;border-color:#152a46;color:#fff}
#job-results .result_actions .result_download::after{content:"↓";color:#fff;margin-left:6px}
.result_saving{margin:10px 0 4px;font-weight:600;color:#1f2937}
/* The status page sat in an 800px grey slab on a white body; let the card stand on the page. */
.status_main{background:transparent}
.job_steps li[aria-current="step"]{outline:2px solid #1f3a5f;outline-offset:-2px;font-weight:700}

/* Keyboard focus on upload areas whose real file input is transparent (opacity 0): show the ring
   on the visible drop zone instead of the invisible input. */
main :has(> input[type="file"]:focus-visible){outline:3px solid #1f3a5f;outline-offset:3px}

/* Drag handles were 10-12px squares (hard to grab with a finger at 390px). Keep the small visual
   square but give it an invisible hit area: 36px with a mouse, 44px on touch screens. */
.crop_handle::before,
.redact-handle::before,
.pdf_crop_selection [data-pdf-crop-handle]::before{content:"";position:absolute;inset:-12px}
@media (pointer:coarse){
  .crop_handle::before,
  .redact-handle::before,
  .pdf_crop_selection [data-pdf-crop-handle]::before{inset:-17px}
  .redact-remove{min-width:44px;min-height:44px}
  .edit__handle{stroke:rgba(11,87,208,.35);stroke-width:16px;paint-order:stroke}
}
#job-results .result_saving{margin:12px 0 10px}
/* Converter list: the row's preview area is now a real button beside 삭제 (no nested buttons). */
.officepdf-item-select{display:flex;flex:1;min-width:0;min-height:44px;align-items:center;gap:8px;padding:0;border:0;background:transparent;color:inherit;font:inherit;text-align:left;cursor:pointer}
.officepdf-item-select:focus-visible{outline:2px solid #3b6ee0;outline-offset:2px;border-radius:6px}
.officepdf-item-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.imgrotate-pick{display:flex;flex-direction:column;align-items:flex-start;flex:1;min-width:0;min-height:44px;justify-content:center;padding:0;border:0;background:transparent;color:inherit;font:inherit;text-align:left;cursor:pointer}
.imgrotate-pick:focus-visible{outline:2px solid #3b6ee0;outline-offset:2px;border-radius:6px}
.ux-row-pick{display:flex;flex-direction:column;align-items:flex-start;justify-content:center;flex:1;min-width:0;min-height:44px;padding:0;border:0;background:transparent;color:inherit;font:inherit;text-align:left;cursor:pointer}
.ux-row-pick:focus-visible{outline:2px solid #3b6ee0;outline-offset:2px;border-radius:6px}
