.pc-calc {
    margin: 24px auto 64px;
    color: var(--pk-gray-900);
    font: inherit;
    font-family: Roboto, Arial, sans-serif;
    font-variant-numeric: tabular-nums;
}
.pc-calc * { box-sizing: border-box; }
.pc-calc [hidden] { display: none !important; }
.pc-calc form { margin: 0; }
.pc-calc .pc-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    min-height: 188px;
    margin: 22px 0 20px;
    padding: 28px 36px;
    border-radius: 20px;
    background: linear-gradient(115deg, #f6e8e3, #faf2ee 62%, #e8edf1);
    overflow: hidden;
}
.pc-calc .pc-heading-copy { max-width: 720px; }
.pc-calc h1 {
    margin: 0;
    font-size: 28px;
    line-height: 1.2;
    font-weight: 700;
    letter-spacing: normal;
    user-select: text;
}
.pc-calc .pc-heading-copy p { margin: 12px 0 0; font-size: 15px; color: var(--pk-gray-600); }
.pc-calc .pc-example {
    width: 176px;
    height: 148px;
    object-fit: contain;
    flex: none;
    user-select: none;
    pointer-events: none;
    filter: drop-shadow(0 7px 5px #11192814);
}
.pc-calc .pc-main { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--pk-gap); align-items: start; }
.pc-calc .pc-card { min-width: 0; padding: 24px; border: 1px solid var(--pk-gray-200); border-radius: 20px; background: #fff; }
.pc-calc fieldset { min-width: 0; padding: 0; margin: 0 0 20px; border: 0; }
.pc-calc fieldset:last-child { margin-bottom: 0; }
.pc-calc legend,
.pc-calc .pc-section-title { display: block; padding: 0; margin: 0 0 12px; border: 0; width: auto; }
.pc-calc .pc-title { margin: 0; }
.pc-calc legend,
.pc-calc .pc-section-title,
.pc-calc .pc-title,
.pc-calc .pc-total-label { color: inherit; font-size: 16px; line-height: 24px; font-weight: 500; }
.pc-calc .pc-radio { position: relative; margin: 0; cursor: pointer; font-size: 14px; line-height: 1.4; font-weight: 400; }
.pc-calc input[type=radio] {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}
.pc-calc .pc-radio:has(input:focus-visible),
.pc-calc button:focus-visible,
.pc-calc input[type=number]:focus-visible,
.pc-calc .pc-drop:focus-within { outline: 3px solid #e0242438; outline-offset: 3px; }
.pc-calc .pc-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.pc-calc .pc-options .pc-radio { display: flex; align-items: center; justify-content: center; min-height: 44px; padding: 10px; border: 1px solid var(--pk-gray-200); border-radius: 10px; background: #fafafb; text-align: center; }
.pc-calc .pc-options .pc-radio:has(:checked) { border-color: var(--pk-red-600); background: #fef2f2; font-weight: 600; }
.pc-calc .pc-options .pc-radio:hover { border-color: #9ca3af; }
.pc-calc input[type=number] { min-width: 0; height: 44px; padding: 9px 12px; border: 1px solid var(--pk-gray-300); border-radius: 10px; background: #fff; color: inherit; font: inherit; font-size: 16px; box-shadow: none; }
.pc-calc input[type=number]:focus { border-color: var(--pk-red-600); }
.pc-calc .pc-dimensions { display: flex; align-items: center; gap: 12px; }
.pc-calc .pc-times { display: flex; height: 44px; align-self: flex-end; align-items: center; color: var(--pk-gray-600); }
.pc-calc .pc-size-presets { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.pc-calc .pc-upload-group { margin-bottom: 20px; padding-bottom: 0; }
.pc-calc .pc-drop { display: flex; position: relative; align-items: center; justify-content: center; min-height: 128px; padding: 16px; border: 1.5px dashed #c4c9d1; border-radius: 12px; background: #fafafb; text-align: center; cursor: pointer; overflow: hidden; }
.pc-calc .pc-drop:hover,
.pc-calc .pc-drop.pc-dragging { border-color: var(--pk-red-600); background-color: #fef2f2; }
.pc-calc .pc-drop.pc-dragging { box-shadow: inset 0 0 0 1px var(--pk-red-600); }
.pc-calc .pc-drop input { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
.pc-calc .pc-drop-prompt { display: flex; align-items: center; flex-direction: column; gap: 8px; }
.pc-calc .pc-drop svg { width: 28px; height: 28px; color: var(--pk-gray-600); }
.pc-calc .pc-drop strong { font-size: 14px; font-weight: 500; }
.pc-calc .pc-drop strong span { color: var(--pk-red-600); }
.pc-calc .pc-file { margin: 0; color: var(--pk-gray-600); font-size: 12px; line-height: 1.5; }
.pc-calc .pc-drop[data-state=preview] {
    height: 176px;
    background-color: #fff;
    background-image: conic-gradient(#f0f1f3 25%, transparent 0 50%, #f0f1f3 0 75%, transparent 0);
    background-size: 16px 16px;
}
.pc-calc .pc-drop[data-state=preview] .pc-drop-prompt { display: none; }
.pc-calc .pc-preview-image { width: 100%; height: 142px; object-fit: contain; }
.pc-calc .pc-preview-caption { position: absolute; bottom: 8px; right: 8px; padding: 4px 8px; border-radius: 6px; background: #ffffffeb; color: var(--pk-gray-600); font-size: 11px; }
.pc-calc .pc-uploaded { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-width: 0; margin-top: 8px; }
.pc-calc #contourFilename { min-width: 0; overflow-wrap: anywhere; color: var(--pk-gray-900); }
.pc-calc .pc-link-button { flex: none; border: 0; padding: 5px 0; border-radius: 0; background: transparent; color: var(--pk-gray-600); font: inherit; font-size: 12px; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.pc-calc .pc-link-button:hover { color: var(--pk-gray-900); }
.pc-calc .pc-preview-status { margin: 6px 0 0; color: var(--pk-gray-600); font-size: 12px; line-height: 1.5; }
.pc-calc .pc-preview-status:empty { display: none; }
.pc-calc progress { display: block; width: 100%; height: 5px; accent-color: var(--pk-red-600); margin-top: 10px; }
.pc-calc .pc-check { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 46px; margin: 0; font-size: 14px; line-height: 1.4; font-weight: 400; cursor: pointer; }
.pc-calc .pc-check > span:first-child { display: flex; align-items: center; gap: 10px; }
.pc-calc input[type=checkbox] { appearance: none; display: grid; place-content: center; flex: none; width: 20px; height: 20px; margin: 0; border: 1.5px solid #b8bec7; border-radius: 6px; background: #fff; cursor: pointer; }
.pc-calc input[type=checkbox]:checked { border-color: var(--pk-red-600); background: var(--pk-red-600); }
.pc-calc input[type=checkbox]:checked::before { content: ''; width: 9px; height: 5px; border: 2px solid #fff; border-top: 0; border-right: 0; transform: translateY(-1px) rotate(-45deg); }
.pc-calc input[type=checkbox]:focus-visible { outline: 3px solid #e0242438; outline-offset: 3px; }
.pc-calc .pc-extra-price { color: var(--pk-gray-600); font-size: 13px; white-space: nowrap; }
.pc-calc .pc-packaging { margin-top: 4px; padding-top: 0; }
.pc-calc .pc-comment { margin-top: 6px; color: var(--pk-gray-600); }
.pc-calc .pc-comment summary { width: max-content; cursor: pointer; list-style: none; }
.pc-calc .pc-comment summary::-webkit-details-marker { display: none; }
.pc-calc .pc-comment summary::before { content: '+'; margin-right: 6px; }
.pc-calc .pc-comment[open] summary::before { content: '−'; }
.pc-calc textarea { width: 100%; margin-top: 8px; border: 1px solid var(--pk-gray-300); border-radius: 8px; padding: 10px; background: #fff; color: var(--pk-gray-900); font: inherit; resize: vertical; }
.pc-calc .pc-tier-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.pc-calc .pc-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 14px; }
.pc-calc .pc-table th { padding: 0 10px 10px; color: var(--pk-gray-600); font-size: 12px; font-weight: 400; text-align: right; white-space: nowrap; }
.pc-calc .pc-table td { height: 40px; padding: 7px 10px; text-align: right; cursor: pointer; }
.pc-calc .pc-table th:first-child,
.pc-calc .pc-table td:first-child { text-align: left; }
.pc-calc .pc-table .pc-radio { display: flex; align-items: center; min-height: 24px; }
.pc-calc .pc-table tr:has(input:checked) { background: #fef2f2; }
.pc-calc .pc-table tr:has(input:checked) td:first-child { border-radius: 8px 0 0 8px; font-weight: 600; }
.pc-calc .pc-table tr:has(input:checked) td:last-child { border-radius: 0 8px 8px 0; }
.pc-calc .pc-table tbody tr:hover { background: #fafafb; }
.pc-calc .pc-table [data-price],
.pc-calc .pc-table [data-custom-price] { font-weight: 600; white-space: nowrap; }
.pc-calc .pc-table [data-discount],
.pc-calc .pc-table [data-custom-discount] { color: var(--pk-red-600); font-size: 12px; }
.pc-calc .pc-table[data-discounts=off] th:nth-child(3),
.pc-calc .pc-table[data-discounts=off] td:nth-child(3) { display: none; }
.pc-calc .pc-table[data-discounts=off] tr:has(input:checked) td:nth-child(2) { border-radius: 0 8px 8px 0; }
.pc-calc .pc-custom-count input[type=number] { width: 106px; max-width: 100%; height: 38px; margin-top: 7px; font-size: 14px; }
.pc-calc .pc-copy-wrap { position: relative; flex: none; }
.pc-calc .pc-copy-button { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 10px; border: 0; border-radius: 10px; background: transparent; color: var(--pk-gray-600); cursor: pointer; }
.pc-calc .pc-copy-button:hover { background: #f3f4f6; color: var(--pk-gray-900); }
.pc-calc .pc-copy-button svg { width: 22px; height: 22px; }
.pc-calc .pc-copy-feedback { position: absolute; top: calc(100% + 4px); right: 0; z-index: 3; width: max-content; max-width: 220px; padding: 8px 12px; border-radius: 8px; background: var(--pk-gray-900); color: #fff; font-size: 12px; line-height: 1.4; pointer-events: none; }
.pc-calc .pc-copy-manual { margin-top: 16px; }
.pc-calc .pc-copy-manual p { margin: 0; color: var(--pk-gray-600); font-size: 13px; }
.pc-calc .pc-copy-manual textarea { min-height: 180px; font-size: 13px; }
.pc-calc .pc-footer { display: flex; flex-direction: column; gap: 16px; margin-top: 20px; padding-top: 0; }
.pc-calc .pc-total-copy { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; }
.pc-calc .pc-total-label { color: inherit; }
.pc-calc .pc-grand { color: var(--pk-gray-900); font-size: 32px; line-height: 38px; font-weight: 700; letter-spacing: normal; white-space: nowrap; }
.pc-calc .pc-button { display: inline-flex; align-items: center; justify-content: center; position: relative; min-height: 50px; padding: 12px 48px; border: 1px solid var(--pk-red-600); border-radius: 999px; background: var(--pk-red-600); color: #fff; font: inherit; font-size: 16px; font-weight: 500; cursor: pointer; }
.pc-calc .pc-button:hover { filter: brightness(.95); }
.pc-calc button:disabled { opacity: .45; cursor: wait; }
.pc-calc .pc-error { margin: 12px 0 0; color: var(--pk-red-600); font-size: 14px; line-height: 1.5; }
.pc-calc .pc-error:empty { display: none; }
.pc-calc .pc-extra-summary { margin-top: 6px; color: var(--pk-gray-600); font-size: 12px; line-height: 1.5; }
@media (max-width: 760px) {
    .pc-calc { margin-top: 20px; margin-bottom: 36px; }
    .pc-calc .pc-heading { min-height: 150px; gap: 14px; padding: 20px; }
    .pc-calc h1 { font-size: 24px; }
    .pc-calc .pc-example { width: 94px; height: 110px; }
    .pc-calc .pc-heading-copy p { font-size: 12px; }
    .pc-calc .pc-main { grid-template-columns: 1fr; }
    .pc-calc .pc-card { padding: 20px; }
    .pc-calc .pc-options .pc-radio { padding: 8px 5px; font-size: 12px; }
    .pc-calc .pc-table td, .pc-calc .pc-table th { padding-left: 6px; padding-right: 6px; }
    .pc-calc .pc-table td { height: 42px; }
    .pc-calc .pc-custom-count input[type=number] { width: 96px; }
    .pc-calc .pc-extra-price { font-size: 12px; }
    .pc-calc .pc-footer { justify-content: space-between; gap: 20px; flex-wrap: wrap; }
    .pc-calc .pc-footer > div { width: 100%; }
    .pc-calc .pc-total-copy { justify-content: space-between; width: 100%; gap: 12px; }
    .pc-calc .pc-grand { font-size: 36px; }
    .pc-calc .pc-grand.pc-long-total { font-size: 27px; }
    .pc-calc .pc-footer .pc-button { width: 100%; }
}

.pc-calc .pc-help { margin: 16px 0 0; color: var(--pk-gray-600); font-size: 14px; line-height: 1.5; text-align: center; }
.pc-calc .pc-help a { color: var(--pk-red-600); text-decoration: underline; text-underline-offset: 2px; }


.pc-calc .pc-table input[type=radio] { position: static; width: 16px; height: 16px; margin: 0 10px 0 0; overflow: visible; clip-path: none; appearance: auto; flex: none; accent-color: var(--pk-red-600); }
.pc-calc .pc-packaging { margin-top: 20px; padding-top: 0; align-items: flex-start; }
.pc-calc .pc-footer .pc-button { width: 100%; }
.pc-calc .pc-footer .pc-grand { font-size: 32px; }
.pc-calc .pc-footer .pc-grand.pc-long-total { font-size: 26px; }
.pc-calc .pc-packaging > span:first-child { align-items: flex-start; line-height: 20px; }
.pc-calc .pc-packaging input { margin: 0; flex: none; }

.pc-calc .pc-button:disabled { opacity: 1; background: var(--pk-red-600); color: #fff; cursor: progress; }
.pc-calc .pc-button-spinner {
    position: absolute;
    top: 50%;
    right: 20px;
    width: 18px;
    height: 18px;
    margin-top: -9px;
    border: 2px solid #ffffff66;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: pc-button-spin .8s linear infinite;
}
@keyframes pc-button-spin { to { transform: rotate(360deg); } }

.pc-calc .pc-dimension-field { flex: 0 1 112px; min-width: 0; }
.pc-calc .pc-dimension-field > label { display: block; margin: 0 0 6px; color: var(--pk-gray-800); }
.pc-calc .pc-dimensions { gap: 12px; }
@media (max-width: 400px) {
    .pc-calc .pc-dimensions { gap: 8px; }
    .pc-calc .pc-dimension-field { flex: 0 1 112px; }

}

.pc-calc .pc-dimension-field > label,
.pc-calc .pc-comment summary,
.pc-calc .pc-check { font-size: 14px; line-height: 20px; font-weight: 400; }
.pc-calc .pc-comment textarea {
    height: 96px;
    min-height: 96px;
    max-height: 240px;
    font-size: 16px;
    line-height: 24px;
    resize: vertical;
    overflow-y: auto;
}

.pc-calc .pc-dimension-field > input { display: block; width: 100%; margin-top: 0; }

/* Separate the size inputs from shared product preset controls. */
.pc-calc .pc-dimensions { align-items: flex-end; }
.pc-calc .pc-size-presets.item-specs-size { margin-top: 16px; }

.pc-calc .pc-size-limit { margin: 12px 0 0; color: var(--pk-gray-600); font-size: 14px; line-height: 20px; }
