/* ============================================================
   Mirage Wiki — 资讯百科版式
   布局性改动：百科站名条 / 分类索引表 / 扁平词条列表 / 词条信息盒
   ============================================================ */

:root {
    --wi-teal: #0f766e;
    --wi-teal-dark: #115e59;
    --wi-teal-soft: #f0fdfa;
    --wi-ink: #1f2937;
    --wi-grey: #6b7280;
    --wi-line: #d1d5db;
    --wi-line-soft: #e5e7eb;
}

body.rv-wiki {
    font-family: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
    background: #fff;
    color: var(--wi-ink);
}

/* ---------- 覆盖父主题 .main-container 的 flex 布局 ---------- */
.wi-head,
.wi-index,
.wi-entries,
.wi-article {
    display: block;
    width: 100%;
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
    box-sizing: border-box;
    padding-left: 12px;
    padding-right: 12px;
}

/* ---------- 头部：白底 + teal 细线（百科观感：扁平无阴影） ---------- */
.header.pc,
.header.mobile {
    background: #fff !important;
    border-bottom: 1px solid var(--wi-line);
    box-shadow: none;
}
.header .header-nav .logo,
.header .header-nav .logo a,
.header .site-title a {
    color: var(--wi-teal) !important;
    font-weight: 800;
}
.header .header-nav .nav-menu li a,
.header .header-nav .main-menu li a,
.header .header-nav .menu li a,
.header .header-nav .pc-nav li a,
.header .header-nav .pc-nav li span {
    color: #374151 !important;
    font-weight: 500;
}
.header .header-nav .nav-menu li a:hover,
.header .header-nav .main-menu li a:hover,
.header .header-nav .menu li a:hover,
.header .header-nav .pc-nav li a:hover,
.header .header-nav .pc-nav li.current-menu-item a {
    color: var(--wi-teal) !important;
    background: transparent;
    box-shadow: inset 0 -2px 0 var(--wi-teal);
}

/* ---------- 百科站名条 ---------- */
.wi-head { margin-top: 24px; }
.wi-head-inner {
    border: 1px solid var(--wi-line);
    background: var(--wi-teal-soft);
    padding: 22px 26px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}
.wi-brand {
    margin: 0 0 6px;
    font-family: "Noto Serif SC", "Songti SC", serif;
    font-size: 26px;
    font-weight: 700;
    color: var(--wi-ink);
}
.wi-brand-sub {
    font-size: 14px;
    font-weight: 500;
    color: var(--wi-teal);
    margin-left: 12px;
    font-family: "Noto Sans SC", sans-serif;
}
.wi-tagline {
    margin: 0;
    color: var(--wi-grey);
    font-size: 13.5px;
    line-height: 1.7;
}
.wi-head-search { flex-shrink: 0; min-width: 240px; }
.wi-head-search form { display: flex; gap: 8px; }
.wi-head-search input[type="text"],
.wi-head-search input[type="search"] {
    flex: 1;
    box-sizing: border-box;
    padding: 9px 13px;
    border: 1px solid var(--wi-line);
    font-size: 14px;
    background: #fff;
    outline: none;
}
.wi-head-search input:focus { border-color: var(--wi-teal); }
.wi-head-search button,
.wi-head-search input[type="submit"],
.wi-head-search .search-submit {
    padding: 9px 16px;
    background: var(--wi-teal);
    color: #fff;
    border: none;
    font-size: 14px;
    cursor: pointer;
}

/* ---------- 分区标题（百科式：衬线+底纹线） ---------- */
.wi-sec-title {
    font-family: "Noto Serif SC", "Songti SC", serif;
    font-size: 19px;
    font-weight: 700;
    color: var(--wi-ink);
    border-bottom: 1px solid var(--wi-ink);
    padding-bottom: 8px;
    margin-bottom: 0;
}

/* ---------- 分类索引表 ---------- */
.wi-index { margin-top: 20px; }
.wi-index-table {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid var(--wi-line);
}
.wi-index-table td {
    padding: 10px 14px;
    border-bottom: 1px solid var(--wi-line-soft);
    font-size: 14px;
}
.wi-index-table tr:last-child td { border-bottom: none; }
.wi-index-name { width: 30%; }
.wi-index-name a {
    color: var(--wi-teal);
    font-weight: 600;
    text-decoration: none;
}
.wi-index-name a:hover { text-decoration: underline; }
.wi-index-count {
    width: 16%;
    color: var(--wi-grey);
    white-space: nowrap;
}
.wi-index-latest a {
    color: var(--wi-grey);
    text-decoration: none;
}
.wi-index-latest a:hover { color: var(--wi-teal); text-decoration: underline; }

/* ---------- 最新词条（扁平定义式列表） ---------- */
.wi-entries { margin-top: 26px; margin-bottom: 20px; }
.wi-list { margin: 0; padding: 0 0 0 0; }
.wi-entry-title {
    font-family: "Noto Serif SC", "Songti SC", serif;
    font-size: 18px;
    font-weight: 700;
    margin: 22px 0 6px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--wi-line-soft);
}
.wi-entry-title a { color: var(--wi-teal-dark); text-decoration: none; }
.wi-entry-title a:hover { text-decoration: underline; }
.wi-entry-def {
    margin: 8px 0 6px;
    color: #4b5563;
    font-size: 14px;
    line-height: 1.8;
}
.wi-entry-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 6px;
    color: #9ca3af;
    font-size: 12.5px;
}
.wi-cat {
    color: var(--wi-teal);
    text-decoration: none;
    border: 1px solid var(--wi-line);
    padding: 1px 9px;
    font-size: 12px;
}
.wi-cat:hover { border-color: var(--wi-teal); }
.wi-sep { color: #d1d5db; }
.wi-goto {
    margin-left: auto;
    color: var(--wi-teal);
    font-size: 13px;
    text-decoration: none;
}
.wi-goto:hover { text-decoration: underline; }

.wi-empty {
    text-align: center;
    color: #9ca3af;
    padding: 50px 0;
    font-size: 15px;
}

/* ---------- 百科词条文章页 ---------- */
.wi-article { margin-top: 22px; margin-bottom: 20px; }
.wi-entry {
    background: #fff;
    border: 1px solid var(--wi-line);
    padding: 28px 32px 26px;
}
.wi-crumb {
    font-size: 12.5px;
    color: var(--wi-grey);
    margin-bottom: 16px;
}
.wi-crumb a { color: var(--wi-teal); text-decoration: none; }
.wi-crumb a:hover { text-decoration: underline; }
.wi-crumb span { margin: 0 6px; color: #cbd5e1; }
.wi-entry-h1 {
    margin: 0 0 18px;
    font-family: "Noto Serif SC", "Songti SC", serif;
    font-size: 28px;
    font-weight: 700;
    line-height: 1.4;
    color: var(--wi-ink);
    padding-bottom: 12px;
    border-bottom: 1px solid var(--wi-line);
}

/* 词条信息盒（经典 infobox：靠右浮动，移动端全宽） */
.wi-infobox {
    float: right;
    width: 250px;
    margin: 4px 0 16px 22px;
    border: 1px solid var(--wi-line);
    background: var(--wi-teal-soft);
    font-size: 13px;
}
.wi-infobox-title {
    background: var(--wi-teal);
    color: #fff;
    font-weight: 700;
    text-align: center;
    padding: 7px 10px;
    font-size: 13.5px;
}
.wi-infobox table { width: 100%; border-collapse: collapse; }
.wi-infobox th {
    text-align: left;
    padding: 7px 10px;
    color: var(--wi-grey);
    font-weight: 600;
    width: 72px;
    vertical-align: top;
    border-top: 1px solid var(--wi-line-soft);
}
.wi-infobox td {
    padding: 7px 10px;
    border-top: 1px solid var(--wi-line-soft);
    color: var(--wi-ink);
}
.wi-infobox td a { color: var(--wi-teal); text-decoration: none; }
.wi-infobox td a:hover { text-decoration: underline; }
.wi-entry-content { overflow: hidden; }

.wi-entry-content {
    font-size: 15.5px;
    line-height: 1.95;
    color: #374151;
}
.wi-entry-content h2 {
    font-family: "Noto Serif SC", "Songti SC", serif;
    font-size: 20px;
    font-weight: 700;
    color: var(--wi-ink);
    margin: 30px 0 13px;
    padding-bottom: 7px;
    border-bottom: 1px solid var(--wi-line);
}
.wi-entry-content h3 { font-size: 17px; font-weight: 700; margin: 22px 0 10px; color: var(--wi-ink); }
.wi-entry-content p { margin: 0 0 15px; }
.wi-entry-content ul, .wi-entry-content ol { margin: 0 0 15px; padding-left: 26px; }
.wi-entry-content li { margin-bottom: 7px; line-height: 1.85; }
.wi-entry-content a { color: var(--wi-teal); text-decoration: underline; }
.wi-entry-content img { max-width: 100%; height: auto; border: 1px solid var(--wi-line); }
.wi-entry-content blockquote {
    margin: 16px 0;
    padding: 10px 16px;
    background: var(--wi-teal-soft);
    border-left: 3px solid var(--wi-teal);
    color: #4b5563;
}
.wi-entry-content::after { content: ""; display: block; clear: both; }

.wi-entry-foot {
    clear: both;
    margin-top: 26px;
    padding-top: 14px;
    border-top: 1px solid var(--wi-line);
}
.wi-foot-link { color: var(--wi-teal); font-size: 14px; text-decoration: none; }
.wi-foot-link:hover { text-decoration: underline; }

.wi-entry-nav {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    margin-top: 16px;
}
.wi-entry-nav span { flex: 1; min-width: 0; }
.wi-entry-nav a {
    display: block;
    border: 1px solid var(--wi-line);
    background: #fff;
    padding: 12px 16px;
    color: var(--wi-ink);
    font-size: 14px;
    text-decoration: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.wi-entry-nav a:hover {
    color: var(--wi-teal);
    border-color: var(--wi-teal);
}
.wi-entry-nav .wi-nav-next { text-align: right; }
@media (max-width: 640px) {
    .wi-entry { padding: 20px 16px; }
    .wi-entry-h1 { font-size: 23px; }
    .wi-infobox { float: none; width: 100%; margin: 0 0 18px; }
    .wi-entry-nav a { white-space: normal; }
    .wi-head-inner { flex-direction: column; align-items: stretch; }
    .wi-head-search { min-width: 0; }
}

/* ---------- 分页 ---------- */
.wi-pagination { margin-top: 18px; text-align: center; }
.wi-pagination .page-numbers {
    display: inline-block;
    min-width: 36px;
    padding: 8px 13px;
    margin: 0 3px;
    border: 1px solid var(--wi-line);
    color: var(--wi-ink);
    text-decoration: none;
    font-size: 14px;
    background: #fff;
}
.wi-pagination .page-numbers.current,
.wi-pagination .page-numbers:hover {
    background: var(--wi-teal);
    border-color: var(--wi-teal);
    color: #fff;
}

/* 全局图片安全：用户插入的固定宽度图片不得撑破移动端 */
.na-content img, .kb-post-content img, .mc-post-content img, .wi-entry-content img,
.news-article img, .kb-article img, .mc-article img, .wi-article img {
    max-width: 100%;
    height: auto;
}
