/* Board, post and patch-notes pages (reading surfaces): same tokens as styles.css, quieter and denser. */
body.sub { padding-top: 64px; }
.sub .nav { height: 64px; }

/* the page banner: a strip of the game's painting under a dark fade, the title on it */
.page-head { position: relative; padding: 72px 0 44px; isolation: isolate; overflow: hidden; border-bottom: 1px solid var(--line); }
.page-head::before { content: ""; position: absolute; inset: 0; z-index: -2; background: var(--art) center 35% / cover no-repeat; filter: saturate(0.9); }
.page-head::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(12, 22, 17, 0.96) 0%, rgba(12, 22, 17, 0.82) 45%, rgba(12, 22, 17, 0.45) 100%), linear-gradient(180deg, transparent 50%, var(--ink) 100%); }
.page-head h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); font-weight: 800; }
.page-head p { color: #d6dccd; max-width: 56ch; margin: 10px 0 0; }

/* ---------------------------------------------------- board */
.board-wrap { padding: 36px 0 90px; }
.board-tools { display: flex; gap: 16px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin-bottom: 18px; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.tabs button { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line-soft); background: transparent; color: var(--muted); cursor: pointer; font-weight: 600; transition: color 0.2s, border-color 0.2s, background 0.2s; }
.tabs button span { font-size: 0.78rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.tabs button:hover { color: var(--cream); border-color: var(--line); }
.tabs button[aria-selected="true"] { color: #1d1606; background: var(--gold); border-color: var(--gold); }
.tabs button[aria-selected="true"] span { color: #4a3a12; }
.search { display: flex; align-items: center; gap: 8px; padding: 0 14px; height: 42px; border-radius: 999px; border: 1px solid var(--line-soft); background: rgba(0, 0, 0, 0.22); min-width: min(320px, 100%); color: var(--muted); }
.search:focus-within { border-color: var(--gold); color: var(--gold); }
.search input { flex: 1; border: 0; background: transparent; color: var(--cream); font: inherit; outline: none; min-width: 0; }
.search input::placeholder { color: #8b9588; }

.board { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--line); }
.row { border-bottom: 1px solid var(--line-soft); }
.row a { display: grid; grid-template-columns: 150px 1fr 150px; gap: 24px; align-items: center; padding: 18px 12px; color: inherit; transition: background 0.2s; }
.row a:hover { background: rgba(246, 238, 219, 0.035); }
.row a:hover b { color: var(--gold-3); }
.row-meta { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.row-meta time { color: var(--muted); font-size: 0.88rem; font-variant-numeric: tabular-nums; }
.row-text b { display: block; font-family: var(--font-head); font-size: 1.15rem; color: var(--cream); line-height: 1.4; transition: color 0.2s; }
.row-text span { display: block; color: var(--muted); font-size: 0.93rem; margin-top: 4px; line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.row img { width: 150px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 8px; border: 1px solid var(--line-soft); }
.row.pinned { background: linear-gradient(90deg, rgba(230, 195, 116, 0.07), transparent 60%); }
.pin { display: inline-flex; align-items: center; gap: 4px; color: var(--gold); font-size: 0.78rem; font-weight: 600; }
.pin .ico { width: 14px; height: 14px; }
.chip { display: inline-block; font-size: 0.76rem; font-weight: 700; padding: 2px 10px; border-radius: 999px; border: 1px solid currentColor; line-height: 1.6; }
.c-notice { color: var(--gold); }
.c-update { color: var(--leaf); }
.c-event { color: #e3a3d6; }
.c-maintenance { color: #f0a070; }
.board-empty { padding: 60px 12px; text-align: center; color: var(--muted); border-bottom: 1px solid var(--line-soft); margin: 0; }
.pager { display: flex; gap: 6px; justify-content: center; margin-top: 26px; }
.pager button { width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--line-soft); background: transparent; color: var(--muted); cursor: pointer; font-variant-numeric: tabular-nums; }
.pager button:hover { color: var(--cream); border-color: var(--line); }
.pager button[aria-current] { background: var(--gold); color: #1d1606; border-color: var(--gold); font-weight: 700; }

/* ---------------------------------------------------- one post */
.article-wrap { padding: 44px 0 90px; }
.article { max-width: 760px; margin: 0 auto; }
.crumbs { display: flex; align-items: center; gap: 6px; font-size: 0.92rem; margin-bottom: 18px; }
.crumbs a { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); }
.crumbs a:hover { color: var(--gold-3); }
.crumbs .sep { width: 14px; height: 14px; color: #5f6b5c; }
.article h1 { font-size: clamp(1.9rem, 4vw, 2.7rem); font-weight: 800; text-wrap: balance; }
.byline { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; color: var(--muted); font-size: 0.92rem; margin: 14px 0 26px; padding-bottom: 20px; border-bottom: 1px solid var(--line-soft); }
.cover { margin: 0 0 28px; }
.cover img, .prose figure img, .prose figure video { width: 100%; border-radius: 12px; border: 1px solid var(--line-soft); }
.prose { font-size: 1.06rem; line-height: 1.9; color: #e4e0d0; }
.prose p, .prose ul { max-width: 68ch; }
.prose h2 { font-size: 1.4rem; margin: 2em 0 0.6em; }
.prose ul { padding-left: 1.2em; margin: 0 0 1.2em; }
.prose li { margin: 0.3em 0; }
.prose li::marker { color: var(--gold-2); }
.prose figure { margin: 0 0 1.6em; }
.article-nav { max-width: 760px; margin: 50px auto 0; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.article-nav a { display: block; padding: 16px 18px; border-radius: 12px; border: 1px solid var(--line-soft); color: inherit; transition: border-color 0.2s; }
.article-nav a:hover { border-color: var(--line); }
.article-nav .next { text-align: right; }
.article-nav small { color: var(--muted); display: block; }
.article-nav b { font-family: var(--font-head); color: var(--cream); }
.lead { color: var(--muted); }

/* ---------------------------------------------------- patch notes */
.patch-wrap { display: grid; grid-template-columns: 220px 1fr; gap: 48px; padding: 44px 0 90px; align-items: start; }
.patch-index { position: sticky; top: 88px; }
.patch-index h2 { font-size: 0.92rem; color: var(--muted); font-family: var(--font-body); font-weight: 600; margin-bottom: 10px; }
.patch-index ol { list-style: none; padding: 0; margin: 0; border-left: 1px solid var(--line-soft); }
.patch-index a { display: block; padding: 8px 0 8px 16px; margin-left: -1px; border-left: 1px solid transparent; color: var(--muted); }
.patch-index a b { display: block; font-family: var(--font-head); font-weight: 700; color: inherit; font-variant-numeric: tabular-nums; }
.patch-index a small { font-size: 0.8rem; }
.patch-index a:hover { color: var(--cream); }
.patch-index a.on { color: var(--gold-3); border-left-color: var(--gold); }
.build { padding-bottom: 44px; margin-bottom: 44px; border-bottom: 1px solid var(--line-soft); scroll-margin-top: 90px; }
.build:last-child { border-bottom: 0; }
.build header { margin-bottom: 22px; }
.build h2 { font-size: clamp(1.5rem, 3vw, 2rem); display: flex; align-items: center; gap: 12px; flex-wrap: wrap; font-variant-numeric: tabular-nums; }
.latest { font-family: var(--font-body); font-size: 0.78rem; font-weight: 700; color: #11220f; background: var(--leaf); padding: 2px 10px; border-radius: 999px; }
.build header p { color: var(--muted); margin: 8px 0 0; }
.group { margin-top: 18px; }
.group h3 { display: flex; align-items: center; gap: 10px; font-family: var(--font-body); font-size: 0.95rem; font-weight: 700; margin-bottom: 8px; color: var(--k); }
.group h3::before { content: ""; width: 8px; height: 8px; border-radius: 2px; background: var(--k); transform: rotate(45deg); }
.group ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 2px; }
.group li { position: relative; padding: 7px 0 7px 22px; color: #dfe4d6; line-height: 1.7; max-width: 76ch; }
.group li::before { content: ""; position: absolute; left: 4px; top: 1.05em; width: 6px; height: 1px; background: var(--k); }
.k-new { --k: var(--leaf); }
.k-improve { --k: var(--gold); }
.k-balance { --k: #8fc4ff; }
.k-fix { --k: #f0a070; }

/* the home page's link to the whole board */
.more-link { display: inline-flex; align-items: center; gap: 6px; margin-top: 26px; font-weight: 600; }
.more-link .ico { width: 18px; height: 18px; }
.center { text-align: center; }

@media (max-width: 900px) {
  .patch-wrap { grid-template-columns: 1fr; gap: 20px; }
  .patch-index { position: static; }
  .patch-index ol { display: flex; gap: 8px; overflow-x: auto; border-left: 0; padding-bottom: 6px; }
  .patch-index a { border-left: 0; border: 1px solid var(--line-soft); border-radius: 10px; padding: 8px 12px; margin: 0; white-space: nowrap; }
  .patch-index a.on { border-color: var(--gold); }
}
@media (max-width: 700px) {
  .row a { grid-template-columns: 1fr 96px; gap: 14px; }
  .row-meta { grid-column: 1 / -1; flex-direction: row; align-items: center; }
  .row img { width: 96px; }
  .article-nav { grid-template-columns: 1fr; }
  .search { width: 100%; }
}
/* Thai has no spaces between words; the browser's dictionary sometimes splits a word (ตีบ|วก). Headings break only at the spaces the copy already has. */
h1, h2, h3, .row-text b, .article-nav b { word-break: keep-all; overflow-wrap: break-word; }
.patch-index, .patch-list, .row-text { min-width: 0; }
.article h1 { text-wrap: pretty; }
