﻿/*
 * Lipify Blog homepage, 2026-11-16.
 * Install: wp-content/themes/xeory_base/assets/css/lipify-home.css
 * Scope: front-page.php only. No article / comparison-table selectors.
 */


#content.lph-content {
    padding: 28px 0 48px;
    background: #fff;
}
/* Xeory Base標準の.wrap・#main・#side幅をそのまま使用 */
#lph-home {
    --lph-green: #176b50;
    --lph-text: #252e2a;
    --lph-muted: #6c7771;
    --lph-line: #e5eae7;
    --lph-soft: #f4f7f5;
    display: block;
    float: none;
    clear: both;
    width: 100%;
    min-width: 0;
    max-width: none;
    margin: 0;
    padding: 0;
    color: var(--lph-text);
    font-family: inherit;
    font-size: 14px;
    line-height: 1.6;
    overflow-wrap: anywhere;
}
#lph-home,
#lph-home * {
    box-sizing: border-box;
}
#lph-home a {
    color: inherit;
    background: transparent;
    text-decoration: none;
}
#lph-home a:focus-visible,
#lph-home summary:focus-visible {
    outline: 2px solid var(--lph-green);
    outline-offset: 3px;
}
#lph-home .lph-section {
    display: block;
    margin: 0 0 38px;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
}
#lph-home .lph-section:last-child {
    margin-bottom: 0;
}
#lph-home .lph-section-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 4px 16px;
    margin: 0 0 16px;
    padding: 0 0 10px;
    border: 0;
    border-bottom: 1px solid var(--lph-line);
    background: transparent;
}
#lph-home .lph-heading,
#lph-home .lph-category-title,
#lph-home .lph-card-title {
    position: static;
    float: none;
    clear: none;
    width: auto;
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    color: var(--lph-text);
    background: transparent;
    box-shadow: none;
    text-align: left;
    font-family: inherit;
    letter-spacing: normal;
    text-indent: 0;
}
#lph-home .lph-heading::before,
#lph-home .lph-heading::after,
#lph-home .lph-category-title::before,
#lph-home .lph-category-title::after,
#lph-home .lph-card-title::before,
#lph-home .lph-card-title::after {
    display: none;
    content: none;
}
#lph-home .lph-heading {
    font-size: 22px;
    font-weight: 700;
    line-height: 1.4;
}
#lph-home .lph-section-note {
    margin: 0;
    padding: 0;
    color: var(--lph-muted);
    font-size: 12px;
    font-weight: 400;
    line-height: 1.5;
}


/* Popular: 4 cards on desktop, 2 x 2 on mobile. */
#lph-home .lph-popular-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}
#lph-home article.lph-card {
    float: none;
    width: auto;
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}
#lph-home .lph-card-link {
    display: block;
    height: 100%;
}
#lph-home .lph-cover {
    display: block;
    width: 100%;
    aspect-ratio: 1.95;
    margin: 0 0 9px;
    border: 1px solid var(--lph-line);
    border-radius: 4px;
    background: var(--lph-soft);
    overflow: hidden;
}
#lph-home .lph-image {
    display: block;
    width: 100%;
    height: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    object-fit: cover;
    box-shadow: none;
}
#lph-home .lph-no-image {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    color: #4e6c5c;
    background: var(--lph-soft);
    font-size: 14px;
    font-weight: 600;
    letter-spacing: .02em;
}
#lph-home .lph-card-category {
    display: block;
    margin: 0 0 4px;
    color: var(--lph-green);
    font-size: 10px;
    font-weight: 500;
    line-height: 1.5;
}
#lph-home .lph-card-title {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    overflow: hidden;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.65;
}
#lph-home .lph-card-link:hover .lph-card-title,
#lph-home .lph-row-link:hover .lph-row-title {
    color: var(--lph-green);
    text-decoration: underline;
    text-underline-offset: 3px;
}


/* Category navigation: plain text links, not a carousel. */
#lph-home .lph-category-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 20px;
    margin: 0 0 22px;
    padding: 0;
    border: 0;
}
#lph-home .lph-category-nav a {
    display: inline-block;
    padding: 4px 0;
    color: var(--lph-green);
    font-size: 12px;
    font-weight: 500;
    line-height: 1.5;
    border-bottom: 1px solid #d6e3db;
}
#lph-home .lph-category-nav a:hover {
    border-bottom-color: var(--lph-green);
}
#lph-home .lph-category-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
    gap: 18px;
}
#lph-home .lph-category {
    display: block;
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
    border-top: 2px solid #b9d3c3;
    background: transparent;
    box-shadow: none;
    scroll-margin-top: 90px;
}
#lph-home .lph-category-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin: 0;
    padding: 9px 0 7px;
    border: 0;
    background: transparent;
}
#lph-home .lph-category-title {
    flex: 1 1 auto;
    font-size: 17px;
    font-weight: 700;
    line-height: 1.5;
}
#lph-home .lph-archive-link {
    flex: 0 0 auto;
    padding: 3px 0;
    color: var(--lph-green);
    font-size: 11px;
    font-weight: 500;
    line-height: 1.5;
    white-space: nowrap;
}
#lph-home .lph-archive-link:hover {
    text-decoration: underline;
    text-underline-offset: 3px;
}




/* ====================================================
   カテゴリ：人気記事を横スクロールで閲覧
   本文の幅に収め、各カテゴリ最大10件を横へ並べる。
   ==================================================== */
#content.lph-content #main,
#content.lph-content #main .main-inner,
#lph-home .lph-topics,
#lph-home .lph-category {
    min-width: 0;
}


#lph-home .lph-category-actions {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 10px;
}


#lph-home .lph-rail-controls {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}


#lph-home .lph-rail-arrow {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    min-width: 28px;
    margin: 0;
    padding: 0 !important;
    border: 1px solid #d8e5dc;
    border-radius: 4px;
    background: #fff;
    box-shadow: none;
    color: var(--lph-green);
    font-size: 22px;
    font-weight: 400;
    line-height: 1;
    cursor: pointer;
    transition: border-color .15s, background .15s;
}


#lph-home .lph-rail-arrow:hover {
    border-color: #b4cbbd;
    background: var(--lph-soft);
}


#lph-home .lph-rail-arrow:focus-visible,
#lph-home ol.lph-category-rail:focus-visible {
    outline: 2px solid var(--lph-green);
    outline-offset: 2px;
}


#lph-home ol.lph-category-rail {
    display: flex !important;
    flex-flow: row nowrap;
    gap: 12px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    margin: 0;
    padding: 0 1px 10px;
    border: 0;
    background: transparent;
    list-style: none;
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-inline: contain;
    scroll-snap-type: x proximity;
    scroll-padding-inline: 1px;
    scrollbar-width: thin;
    scrollbar-color: #c9d8ce transparent;
    -webkit-overflow-scrolling: touch;
}


#lph-home ol.lph-category-rail::-webkit-scrollbar { height: 5px; }
#lph-home ol.lph-category-rail::-webkit-scrollbar-thumb {
    background: #c9d8ce;
    border-radius: 6px;
}


#lph-home ol.lph-category-rail > li.lph-rail-item {
    position: static;
    display: block !important;
    flex: 0 0 clamp(158px, 28%, 186px);
    min-width: 0;
    max-width: none;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    list-style: none;
    scroll-snap-align: start;
}


#lph-home ol.lph-category-rail > li.lph-rail-item::before,
#lph-home ol.lph-category-rail > li.lph-rail-item::after {
    display: none !important;
    content: none !important;
}


#lph-home .lph-rail-card {
    display: flex;
    flex-direction: column;
    gap: 7px;
    height: 100%;
    color: var(--lph-text);
    text-decoration: none;
}


#lph-home .lph-rail-cover {
    display: block;
    width: 100%;
    aspect-ratio: 1.92;
    margin: 0;
    border: 1px solid var(--lph-line);
    border-radius: 4px;
    background: var(--lph-soft);
    overflow: hidden;
}


#lph-home .lph-rail-cover .lph-image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}


#lph-home .lph-rail-title {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    margin: 0;
    padding: 0;
    color: var(--lph-text);
    font-size: 12px;
    font-weight: 600;
    line-height: 1.6;
    text-align: left;
    overflow: hidden;
    overflow-wrap: anywhere;
}


#lph-home .lph-rail-card:hover .lph-rail-title {
    color: var(--lph-green);
    text-decoration: underline;
    text-underline-offset: 3px;
}


@media (max-width: 767px) {
    #lph-home .lph-category-actions { gap: 8px; }
    #lph-home .lph-rail-arrow {
        width: 26px;
        height: 26px;
        min-width: 26px;
    }
    #lph-home ol.lph-category-rail { gap: 10px; }
    #lph-home ol.lph-category-rail > li.lph-rail-item {
        flex-basis: 154px;
    }
    #lph-home .lph-rail-title { font-size: 12px; }
}


/* Compact rows. Titles remain complete in HTML and the link title. */
#lph-home ol.lph-list {
    display: block;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    list-style: none;
    counter-reset: none;
}
#lph-home .lph-list > li.lph-row {
    display: block;
    position: static;
    float: none;
    width: auto;
    margin: 0;
    padding: 0;
    border: 0;
    border-bottom: 1px solid var(--lph-line);
    background: transparent;
    list-style: none;
    text-indent: 0;
    box-shadow: none;
}
#lph-home .lph-list > li.lph-row::before,
#lph-home .lph-list > li.lph-row::after {
    display: none;
    content: none;
}
#lph-home .lph-row-link {
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    min-height: 65px;
    margin: 0;
    padding: 9px 0;
}
#lph-home .lph-thumb {
    display: block;
    width: 64px;
    height: 44px;
    margin: 0;
    border: 1px solid var(--lph-line);
    border-radius: 3px;
    background: var(--lph-soft);
    overflow: hidden;
}
#lph-home .lph-thumb .lph-no-image {
    font-size: 10px;
}
#lph-home .lph-row-copy {
    display: block;
    min-width: 0;
    margin: 0;
    padding: 0;
}
#lph-home .lph-row-title {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    margin: 0;
    padding: 0;
    color: var(--lph-text);
    font-size: 13px;
    font-weight: 500;
    line-height: 1.55;
    text-align: left;
    overflow: hidden;
}
#lph-home .lph-date {
    display: block;
    margin: 0 0 3px;
    color: var(--lph-muted);
    font-size: 11px;
    font-weight: 400;
    font-variant-numeric: tabular-nums;
    line-height: 1.4;
}
#lph-home ol.lph-latest-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 36px;
}
#lph-home .lph-latest .lph-row-link {
    min-height: 78px;
}
#lph-home .lph-empty {
    margin: 0;
    padding: 16px 0;
    color: var(--lph-muted);
    font-size: 13px;
}


@media (max-width: 767px) {
    #content.lph-content {
        padding: 20px 0 32px;
    }
    #lph-home .lph-section {
        margin-bottom: 30px;
    }
    #lph-home .lph-heading {
        font-size: 20px;
    }
    #lph-home .lph-section-head {
        margin-bottom: 14px;
    }
    #lph-home .lph-section-note {
        font-size: 11px;
    }
    #lph-home .lph-popular-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 20px 14px;
    }
    #lph-home .lph-card-title {
        font-size: 13px;
        line-height: 1.6;
    }
    #lph-home .lph-card-category {
        font-size: 10px;
    }
    #lph-home .lph-category-nav {
        gap: 6px 16px;
        margin-bottom: 20px;
    }
    #lph-home .lph-category-nav a {
        font-size: 11px;
    }
    #lph-home .lph-category-grid {
        gap: 18px;
    }
    #lph-home .lph-category-title {
        font-size: 16px;
    }
    #lph-home .lph-row-link {
        grid-template-columns: 64px minmax(0, 1fr);
        gap: 11px;
        min-height: 66px;
    }
    #lph-home .lph-row-title {
        font-size: 13px;
        line-height: 1.6;
    }
    #lph-home ol.lph-latest-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 0;
    }
}


@media print {
    #lph-home .lph-category-nav,
    #lph-home .lph-rail-controls { display: none !important; }


    #lph-home ol.lph-category-rail {
        display: flex;
        flex-wrap: wrap;
        overflow: visible;
        gap: 12px;
    }


    #lph-home .lph-category-grid { display: block; }


    #lph-home .lph-category {
        break-inside: avoid;
        margin-bottom: 20px;
    }
}

/* Lipify category descriptions v2 */
#lph-home .lph-category-description {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    margin: 0 0 12px !important;
    padding: 0 !important;
    border: 0;
    background: transparent;
    color: var(--lph-muted, #6c7771);
    font-size: 12px;
    font-weight: 400;
    line-height: 1.7;
    letter-spacing: normal;
    text-align: left;
    overflow-wrap: anywhere;
}

@media (max-width: 767px) {
    #lph-home .lph-category-description {
        font-size: 12px;
        line-height: 1.65;
        margin-bottom: 10px !important;
        -webkit-line-clamp: 3;
    }
}