/* 桌游知识问答栏目 */

.htp-body {
    background: #f5f5f5;
}

.htp-page {
    max-width: 1200px;
    width: 100%;
    margin: 24px auto 48px;
    padding: 0 20px 40px;
    box-sizing: border-box;
}

.htp-header {
    margin-bottom: 20px;
    text-align: center;
}

.htp-title {
    font-size: clamp(1.35rem, 4vw, 1.85rem);
    font-weight: 800;
    color: #111827;
    line-height: 1.45;
    margin: 0 auto;
    max-width: 920px;
    text-align: center;
    text-wrap: balance;
    word-break: break-word;
    overflow-wrap: anywhere;
    hyphens: auto;
}

.htp-page-lead {
    font-size: 16px;
    line-height: 1.75;
    color: #555;
    margin: 12px auto 0;
    text-align: center;
    max-width: 720px;
}

/* 多桌游关联：复用 .boardgame-list / .list 卡片，整体居中排列 */
.htp-page .htp-linked-games.boardgame-list {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto 28px;
    padding: 0;
    min-height: 0;
    height: auto;
    text-align: center;
    clear: both;
    overflow: visible;
}

.htp-page .htp-linked-games.boardgame-list dl {
    float: none;
    display: inline-block;
    vertical-align: top;
    width: 250px;
    margin: 10px 12px !important;
    box-sizing: border-box;
}

.htp-page .htp-linked-games.boardgame-list dl a {
    display: block;
    text-align: center;
}

.htp-page .htp-linked-games.boardgame-list dl img {
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.htp-page .htp-linked-games.boardgame-list dl p {
    text-align: center;
}

/* 正文下方随机延伸阅读 */
.htp-bonus-slot {
    margin-bottom: 28px;
}

.htp-bonus {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 20px 24px;
    box-sizing: border-box;
}

.htp-bonus__lead {
    margin: 0 0 14px;
    font-size: 13px;
    font-weight: 600;
    color: #6b7280;
    text-align: center;
    letter-spacing: 0.02em;
}

.htp-bonus__title {
    margin: 0 auto 16px;
    max-width: 920px;
    font-size: clamp(1.15rem, 3.2vw, 1.45rem);
    font-weight: 700;
    line-height: 1.5;
    text-align: center;
    text-wrap: balance;
    word-break: break-word;
    overflow-wrap: anywhere;
    hyphens: auto;
}

.htp-bonus__title a {
    color: #111827;
    text-decoration: none;
    display: inline;
    text-align: center;
}

.htp-bonus__title a:hover {
    color: #f98206;
}

.htp-bonus__body {
    line-height: 2.1;
    font-size: 17px;
    color: #333;
}

.htp-bonus__body.teach-content {
    font-size: 17px;
    line-height: 2.1;
}

.htp-bonus__body p {
    margin: 0 0 1.6em;
    text-indent: 2em;
}

.htp-bonus__body p:last-child {
    margin-bottom: 0;
}

.htp-bonus__disclaimer {
    text-indent: 0 !important;
    margin: 1.25em auto 0;
    padding: 10px 12px;
    width: 70%;
    max-width: 70%;
    border: 1px dashed #aaa;
    font-size: 13px;
    line-height: 1.65;
    color: #888;
    box-sizing: border-box;
}

.htp-related__intro {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
    margin: 0 0 12px;
}

.htp-game-card {
    display: grid;
    grid-template-columns: minmax(120px, 200px) minmax(0, 1fr);
    gap: 20px;
    align-items: start;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 28px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.htp-game-card__cover img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    display: block;
    background: #f3f4f6;
}

.htp-game-card__name {
    font-size: 1.15rem;
    margin: 0 0 8px;
}

.htp-game-card__name a {
    color: #1d4ed8;
    text-decoration: none;
}

.htp-game-card__name a:hover {
    text-decoration: underline;
}

.htp-game-card__meta,
.htp-game-card__stars,
.htp-game-card__more {
    margin: 6px 0;
    font-size: 14px;
    color: #374151;
    line-height: 1.6;
}

.htp-game-card__more a {
    color: #059669;
    font-weight: 600;
}

.htp-content {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 28px 32px;
    margin-bottom: 28px;
    line-height: 2.1;
    font-size: 17px;
    color: #333;
}

.htp-content.teach-content {
    font-size: 17px;
    line-height: 2.1;
}

.htp-content p {
    margin: 0 0 1.6em;
    text-indent: 2em;
}

.htp-content p:last-child {
    margin-bottom: 0;
}

.htp-content h2,
.htp-content h3,
.htp-content h4,
.htp-content ul,
.htp-content ol,
.htp-content table {
    text-indent: 0;
}

.htp-disclaimer-wrap,
.htp-disclaimer-wrap p,
.htp-disclaimer {
    text-indent: 0 !important;
}

/* 知识正文末尾统一规范提示（较正文小一号、浅灰；70% 宽虚线框居中） */
.htp-disclaimer-wrap {
    width: 70%;
    max-width: 70%;
    margin: 1.75em auto 0;
    padding: 12px 14px;
    border: 1px dashed #aaa;
    box-sizing: border-box;
}

.htp-disclaimer {
    margin: 0;
    padding: 0;
    font-size: 14px;
    line-height: 1.65;
    color: #888;
    font-weight: normal;
}

@media (max-width: 480px) {
    .htp-disclaimer-wrap {
        width: 70%;
        max-width: 70%;
        padding: 10px 10px;
    }

    .htp-disclaimer {
        font-size: 13px;
        line-height: 1.7;
    }
}

.htp-related {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 16px 18px 20px;
    margin-top: 8px;
}

.htp-related__h2 {
    font-size: 1.1rem;
    margin: 0 0 12px;
    color: #111827;
}

.htp-related--boardgame {
    max-width: 1200px;
    width: 100%;
    margin: 28px auto 12px;
    padding: 16px 20px;
    box-sizing: border-box;
}

/* 知识页底部：相关问题（仅标题，每行 3 条） */
.htp-knowledge-foot {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 22px 24px 28px;
    margin-top: 8px;
    margin-bottom: 12px;
}

.htp-knowledge-foot::before {
    content: '相关问题';
    display: block;
    margin: 0 0 14px;
    font-size: 1.05rem;
    font-weight: 600;
    color: #111827;
    text-align: center;
}

.htp-knowledge-foot--grid {
    padding: 18px 16px 22px;
}

.htp-related-grid {
    display: grid;
    gap: 8px 10px;
    width: 100%;
}

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

.htp-related-grid--3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.htp-related-grid__cell {
    display: block;
    min-width: 0;
    max-width: 100%;
    padding: 10px 12px;
    border: 1px solid #e8e8e8;
    border-radius: 6px;
    box-sizing: border-box;
    color: #333;
    text-decoration: none;
    font-size: 13px;
    line-height: 1.45;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.htp-knowledge-foot--grid .htp-related-grid__cell {
    font-size: 13px;
}

.htp-related-grid__cell:hover {
    border-color: #f98206;
    color: #f98206;
}

@media (max-width: 640px) {
    .htp-knowledge-foot {
        padding: 18px 14px 22px;
    }

    .htp-knowledge-foot::before {
        margin-bottom: 12px;
        font-size: 1rem;
    }

    .htp-related-grid--2,
    .htp-related-grid--3 {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .htp-related-grid__cell {
        white-space: normal;
        overflow: visible;
        text-overflow: unset;
        word-break: break-word;
        overflow-wrap: anywhere;
        font-size: 14px;
        line-height: 1.6;
        padding: 12px 14px;
    }

    .htp-knowledge-foot--grid .htp-related-grid__cell {
        font-size: 14px;
    }

    .htp-related--boardgame {
        padding: 14px 12px 18px;
    }

    .htp-related--boardgame .htp-related-grid--2 {
        grid-template-columns: 1fr;
    }
}

/* 列表页 */
.htp-list-wrap {
    max-width: 1200px;
    width: 100%;
    margin: 24px auto 48px;
    padding: 0 20px;
    box-sizing: border-box;
}

.htp-list-h1 {
    font-size: 28px;
    font-weight: normal;
    margin: 0 0 12px;
    color: #333;
    text-align: center;
    font-family: pingfang, "Microsoft Yahei", "PingFang SC", sans-serif;
}

.htp-list-wrap .site-lead {
    margin-bottom: 24px;
}

.htp-list-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px 16px;
}

.htp-list-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-height: 0;
    padding: 14px 16px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    box-sizing: border-box;
    text-decoration: none;
    color: inherit;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.htp-list-card:hover {
    border-color: #f98206;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
}

.htp-list-card__title {
    font-size: 15px;
    font-weight: 600;
    line-height: 1.45;
    color: #111827;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
}

.htp-list-card:hover .htp-list-card__title {
    color: #f98206;
}

.htp-list-card__ex {
    font-size: 13px;
    line-height: 1.5;
    color: #6b7280;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
}

.htp-list-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 48px 20px;
    color: #6b7280;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
}

.htp-pagebar {
    margin-top: 20px;
}

.pagebar-compact {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px 16px;
    padding: 14px 16px;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    font-size: 14px;
    line-height: 1.4;
}

.pagebar-compact__meta {
    color: #64748b;
    font-size: 13px;
    white-space: nowrap;
}

.pagebar-compact__controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex: 1 1 auto;
    min-width: 0;
}

.pagebar-compact__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 0 12px;
    border-radius: 8px;
    border: 1px solid #dbeafe;
    background: #fff;
    color: #2563eb;
    text-decoration: none;
    white-space: nowrap;
}

.pagebar-compact__btn:hover {
    background: #eff6ff;
    border-color: #93c5fd;
}

.pagebar-compact__select-wrap {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 36px;
}

.pagebar-compact__select-label,
.pagebar-compact__jump-label {
    color: #64748b;
    font-size: 13px;
    white-space: nowrap;
}

.pagebar-compact__select {
    min-width: 72px;
    max-width: 120px;
    height: 36px;
    padding: 0 28px 0 10px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #fff;
    color: #111827;
    font-size: 14px;
    appearance: auto;
}

.pagebar-compact__jump {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 0;
}

.pagebar-compact__jump-input {
    width: 56px;
    height: 36px;
    padding: 0 8px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    text-align: center;
}

.pagebar-compact__jump-btn {
    min-width: 44px;
    height: 36px;
    padding: 0 10px;
    border: none;
    border-radius: 8px;
    background: #2563eb;
    color: #fff;
    font-size: 13px;
    cursor: pointer;
}

.pagebar-compact__jump-btn:hover {
    background: #1d4ed8;
}

.htp-pagebar a,
.htp-pagebar b {
    padding: 6px 10px;
    border-radius: 6px;
}

.htp-pagebar a {
    background: #fff;
    border: 1px solid #e5e7eb;
    color: #2563eb;
    text-decoration: none;
}

.htp-pagebar b {
    background: #2563eb;
    color: #fff;
}

@media (max-width: 900px) {
    .htp-list-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }
}

@media (max-width: 640px) {
    .htp-title {
        line-height: 1.5;
        padding: 0 4px;
    }

    .htp-content {
        padding: 20px 18px;
        font-size: 16px;
        line-height: 2;
    }

    .htp-content p {
        margin-bottom: 1.45em;
    }

    .htp-bonus__body {
        font-size: 16px;
        line-height: 2;
    }

    .htp-page .htp-linked-games.boardgame-list dl {
        width: 46%;
        max-width: 220px;
        margin: 8px 2% !important;
    }

    .htp-bonus {
        padding: 16px 14px;
    }

    .htp-bonus__disclaimer {
        width: 100%;
        max-width: 100%;
    }

    .htp-game-card {
        grid-template-columns: 1fr;
    }

    .htp-game-card__cover {
        max-width: 240px;
    }

    .htp-list-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .htp-list-card {
        padding: 12px 14px;
    }

    .htp-list-card__title {
        font-size: 14px;
    }

    .pagebar-compact {
        flex-direction: column;
        align-items: stretch;
        padding: 12px;
        gap: 10px;
    }

    .pagebar-compact__meta {
        text-align: center;
        white-space: normal;
    }

    .pagebar-compact__controls {
        justify-content: center;
        gap: 6px;
    }

    .pagebar-compact__btn {
        min-height: 40px;
        padding: 0 10px;
        font-size: 13px;
    }

    .pagebar-compact__select,
    .pagebar-compact__jump-input,
    .pagebar-compact__jump-btn {
        height: 40px;
    }

    .pagebar-compact__select-label,
    .pagebar-compact__jump-label {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        border: 0;
    }

    .pagebar-compact__select-wrap,
    .pagebar-compact__jump {
        flex: 1 1 calc(50% - 6px);
        justify-content: center;
    }

    .pagebar-compact__select {
        flex: 1;
        max-width: none;
    }

    .pagebar-compact__jump-input {
        flex: 1;
        max-width: 72px;
    }
}
