/* Shared article cards: homepage and article column. */
.na-feed {
    grid-column: 1 / -1;
    width: calc(100% - 48px);
    max-width: 1240px;
    margin: 56px auto;
    padding: 30px 24px;
    border: 1px solid #64748b35;
    border-radius: 20px;
    background: #64748b09;
    color: inherit;
    box-sizing: border-box;
}
.na-feed .na-feed-head {
    display: block;
    margin: 0 0 28px;
    text-align: center;
}
.na-feed .na-feed-head h2 {
    margin: 0;
    font-size: 26px;
    line-height: 1.5;
}
.na-feed a { color: inherit; text-decoration: none; }
.na-feed-head a:hover { text-decoration: underline; text-underline-offset: 6px; }
.na-feed-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr));
    gap: 20px;
    margin: 0;
    padding: 0;
    list-style: none;
}
.na-feed-grid > li { display: flex; min-width: 0; margin: 0; padding: 0; }
.na-feed-card {
    display: flex;
    flex-direction: column;
    width: 100%;
    overflow: hidden;
    border: 1px solid #64748b40;
    border-radius: 13px;
    color: inherit;
    transition: border-color .18s ease;
}
.na-feed-card:hover { border-color: currentColor; }
.na-feed-card a { color: inherit; text-decoration: none; }
.na-feed-card h2 a:hover, .na-feed-card h3 a:hover { text-decoration: underline; text-underline-offset: 4px; }
.na-card-image { display: block; }
.na-feed-card img { display: block; width: 100%; height: 180px; object-fit: cover; }
.na-card-copy { padding: 20px; }
.na-card-copy time { font-size: 12px; opacity: .65; }
.na-feed-card .na-card-copy h2,
.na-feed-card .na-card-copy h3 { margin: 10px 0; font-size: 18px; line-height: 1.65; color: inherit; }
.na-card-copy p { margin: 0; font-size: 13px; line-height: 1.85; opacity: .75; }

/* Standalone article and column pages. These rules do not restyle game templates. */
.na-document { margin: 0; background: #f3f5f8; color: #253344; font: 16px/1.85 system-ui, "Microsoft YaHei", sans-serif; }
.na-document * { box-sizing: border-box; }
.na-document a { color: #1c6481; text-decoration: none; }
.na-document a:hover { text-decoration: underline; text-underline-offset: 4px; }
.na-document a:focus-visible, .na-feed a:focus-visible { outline: 2px solid #598c9f; outline-offset: 4px; }
.na-document h1 { margin: 12px 0 18px; font-size: 34px; line-height: 1.45; overflow-wrap: anywhere; }
.na-document h2 { margin: 35px 0 18px; color: #173a4b; font-size: 23px; line-height: 1.5; }
.na-skip { position: absolute; left: -9999px; }
.na-skip:focus { left: 16px; top: 10px; z-index: 5; padding: 12px; background: #fff; }
.na-header { border-bottom: 3px solid #c6b180; background: #102a37; color: #fff; }
.na-top { display: flex; align-items: center; justify-content: space-between; gap: 20px; max-width: 1280px; margin: auto; padding: 20px 24px; }
.na-top a { color: inherit; }
.na-brand { max-width: 70%; font-size: 20px; font-weight: 700; overflow-wrap: anywhere; }
.na-top nav { display: flex; gap: 24px; font-size: 14px; white-space: nowrap; }
.na-main { max-width: 1280px; margin: auto; padding: 25px 24px 50px; }
.na-breadcrumb { margin-bottom: 25px; color: #73808f; font-size: 12px; overflow-wrap: anywhere; }
.na-breadcrumb ol { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.na-breadcrumb li + li::before { content: "/"; padding-right: 6px; color: #9ba7b1; }
.na-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 28px; align-items: start; }
.na-layout-wide { grid-template-columns: minmax(0, 1fr); }
.na-paper, .na-aside { border: 1px solid #e0e6ec; border-radius: 14px; background: #fff; }
.na-paper { min-width: 0; padding: 36px; }
.na-kicker { margin: 0; color: #8d7345; font-size: 12px; }
.na-meta { color: #7a8795; font-size: 12px; }
.na-summary { margin: 25px 0; padding: 18px 22px; border-left: 3px solid #bba06c; background: #f7f5f0; color: #6b6558; font-size: 15px; }
.na-toc { padding: 18px 22px; border-radius: 10px; background: #f6f9fb; font-size: 14px; }
.na-toc ol { margin: 10px 0 0; padding-left: 22px; }
.na-chapter { scroll-margin-top: 24px; }
.na-body p { margin: 22px 0; text-align: justify; overflow-wrap: anywhere; }
.na-body figure { margin: 35px 0; }
.na-body img { display: block; width: 100%; height: auto; max-height: 650px; object-fit: contain; border-radius: 10px; background: #f4f6f8; }
.na-body figcaption { margin-top: 8px; color: #8993a0; text-align: center; font-size: 12px; }
.na-body .na-reading { padding: 12px 17px; border-left: 3px solid #d3e4eb; background: #f3f8fa; font-size: 14px; }
.na-sidebar { display: grid; gap: 20px; min-width: 0; position: sticky; top: var(--na-sidebar-top, 24px); align-self: start; }
.na-aside { padding: 23px; }
.na-aside h2 { margin: 0 0 17px; padding-bottom: 13px; border-bottom: 1px solid #e9eef2; font-size: 20px; }
.na-recommend-list { margin: 0; padding: 0; list-style: none; }
.na-recommend-list li { padding: 15px 0; border-top: 1px solid #edf0f4; }
.na-recommend-list li:first-child { padding-top: 0; border-top: 0; }
.na-recommend-list li:last-child { padding-bottom: 0; }
.na-recommend-list .na-recommend { display: block; color: #263e4b; font-size: 14px; line-height: 1.75; font-weight: 600; overflow-wrap: anywhere; }
.na-empty { margin: 0; color: #8894a0; font-size: 13px; }
.na-note { margin-top: 35px; padding-top: 20px; border-top: 1px solid #e5ebef; color: #8894a0; font-size: 13px; }
.na-column-header { margin-bottom: 30px; }
.na-column .na-feed-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.na-pager { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 15px; margin-top: 30px; }
.na-pager a, .na-pager span { padding: 8px 15px; border-radius: 6px; background: #fff; }
.na-friends { width: calc(100% - 48px); max-width: 1232px; margin: 0 auto 30px; padding: 24px; border: 1px solid #e0e6ec; border-radius: 14px; background: #fff; }
.na-friends h2 { margin: 0 0 16px; font-size: 17px; }
.na-friends ul { display: flex; flex-wrap: wrap; gap: 10px 24px; margin: 0; padding: 0; list-style: none; }
.na-friends li { max-width: 100%; overflow-wrap: anywhere; }
.na-friends a { font-size: 13px; }
.na-footer { padding: 25px; border-top: 1px solid #dce3e8; color: #84929d; text-align: center; font-size: 12px; }
.na-wild-pages { margin-top: 30px; padding: 22px 0 0; border-top: 1px solid #dce3e8; }
.na-wild-pages ul { display: grid; grid-template-columns: repeat(var(--na-wild-columns, 5), minmax(0, 1fr)); gap: 12px 24px; margin: 0; padding: 0; list-style: none; }
.na-wild-pages li { min-width: 0; margin: 0; padding: 0; }
.na-wild-pages a { font-size: 14px; line-height: 1.8; overflow-wrap: anywhere; }

/* Shared links on utility pages inherit the existing page palette. */
.na-site-friends { width: 100%; max-width: 1240px; margin: 30px auto 0; padding: 22px; border: 1px solid #64748b55; border-radius: 12px; box-sizing: border-box; }
.na-site-friends h2 { margin: 0 0 15px; font-size: 17px; }
.na-site-friends ul { display: flex; flex-wrap: wrap; gap: 10px 24px; margin: 0; padding: 0; list-style: none; }
.na-site-friends li { max-width: 100%; overflow-wrap: anywhere; }
.na-site-friends a { color: inherit; font-size: 13px; line-height: 1.8; }

@media (max-width: 950px) {
    .na-layout { grid-template-columns: minmax(0, 1fr) 260px; gap: 18px; }
    .na-layout-wide { grid-template-columns: minmax(0, 1fr); }
    .na-paper { padding: 26px; }
    .na-column .na-feed-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .na-wild-pages ul { grid-template-columns: repeat(var(--na-wild-tablet, 3), minmax(0, 1fr)); }
}
@media (max-width: 760px) {
    .na-main { padding: 20px 14px 35px; }
    .na-layout { grid-template-columns: minmax(0, 1fr); }
    .na-sidebar { position: static; top: auto; }
    .na-paper { padding: 24px 20px; }
    .na-document h1 { font-size: 27px; }
    .na-top { padding: 17px 16px; }
    .na-brand { font-size: 16px; }
    .na-top nav { gap: 15px; font-size: 12px; }
    .na-summary { padding: 15px; }
    .na-body p { line-height: 1.95; }
    .na-friends { width: calc(100% - 28px); padding: 22px 20px; }
    .na-wild-pages ul { grid-template-columns: minmax(0, 1fr); }
    .na-wild-pages a { display: block; max-width: 100%; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; overflow-wrap: normal; }
}
@media (max-width: 600px) {
    .na-feed { width: calc(100% - 28px); margin: 30px auto; padding: 24px 16px; }
    .na-feed-grid, .na-column .na-feed-grid { grid-template-columns: minmax(0, 1fr); }
    .na-feed .na-feed-head h2 { font-size: 23px; }
}
@media (prefers-reduced-motion: reduce) {
    .na-feed-card { transition: none; }
}
