
.phk-wrap {
    --phk-accent: #111827;
    --phk-border: #e5e7eb;
    --phk-muted: #6b7280;
    --phk-tag-color: #151515;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(360px, 1fr);
    gap: clamp(28px, 5vw, 70px);
    max-width: 1180px;
    margin: 40px auto;
    padding: clamp(18px, 3vw, 38px);
    background: #fff;
    border: 1px solid var(--phk-border);
    border-radius: 24px;
    box-shadow: 0 18px 50px rgba(0,0,0,.07);
    box-sizing: border-box;
}

.phk-wrap *,
.phk-wrap *::before,
.phk-wrap *::after {
    box-sizing: border-box;
}

.phk-preview-panel {
    min-width: 0;
}

.phk-preview-card {
    position: sticky;
    top: 24px;
    padding: clamp(20px, 3vw, 36px);
    border-radius: 20px;
    background:
        radial-gradient(circle at top left, rgba(255,255,255,.95), rgba(245,247,250,.95)),
        #f5f7fa;
    border: 1px solid #eef0f3;
}

.phk-preview-heading {
    margin-bottom: 18px;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--phk-muted);
}

.phk-tag-stage {
    display: grid;
    place-items: center;
    min-height: 430px;
}

.phk-product {
    position: relative;
    display: inline-block;
    max-width: 100%;
    line-height: 0;
    filter: drop-shadow(0 18px 18px rgba(0,0,0,.18));
}

.phk-product img {
    display: block;
    width: 100%;
    height: auto;
}

.phk-product-bone { width: min(100%, 520px); }
.phk-product-heart { width: min(62%, 310px); }

.phk-live-text {
    position: absolute;
    left: 50%;
    top: 56%;
    z-index: 2;
    width: 72%;
    transform: translate(-50%, -50%);
    color: #f5f5f5;
    font-family: Montserrat, sans-serif;
    font-size: clamp(28px, 5vw, 64px);
    font-weight: 600;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
    cursor: grab;
    user-select: none;
    touch-action: none;
    outline: none;
    text-shadow: 0 1px 1px rgba(0,0,0,.28);
}

.phk-live-text:active,
.phk-live-text.phk-is-dragging {
    cursor: grabbing;
}

.phk-live-text:focus-visible {
    outline: 2px dashed rgba(255,255,255,.95);
    outline-offset: 6px;
}

.phk-product-heart .phk-live-text {
    top: 53%;
    width: 68%;
    font-size: clamp(25px, 4.5vw, 54px);
}

.phk-preview-note {
    margin: 16px 0 0;
    color: var(--phk-muted);
    font-size: 13px;
    line-height: 1.5;
    text-align: center;
}

.phk-controls h2 {
    margin: 0 0 8px;
    font-size: clamp(30px, 4vw, 48px);
    line-height: 1.05;
    letter-spacing: -.035em;
}

.phk-intro {
    margin: 0 0 28px;
    color: var(--phk-muted);
    font-size: 17px;
}

.phk-field,
.phk-fieldset {
    margin: 0 0 26px;
    padding: 0;
    border: 0;
}

.phk-field label,
.phk-fieldset legend {
    display: block;
    margin-bottom: 10px;
    font-weight: 750;
    font-size: 15px;
}

.phk-field input[type="text"] {
    width: 100%;
    min-height: 54px;
    padding: 12px 15px;
    border: 1px solid #cfd5dd;
    border-radius: 12px;
    background: #fff;
    color: #111;
    font-size: 18px;
    outline: none;
    transition: border-color .15s ease, box-shadow .15s ease;
}

.phk-field input[type="text"]:focus {
    border-color: var(--phk-accent);
    box-shadow: 0 0 0 3px rgba(17,24,39,.10);
}

.phk-counter {
    margin-top: 6px;
    color: var(--phk-muted);
    font-size: 12px;
    text-align: right;
}

.phk-help {
    margin: 7px 0 0;
    color: var(--phk-muted);
    font-size: 13px;
    line-height: 1.45;
}

.phk-font-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.phk-choice-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.phk-option {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 54px;
    padding: 10px 14px;
    border: 1px solid var(--phk-border);
    border-radius: 12px;
    cursor: pointer;
    background: #fff;
    transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}

.phk-option:hover {
    transform: translateY(-1px);
    border-color: #b7bec8;
}

.phk-option:has(input:checked) {
    border-color: var(--phk-accent);
    box-shadow: 0 0 0 2px rgba(17,24,39,.08);
}

.phk-option input,
.phk-color-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.phk-radio-mark {
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    border: 2px solid #c5cad2;
    border-radius: 50%;
    background: #fff;
}

.phk-option:has(input:checked) .phk-radio-mark {
    border: 5px solid var(--phk-accent);
}

.phk-font-sample {
    min-width: 0;
    font-family: var(--phk-option-font);
    font-size: 24px;
    line-height: 1.2;
}

.phk-color-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.phk-color-option {
    position: relative;
    display: inline-grid;
    place-items: center;
    width: 52px;
    height: 52px;
    cursor: pointer;
}

.phk-color-swatch {
    display: block;
    width: 42px;
    height: 42px;
    border: 3px solid #fff;
    border-radius: 50%;
    background: var(--phk-color);
    box-shadow: 0 0 0 1px #d1d5db, 0 4px 10px rgba(0,0,0,.10);
    transition: transform .15s ease, box-shadow .15s ease;
}

.phk-color-option:hover .phk-color-swatch {
    transform: scale(1.06);
}

.phk-color-option:has(input:checked) .phk-color-swatch {
    box-shadow: 0 0 0 3px var(--phk-accent), 0 4px 10px rgba(0,0,0,.12);
}

.phk-size-group {
    display: grid;
    gap: 10px;
}

.phk-purchase {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-top: 30px;
    padding-top: 24px;
    border-top: 1px solid var(--phk-border);
}

.phk-price {
    white-space: nowrap;
    font-size: 28px;
    font-weight: 800;
}

.phk-price del {
    font-size: 16px;
    color: var(--phk-muted);
}

.phk-add-button {
    flex: 1;
    min-height: 58px;
    padding: 14px 22px;
    border: 0;
    border-radius: 12px;
    background: var(--phk-accent);
    color: #fff;
    font-size: 17px;
    font-weight: 800;
    cursor: pointer;
    transition: transform .15s ease, opacity .15s ease;
}

.phk-add-button:hover {
    transform: translateY(-1px);
    opacity: .92;
}

.phk-benefits {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 18px;
    margin-top: 18px;
    color: #374151;
    font-size: 13px;
}

@media (max-width: 850px) {
    .phk-wrap {
        grid-template-columns: 1fr;
        margin: 20px auto;
        border-radius: 16px;
    }

    .phk-preview-card {
        position: static;
    }

    .phk-tag-stage {
        min-height: 330px;
    }
}

@media (max-width: 540px) {
    .phk-font-grid,
    .phk-choice-row {
        grid-template-columns: 1fr;
    }

    .phk-purchase {
        align-items: stretch;
        flex-direction: column;
    }

    .phk-price {
        text-align: center;
    }

    .phk-benefits {
        flex-direction: column;
    }
}


.phk-text-tools {
    padding: 16px;
    border: 1px solid var(--phk-border);
    border-radius: 14px;
    background: #f8fafc;
}

.phk-drag-help {
    margin: -2px 0 14px;
}

.phk-text-size-control {
    display: grid;
    grid-template-columns: 42px 1fr 42px;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.phk-text-size-control label {
    margin: 0;
    text-align: center;
    font-size: 14px;
}

.phk-size-button {
    width: 42px;
    height: 42px;
    padding: 0;
    border: 1px solid #cfd5dd;
    border-radius: 10px;
    background: #fff;
    color: #111827;
    font-size: 25px;
    line-height: 1;
    cursor: pointer;
}

.phk-size-button:hover {
    border-color: var(--phk-accent);
}

.phk-text-size-range {
    width: 100%;
    accent-color: var(--phk-accent);
    cursor: pointer;
}

.phk-reset-text {
    width: 100%;
    margin-top: 12px;
    padding: 10px 12px;
    border: 1px solid #cfd5dd;
    border-radius: 10px;
    background: #fff;
    color: #374151;
    font-weight: 650;
    cursor: pointer;
}

.phk-reset-text:hover {
    border-color: var(--phk-accent);
    color: #111827;
}
