/* 글자수 세기 page. Shared tool frame lives in /static/toolkit.css. */

.ct-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; margin: 20px 0 0; background: var(--ink); border: 1px solid var(--ink); }
.ct-stat { min-width: 0; padding: 16px; background: var(--paper); }
.ct-stat dt { font-size: 13px; }
.ct-stat dd { display: flex; align-items: baseline; gap: 4px; margin: 6px 0 0; }
.ct-stat output { font-size: clamp(26px, 3vw, 36px); font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.ct-stat span { font-size: 13px; }

.ct-drop { display: grid; justify-items: center; gap: 12px; padding: 34px 20px; border: 1px dashed var(--line-strong); background: var(--paper); text-align: center; transition: background .15s ease; }
.ct-drop.is-dragover { background: var(--lime); border-style: solid; }
.ct-drop p { margin: 0; }
.ct-drop input:focus-visible + .ct-pick { outline: 2px solid var(--blue); outline-offset: 4px; }
.ct-file-name { font-weight: 700; overflow-wrap: anywhere; }

.ct-options { margin-top: 18px; border: 1px solid var(--line-strong); background: var(--paper); }
.ct-options summary { padding: 14px 16px; cursor: pointer; font-weight: 700; }
.ct-fieldset { margin: 0; padding: 4px 16px 18px; border: 0; }
.ct-fieldset legend { padding: 0; margin-bottom: 10px; font-size: 14px; font-weight: 700; }
.ct-check-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px 14px; }
.ct-check { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; margin-right: 16px; }
.ct-check-grid .ct-check { margin-right: 0; }
.ct-check input { width: 18px; height: 18px; accent-color: var(--ink); }

.ct-actions { margin-top: 18px; }
.ct-actions .button:disabled { cursor: default; opacity: .5; }
.ct-actions .button:disabled:hover { background: transparent; color: inherit; }

.ct-progress { margin-top: 18px; }
.ct-progress progress { width: 100%; height: 10px; accent-color: var(--ink); }
.ct-progress p { margin: 8px 0 0; font-size: 14px; }

.ct-error { margin: 18px 0 0; padding: 14px 16px; border: 1px solid var(--ink); background: color-mix(in srgb, var(--acid) 22%, var(--paper)); line-height: 1.6; }

.ct-results { margin-top: 22px; }
.ct-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: var(--ink); border: 1px solid var(--ink); }
.ct-summary-item { display: grid; align-content: start; gap: 6px; min-width: 0; padding: 16px; background: var(--paper); }
.ct-summary-item > span:first-child { font-size: 13px; }
.ct-summary-item strong { font-size: clamp(26px, 3vw, 36px); line-height: 1.1; font-variant-numeric: tabular-nums; }
.ct-summary-total { background: var(--lime); }
.ct-badge { justify-self: start; display: inline-block; padding: 3px 10px; border: 1px solid var(--ink); border-radius: var(--radius-pill); background: var(--paper); font-size: 12px; font-weight: 700; }
.ct-partial { margin: 14px 0 0; padding: 12px 16px; border-left: 4px solid var(--acid); background: var(--paper); line-height: 1.6; }
.ct-detail-title { margin: 28px 0 12px; font-size: 20px; }
.ct-details { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.ct-detail { min-width: 0; padding: 16px; border: 1px solid var(--line-strong); background: var(--paper); }
.ct-detail-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 12px; margin-bottom: 10px; }
.ct-detail-head h4 { flex: 1 1 auto; min-width: 0; margin: 0; font-size: 16px; overflow-wrap: anywhere; }
.ct-detail-head strong { font-size: 20px; font-variant-numeric: tabular-nums; }
.ct-detail-row { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border-top: 1px solid var(--line); font-size: 14px; }
.ct-detail-note { margin: 8px 0 0; font-size: 13px; line-height: 1.6; }
.ct-ocr-preview { margin-top: 10px; font-size: 14px; }
.ct-ocr-preview summary { cursor: pointer; }
.ct-ocr-preview p { max-height: 220px; margin: 8px 0 0; padding: 10px; overflow: auto; background: var(--paper-deep); line-height: 1.6; white-space: pre-wrap; }

@media (max-width: 760px) {
  .ct-stats, .ct-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ct-check-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ct-details { grid-template-columns: minmax(0, 1fr); }
  .ct-drop { padding: 26px 14px; }
}
