.dynamic-main {
    padding-bottom: 54px;
}

.home-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 28px;
    align-items: stretch;
    padding-top: 30px;
    padding-bottom: 26px;
}

.hero-visual {
    min-width: 0;
    height: 480px;
    position: relative;
    display: block;
    overflow: hidden;
    border-radius: 8px;
    background: #dfe8e3;
}

.hero-visual img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.hero-visual span {
    position: absolute;
    left: 22px;
    top: 22px;
    padding: 7px 11px;
    color: #fff;
    background: rgba(24, 42, 34, 0.82);
    border-radius: 4px;
    font-size: 12px;
}

.home-recommend {
    height: 480px;
    display: flex;
    flex-direction: column;
    padding: 20px 20px 12px;
    background: #fff;
    border: 1px solid var(--line);
    border-top: 4px solid var(--accent);
    border-radius: 8px;
    box-shadow: 0 14px 34px rgba(36, 26, 16, 0.09);
}

.home-recommend-head {
    min-height: 65px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 0 2px 14px;
    border-bottom: 1px solid var(--line);
}

.home-recommend-head span,
.band-heading span,
.category-intro > span {
    display: block;
    margin-bottom: 5px;
    color: var(--accent);
    font-size: 12px;
    font-weight: 600;
}

.home-recommend-head h1 {
    margin: 0;
    font-size: 24px;
    line-height: 1.2;
}

.home-recommend-head > small {
    margin-top: 6px;
    padding: 4px 8px;
    color: var(--accent);
    background: var(--accent-soft);
    border-radius: 4px;
}

.home-recommend-list {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.home-recommend-item {
    flex: 1 1 0;
    min-height: 0;
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr) 22px;
    gap: 12px;
    align-items: center;
    padding: 8px 2px;
    border-bottom: 1px solid var(--line);
}

.home-recommend-item:last-child {
    border-bottom: 0;
}

.home-recommend-item:hover,
.band-heading > a:hover,
.recommend-link-grid a:hover {
    color: var(--accent);
}

.home-recommend-item img {
    width: 52px;
    height: 52px;
    display: block;
    object-fit: cover;
    border-radius: 6px;
}

.home-recommend-item > span {
    min-width: 0;
}

.home-recommend-item strong {
    max-height: 2.8em;
    display: -webkit-box;
    overflow: hidden;
    font-size: 15px;
    line-height: 1.4;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.home-recommend-item small {
    display: block;
    margin-top: 5px;
    color: var(--muted);
    font-size: 12px;
}

.home-recommend-item > b {
    color: var(--accent);
    font-size: 12px;
    text-align: right;
}

.category-band {
    padding: 36px 0 42px;
    border-top: 1px solid var(--line);
    background: #fff;
}

.category-band:nth-of-type(even) {
    background: #f1f4f3;
}

.band-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 20px;
}

.band-heading h2 {
    margin: 0;
    font-size: 28px;
    line-height: 1.2;
}

.band-heading > a {
    padding-bottom: 3px;
    color: var(--muted);
    font-size: 13px;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
}

.product-card {
    min-width: 0;
    overflow: hidden;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.product-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 28px rgba(32, 36, 34, 0.1);
}

.product-image {
    width: 100%;
    aspect-ratio: 4 / 3;
    display: block;
    overflow: hidden;
    background: #e8ebec;
}

.product-image img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.product-card:hover .product-image img {
    transform: scale(1.025);
}

.product-copy {
    padding: 17px 18px 16px;
}

.product-copy > span {
    color: #39705b;
    font-size: 11px;
}

.product-copy h3 {
    min-height: 3em;
    margin: 8px 0 10px;
    overflow: hidden;
    font-size: 17px;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.product-copy p {
    height: 3.5em;
    margin: 0 0 14px;
    overflow: hidden;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.75;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.product-copy > div {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--line);
}

.product-copy small {
    color: var(--muted);
}

.product-copy b {
    color: var(--accent);
    font-size: 12px;
}

.information-recommend {
    padding-top: 42px;
}

.recommend-link-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1px;
    overflow: hidden;
    background: var(--line);
    border: 1px solid var(--line);
    border-radius: 8px;
}

.recommend-link-grid a {
    min-width: 0;
    min-height: 78px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 15px 18px;
    overflow: hidden;
    background: #fff;
    font-size: 14px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.recommend-link-grid small {
    margin-top: 7px;
    color: var(--muted);
    font-size: 11px;
}

.category-intro {
    padding-top: 32px;
    padding-bottom: 26px;
}

.category-intro h1 {
    margin: 4px 0 8px;
    font-size: 32px;
}

.category-intro p {
    margin: 0;
    color: var(--muted);
}

.category-results {
    min-height: 360px;
    padding-bottom: 54px;
}

.empty-results {
    min-height: 220px;
    display: grid;
    place-items: center;
    color: var(--muted);
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
}

.site-header nav a.active {
    color: var(--accent);
}

/* 多风格共用兜底：推荐内容可能因长标题变高，不能被固定高度裁掉或溢出卡片 */
body[class*="front-theme-"] .home-recommend {
    height: auto;
    min-height: 0;
    max-width: 100%;
    overflow: hidden;
}

body[class*="front-theme-"] .home-recommend-list {
    flex: 0 0 auto;
    min-height: 0;
    max-height: none;
}

body[class*="front-theme-"] .home-recommend-item {
    flex: 0 0 auto;
    min-height: 0;
    max-width: 100%;
}

body[class*="front-theme-"] .home-recommend-item > span {
    min-width: 0;
    overflow: hidden;
}

body[class*="front-theme-"] .home-recommend-item strong {
    max-height: 2.8em;
    display: -webkit-box;
    overflow: hidden;
    line-height: 1.4;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

body[class*="front-theme-"] .home-recommend-item small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@media (max-width: 1000px) {
    .home-hero {
        grid-template-columns: 1fr;
    }

    .hero-visual {
        height: auto;
        aspect-ratio: 16 / 8;
    }

    .home-recommend {
        height: auto;
    }

    .home-recommend-list {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .home-recommend-item {
        min-height: 78px;
    }

    .product-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .home-hero {
        gap: 18px;
        padding-top: 18px;
    }

    .hero-visual {
        aspect-ratio: 16 / 9;
    }

    .home-recommend {
        padding: 18px 16px 8px;
    }

    .home-recommend-list,
    .product-grid,
    .recommend-link-grid {
        grid-template-columns: 1fr;
    }

    .category-band {
        padding: 30px 0 34px;
    }

    .band-heading h2,
    .category-intro h1 {
        font-size: 25px;
    }

    .product-copy h3,
    .product-copy p {
        min-height: 0;
        height: auto;
    }
}

.auth-main,
.publish-main,
.about-main,
.member-main {
    padding-top: 30px;
}

.auth-layout,
.publish-layout,
.about-layout,
.member-grid {
    display: grid;
    grid-template-columns: 360px minmax(0, 1fr);
    gap: 28px;
    align-items: start;
}

.auth-copy,
.publish-tips,
.about-nav,
.member-hero,
.member-card,
.auth-card,
.publish-card,
.about-content,
.search-hero,
.php-404 {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 10px;
    box-shadow: 0 14px 34px rgba(36, 26, 16, 0.08);
}

.auth-copy,
.publish-tips,
.about-content,
.search-hero,
.php-404 {
    padding: 34px;
}

.auth-copy span,
.publish-tips span,
.about-content > span,
.search-hero > span,
.member-hero span {
    display: block;
    margin-bottom: 10px;
    color: var(--accent);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
}

.auth-copy h1,
.publish-tips h1,
.about-content h1,
.search-hero h1,
.php-404 h1,
.member-hero h1 {
    margin: 0 0 14px;
}

.auth-copy p,
.publish-tips p,
.about-content p,
.search-hero p,
.php-404 p,
.member-hero p {
    color: var(--muted);
    line-height: 1.9;
}

.publish-tips ul {
    margin: 20px 0 0;
    padding-left: 18px;
    color: var(--muted);
    line-height: 1.9;
}

.front-form {
    display: grid;
    gap: 16px;
    padding: 28px;
}

.publish-card {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.front-form label {
    display: grid;
    gap: 8px;
    color: #303438;
    font-size: 15px;
    font-weight: 600;
}

.front-form input,
.front-form select,
.front-form textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 7px;
    padding: 12px 13px;
    color: var(--ink);
    background: #fff;
    font: inherit;
    font-weight: 400;
    outline: none;
}

.front-form textarea {
    resize: vertical;
}

.front-form input:focus,
.front-form select:focus,
.front-form textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft);
}

.front-form button,
.front-modal button,
.php-404 a,
.member-hero a {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 7px;
    padding: 0 18px;
    color: #fff;
    background: var(--accent);
    cursor: pointer;
    font: inherit;
    font-weight: 700;
}

.span-2 {
    grid-column: span 2;
}

.captcha-line {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 118px;
    gap: 10px;
}

.captcha-line img {
    width: 118px;
    height: 45px;
    object-fit: cover;
    border: 1px solid var(--line);
    border-radius: 7px;
    cursor: pointer;
}

.check-line {
    display: flex !important;
    grid-template-columns: none !important;
    align-items: center;
    gap: 8px !important;
    color: var(--muted) !important;
    font-size: 13px !important;
    font-weight: 400 !important;
}

.check-line input {
    width: auto;
}

.form-links {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin: 0;
    color: var(--muted);
}

.form-links a {
    color: var(--accent);
}

.front-modal-mask {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: grid;
    place-items: center;
    padding: 24px;
    background: rgba(18, 24, 31, 0.56);
}

.front-modal-mask[hidden] {
    display: none;
}

.front-modal {
    position: relative;
    width: min(420px, 100%);
    padding: 30px;
    text-align: center;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.25);
}

.front-modal h2 {
    margin: 0 0 10px;
}

.front-modal p {
    margin: 0 0 18px;
    color: var(--muted);
}

.front-modal img {
    width: 200px;
    display: block;
    margin: 0 auto 12px;
}

.front-modal strong {
    display: block;
    margin-bottom: 18px;
}

.front-modal-close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 32px;
    min-height: 32px !important;
    padding: 0 !important;
    color: var(--muted) !important;
    background: #f1f2f3 !important;
}

.search-hero {
    margin-top: 30px;
    margin-bottom: 26px;
}

.search-form-php {
    grid-template-columns: minmax(0, 1fr) 120px;
    padding: 0;
    box-shadow: none;
    border: 0;
}

.about-nav {
    overflow: hidden;
    padding: 12px;
}

.about-nav a {
    display: flex;
    min-height: 46px;
    align-items: center;
    padding: 0 16px;
    border-radius: 7px;
    color: var(--muted);
    font-weight: 700;
}

.about-nav a.active,
.about-nav a:hover {
    color: #fff;
    background: var(--accent);
}

.contact-list {
    margin: 0 0 24px;
    border-top: 1px solid var(--line);
}

.contact-list div,
.mini-status div {
    display: grid;
    grid-template-columns: 90px minmax(0, 1fr);
    gap: 18px;
    padding: 14px 0;
    border-bottom: 1px solid var(--line);
}

.contact-list dt,
.mini-status dt {
    color: var(--muted);
}

.contact-list dd,
.mini-status dd {
    margin: 0;
}

.php-404 {
    margin-top: 48px;
    margin-bottom: 48px;
    text-align: center;
}

.php-404 strong {
    display: block;
    color: var(--accent);
    font-size: 78px;
    line-height: 1;
}

.php-404 div {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 22px;
}

.member-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 24px;
    padding: 30px 34px;
}

.member-grid {
    grid-template-columns: 260px minmax(0, 1fr) 300px;
    padding-bottom: 50px;
}

.member-card {
    padding: 24px;
}

.member-card h2 {
    margin: 0 0 18px;
}

.member-card > a,
.member-post-list a {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 13px 0;
    border-bottom: 1px solid var(--line);
}

.member-card > a:hover,
.member-post-list a:hover {
    color: var(--accent);
}

.member-post-list {
    display: grid;
    gap: 12px;
}

.member-post-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 18px;
    padding: 16px 0;
    border-bottom: 1px solid var(--line);
}

.member-post-main {
    min-width: 0;
}

.member-post-main strong {
    display: block;
    overflow: hidden;
    color: var(--text);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.member-post-main span,
.member-post-main em {
    display: block;
    margin-top: 7px;
    color: var(--muted);
    font-style: normal;
    line-height: 1.5;
}

.member-status {
    min-width: 74px;
    border-radius: 999px;
    padding: 7px 12px;
    background: rgba(111, 124, 154, 0.12);
    color: var(--muted);
    font-size: 14px;
    text-align: center;
    white-space: nowrap;
}

.member-status-approved {
    background: rgba(28, 166, 91, 0.14);
    color: #15904f;
}

.member-status-pending {
    background: rgba(245, 158, 11, 0.16);
    color: #b46b00;
}

.member-status-rejected {
    background: rgba(231, 76, 60, 0.14);
    color: #c0392b;
}

.member-post-actions {
    display: flex;
    gap: 10px;
    white-space: nowrap;
}

.member-post-actions a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 7px 14px;
    background: #fff;
    color: var(--accent);
}

.member-post-actions a:hover {
    border-color: var(--accent);
    background: var(--accent);
    color: #fff;
}

.current-image-note {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
    color: var(--muted);
}

.current-image-note img {
    width: 58px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 8px;
    object-fit: cover;
}

.empty-note {
    color: var(--muted);
}

@media (max-width: 900px) {
    .auth-layout,
    .publish-layout,
    .about-layout,
    .member-grid {
        grid-template-columns: 1fr;
    }

    .publish-card,
    .search-form-php {
        grid-template-columns: 1fr;
    }

    .span-2 {
        grid-column: auto;
    }

    .member-hero {
        align-items: flex-start;
        flex-direction: column;
    }

    .member-post-row {
        grid-template-columns: 1fr;
        align-items: flex-start;
    }
}
