/* ===== モードコンテンツ ===== */
.mode-content-card {
    padding: 20px;
}
.mode-content-card h3 {
    margin: 0 0 16px;
    font-size: 1.05rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* 節約モード: 3カラムグリッド */
.savings-daily-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-top: 12px;
}
.savings-daily-grid .day-row {
    display: contents;
}
.savings-daily-grid .day-cell {
    padding: 6px 8px;
    font-size: 0.85rem;
    border-bottom: 1px solid var(--border);
    text-align: right;
}
.savings-daily-grid .day-cell:first-child {
    text-align: left;
    font-weight: 500;
}
.savings-daily-grid .day-cell.positive { color: var(--primary-dark); }
.savings-daily-grid .day-cell.negative { color: var(--danger); }
.savings-achievement {
    margin-top: 16px;
    text-align: center;
    font-size: 1.8rem;
    font-weight: 700;
}
.savings-achievement small {
    font-size: 0.85rem;
    color: var(--text-secondary);
    display: block;
    margin-top: 4px;
}

/* 住宅モード: タスクチェックリスト */
.housing-task-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 12px;
}
.housing-task-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    background: var(--card-bg, #fff);
    border: 1px solid var(--border);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
}
.housing-task-item:hover {
    border-color: var(--accent);
}
.housing-task-item.done {
    opacity: 0.6;
    text-decoration: line-through;
}
.housing-task-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--accent);
}

/* 教育モード: 税額シミュレーター */
.tax-result-card {
    margin-top: 16px;
    padding: 16px;
    background: linear-gradient(135deg, #edf5ef 0%, #fafdf8 100%);
    border-radius: 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.tax-result-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.92rem;
}
.tax-result-row .value {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--accent);
}
.tax-toggle-detail {
    margin-top: 12px;
    padding: 14px;
    background: var(--card-bg, #fff);
    border: 1px solid var(--border);
    border-radius: 12px;
    font-size: 0.88rem;
    line-height: 1.7;
}

/* 安心モード: チェックリスト + 複利シミュ */
.security-section {
    margin-top: 16px;
}
.security-section h4 {
    font-size: 0.95rem;
    margin: 0 0 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.security-alert {
    display: inline-block;
    background: #fef0ec;
    color: var(--danger);
    font-size: 0.75rem;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 600;
}
.compound-result {
    margin-top: 16px;
    padding: 16px;
    background: linear-gradient(135deg, #f5f0e6 0%, #fafdf8 100%);
    border-radius: 14px;
    text-align: center;
}
.compound-result .amount {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--mode-accent, var(--accent));
}
.compound-result .breakdown {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 6px;
}
.compound-years-btns {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}
.compound-years-btns button {
    flex: 1;
    padding: 8px;
    border-radius: 10px;
    border: 1.5px solid var(--border);
    background: var(--card-bg, #fff);
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.2s;
}
.compound-years-btns button.active,
.compound-years-btns button:hover {
    border-color: var(--mode-accent, var(--accent));
    color: var(--mode-accent, var(--accent));
    font-weight: 600;
}

/* カレンダーカード: モード色遷移 */
.home-sec-calendar {
    transition: background 0.5s ease, border-color 0.5s ease;
}

/* ===== モードパーティクル ===== */
.mode-particles {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}
.mode-particles .mp {
    position: absolute;
    display: block;
    opacity: 0;
}
.mode-particles.mp-active .mp {
    animation-fill-mode: both;
}

/* 🔥 節約: 赤いスパーク */
.mp-savings {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #ff5252;
    box-shadow: 0 0 10px 3px rgba(255, 82, 82, 0.7);
    bottom: 10%;
    animation: mp-spark 2.5s ease-in-out infinite;
}
.mp-savings:nth-child(even) {
    width: 4px; height: 4px;
    box-shadow: 0 0 8px 2px rgba(255, 138, 101, 0.6);
    background: #ff8a65;
}
@keyframes mp-spark {
    0%   { opacity: 0; transform: translateY(0) scale(0.5); }
    12%  { opacity: 1; transform: translateY(-15px) scale(1.2); }
    30%  { opacity: 0; transform: translateY(-50px) scale(0.2); }
    100% { opacity: 0; transform: translateY(-50px) scale(0.2); }
}

/* 🏡 住宅: 暖かい光の粒がふわふわ */
.mp-housing {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: radial-gradient(circle, #ffcc80 40%, transparent 70%);
    box-shadow: 0 0 14px 4px rgba(255, 183, 77, 0.5);
    bottom: -10%;
    animation: mp-float 6s ease-in-out infinite;
}
.mp-housing:nth-child(even) {
    width: 7px; height: 7px;
    box-shadow: 0 0 10px 3px rgba(255, 213, 79, 0.4);
    background: radial-gradient(circle, #ffd54f 40%, transparent 70%);
}
@keyframes mp-float {
    0%   { opacity: 0; transform: translateY(0) translateX(0); }
    15%  { opacity: 0.8; }
    50%  { opacity: 0.6; transform: translateY(-140px) translateX(20px); }
    80%  { opacity: 0.3; }
    100% { opacity: 0; transform: translateY(-250px) translateX(-15px); }
}

/* 🌸 教育: 桜の花びら */
.mp-education {
    width: 14px;
    height: 14px;
    background: radial-gradient(ellipse at 30% 30%, #f8bbd0 0%, #f48fb1 50%, transparent 70%);
    border-radius: 50% 0 50% 50%;
    animation: mp-sakura 5s ease-in-out infinite;
}
.mp-education:nth-child(even) {
    width: 10px; height: 10px;
    background: radial-gradient(ellipse at 30% 30%, #fce4ec 0%, #f8bbd0 50%, transparent 70%);
    border-radius: 0 50% 50% 50%;
}
.mp-education:nth-child(3n) {
    width: 8px; height: 8px;
    animation-duration: 7s;
}
@keyframes mp-sakura {
    0%   { opacity: 0; transform: translateY(0) translateX(0) rotate(0deg) scale(0.8); }
    8%   { opacity: 0.9; transform: translateY(10px) scale(1); }
    50%  { opacity: 0.7; transform: translateY(180px) translateX(35px) rotate(200deg); }
    75%  { opacity: 0.4; transform: translateY(320px) translateX(-15px) rotate(320deg); }
    100% { opacity: 0; transform: translateY(450px) translateX(25px) rotate(420deg); }
}

/* 🌅 安心: 夕焼けの光が上に流れる */
.mp-security {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: radial-gradient(circle, #ffe082 30%, #ffab40 60%, transparent 70%);
    box-shadow: 0 0 14px 4px rgba(255, 171, 64, 0.4);
    bottom: 0;
    animation: mp-glow-rise 7s ease-in-out infinite;
}
.mp-security:nth-child(even) {
    width: 6px; height: 6px;
    background: radial-gradient(circle, #ffcc80 30%, #ff8a65 60%, transparent 70%);
    box-shadow: 0 0 12px 3px rgba(255, 138, 101, 0.35);
}
@keyframes mp-glow-rise {
    0%   { opacity: 0; transform: translateY(0) scale(0.6); }
    12%  { opacity: 0.7; transform: translateY(-25px) scale(1.1); }
    50%  { opacity: 0.5; transform: translateY(-160px) scale(0.9); }
    85%  { opacity: 0.2; transform: translateY(-300px) scale(0.5); }
    100% { opacity: 0; transform: translateY(-380px) scale(0.3); }
}

/* パーティクル: prefers-reduced-motion 対応 */
@media (prefers-reduced-motion: reduce) {
    .mode-particles .mp { animation: none !important; opacity: 0 !important; }
}

/* === トースト通知アニメーション === */
@keyframes toastSlideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}
@keyframes toastSlideOut {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(100%); opacity: 0; }
}
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}
