/* ===== 四叶点评 前台样式 ===== */
:root {
    --green: #1b7c4b;
    --green-dark: #14603a;
    --green-soft: #eef7f0;
    --ink: #22282a;
    --text: #3c4446;
    --muted: #6f7972;
    --line: #e7eae5;
    --bg: #f5f6f3;
    --card: #ffffff;
    --gold: #f0a437;
    --danger: #c0392b;
    --radius: 8px;
    --shadow: 0 6px 20px rgba(30, 60, 42, .06);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
    font-size: 15px;
    line-height: 1.7;
    overflow-wrap: break-word;
}

a { color: var(--green-dark); text-decoration: none; }
a:hover { color: var(--green); }
img { max-width: 100%; }
h1, h2, h3, h4 { color: var(--ink); line-height: 1.35; margin: 0; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button { font-family: inherit; }
code { background: #f1f3ef; padding: 1px 6px; border-radius: 4px; font-size: 13px; }

/* ===== 通用组件 ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 9px 20px;
    border-radius: 999px;
    background: var(--green);
    color: #fff;
    border: 1px solid var(--green);
    font-size: 14px;
    cursor: pointer;
    transition: .2s;
    line-height: 1.5;
}
.btn:hover { background: var(--green-dark); border-color: var(--green-dark); color: #fff; }
.btn-outline { background: #fff; color: var(--green-dark); border-color: #cfe2d5; }
.btn-outline:hover { background: var(--green-soft); color: var(--green-dark); }
.btn-sm { padding: 6px 14px; font-size: 13px; }
.btn-block { width: 100%; }
.link-muted { color: #6f7972; font-size: 13px; }
.link-muted:hover { color: var(--green); }
.link-edit { color: var(--green-dark); font-size: 13px; }
.link-danger { background: none; border: 0; padding: 0; color: var(--danger); font-size: 13px; cursor: pointer; }
.link-danger:hover { text-decoration: underline; }

.flash-wrap { max-width: 1180px; margin: 14px auto 0; padding: 0 20px; }
.flash { padding: 10px 14px; border-radius: 8px; font-size: 14px; margin-bottom: 10px; border: 1px solid transparent; }
.flash-success { background: #edf7f0; color: #1b6b43; border-color: #cfe7d8; }
.flash-error { background: #fdf1ef; color: #a93226; border-color: #f3d4cf; }
.flash-info { background: #eef4fb; color: #245a8f; border-color: #d5e4f4; }

.badge { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 12px; background: var(--green-soft); color: var(--green-dark); }
.badge-ok { background: #edf7f0; color: #1b6b43; }
.badge-off { background: #f6efef; color: #a24a3d; }
.badge-soft { background: #f2f4f1; color: #7a847d; font-weight: 400; }

.count-pill { display: inline-block; padding: 4px 12px; border-radius: 999px; background: #fff; border: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.count-inline { color: var(--muted); font-size: 14px; font-weight: 400; margin-left: 4px; }

/* 星星 */
.stars { position: relative; display: inline-block; line-height: 1; font-size: 13px; letter-spacing: 1px; vertical-align: middle; }
.stars-bg { color: #d9dcd6; }
.stars-fg { position: absolute; left: 0; top: 0; overflow: hidden; white-space: nowrap; color: var(--gold); }
.stars-lg { font-size: 18px; letter-spacing: 2px; }

/* 封面占位 */
.poster { position: relative; display: block; width: 100%; aspect-ratio: 3 / 4; border-radius: 6px; overflow: hidden; background: #e8ebe6; }
.poster img { display: block; width: 100%; height: 100%; object-fit: cover; }
.poster-lg { width: 190px; height: 264px; aspect-ratio: auto; border-radius: 8px; box-shadow: 0 10px 24px rgba(25, 55, 35, .16); }
.poster-sm { width: 78px; height: 108px; aspect-ratio: auto; }
.poster-xs { width: 44px; height: 60px; aspect-ratio: auto; border-radius: 4px; }
.poster-xxs { width: 36px; height: 50px; aspect-ratio: auto; border-radius: 4px; }

.cover-ph { display: flex; align-items: center; justify-content: center; color: rgba(255, 255, 255, .92); font-weight: 700; font-size: 28px; letter-spacing: 2px; }
.poster-xs.cover-ph, .poster-xxs.cover-ph { font-size: 15px; }
.cover-ph-1 { background: linear-gradient(150deg, #2f7a55, #6fb27f); }
.cover-ph-2 { background: linear-gradient(150deg, #37586e, #6e93a8); }
.cover-ph-3 { background: linear-gradient(150deg, #7a5a36, #c39a63); }
.cover-ph-4 { background: linear-gradient(150deg, #5a4a72, #9b88b7); }
.cover-ph-5 { background: linear-gradient(150deg, #86504a, #c18179); }
.cover-ph-6 { background: linear-gradient(150deg, #3d6a63, #7db0a4); }
.cover-ph-7 { background: linear-gradient(150deg, #6d6436, #b3a669); }
.cover-ph-8 { background: linear-gradient(150deg, #40556e, #8ba0b8); }

/* 头像 */
.avatar { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 50%; overflow: hidden; background: #dfe8df; flex: 0 0 auto; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar-xs { width: 24px; height: 24px; font-size: 12px; }
.avatar-sm { width: 28px; height: 28px; font-size: 13px; }
.avatar-md { width: 42px; height: 42px; font-size: 17px; }
.avatar-lg { width: 84px; height: 84px; font-size: 32px; }
.avatar-ph { color: #fff; font-weight: 700; }
.avatar-ph-1 { background: #4f8a6a; }
.avatar-ph-2 { background: #5b7fa6; }
.avatar-ph-3 { background: #a97f4c; }
.avatar-ph-4 { background: #82628f; }
.avatar-ph-5 { background: #a5605a; }
.avatar-ph-6 { background: #4c8178; }

/* ===== 头部 ===== */
.site-header { background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 50; }
.header-inner { max-width: 1180px; margin: 0 auto; padding: 12px 20px; display: flex; align-items: center; gap: 12px; }
.brand { display: flex; align-items: center; gap: 9px; color: var(--ink); font-weight: 700; flex: 0 1 auto; min-width: 0; max-width: 240px; }
.brand:hover { color: var(--ink); }
.brand-mark img { width: 100%; height: 100%; display: block; border-radius: inherit; }
.brand-mark { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 9px; background: var(--green); color: #fff; font-size: 18px; font-weight: 700; }
.brand-text { font-size: 19px; letter-spacing: .5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.main-nav { display: flex; gap: 2px; flex: 0 1 auto; flex-wrap: nowrap; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.main-nav::-webkit-scrollbar { display: none; }
.main-nav.is-scrollable { -webkit-mask-image: linear-gradient(to right, #000 92%, transparent); mask-image: linear-gradient(to right, #000 92%, transparent); padding-right: 14px; }
.main-nav a { padding: 6px 9px; border-radius: 6px; color: #4c5650; font-size: 14px; white-space: nowrap; }
.main-nav a:hover { background: #f2f5f1; color: var(--green-dark); }
.main-nav a.is-active { color: var(--green-dark); font-weight: 600; background: var(--green-soft); }

.header-search { margin-left: auto; display: flex; align-items: center; gap: 0; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; background: #f7f8f5; }
.header-search input { border: 0; background: transparent; padding: 7px 12px; width: 170px; font-size: 13px; outline: none; color: var(--text); }
.header-search button { border: 0; background: transparent; padding: 7px 14px; color: var(--muted); font-size: 13px; cursor: pointer; }
.header-search button:hover { color: var(--green); }

.header-user { display: flex; align-items: center; gap: 10px; font-size: 13px; flex: 0 0 auto; }
.user-chip { display: inline-flex; align-items: center; gap: 7px; color: var(--ink); min-width: 0; }
.user-chip span { max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-chip:hover { color: var(--green-dark); }

/* ===== 页面容器 ===== */
.page { max-width: 1180px; margin: 0 auto; padding: 24px 20px 56px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px 16px; margin-bottom: 18px; flex-wrap: wrap; }
.page-title { font-size: 26px; display: flex; align-items: center; gap: 10px; }
.page-desc { color: var(--muted); font-size: 14px; margin-top: 6px; }
.section-mark { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 8px; background: var(--green-soft); color: var(--green-dark); font-size: 15px; }

/* ===== 首页 Hero ===== */
.hero { display: grid; grid-template-columns: 1.05fr 1fr; gap: 28px; background: linear-gradient(120deg, #edf6ee, #f8faf3 60%, #f3f6ef); border: 1px solid #e2ebdf; border-radius: 16px; padding: 34px 36px; margin-bottom: 28px; }
.hero-kicker { color: var(--green-dark); font-size: 13px; letter-spacing: 1px; margin-bottom: 10px; }
.hero-title { font-size: 36px; letter-spacing: 1px; }
.hero-sub { color: #5e6b62; margin-top: 12px; font-size: 15px; }
.hero-stats { display: flex; gap: 26px; margin-top: 22px; color: #6b776e; font-size: 13px; }
.hero-stats strong { color: var(--green-dark); font-size: 20px; margin-right: 3px; }
.hero-cats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-content: center; }
.hero-cat { display: grid; grid-template-columns: 38px 1fr; grid-template-rows: auto auto; column-gap: 10px; background: #fff; border: 1px solid #e4ecdf; border-radius: 12px; padding: 14px 16px; color: var(--ink); transition: .2s; }
.hero-cat:hover { transform: translateY(-2px); box-shadow: var(--shadow); color: var(--ink); }
.hero-cat-icon { grid-row: 1 / span 2; display: flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 10px; background: var(--green-soft); color: var(--green-dark); font-size: 17px; }
.hero-cat-name { font-weight: 600; font-size: 15px; }
.hero-cat-desc { color: var(--muted); font-size: 12px; line-height: 1.5; }

.home-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 28px; align-items: start; }
.home-side { display: flex; flex-direction: column; gap: 20px; }

/* ===== 区块 ===== */
.section { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 22px 24px; margin-bottom: 22px; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 6px 12px; margin-bottom: 16px; flex-wrap: wrap; }
.section-title { font-size: 20px; display: flex; align-items: center; gap: 9px; }
.section-title .section-mark { width: 26px; height: 26px; font-size: 13px; border-radius: 7px; }
.section-more { font-size: 13px; color: var(--muted); }
.section-more:hover { color: var(--green); }

/* ===== 条目卡片 ===== */
.subject-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 22px 18px; }
.subject-grid-home { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 18px 14px; }
.subject-card { display: block; color: var(--text); }
.subject-card:hover { color: var(--text); }
.subject-card .poster-wrap { display: block; margin-bottom: 10px; }
.subject-card:hover .poster { transform: translateY(-3px); box-shadow: 0 12px 24px rgba(30, 60, 42, .14); }
.subject-card .poster { transition: .22s; }
.subject-title { display: block; font-size: 14px; color: var(--ink); font-weight: 600; line-height: 1.45; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.subject-card:hover .subject-title { color: var(--green-dark); }
.subject-sub { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.subject-rating { display: flex; align-items: center; gap: 5px; margin-top: 6px; font-size: 12px; color: var(--muted); flex-wrap: wrap; }
.subject-rating strong { color: var(--green-dark); font-size: 14px; }
.subject-rating em { font-style: normal; color: #9aa39c; font-size: 11px; }

.empty-note { color: var(--muted); font-size: 14px; padding: 6px 0; }
.empty-state { background: #fff; border: 1px dashed #dfe6dc; border-radius: 12px; padding: 46px 24px; text-align: center; color: var(--muted); }
.empty-state h1, .empty-state h2 { font-size: 20px; margin-bottom: 8px; }
.empty-state p { margin: 6px 0; }
.hot-links { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 10px; }

/* ===== 侧栏 ===== */
.side-box { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 18px 20px; }
.side-title { font-size: 16px; margin-bottom: 12px; padding-bottom: 9px; border-bottom: 1px solid #eef1ec; }
.side-note { color: #6b776e; font-size: 13px; }
.side-note p { margin-bottom: 8px; }
.side-note p:last-child { margin-bottom: 0; }

.review-mini-list { display: flex; flex-direction: column; gap: 14px; }
.review-mini-head { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.review-mini-user { color: #4c5650; font-size: 12px; }
.review-mini-time { margin-left: auto; font-size: 11px; color: #a3aba4; }
.review-mini-subject { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink); margin: 4px 0 2px; }
.review-mini-subject:hover { color: var(--green-dark); }
.review-mini-text { font-size: 12px; color: #7b857d; line-height: 1.6; }

.new-list { display: flex; flex-direction: column; gap: 12px; }
.new-item { display: flex; gap: 10px; align-items: flex-start; }
.new-info { min-width: 0; }
.new-title { display: block; font-size: 13px; color: var(--ink); line-height: 1.5; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.new-title:hover { color: var(--green-dark); }
.new-meta { color: var(--muted); font-size: 12px; }

/* ===== 排序与列表页 ===== */
.sort-bar { display: flex; align-items: center; gap: 6px; margin: 4px 0 18px; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 6px; width: fit-content; }
.sort-tab { padding: 6px 16px; border-radius: 7px; color: #5f6a62; font-size: 14px; }
.sort-tab:hover { background: #f3f6f1; }
.sort-tab.is-active { background: var(--green-soft); color: var(--green-dark); font-weight: 600; }

.list-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 28px; align-items: start; }
.list-main .subject-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.list-side { display: flex; flex-direction: column; gap: 18px; }

.rank-list { display: flex; flex-direction: column; gap: 13px; }
.rank-item { display: flex; align-items: flex-start; gap: 9px; }
.rank-num { flex: 0 0 auto; width: 20px; height: 20px; border-radius: 5px; background: #f1f3ef; color: #7c867e; font-size: 12px; display: flex; align-items: center; justify-content: center; }
.rank-num.is-top { background: var(--green); color: #fff; }
.rank-info { min-width: 0; }
.rank-title { display: block; font-size: 13px; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 190px; }
.rank-title:hover { color: var(--green-dark); }
.rank-score { display: flex; align-items: center; gap: 5px; font-size: 12px; color: var(--muted); }
.rank-score strong { color: var(--green-dark); font-size: 13px; }

/* ===== 详情页 ===== */
.breadcrumb { font-size: 13px; color: var(--muted); margin-bottom: 14px; display: flex; gap: 6px; flex-wrap: wrap; }
.breadcrumb .sep { color: #bcc4bd; }
.breadcrumb a { color: #6d7870; }

.detail-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 28px; align-items: start; }
.subject-detail { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 26px 28px; }
.subject-hero { display: grid; grid-template-columns: 190px minmax(0, 1fr) 260px; gap: 26px; }
.subject-cover { align-self: start; }
.subject-title-row { display: flex; align-items: flex-start; gap: 12px; }
.subject-title-row h1 { font-size: 28px; line-height: 1.35; }
.subject-original { color: var(--muted); font-size: 14px; margin-top: 4px; }
.meta-list { margin-top: 16px; font-size: 13px; color: #5b665e; display: grid; gap: 5px; }
.meta-list li { display: flex; gap: 8px; }
.meta-label { color: #9aa39c; flex: 0 0 auto; min-width: 44px; }
.meta-value { color: #4a554d; }
.subject-summary { margin-top: 18px; }
.subject-summary h2 { font-size: 15px; margin-bottom: 6px; color: var(--ink); }
.subject-summary p { font-size: 14px; color: #566159; line-height: 1.85; }

.subject-rating-box { border-left: 1px solid #eef1ec; padding-left: 24px; text-align: left; }
.rating-big { color: var(--green-dark); }
.rating-big strong { font-size: 40px; font-weight: 700; line-height: 1; letter-spacing: -.5px; }
.rating-scale { font-size: 14px; color: #93a096; margin-left: 3px; }
.subject-rating-box .stars { margin-top: 8px; }
.rating-count { color: var(--muted); font-size: 12px; margin-top: 4px; }
.rating-dist { margin: 14px 0; display: flex; flex-direction: column; gap: 6px; }
.dist-row { display: flex; align-items: center; gap: 7px; font-size: 11px; color: #97a198; }
.dist-label { flex: 0 0 28px; }
.dist-bar { flex: 1; height: 6px; background: #f0f2ee; border-radius: 999px; overflow: hidden; }
.dist-bar span { display: block; height: 100%; background: var(--gold); border-radius: 999px; }
.dist-num { flex: 0 0 30px; text-align: right; }
.rating-cta { font-size: 12px; color: var(--muted); line-height: 1.7; }
.rating-cta a { color: var(--green-dark); }
.rate-form { margin-top: 12px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

/* 星级选择器 */
.star-picker { display: inline-flex; flex-direction: row-reverse; justify-content: flex-end; }
.star-picker input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.star-picker label { font-size: 26px; line-height: 1; color: #d8dcd6; cursor: pointer; padding: 0 2px; transition: color .15s; }
.star-picker input:checked ~ label,
.star-picker label:hover,
.star-picker label:hover ~ label { color: var(--gold); }
.star-picker-sm label { font-size: 20px; }

/* 点评 */
.review-block { margin-top: 30px; border-top: 1px solid #eef1ec; padding-top: 24px; }
.review-form { background: #f8faf6; border: 1px solid #e8eee5; border-radius: 10px; padding: 14px 16px; margin-bottom: 20px; }
.review-form-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; flex-wrap: wrap; }
.review-form-title { font-size: 14px; font-weight: 600; color: var(--ink); }
.review-form textarea { width: 100%; border: 1px solid #dfe7da; border-radius: 8px; padding: 10px 12px; font-size: 14px; font-family: inherit; line-height: 1.7; resize: vertical; background: #fff; color: var(--text); outline: none; }
.review-form textarea:focus { border-color: #a9cdb3; box-shadow: 0 0 0 3px rgba(31, 138, 85, .08); }
.review-form-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 10px; }
.form-hint { color: #9aa39c; font-size: 12px; }
.login-cta { background: #f8faf6; border: 1px dashed #dbe6d7; border-radius: 10px; padding: 18px; text-align: center; margin-bottom: 20px; }
.login-cta p { color: var(--muted); font-size: 13px; margin-bottom: 10px; }
.login-cta .btn { margin: 0 4px; }

.review-list { display: flex; flex-direction: column; }
.review-item { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 16px; padding: 18px 0; border-bottom: 1px solid #f0f2ee; }
.review-item:last-child { border-bottom: 0; }
.review-user { display: flex; gap: 9px; align-items: flex-start; }
.review-user-name { display: block; font-size: 13px; color: var(--ink); font-weight: 600; }
.review-time { display: block; color: #a3aba4; font-size: 11px; margin-top: 2px; }
.review-score-row { display: flex; align-items: center; gap: 7px; margin-bottom: 4px; flex-wrap: wrap; }
.review-score-text { color: var(--muted); font-size: 12px; }
.review-content p { font-size: 14px; line-height: 1.85; color: #414c44; }
.inline-form { display: inline; }
.review-content .inline-form { margin-top: 6px; display: inline-block; }

/* 同类推荐 */
.subject-aside { display: flex; flex-direction: column; gap: 18px; }

/* ===== 搜索 ===== */
.search-page-form { display: flex; gap: 10px; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; margin-bottom: 22px; flex-wrap: wrap; }
.search-page-form input[type="search"] { flex: 1 1 240px; border: 1px solid #e2e8df; border-radius: 8px; padding: 9px 12px; font-size: 14px; outline: none; }
.search-page-form select { border: 1px solid #e2e8df; border-radius: 8px; padding: 9px 12px; font-size: 14px; background: #fff; color: var(--text); }

/* ===== 认证页 ===== */
.auth-page { max-width: 460px; margin: 26px auto 10px; }
.auth-card { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 30px 30px 26px; box-shadow: var(--shadow); }
.auth-title { font-size: 23px; }
.auth-sub { color: var(--muted); font-size: 13px; margin: 6px 0 20px; }
.auth-foot { text-align: center; font-size: 13px; color: var(--muted); margin-top: 16px; }
.auth-foot-muted { font-size: 12px; margin-top: 8px; }
.form-row { margin-bottom: 15px; }
.form-row > label { display: block; font-size: 13px; color: #55615a; margin-bottom: 6px; }
.form-row input[type="text"], .form-row input[type="email"], .form-row input[type="password"],
.form-row input[type="number"], .form-row input[type="search"], .form-row select, .form-row textarea {
    width: 100%;
    border: 1px solid #dfe6dc;
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 14px;
    font-family: inherit;
    background: #fff;
    color: var(--text);
    outline: none;
    transition: .15s;
}
.form-row input:focus, .form-row select:focus, .form-row textarea:focus { border-color: #9fc7ab; box-shadow: 0 0 0 3px rgba(31, 138, 85, .08); }
.form-error { color: var(--danger); font-size: 12px; margin-top: 5px; }
.checkbox-inline { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: #55615a; cursor: pointer; }
.checkbox-inline input { accent-color: var(--green); }

/* ===== 用户主页 ===== */
.profile-head { display: flex; align-items: flex-start; gap: 20px; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 26px 28px; margin-bottom: 22px; }
.profile-main { flex: 1; min-width: 0; }
.profile-name { font-size: 24px; display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.profile-bio { color: #6b776e; font-size: 14px; margin-top: 6px; }
.profile-meta { color: var(--muted); font-size: 12px; margin-top: 8px; }
.profile-stats { display: flex; gap: 30px; text-align: center; }
.profile-stats strong { display: block; font-size: 22px; color: var(--green-dark); }
.profile-stats span { color: var(--muted); font-size: 12px; }
.profile-reviews { display: flex; flex-direction: column; }
.profile-review { display: flex; gap: 14px; padding: 16px 0; border-bottom: 1px solid #f0f2ee; }
.profile-review:last-child { border-bottom: 0; }
.profile-review-body { min-width: 0; }
.profile-review-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.profile-review-title { font-size: 15px; font-weight: 600; color: var(--ink); }
.profile-review-text { color: #5a655d; font-size: 13px; line-height: 1.8; margin-top: 5px; }

/* ===== 分页 ===== */
.pager { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 26px; flex-wrap: wrap; }
.pager-btn, .pager-num { display: inline-flex; align-items: center; justify-content: center; min-width: 34px; height: 34px; padding: 0 12px; border-radius: 8px; background: #fff; border: 1px solid var(--line); color: #5f6a62; font-size: 13px; }
.pager-btn:hover, .pager-num:hover { border-color: #bcd6c3; color: var(--green-dark); }
.pager-num.is-current { background: var(--green); border-color: var(--green); color: #fff; }
.pager-btn.is-disabled { color: #bcc4bd; background: #f6f7f4; }
.pager-gap { color: #a3aba4; padding: 0 2px; }

/* ===== 页脚 ===== */
.site-footer { border-top: 1px solid var(--line); background: #fff; padding: 32px 20px 36px; margin-top: 10px; }
.footer-inner { max-width: 1180px; margin: 0 auto; text-align: center; }
.footer-brand { font-size: 16px; font-weight: 700; color: var(--ink); }
.footer-slogan { color: var(--muted); font-size: 13px; margin-top: 6px; }
.footer-links { display: flex; gap: 16px; justify-content: center; margin: 14px 0 8px; font-size: 13px; flex-wrap: wrap; }
.footer-copy { color: #b0b8b1; font-size: 12px; }

/* ===== 语言切换 ===== */
.header-tools { flex: 0 0 auto; }
.lang-switch { position: relative; font-size: 13px; }
.lang-switch summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: #4c5650; max-width: 170px; }
.lang-switch summary::-webkit-details-marker { display: none; }
.lang-switch summary::marker { content: ""; }
.lang-switch[open] summary { border-color: #bcd6c3; background: var(--green-soft); }
.lang-code { font-size: 11px; font-weight: 700; color: var(--green-dark); background: var(--green-soft); border-radius: 4px; padding: 1px 5px; letter-spacing: .5px; }
.lang-native { font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lang-menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 90; width: 264px; max-width: calc(100vw - 28px); max-height: 70vh; overflow-y: auto; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 14px 32px rgba(20, 50, 35, .16); padding: 8px; }
.lang-menu-title { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: #8a938d; padding: 4px 8px 8px; }
.lang-menu ul { list-style: none; margin: 0; padding: 0; }
.lang-menu a { display: flex; align-items: center; gap: 8px; padding: 7px 8px; border-radius: 7px; color: #4c5650; font-size: 12px; }
.lang-menu a:hover { background: #f3f6f1; color: var(--green-dark); }
.lang-menu a.is-active { background: var(--green-soft); color: var(--green-dark); font-weight: 600; }
.lang-menu a.is-active .lang-code { background: #fff; }
.lang-menu a.is-active::after { content: "✓"; color: var(--green); font-size: 12px; }
.lang-en { margin-left: auto; color: #98a29b; font-size: 11px; font-weight: 400; }

/* 升级页与通用清单 */
.done-list { list-style: none; padding: 0; margin: 0 0 16px; }
.done-list li { padding: 8px 0; border-bottom: 1px solid #eef2ee; font-size: 14px; color: #2c4738; }
.done-list li::before { content: "✓"; color: var(--green); font-weight: 700; margin-right: 8px; }
.install-target { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 16px; }
.install-target a { display: block; text-align: center; padding: 12px; border-radius: 10px; background: #f3f8f4; color: var(--green-dark); font-weight: 600; border: 1px solid #dcebe0; }
.upgrade-page { max-width: 640px; }
.upgrade-done li::before { content: "✓"; }

@media (max-width: 820px) {
    .header-tools { order: 2; margin-left: auto; }
    .lang-menu { right: 0; left: auto; }
    .lang-switch > summary .lang-native { display: none; }
    .lang-switch summary { padding: 5px 8px; }
}
@media (max-width: 560px) {
    .install-target { grid-template-columns: 1fr; }
    .lang-menu { width: min(264px, calc(100vw - 24px)); }
    .user-chip span { display: none; }
    .header-user .user-admin, .header-user .user-register { display: none; }
    .header-user .link-muted { white-space: nowrap; }
    .brand { max-width: 140px; }
    .brand-text { font-size: 17px; }
}

/* ===== 响应式 ===== */
@media (max-width: 1060px) {
    .header-search input { width: 150px; }
    .home-layout, .list-layout, .detail-layout { grid-template-columns: minmax(0, 1fr); }
    .home-side, .list-side, .subject-aside { display: grid; grid-template-columns: 1fr 1fr; }
    .subject-grid-home { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .subject-hero { grid-template-columns: 170px minmax(0, 1fr); }
    .subject-rating-box { grid-column: 1 / -1; border-left: 0; border-top: 1px solid #eef1ec; padding-left: 0; padding-top: 18px; }
}

@media (max-width: 1240px) {
    .header-inner { flex-wrap: wrap; gap: 10px 14px; }
    .main-nav { order: 3; width: 100%; overflow-x: auto; }
    .header-search { order: 4; width: 100%; margin-left: 0; }
    .header-search input { width: 100%; flex: 1; }
    .header-tools { order: 2; margin-left: auto; }
    .header-user { order: 2; }
}

@media (max-width: 820px) {
    .header-inner { flex-wrap: wrap; gap: 10px 14px; }
    .main-nav { order: 3; width: 100%; overflow-x: auto; }
    .header-search { margin-left: 0; order: 4; width: 100%; }
    .header-search input { width: 100%; flex: 1; }
    .hero { grid-template-columns: 1fr; padding: 26px 22px; }
    .hero-title { font-size: 30px; }
    .home-side, .list-side, .subject-aside { grid-template-columns: 1fr; }
    .subject-grid, .list-main .subject-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .subject-grid-home { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .subject-hero { grid-template-columns: 140px minmax(0, 1fr); gap: 18px; }
    .poster-lg { width: 140px; height: 196px; }
    .review-item { grid-template-columns: 1fr; gap: 8px; }
    .review-user { align-items: center; }
    .profile-head { flex-wrap: wrap; }
    .profile-stats { width: 100%; justify-content: flex-start; }
}

@media (max-width: 560px) {
    .header-inner { gap: 8px 10px; padding: 10px 14px; }
    .lang-switch { position: static; }
    .lang-menu { position: absolute; top: 48px; right: 12px; left: auto; width: min(264px, calc(100vw - 24px)); }
    .page { padding: 16px 14px 40px; }
    .hero-stats { gap: 16px; flex-wrap: wrap; }
    .hero-cats { grid-template-columns: 1fr; }
    .subject-grid, .list-main .subject-grid, .subject-grid-home { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .subject-detail { padding: 18px 16px; }
    .subject-hero { grid-template-columns: 110px minmax(0, 1fr); }
    .poster-lg { width: 110px; height: 154px; }
    .subject-title-row h1 { font-size: 21px; }
    .auth-card { padding: 22px 18px; }
    .sort-bar { width: 100%; overflow-x: auto; }
}

@media (max-width: 400px) {
    .header-inner { gap: 6px 8px; }
    .brand { max-width: 110px; }
    .user-chip span { display: none; }
}

/* ===== 单页 ===== */
.single-page { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 34px 38px; max-width: 880px; margin: 0 auto; }
.single-page-title { font-size: 28px; margin-bottom: 6px; }
.single-page-meta { color: var(--muted); font-size: 13px; margin-bottom: 20px; }
.single-page-body { color: #3c4446; font-size: 15px; line-height: 1.95; }
.single-page-body p { margin-bottom: 14px; }
.single-page-body p:last-child { margin-bottom: 0; }
@media (max-width: 560px) { .single-page { padding: 22px 20px; } .single-page-title { font-size: 23px; } }
