.pe-main .qg-wrap { max-width: 1240px; }
.pe-app { border: 1px solid var(--cc-line); border-radius: 24px; background: var(--cc-card); box-shadow: var(--cc-shadow); overflow: clip; }
.pe-app { padding: 20px; }
.pe-drop[hidden] { display: none; }
.pe-drop { min-height: 380px; }

.pe-msg { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 18px; border: 1px solid rgba(239, 68, 68, .25); border-radius: 16px; background: rgba(239, 68, 68, .05); }
.pe-msg[hidden] { display: none; }
.pe-msg-ico { width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; border-radius: 12px; background: rgba(239, 68, 68, .12); color: #EF4444; font-size: 16px; }
.pe-msg div { display: grid; gap: 3px; min-width: 0; }
.pe-msg b { font-size: .92rem; color: var(--cc-ink); }
.pe-msg span:not(.pe-msg-ico) { font-size: .76rem; line-height: 1.5; color: var(--cc-ink-2); }
.pe-msg .qg-btn { width: auto; height: 40px; padding: 0 14px; font-size: .78rem; }

.pe-shell { position: fixed; inset: 0; z-index: 1150; display: flex; flex-direction: column; min-width: 0; background: var(--cc-card); }
html.pe-page .pm-busy { z-index: 1300; }
.pe-shell[hidden] { display: none; }

.pe-bar { position: relative; z-index: 30; flex-shrink: 0; background: var(--cc-card); }
.pe-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--cc-line); }
.pe-file { display: flex; align-items: center; gap: 10px; min-width: 0; }
.pe-file-ico { flex-shrink: 0; width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; border-radius: 10px; background: rgba(239, 68, 68, .1); color: #EF4444; font-size: 15px; }
.pe-file-t { display: grid; gap: 1px; min-width: 0; }
.pe-file-t b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .86rem; font-weight: 700; color: var(--cc-ink); }
.pe-file-t span { font-size: .7rem; color: var(--cc-ink-3); }
.pe-acts { display: flex; align-items: center; gap: 4px; flex-shrink: 0; }
.pe-sep { width: 1px; height: 22px; margin: 0 4px; background: var(--cc-line); }
.pe-ib { min-width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 0 9px; border: 0; border-radius: 10px; background: transparent; color: var(--cc-ink-2); font: 600 .76rem 'Poppins', sans-serif; cursor: pointer; transition: background .2s, color .2s, opacity .2s; -webkit-tap-highlight-color: transparent; }
.pe-ib i { font-size: 13px; }
.pe-ib:hover { background: var(--cc-teal-soft); color: var(--cc-teal); }
html:not(.cf-light) .pe-ib:hover { color: var(--cc-bright); }
.pe-ib:disabled { opacity: .35; pointer-events: none; }
.pe-ib.is-on { background: var(--cc-teal-soft); color: var(--cc-teal); }
html:not(.cf-light) .pe-ib.is-on { color: var(--cc-bright); }
.pe-zoom { display: flex; align-items: center; gap: 2px; padding: 2px; border: 1px solid var(--cc-line); border-radius: 12px; }
.pe-zoom .pe-ib { min-width: 30px; height: 30px; padding: 0; border-radius: 9px; }
.pe-zoom-t { min-width: 52px; height: 30px; padding: 0 4px; border: 0; border-radius: 8px; background: transparent; color: var(--cc-ink); font: 700 .72rem 'Poppins', sans-serif; cursor: pointer; }
.pe-zoom-t:hover { background: var(--cc-soft); }
.pe-save.qg-btn { width: auto; height: 38px; margin-left: 6px; padding: 0 16px; font-size: .8rem; }
.pe-close { margin-left: 2px; }

.pe-home[hidden] { display: none; }
.pe-home { display: grid; gap: 16px; }
.pe-home-file { display: grid; grid-template-columns: 72px minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 12px; border: 1px solid var(--cc-line); border-radius: 16px; background: var(--cc-card); }
.pe-home-th { width: 72px; height: 94px; display: flex; align-items: center; justify-content: center; overflow: hidden; border: 1px solid var(--cc-line); border-radius: 10px; background: var(--cc-soft); color: #EF4444; font-size: 22px; }
.pe-home-th img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top; }
.pe-home-t { display: grid; gap: 4px; min-width: 0; }
.pe-home-t b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .95rem; color: var(--cc-ink); }
.pe-home-t span { font-size: .74rem; color: var(--cc-ink-3); }
.pe-home-t .pe-home-chg { justify-self: start; padding: 2px 10px; border-radius: 999px; background: var(--cc-teal-soft); color: var(--cc-teal); font-size: .7rem; font-weight: 700; }
html:not(.cf-light) .pe-home-t .pe-home-chg { color: var(--cc-bright); }
.pe-home-t .pe-home-chg[hidden] { display: none; }
.pe-home-x { display: flex; align-items: center; gap: 2px; }
.pe-home-x .pm-del { grid-area: auto; }
.pe-home-cta { display: grid; justify-items: center; gap: 10px; padding: 28px 20px; border: 2px dashed rgba(6, 147, 139, .3); border-radius: 18px; background: var(--cc-teal-soft); text-align: center; }
.pe-open.qg-btn { width: auto; min-width: 240px; height: 52px; padding: 0 28px; font-size: .95rem; }
.pe-open.qg-btn i { font-size: 16px; }
.pe-home-note { max-width: 460px; margin: 0; font-size: .76rem; line-height: 1.55; color: var(--cc-ink-2); }
.pe-home-done { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 12px; padding: 14px; border: 1px solid rgba(6, 147, 139, .35); border-radius: 16px; background: var(--cc-card); scroll-margin: 120px; }
.pe-home-done[hidden] { display: none; }
.pe-home-btns { display: flex; gap: 8px; }
.pe-home-btns .qg-btn { width: auto; height: 46px; padding: 0 18px; }
.pe-home-btns .qg-btn[hidden] { display: none; }

.pe-tools { display: flex; gap: 4px; padding: 8px 12px; overflow-x: auto; border-bottom: 1px solid var(--cc-line); scrollbar-width: none; }
.pe-tools::-webkit-scrollbar { display: none; }
.pe-tool { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px; border: 1px solid transparent; border-radius: 11px; background: transparent; color: var(--cc-ink-2); font: 600 .78rem 'Poppins', sans-serif; white-space: nowrap; cursor: pointer; transition: background .2s, color .2s, border-color .2s; -webkit-tap-highlight-color: transparent; }
.pe-tool i { font-size: 14px; }
.pe-tool:hover { background: var(--cc-soft); color: var(--cc-ink); }
.pe-tool.is-on { border-color: rgba(6, 147, 139, .35); background: var(--cc-teal-soft); color: var(--cc-teal); }
html:not(.cf-light) .pe-tool.is-on { color: var(--cc-bright); }

.pe-ctx { position: relative; display: flex; align-items: center; gap: 8px; min-height: 54px; padding: 8px 14px; border-bottom: 1px solid var(--cc-line); background: var(--cc-soft); }
.pe-ctx-p { display: none; align-items: center; gap: 8px; flex-wrap: wrap; min-width: 0; flex: 1 1 auto; }
.pe-ctx-p.is-on { display: flex; }
.pe-ectl { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-width: 0; }
.pe-ectl[hidden], .pe-hint[hidden] { display: none; }
.pe-hint { display: inline-flex; align-items: center; gap: 8px; font-size: .76rem; font-weight: 500; color: var(--cc-ink-3); }
.pe-hint i { color: var(--cc-teal); font-size: 12px; }
html:not(.cf-light) .pe-hint i { color: var(--cc-bright); }
.pe-hint-sm { font-size: .7rem; }
.pe-delobj { margin-left: auto; }
.pe-delobj[hidden] { display: none; }

.pe-sel { height: 36px; max-width: 200px; padding: 0 30px 0 12px; border: 1px solid var(--cc-line); border-radius: 10px; outline: 0; background: var(--cc-card) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%2364748B' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 11px center; color: var(--cc-ink); font: 600 .78rem 'Poppins', sans-serif; cursor: pointer; -webkit-appearance: none; appearance: none; }
.pe-sel:focus { border-color: var(--cc-teal); box-shadow: 0 0 0 3px rgba(6, 147, 139, .15); }
.pe-num { display: inline-flex; align-items: center; height: 36px; border: 1px solid var(--cc-line); border-radius: 10px; background: var(--cc-card); overflow: hidden; }
.pe-num button { width: 30px; height: 100%; border: 0; background: transparent; color: var(--cc-ink-2); font-size: 10px; cursor: pointer; transition: background .2s, color .2s; }
.pe-num button:hover { background: var(--cc-teal-soft); color: var(--cc-teal); }
.pe-num input { width: 46px; height: 100%; padding: 0; border: 0; border-left: 1px solid var(--cc-line); border-right: 1px solid var(--cc-line); outline: 0; background: transparent; color: var(--cc-ink); font: 700 .78rem 'Poppins', sans-serif; text-align: center; -moz-appearance: textfield; appearance: textfield; }
.pe-num input::-webkit-outer-spin-button, .pe-num input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.pe-seg { display: inline-flex; gap: 2px; padding: 3px; border: 1px solid var(--cc-line); border-radius: 11px; background: var(--cc-card); }
.pe-seg button { min-width: 30px; height: 28px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 0 9px; border: 0; border-radius: 8px; background: transparent; color: var(--cc-ink-3); font: 600 .74rem 'Poppins', sans-serif; white-space: nowrap; cursor: pointer; transition: background .2s, color .2s; }
.pe-seg button i { font-size: 12px; }
.pe-seg button:hover { color: var(--cc-ink); }
.pe-seg button.is-on { background: var(--cc-teal-soft); color: var(--cc-teal); box-shadow: inset 0 0 0 1px rgba(6, 147, 139, .3); }
html:not(.cf-light) .pe-seg button.is-on { color: var(--cc-bright); }
.pe-seg button:disabled { opacity: .35; pointer-events: none; }
.pe-sws { display: inline-flex; align-items: center; gap: 6px; }
.pe-sw { width: 24px; height: 24px; padding: 0; border: 2px solid var(--cc-card); border-radius: 50%; background: var(--sw); box-shadow: 0 0 0 1px var(--cc-line); cursor: pointer; transition: box-shadow .2s, transform .2s; }
.pe-sw:hover { transform: scale(1.08); }
.pe-sw.is-on { box-shadow: 0 0 0 2px var(--cc-teal); }
.pe-color { position: relative; display: inline-flex; width: 26px; height: 26px; flex-shrink: 0; border-radius: 50%; background: conic-gradient(#EF4444, #F59E0B, #22C55E, #06B6D4, #6366F1, #EC4899, #EF4444); box-shadow: 0 0 0 1px var(--cc-line); cursor: pointer; }
.pe-color input { position: absolute; inset: 0; width: 100%; height: 100%; padding: 0; border: 0; opacity: 0; cursor: pointer; }
.pe-color span { position: absolute; inset: 7px; border-radius: 50%; background: var(--cc-card); }
.pe-cbtn { display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 13px; border: 1px solid var(--cc-line); border-radius: 999px; background: var(--cc-card); color: var(--cc-ink-2); font: 600 .74rem 'Poppins', sans-serif; white-space: nowrap; cursor: pointer; transition: background .2s, color .2s, border-color .2s; }
.pe-cbtn i { font-size: 12px; }
.pe-cbtn:hover { border-color: rgba(6, 147, 139, .45); background: var(--cc-teal-soft); color: var(--cc-teal); }
.pe-cbtn.is-main { border-color: var(--cc-teal); background: var(--cc-teal); color: #fff; }
.pe-cbtn.is-main:hover { border-color: var(--cc-teal-h); background: var(--cc-teal-h); color: #fff; }
.pe-cbtn.is-red { color: #DC2626; }
.pe-cbtn.is-red:hover { border-color: rgba(239, 68, 68, .4); background: rgba(239, 68, 68, .08); color: #DC2626; }
html:not(.cf-light) .pe-cbtn.is-red { color: #F87171; }
.pe-range { display: inline-flex; align-items: center; gap: 8px; font-size: .72rem; font-weight: 600; color: var(--cc-ink-3); }
.pe-range input { width: 96px; accent-color: var(--cc-teal); }
.pe-range b { min-width: 22px; padding: 1px 7px; border-radius: 999px; background: var(--cc-teal-soft); color: var(--cc-teal); font-size: .68rem; text-align: center; }
.pe-check { display: inline-flex; align-items: center; gap: 6px; font-size: .74rem; font-weight: 600; color: var(--cc-ink-2); cursor: pointer; }
.pe-check input { width: 16px; height: 16px; margin: 0; accent-color: var(--cc-teal); }
.pe-check input:disabled + span { opacity: .4; }
.pe-etext { display: none; }
.pe-fchip { display: inline-flex; align-items: center; gap: 7px; max-width: 360px; height: 34px; padding: 0 12px; border-radius: 999px; background: var(--cc-teal-soft); color: var(--cc-teal); font-size: .74rem; font-weight: 600; overflow: hidden; }
html:not(.cf-light) .pe-fchip { color: var(--cc-bright); }
.pe-fchip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pe-fchip small { flex-shrink: 0; padding-left: 7px; border-left: 1px solid rgba(6, 147, 139, .3); font-size: .66rem; font-weight: 600; opacity: .85; white-space: nowrap; }
.pe-fchip.is-warn { background: rgba(217, 119, 6, .12); color: #B45309; }
.pe-fchip.is-warn small { border-left-color: rgba(217, 119, 6, .35); }
html:not(.cf-light) .pe-fchip.is-warn { color: #FBBF24; }

.pe-find { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-bottom: 1px solid var(--cc-line); }
.pe-find[hidden] { display: none; }
.pe-find-in { position: relative; display: flex; align-items: center; flex: 1 1 0; min-width: 0; max-width: 340px; }
.pe-find-in > i { position: absolute; left: 12px; font-size: 12px; color: var(--cc-ink-3); pointer-events: none; transition: color .2s; }
.pe-find-in:focus-within > i { color: var(--cc-teal); }
.pe-find-in input { width: 100%; height: 38px; padding: 0 12px 0 34px; border: 1px solid var(--cc-line); border-radius: 10px; outline: 0; background: var(--cc-soft); color: var(--cc-ink); font: 500 .82rem 'Poppins', sans-serif; transition: border-color .2s, box-shadow .2s, background .2s; }
.pe-find-in input::placeholder { color: var(--cc-ink-3); font-weight: 400; opacity: .85; }
.pe-find-in input#peFindIn { padding-right: 58px; }
.pe-find-in input:focus { border-color: var(--cc-teal); background: var(--cc-card); box-shadow: 0 0 0 3px rgba(6, 147, 139, .15); }
.pe-find-in b { position: absolute; right: 8px; min-width: 22px; padding: 2px 7px; border-radius: 999px; background: var(--cc-teal-soft); color: var(--cc-teal); font-size: .66rem; font-weight: 700; text-align: center; }
.pe-find-in b:empty { display: none; }
html:not(.cf-light) .pe-find-in b { color: var(--cc-bright); }
.pe-find-nav { display: flex; align-items: center; gap: 2px; flex-shrink: 0; padding: 2px; border: 1px solid var(--cc-line); border-radius: 10px; }
.pe-find-nav .pe-ib { min-width: 30px; height: 32px; padding: 0; border-radius: 8px; }
.pe-case { position: relative; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; height: 38px; min-width: 42px; padding: 0 10px; border: 1px solid var(--cc-line); border-radius: 10px; background: var(--cc-card); color: var(--cc-ink-3); font: 700 .78rem 'Poppins', sans-serif; cursor: pointer; transition: background .2s, color .2s, border-color .2s; }
.pe-case input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.pe-case:hover { color: var(--cc-ink); }
.pe-case:has(input:checked) { border-color: rgba(6, 147, 139, .4); background: var(--cc-teal-soft); color: var(--cc-teal); }
.pe-case:has(input:focus-visible) { box-shadow: 0 0 0 3px rgba(6, 147, 139, .2); }
html:not(.cf-light) .pe-case:has(input:checked) { color: var(--cc-bright); }
.pe-find-sep { flex-shrink: 0; width: 1px; height: 24px; margin: 0 2px; background: var(--cc-line); }
.pe-find .pe-cbtn { flex-shrink: 0; height: 38px; border-radius: 10px; }
.pe-find-x { flex-shrink: 0; margin-left: auto; }

.pe-view { position: relative; flex: 1 1 auto; height: auto; min-height: 0; overflow: auto; background: #E9EEF2; overscroll-behavior: contain; scrollbar-width: thin; }
html:not(.cf-light) .pe-view { background: #0B0F14; }
.pe-pages { display: flex; flex-direction: column; align-items: center; gap: 22px; width: max-content; min-width: 100%; padding: 24px; }
.pe-pg { position: relative; flex-shrink: 0; background: #fff; border-radius: 3px; box-shadow: 0 1px 3px rgba(15, 23, 42, .12), 0 10px 30px -18px rgba(15, 23, 42, .35); }
.pe-pg > canvas { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: 3px; }
.pe-pg-n { position: absolute; right: -4px; bottom: -20px; font-size: .64rem; font-weight: 700; color: var(--cc-ink-3); }
.pe-pg-spin { position: absolute; top: 12px; right: 12px; width: 22px; height: 22px; opacity: 0; transition: opacity .2s; pointer-events: none; }
.pe-pg.is-loading .pe-pg-spin { opacity: 1; }
.pe-layer { position: absolute; inset: 0; touch-action: pan-x pan-y pinch-zoom; }
.pe-marks { position: absolute; inset: 0; pointer-events: none; }
.pe-app[data-tool="edit"] .pe-layer { cursor: text; }
.pe-app[data-tool="text"] .pe-layer { cursor: crosshair; }
.pe-app[data-tool="draw"] .pe-layer, .pe-app[data-tool="shape"] .pe-layer, .pe-app[data-tool="white"] .pe-layer, .pe-app[data-tool="highlight"] .pe-layer { cursor: crosshair; touch-action: none; }
.pe-app[data-tool="highlight"] .pe-layer { cursor: text; }
.pe-app[data-tool="draw"] .pe-obj, .pe-app[data-tool="shape"] .pe-obj, .pe-app[data-tool="white"] .pe-obj, .pe-app[data-tool="highlight"] .pe-obj { pointer-events: none; }

.pe-hover { position: absolute; border: 1.5px dashed var(--cc-teal); border-radius: 4px; background: rgba(6, 147, 139, .06); pointer-events: none; }
.pe-hover.is-no { border-color: #EF4444; background: rgba(239, 68, 68, .05); }
.pe-mark { position: absolute; border-radius: 2px; background: rgba(250, 204, 21, .5); mix-blend-mode: multiply; }
.pe-mark.is-cur { background: rgba(249, 115, 22, .55); box-shadow: 0 0 0 2px #F97316; }

.pe-tedit, .pe-pending { position: absolute; z-index: 6; display: block; }
.pe-rich { display: block; width: max-content; min-width: 20px; padding: 0 3px; border-radius: 3px; outline: 0; background: #fff; line-height: 1.2; white-space: pre; cursor: text; }
.pe-tedit .pe-rich { box-shadow: 0 0 0 2px var(--cc-teal), 0 0 0 5px rgba(6, 147, 139, .18); }
.pe-pending .pe-rich { cursor: default; }
.pe-tedit textarea, .pe-pending textarea { display: block; min-width: 20px; margin: 0; padding: 0 3px; border: 0; border-radius: 3px; outline: 0; background: #fff; line-height: 1.2; white-space: pre; overflow: hidden; resize: none; }
.pe-tedit textarea { box-shadow: 0 0 0 2px var(--cc-teal), 0 0 0 5px rgba(6, 147, 139, .18); }
.pe-pending { pointer-events: none; }

.pe-obj { position: absolute; z-index: 4; touch-action: none; }
.pe-obj svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.pe-obj.is-sel { outline: 1.5px dashed var(--cc-teal); outline-offset: 3px; }
.pe-o-hl { mix-blend-mode: multiply; }
.pe-o-image img { display: block; width: 100%; height: 100%; object-fit: fill; pointer-events: none; user-select: none; }
.pe-o-image, .pe-o-white, .pe-o-shape, .pe-o-draw, .pe-o-hl { cursor: move; }
.pe-o-text { cursor: move; }
.pe-txt { min-width: 6px; padding: 0; outline: 0; line-height: 1.25; white-space: pre; cursor: text; caret-color: var(--cc-teal); }
.pe-txt:empty::before { content: 'Type here'; color: #94A3B8; }
.pe-grip { position: absolute; top: -30px; left: -4px; width: 24px; height: 24px; display: none; align-items: center; justify-content: center; border-radius: 7px; background: var(--cc-teal); color: #fff; font-size: 10px; cursor: move; }
.pe-obj.is-sel .pe-grip { display: flex; }
.pe-hdl { position: absolute; right: -7px; bottom: -7px; width: 14px; height: 14px; display: none; align-items: center; justify-content: center; border: 2px solid #fff; border-radius: 50%; background: var(--cc-teal); color: #fff; box-shadow: 0 0 0 1px rgba(15, 23, 42, .15); cursor: nwse-resize; touch-action: none; }
.pe-hdl.pe-hdl-x, .pe-imgbox .pe-hdl { right: -11px; bottom: -11px; width: 22px; height: 22px; border-radius: 7px; font-size: 9px; }
.pe-hdl i { transform: rotate(90deg); pointer-events: none; }
.pe-o-text .pe-hdl { cursor: ns-resize; }
.pe-o-shape .pe-hdl { right: auto; bottom: auto; transform: translate(-50%, -50%); }
.pe-o-shape .pe-hdl.pe-hdl-x { right: -11px; bottom: -11px; left: auto !important; top: auto !important; transform: none; }
.pe-obj.is-sel .pe-hdl, .pe-imgbox.is-sel .pe-hdl { display: flex; }
.pe-imgbox { position: absolute; z-index: 3; border: 1.5px dashed rgba(6, 147, 139, .7); border-radius: 2px; background: rgba(6, 147, 139, .04); cursor: pointer; transition: background .2s; }
.pe-imgbox:hover { background: rgba(6, 147, 139, .12); }
.pe-imgbox.is-sel { border: 2px solid var(--cc-teal); background-color: rgba(6, 147, 139, .14); cursor: move; }
.pe-imgbox.is-drag { background-size: 100% 100%; background-repeat: no-repeat; opacity: .9; }

.pe-status { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 14px; border-top: 1px solid var(--cc-line); font-size: .7rem; font-weight: 600; color: var(--cc-ink-3); }
.pe-status-r { display: inline-flex; align-items: center; gap: 6px; }
.pe-status-r i { color: var(--cc-teal); }


.pe-page .qg-toast { max-width: min(560px, calc(100vw - 32px)); border-radius: 18px; }
.pe-page .qg-toast-text { white-space: normal; line-height: 1.45; font-size: .8rem; }
.pe-page .qg-toast.is-warn .qg-toast-ico { background: #D97706; }
.pe-page .qg-toast-text.pm-tt { display: flex; min-width: 0; overflow: hidden; white-space: nowrap; }
.pe-page .pm-tt-pre, .pe-page .pm-tt-ext { flex-shrink: 0; white-space: pre; }
.pe-page .pm-tt-stem { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

@media (max-width: 900px) {
    .pe-top { flex-wrap: wrap; }
    .pe-file { flex: 1 1 100%; }
    .pe-acts { flex: 1 1 100%; overflow-x: auto; scrollbar-width: none; }
    .pe-acts::-webkit-scrollbar { display: none; }
    .pe-save.qg-btn { margin-left: auto; }
}
@media (max-width: 760px) {
    .pe-app { padding: 14px; }
    .pe-home-file { grid-template-columns: 56px minmax(0, 1fr) auto; gap: 10px; padding: 10px; }
    .pe-home-th { width: 56px; height: 74px; }
    .pe-home-x .pm-hbtn span { display: none; }
    .pe-home-cta { padding: 22px 14px; }
    .pe-open.qg-btn { width: 100%; min-width: 0; }
    .pe-home-done { grid-template-columns: 1fr; }
    .pe-home-btns .qg-btn { flex: 1 1 0; }
    .pe-home-done .pm-name-in input { font-size: 16px; }
    .pe-save.qg-btn span { display: none; }
    .pe-save.qg-btn { width: 40px; padding: 0; }
    .pe-top { padding: 10px 12px; }
    .pe-find-btn span { display: none; }
    .pe-sep { display: none; }
    .pe-acts { gap: 3px; }
    .pe-ib { min-width: 34px; height: 34px; padding: 0 8px; }
    .pe-zoom-t { min-width: 44px; }
    .pe-save.qg-btn { height: 36px; padding: 0 12px; }
    .pe-ectl { flex-wrap: wrap; width: 100%; }
    .pe-etext { display: block; flex: 1 1 100%; width: 100%; height: auto; min-height: 88px; padding: 9px 12px; resize: vertical; line-height: 1.4; border: 1px solid var(--cc-teal); border-radius: 11px; outline: 0; background: var(--cc-card); color: var(--cc-ink); font: 500 16px 'Poppins', sans-serif; box-shadow: 0 0 0 3px rgba(6, 147, 139, .15); }
    .pe-tools { gap: 2px; padding: 6px 8px; }
    .pe-tool { flex-direction: column; justify-content: center; gap: 3px; height: 52px; min-width: 64px; padding: 0 8px; font-size: .64rem; }
    .pe-tool i { font-size: 15px; }
    .pe-ctx { min-height: 52px; padding: 8px 12px; overflow-x: auto; scrollbar-width: none; }
    .pe-ctx::-webkit-scrollbar { display: none; }
    .pe-ctx-p { flex-wrap: nowrap; }
    .pe-ctx-p > * , .pe-ectl > * { flex-shrink: 0; }
    .pe-ctx-p[data-ctx="edit"].is-on { flex-wrap: wrap; }
    .pe-ctx:has(#peECtl:not([hidden])) { overflow: visible; }
    .pe-fchip { max-width: 240px; }
    .pe-delobj { position: sticky; right: 0; }
    .pe-hint { white-space: nowrap; }
    .pe-find-in input, .pe-num input, .pe-sel { font-size: 16px; }
    .pe-num input { width: 52px; }
    .pe-find { flex-wrap: wrap; gap: 6px; padding: 8px 12px; }
    .pe-find-in { flex: 1 1 0; max-width: none; }
    .pe-find-sep { flex-basis: 100%; width: auto; height: 0; margin: 0; background: none; }
    .pe-find .pe-cbtn { padding: 0 10px; }
    .pe-find-x { margin-left: 0; }
    .pe-find-in input { height: 40px; }
    .pe-pages { gap: 16px; padding: 12px 8px 28px; }
    .pe-status-r { display: none; }
    .pe-msg { grid-template-columns: 40px minmax(0, 1fr); }
    .pe-msg .qg-btn { grid-column: 1 / -1; width: 100%; }
            }

.pe-pv { position: fixed; inset: 0; z-index: 1250; display: flex; align-items: center; justify-content: center; padding: 20px; background: rgba(15, 23, 42, .6); }
.pe-pv[hidden] { display: none; }
.pe-pv-card { display: flex; flex-direction: column; width: 100%; max-width: 980px; height: 100%; max-height: 100%; overflow: hidden; border-radius: 20px; background: var(--cc-card); }
.pe-pv-h { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--cc-line); }
.pe-pv-t { display: grid; gap: 1px; min-width: 0; margin-right: auto; }
.pe-pv-t b { font-size: .92rem; color: var(--cc-ink); }
.pe-pv-t span { font-size: .7rem; color: var(--cc-ink-3); }
.pe-pv-body { flex: 1 1 auto; display: flex; flex-direction: column; align-items: center; gap: 18px; padding: 18px 16px 28px; overflow-y: auto; background: #E9EEF2; overscroll-behavior: contain; }
html:not(.cf-light) .pe-pv-body { background: #0B0F14; }
.pe-pv-pg { position: relative; flex-shrink: 0; max-width: 100%; background: #fff; border-radius: 3px; box-shadow: 0 1px 3px rgba(15, 23, 42, .12), 0 10px 30px -18px rgba(15, 23, 42, .35); }
.pe-pv-pg canvas { display: block; width: 100%; height: 100%; border-radius: 3px; }
@media (max-width: 760px) {
    .pe-pv { padding: 0; }
    .pe-pv-card { border-radius: 0; }
    .pe-pv-body { padding: 12px 8px 24px; }
    .pe-home-btns { flex-wrap: wrap; }
    .pe-home-btns #peDl { flex: 1 1 100%; order: -1; }
}
.pe-ctx:not(:has(.pe-ctx-p.is-on > :not(.pe-hint):not([hidden]))):not(:has(#peDelObj:not([hidden]))) { min-height: 0; padding-top: 7px; padding-bottom: 7px; }