/* 寻根页：大厅 / 发布 / 我的寻根 / 审核管理 */

.xg-main {
    flex: 1 1 auto;
    width: 100%;
    background: linear-gradient(180deg, #FBF6EA 0%, #F7F4EE 100%);
}

.xg-wrap {
    max-width: 1280px;
    margin: 0 auto;
    padding: 40px 4% 72px;
    box-sizing: border-box;
}

/* 顶部横幅 + 登录入口 */
.xg-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    min-height: 200px;
    background-color: #7A0000;
    background-image:
        linear-gradient(90deg, rgba(55, 0, 0, 0.58) 0%, rgba(55, 0, 0, 0.26) 52%, rgba(55, 0, 0, 0.16) 100%),
        url('https://cdn.zongyuanjiapu.com/page/xungenbj.jpg');
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
    border-radius: 16px;
    padding: 30px 40px;
    margin-bottom: 26px;
    color: #F5E9D0;
    box-shadow: 0 10px 24px rgba(122, 0, 0, 0.18);
}

.xg-hero-text h1 {
    margin: 0 0 8px;
    font-size: 30px;
    letter-spacing: 6px;
    font-weight: 800;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
}

.xg-hero-text p {
    margin: 0;
    font-size: 14px;
    letter-spacing: 2px;
    color: rgba(245, 233, 208, 0.92);
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.3);
}

@media (max-width: 640px) {
    .xg-hero {
        flex-direction: column;
        align-items: flex-start;
        padding: 24px;
    }

    .xg-hero-text h1 {
        font-size: 24px;
        letter-spacing: 4px;
    }
}

/* 标签 */
.xg-tabs {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.xg-tabs button,
.xg-admin-subtabs button {
    position: relative;
    padding: 10px 30px;
    border-radius: 999px;
    border: 1px solid #E8DCC8;
    background: #fff;
    color: #8B0000;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(90, 54, 20, 0.05);
}

.xg-tabs button.is-active,
.xg-admin-subtabs button.is-active {
    background: #8B0000;
    color: #FFF6E0;
    border-color: #8B0000;
}

.xg-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    border-radius: 999px;
    background: #C49A3A;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    line-height: 20px;
    text-align: center;
}

/* ---------- 大厅 ---------- */
.xg-hall-bar {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 26px;
}

.xg-hall-bar input {
    width: 320px;
    max-width: 60vw;
    padding: 11px 18px;
    border: 1px solid #E8DCC8;
    border-radius: 999px;
    font-size: 15px;
    outline: none;
    background: #fff;
}

.xg-hall-bar input:focus {
    border-color: #8B0000;
}

.xg-hall-bar button {
    padding: 11px 30px;
    border: none;
    border-radius: 999px;
    background: #8B0000;
    color: #FFF6E0;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
}

.xg-hall-bar button:hover {
    background: #6E0000;
}

.xg-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
}

.xg-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 6px 20px rgba(90, 54, 20, 0.08);
    display: flex;
    flex-direction: column;
    transition: transform 0.2s, box-shadow 0.2s;
}

.xg-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(139, 0, 0, 0.14);
}

.xg-card-cover {
    width: 100%;
    height: 220px;
    object-fit: contain;
    display: block;
    background: #F7F3EA;
}

.xg-card-cover-default {
    height: 220px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: linear-gradient(135deg, #8B0000 0%, #6E0000 100%);
    color: #F3D9A4;
}

.xg-card-cover-default .def-char {
    font-size: 72px;
    font-weight: 900;
    line-height: 1;
    letter-spacing: 0.1em;
}

.xg-card-cover-default .def-label {
    font-size: 12px;
    letter-spacing: 0.3em;
    opacity: 0.8;
}

.xg-card-body {
    padding: 16px 18px 18px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1 1 auto;
}

.xg-card-title {
    font-size: 19px;
    font-weight: 800;
    color: #8B0000;
}

.xg-card-meta {
    font-size: 13px;
    color: #6B6055;
    line-height: 1.8;
}

.xg-card-meta b {
    color: #3F3A33;
    font-weight: 700;
}

.xg-card-desc {
    font-size: 13px;
    color: #8A8073;
    line-height: 1.8;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.xg-card-foot {
    margin-top: auto;
    padding-top: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.xg-card-clues {
    font-size: 12px;
    color: #8A8073;
}

.xg-clue-btn {
    padding: 8px 20px;
    border: 1px solid #8B0000;
    border-radius: 999px;
    background: #fff;
    color: #8B0000;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.xg-clue-btn:hover {
    background: #8B0000;
    color: #FFF6E0;
}

.xg-empty {
    text-align: center;
    padding: 60px 0;
    color: #8A8073;
    font-size: 14px;
    grid-column: 1 / -1;
}

/* 分页 */
.xg-pager {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    margin-top: 26px;
    font-size: 14px;
    color: #6B6055;
}

.xg-pager button {
    padding: 7px 20px;
    border: 1px solid #E8DCC8;
    border-radius: 8px;
    background: #fff;
    color: #8B0000;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}

.xg-pager button:disabled {
    color: #B8AFA0;
    cursor: default;
}

.xg-pager button:not(:disabled):hover {
    border-color: #8B0000;
}

/* ---------- 表单 ---------- */
.xg-form-card {
    max-width: 720px;
    margin: 0 auto;
    background: #fff;
    border-radius: 14px;
    padding: 34px 40px 38px;
    box-shadow: 0 8px 28px rgba(90, 54, 20, 0.08);
}

.xg-form-title {
    margin: 0 0 6px;
    text-align: center;
    font-size: 24px;
    font-weight: 800;
    color: #8B0000;
    letter-spacing: 0.05em;
}

.xg-form-tip {
    margin: 0 0 24px;
    text-align: center;
    font-size: 13px;
    color: #8A8073;
}

.xg-form-tip b {
    color: #B03A2E;
}

.xg-field {
    margin-bottom: 16px;
}

.xg-field label {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
    font-weight: 700;
    color: #3F3A33;
}

.xg-field label b {
    color: #B03A2E;
}

.xg-field input[type="text"],
.xg-field textarea {
    width: 100%;
    box-sizing: border-box;
    padding: 11px 14px;
    border: 1px solid #E8DCC8;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    outline: none;
    background: #FFFDF8;
}

.xg-field input[type="text"]:focus,
.xg-field textarea:focus {
    border-color: #8B0000;
}

.xg-field input[type="file"] {
    font-size: 13px;
    color: #6B6055;
}

.xg-img-preview {
    display: flex;
    gap: 10px;
    margin-top: 10px;
    flex-wrap: wrap;
}

.xg-img-preview img {
    width: 96px;
    height: 96px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid #E8DCC8;
}

.xg-form-error {
    margin-bottom: 14px;
    padding: 10px 14px;
    border-radius: 8px;
    background: #FDECEA;
    color: #B03A2E;
    font-size: 13px;
}

/* ---------- 免责协议 ---------- */
.xg-agree {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin: 4px 0 16px;
    font-size: 13px;
    color: #6B6055;
    line-height: 1.7;
    cursor: pointer;
}

.xg-agree input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin-top: 2px;
    accent-color: #8B0000;
    flex: none;
    cursor: pointer;
}

.xg-agree-link {
    padding: 0;
    border: none;
    background: none;
    font: inherit;
    color: #8B0000;
    font-weight: 700;
    cursor: pointer;
}

.xg-agree-link:hover { text-decoration: underline; }

.xg-agree-mask {
    position: fixed;
    inset: 0;
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 20px;
    background: rgba(40, 26, 16, 0.55);
}

.xg-agree-mask[hidden] { display: none; }

.xg-agree-dialog {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 760px;
    max-height: 100%;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 20px 60px rgba(40, 26, 16, 0.32);
    overflow: hidden;
}

.xg-agree-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 24px;
    background: #8B0000;
    color: #FFF6E0;
}

.xg-agree-head h2 {
    margin: 0;
    font-size: 19px;
    font-weight: 800;
    letter-spacing: 0.1em;
}

.xg-agree-close {
    border: none;
    background: none;
    color: #FFF6E0;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
    opacity: 0.85;
}

.xg-agree-close:hover { opacity: 1; }

.xg-agree-body {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 22px 28px 26px;
    font-size: 14px;
    color: #4A4238;
    line-height: 1.95;
}

.xg-agree-body h3 {
    margin: 22px 0 8px;
    font-size: 15px;
    font-weight: 800;
    color: #8B0000;
}

.xg-agree-body p { margin: 0 0 8px; }
.xg-agree-body b { color: #3F3A33; }

.xg-agree-intro {
    padding: 14px 16px;
    background: #FBF6EA;
    border-left: 3px solid #8B0000;
    border-radius: 0 8px 8px 0;
}

.xg-agree-sub {
    padding-left: 14px;
    color: #6B6055;
}

.xg-agree-note {
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px dashed #E0D6C4;
    color: #8A8073;
    font-size: 13px;
}

.xg-agree-foot {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 14px 24px;
    border-top: 1px solid #EFE7D8;
    background: #FDFBF6;
}

.xg-agree-foot button {
    padding: 9px 26px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}

.xg-agree-cancel {
    border: 1px solid #D8CDBA;
    background: #fff;
    color: #6B6055;
}

.xg-agree-cancel:hover { border-color: #8B0000; color: #8B0000; }

.xg-agree-ok {
    border: none;
    background: #8B0000;
    color: #FFF6E0;
}

.xg-agree-ok:hover { background: #6E0000; }

@media (max-width: 640px) {
    .xg-agree-body { padding: 18px 18px 22px; }
}

.xg-submit {
    display: block;
    width: 100%;
    padding: 13px 0;
    border: none;
    border-radius: 10px;
    background: #8B0000;
    color: #FFF6E0;
    font-size: 16px;
    font-weight: 800;
    letter-spacing: 0.2em;
    cursor: pointer;
    transition: background 0.2s;
}

.xg-submit:hover {
    background: #6E0000;
}

.xg-submit:disabled {
    opacity: 0.6;
    cursor: default;
}

/* ---------- 我的寻根 ---------- */
.xg-mine-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-width: 860px;
    margin: 0 auto;
}

.xg-mine-item {
    background: #fff;
    border-radius: 12px;
    padding: 18px 22px;
    box-shadow: 0 4px 16px rgba(90, 54, 20, 0.06);
}

.xg-mine-head {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.xg-mine-imgs {
    display: flex;
    gap: 10px;
    margin-top: 12px;
    flex-wrap: wrap;
}

.xg-mine-imgs img {
    width: 110px;
    height: 110px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid #E8DCC8;
    cursor: zoom-in;
}

.xg-mine-title {
    font-size: 17px;
    font-weight: 800;
    color: #3F3A33;
}

button.xg-mine-title {
    padding: 0;
    border: none;
    background: none;
    font-family: inherit;
    cursor: pointer;
    transition: color 0.2s;
}

button.xg-mine-title:hover {
    color: #8B0000;
    text-decoration: underline;
}

.xg-status {
    padding: 3px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

.xg-status.is-pending { background: #FFF4DC; color: #A87900; }
.xg-status.is-approved { background: #E5F4EC; color: #1F7A4D; }
.xg-status.is-rejected { background: #FDECEA; color: #B03A2E; }
.xg-status.is-offline { background: #EFEFEF; color: #8A8073; }

.xg-mine-opinion {
    margin-top: 10px;
    padding: 10px 14px;
    border-left: 3px solid #B03A2E;
    background: #FDF6F5;
    font-size: 13px;
    color: #6B6055;
    line-height: 1.8;
}

.xg-mine-opinion b {
    color: #B03A2E;
}

.xg-mine-desc {
    margin-top: 8px;
    font-size: 13px;
    color: #6B6055;
    line-height: 1.8;
}

.xg-mine-actions {
    margin-top: 12px;
    display: flex;
    gap: 10px;
    align-items: center;
}

.xg-mine-sub {
    max-width: 860px;
    margin: 34px auto 16px;
    font-size: 18px;
    font-weight: 800;
    color: #3F3A33;
    padding-left: 12px;
    border-left: 4px solid #8B0000;
}

.xg-mine-time {
    margin-left: auto;
    font-size: 12px;
    color: #A89E90;
}

.xg-mine-actions button {
    padding: 7px 20px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}

.xg-act-edit {
    border: 1px solid #8B0000;
    background: #fff;
    color: #8B0000;
}

.xg-act-edit:hover {
    background: #8B0000;
    color: #FFF6E0;
}

.xg-mine-actions .xg-act-detail {
    border: none;
    background: #8B0000;
    color: #FFF6E0;
}

.xg-mine-actions .xg-act-detail:hover { background: #6D0000; }

.xg-mine-actions .xg-act-view {
    border: 1px solid #D8CDBA;
    background: #fff;
    color: #6B6055;
}

.xg-mine-actions .xg-act-view:hover {
    border-color: #8B0000;
    color: #8B0000;
}

.xg-act-offline {
    border: 1px solid #B8AFA0;
    background: #fff;
    color: #8A8073;
}

.xg-act-offline:hover {
    border-color: #6B6055;
    color: #3F3A33;
}

/* ---------- 审核管理 ---------- */
.xg-admin-subtabs {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 20px;
}

.xg-admin-filter {
    display: flex;
    justify-content: center;
    margin-bottom: 18px;
}

.xg-admin-filter select {
    padding: 8px 16px;
    border: 1px solid #E8DCC8;
    border-radius: 8px;
    font-size: 14px;
    background: #fff;
    color: #3F3A33;
    outline: none;
}

.xg-admin-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-width: 920px;
    margin: 0 auto;
}

.xg-review-item {
    background: #fff;
    border-radius: 12px;
    padding: 20px 24px;
    box-shadow: 0 4px 16px rgba(90, 54, 20, 0.06);
}

.xg-review-head {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.xg-review-title {
    font-size: 17px;
    font-weight: 800;
    color: #3F3A33;
}

.xg-review-contact {
    font-size: 13px;
    font-weight: 700;
    color: #B03A2E;
    background: #FDF6F5;
    padding: 4px 12px;
    border-radius: 6px;
}

.xg-review-meta {
    font-size: 13px;
    color: #6B6055;
    line-height: 2;
}

.xg-review-meta b {
    color: #3F3A33;
}

.xg-review-desc {
    margin-top: 8px;
    padding: 12px 14px;
    background: #FBF6EA;
    border-radius: 8px;
    font-size: 13px;
    color: #3F3A33;
    line-height: 1.9;
    white-space: pre-wrap;
}

.xg-review-imgs {
    display: flex;
    gap: 10px;
    margin-top: 10px;
    flex-wrap: wrap;
}

.xg-review-imgs img {
    width: 160px;
    height: 160px;
    object-fit: contain;
    background: #F7F3EA;
    border-radius: 8px;
    border: 1px solid #E8DCC8;
    cursor: zoom-in;
}

.xg-review-actions {
    margin-top: 14px;
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.xg-review-actions input {
    flex: 1 1 260px;
    min-width: 0;
    padding: 9px 14px;
    border: 1px solid #E8DCC8;
    border-radius: 8px;
    font-size: 13px;
    outline: none;
}

.xg-review-actions input:focus {
    border-color: #8B0000;
}

.xg-btn-approve {
    padding: 9px 26px;
    border: none;
    border-radius: 8px;
    background: #1F7A4D;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}

.xg-btn-approve:hover { background: #17603C; }

.xg-btn-reject {
    padding: 9px 26px;
    border: none;
    border-radius: 8px;
    background: #B03A2E;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}

.xg-btn-reject:hover { background: #8E2F24; }

/* ---------- 详情 ---------- */
.xg-detail {
    max-width: 860px;
    margin: 0 auto;
}

.xg-detail-back {
    display: inline-block;
    margin-bottom: 18px;
    color: #8B0000;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}

.xg-detail-back:hover {
    text-decoration: underline;
}

.xg-detail-card {
    background: #fff;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 8px 28px rgba(90, 54, 20, 0.08);
}

.xg-detail-gallery {
    padding: 20px 24px 0;
}

.xg-gallery-main {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 360px;
    background: #F7F3EA;
    border: 1px solid #E8DCC8;
    border-radius: 12px;
    overflow: hidden;
}

.xg-gallery-main img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    cursor: zoom-in;
}

.xg-gallery-thumbs {
    display: flex;
    gap: 10px;
    margin-top: 12px;
    flex-wrap: wrap;
}

.xg-gallery-thumb {
    width: 92px;
    height: 72px;
    object-fit: cover;
    border-radius: 8px;
    border: 2px solid transparent;
    background: #F7F3EA;
    cursor: pointer;
    transition: border-color 0.2s, transform 0.2s;
}

.xg-gallery-thumb:hover { transform: translateY(-2px); }
.xg-gallery-thumb.is-active { border-color: #8B0000; }

.xg-detail-body {
    padding: 22px 28px 28px;
}

.xg-detail-title {
    margin: 0 0 14px;
    font-size: 26px;
    font-weight: 900;
    color: #8B0000;
}

.xg-detail-meta {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px 24px;
    margin-bottom: 16px;
    font-size: 14px;
    color: #6B6055;
}

.xg-detail-meta b {
    color: #3F3A33;
}

.xg-detail-desc {
    font-size: 14px;
    line-height: 2;
    color: #3F3A33;
    white-space: pre-wrap;
    padding-top: 14px;
    border-top: 1px dashed #E8DCC8;
}

/* 线索区 */
.xg-clues {
    margin-top: 26px;
    background: #fff;
    border-radius: 14px;
    padding: 24px 28px;
    box-shadow: 0 8px 28px rgba(90, 54, 20, 0.08);
}

.xg-clues h3 {
    margin: 0 0 16px;
    font-size: 18px;
    font-weight: 800;
    color: #8B0000;
}

.xg-clue-item {
    padding: 12px 0;
    border-bottom: 1px solid #F0E8D8;
}

.xg-clue-item:last-child {
    border-bottom: none;
}

.xg-clue-item .c-head {
    display: flex;
    gap: 10px;
    font-size: 12px;
    color: #8A8073;
    margin-bottom: 6px;
}

.xg-clue-item .c-author {
    font-weight: 700;
    color: #8B0000;
}

.xg-clue-item .c-content {
    font-size: 14px;
    line-height: 1.9;
    color: #3F3A33;
    white-space: pre-wrap;
}

.xg-clue-form {
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px dashed #E8DCC8;
}

.xg-clue-form textarea {
    width: 100%;
    box-sizing: border-box;
    padding: 11px 14px;
    border: 1px solid #E8DCC8;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    outline: none;
    background: #FFFDF8;
    resize: vertical;
}

.xg-clue-form textarea:focus {
    border-color: #8B0000;
}

.xg-clue-form .c-tip {
    margin: 8px 0 10px;
    font-size: 12px;
    color: #8A8073;
    line-height: 1.8;
}

.xg-clue-form button {
    padding: 10px 32px;
    border: none;
    border-radius: 999px;
    background: #8B0000;
    color: #FFF6E0;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}

.xg-clue-form button:hover {
    background: #6E0000;
}

.xg-clue-form button:disabled {
    opacity: 0.6;
    cursor: default;
}

@media (max-width: 1000px) {
    .xg-cards { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
    .xg-cards { grid-template-columns: 1fr; }
    .xg-detail-meta { grid-template-columns: 1fr; }
    .xg-form-card { padding: 26px 20px 30px; }
}
