/* ===== 全局重置 ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: #d6c9b0;
    font-family: "SimSun", "宋体", "Times New Roman", serif;
    display: flex;
    justify-content: center;
    padding: 40px 20px;
    min-height: 100vh;
}

.site-wrapper {
    max-width: 880px;
    width: 100%;
    background: #f7f2e6;
    background-image:
        radial-gradient(ellipse at 30% 20%, rgba(200, 180, 150, 0.08) 0%, transparent 60%),
        radial-gradient(ellipse at 70% 80%, rgba(180, 160, 130, 0.06) 0%, transparent 50%);
    border: 4px double #b8a68b;
    border-radius: 4px;
    padding: 36px 42px 28px;
    box-shadow: 0 8px 32px rgba(60, 40, 20, 0.25), inset 0 1px 0 rgba(255, 248, 235, 0.6);
    position: relative;
}

.site-wrapper::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(180, 160, 130, 0.03) 2px, rgba(180, 160, 130, 0.03) 4px);
    pointer-events: none;
    border-radius: 4px;
}

.header {
    border-bottom: 3px double #b8a68b;
    padding-bottom: 16px;
    margin-bottom: 24px;
    text-align: center;
}

.header h1 {
    font-size: 32px;
    font-weight: normal;
    color: #5a4a38;
    letter-spacing: 8px;
    text-shadow: 0 1px 0 #ede6d8;
}

.header .sub {
    font-size: 14px;
    color: #8f7d66;
    letter-spacing: 4px;
    margin-top: 4px;
}

.header .divider {
    display: block;
    width: 60px;
    height: 2px;
    background: #c9bbaa;
    margin: 10px auto 0;
}

.nav {
    display: flex;
    justify-content: center;
    gap: 32px;
    font-size: 15px;
    padding: 10px 0 14px;
    border-bottom: 1px solid #ddd0bf;
    margin-bottom: 22px;
    flex-wrap: wrap;
}

.nav a {
    color: #6a5a48;
    text-decoration: none;
    padding: 2px 8px;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    transition: border-color 0.2s, color 0.2s;
    letter-spacing: 1px;
}

.nav a:hover {
    border-bottom-color: #b8a68b;
    color: #3d3228;
}
.nav .active {
    border-bottom-color: #b8a68b;
    color: #3d3228;
    font-weight: bold;
}

.welcome {
    font-size: 14px;
    color: #5a4a38;
    line-height: 1.9;
    margin-bottom: 24px;
    padding: 12px 18px;
    background: rgba(200, 185, 165, 0.2);
    border-left: 4px solid #c9bbaa;
}

.section-title {
    font-size: 18px;
    color: #5a4a38;
    font-weight: normal;
    letter-spacing: 3px;
    margin-bottom: 14px;
}

.property-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    margin-bottom: 28px;
}

.property-table th {
    background: #e6ddcf;
    color: #4a3d30;
    font-weight: normal;
    padding: 10px 8px;
    border: 1px solid #c9bbaa;
    letter-spacing: 2px;
    font-size: 13px;
}

.property-table td {
    padding: 10px 8px;
    border: 1px solid #d6c9b8;
    color: #4a3d30;
    background: #fcf8f0;
}

.property-table tr:hover td {
    background: #f5efe6;
}

.highlight-row td {
    background: #f5ede2 !important;
    border-color: #b8a68b;
}

.highlight-row .prop-link {
    color: #8a3a2a;
    font-weight: bold;
    text-decoration: none;
    border-bottom: 2px solid #c9a090;
    cursor: pointer;
    transition: color 0.2s;
}

.highlight-row .prop-link:hover {
    color: #5a2018;
}

.status-badge {
    display: inline-block;
    background: #8a3a2a;
    color: #f7f2e6;
    font-size: 11px;
    padding: 2px 10px;
    letter-spacing: 1px;
    border-radius: 2px;
}

.status-sold {
    background: #7a8a7a;
}

.footer {
    border-top: 2px solid #ddd0bf;
    padding-top: 18px;
    margin-top: 6px;
    font-size: 13px;
    color: #8f7d66;
    text-align: center;
    letter-spacing: 1px;
}

.footer .update {
    color: #aa9a88;
    font-size: 12px;
}

.footer .whisper {
    display: block;
    font-size: 11px;
    color: #c9bbaa;
    margin-top: 6px;
    letter-spacing: 2px;
}

/* 模态框 */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(30, 22, 16, 0.75);
    backdrop-filter: blur(4px);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    padding: 24px;
    animation: fadeIn 0.35s ease;
}

.modal-overlay.active {
    display: flex;
}

@keyframes fadeIn {
    0% { opacity: 0; transform: scale(0.96); }
    100% { opacity: 1; transform: scale(1); }
}

.modal-box {
    background: #f7f2e6;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    padding: 32px 36px;
    border: 4px double #b8a68b;
    border-radius: 4px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    position: relative;
}

.modal-box .close-btn {
    position: absolute;
    top: 12px;
    right: 18px;
    font-size: 24px;
    color: #8f7d66;
    cursor: pointer;
    background: none;
    border: none;
    line-height: 1;
}

.modal-box .close-btn:hover {
    color: #4a3d30;
}

.modal-box h2 {
    font-size: 20px;
    font-weight: normal;
    color: #5a4a38;
    letter-spacing: 3px;
    border-bottom: 2px solid #ddd0bf;
    padding-bottom: 12px;
    margin-bottom: 18px;
}

.modal-box p, .modal-box li {
    font-size: 14px;
    line-height: 1.9;
    color: #4a3d30;
}

.photo-placeholder, .team-photo {
    width: 100%;
    aspect-ratio: 16 / 10;
    background: #2c241c;
    border-radius: 2px;
    margin: 14px 0 16px;
    border: 1px solid #b8a68b;
    overflow: hidden;
}

.photo-placeholder img, .team-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.photo-caption {
    font-size: 12px;
    color: #8f7d66;
    text-align: right;
    margin-top: -10px;
    margin-bottom: 14px;
    letter-spacing: 1px;
}

.detail-meta {
    font-size: 13px;
    color: #6a5a48;
    line-height: 2;
    background: rgba(200, 185, 165, 0.15);
    padding: 10px 14px;
    border-left: 3px solid #c9bbaa;
    margin: 10px 0 14px;
}

.detail-meta strong {
    color: #4a3d30;
}

.detail-footer {
    font-size: 12px;
    color: #aa9a88;
    margin-top: 14px;
    border-top: 1px solid #ddd0bf;
    padding-top: 12px;
    text-align: right;
}

.team-caption {
    font-size: 13px;
    color: #5a4a38;
    text-align: center;
    line-height: 1.8;
}

.team-caption .hint {
    color: #8f7d66;
    font-size: 12px;
}

.contact-info {
    font-size: 14px;
    color: #4a3d30;
    line-height: 2.2;
    margin-bottom: 16px;
}

.contact-info .phone {
    color: #6a3a2a;
    font-weight: bold;
    letter-spacing: 1px;
}

.password-section {
    border-top: 2px solid #ddd0bf;
    padding-top: 18px;
    margin-top: 6px;
}

.password-section label {
    font-size: 14px;
    color: #4a3d30;
    display: block;
    margin-bottom: 8px;
    letter-spacing: 1px;
}

.password-input-group {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.password-input-group input {
    flex: 1;
    min-width: 120px;
    padding: 8px 14px;
    font-size: 14px;
    font-family: "SimSun", "宋体", serif;
    border: 2px solid #c9bbaa;
    background: #fcf8f0;
    color: #3d3228;
    outline: none;
    border-radius: 2px;
}

.password-input-group input:focus {
    border-color: #8f7d66;
}

.password-input-group button {
    padding: 8px 24px;
    font-size: 14px;
    font-family: "SimSun", "宋体", serif;
    background: #b8a68b;
    color: #f7f2e6;
    border: none;
    border-radius: 2px;
    cursor: pointer;
    transition: background 0.2s;
    letter-spacing: 2px;
}

.password-input-group button:hover {
    background: #8f7d66;
}

.password-result {
    margin-top: 12px;
    font-size: 14px;
    color: #6a3a2a;
    min-height: 24px;
}

.password-result.error {
    color: #8a3a2a;
}
.password-result.success {
    color: #3a6a3a;
}

@media (max-width: 640px) {
    .site-wrapper { padding: 20px 16px; }
    .header h1 { font-size: 24px; letter-spacing: 4px; }
    .nav { gap: 14px; font-size: 13px; }
    .property-table { font-size: 12px; }
    .property-table th, .property-table td { padding: 6px 4px; }
    .modal-box { padding: 22px 18px; }
    .modal-box h2 { font-size: 18px; }
    .password-input-group { flex-direction: column; align-items: stretch; }
    .password-input-group button { padding: 10px; }
}

.modal-box::-webkit-scrollbar { width: 6px; }
.modal-box::-webkit-scrollbar-track { background: #e6ddcf; }
.modal-box::-webkit-scrollbar-thumb { background: #b8a68b; border-radius: 4px; }

/* ===== 隐藏聊天触发器 ===== */
.chat-trigger {
    color: #d6c9b0;
    font-size: 14px;
    letter-spacing: 6px;
    cursor: pointer;
    user-select: none;
    transition: color 0.2s;
    display: block;
    margin-top: 4px;
    font-family: "SimSun", "宋体", serif;
}

.chat-trigger:hover {
    color: #8a7a6a;
}

/* ===== 聊天窗口 ===== */
.chat-window {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 380px;
    max-width: calc(100vw - 40px);
    max-height: 480px;
    background: #1e1612;
    border: 2px solid #4a3d30;
    border-radius: 6px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.7);
    z-index: 9999;
    display: none;
    flex-direction: column;
    font-family: "SimSun", "宋体", serif;
    overflow: hidden;
}

.chat-window.open {
    display: flex;
    animation: chatIn 0.3s ease;
}

@keyframes chatIn {
    0% { opacity: 0; transform: translateY(10px) scale(0.96); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}

.chat-window .chat-header {
    background: #2c241c;
    padding: 10px 16px;
    border-bottom: 1px solid #3d3228;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.chat-window .chat-header .title {
    color: #8a7a6a;
    font-size: 13px;
    letter-spacing: 2px;
}

.chat-window .chat-header .close-btn {
    background: none;
    border: none;
    color: #6a5a48;
    font-size: 18px;
    cursor: pointer;
    transition: color 0.2s;
    padding: 0 4px;
}

.chat-window .chat-header .close-btn:hover {
    color: #f7f2e6;
}

.chat-window .chat-body {
    flex: 1;
    padding: 12px 16px;
    overflow-y: auto;
    max-height: 340px;
    min-height: 120px;
    background: #1a1410;
}

.chat-window .chat-body .msg {
    font-size: 13px;
    line-height: 1.8;
    color: #d6c9b8;
    margin-bottom: 6px;
    padding: 4px 8px;
    border-left: 2px solid transparent;
    word-wrap: break-word;
}

.chat-window .chat-body .msg.system {
    color: #8a7a6a;
    font-size: 12px;
    border-left-color: #4a3d30;
}

.chat-window .chat-body .msg.npc {
    color: #c9a090;
    border-left-color: #6a3a2a;
}

.chat-window .chat-body .msg.user {
    color: #d6c9b8;
    border-left-color: #6a5a48;
    text-align: right;
}

.chat-window .chat-body .msg .highlight {
    color: #c9a090;
}

.chat-window .chat-input-area {
    display: flex;
    padding: 8px 12px 10px;
    border-top: 1px solid #3d3228;
    background: #1a1410;
    flex-shrink: 0;
    gap: 6px;
}

.chat-window .chat-input-area input {
    flex: 1;
    padding: 6px 12px;
    font-size: 13px;
    font-family: "SimSun", "宋体", serif;
    background: #2c241c;
    border: 1px solid #4a3d30;
    border-radius: 2px;
    color: #d6c9b8;
    outline: none;
    transition: border-color 0.2s;
}

.chat-window .chat-input-area input:focus {
    border-color: #6a5a48;
}

.chat-window .chat-input-area input::placeholder {
    color: #4a3d30;
}

.chat-window .chat-input-area button {
    padding: 6px 16px;
    font-size: 13px;
    font-family: "SimSun", "宋体", serif;
    background: #3d3228;
    border: 1px solid #4a3d30;
    border-radius: 2px;
    color: #8a7a6a;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.chat-window .chat-input-area button:hover {
    background: #4a3d30;
    color: #d6c9b8;
}

@media (max-width: 640px) {
    .chat-window {
        right: 10px;
        bottom: 10px;
        width: calc(100vw - 20px);
        max-height: 70vh;
    }
    .chat-window .chat-body {
        max-height: 50vh;
        min-height: 100px;
    }
}