@keyframes pdp-kc-pulse-ring {
    0% { transform: scale(0.92); opacity: 0.55; }
    70% { transform: scale(1.12); opacity: 0; }
    100% { transform: scale(1.12); opacity: 0; }
}
@keyframes pdp-kc-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}
@keyframes pdp-kc-shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}
.pdp-kc-pulse-ring { animation: pdp-kc-pulse-ring 1.8s cubic-bezier(0.215, 0.61, 0.355, 1) infinite; }
.pdp-kc-float { animation: pdp-kc-float 2.4s ease-in-out infinite; }
.pdp-kc-progress-fill {
    background: linear-gradient(90deg, #ff8a3d, #D95745, #ffb347, #D95745);
    background-size: 200% 100%;
    animation: pdp-kc-shimmer 1.6s linear infinite;
    transition: width 0.45s ease;
}
.pdp-kc-stage.is-active { color: #D95745; font-weight: 800; }
.pdp-kc-stage.is-done { color: #16a34a; }
#pdpKcPreviewModal .pdp-kc-modal-shell {
    max-width: 36rem;
    max-height: min(94vh, 100dvh);
}
#pdpKcEditorSquare {
    width: min(100%, min(70vw, 36vh, 340px));
    max-width: 100%;
    max-height: min(42vh, 340px);
    aspect-ratio: 1 / 1;
    margin: 0 auto;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
    border-radius: 12px;
    background:
        linear-gradient(45deg, #eee 25%, transparent 25%),
        linear-gradient(-45deg, #eee 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, #eee 75%),
        linear-gradient(-45deg, transparent 75%, #eee 75%);
    background-size: 20px 20px;
    background-position: 0 0, 0 10px, 10px -10px, -10px 0;
    background-color: #fafafa;
}
.pdp-kc-rembg-busy {
    position: absolute;
    inset: 0;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(15, 23, 42, 0.45);
    border-radius: 12px;
}
.pdp-kc-rembg-busy-card {
    background: #fff;
    color: #111827;
    font-size: 13px;
    font-weight: 700;
    padding: 0.7rem 1.1rem;
    border-radius: 999px;
    box-shadow: 0 8px 24px rgba(0,0,0,.18);
}
#pdpKcEditorSquare canvas {
    display: block;
    max-width: 100% !important;
    max-height: 100% !important;
    width: 100% !important;
    height: auto !important;
}
#pdpKcStepResultImgWrap {
    width: min(100%, 360px);
    max-width: 100%;
    aspect-ratio: 1 / 1;
    max-height: min(42vh, 360px);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
#pdpKcResultImg,
#pdpKcResultCanvas {
    max-width: 100% !important;
    max-height: 100% !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain;
}
#pdpKcResultCanvas {
    display: none;
    border-radius: 0.75rem;
    box-shadow: 0 10px 15px -3px rgba(0,0,0,.1), 0 4px 6px -4px rgba(0,0,0,.1);
    border: 1px solid #f3f4f6;
    touch-action: none;
    cursor: grab;
}
.pdp-kc-edit-scroll {
    overflow-y: auto;
    overscroll-behavior: contain;
    max-height: calc(min(94vh, 100dvh) - 7.5rem);
}
.pdp-kc-tool-btn {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 2px; min-width: 3.4rem; padding: .45rem .35rem;
    border: 1px solid #e5e7eb; border-radius: .75rem; background: #fff;
    font-size: 10px; font-weight: 700; color: #374151; cursor: pointer;
}
.pdp-kc-tool-btn.is-active, .pdp-kc-tool-btn:hover { border-color: #D95745; background: #fff7ed; color: #D95745; }
.pdp-kc-tool-btn:disabled { opacity: .45; cursor: not-allowed; }
.pdp-kc-mode-card {
    border: 2px solid #e5e7eb; border-radius: 1rem; padding: 1.1rem 1rem;
    text-align: left; cursor: pointer; background: #fff; width: 100%;
    transition: border-color .15s, box-shadow .15s, background .15s;
}
.pdp-kc-mode-card:hover { border-color: #ffb347; background: #fffaf5; }
.pdp-kc-mode-card.is-primary {
    border-color: #D95745; background: linear-gradient(180deg, #fff7ed 0%, #fff 70%);
    box-shadow: 0 6px 18px rgba(217, 87, 69,.18);
}
.pdp-kc-mode-card.is-primary:hover { box-shadow: 0 8px 22px rgba(217, 87, 69,.24); }
.pdp-kc-panel {
    display: none; margin-top: .5rem; padding: .65rem; border: 1px solid #e5e7eb;
    border-radius: .85rem; background: #fff; max-height: 11rem; overflow: auto;
}
.pdp-kc-panel.is-open { display: block; }
.pdp-kc-chip {
    border: 1px solid #e5e7eb; border-radius: 999px; padding: .25rem .7rem;
    font-size: 11px; background: #fff; cursor: pointer;
}
.pdp-kc-chip.is-on { border-color: #D95745; background: #fff7ed; color: #D95745; font-weight: 700; }
.pdp-kc-color {
    width: 1.5rem; height: 1.5rem; border-radius: 999px; border: 2px solid #fff;
    box-shadow: 0 0 0 1px #d1d5db; cursor: pointer;
}
.pdp-kc-color.is-on { box-shadow: 0 0 0 2px #D95745; }
#pdpKcMethodOverlay {
    position: absolute; inset: 0; z-index: 30;
    background: rgba(17,24,39,.55); backdrop-filter: blur(2px);
    display: none; align-items: center; justify-content: center; padding: 1rem;
}
#pdpKcMethodOverlay.is-open { display: flex; }
