.ips-app {
    max-width: 1000px;
    margin: 24px auto;
    padding: 20px;
    border: 1px solid #e2e2e2;
    border-radius: 10px;
    background: #fff;
    font-family: Arial, sans-serif;
}

.ips-title {
    margin-top: 0;
}

.ips-step {
    display: none;
    margin-top: 16px;
}

.ips-step.is-active {
    display: block;
}

.ips-product-grid,
.ips-size-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 10px;
}

.ips-btn {
    border: 1px solid #1f4ed8;
    background: #2563eb;
    color: #fff;
    border-radius: 8px;
    padding: 10px 14px;
    cursor: pointer;
}

.ips-btn:hover {
    background: #1d4ed8;
}

.ips-note {
    color: #666;
}

.ips-template-panel {
    margin-bottom: 20px;
    padding-bottom: 18px;
    border-bottom: 1px solid #e2e2e2;
}

.ips-template-heading {
    margin: 0 0 8px;
    font-size: 1.05rem;
}

.ips-template-intro {
    margin-top: 0;
}

.ips-template-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 12px;
}

.ips-template-btn {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    max-width: 220px;
    text-align: left;
    padding: 10px 14px;
    border-radius: 8px;
    cursor: pointer;
    border: 1px solid #cbd5e1;
    background: #f8fafc;
    color: #0f172a;
    font: inherit;
    line-height: 1.25;
}

.ips-template-btn:hover {
    background: #e2e8f0;
    border-color: #94a3b8;
}

.ips-template-btn-title {
    font-weight: 700;
}

.ips-template-btn-blurb {
    font-weight: 400;
    font-size: 12px;
    color: #475569;
}

.ips-editor-grid {
    display: grid;
    grid-template-columns: minmax(260px, 320px) 1fr;
    gap: 20px;
    align-items: start;
}

.ips-controls {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ips-controls input,
.ips-controls select {
    width: 100%;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 6px;
}

.ips-controls hr {
    margin: 8px 0;
    border: 0;
    border-top: 1px solid #e2e2e2;
}

.ips-actions-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.ips-preview-wrap {
    overflow: auto;
}

.ips-size-label {
    margin-bottom: 10px;
    font-size: 14px;
    color: #555;
}

.ips-card-preview {
    width: 560px;
    max-width: 100%;
    aspect-ratio: 3.5 / 2;
    border: 2px dashed #999;
    border-radius: 10px;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 16px;
    box-sizing: border-box;
    position: relative;
    overflow: hidden;
}

#ips-card-text {
    font-size: 28px;
    color: #111111;
    line-height: 1.2;
    word-break: break-word;
    position: relative;
    z-index: 2;
}

#ips-background-layer {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

#ips-background-layer img {
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0.9;
}

#ips-shapes-layer {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: auto;
}

.ips-shape {
    position: absolute;
    pointer-events: auto;
    cursor: move;
    touch-action: none;
    user-select: none;
}

.ips-shape-circle,
.ips-shape-square {
    width: 80px;
    height: 80px;
}

.ips-shape-circle {
    border-radius: 50%;
}

.ips-shape-rectangle {
    width: 120px;
    height: 70px;
}

.ips-shape-oval {
    width: 120px;
    height: 75px;
    border-radius: 50%;
}

.ips-shape-polygon {
    width: 95px;
    height: 85px;
    clip-path: polygon(25% 0%, 75% 0%, 100% 50%, 75% 100%, 25% 100%, 0% 50%);
}

.ips-shape-triangle {
    width: 90px;
    height: 85px;
    clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
}

.ips-card-graphic {
    position: absolute;
    width: 110px;
    height: auto;
    max-width: 140px;
    pointer-events: auto;
    cursor: move;
    touch-action: none;
    user-select: none;
    -webkit-user-drag: none;
}

.ips-gradient-text {
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

@media (max-width: 900px) {
    .ips-editor-grid {
        grid-template-columns: 1fr;
    }
}
