/* CSS変数とリセット */
:root {
    /* カラーシステム */
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --secondary-color: #6b7280;
    --success-color: #10b981;
    --error-color: #ef4444;
    --warning-color: #f59e0b;
    
    /* ライトテーマ */
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-tertiary: #f1f5f9;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --border-color: #e5e7eb;
    
    /* シャドウシステム */
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    
    /* レイアウト変数 */
    --header-height: 70px;
    --sidebar-width: 300px;
    --border-radius: 0.375rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    
    /* モバイル用変数 */
    --mobile-tap-size: 44px;
    --mobile-padding: 0.75rem;
}

/* ダークテーマ */
.theme-dark {
    --bg-primary: #1f2937;
    --bg-secondary: #111827;
    --bg-tertiary: #0f172a;
    --text-primary: #f9fafb;
    --text-secondary: #d1d5db;
    --border-color: #374151;
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.3), 0 1px 2px 0 rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -2px rgba(0, 0, 0, 0.2);
}

/* ダークテーマでの選択行スタイル */
.theme-dark .tree-item-content.selected {
    background-color: #374151 !important;
    border-color: #3b82f6 !important;
    outline-color: rgba(59, 130, 246, 0.5) !important;
}

.theme-dark .tree-item-content.selected:hover {
    background-color: #4b5563 !important;
}

/* フォントサイズ */
.font-small { font-size: 14px; }
.font-medium { font-size: 16px; }
.font-large { font-size: 18px; }

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans JP', sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    overflow: hidden;
}

/* アプリケーションコンテナ */
.app-container {
    height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ヘッダー */
.header {
    background-color: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow);
    z-index: 100;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    max-width: none;
}

.logo {
    display: flex;
    align-items: center;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-color);
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.logo:hover {
    opacity: 0.8;
}

.logo i {
    margin-right: 0.5rem;
    font-size: 1.5rem;
}

/* ヘッダーのα版バッジ */
.header-alpha-badge {
    background: linear-gradient(135deg, #ff6b6b, #ee5a52);
    color: white;
    font-size: 0.625rem;
    font-weight: 600;
    padding: 0.125rem 0.5rem;
    border-radius: 0.75rem;
    margin-left: 0.5rem;
    box-shadow: 0 1px 4px rgba(255, 107, 107, 0.3);
    animation: pulseGlow 2s ease-in-out infinite alternate;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* デスクトップでは検索ボタンを非表示 */
#searchBtn {
    display: none;
}

/* ボタンスタイル */
.btn {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-sm) var(--spacing-md);
    border: none;
    border-radius: var(--border-radius);
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
}

.btn-secondary {
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background-color: var(--border-color);
}

.btn-icon {
    padding: 0.5rem;
    background-color: transparent;
    color: var(--text-secondary);
    border: 1px solid transparent;
}

.btn-icon:hover {
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
}

.btn-small {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
}

/* ドロップダウンメニュー */
.dropdown-container {
    position: relative;
    display: inline-block;
}

.dropdown-toggle {
    position: relative;
}

.dropdown-arrow {
    margin-left: 0.5rem;
    font-size: 0.75rem;
    transition: transform 0.2s ease;
}

.dropdown-container.open .dropdown-arrow {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    right: 0;
    top: 100%;
    margin-top: 0.25rem;
    background-color: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    min-width: 200px;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-0.5rem);
    transition: all 0.2s ease;
}

.dropdown-container.open .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    color: var(--text-primary);
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.dropdown-item:hover {
    background-color: var(--bg-secondary);
}

.dropdown-item:first-child {
    border-radius: var(--border-radius) var(--border-radius) 0 0;
}

.dropdown-item:last-child {
    border-radius: 0 0 var(--border-radius) var(--border-radius);
}

.dropdown-item i {
    margin-right: 0.75rem;
    width: 1rem;
    text-align: center;
}

/* ユーザー認証UI */
/* 認証関連要素の初期状態を非表示に */
#googleLoginBtn,
#userInfo,
#logoutBtn {
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* 認証状態確定後の表示 */
body.auth-ready #googleLoginBtn,
body.auth-ready #userInfo,
body.auth-ready #logoutBtn {
    opacity: 1;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    background-color: var(--bg-secondary);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
}

.user-avatar {
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border-color);
    background-color: var(--bg-secondary);
    flex-shrink: 0;
    transition: border-color 0.2s ease;
}

.user-avatar:hover {
    border-color: var(--primary-color);
}

.user-name {
    font-size: 0.875rem;
    color: var(--text-primary);
    font-weight: 500;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Google認証ボタンのスタイル */
#googleLoginBtn {
    background-color: #4285f4;
    color: white;
    border: none;
}

#googleLoginBtn:hover {
    background-color: #3367d6;
}

#googleLoginBtn i {
    margin-right: 0.5rem;
}

/* モバイル対応 */
@media (max-width: 768px) {
    .user-info {
        padding: 0.375rem 0.5rem;
    }
    
    .user-name {
        max-width: 80px;
        font-size: 0.75rem;
    }
    
    .user-avatar {
        width: 1.5rem;
        height: 1.5rem;
    }
    
    #googleLoginBtn {
        padding: 0.375rem 0.5rem;
        font-size: 0.75rem;
    }
    
    #googleLoginBtn i {
        margin-right: 0.25rem;
    }
}

/* メインコンテンツ */
.main-content {
    flex: 1;
    display: flex;
    min-height: 0;
}

/* サイドバー */
.sidebar {
    width: var(--sidebar-width);
    background-color: var(--bg-secondary);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
}

.sidebar.collapsed {
    width: 0;
    min-width: 0;
    overflow: hidden;
}


/* サイドバー再表示ボタン */
.sidebar-restore-btn {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 1000;
    display: none;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    box-shadow: var(--shadow-lg);
    transition: all 0.3s ease;
    animation: slideInLeft 0.3s ease;
}

.sidebar-restore-btn:hover {
    background-color: var(--primary-hover);
    transform: translateX(2px);
}

.sidebar-restore-btn i {
    font-size: 1rem;
}

.sidebar-restore-btn span {
    white-space: nowrap;
}

/* サイドバー非表示時に再表示ボタンを表示 */
.main-content.sidebar-collapsed .sidebar-restore-btn {
    display: flex;
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.sidebar-header-actions {
    display: flex;
    gap: 0.5rem;
}

.sidebar-header h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.notes-list {
    flex: 1;
    overflow-y: auto;
    padding: 0.5rem;
}

.note-item {
    display: flex;
    align-items: center;
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    border-radius: 0.375rem;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.note-item:hover {
    background-color: var(--bg-tertiary);
}

.note-item.active {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-hover);
}

.note-item-content {
    flex: 1;
    min-width: 0;
}

.note-item-title {
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.note-item-date {
    font-size: 0.75rem;
    opacity: 0.7;
    margin-bottom: 0.25rem;
}

.note-item-preview {
    font-size: 0.75rem;
    opacity: 0.6;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.note-item-actions {
    margin-left: 0.5rem;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.note-item:hover .note-item-actions {
    opacity: 1;
}

.empty-notes {
    text-align: center;
    padding: 2rem 1rem;
    color: var(--text-secondary);
    font-style: italic;
}

/* 共有ノート読み込み状態 */
.empty-shared-docs {
    padding: 1rem;
    text-align: center;
}

.loading-shared {
    color: var(--text-secondary);
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.loading-shared i {
    color: var(--primary-color);
}

.no-shared {
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-style: italic;
}

/* エディターエリア */
.editor-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.editor-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    background-color: var(--bg-secondary);
}

.note-title {
    flex: 1;
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: 0.375rem;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-size: 1.125rem;
    font-weight: 600;
    margin-right: 1rem;
}

.note-title:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.editor-tools {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.save-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--success-color);
    opacity: 0.8;
    transition: all 0.3s ease;
}

.save-status.saving {
    color: var(--warning-color);
}

.save-status.saving i {
    animation: spin 1s linear infinite;
}

.save-status.error {
    color: var(--error-color);
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* 階層エディター */
.hierarchy-editor {
    flex: 1;
    background-color: var(--bg-primary);
    position: relative;
    overflow: hidden;
}

.editor-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--text-secondary);
    text-align: center;
    position: relative;
}

/* ランディングヒーローセクション（デスクトップ専用） */
.landing-hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    max-width: 1000px;
    margin: 0 auto;
    padding: 1.5rem;
    height: 100%;
}

/* 横並びレイアウト */
.hero-content-wrapper {
    display: flex;
    gap: 3rem;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    align-items: flex-start;
    position: relative;
    box-sizing: border-box;
    padding: 0 1rem;
    /* レイアウト安定化 */
    contain: layout style;
    isolation: isolate;
}

.hero-main-content {
    flex: 1 1 auto;
    min-width: 0;
    max-width: none; /* 幅制限を緩和 */
    width: auto;
}

.hero-side-content {
    flex: 0 0 320px; /* 少し幅を広げる */
    width: 320px;
    min-width: 280px; /* 最小幅を緩和 */
    max-width: 320px;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-top: 8rem; /* タイトルの下に配置 */
    position: relative;
    align-self: flex-start;
    box-sizing: border-box;
    /* 認証状態変更時のレイアウト安定化 */
    transform: translateZ(0);
    will-change: auto;
    contain: layout;
}

.hero-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 1rem;
}

.hero-title-wrapper {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: nowrap; /* タイトルの改行を防ぐ */
    min-width: 0; /* flexアイテムの縮小を許可 */
}

.hero-icon {
    margin: 0;
}

.hero-icon i {
    font-size: 3.5rem;
    color: var(--primary-color);
    opacity: 0.8;
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    white-space: nowrap; /* タイトルの改行を防ぐ */
    flex-shrink: 0; /* タイトルの縮小を防ぐ */
    background: linear-gradient(135deg, var(--primary-color), #3b82f6);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* α版バッジ */
.alpha-badge {
    background: linear-gradient(135deg, #ff6b6b, #ee5a52);
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    box-shadow: 0 2px 8px rgba(255, 107, 107, 0.3);
    white-space: nowrap;
    animation: pulseGlow 2s ease-in-out infinite alternate;
    position: relative;
    top: -0.5rem;
}

@keyframes pulseGlow {
    0% {
        box-shadow: 0 2px 8px rgba(255, 107, 107, 0.3);
    }
    100% {
        box-shadow: 0 4px 16px rgba(255, 107, 107, 0.5);
    }
}

.hero-subtitle {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-bottom: 1.75rem;
    font-weight: 400;
}

/* 機能グリッド */
.features-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
    margin-bottom: 2rem;
    width: 100%;
    max-width: 400px;
}

.feature-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.875rem;
    border-radius: var(--border-radius);
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.feature-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.feature-item i {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.feature-item span {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary);
}

/* CTAセクション */
.cta-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.cta-button {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 2rem;
    font-size: 1.125rem;
    font-weight: 600;
    color: white;
    background: linear-gradient(135deg, var(--primary-color), #3b82f6);
    border: none;
    border-radius: 0.75rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.3);
    background: linear-gradient(135deg, var(--primary-hover), #2563eb);
}

.cta-button:active {
    transform: translateY(0);
}

.cta-button i {
    font-size: 1.25rem;
}

.cta-description {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin: 0;
}

/* 右側コンテンツエリアのスタイル */
.auth-info-section {
    padding: 1rem;
    background-color: rgba(37, 99, 235, 0.05);
    border-radius: 0.5rem;
    border: 1px solid rgba(37, 99, 235, 0.2);
    width: 100%;
    box-sizing: border-box;
    flex-shrink: 0;
}

.auth-info-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.auth-info-header i {
    color: #4285f4;
    font-size: 1.25rem;
}

.auth-info-header span {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.9rem;
}

.auth-info-list {
    margin: 0;
    padding-left: 2rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.auth-info-list li {
    margin-bottom: 0.25rem;
}

/* ダウンロードセクション（右側用） */
.hero-side-content .download-section {
    margin-top: 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
}

.hero-side-content .download-button {
    text-align: center;
    justify-content: center;
    font-size: 0.875rem;
    padding: 0.75rem 1.25rem;
}

.hero-side-content .download-description {
    text-align: center;
    font-size: 0.7rem;
    margin: 0;
}

/* 元のダウンロードセクション（使用されない場合のフォールバック） */
.download-section {
    margin-top: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

.divider {
    position: relative;
    width: 100%;
    text-align: center;
    margin: 1rem 0;
}

.divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background-color: var(--border-color);
}

.divider span {
    background-color: var(--bg-primary);
    padding: 0 1rem;
    position: relative;
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.download-button {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1.75rem;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    background-color: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: 0.75rem;
    text-decoration: none;
    transition: all 0.3s ease;
}

.download-button:hover {
    background-color: var(--bg-tertiary);
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.download-button i {
    font-size: 1.25rem;
    color: #0078d4; /* Windows blue */
}

.download-description {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin: 0;
}

/* ダークテーマ対応 */
.theme-dark .divider span {
    background-color: var(--bg-primary);
}

.theme-dark .download-button {
    background-color: var(--bg-secondary);
    color: var(--text-primary);
}

.theme-dark .download-button:hover {
    background-color: var(--bg-tertiary);
}

/* モバイル用プレースホルダー（非表示） */
.mobile-placeholder {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.mobile-placeholder i {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.3;
}

.mobile-placeholder h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

/* レスポンシブ対応 */
@media (max-width: 1024px) {
    .hero-content-wrapper {
        flex-direction: column;
        gap: 2rem;
    }
    
    .hero-side-content {
        flex: none;
        width: 100%;
        margin-top: 0; /* モバイル/タブレットでは上マージンを削除 */
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-icon i {
        font-size: 2.5rem;
    }
}

@media (max-width: 768px) {
    .landing-hero {
        display: none;
    }
    
    .mobile-placeholder {
        display: flex;
    }
}

/* ダークテーマ対応 */
.theme-dark .feature-item {
    background-color: var(--bg-tertiary);
}

.theme-dark .hero-title {
    background: linear-gradient(135deg, #60a5fa, #3b82f6);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.tree-container {
    height: 100%;
    overflow: auto;
    padding: 1rem;
}

/* ツリースタイル */
.tree-root, .tree-children {
    list-style: none;
    margin: 0;
    padding: 0;
}

.tree-item {
    margin: 0;
    padding: 0;
}

.tree-item-content {
    display: flex;
    align-items: center;
    padding: 0.25rem 0.5rem;
    margin: 0.125rem 0;
    border-radius: 0.25rem;
    cursor: pointer;
    transition: all 0.2s ease;
    min-height: 2rem;
    border: 2px solid transparent;
    position: relative;
    /* 🎯 CRITICAL FIX: テキスト選択を無効化してキーボードショートカットを即座に有効化 */
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.tree-item-content:hover {
    background-color: var(--bg-tertiary);
}

.tree-item-content.selected {
    background-color: var(--bg-tertiary) !important;
    border: 2px solid var(--primary-color) !important;
    outline: 2px solid rgba(37, 99, 235, 0.3) !important;
    outline-offset: -1px;
}

/* 選択した行にホバーした時 */
.tree-item-content.selected:hover {
    background-color: #e0f2fe !important;
}

.tree-spacer {
    flex-shrink: 0;
}

.expand-btn {
    width: 1.5rem;
    height: 1.5rem;
    border: none;
    background: none;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.25rem;
    margin-right: 0.25rem;
    flex-shrink: 0;
}

.expand-btn:hover {
    background-color: var(--bg-tertiary);
}

.expand-btn.hidden {
    visibility: hidden;
}

/* スマホ用展開ボタンスタイル */
@media (max-width: 768px) {
    .expand-btn, .mobile-expand-btn {
        width: 2.75rem;
        height: 2.75rem;
        min-width: 44px;
        min-height: 44px;
        padding: 0.5rem;
        border-radius: 0.5rem;
        margin-right: 0.5rem;
        background-color: rgba(0, 0, 0, 0.05);
        transition: all 0.2s ease;
    }
    
    .expand-btn:active, .mobile-expand-btn:active {
        background-color: rgba(37, 99, 235, 0.1);
        transform: scale(1.1);
    }
    
    .expand-btn i, .mobile-expand-btn i {
        font-size: 1rem;
    }
}

/* 子要素がある行の視覚的識別 */
.tree-item-content .tree-item-text {
    position: relative;
}

.tree-item-content:has(.expand-btn:not(.hidden)) .tree-item-text::after {
    content: '';
    position: absolute;
    left: -8px;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 3px;
    background-color: var(--text-secondary);
    border-radius: 50%;
    opacity: 0.5;
}

@media (max-width: 768px) {
    .tree-item-content:has(.expand-btn:not(.hidden)) {
        padding-left: 0.25rem;
        border-left: 2px solid rgba(37, 99, 235, 0.1);
    }
}

.tree-text {
    flex: 1;
    min-width: 0;
    word-wrap: break-word;
    line-height: 1.4;
}

/* YouTube containerが tree-text 内にある場合の特別なスタイル */
.tree-text .youtube-container {
    min-width: 560px;
    width: auto;
}

.tree-children {
    margin-left: 0;
}

/* ドラッグ&ドロップスタイル */
.tree-item.dragging {
    opacity: 0.5;
    transform: scale(0.98);
}

.tree-item-content.drag-over {
    background-color: rgba(37, 99, 235, 0.1);
    border: 2px dashed var(--primary-color);
}

.drop-indicator {
    position: absolute;
    background-color: var(--primary-color);
    height: 2px;
    z-index: 1000;
    pointer-events: none;
    box-shadow: 0 0 4px rgba(37, 99, 235, 0.8);
}

.drop-indicator.child-indicator {
    background-color: rgba(37, 99, 235, 0.1);
    border: 2px dashed var(--primary-color);
    height: auto;
}

/* インライン編集 */
.inline-editor {
    position: absolute;
    z-index: 1000;
    padding: 0.25rem 0.5rem;
    border: 2px solid var(--primary-color);
    border-radius: 0.25rem;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: inherit;
    font-size: inherit;
    box-shadow: var(--shadow-lg);
}

.inline-editor:focus {
    outline: none;
}

/* コンテキストメニュー */
.context-menu {
    position: fixed;
    z-index: 1000;
    background-color: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 0.375rem;
    box-shadow: var(--shadow-lg);
    padding: 0.25rem;
    min-width: 200px;
    display: none;
}

.context-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0.75rem;
    cursor: pointer;
    border-radius: 0.25rem;
    font-size: 0.875rem;
    transition: background-color 0.2s ease;
}

.context-item:hover {
    background-color: var(--bg-tertiary);
}

.context-item.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.context-item.disabled:hover {
    background-color: transparent;
}

.context-separator {
    height: 1px;
    background-color: var(--border-color);
    margin: 0.25rem 0;
}

/* 通知 */
.notification {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 1001;
    padding: 0.75rem 1rem;
    border-radius: 0.375rem;
    box-shadow: var(--shadow-lg);
    font-weight: 500;
    max-width: 300px;
    transform: translateX(100%);
    transition: transform 0.3s ease;
}

.notification.show {
    transform: translateX(0);
}

.notification.info {
    background-color: var(--primary-color);
    color: white;
}

.notification.success {
    background-color: var(--success-color);
    color: white;
}

.notification.error {
    background-color: var(--error-color);
    color: white;
}

.notification.warning {
    background-color: var(--warning-color);
    color: white;
}

/* デスクトップ専用サイドバートグル */
.note-title-section {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.5rem;
    flex: 1;
}

/* 検索入力コンテナ - デスクトップでのみ表示 */
.note-title-section .search-input-container {
    position: relative;
    flex: 1;
    max-width: 400px;
    display: flex; /* デスクトップでは表示 */
}

.search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    font-size: 0.875rem;
    z-index: 1;
}

.notes-search-input {
    width: 100%;
    padding: 0.75rem 3rem 0.75rem 2.5rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 0.9rem;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.notes-search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.clear-search-btn {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 50%;
    transition: color 0.2s ease, background-color 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 1.5rem;
    height: 1.5rem;
}

.clear-search-btn:hover {
    color: var(--text-primary);
    background-color: var(--bg-secondary);
}

/* 検索結果表示 */
.search-category-header {
    padding: 0.75rem 1rem;
    background-color: var(--bg-tertiary);
    border-top: 1px solid var(--border-color);
    margin-top: 0.5rem;
}

.search-category-header h5 {
    margin: 0;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* 検索ハイライト */
.search-highlight {
    background-color: #fef08a;
    color: #92400e;
    padding: 0.125rem 0.25rem;
    border-radius: 0.25rem;
    font-weight: 600;
}

/* ダークテーマ用ハイライト */
.theme-dark .search-highlight {
    background-color: #fbbf24;
    color: #1f2937;
}


.desktop-sidebar-toggle {
    background-color: var(--primary-color);
    color: white;
    border: none;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    white-space: nowrap;
}

.desktop-sidebar-toggle:hover {
    background-color: var(--primary-hover);
}

.note-title {
    flex: 1;
}

/* デスクトップではサイドバー復元ボタンを非表示 */
.sidebar-restore-btn {
    display: none;
}

/* レスポンシブデザイン */
/* モバイル対応は mobile.css で管理 */

/* スクロールバーのスタイリング */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

/* アニメーション */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.tree-item-content {
    animation: fadeIn 0.2s ease;
}

/* フォーカス表示の改善 */
.btn:focus, .note-title:focus, .inline-editor:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* ドラッグ&ドロップのスタイル */
.tree-item.dragging {
    opacity: 0.5;
}

.tree-item.drag-over {
    background-color: var(--primary-color);
    background-color: rgba(37, 99, 235, 0.1);
}

/* 共有ワークスペース関連のスタイル */
.shared-mode-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background-color: var(--success-color);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-weight: 500;
    position: relative;
}

.collaborators-list {
    display: flex;
    gap: 0.25rem;
    margin-left: 0.5rem;
}

.collaborator-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
}

.collaborator-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: bold;
}

/* モーダルダイアログ */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal {
    background-color: var(--bg-primary);
    border-radius: 0.5rem;
    box-shadow: var(--shadow-lg);
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.25rem;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 0.25rem;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
}

.modal-content {
    flex: 1;
    padding: 1.5rem;
    overflow-y: auto;
}

.modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border-color);
    background-color: var(--bg-secondary);
}

/* タブ */
.share-tabs {
    display: flex;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 1.5rem;
}

.tab-btn {
    background: none;
    border: none;
    padding: 0.75rem 1rem;
    cursor: pointer;
    color: var(--text-secondary);
    font-weight: 500;
    border-bottom: 2px solid transparent;
    transition: all 0.2s ease;
}

.tab-btn:hover {
    color: var(--text-primary);
}

.tab-btn.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* 書式設定ツールバー */
.formatting-toolbar {
    display: flex;
    gap: 4px;
    padding: 8px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.formatting-btn {
    padding: 6px 10px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: var(--bg-color);
    color: var(--text-color);
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s;
    min-width: 32px;
    text-align: center;
}

.formatting-btn:hover {
    background: var(--accent-color);
    color: white;
}

.formatting-btn.active {
    background: var(--primary-color);
    color: white;
}

.formatting-separator {
    width: 1px;
    background: var(--border-color);
    margin: 4px 2px;
}

.color-picker-container {
    position: relative;
    display: inline-block;
}

.color-preview {
    width: 20px;
    height: 20px;
    border: 1px solid var(--border-color);
    border-radius: 3px;
    cursor: pointer;
    margin: 3px;
}

.color-picker {
    width: 0;
    height: 0;
    opacity: 0;
    position: absolute;
}

.font-size-input {
    width: 50px;
    padding: 4px;
    border: 1px solid var(--border-color);
    border-radius: 3px;
    background: var(--bg-color);
    color: var(--text-color);
    text-align: center;
}

/* 書式適用されたテキスト */
.tree-item-text.formatted {
    /* 基本スタイルはJSで動的に適用 */
}

/* 🎯 CRITICAL FIX: 書式設定のスタイルを強制適用 */
.tree-item-text {
    /* text-decorationのデフォルト値 */
    text-decoration: none;
}

/* JSで設定されたtext-decorationを最優先 */
.tree-item-text[style*="text-decoration: underline"] {
    text-decoration: underline !important;
}

.tree-item-text[style*="text-decoration: line-through"] {
    text-decoration: line-through !important;
}

.tree-item-text[style*="text-decoration: underline line-through"] {
    text-decoration: underline line-through !important;
}

/* フォーム */
.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-primary);
}

.form-group input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 0.375rem;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-size: 0.875rem;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    cursor: pointer;
    color: var(--text-primary);
}

.checkbox-label input[type="checkbox"] {
    width: auto;
}

/* 共有ノート一覧 */
.shared-documents-list {
    max-height: 300px;
    overflow-y: auto;
}

.shared-document-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 0.375rem;
    margin-bottom: 0.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.shared-document-item:hover {
    background-color: var(--bg-tertiary);
    border-color: var(--primary-color);
}

.shared-document-info h4 {
    margin: 0 0 0.25rem 0;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
}

.shared-document-info p {
    margin: 0;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.shared-document-meta {
    text-align: right;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.loading {
    text-align: center;
    padding: 2rem;
    color: var(--text-secondary);
    font-style: italic;
}

/* YouTube埋め込み */
.youtube-container {
    position: relative;
    width: 100%;
    max-width: 800px;
    min-height: 315px;
    height: 315px;
    margin: 0.5rem 0;
    border-radius: 8px;
    overflow: hidden;
    background-color: #000;
}

.youtube-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* Firebase接続状態 */
.firebase-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
}

.firebase-status.connected {
    color: var(--success-color);
}

.firebase-status.disconnected {
    color: var(--error-color);
}

.firebase-status.demo {
    color: var(--warning-color);
}

/* ノート一覧セクションヘッダー */
.notes-section-header {
    padding: 0.75rem 1rem 0.5rem 1rem;
    border-bottom: 1px solid var(--border-color);
    background-color: var(--bg-tertiary);
    margin-bottom: 0.5rem;
}

.notes-section-header h4 {
    margin: 0;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.notes-section-header i {
    width: 16px;
    text-align: center;
}

/* 共有ノート情報 */
.note-shared-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    color: var(--success-color);
    margin-top: 0.25rem;
}

.note-shared-info i {
    width: 12px;
}

.collaborators-count {
    background-color: var(--success-color);
    color: white;
    padding: 0.125rem 0.375rem;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 500;
}

/* 共有ノートアイテムのスタイル */
.note-item[data-note-id^="shared_"] {
    border-left: 3px solid var(--success-color);
    background-color: rgba(16, 185, 129, 0.05);
}

.note-item[data-note-id^="shared_"]:hover {
    background-color: rgba(16, 185, 129, 0.1);
}

.note-item[data-note-id^="shared_"].active {
    background-color: var(--success-color);
    border-left-color: var(--success-color);
}

/* 参加ボタンスタイル */
.join-shared {
    background-color: var(--success-color) !important;
    color: white !important;
}

.join-shared:hover {
    background-color: #059669 !important;
}

/* デスクトップアプリ宣伝バナー */
.desktop-promo-banner {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 12px 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
    z-index: 50;
}

.desktop-promo-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    gap: 20px;
}

.desktop-promo-text {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    font-size: 14px;
    line-height: 1.4;
}

.desktop-promo-text i {
    font-size: 18px;
    color: #ffd700;
    flex-shrink: 0;
}

.desktop-promo-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.desktop-promo-banner .btn-primary {
    background-color: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    font-weight: 500;
    padding: 6px 12px;
    font-size: 13px;
}

.desktop-promo-banner .btn-primary:hover {
    background-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

.desktop-promo-banner .btn-icon {
    color: rgba(255, 255, 255, 0.8);
    background-color: transparent;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 6px;
}

.desktop-promo-banner .btn-icon:hover {
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
}

/* バナー表示アニメーション */
.desktop-promo-banner.show {
    animation: slideDown 0.3s ease-out;
}

.desktop-promo-banner.hide {
    animation: slideUp 0.3s ease-in forwards;
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(0);
        opacity: 1;
    }
    to {
        transform: translateY(-100%);
        opacity: 0;
    }
}

/* レスポンシブ: モーダル */
@media (max-width: 480px) {
    .modal {
        width: 95%;
        margin: 1rem;
    }
    
    .modal-header,
    .modal-content,
    .modal-footer {
        padding: 1rem;
    }
    
    .share-tabs {
        flex-direction: column;
    }
    
    .tab-btn {
        text-align: left;
        border-bottom: none;
        border-left: 2px solid transparent;
    }
    
    .tab-btn.active {
        border-left-color: var(--primary-color);
        border-bottom-color: transparent;
    }
    
    .shared-mode-indicator {
        font-size: 0.75rem;
        padding: 0.375rem 0.75rem;
    }
    
    .shared-mode-indicator span {
        display: none;
    }

    .notes-section-header {
        padding: 0.5rem;
    }

    .notes-section-header h4 {
        font-size: 0.8rem;
    }
    
    /* サイドバー再表示ボタンのモバイル対応 */
    .sidebar-restore-btn {
        bottom: 10px;
        left: 10px;
        padding: 0.5rem;
    }
    
    .sidebar-restore-btn span {
        display: none; /* モバイルではテキストを非表示 */
    }
    
    /* サイドバーのモバイル対応 */
    .sidebar {
        position: fixed;
        top: 60px;
        left: 0;
        height: calc(100vh - 60px);
        z-index: 999;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        width: 280px;
    }
    
    .sidebar:not(.collapsed) {
        transform: translateX(0);
    }
    
    .sidebar.collapsed {
        transform: translateX(-100%);
    }
    
    .main-content {
        margin-left: 0;
    }

    /* デスクトップ宣伝バナーのモバイル対応 */
    .desktop-promo-content {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }

    .desktop-promo-text {
        flex-direction: column;
        gap: 8px;
        font-size: 13px;
    }

    .desktop-promo-actions {
        justify-content: center;
    }

    /* インライン編集のモバイル対応 */
    .inline-editor {
        font-size: 16px !important; /* iOS でズームを防ぐ */
    }

    /* タッチ操作の向上 */
    .tree-item-content {
        min-height: 44px; /* タッチターゲットサイズを確保 */
        display: flex;
        align-items: center;
    }

    .tree-item-text {
        padding: 8px 4px;
        min-height: 36px;
        display: flex;
        align-items: center;
    }

    /* モバイル用展開ボタン */
    .expand-btn, 
    .mobile-expand-btn {
        width: 2.75rem;
        height: 2.75rem;
        min-width: var(--mobile-tap-size);
        min-height: var(--mobile-tap-size);
        padding: var(--spacing-sm);
        border-radius: var(--spacing-sm);
        background-color: rgba(0, 0, 0, 0.05);
        transition: all 0.2s ease;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .expand-btn:hover, 
    .mobile-expand-btn:hover {
        background-color: rgba(37, 99, 235, 0.1);
        transform: scale(1.05);
    }

    /* 展開可能な行の視覚的識別 */
    .tree-item-content:has(.expand-btn:not(.hidden)) {
        border-left: 2px solid rgba(37, 99, 235, 0.2);
        padding-left: 0.375rem;
    }

    /* モバイル用スクロール設定 */
    .tree-container {
        height: calc(100vh - 180px);
        max-height: calc(100vh - 180px);
        min-height: calc(100vh - 180px);
        overflow-y: scroll;
        -webkit-overflow-scrolling: touch;
        scroll-behavior: smooth;
        padding-right: 10px;
        padding-bottom: 100px;
        position: relative;
    }

    /* モバイル用モード切り替えボタン */
    .mobile-mode-toggle {
        font-size: 0.8rem !important;
        padding: 0.4rem 0.8rem !important;
        white-space: nowrap;
    }

    /* 閲覧モードのスタイル */
    .tree-container.view-mode {
        background-color: rgba(16, 185, 129, 0.02);
        border: 1px solid rgba(16, 185, 129, 0.1);
        border-radius: 8px;
    }

    .tree-container.view-mode .tree-item-content {
        pointer-events: none; /* タッチイベントを完全に無効化 */
        cursor: default;
    }

    .tree-container.view-mode .expand-btn {
        pointer-events: auto; /* 展開ボタンのみ有効 */
        cursor: pointer;
    }

    /* 編集モードのスタイル */
    .tree-container.edit-mode {
        background-color: rgba(37, 99, 235, 0.02);
        border: 1px solid rgba(37, 99, 235, 0.1);
        border-radius: 8px;
    }

    /* 閲覧モード時のヘッダー表示 */
    .tree-container.view-mode::before {
        content: '📖 閲覧モード - 自由にスクロールできます';
        display: block;
        background-color: rgba(16, 185, 129, 0.1);
        color: #059669;
        padding: 0.5rem;
        margin-bottom: 0.5rem;
        border-radius: 4px;
        font-size: 0.85rem;
        font-weight: 500;
        text-align: center;
    }

    /* 編集モード時のヘッダー表示 */
    .tree-container.edit-mode::before {
        content: '✏️ 編集モード - タップ・ドラッグで編集できます';
        display: block;
        background-color: rgba(37, 99, 235, 0.1);
        color: #2563eb;
        padding: 0.5rem;
        margin-bottom: 0.5rem;
        border-radius: 4px;
        font-size: 0.85rem;
        font-weight: 500;
        text-align: center;
    }

    /* 階層エディター全体の高さ確保 */
    .hierarchy-editor {
        min-height: calc(100vh - 120px) !important;
        max-height: calc(100vh - 120px) !important;
        overflow: hidden !important;
    }

    /* ツリールート要素のスクロール確保 */
    .tree-root {
        min-height: 200px !important; /* 折りたたみ時でも最小高さを確保 */
        padding-bottom: 50px !important; /* 下部余白 */
    }

    /* コンテンツが少ない時でもスクロール可能にする */
    .tree-container .tree-root:after {
        content: '';
        display: block;
        height: 100px; /* 追加の高さでスクロール余地を作る */
        width: 100%;
    }


    /* ドラッグ中のスタイル調整 */
    .tree-item.dragging {
        opacity: 0.5;
        transform: scale(1.05);
        transition: opacity 0.1s ease, transform 0.1s ease;
        z-index: 1000;
        position: relative;
    }

    /* タッチ操作の改善 */
    .tree-item {
        touch-action: manipulation; /* ダブルタップズームを無効化 */
        -webkit-touch-callout: none; /* 長押しメニューを無効化 */
        -webkit-user-select: none;
        user-select: none;
    }

    /* ドロップインジケーターの改善 */
    .drop-indicator {
        transition: none !important;
        animation: none !important;
    }

    /* モバイル専用のオーバーレイ */
    .mobile-edit-overlay {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background-color: rgba(0, 0, 0, 0.5);
        z-index: 9999;
        display: none;
    }

    /* モバイル用アクションメニュー */
    .mobile-action-menu {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: white;
        border-top: 1px solid var(--border-color);
        border-radius: 20px 20px 0 0;
        z-index: 10000;
        max-height: 80vh;
        overflow-y: auto;
        transform: translateY(100%);
        transition: transform 0.3s ease;
    }

    .mobile-action-menu.show {
        transform: translateY(0);
    }

    .mobile-action-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 16px 20px;
        border-bottom: 1px solid var(--border-color);
        background: var(--bg-secondary);
        border-radius: 20px 20px 0 0;
    }

    .mobile-action-header span {
        font-weight: 600;
        font-size: 18px;
        color: var(--text-primary);
    }

    .mobile-action-content {
        padding: 16px;
        display: grid;
        gap: 12px;
    }

    .mobile-action-btn {
        display: flex;
        align-items: center;
        padding: 16px;
        background: var(--bg-secondary);
        border: 1px solid var(--border-color);
        border-radius: 12px;
        font-size: 16px;
        color: var(--text-primary);
        text-decoration: none;
        transition: all 0.2s ease;
        cursor: pointer;
        min-height: 56px;
    }

    .mobile-action-btn:hover {
        background: var(--bg-tertiary);
        transform: translateY(-1px);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    }

    .mobile-action-btn.danger {
        background: #fee2e2;
        border-color: #fca5a5;
        color: #dc2626;
    }

    .mobile-action-btn.danger:hover {
        background: #fecaca;
    }

    .mobile-action-btn i {
        width: 24px;
        margin-right: 12px;
        text-align: center;
        font-size: 18px;
    }

    .mobile-action-btn span {
        flex: 1;
        font-weight: 500;
    }

    /* ダークテーマ対応 */
    .theme-dark .mobile-action-menu {
        background: var(--bg-primary);
        border-color: var(--border-color);
    }

    .theme-dark .mobile-action-header {
        background: var(--bg-secondary);
    }

    .theme-dark .mobile-action-btn {
        background: var(--bg-secondary);
        border-color: var(--border-color);
        color: var(--text-primary);
    }

    .theme-dark .mobile-action-btn:hover {
        background: var(--bg-tertiary);
    }

    .theme-dark .mobile-action-btn.danger {
        background: rgba(220, 38, 38, 0.1);
        border-color: rgba(220, 38, 38, 0.3);
        color: #f87171;
    }
}

/* 画像とメディア表示スタイル */
.tree-item-text img {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 0.5rem 0;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.tree-item-text img:hover {
    transform: scale(1.02);
    box-shadow: var(--shadow-lg);
}

/* YouTube埋め込みスタイル */
.tree-item-text iframe {
    display: block;
    max-width: 100%;
    margin: 0.5rem 0;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

/* 画像読み込みエラー */
.tree-item-text img + div {
    color: var(--error-color);
    font-size: 0.875rem;
    padding: 0.5rem;
    background: rgba(239, 68, 68, 0.1);
    border-radius: var(--border-radius);
    margin: 0.5rem 0;
}

/* Googleログインボタンのパルスアニメーション */
@keyframes pulseAnimation {
    0% {
        box-shadow: 0 0 0 0 rgba(66, 133, 244, 0.7);
        transform: scale(1);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(66, 133, 244, 0);
        transform: scale(1.05);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(66, 133, 244, 0);
        transform: scale(1);
    }
}

.pulse-animation {
    animation: pulseAnimation 2s ease-in-out infinite;
}

/* モバイル対応 */
@media (max-width: 768px) {
    .tree-item-text img,
    .tree-item-text iframe {
        max-width: 100%;
        height: auto;
    }
    
    .tree-item-text iframe {
        max-height: 200px;
    }
}

/* バージョン履歴ダイアログ */
.version-history-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 1rem;
}

.version-history-dialog {
    background-color: var(--bg-primary);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.version-history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.version-history-header h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.version-history-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.version-history-info {
    padding: 1rem 1.5rem;
    background-color: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
}

.version-stats {
    display: flex;
    gap: 2rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.version-history-content {
    display: flex;
    flex: 1;
    overflow: hidden;
}

.version-list {
    flex: 1;
    overflow-y: auto;
    border-right: 1px solid var(--border-color);
}

.version-item {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: background-color 0.2s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.version-item:hover {
    background-color: var(--bg-secondary);
}

.version-item.selected {
    background-color: var(--bg-tertiary);
}

.version-info {
    flex: 1;
}

.version-title {
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.version-meta {
    font-size: 0.75rem;
    color: var(--text-secondary);
    display: flex;
    gap: 1rem;
}

.version-actions {
    display: flex;
    gap: 0.5rem;
}

.version-preview {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.version-preview-header {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.version-preview-content {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
}

.version-placeholder,
.version-preview-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    color: var(--text-secondary);
    text-align: center;
}

.version-placeholder i,
.version-preview-placeholder i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.3;
}

/* バージョンプレビュー */
.version-preview-info {
    padding: 1rem;
    background-color: var(--bg-secondary);
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
}

.version-preview-info h4 {
    margin: 0 0 0.5rem 0;
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
}

.version-preview-meta {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin: 0;
}

.version-preview-tree {
    max-height: 400px;
    overflow-y: auto;
    padding: 1rem;
    background-color: var(--bg-tertiary);
    border-radius: var(--border-radius);
}

.preview-item {
    padding: 0.25rem 0;
    font-size: 0.875rem;
    line-height: 1.6;
    color: var(--text-primary);
}

.preview-item-text {
    word-break: break-word;
}

/* ==============================================
   新規作成ダイアログ
   ============================================== */

.create-note-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    backdrop-filter: blur(2px);
}

.create-note-dialog {
    background: var(--bg-primary);
    border-radius: var(--border-radius-lg);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    max-width: 450px;
    width: 90%;
    border: 1px solid var(--border-color);
}

.create-note-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.create-note-header h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
}

.close-dialog-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: var(--border-radius);
    transition: all 0.2s;
}

.close-dialog-btn:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.create-note-content {
    padding: 1.5rem;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-primary);
    font-size: 0.875rem;
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    background: var(--bg-secondary);
    color: var(--text-primary);
    transition: all 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form-hint {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.create-note-actions {
    display: flex;
    gap: 0.75rem;
    padding: 1.5rem;
    border-top: 1px solid var(--border-color);
    background: var(--bg-secondary);
    justify-content: flex-end;
}

.create-note-actions .btn {
    min-width: 6rem;
}

/* ダークテーマ対応 */
[data-theme="dark"] .form-control {
    background: #1f2937;
}

/* ==============================================
   ノートタイトル編集
   ============================================== */

.note-title-editor {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-secondary);
}

.note-title-input {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 1.25rem;
    font-weight: 600;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    background: var(--bg-primary);
    color: var(--text-primary);
    transition: all 0.2s;
}

.note-title-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.note-title-input::placeholder {
    color: var(--text-secondary);
    font-weight: normal;
}

/* ダークテーマ対応 */
[data-theme="dark"] .note-title-editor {
    background: #1a202c;
}

[data-theme="dark"] .note-title-input {
    background: #2d3748;
}

/* ==============================================
   削除確認ダイアログ
   ============================================== */

.delete-confirmation-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    backdrop-filter: blur(2px);
}

.delete-confirmation-dialog {
    background: var(--bg-primary);
    border-radius: var(--border-radius-lg);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    border: 1px solid var(--border-color);
}

.delete-confirmation-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    background: #fee2e2;
}

.delete-confirmation-icon {
    width: 3rem;
    height: 3rem;
    background: #dc2626;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.delete-confirmation-header h3 {
    margin: 0;
    color: #7f1d1d;
    font-size: 1.25rem;
    font-weight: 600;
}

.delete-confirmation-content {
    padding: 1.5rem;
}

.delete-note-info {
    margin-bottom: 1.5rem;
}

.delete-note-title {
    font-weight: 600;
    font-size: 1.125rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    word-break: break-word;
}

.delete-note-details {
    color: var(--text-secondary);
    font-size: 0.875rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.delete-warning {
    background: #fef3cd;
    border: 1px solid #facc15;
    border-radius: var(--border-radius);
    padding: 1rem;
}

.delete-warning p {
    margin: 0 0 0.75rem 0;
    color: #92400e;
    font-weight: 600;
}

.delete-warning ul {
    margin: 0;
    padding-left: 1.25rem;
    color: #92400e;
}

.delete-warning li {
    margin-bottom: 0.25rem;
    font-size: 0.875rem;
}

.delete-confirmation-actions {
    display: flex;
    gap: 0.75rem;
    padding: 1.5rem;
    border-top: 1px solid var(--border-color);
    background: var(--bg-secondary);
    justify-content: flex-end;
}

.delete-confirmation-actions .btn {
    min-width: 6rem;
}

.btn-danger {
    background: #dc2626;
    color: white;
    border: 1px solid #dc2626;
}

.btn-danger:hover {
    background: #b91c1c;
    border-color: #b91c1c;
}

.btn-danger:active {
    background: #991b1b;
}

/* ダークテーマ対応 */
[data-theme="dark"] .delete-confirmation-header {
    background: #450a0a;
}

[data-theme="dark"] .delete-confirmation-header h3 {
    color: #fca5a5;
}

[data-theme="dark"] .delete-warning {
    background: #451a03;
    border-color: #a16207;
}

[data-theme="dark"] .delete-warning p,
[data-theme="dark"] .delete-warning li {
    color: #fbbf24;
}

/* API設定ダイアログ */
.api-settings-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(4px);
}

.api-settings-dialog {
    background: var(--bg-primary);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    border: 1px solid var(--border-color);
}

.api-settings-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-secondary);
    border-radius: var(--border-radius) var(--border-radius) 0 0;
}

.api-settings-header h3 {
    margin: 0;
    color: var(--text-primary);
    font-size: 1.25rem;
    font-weight: 600;
}

.api-settings-header h3 i {
    margin-right: 0.5rem;
    color: var(--primary-color);
}

.api-settings-content {
    padding: 1.5rem;
    max-height: 60vh;
    overflow-y: auto;
}

.settings-section {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.settings-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.settings-section h4 {
    margin: 0 0 1rem 0;
    color: var(--text-primary);
    font-size: 1.1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.settings-section h4 i {
    color: var(--primary-color);
}

.api-key-input-group {
    display: flex;
    gap: 0.5rem;
}

.api-key-input-group input {
    flex: 1;
}

.api-key-input-group button {
    padding: 0.5rem 0.75rem;
    min-width: auto;
}

.api-key-status {
    margin-top: 1rem;
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
}

.settings-status {
    display: grid;
    gap: 0.75rem;
}

.status-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
}

.status-label {
    font-weight: 500;
    color: var(--text-secondary);
}

.status-value {
    font-weight: 600;
    color: var(--text-primary);
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
}

.settings-warning {
    margin-top: 1.5rem;
    padding: 1rem;
    background: #fef3c7;
    border: 1px solid #fbbf24;
    border-radius: var(--border-radius);
    color: #92400e;
}

.theme-dark .settings-warning {
    background: #451a03;
    border-color: #92400e;
    color: #fbbf24;
}

.settings-warning p {
    margin: 0 0 0.5rem 0;
    font-weight: 600;
}

.settings-warning ul {
    margin: 0;
    padding-left: 1.5rem;
}

.settings-warning li {
    margin-bottom: 0.25rem;
}

.api-settings-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-top: 1px solid var(--border-color);
    background: var(--bg-secondary);
    border-radius: 0 0 var(--border-radius) var(--border-radius);
    gap: 0.75rem;
}

.api-settings-actions .btn {
    flex: 1;
    min-width: 80px;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .api-settings-dialog {
        width: 95%;
        margin: 1rem;
        max-height: 95vh;
    }
    
    .api-settings-content {
        padding: 1rem;
    }
    
    .api-settings-header,
    .api-settings-actions {
        padding: 1rem;
    }
    
    .api-settings-actions {
        flex-direction: column;
    }
    
    .api-settings-actions .btn {
        width: 100%;
    }
    
    .api-key-input-group {
        flex-direction: column;
    }
    
    .status-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }
}

/* YouTube Live Chat Dialog Styles */
.live-chat-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
}

.live-chat-dialog {
    background: white;
    border-radius: 12px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.live-chat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #e5e7eb;
}

.live-chat-header h3 {
    margin: 0;
    color: #1f2937;
    font-size: 1.25rem;
    font-weight: 600;
}

.live-chat-header h3 i {
    margin-right: 8px;
    color: #2563eb;
}

.live-chat-content {
    padding: 20px;
}

.live-chat-info {
    margin-bottom: 20px;
}

.live-chat-info p {
    margin: 0 0 8px 0;
    color: #374151;
    line-height: 1.5;
}

.live-chat-status {
    margin: 20px 0;
    padding: 15px;
    background: #f3f4f6;
    border-radius: 8px;
    display: none;
}

.status-indicator {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
}

.status-indicator i {
    margin-right: 8px;
    font-size: 0.875rem;
}

.chat-stats {
    font-size: 0.875rem;
    color: #6b7280;
}

.live-chat-warning {
    margin-top: 20px;
    padding: 15px;
    background: #fef3c7;
    border: 1px solid #f59e0b;
    border-radius: 8px;
}

.live-chat-warning p {
    margin: 0 0 8px 0;
    color: #92400e;
    font-weight: 500;
}

.live-chat-warning ul {
    margin: 0;
    padding-left: 20px;
    color: #92400e;
    font-size: 0.875rem;
}

.live-chat-warning li {
    margin-bottom: 4px;
}

.live-chat-actions {
    padding: 20px;
    border-top: 1px solid #e5e7eb;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

/* Dark theme support */
[data-theme="dark"] .live-chat-dialog {
    background: #1f2937;
    color: #f9fafb;
}

[data-theme="dark"] .live-chat-header {
    border-bottom-color: #374151;
}

[data-theme="dark"] .live-chat-header h3 {
    color: #f9fafb;
}

[data-theme="dark"] .live-chat-info p {
    color: #d1d5db;
}

[data-theme="dark"] .live-chat-status {
    background: #374151;
}

[data-theme="dark"] .live-chat-warning {
    background: #451a03;
    border-color: #92400e;
}

[data-theme="dark"] .live-chat-actions {
    border-top-color: #374151;
}

/* Pulse animation for highlighting buttons */
@keyframes pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.7);
    }
    70% {
        transform: scale(1.05);
        box-shadow: 0 0 0 10px rgba(37, 99, 235, 0);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(37, 99, 235, 0);
    }
}

.pulse-animation {
    animation: pulse 2s infinite;
}

/* 開発ブログセクション */
.blog-section {
    margin-bottom: 1.5rem;
}

.blog-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 12px 16px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-decoration: none;
    border-radius: var(--border-radius);
    font-weight: 500;
    font-size: 0.9rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: none;
    cursor: pointer;
}

.blog-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
    color: white;
    text-decoration: none;
}

.blog-description {
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-align: center;
    margin-top: 0.5rem;
    line-height: 1.4;
}

/* フッターコピーライト */
.app-footer {
    position: fixed;
    bottom: 0;
    right: 0;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(4px);
    border-top-left-radius: var(--border-radius);
    z-index: 100;
}

.copyright {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin: 0;
    opacity: 0.7;
    user-select: none;
}

.copyright:hover {
    opacity: 1;
    transition: opacity 0.2s ease;
}

/* CTAガイドテキスト */
.cta-guide {
    text-align: center;
    margin-bottom: 1.5rem;
}

.cta-guide p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0.5rem 0;
}

/* CTAダウンロードボタン */
.cta-download-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 14px 24px;
    background: linear-gradient(135deg, #059669 0%, #10b981 100%);
    color: white;
    text-decoration: none;
    border: none;
    border-radius: var(--border-radius);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

.cta-download-button:hover {
    background: linear-gradient(135deg, #047857 0%, #059669 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.4);
    color: white;
    text-decoration: none;
}

.cta-download-button:active {
    transform: translateY(0);
}



/* モバイルレスポンシブ対応 */
@media (max-width: 768px) {
    .app-footer {
        display: none; /* モバイルでは非表示 */
    }
    
    .blog-button {
        font-size: 0.85rem;
        padding: 10px 14px;
    }
    
    .guest-button {
        font-size: 0.9rem;
        padding: 12px 20px;
    }
    
    .auth-note {
        font-size: 0.75rem;
    }
    
    .mobile-guest-button {
        font-size: 0.9rem;
        padding: 10px 18px;
    }
}
