/**
 * v5.3.4
 * assets/css/wizard-style.css
 * 役割: ウィザードのUIスタイル定義。
 * #psq-app-root 配下にスコープし、他テーマとの干渉を防ぐ。
 */

/* * ==========================================
 * CSS Isolation & Reset
 * ==========================================
 */
#psq-app-root {
    --psq-primary: #3b82f6;
    --psq-primary-light: #eff6ff;
    --psq-bg: #f3f4f6;
    --psq-card-bg: #ffffff;
    --psq-text: #333333;
    --psq-border: #e5e7eb;
    --psq-shadow: rgba(15, 23, 42, 0.12);
    --psq-header-grad: linear-gradient(120deg, #00adef 0%, #ec008c 35%, #ffe600 70%, #1a1a1a 100%);
    
    font-family: 'Noto Sans JP', sans-serif;
    font-size: 16px;
    line-height: 1.5;
    color: var(--psq-text);
    text-align: left;
    box-sizing: border-box;
    width: 100%;
    background-color: transparent; 
    margin: 20px 0;
}

#psq-app-root *, 
#psq-app-root *::before, 
#psq-app-root *::after { box-sizing: border-box; }

#psq-app-root h1, #psq-app-root h2, #psq-app-root h3, 
#psq-app-root p, #psq-app-root span, #psq-app-root div, 
#psq-app-root label, #psq-app-root ul, #psq-app-root li,
#psq-app-root dl, #psq-app-root dt, #psq-app-root dd {
    margin: 0; padding: 0; border: 0; font-size: 100%; font: inherit;
    vertical-align: baseline; background: transparent; text-decoration: none;
    list-style: none; box-shadow: none; text-shadow: none; letter-spacing: normal;
}

#psq-app-root input, #psq-app-root button {
    appearance: none; -webkit-appearance: none;
    background: transparent; border: none; border-radius: 0; box-shadow: none;
    margin: 0; padding: 0; font-family: inherit; font-size: inherit;
    line-height: inherit; outline: none; color: inherit;
}

#psq-app-root input[type="radio"], #psq-app-root input[type="checkbox"] {
    appearance: auto; -webkit-appearance: auto;
    width: auto; height: auto; margin-right: 8px;
    display: inline-block !important; opacity: 1 !important; visibility: visible !important;
    position: static !important; transform: scale(1.2); accent-color: var(--psq-primary);
}

#psq-app-root input[type=number]::-webkit-inner-spin-button, 
#psq-app-root input[type=number]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }

/* Application Styles */
#psq-app-root .psq-wrapper-inner { width: 100%; padding: 32px 16px 80px; display: flex; justify-content: center; background-color: var(--psq-bg); }
#psq-app-root .psq-card { width: 100%; max-width: 900px; background: var(--psq-card-bg); border-radius: 12px; box-shadow: 0 16px 40px var(--psq-shadow); overflow: hidden; position: relative; display: flex; flex-direction: column; margin: 0 auto; }

#psq-app-root .psq-header { background: var(--psq-header-grad); padding: 24px 32px; text-align: center; color: #ffffff; position: relative; z-index: 1; border-bottom: none; }
#psq-app-root .header-badge { display: inline-flex; align-items: center; justify-content: center; background: #ff0055; color: #ffffff; font-size: 14px; font-weight: 700; padding: 6px 18px; border-radius: 50px; margin-bottom: 12px; border: 2px solid #ffffff; animation: badgePulse 2s infinite; line-height: 1; }
@keyframes badgePulse { 0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.7); } 70% { transform: scale(1.05); box-shadow: 0 0 0 10px rgba(255, 255, 255, 0); } 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(255, 255, 255, 0); } }
#psq-app-root .psq-header h1 { font-size: 28px; font-weight: 700; margin-bottom: 8px; color: #ffffff; line-height: 1.2; border: none; }
#psq-app-root .psq-header p { font-size: 14px; opacity: 0.95; color: #ffffff; }

#psq-app-root .psq-progress-container { padding: 24px 48px 0; background: #fff; }
#psq-app-root .psq-progress-text { display: flex; justify-content: space-between; font-size: 14px; color: #666; margin-bottom: 8px; font-weight: 500; }
#psq-app-root .psq-progress-bar-bg { width: 100%; height: 8px; background: #e5e7eb; border-radius: 4px; overflow: hidden; }
#psq-app-root .psq-progress-bar-fill { height: 100%; background: var(--psq-primary); width: 0%; transition: width 0.3s ease; }

#psq-app-root .psq-card-body { padding: 32px 48px 48px; flex-grow: 1; background: #fff; }
#psq-app-root .step-content { display: none; animation: fadeIn 0.4s ease; }
#psq-app-root .step-content.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
#psq-app-root .step-title { font-size: 20px; font-weight: 700; margin-bottom: 24px; border-left: 5px solid var(--psq-primary); padding-left: 12px; line-height: 1.4; color: var(--psq-text); background: none; }

#psq-app-root .radio-group { display: flex; flex-direction: column; gap: 16px; }
#psq-app-root .radio-option { position: relative; border: 2px solid var(--psq-border); border-radius: 8px; padding: 16px 20px; cursor: pointer; transition: all 0.2s; display: flex; align-items: center; background-color: #fff; }
#psq-app-root .radio-option:hover { background-color: #f9fafb; }
#psq-app-root .radio-option.selected { border-color: var(--psq-primary); background-color: var(--psq-primary-light); }
#psq-app-root .radio-option.disabled { opacity: 0.6; cursor: not-allowed; background-color: #f3f4f6; border-color: #e5e7eb; }
#psq-app-root .radio-label { font-weight: 500; color: var(--psq-text); font-size: 16px; }

#psq-app-root .input-group { display: flex; gap: 16px; align-items: flex-end; }
#psq-app-root .input-wrapper { flex: 1; display: flex; flex-direction: column; position: relative; }
#psq-app-root .input-wrapper label { font-size: 13px; color: #64748b; margin-bottom: 6px; font-weight: 600; display: block; }
#psq-app-root .input-wrapper input { display: block; width: 100%; padding: 12px 16px; border: 1px solid var(--psq-border); border-radius: 8px; font-size: 16px; outline: none; transition: border-color 0.2s; background-color: #fff; color: var(--psq-text); height: auto; box-shadow: none; }
#psq-app-root .input-wrapper input:focus { border-color: var(--psq-primary); }
#psq-app-root .unit-label { position: absolute; right: 12px; bottom: 12px; color: #94a3b8; font-size: 14px; pointer-events: none; }

#psq-app-root .gen-container { display: flex; flex-direction: column; gap: 24px; }
#psq-app-root .gen-shape-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
@media (max-width: 640px) { #psq-app-root .gen-shape-grid { grid-template-columns: repeat(2, 1fr); } }

#psq-app-root .gen-shape-btn { border: 2px solid var(--psq-border); border-radius: 12px; background: white; padding: 16px 8px; cursor: pointer; transition: all 0.2s; display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100px; }
#psq-app-root .gen-shape-btn:hover { border-color: #cbd5e1; background: #f8fafc; }
#psq-app-root .gen-shape-btn.active { border-color: var(--psq-primary); background-color: var(--psq-primary-light); color: var(--psq-primary); }
#psq-app-root .gen-shape-btn svg { width: 32px; height: 32px; margin-bottom: 8px; stroke: #94a3b8; transition: stroke 0.2s; overflow: visible; }
#psq-app-root .gen-shape-btn.active svg { stroke: var(--psq-primary); }
#psq-app-root .gen-shape-label { font-size: 12px; font-weight: 700; color: var(--psq-text); }

#psq-app-root .gen-preview-area { width: 100%; border: 2px dashed #cbd5e1; border-radius: 12px; background-color: #fff; position: relative; overflow: hidden; display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 250px; cursor: pointer; transition: all 0.2s; padding: 20px; }
#psq-app-root .gen-preview-area:hover { background-color: #f8fafc; }
#psq-app-root .gen-preview-area.drag-over { border-color: var(--psq-primary); background-color: var(--psq-primary-light); }
#psq-app-root .checker-bg { background-image: linear-gradient(45deg, #eee 25%, transparent 25%), linear-gradient(-45deg, #eee 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #eee 75%), linear-gradient(-45deg, transparent 75%, #eee 75%); background-size: 20px 20px; background-position: 0 0, 0 10px, 10px -10px, -10px 0px; }
#psq-app-root .gen-preview-placeholder { text-align: center; pointer-events: none; }
#psq-app-root .gen-preview-placeholder p { color: #94a3b8; margin-bottom: 4px; }
#psq-app-root .gen-preview-content { width: 100%; display: none; justify-content: center; }
#psq-app-root .gen-preview-content .preview-actions { pointer-events: auto; margin-top: 12px; text-align: center; }
#psq-app-root #cutLineSvg { max-width: 100%; max-height: 400px; box-shadow: 0 4px 15px rgba(0,0,0,0.05); }

#psq-app-root .gen-controls { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; padding: 20px; background: #f8fafc; border-radius: 12px; border: 1px solid var(--psq-border); }
@media (max-width: 640px) { #psq-app-root .gen-controls { grid-template-columns: 1fr; gap: 16px; } }
#psq-app-root .gen-control-item { display: flex; flex-direction: column; }
#psq-app-root .gen-control-label { font-size: 13px; font-weight: 700; color: #333; margin-bottom: 8px; display: flex; justify-content: space-between; }

#psq-app-root input[type="range"] { -webkit-appearance: none; width: 100%; height: 6px; background: #e2e8f0; border-radius: 3px; outline: none; margin: 10px 0; padding: 0; border: none; }
#psq-app-root input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 20px; height: 20px; background: var(--psq-primary); border-radius: 50%; cursor: pointer; border: 2px solid white; box-shadow: 0 2px 4px rgba(0,0,0,0.2); }
#psq-app-root .gen-checkbox { display: flex; items-center; gap: 10px; padding: 12px; background: white; border: 1px solid var(--psq-border); border-radius: 6px; cursor: pointer; }
#psq-app-root .dpi-display { font-size: 12px; color: #666; margin-top: 8px; text-align: right; }
#psq-app-root .dpi-value { font-weight: bold; color: var(--psq-primary); font-size: 16px; }

#psq-app-root .loader { display: none; margin: 20px auto; text-align: center; }
#psq-app-root .spinner { width: 40px; height: 40px; border: 4px solid #f3f3f3; border-top: 4px solid var(--psq-primary); border-radius: 50%; animation: spin 1s linear infinite; margin: 0 auto 10px; display: inline-block; }
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

#psq-app-root .psq-footer { padding: 24px 48px; border-top: 1px solid #f1f5f9; display: flex; justify-content: space-between; align-items: center; background: #ffffff; position: sticky; bottom: 0; z-index: 10; gap: 16px; margin-top: auto; }
#psq-app-root .btn { padding: 12px 24px; border-radius: 8px; font-weight: 700; font-size: 16px; cursor: pointer; border: none; transition: all 0.2s; display: inline-flex; justify-content: center; align-items: center; line-height: 1.5; background: none; text-decoration: none; }
#psq-app-root .btn-secondary { background: #e2e8f0; color: #475569; min-width: 100px; }
#psq-app-root .btn-secondary:disabled { background: #f1f5f9; color: #cbd5e1; cursor: not-allowed; }
#psq-app-root .btn-primary { background: var(--psq-primary); color: white; box-shadow: 0 4px 6px -1px rgba(59, 130, 246, 0.4); flex: 1; width: auto; }
#psq-app-root .btn-primary:hover { background: #2563eb; }
#psq-app-root .btn-complete { background: #10b981; color: white; box-shadow: 0 4px 6px -1px rgba(16, 185, 129, 0.4); flex: 1; width: auto; }
#psq-app-root .hidden { display: none !important; }

/* Table Layout for Estimation Result */
#psq-app-root .quote-table-container {
    border: 1px solid var(--psq-border);
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 24px;
}

/* デザイン見出し行のスタイル */
#psq-app-root .quote-table-row-design-header {
    background-color: #f1f5f9;
    padding: 10px 16px;
    font-weight: 700;
    color: #334155;
    font-size: 14px;
    border-bottom: 1px solid #e2e8f0;
    grid-column: 1 / -1; 
}

#psq-app-root .quote-table-header {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    background-color: #f8fafc;
    border-bottom: 1px solid var(--psq-border);
    font-weight: 700;
    color: #64748b;
    font-size: 13px;
}

#psq-app-root .quote-table-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    border-bottom: 1px solid #f1f5f9;
    background-color: #fff;
}
#psq-app-root .quote-table-row:last-child { border-bottom: none; }

#psq-app-root .quote-cell {
    padding: 12px 16px;
    display: flex;
    align-items: center;
    font-size: 14px;
}

#psq-app-root .cell-item { 
    display: block; 
    color: var(--psq-text); 
}
#psq-app-root .item-details {
    font-size: 12px;
    color: #64748b;
    display: block;
    margin-top: 4px;
}

#psq-app-root .cell-unitprice,
#psq-app-root .cell-quantity,
#psq-app-root .cell-price {
    justify-content: flex-end;
    text-align: right;
    white-space: nowrap;
}

#psq-app-root .cell-price {
    font-weight: 700;
}

#psq-app-root .price-summary-list {
    width: 100%;
    max-width: 300px;
    margin-left: auto;
}

#psq-app-root .price-summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 14px;
}

#psq-app-root .price-summary-row dt { color: #64748b; }
#psq-app-root .price-summary-row dd { font-weight: 700; color: var(--psq-text); }

#psq-app-root .total-row {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 2px solid var(--psq-border);
    font-size: 18px;
}
#psq-app-root .total-row dt { color: var(--psq-text); }
#psq-app-root .total-row dd { color: #ef4444; font-size: 24px; }

#psq-app-root .form-section-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--psq-text);
}

/* ==========================================
 * Step 9 — 宛名・アクションボタン・モーダル
 * ==========================================
 */

/* 注記テキスト */
#psq-app-root .psq-note {
    font-size: 12px;
    color: #64748b;
    margin-top: 8px;
    margin-bottom: 24px;
    text-align: center;
}

/* 宛名セクション */
#psq-app-root .psq-customer-section {
    background: #f8fafc;
    border: 1px solid var(--psq-border);
    border-radius: 10px;
    padding: 20px 24px;
    margin-bottom: 24px;
}

#psq-app-root .psq-section-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--psq-text);
    margin-bottom: 14px;
    padding-left: 10px;
    border-left: 4px solid var(--psq-primary);
}

/* エラーメッセージ */
#psq-app-root .psq-error-msg {
    font-size: 13px;
    color: #ef4444;
    margin-top: 6px;
    font-weight: 600;
}

/* アクションボタンエリア */
#psq-app-root .psq-action-buttons {
    display: flex;
    flex-direction: row;
    gap: 16px;
    margin-top: 8px;
    margin-bottom: 8px;
}

/* PDF ダウンロードボタン */
#psq-app-root .psq-btn-pdf {
    background: linear-gradient(135deg, #6366f1 0%, #3b82f6 100%);
    color: #ffffff;
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 20px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 700;
    box-shadow: 0 4px 10px rgba(99, 102, 241, 0.35);
    transition: background 0.2s, box-shadow 0.2s, transform 0.1s;
    border: none;
    cursor: pointer;
    line-height: 1.4;
}
#psq-app-root .psq-btn-pdf:hover:not(:disabled) {
    background: linear-gradient(135deg, #4f52e8 0%, #2563eb 100%);
    box-shadow: 0 6px 14px rgba(99, 102, 241, 0.45);
    transform: translateY(-1px);
}
#psq-app-root .psq-btn-pdf:disabled {
    background: #94a3b8;
    box-shadow: none;
    cursor: not-allowed;
    transform: none;
}

/* 製作依頼ボタン */
#psq-app-root .psq-btn-order {
    background: linear-gradient(135deg, #059669 0%, #10b981 100%);
    color: #ffffff;
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 20px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 700;
    box-shadow: 0 4px 10px rgba(16, 185, 129, 0.35);
    transition: background 0.2s, box-shadow 0.2s, transform 0.1s;
    border: none;
    cursor: pointer;
    line-height: 1.4;
}
#psq-app-root .psq-btn-order:hover:not(:disabled) {
    background: linear-gradient(135deg, #047857 0%, #059669 100%);
    box-shadow: 0 6px 14px rgba(16, 185, 129, 0.45);
    transform: translateY(-1px);
}
#psq-app-root .psq-btn-order:disabled {
    background: #94a3b8;
    box-shadow: none;
    cursor: not-allowed;
    transform: none;
}

/* テキストエリア */
#psq-app-root .psq-textarea {
    display: block;
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--psq-border);
    border-radius: 8px;
    font-size: 15px;
    font-family: inherit;
    line-height: 1.6;
    color: var(--psq-text);
    background: #fff;
    resize: vertical;
    outline: none;
    transition: border-color 0.2s;
    box-sizing: border-box;
}
#psq-app-root .psq-textarea:focus {
    border-color: var(--psq-primary);
}

/* ==========================================
 * モーダル
 * ==========================================
 */
#psq-app-root .psq-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9000;
    padding: 16px;
    -webkit-overflow-scrolling: touch;
}

#psq-app-root .psq-modal-content {
    background: #ffffff;
    border-radius: 14px;
    box-shadow: 0 20px 60px rgba(15, 23, 42, 0.25);
    padding: 32px;
    width: 100%;
    max-width: 520px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    -webkit-overflow-scrolling: touch;
}

#psq-app-root .psq-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    background: #f1f5f9;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    padding: 0;
    transition: background 0.2s, color 0.2s;
}
#psq-app-root .psq-modal-close:hover {
    background: #e2e8f0;
    color: #334155;
}

#psq-app-root .psq-modal-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--psq-text);
    margin-bottom: 8px;
    padding-right: 40px;
}

#psq-app-root .psq-modal-footer {
    display: flex;
    gap: 12px;
    margin-top: 20px;
    justify-content: flex-end;
}

/* ==========================================
 * 配送方法ステップ (Step 9) — セレクトボックス
 * ==========================================
 */

#psq-app-root .psq-select-wrapper {
    position: relative;
    display: inline-block;
    width: 100%;
    max-width: 400px;
}

#psq-app-root .psq-select {
    display: block;
    width: 100%;
    padding: 12px 44px 12px 16px;
    border: 1px solid var(--psq-border);
    border-radius: 8px;
    font-size: 16px;
    font-family: inherit;
    color: var(--psq-text);
    background-color: #fff;
    /* カスタム矢印（Safari/iOS 完全対応） */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2394a3b8' stroke-width='1.8' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    -webkit-appearance: none;
    appearance: none;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    cursor: pointer;
    box-shadow: none;
    line-height: 1.5;
}

#psq-app-root .psq-select:focus {
    border-color: var(--psq-primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

#psq-app-root .psq-select:disabled {
    background-color: #f3f4f6;
    color: #94a3b8;
    cursor: not-allowed;
}

/* ==========================================
 * デザイン追加ステップ (Step 8.5)
 * ==========================================
 */

/* ボタンコンテナ: PC は横並び */
#psq-app-root .psq-add-design-buttons {
    display: flex;
    flex-direction: row;
    gap: 16px;
    justify-content: center;
    margin-top: 8px;
}

/* 「はい、追加します」ボタン — 緑 */
#psq-app-root .psq-btn-add-yes {
    background: #16a34a;
    color: #ffffff;
    flex: 1;
    max-width: 320px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 16px 24px;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 700;
    border: none;
    cursor: pointer;
    transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
    box-shadow: 0 4px 10px rgba(22, 163, 74, 0.35);
    line-height: 1.4;
}
#psq-app-root .psq-btn-add-yes:hover {
    background: #15803d;
    box-shadow: 0 6px 14px rgba(22, 163, 74, 0.45);
    transform: translateY(-2px);
}
#psq-app-root .psq-btn-add-yes:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(22, 163, 74, 0.3);
}

/* 「いいえ、見積もりへ進みます」ボタン — オレンジ */
#psq-app-root .psq-btn-add-no {
    background: #ea580c;
    color: #ffffff;
    flex: 1;
    max-width: 320px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 16px 24px;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 700;
    border: none;
    cursor: pointer;
    transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
    box-shadow: 0 4px 10px rgba(234, 88, 12, 0.35);
    line-height: 1.4;
}
#psq-app-root .psq-btn-add-no:hover {
    background: #c2410c;
    box-shadow: 0 6px 14px rgba(234, 88, 12, 0.45);
    transform: translateY(-2px);
}
#psq-app-root .psq-btn-add-no:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(234, 88, 12, 0.3);
}

/* ==========================================
 * Step 9.5: 見積もり作成ステップ
 * ==========================================
 */
#psq-app-root .psq-create-quote-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 56px 24px 48px;
    text-align: center;
    gap: 0;
}

#psq-app-root .psq-create-quote-subtitle {
    font-size: 12px;
    font-weight: 700;
    color: #94a3b8;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin-bottom: 12px;
}

#psq-app-root .psq-create-quote-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--psq-text);
    margin-bottom: 48px;
    line-height: 1.4;
}

/* 「見積もりを作成」ボタン — レッド */
#psq-app-root .psq-btn-create-quote {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #dc2626;
    color: #ffffff;
    font-size: 18px;
    font-weight: 700;
    padding: 18px 52px;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 18px rgba(220, 38, 38, 0.38);
    transition: background 0.2s, box-shadow 0.2s, transform 0.12s;
    min-width: 240px;
    line-height: 1.4;
}
#psq-app-root .psq-btn-create-quote:hover {
    background: #b91c1c;
    box-shadow: 0 8px 26px rgba(220, 38, 38, 0.48);
    transform: translateY(-2px);
}
#psq-app-root .psq-btn-create-quote:active {
    transform: translateY(1px);
    box-shadow: 0 2px 8px rgba(220, 38, 38, 0.28);
}

/* ローディングエリア */
#psq-app-root #createQuoteLoading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    padding: 8px 0;
}
#psq-app-root .psq-create-quote-spinner {
    width: 48px;
    height: 48px;
    border-width: 4px;
}
#psq-app-root .psq-create-quote-loading-text {
    font-size: 16px;
    font-weight: 700;
    color: #64748b;
}

/* ==========================================
 * 送信完了モーダル
 * ==========================================
 */
#psq-app-root .psq-complete-modal-content {
    text-align: center;
    padding: 48px 40px 40px;
    max-width: 460px;
}
#psq-app-root .psq-complete-icon {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 24px;
    animation: completeIconPop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
@keyframes completeIconPop {
    from { transform: scale(0.5); opacity: 0; }
    to   { transform: scale(1);   opacity: 1; }
}
#psq-app-root .psq-complete-title {
    font-size: 22px;
    font-weight: 700;
    color: #111827;
    margin-bottom: 16px;
    line-height: 1.4;
}
#psq-app-root .psq-complete-message {
    font-size: 14px;
    color: #4b5563;
    line-height: 1.75;
    margin-bottom: 32px;
}
#psq-app-root .psq-btn-complete-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--psq-primary);
    color: #ffffff;
    font-size: 15px;
    font-weight: 700;
    padding: 14px 40px;
    border-radius: 8px;
    cursor: pointer;
    border: none;
    transition: background 0.2s, transform 0.12s;
    min-width: 160px;
}
#psq-app-root .psq-btn-complete-close:hover {
    background: #2563eb;
    transform: translateY(-1px);
}
#psq-app-root .psq-btn-complete-close:active {
    background: #1d4ed8;
    transform: translateY(1px);
}

/* ==========================================
 * モバイル対応 (640px以下)
 * ==========================================
 */
@media screen and (max-width: 640px) {
    #psq-app-root .psq-wrapper-inner { padding: 0; }
    #psq-app-root .psq-card { border-radius: 0; box-shadow: none; min-height: 100vh; padding-bottom: 80px; }
    #psq-app-root .psq-header { padding: 20px; }
    #psq-app-root .psq-progress-container { padding: 16px 20px 0; }
    #psq-app-root .psq-card-body { padding: 24px 20px; }
    #psq-app-root .psq-footer { padding: 16px 20px; padding-bottom: calc(16px + env(safe-area-inset-bottom)); }

    /* Mobile Table Optimization */
    #psq-app-root .quote-table-header { display: none; }
    
    #psq-app-root .quote-table-row-design-header {
        font-size: 13px;
        padding: 8px 12px;
    }

    #psq-app-root .quote-table-row { 
        grid-template-columns: 1fr 1fr; 
        padding: 12px;
        gap: 8px;
    }
    #psq-app-root .cell-item { grid-column: 1 / -1; padding: 0; margin-bottom: 8px; }
    #psq-app-root .cell-unitprice { grid-column: 1; text-align: left; justify-content: flex-start; padding: 0; color: #64748b; font-size: 12px; }
    #psq-app-root .cell-unitprice::before { content: "単価: "; }
    #psq-app-root .cell-quantity { grid-column: 2; padding: 0; font-size: 12px; }
    #psq-app-root .cell-quantity::before { content: "数量: "; color: #64748b; }
    #psq-app-root .cell-price { grid-column: 2; padding: 0; margin-top: 4px; font-size: 16px; }
    #psq-app-root .price-summary-list { max-width: 100%; margin-top: 24px; }

    /* モバイル: アクションボタン縦並び */
    #psq-app-root .psq-action-buttons {
        flex-direction: column;
    }
    #psq-app-root .psq-btn-pdf,
    #psq-app-root .psq-btn-order {
        width: 100%;
        flex: none;
    }

    /* モバイル: モーダル */
    #psq-app-root .psq-modal-content {
        padding: 24px 20px;
        max-height: 85vh;
    }
    #psq-app-root .psq-modal-footer {
        flex-direction: column;
    }
    #psq-app-root .psq-modal-footer .btn {
        width: 100%;
    }

    /* モバイル: デザイン追加ボタン縦並び */
    #psq-app-root .psq-add-design-buttons {
        flex-direction: column;
        align-items: stretch;
    }
    #psq-app-root .psq-btn-add-yes,
    #psq-app-root .psq-btn-add-no {
        max-width: 100%;
        flex: none;
    }

    /* モバイル: デザインインジケーター */
    #psq-app-root #psq-design-indicator {
        padding: 8px 20px;
    }

    /* モバイル: 都道府県セレクト */
    #psq-app-root .psq-select-wrapper {
        max-width: 100%;
    }
    #psq-app-root .psq-select {
        font-size: 16px; /* iOS Safariでズームインを防ぐため16px固定 */
    }

    /* モバイル: 送信完了モーダル */
    #psq-app-root .psq-complete-modal-content {
        padding: 36px 20px 32px;
    }
    #psq-app-root .psq-complete-title {
        font-size: 18px;
    }
    #psq-app-root .psq-btn-complete-close {
        width: 100%;
        min-width: unset;
    }

    /* モバイル: 見積もり作成ステップ */
    #psq-app-root .psq-create-quote-wrap {
        padding: 40px 16px 32px;
    }
    #psq-app-root .psq-create-quote-title {
        font-size: 20px;
        margin-bottom: 36px;
    }
    #psq-app-root .psq-btn-create-quote {
        width: 100%;
        min-width: unset;
        padding: 18px 24px;
        font-size: 17px;
    }
}