/* style.css */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Noto Sans JP', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: #1e3a8a;
    background-image: url("data:image/svg+xml,%3Csvg width='120' height='120' viewBox='0 0 120 120' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%232563eb' fill-opacity='0.15' stroke='%231e3a8a' stroke-width='4'%3E%3Cpath d='M5,5 l50,2 l-5,60 l-45,-5 Z' /%3E%3Cpath d='M60,5 l55,-2 l-5,40 l-50,5 Z' /%3E%3Cpath d='M65,50 l50,-5 l-2,70 l-55,2 Z' /%3E%3Cpath d='M5,65 l45,5 l2,45 l-50,-2 Z' /%3E%3C/g%3E%3C/svg%3E");
    color: #111;
    touch-action: manipulation;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.screen {
    display: none;
    height: 100vh;
    width: 100vw;
    overflow-x: hidden;
}

.active-screen {
    display: block;
}

.hidden {
    display: none !important;
}


/* 共通パーツ */

.comic-panel {
    background: #fff;
    border: 4px solid #111;
    border-radius: 8px;
    box-shadow: 8px 8px 0px #111;
}

.comic-border {
    border: 3px solid #111;
    border-radius: 6px;
    box-shadow: 4px 4px 0px #111;
}

.comic-button {
    border: 3px solid #111;
    border-radius: 6px;
    box-shadow: 4px 4px 0 #111;
    font-weight: 900;
    color: #111;
    cursor: pointer;
    transition: all 0.1s;
}

.comic-button:active {
    transform: translate(2px, 2px);
    box-shadow: 2px 2px 0 #111;
}

.text-center {
    text-align: center;
}


/* -------------------------------------
 * エントランス画面
 * ------------------------------------- */

.entrance-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100%;
    max-width: 500px;
    margin: 0 auto;
    padding: 25px 20px;
}


/* コマ割り風 タイトルレイアウト (改) */

.title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    margin-bottom: 25px;
    padding-top: 10px;
}


/* 左側：アクションボタンコンテナ */

.title-actions-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 155px;
    /* テキストが収まるように微調整 */
    flex-shrink: 0;
}


/* ★ アメコミ枠と影を再現するマジックフィルター */

.trap-wrap {
    position: relative;
    width: 100%;
    cursor: pointer;
    transition: transform 0.1s, filter 0.1s;
    filter: drop-shadow(2px 0 0 #111) drop-shadow(-2px 0 0 #111) drop-shadow(0 2px 0 #111) drop-shadow(0 -2px 0 #111) drop-shadow(4px 4px 0 #111);
}

.trap-wrap:active {
    transform: translate(3px, 3px);
    filter: drop-shadow(2px 0 0 #111) drop-shadow(-2px 0 0 #111) drop-shadow(0 2px 0 #111) drop-shadow(0 -2px 0 #111) drop-shadow(1px 1px 0 #111);
}


/* ボタン本体の基本形 */

.trap-btn {
    width: 100%;
    height: 52px;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 15px;
}


/* 上コマ：左が高く右が低い斜めカット */

.top-trap {
    clip-path: polygon(0 0, 100% 15%, 100% 85%, 0 100%);
}


/* 下コマ：左が低く右が高い斜めカット */

.bottom-trap {
    clip-path: polygon(0 15%, 100% 0%, 100% 100%, 0 85%);
}


/* 丸枠をなくした生のアイコン */

.raw-icon {
    width: 24px;
    height: 24px;
    object-fit: contain;
}


/* ログイン後のユーザーアイコンだけは綺麗に丸くする */

.raw-icon.user-avatar {
    border-radius: 50%;
    object-fit: cover;
}

.trap-text {
    font-size: 14px;
    font-weight: 900;
    color: #111;
    letter-spacing: 1px;
}


/* インストール済みのSWAF無限スクロールアニメーション */

.swaf-bg {
    background-image: url('swaf.jpg');
    background-size: auto 100%;
    background-position: left center;
    background-repeat: repeat-x;
    animation: scrollSwaf 3s linear infinite;
    padding: 0;
}

@keyframes scrollSwaf {
    0% {
        background-position-x: 0;
    }
    100% {
        background-position-x: -250px;
    }
}


/* 右側：タイトルテキスト (Bangersで右寄せ) ★ここで横幅を拡大！ */

h1.main-title {
    font-family: 'Bangers', cursive;
    font-size: 42px;
    line-height: 1.1;
    letter-spacing: 8px;
    color: #fde047;
    text-shadow: 4px 4px 0 #111;
    -webkit-text-stroke: 1.5px #111;
    margin: 0;
    text-align: right;
    flex: 1;
    /* ★ scaleXで文字の横幅だけを約1.3倍に引き延ばす */
    transform: rotate(-2deg) scaleX(1.9);
    /* 文字の右端が切れないように、起点を少し調整 */
    transform-origin: right center;
}


/* 設定カード & ストップウォッチトグル */

.settings-card {
    padding: 20px;
    width: 100%;
    margin-bottom: 20px;
}

.card-header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.settings-card label {
    display: block;
    font-weight: 900;
    margin-bottom: 12px;
    font-size: 15px;
    color: #111;
}


/* --- 新しいストップウォッチ丸型ボタン --- */

.hidden-stopwatch-cb {
    display: none;
    /* チェックボックス本体は隠す */
}

.stopwatch-circle-btn {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: #cbd5e1;
    border: 2px solid #111;
    box-shadow: 2px 2px 0 #111;
    cursor: pointer;
    transition: all 0.2s;
    user-select: none;
    /* 追加: 要素からはみ出さないように */
    overflow: hidden;
}


/* Lottieプレイヤー自体のスタイル微調整 */

dotlottie-player {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    /* 中央揃えの定番テクニック */
    pointer-events: none;
    pointer-events: none;
    /* Lottie自体がクリックを邪魔しないようにする */
}


/* クリックした時の沈み込みアニメーション */

.stopwatch-circle-btn:active {
    transform: translate(2px, 2px);
    box-shadow: 0 0 0 #111;
}


/* ON（チェックされた）時の色（グリーン） */

.hidden-stopwatch-cb:checked+.stopwatch-circle-btn {
    background-color: #4ade80;
}

.slider.round:before {
    border-radius: 50%;
}

.range-inputs {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    width: 100%;
}

.range-inputs input {
    flex: 1;
    min-width: 0;
    padding: 10px;
    font-size: 18px;
    font-family: 'Bangers', cursive;
    letter-spacing: 2px;
    border: 3px solid #111;
    border-radius: 6px;
    text-align: center;
    outline: none;
    background: #f8fafc;
    color: #111;
    transition: all 0.2s;
    box-shadow: inset 3px 3px 0 rgba(0, 0, 0, 0.05);
}

.range-inputs input:focus {
    background: #fff;
    border-color: #3b82f6;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
}

.footer-links {
    display: flex;
    align-items: center;
    gap: 8px;
}

.link-divider {
    font-size: 14px;
    color: #111;
    font-weight: 900;
}

.sheet-link,
.sheet-link-btn {
    font-size: 12px;
    color: #3b82f6;
    text-decoration: none;
    font-weight: 900;
    cursor: pointer;
    transition: color 0.2s;
    background: none;
    border: none;
    padding: 0;
}

.sheet-link:hover,
.sheet-link-btn:hover {
    color: #ef4444;
}

.total-words {
    font-size: 12px;
    color: #111;
    font-weight: 900;
}


/* モード選択タブ */

.mode-selection {
    width: 100%;
    margin-bottom: 25px;
}

.mode-tabs {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 15px;
}

.sticky-note {
    background: #fef08a;
    border: 3px solid #111;
    box-shadow: 4px 4px 0 #111;
    border-bottom-right-radius: 12px 4px;
    padding: 12px 8px;
    font-size: 14px;
    font-weight: 900;
    color: #111;
    cursor: pointer;
    transform: rotate(-1deg);
    transition: all 0.1s ease-in-out;
}

.sticky-note:active {
    transform: translate(2px, 2px) rotate(-1deg);
    box-shadow: 2px 2px 0 #111;
}

.sticky-note.active {
    background: #fde047;
    transform: scale(1.05) rotate(1deg);
    box-shadow: 6px 6px 0 #111;
    z-index: 10;
}

.settings-panel-container {
    display: grid;
    width: 100%;
}

.setting-panel {
    grid-area: 1 / 1;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, visibility 0.2s;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.setting-panel.active {
    opacity: 1;
    visibility: visible;
    z-index: 2;
}

.panel-desc {
    font-size: 13px;
    color: #111;
    line-height: 1.5;
    font-weight: 700;
    background: #e0f2fe;
    padding: 12px;
    border: 3px solid #111;
    border-radius: 6px;
    text-align: center;
    box-shadow: 4px 4px 0 #111;
}

.setting-panel.ej-mode-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.sub-mode-btn {
    padding: 8px 4px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    line-height: 1.2;
    text-align: center;
    background: #fff;
    border: 3px solid #111;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 900;
    color: #111;
    cursor: pointer;
    box-shadow: 4px 4px 0 #111;
    transition: all 0.1s;
}

.sub-mode-btn small {
    font-size: 10px;
    margin-top: 4px;
}

.sub-mode-btn:active {
    transform: translate(2px, 2px);
    box-shadow: 2px 2px 0 #111;
}

.sub-mode-btn.active {
    background: #3b82f6;
    color: #fff;
    transform: translate(2px, 2px);
    box-shadow: 2px 2px 0 #111;
}

.choice-settings-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.setting-group label {
    display: block;
    font-size: 13px;
    font-weight: 900;
    color: #111;
    margin-bottom: 6px;
    text-shadow: 1px 1px 0 #fff;
}

.custom-select {
    width: 100%;
    padding: 10px;
    background-color: #fff;
    font-size: 13px;
    font-weight: 900;
    color: #111;
    outline: none;
    cursor: pointer;
}


/* アメコミ風 レッドスタートボタン */

.comic-button-red {
    width: 100%;
    padding: 15px;
    border: 4px solid #111;
    border-radius: 8px;
    font-size: 24px;
    font-weight: 900;
    cursor: pointer;
    background: #ef4444;
    color: #fff;
    font-family: 'Bangers', cursive;
    letter-spacing: 2px;
    box-shadow: 6px 6px 0 #111;
    transition: transform 0.1s, box-shadow 0.1s;
}

.comic-button-red:active {
    transform: translate(4px, 4px);
    box-shadow: 2px 2px 0 #111;
}


/* -------------------------------------
 * モーダル（ポップアップ）全般
 * ------------------------------------- */

.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-overlay.active {
    display: flex;
}

.modal-content {
    width: 100%;
    max-width: 440px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    padding: 20px;
    position: relative;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    border-bottom: 3px solid #111;
    padding-bottom: 10px;
}

.modal-header h3 {
    font-family: 'Bangers', cursive;
    font-size: 24px;
    letter-spacing: 2px;
    color: #111;
}

.modal-close-btn {
    position: absolute;
    top: 10px;
    right: 15px;
    background: none;
    border: none;
    font-size: 32px;
    font-weight: 900;
    color: #ef4444;
    cursor: pointer;
    text-shadow: 2px 2px 0 #111;
}


/* 初回ログインポップアップ専用 */

.prompt-title {
    font-family: 'Bangers', cursive;
    font-size: 36px;
    color: #3b82f6;
    text-shadow: 3px 3px 0 #111;
    -webkit-text-stroke: 1px #111;
    margin: 15px 0;
}

.prompt-desc {
    font-size: 14px;
    font-weight: 900;
    margin-bottom: 25px;
    line-height: 1.6;
}

.google-login-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 10px;
}

.google-icon-large {
    width: 26px;
    height: 26px;
    background: #fff;
    border-radius: 50%;
    padding: 3px;
}


/* プロフィール設定 */

.settings-title {
    margin: 15px 0 10px;
    font-family: 'Bangers', cursive;
    font-size: 20px;
    letter-spacing: 1px;
}

.setting-toggles {
    margin-top: 5px;
}

.toggle-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8fafc;
    padding: 10px;
    border: 2px solid #111;
    border-radius: 8px;
    margin-bottom: 8px;
    font-weight: 900;
    font-size: 13px;
}

.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    width: 100%;
    margin-bottom: 10px;
}

.stat-box {
    background: #fef08a;
    border: 3px solid #111;
    border-radius: 8px;
    padding: 10px;
    text-align: center;
    box-shadow: 3px 3px 0 #111;
}

.stat-label {
    display: block;
    font-size: 11px;
    font-weight: 900;
    margin-bottom: 5px;
}

.stat-value {
    font-family: 'Bangers', cursive;
    font-size: 24px;
    color: #ef4444;
}


/* ログ・苦手単語リスト */

.log-list {
    list-style: none;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-right: 4px;
    max-height: 40vh;
    margin-top: 5px;
}

.log-item {
    font-size: 13px;
    line-height: 1.5;
    padding: 12px;
    background: #e0f2fe;
    border: 3px solid #111;
    border-radius: 6px;
    box-shadow: 3px 3px 0 #111;
    font-weight: 700;
}

.log-date {
    font-size: 11px;
    color: #1e3a8a;
    font-weight: 900;
    margin-bottom: 4px;
    font-family: 'Bangers', cursive;
    letter-spacing: 1px;
}

.log-text {
    color: #111;
}

.weak-list {
    max-height: 25vh;
}

.weak-word-item {
    background: #fee2e2;
    border-color: #ef4444;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.weak-header {
    display: flex;
    justify-content: space-between;
    font-weight: 900;
    font-size: 16px;
    border-bottom: 1px dashed #ef4444;
    padding-bottom: 4px;
}

.weak-ja {
    font-size: 12px;
    color: #475569;
}

.weak-errors {
    font-size: 12px;
    color: #b91c1c;
    font-family: monospace;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    margin-top: 15px;
}

.admin-stealth-btn {
    background: none;
    border: none;
    font-size: 12px;
    font-weight: 900;
    color: #94a3b8;
    cursor: pointer;
}


/* -------------------------------------
 * アプリ（ゲーム）画面
 * ------------------------------------- */

.app-container {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 40px);
    max-width: 500px;
    margin: 20px auto;
    background: #fff;
    position: relative;
}

.comic-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    background-color: #111;
    color: white;
    font-family: 'Bangers', cursive;
    font-size: 20px;
    letter-spacing: 2px;
    border-bottom: 4px solid #111;
}

.stopwatch-display {
    font-family: 'Bangers', cursive;
    font-size: 26px;
    color: #fde047;
    letter-spacing: 3px;
}

.timer-container {
    width: 100%;
    height: 10px;
    background: #111;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 50;
    display: none;
}

.timer-bar {
    height: 100%;
    width: 100%;
    background: #ef4444;
}

.question-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 15px;
    position: relative;
}

.word-id {
    font-family: 'Bangers', cursive;
    font-size: 20px;
    color: #3b82f6;
    margin-bottom: 5px;
    text-shadow: 1px 1px 0 #111;
}

.ja-word {
    font-size: 32px;
    margin-bottom: 20px;
    text-align: center;
    font-weight: 900;
    color: #111;
    text-shadow: 2px 2px 0 #fde047;
    line-height: 1.2;
}

.comic-burst {
    display: none;
    background: #ef4444;
    color: white;
    padding: 8px 16px;
    border: 3px solid #111;
    border-radius: 50%;
    font-size: 13px;
    font-weight: 900;
    margin-bottom: 20px;
    box-shadow: 4px 4px 0 #111;
    animation: burstPulse 0.5s alternate infinite;
    transform: rotate(-5deg);
}

@keyframes burstPulse {
    0% {
        transform: scale(1) rotate(-5deg);
    }
    100% {
        transform: scale(1.1) rotate(5deg);
    }
}

.input-container {
    position: relative;
    width: 100%;
    max-width: 320px;
    height: 50px;
    border-bottom: 4px solid #111;
    margin-bottom: 10px;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    padding-bottom: 5px;
}

.en-input {
    color: #111;
    font-weight: 900;
    font-size: 36px;
    font-family: monospace;
    letter-spacing: 3px;
}


/* リコールモード */

.recall-container {
    width: 100%;
    max-width: 350px;
    margin-bottom: 15px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.recall-answer-box {
    width: 100%;
    padding: 25px 20px;
    background: #fef08a;
    text-align: center;
    cursor: pointer;
    font-size: 22px;
    font-weight: 900;
    color: #111;
    transition: all 0.1s;
}

.recall-answer-box.revealed {
    background: #fff;
    cursor: default;
    transform: scale(1.05);
}

.recall-blur-text {
    font-family: 'Bangers', cursive;
    font-size: 24px;
    letter-spacing: 2px;
    color: #ef4444;
    text-shadow: 2px 2px 0 #111;
    -webkit-text-stroke: 1px #111;
}

.recall-eval-box {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.eval-btn {
    padding: 12px 4px;
    font-size: 14px;
}

.eval-btn small {
    display: block;
    font-size: 10px;
    margin-top: 4px;
    font-weight: 900;
}

.eval-btn.bad {
    background-color: #ef4444;
    color: #fff;
}

.eval-btn.soso {
    background-color: #fde047;
}

.eval-btn.good {
    background-color: #4ade80;
}


/* 4択ボタン */

.choice-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    width: 100%;
    max-width: 350px;
    margin-top: 10px;
}

.choice-btn {
    background: #fff;
    border: 3px solid #111;
    border-radius: 8px;
    padding: 15px;
    font-size: 16px;
    font-weight: 900;
    color: #111;
    cursor: pointer;
    box-shadow: 4px 4px 0 #111;
    transition: all 0.1s;
    text-align: center;
}

.choice-btn:active {
    transform: translate(2px, 2px);
    box-shadow: 1px 1px 0 #111;
}

.choice-btn.correct-highlight {
    background: #4ade80;
}

.choice-btn.wrong-highlight {
    background: #ef4444;
    color: #fff;
}


/* ヒント・メッセージ */

.hint-display {
    width: 100%;
    min-height: 30px;
    color: #3b82f6;
    font-size: 22px;
    text-align: center;
    font-family: monospace;
    letter-spacing: 2px;
    margin-bottom: 10px;
    font-weight: 900;
}

.message-area {
    min-height: 35px;
    font-weight: 900;
    margin-bottom: 10px;
    font-size: 28px;
    text-align: center;
    font-family: 'Noto Sans JP', -apple-system, BlinkMacSystemFont, sans-serif;
    letter-spacing: 2px;
}

.hint-btn {
    padding: 12px 20px;
    margin-top: 5px;
    font-size: 13px;
}

.hint-btn:disabled {
    opacity: 0.5;
    box-shadow: none;
    transform: none;
    cursor: not-allowed;
}


/* キーボード */

.keyboard {
    background-color: #3b82f6;
    padding: 10px 4px 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    border-top: 4px solid #111;
    width: 100%;
}

.keyboard-row {
    display: flex;
    justify-content: center;
    gap: 4px;
}

.key {
    background-color: #fff;
    border: 3px solid #111;
    border-radius: 6px;
    height: 50px;
    flex: 1;
    min-width: 28px;
    max-width: 42px;
    font-size: 22px;
    font-family: 'Noto Sans JP', sans-serif;
    color: #111;
    box-shadow: 0 4px 0 #111;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-weight: 900;
}

.key:active {
    transform: translateY(4px);
    box-shadow: 0 0 0 #111;
    background-color: #e2e8f0;
}

.key.delete {
    max-width: 65px;
    background-color: #ef4444;
    padding: 5px;
}

.del-icon {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

@media (max-width: 380px) {
    .key {
        min-width: 25px;
        font-size: 20px;
        height: 48px;
        border-width: 2px;
        box-shadow: 0 3px 0 #111;
    }
    .keyboard-row {
        gap: 3px;
    }
}


/* スマホ（画面幅400px以下）向けの調整 */

@media (max-width: 400px) {
    h1.main-title {
        /* 文字サイズを少し小さく */
        font-size: 34px;
        /* 文字間隔を狭める */
        letter-spacing: 4px;
        /* 横幅の引き延ばしを少し抑える */
        transform: rotate(-2deg) scaleX(1.5);
    }
    /* 左側のボタンコンテナも少し幅を詰める */
    .title-actions-container {
        width: 140px;
    }
}


/* --- 単語帳 (Deck) 選択UI --- */


/* --- 単語帳 (Deck) 選択UI --- */


/* --- 単語帳 (Deck) 選択UI --- */


/* --- 単語帳 (Deck) 選択UI --- */

.deck-selector {
    display: flex;
    align-items: center;
    background: #f8fafc;
    padding: 4px 12px;
    /* ★ 上下の余白を減らして少し薄く調整 */
    border-radius: 20px;
    /* ★ 角を丸くして横長小判型に */
    cursor: pointer;
    transition: background 0.2s;
    min-width: 0;
    border-width: 3px;
    margin-left: 15px;
    /* ★ 左側に少し隙間をあけて、幅をちょっと短くする */
}

.deck-selector:active {
    background: #e2e8f0;
    transform: translateY(2px);
    box-shadow: 2px 2px 0 #111;
}


/* タイトルが長い場合に隠すためのコンテナ */

.deck-title-scroll {
    flex: 1;
    overflow: hidden;
    white-space: nowrap;
}

#current-deck-title {
    display: block;
    /* ★ 幅をいっぱいに使うために block に変更 */
    font-size: 11px;
    font-weight: 900;
    color: #111;
    /* ★ 黒色に固定 */
    padding-left: 0;
    /* ★ アニメーション用の魔法の余白を削除 */
    animation: none;
    /* ★ 無限スクロールを解除 */
    text-overflow: ellipsis;
    /* ★ 見切れる場合は「...」にする */
    overflow: hidden;
    width: 100%;
}

.deck-dropdown-icon {
    font-size: 10px;
    margin-left: 6px;
    color: #111;
    flex-shrink: 0;
}


/* ★ 以前追加した @keyframes marquee { ... } のブロックは丸ごと削除してください ★ */


/* モーダル内の単語帳リスト */

.deck-list-container {
    max-height: 40vh;
    overflow-y: auto;
}

.deck-item {
    display: flex;
    align-items: center;
    cursor: pointer;
    border-left-color: #94a3b8;
}

.deck-item:hover {
    background: #f1f5f9;
}

.deck-item.active-deck {
    background: #fef08a;
    border-left-color: #eab308;
    border: 3px solid #111;
}

.deck-item-cover {
    width: 24px;
    height: 34px;
    object-fit: cover;
    border: 1px solid #111;
    margin-right: 10px;
}

.deck-item-title {
    font-size: 14px;
    font-weight: 900;
}


/* 追加フォーム用入力欄 */

.comic-input {
    width: 100%;
    padding: 10px;
    margin-bottom: 10px;
    border: 3px solid #111;
    border-radius: 6px;
    font-family: 'Noto Sans JP', sans-serif;
    font-weight: 700;
    font-size: 14px;
    outline: none;
}

.comic-input:focus {
    border-color: #3b82f6;
    background: #f0fdf4;
}

.add-deck-form {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 3px dashed #111;
}


/* --- SWAボタン（黄色） --- */

.hidden-swa-cb {
    display: none;
}

.swa-circle-btn {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: #cbd5e1;
    border: 2px solid #111;
    box-shadow: 2px 2px 0 #111;
    cursor: pointer;
    transition: all 0.2s;
    user-select: none;
    overflow: hidden;
}

.swa-circle-btn:active {
    transform: translate(2px, 2px);
    box-shadow: 0 0 0 #111;
}


/* ON（チェックされた）時の色（黄色） */

.hidden-swa-cb:checked+.swa-circle-btn {
    background-color: #fde047;
}

dotlottie-player {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

#swa-lottie {
    width: 54px !important;
    height: 54px !important;
    margin-top: 2px !important;
    /* プラスで下へ、マイナスで上へズレる */
    margin-left: 0.5px !important;
    /* プラスで右へ、マイナスで左へズレる */
}


/* --- Tip（ヒント）ボタン --- */

.hidden-tip-cb {
    display: none;
}

.tip-circle-btn {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: #cbd5e1;
    /* OFF時の色（グレー） */
    border: 2px solid #111;
    box-shadow: 2px 2px 0 #111;
    cursor: pointer;
    transition: all 0.2s;
    user-select: none;
    overflow: hidden;
}

.tip-circle-btn:active {
    transform: translate(2px, 2px);
    box-shadow: 0 0 0 #111;
}


/* ON（チェックされた）時の色（白） */

.hidden-tip-cb:checked+.tip-circle-btn {
    background-color: #ff0000;
}


/* Tip用Lottieのサイズ・位置微調整（必要に応じて数値を変更） */

#tip-lottie {
    width: 32px !important;
    height: 32px !important;
}


/* --- 単語帳の削除（ゴミ箱）ボタン --- */

.delete-deck-btn {
    background: none;
    border: none;
    font-size: 16px;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s, transform 0.1s;
    padding: 5px;
}

.delete-deck-btn:active {
    transform: scale(0.85);
    /* 押したときに少し縮む */
}


/* パソコン用: ホバーしたときだけゴミ箱を表示 */

.deck-item:hover .delete-deck-btn {
    opacity: 1;
}


/* スマホ用: ホバーができないので常にうっすら表示しておく */

@media (max-width: 768px) {
    .delete-deck-btn {
        opacity: 0.6;
    }
}


/* --- グローバルローディング用スピナー --- */

.loader-spinner {
    width: 60px;
    height: 60px;
    border: 8px solid #fef08a;
    border-top: 8px solid #ef4444;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}