.qg-app.pc-app, .pm-app.pc-app { grid-template-columns: minmax(0, 1fr); }
.pc-app .pm-work { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.pc-page .pm-drop { min-height: 250px; padding: 22px; }
.pc-up-ico { display: block; width: 26px; height: 26px; background: currentColor; -webkit-mask: url('/tools/assets/icons/svg/compare-file.svg') center / contain no-repeat; mask: url('/tools/assets/icons/svg/compare-file.svg') center / contain no-repeat; }
.pc-app:not(.is-empty) .pc-drop { display: none; }

.pc-files { position: relative; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.pc-files[hidden] { display: none; }
.pc-slot { min-width: 0; }
.pc-badge { flex-shrink: 0; width: 24px; height: 24px; display: inline-flex; align-items: center; justify-content: center; border-radius: 7px; font: 800 .72rem 'Poppins', sans-serif; }
.pc-badge.is-a { background: rgba(239, 68, 68, .12); color: #DC2626; }
.pc-badge.is-b { background: rgba(22, 163, 74, .12); color: #16A34A; }
html:not(.cf-light) .pc-badge.is-a { color: #F87171; }
html:not(.cf-light) .pc-badge.is-b { color: #4ADE80; }
.pc-add { width: 100%; height: 100%; min-height: 84px; display: flex; align-items: center; justify-content: center; gap: 12px; padding: 14px 16px; border: 2px dashed var(--cc-line); border-radius: 14px; background: var(--cc-soft); color: var(--cc-ink); text-align: left; cursor: pointer; transition: border-color .2s, background .2s; }
.pc-add:hover, .pc-add.is-over { border-color: var(--cc-teal); background: var(--cc-teal-soft); }
.pc-add[hidden] { display: none; }
.pc-add-ico { flex-shrink: 0; width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; border-radius: 12px; background: var(--cc-teal-soft); color: var(--cc-teal); font-size: 15px; }
html:not(.cf-light) .pc-add-ico { color: var(--cc-bright); }
.pc-add-t { display: grid; gap: 2px; min-width: 0; }
.pc-add-t b { font-size: .86rem; }
.pc-add-t small { font-size: .72rem; color: var(--cc-ink-3); }
.pc-card { display: grid; grid-template-columns: auto 34px minmax(0, 1fr) auto; align-items: center; gap: 12px; min-height: 84px; padding: 12px 14px; border: 1px solid var(--cc-line); border-radius: 14px; background: var(--cc-card); }
.pc-card[hidden] { display: none; }
.pc-th { width: 34px; height: 46px; display: flex; align-items: center; justify-content: center; color: #EF4444; font-size: 20px; }
.pc-th img { max-width: 100%; max-height: 100%; display: block; background: #fff; }
.pc-meta { display: grid; gap: 3px; min-width: 0; }
.pc-meta b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .84rem; color: var(--cc-ink); }
.pc-meta span { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: .72rem; color: var(--cc-ink-3); }
.pc-acts { display: flex; align-items: center; gap: 2px; }
.pc-pw { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.pc-pw[hidden] { display: none; }
.pc-pw-in { display: flex; align-items: center; min-width: 0; height: 40px; padding: 0 12px; border: 1px solid var(--cc-line); border-radius: 11px; background: var(--cc-soft); }
.pc-pw-in:focus-within { border-color: var(--cc-teal); background: var(--cc-card); box-shadow: 0 0 0 3px rgba(6, 147, 139, .15); }
.pc-pw-in.is-bad { border-color: #EF4444; }
.pc-pw-in i { margin-right: 8px; font-size: 12px; color: var(--cc-ink-3); }
.pc-pw-in input { flex: 1 1 auto; min-width: 0; height: 100%; padding: 0; border: 0; outline: 0; background: transparent; color: var(--cc-ink); font: 500 .84rem 'Poppins', sans-serif; }
.pc-pw .qg-btn { width: auto; height: 40px; padding: 0 14px; }
.pc-pw-err { grid-column: 1 / -1; margin: 0; font-size: .72rem; font-weight: 600; color: #EF4444; }
.pc-pw-err[hidden] { display: none; }
.pc-swap { position: absolute; top: 50%; left: 50%; z-index: 2; width: 34px; height: 34px; display: flex; align-items: center; justify-content: center; padding: 0; border: 1px solid var(--cc-line); border-radius: 50%; background: var(--cc-card); color: var(--cc-ink-2); font-size: 12px; cursor: pointer; transform: translate(-50%, -50%); transition: border-color .2s, color .2s, background .2s; }
.pc-swap:hover { border-color: var(--cc-teal); background: var(--cc-teal-soft); color: var(--cc-teal); }
.pc-swap:disabled { display: none; }
.pc-note { justify-content: center; margin: 0; }

.pc-view { position: relative; display: flex; flex-direction: column; height: min(78vh, 820px); min-height: 480px; overflow: hidden; border: 1px solid var(--cc-line); border-radius: 16px; background: var(--cc-card); }
.pc-view[hidden] { display: none; }
.pc-view.is-full { position: fixed; inset: 0; z-index: 1150; height: auto; min-height: 0; border: 0; border-radius: 0; }
html.pc-lock-scroll, html.pc-lock-scroll body { overflow: hidden; }
.pc-top { flex-shrink: 0; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 10px; border-bottom: 1px solid var(--cc-line); background: var(--cc-card); }
.pc-nav { display: flex; align-items: center; gap: 2px; padding: 2px; border: 1px solid var(--cc-line); border-radius: 12px; }
.pc-tacts { display: flex; align-items: center; gap: 6px; }
.pc-ib { min-width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 0 9px; border: 0; border-radius: 9px; background: transparent; color: var(--cc-ink-2); font: 600 .74rem 'Poppins', sans-serif; white-space: nowrap; cursor: pointer; transition: background .2s, color .2s, opacity .2s; -webkit-tap-highlight-color: transparent; }
.pc-ib i { font-size: 12px; }
.pc-ib:hover { background: var(--cc-teal-soft); color: var(--cc-teal); }
.pc-ib:disabled { opacity: .35; pointer-events: none; }
.pc-ib.is-on { background: var(--cc-teal-soft); color: var(--cc-teal); }
html:not(.cf-light) .pc-ib:hover, html:not(.cf-light) .pc-ib.is-on { color: var(--cc-bright); }
.pc-nav .pc-ib { height: 32px; }
.pc-chg-t { display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 12px; border: 0; border-radius: 9px; background: var(--cc-soft); color: var(--cc-ink); font: 700 .74rem 'Poppins', sans-serif; white-space: nowrap; cursor: pointer; font-variant-numeric: tabular-nums; transition: background .2s, color .2s; }
.pc-chg-t i { font-size: 11px; color: var(--cc-ink-3); }
.pc-chg-t:hover, .pc-chg-t[aria-expanded="true"] { background: var(--cc-teal-soft); color: var(--cc-teal); }
.pc-chg-t:hover i, .pc-chg-t[aria-expanded="true"] i { color: inherit; }
.pc-chg-t:disabled { cursor: default; color: var(--cc-ink-3); background: var(--cc-soft); }
.pc-tog { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 10px 0 12px; border: 1px solid var(--cc-line); border-radius: 12px; background: transparent; color: var(--cc-ink-2); font: 600 .74rem 'Poppins', sans-serif; white-space: nowrap; cursor: pointer; transition: border-color .2s, background .2s, color .2s; -webkit-tap-highlight-color: transparent; }
.pc-tog i { font-size: 12px; }
.pc-sync-ico { flex-shrink: 0; width: 16px; height: 16px; background: currentColor; -webkit-mask: url('/tools/assets/icons/svg/scroll-sync.svg') center / contain no-repeat; mask: url('/tools/assets/icons/svg/scroll-sync.svg') center / contain no-repeat; transition: background .2s; }
.pc-tog:not(.is-on) .pc-sync-ico { background: var(--cc-ink-3); }
.pc-tog:hover { border-color: rgba(6, 147, 139, .5); }
.pc-sw { position: relative; width: 30px; height: 18px; border-radius: 999px; background: var(--cc-line); transition: background .2s; }
.pc-sw::after { content: ''; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(15, 23, 42, .25); transition: transform .2s; }
.pc-tog.is-on { border-color: rgba(6, 147, 139, .45); background: var(--cc-teal-soft); color: var(--cc-teal); }
html:not(.cf-light) .pc-tog.is-on { color: var(--cc-bright); }
.pc-tog.is-on .pc-sw { background: var(--cc-teal); }
.pc-tog.is-on .pc-sw::after { transform: translateX(12px); }
.pc-zoom { display: flex; align-items: center; gap: 2px; padding: 2px; border: 1px solid var(--cc-line); border-radius: 12px; }
.pc-zoom .pc-ib { min-width: 30px; height: 30px; padding: 0; }
.pc-zoom-t { min-width: 50px; height: 30px; padding: 0 4px; border: 0; border-radius: 8px; background: transparent; color: var(--cc-ink); font: 700 .72rem 'Poppins', sans-serif; cursor: pointer; }
.pc-zoom-t:hover { background: var(--cc-soft); }
.pc-seg { display: flex; align-items: center; gap: 2px; padding: 2px; border: 1px solid var(--cc-line); border-radius: 12px; }
.pc-seg button { height: 30px; min-width: 32px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 0 10px; border: 0; border-radius: 9px; background: transparent; color: var(--cc-ink-3); font: 600 .72rem 'Poppins', sans-serif; white-space: nowrap; cursor: pointer; transition: background .2s, color .2s; }
.pc-seg button i { font-size: 12px; }
.pc-seg button:hover { color: var(--cc-ink); }
.pc-seg button.is-on { background: var(--cc-teal-soft); color: var(--cc-teal); }
html:not(.cf-light) .pc-seg button.is-on { color: var(--cc-bright); }
.pc-tog:disabled { opacity: .4; pointer-events: none; }
.pc-rep { border: 1px solid var(--cc-line); height: 36px; border-radius: 12px; }
.pc-ovbar { flex-shrink: 0; display: flex; align-items: center; gap: 10px; padding: 7px 12px; border-bottom: 1px solid var(--cc-line); background: var(--cc-card); }
.pc-ovbar[hidden] { display: none; }
.pc-ovk { flex-shrink: 0; display: inline-flex; align-items: center; gap: 6px; font-size: .72rem; font-weight: 600; color: var(--cc-ink-2); }
.pc-ovk .pc-badge { width: 20px; height: 20px; font-size: .64rem; }
.pc-ovbar input[type="range"] { flex: 1 1 auto; min-width: 60px; max-width: 420px; accent-color: var(--cc-teal); cursor: pointer; }
.pc-ovbar input[type="range"]:disabled { opacity: .35; cursor: default; }
.pc-diff { height: 32px; margin-left: auto; }
.pc-view.is-ov .pc-col.is-b { display: none; }
.pc-leg-ov { display: none !important; }
.pc-view.is-ov .pc-leg-ov { display: inline-flex !important; margin-left: 10px; }
.pc-view.is-ov .pc-body { grid-template-columns: minmax(0, 1fr); }
.pc-ov { display: none; position: absolute; inset: 0; z-index: 2; pointer-events: none; opacity: var(--ov, .5); }
.pc-view.is-ov .pc-ov { display: block; }
.pc-ovbox { position: absolute; background: #fff; }
.pc-ovbox canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.pc-ovbox .pc-hl { z-index: 2; }
.pc-view.is-diff .pc-ov { opacity: 1; mix-blend-mode: difference; }
.pc-view.is-diff .pc-hl { display: none; }
.pc-full { border: 1px solid var(--cc-line); height: 36px; border-radius: 12px; }
.pc-full.is-on { border-color: rgba(6, 147, 139, .45); }
.pc-full-m { display: none; }

.pc-pnote { flex-shrink: 0; display: flex; align-items: center; gap: 10px; padding: 6px 8px 6px 14px; border-bottom: 1px solid rgba(245, 158, 11, .3); background: rgba(245, 158, 11, .1); color: #B45309; font-size: .74rem; }
.pc-pnote[hidden] { display: none; }
html:not(.cf-light) .pc-pnote { color: #FBBF24; }
.pc-pnote > i { font-size: 13px; }
.pc-pnote > span { flex: 1; min-width: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.pc-pnote b { font-weight: 700; }
.pc-pnote span span { opacity: .8; }
.pc-pnote .pc-ib { min-width: 28px; height: 28px; padding: 0; color: inherit; }
.pc-body { position: relative; flex: 1; min-height: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: var(--cc-line); }
.pc-col { display: flex; flex-direction: column; min-width: 0; min-height: 0; background: var(--cc-soft); }
.pc-col-h { flex-shrink: 0; display: flex; align-items: center; gap: 8px; min-width: 0; padding: 7px 12px; border-bottom: 1px solid var(--cc-line); background: var(--cc-card); }
.pc-col-h .pc-badge { width: 22px; height: 22px; font-size: .68rem; }
.pc-col-n { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .76rem; color: var(--cc-ink); }
.pc-col-p { flex-shrink: 0; font-size: .7rem; color: var(--cc-ink-3); white-space: nowrap; }
.pc-leg { flex-shrink: 0; display: inline-flex; align-items: center; gap: 6px; margin-left: auto; font-size: .68rem; font-weight: 600; color: var(--cc-ink-2); white-space: nowrap; }
.pc-leg i { width: 12px; height: 12px; border: 1.5px solid; border-radius: 4px; }
.pc-leg.is-del i { border-color: #EF4444; background: rgba(239, 68, 68, .18); }
.pc-leg.is-ins i { border-color: #22C55E; background: rgba(34, 197, 94, .18); }
.pc-scroll { position: relative; flex: 1; min-height: 0; overflow: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.pc-pages { display: grid; justify-content: center; gap: 14px; padding: 16px; min-width: min-content; }
.pc-pg { position: relative; overflow: hidden; background: #fff; box-shadow: 0 1px 3px rgba(15, 23, 42, .12), 0 6px 18px rgba(15, 23, 42, .08); }
.pc-pg canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.pc-pg::before { content: ''; position: absolute; top: 50%; left: 50%; width: 22px; height: 22px; margin: -11px 0 0 -11px; border: 2px solid rgba(100, 116, 139, .25); border-top-color: var(--cc-teal); border-radius: 50%; animation: pmSpin .8s linear infinite; }
.pc-pg.is-ld::before { display: none; }
.pc-pg-n { position: absolute; right: 6px; bottom: 6px; z-index: 3; padding: 2px 7px; border-radius: 6px; background: rgba(15, 23, 42, .6); color: #fff; font: 600 .62rem 'Poppins', sans-serif; pointer-events: none; }
.pc-hl { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.pc-view:not(.is-hl) .pc-hl { display: none; }
.pc-hl i { position: absolute; margin: -1px; padding: 1px; border-radius: 3px; mix-blend-mode: multiply; }
.pc-hl i.is-del { background: rgba(239, 68, 68, .2); box-shadow: inset 0 0 0 1px rgba(239, 68, 68, .8); }
.pc-hl i.is-ins { background: rgba(34, 197, 94, .2); box-shadow: inset 0 0 0 1px rgba(22, 163, 74, .8); }
.pc-hl i.is-cur { z-index: 2; mix-blend-mode: normal; background: rgba(245, 158, 11, .32); box-shadow: inset 0 0 0 2px #F59E0B, 0 0 0 3px rgba(245, 158, 11, .25); animation: pcPulse 1.1s ease-out 2; }
.pc-anchor { position: absolute; z-index: 2; width: 3px; margin-left: 1px; border-radius: 2px; background: #F59E0B; box-shadow: 0 0 0 3px rgba(245, 158, 11, .25); animation: pcPulse 1.1s ease-out 2; }
@keyframes pcPulse { 0% { outline: 0 solid rgba(245, 158, 11, .6); } 60% { outline: 8px solid rgba(245, 158, 11, 0); } 100% { outline: 0 solid rgba(245, 158, 11, 0); } }

.pc-list { position: absolute; top: 0; right: 0; bottom: 0; z-index: 6; width: 340px; max-width: 100%; display: flex; flex-direction: column; border-left: 1px solid var(--cc-line); background: var(--cc-card); box-shadow: -14px 0 30px rgba(15, 23, 42, .14); }
.pc-list[hidden] { display: none; }
.pc-list-h { flex-shrink: 0; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 8px 8px 14px; border-bottom: 1px solid var(--cc-line); }
.pc-list-h b { font-size: .82rem; color: var(--cc-ink); }
.pc-list-g { flex: 1; min-height: 0; overflow-y: auto; padding: 8px; overscroll-behavior: contain; scrollbar-width: thin; }
.pc-li { width: 100%; display: grid; gap: 5px; margin-bottom: 6px; padding: 10px 12px; border: 1px solid var(--cc-line); border-radius: 12px; background: var(--cc-card); color: var(--cc-ink); text-align: left; cursor: pointer; transition: border-color .2s, background .2s; }
.pc-li:hover { border-color: rgba(6, 147, 139, .5); }
.pc-li.is-on { border-color: var(--cc-teal); background: var(--cc-teal-soft); }
.pc-li-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: .68rem; font-weight: 700; color: var(--cc-ink-3); }
.pc-li-h b { color: var(--cc-ink); }
.pc-li-t { display: block; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; padding: 3px 7px; border-radius: 6px; font-size: .74rem; line-height: 1.45; word-break: break-word; }
.pc-li-t.is-del { background: rgba(239, 68, 68, .1); color: #B91C1C; text-decoration: line-through; text-decoration-color: rgba(185, 28, 28, .45); }
.pc-li-t.is-ins { background: rgba(34, 197, 94, .12); color: #15803D; }
html:not(.cf-light) .pc-li-t.is-del { color: #FCA5A5; }
html:not(.cf-light) .pc-li-t.is-ins { color: #86EFAC; }

.pc-page .qg-toast { z-index: 1200; }

@media (max-width: 1100px) {
    .pc-tog-l, .pc-lbl { display: none; }
    .pc-tog { padding: 0 8px 0 10px; }
    .pc-full { padding: 0; width: 36px; }
}
@media (max-width: 760px) {
    .pc-page .pm-drop { min-height: 200px; padding: 18px 14px; }
    .pc-files { grid-template-columns: minmax(0, 1fr); gap: 10px; }
    .pc-swap { top: 50%; left: auto; right: 14px; transform: translateY(-50%) rotate(90deg); }
    .pc-add, .pc-card { min-height: 72px; }
    .pc-pw-in input { font-size: 16px; }
    .pc-view { height: 74vh; min-height: 420px; border-radius: 14px; }
    .pc-top { padding: 7px 8px; gap: 6px; }
    .pc-nav { flex: 1 1 0; min-width: 0; }
    .pc-full-m { display: inline-flex; flex-shrink: 0; }
    .pc-tacts > .pc-full { display: none; }
    .pc-tacts > #pcSync { order: 1; }
    .pc-tacts > .pc-seg { order: 2; }
    .pc-tacts > #pcHl { order: 3; }
    .pc-tacts > .pc-rep { order: 4; }
    .pc-tacts > .pc-zoom { order: 5; }
    .pc-chg-t { flex: 1 1 auto; justify-content: center; }
    .pc-tacts { flex: 1 1 100%; flex-wrap: wrap; justify-content: space-between; gap: 4px; }
    .pc-seg button { min-width: 30px; padding: 0; }
    .pc-rep, .pc-full { width: 34px; min-width: 34px; height: 34px; padding: 0; }
    #pcHl { min-width: 34px; padding: 0; }
    .pc-tog { height: 34px; gap: 6px; padding: 0 6px 0 8px; }
    .pc-sw { width: 28px; height: 16px; }
    .pc-sw::after { width: 12px; height: 12px; }
    .pc-tog.is-on .pc-sw::after { transform: translateX(12px); }
    .pc-ovbar { gap: 8px; padding: 6px 8px; }
    .pc-lbl2 { display: none; }
    .pc-diff .pc-tog-l { font-size: .68rem; }
    .pc-view:not(.is-full) .pc-zoom { display: none; }
    .pc-tog .pc-tog-l { display: inline; font-size: .72rem; }
    .pc-pnote { padding-left: 10px; font-size: .7rem; }
    .pc-col-h { gap: 6px; padding: 6px 8px; }
    .pc-col-n, .pc-col-p { display: none; }
    .pc-leg { margin-left: 0; font-size: .62rem; }
    .pc-pages { gap: 8px; padding: 8px; }
    .pc-pg-n { right: 3px; bottom: 3px; padding: 1px 5px; font-size: .56rem; }
    .pc-list { left: 0; width: auto; box-shadow: none; }
}