/* Pixel Journal: viewport rails, readable content, shared theme tokens. */
:root {
  --pixel-bg: #080c20;
  --pixel-panel: #0d1430;
  --pixel-paper: #111a35;
  --pixel-line: #314677;
  --pixel-ink: #edf1ff;
  --pixel-muted: #aab7d7;
  --pixel-accent: #a9bdff;
  --pixel-klein: #002fa7;
  --rail-left: 240px;
  --rail-right: 320px;
  --layout-gap: 26px;
  --layout-edge: max(28px, calc((100vw - 1720px) / 2));
  --rail-top: 108px;
}
html { background: var(--pixel-bg); scroll-padding-top: 108px; }
body {
  color: var(--pixel-ink);
  font-family: Consolas, "Lucida Console", "Microsoft YaHei", monospace;
  background: linear-gradient(90deg, #ffffff03 1px, transparent 1px), linear-gradient(#ffffff03 1px, transparent 1px), var(--pixel-bg);
  background-size: 24px 24px;
}
body :where(a, button, input, textarea, img, section, article, div, pre, figure, span, li) { border-radius: 0 !important; }
body a { color: var(--pixel-ink); transition: color .12s steps(2), background .12s steps(2); }
body a:hover { color: var(--pixel-accent); }
body :focus-visible { outline: 2px solid var(--pixel-accent); outline-offset: 4px; }
body ::selection { color: #111715; background: var(--pixel-accent); }
body button, body input { font: inherit; }
body .container { padding-top: 80px; overflow: visible; }
body .header { height: 80px; background: #0b100e; border-bottom: 2px solid var(--pixel-line); backdrop-filter: none; z-index: 50; }
body .header-wrapper { width: 100%; padding: 0 var(--layout-edge); gap: 24px; }
body .header-left { order: 2; width: min(36vw, 500px); }
body .header-right { order: 1; }
body .header-menu { gap: 16px; }
body .header-menu > li > a { font-size: 15px; min-height: 42px; padding: 0 14px; }
body .header-menu > li > a[aria-current], body .main-left--menu a[aria-current] { color: var(--pixel-accent); background: #b1ee8110; box-shadow: inset 3px 0 var(--pixel-accent); }
body .header-menu--icon { font-size: 15px; }
body .header-search--input { background: #1b221e; border: 2px solid var(--pixel-line); padding: 12px 46px 12px 15px; color: var(--pixel-ink); box-shadow: 3px 3px #000; }
body .header-search--input::placeholder { color: var(--pixel-muted); }
body .header-search--layer { position: absolute; top: 100%; background: var(--pixel-panel); border: 2px solid var(--pixel-line); box-shadow: 5px 5px #070a08; }
body #close-layer-btn { background: transparent; color: var(--pixel-accent); border: 0; cursor: pointer; font-size: 12px; }
body .header-search--icon { color: var(--pixel-accent); border: 0; background: transparent; cursor: pointer; }
body .main { width: 100%; display: block; padding: 28px var(--layout-edge) 48px; }
body .main-container, body .main-container.is-article { width: auto; min-width: 0; margin-left: calc(var(--rail-left) + var(--layout-gap)); margin-right: calc(var(--rail-right) + var(--layout-gap)); transition: none; }
body .main-left-wrapper, body .main-right-wrapper { width: auto; }
body .main-left, body .main-right, body .article-catelogue {
  position: fixed; top: var(--rail-top); bottom: 24px; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: var(--pixel-line) transparent;
  padding: 0 6px 6px 0;
}
body .main-left { left: var(--layout-edge); width: var(--rail-left); }
body .main-right, body .article-catelogue { right: var(--layout-edge); width: var(--rail-right); }
body .main-right.is-article, body.page-article .main-right-wrapper { display: none; }
body .main-left--block, body .pixel-panel, body .main-right--site, body .operate-item, body .article, body .article-catelogue .catelogue, body .page {
  background: var(--pixel-panel); border: 2px solid var(--pixel-line); box-shadow: 4px 4px 0 #090d0b; backdrop-filter: none;
}
body .main-left--block { margin-top: 18px; }
body .main-left--info { background: #18201b; padding: 16px; gap: 12px; border-bottom: 2px solid var(--pixel-line); }
body .main-left--avatar { width: 60px; height: 60px; border: 2px solid var(--pixel-accent); box-shadow: 4px 4px #080c09; image-rendering: pixelated; }
body .main-left--name { font-size: 25px; color: var(--pixel-accent); text-shadow: 2px 2px #000; }
body .main-left--tag { background: #2a3628; color: #cce7b4; font-size: 10px; padding: 3px 5px; }
body .main-left--motto { padding: 14px 14px 0; font-size: 12px; color: var(--pixel-muted); }
body .main-left--github { padding: 10px 16px; }
body .main-left--statics { padding: 0 12px 14px; }
body .main-left--statics > a { background: #202a23; border: 1px solid var(--pixel-line); }
body .main-left--statics > a > div { min-height: 52px; }
body .main-left--statics > a > div span:first-child { color: var(--pixel-accent); }
body .main-left--menu > li > a { padding: 10px 12px; }
body .main-left--site { padding: 14px; }
body .main-left--subtitle { font-size: 12px; margin-top: 9px; color: var(--pixel-muted); }
body .main-left--title { margin-bottom: 12px; color: var(--pixel-ink); }
.rail-filters { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 22px; }
.filter-panel { padding: 16px 12px; height: 252px; overflow-y: auto; scrollbar-width: thin; }
.filter-panel h3 { font-size: 14px; padding-bottom: 16px; border-bottom: 1px dashed var(--pixel-line); margin-bottom: 14px; white-space: nowrap; }
.filter-panel h3 span { color: var(--pixel-accent); }
.filter-panel ul { display: flex; flex-direction: column; gap: 12px; }
.filter-panel a { font-size: 12px; color: var(--pixel-muted); overflow-wrap: anywhere; }
.rail-tags-list a { display: inline-block; padding: 5px 8px; border: 1px solid #4b6142; background: #24311f; color: #c8e7b1; }
body .main-right--title { padding: 16px; border-bottom: 1px dashed var(--pixel-line); }
body .main-right--title h3 { font-size: 15px; }
.pixel-status { color: var(--pixel-accent); font-size: 10px; }
body .main-right--content { padding: 18px; color: var(--pixel-muted); font-size: 13px; }
.main-right--content small { color: var(--pixel-accent); font-size: 10px; letter-spacing: 2px; }
.pixel-landscape { position: relative; height: 90px; overflow: hidden; margin: 12px 0; border-bottom: 3px solid #739454; }
.pixel-landscape span { position: absolute; top: 8px; right: 32px; color: #e8ce8a; font-size: 24px; }
.pixel-landscape i, .pixel-landscape b { position: absolute; bottom: 0; width: 140px; height: 48px; background: #334a31; clip-path: polygon(0 100%, 0 70%, 15% 70%, 15% 40%, 30% 40%, 30% 10%, 50% 10%, 50% 35%, 70% 35%, 70% 65%, 85% 65%, 85% 100%); }
.pixel-landscape b { left: 98px; width: 160px; height: 68px; background: #506742; }
body .main-right--site { background: transparent; border: 0; box-shadow: none; padding: 16px 0; color: #94a394; font-size: 11px; line-height: 1.8; }
body .operate-item { color: var(--pixel-ink); min-height: 72px; cursor: pointer; }
body .operate-item:hover { color: var(--pixel-accent); background: #253122; transform: none; border-color: var(--pixel-accent); }
body .operate-item > span:first-child { font-size: 24px; color: var(--pixel-accent); }
.feed-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; color: var(--pixel-muted); font-size: 11px; letter-spacing: 1px; margin-bottom: 18px; }
.feed-heading b, .article .feed-heading span:last-child { color: var(--pixel-accent); }
.pixel-feed { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px; }
.post-card { background: var(--pixel-paper); border: 2px solid var(--pixel-line); box-shadow: 5px 5px #0b100d; min-width: 0; }
.post-card:hover { border-color: #8eae72; }
.post-card-cover { display: block; aspect-ratio: 1.9; position: relative; overflow: hidden; background: repeating-linear-gradient(0deg, transparent 0 15px, #ffffff08 15px 16px), #374a3b; border-bottom: 2px solid var(--pixel-line); }
.post-card-cover img { display: block; width: 100%; height: 100%; object-fit: cover; filter: saturate(.7); }
.post-card-cover img[hidden] { display: none; }
.post-card-number { position: absolute; left: 12px; top: 12px; padding: 5px 8px; background: #101710e8; color: #d5eac5; font-size: 10px; letter-spacing: 1px; }
.post-card-arrow { position: absolute; right: 0; bottom: 0; padding: 4px 12px; background: var(--pixel-accent); color: #172011; font-size: 22px; }
.post-card-body { padding: 18px; }
.post-card-body time { color: #a2b79c; font-size: 11px; letter-spacing: 1px; }
.post-card-body h2 { font-size: 18px; line-height: 1.55; margin: 8px 0 12px; overflow-wrap: anywhere; }
.post-card-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.post-card-tags a { padding: 3px 7px; color: #c2dea9; background: #2d3b28; font-size: 10px; border: 1px solid #4b6142; }
.post-card-body p { color: var(--pixel-muted); font-size: 12px; line-height: 1.9; margin-top: 12px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
body .page { margin-top: 28px; display: flex; justify-content: center; gap: 20px; padding: 16px; }
body .page .current { color: var(--pixel-accent); }
body .article-container { display: block; }
body .article { width: 100%; padding: 22px 26px; background: var(--pixel-paper); min-height: calc(100vh - 136px); }
body .article-title { font-size: 26px; line-height: 1.35; overflow-wrap: anywhere; padding-bottom: 12px; }
body .article-info { margin-top: 0; padding-top: 14px; }
body .article-cover { width: 112px; height: 84px; box-shadow: 3px 3px #080d09; }
body .article-info--item { font-size: 12px; }
body .article-info--date { margin-top: 12px; }
body .article-catelogue--wrapper { position: static; width: auto; }
body .article-catelogue .catelogue-1 { margin-top: 0; max-height: calc(100dvh - 370px); min-height: 180px; padding: 20px; }
body .article-catelogue .catelogue h3 { color: var(--pixel-accent); padding-bottom: 14px; border-bottom: 1px dashed var(--pixel-line); font-size: 16px; }
body .article-catelogue .toc-link { color: var(--pixel-muted); padding: 7px 0; }
body .article-catelogue .toc-link:hover { color: var(--pixel-accent); }
body .article-catelogue .catelogue-2 { padding: 16px; }
.toc-empty { color: var(--pixel-muted); font-size: 13px; padding-top: 16px; }
body .markdown-body { font-family: "Microsoft YaHei", sans-serif; font-size: 15px; line-height: 1.7; padding-top: 12px; overflow-wrap: anywhere; }
body .markdown-body :is(h1,h2,h3,h4), body .comments-intro { scroll-margin-top: 110px; }
body .markdown-body h2 { border-bottom: 2px solid var(--pixel-line) !important; }
body .markdown-body a { color: var(--pixel-accent) !important; }
body .markdown-body blockquote { border-left: 4px solid var(--pixel-accent) !important; background: #b1ee8108 !important; }
body .markdown-body figure.highlight { overflow-x: auto; box-shadow: 4px 4px #0a0f0c; }
body .markdown-body figure.highlight table::before { background: repeating-linear-gradient(90deg, #9fc57b 0 8px, transparent 8px 16px) 16px center / 40px 8px no-repeat, #172018; height: 30px; }
body .markdown-body img { max-width: 100%; height: auto; }
body .progress { height: 3px; background: var(--pixel-accent); }
body .to-up { animation: none; }
body .load { background: #111715; }
body .load-circle, body .load-circle-inner { border-color: var(--pixel-accent); animation-timing-function: steps(4); }
body .comments-intro, body .about, body .tools > li, body .link > li, body .log-item { border-color: var(--pixel-line); box-shadow: 4px 4px #090d0b; }
body .v .vwrap { border: 2px solid var(--pixel-line); background: var(--pixel-panel); }
body .v input, body .v textarea, body .v .vcontent, body .v .vnick { color: var(--pixel-ink); }
body .v .vbtn { color: var(--pixel-accent); border-color: var(--pixel-line); background: #24311f; }
@media (min-width: 1500px) { :root { --rail-left: 270px; --rail-right: 370px; --layout-gap: 30px; } }
@media (min-width: 981px) { body.page-article { --rail-right: 260px; } }
@media (min-width: 981px) and (max-height: 850px) {
  body .main-left--block { margin-top: 12px; }
  body .main-left--block:first-child { margin-top: 0; }
  body .main-left--info { padding: 12px; }
  body .main-left--motto { padding-top: 10px; }
  body .main-left--github { padding-top: 7px; padding-bottom: 7px; }
  body .main-left--statics { padding-bottom: 10px; }
  body .main-left--statics > a > div { min-height: 42px; }
  body .main-left--menu > li > a { padding-top: 7px; padding-bottom: 7px; }
  body .main-left--site { padding: 12px; }
  body .main-left--subtitle { margin-top: 6px; }
  .filter-panel { height: 228px; }
  .pixel-landscape { height: 60px; }
}
@media (min-width: 981px) and (max-width: 1199px) { :root { --rail-left: 200px; --rail-right: 250px; --layout-gap: 18px; --layout-edge: 18px; } .pixel-feed { gap: 18px; } .post-card-body { padding: 13px; } .post-card-body h2 { font-size: 16px; } .rail-filters { gap: 10px; } .filter-panel { padding: 14px 8px; } body .main-left--info { padding: 12px; gap: 8px; } body .main-left--avatar { width: 48px; height: 48px; } }
@media (max-width: 980px) {
  :root { --layout-edge: 20px; }
  body .header { height: 120px !important; }
  body .header .header-wrapper { gap: 10px; padding: 12px 20px; }
  body .header .header-left { width: 100%; order: 2; }
  body .header .header-right { order: 1; }
  body .header-menu { justify-content: space-between; gap: 6px; }
  body .header-menu > li > a { min-height: 30px; padding: 0 8px; font-size: 13px; }
  body .header-search--input { padding-top: 9px; padding-bottom: 9px; font-size: 12px; }
  body .container { padding-top: 120px !important; }
  body .main { display: flex; padding: 20px !important; gap: 24px; }
  body .main-left-wrapper { order: 0; }
  body .main-container, body .main-container.is-article { margin: 0; order: 1; }
  body .main-right-wrapper { order: 2; }
  body .main-left, body .main-right, body .article-catelogue { position: static !important; inset: auto; width: 100%; max-height: none; overflow: visible; padding: 0; }
  body .main-left { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
  body .main-left--block { margin-top: 0; }
  body .main-left--block:last-child { display: none; }
  body .main-left--motto, body .main-left--github, body .main-left--statics { display: none; }
  body .main-left--menu { display: grid; grid-template-columns: 1fr 1fr; padding: 4px; }
  body .main-left--menu > li > a { font-size: 12px; padding: 8px; }
  body .main-left--menu .iconfont { display: none; }
  body .article-container { display: flex; flex-direction: column; gap: 20px; }
  body .article-catelogue { order: -1; }
  body .article-catelogue .catelogue-1 { min-height: 0; max-height: 200px; }
  body .article-catelogue .catelogue-2 { margin-top: 16px; }
  body .article { padding: 24px; }
  body .article-cover { width: 100px; height: 80px; aspect-ratio: auto; }
  .rail-filters { margin-bottom: 20px; }
  .filter-panel { height: auto; max-height: 240px; min-height: 150px; }
  body .page-article { scroll-padding-top: 140px; }
  html { scroll-padding-top: 140px; }
  body .markdown-body :is(h1,h2,h3,h4), body .comments-intro { scroll-margin-top: 140px; }
}
@media (max-width: 600px) {
  body .main { padding: 16px !important; }
  .pixel-feed { grid-template-columns: 1fr; gap: 22px; }
  body .main-left { display: block; }
  body .main-left--block:nth-child(2) { display: none; }
  body .main-left--info { padding: 12px 16px; }
  body .main-left--intro { flex-direction: row; align-items: center; gap: 18px; }
  body .main-left--avatar { width: 44px; height: 44px; }
  body .main-left--name { font-size: 22px; }
  body .article { padding: 20px 16px; }
  body .article-title { font-size: 25px; }
  body .article-info--item { flex-wrap: wrap; }
  body .article-cover { display: none; }
  body .header-menu--icon { display: none; }
  body .markdown-body { font-size: 14px; }
}
/* Klein-blue game UI: saturated window bars, pixel cursor and save-slot badges. */
body .header { background: #070b1b; border-bottom-color: var(--pixel-klein); box-shadow: 0 3px #020614; }
body .header-search--input { background: #101a3a; }
body .header-search--layer, body .post-card, body .main-left--block, body .article, body .pixel-panel, body .article-catelogue .catelogue { box-shadow: 4px 4px #020615; }
body .main-left--info { background: var(--pixel-klein); }
body .main-left--name { color: #fff; }
body .main-left--avatar { border-color: #c6d3ff; box-shadow: 3px 3px #001b62; }
body .main-left--tag { background: #001e70; color: #fff; border: 1px solid #6384da; }
body .header-menu > li > a[aria-current], body .main-left--menu a[aria-current] { background: var(--pixel-klein); color: #fff; box-shadow: inset 3px 0 #c6d3ff; }
body .main-left--menu a[aria-current]::before { content: ''; width: 10px; height: 14px; background: #fff; clip-path: polygon(0 0, 40% 0, 40% 20%, 70% 20%, 70% 40%, 100% 40%, 100% 60%, 70% 60%, 70% 80%, 40% 80%, 40% 100%, 0 100%); margin-right: 8px; }
body .main-left--menu a[aria-current] .header-menu--span { margin-right: auto; }
body .main-left--statics > a { background: #14234b; }
body .main-right--title { background: var(--pixel-klein); color: #fff; border-bottom: 2px solid #557bdc; }
body .pixel-status { color: #fff; }
body .filter-panel h3 { background: var(--pixel-klein); color: #fff; margin: -16px -12px 14px; padding: 10px 12px; border-bottom: 2px solid #557bdc; }
body .filter-panel h3 span { color: #fff; }
body .rail-tags-list a, body .post-card-tags a { background: #142858; border-color: #4166b1; color: #d4dfff; }
body .main-right--site, body .post-card-body time { color: var(--pixel-muted); }
body .post-card-cover { background-color: #152b66; }
body .post-card-number { background: var(--pixel-klein); color: #fff; border: 1px solid #7e9cf0; }
body .post-card-arrow { background: var(--pixel-klein); color: #fff; }
body .post-card:hover { border-color: #6d94ff; box-shadow: 4px 4px var(--pixel-klein); }
body .operate-item { border-color: #4266b9; background: #12254f; box-shadow: 4px 4px #020615; }
body .operate-item:hover { background: var(--pixel-klein); color: #fff; }
body .operate-item:active { transform: translate(2px, 2px); box-shadow: 2px 2px #020615; }
body .pixel-landscape { border-bottom-color: #6288ef; background: repeating-linear-gradient(90deg, transparent 0 23px, #507ee310 23px 24px); }
body .pixel-landscape i { background: #173572; }
body .pixel-landscape b { background: var(--pixel-klein); }
body .pixel-landscape::after { content: ''; position: absolute; width: 6px; height: 6px; background: #fff; bottom: 12px; left: 38px; box-shadow: 6px 0 #fff, 0 -6px #fff, 6px -6px #fff, -6px 6px #769cff, 0 6px #769cff, 6px 6px #769cff, 12px 6px #769cff, 0 12px #769cff, 6px 12px #769cff, -6px 18px #fff, 12px 18px #fff; }
body .article > .feed-heading { background: var(--pixel-klein); color: #fff; margin: -22px -26px 18px; padding: 10px 16px; border-bottom: 2px solid #557bdc; }
body .article-catelogue .catelogue h3 { color: #fff; background: var(--pixel-klein); margin: -20px -20px 10px; padding: 10px 16px; border-bottom: 2px solid #557bdc; }
body .article-catelogue .toc-link { padding: 4px 0; line-height: 1.45; }
body .article-info--item { margin-top: 0; align-items: center; }
body .article-info--tags, body .article-info--date { margin-top: 6px; }
body .article-cover { width: 88px; height: 64px; box-shadow: 3px 3px #020615; }
body .markdown-body p { font-size: inherit; letter-spacing: 0; margin: 10px 0; line-height: inherit; }
body .markdown-body h1 { font-size: 25px; padding: 6px 0; margin: 22px 0 10px; }
body .markdown-body h2 { font-size: 21px !important; padding: 6px 0 !important; margin: 24px 0 10px !important; }
body .markdown-body h3 { font-size: 18px; padding: 4px 0 !important; margin: 18px 0 8px !important; width: auto; }
body .markdown-body :is(h4,h5,h6) { font-size: 16px; padding: 4px 0; margin: 14px 0 6px; }
body .markdown-body > :first-child { margin-top: 0 !important; }
body .markdown-body :is(ul,ol) { margin: 8px 0; padding-left: 24px; line-height: 1.7; }
body .markdown-body li > p { margin: 4px 0; }
body .markdown-body blockquote { margin: 12px 0; padding: 10px 16px; background: #002fa722 !important; border-left-color: var(--pixel-klein) !important; }
body .markdown-body blockquote::before, body .markdown-body blockquote::after { display: none; }
body .markdown-body img { margin: 12px auto !important; }
body .markdown-body figure.highlight { margin: 14px 0 !important; box-shadow: 3px 3px #020615; }
body .markdown-body figure.highlight table::before { background: repeating-linear-gradient(90deg, #b5c9ff 0 8px, transparent 8px 16px) 12px center / 40px 8px no-repeat, var(--pixel-klein); height: 24px; }
body .markdown-body th, body .markdown-body td { padding: 7px; line-height: 1.6; }
body .markdown-body hr { margin: 18px 0; }
body .progress { background: var(--pixel-klein); }
body ::selection { color: #fff; background: var(--pixel-klein); }
body .v .vbtn { background: var(--pixel-klein); color: #fff; }
@media (max-width: 980px) { body .article { padding: 20px; } body .article > .feed-heading { margin: -20px -20px 16px; } }
@media (max-width: 600px) { body .article { padding: 18px 16px; } body .article > .feed-heading { margin: -18px -16px 14px; } body .article-title { font-size: 23px; } }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } body *, body *::before, body *::after { animation: none !important; transition: none !important; } }
