/* 首页：按指定效果图重建，内页沿用公共样式。 */
.home-page {
    background: #fcf4f1;
    color: #271a1a;
    line-height: 1.55;
}
.home-wrap {
    width: calc(100% - 64px);
    max-width: 1600px;
    margin-inline: auto;
}
.home-header {
    display: flex;
    align-items: center;
    gap: 30px;
    width: calc(100% - 120px);
    max-width: 1580px;
    margin: auto;
    min-height: 78px;
}
.home-header .brand {
    font-family: "KaiTi", "STKaiti", "Noto Serif CJK SC", serif;
    color: #790f1b;
    font-size: 32px;
    line-height: 1.1;
    gap: 10px;
}
.home-header .brand small {
    font-family: sans-serif;
    font-weight: 400;
    color: #4a3030;
    font-size: 14px;
    letter-spacing: .3em;
    margin-top: 5px;
}
.home-header nav {
    flex: 1;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    font-size: 17px;
    font-weight: 600;
    border-left: 1px solid #e3b9b9;
    padding-left: 30px;
}
.home-header nav a {
    padding: 8px 12px;
    white-space: nowrap;
}
.home-header nav .active {
    background: #cf4268;
    color: white;
    border-radius: 9px;
}
.search {
    display: flex;
    width: 278px;
    border: 1px solid #e6b4bd;
    border-radius: 22px;
    overflow: hidden;
    flex-shrink: 0;
    background: white;
}
.search input {
    min-width: 0;
    width: 100%;
    border: 0;
    padding: 10px 18px;
    font: inherit;
    font-size: 14px;
    background: transparent;
}
.search button {
    border: 0;
    background: #cf4268;
    color: white;
    padding: 0 16px;
    font-size: 28px;
    cursor: pointer;
    line-height: 1;
}
.home-hero {
    position: relative;
    min-height: 370px;
    overflow: hidden;
    background: #f5d9d7;
}
.hero-photo {
    position: absolute;
    inset: 0 0 0 auto;
    width: 72%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}
.hero-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg,#fbe8e5 0%,#fae8e5 22%,rgba(250,232,229,.94) 33%,rgba(250,232,229,.18) 48%,transparent 60%);
}
.hero-content {
    position: relative;
    max-width: 1600px;
    margin: auto;
    padding: 27px 7% 32px;
}
.brush {
    display: inline-block;
    background: linear-gradient(100deg,#cf4164,#b62c49);
    color: white;
    padding: 3px 25px;
    font: 600 25px/1.35 "KaiTi","Noto Serif CJK SC",serif;
    clip-path: polygon(4% 7%,95% 0,92% 12%,100% 20%,95% 40%,100% 65%,95% 80%,98% 95%,0 100%,5% 77%,0 62%,5% 37%,0 20%);
}
.hero-content h1 {
    margin: 8px 0 12px;
    font-family: "KaiTi","STKaiti","Noto Serif CJK SC",serif;
    font-size: clamp(30px,3.15vw,49px);
    line-height: 1.18;
    color: #78191c;
    letter-spacing: .025em;
}
.brush.sub {
    font-size: 22px;
    background: #b74a50;
}
.hero-content p {
    max-width: 435px;
    margin: 12px 0 14px;
    font-size: 16px;
}
.hero-button {
    display: inline-block;
    padding: 9px 28px;
    border: 1px solid white;
    border-radius: 30px;
    background: linear-gradient(110deg,#9b3342,#d24b59);
    color: white;
    font-size: 19px;
}
.hero-button:hover {
    color: white;
}
.category-bar {
    position: relative;
    margin-top: -8px;
    display: grid;
    grid-template-columns: repeat(6,minmax(0,1fr));
    padding: 17px 12px;
    background: #fffaf5;
    border: 1px solid #e8c8bf;
    border-radius: 12px;
    box-shadow: 0 3px 8px #7b263014;
    gap: 0;
}
.category {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    border-right: 1px solid #ead8d1;
    padding: 0 6px;
}
.category:last-child {
    border: 0;
}
.category svg {
    width: 48px;
    height: 48px;
    flex: 0 0 48px;
    color: #b83838;
}
.category strong {
    display: block;
    font-family: "KaiTi","Noto Serif CJK SC",serif;
    font-size: 23px;
    color: #381619;
    white-space: nowrap;
}
.category small {
    font-size: 13px;
    display: block;
}
.content-grid {
    display: grid;
    grid-template-columns: minmax(0,2.4fr) minmax(0,1fr);
    gap: 22px;
    margin-top: 16px;
    margin-bottom: 16px;
}
.feature-panel,.recommend-panel {
    background: #fffaf7;
    border: 1px solid #f0e2dc;
    padding: 14px;
    border-radius: 12px;
    min-width: 0;
}
.section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 15px;
}
.section-heading h2,.recommend-panel h2 {
    margin: 0;
    font-size: 26px;
    color: #55151b;
    font-family: "KaiTi","Noto Serif CJK SC",serif;
}
.section-heading h2 span {
    color: #cf4564;
}
.section-heading h2 small {
    font-size: 21px;
    font-weight: 500;
    color: #32191b;
}
.section-heading > a {
    color: #922b35;
    white-space: nowrap;
}
.feature-grid {
    display: grid;
    grid-template-columns: repeat(3,minmax(0,1fr));
    gap: 14px;
}
.feature img {
    width: 100%;
    aspect-ratio: 1.9;
    object-fit: cover;
    border-radius: 7px;
}
.feature h3 {
    margin: 8px 0 3px;
    font-size: 17px;
    line-height: 1.5;
}
.feature p,.recommend p {
    margin: 0;
    color: #65504d;
    font-size: 14px;
}
.recommend-panel {
    border: 1px solid #e7c4bd;
    border-radius: 4px;
}
.recommend-panel h2 {
    padding: 0 4px 8px;
}
.recommend {
    display: grid;
    grid-template-columns: 120px minmax(0,1fr);
    align-items: center;
    gap: 14px;
    padding: 7px 0;
    border-bottom: 1px solid #f1e4df;
}
.recommend:last-child {
    border: 0;
}
.recommend img {
    width: 100%;
    height: 68px;
    object-fit: cover;
    border-radius: 6px;
}
.recommend h3 {
    font-size: 16px;
    margin: 0 0 3px;
}
.landscape-banner {
    min-height: 146px;
    background: linear-gradient(90deg,#f6d9dc 0%,#f8e6e4 32%,transparent 75%),url("banner.webp") right center/auto 100% no-repeat;
    display: flex;
    align-items: center;
    padding: 15px 8%;
}
.landscape-banner h2 {
    color: #90232b;
    font: 700 clamp(25px,3vw,45px)/1.3 "KaiTi","Noto Serif CJK SC",serif;
    margin: 0 0 10px;
}
.landscape-banner p {
    color: #68232a;
    font-size: 19px;
    margin: 0;
}
.home-page .site-footer {
    background: #fff8f3;
    color: #68434a;
    border-top: 1px solid #e7c8c4;
    padding: 18px 0;
}
[hidden] {
    display: none !important;
}
#search-status {
    grid-column: 1/-1;
}
@media (max-width: 1200px) {
    .home-header {
        width: calc(100% - 36px);
        flex-wrap: wrap;
        gap: 12px;
        padding: 8px 0;
    }
    .home-header nav {
        order: 3;
        flex-basis: 100%;
        padding: 0;
        border: 0;
        justify-content: flex-start;
    }
    .search {
        margin-left: auto;
    }
    .category-bar {
        grid-template-columns: repeat(3,minmax(0,1fr));
        row-gap: 15px;
    }
    .category:nth-child(3) {
        border: 0;
    }
    .category strong {
        font-size: 20px;
    }
    .recommend {
        grid-template-columns: 90px minmax(0,1fr);
        gap: 8px;
    }
}
@media (max-width: 760px) {
    .home-wrap {
        width: calc(100% - 24px);
    }
    .home-header .brand {
        font-size: 25px;
    }
    .home-header .brand img {
        width: 44px;
        height: 44px;
    }
    .search {
        width: 100%;
    }
    .home-header nav {
        font-size: 14px;
        gap: 2px;
    }
    .home-header nav a {
        padding: 6px 8px;
    }
    .home-hero {
        min-height: 400px;
    }
    .hero-photo {
        width: 100%;
        height: 52%;
        object-position: center;
    }
    .hero-shade {
        background: linear-gradient(0deg,#fae8e5 43%,rgba(250,232,229,.1) 72%,transparent);
    }
    .hero-content {
        padding: 172px 18px 22px;
    }
    .hero-content h1 {
        font-size: 29px;
    }
    .brush {
        font-size: 19px;
    }
    .brush.sub {
        font-size: 17px;
    }
    .hero-content p {
        font-size: 14px;
    }
    .category-bar {
        grid-template-columns: repeat(2,minmax(0,1fr));
        padding: 12px 4px;
        gap: 12px 0;
    }
    .category {
        justify-content: flex-start;
        gap: 6px;
    }
    .category svg {
        width: 30px;
        height: 30px;
        flex-basis: 30px;
    }
    .category strong {
        font-size: 17px;
    }
    .category small {
        font-size: 11px;
    }
    .category:nth-child(3) {
        border-right: 1px solid #ead8d1;
    }
    .category:nth-child(even) {
        border: 0;
    }
    .content-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    .section-heading h2 {
        font-size: 22px;
    }
    .section-heading h2 small {
        display: block;
        font-size: 15px;
    }
    .feature-grid {
        grid-template-columns: 1fr;
    }
    .feature img {
        aspect-ratio: 1.9;
    }
    .landscape-banner {
        padding: 16px;
    }
    .landscape-banner p {
        font-size: 14px;
    }
}

/* Narrow screens and keyboard accessibility */
.home-header nav {
    min-width: 0;
}
.search:focus-within {
    outline: 2px solid #a73550;
    outline-offset: 2px;
}
.category span {
    min-width: 0;
}
@media (min-width: 1201px) and (max-width: 1450px) {
    .home-header {
        gap: 12px;
        width: calc(100% - 48px);
    }
    .home-header nav {
        padding-left: 12px;
        gap: 3px;
        font-size: 15px;
    }
    .home-header nav a {
        padding: 8px 6px;
    }
    .search {
        width: 210px;
    }
}
@media (max-width: 380px) {
    .category small {
        overflow-wrap: anywhere;
    }
    .category strong {
        white-space: normal;
    }
}
