body {
    /* 読み込んだ Noto Sans JP を最優先にする */
    font-family: 'Noto Sans JP', sans-serif;
} 
.container {

    max-width: 800px;

    margin: 0 auto;

}



header {

    text-align: center;

    margin-bottom: 60px;

    padding: 40px 0;

    animation: fadeIn 1s ease;

}



.main-visual {

    width: 100%;

    height: 300px;

    border-radius: 20px;

    margin-bottom: 40px;

    cursor: pointer;

    box-shadow: 0 10px 30px rgba(0,0,0,0.15);

    position: relative;

    overflow: hidden;

}



.header-image {

    width: 100%;

    height: auto;

    object-fit: cover;

    display: block;

}



header h1 {

    font-size: 2.8rem;

    color: #2c3e50;

    margin-bottom: 10px;

    font-weight: 300;

    letter-spacing: 2px;

}



header p {

    color: #7f8c8d;

    font-size: 1rem;

    margin-bottom: 30px;

}



.search-container {

    max-width: 500px;

    margin: 0 auto;

}



.search-form {

    display: flex;

    gap: 10px;

    background: white;

    padding: 10px;

    border-radius: 50px;

    box-shadow: 0 4px 15px rgba(0,0,0,0.1);

    transition: box-shadow 0.3s ease;

}



.search-form:focus-within {

    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.3);

}



.search-input {

    flex: 1;

    border: none;

    padding: 12px 20px;

    font-size: 1rem;

    background: transparent;

    color: #2c3e50;

    outline: none;

}



.search-input::placeholder {

    color: #bdc3c7;

}



.search-button {

    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);

    color: white;

    border: none;

    padding: 12px 30px;

    border-radius: 50px;

    font-size: 1rem;

    font-weight: 600;

    cursor: pointer;

    transition: transform 0.2s ease, box-shadow 0.2s ease;

}



.search-button:hover {

    transform: translateY(-2px);

    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);

}



.search-button:active {

    transform: translateY(0);

}



.search-message {

    margin-top: 15px;

    font-size: 0.9rem;

    color: #7f8c8d;

    min-height: 20px;

}



.search-message.error {

    color: #e74c3c;

}



.search-message.loading {

    color: #667eea;

}



.diary-entry {

    background: white;

    margin-bottom: 40px;

    border-radius: 12px;

    box-shadow: 0 2px 8px rgba(0,0,0,0.08);

    overflow: hidden;

    animation: slideUp 0.6s ease;

    transition: box-shadow 0.3s ease, transform 0.3s ease;

}



.diary-entry:hover {

    box-shadow: 0 8px 20px rgba(0,0,0,0.12);

    transform: translateY(-3px);

}



.entry-date-header {

    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);

    color: white;

    padding: 20px 30px;

    display: flex;

    align-items: center;

    gap: 15px;

}



.date-box {

    background: rgba(255,255,255,0.2);

    backdrop-filter: blur(10px);

    border-radius: 8px;

    padding: 10px 15px;

    text-align: center;

    min-width: 80px;

}



.date-day {

    font-size: 2rem;

    font-weight: 700;

    line-height: 1;

}



.date-month {

    font-size: 0.9rem;

    opacity: 0.9;

    margin-top: 5px;

}



.date-time {

    font-size: 0.85rem;

    opacity: 0.8;

}



.date-info-compact {

    display: flex;

    gap: 6px;

    align-items: center;

    margin-bottom: 4px;

}



.date-label-compact {

    font-size: 0.75rem;

    opacity: 0.7;

    font-weight: 600;

}



.date-relative {

    font-size: 0.85rem;

    opacity: 0.9;

}



.entry-content {

    padding: 30px;

}



.entry-title {

    font-size: 1.6rem;

    color: #2c3e50;

    margin-bottom: 20px;

    font-weight: 600;

}



.entry-text {

    color: #555;

    font-size: 1rem;

    line-height: 1.9;

    margin-bottom: 20px;

}



.entry-tags {

    display: flex;

    gap: 10px;

    flex-wrap: wrap;

}



.tag {

    background: #ecf0f1;

    color: #7f8c8d;

    padding: 5px 12px;

    border-radius: 20px;

    font-size: 0.85rem;

    transition: background 0.3s ease;

}



.tag:hover {

    background: #667eea;

    color: white;

}



.new-badge {

    background: #e74c3c;

    color: white;

    padding: 4px 10px;

    border-radius: 4px;

    font-size: 0.75rem;

    font-weight: 600;

    text-transform: uppercase;

    margin-top: 5px;

    display: inline-block;

}



.read-more-btn {

    display: inline-block;

    margin-top: 20px;

    padding: 10px 24px;

    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);

    color: white;

    text-decoration: none;

    border-radius: 25px;

    font-size: 0.9rem;

    font-weight: 600;

    transition: all 0.3s ease;

    box-shadow: 0 4px 10px rgba(102, 126, 234, 0.3);

}



.read-more-btn:hover {

    transform: translateY(-2px);

    box-shadow: 0 6px 15px rgba(102, 126, 234, 0.4);

}



@keyframes fadeIn {

    from {

        opacity: 0;

    }

    to {

        opacity: 1;

    }

}



@keyframes slideUp {

    from {

        opacity: 0;

        transform: translateY(30px);

    }

    to {

        opacity: 1;

        transform: translateY(0);

    }

}



@keyframes fadeOut {

    from {

        opacity: 1;

        transform: translateY(0);

    }

    to {

        opacity: 0;

        transform: translateY(-20px);

    }

}



.diary-entry:nth-child(2) {

    animation-delay: 0.1s;

}



.diary-entry:nth-child(3) {

    animation-delay: 0.2s;

}



.diary-entry:nth-child(4) {

    animation-delay: 0.3s;

}



.diary-entry:nth-child(5) {

    animation-delay: 0.4s;

}



@media (max-width: 768px) {

    header h1 {

        font-size: 2rem;

    }



    .entry-date-header {

        padding: 15px 20px;

    }



    .entry-content {

        padding: 20px;

    }



    .entry-title {

        font-size: 1.3rem;

    }

}



/* パスワードモーダル用アニメーション */

@keyframes shake {

    0%, 100% {

        transform: translateX(0);

    }

    10%, 30%, 50%, 70%, 90% {

        transform: translateX(-10px);

    }

    20%, 40%, 60%, 80% {

        transform: translateX(10px);

    }

}



@keyframes fadeOut {

    from {

        opacity: 1;

    }

    to {

        opacity: 0;

    }

}



/* 個別記事ページ用のスタイル */

.breadcrumb {

    margin-bottom: 30px;

    font-size: 0.9rem;

    color: #7f8c8d;

    animation: fadeIn 0.8s ease;

}



.breadcrumb a {

    color: #667eea;

    text-decoration: none;

    transition: color 0.3s ease;

}



.breadcrumb a:hover {

    color: #764ba2;

}



.breadcrumb-separator {

    margin: 0 10px;

    color: #bdc3c7;

}



.breadcrumb-current {

    color: #2c3e50;

}



.article-detail {

    background: white;

    border-radius: 12px;

    box-shadow: 0 2px 8px rgba(0,0,0,0.08);

    overflow: hidden;

    margin-bottom: 50px;

    animation: slideUp 0.6s ease;

}



.article-title {

    font-size: 2.2rem;

    color: #2c3e50;

    margin-bottom: 30px;

    font-weight: 600;

    line-height: 1.4;

}



.article-body {

    color: #333;

    font-size: 1.1rem;

    line-height: 2;

    margin-bottom: 30px;

}



.article-body p {

    margin-bottom: 1.5rem;

}



.related-articles {

    margin-bottom: 50px;

    animation: slideUp 0.8s ease;

}



.section-title {

    font-size: 1.8rem;

    color: #2c3e50;

    margin-bottom: 25px;

    font-weight: 600;

    padding-bottom: 15px;

    border-bottom: 3px solid #667eea;

}



.related-grid {

    display: grid;

    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));

    gap: 20px;

}



.related-card {

    background: white;

    padding: 20px;

    border-radius: 10px;

    box-shadow: 0 2px 6px rgba(0,0,0,0.08);

    text-decoration: none;

    transition: all 0.3s ease;

    display: block;

}



.related-card:hover {

    transform: translateY(-5px);

    box-shadow: 0 6px 15px rgba(0,0,0,0.15);

}



.related-date {

    color: #667eea;

    font-size: 0.85rem;

    font-weight: 600;

    margin-bottom: 10px;

}



.related-title {

    color: #2c3e50;

    font-size: 1.1rem;

    font-weight: 600;

    margin-bottom: 12px;

    line-height: 1.4;

}



.related-tags {

    display: flex;

    gap: 6px;

    flex-wrap: wrap;

}



.tag-small {

    background: #ecf0f1;

    color: #7f8c8d;

    padding: 3px 8px;

    border-radius: 12px;

    font-size: 0.75rem;

}



.back-to-top {

    text-align: center;

    margin-bottom: 50px;

    animation: fadeIn 1s ease;

}



.back-button {

    display: inline-block;

    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);

    color: white;

    padding: 15px 40px;

    border-radius: 50px;

    text-decoration: none;

    font-weight: 600;

    transition: all 0.3s ease;

    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);

}



.back-button:hover {

    transform: translateY(-3px);

    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);

}



@media (max-width: 768px) {
    /* --- 既存のコードはそのまま --- */

    header {
        /* 上下の余白（40px）を 10px くらいまで削ります */
        padding: 10px 0; 
        /* 下の要素（検索窓）との間隔（60px）を半分に詰めます */
        margin-bottom: 30px; 
    }

    .main-visual {
        /* スマホでは高さを固定せず、画像に合わせます */
        height: auto; 
        /* 外枠の下の余白（40px）を半分にします */
        margin-bottom: 20px; 
        /* 角丸が画像に反映されるように設定 */
        overflow: hidden; 
    }

    .header-image {
        /* 縦横比を維持して表示 */
        height: auto; 
        display: block;
    }
}

