/* プラグイン独自の名前空間 .pse-wrapper で囲む */
.pse-wrapper {
    max-width: 800px;
    margin: 20px auto;
    font-family: 'Helvetica Neue', Arial, sans-serif;
    background: #fff;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    color: #333;
}

.pse-wrapper * {
    box-sizing: border-box;
}

/* プログレスバー */
.pse-progressbar {
    padding: 0;
    list-style: none;
    display: flex;
    justify-content: space-between;
    margin-bottom: 40px;
    position: relative;
    counter-reset: step;
}

.pse-progressbar::before {
    content: '';
    position: absolute;
    top: 15px;
    left: 0;
    width: 100%;
    height: 4px;
    background: #eee;
    z-index: 1;
}

.pse-progressbar li {
    position: relative;
    z-index: 2;
    text-align: center;
    width: 25%;
    font-size: 12px;
    color: #999;
    font-weight: bold;
}

.pse-progressbar li::before {
    content: counter(step);
    counter-increment: step;
    width: 30px;
    height: 30px;
    line-height: 30px;
    border: 2px solid #eee;
    display: block;
    text-align: center;
    margin: 0 auto 10px auto;
    border-radius: 50%;
    background-color: #fff;
    transition: all 0.3s;
}

.pse-progressbar li.active {
    color: #4a90e2;
}

.pse-progressbar li.active::before {
    border-color: #4a90e2;
    background-color: #4a90e2;
    color: #fff;
}

/* ステップ表示制御 */
.pse-step {
    display: none;
    animation: fadeIn 0.5s;
}

.pse-step.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ヘッダー */
.pse-header {
    text-align: center;
    margin-bottom: 30px;
}
.pse-header h2 {
    font-size: 24px;
    color: #333;
    margin-bottom: 10px;
}
.pse-header i {
    color: #4a90e2;
    margin-right: 8px;
}

/* 入力フォーム */
.pse-input-group-row {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
}

.pse-input-box {
    text-align: center;
}

.pse-input-box label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    font-size: 14px;
}

.pse-input-box input[type="number"],
.pse-input-box input[type="text"],
.pse-input-box input[type="email"] {
    width: 100%;
    padding: 12px;
    border: 2px solid #eee;
    border-radius: 8px;
    font-size: 16px;
    text-align: center;
    transition: border 0.3s;
}

.pse-input-box input:focus {
    border-color: #4a90e2;
    outline: none;
}

.pse-times {
    font-size: 24px;
    color: #999;
    padding-top: 25px;
}

.pse-input-box.full-width {
    max-width: 400px;
    margin: 0 auto 30px auto;
}

.pse-qty-display {
    font-size: 18px;
    font-weight: bold;
    margin-top: 10px;
    color: #4a90e2;
}
.pse-qty-display input {
    width: 80px !important;
    display: inline-block !important;
    color: #4a90e2;
}

/* 素材選択グリッド */
.pse-material-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.pse-card {
    position: relative;
    cursor: pointer;
}

.pse-card input {
    position: absolute;
    opacity: 0;
}

.pse-card-content {
    border: 2px solid #eee;
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s;
    height: 100%;
}

.pse-card .icon {
    font-size: 32px;
    color: #ccc;
    margin-bottom: 15px;
}

.pse-card h3 {
    margin: 0 0 10px 0;
    font-size: 16px;
}

.pse-card p {
    font-size: 13px;
    color: #777;
    margin: 0;
    line-height: 1.4;
}

.pse-card input:checked + .pse-card-content {
    border-color: #4a90e2;
    background-color: #f0f7ff;
    box-shadow: 0 5px 15px rgba(74, 144, 226, 0.2);
}

.pse-card input:checked + .pse-card-content .icon {
    color: #4a90e2;
}

/* アップロード選択 */
.pse-upload-type-selector {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
}

.type-btn {
    padding: 15px 30px;
    background: #f9f9f9;
    border-radius: 30px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s;
    border: 2px solid transparent;
}

.type-btn input {
    display: none;
}

.type-btn:has(input:checked) {
    background: #4a90e2;
    color: white;
    box-shadow: 0 4px 10px rgba(74, 144, 226, 0.3);
}

.pse-area-content {
    background: #f5f5f5;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 30px;
    text-align: center;
}

/* Canvas周り */
.pse-canvas-container {
    margin-top: 20px;
}
#pse-cutline-canvas {
    border: 1px dashed #ccc;
    background: #fff;
    cursor: crosshair;
    display: block;
    margin: 10px auto;
    max-width: 100%;
}
.pse-tool-btn {
    background: #e74c3c;
    color: white;
    border: none;
    padding: 5px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    margin-right: 15px;
}

/* 結果表示 */
.pse-result-card {
    background: #fafafa;
    border: 1px solid #eee;
    padding: 30px;
    border-radius: 10px;
    margin-bottom: 30px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.pse-result-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 15px;
}

.pse-result-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    font-weight: bold;
    font-size: 18px;
}

.pse-result-total .price {
    font-size: 28px;
    color: #e74c3c;
}

/* ボタン */
.pse-nav-buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
}

.pse-btn {
    padding: 12px 30px;
    border: none;
    border-radius: 30px;
    font-size: 16px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    font-weight: bold;
}

.pse-btn:hover {
    transform: translateY(-2px);
}

.pse-next, .pse-primary {
    background: #4a90e2;
    color: white;
    margin-left: auto;
}

.pse-prev {
    background: #e0e0e0;
    color: #555;
}

.pse-outline {
    background: white;
    border: 2px solid #4a90e2;
    color: #4a90e2;
}

.pse-action-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin: 30px 0;
}

.pse-message {
    margin-top: 20px;
    text-align: center;
    padding: 15px;
    border-radius: 5px;
    display: none;
}
.pse-message.success { background: #d4edda; color: #155724; }
.pse-message.error { background: #f8d7da; color: #721c24; }