/* 基本レイアウト */
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; background: #f5f5f5; }

/* 認証 */
.auth-overlay {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: #f5f5f5; z-index: 10000;
    display: flex; justify-content: center; align-items: center;
}
.auth-overlay.hidden { display: none; }
.auth-container {
    background: white; border-radius: 12px; padding: 2.5rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1); width: 440px; max-width: 90vw;
    text-align: center; border-top: 4px solid #16a085;
}
.auth-env-badge { font-size: 0.75rem; color: #999; margin-bottom: 0.5rem; }
.auth-title { font-size: 1.4rem; font-weight: 600; color: #2c3e50; margin-bottom: 0.25rem; }
.auth-subtitle { font-size: 0.85rem; color: #999; margin-bottom: 1.5rem; }
.auth-label { display: block; text-align: left; font-size: 0.85rem; color: #555; margin-bottom: 4px; font-weight: 500; }
.auth-input {
    width: 100%; padding: 0.7rem; border: 1px solid #ddd; border-radius: 6px;
    font-size: 0.95rem; margin-bottom: 14px;
}
.auth-input:focus { outline: none; border-color: #16a085; box-shadow: 0 0 0 3px rgba(22,160,133,0.1); }
.auth-button {
    width: 100%; padding: 0.75rem; border: none; border-radius: 6px;
    background: #16a085; color: white; font-size: 1rem; font-weight: 500;
    cursor: pointer; margin-top: 0.5rem;
}
.auth-button:hover { opacity: 0.9; }
.auth-button:disabled { opacity: 0.6; cursor: not-allowed; }
.auth-error { color: #e74c3c; font-size: 0.85rem; margin-bottom: 1rem; display: none; }
.container { display: flex; min-height: 100vh; }

/* サイドバー */
.sidebar {
    width: 230px; background: #2c3e50; color: white;
    display: flex; flex-direction: column;
    position: fixed; height: 100vh; top: 0; left: 0;
    overflow-y: auto; z-index: 1000;
}
.sidebar-footer { margin-top: auto; padding: 1rem; border-top: 1px solid #34495e; }
.signout-btn {
    width: 100%; padding: 0.5rem; background: none; border: 1px solid #4a5f7a;
    color: #ecf0f1; border-radius: 4px; cursor: pointer; font-size: 0.85rem;
}
.signout-btn:hover { background: #34495e; }
.sidebar-header { background: #34495e; padding: 1rem; border-bottom: 1px solid #4a5f7a; }
.sidebar-title { margin: 0; font-size: 1.2rem; font-weight: 600; }
.sidebar-app-badges { display: flex; gap: 6px; margin-top: 8px; }
.sidebar-badge {
    padding: 3px 10px; border-radius: 20px; font-size: 0.75rem; font-weight: 600;
}
.chat-badge { background: #c2185b; color: white; }
.bot-badge { background: #00796b; color: white; }
.menu-item {
    display: flex; align-items: center; gap: 0.6rem;
    padding: 0.75rem 1rem; color: #ecf0f1;
    border-bottom: 1px solid #34495e; cursor: pointer;
    transition: background-color 0.3s; background: none; border: none;
    width: 100%; text-align: left; font-weight: 500; font-size: 1rem;
}
.menu-icon { width: 18px; height: 18px; flex-shrink: 0; }
.menu-item:hover { background-color: #34495e; }
.menu-item.active { background-color: #16a085; border-left: 4px solid #1abc9c; }

/* メインコンテンツ */
.main-content { flex: 1; margin-left: 230px; display: flex; flex-direction: column; }
.header {
    background: #16a085; color: white; padding: 1rem 2rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: sticky; top: 0; z-index: 100;
    display: flex; justify-content: space-between; align-items: center;
}
.header h1 { font-size: 1.5rem; }
.header .env-badge { font-size: 0.8rem; font-weight: 600; padding: 4px 12px; border-radius: 10px; letter-spacing: 0.5px; display: none; white-space: nowrap; }
.header .env-badge:not(:empty) { display: inline-block; }
.help-btn { display: none; }
.fab-help {
    position: fixed; bottom: 24px; right: 24px; z-index: 9999;
    padding: 12px 22px; border-radius: 999px; border: none;
    background: #3498db; color: white; font-size: 0.95rem; font-weight: 600;
    cursor: pointer; box-shadow: 0 4px 12px rgba(52,152,219,0.4);
    display: flex; align-items: center; gap: 8px;
    transition: transform 0.2s, box-shadow 0.2s;
}
.fab-help:hover { transform: scale(1.05); box-shadow: 0 6px 16px rgba(52,152,219,0.5); }
.work-area { flex: 1; padding: 2rem; overflow-y: auto; }
.content-title { font-size: 1.8rem; color: #2c3e50; margin-bottom: 1.5rem; font-weight: 600; }

.screen { display: none; }
.screen.active { display: block; }
.card { background: white; padding: 2rem; border-radius: 8px; box-shadow: 0 2px 8px rgba(0,0,0,0.1); margin-bottom: 1.5rem; }

/* アクションカード */
.action-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; margin-bottom: 1.5rem; }
.action-card {
    background: white; border-radius: 12px; padding: 2rem 1.5rem;
    text-align: center; cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    border: 2px solid transparent; position: relative;
}
.action-card:hover { transform: translateY(-4px); box-shadow: 0 8px 20px rgba(0,0,0,0.12); border-color: #3498db; }
.action-card-submit:hover { border-color: #27ae60; }
.action-card-icon { font-size: 2.5rem; margin-bottom: 0.75rem; }
.action-card-title { font-size: 1.2rem; font-weight: 600; color: #2c3e50; margin-bottom: 0.5rem; }
.action-card-desc { font-size: 0.9rem; color: #7f8c8d; line-height: 1.5; }
.action-card-badge {
    position: absolute; top: -8px; right: -8px;
    background: #e74c3c; color: white;
    padding: 0.25rem 0.75rem; border-radius: 12px;
    font-size: 0.85rem; font-weight: 600;
}

/* ステップインジケーター */
.steps { display: flex; justify-content: center; gap: 0; margin-bottom: 2rem; }
.step {
    display: flex; align-items: center; gap: 0.5rem;
    padding: 0.75rem 1.5rem; color: #bdc3c7; font-weight: 500; position: relative;
}
.step::after { content: '→'; position: absolute; right: -12px; color: #ddd; }
.step:last-child::after { content: ''; }
.step-num {
    display: inline-flex; align-items: center; justify-content: center;
    width: 28px; height: 28px; border-radius: 50%;
    background: #ecf0f1; color: #bdc3c7; font-size: 0.85rem; font-weight: 600;
}
.step.active { color: #2c3e50; }
.step.active .step-num { background: #3498db; color: white; }
.step.done { color: #27ae60; }
.step.done .step-num { background: #27ae60; color: white; }

.form-step { display: none; }
.form-step.active { display: block; }

/* ボタン */
.button-group { display: flex; gap: 1rem; margin-top: 2.5rem; flex-wrap: wrap; }
.btn { padding: 0.75rem 2rem; border: none; border-radius: 4px; font-size: 1rem; cursor: pointer; transition: all 0.3s; font-weight: 500; }
.btn-primary { background: #3498db; color: white; }
.btn-primary:hover { background: #2980b9; }
.btn-success { background: #27ae60; color: white; }
.btn-success:hover { background: #229954; }
.btn-secondary { background: #95a5a6; color: white; }
.btn-secondary:hover { background: #7f8c8d; }
.btn-danger { background: #e74c3c; color: white; }
.btn-danger:hover { background: #c0392b; }
.btn-sm { padding: 0.25rem 0.75rem; font-size: 0.875rem; }

.info-box { background: #e8f5e9; border-left: 4px solid #27ae60; padding: 1rem; margin-top: 1rem; border-radius: 4px; }
.info-box p { color: #2c3e50; }

/* フォーム */
.form-group { margin-bottom: 1.5rem; }
.form-group label { display: block; margin-bottom: 0.5rem; color: #2c3e50; font-weight: 500; }
.form-group input[type="text"], .form-group select, .form-group textarea {
    width: 100%; padding: 0.75rem; border: 1px solid #ddd; border-radius: 4px; font-size: 1rem;
}
.form-group input:focus, .form-group select:focus { outline: none; border-color: #3498db; box-shadow: 0 0 0 3px rgba(52,152,219,0.1); }
.required { color: #e74c3c; }
.form-hint { color: #7f8c8d; font-size: 0.9rem; margin-bottom: 1.5rem; }

/* カテゴリ連動 */
.category-levels { display: flex; flex-direction: column; gap: 0.5rem; }
.category-level .form-group { margin-bottom: 0.75rem; }

/* カテゴリ トグル（B3: カード型） */
.cat-toggle { display: inline-flex; gap: 6px; margin-bottom: 8px; }
.cat-toggle-btn { padding: 6px 14px; font-size: 12px; font-weight: 500; border: 1.5px solid #e5e5e5; border-radius: 8px; cursor: pointer; background: #fff; color: #999; transition: all 0.2s; display: flex; align-items: center; justify-content: center; gap: 5px; }
.cat-toggle-btn svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 2; }
.cat-toggle-btn.active-sel { border-color: #3498db; color: #3498db; background: #eff8ff; box-shadow: 0 2px 8px rgba(52,152,219,0.15); }
.cat-toggle-btn.active-new { border-color: #16a34a; color: #16a34a; background: #f0fdf4; box-shadow: 0 2px 8px rgba(22,163,74,0.15); }
.cat-toggle-btn:not([class*="active"]):hover { border-color: #ccc; color: #666; }
.category-input.new-mode, .category-input-always.new-mode { border-color: #16a34a; }
.category-input.new-mode:focus, .category-input-always.new-mode:focus { border-color: #16a34a; box-shadow: 0 0 0 3px rgba(22,163,74,0.15); }

.category-input, .category-input-always {
    width: 100%; padding: 0.75rem; border: 1px solid #ddd; border-radius: 4px; font-size: 1rem; margin-top: 0.25rem;
}
.category-input:focus, .category-input-always:focus { outline: none; border-color: #3498db; box-shadow: 0 0 0 3px rgba(52,152,219,0.1); }

/* 編集画面ツールバー */
.edit-toolbar { display: flex; align-items: center; gap: 16px; padding: 8px 0; margin-bottom: 14px; }
.edit-seg { display: flex; background: #f1f5f9; border-radius: 24px; padding: 4px; position: relative; }
.edit-seg-bg { position: absolute; top: 4px; height: calc(100% - 8px); border-radius: 20px; background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,0.1); transition: left .3s cubic-bezier(.4,0,.2,1), width .3s cubic-bezier(.4,0,.2,1); pointer-events: none; }
.edit-seg-btn { padding: 8px 22px; font-size: 13px; font-weight: 600; border: none; cursor: pointer; background: transparent; color: #94a3b8; border-radius: 20px; transition: color .3s; position: relative; z-index: 1; }
.edit-seg-btn[data-value="chat"].active { color: #ec4899; }
.edit-seg-btn[data-value="bot"].active { color: #0d9488; }
.edit-seg-btn:not(.active):hover { color: #64748b; }
.edit-search { flex: 1; max-width: 280px; font-size: 13px; padding: 8px 16px; border-radius: 24px; border: 1px solid #e2e8f0; outline: none; transition: border-color .2s, box-shadow .2s; }
.edit-search:focus { border-color: #cbd5e1; box-shadow: 0 0 0 3px rgba(203,213,225,0.2); }
.edit-count { font-size: 13px; color: #94a3b8; margin-left: auto; white-space: nowrap; font-weight: 500; }

/* Quillエディタ */
#answerEditor { height: 250px; background: white; }

/* カテゴリパス表示 */
.category-path-display {
    background: #f0f4f8; border-left: 4px solid #3498db;
    padding: 0.75rem 1rem; border-radius: 4px; margin-bottom: 1.5rem;
    font-size: 0.95rem; color: #2c3e50;
}
.category-path-display span { color: #3498db; font-weight: 500; }

/* キーワードタグ入力 */
.keyword-tags {
    display: flex; flex-wrap: wrap; gap: 6px;
    padding: 8px; border: 2px solid #e0e0e0; border-radius: 8px;
    min-height: 44px; cursor: text; transition: border 0.2s;
}
.keyword-tags:focus-within { border-color: #3498db; }
.keyword-tags input {
    border: none; outline: none; font-size: 14px;
    min-width: 160px; flex: 1; padding: 4px 0;
}
.kw-tag {
    display: inline-flex; align-items: center; gap: 4px;
    background: #eef2ff; color: #4338ca;
    padding: 4px 8px; border-radius: 5px; font-size: 13px;
}
.kw-tag button {
    background: none; border: none; color: #9ca3af;
    cursor: pointer; font-size: 14px; padding: 0 2px; line-height: 1;
}
.kw-tag button:hover { color: #e74c3c; }

/* テーブル */
table { width: 100%; border-collapse: collapse; margin-top: 1rem; }
table th, table td { padding: 0.75rem; text-align: left; border-bottom: 1px solid #ddd; }
table th { background: #ecf0f1; font-weight: 600; }
table tr:hover { background: #f8f9fa; }

/* 変更リスト（ダークヘッダーテーブル） */
.cl-summary { display: flex; gap: 8px; align-items: center; margin-bottom: 14px; flex-wrap: wrap; }
.cl-sum { font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 16px; }
.cl-sum-add { background: #dcfce7; color: #16a34a; }
.cl-sum-edit { background: #fef3c7; color: #d97706; }
.cl-sum-del { background: #fee2e2; color: #dc2626; }
.cl-sum-total { font-size: 12px; color: #999; margin-left: auto; }
.cl-table { width: 100%; border-collapse: separate; border-spacing: 0; border-radius: 8px; overflow: hidden; }
.cl-table th { background: #1e293b; color: #fff; padding: 10px 14px; font-size: 12px; font-weight: 500; text-align: left; }
.cl-table td { padding: 10px 14px; border-bottom: 1px solid #f0f0f0; font-size: 13px; }
.cl-table tbody tr { cursor: pointer; transition: .1s; }
.cl-table tbody tr:hover td { background: #f8fafc; }
.cl-row-chat td:first-child { border-left: 3px solid #ec4899; }
.cl-row-bot td:first-child { border-left: 3px solid #0d9488; }
.cl-badge { display: inline-block; padding: 2px 10px; border-radius: 12px; font-size: 11px; font-weight: 600; }
.cl-badge-add { background: #dcfce7; color: #16a34a; }
.cl-badge-edit { background: #fef3c7; color: #d97706; }
.cl-badge-del { background: #fee2e2; color: #dc2626; }
.cl-app { font-size: 11px; font-weight: 600; }
.cl-app-chat { color: #ec4899; }
.cl-app-bot { color: #0d9488; }
.cl-q { font-weight: 500; color: #333; }
.cl-cat { font-size: 11px; color: #aaa; margin-top: 1px; }
.cl-acts { display: flex; gap: 2px; }
.cl-act { background: none; border: 1px solid #e0e0e0; cursor: pointer; padding: 4px; border-radius: 6px; color: #999; transition: .15s; }
.cl-act svg { width: 14px; height: 14px; display: block; }
.cl-act:hover { background: #f3f4f6; color: #666; border-color: #ccc; }
.cl-act-x:hover { color: #dc2626; border-color: #fca5a5; background: #fef2f2; }

.badge { display: inline-block; padding: 0.25rem 0.75rem; border-radius: 12px; font-size: 0.875rem; font-weight: 500; }
.badge-add { background: #d4edda; color: #155724; }
.badge-edit { background: #fff3cd; color: #856404; }
.badge-delete { background: #f8d7da; color: #721c24; }

.action-buttons { display: flex; gap: 0.5rem; }
.row-deleted { opacity: 0.45; }
.row-deleted td { text-decoration: line-through; color: #999; }
.row-deleted td:last-child { text-decoration: none; }
.empty-message { color: #999; text-align: center; padding: 2rem; }

/* ローディング */
.loading-spinner { text-align: center; padding: 3rem; color: #999; }
.spinner {
    width: 36px; height: 36px; margin: 0 auto 1rem;
    border: 3px solid #e0e0e0; border-top-color: #16a085;
    border-radius: 50%; animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* FAQアコーディオン */
.faq-accordion { border: 1px solid #e2e8f0; border-radius: 12px; margin-bottom: 8px; overflow: hidden; background: #fff; }
.faq-accordion-header {
    display: flex; align-items: center; gap: 10px;
    padding: 12px 16px; cursor: pointer; transition: background .15s;
    font-weight: 600; font-size: 14px; color: #1e293b; user-select: none;
}
.faq-accordion-header:hover { background: #f8fafc; }
.faq-accordion-arrow { font-size: 10px; color: #cbd5e1; transition: transform 0.2s; }
.faq-accordion.open .faq-accordion-arrow { transform: rotate(90deg); color: #16a085; }
.faq-accordion-title { flex: 1; }
.faq-accordion-count { font-size: 12px; color: #94a3b8; font-weight: 400; }
.faq-accordion-body { display: none; border-top: 1px solid #f1f5f9; }
.faq-accordion.open .faq-accordion-body { display: block; }

/* FAQ行 */
.faq-row { display: flex; align-items: center; gap: 8px; padding: 10px 16px; border-bottom: 1px solid #f8fafc; transition: background .1s; }
.faq-row:hover { background: #fafbfc; }
.faq-row:last-child { border-bottom: none; }
.faq-row-info { flex: 1; display: flex; align-items: center; gap: 8px; min-width: 0; }
.faq-item-id { font-size: 11px; color: #94a3b8; font-weight: 600; width: 36px; text-align: right; flex-shrink: 0; }
.faq-item-sub { font-size: 11px; color: #16a085; background: #ecfdf5; padding: 1px 6px; border-radius: 4px; flex-shrink: 0; max-width: 120px; text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.faq-item-q { font-weight: 600; color: #1e293b; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; min-width: 0; }

/* 子FAQインデント */
.faq-row-d1 { padding-left: 52px; background: #fafbfc; }
.faq-row-d2 { padding-left: 76px; background: #f5f5f5; }
.faq-indent { width: 16px; flex-shrink: 0; color: #cbd5e1; font-size: 12px; text-align: center; }

/* パンくず */
.faq-breadcrumb { font-size: 12px; color: #94a3b8; margin-bottom: 10px; display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.faq-breadcrumb span { cursor: pointer; color: #16a085; font-weight: 500; }
.faq-breadcrumb span:hover { text-decoration: underline; }
.faq-breadcrumb .sep { color: #cbd5e1; cursor: default; }
.faq-breadcrumb .cur { color: #1e293b; font-weight: 600; cursor: default; }
.faq-breadcrumb .cur:hover { text-decoration: none; }

/* チップフィルター */
.faq-chips { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; align-items: center; }
.faq-chip-label { font-size: 11px; color: #94a3b8; font-weight: 600; }
.faq-chip { padding: 5px 13px; border: 1px solid #e2e8f0; border-radius: 20px; font-size: 12px; color: #64748b; cursor: pointer; transition: all .15s; background: #fff; }
.faq-chip:hover, .faq-chip.active { background: #16a085; color: #fff; border-color: #16a085; }
.faq-chip-clear { padding: 5px 10px; border: 1px solid #e2e8f0; border-radius: 20px; font-size: 12px; color: #ef4444; cursor: pointer; background: #fff; transition: all .15s; margin-left: 4px; }
.faq-chip-clear:hover { background: #fef2f2; border-color: #ef4444; }
.faq-count { font-size: 12px; color: #94a3b8; margin-bottom: 12px; }

/* アイコンボタン */
.faq-actions { display: flex; gap: 2px; }
.faq-act-btn { width: 30px; height: 30px; border: none; border-radius: 6px; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all .15s; background: none; position: relative; }
.faq-act-btn:hover { background: #f1f5f9; }
.faq-act-btn svg { width: 16px; height: 16px; }
.faq-act-edit svg { color: #059669; } .faq-act-edit:hover { background: #ecfdf5; }
.faq-act-del svg { color: #ef4444; } .faq-act-del:hover { background: #fef2f2; }
.faq-act-child svg { color: #3b82f6; } .faq-act-child:hover { background: #eff6ff; }
.faq-act-btn::after { content: attr(data-tip); position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%); padding: 3px 8px; background: #1e293b; color: #fff; font-size: 10px; border-radius: 4px; white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity .15s; }
.faq-act-btn:hover::after { opacity: 1; }

/* 親FAQ情報 */
.parent-faq-info {
    background: #fff8e1; border-left: 4px solid #f59e0b;
    padding: 0.75rem 1rem; border-radius: 4px; margin-bottom: 1.5rem;
    font-size: 0.95rem; color: #2c3e50;
}
.parent-faq-info .parent-label { font-size: 0.8rem; color: #999; margin-bottom: 0.25rem; }
.parent-faq-info .parent-q { font-weight: 500; }

/* トースト */
#toastContainer { position: fixed; top: 1rem; right: 1rem; z-index: 9999; display: flex; flex-direction: column; gap: 0.5rem; }
.toast {
    padding: 0.75rem 1.5rem; border-radius: 8px; color: white; font-weight: 500;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    animation: toastIn 0.3s ease, toastOut 0.3s ease 2.7s forwards;
    max-width: 350px;
}
.toast-success { background: #27ae60; }
.toast-error { background: #e74c3c; }
.toast-info { background: #3498db; }
@keyframes toastIn { from { opacity: 0; transform: translateX(100%); } to { opacity: 1; transform: translateX(0); } }
@keyframes toastOut { from { opacity: 1; } to { opacity: 0; } }

.btn-remove { background: none; border: none; color: #e74c3c; cursor: pointer; font-size: 1.2rem; padding: 0.25rem; transition: transform 0.2s; }
.btn-remove:hover { transform: scale(1.2); }

/* ===== 完了ポップアップ ===== */
.completion-overlay {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0); z-index: 10000;
    display: flex; justify-content: center; align-items: center;
    pointer-events: none; transition: background 0.3s;
}
.completion-overlay.show { background: rgba(0,0,0,0.5); pointer-events: auto; }

.completion-modal {
    background: white; border-radius: 16px; padding: 2.5rem;
    text-align: center; max-width: 360px; width: 90%;
    transform: scale(0.5); opacity: 0;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s;
}
.completion-overlay.show .completion-modal { transform: scale(1); opacity: 1; }

.checkmark-circle { width: 80px; height: 80px; margin: 0 auto 1.5rem; }
.checkmark-svg { width: 80px; height: 80px; }
.checkmark-circle-bg {
    stroke: #27ae60; stroke-width: 2;
    stroke-dasharray: 166; stroke-dashoffset: 166;
    animation: none;
}
.checkmark-check {
    stroke: #27ae60; stroke-width: 3;
    stroke-linecap: round; stroke-linejoin: round;
    stroke-dasharray: 48; stroke-dashoffset: 48;
    animation: none;
}
.completion-overlay.show .checkmark-circle-bg {
    animation: circleAnim 0.6s ease-in-out 0.2s forwards;
}
.completion-overlay.show .checkmark-check {
    animation: checkAnim 0.4s ease-in-out 0.6s forwards;
}
@keyframes circleAnim { to { stroke-dashoffset: 0; } }
@keyframes checkAnim { to { stroke-dashoffset: 0; } }

.completion-title { font-size: 1.5rem; color: #2c3e50; margin-bottom: 0.5rem; }
.completion-message { color: #7f8c8d; margin-bottom: 1.5rem; }
.completion-actions { display: flex; flex-direction: column; gap: 0.5rem; }
.completion-actions .btn { width: 100%; }

/* Driver.js ガイドツアー カスタム */
.guide-popover.driver-popover {
    max-width: 420px;
    padding: 20px 24px;
}
.guide-popover .driver-popover-title {
    font-size: 1.15rem;
}
.guide-popover .driver-popover-description {
    font-size: 1rem;
    line-height: 1.6;
}
.guide-popover .driver-popover-footer button {
    font-size: 0.95rem;
    padding: 6px 16px;
}

/* 変更リストテーブル 回答・KW列 */
.cell-answer { max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.85rem; color: #555; }
.cell-kw { max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.85rem; color: #666; }


/* Quillエディタ左右配置 */
.editor-wrap {
    display: flex;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    min-height: 500px;
    margin-top: 8px;
}

#quillToolbar {
    width: 100px;
    background: #f8f9fa;
    border-right: 2px solid #e0e0e0;
    padding: 12px 6px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-shrink: 0;
}

#quillToolbar button {
    width: 80px !important;
    height: 60px !important;
    border-radius: 8px;
    display: flex !important;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    background: white;
    border: 2px solid #e0e0e0 !important;
    margin: 0 !important;
    transition: all 0.2s;
    padding: 0 !important;
    cursor: pointer;
}

#quillToolbar button:hover {
    background: #e3f2fd;
    border-color: #2196f3 !important;
    transform: translateX(4px);
}

#quillToolbar button.ql-active {
    background: #2196f3 !important;
    border-color: #1976d2 !important;
}

#quillToolbar button.ql-active svg {
    stroke: white !important;
    fill: white !important;
}

#quillToolbar button svg {
    width: 22px;
    height: 22px;
}

#quillToolbar button::after {
    content: attr(data-label);
    font-size: 10px;
    color: #333;
    font-weight: 600;
}

#quillToolbar button.ql-active::after {
    color: white !important;
}

.editor-content-area {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.editor-header {
    padding: 16px 20px;
    background: #f8f9fa;
    border-bottom: 2px solid #e0e0e0;
    font-size: 14px;
    font-weight: 600;
    color: #666;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.editor-actions {
    display: flex;
    gap: 8px;
}

.editor-action-btn {
    width: 32px;
    height: 32px;
    border: 1px solid #ccc;
    background: #f8f9fa;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    font-size: 20px;
    color: #666;
}

.editor-action-btn:hover {
    background: #2196f3;
    border-color: #2196f3;
    color: white;
}

.color-reset::before,
.color-reset::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 2px;
    background: #e74c3c;
    top: 50%;
    left: 50%;
}

.color-reset::before {
    transform: translate(-50%, -50%) rotate(45deg);
}

.color-reset::after {
    transform: translate(-50%, -50%) rotate(-45deg);
}

.editor-wrap .ql-container {
    flex: 1;
    font-size: 15px;
    border: none !important;
}

.editor-wrap .ql-editor {
    padding: 20px;
    min-height: 400px;
}

.color-option:hover {
    transform: scale(1.2);
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

/* モーダル */
.modal-overlay{position:fixed;top:0;left:0;right:0;bottom:0;background:rgba(0,0,0,.45);z-index:9999;display:flex;justify-content:center;align-items:flex-start;padding:24px 16px;overflow-y:auto}
.modal-content{background:#fff;border-radius:14px;width:100%;max-width:1100px;overflow:hidden;box-shadow:0 24px 80px rgba(0,0,0,.25);animation:modalIn .2s ease-out}
@keyframes modalIn{from{opacity:0;transform:translateY(-16px)}to{opacity:1;transform:translateY(0)}}
.modal-header{display:flex;align-items:center;padding:0 24px;border-bottom:2px solid #f1f5f9;background:#fafbfc}
.modal-title{font-size:14px;font-weight:700;color:#16a085;padding:14px 0;border-bottom:2px solid #16a085;margin-bottom:-2px;flex:1}
.modal-id{font-size:11px;color:#94a3b8;background:#f1f5f9;padding:3px 10px;border-radius:6px;margin-right:12px}
.modal-close{width:32px;height:32px;border:none;background:none;font-size:18px;color:#94a3b8;cursor:pointer;border-radius:8px;transition:all .15s}
.modal-close:hover{background:#f1f5f9;color:#1e293b}
.modal-body{display:grid;grid-template-columns:340px 1fr;min-height:420px}
.modal-left{padding:20px;border-right:1px solid #f1f5f9;background:#fafbfc}
.modal-right{padding:20px;display:flex;flex-direction:column}
.modal-right .form-group{flex:1;display:flex;flex-direction:column}
.modal-right .ql-container{flex:1;overflow-y:auto}
.modal-section{font-size:11px;font-weight:700;color:#94a3b8;text-transform:uppercase;letter-spacing:.5px;margin-bottom:8px;margin-top:12px}
.modal-section:first-child{margin-top:0}
.modal-foot{padding:12px 20px;border-top:1px solid #f1f5f9;display:flex;justify-content:flex-end;gap:8px}
