/* ==== pdf common css: start ==== */
.pc-prog { margin: 14px 0; }
.pc-bar { height: 8px; background: var(--line); border-radius: 99px; overflow: hidden; }
.pc-bar i { display: block; height: 100%; width: 0; background: var(--brand); transition: width .2s; }
.pc-prog span { display: block; margin-top: 6px; font-size: 14px; color: var(--muted); overflow-wrap: anywhere; }
.pc-thumb { background: #fff; border: 1px solid var(--line); border-radius: 8px; display: grid; place-items: center; overflow: hidden; position: relative; }
.pc-thumb .pc-cv { display: block; max-width: 100%; max-height: 100%; object-fit: contain; }
.pc-thumb img.pc-cv { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; border-radius: 0; }
.pc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 10px; margin-top: 12px; }
.pc-file { display: flex; align-items: center; gap: 10px; background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 8px 10px; margin-bottom: 6px; }
.pc-fi { font-size: 26px; }
.pc-fn { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.pc-fn b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pc-fn small { color: var(--muted); }
.pc-file .btn { padding: 8px 12px; min-height: 40px; font-size: 14px; flex: none; }
.pc-ib { font: inherit; font-size: 16px; min-width: 40px; min-height: 40px; border: 1px solid var(--line); background: var(--card); color: var(--ink); border-radius: 10px; cursor: pointer; padding: 0 6px; }
.pc-ib:hover { border-color: var(--brand); color: var(--brand); }
.pc-dragging { opacity: .45; }
.pc-over { outline: 2px dashed var(--brand); outline-offset: 2px; }
.pc-check { display: flex; align-items: center; gap: 10px; margin: 10px 0; font-weight: 600; font-size: 15px; cursor: pointer; }
.pc-check input { flex: none; }
.pc-note { font-size: 14px; color: var(--muted); margin: 6px 0; }
/* ==== pdf common css: end ==== */

.sg-layout { display: grid; grid-template-columns: minmax(0, 340px) minmax(0, 1fr); gap: 16px; align-items: start; margin-top: 10px; }
@media (max-width: 820px) { .sg-layout { grid-template-columns: minmax(0, 1fr); } }
.sg-side { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.sg-h { font-weight: 800; margin-bottom: 8px; }
.sg-h small { font-weight: 400; color: var(--muted); }
.sg-pane { margin-top: 10px; }
.sg-pad { display: block; width: 100%; height: 170px; background: #fff; border: 2px dashed var(--line); border-radius: 12px; touch-action: none; cursor: crosshair; }
.sg-padbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; margin-top: 8px; }
.sg-small { padding: 6px 12px; min-height: 38px; font-size: 14px; }
.sg-fonts { display: grid; gap: 6px; }
.sg-font { font-size: 26px; background: #fff; border: 2px solid var(--line); border-radius: 10px; padding: 6px 12px; text-align: left; cursor: pointer; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; min-height: 52px; }
.sg-font.on { border-color: var(--brand); box-shadow: 0 0 0 2px var(--brand-soft); }
.sg-upprev { margin-top: 8px; background: repeating-conic-gradient(#ddd 0 25%, #fff 0 50%) 50% / 14px 14px; border-radius: 10px; text-align: center; }
.sg-upprev:empty { display: none; }
.sg-upprev canvas { max-height: 120px; max-width: 100%; display: inline-block; }
#sg-add { width: 100%; margin-top: 6px; }
.sg-inline { display: flex; gap: 8px; margin-top: 8px; }
.sg-inline input, .sg-inline select { flex: 1; min-width: 0; }
.sg-inline .btn { flex: none; padding: 8px 14px; }
.sg-view { min-width: 0; }
.sg-nav { display: flex; align-items: center; justify-content: center; gap: 10px; margin-bottom: 8px; }
.sg-nav select { width: auto; min-height: 40px; padding: 4px 8px; }
.sg-stage { position: relative; width: 100%; background: #fff; box-shadow: 0 0 0 1px var(--line), var(--shadow); border-radius: 4px; overflow: hidden; touch-action: pan-y; }
.sg-stage canvas { display: block; width: 100%; height: 100%; }
.sg-layer { position: absolute; inset: 0; }
.sg-mark { position: absolute; outline: 1px dashed rgba(79, 70, 229, .7); cursor: move; touch-action: none; user-select: none; }
.sg-mark.sel { outline: 2px solid var(--brand); }
.sg-mark img { display: block; width: 100%; height: 100%; pointer-events: none; }
.sg-x { position: absolute; top: -14px; right: -14px; width: 28px; height: 28px; border-radius: 50%; border: 0; background: var(--bad); color: #fff; font-size: 14px; cursor: pointer; display: grid; place-items: center; padding: 0; }
.sg-rs { position: absolute; right: -11px; bottom: -11px; width: 22px; height: 22px; border-radius: 50%; background: var(--brand); border: 3px solid #fff; cursor: nwse-resize; box-shadow: 0 1px 3px rgba(0,0,0,.3); }
.sg-mark:not(.sel) .sg-x, .sg-mark:not(.sel) .sg-rs { opacity: .75; }
