
:root {
    --bg: #fbf8f2;
    --paper: #fffdf8;
    --ink: #211c17;
    --gold: #b08a50;
    --muted: #746d64;
    --line: #e8ddcb;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: system-ui, -apple-system, "Microsoft YaHei", sans-serif;
    line-height: 1.75;
}

a {
    color: inherit;
    text-decoration: none;
}

.wrap {
    max-width: 1120px;
    margin: auto;
    padding: 0 20px;
}

/* 网站顶部导航 */

.site-header {
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    min-height: 76px;
}

.brand {
    font-size: 25px;
    font-family: Georgia, serif;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 4px;
}

.brand span {
    color: var(--gold);
}

.brand small {
    font-size: 11px;
    color: var(--muted);
    margin-left: 8px;
    font-family: system-ui;
}

.brand img {
    width: 36px;
    height: 36px;
    object-fit: contain;
    margin-right: 6px;
}

.nav nav {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.nav nav a {
    font-size: 14px;
}

.nav nav a:hover,
.nav nav a[aria-current] {
    color: #946c36;
}

/* 首页顶部 */

.hero {
    padding: 65px 0 35px;
    text-align: center;
}

.eyebrow {
    color: #9c783f;
    letter-spacing: 3px;
    font-size: 12px;
    text-transform: uppercase;
}

.hero h1 {
    font: 700 clamp(34px, 5vw, 57px)/1.2 Georgia, "Microsoft YaHei", serif;
    margin: 15px auto;
}

.lead {
    max-width: 760px;
    margin: 15px auto 25px;
    color: var(--muted);
}

/* 按钮 */

.buttons {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.btn {
    display: inline-block;
    border: 1px solid var(--gold);
    padding: 11px 22px;
    border-radius: 8px;
    background: var(--paper);
    font-weight: 650;
}

.btn.primary {
    background: var(--ink);
    color: #e9d4a8;
    border-color: var(--ink);
}

.btn:hover {
    transform: translateY(-1px);
}

/* 通用内容 */

section {
    margin: 35px 0 55px;
}

h2 {
    font: 700 29px/1.3 Georgia, "Microsoft YaHei", serif;
}

h3 {
    line-height: 1.4;
}

.sub {
    color: var(--muted);
    margin-top: -8px;
}

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

.card {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 12px;
    overflow: hidden;
    padding: 20px;
    box-shadow: 0 8px 25px #211c1708;
}

.card h3 {
    margin: 0 0 8px;
}

.card p {
    color: var(--muted);
    margin: 8px 0;
}

.card small {
    color: #a47d45;
}

/* 首页九宫格 */

.gallery {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.gallery a {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 10px;
    overflow: hidden;
    text-align: center;
    font-size: 12px;
    color: #6d604f;
    padding-bottom: 8px;
}

.gallery img {
    width: 100%;
    height: auto;
    aspect-ratio: 3/4;
    object-fit: contain;
    display: block;
    background: #eee7db;
}

.gallery span {
    display: block;
    padding: 5px;
}

/* 文章列表 */

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

/* 文章详情 */

.article h1 {
    font-size: clamp(30px, 4vw, 46px);
    line-height: 1.3;
}

.article-body {
    font-size: 17px;
    line-height: 1.95;
    overflow-wrap: anywhere;
}

.article-body img {
    max-width: 100%;
    height: auto;
}

.article-body h2 {
    margin-top: 30px;
}

/* 新增：文章中的链接显示蓝色 */

.article-body a {
    color: #0066ff !important;
    text-decoration: underline !important;
    text-decoration-thickness: 1.5px;
    text-underline-offset: 3px;
    font-weight: 600;
    overflow-wrap: anywhere;
    transition: color 0.2s ease;
}

/* 鼠标经过变红 */

.article-body a:hover {
    color: #e60023 !important;
    text-decoration: underline !important;
}

/* 手机点击变红 */

.article-body a:active {
    color: #e60023 !important;
}

/* 键盘操作时突出链接 */

.article-body a:focus-visible {
    outline: 2px solid #0066ff;
    outline-offset: 3px;
    border-radius: 2px;
}

.meta {
    font-size: 13px;
    color: var(--muted);
}

/* 页脚 */

.footer {
    border-top: 1px solid var(--line);
    margin-top: 70px;
    padding: 30px 0;
    text-align: center;
    color: var(--muted);
    font-size: 13px;
}

.footer p {
    margin: 5px;
}

/* 区域地图 */

.map-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 18px;
}

.map-frame {
    height: 550px;
    border: 1px solid var(--line);
    border-radius: 12px;
    overflow: hidden;
}

#map {
    height: 100%;
    width: 100%;
}

.area-list {
    display: grid;
    gap: 9px;
    align-content: start;
}

.area-list button {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 9px;
    padding: 12px;
    text-align: left;
    cursor: pointer;
    font: inherit;
}

.area-list button:hover {
    border-color: var(--gold);
}

.notice {
    background: #f4ead8;
    border-left: 3px solid var(--gold);
    padding: 14px;
    border-radius: 5px;
}

/* 文章管理后台 */

.admin-form {
    max-width: 800px;
}

.field {
    display: block;
    margin: 15px 0;
}

.field span {
    display: block;
    font-weight: 600;
    margin-bottom: 5px;
}

input,
textarea,
select {
    width: 100%;
    padding: 11px;
    border: 1px solid #c9bca7;
    border-radius: 7px;
    font: inherit;
    background: white;
}

textarea {
    min-height: 150px;
}

.admin-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.table-wrap {
    overflow: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

td,
th {
    border-bottom: 1px solid var(--line);
    padding: 12px;
    text-align: left;
}

.inline {
    display: inline;
}

.danger {
    color: #9d2626;
}

.pagination {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

/* 平板与手机 */

@media (max-width: 760px) {
    .nav {
        display: block;
        padding-top: 12px;
        padding-bottom: 12px;
    }

    .nav nav {
        gap: 14px;
        margin-top: 8px;
    }

    .brand {
        font-size: 22px;
    }

    .hero {
        padding: 36px 0 20px;
    }

    .map-layout {
        grid-template-columns: 1fr;
    }

    .map-frame {
        height: 430px;
    }

    .article-list {
        grid-template-columns: 1fr;
    }

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

    .card {
        padding: 13px;
    }
}

@media (max-width: 380px) {
    .brand small {
        display: none;
    }

    .grid {
        grid-template-columns: 1fr;
    }
}

/* KKBaby：手机九宫格始终三列，图片完整显示 */

.gallery {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.gallery a {
    min-width: 0;
    overflow: hidden;
}

.gallery img {
    display: block;
    width: 100%;
    height: auto;
    object-fit: contain;
    aspect-ratio: auto;
}

@media (max-width: 600px) {
    .gallery {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 6px;
    }

    .gallery a span {
        font-size: 10px;
        line-height: 1.35;
        padding: 5px 2px;
    }
}
/* 强制文章正文链接显示蓝色 */
article.article .article-body a,
.article-body a,
.article-body a:link,
.article-body a:visited {
    color: #0066ff !important;
    text-decoration: underline !important;
    font-weight: 700 !important;
}

article.article .article-body a:hover {
    color: #e60023 !important;
}
