/* news01 静态母版修复层：保留原视觉，只修响应式、可访问性和资源表现。 */
:root {
  color-scheme: light;
}

html,
body {
  min-width: 0;
  overflow-x: hidden;
  overflow-x: clip;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  color: #2b2b2b;
  background: #fff;
  font-family: Verdana, Arial, "Microsoft YaHei", "PingFang SC", sans-serif;
}

img {
  max-width: 100%;
  height: auto;
}

a:focus-visible {
  outline: 2px solid #2f83c5;
  outline-offset: 2px;
}

.w960,
.header {
  width: min(960px, calc(100% - 24px));
}

.header_top .w960 {
  width: 100%;
}

.header .logo h1,
.header .logo .brand-title {
  display: block;
  margin: 0;
  padding: 12px 0 0 10px;
  color: #1f5f91;
  font-size: 30px;
  font-weight: 700;
  line-height: 1.25;
}

.header .nav {
  max-width: calc(100% - 220px);
}

.header .nav-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.header .nav-col,
.header .nav-col .nowrap {
  box-sizing: border-box;
  width: auto;
}

.header .nav-col a {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.content-row {
  margin-top: 5px;
  margin-bottom: 5px;
}

.site-summary {
  box-sizing: border-box;
  margin-top: 8px;
  padding: 10px 14px;
  border: 1px solid #cfe2f3;
  background: #f7fbff;
  color: #34546d;
  line-height: 1.75;
}

.site-summary p {
  margin: 0;
}

.content-row .indexl {
  float: left;
  width: 640px;
}

.content-row .indexr {
  float: right;
  width: 310px;
}

.home-image-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  align-items: center;
}

.home-image-item {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: center;
}

.home-image-item img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  object-fit: contain;
}

.content-row .main {
  margin-top: 0;
}

.content-row .ml {
  float: left;
  width: 315px;
}

.content-row .mr {
  float: right;
  width: 315px;
}

.tbox dd {
  min-height: 0;
}

.d1 li a,
.c1 li a,
.r1 li a,
.d5 li a {
  overflow-wrap: anywhere;
}

.section-title {
  margin: 0 12px 12px;
  color: #1f5f91;
  font-size: 22px;
  line-height: 1.4;
}

.viewbox .title {
  height: auto;
  min-height: 0;
  overflow: visible;
}

body.articleview .viewbox > .title {
  height: auto !important;
  min-height: 0 !important;
  overflow: visible !important;
}

.viewbox .title h1 {
  padding-top: 16px;
  color: #000;
  font-size: 24px;
  line-height: 1.45;
  text-align: center;
}

.viewbox .content {
  overflow-wrap: anywhere;
}

.viewbox .content img {
  display: block;
  width: auto;
  max-width: 100%;
  margin: 12px auto;
}

.article-relations {
  margin: 16px 0 0;
  padding: 12px 16px;
  border-top: 1px solid #e4e4e4;
  border-bottom: 1px solid #e4e4e4;
  line-height: 1.9;
}

.article-relations a {
  display: block;
}

.empty-state {
  padding: 28px 16px;
  color: #666;
  line-height: 1.8;
  text-align: center;
}

.footer .copyright {
  overflow-wrap: anywhere;
}

@media (max-width: 980px) {
  .content-row .indexl {
    width: 66.4%;
  }

  .content-row .indexr {
    width: 32.2%;
  }

  .content-row .ml,
  .content-row .mr {
    width: 49.2%;
  }

  .pleft {
    width: calc(100% - 252px);
  }

  .pright {
    width: 244px;
  }
}

@media (max-width: 720px) {
  *,
  *::before,
  *::after {
    box-sizing: border-box;
  }

  body {
    font-size: 16px;
    line-height: 1.65;
  }

  .w960,
  .header {
    width: min(100% - 20px, 960px);
  }

  .header {
    overflow: visible;
  }

  body:not(.index) .header_top {
    display: none;
  }

  .header_top {
    /* 手机页头高度与旧精灵图不一致，移除装饰背景。 */
    background-image: none;
    height: auto !important;
    min-height: 44px;
    line-height: 1.5;
  }

  .header_top .time {
    float: none;
    display: block;
    min-height: 44px;
    padding: 10px 8px;
    overflow-wrap: anywhere;
    white-space: normal;
  }

  .header_top .time a {
    display: inline-flex;
    min-width: 44px;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    vertical-align: middle;
  }

  .header_top .toplinks {
    display: none;
  }

  .header .logo {
    float: none;
    width: 100%;
    height: auto;
    margin: 0;
    text-align: center;
  }

  .header .logo h1,
  .header .logo .brand-title {
    padding: 14px 0 10px;
    font-size: clamp(24px, 8vw, 28px);
    overflow-wrap: anywhere;
  }

  .header .logo a {
    display: flex;
    min-height: 56px;
    align-items: center;
    justify-content: center;
  }

  .header .nav {
    float: none;
    width: 100%;
    max-width: none;
    height: auto;
    margin: 0 0 8px;
    padding: 0;
  }

  .header .nav-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    border-top: 1px solid #dcdddd;
    border-left: 1px solid #dcdddd;
  }

  .header .nav-col {
    display: contents;
  }

  .header .nav-col .nowrap {
    display: contents;
  }

  .header .nav-col a {
    box-sizing: border-box;
    display: flex;
    width: auto;
    min-height: 44px;
    margin: 0;
    padding: 10px 5px;
    align-items: center;
    justify-content: center;
    border-right: 1px solid #dcdddd;
    border-bottom: 1px solid #dcdddd;
    line-height: 24px;
    text-align: center;
  }

  .site-summary {
    padding: 12px;
    font-size: 16px;
    line-height: 1.75;
  }

  .content-row .indexl,
  .content-row .indexr,
  .content-row .ml,
  .content-row .mr,
  .pleft,
  .pright {
    float: none;
    width: 100%;
  }

  .content-row .ml,
  .content-row .mr,
  .content-row .indexr,
  .pright {
    margin-top: 8px;
  }

  .home-image-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .viewbox .content .endmore {
    box-sizing: border-box;
    width: 100%;
    height: auto;
    min-height: 41px;
    overflow-wrap: anywhere;
  }

  .tbox dt {
    display: flex;
    min-height: 44px;
    height: auto;
    align-items: center;
    line-height: 1.4;
  }

  .tbox dt strong,
  .tbox dt strong a {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
  }

  .d1 li,
  .c1 li,
  .r1 li {
    min-height: 34px;
    height: auto;
    line-height: 1.55;
  }

  .d1 li a,
  .c1 li a,
  .r1 li a {
    display: flex;
    min-height: 44px;
    padding: 9px 2px;
    align-items: center;
    font-size: 16px;
  }

  .d5 li {
    height: auto;
    min-height: 52px;
    padding: 4px 10px;
    line-height: 1.55;
  }

  .d5 li a {
    display: flex;
    min-height: 44px;
    align-items: center;
    font-size: 16px;
  }

  .d5 li span {
    float: none;
    display: block;
    color: #777;
  }

  .place {
    box-sizing: border-box;
    height: auto;
    min-height: 44px;
    padding: 0 10px;
    line-height: 1.55;
  }

  .place a {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    vertical-align: middle;
  }

  .listbox,
  .viewbox {
    box-sizing: border-box;
    width: 100%;
  }

  .viewbox .title h1 {
    padding: 14px 12px 4px;
    font-size: 22px;
  }

  .viewbox .info {
    height: auto;
    padding: 8px 12px;
    font-size: 16px;
    line-height: 1.6;
    overflow-wrap: anywhere;
  }

  .viewbox .info small {
    color: #555;
    font-size: 1em;
  }

  .viewbox .info a {
    display: inline-flex;
    min-height: 44px;
    padding: 0 6px;
    align-items: center;
  }

  .viewbox .content {
    padding: 14px;
    font-size: 17px;
    line-height: 1.85;
  }

  .article-relations a {
    display: flex;
    min-height: 44px;
    align-items: center;
  }

  .empty-state a,
  .footer .copyright a {
    display: inline-flex;
    min-height: 44px;
    padding: 0 6px;
    align-items: center;
  }

  .home-image-item {
    contain: layout paint;
  }

  .e9 li {
    box-sizing: border-box;
    width: 50%;
  }

  .footer {
    box-sizing: border-box;
    padding-right: 8px;
    padding-left: 8px;
  }
}

@media (max-width: 420px) {
  .e9 li {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
/* 游戏文章页长英文标题与来源栏：手机端完整换行，避免父容器裁切。 */
@media (max-width: 430px) {
  .viewbox .title h1 {
    overflow-wrap: anywhere;
    word-break: break-word;
  }
  .viewbox .info {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    column-gap: 4px;
    overflow: visible;
  }
  .viewbox .info small { display: inline-block; }
}

/* CODEX_BLUE_DESKTOP_LIST_20261015: keep each desktop link inside its visible row. */
@media (min-width: 721px) {
  .d1 li a {
    display: block;
    line-height: 27px;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

/* CODEX_BLUE_DESKTOP_LOGO_20261015: let long site names determine their own container height. */
@media (min-width: 721px) {
  .header .logo {
    height: auto;
    min-height: 60px;
    overflow: visible;
  }
}

/* CODEX_HOME_TITLE_BALANCE_20261016: 首页长标题独占一行容器，导航另起一行。 */
body.index .header .logo h1 { text-wrap: balance; }
@media (min-width: 721px) {
  body.index .header .logo { float: none; width: 100%; height: auto; min-height: 0; }
  body.index .header .logo > a { display: block; width: 100%; }
  body.index .header .logo h1 { padding: 12px 10px; }
  body.index .header .nav { float: none; clear: both; width: 100%; max-width: none; height: auto; margin: 0 0 12px; }
}

/* CODEX_REPORT_LAYOUT_V2_20261016: 带站名H1的头部适用于首页和404；移除手机旧背景残片。 */
@media (min-width: 721px) {
  .header:has(.logo h1) .logo { float: none; width: 100%; height: auto; min-height: 0; }
  .header:has(.logo h1) .logo > a { display: block; width: 100%; }
  .header:has(.logo h1) .logo h1 { padding: 12px 10px; text-wrap: balance; }
  .header:has(.logo h1) .nav { float: none; clear: both; width: 100%; max-width: none; height: auto; margin: 0 0 12px; }
}
@media (max-width: 720px) {
  body.index .header_top { background-image: none; background-color: #f7f7f7; }
}
body.articleview .viewbox .title h1 { text-wrap: balance; }

/* CODEX_REPORT_LAYOUT_V3_20261016: 全页面头部及面包屑适应实际宽度。 */
.header .logo h1, .header .logo .brand-title { white-space: normal; text-wrap: balance; word-break: normal; overflow-wrap: anywhere; }
@media (min-width: 721px) {
 .header .logo { float: none; width: 100%; height: auto; min-height: 0; }
 .header .logo > a { display: block; width: 100%; }
 .header .logo h1, .header .logo .brand-title { padding: 12px 10px; text-wrap: balance; }
 .header .nav { float: none; clear: both; width: 100%; max-width: none; height: auto; margin: 0 0 12px; }
}
@media (max-width: 720px) { body.index .header_top { background-image: none; background-color: #f7f7f7; } }
nav.place { white-space: normal; overflow-x: visible; overflow-wrap: anywhere; height: auto; }
body.articleview .viewbox .title h1 { text-wrap: balance; }

/* CODEX_REPORT_QUOTE_WRAP_20261017: 保留原文，避免段末孤立标点。 */
.viewbox .content p { line-break: strict; text-wrap: pretty; }

/* CODEX_REPORT_BREADCRUMB_WORD_20261017: 面包屑保留完整中文词组。 */
nav.place { word-break: keep-all; }

/* CODEX_REPORT_QUOTE_BALANCE_20261017: 保留原文零宽字符，手机段落均衡断行避免右引号孤行。 */
@media (max-width: 767px) { .viewbox .content p { text-wrap: balance; } }

/* CODEX_MOBILE_LIST_MARKER_20261023：标记跟随链接首行，保持手机点击区。 */
@media (max-width: 720px) {
  .d5.ico1 > li { background-image: none; padding-left: 20px; }
  .d5.ico1 > li > a {
    display: block;
    position: relative;
    min-height: 44px;
    padding: 8px 0;
    line-height: 1.55;
  }
  .d5.ico1 > li > a::before {
    content: "";
    position: absolute;
    left: -13px;
    top: calc(8px + 0.775em - 2px);
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background-color: #777;
  }
}

/* CODEX_DESKTOP_LIST_HEIGHT_20261023：长标题换行时由内容撑开行高。 */
@media (min-width: 721px) {
  .d5.ico1 > li { height: auto; min-height: 33px; }
}

/* CODEX_ARTICLE_IMAGE_OPEN_20261023：图片细字可打开原尺寸查看。 */
.article-source-image .article-image-open { display: block; }
.article-source-image figcaption { text-align: center; }
.article-source-image figcaption a { display: inline-block; min-height: 44px; padding: 8px; font-size: 16px; line-height: 1.6; text-decoration: underline; }
