.pd-drop { border: 2px dashed var(--line); border-radius: 14px; padding: 22px 16px; text-align: center; }
.pd-drop.drag { border-color: var(--accent); background: var(--bg); }
.pd-drop-t { margin: 0 0 12px; font-weight: 700; }
.pd-adds { justify-content: center; gap: 8px; margin-bottom: 10px; }
.pd-drop p:last-of-type { margin: 0; }
.pd-msg { margin: 10px 0 0; min-height: 20px; font-size: 14px; color: var(--ok); text-align: center; }
.pd-msg.bad { color: var(--bad); }
.pd-msg:empty { display: none; }
.pd-bar { display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; align-items: center; position: sticky; top: 0; z-index: 20; }
.pd-bar-l, .pd-bar-r { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.pd-bar .btn { padding: 8px 12px; font-size: 14px; }
.pd-bar .btn:disabled { opacity: .45; cursor: default; }
.pd-bar #s-count { margin-right: 6px; }
.pd-sep { width: 1px; height: 20px; background: var(--line); margin: 0 4px; }
.pd-danger { color: var(--bad); }
#i-name { width: 170px; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); color: var(--text); font: inherit; font-size: 14px; }
.pd-hint { margin: 10px 2px; }
.pd-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin-bottom: 16px; }
.pd-card { position: relative; border: 2px solid var(--line); border-radius: 12px; background: var(--surface); padding: 8px; cursor: pointer; user-select: none; -webkit-user-select: none; }
.pd-card.sel { border-color: var(--accent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 25%, transparent); }
.pd-card.dragging { opacity: .4; }
.pd-card.over-l::before, .pd-card.over-r::before { content: ''; position: absolute; top: 0; bottom: 0; width: 4px; border-radius: 2px; background: var(--accent); }
.pd-card.over-l::before { left: -9px; }
.pd-card.over-r::before { right: -9px; }
.pd-thumb { display: flex; align-items: center; justify-content: center; aspect-ratio: 1 / 1.3; background: var(--bg); border-radius: 6px; overflow: hidden; }
.pd-thumb img { max-width: 100%; max-height: 100%; display: block; box-shadow: 0 1px 4px #0003; background: #fff; -webkit-user-drag: none; pointer-events: none; }
.pd-meta { display: flex; align-items: center; gap: 2px; margin-top: 6px; }
.pd-no { flex: 1; font-weight: 700; font-size: 13px; color: var(--muted); padding-left: 2px; }
.pd-card.sel .pd-no { color: var(--accent); }
.pd-meta button { width: 24px; height: 26px; padding: 0; border: 0; border-radius: 6px; background: none; color: var(--text); font-size: 14px; line-height: 1; cursor: pointer; }
.pd-meta button:hover { background: var(--bg); }
.pd-badge { position: absolute; top: 12px; right: 12px; font-size: 11px; padding: 1px 6px; border-radius: 99px; background: var(--accent); color: var(--accent-ink); }

.pd-ed { scroll-margin-top: 8px; }
.pd-ed-top { display: flex; flex-wrap: wrap; gap: 8px; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.pd-tools { display: flex; flex-wrap: wrap; gap: 3px; padding: 4px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); }
.pd-tools button { height: 32px; padding: 0 12px; border: 0; border-radius: 7px; background: none; color: var(--text); font: inherit; font-size: 14px; cursor: pointer; }
.pd-tools button.on { background: var(--accent); color: var(--accent-ink); font-weight: 700; }
.pd-opts { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.pd-opts .btn { padding: 7px 12px; font-size: 14px; }
.pd-colors { display: flex; gap: 5px; }
.pd-colors button { width: 24px; height: 24px; padding: 0; border-radius: 50%; border: 2px solid var(--surface); box-shadow: 0 0 0 1px var(--line); cursor: pointer; }
.pd-colors button.on { box-shadow: 0 0 0 2px var(--text); }
.pd-size { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.pd-size input { width: 110px; accent-color: var(--accent); }
.pd-stage-w { background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 12px; overflow: auto; text-align: center; }
.pd-stage { position: relative; display: inline-block; line-height: 0; box-shadow: 0 2px 10px #0003; background: #fff; }
.pd-stage canvas { display: block; }
#cv-ov { position: absolute; left: 0; top: 0; touch-action: pan-y pinch-zoom; }
#cv-ov[data-t=draw], #cv-ov[data-t=hl] { touch-action: none; cursor: crosshair; }
#cv-ov[data-t=text] { cursor: text; }
.pd-ta { position: absolute; z-index: 3; min-width: 60px; margin: 0; padding: 0; border: 1px dashed #1a73e8; outline: 0; background: #ffffffcc; resize: none; overflow: hidden; line-height: 1.3; white-space: pre; font-family: "Malgun Gothic", "Apple SD Gothic Neo", "Noto Sans KR", sans-serif; transform-origin: 0 0; }
.pd-ed-foot { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: center; margin-top: 12px; }
.pd-ed-foot .btn-primary { margin-left: 12px; }

.pd-dlg { width: min(560px, calc(100vw - 24px)); border: 1px solid var(--line); border-radius: 14px; padding: 18px; background: var(--surface); color: var(--text); }
.pd-dlg::backdrop { background: #0008; }
.pd-dlg h2 { margin: 0 0 6px; font-size: 18px; }
#cv-sign { width: 100%; height: auto; border: 1px solid var(--line); border-radius: 10px; background: #fff; touch-action: none; cursor: crosshair; }
.pd-dlg-b { gap: 8px; margin-top: 10px; }
.pd-grow { flex: 1; }
.pd-info h2 { font-size: 17px; margin: 0 0 10px; }
.pd-info ul { margin: 6px 0 0; padding-left: 20px; }
.pd-info li { margin: 4px 0; }
.pd-faq details { border-top: 1px solid var(--line); padding: 10px 0; }
.pd-faq details:first-of-type { border-top: 0; }
.pd-faq summary { cursor: pointer; font-weight: 700; }
.pd-faq p { margin: 8px 0 0; color: var(--muted); }
.pd-oss ul { margin: 6px 0 0; padding-left: 20px; }
@media (max-width: 560px) {
  .pd-grid { grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); gap: 8px; }
  .pd-bar { position: static; }
  #i-name { width: 100%; }
  .pd-bar-r { width: 100%; }
  .pd-stage-w { padding: 6px; }
}
