:root {
    --primary: #27ae60;
    --primary-dark: #219150;
    --danger: #e74c3c;
    --bg: #f0f4f8;
    --card-bg: #ffffff;
    --text: #333;
    --gray: #555;
    --border: #e0e0e0;
}

body {
    font-family: "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif;
    background-color: var(--bg);
    color: var(--text);
    margin: 0;
    padding: 20px 5px;
    /* 固定バーの分だけ上部を空ける */
    padding-top: 90px;
    display: flex;
    flex-direction: column;
    align-items: center;
    line-height: 1.6;
}

.container {
    width: 100%;
    max-width: 800px;
}

/* --- 固定進捗バー --- */
.fixed-progress-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 70px; /* バーの高さ確保 */
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(5px);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.progress-container {
    width: 90%;
    max-width: 800px;
    background: transparent;
    padding: 0;
    border-radius: 50px;
    display: flex;
    align-items: center;
    box-shadow: none;
    margin-bottom: 0;
}

.progress-label { font-weight: bold; margin-right: 15px; white-space: nowrap; font-size: 0.9rem; padding-left: 10px; }
.progress-bar-bg {
    flex-grow: 1;
    height: 12px;
    background-color: #eee;
    border-radius: 6px;
    overflow: hidden;
}
.progress-bar-fill {
    height: 100%;
    background-color: var(--primary);
    width: 0%;
    transition: width 0.5s ease;
}
.progress-text {
    margin-left: 15px;
    font-weight: bold;
    color: var(--primary);
    min-width: 40px;
}

/* --- ヘッダー --- */
header { text-align: center; margin-bottom: 30px; margin-top: 10px; }
        /* ロゴ画像のスタイル */
    .app-logo {
        max-width: 100%;
        height: auto;
        width: 500px;
        display: block;
        margin: 0 auto;
    }

    /* タイトルエリアの調整 */
    h1.title {
        text-align: center;
        margin-bottom: 10px;
        margin-top: 0;
        padding: 0 10px;
    }
.subtitle { font-size: 0.9rem; color: var(--gray); }

/* --- SEO用リード文 --- */
.seo-intro {
    background: #fff;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 30px;
    font-size: 0.95rem;
    color: #444;
}
.seo-intro h2 {
    font-size: 1.2rem;
    color: #2c3e50;
    border-bottom: 2px solid var(--primary);
    padding-bottom: 10px;
    margin-top: 0;
}

/* --- 使い方ガイド --- */
.usage-guide {
    background: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    margin-bottom: 30px;
    overflow: hidden;
    transition: all 0.3s ease;
}
.usage-guide[open] {
    border-color: var(--primary);
    box-shadow: 0 4px 15px rgba(39, 174, 96, 0.15);
}
.usage-guide summary {
    background-color: #f9f9f9;
    padding: 15px 30px;
    font-weight: bold;
    color: #2c3e50;
    cursor: pointer;
    position: relative;
    list-style: none;
    display: flex;
    align-items: center;
    gap: 15px;
    outline: none;
}
.usage-guide summary:hover { background-color: #f0f0f0; }
.usage-guide summary i { color: var(--primary); font-size: 1.2rem; }
.usage-guide summary::after {
    content: '\f078';
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    position: absolute;
    right: 20px;
    top: calc(50% - 8px);
    color: #999;
    font-size: 1rem;
    transition: transform 0.3s;
}
.usage-guide[open] summary::after { transform: rotate(180deg); }

.usage-content {
    padding: 20px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    background: #fff;
}
.usage-item { display: flex; align-items: flex-start; gap: 15px; }
.usage-icon {
    background: #e8f5e9;
    color: var(--primary);
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}
.usage-text strong { display: block; margin-bottom: 5px; color: #2c3e50; }
.usage-text p { margin: 0; font-size: 0.85rem; color: #666; line-height: 1.5; }

/* --- 日付入力カード --- */
.date-card {
    background: var(--card-bg);
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    text-align: center;
    margin-bottom: 30px;
    border-top: 5px solid var(--primary);
    transition: border-color 0.3s;
}
.date-card.busy-mode {
    border-top-color: var(--danger);
    background-color: #fff5f5;
}
.date-input-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-top: 15px;
    flex-wrap: wrap; /* 折り返しを許可 */
}
/* --- 日付入力欄のカスタマイズ --- */
input[type="date"] {
    padding: 10px 15px;
    padding-left: 45px; /* アイコンの分だけ文字を右にずらす */
    font-size: 1.1rem;
    border: 2px solid var(--border);
    border-radius: 6px;
    outline: none;
    width: auto;
    max-width: 300px;
    cursor: pointer; /* マウスを指の形にする */
    position: relative; /* アイコン配置の基準 */
    
    /* カレンダーアイコンを背景として配置（グレーのアイコン） */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 448 512'%3E%3Cpath fill='%23777' d='M152 64H296V24C296 10.75 306.7 0 320 0C333.3 0 344 10.75 344 24V64H384C419.3 64 448 92.65 448 128V448C448 483.3 419.3 512 384 512H64C28.65 512 0 483.3 0 448V128C0 92.65 28.65 64 64 64H104V24C104 10.75 114.7 0 128 0C141.3 0 152 10.75 152 24V64zM48 248H128V192H48V248zM48 296V360H128V296H48zM176 296V360H272V296H176V248H272V192zM320 296V360H400V296H320zM400 192H320V248H400V192zM272 192H176V248H272V192zM48 408H128V464H48V408zM176 408H272V464H176V408zM320 408H400V464H320V408z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: 12px 50%; /* 左から12px、上下中央に配置 */
    background-size: 20px; /* アイコンの大きさ */
    transition: 0.3s;
}

input[type="date"]:hover {
    border-color: var(--primary); /* ホバー時に枠線を緑色に */
    background-color: #f9fdf9;
}

/* 【裏技】入力欄のどこをクリックしてもカレンダーが開くようにする設定 */
input[type="date"]::-webkit-calendar-picker-indicator {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0; /* 本来のアイコンを透明にして全体に広げる */
    cursor: pointer;
    top: 0;
    left: 0;
}
/* ボタン共通 */
.save-btn, .reset-btn {
    border: none;
    padding: 12px 25px;
    font-size: 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    transition: 0.3s;
}
/* 作成ボタン */
.save-btn {
    background-color: var(--primary);
    color: white;
}
.save-btn:hover { background-color: var(--primary-dark); }
.busy-mode .save-btn { background-color: var(--danger); }
.busy-mode .save-btn:hover { background-color: #c0392b; }

/* リセットボタン */
.reset-btn {
    background-color: #95a5a6;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center; /* アイコン位置調整 */
    gap: 8px;
}
.reset-btn:hover { background-color: #7f8c8d; }

/* --- 繁忙期アラート --- */
.busy-alert {
    display: none;
    background-color: var(--danger);
    color: white;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    text-align: left;
    box-shadow: 0 4px 10px rgba(231, 76, 60, 0.3);
    animation: pulse 2s infinite;
}
.busy-alert strong { font-size: 1.1rem; display: block; margin-bottom: 5px; }
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.02); }
    100% { transform: scale(1); }
}

/* --- タスクリスト --- */
.todo-section {
    background: var(--card-bg);
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.03);
    position: relative;
}
.section-header {
    background: #f8f9fa;
    padding: 15px 20px;
    font-weight: bold;
    color: #2c3e50;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border);
    margin: 0;
    font-size: 1.1rem;
}
.section-desc {
    font-size: 0.85rem;
    color: #666;
    margin-top: 5px;
    font-weight: normal;
    display: block;
    line-height: 1.4;
}
.step-badge {
    background: #2c3e50;
    color: #fff;
    font-size: 0.75rem;
    padding: 2px 8px;
    border-radius: 4px;
    margin-right: 8px;
    vertical-align: middle;
}
.limit-date {
    font-size: 0.85rem;
    color: #e74c3c;
    background: #fff0f0;
    padding: 3px 8px;
    border-radius: 4px;
    white-space: nowrap;
}
.task-list { list-style: none; margin: 0; padding: 0; }
.task-item {
    display: flex;
    align-items: flex-start;
    padding: 15px 20px;
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.2s;
    cursor: pointer;
}
.task-item:last-child { border-bottom: none; }
.task-item:hover { background-color: #fcfcfc; }

.checkbox-custom {
    width: 22px;
    height: 22px;
    border: 2px solid #ccc;
    border-radius: 50%;
    margin-right: 15px;
    margin-top: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: 0.2s;
}
.task-item.checked .checkbox-custom {
    background-color: var(--primary);
    border-color: var(--primary);
}
.busy-mode .task-item.checked .checkbox-custom {
    background-color: var(--danger);
    border-color: var(--danger);
}
.task-item.checked .checkbox-custom::after {
    content: '\f00c';
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    color: white;
    font-size: 12px;
}
.task-content { flex-grow: 1; }
.task-title {
    font-weight: bold;
    margin-bottom: 6px;
    display: block;
    font-size: 1.05rem;
    color: #2c3e50;
}
.task-item.checked .task-title { text-decoration: line-through; color: #aaa; }
.task-desc { font-size: 0.9rem; color: var(--gray); line-height: 1.6; display: block; }
.urgent-text { color: var(--danger); font-weight: bold; }

/* --- 広告エリア（ASP対応版） --- */
.ad-box-container {
    background: linear-gradient(135deg, #fce38a, #f38181);
    border-radius: 12px;
    padding: 20px 15px;
    text-align: center;
    margin: 30px 0;
    box-shadow: 0 4px 15px rgba(243, 129, 129, 0.3);
    transition: transform 0.2s;
}
.ad-box-container:hover {
    transform: translateY(-2px);
}

/* 繁忙期モード（赤くなる） */
.busy-mode .ad-box-container {
    background: linear-gradient(135deg, #ff9966, #ff5e62);
    animation: shake 3s infinite;
}

/* 誘導メッセージ */
.ad-message-area {
    color: #fff;
    font-weight: bold;
    font-size: 1.1rem;
    margin-bottom: 15px;
    line-height: 1.4;
}
.ad-sub {
    font-size: 0.85rem;
    background: rgba(255,255,255,0.2);
    padding: 2px 8px;
    border-radius: 4px;
    display: inline-block;
    margin-top: 5px;
}

/* タグエリア（バナーが中央に来るように） */
.ad-tag-area img {
    max-width: 100%;
    height: auto;
    vertical-align: bottom;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1); /* バナーを少し浮かせる */
    border-radius: 4px;
}

/* --- FAQセクション --- */
.faq-section {
    background: #fff;
    padding: 20px;
    border-radius: 12px;
    margin-top: 30px;
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.03);
}
.faq-section h2 {
    font-size: 1.3rem;
    color: #2c3e50;
    border-bottom: 2px solid var(--primary);
    padding-bottom: 10px;
    margin-top: 0;
    margin-bottom: 15px;
}
.faq-item { border-bottom: 1px solid #eee; }
.faq-item:last-child { border-bottom: none; }
.faq-item details { padding: 15px 0; cursor: pointer; transition: all 0.3s; }
.faq-item summary {
    font-weight: bold;
    color: #333;
    list-style: none;
    position: relative;
    padding-right: 30px;
    outline: none;
}
.faq-item summary::after {
    content: '+';
    position: absolute;
    right: 0;
    top: 0;
    color: var(--primary);
    font-weight: bold;
    font-size: 1.2rem;
    transition: transform 0.3s;
}
.faq-item details[open] summary::after { transform: rotate(45deg); }
.faq-answer {
    margin-top: 10px;
    color: #666;
    font-size: 0.95rem;
    line-height: 1.6;
    padding-left: 15px;
    border-left: 3px solid #eee;
}
summary::-webkit-details-marker { display: none; }

/* --- スマート＆クールなフッター --- */
.site-footer {
    margin-top: 60px;
    background-color: #2c3e50; /* 知的なダークネイビー */
    color: #ecf0f1; /* 明るいグレー文字 */
    font-size: 0.9rem;
}

/* 上部エリア（2カラム） */
.footer-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 50px 20px;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 40px;
}

/* 左側：ブランド情報 */
.footer-brand {
    flex: 1;
    min-width: 280px;
}
.footer-brand h3 {
    color: #fff;
    font-size: 1.4rem;
    margin: 0 0 15px 0;
    font-weight: bold;
    letter-spacing: 0.05em;
}
.footer-brand p {
    color: #bdc3c7;
    line-height: 1.8;
    margin-bottom: 20px;
}
.footer-operator {
    background: rgba(255,255,255,0.1);
    display: inline-block;
    padding: 8px 15px;
    border-radius: 4px;
    font-size: 0.85rem;
}
.op-label {
    background: #27ae60;
    color: #fff;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.75rem;
    margin-right: 8px;
    font-weight: bold;
}

/* 右側：リンクメニュー */
.footer-links {
    flex: 0 0 250px; /* 幅固定 */
}
.footer-links h4 {
    color: #27ae60; /* アクセントカラー */
    font-size: 1rem;
    margin: 0 0 20px 0;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding-bottom: 10px;
}
.footer-links ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.footer-links li {
    margin-bottom: 12px;
}
.footer-links a {
    color: #ecf0f1;
    text-decoration: none;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
}
.footer-links a:hover {
    color: #27ae60;
    padding-left: 5px; /* ホバーで少し右に動く */
}
.footer-links i {
    font-size: 0.8rem;
    color: #7f8c8d;
}

/* 下部：コピーライトエリア */
.footer-bottom {
    background-color: #1a252f; /* さらに暗い色 */
    padding: 20px;
    text-align: center;
    border-top: 1px solid rgba(255,255,255,0.05);
}
.footer-note {
    font-size: 0.75rem;
    color: #7f8c8d;
    margin-bottom: 10px;
}
.copyright {
    font-size: 0.8rem;
    color: #95a5a6;
    letter-spacing: 0.05em;
}

/* スマホ対応 */
@media (max-width: 600px) {
    .footer-container {
        flex-direction: column;
        gap: 30px;
        text-align: center; /* スマホは中央揃え */
    }
    .footer-brand, .footer-links {
        width: 100%;
        min-width: auto;
        flex: auto;
    }
    /* スマホではリンクを中央寄せに */
    .footer-links a {
        justify-content: center;
    }
    .footer-links a:hover {
        padding-left: 0; /* 動きを無効化 */
        opacity: 0.8;
    }
}

/* --- PR表記 --- */
.pr-notice {
    font-size: 0.75rem;     /* 小さめの文字 */
    color: #95a5a6;         /* 薄いグレー */
    text-align: right;      /* 右寄せで邪魔にならないように */
    margin: 0 0 5px 0;      /* 下に少し隙間を空ける */
    padding: 0 5px;
}

/* スマホでは左寄せ（または中央）が見やすい場合もお好みで調整可 */
@media (max-width: 600px) {
    .pr-notice {
        text-align: center; /* スマホなら中央揃えもアリ */
    }
}

/* --- レスポンシブ修正（スマホ） --- */
@media (max-width: 600px) {
    .app-logo {
        max-width: 85%;
    }
    .date-input-wrapper {
        flex-direction: row; /* 横並びを許可 */
        justify-content: space-between;
        width: 100%;
        gap: 10px; /* 余白調整 */
    }
    
    /* 日付入力：1行目独占 */
    input[type="date"] {
        width: 100%;
        margin-bottom: 5px; /* ボタンとの距離 */
    }

    /* ボタン：2行目で横並び（半々の幅） */
    .save-btn, .reset-btn {
        width: calc(50% - 5px); /* 隙間10pxを考慮して半分の幅 */
        padding: 12px 5px; /* テキストが長くても入るよう調整 */
        font-size: 0.9rem; /* スマホ用に少し小さく */
    }
    
    .usage-content { grid-template-columns: 1fr; }
}