/* ==========================================================
   植木屋日記 - 一覧（絵日記風カード）
   ========================================================== */

.diary-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.diary-card {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 16px 16px 20px;
    background-color: #fffdf1;
    background-image:
        radial-gradient(
            circle at 10% 15%,
            rgba(255, 224, 143, 0.15) 0,
            transparent 30%
        );
    border: 3px solid #69a9d6;
    border-radius: 12px 8px 15px 9px;
    box-shadow: 5px 6px 0 #dcebd4;
    transform: rotate(-0.3deg);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.diary-card:nth-child(even) {
    transform: rotate(0.3deg);
}

.diary-card:nth-child(3n) {
    transform: rotate(-0.15deg);
}

/* ホバーで少し浮き上がる効果 */
.diary-card:hover {
    transform: translateY(-5px) rotate(0deg);
    box-shadow: 7px 8px 0 #dcebd4;
}

/* 日付シールと葉っぱ */
.diary-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}

.diary-card-date {
    display: inline-block;
    padding: 2px 11px;
    background: #ffe58a;
    border: 2px dashed #d2a847;
    border-radius: 8px;
    color: #51452b;
    font-size: 0.8rem;
    font-weight: 700;
}

.diary-card-leaf {
    font-size: 1.3rem;
}

/* タイトルはクレヨン風にせず、通常の見出しのまま */
.diary-card-title-link {
    text-decoration: none;
}

.diary-card h2 {
    margin: 0 0 12px;
    font-size: 1.15rem;
    line-height: 1.45;
    color: #263c2c;
    transition: color 0.2s ease;
}

.diary-card-title-link:hover h2 {
    color: #2e7d32;
}

/* 写真（点線フレーム） */
.diary-card-image {
    position: relative;
    display: block;
    overflow: hidden;
    margin: 0 0 12px;
    padding: 6px;
    background: #fff;
    border: 2px dashed #83b978;
    border-radius: 5px;
    transform: rotate(0.4deg);
}

.diary-card-image img {
    width: 100%;
    height: 170px;
    object-fit: cover;
    display: block;
    border-radius: 3px;
    transition: transform 0.4s ease;
}

.diary-card:hover .diary-card-image img {
    transform: scale(1.04);
}

.diary-card-caption {
    position: absolute;
    right: 14px;
    bottom: 14px;
    padding: 1px 10px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 10px;
    color: #397749;
    font-size: 0.75rem;
    font-weight: 700;
}

.diary-card-body {
    display: flex;
    flex-direction: column;
    flex-grow: 1; /* 高さを揃える */
}

/* 本文（リード文）だけクレヨン風フォント */
.diary-card-lead {
    margin: 0 0 12px;
    font-family: 'Yomogi', cursive, sans-serif;
    font-size: 1.05rem;
    font-weight: 400;
    line-height: 1.85;
    color: #44503f;
}

.diary-plant {
    margin-top: 2px;
    font-weight: bold;
    color: #2e7d32; /* 植物らしいアクセントカラー例 */
}

.diary-more {
    display: inline-block;
    margin-top: auto; /* カード下部に固定 */
    padding-top: 6px;
    font-weight: bold;
    color: #397749;
    text-decoration: none;
}

.diary-more:hover {
    text-decoration: underline;
}

.diary-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: #888;
}


/* ==========================================================
   植木屋日記 - 詳細（Detail）
   ========================================================== */

.diary-detail {
    max-width: 900px;
    margin: 0 auto;
}

.diary-header {
    margin-bottom: 30px;
}

.diary-header time {
    font-size: 0.95rem;
    opacity: 0.75;
}

.diary-header h1 {
    margin-top: 10px;
    font-size: 2rem;
    line-height: 1.3;
}

.diary-main-image {
    margin: 0 0 35px;
}

.diary-main-image img {
    width: 100%;
    max-height: 600px;
    object-fit: cover;
    border-radius: 14px;
    display: block;
}

.diary-lead {
    padding: 22px;
    margin-bottom: 30px;
    border-radius: 12px;
    background: #f5f5f5;
    font-size: 1.1rem;
    line-height: 1.7;
}

.diary-content {
    line-height: 2;
    font-size: 1rem;
    color: #333;
}

/* 本文内の画像や見出しへの標準スタイル設定 */
.diary-content p {
    margin-bottom: 1.5em;
}

.diary-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

.diary-related {
    margin-top: 50px;
    padding: 25px;
    border-radius: 12px;
    background: #f5f5f5;
}

.diary-related h2 {
    font-size: 1.15rem;
    margin-bottom: 10px;
}

.diary-related a {
    color: #2e7d32;
    text-decoration: none;
    font-weight: bold;
}

.diary-related a:hover {
    text-decoration: underline;
}

.diary-back {
    margin-top: 40px;
}

.diary-back a {
    color: #666;
    text-decoration: none;
    font-weight: bold;
}

.diary-back a:hover {
    color: #333;
}


/* ==========================================================
   植木屋日記 - 子供の絵日記風パーツ（詳細ページ本文）
   ========================================================== */

.picture-diary {
    position: relative;
    margin: 35px 0;
    padding: clamp(18px, 4vw, 34px);
    background-color: #fffdf1;
    background-image:
        radial-gradient(
            circle at 10% 15%,
            rgba(255, 224, 143, 0.15) 0,
            transparent 30%
        );
    border: 3px solid #69a9d6;
    border-radius: 12px 8px 15px 9px;
    box-shadow: 5px 6px 0 #dcebd4;
    transform: rotate(-0.2deg);
}

/* 日付と葉っぱ */

.picture-diary-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.picture-diary-date {
    display: inline-block;
    padding: 3px 13px;
    background: #ffe58a;
    border: 2px dashed #d2a847;
    border-radius: 8px;
    color: #51452b;
    font-size: 0.9rem;
    font-weight: 700;
}

.picture-diary-leaf {
    font-size: 1.7rem;
}

/* タイトル */

.picture-diary h2 {
    margin: 18px 0 24px;
    padding-bottom: 8px;
    color: #397749;
    font-size: clamp(1.4rem, 4vw, 1.8rem);
    line-height: 1.5;
    text-align: center;
    text-decoration: underline;
    text-decoration-style: wavy;
    text-decoration-color: #e7bb50;
    text-underline-offset: 8px;
}

/* 日記内の写真 */

.picture-diary-image {
    margin: 0 auto 24px;
    padding: 8px;
    max-width: 620px;
    background: #fff;
    border: 2px dashed #83b978;
    border-radius: 5px;
    transform: rotate(0.4deg);
}

.picture-diary-image img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 3px;
}

.picture-diary-image figcaption {
    padding: 5px 4px 0;
    color: #687663;
    font-size: 0.85rem;
    text-align: center;
}

/* 横線入りの絵日記本文（クレヨン風フォント） */

.picture-diary-story {
    padding: 4px 10px;
    background-image: repeating-linear-gradient(
        to bottom,
        transparent 0,
        transparent 34px,
        rgba(91, 157, 198, 0.24) 35px,
        transparent 36px
    );
    font-family: 'Yomogi', cursive, sans-serif;
    font-size: 1.15rem;
    font-weight: 400;
    line-height: 2.2;
    color: #41483b;
    -webkit-text-stroke: 0.2px #41483b;
    text-shadow: 0.3px 0.3px 0 rgba(65, 72, 59, 0.15);
    overflow-wrap: anywhere;
}

.picture-diary-story p {
    margin: 0 0 10px;
}

.picture-diary-image figcaption {
    font-family: 'Yomogi', cursive, sans-serif;
    font-size: 0.95rem;
}

/* 署名 */

.picture-diary-sign {
    margin-top: 24px;
    padding-top: 12px;
    border-top: 2px dashed #c5dcb9;
    color: #397749;
    font-family: 'Yomogi', cursive, sans-serif;
    font-size: 1.05rem;
    font-weight: 400;
    letter-spacing: 0.04em;
    text-align: right;
}


/* ==========================================================
   レスポンシブ対応（タブレット / スマホ）
   ========================================================== */

/* タブレット（2列化） */
@media (max-width: 1024px) {
    .diary-list {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

/* スマホ */
@media (max-width: 768px) {

    .diary-list {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .diary-card img {
        height: 200px;
    }

    .diary-header h1 {
        font-size: 1.5rem;
    }

    .diary-main-image {
        margin-bottom: 25px;
    }

    .diary-main-image img {
        max-height: 350px;
    }

    .diary-lead {
        padding: 16px;
        font-size: 1rem;
    }

    .diary-content {
        line-height: 1.8;
    }

    .picture-diary {
        padding: 17px;
        box-shadow: 3px 4px 0 #dcebd4;
    }

    .picture-diary-story {
        padding: 4px 5px;
        font-size: 1rem;
        line-height: 2.15;
    }

}
