@font-face {
  font-family: "Jinghua LaoSong";
  src: url("./assets/fonts/jinghua-laosong.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --paper: #fafafa;
  --ink: #171717;
  --muted: rgba(23, 23, 23, 0.55);
  --line: rgba(23, 23, 23, 0.16);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Jinghua LaoSong", "Songti SC", "SimSun", serif;
  -webkit-font-smoothing: antialiased;
}

body {
  overflow: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

.writing-topbar {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: 1fr 1fr;
  width: 100%;
  height: 32px;
  border-bottom: 1px solid var(--line);
  background: rgba(250, 250, 250, 0.82);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  font-size: 13px;
  line-height: 32px;
}

.writing-topbar a,
.writing-topbar span {
  padding: 0 10px;
}

.writing-topbar span {
  border-left: 1px solid var(--line);
  color: var(--muted);
}

.writing-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  height: 100svh;
  padding-top: 32px;
}

.writing-column {
  min-width: 0;
  height: calc(100svh - 32px);
  overflow-y: auto;
  border-right: 1px solid var(--line);
  scrollbar-width: thin;
  scrollbar-color: rgba(23, 23, 23, 0.36) transparent;
}

.writing-column:last-child {
  border-right: 0;
}

.column-head {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 38px;
  padding: 7px 10px 6px;
  border-bottom: 1px solid var(--line);
  background: rgba(250, 250, 250, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.column-head p,
.column-head h1 {
  margin: 0;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.2;
}

.column-head p {
  color: var(--muted);
  font-size: 12px;
  font-style: italic;
}

.column-cover {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: center center;
  border-bottom: 1px solid var(--line);
  filter: saturate(0.94);
}

.fanwork-cover {
  object-position: center top;
}

.work-card {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  column-gap: 18px;
  padding: 18px 10px 22px;
  border-bottom: 1px solid var(--line);
}

.work-meta {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.55;
  writing-mode: vertical-rl;
  letter-spacing: 0.08em;
}

.work-card h2 {
  grid-column: 2;
  margin: 0 0 14px;
  font-size: 17px;
  font-weight: 400;
  line-height: 1.35;
}

.work-card p {
  grid-column: 2;
  margin: 0;
  max-width: 32em;
  color: rgba(23, 23, 23, 0.82);
  font-size: 14px;
  line-height: 1.9;
  text-align: justify;
}

.continue-link {
  grid-column: 2;
  width: fit-content;
  margin-top: 10px;
  color: rgba(23, 23, 23, 0.62);
  font-size: 12px;
  line-height: 1.5;
  border-bottom: 1px solid rgba(23, 23, 23, 0.34);
}

.continue-link:hover {
  color: var(--ink);
  border-bottom-color: var(--ink);
}

@media (max-width: 900px) {
  body {
    overflow: auto;
  }

  .writing-topbar {
    grid-template-columns: 1fr;
    height: auto;
  }

  .writing-topbar span {
    display: none;
  }

  .writing-grid {
    display: block;
    height: auto;
    padding-top: 32px;
  }

  .writing-column {
    height: auto;
    min-height: 100svh;
    overflow: visible;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .work-card {
    grid-template-columns: 48px minmax(0, 1fr);
    column-gap: 12px;
  }
}
