@import url("/image-converter/styles.css?v=1");
/* PDF kit: Merge, Split, Rotate, Unlock PDF */
[hidden] { display: none !important; }
.pk-drop { min-height: 120px; justify-content: center; }
.pk-drop .big { font-size: 15px; font-weight: 700; color: var(--text); }
.pk-drop .btn { pointer-events: none; }
.pk-files { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 6px; }
.pk-file { display: grid; grid-template-columns: 12px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--panel-2); font-size: 13px; }
.pk-file > i { width: 12px; height: 12px; border-radius: 3px; }
.pk-file .name { font-weight: 600; overflow-wrap: anywhere; }
.pk-file .meta { color: var(--muted); font-size: 12px; }
.pk-file .meta.lock { color: var(--warn); }
.pk-file .meta.err { color: var(--bad); }
.pk-file .meta.ok { color: var(--good); }
.pk-file .side { display: flex; gap: 4px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.pk-icon { background: transparent; border: 1px solid var(--border); color: var(--text); border-radius: 6px; min-width: 34px; min-height: 34px; font: inherit; font-size: 15px; cursor: pointer; padding: 0 8px; }
.pk-icon:hover { border-color: var(--accent-dim); color: var(--accent); }
.pk-icon:disabled { opacity: .35; cursor: default; }

/* toolbar */
.pk-bar { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 10px; }
.pk-bar .sep { width: 1px; height: 24px; background: var(--border); margin: 0 4px; }
.pk-bar .btn.sm { min-height: 36px; }
.pk-bar .count { font-size: 12px; color: var(--muted); margin-left: auto; }
.pk-bar select.sel { width: auto; min-height: 36px; padding: 6px 8px; }
.pk-sticky { position: sticky; top: 0; z-index: 4; background: var(--panel); padding: 8px 0; margin-top: -8px; }

/* board */
.pk-board { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 14px 12px; user-select: none; -webkit-user-select: none; min-height: 60px; }
.pk-card { position: relative; border: 1px solid var(--border); border-radius: 10px; background: var(--panel-2); padding: 8px 8px 6px; outline: none; touch-action: manipulation; -webkit-touch-callout: none; cursor: grab; }
.pk-card:focus-visible { box-shadow: 0 0 0 3px rgba(149, 214, 0, .55); }
.pk-card.sel { border-color: var(--accent); background: rgba(149, 214, 0, .07); }
.pk-card.dragging { opacity: .35; }
.pk-card[data-part] { box-shadow: inset 0 -4px 0 var(--part); }
.pk-card[data-part]::before { content: attr(data-part); position: absolute; top: -9px; left: 8px; z-index: 2; font-size: 11px; font-weight: 700; color: #10130a; background: var(--part); border-radius: 999px; padding: 0 7px; line-height: 18px; }
.pk-card.cut-after::after { content: ""; position: absolute; top: 4px; bottom: 4px; right: -8px; width: 3px; border-radius: 2px; background: var(--accent); }
.pk-thumb { position: relative; aspect-ratio: 1; display: flex; align-items: center; justify-content: center; overflow: hidden; border-radius: 6px; background: #1b1d24; }
.pk-thumb img { display: block; max-width: 100%; max-height: 100%; transform: rotate(var(--turn, 0deg)); transition: transform .18s; box-shadow: 0 1px 4px rgba(0, 0, 0, .5); pointer-events: none; }
.pk-thumb img:not([src]) { width: 70%; height: 90%; background: #2a2d36; }
.pk-thumb.broken::after { content: "?"; color: var(--muted); }
.pk-check { position: absolute; top: 4px; right: 4px; width: 22px; height: 22px; border-radius: 50%; background: var(--accent); color: #10130a; font-weight: 800; font-size: 13px; display: none; align-items: center; justify-content: center; }
.pk-card.sel .pk-check { display: flex; }
.pk-cap { display: flex; align-items: baseline; gap: 6px; margin-top: 6px; font-size: 12px; min-height: 18px; }
.pk-num { font-size: 13px; }
.pk-src { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pk-src.dot::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 2px; background: var(--c); margin-right: 4px; }
.pk-acts { display: flex; gap: 4px; margin-top: 6px; }
.pk-act { flex: 1; min-height: 32px; background: transparent; border: 1px solid var(--border); border-radius: 6px; color: var(--text); font: inherit; font-size: 15px; cursor: pointer; padding: 0; }
.pk-act:hover { border-color: var(--accent-dim); color: var(--accent); }
.pk-act.pk-del:hover { border-color: var(--bad); color: var(--bad); }
.pk-cut { position: absolute; right: -20px; top: 38%; z-index: 3; width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--border); background: var(--panel); color: var(--muted); cursor: pointer; font-size: 13px; padding: 0; }
.pk-cut:hover, .pk-cut[aria-pressed="true"] { color: #10130a; background: var(--accent); border-color: var(--accent); }
.pk-group { grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 650; padding-top: 6px; overflow-wrap: anywhere; }
.pk-group i { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.pk-ghost { position: fixed; left: 0; top: 0; z-index: 50; pointer-events: none; opacity: .9; box-shadow: 0 10px 30px rgba(0, 0, 0, .55); border-color: var(--accent); cursor: grabbing; }
.pk-count { position: absolute; top: -10px; right: -10px; background: var(--accent-2); color: #fff; border-radius: 999px; font-size: 12px; font-weight: 700; padding: 1px 8px; }
.pk-dropline { position: fixed; z-index: 49; width: 3px; border-radius: 2px; background: var(--accent); display: none; pointer-events: none; }
.pk-board.is-dragging .pk-card { cursor: grabbing; }
.pk-empty { color: var(--muted); font-size: 13px; text-align: center; padding: 18px 0; }

/* options and results */
.pk-opts { display: grid; gap: 12px; }
.pk-opts .row > .lbl { margin: 0; }
.pk-field { display: grid; gap: 6px; }
.pk-field .in, .pk-field .sel { max-width: 340px; }
.pk-inline { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.pk-inline .in.num { width: 96px; }
.pk-plan { font-size: 13px; color: var(--muted); min-height: 20px; overflow-wrap: anywhere; }
.pk-plan.err { color: var(--warn); }
.pk-results { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 8px; }
.pk-res { display: flex; gap: 12px; align-items: center; justify-content: space-between; padding: 10px 12px; border: 1px solid #2c4a1f; border-radius: 8px; background: var(--panel-2); }
.pk-res.bad { border-color: #4a2626; }
.pk-res-main { display: grid; gap: 2px; min-width: 0; }
.pk-res-name { font-weight: 600; overflow-wrap: anywhere; font-size: 13px; }
.pk-ok { color: var(--good); }
.pk-bad { color: var(--bad); }
.pk-prog { height: 4px; background: var(--border); border-radius: 2px; overflow: hidden; margin-top: 8px; }
.pk-prog i { display: block; height: 100%; width: 0; background: var(--accent); transition: width .2s; }
.statusline.err { color: var(--bad); }
.statusline.ok { color: var(--good); }
.pk-hint { font-size: 12px; color: var(--muted); margin: 0; }
.pk-tip { display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; border-radius: 50%; border: 1px solid var(--border); color: var(--muted); font-size: 11px; cursor: help; margin-left: 4px; vertical-align: 1px; }

/* unlock list */
.pk-pwrow { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.pk-pwrow .in { flex: 1 1 200px; max-width: 360px; }
.pk-file .pw { display: flex; gap: 6px; margin-top: 6px; }
.pk-file .pw .in { padding: 6px 8px; }

/* password dialog */
.pk-dlg { background: var(--panel); color: var(--text); border: 1px solid var(--border); border-radius: 12px; padding: 20px; width: min(420px, calc(100vw - 32px)); }
.pk-dlg::backdrop { background: rgba(0, 0, 0, .6); }
.pk-dlg form { display: grid; gap: 10px; }
.pk-dlg-title { margin: 0; font-size: 15px; overflow-wrap: anywhere; }
.pk-dlg-lock { margin: 0; }
.pk-dlg-msg { margin: 0; color: var(--warn); font-size: 13px; min-height: 18px; }

@media (max-width: 520px) {
  .pk-board { grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 12px 10px; }
  .pk-card { padding: 6px 6px 5px; }
  .pk-act { min-height: 34px; }
  .pk-cut { right: -17px; width: 26px; height: 26px; }
  .pk-file { grid-template-columns: 10px minmax(0, 1fr) auto; gap: 8px; }
  .pk-file .side { gap: 3px; }
}

/* mix two files */
.pk-mix > summary { list-style: none; display: inline-flex; align-items: center; }
.pk-mix > summary::-webkit-details-marker { display: none; }
.pk-mix[open] { flex-basis: 100%; order: 99; }
.pk-mixbox { display: grid; gap: 6px; max-width: 360px; margin-top: 8px; padding: 12px; background: var(--panel-2); border: 1px solid var(--border); border-radius: 10px; }
.pk-mixbox .lbl { margin: 4px 0 0; }
@media (min-width: 900px) { .pk-sticky { position: sticky; } }
@media (max-width: 899px) { .pk-sticky { position: static; margin-top: 0; padding-top: 0; } }
.pk-board:not(.pk-cutting) .pk-cut { display: none; }
.pk-zip { list-style: none; }
.pk-file.pk-one { grid-template-columns: minmax(0, 1fr); }
.pk-file.pk-two { grid-template-columns: minmax(0, 1fr) auto; }
.pk-act, .pk-icon, .pk-cut, .pk-bar .btn { display: inline-flex; align-items: center; justify-content: center; gap: 4px; }
.pk-act svg { width: 17px; height: 17px; }
.pk-cut svg { width: 15px; height: 15px; }
.pk-bar .btn svg { width: 15px; height: 15px; }
.pk-icon[disabled] { pointer-events: none; }
