/* --- START OF FILE css/mypage-notebook.css --- */

/* ========================================================
   詳細画面モード時の標準化リセット (view-notebook-detail)
======================================================== */

body.view-notebook-detail {
    background-image: linear-gradient(to bottom, #fff 15.7%, #97a5ad 15.7%, #97a5ad 19%, #becbd4 45%);
    background-color: #becbd4;
}

/* 2. スクロール時に隠れる挙動を無効化 */
body.view-notebook-detail header.page-header.is-hidden {
    transform: translateY(0) !important; /* -100%ではなく0に固定 */
}

/* 4. コンテナのマージン・パディング調整（空白除去） */
body.view-notebook-detail #mypage-container {
    padding-bottom: 0px !important; /* 120pxは広すぎるので減らす */
    min-height: auto; /* 高さ制限を解除 */
    height: auto;
    overflow: visible; /* コンテナ内スクロールの発生を防ぐ */
}

/* 5. 詳細ビュー自体の高さ設定を最適化 */
body.view-notebook-detail #word-list-view {
    position: relative;
    height: auto !important;
    min-height: 100vh; /* 最低でも画面いっぱいに */
    overflow: visible !important; /* スクロールバーの発生を防ぐ */
    padding-bottom: 60px; /* 一括整理バーなどが被らないように少し余白 */
}

/* 6. 保存リストセクションの余白調整 */
body.view-notebook-detail .saved-list-section {
    margin-bottom: 0;
    /* 背景が透過しているので、中身が増えても自然に見えるように */
}
@media only screen and (max-width: 500px) {
body.view-notebook-detail #word-list-view {
    padding-bottom: 0px;
} 
}


/* =========================================
   【Restore】詳細画面 & 学習アクション
========================================= */
.notebook-detail-header {
    text-align: left;
    padding: 30px 20px 30px;
    background-color: var(--header-bg-color, #1a3668);
    backdrop-filter: blur(10px);
    border-radius: 0px;
    box-shadow: var(--shadow-soft);
    position: relative;
    overflow: visible;
	margin:0px auto 70px;
}

/* カラーテーマ（CSS管理） */
.notebook-detail-header[data-theme-color="blue"]   { --header-bg-color: #1a3668; }
.notebook-detail-header[data-theme-color="pink"]   { --header-bg-color: #8c1438; }
.notebook-detail-header[data-theme-color="green"]  { --header-bg-color: #094a20; }
.notebook-detail-header[data-theme-color="orange"] { --header-bg-color: #c76906; }
.notebook-detail-header[data-theme-color="purple"] { --header-bg-color: #481682; }
.notebook-detail-header[data-theme-color="cyan"]   { --header-bg-color: #055157; }
.notebook-detail-header[data-theme-color="yellow"] { --header-bg-color: #806703; }
.notebook-detail-header[data-theme-color="red"]    { --header-bg-color: #8a1212; }
.notebook-detail-header[data-theme-color="teal"]   { --header-bg-color: #076152; }
.notebook-detail-header[data-theme-color="gray"]   { --header-bg-color: #37474f; }


.notebook-detail-header::after {
    content: '';
    position: absolute;
    right: 6px; /* 右端からの余白 */
    bottom: -25px;   /* 下端に合わせる */
    width: 200px;
    height: 140px;
    
    /* 画像設定 */
    background-image: url('../images/myPage_flashcard-takokichi.svg');
    background-repeat: no-repeat;
    background-size: contain;
    background-position: right bottom;
    
    /* 重なり順序の調整 */
    z-index: 0; /* 文字(z-index:1)の後ろ、背景色の手前に表示 */
    pointer-events: none; /* 画像がクリックの邪魔にならないようにする */
}
@media (min-width: 501px) {
.notebook-detail-header {
	margin-top:30px;
	border-radius: 24px;
}
}

.mypage-title {
    font-size: 30px;
    font-weight: 900;
    color: #fff;
    margin-bottom: 15px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    position: relative; z-index: 1;
}

.notebook-meta {
    font-size: 12px; 
	color: #999; 
	position: relative; 
	z-index: 1;
	padding-left:5px;
}
.mypage-count {
    font-size: 40px;
    font-weight: 900;
    color: #fff;
    margin: 0 0px;
    display: inline-block;
    opacity:0.9;
}

/* ★追加: 単語数の後ろの「単語」という単位文字 */
.mypage-count-unit {
    font-size: 20px; /* 36px の 0.6倍 */
    font-weight: bold;
    color: #aaa;
    margin-left: 3px;
}

/* =========================================
   学習スタートボタンエリア
========================================= */
.study-actions {
    display: flex;
    flex-direction: column;
    gap: 30px;
    margin-bottom: 40px;
    width: 100%;
    max-width: 500px;
    padding: 0 20px;
    margin: 50px auto 55px;
    box-sizing: border-box;
}

@media (min-width: 501px) {
    .study-actions {
        padding: 0;
    }
}

.study-actions .start-btn {
    padding: 20px 20px 20px 84px;
    font-size: 18px;
    font-weight: bold;
    line-height: 1.2;
    transition: all 0.3s ease;
    border: none;
    background: transparent;
    color: white;
    cursor: pointer;
    text-decoration: none;
    position: relative;
    z-index: 1;
    margin: 0;
    border-radius: 19px;
    display: flex;
    align-items: center;
    box-sizing: border-box;
    width: 100%;
}

.study-actions .start-btn > * {
    position: relative;
    z-index: 1;
}

.study-actions .start-btn .btn-text-wrapper {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
}

@keyframes moveGradient {
    0% { background-position: 0% 50%; }
    100% { background-position: 200% 50%; }
}

/* 光彩（box-shadow）付きのグラデーション背景 */
.study-actions .start-btn::before {
    content: '';
    position: absolute;
    z-index: -2;
    top: -6px; left: -6px; right: -6px; bottom: -6px;
    border-radius: 25px;
    background-size: 200% auto;
    animation: moveGradient 4s linear infinite;
    transition: filter 0.3s ease;
    box-shadow: 0 5px 0px rgba(0, 0, 0, 0.2);
}

.study-actions .start-btn::after {
    content: '';
    position: absolute;
    z-index: -1;
    top: 0; left: 0; right: 0; bottom: 0;
    border-radius: 18px;
    background: url('../images/startBtn_arrowR-new-right-gray.svg') no-repeat calc(100% - 10px) center / 24px 24px, #fff;
    pointer-events: none;
}

/* 文字の部分は個別に黒の動くグラデーションを指定 */
.study-actions .start-btn b {
    font-size: 26px;
    font-weight: 900;
    color: transparent;
    -webkit-background-clip: text;
    background-clip: text;
    background-image: linear-gradient(90deg, #000, #222, #000, #222, #000);
    background-size: 200% auto;
    animation: moveGradient 4s linear infinite;
    display: inline-block;
    line-height: 1;
    margin: 0;
}

.study-actions .start-btn .btn-sub-text {
    display: block;
    font-size: 12px;
    color: #777;
    font-weight: bold;
    margin-top: 4px;
    line-height: 1.4;
    white-space: nowrap;
}

.study-actions .start-btn .btn-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    border-radius: 15px;
    background-color: #696969;
    border: 5px solid #fff;
    box-shadow: 0 0 0 2px #ccc;
    background-size: 100%;
    background-position: center;
    background-repeat: no-repeat;
}

/* スタートボタンのアイコン右下にバッジ */
.study-actions .start-btn .btn-icon::after {
    content: '';
    position: absolute;
    bottom: -10px; 
    right: -10px;
    width: 36px;
    height: 36px;
    background-size: contain;
    background-repeat: no-repeat;
    z-index: 2;
    background-image: url('../images/iconBadge-myPage-contents.svg');
    background-color: transparent;
    border-radius: 0;
}

/* 各種ボタンのボーダー色定義 */
.btn-card::before { background-image: linear-gradient(90deg, #f5e96c, #ffd700, #ffaa00, #ffd700, #f5e96c); }
.btn-card .btn-icon { background-image: url('../images/indexPageBtn_card.svg'); }

.btn-quiz::before { background-image: linear-gradient(90deg, #c93636, #ff4d4d, #ff8080, #ff4d4d, #c93636); }
.btn-quiz .btn-icon { background-image: url('../images/indexPageBtn_quiz.svg'); }

.btn-quiz-advanced::before { background-image: linear-gradient(90deg, #60b6eb, #294799, #672696, #294799, #60b6eb); }
.btn-quiz-advanced .btn-icon { background-image: url('../images/indexPageBtn_quiz-advanced.svg'); }

.btn-list-action::before { background-image: linear-gradient(90deg, #7dc3e3, #3bbcf0, #a4d5eb, #3bbcf0, #7dc3e3); }
.btn-list-action .btn-icon { background-image: url('../images/indexPageBtn_list.svg'); }

/* 光彩パルスアニメーション要素を非表示（CSSアニメーション削除に伴う対応） */
.study-actions .start-btn .btn-pulse {
    display: none;
}

@media (hover: hover) and (pointer: fine) {
    .study-actions .start-btn:hover {
        transform: translateY(-3px);
    }
    .study-actions .start-btn:hover::before {
        filter: brightness(1.2);
    }
}

.study-actions .start-btn:active {
    transform: translateY(0);
}

/* --- 単語帳詳細画面：戻るボタンエリア (New) --- */
.notebook-back-area {
    text-align: center;
    margin-bottom: 80px; /* 下のリストとの間隔 */
    padding: 0 20px;
}

.notebook-back-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    
    background-color: #fff;
    color: #666;
    border: 2px solid #ddd;
    
    font-size: 14px;
    font-weight: bold;
    padding: 10px 40px;
    border-radius: 30px; /* 丸みをつける */
    
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 140px; /* ある程度の幅を確保 */
}

/* ホバー時のスタイル */
.notebook-back-btn:hover {
    background-color: #f0f2f5;
    color: #333;
    border-color: #ccc;
    transform: translateY(-2px);
}


/* 保存リスト */
.saved-list-section {
    background: #fff; 
	backdrop-filter: blur(10px);
    border-radius: 24px; 
	padding: 65px 30px 30px;
}
@media only screen and (max-width: 500px) {
.saved-list-section {
    border-radius: 0px; 
	padding-bottom: 120px;
} 
body.view-notebook-detail #word-list-view {
    padding-bottom: 0px;
} 
}


.list-header {
    display: flex; justify-content: flex-start; align-items: center;
    margin-bottom: 20px; padding-bottom: 15px; border-bottom: 2px dashed #eee;
}

.saved-items-container { display: flex; flex-direction: column; gap: 12px; }

/* 移動先がない場合は右矢印を表示しない */
.saved-items-container[data-no-target="true"] .saved-item-outer::after {
    display: none;
}

.saved-item {
    display: flex; justify-content: space-between; align-items: center;
    padding: 16px; background: #fff;
    border: 1px solid #edf2f7; border-radius: 16px;
    transition: all 0.3s ease; opacity: 0; transform: translateY(10px);
    animation: slideInItem 0.4s var(--ease-smooth) forwards;
}
@keyframes slideInItem { to { opacity: 1; transform: translateY(0); } }

.saved-item:hover {
    transform: translateX(5px); border-color: #cce0ff;
    box-shadow: 0 4px 12px rgba(88,142,196,0.1);
}
.item-word { font-size: 16px; font-weight: bold; color: #333; }
.item-source {
    font-size: 8px; color: #aaa; background: #f0f4f8;
    padding: 3px 10px; border-radius: 10px; display: inline-block; margin-top: 4px;
}

/* 編集モード関連 */
.edit-trigger {
    color: var(--primary-color); 
	font-weight: bold; 
	font-size: 14px;
    padding: 8px 16px; 
	border-radius: 20px; 
	background: #e6f0ff;
    transition: background 0.2s; 
	border: none; 
	cursor: pointer;
}
.saved-items-container.edit-mode .saved-item { border-color: var(--primary-color); background-color: #fbfdff; }
.item-checkbox-wrapper { display: none; margin-right: 10px; }
.saved-items-container.edit-mode .item-checkbox-wrapper { display: block; animation: popIn 0.3s var(--ease-bounce); }
@keyframes popIn { 0% { transform: scale(0); } 80% { transform: scale(1.2); } 100% { transform: scale(1); } }
.item-checkbox { width: 24px; height: 24px; cursor: pointer; accent-color: var(--primary-color); }


.edit-actions-bar.hidden { transform: translateX(-50%) translateY(150%); opacity: 0; pointer-events: none; }
.move-btn {
    background: var(--primary-color); color: #fff; padding: 10px 24px;
    border-radius: 30px; font-weight: bold; border: none;
    box-shadow: 0 4px 10px rgba(88, 142, 196, 0.3); transition: transform 0.2s;
}
.move-btn:disabled { background: #ddd; box-shadow: none; transform: none; }
.move-btn:not(:disabled):hover { transform: translateY(-2px); }

/* ユーティリティ */
.hidden { display: none !important; }

/* モーダルウィンドウ */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 1;
    transition: opacity 0.3s ease;
    padding: 10px 0;
}
.modal-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.modal-window {
    background: #fff;
    width: 100%;
    max-width: 400px;
    border-radius: 24px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.3);
    overflow: hidden;
    transform: scale(1);
    transition: transform 0.3s var(--ease-bounce);
	margin:0 20px;
}
.modal-overlay.hidden .modal-window {
    transform: scale(0.9);
}

.modal-window .modal-header {
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f9f9f9;
}
.modal-window .modal-header h3 {
    font-size: 16px;
    font-weight: bold;
    color: #333;
    margin: 0;
}
.modal-window .modal-close-btn {
    background: none;
    border: none;
    font-size: 24px;
    color: #999;
    cursor: pointer;
    line-height: 1;
    padding: 0 5px;
}
.modal-window .modal-close-btn:hover {
    color: #333;
}

.modal-window .modal-content {
    padding: 35px 10px;
    font-size: 14px;
    color: #555;
    line-height: 1.6;
}

.help-step {
    display: flex;
    gap: 15px;
    margin-top: 20px;
    align-items: flex-start;
}
.step-num {
    background: var(--primary-light);
    color: var(--primary-color);
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    flex-shrink: 0;
    margin-top: 2px;
}
.help-step p {
    margin: 0;
}
.help-step strong {
    color: #333;
    display: block;
    margin-bottom: 2px;
}


/* --- スワイプ整理機能用スタイル --- */

.saved-item-wrapper {
    position: relative;
    border-radius: 16px;
    background-color: #f0f2f5; 
    overflow: hidden; 
    
    opacity: 1;
    transform: none;
    animation: none;
}

.saved-item-outer {
    position: relative;
    overflow: visible; 
    
    opacity: 0; 
    transform: translateY(10px);
    animation: slideInItem 0.4s cubic-bezier(0.4, 0.0, 0.2, 1) forwards;
}

.saved-item-outer::before,
.saved-item-outer::after {
    content: '';
    position: absolute;
    top: 50%;
    transform: translateY(-50%); 
    width: 8px;
    height: 12px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    pointer-events: none; 
    z-index: 0; 
}
.saved-item-outer::before {
    left: -14px; 
    background-image: url('../images/topPageIcon_arrowMini-L.svg');
}
.saved-item-outer::after {
    right: -14px;
    background-image: url('../images/topPageIcon_arrowMini-R.svg');
}

.saved-items-container.edit-mode .saved-item-outer::before,
.saved-items-container.edit-mode .saved-item-outer::after {
    display: none;
}

.swipe-bg {
    position: absolute;
    top: 0; bottom: 0; left: 0; right: 0;
    border-radius: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 10px;
    z-index: 0;
    font-weight: bold;
    color: #fff;
    font-size: 14px;
    transition: background-color 0.2s;
}

.swipe-bg.move-action {
    background-color: var(--primary-color); 
}

.swipe-bg.delete-action {
    background-color: #ff6b6b; 
}

.swipe-icon {
    display: flex;
    align-items: center;
    gap: 4px;
    opacity: 0; 
    transition: opacity 0.1s;
    pointer-events: none; 
}

.swipe-icon.left { margin-right: auto; } 
.swipe-icon.right { margin-left: auto; } 

.saved-item-content {
    position: relative;
    z-index: 1;
    display: flex; 
    justify-content: space-between; 
    align-items: center;
    padding: 16px; 
    background: #fff;
    border: 1px solid #edf2f7; 
    border-radius: 16px;
    
    touch-action: pan-y; 
    transition: transform 0.2s ease-out; 
}

.saved-item-content:hover {
    box-shadow: 0 4px 12px rgba(88,142,196,0.1);
    border-color: #cce0ff;
}

.saved-items-container.edit-mode .saved-item-content {
    border-color: var(--primary-color);
    background-color: #fbfdff;
    transform: translateX(0) !important; 
}

.swipe-hint {
    font-size: 12px;
    color: #999;
    text-align: center;
    margin-bottom: 10px;
    background-color: rgba(255,255,255,0.5);
    padding: 4px;
    border-radius: 4px;
}

/* --- 移動先パレット --- */
.move-palette-container {
    background: #e1e5eb;
    padding: 0px;
    border-radius: 16px;
    margin-bottom: 15px;
    position: sticky;
    top: 0; 
    z-index: 10;
}

.move-palette-container::after {
    content: '';
    position: absolute;
    bottom: -10px; 
    left: 50%;
    transform: translateX(-50%); 
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 10px 10px 0 10px; 
    border-color: #e1e5eb transparent transparent transparent;
    pointer-events: none;
}

.palette-label {
    font-size: 11px;
    color: #888;
    margin-left:15px;
	margin-bottom:-15px;
    font-weight: bold;
	padding-top:10px;
}

.notebook-palette {
    display: flex;
    gap: 10px;
    overflow-x: auto; 
    padding-bottom: 5px; 
    
    scrollbar-width: none; 
    -ms-overflow-style: none;
}
.notebook-palette::-webkit-scrollbar {
    display: none;
}
#notebook-palette {
    display: grid;
    grid-template-columns: 1fr 1fr; 
    gap: 10px;       
    width: 100%;     
    margin-top: 10px;
	padding: 15px 15px; 
    box-sizing: border-box;
}

.palette-chip {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 2px 12px;
	padding-left:8px;
    border-radius: 30px;
    background: #fff;
    border: 1px solid #ccc;
	box-shadow: 0 3px 0px rgba(0, 0, 0, 0.2);
    font-size: 12px;
    font-weight: bold;
    color: #555;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0; 
    width: 100%;         
    box-sizing: border-box; 
    display: flex;
    justify-content: flex-start; 
    align-items: center;
    text-align: center;
    min-height: 44px;    
    margin: 0;           
}

.palette-chip.active {
    background: #0e2957; 
    color: #fff;
    border-color: #0e2957;
    box-shadow: 0 4px 0px rgba(14, 41, 87, 0.3);
    transform: scale(1.05);
}

.palette-icon {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background-color: #ccc;
}

/* ▼▼▼ 追加: 移動先パレット内の作成ボタン ▼▼▼ */
.palette-chip-create {
    position: relative; /* ★追加: アイコンを絶対配置にするため */
    display: flex;
    justify-content: center; /* ★中央揃え */
    align-items: center;
    padding: 2px 12px;
    border-radius: 30px;
    background: #f0f4f8;
    border: 2px dashed #a0b2c1;
    font-size: 13px;
    font-weight: bold;
    color: #53758f;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
    width: 100%;
    box-sizing: border-box;
    text-align: center;
    min-height: 44px;
    margin: 0;
}

.palette-chip-create:hover {
    background: #e6f0ff;
    border-color: #588ec4;
    color: #588ec4;
}

.palette-chip-create:active {
    transform: scale(0.96);
}

.palette-chip-create:only-child {
    grid-column: 1 / -1;
}

.palette-chip-create .plus-icon {
    position: absolute; /* ★追加: アイコンを左端に固定 */
    left: 15px;         /* ★追加 */
    font-size: 16px;
}
/* ▲▲▲ 追加ここまで ▲▲▲ */


/* --- 単語帳詳細画面：戻るボタンエリア --- */
.notebook-back-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: #4a5154;
    color: #fff;
    border: none;
	box-shadow: 0 3px 0px rgba(0, 0, 0, 0.18);
    font-size: 16px;
    font-weight: bold;
    padding: 10px 40px;
    border-radius: 30px; 
	position: relative;    
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 140px; 
}
.notebook-back-btn::after {
    content: '';
    position: absolute; 
    right: 10px;        
    top: 50%;           
    transform: translateY(-50%); 
    
    width: 26px;
    height: 26px;
    
    background-image: url('../images/topPage_icon_trash_return.svg');
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
}

.notebook-back-btn:hover::after {
    filter: invert(1);
}

/* --- 単語帳メモ機能 --- */
.notebook-memo-area {
    margin-bottom: 8px;
    padding-left: 32px; 
    position: relative;
    z-index: 2;
    min-height: 24px;   
    display: flex;
    align-items: flex-start; /* ★修正: 高さ潰れ対策 */
}

.notebook-memo-area::before {
    content: '';
    position: absolute;
    left: 6px;
    top: 2px; /* ★修正: align-items変更に合わせた位置調整 */
    width: 18px;
    height: 18px;
    background-image: url('../images/topPage_icon_penW.svg');
    background-size: contain;
    background-repeat: no-repeat;
    opacity: 0.75; 
    pointer-events: none; 
    transition: opacity 0.3s ease;
}

.notebook-memo-area:hover::before,
.notebook-memo-input:focus + .notebook-memo-area::before {
    opacity: 0.6;
}

.notebook-memo-input {
    width: 100%;
    background: transparent; 
    border: none;            
    border-radius: 0;
    opacity: 0.75;
    padding: 2px 0;          
    font-size: 13px;
    color: #fff !important;  /* ★修正: 確実な色適用 */
    -webkit-text-fill-color: #fff; /* ★修正: iOSの入力欄バグ対策 */
    resize: none;
    outline: none;
    font-family: inherit;
    line-height: 1.5;
    transition: all 0.2s ease;
    
    min-height: 24px; /* ★追加: JSによる初期高さ潰れ対策 */
    display: block;   /* ★追加: flex子要素としての挙動安定化 */
}

.notebook-memo-input::placeholder {
    color: rgba(255, 255, 255, 0.05); /* 色をさらに薄く */
    font-weight: normal;
}

.notebook-memo-input:focus {
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

/* ★追加・修正: 削除ボタンと変更ボタンのレイアウト */
.notebook-actions-row {
    display: flex;
    flex-direction: column; /* 縦並びに変更 */
    gap: 10px;
    margin-top: 25px;
    align-items: flex-start; /* 左寄せ */
}

.notebook-delete {
    display: flex;
    align-items: center;       
    justify-content: center;   
    gap: 4px;                  
    background-color: #ff4d4d; 
    color: #fff;               
    border-radius: 50px;       
    border: none;
    padding: 4px 18px 6px 13px;         
    margin-top: 0; /* ★修正 */
	margin-bottom: 0; /* ★修正 */
    font-weight: bold;
    font-size: 12px;
    text-decoration: none;
    cursor: pointer;
    transition: opacity 0.3s ease;
	box-shadow: 0 3px 0px rgba(0, 0, 0, 0.5);
}
.notebook-delete:hover {
    opacity: 0.8;
}

.notebook-delete::before {
    content: '';
    display: block;
    width: 20px;
    height: 20px;
    
    background-image: url('../images/topPage_icon_trash_can.svg');
    background-repeat: no-repeat;
    background-size: contain; 
    background-position: center;  
    flex-shrink: 0; 
}

/* ★追加: 単語帳変更ボタン */
.notebook-change-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #fff;
    color: #222;
    border-radius: 50px;
    border: none;
    padding: 6px 20px;
    font-weight: bold;
    font-size: 14px;
    cursor: pointer;
    box-shadow: 0 4px 0px rgba(0, 0, 0, 0.7);
    transition: opacity 0.3s ease, background-color 0.2s;
    text-decoration: none;
}
.notebook-change-btn:hover {
    background-color: #e2e8f0;
}

/* ★追加: 単語帳変更モーダル内のリスト */
.change-notebook-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 300px;
    overflow-y: auto;
}
.change-notebook-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border-radius: 12px;
    background: #f9f9f9;
    border: 1px solid #ddd;
    cursor: pointer;
    transition: background 0.2s;
}
.change-notebook-item:hover {
    background: #eef5ff;
    border-color: var(--primary-color);
}
.change-notebook-item .icon {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background-size: 16px;
    background-position: center;
    background-repeat: no-repeat;
}
.change-notebook-item .name {
    font-size: 14px;
    font-weight: bold;
    color: #333;
}

/* --- スワイプアイコンのカスタマイズ --- */
.swipe-custom-icon {
    display: inline-block;
    width: 28px;
    height: 28px;
    vertical-align: middle; 
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    margin: 0 4px; 
}

.icon-move-custom {
    background-image: url('../images/topPage_icon_trash_folder.svg'); 
}

.icon-delete-custom {
    background-image: url('../images/topPage_icon_trash_can.svg');
}

.detail-header-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 5px;
	position:relative;
}

.mypage-title {
    flex-grow: 1;
    --title-icon-url: url('../images/myPage_icon_cardW.svg');
}

.mypage-title::before {
    content: ''; 
    display: inline-block;
    width: 44px; 
    height: 44px;
    background-color: #fff;
    border-radius: 50%;
    margin-right: 0; 
    background-image: var(--title-icon-url);
    background-size: 30px; 
    background-repeat: no-repeat;
    background-position: center;
    flex-shrink: 0;
}

/* ★修正: 設定（編集）ボタンとラベルのラッパー */
.notebook-settings-wrapper {
    position: absolute;
    top: -5px;
    right: 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 7px;
}

/* 設定ボタン本体 */
.notebook-settings-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #61081b; /* ★変更: 色を #61081b に */
    border: none;
    cursor: pointer;
    flex-shrink: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background-color 0.2s, opacity 0.2s;
	box-shadow: 0 3px 0px rgba(0, 0, 0, 0.5);
}

.notebook-settings-btn::before {
    content: '';
    display: block;
    width: 30px;
    height: 30px;
    background-image: url('../images/topPage_icon_trash_setting-w.svg');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    /* filter: brightness(0) invert(0.6); は削除し、そのままの色(白)を活かす */
	pointer-events: none;
}

/* ★追加: 設定ボタン下の「変更」ラベル */
.notebook-settings-label {
    font-size: 11px;
    color: #fff;
	opacity:0.6;
    font-weight: bold;
    line-height: 1;
}

/* --- 単語帳作成・編集フォームモーダル --- */
.form-group {
    margin-bottom: 20px;
}
.form-label {
    display: block;
    font-size: 13px;
    font-weight: bold;
    color: #333;
    margin-bottom: 8px;
}
.form-input {
    width: 100%;
    padding: 12px;
    font-size: 16px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: #f9f9f9;
    box-sizing: border-box;
    font-family: inherit;
}
.form-input:focus {
    background: #fff;
    border-color: var(--primary-color);
    outline: none;
}
textarea.form-input {
    resize: none;
    line-height: 1.5;
}

/* カラーパレット */
.color-palette {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.color-option {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid transparent;
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    justify-content: center;
    align-items: center;
}
.color-option:hover {
    transform: scale(1.1);
}
.color-option.selected {
    border-color: #333; 
    transform: scale(1.1);
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}
.color-option .check-mark {
    font-size: 16px;
    color: #fff;
    display: none;
    line-height: 1;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}
.color-option.selected .check-mark {
    display: block;
}

/* アイコンパレット */
.icon-palette {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}
.icon-option {
    width: 44px;
    height: 44px;
    border-radius: 8px;
    background-color: #f0f4f8;
    background-position: center;
    background-repeat: no-repeat;
    background-size: 24px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s;
}
.icon-option:hover {
    background-color: #e0e6ed;
}
.icon-option.selected {
    border-color: var(--primary-color);
    background-color: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.palette-icon {
    background-repeat: no-repeat;
    background-position: center;
}

/* --- 保存完了通知（スナックバー） --- */
.snackbar {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background-color: rgba(30, 30, 30, 0.95);
    color: #fff;
    border-radius: 30px;
    font-size: 14px;
    font-weight: bold;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    opacity: 0;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.4s ease;
    z-index: 9999;
    pointer-events: auto !important; 
    white-space: nowrap;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    padding: 10px 20px;
    min-width: 280px;
    max-width: 90%;
}

.snackbar:after {
    content: "";
    position: absolute;
    background: url('../images/snackbarImg_tako.svg') top right 45px no-repeat;
    background-size: auto;
    width: 100%;
    height: 40px;
    top: -32px;
    z-index: 3;
    pointer-events: none;
}

.snackbar.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.snackbar::before {
    content: '';
    display: block;
    width: 18px;
    height: 18px;
    background-image: url('../images/icon_qrip.svg');
    background-size: contain;
    background-repeat: no-repeat;
    filter: brightness(0) invert(1); 
}

.snackbar-text {
    font-size: 14px;
    font-weight: bold;
    flex-grow: 1;
    overflow: hidden;
    text-overflow: ellipsis;
}

.snackbar-action {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.6);
    color: #fff;
    border-radius: 15px;
    font-size: 12px;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s;
    padding: 6px 16px; 
    margin-left: 10px;
}

.snackbar-action:active {
    background: rgba(255, 255, 255, 0.2);
}

.modal-window .modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
    padding: 15px;
    border-top: 1px solid #eee;
}

.modal-window .modal-btn {
    padding: 10px 20px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    border: none;
    transition: background 0.2s, transform 0.1s;
}
.modal-window .modal-btn:active {
    transform: translateY(2px);
}

.modal-window .btn-cancel {
    background: #f0f2f5;
    color: #444;
}
.modal-window .btn-cancel:hover {
    background: #e4e6e9;
}

.modal-window .btn-primary {
    background: var(--primary-color);
    color: #fff;
    box-shadow: 0 4px 10px rgba(113, 161, 209, 0.3);
}
.modal-window .btn-primary:hover {
    background: var(--primary-dark);
}

.modal-window .btn-danger {
    background: #990909;
    color: #fff;
    box-shadow: 0 3px 0px rgba(0, 0, 0, 0.1);
}
.modal-window .btn-danger:hover {
    background: #e05555;
}

/* --- 一括整理バー（アクションバー） --- */
.edit-actions-bar {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(0);
    width: calc(95% - 40px);
    max-width: 480px;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius:140px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.55);
    border: 4px solid #fff;
    padding: 12px 12px 12px 12px;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease;
    opacity: 1;
}

.edit-actions-bar.hidden {
    transform: translateX(-50%) translateY(150%) !important; 
    opacity: 0;
    pointer-events: none;
    display: flex !important; 
}

.selection-info {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    color: #888;
}

.check-icon-circle {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 24px;
    height: 24px;
    background-color: var(--primary-color);
    color: #fff;
    border-radius: 50%;
    font-size: 14px;
    font-weight: bold;
}

.selection-text strong {
    font-size: 30px;
	font-weight:800;
    color: var(--primary-dark);
    margin-right: 1px;
}

.edit-buttons {
    display: flex;
    align-items: center;
    gap: 5px;
}

.edit-action-btn {
    border: none;
    cursor: pointer;
    font-weight: bold;
    font-size: 14px;
    padding: 10px 15px;
    border-radius: 20px;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
	box-shadow: 0 3px 0px #333;
}
.edit-action-btn:disabled {
    opacity: 0.2;
    cursor: not-allowed;
    filter: grayscale(100%);
}
.delete-btn::before {
    content: ''; 
	width: 18px;
	height: 18px;
    background-image: url('../images/topPage_icon_trash_can.svg'); 
	background-size: contain;
    filter: invert(63%) sepia(26%) saturate(3078%) hue-rotate(318deg) brightness(101%) contrast(101%);
}
.delete-btn:hover { background: #ff4757; border-color: #ff4757; transform: rotate(90deg); }
.delete-btn:hover::before { filter: brightness(0) invert(1); }

.edit-action-btn.move-btn {
    background: var(--primary-color);
    color: #fff;
    box-shadow: 0 3px 0px #333;
}
.edit-action-btn.move-btn:not(:disabled):hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(88, 142, 196, 0.4);
}
.edit-action-btn.move-btn:active {
    transform: scale(0.95);
}

.edit-action-btn.delete-btn {
    background: #fff0f0;
    color: #ff6b6b;
	padding-left:10px;
}
.edit-action-btn.delete-btn:not(:disabled):hover {
    background: #ffe0e0;
}


/* --- 空の状態 (Empty State) --- */
.empty-state {
    text-align: center;
    padding: 50px 20px;
    background-color: #f9f9f9;
    border: 3px dashed #e0e0e0;
    border-radius: 24px;
    margin-top: 10px;
    color: #888;
}

.empty-icon-wrapper {
    width: 80px;
    height: 80px;
    background-color: #fff;
    border-radius: 50%;
    margin: 0 auto 15px;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.empty-icon {
    display: block;
    width: 40px;
    height: 40px;
    background-image: url('../images/icon_qrip.svg');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    opacity: 0.4;
    filter: grayscale(100%);
}

.empty-text {
    font-size: 14px;
    line-height: 1.6;
    font-weight: bold;
    color: #aaa;
}

.edit-trigger {
    color: #fff; 
    font-weight: bold; 
    font-size: 16px;
    padding: 6px 22px; 
    border-radius: 32px; 
    background: #09719c;
    transition: all 0.2s ease; 
    border: 1px solid transparent; 
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
	box-shadow: 0 4px 0px #0d4e69;
}

.edit-trigger.active {
    background-color: #990909;
    color: #fff;
    border-color: #990909;
	box-shadow: 0 3px 0px rgba(0,0,0,0.25);
}
.edit-trigger.active::before {
    content: "";               
    display: inline-block;     
    width: 24px;               
    height: 24px;              
    background-image: url('../images/myPage_icon_close.svg');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    background-color: transparent; 
    -webkit-mask: none;
    mask: none;
    vertical-align: middle;
    margin-right: 8px;
}

.saved-item-info {
    flex-grow: 1;       
    text-align: left;   
    min-width: 0;       
}
.saved-item-content {
    justify-content: flex-start;
}

/* 数式カードも通常の単語カードと同じ高さ・横並びで整理できるようにする */
.saved-item-outer.is-math-formula .saved-item-info {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 5px 8px;
}
.saved-item-outer.is-math-formula .item-word {
    display: inline-flex;
    align-items: center;
    min-width: 0;
    line-height: 1.35;
}
.saved-item-outer.is-math-formula .item-word .katex-display {
    display: inline-block !important;
    width: auto !important;
    margin: 0 !important;
    text-align: left !important;
    vertical-align: middle;
}
.saved-item-outer.is-math-formula .item-word .katex {
    font-size: 1em !important;
    line-height: normal;
}
.saved-item-outer.is-math-formula .item-source {
    margin-top: 0;
}

/* --- END OF FILE css/mypage-notebook.css --- */
