* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Hiragino Sans', 'Hiragino Kaku Gothic ProN', 'Noto Sans JP', sans-serif;
    /* 背景色をソーダ系で目に優しいグラデーションに変更 */
    background: linear-gradient(135deg, #e0f7fa 0%, #bbdefb 100%);
    min-height: 100vh;
    color: #5a5a5a;
}

.app-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0px;
}

#mainContent {
    margin: 0.5rem;
}
.app-header {
    text-align: center;
    margin-bottom: 30px;
}

.app-title {
    font-size: 2.5rem;
    /* メインタイトル色をソーダ系に統一 */
    color: #00BCD4;
    font-weight: 600;
    margin-bottom: 10px;
    /* テキストシャドウも色を調整 */
    text-shadow: 0 2px 4px rgba(0, 188, 212, 0.2);
}

.app-subtitle {
    font-size: 1rem;
    color: #8e8e8e;
    margin-bottom: 20px;
}

.menu-button {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #fff;
    border: none;
    border-radius: 50%;
    width: 55px;
    height: 55px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    cursor: pointer;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.menu-button:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

.archive-button {
    font-size: 1.5rem;
    position: fixed;
    bottom: 20px;
    left: 20px;
    background: #fff;
    border: none;
    border-radius: 50%;
    width: 55px;
    height: 55px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    cursor: pointer;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.archive-button:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

.hamburger {
    width: 20px;
    height: 15px;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.hamburger span {
    display: block;
    width: 100%;
    height: 2px;
    background-color: #00BCD4;
    border-radius: 1px;
    transition: all 0.3s ease-in-out;
}

/* メニューを開いたとき（✕印）のスタイル */
.menu-button.active .hamburger span:nth-child(1) {
    transform: translateY(6.5px) rotate(45deg);
}
.menu-button.active .hamburger span:nth-child(2) {
    opacity: 0;
}
.menu-button.active .hamburger span:nth-child(3) {
    transform: translateY(-6.5px) rotate(-45deg);
}

.sidebar {
    position: fixed;
    top: 0;
    right: -320px;
    width: 320px;
    height: 100vh;
    background: #fff;
    box-shadow: -2px 0 10px rgba(0,0,0,0.1);
    transition: right 0.3s ease;
    z-index: 999;
    padding: 20px;
    overflow-y: auto;
}

.sidebar.open {
    right: 0;
}

.sidebar-header {
    text-align: center;
    padding-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
    margin-bottom: 20px;
    padding-right: 20px;
}

.sidebar-title {
    font-size: 1.8rem;
    /* サイドバータイトル色もソーダ系に統一 */
    color: #00BCD4;
    font-weight: 600;
    margin-bottom: 5px;
}

.sidebar-subtitle {
    font-size: 0.9rem;
    color: #8e8e8e;
}

.sidebar-item {
    padding: 0.4rem 0;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: color 0.3s ease;
}

.sidebar-item:hover {
    /* サイドバーアイテムのホバー色もソーダ系に統一 */
    color: #00BCD4;
}

/* --- タブコンテナの固定化 --- */
.tabs-container {
    position: sticky; /* スクロールに合わせて指定位置に固定 */
    top: 0;           /* 画面の上端に固定 */
    z-index: 900;     /* 他の要素より手前に表示(サイドバーやモーダルよりは下) */
    
    /* 固定された際に背景が透けないように、アプリの背景色に近い色を指定 */
    /* background-color: #e3f6f9;  */
    
    /* 上下にも少し余白を持たせて、影が自然に見えるようにする */
    padding-top: 10px;
    padding-bottom: 10px;

    /* 下に細い線を入れて、コンテンツとの境界を明確にする */
    /* border-bottom: 1px solid #d0eaf2; */
    
    /* 既存のスタイル */
    margin-bottom: 30px;
    overflow-x: auto;
}

/* スティッキー有効時に影を少し調整して浮いているように見せる */
.tabs-container:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 10px;
    /* background: linear-gradient(to top, rgba(0, 0, 0, 0.05), transparent); */
    opacity: 0;
    transition: opacity 0.3s ease;
}

.tabs-container.is-sticky:after {
    opacity: 1; /* JSでスクロール時にクラスを付与する想定 */
}

.tabs {
    display: flex;
    gap: 10px;
    min-width: max-content;
    padding: 0 10px;
}


/* スクロールバーのスタイル */
.tabs::-webkit-scrollbar {
    height: 8px; /* スクロールバーの高さ */
}
/* スクロールバーのトラック（背景）部分 */
.tabs::-webkit-scrollbar-track {
    background: transparent; /* トラックは透明にする */
}
.tabs::-webkit-scrollbar-thumb {
    background: rgba(0, 188, 212, 0.4); /* 半透明のソーダ色 */
    border-radius: 4px; /* 角を丸くする */
    border: 2px solid transparent; /* つまみの周りに余白を作る */
    background-clip: content-box;
}

/* マウスホバー時のつまみのスタイル */
.tabs::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 188, 212, 0.7); /* ホバー時に少し濃くする */
}

/* Firefox用のスクロールバースタイル */
.tabs {
    scrollbar-width: thin; /* スクロールバーを細くする */
    scrollbar-color: rgba(0, 188, 212, 0.7) transparent; /* つまみの色 トラックの色 */
}

.tab {
    background: #fff;
    border: none;
    border-radius: 20px;
    padding: 12px 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    font-size: 0.9rem;
    position: relative;
}

.tab.active {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.tab:hover {
    transform: translateY(-2px);
}

.tab-add {
    /* タブ追加ボタンの色もソーダ系に統一 */
    background: #00BCD4;
    color: white;
    border: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-top: 2px;
    font-size: 1.2rem;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    cursor: pointer;
    margin-right: 60px;
}

.tab-add:hover {
    background: #00ACC1; /* ホバー時の色も調整 */
}

.color-picker {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
    justify-content: center;
}
.color-option {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    border: 3px solid transparent;
    transition: all 0.2s ease;
}
.color-option.selected {
    border-color: #00BCD4;
    transform: scale(1.15);
}

.items-container {
    background: #fff;
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    padding: 25px;
    margin-bottom: 30px;
}

.items-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.items-header-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.btn-small {
    padding: 5px 12px;
    font-size: 0.8rem;
}

.sort-controls {
    display: flex;
    gap: 10px;
}

.sort-button {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 15px;
    padding: 8px 15px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.3s ease;
}

.sort-button.active {
    /* ソートボタンのアクティブ色もソーダ系に統一 */
    background: #00BCD4;
    color: white;
    border-color: #00BCD4;
}

.item {
    background: #fafafa;
    border-radius: 12px;
    padding: 12px 15px;
    margin-bottom: 8px;
    transition: all 0.3s ease;
    border-left: 4px solid #ddd;
}

.item:hover {
    transform: translateX(3px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.item-content {
    font-size: 1rem;
    font-weight: 500;
    color: #333;
    flex: 1;
    margin-right: 15px;
}

.item-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.item-priority {
    /* 優先度表示の背景色をソーダ系に統一 */
    background: linear-gradient(45deg, #00BCD4, #4DD0E1);
    color: white;
    border-radius: 12px;
    padding: 4px 8px;
    font-size: 0.8rem;
    font-weight: 600;
    min-width: 28px;
    text-align: center;
}

.item-action {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    border-radius: 6px;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.item-action:hover {
    background: #f0f0f0;
    transform: scale(1.1);
}

.edit-action {
    color: #6c757d;
}

.complete-action {
    color: #28a745;
}

.item-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 0.75rem;
    color: #888;
    margin-top: 6px;
}

.item-date, .item-due {
    background: #e9ecef;
    padding: 2px 6px;
    border-radius: 8px;
}

.item-scheduled {
    background: #d1f1dd;
    padding: 2px 6px;
    border-radius: 8px;
}

.item-notes-preview {
    font-size: x-small;
    margin: 0.2rem 0 0 0.2rem;
}

.item-original-tab {
    background: #f0f0f0;
    padding: 2px 6px;
    border-radius: 8px;
}

.item-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 6px;
}

.tag {
    /* タグの背景色をソーダ系に統一（より薄い色を使用） */
    background: linear-gradient(45deg, #c1f0ff, #e0f7fa);
    color: #00838F; /* タグのテキスト色も調整 */
    padding: 2px 6px;
    border-radius: 8px;
    /* font-size: 0.7rem; */
}

.label {
    background: linear-gradient(45deg, #d1c4e9, #e1d5f2); /* 薄い紫系 */
    color: #4527a0; /* 紫系のテキスト色 */
    padding: 2px 6px;
    border-radius: 8px;
    /* font-size: 0.7rem; */
}

.add-item-container {
    margin-top: 20px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 12px;
    border: 2px dashed #ddd;
}

.add-item-form {
    display: none;
}

.add-item-form.active {
    display: block;
}

.form-group {
    margin-bottom: 15px;
}

.form-label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #555;
}

.form-input, .form-textarea, .form-select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-input:focus, .form-textarea:focus, .form-select:focus {
    outline: none;
    /* フォームのフォーカス時のボーダー色もソーダ系に統一 */
    border-color: #00BCD4;
}

.form-textarea {
    resize: vertical;
    min-height: 80px;
}

.priority-slider {
    width: 100%;
    margin: 10px 0;
}

.form-buttons {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 20px;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.btn-primary {
    /* プライマリボタンの色もソーダ系に統一 */
    background: #00BCD4;
    color: white;
}

.btn-primary:hover {
    background: #00ACC1;
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
}

.add-item-trigger {
    text-align: center;
    color: #888;
    cursor: pointer;
    padding: 20px;
    transition: color 0.3s ease;
}

.add-item-trigger:hover {
    /* アイテム追加トリガーのホバー色もソーダ系に統一 */
    color: #00BCD4;
}

.search-container {
    background: #fff;
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    padding: 20px;
    margin-bottom: 20px;
}

.search-input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 25px;
    font-size: 1rem;
    background: #f8f9fa;
}

.search-input:focus {
    outline: none;
    /* 検索入力欄のフォーカス時のボーダー色もソーダ系に統一 */
    border-color: #00BCD4;
    background: white;
}

/* 検索モーダル */
.search-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.5);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.search-modal.active {
    display: flex;
}

.search-modal-content {
    background: white;
    border-radius: 20px;
    padding: 30px;
    max-width: 600px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

.search-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.search-modal-title {
    font-size: 1.5rem;
    /* 検索モーダルのタイトル色もソーダ系に統一 */
    color: #00BCD4;
    font-weight: 600;
}

.search-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #999;
    padding: 5px;
}

.search-form-group {
    margin-bottom: 15px;
}

.search-form-label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #555;
    font-size: 0.9rem;
}

.search-form-input, .search-form-select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 0.9rem;
}

.search-form-input:focus, .search-form-select:focus {
    outline: none;
    /* 検索フォームのフォーカス時のボーダー色もソーダ系に統一 */
    border-color: #00BCD4;
}

.search-conditions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 20px;
}

.priority-range {
    display: flex;
    align-items: center;
    gap: 10px;
}

.priority-range input[type="range"] {
    flex: 1;
}

.priority-display {
    background: #f8f9fa;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 0.8rem;
    min-width: 60px;
    text-align: center;
}

.search-buttons {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.search-results {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
    max-height: 300px;
    overflow-y: auto;
}

.search-result-item {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 10px;
    margin-bottom: 8px;
    /* 検索結果アイテムの左ボーダー色もソーダ系に統一 */
    border-left: 3px solid #00BCD4;
}

.search-result-content {
    font-weight: 500;
    margin-bottom: 5px;
}

.search-result-meta {
    font-size: 0.8rem;
    color: #666;
}
/* タブのカラーパレットも全体的な色調に合わせて調整 */
.color-pink { background-color: #f7e0e7; } /* 淡いピンク */
.color-blue { background-color: #e0f2f7; } /* 淡いブルー */
.color-green { background-color: #e0f7e7; } /* 淡いグリーン */
.color-yellow { background-color: #fffbe0; } /* 淡いイエロー */
.color-purple { background-color: #f0e0f7; } /* 淡いパープル */
.color-orange { background-color: #ffebe0; } /* 淡いオレンジ */
.color-mint { background-color: #e0f7f4; } /* 淡いミント */
.color-lavender { background-color: #f7e0f0; } /* 淡いラベンダー */
.color-lime { background-color: #f4ffe0; } /* 淡いライムグリーン */

/* レスポンシブデザイン */
@media (max-width: 768px) {
    .app-container {
        padding: 0px;
    }
    
    .app-title {
        font-size: 2rem;
    }
    
    .items-container {
        padding: 15px;
    }
    
    .item {
        padding: 12px;
    }
    
    .sidebar {
        width: 280px;
    }
}

/* アニメーション */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.5s ease-out;
}

.item-meta {
    display: flex; /* 横並びにするために追加 */
    flex-wrap: wrap;
    gap: 10px; /* item-date と item-due の間隔を少し広げる */
    font-size: 0.75rem;
    color: #888;
    margin-top: 6px;
    align-items: center; /* 中央揃え */
}

/* 既存の .item-date, .item-due の背景やパディングは維持しつつ、マージンを調整する場合 */
.item-date, .item-due {
    background: #e9ecef;
    padding: 3px 8px; /* 少し調整 */
    border-radius: 8px;
}

.item-actions { /* アイテム編集ボタンなどのコンテナ */
    display: flex;
    gap: 8px;
    margin-top: 10px; /* メタ情報との間隔 */
}

.action-button, .complete-button, .restore-button { /* 共通ボタンスタイル */
    background: none;
    border: 1px solid #ccc;
    border-radius: 6px;
    padding: 5px 8px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: background-color 0.2s, color 0.2s;
}
.action-button:hover, .complete-button:hover, .restore-button:hover {
    background-color: #f0f0f0;
}



/* 編集ボタンの色など調整 */
.action-button.edit { color: #0288D1; border-color: #0288D1;} /* ソーダ系に調整 */
.action-button.complete { color: #2E7D32; border-color: #2E7D32;} /* 緑系はそのまま */
.action-button.archive { color: #FFA000; border-color: #FFA000;} /* 黄系はそのまま */
/* .action-button.unarchive { color: #00BCD4; border-color: #00BCD4;} ソーダ系に調整 */
.action-button.delete { color: #D32F2F; border-color: #D32F2F;} /* 赤系はそのまま */


/* --- モーダル共通スタイル --- */
.modal {
    display: none; /* 初期状態は非表示 */
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.6); /* 背景を少し濃くする */
    align-items: center; /* 上下中央揃え */
    justify-content: center; /* 左右中央揃え */
}

.modal.active { /* JavaScriptで active クラスを付与して表示 */
    display: flex;
}

.modal-content {
    background-color: #fff;
    margin: auto;
    padding: 25px;
    border-radius: 15px; /* 角を丸く */
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    width: 90%;
    max-width: 500px; /* 最大幅を設定 */
    position: relative; /* クローズボタンの位置基準 */
    animation: fadeInModal 0.3s ease-out;
}

.close-button {
    color: #aaa;
    position: absolute; /* 右上に配置 */
    top: 15px;
    right: 20px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close-button:hover,
.close-button:focus {
    color: black;
    text-decoration: none;
}

.modal-content h3 {
    margin-top: 0;
    margin-bottom: 20px;
    /* モーダルタイトル色もソーダ系に統一 */
    color: #00BCD4;
    text-align: center;
}

/* 検索モーダルの既存スタイルと統合・調整 */
#searchModal .modal-content { /* 既存の search-modal-content への適用 */
    max-width: 600px; /* 検索モーダルは少し広めでも良い */
}

/* 共有モーダル用 */
#shareModal .form-input {
    margin-bottom: 5px; /* URL入力欄とコピーボタンの間を詰める */
}
#shareModal .btn-small {
    padding: 5px 10px;
    font-size: 0.8rem;
    margin-left: 10px;
}
.warning-text {
    color: #dc3545;
    font-size: 0.9rem;
    margin-top: 15px;
    text-align: center;
}


/* タブのボタンスタイル */
#tabs .tab { /* 既存の .tab へのスタイル */
    /* 既存のスタイルを活かす */
    margin-right: 5px; /* タブ間のマージン */
}
#tabs .tab.active {
    /* 既存のアクティブスタイルを活かす */
    font-weight: bold; /* より明確に */
}
#tabs .tab-add {
    /* 既存の .tab-add スタイルを活かす */
    margin-left: 10px; /* 他のタブとの間隔 */
}


/* アーカイブ表示エリア */
/* #archivedItemsContainer .item {
    border-left-color: #6c757d; 
}
#archivedItemsContainer .item .item-content {
    text-decoration: line-through;
    color: #888;
} */

/* 完了済みアイテムのテキストに取消し線を追加 */
.item.completed .item-content {
    text-decoration: line-through;
    color: #888;
}

@keyframes fadeInModal {
    from { opacity: 0; transform: translateY(-30px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }   
}

.item.highlight, .search-result-item.highlight {
    background-color: #cce7ff; /* 目立つ色 */
    transition: background-color 0.5s ease-out;
}

.btn-link {
    background: none;
    border: none;
    color: #007bff;
    cursor: pointer;
    padding: 0;
    font-size: 0.8rem;
    text-decoration: underline;
}
.btn-link:hover {
    color: #0056b3;
}

/* =================================== */
/* アイテム用コンテキストメニュー        */
/* =================================== */

.context-menu {
    /* 表示・非表示はJSで制御するため、初期状態は非表示 */
    display: none; 
    
    /* 他の要素より手前に表示 */
    position: absolute; 
    z-index: 1010;

    /* デザイン */
    background-color: #ffffff;
    border-radius: 8px; /* 角を少し丸くする */
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12); /* 影を柔らかく */
    padding: 6px; /* 内側の余白 */
    min-width: 160px; /* 最小幅を確保 */
    border: 1px solid #f0f0f0;

    /* アニメーション */
    opacity: 0;
    transform: translateY(-5px);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

/* JavaScriptで表示する際に追加するクラス */
.context-menu.show {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.context-menu-item {
    display: flex;
    align-items: center;
    gap: 8px; /* アイコンとテキストの間隔 */
    padding: 10px 12px;
    font-size: 0.9rem;
    color: #5a5a5a;
    cursor: pointer;
    border-radius: 6px; /* 各項目の角も丸くする */
    transition: background-color 0.2s ease, color 0.2s ease;
}

/* ホバーエフェクト */
.context-menu-item:hover {
    /* アプリのテーマカラーに合わせて背景色を変更 */
    background-color: #e0f7fa; 
    color: #00838F; /* テキスト色も少し濃くする */
}

/* 削除オプションを少し目立たせる */
#contextMenuDelete:hover {
    background-color: #ffebee; /* 薄い赤色 */
    color: #c62828; /* 赤系の文字色 */
}

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.9);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.4s ease-out;
    opacity: 1;
  }
  .loading-overlay.hidden {
    opacity: 0;
    pointer-events: none; /* 非表示時はクリックなどを無効化 */
  }
  .spinner {
    border: 6px solid #f3f3f3;
    border-top: 6px solid #5c9ce5;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1.2s linear infinite;
  }
  .loading-overlay p {
    margin-top: 20px;
    font-size: 1.1em;
    color: #333;
  }
  @keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
  }

    /* 編集モーダルのチェックボックススタイル */
.form-check {
    display: flex;
    align-items: center;
    margin-top: 10px;
}

.form-check input[type="checkbox"] {
    margin-right: 8px;
    width: auto; /* width: 100% を上書き */
}

.form-check label {
    font-size: 0.9rem;
    color: #555;
    font-weight: normal;
}

/* 引き下げて更新インジケーターのスタイル */
.pull-to-refresh-indicator {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: #f0f8ff;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 899; /* tabs-containerより手前 */
    transform: translateY(-100%);
    transition: transform 0.3s ease;
    font-size: 0.9rem;
    color: #5a5a5a;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    -webkit-user-select: none; /* テキスト選択を無効化 */
    user-select: none;
}

.pull-to-refresh-indicator.visible {
    transform: translateY(calc(-100% + var(--pull-distance, 0px)));
}

.pull-to-refresh-indicator .arrow {
    display: inline-block;
    transition: transform 0.3s ease;
    margin-right: 10px;
    font-size: 1.2rem;
}

.pull-to-refresh-indicator.ready-to-refresh .arrow {
    transform: rotate(180deg);
}