/* ── Shared Playground Widget (light theme — matches homepage) ── */
.pg-wrap {
    background: linear-gradient(160deg, #ffffff 0%, #F3F8FF 100%);
    border: 1px solid rgba(186, 210, 248, 0.9);
    border-radius: 24px;
    padding: 28px 32px;
    margin: 40px 0;
    box-shadow:
        0 1px 2px rgba(37, 99, 235, 0.06),
        0 6px 16px rgba(37, 99, 235, 0.10),
        0 20px 48px rgba(15, 23, 42, 0.11),
        0 40px 80px rgba(15, 23, 42, 0.06),
        0 0 70px 12px rgba(96, 165, 250, 0.13),
        inset 0 1px 0 rgba(255, 255, 255, 0.95);
}

.pg-wrap h2 {
    font-family: 'Syne', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: #1E293B;
    margin: 0 0 20px;
    line-height: 1.3;
    text-align: center;
}

.pg-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    align-items: stretch;
}

.pg-col {
    display: flex;
    flex-direction: column;
}

.pg-col-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #94A3B8;
    margin-bottom: 14px;
}

.pg-step-num {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #EFF6FF;
    border: 1px solid #BFDBFE;
    color: #2563EB;
    font-size: 0.7rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.pg-zone {
    position: relative;
    background: #FAFBFF;
    border: 2px dashed #E2E8F0;
    border-radius: 18px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.25s ease;
    flex: 1;
    min-height: 320px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pg-zone:hover {
    border-color: #93C5FD;
    background: #EFF6FF;
}

.pg-zone.has-file {
    border-style: solid;
    border-color: #60A5FA;
    background: #fff;
    padding: 8px;
}

.pg-zone input[type="file"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
    width: 100%;
    height: 100%;
    z-index: 2;
}

.pg-zone-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 24px 16px;
    text-align: center;
    pointer-events: none;
}

.pg-zone-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background: #EFF6FF;
    border: 1px solid #BFDBFE;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pg-zone-icon svg {
    width: 24px;
    height: 24px;
    color: #3B82F6;
}

.pg-zone-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: #1E293B;
}

.pg-zone-sub {
    font-size: 0.82rem;
    color: #94A3B8;
    line-height: 1.5;
}

.pg-zone-hint {
    display: inline-block;
    background: #EFF6FF;
    border: 1px solid #BFDBFE;
    color: #2563EB;
    font-size: 0.72rem;
    font-weight: 500;
    padding: 3px 12px;
    border-radius: 20px;
}

.pg-zone-preview {
    width: 100%;
    max-height: 240px;
    object-fit: contain;
    border-radius: 10px;
    display: none;
}

.pg-zone.has-file .pg-zone-preview {
    display: block;
}

.pg-zone.has-file .pg-zone-inner {
    display: none;
}

.pg-action {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.pg-btn {
    width: 100%;
    max-width: 480px;
    padding: 15px 20px;
    background: #2563EB;
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    font-family: 'DM Sans', sans-serif;
    transition: all 0.25s ease;
    box-shadow: 0 8px 24px rgba(37, 99, 235, 0.25);
}

.pg-btn:hover {
    background: #1D4ED8;
    transform: translateY(-1px);
    box-shadow: 0 12px 32px rgba(37, 99, 235, 0.3);
}

.pg-note {
    font-size: 0.78rem;
    color: #94A3B8;
    text-align: center;
    margin-top: 10px;
}

/* ── Result zone (non-clickable output pane) ── */
.pg-zone-result {
    cursor: default;
    background: repeating-conic-gradient(#f0f0f0 0% 25%, #fff 0% 50%) 50% / 20px 20px;
}

.pg-zone-result.has-file {
    background: repeating-conic-gradient(#f0f0f0 0% 25%, #fff 0% 50%) 50% / 20px 20px;
}

.pg-btn-download {
    padding: 12px 20px;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 700;
    color: #fff;
    font-family: 'DM Sans', sans-serif;
}

.pg-btn-download:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.pg-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* ── Prompt variant (replaces file upload with textarea) ── */
.pg-zone-prompt {
    cursor: default;
    border-style: solid;
    border-color: #E2E8F0;
    padding: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.pg-prompt-input {
    width: 100%;
    flex: 1;
    min-height: 180px;
    border: 1px solid #E2E8F0;
    border-radius: 12px;
    padding: 14px 16px;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.9rem;
    color: #1E293B;
    background: #fff;
    resize: none;
    outline: none;
    transition: border-color 0.2s ease;
    line-height: 1.5;
}

.pg-prompt-input:focus {
    border-color: #93C5FD;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.pg-prompt-input::placeholder {
    color: #94A3B8;
}

/* ── Responsive ── */
@media (max-width: 640px) {
    .pg-wrap {
        padding: 20px 16px;
        margin: 28px 0;
        border-radius: 20px;
    }

    .pg-wrap h2 {
        font-size: 1rem;
        margin-bottom: 14px;
    }

    .pg-layout {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .pg-zone {
        min-height: 180px;
    }

    .pg-zone-prompt {
        min-height: 160px;
        padding: 12px;
    }

    .pg-prompt-input {
        min-height: 120px;
    }

    .pg-zone-icon {
        width: 44px;
        height: 44px;
        border-radius: 12px;
    }

    .pg-zone-icon svg {
        width: 20px;
        height: 20px;
    }

    .pg-zone-title {
        font-size: 0.86rem;
    }

    .pg-zone-sub {
        font-size: 0.76rem;
    }

    .pg-btn {
        font-size: 0.9rem;
        padding: 14px;
    }

    .pg-note {
        font-size: 0.72rem;
    }
}

@media (max-width: 420px) {
    .pg-wrap {
        padding: 16px 14px;
    }

    .pg-layout {
        gap: 12px;
    }

    .pg-zone {
        min-height: 160px;
    }

    .pg-zone-prompt {
        min-height: 140px;
        padding: 10px;
    }

    .pg-prompt-input {
        min-height: 100px;
        padding: 10px 12px;
        font-size: 0.85rem;
    }

    .pg-col-label {
        font-size: 0.68rem;
        margin-bottom: 8px;
    }

    .pg-zone-hint {
        font-size: 0.65rem;
        padding: 2px 8px;
    }
}

/* ── Store Modal ── */
.store-modal-overlay { display:none; position:fixed; inset:0; z-index:1000; background:rgba(15,23,42,0.55); align-items:center; justify-content:center; padding:20px; }
.store-modal { position:relative; background:#fff; border-radius:24px; padding:34px 28px 28px; max-width:420px; width:100%; text-align:center; box-shadow:0 24px 60px rgba(15,23,42,0.18); }
.store-modal-close { position:absolute; top:14px; right:14px; width:36px; height:36px; border-radius:50%; border:none; background:#F1F5F9; color:#64748B; font-size:18px; cursor:pointer; display:flex; align-items:center; justify-content:center; }
.store-modal-badge { display:inline-block; font-size:.72rem; font-weight:700; letter-spacing:.08em; text-transform:uppercase; color:#2563EB; background:#EFF6FF; border:1px solid #DBEAFE; padding:5px 14px; border-radius:999px; margin-bottom:14px; }
.store-modal-icon { font-size:44px; line-height:1; margin-bottom:10px; }
.store-modal-title { font-family:'Syne',sans-serif; font-size:1.45rem; font-weight:700; margin:0 0 6px; color:#0F172A; }
.store-modal-sub { font-size:.95rem; color:#64748B; margin:0 0 18px; }
.store-modal-btns { display:flex; flex-direction:column; gap:10px; margin-bottom:14px; }
.store-btn { display:flex; align-items:center; justify-content:center; gap:10px; padding:12px 16px; border-radius:12px; font-size:.92rem; font-weight:600; text-decoration:none; transition:transform .2s, box-shadow .2s; }
.store-btn.apple { background:#0F172A; color:#fff; }
.store-btn.google { background:#F1F5F9; color:#0F172A; border:1px solid #E2E8F0; }
.store-btn:hover { transform:translateY(-1px); }
.store-modal-note { font-size:.82rem; color:#94A3B8; margin:0; }
