
    /* Step Indicator */
    #spiral-step-indicator {
        display: flex; justify-content: space-between; align-items: center;
        margin-bottom: 30px; padding: 0 8px;
    }
    .spiral-step-dot { flex: 1; position: relative; text-align: center; }
    .spiral-step-dot:not(:last-child)::after {
        content: ''; position: absolute; top: 12px; left: 50%; right: -50%;
        height: 2px; background: #e0e0e0; z-index: 0;
    }
    .spiral-step-dot.completed:not(:last-child)::after { background: #4dbbe8; }
    .spiral-step-dot .step-circle {
        position: relative; z-index: 1; width: 26px; height: 26px;
        border-radius: 50%; background: #fff; border: 2px solid #e0e0e0;
        margin: 0 auto; display: flex; align-items: center; justify-content: center;
        font-size: 12px; font-weight: 700; color: #999; transition: all 0.2s; cursor: pointer;
    }
    .spiral-step-dot.active .step-circle { background: #4dbbe8; border-color: #4dbbe8; color: #fff; }
    .spiral-step-dot.completed .step-circle { background: #4dbbe8; border-color: #4dbbe8; color: #fff; }
    .spiral-step-dot .step-label { margin-top: 6px; font-size: 11px; color: #999; font-weight: 600; }
    .spiral-step-dot.active .step-label { color: #4dbbe8; }
    .spiral-step-dot.completed .step-label { color: #333; }
    
    .spiral-step-title { font-size: 20px; font-weight: 700; color: #1a1a1a; margin-bottom: 4px; }
    .spiral-step-subtitle { font-size: 14px; color: #666; margin-bottom: 20px; }
    .spiral-section-heading {
        font-size: 13px; font-weight: 700; color: #333;
        margin: 16px 0 10px 0; text-transform: uppercase; letter-spacing: 0.5px;
    }
    
    /* PDF Auto-Detect Box */
    #spiral-pdf-detect {
        background: linear-gradient(135deg, #f0f9fd 0%, #f5fbff 100%);
        border: 1px dashed #4dbbe8; border-radius: 8px;
        padding: 16px 20px; margin-bottom: 20px; position: relative;
        display: none;  /* default hidden — show only on step 1 */
    }
    /* PDF detect box: only visible inside the fullscreen builder on step 1 */
    #spiral-fs.spiral-step-1 #spiral-pdf-detect {
        display: block !important;
    }
    .spiral-pdf-detect-title {
        font-size: 15px; font-weight: 700; color: #1a1a1a;
        margin-bottom: 4px; display: flex; align-items: center;
    }
    .spiral-pdf-detect-subtitle { font-size: 13px; color: #666; margin-bottom: 12px; }
    .spiral-pdf-choose-btn {
        background: #4dbbe8; color: #fff; border: none;
        padding: 10px 20px; border-radius: 6px; font-size: 14px;
        font-weight: 600; cursor: pointer; transition: background 0.2s;
    }
    .spiral-pdf-choose-btn:hover { background: #3aa9d6; color: #fff; }
    .spiral-pdf-input-hidden { display: none; }
    .spiral-pdf-result {
        margin-top: 10px; padding: 10px 12px; border-radius: 4px;
        font-size: 13px; display: none;
    }
    .spiral-pdf-result.success { background: #d4edda; color: #155724; border: 1px solid #28a745; display: block; }
    .spiral-pdf-result.error { background: #f8d7da; color: #721c24; border: 1px solid #dc3545; display: block; }
    .spiral-pdf-result.loading { background: #fff3cd; color: #856404; border: 1px solid #ffc107; display: block; }
    .spiral-pdf-result strong { font-weight: 700; }
    
    /* Visual Card Selector */
    .spiral-card-row { display: flex; gap: 12px; margin-bottom: 20px; flex-wrap: wrap; }
    .spiral-card {
        flex: 1; min-width: 130px; background: #fff;
        border: 2px solid #e0e0e0; border-radius: 8px; padding: 16px;
        cursor: pointer; text-align: center; transition: all 0.2s; position: relative;
    }
    .spiral-card:hover { border-color: #4dbbe8; background: #f0f9fd; }
    .spiral-card.selected { border-color: #4dbbe8; background: #f0f9fd; }
    .spiral-card.selected::before {
        content: '✓'; position: absolute; top: 6px; right: 8px;
        background: #4dbbe8; color: #fff; width: 20px; height: 20px;
        border-radius: 50%; font-size: 12px; font-weight: 700;
        display: flex; align-items: center; justify-content: center; z-index: 2;
    }
    
    .spiral-size-visual { margin: 0 auto 10px; display: flex; align-items: center; justify-content: center; height: 100px; }
    .spiral-size-rect { border: 2px solid #1a1a1a; background: #fff; position: relative; }
    .spiral-size-corner {
        position: absolute; top: 6px; right: 6px; width: 12px; height: 12px;
        border-top: 2px solid #1a1a1a; border-right: 2px solid #1a1a1a;
    }
    .spiral-size-rect-label {
        position: absolute; top: 50%; right: 8px; transform: translateY(-50%);
        font-size: 12px; font-weight: 600; color: #1a1a1a; white-space: nowrap;
    }
    .spiral-card.selected .spiral-size-rect { border-color: #16325c; }
    .spiral-card.selected .spiral-size-corner { border-color: #16325c; }
    .spiral-card.selected .spiral-size-rect-label { color: #16325c; }
    .spiral-card-title { font-size: 14px; font-weight: 700; color: #1a1a1a; }
    .spiral-card-subtitle { font-size: 11px; color: #777; margin-top: 2px; }
    
    /* Binding Cards */
    .spiral-binding-visual {
        display: flex; justify-content: center; align-items: center;
        height: 80px; margin-bottom: 10px; position: relative;
    }
    .spiral-binding-book {
        width: 50px; height: 70px; background: #fff;
        border: 1px solid #ccc; border-radius: 2px;
        box-shadow: 2px 3px 8px rgba(0,0,0,0.15);
        position: relative;
    }
    .spiral-card[data-binding="coil"] .spiral-binding-book::before {
        content: ''; position: absolute; left: -5px; top: 4px; bottom: 4px;
        width: 8px;
        background: repeating-linear-gradient(to bottom, 
            #4a90e2 0px, #4a90e2 5px, transparent 5px, transparent 9px);
        border-radius: 4px;
    }
    .spiral-card[data-binding="wire"] .spiral-binding-book::before {
        content: ''; position: absolute; left: -5px; top: 4px; bottom: 4px;
        width: 8px;
        background: repeating-linear-gradient(to bottom,
            #888 0px, #888 3px, transparent 3px, transparent 7px);
        border-radius: 2px;
    }
    
    
    /* Vinyl Cards - 종이 모양 시각화 */
    .spiral-vinyl-visual {
        display: flex; justify-content: center; align-items: center;
        height: 90px; margin-bottom: 10px; position: relative;
    }
    .spiral-card[data-vinyl="no"] .spiral-vinyl-visual::before {
        content: '';
        width: 50px; height: 70px;
        background: #fff;
        border: 1px solid #ccc; border-radius: 2px;
        box-shadow: 2px 3px 8px rgba(0,0,0,0.15);
    }
    .spiral-card[data-vinyl="yes"] .spiral-vinyl-visual {
        position: relative;
    }
    .spiral-card[data-vinyl="yes"] .spiral-vinyl-visual::before {
        content: '';
        position: absolute;
        width: 50px; height: 70px;
        background: linear-gradient(135deg, 
            rgba(200, 220, 240, 0.6) 0%, 
            rgba(220, 235, 250, 0.4) 50%, 
            rgba(200, 220, 240, 0.6) 100%);
        border: 1px solid rgba(100, 150, 200, 0.6);
        border-radius: 2px;
        transform: translate(-8px, -4px);
        box-shadow: 1px 2px 4px rgba(0,0,0,0.1);
        z-index: 3;
    }
    .spiral-card[data-vinyl="yes"] .spiral-vinyl-visual::after {
        content: '';
        position: absolute;
        width: 50px; height: 70px;
        background: 
            radial-gradient(circle at 30% 40%, rgba(40,40,40,0.9) 0%, transparent 50%),
            radial-gradient(circle at 70% 60%, rgba(20,20,20,0.9) 0%, transparent 50%),
            #1a1a1a;
        border: 1px solid #000;
        border-radius: 2px;
        transform: translate(8px, 4px);
        box-shadow: 2px 3px 8px rgba(0,0,0,0.3);
        z-index: 1;
    }
    .spiral-card[data-vinyl="yes"] .spiral-vinyl-book {
        position: absolute;
        width: 50px; height: 70px;
        background: #fff;
        border: 1px solid #ccc;
        border-radius: 2px;
        box-shadow: 1px 2px 4px rgba(0,0,0,0.15);
        z-index: 2;
    }
    
    /* Quantity dropdown */
    .spiral-qty-discount {
        color: #28a745; font-size: 11px; font-weight: 700; margin-left: 8px;
        background: #e6f7ea; padding: 2px 8px; border-radius: 10px;
        display: inline-block; vertical-align: middle;
    }
    .spiral-qty-best-value {
        background: #4dabf7; color: #fff; font-size: 10px; font-weight: 700;
        padding: 2px 8px; border-radius: 10px; margin-left: 8px;
        display: inline-block; vertical-align: middle;
    }
    .custom-uni-selected .spiral-qty-discount,
    .custom-uni-selected .spiral-qty-best-value { font-size: 10px; }
    
    /* Custom Quantity */
    .spiral-custom-qty-li {
        background: #fffbf0; border-top: 1px solid #ffc107;
        font-weight: 600; color: #856404 !important;
    }
    .spiral-custom-qty-li:hover { background: #fff3cd !important; }
    #spiral-custom-qty-wrap {
        display: none; margin-top: 12px; padding: 14px;
        background: #f0f9fd; border: 1px solid #4dbbe8; border-radius: 6px;
    }
    #spiral-custom-qty-wrap.active { display: block; }
    #spiral-custom-qty-wrap label {
        display: block; font-size: 13px; font-weight: 700;
        color: #1a1a1a; margin-bottom: 6px;
    }
    #spiral-custom-qty-wrap input[type="number"] {
        width: 100%; padding: 10px 14px; border: 1px solid #ddd;
        border-radius: 4px; font-size: 14px; height: 44px; box-sizing: border-box;
    }
    .spiral-custom-qty-info {
        margin-top: 8px; padding: 8px 12px; background: #fff3cd;
        border: 1px solid #ffc107; border-radius: 4px;
        font-size: 12px; color: #856404; line-height: 1.4;
    }
    .spiral-custom-qty-info strong { color: #d39e00; }
    
    /* Hide Active Qty + Binding Cost */
    .uni-module:has(input[name="uni_cpo_spiral_active_qty"]),
    .uni-module:has(input[name="uni_cpo_spiral_binding_cost"]) {
        display: none !important;
    }
    input[name="uni_cpo_spiral_active_qty"],
    input[name="uni_cpo_spiral_binding_cost"] {
        display: none !important;
    }
    
    /* Paper Selector */
    .spiral-paper-selector {
        background: #f9f9f9; border: 1px solid #e0e0e0;
        border-radius: 6px; margin-bottom: 16px; overflow: hidden;
    }
    .spiral-paper-header {
        display: flex; align-items: center; padding: 14px 16px;
        background: #fff; cursor: pointer; transition: background 0.2s;
    }
    .spiral-paper-header:hover { background: #f5f5f5; }
    .spiral-paper-icon {
        width: 36px; height: 44px; margin-right: 14px; flex-shrink: 0;
        background: #fff; border: 1px solid #d0d0d0; border-radius: 2px;
        position: relative; box-shadow: 1px 2px 4px rgba(0,0,0,0.08);
    }
    .spiral-paper-icon::after {
        content: ''; position: absolute; top: 0; right: 0;
        width: 8px; height: 8px; background: linear-gradient(135deg, #fff 50%, #ddd 50%);
        border-left: 1px solid #d0d0d0; border-bottom: 1px solid #d0d0d0;
    }
    .spiral-paper-header-text { flex: 1; font-size: 15px; }
    .spiral-paper-label { color: #666; font-weight: 500; }
    .spiral-paper-selected-name { color: #4dbbe8; font-weight: 700; margin-left: 6px; }
    .spiral-paper-arrow { font-size: 12px; color: #888; margin-left: 12px; transition: transform 0.2s; }
    .spiral-paper-selector.expanded .spiral-paper-arrow { transform: rotate(180deg); }
    .spiral-paper-list {
        display: none; padding: 8px; background: #f9f9f9;
        max-height: 400px; overflow-y: auto;
        scrollbar-width: thin; scrollbar-color: #4dbbe8 #f0f0f0;
    }
    .spiral-paper-list::-webkit-scrollbar { width: 6px; }
    .spiral-paper-list::-webkit-scrollbar-track { background: #f0f0f0; border-radius: 3px; }
    .spiral-paper-list::-webkit-scrollbar-thumb { background: #4dbbe8; border-radius: 3px; }
    .spiral-paper-list::-webkit-scrollbar-thumb:hover { background: #3aa9d6; }
    .spiral-paper-selector.expanded .spiral-paper-list { display: block; }
    .spiral-paper-item {
        display: flex; align-items: center; padding: 12px 14px;
        background: #fff; border: 1px solid #e0e0e0; border-radius: 6px;
        margin-bottom: 6px; cursor: pointer; transition: all 0.2s;
    }
    .spiral-paper-item:last-child { margin-bottom: 0; }
    .spiral-paper-item:hover { border-color: #4dbbe8; background: #f0f9fd; }
    .spiral-paper-item.selected { border-color: #4dbbe8; border-width: 2px; background: #f0f9fd; }
    .spiral-paper-item-icon {
        width: 32px; height: 40px; margin-right: 12px; flex-shrink: 0;
        background: #fff; border: 1px solid #d0d0d0; border-radius: 2px;
        position: relative; box-shadow: 1px 1px 3px rgba(0,0,0,0.06);
    }
    .spiral-paper-item-icon::after {
        content: ''; position: absolute; top: 0; right: 0;
        width: 6px; height: 6px; background: linear-gradient(135deg, #fff 50%, #ddd 50%);
        border-left: 1px solid #d0d0d0; border-bottom: 1px solid #d0d0d0;
    }
    .spiral-paper-item-content { flex: 1; }
    .spiral-paper-item-name { font-size: 14px; font-weight: 700; color: #1a1a1a; margin-bottom: 2px; }
    .spiral-paper-item-desc { font-size: 12px; color: #666; }
    
    /* Pages Validation Message */
    .spiral-pages-message {
        margin-top: 8px; padding: 8px 12px; border-radius: 4px;
        font-size: 13px; display: none; font-weight: 500;
    }
    .spiral-pages-message.warning { background: #fff3cd; color: #856404; border: 1px solid #ffc107; display: block; }
    .spiral-pages-message.info { background: #d1ecf1; color: #0c5460; border: 1px solid #17a2b8; display: block; }
    
    /* Hide all uni-modules by default */
    /* (removed: product page options stay visible, Blueprints-style) */

    /* NOTE: all card visibility is handled inside #spiral-fs via .spiral-step-N rules.
       We no longer touch the product page's .uni-module elements. */

    @media (max-width: 768px) {
        .spiral-card-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
        .spiral-card { min-width: 0; padding: 12px 8px; }
        .spiral-card-title { font-size: 13px; }
        .spiral-card-subtitle { font-size: 10px; }
    }
    
    #spiral-nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 24px; }
    #spiral-nav button {
        flex: 1; padding: 14px; border-radius: 8px; font-size: 15px; font-weight: 700; cursor: pointer;
    }
    .spiral-back { background: #fff; border: 2px solid #ccc; color: #555; }
    .spiral-back:hover { border-color: #999; }
    .spiral-back[disabled] { opacity: 0.4; cursor: not-allowed; }
    .spiral-continue { background: #4dbbe8; border: 2px solid #4dbbe8; color: #fff; }
    .spiral-continue:hover { background: #3aa9d6; }
    .spiral-continue[disabled] { background: #ccc; border-color: #ccc; cursor: not-allowed; }
    
    #spiral-summary {
        display: none; background: #f9f9f9; border: 1px solid #e0e0e0;
        border-radius: 6px; padding: 20px; margin-bottom: 20px;
    }
    #spiral-fs.spiral-step-7 #spiral-summary { display: block !important; }
    #spiral-summary h4 { margin: 0 0 16px 0; font-size: 16px; font-weight: 700; }
    .spiral-summary-row {
        display: flex; justify-content: space-between; padding: 8px 0;
        border-bottom: 1px solid #eee; font-size: 14px;
    }
    .spiral-summary-row:last-child { border-bottom: none; }
    .spiral-summary-label { color: #666; font-weight: 500; }
    .spiral-summary-value { color: #1a1a1a; font-weight: 600; }
    .spiral-edit-link {
        font-size: 12px; color: #4dbbe8; cursor: pointer;
        text-decoration: underline; margin-left: 8px;
    }
    
    /* add-to-cart stays visible on product page (Blueprints-style) */
    
    
    /* ⭐ Step 변경 (새 구조):
       Step 1: Upload PDF + Pages
       Step 2: Size & Orientation
       Step 3: Cover (Color + Paper)
       Step 4: Inside (Color + Paper)
       Step 5: Binding Type + Binding Color
       Step 6: Vinyl Protection
       Step 7: Quantity
       Step 8: Review */
    #spiral-size-cards, #spiral-orientation-cards, #spiral-binding-cards,
    #spiral-binding-color-cards,
    #spiral-cover-color-cards, #spiral-inside-color-cards,
    #spiral-cover-paper-selector, #spiral-inside-paper-selector,
    #spiral-vinyl-cards { display: none !important; }
    /* ===== Step → card visibility (7-step Layout-first structure) ===== */
    /* Step 1 = Layout: PDF upload + pages + size + orientation */
    #spiral-fs.spiral-step-1 #spiral-size-cards,
    #spiral-fs.spiral-step-1 #spiral-orientation-cards { display: block !important; }
    /* Step 2 = Cover */
    #spiral-fs.spiral-step-2 #spiral-cover-color-cards,
    #spiral-fs.spiral-step-2 #spiral-cover-paper-selector { display: block !important; }
    /* Step 3 = Inside */
    #spiral-fs.spiral-step-3 #spiral-inside-color-cards,
    #spiral-fs.spiral-step-3 #spiral-inside-paper-selector { display: block !important; }
    /* Step 4 = Binding */
    #spiral-fs.spiral-step-4 #spiral-binding-cards,
    #spiral-fs.spiral-step-4 #spiral-binding-color-cards { display: block !important; }
    /* Step 5 = Add-Ons (vinyl) */
    #spiral-fs.spiral-step-5 #spiral-vinyl-cards { display: block !important; }
    
    /* ⭐ Binding Color Visual (Black/White circle swatch) */
    .spiral-binding-color-visual {
        width: 60px;
        height: 60px;
        border-radius: 50%;
        border: 2px solid #d0d0d0;
        margin: 10px auto;
        box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    }
    .spiral-card[data-binding-color="white"] .spiral-binding-color-visual {
        border: 2px solid #888;
    }

    /* ===== Fullscreen builder launch button (product page) ===== */
    #spiral-launch-btn {
        display: flex; align-items: center; justify-content: center; gap: 4px;
        width: 100%; box-sizing: border-box; padding: 16px 28px;
        background: #4dbbe8; color: #ffffff; border: 0; border-radius: 0;
        font-family: inherit; font-size: 17px; font-weight: 700; letter-spacing: .2px;
        line-height: 1.2; cursor: pointer; transition: background .15s; text-align: center;
        margin: 14px 0;
    }
    #spiral-launch-btn:hover { background: #3aa9d6; }

    /* ===== Fullscreen builder shell (from Blueprints) ===== */
    #spiral-fs {
        display: none; position: fixed; inset: 0; z-index: 999999; background: #fff;
    }
    #spiral-fs.open { display: flex; flex-direction: column; }
    #spiral-fs-header {
        flex: 0 0 auto; display: flex; align-items: center;
        padding: 0 24px; height: 60px; border-bottom: 1px solid #e5e5e5; background: #fff;
    }
    #spiral-fs-header .spiral-fs-logo { font-size: 18px; font-weight: 800; color: #16325c; letter-spacing: .3px; flex: 0 0 auto; }
    #spiral-fs-steps-top { display: flex; gap: 64px; flex: 1 1 auto; justify-content: center; }
    #spiral-fs-steps-top .spiral-top-step {
        font-size: 15px; font-weight: 600; color: #aaa; cursor: pointer;
        height: 60px; line-height: 60px; border-bottom: 3px solid transparent;
    }
    #spiral-fs-steps-top .spiral-top-step.active { color: #1a1a1a; border-bottom-color: #4dbbe8; }
    #spiral-fs-steps-top .spiral-top-step.completed { color: #4dbbe8; }
    #spiral-fs-steps-top .spiral-top-num {
        display: inline-flex; align-items: center; justify-content: center;
        width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid #4dbbe8;
        color: #4dbbe8; font-size: 12px; font-weight: 700; vertical-align: middle;
        margin-right: 8px;
    }
    #spiral-fs-steps-top .spiral-top-step.active .spiral-top-num { background: #4dbbe8; color: #fff; border-color: #4dbbe8; }
    #spiral-fs-steps-top .spiral-top-step.completed .spiral-top-num { background: #4dbbe8; border-color: #4dbbe8; font-size: 0; }
    #spiral-fs-steps-top .spiral-top-step.completed .spiral-top-num::after {
        content: '\2713'; color: #fff; font-size: 12px; font-weight: 700;
    }
    #spiral-fs-close {
        flex: 0 0 auto; box-sizing: border-box; padding: 0 !important;
        width: 38px !important; height: 38px !important; min-width: 38px;
        border-radius: 50% !important; border: 1px solid #ddd !important; background: #fff !important;
        cursor: pointer; font-size: 22px; line-height: 1; color: #666;
        display: flex !important; align-items: center; justify-content: center;
    }
    #spiral-fs-close:hover { background: #f5f5f5 !important; }

    #spiral-fs-body { flex: 1 1 auto; display: flex; overflow: hidden; }
    #spiral-fs-preview {
        flex: 1 1 auto; background: #f0f0f0; display: flex; flex-direction: column;
        align-items: center; justify-content: center; padding: 24px; overflow: auto;
    }
    #bp-pdf-canvas-wrap {
        background: #fff; box-shadow: 0 2px 16px rgba(0,0,0,.12); max-width: 100%; max-height: 100%;
        display: flex; align-items: center; justify-content: center; position: relative;
        transition: box-shadow .25s, transform .25s; border-radius: 2px;
    }
    /* Foam board mount: thick white edge + drop shadow (3D board look) */
    #bp-pdf-canvas-wrap.bp-mock-foam {
        border: 1px solid #e8e8e8;
        box-shadow: 10px 14px 0 -2px #ffffff, 11px 15px 0 -1px #d8d8d8, 16px 22px 30px rgba(0,0,0,.30);
        transform: translate(-4px,-6px);
    }
    /* Lamination: glossy sheen overlay */
    #bp-pdf-canvas-wrap.bp-mock-laminate::after {
        content: ''; position: absolute; inset: 0; pointer-events: none; border-radius: 2px;
        background: linear-gradient(115deg, rgba(255,255,255,0) 30%, rgba(255,255,255,.45) 44%, rgba(255,255,255,0) 58%);
    }
    #bp-pdf-canvas { max-width: 100%; max-height: 64vh; display: block; }
    #bp-pdf-empty { color: #999; font-size: 15px; text-align: center; }
    #bp-pdf-nav {
        display: none; align-items: center; gap: 14px; margin-top: 16px;
        background: #fff; border-radius: 24px; padding: 6px 8px; box-shadow: 0 1px 6px rgba(0,0,0,.1);
    }
    #bp-pdf-nav.show { display: flex; }
    #bp-pdf-nav button {
        box-sizing: border-box; padding: 0 !important;
        width: 42px !important; height: 42px !important; min-width: 42px;
        border-radius: 8px !important; border: 1px solid #ccc !important; background: #fff !important;
        cursor: pointer; font-size: 22px; font-weight: 700; line-height: 1; color: #16325c;
        display: inline-flex !important; align-items: center; justify-content: center;
        box-shadow: 0 1px 3px rgba(0,0,0,.12);
    }
    #bp-pdf-nav button:disabled { opacity: .3; cursor: default; box-shadow: none; }
    #bp-pdf-nav button:hover:not(:disabled) { background: #f0f9fd !important; border-color: #4dbbe8 !important; }
    #bp-pdf-nav input {
        box-sizing: border-box; width: 58px !important; height: 42px; text-align: center;
        border: 1px solid #ccc; border-radius: 8px; font-size: 16px; font-weight: 600; padding: 0 4px;
    }
    #bp-pdf-nav .bp-pdf-of { font-size: 14px; color: #333; }

    #spiral-fs-panel {
        flex: 0 0 420px; max-width: 420px; background: #fff; border-left: 1px solid #e5e5e5;
        padding: 28px 28px 20px; overflow-y: auto; display: flex; flex-direction: column;
    }
    #spiral-fs-panel-content { flex: 1 1 auto; }
    #spiral-fs-footer { flex: 0 0 auto; border-top: 1px solid #eee; padding-top: 16px; margin-top: 16px; }
    #spiral-fs-price { font-size: 14px; color: #333; margin-bottom: 12px; }
    #spiral-fs-price strong { font-size: 22px; color: #1a7a3a; }

    /* landscape paper-size icons (blueprints are wide) */
    .bp-size-visual { margin: 0 auto 10px; display: flex; align-items: center; justify-content: center; height: 100px; }
    .bp-size-rect { position: relative; border: 2px solid #1a1a1a; background: #fff; box-sizing: border-box; }
    .bp-size-corner { position: absolute; top: 6px; right: 6px; width: 12px; height: 12px;
        border-top: 2px solid #1a1a1a; border-right: 2px solid #1a1a1a; }
    .bp-size-rect-label { position: absolute; top: 50%; right: 8px; transform: translateY(-50%);
        font-size: 12px; font-weight: 600; color: #1a1a1a; white-space: nowrap; }
    .bp-card.selected .bp-size-rect { border-color: #16325c; }
    .bp-card.selected .bp-size-corner { border-color: #16325c; }
    .bp-card.selected .bp-size-rect-label { color: #16325c; }
    #bp-scale-fit { display: flex; align-items: center; gap: 8px; font-size: 14px; color: #333; cursor: pointer; }
    #bp-scale-fit input { width: 18px; height: 18px; accent-color: #4dbbe8; cursor: pointer; }

    @media (max-width: 820px) {
        #spiral-fs-body { flex-direction: column; }
        #spiral-fs-panel { flex: 1 1 auto; max-width: 100%; border-left: none; border-top: 1px solid #e5e5e5; }
        #spiral-fs-preview { flex: 0 0 38vh; }
        #spiral-fs-steps-top { display: none; }
    }

    /* card containers hidden by default; shown per step (handled above) */
    #spiral-size-cards, #spiral-orientation-cards, #spiral-cover-color-cards,
    #spiral-cover-paper-selector, #spiral-inside-color-cards, #spiral-inside-paper-selector,
    #spiral-binding-cards, #spiral-binding-color-cards, #spiral-vinyl-cards,
    #spiral-summary { display: none; }
    #spiral-pdf-detect { display: none; }
    #spiral-fs.spiral-step-1 #spiral-pdf-detect { display: block !important; }
    /* Review (step 7) shows the summary */
    #spiral-fs.spiral-step-7 #spiral-summary { display: block !important; }

    /* ===== Native Uni CPO file-upload: hidden on product page, shown in builder ===== */
    /* hide the original "Select file" on the product page until moved into the builder.
       Force with !important + override any inline styles left by mountNativeUploader. */
    .uni-module-file_upload {
        position: absolute !important; width: 1px !important; height: 1px !important;
        overflow: hidden !important; clip: rect(0 0 0 0) !important; white-space: nowrap !important;
        opacity: 0 !important; pointer-events: none !important; margin: 0 !important;
    }
    /* once moved inside the builder slot, restore + style it (Blueprints look) */
    #spiral-native-upload-slot { margin-top: 4px; }
    #spiral-native-upload-slot .uni-module-file_upload {
        position: static !important; width: 100% !important; height: auto !important;
        opacity: 1 !important; clip: auto !important; overflow: visible !important; margin: 0 !important;
    }
    #spiral-native-upload-slot .uni-cpo-file-upload-choose-btn,
    #spiral-native-upload-slot button {
        display: flex !important; align-items: center; justify-content: center; gap: 8px;
        width: 100% !important; box-sizing: border-box; min-height: 48px;
        background: #4dbbe8 !important; color: #ffffff !important; border: 0 !important; border-radius: 0 !important;
        font-size: 16px !important; font-weight: 700 !important; cursor: pointer; padding: 12px 20px !important;
        text-transform: none !important; letter-spacing: .2px; box-shadow: none !important;
    }
    #spiral-native-upload-slot .uni-cpo-file-upload-choose-btn:hover { background: #3aa9d6 !important; color: #fff !important; }
    /* kill any pseudo-element arrow/icon on the native button's ::before */
    #spiral-native-upload-slot .uni-cpo-file-upload-choose-btn::before { content: none !important; display: none !important; }
    /* add the same upload-arrow icon as the product-page button via ::after */
    #spiral-native-upload-slot .uni-cpo-file-upload-choose-btn::after {
        content: "" !important; display: inline-block !important;
        width: 18px !important; height: 18px !important; margin-left: 8px !important;
        flex: 0 0 auto !important; vertical-align: middle !important;
        background: none !important;
        -webkit-mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="white" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M12 16V4M7 9l5-5 5 5M5 20h14"/></svg>') center/contain no-repeat;
        mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="white" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M12 16V4M7 9l5-5 5 5M5 20h14"/></svg>') center/contain no-repeat;
        background-color: #ffffff !important;
    }
    /* hide native icons (cloud/arrow) inside the button */
    #spiral-native-upload-slot .uni-cpo-file-upload-choose-btn i,
    #spiral-native-upload-slot .uni-cpo-file-upload-choose-btn svg,
    #spiral-native-upload-slot .uni-cpo-file-upload-choose-btn img,
    #spiral-native-upload-slot .uni-cpo-file-upload-choose-btn .dashicons,
    #spiral-native-upload-slot button i,
    #spiral-native-upload-slot button svg { display: none !important; }
    /* any secondary blue upload/arrow button or icon next to the choose button */
    #spiral-native-upload-slot .uni-cpo-file-upload-upload-btn,
    #spiral-native-upload-slot .dndWrapper > *:not(.uni-cpo-file-upload-choose-btn):not(input):not(.moxie-shim) {
        display: none !important;
    }
    /* keep the moxie overlay input covering the button so the click still works */
    #spiral-native-upload-slot .moxie-shim { width: 100% !important; height: 100% !important; background: transparent !important; }
    #spiral-native-upload-slot .moxie-shim input { background: transparent !important; }
    /* CRITICAL: the product-page hide rule sets pointer-events:none — re-enable it
       inside the slot so the uploader is clickable again. */
    #spiral-native-upload-slot,
    #spiral-native-upload-slot .uni-module-file_upload,
    #spiral-native-upload-slot .dndWrapper,
    #spiral-native-upload-slot .uni-cpo-file-upload-choose-btn,
    #spiral-native-upload-slot .moxie-shim,
    #spiral-native-upload-slot .moxie-shim input,
    #spiral-native-upload-slot input[type="file"] {
        pointer-events: auto !important;
    }
    #spiral-native-upload-slot .dndWrapper { position: relative; }
    #spiral-native-upload-slot label { display: none !important; }
    /* hide Plupload's own file-list / preview UI (the odd boxes + "Ready to upload") */
    #spiral-native-upload-slot .moxie-shim ~ .plupload_filelist,
    #spiral-native-upload-slot .plupload_filelist,
    #spiral-native-upload-slot .uni-cpo-file-upload-files,
    #spiral-native-upload-slot ul {
        display: none !important;
    }
    /* Uni CPO's file-list overlay (fixed, white, z=1000000) was covering the whole
       builder. We don't use it — hide it globally. */
    #uni_cpo_max_file_upload-files-list,
    .uni-cpo-file-upload-files,
    .uni-cpo-file-upload-files-list,
    .upload-preview-box,
    .plupload_filelist {
        display: none !important; visibility: hidden !important;
        width: 0 !important; height: 0 !important; opacity: 0 !important;
        position: absolute !important; z-index: -1 !important; pointer-events: none !important;
    }


    /* ===== Add-to-cart loading overlay (dp_upload_files flow) ===== */
    #spiral-cart-loading {
        position: fixed; inset: 0; z-index: 1000000; background: #fff;
        display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px;
    }
    #spiral-cart-loading .spiral-cart-spinner {
        width: 44px; height: 44px; border: 4px solid #e0e0e0; border-top-color: #4dbbe8;
        border-radius: 50%; animation: spiralspin .8s linear infinite;
    }
    #spiral-cart-loading .spiral-cart-msg { font-size: 16px; font-weight: 600; color: #16325c; }
    @keyframes spiralspin { to { transform: rotate(360deg); } }

    /* ===== Color option swatches (Blueprints-style ink) ===== */
    .spiral-ink-swatch { width: 38px; height: 38px; border-radius: 50%; margin: 0 auto 8px; }
    .spiral-ink-color { background: conic-gradient(#0ad,#0a0,#fd0,#f60,#f0a,#0ad); }
    .spiral-ink-bw { background: linear-gradient(135deg,#000 0 50%,#fff 50% 100%); border:1px solid #ccc; }

    /* ===== PDF preview (Blueprints-style canvas + nav) ===== */
    #spiral-pdf-empty { color: #999; font-size: 15px; text-align: center; }
    #spiral-pdf-canvas-wrap {
        background: #fff; box-shadow: 0 2px 16px rgba(0,0,0,.12); max-width: 100%; max-height: 100%;
        display: flex; align-items: center; justify-content: center; position: relative;
        transition: box-shadow .25s, transform .25s; border-radius: 2px;
    }
    #spiral-pdf-canvas-wrap canvas { max-width: 100%; max-height: 60vh; display: block; }
    #spiral-pdf-nav {
        display: none; align-items: center; gap: 14px; margin-top: 16px;
        background: #fff; border-radius: 24px; padding: 6px 8px; box-shadow: 0 1px 6px rgba(0,0,0,.1);
    }
    #spiral-pdf-nav.show { display: flex; }
    #spiral-pdf-nav button {
        box-sizing: border-box; padding: 0 !important;
        width: 42px !important; height: 42px !important; min-width: 42px;
        border-radius: 8px !important; border: 1px solid #ccc !important; background: #fff !important;
        cursor: pointer; font-size: 22px; font-weight: 700; line-height: 1; color: #16325c;
        display: inline-flex !important; align-items: center; justify-content: center;
        box-shadow: 0 1px 3px rgba(0,0,0,.12);
    }
    #spiral-pdf-nav button:disabled,
    #spiral-pdf-nav button[disabled] { opacity: .3; cursor: default; box-shadow: none; }
    #spiral-pdf-nav button:hover:not(:disabled):not([disabled]) { background: #f0f9fd !important; border-color: #4dbbe8 !important; }
    #spiral-pdf-nav input,
    #spiral-pdf-nav #spiral-pdf-pageinput {
        box-sizing: border-box; width: 58px !important; height: 42px; text-align: center;
        border: 1px solid #ccc; border-radius: 8px; font-size: 16px; font-weight: 600; padding: 0 4px;
    }
    #spiral-pdf-nav .spiral-pdf-of { font-size: 14px; color: #333; }

    /* ===== Binding/Add-On mockup (book + binding SVG + cover + vinyl) ===== */
    #spiral-mockup-gallery {
        display: flex; flex-direction: column; align-items: center; justify-content: center;
    }
    .spiral-mockup-book-container {
        position: relative;
        display: flex;
        align-items: stretch;
        transition: all 0.3s ease;
    }
    
    /* Binding (SVG) */
    .spiral-mockup-binding {
        width: 48px;
        flex-shrink: 0;
        position: relative;
        margin-right: -20px;
        z-index: 2;
        transition: all 0.3s ease;
        overflow: visible;
    }
    .spiral-mockup-binding svg {
        width: 100%;
        height: 100%;
        display: block;
        overflow: visible;
    }
    
    /* Book body */
    .spiral-mockup-book {
        background: #fff;
        border: 1px solid #d0d0d0;
        border-left: 2px solid #aaa;
        box-shadow: 6px 6px 16px rgba(0,0,0,0.15);
        position: relative;
        overflow: hidden;
        transition: all 0.3s ease;
    }
    
    /* Cover image area */
    .spiral-mockup-cover {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background-size: cover;
        background-position: center;
        background-repeat: no-repeat;
        display: flex;
        align-items: center;
        justify-content: center;
        color: #aaa;
        font-size: 12px;
        text-align: center;
        padding: 20px;
        flex-direction: column;
        gap: 8px;
    }
    .spiral-mockup-cover.empty::before {
        content: '📕';
        font-size: 48px;
        opacity: 0.4;
    }
    .spiral-mockup-cover.empty::after {
        content: 'Upload PDF\Ato see cover preview';
        white-space: pre;
        line-height: 1.6;
    }
    .spiral-mockup-cover.has-image::before,
    .spiral-mockup-cover.has-image::after {
        display: none;
    }
    
    /* Vinyl overlay */
    .spiral-mockup-vinyl {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background:
            linear-gradient(135deg,
                rgba(255,255,255,0.30) 0%,
                rgba(255,255,255,0.06) 45%,
                rgba(255,255,255,0.20) 100%);
        pointer-events: none;
        display: none;
        z-index: 4;
        overflow: hidden;
    }
    .spiral-mockup-vinyl.active {
        display: block;
    }
    /* moving glossy sweep: two bright stripes that glide across the cover */
    .spiral-mockup-vinyl::after {
        content: '';
        position: absolute;
        top: -20%; left: -60%;
        width: 50%; height: 140%;
        background: linear-gradient(105deg,
            rgba(255,255,255,0) 0%,
            rgba(255,255,255,0.95) 42%,
            rgba(255,255,255,0.35) 50%,
            rgba(255,255,255,0.95) 58%,
            rgba(255,255,255,0) 100%);
        transform: skewX(-18deg);
        animation: spiralSheen 3.2s ease-in-out infinite;
    }
    @keyframes spiralSheen {
        0%   { left: -60%; }
        55%  { left: 130%; }
        100% { left: 130%; }
    }
    .spiral-mockup-vinyl::before {
        content: 'Clear Laminate';
        position: absolute;
        top: 8px;
        right: 8px;
        background: rgba(0,0,0,0.55);
        color: #fff;
        font-size: 9px;
        padding: 3px 8px;
        border-radius: 10px;
        font-weight: 600;
        letter-spacing: 0.5px;
        text-transform: uppercase;
        z-index: 5;
    }

    /* Black leather back sheet (peeks out to the RIGHT only when vinyl is on) */
    .spiral-mockup-backsheet {
        position: absolute;
        top: 0; bottom: 0; right: -10px; width: 60%;
        border-radius: 2px;
        background:
            repeating-linear-gradient(45deg, rgba(255,255,255,0.015) 0 2px, rgba(0,0,0,0.04) 2px 4px),
            linear-gradient(135deg, #2a2a2a 0%, #161616 50%, #0c0c0c 100%);
        box-shadow: 3px 4px 12px rgba(0,0,0,0.35);
        display: none;
        z-index: 0;
    }
    .spiral-mockup-backsheet.active { display: block; }
    
    /* Info badge */
    .spiral-mockup-info {
        margin-top: 20px;
        text-align: center;
        font-size: 13px;
        color: #495057;
        line-height: 1.6;
        background: #f8f9fa;
        padding: 10px 16px;
        border-radius: 6px;
        border: 1px solid #e9ecef;
        max-width: 340px;
    }
    .spiral-mockup-info strong {
        color: #1a1a1a;
        font-weight: 700;
    }

    /* ===== Quantity box (Blueprint-style: tabs + project name + qty + special) ===== */
    #spiral-quantity-box { display: none; }
    #spiral-fs.spiral-step-6 #spiral-quantity-box { display: block !important; }
    .spiral-qty-tabs { display: flex; gap: 28px; border-bottom: 1px solid #e5e5e5; margin-bottom: 22px; }
    .spiral-qty-tab { padding: 10px 2px; font-size: 15px; font-weight: 600; color: #999; cursor: pointer; border-bottom: 3px solid transparent; margin-bottom: -1px; }
    .spiral-qty-tab.active { color: #1a1a1a; border-bottom-color: #4dbbe8; }
    .spiral-qty-label { font-size: 15px; font-weight: 700; color: #1a1a1a; margin-bottom: 10px; }
    .spiral-project-name { display: flex; align-items: center; border: 1px solid #ccc; border-radius: 6px; overflow: hidden; }
    .spiral-project-name input { flex: 1 1 auto; border: 0; padding: 12px 14px; font-size: 14px; outline: none; }
    .spiral-project-name button { flex: 0 0 auto; border: 0; background: #fff; color: #4dbbe8; font-weight: 700; font-size: 14px; padding: 12px 16px; cursor: pointer; }
    .spiral-stepper { display: inline-flex; align-items: center; gap: 0; margin: 8px 0; }
    .spiral-stepper button {
        box-sizing: border-box; padding: 0 !important; margin: 0 !important;
        width: 42px !important; height: 42px !important;
        border: 1px solid #ccc; background: #f7f7f7;
        font-size: 20px; font-weight: 700; line-height: 1; cursor: pointer; color: #333;
        display: inline-flex !important; align-items: center; justify-content: center;
        vertical-align: middle;
    }
    .spiral-stepper button:first-child { border-radius: 6px 0 0 6px; }
    .spiral-stepper button:last-child { border-radius: 0 6px 6px 0; }
    .spiral-stepper input {
        box-sizing: border-box; padding: 0 !important; margin: 0 !important;
        width: 70px !important; height: 42px !important; text-align: center;
        border: 1px solid #ccc; border-left: none; border-right: none;
        font-size: 16px; font-weight: 600; vertical-align: middle; -moz-appearance: textfield;
    }
    .spiral-stepper input::-webkit-outer-spin-button, .spiral-stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
    .spiral-special-important { background: #2c2c2c; color: #fff; border-radius: 8px; padding: 16px 18px; margin-bottom: 16px; font-size: 13px; }
    .spiral-special-important-head { font-weight: 700; font-size: 15px; margin-bottom: 8px; display: flex; align-items: center; gap: 6px; }
    .spiral-special-important ul { margin: 0; padding-left: 18px; }
    .spiral-special-important li { margin-bottom: 6px; line-height: 1.4; }
    #spiral-special-input { width: 100%; min-height: 110px; padding: 12px 14px; border: 1px solid #ccc; border-radius: 6px; font-size: 14px; box-sizing: border-box; resize: vertical; }
    .spiral-char-count { font-size: 12px; color: #888; text-align: right; margin-top: 6px; }
    .spiral-contact-info { font-size: 13px; color: #444; margin-top: 18px; line-height: 1.5; }

    /* Special Instructions Uni CPO field lives only in the builder; hide on product page */
    .uni-module:has(textarea[name="uni_cpo_spiral_notes"]),
    .uni-module:has(input[name="uni_cpo_spiral_notes"]),
    .uni-module:has(textarea[name="uni_cpo_spiral_project"]),
    .uni-module:has(input[name="uni_cpo_spiral_project"]) { display: none !important; }

    /* WooCommerce/Uni CPO blockUI white overlay flashes twice on load during
       price recalculation. Hide the visual overlay (pricing still works). */
    .blockUI.blockOverlay { display: none !important; opacity: 0 !important; }
    .blockUI.blockMsg { display: none !important; }
    