html, body {
    height: 100%;
}

html {
    overflow-y: scroll;
}

body {
    margin: 0;
    font-family: -apple-system, Helvetica, Arial, sans-serif;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* 通用容器宽度（绿色框效果） */
.cs-container {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
}

/* 只在导航栏里用 flex 排版 */
.cs-header .cs-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}



/* 顶部导航 */
.cs-header {
    background: #333333;
    color: white;
    position: fixed;   /* 固定在顶部 */
    top: 0;
    left: 0;
    right: 0;          /* 或者 width: 100% */
    z-index: 999;
    padding: 8px 0;
}


/* logo 更大 */
.cs-logo a {
    color: white;
    text-decoration: none;
    font-size: 35px;
    font-weight: bold;
    font-family: "EB Garamond", serif;
}

/* 导航的右侧“红框宽度控制” */
.cs-nav {
    flex: 1;
    display: flex;
    justify-content: flex-end;
}

/* 导航菜单：分散排列（红框效果） */
.cs-nav > ul {
    list-style: none;
    display: flex;
    justify-content: space-between;  
    width: 580px;                    /* 红色框宽度：你可以调大或调小 */
    margin: 0;
    padding: 0;
}

.cs-nav li {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.cs-nav a {
    color: white;
    text-decoration: none;
    text-align: center;
    line-height: 1.3;
    font-size: 16px;
}

/* 英文小一号 */
.cs-nav a span {
    font-size: 13px;
    opacity: 0.85;
}

.cs-nav li.has-dropdown {
    position: relative;
}

.cs-submenu {
    display: none;
    position: absolute;
    top: 100%;   /* ★ 让下拉菜单上缘与导航栏边界齐平 */
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    padding: 5px 0;
    margin-top: 0;
    list-style: none;
    min-width: 115px;
    border-radius: 4px;
    z-index: 9999;
}

.cs-nav li.has-dropdown:hover .cs-submenu {
    display: block;
}

.cs-submenu a {
    display: block;
    padding: 6px 12px;
    font-size: 13px;
    color: #fff;
    text-decoration: none;
    white-space: nowrap;
}

.cs-submenu a:hover {
    background: #555;
}


/* main 区域限制在绿色框宽度 */
.cs-main .cs-container {
    padding: 30px 0;
}

.cs-main {
    padding-top: 60px;
}


/* 页脚 */
.cs-footer {
    text-align: center;
    padding: 20px;
    color: #555;
    font-size: 14px;
    margin-top: auto;
}

.footer-name {
    font-style: italic;
}

/* 通用插图 */
.cs-figure {
    float: left;                 /* 图片靠左，可自动让正文环绕 */
    width: 250px;                /* 默认图片宽度 */
    margin-right: 15px;           /* 文字会更贴近图片 */
    margin-left: 0;
    margin-bottom: 10px;         /* 上0 右20 下10 左0 → 左侧紧贴页幅 */
    margin-top: 10px;
    padding: 0;
}

.cs-figure img {
    width: 100%;
    height: auto;
    display: block;
    margin: 0;
    border-radius: 1px;
}

/* 图注 */
.cs-figure figcaption {
    width: 100%;
    font-size: 15px;
    line-height: 1.2;
    color: #444;
    margin-top: 6px;
}

/* 图注第二行（灰色斜体） */
.cs-figure figcaption span {
    #font-style: italic;
    font-size: 12px;
    color: #888;
}

/* 正文区域内的链接颜色（不会影响导航栏） */
.cs-main a {
    color: #444;
    text-decoration: underline;
}

.cs-main a:hover {
    color: #000;
    text-decoration: underline;
}

.cs-filter-bar {
    margin: 10px 0 15px 0;
    font-size: 14px;
}

.cs-filter-bar select {
    padding: 4px 8px;
    font-size: 14px;
}

/* 地名表格优化 */
.cs-table-wrapper {
    width: 100%;
    margin: 0;  
    padding: 0;
}

.cs-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;  /* 更紧凑 */
}

.cs-table th,
.cs-table td {
    #border: 1px solid #ddd;
    padding: 4px 6px;
    text-align: left !important;   /* 表头强制左对齐 */
    vertical-align: top;
}

.cs-table th {
    background: #f3f3f3;
    font-weight: 600;
}



.cs-table th span {
    font-size: 13px;
    color: #666;
}

/* 地名表格表头悬浮在页面顶部下方 */
.cs-table thead th {
    position: sticky;
    top: 60px;      /* 根据你导航栏高度微调，比如 50~70px */
    z-index: 5;
    background: #f3f3f3;   /* 覆盖下面的内容 */
}

/* 设置地名表格列宽 */
.cs-table th:nth-child(1),
.cs-table td:nth-child(1) {
    width: 90px;   /* Original name */
}

.cs-table th:nth-child(2),
.cs-table td:nth-child(2) {
    width: 95px;    /* Chinese old name */
}

.cs-table th:nth-child(3),
.cs-table td:nth-child(3) {
    width: 90px;   /* Current name */
}

.cs-table th:nth-child(4),
.cs-table td:nth-child(4) {
    width: 95px;    /* Province */
}

.cs-table th:nth-child(5),
.cs-table td:nth-child(5) {
    width: 300px;   /* Notes */
}

.cs-table th:nth-child(6),
.cs-table td:nth-child(6) {
    width: 120px;   /* Reference */
}
