/* 基本カラー・レイアウト変数 */
:root {
    --primary-color: #0070f3;
    --primary-hover: #0761d1;
    --secondary-color: #666;
    --background-color: #e5e4e2;  /* より暗めの背景色 */
    --surface-color: #f7f6f4;     /* サーフェス色（テキストボックス） */
    --header-surface: #edeceb;    /* ヘッダー用の中間色を追加 */
    --border-color: #e2e0dd;
    --text-primary: #1a1816;
    --text-secondary: #5c5957;
    --text-content: #4a4846;
    --header-height: 4rem;
    --max-width: 1400px;
    --link-color: #1ed760;
}

/* ダークモード（data-theme="dark" またはシステム設定） */
:root[data-theme="dark"] {
    --primary-color: #0070f3;
    --primary-hover: #0761d1;
    --secondary-color: #888;
    --background-color: #000;
    --surface-color: #121212;
    --header-surface: #1a1a1a;    /* ダークモード用のヘッダー背景色を追加 */
    --border-color: #282828;
    --text-primary: #fff;
    --text-secondary: #a7a7a7;
    --text-content: #b3b3b3;
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --primary-color: #0070f3;
        --primary-hover: #0761d1;
        --secondary-color: #888;
        --background-color: #000;
        --surface-color: #121212;
        --header-surface: #1a1a1a;    /* ダークモード用のヘッダー背景色を追加 */
        --border-color: #282828;
        --text-primary: #fff;
        --text-secondary: #a7a7a7;
        --text-content: #b3b3b3;
    }
}

/* グローバルリセット */
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: var(--background-color);
    color: var(--text-primary);
    line-height: 1.6;
}

/* ヘッダー */
.app-header {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: var(--header-height);
    background-color: var(--surface-color);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
}
.header-content {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1.5rem;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.app-title {
    font-size: 1.125rem;
    font-weight: 600;
    letter-spacing: -0.02em;
}
.header-controls {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}
.control-button {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    background: var(--surface-color);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.15s ease;
    border-radius: 0.375rem;
}
.control-button:hover {
    background-color: var(--background-color);
    color: var(--primary-color);
    border-color: var(--primary-color);
}
.material-icons-round { font-size: 1.25rem; }

/* メインコンテンツ */
.main-content {
    margin-top: var(--header-height);
    min-height: calc(100vh - var(--header-height));
    max-width: var(--max-width);
    margin-left: auto;
    margin-right: auto;
    padding: 2rem 1.5rem;
}
.container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    height: calc(100vh - var(--header-height) - 4rem);
}
@media (max-width: 1024px) {
    .container {
        grid-template-columns: 1fr;
        height: auto;
        gap: 1rem;
    }
    .editor-pane { min-height: 400px; margin-bottom: 1rem; }
    .main-content { padding: 1rem; }
}
@media (max-width: 768px) {
    .app-header {
        height: auto;
        padding: 0.5rem 0;
    }
    .header-content {
        flex-direction: row;
        gap: 1rem;
        padding: 0 1rem;
        justify-content: space-between;
    }
    .header-controls {
        justify-content: flex-end;
        gap: 0.5rem;
        flex-wrap: nowrap;
    }
    .control-button {
        padding: 0.5rem;
        width: 2.5rem;
        height: 2.5rem;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 0.375rem;
    }
    .control-button span:not(.material-icons-round) {
        display: none;
    }
    .main-content { margin-top: var(--header-height); }
}
@media (max-width: 480px) {
    .app-title { font-size: 1rem; }
    .header-controls {
        gap: 0.25rem;
        display: flex;
        align-items: center;
        justify-content: flex-end;  /* 右寄せに */
    }
    .control-button {
        padding: 0.5rem;
        width: 2.5rem;  /* 幅を固定 */
        height: 2.5rem;  /* 高さを固定 */
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 0.375rem;
    }
    .control-button span:not(.material-icons-round) {
        display: none;
    }
    .material-icons-round {
        font-size: 1.25rem;
    }

    /* ソースコードヘッダーのボタン */
    .format-button span:not(.material-icons-round),
    .copy-button span:not(.material-icons-round) {
        display: none;  /* テキストのみ非表示 */
    }
    .format-button,
    .copy-button {
        padding: 0.5rem;
        width: 2.5rem;
        height: 2.5rem;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    .format-button .material-icons-round,
    .copy-button .material-icons-round {
        font-size: 1.25rem;
        display: flex !important;  /* アイコンは表示 */
    }
    .pane-title { padding: 0.5rem 0.75rem; font-size: 0.75rem; }
    .format-button,
    .copy-button { padding: 0.25rem 0.5rem; font-size: 0.75rem; }
    .modal-content { margin: 1rem; padding: 1rem; width: calc(100% - 2rem); }
    .modal-header h2 { font-size: 1rem; }
    .template-item,
    .history-item { padding: 0.75rem; }
    .template-action-button { padding: 0.25rem; }
    .template-item-title { font-size: 0.875rem; }
    .pane-title span:first-child {
        font-size: 0.875rem;
    }
    .pane-title span:first-child:contains("Source Code") {
        content: "Code";
    }
    .format-button span,
    .copy-button span {
        display: none;
    }
    .format-button,
    .copy-button {
        padding: 0.5rem;
        min-width: 2.5rem;
        display: flex;
        justify-content: center;
        align-items: center;
    }
    .format-button .material-icons-round,
    .copy-button .material-icons-round {
        font-size: 1.25rem;
    }
}
.editor-pane {
    background-color: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    overflow: hidden;
    transition: border-color 0.15s ease;
}
.editor-pane:hover { border-color: var(--primary-color); }
.pane-title {
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-color);
    background-color: var(--header-surface);  /* 新しい中間色を使用 */
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* ソースエディター */
#source {
    width: 100%;
    height: calc(100% - 3rem);
    outline: none;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    padding: 1rem;
    line-height: 1.6;
    tab-size: 4;
    white-space: pre-wrap;
    border: none;
    background-color: var(--surface-color);
    color: var(--text-primary);
    font-size: 14px;
    overflow: auto;
}

/* ボタン群 */
.button-group { display: flex; gap: 0.5rem; align-items: center; }
.format-buttons { display: flex; gap: 0.25rem; }
.format-button,
.copy-button {
    padding: 0.375rem 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 0.375rem;
    background-color: var(--surface-color);
    color: var(--text-secondary);
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
}
.format-button:hover,
.copy-button:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}
.format-button.active {
    background-color: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}
.copy-button.success {
    background-color: #10b981;
    color: #fff;
    border-color: #10b981;
}
.copy-button .material-icons-round { font-size: 1rem; }

/* CKEditor 用カスタマイズ */
.ck.ck-editor {
    height: 100%;
    display: flex;
    flex-direction: column;
}
.ck.ck-editor__main { flex: 1; min-height: 0; }
.ck.ck-editor__main > .ck-editor__editable {
    height: 100% !important;
    min-height: unset !important;
    border: none !important;
    background-color: var(--surface-color) !important;
    color: var(--text-content) !important;
    font-family: SpotifyMixUI, CircularSp-Arab, CircularSp-Hebr, CircularSp-Cyrl, CircularSp-Grek, CircularSp-Deva, "Helvetica Neue", helvetica, arial, "Hiragino Kaku Gothic ProN", Meiryo, "MS Gothic" !important;
    font-size: 16px !important;
    line-height: normal !important;
    padding: 1.5rem !important;
    font-weight: 400 !important;
    word-break: break-word !important;
    overflow-wrap: break-word !important;
    -webkit-font-smoothing: antialiased !important;
}
.ck.ck-editor__main > .ck-editor__editable p {
    margin: 12px 0 !important;
}
.ck.ck-editor__main > .ck-editor__editable a {
    color: var(--text-primary) !important;
    text-decoration: none !important;
    font-weight: 700 !important;
}
.ck.ck-editor__main > .ck-editor__editable a:hover {
    text-decoration: underline !important;
}
.ck.ck-toolbar {
    position: static !important;  /* 絶対位置指定を解除 */
    padding: 0 !important;
    border: none !important;
    background: none !important;
}
.ck.ck-toolbar__items {
    display: flex !important;
    gap: 0.5rem !important;
}
.ck.ck-button {
    padding: 4px 8px !important;
    height: 28px !important;
    min-height: 28px !important;
    border: 1px solid var(--border-color) !important;
    background: var(--surface-color) !important;
    color: var(--text-secondary) !important;
    font-size: 12px !important;
    border-radius: 4px !important;
    margin: 0 !important;
}
.ck.ck-button:hover {
    background: var(--background-color) !important;
    color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
}
.ck.ck-button.ck-on {
    background: var(--background-color) !important;
    color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
}
.ck.ck-button .ck-button__label {
    color: inherit !important;
}

/* プレビュー */
#preview {
    height: calc(100% - 3rem);
    padding: 1.5rem;
    overflow: auto;
    background-color: var(--surface-color);
    color: var(--text-content);
    font-family: SpotifyMixUI, CircularSp-Arab, CircularSp-Hebr, CircularSp-Cyrl, CircularSp-Grek, CircularSp-Deva, "Helvetica Neue", helvetica, arial, "Hiragino Kaku Gothic ProN", Meiryo, "MS Gothic";
    font-size: 16px;
    line-height: normal;
    font-weight: 400;
    word-break: break-word;
    overflow-wrap: break-word;
    -webkit-font-smoothing: antialiased;
}
#preview p { margin: 12px 0; }
#preview a {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 700;
}
#preview a:hover { text-decoration: underline; }
#preview ul,
#preview ol { margin: 16px 0; padding-left: 1.5rem; }
#preview li { margin: 8px 0; }

/* ソース内タグのシンタックスハイライト */
#source .tag {
    color: #6e7681;  /* GitHub風の灰色に統一 */
    opacity: 0.9;
}

/* スクロールバー */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover { background: var(--secondary-color); }

/* テーマメニュー */
.theme-dropdown { position: relative; display: inline-block; }
.theme-menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 0.5rem;
    background-color: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 0.375rem;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
    z-index: 1000;
    min-width: 160px;
}
.theme-menu.show { display: block; }
.theme-menu-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.15s ease;
    text-align: left;
    width: 100%;
}
.theme-menu-item:hover {
    background-color: var(--background-color);
    color: var(--primary-color);
}
.theme-menu-item .material-icons-round { font-size: 1.25rem; }

/* モーダル */
.modal {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    opacity: 0;
    transition: opacity 0.2s ease;
}
.modal.show {
    display: block;
    opacity: 1;
}
.modal-content {
    position: relative;
    background-color: var(--surface-color);
    margin: 4rem auto;
    padding: 1.5rem;
    width: 90%;
    max-width: 600px;
    border-radius: 0.5rem;
    max-height: calc(100vh - 8rem);
    overflow-y: auto;
    transform: translateY(-20px);
    transition: transform 0.2s ease;
}
.modal.show .modal-content {
    transform: translateY(0);
}
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}
.modal-header h2 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
}
.close-button {
    padding: 0.375rem;
    border: none;
    background: none;
    color: var(--text-secondary);
    cursor: pointer;
}
.close-button:hover { color: var(--text-primary); }

/* 履歴・テンプレートリスト */
.history-list,
.template-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.history-item,
.template-item {
    padding: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 0.375rem;
    cursor: pointer;
    transition: all 0.15s ease;
}
.history-item:hover,
.template-item:hover { border-color: var(--primary-color); }
.history-item-header,
.template-item-title {
    font-size: 0.875rem;
}
.history-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}
.history-item-preview {
    font-size: 0.875rem;
    color: var(--text-primary);
    max-height: 3rem;
    overflow: hidden;
    text-overflow: ellipsis;
}
.modal-tabs { display: flex; gap: 1rem; }
.modal-tab {
    padding: 0.5rem 1rem;
    border: none;
    background: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    border-bottom: 2px solid transparent;
}
.modal-tab.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}
.tab-content { display: none; }
.tab-content.active { display: block; }
.template-actions { margin-bottom: 1rem; }
.save-template-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 0.375rem;
    background-color: var(--surface-color);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.15s ease;
}
.save-template-button:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}
.template-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.template-input {
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 0.375rem;
    background-color: var(--surface-color);
    color: var(--text-primary);
    font-size: 1rem;
}
.template-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
}
.cancel-button,
.save-button {
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.15s ease;
}
.cancel-button {
    border: 1px solid var(--border-color);
    background-color: var(--surface-color);
    color: var(--text-secondary);
}
.save-button {
    border: 1px solid var(--primary-color);
    background-color: var(--primary-color);
    color: #fff;
}
.template-actions-group {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}
.template-action-button {
    padding: 0.375rem;
    border: 1px solid var(--border-color);
    border-radius: 0.375rem;
    background-color: var(--surface-color);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}
.template-action-button:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background-color: var(--background-color);
}
.template-action-button.delete:hover {
    border-color: #dc2626;
    color: #dc2626;
}

/* フッター */
.app-footer {
    text-align: center;
    padding: 1rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
}
.app-footer a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.15s ease;
}
.app-footer a:hover { color: var(--primary-color); }

/* ヘルプコンテンツ */
.help-content {
    padding: 1.5rem;
    color: var(--text-primary);
}
.help-content h3 { margin: 1.5rem 0 0.5rem; font-size: 1rem; font-weight: 600; }
.help-content ul { list-style: none; padding: 0; }
.help-content li { margin: 0.5rem 0; font-size: 0.9rem; color: var(--text-secondary); }

/* モーダル内のテンプレートリスト */
.template-items {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-height: 60vh;
    overflow-y: auto;
    padding: 0.5rem;
}

.template-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background-color: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 0.375rem;
    transition: all 0.15s ease;
}

.template-item:hover {
    border-color: var(--primary-color);
}

.template-item.selected {
    border-color: var(--primary-color);
    background-color: var(--background-color);
}

.template-item-title {
    flex: 1;
    margin-right: 1rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.template-actions-group {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.template-action-button {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.375rem;
    border: 1px solid var(--border-color);
    background: var(--surface-color);
    color: var(--text-secondary);
    cursor: pointer;
    border-radius: 0.25rem;
    transition: all 0.15s ease;
}

.template-action-button:hover {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.template-action-button.delete:hover {
    color: #dc2626;
    border-color: #dc2626;
}

/* リンクスタイル */
.ck-content a {
    color: var(--link-color) !important;
    text-decoration: none;
    font-weight: 700;
}
.ck-content a:hover {
    text-decoration: underline;
}

/* ソースプレビュー */
.source-preview {
    color: var(--text-content);
    font-family: SpotifyMixUI, CircularSp-Arab, CircularSp-Hebr, CircularSp-Cyrl, CircularSp-Grek, CircularSp-Deva, "Helvetica Neue", helvetica, arial, "Hiragino Kaku Gothic ProN", Meiryo, "MS Gothic";
    font-size: 16px;
    line-height: normal;
    font-weight: 400;
    word-break: break-word;
    overflow-wrap: break-word;
    -webkit-font-smoothing: antialiased;
}
.source-preview a {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 700;
}
.source-preview a:hover {
    text-decoration: underline;
}

/* CKEditor バルーンポップアップのカスタマイズ */
.ck.ck-link-actions .ck-button.ck-link-actions__preview .ck-button__label {
    color: var(--text-content) !important;  /* コンテンツ用テキストカラーを使用 */
    text-decoration: none !important;
}
.ck.ck-link-actions .ck-button.ck-link-actions__preview:hover .ck-button__label {
    text-decoration: underline !important;
}
.ck.ck-link-actions .ck-button.ck-link-actions__preview {
    background: none !important;
}

/* ダークモード時のバルーンポップアップ */
:root[data-theme="dark"] .ck.ck-balloon-panel {
    background: var(--surface-color) !important;  /* 背景色を暗く */
    border-color: var(--border-color) !important;  /* ボーダー色も暗く */
}
:root[data-theme="dark"] .ck.ck-button:not(.ck-disabled):hover {
    background: var(--background-color) !important;  /* ホバー時の背景色 */
}
:root[data-theme="dark"] .ck.ck-link-actions .ck-button .ck-button__label {
    color: var(--text-content) !important;  /* ボタンのテキスト色 */
}
:root[data-theme="dark"] .ck.ck-link-actions .ck-button .ck-icon {
    color: var(--text-content) !important;  /* アイコンの色 */
}

/* ツールバーボタンのホバー時（非アクティブ時のみ） */
.ck.ck-toolbar .ck-button:not(.ck-on):not(.ck-active):hover {
    background: var(--background-color) !important;
    color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
}

/* アクティブ状態のボタン（ホバー時も同じ） */
.ck.ck-toolbar .ck-button.ck-on,
.ck.ck-toolbar .ck-button.ck-active {
    background-color: var(--primary-color) !important;
    color: #fff !important;
    border-color: var(--primary-color) !important;
}

/* ダークモード時のツールバー */
:root[data-theme="dark"] .ck.ck-toolbar {
    background: var(--header-surface) !important;
    border-color: var(--border-color) !important;
}

/* エディターのヘッダー部分の調整 */
.editor-pane#paneEditor .pane-title {
    display: none !important;  /* エディターペインのタイトルのみ非表示に */
}

.editor-pane .ck.ck-editor__top {
    position: relative !important;
    background: var(--header-surface);
    border-bottom: 1px solid var(--border-color);
    padding: 0.75rem 1rem;
    height: 48px;  /* ヘッダーの高さを固定 */
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
}

/* CKEditorのデフォルトのラベルのスタイル調整 */
.ck.ck-editor__top::before {
    content: "Editor" !important;
    color: var(--text-secondary) !important;
    font-size: 0.875rem !important;
    font-weight: 500 !important;
    margin-right: auto !important;
}

/* 元々のラベルは非表示に */
.ck.ck-editor__label {
    display: none !important;
}

/* ツールバーのボタン間の間隔 */
.ck.ck-toolbar__items {
    gap: 8px !important;
}

/* ツールバーボタンのホバー時 */
.ck.ck-toolbar .ck-button:hover {
    background: var(--background-color) !important;
    color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
}

/* アクティブ状態のボタン */
.ck.ck-toolbar .ck-button.ck-on,
.ck.ck-toolbar .ck-button.ck-active {
    background-color: var(--primary-color) !important;
    color: #fff !important;
    border-color: var(--primary-color) !important;
}

/* ボタンラベルの色を親要素から継承 */
.ck.ck-button .ck-button__label {
    color: inherit !important;
}

/* アイコンの色を親要素から継承 */
.ck.ck-button .ck-icon {
    color: inherit !important;
}

/* ペインのタイトル部分の共通スタイル */
.pane-title,
.editor-pane .ck.ck-editor__top,
.preview-pane .pane-title {
    height: 48px !important;  /* 全てのヘッダーの高さを48pxに統一 */
    padding: 0 1rem !important;
    background-color: var(--header-surface) !important;
    border-bottom: 1px solid var(--border-color) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
}

/* エディターペインのタイトル部分の調整 */
.editor-pane .ck.ck-editor__top::before {
    content: "Editor" !important;
    color: var(--text-secondary) !important;
    font-size: 0.875rem !important;
    font-weight: 500 !important;
    margin-right: auto !important;
    line-height: 48px !important;  /* 高さに合わせる */
}

/* ボタングループの配置調整 */
.button-group {
    height: 100% !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
}