/* --- START OF FILE css/header-common.css --- */

/* css/header-common.css */
/* サイト全体で共通のページヘッダーに関するスタイル */

/* ページ共通ヘッダー */
header.page-header {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background-color: transparent;
    transform: translateY(0);
    /* transform のトランジションは外して、fixed状態のときのみ適用させることで、最上部に戻る時のガタつきを防ぎます */
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
    will-change: transform, background-color, box-shadow;
	min-height: 176px;
}

/* 固定表示（アップスクロールで降りてくる時）のクラス */
header.page-header.is-fixed {
    position: fixed;
    transition: transform 0.4s cubic-bezier(0.2, 0, 0, 1), background-color 0.3s ease, box-shadow 0.3s ease;
}

header.page-header.is-scrolled {
    background-color: rgba(255, 255, 255, 1);
    /* 背景の要素をぼかす「すりガラス」効果を追加します (Safari向けも併記) */
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    /* 影はそのまま維持します */
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

header.page-header.is-hidden {
    transform: translateY(-100%);
	background-color: transparent !important;
    box-shadow: none !important;
}

/* スクロールアップ時に部分的に表示するためのスタイル */
header.page-header.is-compact {
    transform: translateY(-110px);
}

.title-bar {
    height: 80px;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* ▼▼▼ メニューボタン（アニメーション付き） ▼▼▼ */
#navigation-menu-button {
    position: fixed;
    top: 15px;
    right: 15px;
    width: 50px;
    height: 50px;
    background: url('../images/menuIcon_dot.svg') center center no-repeat, #000;
    background-size: 100%, 100%;
    border: none;
    cursor: pointer;
    z-index: 3002; /* モーダルより手前に来るように調整 */
    border-radius: 50%;
    /* アニメーションのための transform と transition */
    transform: translateY(0);
    transition: transform 0.4s cubic-bezier(0.2, 0, 0, 1), background-color 0.3s ease;
    will-change: transform;
}

/* ボタンを隠すためのスタイル */
#navigation-menu-button.is-hidden {
    transform: translateY(-150%);
}

#navigation-menu-button.is-active {
    transform: rotate(-45deg);
    /* 背景色と背景画像をまとめて指定し、アイコンを黒いSVGに差し替え */
    background: url('../images/menuIcon_dot_bk.svg') center center no-repeat, #a30b22;
}

.header-content {
    width: 100%;
    max-width: 500px;
    padding: 0;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    position: relative;
}

/* ロゴスタイル */
.header-logo-link {
    display: inline-block;
    width: 200px;
    height: 60px;
    background-image: url('../images/headerLogo.svg');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.page-indicator-bar {
    max-width: 500px;
    height: 30px;
    margin: 0 auto;
    padding: 0 15px;
    background-color: #000;
    color: #fff;
    font-size: 12px; 
    font-weight: bold;    
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 15px;
    gap: 15px; 
}

.indicator-subtitle {
    opacity: 0.8;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;     
    flex: 1 1 auto; 
}

.indicator-maintitle {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0; 
    flex: 0 1 auto; 
    text-align: right;
}

.indicator-unit-label {
    margin-right: 5px;
    font-size: 10px;
    font-weight: 900;
}

.page-navigation {
    max-width: 500px;
    margin: 6px auto 0;
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 0 10px 6px;
}

/* ヘッダーナビゲーションアイコン */
.nav-icon {
    flex: 1;
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    text-decoration: none; 
    padding-bottom: 5px;
    border-bottom: 5px solid transparent;
    transition: all 0.3s ease;
    position: relative;
}

/* ▼▼▼ 追加：415px以下の場合はホームボタンを非表示 ▼▼▼ */
@media (max-width: 415px) {
    .nav-icon[data-page="index.html"] {
        display: none !important;
    }
}

/* ▼▼▼ 修正：親全体のopacity指定を削除し、画像とテキストにのみ適用 ▼▼▼ */
.nav-icon-image,
.nav-icon-text {
    transition: opacity 0.3s ease; /* ホバー時の滑らかなフェード用 */
}

/* 非アクティブ時は、画像とテキストだけを半透明にする（チェックマークは対象外） */
.nav-icon:not(.active) .nav-icon-image,
.nav-icon:not(.active) .nav-icon-text {
    opacity: 0.45;
}

.nav-icon-image {
    width: 32px;
    height: 32px;
    display: block;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.nav-icon-image.home { background-image: url('../images/menuIcon_home.svg'); }
.nav-icon-image.card { background-image: url('../images/menuIcon_card.svg'); }
.nav-icon-image.quiz { background-image: url('../images/menuIcon_quiz.svg'); }
.nav-icon-image.quiz-advanced { background-image: url('../images/menuIcon_quiz-advanced.svg'); }
.nav-icon-image.list { background-image: url('../images/menuIcon_list.svg'); }
.nav-icon-image.details { background-image: url('../images/menuIcon_details.svg'); }

.nav-icon-text {
    font-size: 10px;
    color: #000;
    font-weight: bold;
    margin-top: 2px;
    white-space: nowrap; 
}

.nav-icon.active {
    border-bottom-color: transparent;
}

/* フローティング・ドット */
.nav-icon.active::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 8px;
    height: 8px;
    background-color: #fff;
    border-radius: 50%;
}

@media (max-width: 520px) {
    .page-indicator-bar,
    .header-content {
        margin-left: 20px;
        margin-right: 20px;
    }
}

/* --- 共通モーダル --- */
body.modal-open {
    overflow: hidden;
}

#modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 3000;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

#modal-overlay.is-white-theme {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

#modal-overlay.show {
    opacity: 1;
    visibility: visible;
}

#modal-container {
    position: relative;
    width: 100%;
    max-width: 500px;
    display: flex;
    justify-content: center;
    align-items: center;
}

#modal-window {
    background: #f9f9f9;
    border-radius: 25px;
    width: 100%;
    max-height: 80vh;
    padding: 0;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    transform: scale(0.9) translateY(20px);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

#modal-overlay.is-slide-animation #modal-window {
    transform: translateY(-40px);
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94), opacity 0.4s ease;
}

#modal-overlay.show #modal-window {
    transform: scale(1) translateY(0);
    opacity: 1;
}

#modal-close-button {
    position: absolute;
    top: -15px;
    right: -15px;
    width: 45px;
    height: 45px;
    border: none;
    background-color: #cc1842;
    background-repeat: no-repeat;
    background-position: center;
    background-size: 30px 30px;
    border-radius: 50%;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.2s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    z-index: 3001;
}

#modal-close-button:hover {
    background-color: #a71436;
    transform: scale(1.1);
}

#modal-content {
    padding: 40px 25px 10px;
    overflow-y: auto;
}

#modal-content .modal-header {
    margin-bottom: 15px;
    border-bottom: 6px solid #000;
    padding-bottom: 15px;
	padding-top:20px;
    background: #fff;
}
#modal-content .modal-header h2 {
    font-size: 1.8rem;
    font-weight: bold;
    color: #111;
    margin: 0;
    line-height: 1.2;
}
#modal-content .modal-section {
    margin-bottom: 40px;
}
#modal-content .modal-section h3 {
    font-size: 1.2rem;
    font-weight: bold;
    color: #111;
    margin-bottom: 10px;
}
#modal-content .modal-section p,
#modal-content .modal-section li {
    font-size: 0.95rem;
    line-height: 1.7;
    color: #555;
    margin-bottom: 10px;
    text-align: justify;
}
#modal-content .modal-section ul {
    list-style-type: disc;
    list-style-position: inside;
    padding-left: 1em;
}

.navigation-modal-nav {
    margin: -10px 0 20px;
}
.navigation-modal-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.navigation-modal-item a {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: #111;
    font-size: 1.1rem;
    font-weight: bold;
    border-bottom: none;
    background-image: linear-gradient(to right, #e0e0e0, #e0e0e0);
    background-size: calc(100% - 50px) 1px;
    background-repeat: no-repeat;
    background-position: center bottom;
    transition: background-color 0.2s ease;
    padding: 13px 25px; 
}

.navigation-modal-item:first-child a {
    border-top: none;
    background-image: linear-gradient(to right, #e0e0e0, #e0e0e0);
    background-size: calc(100% - 50px) 1px;
    background-position: center bottom;
}

/* モーダル内ナビゲーションアイコン */
.modal-nav-icon {
    width: 36px;
    height: 36px;
    margin-right: 15px;
    display: inline-block;
    vertical-align: middle;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.modal-nav-icon.home { background-image: url('../images/menuIcon_home.svg'); }
.modal-nav-icon.card { background-image: url('../images/menuIcon_card.svg'); }
.modal-nav-icon.quiz { background-image: url('../images/menuIcon_quiz.svg'); }
.modal-nav-icon.quiz-advanced { background-image: url('../images/menuIcon_quiz-advanced.svg'); }
.modal-nav-icon.list { background-image: url('../images/menuIcon_list.svg'); }
.modal-nav-icon.details { background-image: url('../images/menuIcon_details.svg'); }
.modal-nav-icon.review-icon { background-image: url('../images/menuIcon_review.svg'); }
.modal-nav-icon.chapter-icon { background-image: url('../images/menuIcon_chapter.svg'); }
.modal-nav-icon.data-icon { 
    background-image: url('../images/menuIconL_data-green.svg');
}

.modal-nav-icon.mypage-icon {
    width: 55px;
    height: 55px;
    background-image: url('../images/menuIconL_mypage.svg');
}
.modal-nav-icon.search-icon {
    background-image: url('../images/menuIconL_choice.svg');
}
.modal-nav-icon.my-notebook-icon {
    background-image: url('../images/menuIconL_flashcard.svg');
}

.modal-nav-icon.highlights-icon {
    background-image: url('../images/menuIconL_details.svg');
}

.modal-nav-icon.favorite-icon {
    background-image: url('../images/menuIconL_favorite.svg');
    transition: transform 0.2s ease;
}
#modal-favorite-button.is-active .modal-nav-icon.favorite-icon {
    background-image: url('../images/menuIconL_favorite_Y.svg');
}

/* ▼▼▼ お気に入り追加ボタンのスタイル ▼▼▼ */
.menu-favorite-add-item {
    margin-bottom: 0;
}

.modal-action-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px 20px;
    border-radius: 12px;
    background-color: #e1dfeb;
    border: 2px dashed #958fb3;
    font-weight: bold;
	font-size:15px;
    color: #3a3942;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 3px 0px rgba(0,0,0,0.05);
    box-sizing: border-box;
	margin-bottom:10px;
}

.modal-action-btn:hover {
    background-color: #fff8e1;
    transform: translateY(-2px);
    box-shadow: 0 5px 6px rgba(0,0,0,0.1);
}

.modal-action-btn:active {
    transform: translateY(1px);
    box-shadow: 0 1px 0px rgba(0,0,0,0.05);
}

.modal-action-btn .modal-nav-icon {
    width: 28px;
    height: 28px;
    margin-right: 8px;
	background-image: url('../images/menuIconL_favorite-w.svg');
}

#modal-favorite-button.is-active {
    background-color: #fff8e1;
    border-style: solid;
}

/* --- ナビゲーションメニューモーダル専用スタイル --- */
#modal-overlay.is-fullscreen-nav {
    padding: 0;
    background: #000;
    opacity: 1;
    visibility: visible;
    transform: translateX(-100%);
    transition: transform 0.72s cubic-bezier(0.8, 0, 0.2, 1);
    will-change: transform;
}

#modal-overlay.is-fullscreen-nav.show {
    transform: translateX(0);
}

#modal-overlay.is-fullscreen-nav.is-closing {
    transition: transform 0.72s cubic-bezier(0.8, 0, 0.2, 1);
    transform: translateX(-100%);
}

#modal-overlay.is-fullscreen-nav #modal-container {
    max-width: none;
    width: 100%;
    height: 100%;
}

#modal-overlay.is-fullscreen-nav #modal-window {
    width: 100%;
    height: 100%;
    max-height: none;
    border-radius: 0;
    box-shadow: none;
    background: #fff;
    transform: translateX(-100%);
    opacity: 1;
    transition: transform 0.84s cubic-bezier(0.8, 0, 0.2, 1) 0.075s;
    will-change: transform;
}

#modal-overlay.is-fullscreen-nav.show #modal-window {
    transform: translateX(0);
}

#modal-overlay.is-fullscreen-nav.is-closing #modal-window {
    transition: transform 0.72s cubic-bezier(0.8, 0, 0.2, 1);
    transform: translateX(-100%);
}

#modal-overlay.is-fullscreen-nav #modal-close-button {
    display: none;
}

#modal-overlay.is-fullscreen-nav #modal-content {
    padding-top: 0px;
	width:100%;
	background:#fff;
    max-width: 500px;
    margin: 0 auto;
    padding-left: 0;
    padding-right: 0;
    padding-bottom: 10px;
}

#modal-overlay.is-fullscreen-nav #modal-content .modal-header {
    padding-left: 25px;
    padding-right: 25px;
}

/* --- PWAインストールボタン --- */
.navigation-modal-item.install-item {
    margin-top: 10px;
    padding-top: 10px;
    border-top: none;
    background-image: linear-gradient(to right, #e0e0e0, #e0e0e0);
    background-size: calc(100% - 50px) 1px;
    background-repeat: no-repeat;
    background-position: center top;
}

.navigation-modal-item.install-item a {
    background-color: #eef5ff;
    border-radius: 12px;
    border-bottom: none;
    display: flex;
    align-items: center;
    padding: 12px 25px;
}

.navigation-modal-item.install-item a:hover {
    background-color: #dbeaff;
}

.install-pwa-icon {
    display: inline-block;
    width: 40px;
    height: 40px;
    margin-right: 15px;
    background: url('../images/icon_install.svg') no-repeat center center;
    background-size: contain;
    align-self: center;
    flex-shrink: 0;
}

/* --- iOSインストール案内 --- */
.ios-guide-steps {
    list-style-type: decimal;
    padding-left: 20px;
    margin-top: 20px;
}
.ios-guide-steps li {
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: 15px;
    color: #333;
}
.ios-guide-steps li:last-child {
    margin-bottom: 0;
}

/* ▼▼▼ お気に入り（ブックマーク）ボタン（ヘッダー用） ▼▼▼ */
#favorite-toggle-button {
    position: absolute;
    top: 15px;
    width: 50px;
    height: 50px;
    background: url('../images/icon-favorite.svg') center center no-repeat;
    background-size: 32px 32px;
    border: none;
    cursor: pointer;
    z-index: 2000;
    transition: transform 0.4s cubic-bezier(0.2, 0, 0, 1), background-color 0.3s ease;
    will-change: transform;
}

/* スマホ等小さい画面ではハンバーガーメニューの隣 */
@media (max-width: 630px) {
    #favorite-toggle-button {
        right: 65px;
    }
}

/* 631px以上（PCサイズ等）では、コンテンツエリア（最大幅500px）の右端に配置 */
@media (min-width: 631px) {
    #favorite-toggle-button {
        left: calc(50% + 200px); /* 50% + 250px(右端) - 50px(ボタン幅) */
    }
}

#favorite-toggle-button.is-active {
    background-image: url('../images/icon-favorite-yellow.svg');
}

/* ▼▼▼ 区切り線（メニュー見出し）のスタイル ▼▼▼ */
.navigation-modal-item.menu-divider {
    padding: 18px 25px 5px;
    font-size: 13px;
    font-weight: bold;
    color: #888;
    border-top: none;
    background-color:  #e0e0e0;
    background-size: calc(100% - 50px) 1px;
    background-repeat: no-repeat;
    background-position: center top;    
    margin-top: 10px;
}

/* ▼▼▼ JSアコーディオン共通スタイル ▼▼▼ */
.navigation-modal-item.accordion-wrapper {
    padding: 0;
    border-bottom: none;
    /* アイテム間の線が2重にならないよう、下線のみを設定 */
    background-image: linear-gradient(to right, #e0e0e0, #e0e0e0);
    background-size: calc(100% - 50px) 1px;
    background-repeat: no-repeat;
    background-position: center bottom;
}

/* リストの一番最初のアコーディオンのみ、上にも線を引く */
.navigation-modal-list > .navigation-modal-item.accordion-wrapper:first-of-type {
    background-image: 
        linear-gradient(to right, #e0e0e0, #e0e0e0),
        linear-gradient(to right, #e0e0e0, #e0e0e0);
    background-size: 
        calc(100% - 50px) 1px, 
        calc(100% - 50px) 1px;
    background-position: 
        center top, 
        center bottom;
}

.js-accordion-item {
    width: 100%;
    overflow: hidden;
}

.js-accordion-header {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 15px 25px;
    background: transparent;
    border: none;
    cursor: pointer;
    text-align: left;
    font-family: inherit;
    transition: background-color 0.2s ease, color 0.2s ease;
    outline: none;
    position: relative;
}

.js-accordion-header .header-text {
    flex-grow: 1;
    font-size: 1.1rem;
    font-weight: bold;
    color: #111;
}

.js-accordion-header:hover {
    background-color: #f0f3f6;
}

.js-accordion-item.is-open > .js-accordion-header {
    background-color: #f9f9f9;
}
.js-accordion-item.is-open > .js-accordion-header .header-text {
    color: #111;
}

.js-accordion-header .header-arrow {
    width: 20px;
    height: 20px;
    background-image: url('../images/myPageIcon_plus.svg');
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    border: none;
    transform: rotate(0deg);
    transition: transform 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    margin-top: 0;
    flex-shrink: 0;
    opacity: 0.5;
}

.js-accordion-item.is-open > .js-accordion-header .header-arrow {
    transform: rotate(135deg);
    opacity: 1;
}

.js-accordion-content {
    transform-origin: top;
    will-change: height, opacity;
}

.js-accordion-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

/* --- 階層ごとのスタイル --- */
.js-accordion-item.level-1 > .js-accordion-header .header-text {
    margin-left: 0;
}
.js-accordion-item.level-1 > .js-accordion-header {
    background: transparent;
}
.js-accordion-item.level-1.is-open > .js-accordion-header {
    background-color: #dae5f0;
}

/* 「学習単元を選ぶ」は、閉じている間だけヘッダーをカード状にして優先度を示す。
   アコーディオン本体の幅は変えず、開閉時の高さ計算がずれないようにする。 */
.unit-selector-menu > .root-accordion {
    width: 100%;
    margin: 0;
    overflow: hidden;
    background-color: transparent;
}

.unit-selector-menu > .root-accordion > .root-header {
    box-sizing: border-box;
    width: calc(100% - 40px);
    margin: 0px 20px 20px;
    padding: 14px 15px;
    border: none;
    border-radius: 16px;
    background-color: #d7e6f2;
    box-shadow: 0 4px 0 rgba(83, 117, 143, 0.22);
    transition: width 0.24s ease, margin 0.24s ease, padding 0.24s ease,
                border-radius 0.24s ease, background-color 0.2s ease,
                box-shadow 0.2s ease;
}

.unit-selector-menu > .root-accordion > .root-header:hover {
    background-color: #c9ddea;
}

.unit-selector-menu > .root-accordion > .root-header .header-text {
    font-size: 1.15rem;
}

.unit-selector-menu > .root-accordion > .root-header .header-arrow {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background-color: #ffffff;
    background-size: 14px 14px;
    opacity: 1;
}

/* 展開後は添付案どおり、見出しと選択領域をモーダルの端まで広げる */
.unit-selector-menu > .root-accordion.is-open {
    width: 100%;
    margin: 0;
    overflow: hidden;
    background-color: transparent;
}

.unit-selector-menu > .root-accordion.is-open > .root-header {
    width: 100%;
    margin: 0;
    padding: 15px 25px;
    border-radius: 0;
    background-color: #c7d9e8;
    box-shadow: none;
}

.unit-selector-menu > .root-accordion.is-open > .root-header:hover {
    background-color: #bed2e2;
}

/* アコーディオンの背景色定義 */
.menu-accordion-inner {
    background-color: #c9c9c9; 
    padding: 25px 12px;
}

.mynote-accordion-inner {
    background-color: #d1d8e0;
}

/* お気に入り用 */
.favorite-accordion-inner {
    background-color: #fde68a; 
	padding:0px;
}

/* 解説クリップ用 */
.highlights-accordion-inner {
    background-color: #bbf7d0;
padding:0px;	
}

.js-accordion-item.level-2 {
    border-top: none;
    margin-bottom: 10px;
    padding: 0;
    background: transparent;
	border-radius:12px;
	box-shadow: 0 4px 0px rgba(0,0,0,0.08);
}

.js-accordion-item.level-2:last-child {
    margin-bottom: 0;
}

.js-accordion-item.level-2 > .js-accordion-header {
    background-color: #f0f6fb;
    border-radius: 12px;
    padding: 12px 20px;
    width: 100%;
    box-sizing: border-box;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    transition: all 0.2s ease;
}

.js-accordion-item.type-mynote > .js-accordion-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    background-color: #f4f7f9;
}

.js-accordion-item.level-2.type-mynote > .js-accordion-header::before {
    display: none !important;
    content: none !important;
    width: 0 !important;
    margin: 0 !important;
}

.mynote-header-left {
    display: flex;
    align-items: center;
    flex-grow: 1;
    min-width: 0;
}

.mynote-header-icon {
    width: 28px;
    height: 28px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    margin-right: 10px;
    flex-shrink: 0;
}

.js-accordion-item.type-mynote > .js-accordion-header .header-text {
    font-size: 1rem;
    font-weight: bold;
    color: #1b2e52;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mynote-count {
    font-size: 0.8rem;
    color: #8e9fab;
    margin-right: 10px;
    font-weight: bold;
    white-space: nowrap;
}

.js-accordion-item.level-2.is-open > .js-accordion-header {
    background-color: #dbe9f5;
    border-radius: 12px 12px 0 0;
    box-shadow: none;
}

.js-accordion-item.type-mynote.is-open > .js-accordion-header {
    background-color: #e5ebf0;
}

.js-accordion-item.level-2 > .js-accordion-header .header-text {
    font-size: 1rem;
    color: #111; 
    font-weight: bold;
}

.js-accordion-item.level-2 > .js-accordion-header::before {
    margin-right: 12px;
}
.js-accordion-item.level-2 > .js-accordion-content {
    background-color: #fff;
    border-radius: 0 0 12px 12px;
    overflow: hidden;
    margin-top: -1px; 
    position: relative;
    z-index: 1;
}

/* Level 3 */
.js-accordion-item.level-3 > .js-accordion-header {
    padding-left: 30px;
	padding-right:20px;
    background-color: #fff;
    border-top: 1px solid #f5f5f5;
}
.js-accordion-item.level-3 > .js-accordion-header .header-text {
    font-size: 1.1rem;
	font-weight: bold;
	color:#222;
}
.js-accordion-item.level-3 > .js-accordion-header {
    background-color: #fff;
    border-top: 1px solid #eee;
}
.js-accordion-item.level-3.is-open > .js-accordion-header {
    background-color: #b0c4d6;
    border-bottom: none;
	color:#111;
}

.js-accordion-item.level-3 > .js-accordion-content {
    background-color: #f2f4f8;
    border-top: 1px solid #eee;
    width: 100%;
    box-sizing: border-box;
}

/* 4階層目以降 */
.nested-accordion-wrapper {
    background-color: #eee;
    display: flex;
    flex-direction: column;
}

.js-accordion-item.nested-accordion {
    border-top: 1px solid #ddd;
    background-color: #eee;
    border-radius: 0;
    box-shadow: none;
    margin-bottom: 0;
}

.js-accordion-list + .nested-accordion-wrapper .js-accordion-item.nested-accordion:first-child,
.js-accordion-content > .nested-accordion-wrapper .js-accordion-item.nested-accordion:first-child {
    border-top: none;
}

.js-accordion-item.nested-accordion > .js-accordion-header {
    padding: 14px 20px 14px 30px;
    background-color: #f5f5f5;
}

.js-accordion-item.nested-accordion.level-5 > .js-accordion-header {
    padding-left: 30px;
	background-color: #e6e6e6;
}

.js-accordion-item.nested-accordion > .js-accordion-header .header-text {
    font-size: 1rem;
    font-weight: bold;
    color: #444;
}

.js-accordion-item.nested-accordion.is-open > .js-accordion-header {
    background-color: #93aabf;
}
.js-accordion-item.nested-accordion.level-5.is-open > .js-accordion-header {
    background-color: #7790a6;
}

.js-accordion-item.nested-accordion > .js-accordion-header .header-arrow {
    width: 16px;
    height: 16px;
}

/* リストアイテムのコンテナの余白設定 */
.js-accordion-item.level-3 .js-accordion-list,
.js-accordion-item.nested-accordion .js-accordion-list,
.js-accordion-item.type-mynote .js-accordion-list,
.js-accordion-item.type-favorite .js-accordion-list,
.js-accordion-item.type-highlights .js-accordion-list {
    padding: 15px 10px; 
	background-color:#c9c9c9;
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    box-sizing: border-box;
}

.js-accordion-item.type-mynote .js-accordion-list {
    padding-bottom:30px;
    background-color: #d1d8e0;
}

/* 個別背景色の上書き */
.js-accordion-item.type-favorite .js-accordion-list {
    background-color: #b7b4c2;
	padding-top:25px;
	padding-bottom:25px;
}
.js-accordion-item.type-highlights .js-accordion-list {
    background-color: #b4c2c1;
	padding-top:25px;
	padding-bottom:25px;
}

.js-accordion-item.nested-accordion.level-4 .js-accordion-list {
    padding-left: 10px;
    padding-right: 10px;
}
.js-accordion-item.nested-accordion.level-5 .js-accordion-list {
    padding-left: 10px;
    padding-right: 10px;
}

/* カード型リンク本体 */
.unit-menu-link-item a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    box-sizing: border-box;
    padding: 16px 20px;
    margin: 0;
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 3px 0px rgba(0, 0, 0, 0.08);
    border: none !important;
    background-image: none !important; 
    text-decoration: none !important;
    color: #222;
    font-size: 1rem;
    font-weight: bold;
    line-height: 1.4;
    position: relative;
    transition: all 0.2s ease;
}

/* マイ単語帳内のリンクパディング調整 */
.mynote-link-item a {
    padding: 10px 20px 10px 15px !important;
}

.unit-menu-link-item a::before {
    display: none;
}

.unit-menu-link-item a::after {
    content: '';
    display: block;
    width: 16px;
    height: 16px;
    background-image: url('../images/myPage_icon_arrow.svg');
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    flex-shrink: 0;
    margin-left: 15px;
    opacity: 1;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.unit-menu-link-item a:active {
    transform: scale(0.98);
    box-shadow: 0 2px 3px rgba(0, 0, 0, 0.05);
    background-color: #eef5ff;
}

.mynote-link-left {
    display: flex;
    align-items: center;
}

.mynote-link-icon {
    width: 36px;
    height: 36px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    margin-right: 15px;
	border-radius:5px;
}

.mynote-link-icon.type-card { background-image: url('../images/header-icon-color_card.svg'); }
.mynote-link-icon.type-quiz-p { background-image: url('../images/header-icon-color_quiz1st.svg'); }
.mynote-link-icon.type-quiz-s { background-image: url('../images/header-icon-color_quiz2nd.svg'); }
.mynote-link-icon.type-list { background-image: url('../images/header-icon-color_list.svg'); }
.mynote-link-icon.type-edit { background-image: url('../images/header-icon-color_setting.svg');}


/* ▼▼▼ 解説クリップのボタンスタイル ▼▼▼ */
.unit-menu-link-item.menu-highlight-item a {
    padding: 10px 20px 10px 12px !important;
}
.menu-highlight-left {
    display: flex;
    align-items: center;
    flex-grow: 1;
    min-width: 0;
}
.menu-highlight-thumb {
    width: 38px;
    height: 38px;
    border-radius: 6px;
    background-size: cover;
    background-position: center;
    margin-right: 12px;
    flex-shrink: 0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
	border:3px solid #222;
}
.menu-item-count {
    font-size: 0.8rem;
    color: #8e9fab;
    margin-right: 2px;
    font-weight: bold;
    white-space: nowrap;
    flex-shrink: 0;
}

/* ▼▼▼ お気に入りのボタンスタイル ▼▼▼ */
.unit-menu-link-item.menu-bookmark-item a {
    padding: 8px 20px !important;
}
.menu-bookmark-left {
    display: flex;
    align-items: center;
    flex-grow: 1;
    min-width: 0;
}
.menu-bookmark-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background-color: #f0f4f8;
    background-size: 24px;
    background-repeat: no-repeat;
    background-position: center;
    margin-right: 12px;
    flex-shrink: 0;
}
.menu-bookmark-icon.type-home { background-image: url('../images/menuIcon_home.svg'); }
.menu-bookmark-icon.type-card { background-image: url('../images/menuIcon_card.svg'); }
.menu-bookmark-icon.type-quiz { background-image: url('../images/menuIcon_quiz.svg'); }
.menu-bookmark-icon.type-quiz-s { background-image: url('../images/menuIcon_quiz-advanced.svg'); }
.menu-bookmark-icon.type-list { background-image: url('../images/menuIcon_list.svg'); }
.menu-bookmark-icon.type-details { background-image: url('../images/menuIcon_details.svg'); }
.menu-bookmark-icon.type-unknown { background-image: url('../images/menuIcon_dot.svg'); }

.menu-bookmark-text {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    min-width: 0;
}
.menu-bookmark-unit {
    font-size: 12px;
    color: #8e9fab;
    font-weight: bold;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.menu-bookmark-title {
    font-size: 16px;
    font-weight: bold;
    color: #222;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 1px;
}
.menu-bookmark-type {
    font-size: 12px;
    color: #888;
    font-weight: bold;
}


/* 空のメッセージ */
.empty-message {
    padding: 15px 20px;
    color: #888;
    font-size: 0.9rem;
    text-align: center;
    font-weight: bold;
}


.text-small {
    font-size: 0.75em;
    font-weight: 500;
    color: inherit;
    opacity: 0.8;
    margin-right: 2px;
}

/* ▼▼▼ データ管理パネルのスタイル ▼▼▼ */
.data-management-panel {
    padding: 20px 25px 30px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    background-color: #f9f9f9;
}

.data-panel-button {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 15px 10px;
    background-color: #fff;
    border: 2px solid #ddd;
    border-radius: 15px;
    cursor: pointer;
    box-shadow: 0 4px 0px #ddd;
    transition: all 0.2s ease;
    text-align: center;
    text-decoration: none;
    color: #333;
}

.data-panel-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.1);
}

.data-panel-button:active {
    transform: translateY(1px);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.data-panel-button .data-action-icon {
    width: 50px;
    height: 50px;
    margin-bottom: 2px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    display: inline-block;
    background-color: transparent;
    border-radius: 0px;
}

.data-panel-button.export .data-action-icon {
    background: url('../images/menuIcon_export.svg') no-repeat center;
	background-size:50px;
}
.data-panel-button.import .data-action-icon {
    background: url('../images/menuIcon_import.svg') no-repeat center;
	background-size:50px;
}

.data-panel-button .action-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.data-panel-button .action-text .main {
    font-size: 1rem;
    font-weight: bold;
    color: #222;
}

.data-panel-button .action-text .sub {
    font-size: 0.75rem;
    color: #888;
}

.data-panel-button.export:hover {
    border-color: #588ec4;
}
.data-panel-button.export:hover .action-text .main {
    color: #588ec4;
}

.data-panel-button.import:hover {
    border-color: #d977a3;
}
.data-panel-button.import:hover .action-text .main {
    color: #d977a3;
}

@media (max-width: 380px) {
    .data-management-panel {
        grid-template-columns: 1fr;
    }
    .data-panel-button {
        flex-direction: row;
        justify-content: flex-start;
        text-align: left;
        padding: 15px 20px;
    }
    .data-panel-button .data-action-icon {
        margin-bottom: 0;
        margin-right: 15px;
        width: 30px;
        height: 30px;
    }
}

.modal-header .modal-logo-link {
    display: inline-block;
    width: 200px;
    max-width: 70%;
    line-height: 1;
}

.modal-header .modal-logo-link img {
    width: 180px;
    height: auto;
    vertical-align: bottom;
}

#modal-content .modal-header h2 {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    font-size: 1rem;
}

/* ★★★ 学習メニューのスタイル調整 ★★★ */
.modal-study-menu-container.js-accordion-item {
    background-color: transparent; /* 透明にして隙間を白くする */
    margin: 20px;
    border-radius: 0;
    overflow: visible;
    width: auto;
}

.modal-study-menu-container .navigation-modal-item a {
    background-image: linear-gradient(to right, #edf1f5, #edf1f5);
    background-size: calc(100% - 50px) 1px;
    background-repeat: no-repeat;
    background-position: center bottom;
    padding: 15px 20px; 
}

/* ヘッダー部分（アコーディオンのボタン） */
.modal-study-menu-container .navigation-modal-item.menu-divider {
    margin-top: 0;
    background-image: none;
    background-color: #6f90b0;
    color: #ffffff;
    padding: 19px 25px;
	padding-right:20px;
    width: 100%;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    border: none;
    text-align: left;
    cursor: pointer;
    /* 角丸対応 */
    border-radius: 16px;
    transition: border-radius 0.2s ease, background-color 0.2s ease;
}

.modal-study-menu-container.js-accordion-item.is-open > .js-accordion-header {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

/* アコーディオンヘッダーテキストの上書き */
.modal-study-menu-container .navigation-modal-item.menu-divider .header-text {
    flex-grow: 1;
    font-size: 13px;
    font-weight: bold;
    color: #ffffff;
    margin-left: 0;
}

/* ★★★ 白丸（閉じた状態はグレー）のプラスアイコン ★★★ */
.modal-study-menu-container .navigation-modal-item.menu-divider .study-menu-arrow {
    width: 22px;
    height: 22px;
    background-color: #a0acba; /* 閉じた状態はグレー */
    border-radius: 50%;
    background-size: 14px 14px;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 1;
    transition: background-color 0.2s ease, transform 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* ★★★ 開いた状態（×アイコン）のときは白丸にする ★★★ */
.modal-study-menu-container.js-accordion-item.is-open .navigation-modal-item.menu-divider .study-menu-arrow {
    background-color: #ffffff;
}

/* ホバーとオープン時のスタイルをきれいに維持 */
.modal-study-menu-container.js-accordion-item > .js-accordion-header:hover {
    background-color: #6282a1;
}

.modal-study-menu-container.js-accordion-item.is-open > .js-accordion-header {
    background-color: #34495c;
}

.modal-study-menu-container.js-accordion-item.is-open > .js-accordion-header .header-text {
    color: #ffffff;
}

/* 通常の学習メニュー（詳細学習まで）の背景色 */
.modal-study-menu-container .navigation-modal-item:not(.menu-divider):not(.review-item):not(.chapter-list-item) a {
    background-color: #dae5f0;
}

/* カレントページの背景色 */
.modal-study-menu-container .navigation-modal-item.is-current a {
    background-color: #abc3e0 !important; /* 確実にカレント色を適用 */
    font-weight: bold;
    color: #000;
    position: relative; 
}
.modal-study-menu-container .navigation-modal-item.is-current a::after {
    content: '';
    position: absolute;
    bottom: 1px;
    right: 20px;
    width: 100px;
    height: 63px;
    background-image: url('../images/modalWindow_takoComment.svg');
    background-repeat: no-repeat;
    background-size: contain;
    background-position: right bottom;
    pointer-events: none; 
}

/* 詳細学習の下角丸 */
.modal-study-menu-container .navigation-modal-item.is-last-study-item a {
    border-bottom-left-radius: 16px;
    border-bottom-right-radius: 16px;
    background-image: none; /* 下線を消す */
}

/* 総復習ページ */
.modal-study-menu-container .navigation-modal-item.review-item {
    margin-top: 10px; /* 隙間 */
}
.modal-study-menu-container .navigation-modal-item.review-item a {
    background-color: #decade;
    border-radius: 16px;
    background-image: none;
    border-top: none; /* 既存のborder-topを消す */
}

/* 単元一覧 */
.modal-study-menu-container .navigation-modal-item.chapter-list-item {
    margin-top: 10px; /* 隙間 */
}
.modal-study-menu-container .navigation-modal-item.chapter-list-item a {
    background-color: #c9c9d1;
    border-radius: 16px;
    background-image: none;
}
/* 単元一覧の矢印アイコン変更 */
.modal-study-menu-container .navigation-modal-item.chapter-list-item a::after {
    background-image: url('../images/myPage_icon_arrow-back.svg') !important;
}

.modal-study-menu-container .navigation-modal-item:last-child a {
    background-image: none;
}

/* ★★★ 学習コンテンツフレーズ画像 ★★★ */
.study-content-phrase-item {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px 0px 20px;
    /* 直後の「学習単元を選ぶ」と一続きに見せるため、下の区切り線は表示しない */
    background-image: none;
}
.study-content-phrase-img {
    width: 150px;
    height: 28px;
    background-image: url('../images/headerMenu_phrase_learning.svg');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

/* ★★★ 設定フレーズ画像 ★★★ */
.setting-phrase-item {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px 0px;
    /* データ管理の上に区切り線を引くための設定 */
    background-image: linear-gradient(to right, #e0e0e0, #e0e0e0);
    background-size: calc(100% - 50px) 1px;
    background-repeat: no-repeat;
    background-position: center bottom;
}
.setting-phrase-img {
    width: 150px;
    height: 28px;
    background-image: url('../images/headerMenu_phrase_setting.svg');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.menu-footer-logo {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 40px;
    padding-bottom: 0px;
    width: 100%;
}

.menu-footer-logo a {
    display: block;
    line-height: 1;
    transition: opacity 0.3s;
}

.menu-footer-logo a:hover {
    opacity: 0.7;
}

.menu-footer-logo img {
    width: 180px;
    height: 55px;
    vertical-align: bottom;
}

.js-accordion-item.level-2 > .js-accordion-header {
    display: flex;
    align-items: center;
    padding: 15px 15px;
    background-color: #fff;
    border-bottom: 1px solid #f0f0f0;
}

.js-accordion-item.level-2 > .js-accordion-header .header-text {
    display: flex;
    align-items: baseline;
    gap: 4px;
    flex-grow: 1;
}

.u-main {
    font-size: 1.1em;
    font-weight: 900;
    color: #000;
}

.u-sub {
    font-size: 1rem;
    font-weight: normal;
    color: #333;
}

.js-accordion-item.level-2 > .js-accordion-header::before {
    content: '';
    display: block;
    width: 45px;
    height: 45px;
    border-radius: 10px;
    margin-right: 15px;
    flex-shrink: 0;
    background-repeat: no-repeat;
    background-position: center;
    background-size: 30px;
}

.js-accordion-item.type-subject > .js-accordion-header::before {
    background-image: url('../images/myPage_icon_subject.svg');
    background-color: #99b1c4;
}

.js-accordion-item.type-grade > .js-accordion-header::before {
    background-image: url('../images/myPage_icon_school.svg');
    background-color: #99c4b1;
}

.js-accordion-item.type-qualification > .js-accordion-header::before {
    background-image: url('../images/myPage_icon_qualification.svg');
    background-color: #ac99c4;
}

.js-accordion-item.type-culture > .js-accordion-header::before {
    background-image: url('../images/myPage_icon_liberalArts.svg');
    background-color: #c499b1;
}

.js-accordion-item.level-2.is-open > .js-accordion-header {
    background-color: #b9ccd9;
}

.modal-nav-icon.install-icon {
    background-image: url('../images/menuIconL_install-green.svg');
}

.install-guide-panel {
    padding: 20px 25px 30px;
    background-color: #f9f9f9;
}

#pwa-install-button-wrapper {
    margin-bottom: 25px;
    text-align: center;
    padding-bottom: 20px;
    border-bottom: 1px dashed #ccc;
}

.install-action-button {
    display: inline-block;
    width: 100%;
    max-width: 280px;
    padding: 12px;
    background-color: #007aff;
    color: #fff;
    font-weight: bold;
    font-size: 1rem;
    border-radius: 50px;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 122, 255, 0.3);
    transition: transform 0.2s, background-color 0.2s;
}

.install-action-button:hover {
    background-color: #0063d1;
    transform: translateY(-2px);
}

.install-note {
    font-size: 0.8rem;
    color: #888;
    margin-top: 10px;
}

.install-manual-guides {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.os-guide-item {
    background: #fff;
    padding: 15px;
    border: 2px solid #ddd;
    border-radius: 15px;
    box-shadow: 0 4px 0px #ddd;
}

.os-guide-title {
    font-size: 0.95rem;
    font-weight: bold;
    color: #333;
    margin-bottom: 10px;
    padding-bottom: 5px;
    border-bottom: 2px solid #eee;
}

.os-guide-steps {
    list-style: none;
    padding-left: 0;
    margin: 0;
    counter-reset: step;
}

.os-guide-steps li {
    font-size: 0.9rem;
    line-height: 1.6;
    color: #555;
    margin-bottom: 8px;
    position: relative;
    padding-left: 22px;
}

.os-guide-steps li::before {
    counter-increment: step;
    content: counter(step) ".";
    position: absolute;
    left: 0;
    top: 0;
    font-weight: bold;
    color:#275b8a;
}

.os-guide-steps strong {
    color: #222;
    background: linear-gradient(transparent 70%, #e6f0ff 70%);
}

.text-icon {
    display: inline-block;
    font-family: monospace;
    background: #eee;
    padding: 0 4px;
    border-radius: 4px;
    margin: 0 2px;
    font-weight: bold;
}

.icon-inline {
    display: inline-block;
    width: 18px;
    height: 18px;
    vertical-align: text-bottom;
    margin: 0 3px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.icon-inline.share {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23007aff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 12v8a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8'/%3E%3Cpolyline points='16 6 12 2 8 6'/%3E%3Cline x1='12' y1='2' x2='12' y2='15'/%3E%3C/svg%3E");
}

.icon-inline.add {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23007aff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='3' width='18' height='18' rx='2' ry='2'/%3E%3Cline x1='12' y1='8' x2='12' y2='16'/%3E%3Cline x1='8' y1='12' x2='16' y2='12'/%3E%3C/svg%3E");
}
.icon-inline.menu-dots {
    background-image: url('../images/menuIcon_menu-dots.svg');
	width: 20px;
    height: 20px;
}

.menu-description-box {
    padding: 0px 10px;
    margin-bottom: 15px;
	margin-top: 0px;
}

.menu-description-box.full-width {
    grid-column: 1 / -1;
}

.menu-desc-title {
    font-size: 0.95rem;
    font-weight: bold;
    color: #1b2e52;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
}

.menu-desc-title::before {
    content: '!';
    display: inline-block;
    width: 18px;
    height: 18px;
    background-color: #506387;
    color: #fff;
    border-radius: 50%;
    text-align: center;
    line-height: 18px;
    font-size: 12px;
    margin-right: 8px;
}

.menu-desc-text {
    font-size: 0.85rem;
    line-height: 1.6;
    color: #555;
    text-align: left;
}

.menu-desc-text strong {
    color: #333;
    background: linear-gradient(transparent 70%, #d6ebff 70%);
    font-weight: bold;
}

/* ▼▼▼ マイページバナーのスタイル ▼▼▼ */
.mypage-banner-item {
    padding: 5px 20px 0px; 
}

/* マイページラベルの追加 */
.mypage-label {
    font-size: 11px;
    color: #777;
    font-weight: bold;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.mypage-label .mypage-icon-small {
    display: inline-block;
    width: 16px;
    height: 16px;
    background-image: url('../images/menuPage_icon_graph.svg');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    opacity: 0.7;
}

.mypage-banner-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #53758f;
    padding: 10px 15px;
    border-radius: 16px;
    text-decoration: none;
    color: #ffffff;
    box-shadow: 0 4px 0px rgba(0,0,0,0.15);
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.mypage-banner-link:active {
    transform: translateY(4px);
    box-shadow: 0 0px 0px rgba(0,0,0,0.15);
}

.mypage-banner-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.mypage-banner-text {
    font-size: 1.15rem;
    font-weight: bold;
}

.mypage-banner-link .modal-nav-icon.mypage-icon {
    margin-right: 0;
    width: 55px;
    height: 55px;
    background-image: url('../images/menuIconL_mypage-w.svg'); /* 変更・フィルタ削除 */
}

.mypage-banner-link::after {
    content: '';
    display: block;
    width: 24px;
    height: 24px;
    background-image: url('../images/myPage_icon_arrow-w.svg');
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    flex-shrink: 0;
}

.modal-study-menu-container .navigation-modal-item a > span:last-of-type {
    flex-grow: 1;
}

.modal-study-menu-container .navigation-modal-item:not(.is-current) a::after {
    content: '';
    display: block;
    width: 25px;
    height: 25px;
    background-image: url('../images/myPage_icon_arrow-w.svg');
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    flex-shrink: 0;
    margin-left: 15px;
    transition: transform 0.2s ease;
}

/* 区切り線の追加 */
.navigation-modal-item.save-target-item {
    padding: 15px 20px 15px;
    border-bottom: none;
    background-image: linear-gradient(to right, #e0e0e0, #e0e0e0);
    background-size: calc(100% - 50px) 1px;
    background-repeat: no-repeat;
    background-position: center bottom;
}

.save-target-label {
    font-size: 11px;
    color: #777;
    font-weight: bold;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.save-target-label .pin-icon {
    display: inline-block;
    width: 16px;
    height: 16px;
    background-image: url('../images/icon_qrip.svg');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    opacity: 0.7;
}

/* ▼▼▼ 保存先バナーのスタイル ▼▼▼ */
.current-save-target-banner {
    background-color: #b9ccd9;
    border: none;
    border-radius: 15px;
    box-shadow: 0 3px 0px rgba(0,0,0,0.05);
    padding: 0;
    overflow: hidden;
    transition: background-color 0.2s ease;
}

.current-save-target-banner.is-open {
    background-color: #849cb0;
}

.banner-body {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 15px 8px 10px;
    cursor: pointer;
}

.banner-accordion-content {
    background-color: #b9ccd9;
    padding: 24px 12px;
    margin: 0 10px 10px;
    border-radius: 12px;
    box-shadow: inset 0 4px 0px rgba(0,0,0,0.15);
}

.banner-mynote-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.banner-notebook-info {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-grow: 1;
    min-width: 0;
}

.banner-notebook-icon {
    width: 46px;
    height: 46px;
    background-color: #ffffff;
    border-radius: 30px;
    background-size: 30px 30px;
    background-position: center;
    background-repeat: no-repeat;
    flex-shrink: 0;
}

.banner-notebook-name {
    font-size: 18px;
    font-weight: bold;
    color: #111;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.banner-change-btn {
    background-color: #fff;
    border:none;
    color: #555;
    padding: 6px 15px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 3px 0px rgba(0,0,0,0.1);
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.banner-change-btn:active {
    transform: translateY(2px);
    box-shadow: 0 0px 0px rgba(0,0,0,0.1);
}

.header-folder-overlay {
    position: fixed; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%;
    background: rgba(0,0,0,0.5); 
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    z-index: 10000;
    display: flex; 
    justify-content: center;
    align-items: flex-end;
    opacity: 0; 
    pointer-events: none; 
    transition: opacity 0.3s;
}

.header-folder-overlay.show { 
    opacity: 1; 
    pointer-events: auto; 
}

.header-folder-sheet {
    width: 100%; 
    max-width: 500px;
    background: #fff; 
    border-radius: 20px 20px 0 0;
    padding: 20px; 
	padding-top:12px;
    padding-bottom: calc(20px + env(safe-area-inset-bottom));
    transform: translateY(100%); 
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    max-height: 80vh; 
    overflow-y: hidden;
    display: flex;
    flex-direction: column;
    position: relative;
}

.header-folder-overlay.show .header-folder-sheet { 
    transform: translateY(0); 
}

.sheet-drag-handle {
    width: 30px;
    height: 2px;
    background-color: #aaa;
    border-radius: 1px;
    margin: 0 auto 18px;
    cursor: pointer;
}

.sheet-close-absolute {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 32px;
    height: 32px;
    background: #f0f0f0; 
    border: none;
    border-radius: 50%;
    font-size: 20px;
    color: #666;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    z-index: 10;
    transition: background-color 0.2s, color 0.2s;
    line-height: 1;
    padding-bottom: 2px;
}
.sheet-close-absolute:hover {
    background: #e0e0e0;
    color: #333;
}

.sheet-view-list,
.sheet-view-create {
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%;
}

.sheet-header {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 15px;
    border-bottom: 1px solid #eee;
    padding-bottom: 15px;
    position: relative;
    flex-shrink: 0;
}

.sheet-title {
    font-size: 16px;
    font-weight: bold;
    color: #333;
    margin: 0;
    text-align: center;
}

.sheet-back-btn {
    position: absolute;
    left: 0;
    background: none;
    border: none;
    font-size: 14px;
    color: #53758f;
    font-weight: bold;
    padding: 5px 10px;
    cursor: pointer;
}

.sheet-body {
    flex-grow: 1;
    overflow-y: auto;
    padding-bottom: 10px;
}

.folder-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.folder-item {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 12px 15px;
    background: #f8f9fa;
    border-radius: 12px;
    cursor: pointer;
    transition: background 0.2s;
    width: 100%;
    box-sizing: border-box;
}

.folder-item:active {
    background: #e9ecef;
}

.folder-item.selected {
    background: #b9ccd9;
    border: none;
}

.folder-icon {
    width: 28px;
    height: 28px;
    margin-right: 10px;
    background-color: transparent !important;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    flex-shrink: 0;
    opacity: 0.8;
}

.folder-name {
    font-size: 14px;
    font-weight: bold;
    color: #333;
    flex-grow: 1;
    text-align: left;
}

.folder-check {
    width: 20px;
    height: 20px;
    background-image: url('../images/detailsPage_checkmark-bk.svg');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    display: none;
    margin-left: 10px;
    flex-shrink: 0;
}
.folder-item.selected .folder-check {
    display: block;
}

.create-new-folder-btn {
    display: flex; 
    align-items: center; 
    justify-content: center;
    padding: 15px; 
    margin-top: 20px; 
    color: #687e8f; 
    font-weight: bold;
    font-size: 15px;
    border: 2px dashed #b9ccd9; 
    border-radius: 12px; 
    cursor: pointer;
    transition: background-color 0.2s;
}
.create-new-folder-btn:active {
    background-color: #e6f0ff;
}
.create-new-folder-btn .plus-icon {
    font-size: 18px;
    margin-right: 5px;
    font-weight: normal;
}

.create-form {
    padding: 10px 0;
}

.create-form input[type="text"] {
    width: 100%;
    padding: 15px;
    font-size: 16px;
    border: 2px solid #ddd;
    border-radius: 12px;
    box-sizing: border-box;
    margin-bottom: 20px;
    font-family: inherit;
}
.create-form input[type="text"]:focus {
    border-color: #588ec4;
    outline: none;
}

.create-actions {
    display: flex;
    justify-content: flex-end;
}

.create-submit-btn {
    background-color: #53758f;
    color: #fff;
    border: none;
    padding: 12px 20px;
    border-radius: 25px;
    font-weight: bold;
    font-size: 14px;
    cursor: pointer;
    box-shadow: 0 3px 0px #375770;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.create-submit-btn:active {
    transform: translateY(3px);
    box-shadow: 0 0px 0px #3a628a;
}

/* ▼▼▼ マイ単語帳の「新しい単語帳を作成」ボタンスタイル ▼▼▼ */
.mynote-create-btn-wrapper {
    padding: 0;
    margin-top: 20px;
}

.mynote-create-btn-wrapper .create-new-folder-btn {
    margin-top: 0;
    width: 100%;
    height: 52px;
    box-sizing: border-box;
    background-color: #e5ebf0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    border: 2px dashed #a0b2c1;
    color: #53758f;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.mynote-create-btn-wrapper .create-new-folder-btn:active {
    background-color: #d6e0e9;
}


/* ▼▼▼ 音声・効果音設定パネル（メニュー内）のスタイル ▼▼▼ */
.modal-nav-icon.sound-icon {
    background-image: url('../images/menuIconL_sound.svg');
}

.menu-sound-setting-panel {
    padding: 15px 25px 25px;
    background-color: #f9f9f9;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.menu-mode-controls {
    display: flex;
    justify-content: center;
    background-color: #fff;
    padding: 6px 20px;
    border-radius: 20px;
    border: 2px solid #ddd;
    margin-top: 0px;
	width:100%;
}

.menu-toggle-switch-wrapper {
    display: flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
}

.menu-toggle-option {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 2px;
    padding: 5px 10px;
    color: #888;
    font-weight: bold;
    font-size: 11px;
    transition: color 0.3s ease;
    width: 90px;
}

.menu-toggle-option .menu-icon {
    width: 32px;
    height: 32px;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0.6;
    transition: opacity 0.3s ease;
}

.menu-toggle-option.active {
    color: #000;
}

.menu-toggle-option.active .menu-icon {
    opacity: 1;
}

.menu-toggle-option.toggle-sound-off .menu-icon { background-image: url('../images/iconToggle-cardPage_soundOFF_gray.svg'); }
.menu-toggle-option.toggle-sound-on .menu-icon { background-image: url('../images/iconToggle-cardPage_soundON_gray.svg'); }
.menu-toggle-option.active.toggle-sound-off .menu-icon { background-image: url('../images/iconToggle-cardPage_soundOFF.svg'); }
.menu-toggle-option.active.toggle-sound-on .menu-icon { background-image: url('../images/iconToggle-cardPage_soundON-green.svg'); }

.menu-toggle-switch {
    position: relative;
    width: 60px;
    height: 32px;
    background-color: #333;
    border-radius: 16px;
    flex-shrink: 0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.4) inset;
    transition: background-color 0.3s ease;
}

.menu-toggle-slider {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 26px;
    height: 26px;
    background-color: #fff;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0,0,0,0.4);
    transition: transform 0.3s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.menu-toggle-switch-wrapper[data-state="sound-off"] .menu-toggle-switch { background-color: #ccc; }
.menu-toggle-switch-wrapper[data-state="sound-off"] .menu-toggle-slider { transform: translateX(0); }

.menu-toggle-switch-wrapper[data-state="sound-on"] .menu-toggle-switch { background-color: #16a8a3; }
.menu-toggle-switch-wrapper[data-state="sound-on"] .menu-toggle-slider { transform: translateX(28px); }

/* ▼▼▼ 追加：ヘッダーナビゲーションの達成チェックマーク ▼▼▼ */
.nav-icon-check {
    position: absolute;
    top: -2px;
    right: calc(50% - 22px); 
    width: 16px;
    height: 16px;
    background-image: url('../images/header-iconMini_check.svg');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    background-color: #ba8d11;
    border-radius: 50%;
    opacity: 0;
    transform: scale(0);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 2;
    pointer-events: none;
}

.nav-icon.is-achieved .nav-icon-check {
    opacity: 1;
    transform: scale(1);
}

/* ▼▼▼ 追加：ヘッダー用スナックバー（お気に入り登録通知など） ▼▼▼ */
.header-snackbar {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background-color: rgba(30, 30, 30, 0.95);
    color: #fff;
    padding: 10px 20px;
    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: center;
    gap: 12px;
    min-width: 250px;
    max-width: 90%;
}

.header-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;
}

.header-snackbar.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.header-snackbar::before {
    content: '';
    display: block;
    width: 22px;
    height: 22px;
    background-image: url('../images/menuIconL_favorite-w.svg');
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
}

.header-snackbar-text {
    font-size: 14px;
    font-weight: bold;
    flex-grow: 1;
}

/* --- END OF FILE css/header-common.css --- */
