/* 全体のリセットとベーススタイル */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    overflow-x: hidden;
    width: 100%;
}

:root {
    /* 可愛いパステル配色に変更 */
    --primary-color: #ff9a9e;
    --primary-light: #fecfef;
    --primary-dark: #f093fb;
    --secondary-color: #a8edea;
    --accent-color: #ffd89b;
    --accent-light: #ffe5b4;
    --accent-dark: #ffb347;
    --background-color: #fff0f5;
    --card-color: #ffffff;
    --text-color: #5d4e75;
    --text-light: #9b8aab;
    --success-color: #a8e6cf;
    --success-light: #c8f7c5;
    --warning-color: #ffd3a5;
    --warning-light: #ffe5c4;
    --danger-color: #ffa0ac;
    --danger-light: #ffb5ba;
    
    /* 可愛い色の拡張 */
    --cute-pink: #fec5bb;
    --cute-peach: #ffd6ba;
    --cute-lavender: #d8bfd8;
    --cute-mint: #b5e5cf;
    --cute-yellow: #fff2cc;
    --cute-blue: #cce7ff;
    
    --shadow: 0 4px 20px rgba(252, 143, 175, 0.15);
    --shadow-hover: 0 8px 30px rgba(252, 143, 175, 0.25);
    --border-radius: 20px;
    --transition-speed: 0.3s ease;
    
    /* レスポンシブデザインのためのベース単位 */
    --base-font-size: 16px;
    --base-spacing: 16px;
    --base-padding: 16px;
    --base-margin: 16px;
    --content-max-width: 100%;
}

@import url('https://fonts.googleapis.com/css2?family=M+PLUS+Rounded+1c:wght@400;500;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700;800&display=swap');

body {
    font-family: 'Nunito', 'M PLUS Rounded 1c', 'Hiragino Kaku Gothic ProN', 'Meiryo', sans-serif;
    background: linear-gradient(135deg, #fff0f5 0%, #f0f8ff 50%, #ffe5f1 100%);
    background-attachment: fixed;
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
    width: 100%;
    margin: 0;
    padding: 0;
}

/* 連続ログイン通知 */
.login-streak-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: linear-gradient(135deg, var(--warning-color), var(--accent-color));
    color: white;
    padding: 20px 30px;
    border-radius: var(--border-radius);
    box-shadow: 0 10px 30px rgba(255, 154, 158, 0.3);
    z-index: 10000;
    transform: translateX(400px);
    transition: transform 0.3s ease;
}

.login-streak-notification.show {
    transform: translateX(0);
}

.streak-content {
    display: flex;
    align-items: center;
    gap: 15px;
}

.streak-content i {
    font-size: 2rem;
    animation: fire-animation 1s ease-in-out infinite;
}

@keyframes fire-animation {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.2);
    }
}

.streak-content h3 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 700;
}

.streak-content p {
    margin: 0;
    font-size: 0.9rem;
    opacity: 0.9;
}

/* アプリコンテナ - レスポンシブ対応強化 */
.app-container {
    max-width: 100%;
    width: 100%;
    margin: 0 auto;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    background: transparent;
}

/* デスクトップ・タブレット用の最大幅設定 */
@media (min-width: 768px) {
    .app-container {
        max-width: 600px;
        margin: 0 auto;
        box-shadow: 0 0 50px rgba(252, 143, 175, 0.15);
        border-radius: 0 0 30px 30px;
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(10px);
    }
}

@media (min-width: 1024px) {
    .app-container {
        max-width: 700px;
    }
}

/* ヘッダー - 可愛い配色適用 */
.header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 50%, var(--cute-peach) 100%);
    color: white;
    padding: 20px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 8px 20px rgba(252, 143, 175, 0.3);
    position: sticky;
    top: 0;
    z-index: 10;
    border-bottom-left-radius: 25px;
    border-bottom-right-radius: 25px;
    flex-wrap: wrap;
    gap: 10px;
}

@media (max-width: 480px) {
    .header {
        padding: 15px 12px;
    }
}

@media (min-width: 768px) {
    .header {
        padding: 25px 24px;
        border-radius: 0;
    }
    
    .app-title {
        font-size: 1.8rem;
    }
}

.app-title {
    font-size: 1.4rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    letter-spacing: 0.5px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.app-title img {
    width: 35px;
    height: 35px;
    object-fit: contain;
    vertical-align: middle;
    margin-right: 0.5rem;
    filter: drop-shadow(0 2px 4px rgba(255, 154, 158, 0.4)) 
            drop-shadow(0 0 6px rgba(168, 237, 234, 0.3));
    transition: transform 0.3s ease;
}

.app-title:hover img {
    transform: scale(1.1) rotate(-5deg);
}

@media (max-width: 480px) {
    .app-title {
        font-size: 1.2rem;
    }
    
    .app-title span {
        display: none;
    }
}

.app-title i {
    margin-right: 12px;
    font-size: 1.8rem;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.25);
    padding: 10px;
    border-radius: 15px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

@media (min-width: 768px) {
    .app-title i {
        font-size: 2rem;
        padding: 12px;
        border-radius: 18px;
    }
}

.header-info {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

@media (max-width: 480px) {
    .header-info {
        justify-content: flex-end;
        margin-top: 0;
    }
}

@media (min-width: 768px) {
    .header-info {
        gap: 12px;
        flex-wrap: nowrap;
    }
}

/* 認証ステータス */
.auth-status {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

@media (max-width: 480px) {
    .auth-status {
        flex-direction: column;
        align-items: flex-end;
        gap: 6px;
    }
    
    .user-email {
        font-size: 0.85rem;
        max-width: 150px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
}

@media (min-width: 481px) and (max-width: 768px) {
    .user-email {
        font-size: 0.9rem;
        max-width: 180px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
}

.points {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0.2));
    padding: 8px 16px;
    border-radius: 25px;
    font-weight: 700;
    display: flex;
    align-items: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(10px);
    white-space: nowrap;
}

@media (max-width: 480px) {
    .points {
        padding: 6px 12px;
        font-size: 0.9rem;
    }
}

.points i {
    color: #fff2cc;
    margin-right: 6px;
    filter: drop-shadow(0 0 4px rgba(255, 242, 204, 0.8));
    font-size: 1.1rem;
}

.character {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0.2));
    padding: 8px 16px;
    border-radius: 25px;
    font-weight: 700;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(10px);
    white-space: nowrap;
    font-size: 0.95rem;
}

@media (max-width: 480px) {
    .character {
        padding: 6px 12px;
        font-size: 0.85rem;
    }
}

/* 画面共通スタイル - レスポンシブ対応 */
.screen {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    padding-bottom: 90px;
}

@media (min-width: 768px) {
    .screen {
        padding-bottom: 100px;
    }
}

.screen-content {
    padding: 16px;
    flex: 1;
}

@media (min-width: 768px) {
    .screen-content {
        padding: 24px;
    }
}/* 追加追加追加スタイル：プログレスダッシュボードと強化されたキャラクターインタラクション */
.progress-dashboard {
    padding: 20px 16px;
    background: linear-gradient(135deg, 
        var(--primary-color) 0%, 
        var(--accent-color) 50%, 
        var(--cute-peach) 100%);
    background-size: 200% 200%;
    animation: gradient-flow 8s ease infinite;
    color: white;
    border-radius: 0 0 35px 35px;
    margin-bottom: 16px;
    box-shadow: 0 10px 25px rgba(252, 143, 175, 0.3), 
                0 4px 8px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

@media (min-width: 768px) {
    .progress-dashboard {
        padding: 28px 24px;
        border-radius: 0;
        margin-bottom: 24px;
    }
}

.progress-dashboard::before {
    content: '';
    position: absolute;
    top: 0;
    left: -50%;
    width: 200%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(255, 255, 255, 0.15), 
        transparent);
    animation: shimmer 3s infinite;
}

@keyframes gradient-flow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 10px;
}

@media (min-width: 768px) {
    .dashboard-header {
        margin-bottom: 20px;
        flex-wrap: nowrap;
    }
}

.dashboard-header h2 {
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

@media (min-width: 768px) {
    .dashboard-header h2 {
        font-size: 1.5rem;
    }
}

.streak-counter {
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.25), rgba(255, 255, 255, 0.15));
    padding: 8px 14px;
    border-radius: 25px;
    font-weight: 700;
    font-size: 0.9rem;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
}

@media (min-width: 768px) {
    .streak-counter {
        font-size: 1rem;
        padding: 10px 18px;
    }
}

.streak-emoji {
    margin-right: 6px;
    font-size: 1.3rem;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

/* 連続ログインアクティブ時のアニメーション */
.streak-counter.streak-active {
    background: linear-gradient(135deg, 
        rgba(255, 211, 105, 0.3), 
        rgba(255, 154, 158, 0.3));
    animation: streak-glow 2s ease-in-out infinite;
}

.streak-counter.streak-active .streak-emoji {
    animation: fire-bounce 1.5s ease-in-out infinite;
}

@keyframes streak-glow {
    0%, 100% {
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    }
    50% {
        box-shadow: 0 6px 20px rgba(255, 154, 158, 0.4);
    }
}

@keyframes fire-bounce {
    0%, 100% {
        transform: scale(1) rotate(0deg);
    }
    25% {
        transform: scale(1.1) rotate(-5deg);
    }
    75% {
        transform: scale(1.1) rotate(5deg);
    }
}

.progress-cards {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    padding: 0 4px;
    flex-wrap: wrap;
}

@media (min-width: 480px) {
    .progress-cards {
        gap: 12px;
        flex-wrap: nowrap;
    }
}

@media (min-width: 768px) {
    .progress-cards {
        gap: 16px;
        padding: 0 8px;
    }
}

.progress-card {
    background: linear-gradient(145deg, #ffffff, #fff5f8);
    padding: 12px 8px;
    border-radius: 20px;
    text-align: center;
    flex: 1;
    min-width: 80px;
    box-shadow: 0 8px 20px rgba(252, 143, 175, 0.15), 
                inset 0 -3px 0 rgba(252, 143, 175, 0.1);
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: transform 0.3s, box-shadow 0.3s;
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255, 0.8);
}

@media (min-width: 480px) {
    .progress-card {
        padding: 14px 10px;
        min-width: 100px;
    }
}

@media (min-width: 768px) {
    .progress-card {
        padding: 16px 12px;
        border-radius: 25px;
    }
}

.progress-card::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, 
                rgba(255, 255, 255, 0.6) 0%, 
                rgba(255, 255, 255, 0) 60%);
    pointer-events: none;
}

.progress-card:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 15px 25px rgba(252, 143, 175, 0.2), 
                inset 0 -3px 0 rgba(252, 143, 175, 0.15);
}

.progress-circle {
    position: relative;
    width: 80px;
    height: 80px;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2;
}

@media (min-width: 480px) {
    .progress-circle {
        width: 90px;
        height: 90px;
    }
}

@media (min-width: 768px) {
    .progress-circle {
        width: 100px;
        height: 100px;
    }
}

.progress-circle svg {
    transition: all 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.progress-circle svg circle:nth-child(2) {
    stroke-dasharray: 113;
    transition: stroke-dashoffset 1.5s ease-in-out;
    filter: drop-shadow(0 0 6px rgba(252, 143, 175, 0.4));
}

.progress-text {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-color);
    z-index: 3;
    transition: all 0.5s;
}

.progress-number {
    font-size: 1.6rem;
    font-weight: 800;
    line-height: 1;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

@media (min-width: 480px) {
    .progress-number {
        font-size: 1.8rem;
    }
}

@media (min-width: 768px) {
    .progress-number {
        font-size: 2rem;
    }
}

.progress-label {
    font-size: 0.8rem;
    color: var(--text-light);
    margin-top: 2px;
    font-weight: 600;
}

@media (min-width: 768px) {
    .progress-label {
        font-size: 0.9rem;
    }
}

/* 円グラフの色設定 - 可愛い色に変更 */
.completed-tasks svg circle:nth-child(2) {
    stroke: var(--success-color);
}

.focus-time svg circle:nth-child(2) {
    stroke: var(--accent-color);
}

.experience svg circle:nth-child(2) {
    stroke: var(--primary-color);
}

/* プレミアムバッジ */
.premium-badge {
    background: linear-gradient(135deg, #FFD700, #FFA500);
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 5px;
    box-shadow: 0 2px 5px rgba(255, 215, 0, 0.3);
    animation: shimmer 2s ease-in-out infinite;
    white-space: nowrap;
    order: 2;
}

@media (max-width: 480px) {
    .premium-badge {
        font-size: 0.75rem;
        padding: 4px 10px;
        gap: 4px;
    }
    
    .premium-badge i {
        font-size: 0.8rem;
    }
}

@media (min-width: 768px) {
    .premium-badge {
        font-size: 0.9rem;
        padding: 6px 14px;
    }
}

@keyframes shimmer {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.8; }
}

.premium-badge i {
    font-size: 0.9rem;
}

/* キャラクターグリーティングの強化 - レスポンシブ対応 */
.character-greeting {
    padding: 16px;
    display: flex;
    justify-content: center;
    margin-bottom: 10px;
}

@media (min-width: 768px) {
    .character-greeting {
        padding: 24px;
        margin-bottom: 16px;
    }
}

.character-greeting.enhanced {
    padding: 10px 16px;
    position: relative;
}

@media (min-width: 768px) {
    .character-greeting.enhanced {
        padding: 16px 24px;
    }
}

.character-container {
    position: relative;
    width: 100%;
    max-width: 400px;
}

.buddy-avatar {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

@media (min-width: 768px) {
    .buddy-avatar {
        flex-direction: row;
        align-items: flex-start;
        justify-content: center;
        gap: 20px;
    }
}

.buddy-avatar.interactive {
    cursor: pointer;
    position: relative;
}

.buddy-avatar.interactive .buddy-image {
    width: 90px;
    height: 90px;
    padding: 0;
    transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 5px solid var(--cute-pink);
    border-radius: 50%;
    box-shadow: 0 12px 30px rgba(254, 197, 187, 0.4), 
                0 0 0 6px rgba(255, 255, 255, 0.8),
                inset 0 0 20px rgba(255, 255, 255, 0.6);
    animation: float-character 6s ease-in-out infinite;
    filter: drop-shadow(0 8px 20px rgba(254, 197, 187, 0.3));
    position: relative;
    z-index: 5;
}

@media (min-width: 480px) {
    .buddy-avatar.interactive .buddy-image {
        width: 100px;
        height: 100px;
    }
}

@media (min-width: 768px) {
    .buddy-avatar.interactive .buddy-image {
        width: 120px;
        height: 120px;
        border-width: 6px;
    }
}

.buddy-avatar.interactive::before {
    content: '';
    position: absolute;
    width: 110px;
    height: 110px;
    background: radial-gradient(circle, 
                rgba(254, 197, 187, 0.3) 0%, 
                rgba(254, 197, 187, 0) 70%);
    border-radius: 50%;
    z-index: 1;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

@media (min-width: 480px) {
    .buddy-avatar.interactive::before {
        width: 120px;
        height: 120px;
    }
}

@media (min-width: 768px) {
    .buddy-avatar.interactive::before {
        width: 140px;
        height: 140px;
        left: 60px;
    }
}

.buddy-avatar.interactive:hover .buddy-image {
    transform: scale(1.1) translateY(-10px);
    box-shadow: 0 18px 35px rgba(254, 197, 187, 0.5), 
                0 0 0 8px rgba(255, 255, 255, 0.9),
                inset 0 0 25px rgba(255, 255, 255, 0.8);
}

.character-mood-indicator {
    position: absolute;
    right: -8px;
    bottom: 8px;
    background: linear-gradient(135deg, var(--warning-color), var(--warning-light));
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    font-size: 1.1rem;
    box-shadow: 0 6px 18px rgba(255, 211, 165, 0.4),
                inset 0 -3px 0 rgba(0, 0, 0, 0.1);
    border: 3px solid white;
    animation: pulse-strong 3s infinite;
    transform-origin: center;
    z-index: 10;
    transition: all 0.3s;
    font-weight: 700;
}

@media (min-width: 480px) {
    .character-mood-indicator {
        width: 38px;
        height: 38px;
        font-size: 1.2rem;
    }
}

@media (min-width: 768px) {
    .character-mood-indicator {
        right: 5px;
        bottom: 15px;
        width: 42px;
        height: 42px;
        font-size: 1.3rem;
    }
}

.character-mood-indicator:hover {
    transform: scale(1.2) rotate(15deg);
    box-shadow: 0 10px 25px rgba(255, 211, 165, 0.5),
                inset 0 -3px 0 rgba(0, 0, 0, 0.15);
}

.speech-bubble.enhanced {
    position: relative;
    background: linear-gradient(145deg, #ffffff, #fff0f5);
    border-radius: 25px;
    padding: 14px 18px;
    max-width: calc(100% - 110px);
    box-shadow: 0 12px 30px rgba(254, 197, 187, 0.25),
                inset 0 -4px 0 rgba(254, 197, 187, 0.05);
    animation: float-bubble 5s ease-in-out infinite, pop-in 0.5s forwards;
    border: 3px solid var(--cute-pink);
    margin-left: 16px;
    margin-top: 10px;
    transform-origin: center left;
    transition: all 0.3s;
}

@media (min-width: 480px) {
    .speech-bubble.enhanced {
        padding: 16px 20px;
        max-width: calc(100% - 120px);
        border-radius: 30px;
    }
}

@media (min-width: 768px) {
    .speech-bubble.enhanced {
        padding: 18px 24px;
        max-width: 300px;
        margin-left: 0;
        margin-top: 0;
        align-self: center;
    }
}

.speech-bubble.enhanced:hover {
    transform: scale(1.05);
    box-shadow: 0 18px 35px rgba(254, 197, 187, 0.35),
                inset 0 -4px 0 rgba(254, 197, 187, 0.08);
}

@keyframes float-bubble {
    0% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-6px);
    }
    100% {
        transform: translateY(0px);
    }
}

.speech-bubble.enhanced:after {
    content: '';
    position: absolute;
    top: 50%;
    left: -12px;
    margin-top: -12px;
    border-width: 12px 12px 12px 0;
    border-style: solid;
    border-color: transparent white transparent transparent;
}

@media (min-width: 768px) {
    .speech-bubble.enhanced:after {
        top: 100%;
        left: 50%;
        margin-left: -12px;
        margin-top: 0;
        border-width: 0 12px 12px 12px;
        border-color: white transparent transparent transparent;
    }
}

.speech-bubble.enhanced p {
    margin: 0;
    font-weight: 600;
    font-size: 1rem;
    color: var(--text-color);
    text-align: left;
    position: relative;
    z-index: 2;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
}

@media (min-width: 480px) {
    .speech-bubble.enhanced p {
        font-size: 1.1rem;
    }
}

@media (min-width: 768px) {
    .speech-bubble.enhanced p {
        text-align: center;
        font-size: 1.2rem;
    }
}

.speech-bubble.enhanced p::after {
    content: '';
    position: absolute;
    background: linear-gradient(90deg, var(--cute-pink) 0%, transparent 100%);
    height: 2px;
    width: 40px;
    bottom: -6px;
    left: 0;
    border-radius: 2px;
    opacity: 0.7;
}

@media (min-width: 768px) {
    .speech-bubble.enhanced p::after {
        left: 50%;
        transform: translateX(-50%);
    }
}/* 現在のタスク - レスポンシブ対応と可愛い配色 */
.current-task {
    padding: 16px;
    margin-bottom: 10px;
}

@media (min-width: 768px) {
    .current-task {
        padding: 20px;
        margin-bottom: 16px;
    }
}

.section-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    flex-wrap: wrap;
    gap: 8px;
}

@media (min-width: 768px) {
    .section-title {
        flex-wrap: nowrap;
        margin-bottom: 16px;
    }
}

.section-title h2 {
    font-size: 1.3rem;
    color: var(--text-color);
    font-weight: 700;
}

@media (min-width: 768px) {
    .section-title h2 {
        font-size: 1.5rem;
    }
}

.progress-indicator {
    background: linear-gradient(135deg, var(--primary-color), var(--cute-lavender));
    color: white;
    font-weight: 700;
    font-size: 0.8rem;
    padding: 6px 14px;
    border-radius: 25px;
    box-shadow: 0 4px 15px rgba(254, 197, 187, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.7);
}

@media (min-width: 768px) {
    .progress-indicator {
        font-size: 0.9rem;
        padding: 8px 18px;
    }
}

.task-card {
    background-color: var(--card-color);
    border-radius: var(--border-radius);
    padding: 16px;
    display: flex;
    align-items: center;
    box-shadow: var(--shadow);
    margin-bottom: 12px;
    position: relative;
    border: 1px solid rgba(254, 197, 187, 0.2);
    transition: transform 0.3s, box-shadow 0.3s;
}

@media (min-width: 768px) {
    .task-card {
        padding: 20px;
        margin-bottom: 16px;
        border-radius: 25px;
    }
}

.task-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
}

.task-card.current {
    border-left: 6px solid var(--primary-color);
}

.task-card.enhanced {
    background: linear-gradient(145deg, white, #fff5f8);
    padding: 22px 18px;
    border-radius: 25px;
    box-shadow: 0 15px 30px rgba(254, 197, 187, 0.2),
                inset 0 -5px 0 rgba(254, 197, 187, 0.05);
    border: none;
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.task-card.enhanced.cute {
    background: linear-gradient(135deg, #fff5f8, #fff9fd);
    border: 2px solid var(--cute-pink);
    border-radius: 30px;
    box-shadow: 0 18px 30px rgba(254, 197, 187, 0.25);
    position: relative;
}

.task-card.enhanced.cute::before {
    content: '';
    position: absolute;
    top: -5px;
    left: -5px;
    right: -5px;
    bottom: -5px;
    background: linear-gradient(135deg, var(--cute-pink), var(--cute-peach));
    border-radius: 35px;
    z-index: -1;
    opacity: 0.5;
    filter: blur(8px);
}

@media (min-width: 768px) {
    .task-card.enhanced {
        padding: 26px 24px;
        border-radius: 30px;
    }
    
    .task-card.enhanced.cute {
        padding: 28px 26px;
        border-radius: 35px;
    }
}

.task-card.enhanced::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 6px;
    background: linear-gradient(90deg, var(--cute-pink), var(--cute-peach));
    z-index: 1;
}

.task-card.enhanced::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, 
                rgba(255, 255, 255, 0.8) 0%, 
                rgba(255, 255, 255, 0) 60%);
    pointer-events: none;
}

.task-card.enhanced:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 25px 40px rgba(254, 197, 187, 0.25),
                inset 0 -5px 0 rgba(254, 197, 187, 0.1);
}

.task-icon {
    width: 50px;
    height: 50px;
    background-color: var(--primary-color);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 16px;
    color: white;
    font-size: 1.1rem;
    box-shadow: 0 6px 15px rgba(254, 197, 187, 0.4);
    flex-shrink: 0;
}

@media (min-width: 480px) {
    .task-icon {
        width: 56px;
        height: 56px;
        font-size: 1.2rem;
    }
}

@media (min-width: 768px) {
    .task-icon {
        width: 60px;
        height: 60px;
        font-size: 1.4rem;
        border-radius: 18px;
        margin-right: 20px;
    }
}

.task-icon.animated {
    animation: pulse-strong 2.5s infinite ease-in-out;
    border-radius: 18px;
    background: linear-gradient(135deg, var(--primary-color), var(--cute-peach));
    box-shadow: 0 10px 20px rgba(254, 197, 187, 0.5),
                inset 0 -3px 0 rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.task-icon.animated::before {
    content: '';
    position: absolute;
    top: 0;
    left: -50%;
    width: 200%;
    height: 100%;
    background: linear-gradient(90deg, 
                transparent, 
                rgba(255, 255, 255, 0.4), 
                transparent);
    animation: shimmer 2s infinite;
}

.task-info {
    flex: 1;
    min-width: 0; /* Prevent text overflow */
}

.task-info h3 {
    font-size: 1.1rem;
    margin-bottom: 6px;
    color: var(--text-color);
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

@media (min-width: 480px) {
    .task-info h3 {
        font-size: 1.2rem;
        white-space: normal;
    }
}

@media (min-width: 768px) {
    .task-info h3 {
        font-size: 1.3rem;
        margin-bottom: 8px;
    }
}

.task-info p {
    color: var(--text-light);
    margin-bottom: 6px;
    font-size: 0.9rem;
}

@media (min-width: 768px) {
    .task-info p {
        font-size: 1rem;
        margin-bottom: 8px;
    }
}

.task-encouragement {
    background-color: rgba(168, 230, 207, 0.15);
    color: var(--success-color);
    padding: 8px 14px;
    border-radius: 15px;
    font-size: 0.85rem;
    margin-top: 8px;
    border: 1px dashed var(--success-color);
    white-space: normal;
}

.task-card.cute .task-encouragement {
    background: linear-gradient(135deg, rgba(254, 197, 187, 0.15), rgba(216, 191, 216, 0.15));
    color: var(--text-color);
    border: 1px dashed var(--cute-pink);
    border-radius: 20px;
    padding: 10px 16px;
    box-shadow: 0 5px 15px rgba(254, 197, 187, 0.1);
    font-weight: 600;
    text-align: center;
}

.sparkle {
    display: inline-block;
    animation: sparkle-twinkle 2s infinite;
    transform-origin: center;
}

@keyframes sparkle-twinkle {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(0.8); }
}

@media (min-width: 480px) {
    .task-encouragement {
        font-size: 0.9rem;
    }
    
    .task-card.cute .task-encouragement {
        font-size: 0.95rem;
        padding: 12px 18px;
    }
}

@media (min-width: 768px) {
    .task-encouragement {
        padding: 10px 16px;
        border-radius: 18px;
        font-size: 0.95rem;
        margin-top: 10px;
    }
    
    .task-card.cute .task-encouragement {
        padding: 14px 20px;
        border-radius: 25px;
        font-size: 1rem;
    }
}

.start-btn {
    background: linear-gradient(135deg, var(--success-color), var(--cute-mint));
    color: white;
    border: none;
    border-radius: 25px;
    padding: 10px 18px;
    font-size: 1rem;
    display: flex;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 20px rgba(168, 230, 207, 0.3);
    font-weight: 700;
    margin-left: 10px;
}

@media (min-width: 768px) {
    .start-btn {
        padding: 12px 22px;
        font-size: 1.1rem;
    }
}

.start-btn i {
    margin-right: 6px;
}

@media (min-width: 768px) {
    .start-btn i {
        margin-right: 8px;
        font-size: 1.1rem;
    }
}

.start-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, var(--success-light), var(--cute-mint));
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 12px 25px rgba(168, 230, 207, 0.4);
}

.start-btn:disabled {
    background: linear-gradient(135deg, #e0e0e0, #d0d0d0);
    cursor: not-allowed;
    opacity: 0.7;
}

.start-btn.enhanced {
    padding: 12px 24px;
    font-weight: 700;
    border-radius: 30px;
    box-shadow: 0 10px 20px rgba(168, 230, 207, 0.4);
}

.start-btn.enhanced.cute {
    background: linear-gradient(135deg, var(--cute-pink), var(--primary-color));
    border-radius: 25px;
    padding: 12px 26px;
    box-shadow: 0 12px 25px rgba(254, 197, 187, 0.3);
    position: relative;
    overflow: hidden;
    transition: all 0.3s;
}

.start-btn.enhanced.cute::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
                transparent, 
                rgba(255, 255, 255, 0.3), 
                transparent);
    animation: shimmer 2s infinite;
}

.start-btn.enhanced.cute:hover:not(:disabled) {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 15px 30px rgba(254, 197, 187, 0.4);
    background: linear-gradient(135deg, var(--primary-color), var(--cute-lavender));
}

.start-btn.enhanced.cute:disabled {
    background: linear-gradient(135deg, #e0e0e0, #d8d8d8);
    opacity: 0.8;
}

@media (min-width: 768px) {
    .start-btn.enhanced {
        padding: 14px 28px;
        font-size: 1.15rem;
    }
    
    .start-btn.enhanced.cute {
        padding: 14px 30px;
        font-size: 1.2rem;
        border-radius: 28px;
    }
}

.start-btn.enhanced i {
    margin-right: 8px;
    font-size: 1.1rem;
}

.start-btn.enhanced.cute i {
    margin-right: 10px;
    font-size: 1.15rem;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-3px); }
}

/* フィルターバーとボタン */
.filter-bar {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    padding: 0 5px;
    overflow-x: auto;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
}

.filter-bar::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

.filter-btn {
    background-color: #f5f5f5;
    color: var(--text-light);
    border: none;
    border-radius: 20px;
    padding: 8px 16px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    white-space: nowrap;
}

.filter-btn:hover {
    background-color: #e9e9e9;
    transform: translateY(-2px);
}

.filter-btn.active {
    background-color: var(--primary-color);
    color: white;
}

.filter-btn.cute {
    background: linear-gradient(145deg, white, #fff5f8);
    border: 2px solid transparent;
    border-radius: 20px;
    padding: 8px 14px;
    box-shadow: 0 5px 15px rgba(254, 197, 187, 0.15);
    display: flex;
    align-items: center;
    gap: 6px;
}

.filter-btn.cute i {
    font-size: 1rem;
    opacity: 0.8;
}

.filter-btn.cute:hover {
    background: linear-gradient(145deg, #fff5f8, #fff8fa);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(254, 197, 187, 0.2);
}

.filter-btn.cute.active {
    background: linear-gradient(135deg, var(--primary-color), var(--cute-lavender));
    color: white;
    box-shadow: 0 8px 20px rgba(254, 197, 187, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
}

@media (min-width: 480px) {
    .filter-bar {
        gap: 12px;
        margin-bottom: 24px;
    }
    
    .filter-btn {
        padding: 10px 18px;
        font-size: 0.95rem;
    }
    
    .filter-btn.cute {
        padding: 10px 16px;
        border-radius: 22px;
    }
    
    .filter-btn.cute i {
        font-size: 1.1rem;
    }
}

@media (min-width: 768px) {
    .filter-bar {
        gap: 15px;
        padding: 0 10px;
    }
    
    .filter-btn {
        padding: 12px 22px;
        font-size: 1rem;
        border-radius: 25px;
    }
    
    .filter-btn.cute {
        padding: 12px 20px;
        border-radius: 25px;
        gap: 8px;
    }
    
    .filter-btn.cute i {
        font-size: 1.2rem;
    }
}

/* 統計カード */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 12px;
    margin-bottom: 24px;
}

@media (min-width: 480px) {
    .stats-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 15px;
    }
}

.stat-card {
    background: linear-gradient(145deg, white, #fff5f8);
    border-radius: 20px;
    padding: 15px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 8px 20px rgba(254, 197, 187, 0.15);
    transition: all 0.3s;
    border: 2px solid rgba(254, 197, 187, 0.1);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 25px rgba(254, 197, 187, 0.2);
    border-color: rgba(254, 197, 187, 0.2);
}

.stat-icon {
    width: 45px;
    height: 45px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--cute-pink), var(--primary-color));
    color: white;
    font-size: 1.3rem;
    box-shadow: 0 6px 12px rgba(254, 197, 187, 0.3);
    flex-shrink: 0;
}

.stat-info {
    flex: 1;
}

.stat-info h3 {
    font-size: 1.4rem;
    color: var(--text-color);
    margin-bottom: 2px;
    background: linear-gradient(135deg, var(--primary-color), var(--cute-lavender));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-info p {
    font-size: 0.8rem;
    color: var(--text-light);
    font-weight: 600;
}

@media (min-width: 480px) {
    .stat-card {
        padding: 18px;
        border-radius: 22px;
    }
    
    .stat-icon {
        width: 48px;
        height: 48px;
        font-size: 1.4rem;
    }
    
    .stat-info h3 {
        font-size: 1.5rem;
    }
    
    .stat-info p {
        font-size: 0.85rem;
    }
}

@media (min-width: 768px) {
    .stat-card {
        padding: 20px;
        border-radius: 25px;
    }
    
    .stat-icon {
        width: 52px;
        height: 52px;
        font-size: 1.5rem;
        border-radius: 18px;
    }
    
    .stat-info h3 {
        font-size: 1.6rem;
        margin-bottom: 4px;
    }
    
    .stat-info p {
        font-size: 0.9rem;
    }
}

/* タスク詳細カード */
.task-card-detailed {
    background: linear-gradient(145deg, white, #fff8fa);
    border-radius: 20px;
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 14px;
    box-shadow: 0 8px 20px rgba(254, 197, 187, 0.15);
    margin-bottom: 16px;
    position: relative;
    border: 1px solid rgba(254, 197, 187, 0.15);
    transition: all 0.3s;
    width: 100%;
    box-sizing: border-box;
}

@media (max-width: 480px) {
    .task-card-detailed {
        padding: 12px;
        gap: 10px;
        flex-wrap: wrap;
    }
}

.task-card-detailed:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(254, 197, 187, 0.25);
    border-color: rgba(254, 197, 187, 0.3);
}

.task-card-detailed .task-icon {
    width: 50px;
    height: 50px;
    background-color: var(--primary-color);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    box-shadow: 0 6px 15px rgba(254, 197, 187, 0.4);
    flex-shrink: 0;
}

.task-card-detailed .task-icon.cute {
    background: linear-gradient(135deg, var(--cute-pink), var(--primary-color));
    border-radius: 18px;
    box-shadow: 0 8px 18px rgba(254, 197, 187, 0.35);
    animation: pulse-subtle 3s infinite;
}

.task-card-detailed .task-info {
    flex: 1;
    min-width: 0;
}

.task-card-detailed .task-info h3 {
    font-size: 1.1rem;
    margin-bottom: 4px;
    font-weight: 700;
    color: var(--text-color);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.task-card-detailed .task-info p {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 5px;
}

.task-card-detailed .completion-time {
    display: inline-block;
    background-color: rgba(168, 230, 207, 0.15);
    color: var(--success-color);
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.8rem;
    border: 1px dashed var(--success-color);
}

.task-card-detailed .completion-time i {
    margin-right: 4px;
}

.task-card-detailed .task-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.action-btn {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s;
    color: white;
}

.action-btn.cute {
    border-radius: 15px;
    width: auto;
    padding: 0 14px;
    gap: 6px;
    overflow: hidden;
}

.action-btn.cute span {
    font-size: 0;
    width: 0;
    transition: all 0.3s;
    font-weight: 600;
    white-space: nowrap;
}

.action-btn.cute:hover span {
    font-size: 0.9rem;
    width: auto;
}

.action-btn.start {
    background-color: var(--success-color);
    box-shadow: 0 4px 10px rgba(168, 230, 207, 0.4);
}

.action-btn.start.cute {
    background: linear-gradient(135deg, var(--success-color), var(--cute-mint));
    box-shadow: 0 6px 15px rgba(168, 230, 207, 0.35);
}

.action-btn.delete {
    background-color: var(--danger-color);
    box-shadow: 0 4px 10px rgba(255, 160, 172, 0.4);
}

.action-btn.delete.cute {
    background: linear-gradient(135deg, var(--danger-color), var(--danger-light));
    box-shadow: 0 6px 15px rgba(255, 160, 172, 0.35);
}

.action-btn:hover {
    transform: translateY(-3px) scale(1.05);
}

.action-btn.start:hover {
    box-shadow: 0 8px 20px rgba(168, 230, 207, 0.5);
}

.action-btn.delete:hover {
    box-shadow: 0 8px 20px rgba(255, 160, 172, 0.5);
}

/* タスクリストの空の状態 */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    background: linear-gradient(145deg, white, #fff8fa);
    border-radius: 25px;
    box-shadow: 0 15px 30px rgba(254, 197, 187, 0.15),
                inset 0 -4px 0 rgba(254, 197, 187, 0.05);
    border: 2px dashed rgba(254, 197, 187, 0.3);
}

.empty-state .empty-illustration {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: linear-gradient(135deg, 
                rgba(254, 197, 187, 0.2), 
                rgba(254, 197, 187, 0.1));
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.empty-state .empty-illustration i {
    font-size: 2rem;
    color: var(--primary-color);
}

.empty-state h3 {
    color: var(--text-color);
    margin-bottom: 10px;
    font-size: 1.2rem;
}

.empty-state p {
    color: var(--text-light);
    margin-bottom: 20px;
    font-size: 0.95rem;
}

.btn.primary.cute {
    background: linear-gradient(135deg, var(--primary-color), var(--cute-lavender));
    border: none;
    border-radius: 25px;
    padding: 12px 22px;
    font-size: 1rem;
    font-weight: 700;
    color: white;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    box-shadow: 0 10px 20px rgba(254, 197, 187, 0.3);
    transition: all 0.3s;
}

.btn.primary.cute:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(254, 197, 187, 0.4);
}

.btn.primary.cute i {
    font-size: 1.1rem;
}

@media (min-width: 480px) {
    .task-card-detailed {
        padding: 18px;
        border-radius: 22px;
        margin-bottom: 18px;
    }
    
    .task-card-detailed .task-icon {
        width: 55px;
        height: 55px;
        font-size: 1.3rem;
    }
    
    .task-card-detailed .task-info h3 {
        font-size: 1.2rem;
        margin-bottom: 6px;
    }
    
    .task-card-detailed .task-info p {
        font-size: 0.95rem;
    }
    
    .action-btn {
        width: 44px;
        height: 44px;
        font-size: 1.1rem;
    }
    
    .action-btn.cute {
        padding: 0 16px;
    }
    
    .action-btn.cute:hover span {
        font-size: 0.95rem;
    }
}

@media (min-width: 768px) {
    .task-card-detailed {
        padding: 22px;
        border-radius: 25px;
        margin-bottom: 22px;
    }
    
    .task-card-detailed .task-icon {
        width: 60px;
        height: 60px;
        font-size: 1.4rem;
        border-radius: 20px;
    }
    
    .task-card-detailed .task-info h3 {
        font-size: 1.3rem;
        margin-bottom: 8px;
    }
    
    .task-card-detailed .task-info p {
        font-size: 1rem;
        margin-bottom: 8px;
    }
    
    .task-card-detailed .completion-time {
        padding: 5px 12px;
        font-size: 0.85rem;
        border-radius: 15px;
    }
    
    .action-btn {
        width: 48px;
        height: 48px;
        font-size: 1.2rem;
        border-radius: 15px;
    }
    
    .action-btn.cute {
        padding: 0 18px;
        border-radius: 18px;
    }
    
    .action-btn.cute span {
        font-size: 0;
    }
    
    .action-btn.cute:hover span {
        font-size: 1rem;
    }
    
    .empty-state {
        padding: 50px 30px;
        border-radius: 30px;
    }
    
    .empty-state .empty-illustration {
        width: 90px;
        height: 90px;
        margin-bottom: 24px;
    }
    
    .empty-state .empty-illustration i {
        font-size: 2.5rem;
    }
    
    .empty-state h3 {
        font-size: 1.4rem;
        margin-bottom: 12px;
    }
    
    .empty-state p {
        font-size: 1.05rem;
        margin-bottom: 25px;
    }
    
    .btn.primary.cute {
        padding: 14px 26px;
        font-size: 1.1rem;
        border-radius: 30px;
    }
    
    .btn.primary.cute i {
        font-size: 1.2rem;
    }
}

/* キラキラエフェクト */
.sparkle-effect {
    position: absolute;
    width: 10px;
    height: 10px;
    background: transparent;
    border-radius: 50%;
    pointer-events: none;
    z-index: 10;
    animation: sparkle-animation 2s forwards;
}

.sparkle-effect::before {
    content: "✨";
    position: absolute;
    font-size: 20px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

@keyframes sparkle-animation {
    0% {
        transform: scale(0) rotate(0deg);
        opacity: 0;
    }
    20% {
        opacity: 1;
    }
    100% {
        transform: scale(1.5) rotate(45deg);
        opacity: 0;
    }
}

@media (min-width: 768px) {
    .start-btn.enhanced i {
        font-size: 1.2rem;
    }
    
    .start-btn.enhanced.cute i {
        font-size: 1.25rem;
    }
}

/* タイムライン表示 - レスポンシブ対応 */
.timeline-header {
    margin-bottom: 16px;
    padding: 0 16px;
}

@media (min-width: 768px) {
    .timeline-header {
        margin-bottom: 20px;
        padding: 0 24px;
    }
}

.timeline-segments {
    display: flex;
    background-color: white;
    padding: 10px;
    border-radius: 30px;
    box-shadow: 0 6px 15px rgba(254, 197, 187, 0.15);
    border: 2px solid rgba(254, 197, 187, 0.1);
}

@media (min-width: 768px) {
    .timeline-segments {
        padding: 12px;
    }
}

.timeline-segment {
    flex: 1;
    text-align: center;
    padding: 8px 0;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-light);
    position: relative;
}

@media (min-width: 768px) {
    .timeline-segment {
        padding: 10px 0;
        font-size: 1rem;
    }
}

.timeline-segment.morning {
    color: var(--warning-color);
}

.timeline-segment.afternoon {
    color: var(--accent-color);
}

.timeline-segment.evening {
    color: var(--primary-color);
}

.timeline-segment span {
    position: relative;
    z-index: 2;
}

.timeline {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 0 16px;
}

@media (min-width: 768px) {
    .timeline {
        gap: 16px;
        padding: 0 24px;
    }
}

.timeline.enhanced {
    padding-top: 16px;
    position: relative;
}

@media (min-width: 768px) {
    .timeline.enhanced {
        padding-top: 20px;
    }
}

.empty-timeline-message {
    background: linear-gradient(145deg, white, #fff5f8);
    border-radius: 28px;
    padding: 28px 20px;
    text-align: center;
    box-shadow: 0 15px 30px rgba(254, 197, 187, 0.2),
                inset 0 -4px 0 rgba(254, 197, 187, 0.05);
    border: 3px dashed var(--cute-pink);
    position: relative;
    overflow: hidden;
    animation: focus-attention 6s ease-in-out infinite;
}

@media (min-width: 768px) {
    .empty-timeline-message {
        padding: 35px 30px;
        border-radius: 35px;
    }
}

.empty-timeline-message::before {
    content: '';
    position: absolute;
    top: 0;
    left: -50%;
    width: 200%;
    height: 100%;
    background: linear-gradient(90deg, 
                transparent, 
                rgba(255, 255, 255, 0.6), 
                transparent);
    animation: shimmer 4s infinite;
}

.empty-illustration {
    background: linear-gradient(135deg, 
                rgba(255, 211, 165, 0.3), 
                rgba(255, 211, 165, 0.1));
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto 16px;
    animation: float-character 4s ease-in-out infinite;
    box-shadow: 0 10px 20px rgba(255, 211, 165, 0.4),
                inset 0 -3px 0 rgba(255, 211, 165, 0.2);
    position: relative;
    z-index: 2;
}

@media (min-width: 480px) {
    .empty-illustration {
        width: 90px;
        height: 90px;
        margin: 0 auto 20px;
    }
}

@media (min-width: 768px) {
    .empty-illustration {
        width: 110px;
        height: 110px;
        margin: 0 auto 24px;
    }
}

.empty-illustration i {
    font-size: 2rem;
    color: var(--warning-color);
    filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.1));
    animation: pulse-subtle 3s ease-in-out infinite;
}

@media (min-width: 480px) {
    .empty-illustration i {
        font-size: 2.2rem;
    }
}

@media (min-width: 768px) {
    .empty-illustration i {
        font-size: 2.5rem;
    }
}

.empty-timeline-message h3 {
    color: var(--text-color);
    margin-bottom: 8px;
    font-size: 1.1rem;
}

@media (min-width: 480px) {
    .empty-timeline-message h3 {
        font-size: 1.2rem;
        margin-bottom: 10px;
    }
}

@media (min-width: 768px) {
    .empty-timeline-message h3 {
        font-size: 1.4rem;
        margin-bottom: 12px;
    }
}

.empty-timeline-message p {
    color: var(--text-light);
    margin-bottom: 20px;
    font-size: 0.9rem;
}

@media (min-width: 480px) {
    .empty-timeline-message p {
        font-size: 1rem;
        margin-bottom: 24px;
    }
}

@media (min-width: 768px) {
    .empty-timeline-message p {
        font-size: 1.1rem;
        margin-bottom: 30px;
    }
}

.guide-btn {
    background: linear-gradient(135deg, var(--primary-color), var(--cute-peach));
    color: white;
    border: none;
    border-radius: 30px;
    padding: 14px 24px;
    font-size: 1rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    cursor: pointer;
    margin: 0 auto;
    box-shadow: 0 10px 25px rgba(254, 197, 187, 0.4),
                inset 0 -3px 0 rgba(0, 0, 0, 0.1);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    animation: float-btn 3s ease-in-out infinite;
    position: relative;
    z-index: 2;
    overflow: hidden;
}

@media (min-width: 480px) {
    .guide-btn {
        padding: 15px 26px;
        font-size: 1.05rem;
    }
}

@media (min-width: 768px) {
    .guide-btn {
        padding: 16px 30px;
        font-size: 1.1rem;
        border-radius: 35px;
    }
}

.guide-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -50%;
    width: 200%;
    height: 100%;
    background: linear-gradient(90deg, 
                transparent, 
                rgba(255, 255, 255, 0.5), 
                transparent);
    animation: shimmer 3s infinite;
}

.guide-btn i {
    margin-right: 8px;
    font-size: 1.1rem;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
    z-index: 2;
    position: relative;
}

@media (min-width: 480px) {
    .guide-btn i {
        font-size: 1.2rem;
        margin-right: 10px;
    }
}

@media (min-width: 768px) {
    .guide-btn i {
        font-size: 1.3rem;
        margin-right: 12px;
    }
}

.guide-btn:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 15px 30px rgba(254, 197, 187, 0.5),
                inset 0 -3px 0 rgba(0, 0, 0, 0.15);
    animation: none;
}

.guide-btn:active {
    transform: translateY(-2px) scale(1.02);
    animation: button-pop 0.2s;
}/* タイマーセクション - シンプルで可愛いスタイル */
.timer-section {
    padding: 16px;
    margin-bottom: 16px;
    background: linear-gradient(135deg, #fff0f5 0%, #f8f8ff 100%);
    border-radius: 30px;
    box-shadow: 0 15px 30px rgba(254, 197, 187, 0.2),
                inset 0 -5px 0 rgba(254, 197, 187, 0.05);
    border: 3px solid rgba(254, 197, 187, 0.2);
}

@media (min-width: 768px) {
    .timer-section {
        padding: 24px;
        margin-bottom: 24px;
        border-radius: 35px;
    }
}

.timer-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

@media (min-width: 768px) {
    .timer-container {
        gap: 30px;
    }
}

/* タイマーキャラクター */
.timer-character {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 10px;
    width: 100%;
}

@media (min-width: 480px) {
    .timer-character {
        flex-direction: row;
        justify-content: center;
        gap: 16px;
        margin-bottom: 15px;
    }
}

.timer-buddy-avatar {
    position: relative;
    width: 70px;
    height: 70px;
    flex-shrink: 0;
}

@media (min-width: 480px) {
    .timer-buddy-avatar {
        width: 80px;
        height: 80px;
    }
}

.timer-buddy-image {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 4px solid var(--cute-pink);
    box-shadow: 0 8px 20px rgba(254, 197, 187, 0.4),
                0 0 0 4px rgba(255, 255, 255, 0.7);
    object-fit: cover;
    animation: pulse-subtle 3s infinite;
}

.timer-mood-indicator {
    position: absolute;
    right: -5px;
    bottom: 0;
    background: linear-gradient(135deg, var(--primary-color), var(--cute-lavender));
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    box-shadow: 0 4px 10px rgba(254, 197, 187, 0.5);
    border: 2px solid white;
    animation: pulse-strong 2s infinite;
}

.timer-speech-bubble {
    background: white;
    border-radius: 20px;
    padding: 12px 16px;
    margin-top: 12px;
    box-shadow: 0 8px 15px rgba(254, 197, 187, 0.15);
    position: relative;
    border: 2px solid var(--cute-pink);
    max-width: 100%;
    text-align: center;
}

@media (min-width: 480px) {
    .timer-speech-bubble {
        margin-top: 0;
        padding: 14px 18px;
        max-width: calc(100% - 90px);
        text-align: left;
    }
    
    .timer-speech-bubble:before {
        content: '';
        position: absolute;
        left: -10px;
        top: 50%;
        transform: translateY(-50%);
        border-width: 10px 10px 10px 0;
        border-style: solid;
        border-color: transparent white transparent transparent;
        z-index: 1;
    }
    
    .timer-speech-bubble:after {
        content: '';
        position: absolute;
        left: -14px;
        top: 50%;
        transform: translateY(-50%);
        border-width: 12px 12px 12px 0;
        border-style: solid;
        border-color: transparent var(--cute-pink) transparent transparent;
        z-index: 0;
    }
}

.timer-speech-bubble p {
    margin: 0;
    color: var(--text-color);
    font-weight: 600;
    font-size: 0.95rem;
}

/* タイマー円形 */
.timer-circle {
    position: relative;
    width: 180px;
    height: 180px;
    display: flex;
    justify-content: center;
    align-items: center;
}

@media (min-width: 480px) {
    .timer-circle {
        width: 220px;
        height: 220px;
    }
}

.timer-svg {
    width: 180px;
    height: 180px;
    transform: rotate(-90deg);
}

@media (min-width: 480px) {
    .timer-svg {
        width: 220px;
        height: 220px;
    }
}

.timer-track {
    fill: none;
    stroke: rgba(254, 197, 187, 0.2);
    stroke-width: 12;
}

.timer-progress {
    fill: none;
    stroke: url(#timer-gradient);
    stroke-width: 12;
    stroke-linecap: round;
    stroke-dasharray: 471.23;
    stroke-dashoffset: 0;
    transition: stroke-dashoffset 1s linear;
    filter: drop-shadow(0 0 8px rgba(254, 197, 187, 0.5));
}

.timer-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    width: 100%;
}

.timer-time {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--text-color);
    margin-bottom: 4px;
    text-shadow: 0 2px 4px rgba(255, 255, 255, 0.8);
    background: linear-gradient(135deg, var(--primary-color), var(--cute-lavender));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

@media (min-width: 480px) {
    .timer-time {
        font-size: 2.8rem;
    }
}

.timer-label {
    font-size: 0.9rem;
    color: var(--text-light);
    font-weight: 600;
}

@media (min-width: 480px) {
    .timer-label {
        font-size: 1rem;
    }
}

/* タイマーコントロール */
.timer-controls {
    display: flex;
    gap: 16px;
    margin-top: 10px;
}

@media (min-width: 480px) {
    .timer-controls {
        gap: 24px;
        margin-top: 15px;
    }
}

.timer-btn {
    width: 120px;
    height: 48px;
    border: none;
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.1);
    gap: 8px;
}

.timer-btn.cute {
    background: linear-gradient(135deg, white, #f8f8ff);
    border: 2px solid;
    box-shadow: 0 8px 20px rgba(254, 197, 187, 0.2);
    color: var(--text-color);
}

.timer-btn.pause {
    border-color: var(--cute-mint);
}

.timer-btn.pause i {
    color: var(--cute-mint);
}

.timer-btn.stop {
    border-color: var(--cute-pink);
}

.timer-btn.stop i {
    color: var(--cute-pink);
}

.timer-btn:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 25px rgba(254, 197, 187, 0.3);
}

.timer-btn:active {
    transform: translateY(-2px);
}

@media (min-width: 480px) {
    .timer-btn {
        width: 140px;
        height: 52px;
        font-size: 1.1rem;
    }
}

/* ナビゲーション - レスポンシブ対応と可愛い配色 */
.bottom-nav {
    display: flex;
    justify-content: space-around;
    background: linear-gradient(to top, white, rgba(255, 240, 245, 0.95));
    box-shadow: 0 -5px 20px rgba(254, 197, 187, 0.25);
    padding: 12px 0;
    position: fixed;
    bottom: 0;
    width: 100%;
    border-top-left-radius: 25px;
    border-top-right-radius: 25px;
    border-top: 1px solid rgba(254, 197, 187, 0.2);
    z-index: 100;
    backdrop-filter: blur(10px);
}

@media (min-width: 768px) {
    .bottom-nav {
        max-width: 600px;
        left: 50%;
        transform: translateX(-50%);
        padding: 16px 0;
        border-top-left-radius: 30px;
        border-top-right-radius: 30px;
    }
}

@media (min-width: 1024px) {
    .bottom-nav {
        max-width: 700px;
    }
}

.nav-btn {
    background: none;
    border: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--text-light);
    font-size: 0.75rem;
    cursor: pointer;
    padding: 8px 10px;
    transition: transform 0.3s, color 0.3s;
    border-radius: 16px;
}

@media (min-width: 480px) {
    .nav-btn {
        padding: 8px 14px;
        font-size: 0.8rem;
    }
}

@media (min-width: 768px) {
    .nav-btn {
        padding: 10px 18px;
        font-size: 0.85rem;
        border-radius: 20px;
    }
}

.nav-btn i {
    font-size: 1.4rem;
    margin-bottom: 5px;
    transition: transform 0.3s;
}

@media (min-width: 480px) {
    .nav-btn i {
        font-size: 1.5rem;
        margin-bottom: 6px;
    }
}

@media (min-width: 768px) {
    .nav-btn i {
        font-size: 1.7rem;
        margin-bottom: 8px;
    }
}

.nav-btn.active {
    color: var(--primary-color);
    background-color: rgba(255, 154, 158, 0.15);
    font-weight: 700;
}

.nav-btn.active i {
    transform: translateY(-4px);
    filter: drop-shadow(0 6px 10px rgba(255, 154, 158, 0.5));
    color: var(--primary-color);
}

.nav-btn:hover:not(.active) {
    color: var(--primary-light);
    transform: translateY(-3px);
}

/* ごほうび画面のレスポンシブ対応 */
.character-section {
    margin-bottom: 24px;
}

@media (min-width: 768px) {
    .character-section {
        margin-bottom: 32px;
    }
}

.character-display {
    background: linear-gradient(145deg, #ffffff, #fff5f8);
    border-radius: 25px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    box-shadow: 0 15px 30px rgba(254, 197, 187, 0.2),
                inset 0 -4px 0 rgba(254, 197, 187, 0.05);
    border: 2px solid rgba(254, 197, 187, 0.2);
    position: relative;
    overflow: hidden;
}

@media (min-width: 480px) {
    .character-display {
        padding: 24px;
        gap: 20px;
        border-radius: 28px;
    }
}

@media (min-width: 768px) {
    .character-display {
        padding: 30px;
        flex-direction: row;
        gap: 24px;
        border-radius: 32px;
    }
}

.character-avatar {
    width: 120px;
    height: 120px;
    border-radius: 60px;
    overflow: hidden;
    box-shadow: 0 12px 30px rgba(254, 197, 187, 0.4), 
                0 0 0 6px rgba(255, 255, 255, 0.8),
                inset 0 0 20px rgba(255, 255, 255, 0.6);
    border: 5px solid var(--cute-pink);
    flex-shrink: 0;
}

@media (min-width: 480px) {
    .character-avatar {
        width: 140px;
        height: 140px;
        border-radius: 70px;
    }
}

@media (min-width: 768px) {
    .character-avatar {
        width: 160px;
        height: 160px;
        border-radius: 80px;
    }
}

.character-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.character-info {
    flex: 1;
    text-align: center;
}

@media (min-width: 768px) {
    .character-info {
        text-align: left;
    }
}

.character-info h3 {
    font-size: 1.4rem;
    color: var(--text-color);
    margin-bottom: 10px;
}

@media (min-width: 480px) {
    .character-info h3 {
        font-size: 1.5rem;
        margin-bottom: 12px;
    }
}

@media (min-width: 768px) {
    .character-info h3 {
        font-size: 1.6rem;
        margin-bottom: 14px;
    }
}

.level-info {
    margin-bottom: 10px;
}

@media (min-width: 768px) {
    .level-info {
        margin-bottom: 12px;
    }
}

.level {
    display: inline-block;
    background: linear-gradient(135deg, var(--primary-color), var(--cute-lavender));
    color: white;
    padding: 6px 14px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 10px;
    box-shadow: 0 6px 15px rgba(254, 197, 187, 0.3);
}

@media (min-width: 480px) {
    .level {
        font-size: 1rem;
        padding: 8px 16px;
        margin-bottom: 12px;
    }
}

@media (min-width: 768px) {
    .level {
        font-size: 1.1rem;
        padding: 8px 18px;
        margin-bottom: 14px;
    }
}

.exp-bar {
    height: 10px;
    background-color: rgba(254, 197, 187, 0.2);
    border-radius: 5px;
    margin-bottom: 8px;
    overflow: hidden;
}

@media (min-width: 480px) {
    .exp-bar {
        height: 12px;
        margin-bottom: 10px;
    }
}

@media (min-width: 768px) {
    .exp-bar {
        height: 14px;
        margin-bottom: 10px;
        max-width: 300px;
    }
}

.exp-progress {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--cute-peach));
    border-radius: 5px;
    width: 35%;
}

.exp-text {
    font-size: 0.9rem;
    color: var(--text-light);
}

@media (min-width: 480px) {
    .exp-text {
        font-size: 1rem;
    }
}

@media (min-width: 768px) {
    .exp-text {
        font-size: 1.05rem;
    }
}

/* 達成バッジセクション */
.badges-section {
    margin-bottom: 24px;
}

@media (min-width: 768px) {
    .badges-section {
        margin-bottom: 32px;
    }
}

.badges-section h3 {
    font-size: 1.2rem;
    margin-bottom: 16px;
    color: var(--text-color);
}

@media (min-width: 480px) {
    .badges-section h3 {
        font-size: 1.3rem;
        margin-bottom: 18px;
    }
}

@media (min-width: 768px) {
    .badges-section h3 {
        font-size: 1.4rem;
        margin-bottom: 20px;
    }
}

.badges-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
}

@media (min-width: 480px) {
    .badges-grid {
        gap: 16px;
    }
}

@media (min-width: 768px) {
    .badges-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 20px;
    }
}

.badge-item {
    background: linear-gradient(145deg, #ffffff, #fff5f8);
    border-radius: 20px;
    padding: 16px 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    box-shadow: 0 8px 20px rgba(254, 197, 187, 0.15);
    border: 2px solid rgba(254, 197, 187, 0.15);
    transition: all 0.3s ease;
}

@media (min-width: 480px) {
    .badge-item {
        padding: 18px 12px;
        gap: 12px;
        border-radius: 22px;
    }
}

@media (min-width: 768px) {
    .badge-item {
        padding: 20px 14px;
        gap: 14px;
        border-radius: 25px;
    }
}

.badge-item i {
    font-size: 1.8rem;
    color: var(--accent-color);
    background: linear-gradient(135deg, var(--cute-yellow), var(--accent-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

@media (min-width: 480px) {
    .badge-item i {
        font-size: 2rem;
    }
}

@media (min-width: 768px) {
    .badge-item i {
        font-size: 2.2rem;
    }
}

.badge-item p {
    font-size: 0.9rem;
    color: var(--text-color);
    font-weight: 600;
    text-align: center;
}

@media (min-width: 480px) {
    .badge-item p {
        font-size: 0.95rem;
    }
}

@media (min-width: 768px) {
    .badge-item p {
        font-size: 1rem;
    }
}

.badge-item.locked {
    filter: grayscale(90%);
    opacity: 0.6;
}

.badge-item:not(.locked):hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(254, 197, 187, 0.3);
}

/* 今日の成果セクション */
.today-achievements {
    margin-bottom: 24px;
}

@media (min-width: 768px) {
    .today-achievements {
        margin-bottom: 32px;
    }
}

.today-achievements h3 {
    font-size: 1.2rem;
    margin-bottom: 16px;
    color: var(--text-color);
}

@media (min-width: 480px) {
    .today-achievements h3 {
        font-size: 1.3rem;
        margin-bottom: 18px;
    }
}

@media (min-width: 768px) {
    .today-achievements h3 {
        font-size: 1.4rem;
        margin-bottom: 20px;
    }
}

.achievement-cards {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 14px;
}

@media (min-width: 480px) {
    .achievement-cards {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
}

@media (min-width: 768px) {
    .achievement-cards {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }
}

.achievement-card {
    background: linear-gradient(145deg, #ffffff, #fff5f8);
    border-radius: 20px;
    padding: 18px 16px;
    display: flex;
    align-items: center;
    gap: 14px;
    box-shadow: 0 8px 20px rgba(254, 197, 187, 0.15);
    border: 2px solid rgba(254, 197, 187, 0.15);
    transition: all 0.3s ease;
}

@media (min-width: 480px) {
    .achievement-card {
        padding: 20px 18px;
        gap: 16px;
        border-radius: 22px;
    }
}

@media (min-width: 768px) {
    .achievement-card {
        padding: 22px 20px;
        gap: 18px;
        border-radius: 25px;
        flex-direction: column;
        text-align: center;
    }
}

.achievement-card i {
    font-size: 2rem;
    color: var(--accent-color);
}

@media (min-width: 480px) {
    .achievement-card i {
        font-size: 2.2rem;
    }
}

@media (min-width: 768px) {
    .achievement-card i {
        font-size: 2.4rem;
    }
}

.achievement-info {
    flex: 1;
}

.achievement-info h4 {
    font-size: 1.4rem;
    color: var(--text-color);
    margin-bottom: 4px;
}

@media (min-width: 480px) {
    .achievement-info h4 {
        font-size: 1.5rem;
        margin-bottom: 5px;
    }
}

@media (min-width: 768px) {
    .achievement-info h4 {
        font-size: 1.6rem;
    }
}

/* 認証関連のスタイル */
.auth-status {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-right: 20px;
}

.user-email {
    color: var(--text-color);
    font-size: 0.9rem;
}

.auth-btn {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.9rem;
    transition: all 0.3s;
}

.auth-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(254, 197, 187, 0.3);
}

.auth-modal {
    max-width: 400px;
}

.auth-switch {
    text-align: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.auth-switch p {
    margin-bottom: 10px;
    color: var(--text-light);
}

.link-btn {
    background: none;
    border: none;
    color: var(--primary-color);
    cursor: pointer;
    font-weight: bold;
    text-decoration: underline;
    transition: color 0.3s;
}

.link-btn:hover {
    color: var(--accent-color);
}

/* ログインプロンプト */
.login-prompt {
    background: linear-gradient(135deg, rgba(254, 197, 187, 0.1), rgba(168, 230, 207, 0.1));
    border-radius: 20px;
    padding: 20px;
    text-align: center;
    margin: 20px 0;
}

.login-prompt h3 {
    color: var(--primary-color);
    margin-bottom: 10px;
}

.login-prompt p {
    color: var(--text-light);
    margin-bottom: 15px;
        font-size: 1.6rem;
        margin-bottom: 6px;
    }
}

.achievement-info p {
    font-size: 0.85rem;
    color: var(--text-light);
}

@media (min-width: 480px) {
    .achievement-info p {
        font-size: 0.9rem;
    }
}

@media (min-width: 768px) {
    .achievement-info p {
        font-size: 0.95rem;
    }
}/* 完了モーダル - レスポンシブ対応と可愛い配色 */
.modal-content.celebration {
    background: radial-gradient(circle at center, #ffffff, #fff0f5);
    padding: 0;
    overflow: hidden;
    border-radius: 30px;
    border: none;
    box-shadow: 0 25px 50px rgba(254, 197, 187, 0.4),
                0 0 0 1px rgba(254, 197, 187, 0.2);
    max-width: 320px;
}

@media (min-width: 480px) {
    .modal-content.celebration {
        max-width: 360px;
        border-radius: 35px;
    }
}

@media (min-width: 768px) {
    .modal-content.celebration {
        max-width: 400px;
        border-radius: 40px;
    }
}

.celebration-content {
    position: relative;
    padding: 35px 24px;
    overflow: hidden;
    z-index: 1;
    animation: pop 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@media (min-width: 480px) {
    .celebration-content {
        padding: 40px 30px;
    }
}

@media (min-width: 768px) {
    .celebration-content {
        padding: 45px 35px;
    }
}

.celebration-content::before {
    content: "";
    position: absolute;
    top: -50px;
    left: -50px;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(255, 244, 204, 0.2) 0%, rgba(255, 244, 204, 0) 70%);
    z-index: -1;
}

.celebration-content::after {
    content: "";
    position: absolute;
    bottom: -50px;
    right: -50px;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(254, 197, 187, 0.2) 0%, rgba(254, 197, 187, 0) 70%);
    z-index: -1;
}

.celebration-icon {
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, var(--accent-color), var(--cute-peach));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    color: white;
    font-size: 2.8rem;
    box-shadow: 0 15px 35px rgba(255, 214, 186, 0.5),
                0 0 0 8px rgba(255, 255, 255, 0.8),
                inset 0 -5px 0 rgba(0, 0, 0, 0.1);
    animation: celebration-bounce 3s infinite, celebrate 1s 0.2s ease-in-out;
    position: relative;
    transform-origin: center;
    overflow: hidden;
}

@media (min-width: 480px) {
    .celebration-icon {
        width: 110px;
        height: 110px;
        font-size: 3rem;
        margin: 0 auto 28px;
    }
}

@media (min-width: 768px) {
    .celebration-icon {
        width: 120px;
        height: 120px;
        font-size: 3.5rem;
        margin: 0 auto 32px;
    }
}

.celebration-icon::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, 
                rgba(255, 255, 255, 0.5) 0%, 
                rgba(255, 255, 255, 0) 60%);
    pointer-events: none;
}

.celebration h3 {
    font-size: 1.8rem;
    margin-bottom: 12px;
    color: var(--text-color);
    font-weight: 800;
    text-align: center;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

@media (min-width: 480px) {
    .celebration h3 {
        font-size: 2rem;
        margin-bottom: 14px;
    }
}

@media (min-width: 768px) {
    .celebration h3 {
        font-size: 2.2rem;
        margin-bottom: 16px;
    }
}

.celebration p {
    margin-bottom: 20px;
    color: var(--text-color);
    font-size: 1.1rem;
    text-align: center;
    font-weight: 600;
}

@media (min-width: 480px) {
    .celebration p {
        font-size: 1.2rem;
        margin-bottom: 24px;
    }
}

@media (min-width: 768px) {
    .celebration p {
        font-size: 1.3rem;
        margin-bottom: 28px;
    }
}

.points-earned {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 25px;
    font-size: 1.4rem;
    font-weight: 800;
    background: linear-gradient(45deg, var(--cute-yellow), var(--accent-light));
    padding: 12px 24px;
    border-radius: 30px;
    color: var(--text-color);
    box-shadow: 0 10px 25px rgba(255, 214, 186, 0.4);
    position: relative;
    overflow: hidden;
}

@media (min-width: 480px) {
    .points-earned {
        font-size: 1.5rem;
        padding: 14px 26px;
        margin-bottom: 30px;
    }
}

@media (min-width: 768px) {
    .points-earned {
        font-size: 1.6rem;
        padding: 16px 30px;
        margin-bottom: 35px;
    }
}

.points-earned::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
                transparent, 
                rgba(255, 255, 255, 0.5), 
                transparent);
    animation: shimmer 2s infinite;
}

.points-earned i {
    color: var(--accent-dark);
    margin-right: 10px;
    font-size: 1.6rem;
    animation: rotate-star 8s linear infinite;
    filter: drop-shadow(0 0 5px rgba(255, 179, 71, 0.8));
}

@media (min-width: 480px) {
    .points-earned i {
        font-size: 1.7rem;
        margin-right: 12px;
    }
}

@media (min-width: 768px) {
    .points-earned i {
        font-size: 1.8rem;
        margin-right: 14px;
    }
}

@keyframes rotate-star {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.celebration .btn.primary {
    background: linear-gradient(45deg, var(--primary-color), var(--cute-lavender));
    border-radius: 30px;
    padding: 14px 32px;
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 1px;
    box-shadow: 0 10px 25px rgba(255, 154, 158, 0.4);
    display: block;
    margin: 0 auto;
    transition: transform 0.3s, box-shadow 0.3s;
    border: none;
    position: relative;
    overflow: hidden;
}

@media (min-width: 480px) {
    .celebration .btn.primary {
        padding: 15px 35px;
        font-size: 1.15rem;
    }
}

@media (min-width: 768px) {
    .celebration .btn.primary {
        padding: 16px 40px;
        font-size: 1.2rem;
        border-radius: 35px;
    }
}

.celebration .btn.primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
                transparent, 
                rgba(255, 255, 255, 0.3), 
                transparent);
    animation: shimmer 2s infinite;
}

.celebration .btn.primary:hover {
    transform: translateY(-5px) scale(1.03);
    box-shadow: 0 15px 30px rgba(255, 154, 158, 0.5);
}

/* Emoji animation for character speech */
.emoji-animate {
    display: inline-block;
    animation: star-rotate 3s linear infinite;
    transform-origin: center;
    font-size: 110%;
    margin-left: 3px;
}

@keyframes star-rotate {
    0% { transform: rotate(0deg) scale(1); }
    25% { transform: rotate(90deg) scale(1.2); }
    50% { transform: rotate(180deg) scale(1); }
    75% { transform: rotate(270deg) scale(1.2); }
    100% { transform: rotate(360deg) scale(1); }
}

/* ADHD特化の視覚的インジケータ - 注意を引く効果 */
.attention-grabber {
    animation: focus-attention 4s ease-in-out infinite;
}

.celebration-bounce {
    animation: celebration-bounce 2s ease-in-out infinite;
}

.reward-shine {
    position: relative;
    overflow: hidden;
}

.reward-shine::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
                transparent, 
                rgba(255, 255, 255, 0.7), 
                transparent);
    animation: shine 2s infinite;
}

/* Progress animation trigger */
.progress-animate .progress-circle svg circle:nth-child(2) {
    animation: progress-fill 2s ease-out forwards;
}

/* Task completion checkmark animation */
.task-completed::after {
    content: '✓';
    position: absolute;
    top: 50%;
    right: 16px;
    transform: translateY(-50%);
    color: var(--success-color);
    font-size: 1.5rem;
    font-weight: bold;
    animation: checkmark-draw 0.8s ease-out;
}

/* Visual feedback for button interactions */
.button-clicked {
    animation: button-pop 0.3s ease-out;
}

/* Micro-interactions for better ADHD user experience */
.interactive-element {
    transition: all 0.2s ease;
}

.interactive-element:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(254, 197, 187, 0.25);
}

.interactive-element:active {
    transform: translateY(0);
    transition-duration: 0.1s;
}

/* 高コントラストモードのサポート */
@media (prefers-contrast: high) {
    :root {
        --primary-color: #e83d95;
        --primary-light: #ff6db3;
        --primary-dark: #c90076;
        --accent-color: #ff9447;
        --accent-light: #ffb980;
        --text-light: #666666;
    }
}

/* モーダルスタイル - 可愛い配色とレスポンシブ対応 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(254, 197, 187, 0.4);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    padding: 16px;
}

.modal-content {
    background: linear-gradient(145deg, #ffffff, #fff5f8);
    border-radius: 25px;
    width: 100%;
    max-width: 350px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 40px rgba(254, 197, 187, 0.3),
                inset 0 -4px 0 rgba(254, 197, 187, 0.05);
    border: 3px solid rgba(254, 197, 187, 0.2);
    animation: pop 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@media (min-width: 480px) {
    .modal-content {
        max-width: 400px;
        border-radius: 30px;
    }
}

@media (min-width: 768px) {
    .modal-content {
        max-width: 450px;
        border-radius: 35px;
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 22px;
    border-bottom: 1px solid rgba(254, 197, 187, 0.15);
    background: linear-gradient(135deg, var(--primary-color), var(--cute-peach));
    color: white;
    border-top-left-radius: 22px;
    border-top-right-radius: 22px;
    position: relative;
    overflow: hidden;
}

@media (min-width: 480px) {
    .modal-header {
        padding: 22px 26px;
        border-top-left-radius: 27px;
        border-top-right-radius: 27px;
    }
}

@media (min-width: 768px) {
    .modal-header {
        padding: 24px 30px;
        border-top-left-radius: 32px;
        border-top-right-radius: 32px;
    }
}

.modal-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: -50%;
    width: 200%;
    height: 100%;
    background: linear-gradient(90deg, 
                transparent, 
                rgba(255, 255, 255, 0.2), 
                transparent);
    animation: shimmer 3s infinite;
}

.modal-header h3 {
    font-size: 1.3rem;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 2;
}

@media (min-width: 480px) {
    .modal-header h3 {
        font-size: 1.4rem;
    }
}

@media (min-width: 768px) {
    .modal-header h3 {
        font-size: 1.5rem;
    }
}

.close-btn {
    background: rgba(255, 255, 255, 0.25);
    border: none;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    position: relative;
    z-index: 2;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

@media (min-width: 480px) {
    .close-btn {
        width: 38px;
        height: 38px;
        font-size: 1.3rem;
    }
}

@media (min-width: 768px) {
    .close-btn {
        width: 40px;
        height: 40px;
        font-size: 1.4rem;
    }
}

.close-btn:hover {
    background: rgba(255, 255, 255, 0.35);
    transform: scale(1.1);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
}

/* フォーム - 可愛い配色とレスポンシブ対応 */
form {
    padding: 24px 22px;
}

@media (min-width: 480px) {
    form {
        padding: 26px 26px;
    }
}

@media (min-width: 768px) {
    form {
        padding: 30px 30px;
    }
}

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

@media (min-width: 768px) {
    .form-group {
        margin-bottom: 24px;
    }
}

label {
    display: block;
    margin-bottom: 10px;
    font-weight: 700;
    color: var(--text-color);
    font-size: 1rem;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
}

@media (min-width: 480px) {
    label {
        font-size: 1.05rem;
        margin-bottom: 12px;
    }
}

@media (min-width: 768px) {
    label {
        font-size: 1.1rem;
        margin-bottom: 14px;
    }
}

input, select {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid rgba(254, 197, 187, 0.3);
    border-radius: 15px;
    font-size: 1rem;
    outline: none;
    transition: all 0.3s ease;
    background: linear-gradient(145deg, #ffffff, #fff8fa);
    font-family: inherit;
    color: var(--text-color);
    box-shadow: 0 4px 10px rgba(254, 197, 187, 0.1);
}

@media (min-width: 480px) {
    input, select {
        padding: 15px 18px;
        border-radius: 18px;
        font-size: 1.05rem;
    }
}

@media (min-width: 768px) {
    input, select {
        padding: 16px 20px;
        border-radius: 20px;
        font-size: 1.1rem;
    }
}

input:focus, select:focus {
    border-color: var(--cute-pink);
    box-shadow: 0 0 0 4px rgba(254, 197, 187, 0.25),
                0 8px 20px rgba(254, 197, 187, 0.2);
    background: #ffffff;
    transform: translateY(-2px);
}

input::placeholder {
    color: var(--text-light);
    opacity: 0.8;
}

.icon-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 10px;
}

@media (min-width: 480px) {
    .icon-grid {
        gap: 12px;
    }
}

@media (min-width: 768px) {
    .icon-grid {
        gap: 14px;
    }
}

.icon-btn {
    width: 50px;
    height: 50px;
    background: linear-gradient(145deg, #ffffff, #fff5f8);
    border: 2px solid rgba(254, 197, 187, 0.2);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: var(--text-color);
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 10px rgba(254, 197, 187, 0.15);
}

@media (min-width: 480px) {
    .icon-btn {
        width: 52px;
        height: 52px;
        font-size: 1.4rem;
        border-radius: 16px;
    }
}

@media (min-width: 768px) {
    .icon-btn {
        width: 54px;
        height: 54px;
        font-size: 1.5rem;
        border-radius: 18px;
    }
}

.icon-btn:hover {
    background: linear-gradient(145deg, #fff5f8, #ffeef2);
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 20px rgba(254, 197, 187, 0.25);
}

.icon-btn.active {
    background: linear-gradient(135deg, var(--cute-pink), var(--cute-peach));
    color: white;
    border-color: var(--cute-pink);
    box-shadow: 0 8px 20px rgba(254, 197, 187, 0.4);
    transform: translateY(-2px);
}

.icon-btn.active:hover {
    transform: translateY(-4px) scale(1.08);
    box-shadow: 0 12px 25px rgba(254, 197, 187, 0.5);
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 28px;
    flex-wrap: wrap;
}

@media (min-width: 480px) {
    .form-actions {
        gap: 14px;
        margin-top: 32px;
        flex-wrap: nowrap;
    }
}

.form-actions .task-button {
    padding: 10px 20px;
    font-size: 0.95rem;
    border-radius: 22px;
    min-width: 80px;
}

@media (min-width: 480px) {
    .form-actions .task-button {
        padding: 12px 24px;
        font-size: 1rem;
        min-width: 90px;
    }
}