/* =============================================
   Chat-Store Widget v1.6
   ============================================= */

/* グローバルリセット（高さ系は除外） */
#cs-widget-root *,
#cs-widget-root *::before,
#cs-widget-root *::after {
    box-sizing: border-box !important;
    float: none !important;
    letter-spacing: normal !important;
    text-transform: none !important;
    text-indent: 0 !important;
}

/* ウィジェット本体 */
#cs-widget-root {
    --cs-main-color: #2563eb;
    --cs-main-color-hover: #1d4ed8;
    --cs-buy-color: #dc2626;
    --cs-buy-color-hover: #b91c1c;
    --cs-bg-color: #f8f9fa;
    --cs-font-size: 14px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Sans", "Noto Sans JP", sans-serif !important;
    position: fixed !important;
    bottom: 24px !important;
    right: 24px !important;
    left: auto !important;
    top: auto !important;
    z-index: 99999 !important;
    display: block !important;
    width: auto !important;
    height: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    background: none !important;
    box-shadow: none !important;
    overflow: visible !important;
    line-height: normal !important;
    color: #333 !important;
    text-align: left !important;
}

/* ======= ランチャー ======= */
#cs-widget-root .chat-store-launcher {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: flex-end !important;
    justify-content: flex-end !important;
    gap: 12px !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: relative !important;
    transform: none !important;
    overflow: visible !important;
}
#cs-widget-root.cs-open .chat-store-launcher {
    display: none !important;
}

#cs-widget-root .chat-store-welcome-bubble {
    background: #fff !important;
    color: #333 !important;
    padding: 10px 16px !important;
    margin: 0 !important;
    border: none !important;
    border-radius: 16px !important;
    border-bottom-right-radius: 4px !important;
    box-shadow: 0 2px 12px rgba(0,0,0,0.12) !important;
    font-size: 13px !important;
    line-height: 1.5 !important;
    max-width: 240px !important;
    cursor: pointer !important;
    word-break: break-word !important;
}
#cs-widget-root .chat-store-welcome-bubble:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.18) !important;
}

#cs-widget-root .chat-store-toggle {
    width: 60px !important;
    height: 60px !important;
    min-width: 60px !important;
    min-height: 60px !important;
    border-radius: 50% !important;
    background: var(--cs-main-color, #2563eb) !important;
    color: #fff !important;
    border: none !important;
    cursor: pointer !important;
    font-size: 28px !important;
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    align-items: center !important;
    justify-content: center !important;
    box-shadow: 0 4px 16px rgba(0,0,0,0.2) !important;
    padding: 0 !important;
    margin: 0 !important;
    flex-shrink: 0 !important;
    -webkit-appearance: none !important;
    appearance: none !important;
    position: relative !important;
    transform: none !important;
}
#cs-widget-root .chat-store-toggle:hover {
    background: var(--cs-main-color-hover, #1d4ed8) !important;
}
#cs-widget-root .chat-store-toggle img {
    width: 32px !important;
    height: 32px !important;
    object-fit: contain !important;
    border-radius: 50% !important;
    border: none !important;
    box-shadow: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* ======= チャット本体 ======= */
#cs-widget-root .chat-store-body {
    display: none !important;
}
#cs-widget-root.cs-open .chat-store-body {
    display: flex !important;
    flex-direction: column !important;
    flex-wrap: nowrap !important;
    width: 400px !important;
    max-width: calc(100vw - 32px) !important;
    height: 520px !important;
    max-height: calc(100dvh - 48px) !important;
    border: 1px solid #e0e0e0 !important;
    border-radius: 12px !important;
    overflow: hidden !important;
    background: #fff !important;
    box-shadow: 0 4px 24px rgba(0,0,0,0.15) !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* ======= ヘッダー ======= */
#cs-widget-root .chat-store-header {
    background: var(--cs-main-color) !important;
    color: #fff !important;
    padding: 14px 20px !important;
    margin: 0 !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    line-height: 1.4 !important;
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    gap: 8px !important;
    cursor: pointer !important;
    border: none !important;
    flex-shrink: 0 !important;
}
#cs-widget-root .chat-store-header-close {
    margin: 0 0 0 auto !important;
    background: none !important;
    border: none !important;
    color: #fff !important;
    font-size: 22px !important;
    cursor: pointer !important;
    padding: 0 4px !important;
    line-height: 1 !important;
    opacity: 0.8 !important;
    width: auto !important;
    height: auto !important;
}
#cs-widget-root .chat-store-header-close:hover {
    opacity: 1 !important;
}
#cs-widget-root .chat-store-header-icon {
    width: var(--cs-header-icon-size, 24px) !important;
    height: var(--cs-header-icon-size, 24px) !important;
    object-fit: contain !important;
    flex-shrink: 0 !important;
    border: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
}
#cs-widget-root .chat-store-header-emoji {
    flex-shrink: 0 !important;
}

/* ======= メッセージエリア（スクロール） ======= */
#cs-widget-root .chat-store-messages {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    -webkit-overflow-scrolling: touch !important;
    padding: 16px !important;
    margin: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    flex-wrap: nowrap !important;
    gap: 12px !important;
    background: var(--cs-bg-color) !important;
    border: none !important;
    width: auto !important;
}

/* スクロールバー（常時表示） */
#cs-widget-root .chat-store-messages::-webkit-scrollbar {
    width: 6px !important;
}
#cs-widget-root .chat-store-messages::-webkit-scrollbar-track {
    background: transparent !important;
}
#cs-widget-root .chat-store-messages::-webkit-scrollbar-thumb {
    background: #c0c0c0 !important;
    border-radius: 3px !important;
}
#cs-widget-root .chat-store-messages::-webkit-scrollbar-thumb:hover {
    background: #999 !important;
}

/* Firefox用スクロールバー */
#cs-widget-root .chat-store-messages {
    scrollbar-width: thin !important;
    scrollbar-color: #c0c0c0 transparent !important;
}

/* ======= メッセージ吹き出し ======= */
#cs-widget-root .chat-store-msg-row {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: flex-end !important;
    gap: 8px !important;
    align-self: flex-start !important;
    max-width: 85% !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    width: auto !important;
    flex-shrink: 0 !important;
}
#cs-widget-root .chat-store-msg-icon {
    flex-shrink: 0 !important;
    width: var(--cs-msg-icon-size, 28px) !important;
    min-width: var(--cs-msg-icon-size, 28px) !important;
    height: var(--cs-msg-icon-size, 28px) !important;
    min-height: var(--cs-msg-icon-size, 28px) !important;
    border-radius: 50% !important;
    background: #e2e8f0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 14px !important;
    overflow: hidden !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
}
#cs-widget-root .chat-store-msg-icon img {
    width: var(--cs-msg-icon-size, 28px) !important;
    height: var(--cs-msg-icon-size, 28px) !important;
    min-width: var(--cs-msg-icon-size, 28px) !important;
    min-height: var(--cs-msg-icon-size, 28px) !important;
    object-fit: cover !important;
    border-radius: 50% !important;
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    box-shadow: none !important;
}
#cs-widget-root .chat-store-msg {
    max-width: 80% !important;
    padding: 10px 14px !important;
    margin: 0 !important;
    border-radius: 16px !important;
    font-size: var(--cs-font-size) !important;
    line-height: 1.6 !important;
    word-break: break-word !important;
    white-space: pre-wrap !important;
    width: auto !important;
    flex-shrink: 0 !important;
}
#cs-widget-root .chat-store-msg-row .chat-store-msg {
    max-width: none !important;
    flex: 1 1 auto !important;
}
#cs-widget-root .chat-store-msg.user {
    align-self: flex-end !important;
    background: var(--cs-main-color) !important;
    color: #fff !important;
    border: none !important;
    border-bottom-right-radius: 4px !important;
}
#cs-widget-root .chat-store-msg.assistant {
    align-self: flex-start !important;
    background: #fff !important;
    color: #333 !important;
    border: 1px solid #e0e0e0 !important;
    border-bottom-left-radius: 4px !important;
}

/* タイピング */
#cs-widget-root .chat-store-typing {
    align-self: flex-start !important;
    padding: 10px 14px !important;
    margin: 0 !important;
    background: #fff !important;
    border: 1px solid #e0e0e0 !important;
    border-radius: 16px !important;
    border-bottom-left-radius: 4px !important;
    font-size: 14px !important;
    color: #999 !important;
    flex-shrink: 0 !important;
}
#cs-widget-root .chat-store-typing span {
    animation: csTypingDots 1.4s infinite !important;
    display: inline-block !important;
}
#cs-widget-root .chat-store-typing span:nth-child(2) { animation-delay: 0.2s !important; }
#cs-widget-root .chat-store-typing span:nth-child(3) { animation-delay: 0.4s !important; }
@keyframes csTypingDots {
    0%, 20% { opacity: 0.3; }
    50% { opacity: 1; }
    100% { opacity: 0.3; }
}

/* ======= 入力エリア ======= */
#cs-widget-root .chat-store-input-area {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    border-top: 1px solid #e0e0e0 !important;
    padding: 12px !important;
    gap: 8px !important;
    background: #fff !important;
    margin: 0 !important;
    flex-shrink: 0 !important;
}
#cs-widget-root .chat-store-input-area input {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    border: 1px solid #ddd !important;
    border-radius: 24px !important;
    padding: 10px 16px !important;
    font-size: 14px !important;
    line-height: 1.4 !important;
    outline: none !important;
    background: #fff !important;
    color: #333 !important;
    margin: 0 !important;
    width: auto !important;
    height: auto !important;
    -webkit-appearance: none !important;
    appearance: none !important;
}
#cs-widget-root .chat-store-input-area input:focus {
    border-color: var(--cs-main-color) !important;
}
#cs-widget-root .chat-store-input-area button {
    background: var(--cs-main-color) !important;
    color: #fff !important;
    border: none !important;
    border-radius: 24px !important;
    padding: 10px 20px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    line-height: 1.4 !important;
    cursor: pointer !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
    margin: 0 !important;
    width: auto !important;
    height: auto !important;
    text-align: center !important;
    display: inline-block !important;
}
#cs-widget-root .chat-store-input-area button:hover {
    background: var(--cs-main-color-hover) !important;
}
#cs-widget-root .chat-store-input-area button:disabled {
    background: #94a3b8 !important;
    cursor: not-allowed !important;
}

/* ======= 商品カード ======= */
#cs-widget-root .chat-store-product-card {
    background: #fff !important;
    border: 1px solid #e0e0e0 !important;
    border-radius: 12px !important;
    overflow: hidden !important;
    margin: 0 !important;
    padding: 0 !important;
    max-width: 85% !important;
    align-self: flex-start !important;
    display: block !important;
    flex-shrink: 0 !important;
}
#cs-widget-root .chat-store-product-card img {
    display: block !important;
    width: 100% !important;
    height: 180px !important;
    object-fit: cover !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}
#cs-widget-root .chat-store-product-card-body {
    padding: 14px !important;
    margin: 0 !important;
}
#cs-widget-root .chat-store-product-card-body h3 {
    margin: 0 0 8px !important;
    padding: 0 !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    color: #222 !important;
    line-height: 1.4 !important;
    border: none !important;
    background: none !important;
}
#cs-widget-root .chat-store-product-price {
    margin: 4px 0 0 !important;
    font-size: 20px !important;
    font-weight: 700 !important;
    color: var(--cs-buy-color) !important;
    line-height: 1.4 !important;
}
#cs-widget-root .chat-store-price-tax {
    font-size: 12px !important;
    font-weight: 400 !important;
    color: #888 !important;
    margin-left: 2px !important;
}
#cs-widget-root .chat-store-variation-list {
    list-style: none !important;
    padding: 0 !important;
    margin: 10px 0 0 !important;
    border-top: 1px solid #eee !important;
}
#cs-widget-root .chat-store-variation-list li {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding: 8px 0 !important;
    margin: 0 !important;
    border-bottom: 1px solid #f0f0f0 !important;
    font-size: 13px !important;
    line-height: 1.4 !important;
}
#cs-widget-root .chat-store-variation-list li:last-child {
    border-bottom: none !important;
}
#cs-widget-root .chat-store-variation-price {
    font-weight: 700 !important;
    color: var(--cs-buy-color) !important;
    white-space: nowrap !important;
}
#cs-widget-root .chat-store-variation-stock {
    font-size: 11px !important;
    color: #999 !important;
    margin-left: 6px !important;
    white-space: nowrap !important;
}
#cs-widget-root .chat-store-variation-stock.out {
    color: var(--cs-buy-color) !important;
}
#cs-widget-root .chat-store-variation-stock.low {
    color: #e97316 !important;
    font-weight: 600 !important;
}

/* ======= 選択肢ボタン ======= */
#cs-widget-root .chat-store-choices {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
    margin: 0 !important;
    padding: 0 !important;
    max-width: 85% !important;
    align-self: flex-start !important;
    flex-shrink: 0 !important;
}
#cs-widget-root .chat-store-choice-btn {
    padding: 9px 18px !important;
    margin: 0 !important;
    border: 2px solid var(--cs-main-color) !important;
    border-radius: 20px !important;
    background: #fff !important;
    color: var(--cs-main-color) !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    line-height: 1.4 !important;
    cursor: pointer !important;
    white-space: nowrap !important;
    text-align: center !important;
    width: auto !important;
    height: auto !important;
}
#cs-widget-root .chat-store-choice-btn:hover {
    background: var(--cs-main-color) !important;
    color: #fff !important;
}
#cs-widget-root .chat-store-choice-btn.selected {
    background: var(--cs-main-color) !important;
    color: #fff !important;
}
#cs-widget-root .chat-store-choice-btn:disabled {
    opacity: 0.5 !important;
    cursor: not-allowed !important;
    pointer-events: none !important;
}
#cs-widget-root .chat-store-choice-btn:disabled:not(.selected) {
    border-color: #cbd5e1 !important;
    color: #94a3b8 !important;
}
#cs-widget-root .chat-store-choice-other {
    border-style: dashed !important;
    color: #64748b !important;
}
#cs-widget-root .chat-store-choice-other:hover {
    color: var(--cs-main-color) !important;
}

/* ======= 購入・質問ボタン ======= */
#cs-widget-root .chat-store-action-buttons {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    gap: 8px !important;
    width: 85% !important;
    align-self: flex-start !important;
    margin: 0 !important;
    padding: 0 !important;
    align-items: stretch !important;
    flex-shrink: 0 !important;
}
#cs-widget-root .chat-store-buy-btn,
#cs-widget-root .chat-store-ask-btn {
    flex: 1 1 0 !important;
    min-width: 0 !important;
    padding: 12px 8px !important;
    margin: 0 !important;
    border: 2px solid transparent !important;
    border-radius: 8px !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    line-height: 1.4 !important;
    cursor: pointer !important;
    text-align: center !important;
    white-space: nowrap !important;
    width: auto !important;
    height: auto !important;
    display: block !important;
}
#cs-widget-root .chat-store-buy-btn {
    background: var(--cs-buy-color) !important;
    color: #fff !important;
    border-color: var(--cs-buy-color) !important;
}
#cs-widget-root .chat-store-buy-btn:hover {
    background: var(--cs-buy-color-hover) !important;
    border-color: var(--cs-buy-color-hover) !important;
}
#cs-widget-root .chat-store-ask-btn {
    background: #fff !important;
    color: var(--cs-main-color) !important;
    border-color: var(--cs-main-color) !important;
}
#cs-widget-root .chat-store-ask-btn:hover {
    background: var(--cs-main-color) !important;
    color: #fff !important;
}
#cs-widget-root .chat-store-buy-btn.clicked,
#cs-widget-root .chat-store-ask-btn.clicked {
    background: #94a3b8 !important;
    color: #fff !important;
    border-color: #94a3b8 !important;
    cursor: not-allowed !important;
    pointer-events: none !important;
}

/* インライン購入ボタン */
#cs-widget-root .chat-store-inline-buy-btn {
    align-self: flex-start !important;
    margin: 0 !important;
    padding: 10px 24px !important;
    background: var(--cs-buy-color) !important;
    color: #fff !important;
    border: 2px solid var(--cs-buy-color) !important;
    border-radius: 8px !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    line-height: 1.4 !important;
    cursor: pointer !important;
    white-space: nowrap !important;
    text-align: center !important;
    width: auto !important;
    height: auto !important;
    flex-shrink: 0 !important;
}
#cs-widget-root .chat-store-inline-buy-btn:hover {
    background: var(--cs-buy-color-hover) !important;
    border-color: var(--cs-buy-color-hover) !important;
}
#cs-widget-root .chat-store-inline-buy-btn.clicked {
    background: #94a3b8 !important;
    border-color: #94a3b8 !important;
    cursor: not-allowed !important;
    pointer-events: none !important;
}

/* ======= 配送方法選択 ======= */
#cs-widget-root .chat-store-shipping-select {
    max-width: 85% !important;
    align-self: flex-start !important;
    margin: 0 !important;
    padding: 0 !important;
    flex-shrink: 0 !important;
}
#cs-widget-root .chat-store-shipping-title {
    font-size: 13px !important;
    color: #555 !important;
    margin: 0 0 8px !important;
    font-weight: 500 !important;
}
#cs-widget-root .chat-store-shipping-btn {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    justify-content: space-between !important;
    align-items: center !important;
    width: 100% !important;
    padding: 10px 14px !important;
    margin: 0 0 6px !important;
    border: 2px solid #e0e0e0 !important;
    border-radius: 8px !important;
    background: #fff !important;
    font-size: 14px !important;
    line-height: 1.4 !important;
    cursor: pointer !important;
    text-align: left !important;
    height: auto !important;
}
#cs-widget-root .chat-store-shipping-btn:hover {
    border-color: var(--cs-main-color) !important;
    background: #eff6ff !important;
}
#cs-widget-root .chat-store-shipping-btn.selected {
    border-color: var(--cs-main-color) !important;
    background: #dbeafe !important;
}
#cs-widget-root .chat-store-shipping-btn:disabled {
    opacity: 0.6 !important;
    cursor: not-allowed !important;
    pointer-events: none !important;
}
#cs-widget-root .chat-store-shipping-btn .label {
    font-weight: 600 !important;
    color: #333 !important;
}
#cs-widget-root .chat-store-shipping-btn .price {
    font-weight: 600 !important;
    color: var(--cs-buy-color) !important;
}

/* ======= 決済ボタン ======= */
#cs-widget-root .chat-store-payment-buttons {
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
    margin: 0 !important;
    padding: 0 !important;
    max-width: 85% !important;
    align-self: flex-start !important;
    flex-shrink: 0 !important;
}
#cs-widget-root .chat-store-payment-btn {
    display: block !important;
    width: 100% !important;
    padding: 12px 16px !important;
    margin: 0 !important;
    border: 2px solid #e0e0e0 !important;
    border-radius: 8px !important;
    background: #fff !important;
    font-size: 14px !important;
    line-height: 1.4 !important;
    cursor: pointer !important;
    text-align: left !important;
    height: auto !important;
}
#cs-widget-root .chat-store-payment-btn:hover {
    border-color: var(--cs-main-color) !important;
    background: #eff6ff !important;
}
#cs-widget-root .chat-store-payment-btn .label {
    font-weight: 600 !important;
    color: #333 !important;
}
#cs-widget-root .chat-store-payment-btn .desc {
    font-size: 12px !important;
    color: #888 !important;
    margin-top: 2px !important;
}

/* 入力フォーム */
#cs-widget-root .chat-store-input-form {
    all: unset !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
    background: #fff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 12px !important;
    padding: 14px !important;
    margin: 4px 8px 4px 36px !important;
    box-sizing: border-box !important;
    width: auto !important;
    max-width: calc(100% - 44px) !important;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Sans", "Noto Sans JP", sans-serif !important;
}
#cs-widget-root .chat-store-input-form.chat-store-form-submitted {
    opacity: 0.6 !important;
    pointer-events: none !important;
}
#cs-widget-root .chat-store-form-field {
    all: unset !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 4px !important;
    width: 100% !important;
    box-sizing: border-box !important;
}
#cs-widget-root .chat-store-form-label {
    all: unset !important;
    display: block !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    color: #64748b !important;
    line-height: 1.4 !important;
    margin: 0 !important;
    padding: 0 !important;
}
#cs-widget-root .chat-store-input-form input.chat-store-form-input,
#cs-widget-root .chat-store-input-form input.chat-store-form-input[type="text"],
#cs-widget-root .chat-store-input-form input.chat-store-form-input[type="tel"],
#cs-widget-root .chat-store-input-form input.chat-store-form-input[type="email"] {
    all: unset !important;
    display: block !important;
    width: 100% !important;
    box-sizing: border-box !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 8px !important;
    padding: 9px 12px !important;
    font-size: 14px !important;
    line-height: 1.4 !important;
    font-family: inherit !important;
    background: #f8fafc !important;
    color: #1e293b !important;
    margin: 0 !important;
    height: auto !important;
    min-height: 0 !important;
    max-width: 100% !important;
    -webkit-appearance: none !important;
    appearance: none !important;
}
#cs-widget-root .chat-store-input-form input.chat-store-form-input:focus {
    border-color: var(--cs-main-color) !important;
    background: #fff !important;
    outline: none !important;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15) !important;
}
#cs-widget-root .chat-store-input-form input.chat-store-form-input.chat-store-form-error {
    border-color: #ef4444 !important;
    box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.15) !important;
}
#cs-widget-root .chat-store-form-buttons {
    all: unset !important;
    display: flex !important;
    flex-direction: row !important;
    gap: 8px !important;
    margin-top: 2px !important;
    width: 100% !important;
    box-sizing: border-box !important;
}
#cs-widget-root .chat-store-input-form button.chat-store-form-submit {
    all: unset !important;
    display: block !important;
    box-sizing: border-box !important;
    background: var(--cs-main-color) !important;
    color: #fff !important;
    border: none !important;
    border-radius: 8px !important;
    padding: 9px 20px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    font-family: inherit !important;
    line-height: 1.4 !important;
    cursor: pointer !important;
    text-align: center !important;
    flex: 1 1 auto !important;
    -webkit-appearance: none !important;
}
#cs-widget-root .chat-store-input-form button.chat-store-form-submit:hover {
    opacity: 0.9 !important;
}
#cs-widget-root .chat-store-input-form button.chat-store-form-skip {
    all: unset !important;
    display: block !important;
    box-sizing: border-box !important;
    background: #fff !important;
    color: #94a3b8 !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 8px !important;
    padding: 9px 12px !important;
    font-size: 12px !important;
    font-family: inherit !important;
    line-height: 1.4 !important;
    cursor: pointer !important;
    text-align: center !important;
    white-space: nowrap !important;
    -webkit-appearance: none !important;
}
#cs-widget-root .chat-store-input-form button.chat-store-form-skip:hover {
    color: #64748b !important;
    border-color: #cbd5e1 !important;
}

/* Stripe */
#cs-widget-root .chat-store-stripe-btn {
    display: inline-block !important;
    background: #635bff !important;
    color: #fff !important;
    padding: 12px 24px !important;
    margin: 0 !important;
    border-radius: 8px !important;
    border: none !important;
    text-decoration: none !important;
    font-weight: 600 !important;
    font-size: 14px !important;
    line-height: 1.4 !important;
    text-align: center !important;
    flex-shrink: 0 !important;
}
#cs-widget-root .chat-store-stripe-btn:hover {
    background: #4f46e5 !important;
    color: #fff !important;
}

/* 銀行振込 */
#cs-widget-root .chat-store-bank-info {
    background: #fffbeb !important;
    border: 1px solid #f59e0b !important;
    border-radius: 8px !important;
    padding: 12px !important;
    margin: 0 !important;
    max-width: 85% !important;
    align-self: flex-start !important;
    font-size: 13px !important;
    line-height: 1.6 !important;
    flex-shrink: 0 !important;
}
#cs-widget-root .chat-store-bank-info h4 {
    margin: 0 0 8px !important;
    padding: 0 !important;
    font-size: 14px !important;
    color: #92400e !important;
    border: none !important;
    background: none !important;
}

/* デバッグ */
#cs-widget-root .chat-store-debug-error {
    background: #fef2f2 !important;
    border: 1px solid #ef4444 !important;
    border-radius: 8px !important;
    padding: 10px 12px !important;
    margin: 0 !important;
    max-width: 85% !important;
    align-self: flex-start !important;
    font-size: 12px !important;
    line-height: 1.5 !important;
    color: #7f1d1d !important;
    word-break: break-all !important;
    flex-shrink: 0 !important;
}

/* ======= レスポンシブ ======= */
@media (max-width: 767px) {
    #cs-widget-root {
        bottom: 12px !important;
        right: 12px !important;
        left: auto !important;
        max-width: calc(100vw - 24px) !important;
    }
    #cs-widget-root .chat-store-welcome-bubble {
        max-width: 180px !important;
        font-size: 12px !important;
    }
    #cs-widget-root .chat-store-toggle {
        width: 52px !important;
        height: 52px !important;
        min-width: 52px !important;
        min-height: 52px !important;
        font-size: 24px !important;
    }
    #cs-widget-root .chat-store-toggle img {
        width: 28px !important;
        height: 28px !important;
    }
    #cs-widget-root.cs-open {
        bottom: 0 !important;
        right: 0 !important;
        left: 0 !important;
        max-width: 100% !important;
        width: 100% !important;
    }
    #cs-widget-root.cs-open .chat-store-body {
        width: 100vw !important;
        max-width: 100vw !important;
        height: calc(100dvh - 60px) !important;
        max-height: none !important;
        border-radius: 12px 12px 0 0 !important;
        border-left: none !important;
        border-right: none !important;
        border-bottom: none !important;
    }
    #cs-widget-root .chat-store-input-area {
        padding: 8px 12px !important;
        padding-bottom: max(8px, env(safe-area-inset-bottom)) !important;
    }
    #cs-widget-root .chat-store-input-area input {
        font-size: 16px !important;
    }
}
