/* バナー生成プラグイン スタイル - 管理画面版準拠 */
.sbg-container {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #f8fafc;
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    max-width: 1200px;
}

.sbg-header {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
    padding: 30px;
    text-align: center;
    border-radius: 12px;
    margin-bottom: 30px;
}

.sbg-header h2 {
    font-size: 2.5rem;
    margin: 0 0 10px 0;
    font-weight: 700;
}

.sbg-header p {
    opacity: 0.9;
    font-size: 1.1rem;
    margin: 0;
}

.sbg-main-content {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 30px;
}

.sbg-left-panel {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.sbg-section {
    background: white;
    border-radius: 15px;
    padding: 25px;
    border: 2px solid #e2e8f0;
}

.sbg-section h3 {
    color: #2d3748;
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.sbg-preview-section .description {
    margin-bottom: 15px;
    color: #718096;
}

.sbg-preview-container {
    width: 600px;
    height: 400px;
    background: #2d3748;
    border-radius: 10px;
    position: relative;
    margin: 0 auto;
    overflow: hidden;
}

.sbg-banner-element {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: white;
    background: rgba(74, 85, 104, 0.9);
    border: 2px dashed rgba(255, 255, 255, 0.3);
    border-radius: 5px;
    cursor: move;
    user-select: none;
    transition: all 0.3s ease;
}

.sbg-banner-element:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.sbg-banner-element.sbg-cta {
    background: #ed8936;
    border-radius: 20px;
    border: none;
}

.sbg-banner-element.sbg-image {
    background: #4299e1;
}

/* 初期位置設定 - 管理画面版と同じ */
#sbg-main-copy { left: 150px; top: 100px; width: 300px; height: 50px; }
#sbg-sub-copy { left: 150px; top: 170px; width: 300px; height: 40px; }
#sbg-date { left: 150px; top: 240px; width: 200px; height: 35px; }
#sbg-cta { left: 225px; top: 300px; width: 150px; height: 40px; }
#sbg-logo { left: 240px; top: 40px; width: 120px; height: 30px; }
#sbg-image { left: 450px; top: 50px; width: 100px; height: 100px; }

/* レイアウト選択セクション */
.sbg-layout-section {
    background: white;
    border-radius: 15px;
    padding: 25px;
    border: 2px solid #e2e8f0;
}

.sbg-layout-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 15px;
    margin-bottom: 25px;
}

.sbg-layout-option {
    cursor: pointer;
    border: 3px solid #e2e8f0;
    border-radius: 8px;
    padding: 8px;
    transition: all 0.3s ease;
    background: white;
}

.sbg-layout-option:hover {
    border-color: #4299e1;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(66, 153, 225, 0.3);
}

.sbg-layout-option.selected {
    border-color: #4299e1;
    background: #ebf8ff;
    box-shadow: 0 4px 12px rgba(66, 153, 225, 0.3);
}

.sbg-layout-image {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 4px;
}

/* レイアウト詳細と完成イメージを横並びに */
.sbg-layout-preview-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.sbg-layout-detail {
    background: #f8fafc;
    border-radius: 10px;
    padding: 20px;
    text-align: center;
}

.sbg-layout-detail h4 {
    color: #2d3748;
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.sbg-layout-detail-image {
    background: white;
    border-radius: 8px;
    padding: 15px;
    border: 2px solid #e2e8f0;
}

.sbg-layout-detail-image img {
    width: 100%;
    height: auto;
    max-width: 300px;
}

.sbg-banner-example {
    background: #f8fafc;
    border-radius: 10px;
    padding: 20px;
    text-align: center;
}

.sbg-banner-example h4 {
    color: #2d3748;
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.sbg-banner-example-image {
    background: white;
    border-radius: 8px;
    padding: 15px;
    border: 2px solid #e2e8f0;
}

.sbg-banner-example-image img {
    width: 100%;
    height: auto;
    max-width: 400px;
}

/* カラー設定とテイスト設定の2カラムレイアウト */
.sbg-color-style-section {
    background: white;
    border-radius: 15px;
    padding: 25px;
    border: 2px solid #e2e8f0;
}

.sbg-color-style-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.sbg-color-section {
    border-radius: 10px;
    padding: 0;
}

.sbg-style-section {
    border-radius: 10px;
    padding: 0;
}

/* カラーモード選択 */
.sbg-color-mode-selection {
    margin-bottom: 20px;
}

.sbg-color-mode-option {
    margin-bottom: 10px;
}

.sbg-color-mode-option label {
    display: flex;
    align-items: center;
    font-weight: 600;
    color: #4a5568;
    cursor: pointer;
}

.sbg-color-mode-option input[type="radio"] {
    margin-right: 10px;
    transform: scale(1.2);
}

/* カラープリセット（シンプル版） */
.sbg-color-preset-section {
    margin-bottom: 20px;
}

.sbg-color-presets {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.sbg-color-preset-simple {
    width: 60px;
    height: 50px;
    cursor: pointer;
    border: 3px solid #e2e8f0;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.sbg-color-preset-simple:hover {
    border-color: #4299e1;
    transform: translateY(-2px);
}

.sbg-color-preset-simple.selected {
    border-color: #4299e1;
    border-width: 4px;
}

/* カスタムカラー */
.sbg-custom-color-section {
    margin-bottom: 20px;
}

.sbg-color-group {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.sbg-color-group label {
    font-weight: 600;
    color: #4a5568;
    min-width: 100px;
}

.sbg-color-group input[type="color"] {
    width: 80px;
    height: 40px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
}

/* ==============================================
   チェックボックス表示改善（新規追加）
   ============================================== */

/* テイスト・印象のチェックボックス */
.sbg-style-checkboxes {
    margin-top: 15px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px 15px; /* 縦間隔10px、横間隔15px */
    background: rgba(248, 250, 252, 0.5);
    border-radius: 8px;
    padding: 12px;
    border: 1px solid #e2e8f0;
}

.sbg-style-checkboxes .sbg-checkbox-group {
    margin-bottom: 0 !important; /* 個別のmargin-bottomを削除 */
    flex: 0 1 auto; /* 内容に応じて幅を調整 */
    min-width: 0; /* フレックスアイテムの最小幅を0に */
}

.sbg-style-checkboxes .sbg-checkbox-group label {
    display: flex;
    align-items: flex-start;
    font-weight: 500; /* 少し細くする */
    font-size: 13px; /* 文字サイズを小さくする */
    margin-bottom: 0;
    line-height: 1.4;
    white-space: nowrap; /* 基本的に改行しない */
    cursor: pointer;
}

/* 画像説明のチェックボックス */
.sbg-image-checkboxes {
    margin-top: 15px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px 12px; /* 縦間隔8px、横間隔12px */
    background: rgba(248, 250, 252, 0.5);
    border-radius: 8px;
    padding: 12px;
    border: 1px solid #e2e8f0;
}

.sbg-image-checkboxes .sbg-checkbox-group {
    margin-bottom: 0 !important; /* 個別のmargin-bottomを削除 */
    flex: 0 1 auto; /* 内容に応じて幅を調整 */
    min-width: 0; /* フレックスアイテムの最小幅を0に */
}

.sbg-image-checkboxes .sbg-checkbox-group label {
    display: flex;
    align-items: flex-start;
    font-weight: 500; /* 少し細くする */
    font-size: 13px; /* 文字サイズを小さくする */
    margin-bottom: 0;
    line-height: 1.4;
    white-space: nowrap; /* 基本的に改行しない */
    cursor: pointer;
}

/* チェックボックス共通設定 */
.sbg-style-checkboxes .sbg-checkbox-group input[type="checkbox"],
.sbg-image-checkboxes .sbg-checkbox-group input[type="checkbox"] {
    margin-right: 6px; /* チェックボックスとテキストの間隔を少し狭くする */
    margin-top: 1px; /* 微調整 */
    transform: scale(1.1); /* チェックボックスを少し小さくする */
    flex-shrink: 0;
}


/* フォーカス時の効果 */
.sbg-style-checkboxes .sbg-checkbox-group input[type="checkbox"]:focus,
.sbg-image-checkboxes .sbg-checkbox-group input[type="checkbox"]:focus {
    outline: 2px solid #4299e1;
    outline-offset: 2px;
    border-radius: 2px;
}

/* チェック済みの項目に軽い背景色を追加 */
.sbg-style-checkboxes .sbg-checkbox-group input[type="checkbox"]:checked + span,
.sbg-image-checkboxes .sbg-checkbox-group input[type="checkbox"]:checked + span {
    color: #2d3748;
    font-weight: 600;
}



/* タブ機能のスタイル */
.sbg-tab-container {
    margin-top: 20px;
}

.sbg-tab-buttons {
    display: flex;
    gap: 2px;
    margin-bottom: 20px;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid #e2e8f0;
}

.sbg-tab-button {
    flex: 1;
    padding: 12px 20px;
    border: none;
    background: #f8fafc;
    color: #4a5568;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    border-right: 1px solid #e2e8f0;
}

.sbg-tab-button:last-child {
    border-right: none;
}

.sbg-tab-button:hover {
    background: #e2e8f0;
}

.sbg-tab-button.active {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
}

.sbg-tab-content {
    display: none;
}

.sbg-tab-content.active {
    display: block;
}

.sbg-tab-content h2 {
    color: #2d3748;
    margin-bottom: 20px;
    font-size: 1.3rem;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 10px;
}

.sbg-template-input-section h2 {
    color: #2d3748;
    margin-bottom: 20px;
    font-size: 1.3rem;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 10px;
}

.sbg-right-panel {
    background: #f8fafc;
    border-radius: 15px;
    padding: 25px;
    border: 2px solid #e2e8f0;
}

.sbg-right-panel h3 {
    color: #2d3748;
    margin-bottom: 20px;
    font-size: 1.3rem;
}

.sbg-form-group {
    margin-bottom: 25px;
}

.sbg-form-group label {
    display: block;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 8px;
    font-size: 1rem;
}

/* ラベルの文字の開始位置のズレ修正 */
.sbg-checkbox-group label {
    display: flex;
    align-items: flex-start;
    font-weight: 600;
    margin-bottom: 0;
    line-height: 1.4;
}

.sbg-checkbox-group input[type="checkbox"] {
    margin-right: 10px;
    margin-top: 2px;
    transform: scale(1.2);
    flex-shrink: 0;
}

.sbg-form-group input[type="text"] {
    width: 100%;
    padding: 12px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.sbg-form-group input[type="text"]:focus {
    outline: none;
    border-color: #4299e1;
    box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.1);
}

.sbg-form-group textarea {
    width: 100%;
    height: 120px;
    padding: 12px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    resize: vertical;
    transition: border-color 0.3s ease;
}

.sbg-form-group textarea:focus {
    outline: none;
    border-color: #4299e1;
    box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.1);
}

.sbg-checkbox-group {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

/* テキスト選択を正常化 */
.sbg-form-group input[type="text"],
.sbg-form-group textarea,
.sbg-example-text {
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    user-select: text;
}

/* プロンプト出力エリアのみ特別扱い */
#prompt-output {
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    user-select: text;
}

.sbg-example-text {
    color: #718096;
    font-size: 14px;
    margin: 5px 0;
    font-style: italic;
}

.sbg-aspect-selector {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.sbg-aspect-button {
    padding: 8px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 6px;
    background: white;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.3s ease;
}

.sbg-aspect-button:hover {
    border-color: #4299e1;
    background: #ebf8ff;
}

.sbg-aspect-button.selected {
    border-color: #4299e1;
    background: #4299e1;
    color: white;
}

.sbg-action-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.sbg-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
}

.sbg-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.sbg-btn-primary {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
}

.sbg-btn-secondary {
    background: #e2e8f0;
    color: #4a5568;
}

.sbg-btn-success {
    background: linear-gradient(135deg, #56ab2f 0%, #a8e6cf 100%);
    color: white;
}

.sbg-btn-error {
    background: linear-gradient(135deg, #e53e3e 0%, #fc8181 100%);
    color: white;
}

.sbg-prompt-section textarea {
    width: 100%;
    height: 200px;
    padding: 15px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-family: 'Courier New', monospace;
    font-size: 13px;
    resize: vertical;
    margin-bottom: 15px;
}

.sbg-message {
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-weight: 600;
    text-align: center;
}

.sbg-message.success {
    background: #f0fff4;
    color: #22543d;
    border: 1px solid #9ae6b4;
}

.sbg-message.error {
    background: #fed7d7;
    color: #742a2a;
    border: 1px solid #feb2b2;
}

/* レスポンシブ */
@media (max-width: 1200px) {
    .sbg-main-content {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .sbg-color-style-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .sbg-preview-container {
        width: 100%;
        max-width: 500px;
        height: 300px;
    }
    
    .sbg-header h2 {
        font-size: 2rem;
    }
    
    .sbg-layout-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .sbg-tab-buttons {
        flex-direction: column;
    }
    
    .sbg-tab-button {
        border-right: none;
        border-bottom: 1px solid #e2e8f0;
    }
    
    .sbg-tab-button:last-child {
        border-bottom: none;
    }
    
    #sbg-main-copy {
        width: 80%;
        left: 10%;
    }
    
    #sbg-sub-copy {
        width: 75%;
        left: 12.5%;
    }
    
    #sbg-date {
        width: 60%;
        left: 20%;
    }
    
    #sbg-cta {
        width: 40%;
        left: 30%;
    }
    
    #sbg-logo {
        width: 50%;
        left: 25%;
    }
    
    #sbg-image {
        width: 30%;
        left: 35%;
    }
    
    .sbg-aspect-selector {
        flex-direction: column;
        gap: 8px;
    }
    
    .sbg-action-buttons {
        justify-content: center;
        flex-direction: column;
    }
    
    .sbg-color-presets {
        justify-content: center;
    }
    
    /* チェックボックスのレスポンシブ対応 */
    .sbg-style-checkboxes,
    .sbg-image-checkboxes {
        gap: 8px 10px; /* モバイルでは間隔を少し狭くする */
        padding: 10px;
    }
    
    .sbg-style-checkboxes .sbg-checkbox-group label,
    .sbg-image-checkboxes .sbg-checkbox-group label {
        font-size: 12px; /* モバイルではさらに小さくする */
    }
}

/* 長いテキストの場合の改行対応 */
@media (max-width: 480px) {
    .sbg-style-checkboxes .sbg-checkbox-group label,
    .sbg-image-checkboxes .sbg-checkbox-group label {
        white-space: normal; /* 狭い画面では改行を許可 */
        max-width: 140px; /* 最大幅を設定 */
    }
    
    .sbg-style-checkboxes,
    .sbg-image-checkboxes {
        gap: 6px 8px; /* より狭い間隔 */
        padding: 8px;
    }
}

/* スマートフォンでの横表示最適化 */
@media (max-width: 320px) {
    .sbg-style-checkboxes,
    .sbg-image-checkboxes {
        gap: 5px 6px;
        padding: 6px;
    }
    
    .sbg-style-checkboxes .sbg-checkbox-group label,
    .sbg-image-checkboxes .sbg-checkbox-group label {
        font-size: 11px;
        max-width: 120px;
    }
}

/* 高コントラストモード対応 */
@media (prefers-contrast: high) {
    .sbg-style-checkboxes,
    .sbg-image-checkboxes {
        border: 2px solid #000;
        background: #fff;
    }
    
    .sbg-style-checkboxes .sbg-checkbox-group:hover,
    .sbg-image-checkboxes .sbg-checkbox-group:hover {
        background-color: #f0f0f0;
    }
}



/* ボタンのトランジション効果を改善 */
.sbg-btn {
    transition: all 0.3s ease, background 0.5s ease;
}


/* ==============================================
   キーワード候補セクション
   ============================================== */

.sbg-keyword-suggestions {
    margin-top: 15px;
    padding: 12px;
    background: rgba(241, 245, 249, 0.6);
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.sbg-keyword-title {
    font-size: 14px;
    color: #4a5568;
    margin: 0 0 8px 0;
    font-weight: 600;
}

.sbg-keyword-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 8px;
}

.sbg-keyword-item {
    display: inline-block;
    padding: 4px 8px;
    font-size: 12px;
    color: #4a5568;
    background: #ffffff;
    border: 1px solid #cbd5e0;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
    line-height: 1.3;
}

.sbg-keyword-item:hover {
    background: #ebf8ff;
    border-color: #4299e1;
    color: #2d3748;
    transform: translateY(-1px);
}

.sbg-keyword-item:active {
    transform: translateY(0);
}

/* クリック時の一時的な効果 */
.sbg-keyword-item.clicked {
    background: #4299e1;
    color: white;
    border-color: #4299e1;
    animation: keywordClick 0.3s ease;
}

@keyframes keywordClick {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .sbg-keyword-suggestions {
        padding: 10px;
    }
    
    .sbg-keyword-title {
        font-size: 13px;
    }
    
    .sbg-keyword-list {
        gap: 5px 6px;
    }
    
    .sbg-keyword-item {
        font-size: 11px;
        padding: 3px 6px;
    }
}

@media (max-width: 480px) {
    .sbg-keyword-suggestions {
        padding: 8px;
    }
    
    .sbg-keyword-title {
        font-size: 12px;
    }
    
    .sbg-keyword-list {
        gap: 4px 5px;
    }
    
    .sbg-keyword-item {
        font-size: 10px;
        padding: 2px 5px;
    }
}

/* ==============================================
   コードブロック解析ボタン & モーダル
   ============================================== */

/* コードブロック解析ボタン */
.sbg-code-block-btn {
    width: 100%;
    font-size: 15px;
    padding: 14px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 10px;
}

.sbg-code-block-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

/* モーダルオーバーレイ */
.sbg-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* モーダルコンテンツ */
.sbg-modal-content {
    background: white;
    border-radius: 16px;
    width: 90%;
    max-width: 700px;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* モーダルヘッダー */
.sbg-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 1px solid #e2e8f0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.sbg-modal-header h3 {
    margin: 0;
    font-size: 1.4rem;
    font-weight: 600;
}

.sbg-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: white;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    transition: background-color 0.2s ease;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sbg-modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* モーダルボディ */
.sbg-modal-body {
    padding: 25px;
    overflow-y: auto;
    max-height: 50vh;
}

.sbg-modal-description {
    color: #4a5568;
    margin-bottom: 20px;
    line-height: 1.6;
    font-size: 14px;
}

/* プリセットボタン */
.sbg-preset-buttons {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.sbg-btn-preset {
    padding: 8px 16px;
    font-size: 13px;
    background: #f7fafc;
    color: #4a5568;
    border: 2px solid #e2e8f0;
    border-radius: 20px;
    transition: all 0.2s ease;
}

.sbg-btn-preset:hover {
    background: #ebf8ff;
    border-color: #4299e1;
    color: #2d3748;
    transform: translateY(-1px);
}

/* モーダルテキストエリア */
.sbg-modal-textarea {
    width: 100%;
    height: 300px;
    padding: 15px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-family: 'Courier New', monospace;
    font-size: 13px;
    resize: vertical;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

.sbg-modal-textarea:focus {
    outline: none;
    border-color: #4299e1;
    box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.1);
}

/* モーダルフッター */
.sbg-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 15px;
    padding: 20px 25px;
    border-top: 1px solid #e2e8f0;
    background: #f8fafc;
}

.sbg-modal-footer .sbg-btn {
    min-width: 120px;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .sbg-modal-content {
        width: 95%;
        max-height: 90vh;
        margin: 20px;
    }
    
    .sbg-modal-header {
        padding: 15px 20px;
    }
    
    .sbg-modal-header h3 {
        font-size: 1.2rem;
    }
    
    .sbg-modal-body {
        padding: 20px;
        max-height: 60vh;
    }
    
    .sbg-modal-textarea {
        height: 250px;
        font-size: 12px;
    }
    
    .sbg-preset-buttons {
        flex-direction: column;
        gap: 8px;
    }
    
    .sbg-btn-preset {
        width: 100%;
        text-align: center;
    }
    
    .sbg-modal-footer {
        padding: 15px 20px;
        flex-direction: column;
        gap: 10px;
    }
    
    .sbg-modal-footer .sbg-btn {
        width: 100%;
    }
}

/* スクロールバーのスタイリング */
.sbg-modal-body::-webkit-scrollbar {
    width: 6px;
}

.sbg-modal-body::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.sbg-modal-body::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.sbg-modal-body::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* ==============================================
   テキストカラー設定セクション（追加）
   ============================================== */

/* テキストカラー設定 */
.sbg-text-color-section {
    margin-top: 15px;
}

.sbg-text-color-section .sbg-form-group {
    margin-bottom: 0;
}

.sbg-text-color-section textarea {
    width: 100%;
    height: 100px;
    padding: 12px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    resize: vertical;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

.sbg-text-color-section textarea:focus {
    outline: none;
    border-color: #4299e1;
    box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.1);
}

.sbg-text-color-section .sbg-example-text {
    margin-top: 8px;
    color: #718096;
    font-size: 13px;
    line-height: 1.4;
}

/* カラーモード選択の改善 */
.sbg-color-mode-selection {
    margin-bottom: 20px;
}

.sbg-color-mode-option {
    margin-bottom: 12px;
}

.sbg-color-mode-option label {
    display: flex;
    align-items: center;
    font-weight: 600;
    color: #4a5568;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 6px;
    transition: background-color 0.2s ease;
}

.sbg-color-mode-option label:hover {
    background-color: rgba(66, 153, 225, 0.1);
}

.sbg-color-mode-option input[type="radio"] {
    margin-right: 10px;
    transform: scale(1.2);
}

.sbg-color-mode-option input[type="radio"]:checked + span {
    color: #2d3748;
    font-weight: 700;
}

/* デバッグ用（開発時のみ使用） */
.sbg-debug-info {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    padding: 10px;
    border-radius: 4px;
    margin: 10px 0;
    font-size: 12px;
    color: #856404;
    display: none; /* 本番では非表示 */
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .sbg-text-color-section textarea {
        height: 80px;
        font-size: 13px;
    }
    
    .sbg-color-mode-option label {
        padding: 6px 10px;
        font-size: 14px;
    }
}