/* Source: styles.css */
:root {
  --paper: #edf3f3;
  --surface: #f9fcfc;
  --panel: #e1edef;
  --ink: #17303d;
  --muted: #61757d;
  --accent: #477c91;
  --line: #c4d6da;
  --serif: 'Noto Serif SC', 'Songti SC', Georgia, serif;
  --sans: Inter, 'PingFang SC', 'Microsoft YaHei', sans-serif;
}
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  color: var(--ink);
  font: 16px/1.75 var(--sans);
  background:
    linear-gradient(color-mix(in srgb, var(--accent) 3%, transparent) 1px, transparent 1px),
    linear-gradient(90deg, color-mix(in srgb, var(--accent) 3%, transparent) 1px, transparent 1px),
    var(--paper);
  background-size: 34px 34px;
}
.site-header,
main,
footer {
  max-width: 1360px;
  margin: auto;
  padding: 0 42px;
}
.site-header {
  height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-decoration: none;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid var(--accent);
  border-radius: 50%;
  font: 18px var(--serif);
  letter-spacing: 0;
  color: var(--accent);
}
.site-header nav {
  display: flex;
  gap: 26px;
}
.site-header nav a {
  color: var(--muted);
  font-size: 13px;
  text-decoration: none;
}
.site-header nav a:hover,
.site-header nav .active {
  color: var(--ink);
}
.intro {
  display: grid;
  grid-template-columns: 1.45fr 0.8fr;
  gap: 48px;
  align-items: stretch;
  padding: 62px 0;
  border-bottom: 1px solid var(--line);
}
.hero-copy {
  min-height: 430px;
  padding: 48px 0 38px;
}
.eyebrow {
  margin: 0 0 13px;
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
}
.intro h1,
.article h1 {
  margin: 0;
  font: 600 clamp(3.4rem, 6.4vw, 6.2rem)/1.03 var(--serif);
  letter-spacing: -0.055em;
}
.intro-quote {
  margin: 24px 0 6px;
  font: 500 clamp(1.35rem, 2vw, 1.7rem)/1.5 var(--serif);
}
.intro-copy {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}
.disciplines {
  display: flex;
  flex-wrap: wrap;
  margin: 38px 0 28px;
}
.disciplines span {
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.1em;
  padding: 0 15px;
  border-right: 1px solid var(--line);
}
.disciplines span:first-child {
  padding-left: 0;
}
.disciplines span:last-child {
  border: 0;
}
.enter-link,
.read-link,
.text-link {
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}
.enter-link {
  display: inline-block;
  padding-bottom: 5px;
  border-bottom: 1px solid var(--accent);
}
.enter-link span,
.read-link span,
.text-link span {
  color: var(--accent);
  margin-left: 4px;
}
.enter-link:hover,
.read-link:hover,
.text-link:hover {
  color: var(--accent);
}
.archive-card {
  position: relative;
  overflow: hidden;
  display: flex;
  min-height: 430px;
  flex-direction: column;
  justify-content: space-between;
  padding: 25px 27px;
  background: linear-gradient(135deg, var(--panel), var(--surface));
  border: 1px solid var(--panel);
}
.archive-card:before {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0.26;
  background: repeating-linear-gradient(
    135deg,
    transparent 0 23px,
    var(--line) 24px 25px,
    transparent 26px 48px
  );
}
.archive-card > * {
  position: relative;
}
.archive-card-top,
.archive-card-foot {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
}
.archive-orbit {
  position: relative;
  width: 190px;
  height: 190px;
  margin: auto;
}
.archive-orbit i {
  position: absolute;
  display: block;
  border: 1px solid color-mix(in srgb, var(--accent) 42%, transparent);
  border-radius: 50%;
  inset: 12px;
}
.archive-orbit i:nth-child(2) {
  inset: 38px 0;
}
.archive-orbit i:nth-child(3) {
  inset: 0 40px;
}
.archive-orbit b {
  position: absolute;
  inset: 60px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: color-mix(in srgb, var(--surface) 78%, transparent);
  font: 36px var(--serif);
  color: var(--muted);
}
.archive-card-label {
  margin: 0 0 5px;
  color: var(--accent);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.15em;
}
.archive-card-text {
  max-width: 230px;
  margin: 0;
  color: var(--muted);
  font: 20px/1.55 var(--serif);
}
.section-heading h2,
.about h2 {
  margin: 0;
  font: 600 2rem/1.25 var(--serif);
  letter-spacing: -0.035em;
}
.reading-room {
  padding: 50px 0;
}
.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 30px;
  margin-bottom: 25px;
}
.section-aside {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}
.post-meta {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.025em;
}
.post-card h3 {
  margin: 0;
  font: 600 clamp(1.38rem, 2.2vw, 1.82rem)/1.35 var(--serif);
  letter-spacing: -0.025em;
}
.post-card h3 a {
  color: var(--ink);
  text-decoration: none;
}
.post-card h3 a:hover {
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-underline-offset: 6px;
}
.post-card > p:not(.post-meta) {
  color: var(--muted);
  margin: 12px 0 18px;
  font-size: 15px;
}
.archive-map {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  margin-bottom: 28px;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 65%, transparent);
}
.archive-map span {
  padding: 14px 16px;
  border-right: 1px solid var(--line);
  font: 16px var(--serif);
}
.archive-map span:last-child {
  border: 0;
}
.archive-map small {
  display: block;
  color: var(--muted);
  font: 10px var(--sans);
  letter-spacing: 0.08em;
}
.tag-list {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}
.tag-button {
  cursor: pointer;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 35%, transparent);
  padding: 6px 13px;
  color: var(--muted);
  font: 13px var(--sans);
}
.tag-button:hover,
.tag-button.selected {
  background: var(--panel);
  color: var(--ink);
  border-color: var(--accent);
}
.post-list {
  border-top: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 45%, transparent);
}
.post-card {
  padding: 29px 25px;
  border-bottom: 1px solid var(--line);
}
.post-card h3 {
  max-width: 740px;
}
.card-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.tag {
  display: inline-block;
  background: var(--panel);
  padding: 2px 8px;
  margin-right: 5px;
  color: var(--muted);
  font-size: 11px;
}
.empty-state {
  padding: 38px 0;
  color: var(--muted);
}
.about {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 70px;
  max-width: none;
  margin-top: 30px;
  padding: 70px max(42px, calc((100vw - 1276px) / 2));
  background: var(--panel);
  border-top: 1px solid var(--panel);
  border-bottom: 1px solid var(--panel);
}
.about h2 {
  font-size: clamp(2rem, 3vw, 3.1rem);
  max-width: 380px;
}
.about-copy {
  max-width: 620px;
  color: var(--muted);
  font-size: 17px;
}
.about-copy p:first-child {
  margin-top: 0;
  color: var(--ink);
  font: 600 1.42rem/1.55 var(--serif);
}
.about-copy .text-link {
  display: inline-block;
  margin-top: 12px;
}
footer {
  display: flex;
  justify-content: space-between;
  padding-top: 25px;
  padding-bottom: 25px;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.03em;
}
.article-shell {
  max-width: 900px;
  padding-top: 58px;
  padding-bottom: 92px;
}
.back {
  display: inline-block;
  margin-bottom: 43px;
  color: var(--muted);
  font-size: 13px;
  text-decoration: none;
}
.back:hover {
  color: var(--accent);
}
.article {
  max-width: 780px;
}
.article header {
  padding-bottom: 34px;
  border-bottom: 1px solid var(--line);
}
.article h1 {
  font-size: clamp(2.45rem, 5vw, 4.1rem);
}
.article-tags {
  margin-top: 22px;
}
.prose {
  max-width: 760px;
  padding: 30px 0 14px;
  color: var(--ink);
  font: 19px/2.05 var(--serif);
}
.prose p {
  margin: 0 0 26px;
}
.written-place {
  margin: 14px 0 28px;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.06em;
}
.bottom-back {
  margin-top: 0;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}
@media (max-width: 800px) {
  .site-header,
  main,
  footer {
    padding-left: 20px;
    padding-right: 20px;
  }
  .site-header {
    height: 70px;
  }
  .brand {
    font-size: 10px;
  }
  .site-header nav {
    gap: 14px;
  }
  .intro {
    grid-template-columns: 1fr;
    gap: 0;
    padding: 30px 0;
  }
  .hero-copy {
    min-height: auto;
    padding: 38px 0;
  }
  .archive-card {
    min-height: 300px;
    margin-bottom: 10px;
  }
  .archive-orbit {
    position: absolute;
    right: 8%;
    top: 42px;
    width: 150px;
    height: 150px;
  }
  .archive-orbit b {
    inset: 47px;
  }
  .archive-card-text {
    max-width: 190px;
    font-size: 18px;
  }
  .about {
    grid-template-columns: 1fr;
    gap: 28px;
    margin: 26px 0;
    padding: 30px 25px;
  }
  .section-heading {
    align-items: start;
    flex-direction: column;
  }
  .section-aside {
    font-size: 13px;
  }
  .reading-room {
    padding: 45px 0;
  }
  .archive-map {
    grid-template-columns: repeat(2, 1fr);
  }
  .archive-map span:nth-child(2n) {
    border-right: 0;
  }
  .archive-map span:last-child {
    border-top: 1px solid var(--line);
  }
  .search,
  .search input {
    width: 100%;
  }
  .card-bottom {
    align-items: start;
    flex-direction: column;
  }
  .about {
    padding-left: 25px;
    padding-right: 25px;
  }
  .article-shell {
    padding-top: 38px;
  }
  .prose {
    font-size: 18px;
  }
  footer {
    gap: 16px;
    font-size: 11px;
  }
}

/* Source: article-images.css */
.prose img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 24px auto;
}

/* Shared Markdown output: table overflow stays inside the content column. */
.markdown-table {
  max-width: 100%;
  overflow: auto;
  margin: 1.2em 0;
  overscroll-behavior-inline: contain;
}
.markdown-table table {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.94em;
  line-height: 1.65;
}
.markdown-table th,
.markdown-table td {
  border: 1px solid var(--line);
  padding: 9px 12px;
  min-width: 6em;
  overflow-wrap: anywhere;
  vertical-align: top;
}
.markdown-table th {
  background: var(--panel, var(--surface));
  font-weight: 600;
}
.markdown-table:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.preview li p,
.novel-preview li p {
  margin: 0.35em 0;
  text-indent: 0;
}
.preview li > ul,
.preview li > ol,
.novel-preview li > ul,
.novel-preview li > ol {
  margin: 0.3em 0;
}
.markdown-help {
  font-size: 12px;
  line-height: 1.7;
  margin: 8px 0;
}
.writing textarea,
.novel-writing textarea {
  font-family: ui-monospace, Consolas, 'Microsoft YaHei', monospace;
  tab-size: 4;
  white-space: pre-wrap;
  overflow-wrap: normal;
}

/* Source: loading.css */
.page-loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  background: color-mix(in srgb, var(--surface) 96%, transparent);
  color: var(--muted);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity 0.18s ease,
    visibility 0.18s ease;
}
.is-page-loading > .page-loader.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
.page-loader-inner {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 12px 16px;
  border: 1px solid var(--panel);
  background: var(--surface);
  font:
    13px/1.4 system-ui,
    'Microsoft YaHei',
    sans-serif;
  letter-spacing: 0.04em;
}
.loading-spinner,
.inline-loader {
  display: inline-block;
  border: 2px solid var(--panel);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: loading-spin 0.7s linear infinite;
}
.loading-spinner {
  width: 18px;
  height: 18px;
}
.inline-loader {
  width: 12px;
  height: 12px;
  border-width: 1.5px;
  vertical-align: -1px;
}
.data-loader {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 88px;
  padding: 20px;
  border: 1px solid var(--panel);
  background: color-mix(in srgb, var(--surface) 62%, transparent);
  color: var(--muted);
  font-size: 13px;
}
.selected-posts > .data-loader,
.novel-cards > .data-loader,
.post-list > .data-loader {
  grid-column: 1/-1;
  width: 100%;
}
.record-loading {
  display: flex !important;
  align-items: center;
  gap: 6px;
}
.record-card .record-loading {
  justify-content: flex-end;
}
.site-stats .inline-loader {
  margin-left: 4px;
}
.loading-skeleton {
  min-height: 260px;
}
.loading-skeleton .data-loader {
  min-height: 220px;
}
.button-loading {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}
.button-loading .inline-loader {
  border-color: color-mix(in srgb, var(--surface) 42%, transparent);
  border-top-color: var(--surface);
}
@keyframes loading-spin {
  to {
    transform: rotate(360deg);
  }
}
@media (prefers-reduced-motion: reduce) {
  .page-loader {
    transition: none;
  }
  .loading-spinner,
  .inline-loader {
    animation-duration: 1.4s;
  }
}

/* Source: archive-polish.css */
/* A compact interaction layer for the public archive. */
.hero-copy {
  position: relative;
}
.hero-copy:after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 20px;
  width: 92px;
  height: 1px;
  background: var(--accent);
  box-shadow:
    110px 0 0 var(--line),
    220px 0 0 var(--line);
}
.archive-orbit {
  animation: archive-drift 12s ease-in-out infinite;
}
@keyframes archive-drift {
  50% {
    transform: translateY(-6px) rotate(2deg);
  }
}
#categories.archive-map {
  grid-template-columns: repeat(6, 1fr);
  margin-bottom: 16px;
}
#categories .category-button {
  min-height: 82px;
  padding: 14px 16px;
  border: 0;
  border-right: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  font: 16px var(--serif);
  transition:
    background 0.2s,
    color 0.2s;
}
#categories .category-button:last-child {
  border-right: 0;
}
#categories .category-button span,
#categories .category-button small {
  display: block;
}
#categories .category-button small {
  margin-top: 3px;
  color: var(--muted);
  font: 10px var(--sans);
  letter-spacing: 0.08em;
}
#categories .category-button:hover,
#categories .category-button.selected {
  background: var(--panel);
}
#categories .category-button.selected {
  box-shadow: inset 0 3px 0 var(--accent);
}
.archive-filters {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 28px;
  border-bottom: 1px solid var(--line);
}
.archive-filters .tag-list {
  margin-bottom: 8px;
}
.filter-summary {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}
@media (max-width: 800px) {
  #categories.archive-map {
    grid-template-columns: repeat(2, 1fr);
  }
  #categories .category-button:nth-child(2n) {
    border-right: 0;
  }
  #categories .category-button:nth-child(n + 3) {
    border-top: 1px solid var(--line);
  }
  .archive-filters {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }
  .filter-summary {
    margin-bottom: 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  .archive-orbit {
    animation: none;
  }
}

/* Source: living-archive.css */
/* Homepage only:paper,catalog colours and interactive archive drawers. */
.intro {
  perspective: 1100px;
}
.archive-card {
  --card-x: 50%;
  --card-y: 50%;
  --tilt-x: 0deg;
  --tilt-y: 0deg;
  overflow: visible;
  transform: rotateX(var(--tilt-x)) rotateY(var(--tilt-y));
  transition:
    transform 0.45s ease,
    box-shadow 0.45s ease;
  background:
    radial-gradient(circle at var(--card-x) var(--card-y), var(--surface) 0, transparent 55%),
    linear-gradient(145deg, var(--panel), var(--surface));
  box-shadow:
    8px 10px 0 -2px var(--paper),
    8px 10px 0 -1px var(--panel);
}
.archive-card:before {
  pointer-events: none;
  opacity: 0.17;
}
.archive-card:after {
  content: '';
  position: absolute;
  inset: 10px;
  border: 1px solid var(--panel);
  pointer-events: none;
}
.archive-card.is-inspecting {
  box-shadow:
    8px 14px 0 -2px var(--paper),
    8px 14px 0 -1px var(--panel),
    0 24px 32px -26px color-mix(in srgb, var(--accent) 37.65%, transparent);
}
.archive-card .archive-orbit {
  animation: none;
  transform: translate(calc(var(--orbit-x, 0) * 1px), calc(var(--orbit-y, 0) * 1px));
  transition: transform 0.4s ease;
}
.archive-orbit i:first-child {
  border-style: dashed;
}
.archive-stamp {
  position: absolute;
  right: 25px;
  bottom: 104px;
  padding: 8px 10px;
  border: 2px double var(--accent);
  transform: rotate(-9deg);
  color: var(--muted);
  font: 10px/1.7 var(--sans);
  letter-spacing: 0.13em;
  text-align: center;
  opacity: 0.7;
}
.archive-scan {
  position: absolute;
  inset: 11px;
  overflow: hidden;
  pointer-events: none;
}
.archive-scan:after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: -40%;
  height: 25%;
  background: linear-gradient(transparent, color-mix(in srgb, var(--surface) 50.2%, transparent));
  border-bottom: 1px solid color-mix(in srgb, var(--accent) 50.2%, transparent);
}
.is-inspecting .archive-scan:after {
  animation: archive-scan 2.4s ease-in-out infinite;
}
@keyframes archive-scan {
  to {
    top: 110%;
  }
}
[data-category] {
  --catalog-tone: var(--accent);
  --catalog-paper: var(--panel);
  --catalog-line: var(--line);
}
[data-category='漫谈'] {
  --catalog-tone: var(--accent);
  --catalog-paper: var(--panel);
  --catalog-line: var(--line);
}
[data-category='构建'] {
  --catalog-tone: var(--accent);
  --catalog-paper: var(--panel);
  --catalog-line: var(--line);
}
[data-category='阅读'] {
  --catalog-tone: var(--accent);
  --catalog-paper: var(--panel);
  --catalog-line: var(--line);
}
[data-category='思考'] {
  --catalog-tone: var(--accent);
  --catalog-paper: var(--panel);
  --catalog-line: var(--line);
}
[data-category='生活'] {
  --catalog-tone: var(--accent);
  --catalog-paper: var(--panel);
  --catalog-line: var(--line);
}
#categories .category-button {
  position: relative;
  background: var(--catalog-paper);
  min-height: 90px;
  transition:
    background 0.2s ease,
    box-shadow 0.2s ease;
}
#categories .category-button span {
  padding: 0 0 0 14px;
  border: 0;
  position: relative;
  color: var(--catalog-tone);
}
#categories .category-button span:before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.5em;
  width: 5px;
  height: 5px;
  background: var(--catalog-tone);
}
#categories .category-button small {
  color: var(--muted);
  padding-left: 14px;
}
#categories .category-button:hover,
#categories .category-button.selected {
  background: var(--catalog-paper);
  box-shadow: inset 0 4px 0 var(--catalog-tone);
}
#categories .category-button.selected span {
  font-weight: 700;
}
#archive .archive-filters {
  border-color: var(--catalog-line);
  transition: border-color 0.3s;
}
#archive .tag-button.selected {
  color: var(--catalog-tone);
  background: var(--catalog-paper);
  border-color: var(--catalog-tone);
}
.living-post.post-card {
  padding: 0;
  border: 1px solid var(--catalog-line);
  position: relative;
  background: var(--surface);
  min-width: 0;
}
.post-list {
  border: 0;
  background: transparent;
  display: grid;
  gap: 20px;
}
.archive-paper {
  position: relative;
  padding: 26px;
  border-top: 3px solid var(--catalog-tone);
  background: linear-gradient(120deg, var(--surface) 65%, var(--catalog-paper));
}
.archive-excerpt {
  margin: 14px 0 20px;
  color: var(--muted);
  font-size: 15px;
}
.living-post h3 {
  overflow-wrap: anywhere;
}
.living-post .post-meta {
  color: var(--muted);
}
.category-mark {
  color: var(--catalog-tone);
}
.category-mark:before {
  content: '';
  display: inline-block;
  width: 5px;
  height: 5px;
  margin-right: 7px;
  background: currentColor;
  vertical-align: 2px;
}
.living-post .read-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}
.living-post a:focus-visible,
.archive-drawer summary:focus-visible {
  outline: 2px solid var(--catalog-tone);
  outline-offset: 4px;
}
.archive-drawer {
  background: var(--catalog-paper);
  border-top: 1px solid var(--catalog-line);
}
.archive-drawer summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  list-style: none;
  min-height: 44px;
  padding: 8px 24px;
  color: var(--catalog-tone);
  font-size: 12px;
  letter-spacing: 0.08em;
}
.archive-drawer summary::-webkit-details-marker {
  display: none;
}
.drawer-arrow {
  transition: transform 0.25s;
}
.archive-drawer[open] .drawer-arrow {
  transform: rotate(90deg);
}
.drawer-content {
  padding: 0 24px 20px;
  animation: archive-drawer-in 0.3s ease both;
}
.drawer-content dl {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  margin: 0 0 12px;
}
.drawer-content dl > div {
  min-width: 0;
}
.drawer-content dt {
  font-size: 10px;
  color: var(--muted);
}
.drawer-content dd {
  margin: 3px 0 0;
  font-size: 12px;
  color: var(--ink);
}
.drawer-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.drawer-tags .tag {
  margin: 0;
  color: var(--catalog-tone);
  border: 1px solid var(--catalog-line);
  background: var(--surface);
  overflow-wrap: anywhere;
}
@keyframes archive-drawer-in {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@media (min-width: 801px) {
  .post-card.living-post {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 60px;
    transition: grid-template-columns 0.3s ease;
  }
  .post-card.living-post:hover,
  .post-card.living-post:focus-within,
  .post-card.living-post:has(details[open]) {
    grid-template-columns: minmax(0, 1fr) 240px;
  }
  .post-card .archive-drawer:not([open]) summary {
    justify-content: center;
    padding: 12px;
  }
  .post-card .archive-drawer:not([open]) summary span:first-child {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }
  .post-card .archive-drawer {
    border-top: 0;
    border-left: 1px solid var(--catalog-line);
  }
  .post-card .drawer-content {
    animation-name: archive-drawer-side;
  }
  .post-card .drawer-content dl {
    flex-direction: column;
  }
  @keyframes archive-drawer-side {
    from {
      opacity: 0;
      transform: translateX(-12px);
    }
    to {
      opacity: 1;
      transform: translateX(0);
    }
  }
}
@media (max-width: 800px) {
  .archive-card {
    transform: none;
    margin-right: 8px;
    min-height: 350px;
    justify-content: flex-start;
  }
  .archive-card .archive-orbit {
    top: 50px;
    right: 20px;
    width: 130px;
    height: 130px;
  }
  .archive-card .archive-orbit b {
    inset: 40px;
    font-size: 30px;
  }
  .archive-card-label {
    margin-top: 170px;
  }
  .archive-card-foot {
    margin-top: auto;
    padding-top: 16px;
  }
  .archive-stamp {
    top: 92px;
    left: 24px;
    right: auto;
    bottom: auto;
    font-size: 8px;
    padding: 6px;
  }
  .archive-paper {
    padding: 20px;
  }
  .drawer-content,
  .archive-drawer summary {
    padding-left: 20px;
    padding-right: 20px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .archive-card,
  .archive-card .archive-orbit {
    transform: none;
    transition: none;
  }
  .archive-scan:after,
  .drawer-content {
    animation: none !important;
  }
  .drawer-arrow {
    transition: none;
  }
  .post-card.living-post {
    transition: none;
  }
}

/* Source: landscape.css */
/* Generated shanshui raster with lightweight drift and mist. */
body {
  background:
    radial-gradient(ellipse at 85% 0, var(--panel) 0, transparent 32%),
    radial-gradient(ellipse at 8% 18%, var(--surface) 0, transparent 34%), var(--paper);
}
.site-header {
  position: relative;
  z-index: 2;
}
.intro {
  position: relative;
  isolation: isolate;
  padding-top: 76px;
  padding-bottom: 76px;
}
.intro .hero-copy,
.intro .archive-card {
  z-index: 1;
}
.intro .hero-copy {
  padding-top: 44px;
}
.intro .hero-copy:after {
  display: none;
}
.landscape {
  position: absolute;
  z-index: -1;
  inset: -82px -42px -50px;
  overflow: hidden;
  pointer-events: none;
  mask-image: linear-gradient(#000 70%, transparent);
}
.landscape-art {
  position: absolute;
  inset: -30px;
  transition: transform 0.6s ease-out;
}
.landscape-image {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center;
}
.landscape-wash {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      90deg,
      color-mix(in srgb, var(--surface) 72.16%, transparent),
      color-mix(in srgb, var(--surface) 43.92%, transparent) 47%,
      color-mix(in srgb, var(--surface) 9.41%, transparent) 78%
    ),
    linear-gradient(
      180deg,
      color-mix(in srgb, var(--surface) 31.37%, transparent),
      transparent 42%,
      color-mix(in srgb, var(--surface) 40.78%, transparent)
    );
}
.landscape-mist {
  position: absolute;
  inset: -10%;
  background:
    radial-gradient(
      ellipse at 65% 55%,
      color-mix(in srgb, var(--surface) 69.02%, transparent) 0,
      transparent 40%
    ),
    radial-gradient(
      ellipse at 20% 75%,
      color-mix(in srgb, var(--surface) 43.92%, transparent) 0,
      transparent 35%
    );
  pointer-events: none;
}
.landscape.is-moving .landscape-image {
  animation: landscape-breathe 12s ease-in-out infinite alternate;
}
.landscape.is-moving .landscape-mist {
  animation: landscape-mist 9s ease-in-out infinite alternate;
}
@keyframes landscape-breathe {
  from {
    transform: translate(-8px, 5px) scale(1.01);
  }
  to {
    transform: translate(12px, -12px) scale(1.055);
  }
}
@keyframes landscape-mist {
  from {
    transform: translate(-24px, 10px);
    opacity: 0.35;
  }
  to {
    transform: translate(24px, -10px);
    opacity: 0.8;
  }
}
.intro .archive-card {
  background: linear-gradient(
    145deg,
    color-mix(in srgb, var(--surface) 85.1%, transparent),
    color-mix(in srgb, var(--panel) 85.1%, transparent)
  );
  border-color: var(--panel);
}
.intro .archive-card:before {
  opacity: 0.08;
}
.intro .archive-card:after {
  border-color: var(--panel);
}
.intro .archive-card-top,
.intro .archive-card-foot,
.intro .archive-card-label {
  color: var(--muted);
}
.intro .archive-stamp {
  color: var(--danger);
  border-color: var(--danger);
}
.handwritten-mark {
  position: relative;
  white-space: nowrap;
}
.handwritten-mark svg {
  position: absolute;
  width: 106%;
  height: 12px;
  left: -3%;
  bottom: -9px;
  overflow: visible;
  fill: none;
  stroke: var(--danger);
  stroke-width: 2;
  stroke-linecap: round;
}
.handwritten-mark path {
  stroke-dasharray: 110;
  stroke-dashoffset: 0;
  animation: handwrite 1.6s ease both;
}
.handwritten-mark path:nth-child(2) {
  animation-delay: 0.2s;
}
@keyframes handwrite {
  from {
    stroke-dashoffset: 110;
  }
  to {
    stroke-dashoffset: 0;
  }
}
@media (max-width: 800px) {
  .intro {
    padding-top: 28px;
    padding-bottom: 40px;
  }
  .landscape {
    inset: -70px -20px -30px;
  }
  .landscape-image {
    object-position: 42% center;
  }
  .landscape-wash {
    background: linear-gradient(
      180deg,
      color-mix(in srgb, var(--surface) 69.02%, transparent),
      color-mix(in srgb, var(--surface) 31.37%, transparent) 40%,
      color-mix(in srgb, var(--surface) 50.2%, transparent)
    );
  }
}
@media (prefers-reduced-motion: reduce) {
  .landscape.is-moving .landscape-image,
  .landscape.is-moving .landscape-mist,
  .handwritten-mark path {
    animation: none;
  }
  .landscape-art {
    transition: none;
    transform: none !important;
  }
}

/* Source: hover-details.css */
/* Small, finite hover gestures. The native pointer and links remain unchanged. */
.landscape-water {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  mask-image: linear-gradient(transparent 52%, #000 64%, #000 90%, transparent);
}
@media (max-width: 800px), (hover: none), (prefers-reduced-motion: reduce) {
  .landscape-water {
    display: none;
  }
}
.enter-link,
.living-post .read-link {
  position: relative;
}
.enter-link {
  border-bottom-color: transparent;
}
.enter-link:after,
.living-post .read-link:after {
  content: '';
  position: absolute;
  bottom: 3px;
  left: 0;
  width: calc(100% - 22px);
  height: 3px;
  background: var(--line);
  clip-path: polygon(0 55%, 38% 12%, 100% 38%, 98% 68%, 43% 48%, 1% 100%);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s ease;
  pointer-events: none;
}
.enter-link:after {
  transform: scaleX(0.4);
}
.enter-link > span,
.living-post .read-link > span {
  display: inline-block;
  transition: transform 0.3s ease;
}
.enter-link:focus-visible:after,
.living-post .read-link:focus-visible:after {
  transform: scaleX(1);
}
.enter-link:focus-visible > span,
.living-post .read-link:focus-visible > span {
  transform: translateX(4px);
}
.game-tool-link {
  min-height: 44px;
}
.game-tool-icon {
  grid-template-columns: repeat(2, 8px);
  gap: 3px;
}
.game-tool-icon i {
  width: 8px;
  height: 8px;
}
.tetris-tool-icon {
  grid-template-columns: repeat(3, 6px);
  grid-template-rows: repeat(2, 6px);
  gap: 2px;
}
.white-tiles-tool-icon {
  grid-template-columns: repeat(2, 8px);
  grid-template-rows: repeat(2, 8px);
  gap: 2px;
}
@keyframes tile-merge-a {
  0%,
  100% {
    transform: none;
  }
  45%,
  70% {
    transform: translate(-5.5px, 5.5px) scale(1.2);
  }
}
@keyframes tile-merge-b {
  0%,
  100% {
    transform: none;
    opacity: 1;
  }
  45% {
    transform: translate(5.5px, -5.5px);
    opacity: 1;
  }
  70% {
    transform: translate(5.5px, -5.5px);
    opacity: 0;
  }
}
@keyframes block-drop {
  0% {
    transform: translateY(-8px);
    opacity: 0.3;
  }
  65% {
    transform: translateY(1px);
    opacity: 1;
  }
  100% {
    transform: none;
  }
}
@keyframes tile-step {
  0%,
  100% {
    background: transparent;
  }
  30%,
  65% {
    background: var(--ink);
    border-color: var(--ink);
  }
}
.game-tool-link:focus-visible .game-tool-icon i:nth-child(2) {
  animation: tile-merge-a 1s ease both;
}
.game-tool-link:focus-visible .game-tool-icon i:nth-child(3) {
  animation: tile-merge-b 1s ease both;
}
.game-tool-link:focus-visible .tetris-tool-icon i:first-child {
  animation: block-drop 0.7s ease both;
}
.game-tool-link:focus-visible .white-tiles-tool-icon i:first-child {
  animation: tile-step 0.9s ease both;
}
.game-tool-link:focus-visible .white-tiles-tool-icon i:last-child {
  animation: tile-step 0.9s 0.2s ease both;
}
@media (hover: hover) and (pointer: fine) {
  .enter-link:hover:after,
  .living-post .read-link:hover:after {
    transform: scaleX(1);
  }
  .enter-link:hover > span,
  .living-post .read-link:hover > span {
    transform: translateX(4px);
  }
  .game-tool-link:hover .game-tool-icon i:nth-child(2) {
    animation: tile-merge-a 1s ease both;
  }
  .game-tool-link:hover .game-tool-icon i:nth-child(3) {
    animation: tile-merge-b 1s ease both;
  }
  .game-tool-link:hover .tetris-tool-icon i:first-child {
    animation: block-drop 0.7s ease both;
  }
  .game-tool-link:hover .white-tiles-tool-icon i:first-child {
    animation: tile-step 0.9s ease both;
  }
  .game-tool-link:hover .white-tiles-tool-icon i:last-child {
    animation: tile-step 0.9s 0.2s ease both;
  }
}
@media (prefers-reduced-motion: reduce) {
  .landscape-ripples {
    display: none;
  }
  .enter-link:after,
  .living-post .read-link:after,
  .enter-link > span,
  .living-post .read-link > span {
    transition: none;
  }
  .game-tool-link .game-tool-icon i,
  .game-tool-link .tetris-tool-icon i,
  .game-tool-link .white-tiles-tool-icon i {
    animation: none !important;
  }
}

/* Source: about-links.css */
.site-footer {
  display: block;
  max-width: 1360px;
  margin: auto;
  padding: 0 42px;
  color: var(--muted);
  text-align: initial;
}
.footer-contact-panel {
  position: relative;
  padding: 16px 24px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  text-align: center;
}
.site-footer .site-stats {
  padding: 0 0 10px;
  color: var(--muted);
}
.site-footer .site-stats b {
  color: var(--ink);
}
.site-footer .site-stats span + span {
  border-color: var(--line);
}
.footer-social-links {
  display: flex;
  justify-content: center;
  gap: 14px;
}
.footer-social-link {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: color-mix(in srgb, var(--surface) 48%, transparent);
  color: var(--accent);
  transition:
    transform 0.18s ease,
    border-color 0.18s ease,
    color 0.18s ease,
    background 0.18s ease;
}
button.footer-social-link {
  cursor: pointer;
}
.footer-social-link svg {
  width: 27px;
  height: 27px;
  fill: currentColor;
}
.footer-social-link:last-child svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.footer-social-link:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  background: var(--panel);
  color: var(--ink);
}
.footer-social-link.is-copied {
  border-color: var(--line);
  background: var(--surface);
  color: var(--muted);
}
.footer-social-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}
.copy-notice {
  position: absolute;
  left: 50%;
  bottom: -34px;
  z-index: 1;
  margin: 0;
  padding: 3px 9px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.04em;
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%) translateY(-3px);
  transition:
    opacity 0.16s ease,
    transform 0.16s ease;
}
.copy-notice:not(:empty) {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.site-footer .footer-meta {
  justify-content: space-between;
  gap: 16px;
  padding: 25px 0;
  color: var(--muted);
  border: 0;
}
.site-footer .footer-meta span + span:before {
  content: none;
}
@media (max-width: 480px) {
  .site-footer {
    padding: 0 20px;
  }
  .footer-contact-panel {
    margin: 0 -20px;
    padding: 15px 20px;
  }
  .footer-social-links {
    gap: 12px;
  }
  .footer-social-link {
    width: 46px;
    height: 46px;
  }
  .site-footer .footer-meta {
    font-size: 11px;
  }
}

/* Source: site-stats.css */
footer {
  display: block;
  padding-top: 25px;
  padding-bottom: 25px;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.03em;
}
.site-stats {
  display: flex;
  justify-content: center;
  gap: 18px;
  padding: 0 0 18px;
  color: var(--muted);
  font-size: 13px;
}
.site-stats span + span {
  padding-left: 18px;
  border-left: 1px solid var(--line);
}
.site-stats b {
  color: var(--ink);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.footer-meta {
  display: flex;
  justify-content: space-between;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}
@media (max-width: 800px) {
  .site-stats {
    gap: 10px;
    font-size: 12px;
  }
  .site-stats span + span {
    padding-left: 10px;
  }
  .footer-meta {
    gap: 16px;
    font-size: 11px;
  }
}

/* Source: ziwei-link.css */
.ziwei-link-section {
  padding: 48px 0;
  border-bottom: 1px solid var(--line);
}
.tool-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.game-tool-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  width: 168px;
  padding: 8px 11px;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 58%, transparent);
  color: var(--ink);
  font: 600 14px var(--serif);
  text-decoration: none;
}
.game-tool-link:hover {
  border-color: var(--accent);
  background: var(--panel);
}
.game-tool-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
.game-tool-icon {
  display: grid;
  grid-template-columns: repeat(2, 6px);
  gap: 2px;
}
.game-tool-icon i {
  display: block;
  width: 6px;
  height: 6px;
  background: var(--line);
}
.game-tool-icon i:nth-child(2),
.game-tool-icon i:nth-child(3) {
  background: var(--accent);
}
.tetris-tool-icon {
  display: grid;
  grid-template-columns: repeat(3, 5px);
  grid-template-rows: repeat(2, 5px);
  gap: 1px;
}
.tetris-tool-icon i {
  display: block;
  background: var(--accent);
}
.tetris-tool-icon i:nth-child(1) {
  grid-column: 2;
  grid-row: 1;
}
.tetris-tool-icon i:nth-child(2) {
  grid-column: 1;
  grid-row: 2;
}
.tetris-tool-icon i:nth-child(3) {
  grid-column: 2;
  grid-row: 2;
}
.tetris-tool-icon i:nth-child(4) {
  grid-column: 3;
  grid-row: 2;
}
.white-tiles-tool-icon {
  display: grid;
  grid-template-columns: repeat(2, 6px);
  grid-template-rows: repeat(2, 6px);
  gap: 1px;
}
.white-tiles-tool-icon i {
  display: block;
  border: 1px solid var(--line);
}
.white-tiles-tool-icon i:nth-child(3) {
  background: var(--ink);
  border-color: var(--ink);
}
.minesweeper-tool-icon {
  position: relative;
  display: block;
  flex: 0 0 22px;
  width: 22px;
  height: 22px;
}
.minesweeper-tool-icon:before {
  content: '';
  position: absolute;
  inset: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow:
    0 -5px 0 -2px var(--accent),
    0 5px 0 -2px var(--accent),
    5px 0 0 -2px var(--accent),
    -5px 0 0 -2px var(--accent),
    3.5px 3.5px 0 -2px var(--accent),
    -3.5px -3.5px 0 -2px var(--accent),
    3.5px -3.5px 0 -2px var(--accent),
    -3.5px 3.5px 0 -2px var(--accent);
}
.minesweeper-tool-icon:after {
  content: '';
  position: absolute;
  left: 10px;
  top: 3px;
  width: 2px;
  height: 4px;
  background: var(--line);
}
.minesweeper-tool-icon i {
  display: none;
}
.ziwei-link-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 100px;
  padding: 24px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  text-decoration: none;
}
.ziwei-link-card:hover {
  border-color: var(--accent);
  background: var(--surface);
}
.ziwei-link-card:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.ziwei-link-card strong {
  display: block;
  font: 600 1.5rem/1.35 var(--serif);
}
.ziwei-link-card small {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
}
.ziwei-link-card b {
  color: var(--muted);
  font-size: 22px;
  font-weight: 400;
}
.archive-card-text {
  max-width: 280px;
  font: 600 clamp(1.4rem, 2.6vw, 1.75rem)/1.45 var(--serif);
  letter-spacing: 0.025em;
}
@media (max-width: 800px) {
  .ziwei-link-section {
    padding: 40px 0;
  }
  .tool-links {
    grid-template-columns: 1fr;
  }
  .ziwei-link-card {
    padding: 16px;
  }
}

/* Source: palette-refine.css */
/* One quiet paper palette for the public archive.  Status and game colours stay semantic. */
:root {
  --paper: #f1f4f5;
  --surface: #fbfcfc;
  --panel: #e5edef;
  --ink: #1c3440;
  --muted: #5d7078;
  --accent: #53798a;
  --line: #c8d8dc;
  --archive-blue: #416b7d;
  --archive-wash: #edf4f5;
}

body {
  background:
    radial-gradient(ellipse at 85% 0, var(--panel) 0, transparent 32%),
    radial-gradient(ellipse at 8% 18%, var(--surface) 0, transparent 34%), var(--paper);
}

/* Categories remain distinct in meaning, rather than competing in colour. */
[data-category],
[data-category='漫谈'],
[data-category='构建'],
[data-category='阅读'],
[data-category='思考'],
[data-category='生活'] {
  --catalog-tone: var(--accent);
  --catalog-paper: var(--panel);
  --catalog-line: var(--line);
}

.intro .archive-card {
  background: linear-gradient(
    145deg,
    color-mix(in srgb, var(--surface) 85.1%, transparent),
    color-mix(in srgb, var(--panel) 85.1%, transparent)
  );
  border-color: var(--panel);
}

.intro .archive-card:after {
  border-color: var(--panel);
}
.intro .archive-card-top,
.intro .archive-card-foot,
.intro .archive-card-label {
  color: var(--muted);
}
.intro .archive-stamp {
  color: var(--muted);
  border-color: var(--accent);
}
.handwritten-mark svg {
  stroke: var(--accent);
}

.landscape-wash {
  background:
    linear-gradient(
      90deg,
      color-mix(in srgb, var(--surface) 74.12%, transparent),
      color-mix(in srgb, var(--surface) 43.92%, transparent) 47%,
      color-mix(in srgb, var(--surface) 9.41%, transparent) 78%
    ),
    linear-gradient(
      180deg,
      color-mix(in srgb, var(--surface) 31.37%, transparent),
      transparent 42%,
      color-mix(in srgb, var(--surface) 40.78%, transparent)
    );
}

.landscape-mist {
  background:
    radial-gradient(
      ellipse at 65% 55%,
      color-mix(in srgb, var(--surface) 69.02%, transparent) 0,
      transparent 40%
    ),
    radial-gradient(
      ellipse at 20% 75%,
      color-mix(in srgb, var(--surface) 43.92%, transparent) 0,
      transparent 35%
    );
}

.enter-link:after,
.living-post .read-link:after {
  background: var(--line);
}

.archive-paper {
  background: linear-gradient(120deg, var(--surface) 68%, var(--surface));
}
.archive-drawer {
  background: var(--surface);
}
.archive-card {
  box-shadow: 0 12px 28px color-mix(in srgb, var(--line) 20%, transparent);
}
.novel-card:hover {
  background: var(--surface);
}
.footer-social-link:hover {
  background: var(--panel);
  color: var(--muted);
}

@media (max-width: 800px) {
  .landscape-wash {
    background: linear-gradient(
      180deg,
      color-mix(in srgb, var(--surface) 69.02%, transparent),
      color-mix(in srgb, var(--surface) 31.37%, transparent) 40%,
      color-mix(in srgb, var(--surface) 50.2%, transparent)
    );
  }
}

/* Source: site-layout.css */
/* Shared public layout. Feature styles keep their own reading and game rules. */
:root {
  --text-secondary: var(--muted);
  --accent-text: #416b7d;
}
.site-header {
  height: auto;
  min-height: 82px;
  gap: 16px;
  flex-wrap: wrap;
  padding-top: 16px;
  padding-bottom: 16px;
}
.site-header nav {
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}
.site-header nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}
.site-header nav a.active {
  color: var(--accent-text);
  text-decoration: underline;
  text-underline-offset: 7px;
}
.skip-link {
  position: absolute;
  z-index: 100;
  left: 20px;
  top: -100px;
  padding: 10px 16px;
  background: var(--surface);
  color: var(--ink);
}
.skip-link:focus {
  top: 8px;
}
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
main {
  min-width: 0;
}
h1,
h2,
h3,
.prose,
.novel-description,
.section-aside {
  overflow-wrap: anywhere;
}
.article h1,
.novel-page h1,
.reader-heading h1 {
  margin: 0;
  font: 600 clamp(2rem, 4.5vw, 3.5rem)/1.2 var(--serif);
  letter-spacing: -0.035em;
}
.prose img {
  max-width: 100%;
  height: auto;
}
.prose pre {
  max-width: 100%;
  overflow-x: auto;
}
.site-footer {
  gap: 16px;
  align-items: center;
}
.site-footer a {
  color: var(--muted);
  text-underline-offset: 4px;
}
.site-status {
  color: var(--muted);
  padding: 16px 0;
  margin: 0;
}
.retry-button,
.filter-reset {
  cursor: pointer;
  min-height: 44px;
  padding: 8px 12px;
  color: var(--accent-text);
  background: var(--surface);
  border: 1px solid var(--line);
  font: 13px var(--sans);
}
.retry-button {
  margin-left: 12px;
}
.filter-reset {
  margin-bottom: 8px;
}
.filter-reset[hidden] {
  display: none;
}
.tag-button {
  min-height: 36px;
}
.tag-button[aria-pressed='true'] {
  font-weight: 600;
}
.novel-directory a.active {
  background: var(--panel);
  color: var(--accent-text);
  box-shadow: inset 3px 0 var(--accent);
}
.novel-navigation a {
  min-height: 44px;
  overflow-wrap: anywhere;
}
.reader-heading .back {
  margin-bottom: 16px;
}
@media (max-width: 800px) {
  .site-header {
    min-height: 76px;
    gap: 4px 16px;
    padding-top: 12px;
    padding-bottom: 12px;
  }
  .site-header nav {
    gap: 16px;
  }
  .brand {
    white-space: nowrap;
  }
  .site-footer {
    flex-wrap: wrap;
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

/* Source: home.css */
/* The archive is the main entry; reading, fiction and games follow it. */
.reading-room,
.reading-section,
.novel-section {
  padding: 48px 0;
  border-bottom: 1px solid var(--line);
  scroll-margin-top: 20px;
}
.section-heading {
  margin-bottom: 24px;
  gap: 24px;
}
.section-heading h2 {
  font-size: 2rem;
}
.search input {
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  font: 14px var(--sans);
}
#categories .category-button {
  min-width: 0;
  padding-inline: clamp(8px, 1vw, 16px);
}
#categories .category-button > span {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px 10px;
}
#categories .category-count {
  color: var(--muted);
  font: 400 12px/1.5 var(--sans);
  white-space: nowrap;
}
#categories .category-button small {
  white-space: nowrap;
  letter-spacing: 0.04em;
}
@media (min-width: 801px) and (max-width: 1100px) {
  #categories .category-button small {
    font-size: 9.5px;
    letter-spacing: 0.025em;
  }
}
.archive-filters {
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 24px;
  align-items: center;
}
.filter-summary {
  white-space: normal;
  overflow-wrap: anywhere;
}
.archive-paper {
  border-top-width: 1px;
  padding: 24px;
}
.archive-excerpt,
.novel-card p,
.reading-feature-copy {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.post-card h3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.novel-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: 16px;
}
.novel-card {
  display: block;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--ink);
  text-decoration: none;
  overflow-wrap: anywhere;
}
.novel-card:hover,
.reading-feature:hover {
  border-color: var(--accent);
}
.novel-card span,
.novel-card p {
  color: var(--muted);
  font-size: 13px;
}
.novel-card h3 {
  margin: 8px 0;
  font: 600 1.5rem/1.35 var(--serif);
}
.novel-card b {
  display: block;
  margin-top: 16px;
  font-size: 13px;
}
.novel-empty {
  padding: 24px;
  border: 1px solid var(--line);
  color: var(--muted);
}
.reading-feature {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 160px;
  border: 1px solid var(--line);
  text-decoration: none;
  color: var(--ink);
  background: var(--surface);
}
.reading-feature + .reading-feature {
  margin-top: 16px;
}
.reading-feature-main,
.reading-feature-meta {
  padding: 24px;
}
.reading-feature h3 {
  margin: 0;
  font: 600 clamp(1.5rem, 2.4vw, 2rem)/1.35 var(--serif);
  overflow-wrap: anywhere;
}
.reading-feature-copy {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 14px;
}
.reading-feature-action {
  display: block;
  margin-top: 16px;
  font-size: 13px;
  font-weight: 600;
}
.reading-feature-meta {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 12px;
  border-left: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
}
.reading-feature-meta b {
  color: var(--ink);
  font: 500 2.4rem/1 var(--serif);
}
.about {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  margin: 0;
  padding: 52px 40px;
  gap: 40px;
  align-items: center;
  border: 1px solid var(--line);
  background:
    radial-gradient(ellipse at 100% 0, var(--panel) 0, transparent 55%),
    linear-gradient(130deg, var(--surface), var(--surface));
}
.about:before {
  content: '';
  position: absolute;
  top: 0;
  left: 40px;
  width: 64px;
  height: 3px;
  background: var(--accent);
}
.about:after {
  content: '';
  position: absolute;
  z-index: -1;
  right: -56px;
  bottom: -110px;
  width: 280px;
  height: 280px;
  border: 1px solid color-mix(in srgb, var(--panel) 50.2%, transparent);
  border-radius: 50%;
  box-shadow:
    0 0 0 24px color-mix(in srgb, var(--panel) 12.55%, transparent),
    0 0 0 48px color-mix(in srgb, var(--panel) 8.24%, transparent);
}
.about h2 {
  font-size: clamp(1.6rem, 2.8vw, 2.1rem);
  line-height: 1.5;
}
.about-copy p:first-child {
  max-width: 28em;
  margin: 0;
  color: var(--muted);
  font: 16px/1.95 var(--sans);
}
@media (max-width: 800px) {
  .reading-room,
  .reading-section,
  .novel-section {
    padding: 32px 0;
  }
  .section-heading {
    gap: 12px;
  }
  .archive-paper {
    padding: 20px;
  }
  .reading-feature {
    grid-template-columns: 1fr;
  }
  .reading-feature-main {
    padding: 20px;
  }
  .reading-feature-meta {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    border-left: 0;
    border-top: 1px solid var(--line);
    padding: 12px 20px;
  }
  .reading-feature-meta b {
    font-size: 1.6rem;
  }
  .about {
    padding: 32px 24px;
    gap: 20px;
  }
  .about:before {
    left: 24px;
  }
}

/* Keep the hero words distinct after removing the subtitle. */
.daily-section {
  padding-block: 48px;
  border-top: 1px solid var(--line);
}
.daily-feature {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 32px;
  padding: 28px;
  background: var(--surface);
  border: 1px solid var(--line);
}
.daily-feature h3 {
  font-size: clamp(22px, 3vw, 30px);
  line-height: 1.5;
  margin: 12px 0;
}
.daily-feature h3 a {
  color: var(--ink);
  text-decoration: none;
}
.daily-excerpt {
  font:
    20px/1.75 Georgia,
    serif;
  color: var(--ink);
  max-width: 65ch;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
}
.daily-intro {
  font: 17px/1.8 system-ui;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}
.daily-actions {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: 18px;
}
.daily-actions > a {
  color: var(--accent);
}
.daily-open {
  display: inline-flex;
  align-items: center;
  gap: 20px;
  padding: 18px 22px;
  border: 1px solid var(--accent);
  background: var(--panel);
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}
.archive-pagination {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 20px 0;
  font: 14px/1.6 system-ui;
}
.archive-pagination[hidden] {
  display: none;
}
.archive-pagination button {
  min-width: 40px;
  min-height: 40px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
}
.archive-pagination button[aria-current='page'] {
  border-color: var(--accent);
  background: var(--panel);
  font-weight: 700;
}
.archive-pagination button:disabled {
  opacity: 0.45;
  cursor: default;
}
.page-numbers {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.pagination-summary {
  margin-inline-start: auto;
  color: var(--muted);
}
#articles-title {
  scroll-margin-top: 90px;
}
@media (max-width: 600px) {
  .daily-excerpt {
    font-size: 19px;
  }
  .daily-feature {
    grid-template-columns: 1fr;
    padding: 20px;
    gap: 16px;
  }
  .daily-actions {
    flex-direction: row;
    align-items: center;
    flex-wrap: wrap;
  }
  .daily-open {
    padding: 14px 18px;
  }
  .archive-pagination button {
    padding: 8px;
  }
  .pagination-summary {
    width: 100%;
    margin: 0;
  }
}
.intro .hero-copy {
  padding-top: 56px;
  padding-bottom: 48px;
}
.intro .hero-copy .eyebrow {
  margin-bottom: 28px;
}
.intro-quote {
  margin-top: 36px;
  margin-bottom: 0;
  line-height: 1.75;
}
.hero-copy .enter-link {
  margin-top: 32px;
}
@media (max-width: 800px) {
  .intro .hero-copy {
    padding-top: 36px;
    padding-bottom: 48px;
  }
  .intro .hero-copy .eyebrow {
    margin-bottom: 24px;
  }
  .intro-quote {
    margin-top: 28px;
  }
  .hero-copy .enter-link {
    margin-top: 28px;
  }
}

/* A compact index of the public archive, following the selected seasonal palette. */
#archive .archive-filters {
  display: block;
  padding-bottom: 16px;
}
.archive-tag-toolbar {
  display: flex;
  align-items: flex-start;
  gap: 10px 14px;
  flex-wrap: wrap;
}
.archive-tag-label {
  color: var(--muted);
  font: 12px/44px var(--sans);
  flex: 0 0 auto;
}
#archive .archive-tag-toolbar .tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  flex: 1 1 420px;
  margin: 0;
  min-width: 0;
}
#archive .tag-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 44px;
  padding: 6px 12px;
  margin: 0;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  font: 13px/1.6 var(--sans);
  max-width: 100%;
  overflow-wrap: anywhere;
  cursor: pointer;
}
#archive .tag-button small {
  color: var(--muted);
  font-size: 11px;
  flex: 0 0 auto;
}
#archive .tag-button:hover,
#archive .tag-button[aria-pressed='true'] {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--panel);
}
#archive .tag-button[aria-pressed='true'] {
  font-weight: 600;
}
.tag-index-toggle,
#tag-index-close {
  min-height: 44px;
  padding: 6px 10px;
  border: 0;
  background: transparent;
  color: var(--accent);
  font: 13px/1.6 var(--sans);
  cursor: pointer;
}
.tag-index-toggle {
  border-bottom: 1px solid var(--line);
  flex: 0 0 auto;
}
.tag-index-toggle::after {
  content: '⌄';
  padding-left: 7px;
}
.tag-index-toggle[aria-expanded='true']::after {
  content: '⌃';
}
.archive-tag-index {
  margin: 14px 0 0;
  padding: 16px;
  border: 1px solid var(--line);
  background: var(--surface);
}
.archive-tag-index[hidden] {
  display: none;
}
.tag-index-heading {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  justify-content: space-between;
}
.tag-index-heading label {
  display: grid;
  gap: 7px;
  flex: 1;
  max-width: 400px;
  min-width: 0;
  color: var(--muted);
  font: 12px/1.5 var(--sans);
}
#tag-search {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  min-height: 44px;
  padding: 9px 12px;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
  font: 14px/1.5 var(--sans);
}
.tag-index-status {
  margin: 12px 0;
  color: var(--muted);
  font: 12px/1.6 var(--sans);
}
.tag-index-list {
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: 8px;
  max-height: 280px;
  overflow: auto;
  padding: 3px;
  scrollbar-width: thin;
}
.tag-index-empty {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}
.archive-filter-status {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  margin-top: 12px;
}
.archive-conditions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
}
.archive-conditions:empty {
  display: none;
}
.archive-conditions button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  max-width: 100%;
  min-height: 36px;
  padding: 5px 9px;
  overflow-wrap: anywhere;
  border: 1px solid var(--line);
  color: var(--accent);
  background: var(--panel);
  font: 12px/1.6 var(--sans);
  cursor: pointer;
}
#archive .archive-filter-status .filter-reset {
  margin: 0;
  padding: 5px 8px;
  min-height: 36px;
  border: 0;
  background: transparent;
}
#archive .archive-filter-status .filter-summary {
  margin: 0 0 0 auto;
  font: 12px/1.6 var(--sans);
  color: var(--muted);
}
#archive
  :is(
    .tag-button,
    .tag-index-toggle,
    #tag-index-close,
    .archive-conditions button,
    #tag-search
  ):focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
@media (max-width: 800px) {
  .archive-tag-toolbar {
    gap: 8px;
  }
  .archive-tag-label {
    flex-basis: 100%;
    line-height: 1.6;
  }
  #archive .archive-tag-toolbar .tag-list {
    flex-basis: 100%;
  }
  .tag-index-toggle {
    margin-left: auto;
  }
  .archive-tag-index {
    padding: 12px;
  }
  .tag-index-list {
    max-height: min(280px, 45dvh);
  }
  #archive .archive-filter-status .filter-summary {
    margin-left: 0;
  }
}

.site-footer .footer-filings {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 4px 16px;
  padding: 0 12px 22px;
  font: 12px/1.8 var(--sans);
}
.site-footer .icp-record {
  margin: 0;
}
.site-footer .public-security-record {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.article-search-hint {
  margin: -12px 0 20px;
  color: var(--muted);
  font-size: 12px;
}
#about {
  scroll-margin-top: 20px;
}

/* Favorites form one shelf; content titles are the only item headings. */
.favorites-section,
.my-games-section {
  padding: 48px 0;
  border-top: 1px solid var(--line);
  scroll-margin-top: 20px;
}
.favorite-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 32px;
  border-top: 1px solid var(--line);
}
.favorite-group {
  display: grid;
  min-width: 0;
  scroll-margin-top: 24px;
}
.favorite-group > .novel-cards,
.favorite-group > #home-readings {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
}
.favorite-grid .favorite-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
  min-height: 200px;
  margin: 0;
  padding: 24px 4px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  text-decoration: none;
  overflow-wrap: anywhere;
}
.favorite-card-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}
.favorite-grid .favorite-card h3 {
  margin: 0;
  font: 600 clamp(1.25rem, 2vw, 1.5rem)/1.5 var(--serif);
}
.favorite-icon {
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  color: var(--accent);
  opacity: 0.85;
}
.favorite-grid .favorite-card p {
  margin: 0;
  max-width: 34em;
  color: var(--muted);
  font: 14px/1.85 var(--sans);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.favorite-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-top: auto;
  padding-top: 8px;
}
.favorite-grid .favorite-card-footer span {
  color: var(--muted);
  font: 12px/1.6 var(--sans);
}
.favorite-grid .favorite-card-footer > span:last-child {
  color: var(--accent);
  font-weight: 600;
  white-space: nowrap;
}
.favorite-grid .favorite-card:hover h3 {
  text-decoration: underline;
  text-underline-offset: 6px;
  text-decoration-thickness: 1px;
}
.favorite-grid .favorite-card:hover .favorite-icon {
  opacity: 1;
}
.favorite-card:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

/* Discoveries share the same section rhythm as the rest of the homepage. */
.discovery-heading {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px 18px;
}
.discovery-preview-date {
  color: var(--muted);
  font:
    400 12px/1.6 ui-monospace,
    Consolas,
    monospace;
  font-variant-numeric: tabular-nums;
}
#discoveries-preview .favorite-card {
  min-height: 0;
  gap: 10px;
  padding: 20px 4px;
}
#discoveries-preview .favorite-card-heading {
  align-items: baseline;
  flex-wrap: wrap;
  gap: 10px 16px;
}
#discoveries-preview h3 {
  min-width: 0;
  font: 600 clamp(1.1rem, 1.7vw, 1.3rem)/1.5 var(--serif);
}
.discovery-preview-category {
  flex: 0 0 auto;
  color: var(--muted);
  font: 12px/1.6 var(--sans);
}
@media (max-width: 560px) {
  .discovery-heading {
    gap: 4px 12px;
  }
}

/* The two authored worlds lead; the four classics sit on a compact shared rail. */
.my-games-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}
.my-game {
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: var(--surface);
  border: 1px solid var(--line);
}
.my-game-cover {
  display: block;
  overflow: hidden;
  aspect-ratio: 16/9;
  background: var(--panel);
}
.my-game-cover img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.my-game-copy {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: flex-start;
  padding: 20px 24px 16px;
}
.my-game-copy h3 {
  margin: 0 0 8px;
  font: 600 clamp(1.2rem, 2vw, 1.5rem)/1.5 var(--serif);
  color: var(--ink);
}
.my-game-copy p {
  margin: 0 0 16px;
  max-width: 38em;
  font: 14px/1.85 var(--sans);
  color: var(--muted);
}
.my-game-start {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  margin-top: auto;
  padding: 8px 16px;
  border: 1px solid var(--line);
  color: var(--accent);
  font: 600 13px/1.5 var(--sans);
  text-decoration: none;
}
.my-game-start:hover {
  background: var(--panel);
  border-color: var(--accent);
}
.my-games-section a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}
.my-game-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
.classic-games {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  margin-top: 24px;
  border: 1px solid var(--line);
}
.classic-games .game-tool-link {
  width: auto;
  min-width: 0;
  min-height: 64px;
  padding: 16px 8px;
  border: 0;
  border-right: 1px solid var(--line);
  background: transparent;
  font: 600 14px/1.5 var(--serif);
}
.classic-games .game-tool-link:last-child {
  border-right: 0;
}
.classic-games .game-tool-link:hover {
  background: var(--panel);
}
@media (max-width: 800px) {
  .favorites-section,
  .my-games-section {
    padding: 32px 0;
  }
  .favorite-grid {
    column-gap: 24px;
  }
  .favorite-grid .favorite-card {
    min-height: 190px;
    padding-block: 20px;
  }
  .my-games-list {
    gap: 16px;
  }
  .my-game-copy {
    padding: 18px 18px 16px;
  }
  .classic-games {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 16px;
  }
  .classic-games .game-tool-link {
    min-height: 56px;
  }
  .classic-games .game-tool-link:nth-child(2n) {
    border-right: 0;
  }
  .classic-games .game-tool-link:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }
}
@media (max-width: 560px) {
  .favorite-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .favorite-grid .favorite-card {
    min-height: 162px;
    padding: 20px 2px;
  }
  .my-games-list {
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
  }
  .my-game-cover {
    aspect-ratio: 2/1;
  }
  .my-game-copy p {
    margin-bottom: 12px;
  }
}

/* Homepage shelves use space and seasonal surfaces instead of divider rules.
   Scope these changes to the homepage: discovery readers share the base cards. */
body:has(.intro) main > :is(.reading-room, .daily-section, .my-games-section, .favorites-section) {
  padding-block: 40px;
  border: 0;
  border-top: 1px solid var(--line);
}
body:has(.intro) main > section > .section-heading {
  align-items: center;
  margin-bottom: 24px;
}
body:has(.intro) main > section > .section-heading h2 {
  font-size: clamp(1.5rem, 2.5vw, 1.75rem);
  line-height: 1.5;
  letter-spacing: 0;
}
.section-note {
  margin: 0;
  color: var(--muted);
  font: 14px/1.7 var(--serif);
  text-align: right;
}
.section-note[lang='en'] {
  font-family: Georgia, serif;
}
.section-note span {
  white-space: nowrap;
}
.discoveries-more {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  margin-top: 12px;
  color: var(--accent);
  font: 500 13px/1.6 var(--sans);
  text-decoration: none;
}
.discoveries-more:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}
#discoveries .section-heading {
  flex-direction: row;
}
#discoveries .section-heading > .text-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  flex-shrink: 0;
  padding-block: 8px;
  border: 0;
  font: 500 13px/1.6 var(--sans);
}
:is(#discoveries, #favorites) .favorite-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  border: 0;
}
:is(#discoveries, #favorites) .favorite-card {
  padding: 24px;
  border: 0;
  border-radius: 12px;
  background: var(--surface);
}
#favorites .favorite-card {
  min-height: 216px;
}
#favorites :is(.favorite-group, .novel-cards, #home-readings) {
  gap: 20px;
}
#discoveries-preview .favorite-card {
  gap: 12px;
}
#discoveries-preview h3,
#favorites .favorite-card h3 {
  font: 600 1.25rem/1.5 var(--serif);
}
:is(#discoveries, #favorites) .favorite-card:hover {
  background: var(--panel);
}
body:has(.intro) :is(.daily-feature, .my-game, .classic-games) {
  border: 0;
  border-radius: 12px;
}
body:has(.intro) .my-game-cover {
  border-radius: 12px 12px 0 0;
}
body:has(.intro) .classic-games {
  gap: 12px;
  background: transparent;
}
body:has(.intro) .classic-games .game-tool-link {
  border: 0;
  border-radius: 8px;
  background: var(--surface);
}
body:has(.intro) .classic-games .game-tool-link:hover {
  background: var(--panel);
}
@media (max-width: 1000px) {
  :is(#discoveries, #favorites) .favorite-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 800px) {
  body:has(.intro)
    main
    > :is(.reading-room, .daily-section, .my-games-section, .favorites-section) {
    padding-block: 28px;
  }
  body:has(.intro) main > section > .section-heading {
    align-items: flex-start;
    margin-bottom: 20px;
  }
  #discoveries .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }
  .section-note {
    text-align: left;
  }
  :is(#discoveries, #favorites) .favorite-grid {
    gap: 16px;
  }
  :is(#discoveries, #favorites) .favorite-card {
    padding: 20px;
  }
}
@media (max-width: 560px) {
  :is(#discoveries, #favorites) .favorite-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }
  #favorites .favorite-card {
    min-height: 180px;
  }
}

/* The homepage keeps its layout; only its navigation remains within reach. */
body:has(.intro) .site-header:has(.site-nav) {
  position: sticky;
  top: 0;
  z-index: 40;
}
body:has(.intro) :is(main > section, #fiction, #reading, #tools, #about) {
  scroll-margin-top: 96px;
}
@media (max-width: 800px) {
  body:has(.intro) .site-header:has(.site-nav) {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0;
    top: -60px;
    min-height: 108px;
    padding-block: 0;
  }
  body:has(.intro) .site-header > .brand {
    grid-column: 1;
    grid-row: 1;
    height: 60px;
  }
  body:has(.intro) .site-header > .theme-entry {
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
  }
  body:has(.intro) .site-header > .site-nav.nav-ready {
    display: block;
    grid-column: 1/-1;
    grid-row: 2;
    width: 100%;
    margin: 0;
  }
  body:has(.intro) .site-header .site-nav.nav-ready .site-nav-toggle {
    display: none;
  }
  body:has(.intro) .site-header .site-nav.nav-ready .site-nav-links {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    position: static;
    gap: 0;
    width: 100%;
    max-height: none;
    overflow: visible;
    padding: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    background: none;
  }
  body:has(.intro) .site-header .site-nav-links > a {
    display: flex;
    justify-content: center;
    min-height: 48px;
    padding: 8px 12px;
  }
  body:has(.intro) :is(main > section, #fiction, #reading, #tools, #about, #articles-title) {
    scroll-margin-top: 64px;
  }
}

/* Source: music.css */
.home-music {
  max-width: 420px;
  margin-top: 32px;
  color: var(--ink);
}
.music-label {
  margin: 0 0 12px;
  color: var(--muted);
  font: 12px/1.5 var(--sans);
  letter-spacing: 0.16em;
}
.music-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 12px 10px 10px;
  border: 1px solid var(--panel);
  border-radius: 60px;
  background: linear-gradient(
    120deg,
    color-mix(in srgb, var(--surface) 90.98%, transparent),
    color-mix(in srgb, var(--surface) 90.98%, transparent)
  );
  box-shadow: 0 8px 26px color-mix(in srgb, var(--ink) 4.31%, transparent);
  transition:
    box-shadow 0.3s,
    border-color 0.3s;
}
.music-bar:hover {
  border-color: var(--accent);
  box-shadow: 0 10px 28px color-mix(in srgb, var(--ink) 9.02%, transparent);
}
.music-toggle {
  position: relative;
  display: grid;
  place-items: center;
  flex: 0 0 48px;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--ink);
  color: var(--on-accent);
  cursor: pointer;
  isolation: isolate;
  transition: transform 0.2s;
}
.music-toggle:hover {
  transform: scale(1.06);
}
.music-toggle:active {
  transform: scale(0.95);
}
.music-toggle:before {
  content: '';
  position: absolute;
  z-index: -1;
  inset: 3px;
  border: 1px solid color-mix(in srgb, var(--line) 43.92%, transparent);
  border-radius: 50%;
  box-shadow:
    inset 0 0 0 5px var(--ink),
    inset 0 0 0 6px color-mix(in srgb, var(--line) 25.1%, transparent);
}
.music-toggle svg {
  width: 17px;
  height: 17px;
  fill: currentColor;
}
.music-toggle .pause-icon {
  display: none;
}
.is-playing .music-toggle .play-icon {
  display: none;
}
.is-playing .music-toggle .pause-icon {
  display: block;
}
.music-title {
  min-width: 0;
  flex: 1;
}
.music-title strong {
  display: block;
  font: 600 18px/1.5 var(--serif);
}
.music-title small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font: 10px/1.5 var(--sans);
}
.music-expand {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 8px;
  border: 0;
  background: transparent;
  color: var(--accent-text);
  font: 12px var(--sans);
  cursor: pointer;
  white-space: nowrap;
}
.music-visual {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  flex-shrink: 0;
  min-height: 44px;
  padding: 4px;
  color: var(--accent-text);
  font: 12px var(--sans);
  text-decoration: none;
  white-space: nowrap;
}
.music-visual span {
  font-size: 17px;
  transition: transform 0.2s;
}
.music-visual:hover span {
  transform: translate(2px, -2px);
}
.music-visual:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
  border-radius: 4px;
}
.music-wave {
  display: flex;
  align-items: center;
  gap: 3px;
  height: 18px;
  width: 21px;
}
.music-wave i {
  display: block;
  width: 3px;
  height: 13px;
  border-radius: 2px;
  background: var(--accent);
  transform: scaleY(0.3);
  animation: music-wave 0.8s ease-in-out infinite alternate;
  animation-play-state: paused;
}
.music-wave i:nth-child(2) {
  animation-delay: -0.5s;
}
.music-wave i:nth-child(3) {
  animation-delay: -0.2s;
}
.music-wave i:nth-child(4) {
  animation-delay: -0.65s;
}
.is-playing .music-wave i {
  animation-play-state: running;
}
.music-line {
  height: 24px;
  margin: 12px 0 0 24px;
  color: var(--accent-text);
  font: 13px/1.8 var(--serif);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.music-line[hidden] {
  display: block;
  visibility: hidden;
}
.music-panel {
  width: min(620px, calc(100% - 40px));
  max-height: calc(100dvh - 40px);
  margin: auto;
  padding: 28px;
  border: 1px solid var(--panel);
  border-radius: 24px;
  color: var(--ink);
  background: radial-gradient(ellipse at 100% 0, var(--panel), transparent 55%), var(--surface);
  box-shadow: 0 28px 100px color-mix(in srgb, var(--ink) 25.1%, transparent);
  overflow-y: auto;
  overscroll-behavior: contain;
}
.music-panel[open] {
  animation: music-panel-in 0.35s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.music-panel::backdrop {
  background: color-mix(in srgb, var(--ink) 31.37%, transparent);
  backdrop-filter: blur(8px);
  animation: music-backdrop-in 0.3s ease both;
}
html:has(.home-music) {
  scrollbar-gutter: stable;
  overflow-x: clip;
}
html.music-open {
  overflow: hidden;
  scroll-behavior: auto;
}
.music-panel-heading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
}
.music-panel-kicker {
  margin: 0 0 6px;
  color: var(--muted);
  font: 10px/1.5 var(--sans);
  letter-spacing: 0.15em;
}
.music-panel h2 {
  margin: 0;
  font: 600 28px/1.4 var(--serif);
}
.music-close {
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--muted);
  background: var(--surface);
  font: 24px/1 var(--sans);
  cursor: pointer;
  transition:
    transform 0.2s,
    background 0.2s;
}
.music-close:hover {
  transform: rotate(90deg);
  background: var(--panel);
}
.music-stage {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  align-items: center;
  gap: 24px;
  margin: 24px 0;
}
.music-record {
  position: relative;
  width: 142px;
  height: 142px;
  border: 8px solid var(--ink);
  border-radius: 50%;
  background: repeating-radial-gradient(circle, var(--accent) 0 2px, var(--ink) 3px 4px);
  box-shadow: 0 8px 20px color-mix(in srgb, var(--ink) 12.55%, transparent);
  animation: music-record-turn 18s linear infinite;
  animation-play-state: paused;
}
.music-record:before {
  content: '';
  position: absolute;
  inset: 27px;
  border: 1px solid var(--panel);
  border-radius: 50%;
  background:
    linear-gradient(
      color-mix(in srgb, var(--surface) 50.2%, transparent),
      color-mix(in srgb, var(--surface) 50.2%, transparent)
    ),
    url('assets/linlin-misty-mountains-v1.webp') center / cover;
}
.music-record:after {
  content: '';
  position: absolute;
  inset: calc(50% - 5px);
  border-radius: 50%;
  background: var(--ink);
  box-shadow: 0 0 0 3px var(--surface);
}
.is-playing .music-record {
  animation-play-state: running;
}
.music-stage-copy {
  color: var(--muted);
  font: 13px/1.8 var(--sans);
}
.music-stage-copy p {
  margin: 0 0 12px;
}
.music-panel-toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  border: 1px solid var(--panel);
  border-radius: 24px;
  background: var(--surface);
  color: var(--accent-text);
  font: 12px var(--sans);
  cursor: pointer;
}
.music-lyrics {
  margin: 0 0 20px;
}
.music-lyrics-note {
  margin: 0 0 8px;
  color: var(--muted);
  font: 11px/1.7 var(--sans);
}
.music-lyric-list {
  position: relative;
  max-height: 210px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
  padding: 16px 4px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.music-lyric-list button {
  display: block;
  width: 100%;
  min-height: 44px;
  padding: 10px 6px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font: 16px/1.7 var(--serif);
  text-align: center;
  cursor: pointer;
  overflow-wrap: anywhere;
  transition:
    color 0.3s,
    background 0.3s,
    transform 0.3s;
}
.music-lyric-list button:hover {
  color: var(--accent-text);
  background: color-mix(in srgb, var(--surface) 50.2%, transparent);
}
.music-lyric-list button[aria-current='true'] {
  color: var(--muted);
  background: var(--panel);
  transform: scale(1.025);
  font-weight: 600;
}
.music-time {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font: 11px var(--sans);
  font-variant-numeric: tabular-nums;
}
.music-panel input[type='range'] {
  display: block;
  width: 100%;
  height: 32px;
  margin: 4px 0;
  appearance: none;
  background: transparent;
  cursor: pointer;
  accent-color: var(--accent);
}
.music-panel input[type='range']::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: 4px;
  background: linear-gradient(
    to right,
    var(--accent) var(--fill, 0%),
    var(--panel) var(--fill, 0%)
  );
}
.music-panel input[type='range']::-moz-range-track {
  height: 4px;
  border-radius: 4px;
  background: var(--panel);
}
.music-panel input[type='range']::-moz-range-progress {
  height: 4px;
  background: var(--accent);
}
.music-panel input[type='range']::-webkit-slider-thumb {
  appearance: none;
  width: 12px;
  height: 12px;
  margin-top: -4px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 8.24%, transparent);
}
.music-panel input[type='range']::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border: 0;
  border-radius: 50%;
  background: var(--accent);
}
.music-panel input:disabled {
  opacity: 0.45;
  cursor: default;
}
.music-panel-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 6px;
}
.music-volume {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font: 11px var(--sans);
}
.music-volume input[type='range'] {
  width: 80px;
}
.music-credits {
  color: var(--muted);
  font: 10px/1.8 var(--sans);
}
.music-credits summary {
  cursor: pointer;
  min-height: 32px;
  display: flex;
  align-items: center;
}
.music-credits p {
  margin: 2px 0;
}
.music-panel-footer:has(.music-credits[open]) {
  flex-wrap: wrap;
  align-items: start;
}
.music-panel-footer .music-credits[open] {
  flex-basis: 100%;
}
.music-panel button:focus-visible,
.home-music button:focus-visible,
.music-panel input:focus-visible,
.music-credits summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}
@keyframes music-wave {
  to {
    transform: scaleY(1);
  }
}
.music-computer-audio {
  margin: 18px 0;
  padding: 14px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.music-computer-audio button {
  padding: 9px 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  cursor: pointer;
}
.music-computer-audio button[aria-pressed='true'] {
  border-color: var(--accent);
  color: var(--accent);
}
.music-computer-audio button:disabled {
  opacity: 0.6;
  cursor: default;
}
.music-computer-audio p {
  margin: 8px 0 0;
  font-size: 12px;
  line-height: 1.7;
  color: var(--muted);
}
.music-computer-audio #computer-audio-status:empty {
  display: none;
}
@keyframes music-record-turn {
  to {
    transform: rotate(360deg);
  }
}
@keyframes music-panel-in {
  from {
    opacity: 0;
    transform: translateY(22px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes music-backdrop-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
@media (max-width: 600px) {
  .home-music {
    max-width: 340px;
    margin-top: 28px;
  }
  .music-bar {
    gap: 8px;
  }
  .music-bar > .music-wave {
    display: none;
  }
  .music-expand {
    gap: 4px;
    padding: 4px;
  }
  .music-panel {
    width: 100vw;
    max-width: 520px;
    margin: auto auto 0;
    max-height: calc(100dvh - 20px);
    padding: 22px 20px max(20px, env(safe-area-inset-bottom));
    border-radius: 24px 24px 0 0;
  }
  .music-stage {
    grid-template-columns: 106px minmax(0, 1fr);
    gap: 20px;
    margin: 18px 0;
  }
  .music-record {
    width: 100px;
    height: 100px;
    border-width: 6px;
  }
  .music-record:before {
    inset: 18px;
  }
  .music-lyric-list {
    max-height: min(210px, 28dvh);
  }
  .music-lyric-list button {
    font-size: 15px;
  }
}
@media (max-height: 600px) {
  .music-stage {
    margin: 12px 0;
    grid-template-columns: 80px minmax(0, 1fr);
  }
  .music-record {
    width: 70px;
    height: 70px;
    border-width: 4px;
  }
  .music-record:before {
    inset: 12px;
  }
  .music-stage-copy p {
    display: none;
  }
  .music-lyric-list {
    max-height: 26dvh;
  }
}
@media (prefers-reduced-motion: reduce) {
  .home-music *,
  .music-panel *,
  .music-panel[open],
  .music-panel::backdrop {
    animation: none !important;
    transition: none !important;
  }
}

/* Source: music-landscape.css */
.landscape-music-water {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.landscape .landscape-image,
.landscape.is-moving .landscape-image {
  animation: none;
  transform: none;
}
.landscape .landscape-mist,
.landscape.is-moving .landscape-mist {
  animation: none;
  transition:
    transform 1.2s ease-out,
    opacity 1.2s ease-out;
}
@media (prefers-reduced-motion: reduce) {
  .landscape-music-water {
    display: none;
  }
  .landscape.is-music-reactive .landscape-image,
  .landscape.is-music-reactive .landscape-mist {
    transform: none;
    transition: none;
  }
}

/* Source: weather.css */
/* Seasonal paper tones, with weather confined to the landscape. */
body[data-season] {
  --paper: var(--season-paper);
  --accent: var(--season-accent);
  background:
    radial-gradient(ellipse at 85% 0, var(--season-glow), transparent 38%), var(--season-paper);
  transition: background-color 1s;
}
body[data-season] {
  --accent-text: var(--season-accent);
  --archive-blue: var(--season-accent);
  --archive-wash: var(--season-card);
}
body[data-season] .site-header {
  background: color-mix(in srgb, var(--season-paper) 96%, transparent);
}
body[data-season] .site-header nav a {
  color: var(--ink);
  font-weight: 600;
}
body[data-season] .site-header nav a:hover,
body[data-season] .site-header nav a.active {
  color: var(--season-accent);
}
body[data-season] .archive-card-text,
body[data-season] .archive-orbit b {
  color: var(--ink);
}
body[data-season] :is(.music-title strong, .music-expand, .music-panel h2) {
  color: var(--ink);
}
body[data-season] :is(.music-label, .music-title small) {
  color: var(--muted);
}
body[data-season] .music-bar {
  background: var(--surface);
  border-color: var(--line);
}
body[data-season] .weather-credit a {
  color: var(--season-accent);
}
body[data-season] .intro .archive-stamp {
  color: var(--season-accent);
  border-color: var(--season-accent);
}
body[data-season] .handwritten-mark svg {
  stroke: var(--season-accent);
}
body[data-season] :is(.archive-excerpt, .living-post .post-meta, .drawer-content dt) {
  color: var(--muted);
}
body[data-season] .archive-paper {
  background: linear-gradient(120deg, var(--surface) 68%, var(--season-card));
}
body[data-season] .archive-drawer {
  background: var(--season-paper);
}
body[data-season] .music-toggle {
  background: var(--ink);
}
/* Legacy component colours must follow the same seasonal tokens, including hover. */
body[data-season] #categories .category-button small {
  color: var(--muted);
}
body[data-season] .filter-summary {
  color: var(--muted);
}
body[data-season] .archive-map {
  background: var(--surface);
}
body[data-season] .tag {
  color: var(--season-accent);
  background: var(--panel);
}
body[data-season] .tag-button:hover {
  color: var(--ink);
  background: var(--panel);
}
body[data-season] :is(.novel-card, .reading-feature):hover {
  color: var(--ink);
  background: var(--panel);
  border-color: var(--season-accent);
}
body[data-season] .about {
  color: var(--ink);
  background:
    radial-gradient(ellipse at 100% 0, var(--season-glow), transparent 55%),
    linear-gradient(130deg, var(--surface), var(--season-paper));
}
body[data-season] .about-copy {
  color: var(--muted);
}
body[data-season] .about:after {
  border-color: var(--line);
  box-shadow:
    0 0 0 24px color-mix(in srgb, var(--line) 12%, transparent),
    0 0 0 48px color-mix(in srgb, var(--line) 8%, transparent);
}
body[data-season] .game-tool-link {
  background: var(--surface);
}
body[data-season] :is(.game-tool-link, .footer-social-link):hover {
  color: var(--ink);
  background: var(--panel);
}
body[data-season] :is(.game-tool-icon, .tetris-tool-icon) i {
  background: var(--season-accent);
}
body[data-season] .game-tool-icon i:nth-child(1),
body[data-season] .game-tool-icon i:nth-child(4) {
  background: var(--muted);
}
body[data-season] .white-tiles-tool-icon i {
  border-color: var(--season-accent);
}
body[data-season] .white-tiles-tool-icon i:nth-child(3) {
  background: var(--ink);
  border-color: var(--ink);
}
body[data-season] .minesweeper-tool-icon:before {
  background: var(--ink);
  box-shadow:
    0 -5px 0 -2px var(--season-accent),
    0 5px 0 -2px var(--season-accent),
    5px 0 0 -2px var(--season-accent),
    -5px 0 0 -2px var(--season-accent),
    3.5px 3.5px 0 -2px var(--season-accent),
    -3.5px -3.5px 0 -2px var(--season-accent),
    3.5px -3.5px 0 -2px var(--season-accent),
    -3.5px 3.5px 0 -2px var(--season-accent);
}
body[data-season] .minesweeper-tool-icon:after {
  background: var(--muted);
}
body[data-season] .archive-orbit i {
  border-color: color-mix(in srgb, var(--season-accent) 45%, transparent);
}
body[data-season] .intro .archive-card:before {
  background: repeating-linear-gradient(
    135deg,
    transparent 0 23px,
    var(--season-accent) 24px 25px,
    transparent 26px 48px
  );
}
body[data-season] .intro .archive-card:after {
  border-color: var(--line);
}
body[data-season] .music-toggle:before {
  border-color: var(--line);
  box-shadow:
    inset 0 0 0 5px var(--ink),
    inset 0 0 0 6px var(--season-accent);
}
body[data-season] .intro .archive-card {
  background: linear-gradient(
    145deg,
    color-mix(in srgb, var(--surface) 89.02%, transparent),
    var(--season-card)
  );
  border-color: var(--season-glow);
}
body[data-season] .intro .archive-card-top,
body[data-season] .intro .archive-card-foot,
body[data-season] .intro .archive-card-label {
  color: var(--season-accent);
}
body[data-season] .landscape-wash {
  background:
    linear-gradient(
      90deg,
      color-mix(in srgb, var(--season-paper) 72%, transparent),
      color-mix(in srgb, var(--season-paper) 34%, transparent) 47%,
      transparent 82%
    ),
    linear-gradient(
      180deg,
      color-mix(in srgb, var(--surface) 12.55%, transparent),
      transparent 42%,
      color-mix(in srgb, var(--season-paper) 35%, transparent)
    );
}
.landscape-weather {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 2;
}
.weather-light {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: transparent;
  transition: background 1.5s;
}
body[data-weather='clear'] .weather-light {
  background: radial-gradient(
    ellipse at 75% 12%,
    color-mix(in srgb, var(--season-glow) 52%, transparent),
    transparent 64%
  );
}
body[data-weather='clear']:not([data-night='true']) .weather-light {
  background-size: 120% 120%;
  animation: weather-sunlight 24s ease-in-out infinite alternate;
}
@keyframes weather-sunlight {
  from {
    background-position: 20% 20%;
    opacity: 0.64;
  }
  to {
    background-position: 80% 45%;
    opacity: 1;
  }
}
html[data-effects='false'] .weather-light {
  animation: none;
}
body[data-weather='cloud'] .weather-light {
  background: linear-gradient(
    150deg,
    color-mix(in srgb, var(--line) 16.86%, transparent),
    color-mix(in srgb, var(--panel) 3.92%, transparent)
  );
}
body[data-weather='rain'] .weather-light,
body[data-weather='storm'] .weather-light {
  background: linear-gradient(
    160deg,
    color-mix(in srgb, var(--line) 27.45%, transparent),
    color-mix(in srgb, var(--panel) 13.33%, transparent)
  );
}
body[data-weather='fog'] .weather-light {
  background: radial-gradient(
    ellipse at 60% 62%,
    color-mix(in srgb, var(--surface) 75.29%, transparent),
    color-mix(in srgb, var(--surface) 18.82%, transparent) 70%
  );
}
body[data-weather='snow'] .weather-light {
  background: linear-gradient(
    155deg,
    color-mix(in srgb, var(--panel) 25.1%, transparent),
    color-mix(in srgb, var(--surface) 14.51%, transparent)
  );
}
body[data-night='true'] .weather-light {
  background-color: color-mix(in srgb, var(--accent) 15.69%, transparent);
}
.home-weather {
  margin-top: 12px;
  font-family: var(--sans);
}
.home-weather > button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  max-width: 100%;
  padding: 8px 13px;
  border: 1px solid var(--season-glow, var(--panel));
  border-radius: 24px;
  background: color-mix(in srgb, var(--surface) 70.2%, transparent);
  color: var(--ink);
  cursor: pointer;
  font: 13px var(--sans);
  text-align: left;
}
.home-weather > button {
  height: 44px;
  line-height: 20px;
}
#weather-icon {
  font-size: 20px;
  line-height: 20px;
  height: 20px;
  color: var(--season-accent, var(--muted));
}
.weather-settings {
  color: var(--season-accent, var(--muted));
}
.home-weather > small {
  display: block;
  margin: 5px 0 0 12px;
  font-size: 11px;
  color: var(--muted);
}
.weather-panel {
  box-sizing: border-box;
  width: min(440px, calc(100% - 32px));
  max-height: calc(100dvh - 40px);
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--season-paper, var(--surface));
  color: var(--ink);
  box-shadow: 0 24px 80px color-mix(in srgb, var(--ink) 18.82%, transparent);
  font: 14px var(--sans);
}
.weather-panel::backdrop {
  background: color-mix(in srgb, var(--ink) 40%, transparent);
  backdrop-filter: blur(5px);
}
.weather-panel-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.weather-panel h2 {
  margin: 0;
  font: 26px var(--serif);
}
.weather-panel .eyebrow {
  font-size: 10px;
}
.weather-panel button {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 12px;
  background: color-mix(in srgb, var(--surface) 65.88%, transparent);
  color: var(--ink);
  font: inherit;
  cursor: pointer;
}
.weather-panel :is(button, input):focus-visible,
.home-weather button:focus-visible {
  outline: 2px solid var(--season-accent, var(--accent));
  outline-offset: 3px;
}
.weather-panel button:disabled {
  opacity: 0.55;
  cursor: wait;
}
.weather-hint,
.weather-credit {
  font-size: 11px;
  line-height: 1.7;
  color: var(--muted);
}
.weather-panel label {
  display: block;
  margin-top: 18px;
  margin-bottom: 7px;
}
.weather-search-row {
  display: flex;
  gap: 8px;
}
.weather-search-row button {
  flex-shrink: 0;
  white-space: nowrap;
}
.weather-panel input[type='search'],
.weather-panel select {
  box-sizing: border-box;
  min-height: 44px;
  min-width: 0;
  width: 100%;
  padding: 9px 10px;
  background: color-mix(in srgb, var(--surface) 74.9%, transparent);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  font: inherit;
}
#weather-search-status {
  font-size: 12px;
}
#weather-results {
  padding: 0;
  margin: 0;
  list-style: none;
  max-height: 180px;
  overflow-y: auto;
}
#weather-results li + li {
  margin-top: 6px;
}
#weather-results button {
  text-align: left;
  width: 100%;
}
#weather-results small {
  display: block;
  color: var(--muted);
  margin-top: 3px;
}
.weather-credit {
  margin-bottom: 0;
}
@media (max-width: 800px) {
  body[data-season] .landscape-wash {
    background: linear-gradient(
      180deg,
      color-mix(in srgb, var(--season-paper) 68%, transparent),
      color-mix(in srgb, var(--season-paper) 25%, transparent) 42%,
      color-mix(in srgb, var(--season-paper) 50%, transparent)
    );
  }
  .weather-panel {
    padding: 20px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .landscape-weather {
    display: none;
  }
  body .weather-light {
    animation: none !important;
  }
  .weather-light,
  body[data-season] {
    transition: none;
  }
}

/* Source: theme.css */
/* Shared theme roles; components consume tokens rather than choose palettes. */
:root {
  --serif: 'Noto Serif SC', 'Songti SC', Georgia, serif;
  --sans: Inter, 'PingFang SC', 'Microsoft YaHei', sans-serif;
}
html {
  background: var(--paper);
}
body {
  background:
    radial-gradient(
      ellipse at 90% 0,
      color-mix(in srgb, var(--season-glow) 65%, transparent),
      transparent 42%
    ),
    var(--paper);
  color: var(--ink);
}
body :is(input, textarea, select) {
  accent-color: var(--accent);
  caret-color: var(--ink);
}
::selection {
  background: var(--panel);
  color: var(--ink);
}
.site-header {
  background: color-mix(in srgb, var(--paper) 94%, transparent);
}
.site-header nav {
  margin-left: auto;
}
.site-header nav a:hover {
  color: var(--accent);
}
.site-header nav a {
  color: var(--ink);
  font: 600 13px/1.75 var(--sans);
}
/* Public navigation remains readable before and after the shared theme mounts. */
.site-header:has(.site-nav) {
  position: relative;
  z-index: 30;
}
.site-header .site-nav {
  position: relative;
  flex: 0 1 auto;
}
.site-nav .site-nav-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 24px;
}
.site-nav .site-nav-links > a,
.site-nav summary {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}
.site-nav summary {
  cursor: pointer;
  list-style: none;
  color: var(--ink);
  font: 600 13px/1.75 var(--sans);
}
.site-nav summary::-webkit-details-marker {
  display: none;
}
.site-nav summary::after {
  content: '⌄';
  margin-left: 6px;
  color: var(--muted);
}
.site-nav-more {
  position: relative;
}
.site-nav-more[open] > summary::after {
  transform: rotate(180deg);
}
.site-nav-more.active > summary {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 7px;
}
.site-nav-extra {
  position: absolute;
  right: 0;
  top: 100%;
  min-width: 132px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  box-shadow: 0 12px 30px #10202c20;
}
.site-header .site-nav-extra a {
  display: flex;
  min-height: 44px;
  padding: 8px 12px;
  white-space: nowrap;
  border-radius: 6px;
}
.site-nav-extra a:hover {
  background: var(--panel);
}
.site-nav-toggle {
  display: none;
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  font: 600 13px/1.5 var(--sans);
  cursor: pointer;
}
.site-nav :focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
@media (max-width: 800px) {
  .site-header .site-nav.nav-ready {
    order: 0;
    flex-basis: auto;
    margin-left: auto;
  }
  .site-nav.nav-ready .site-nav-toggle {
    display: inline-flex;
    align-items: center;
  }
  .site-nav.nav-ready .site-nav-links {
    display: none;
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    width: min(280px, calc(100vw - 32px));
    max-height: calc(100dvh - 120px);
    overflow-y: auto;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--surface);
    box-shadow: 0 12px 30px #10202c20;
  }
  .site-nav.nav-ready.is-open .site-nav-links {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }
  .site-nav .site-nav-links > a,
  .site-nav summary {
    padding: 8px 12px;
  }
  .site-nav-extra {
    position: static;
    padding: 0 0 0 12px;
    border: 0;
    box-shadow: none;
    background: transparent;
  }
}
.theme-entry {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex: 0 0 auto;
  min-height: 38px;
  padding: 7px 11px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--surface);
  color: var(--accent);
  font: 12px/1.5 var(--sans, system-ui);
  letter-spacing: 0.02em;
  cursor: pointer;
}
.theme-entry:hover {
  background: var(--panel);
  color: var(--ink);
  border-color: var(--accent);
}
.theme-entry svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.3;
  stroke-linejoin: round;
}
.theme-admin-bar {
  display: flex;
  justify-content: flex-end;
  max-width: 1600px;
  margin: auto;
  padding: 12px 28px 0;
}
.theme-panel {
  box-sizing: border-box;
  width: min(420px, calc(100% - 28px));
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 24px 80px #10202c38;
  font: 14px/1.65 var(--sans, system-ui);
}
.theme-panel::backdrop {
  background: #10202c70;
  backdrop-filter: blur(4px);
}
.theme-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.theme-heading .eyebrow {
  margin: 0 0 4px;
  color: var(--accent);
  font-size: 10px;
  letter-spacing: 0.15em;
}
.theme-heading h2 {
  margin: 0;
  font: 600 26px/1.5 var(--serif, Georgia);
}
.theme-panel button {
  min-height: 44px;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  padding: 8px 12px;
  font: inherit;
  cursor: pointer;
  border-radius: 8px;
}
.theme-panel button:hover {
  background: var(--panel);
}
.theme-panel .theme-close {
  width: 44px;
  font-size: 22px;
}
.theme-panel label {
  display: block;
  margin-top: 16px;
  margin-bottom: 6px;
}
.theme-panel select {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  color: var(--ink);
  background: var(--paper);
  font: inherit;
}
.theme-current {
  padding: 10px 12px;
  border-left: 2px solid var(--accent);
  background: var(--panel);
  color: var(--ink);
  font-size: 12px;
}
.theme-panel .theme-motion {
  display: flex;
  align-items: center;
  gap: 9px;
}
.theme-motion input {
  width: 18px;
  height: 18px;
  margin: 0;
}
.theme-hint {
  color: var(--muted);
  font-size: 12px;
  margin: 14px 0 18px;
}
.theme-panel :focus-visible,
.theme-entry:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
/* Game colours retain readable numbers and unambiguous light/dark targets. */
.tile {
  color: var(--tile-light-ink);
}
.tile:is(
  [data-value='32'],
  [data-value='64'],
  [data-value='128'],
  [data-value='256'],
  [data-value='512'],
  [data-value='1024'],
  [data-value='2048']
) {
  color: var(--tile-strong-ink);
}
.tile[data-value='2'] {
  color: var(--tile-text-2);
}
.tile[data-value='4'] {
  color: var(--tile-text-4);
}
.tile[data-value='8'] {
  color: var(--tile-text-8);
}
.tile[data-value='16'] {
  color: var(--tile-text-16);
}
.tile[data-value='32'] {
  color: var(--tile-text-32);
}
.tile[data-value='64'] {
  color: var(--tile-text-64);
}
.tile:is([data-value='128'], [data-value='256']) {
  color: var(--tile-text-128);
}
.tile-button {
  background: var(--game-light);
}
.tile-button.dark {
  background: var(--tile-dark);
}
.tile-button.dark:hover {
  background: var(--tile-dark);
  box-shadow: inset 0 0 0 3px var(--accent);
}
.tile-button.hit {
  background: var(--panel);
}
.mine-cell {
  background: color-mix(in srgb, var(--accent) 22%, var(--panel));
  color: var(--ink);
}
.mine-cell.revealed {
  background: var(--surface);
}
.mine-cell.flagged {
  background: var(--panel);
  color: var(--accent);
}
.mine-cell.mine {
  background: var(--danger-fill);
  color: var(--on-danger);
}
.mine-cell[data-nearby='1'] {
  color: var(--accent);
}
.mine-cell[data-nearby='2'] {
  color: var(--ink);
}
.mine-cell[data-nearby='3'] {
  color: var(--danger);
}
.mine-cell[data-nearby='4'] {
  color: var(--muted);
}
.white-tiles-tool-icon i {
  background: var(--surface);
  border-color: var(--accent);
}
.white-tiles-tool-icon i:nth-child(3) {
  background: var(--tile-dark);
  border-color: var(--tile-dark);
}
.footer-social-link svg {
  color: var(--accent);
}
.music-toggle {
  color: var(--surface);
}
body[data-season] .music-toggle {
  background: var(--ink);
}
.landscape-water {
  filter: var(--scene-filter, none);
}
.landscape-image {
  filter: var(--scene-filter, none);
}
html[data-period='dawn'] {
  --scene-filter: sepia(0.1) saturate(0.85) brightness(0.99);
}
html[data-period='day'] {
  --scene-filter: saturate(0.9);
}
html[data-period='dusk'] {
  --scene-filter: sepia(0.23) saturate(0.85) brightness(0.86);
}
html[data-period='night'] {
  --scene-filter: saturate(0.65) brightness(0.42);
}
html[data-period='night'] .landscape-mist {
  opacity: 0.12;
}
html[data-period='night'] .weather-light {
  opacity: 0.45;
}
html[data-effects='false'] .landscape-mist {
  animation: none;
}
@media (max-width: 800px) {
  .site-header {
    gap: 4px 12px;
  }
  .site-header .brand {
    margin-right: auto;
  }
  .site-header nav {
    order: 3;
    flex-basis: 100%;
    margin: 0;
    gap: 20px;
  }
  .theme-entry {
    min-height: 36px;
    padding: 5px 10px;
  }
  .theme-panel {
    padding: 20px;
  }
  .theme-admin-bar {
    padding: 10px 20px 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  .landscape-image,
  .theme-entry {
    transition: none;
  }
}

