/* ==========================================================================
   花农社群 · HUANONG COMMUNITY
   Endfield-grade industrial UI — light rail, deep-navy chapters,
   electric blue as focus only.
   ========================================================================== */

:root {
  /* palette — light surface */
  --bg-light: oklch(0.9700 0.0029 264.5420);
  --fg-light: oklch(0.1801 0.0191 255.7673);
  --card: oklch(1.0000 0 0);
  --secondary: oklch(0.9504 0.0042 236.4983);
  --muted-fg: oklch(0.4789 0.0204 256.3497);
  --border-light: oklch(0.8994 0.0064 255.4779);
  --accent-soft: oklch(0.9209 0.0294 257.7666);
  --accent: oklch(0.6007 0.1903 257.9419);
  --accent-strong: oklch(0.6496 0.1885 257.7207);

  /* palette — dark surface */
  --bg-dark: oklch(0.1492 0.0093 263.9667);
  --card-dark: oklch(0.1993 0.0111 260.6610);
  --popover-dark: oklch(0.2298 0.0107 260.6838);
  --fg-dark: oklch(0.9602 0.0034 247.8587);
  --muted-fg-dark: oklch(0.6806 0.0194 245.5027);
  --border-dark: oklch(0.2800 0.0102 260.7048);
  --accent-dark: oklch(0.6496 0.1885 257.7207);

  --yellow: var(--accent);
  --yellow-glow: var(--accent-strong);
  --yellow-deep: var(--accent-strong);
  --ink: var(--fg-light);
  --black: var(--bg-dark);
  --loading: var(--bg-dark);
  --panel: var(--card-dark);
  --button: var(--popover-dark);
  --white: var(--bg-light);
  --off: var(--secondary);
  --steel: var(--border-light);
  --line: var(--border-light);
  --hover: var(--accent-soft);
  --gray: var(--muted-fg);
  --gray-2: oklch(0.5500 0.0180 256.0000);
  --gray-3: var(--border-dark);
  --gray-4: var(--muted-fg);
  --magenta: oklch(0.5495 0.2003 300.1164);
  --pink: oklch(0.6198 0.2297 5.1656);
  --cyan: oklch(0.6369 0.1247 171.0112);
  --danger: oklch(0.6207 0.2203 24.8903);

  --font-sans: "Noto Sans SC", "Source Han Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-display: "Bahnschrift", "DIN Alternate", "Archivo", "Arial Narrow", "Helvetica Neue", sans-serif;
  --font-data: "JetBrains Mono", "Cascadia Mono", "SFMono-Regular", Consolas, monospace;

  --rail: 7.5rem;
  --pad: 3.75rem;
  --safe: 152.5rem;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-hard: cubic-bezier(0.2, 0.7, 0.2, 1);

  color-scheme: light;
}

/* ---------- viewport engine ---------- */
html {
  font-size: clamp(8px, min(0.625vw, 1.111111vh), 16px);
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: var(--muted-fg-dark) var(--card);
  -webkit-text-size-adjust: 100%;
}

@media (orientation: portrait) {
  html {
    font-size: clamp(6px, min(1.481481vw, 0.833333vh), 16px);
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  min-width: 320px;
  background: var(--white);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: clamp(12px, 1.75rem, 24px);
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: 0;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body.is-booting,
body.is-modal {
  overflow: hidden;
}

::selection {
  background: var(--yellow);
  color: var(--ink);
}

h1, h2, h3, h4, p, dl, dd, figure, ul, ol {
  margin: 0;
}

ul, ol {
  padding: 0;
  list-style: none;
}

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

button,
input,
textarea,
select {
  font: inherit;
  color: inherit;
}

button {
  border: 0;
  background: none;
  cursor: pointer;
}

img,
svg {
  display: block;
  max-width: 100%;
}

:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

.is-dark :focus-visible,
.section--library :focus-visible,
.hero :focus-visible,
.boot :focus-visible {
  outline-color: var(--yellow);
}

.svg-defs {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.icon {
  width: 1.5rem;
  height: 1.5rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: square;
  stroke-linejoin: miter;
  flex: none;
}

.skip-link {
  position: fixed;
  top: -6rem;
  left: 2rem;
  z-index: 300;
  padding: 1rem 2rem;
  background: var(--yellow);
  color: var(--ink);
  font-size: 1rem;
  font-weight: 700;
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 1.5rem;
}

.wrap {
  width: min(var(--safe), calc(100% - var(--pad) * 2));
  margin-inline: auto;
}

main {
  padding-left: var(--rail);
}

.section {
  position: relative;
  overflow: clip;
}

.section--lobby,
.section--notice {
  background: var(--white);
  padding: 12.5rem 0 10rem;
}

.section--library {
  background: var(--bg-dark);
  color: var(--white);
  padding: 12.5rem 0 10rem;
}

/* Dark chapters use the dark-mode primary from the palette. */
.section--home,
.section--library,
.boot,
.post.is-featured,
.join,
.toast {
  --yellow: var(--accent-dark);
}

/* ---------- boot ---------- */
.boot {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
  overflow: hidden;
  background: var(--loading);
  color: var(--white);
}

.js .boot {
  display: grid;
}

.boot.is-done {
  display: none;
}

.boot.is-leaving {
  opacity: 0;
  transition: opacity 0.8s 0.9s;
}

.boot.is-leaving::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 3;
  background: var(--yellow);
  transform: scaleX(0);
  transform-origin: left;
  animation: bootWipe 0.6s cubic-bezier(1, 0, 0.7, 1) 0.3s forwards;
}

@keyframes bootWipe {
  to { transform: scaleX(1); }
}

.boot__rail {
  position: absolute;
  left: 3.75rem;
  top: 0;
  bottom: 0;
  width: 1.25rem;
  background: var(--border-dark);
}

.boot__rail span {
  display: block;
  width: 100%;
  height: 0;
  background: var(--yellow);
  transition: height 0.08s linear;
}

.boot__meta {
  position: absolute;
  left: 6rem;
  bottom: 3.75rem;
  display: flex;
  gap: 1.5rem;
  font-family: var(--font-data);
  font-size: clamp(10px, 0.8rem, 14px);
  letter-spacing: 0.16em;
  color: var(--gray-2);
}

.boot__meta span:last-child {
  color: var(--yellow);
  min-width: 3ch;
}

.boot__core {
  place-self: center;
  display: grid;
  justify-items: center;
  gap: 0.75rem;
  padding: 2rem;
  text-align: center;
}

.boot__logo {
  width: 6rem;
  color: var(--white);
  margin-bottom: 1rem;
}

.boot__word {
  font-size: clamp(24px, 2.6rem, 52px);
  font-weight: 800;
  letter-spacing: 0.08em;
}

.boot__sub {
  font-family: var(--font-data);
  font-size: clamp(9px, 0.8rem, 14px);
  letter-spacing: 0.32em;
  color: var(--gray-2);
}

.boot__log {
  margin-top: 2.5rem;
  display: grid;
  gap: 0.5rem;
  font-family: var(--font-data);
  font-size: clamp(9px, 0.75rem, 13px);
  letter-spacing: 0.12em;
  color: var(--muted-fg-dark);
  text-align: left;
  min-width: 24rem;
}

.js .boot__log li {
  opacity: 0;
  animation: bootLine 0.01s linear forwards;
}

.boot__log li:nth-child(1) { animation-delay: 0.15s; }
.boot__log li:nth-child(2) { animation-delay: 0.55s; }
.boot__log li:nth-child(3) { animation-delay: 0.95s; }
.boot__log li:nth-child(4) { animation-delay: 1.35s; color: var(--yellow); }

@keyframes bootLine {
  to { opacity: 1; }
}

.boot__foot {
  position: absolute;
  right: 3.75rem;
  bottom: 3.75rem;
  font-family: var(--font-data);
  font-size: clamp(9px, 0.75rem, 13px);
  letter-spacing: 0.16em;
  color: var(--muted-fg-dark);
}

/* ---------- rail ---------- */
.rail {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 50;
  width: var(--rail);
  height: 100vh;
  height: 100dvh;
  background: var(--card);
  color: var(--ink);
  border-right: 1px solid var(--line);
}

.rail__logo {
  position: absolute;
  top: 1.5rem;
  left: 50%;
  display: grid;
  justify-items: center;
  gap: 0.6rem;
  width: 5.1875rem;
  color: var(--ink);
  transform: translateX(-50%);
}

.rail__logo svg {
  width: 4rem;
}

.rail__logo-txt {
  font-family: var(--font-data);
  font-size: clamp(7px, 0.62rem, 11px);
  letter-spacing: 0.18em;
  color: var(--gray);
}

.rail__item {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4.5rem;
  color: inherit;
  transform: translateY(calc(12.875rem + var(--i) * 5rem));
}

.rail__item::before {
  content: "";
  position: absolute;
  left: 1.5rem;
  top: 0;
  width: 4.5rem;
  height: 100%;
  border-radius: 0.25rem;
  background: var(--hover);
  opacity: 0;
  transition: opacity 0.2s, width 0.3s var(--ease);
}

.rail__item:hover::before {
  width: 19.5rem;
  opacity: 1;
}

.rail__item.is-active::before {
  opacity: 1;
}

.rail__item.is-active::after {
  content: "";
  position: absolute;
  left: 0;
  top: 0.5rem;
  bottom: 0.5rem;
  width: 0.2rem;
  background: var(--yellow);
}

.rail__icon {
  position: absolute;
  left: 3.75rem;
  top: 2.25rem;
  width: 2.625rem;
  color: var(--steel);
  transform: translate(-50%, -50%);
  transition: color 0.2s;
}

.rail__icon .icon {
  width: 2.25rem;
  height: 2.25rem;
}

.rail__item:hover .rail__icon { color: var(--muted-fg); }
.rail__item.is-active .rail__icon { color: var(--ink); }

.rail__label {
  position: absolute;
  left: 6.9375rem;
  top: 2.25rem;
  display: grid;
  gap: 0.15rem;
  width: 13.25rem;
  opacity: 0;
  transform: translate(-1rem, -50%);
  transition: opacity 0.2s, transform 0.3s;
}

.rail__label b {
  font-size: clamp(12px, 1.125rem, 19px);
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
}

.rail__label small {
  font-family: var(--font-data);
  font-size: clamp(8px, 0.7rem, 12px);
  letter-spacing: 0.14em;
  color: var(--gray);
  white-space: nowrap;
}

.rail__item:hover .rail__label {
  opacity: 1;
  transform: translate(0, -50%);
}

.rail__foot {
  position: absolute;
  left: 1.5rem;
  bottom: 3rem;
  display: grid;
  justify-items: center;
  gap: 1.6rem;
}

.rail__dispatch {
  position: relative;
  display: block;
  width: 4.5rem;
  height: 9.75rem;
  overflow: hidden;
  border-radius: 4px;
  background: var(--ink);
  color: var(--white);
}

.rail__dispatch-fill {
  position: absolute;
  inset: 0;
  background: var(--yellow);
  transform: translateY(101%);
  transition: transform 0.3s var(--ease);
}

.rail__dispatch:hover .rail__dispatch-fill {
  transform: none;
}

.rail__dispatch:hover {
  color: var(--ink);
}

.rail__dispatch-icon {
  position: absolute;
  top: 1.35rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
}

.rail__dispatch-icon .icon {
  width: 1.5rem;
  height: 1.5rem;
}

.rail__dispatch-txt {
  position: absolute;
  bottom: 1.25rem;
  left: 50%;
  z-index: 1;
  transform: translateX(-50%);
  writing-mode: vertical-rl;
  font-size: clamp(9px, 0.78rem, 14px);
  letter-spacing: 0.12em;
  white-space: nowrap;
}

.rail__dispatch.is-user {
  background: var(--off);
  color: var(--ink);
}

.rail__dispatch.is-user .rail__dispatch-fill {
  display: none;
}

.rail__dispatch.is-user img {
  position: absolute;
  top: 1rem;
  left: 50%;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  object-fit: cover;
  transform: translateX(-50%);
}

.rail__dispatch.is-user .rail__dispatch-icon {
  display: none;
}

.rail__ver {
  font-family: var(--font-data);
  font-size: clamp(7px, 0.6rem, 10px);
  letter-spacing: 0.12em;
  color: var(--gray-2);
  writing-mode: vertical-rl;
}

/* ---------- mobile chrome ---------- */
.mtop,
.mbottom {
  display: none;
}

/* ---------- buttons ---------- */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  min-height: 4.5rem;
  padding: 0 2rem;
  border: 1px solid transparent;
  border-radius: 2px;
  font-size: clamp(13px, 1.35rem, 22px);
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease,
    border-radius 0.2s ease, transform 0.2s ease;
}

.btn .icon {
  width: 1.3rem;
  height: 1.3rem;
  transition: transform 0.2s ease;
}

.btn:hover .icon {
  transform: translateX(0.35rem);
}

.btn--yellow {
  background: var(--yellow);
  color: var(--ink);
}

.btn--yellow:hover {
  background: var(--card);
}

.btn--ghost {
  border-color: rgba(255, 255, 255, 0.32);
  color: var(--white);
}

.btn--ghost:hover {
  border-color: var(--card);
  background: var(--card);
  color: var(--ink);
}

.btn--ink {
  padding-left: 2.9rem;
  background: var(--ink);
  color: var(--white);
}

.btn--ink::after {
  content: "";
  position: absolute;
  left: 0.7rem;
  top: 22%;
  width: 0.95rem;
  height: 56%;
  background: var(--yellow);
  clip-path: polygon(0 0, 25% 0, 25% 100%, 0 100%);
  transition: clip-path 0.2s ease, transform 0.2s ease;
}

.btn--ink:hover {
  border-radius: 6px;
  background: var(--bg-dark);
}

.btn--ink:hover::after {
  clip-path: polygon(0 20%, 100% 50%, 0 80%, 0 80%);
  transform: translateX(0.85rem);
}

.btn:active {
  transform: scale(0.985);
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* ---------- hero ---------- */
.section--home {
  background: var(--bg-dark);
  color: var(--white);
}

.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 100vh;
  padding: 9rem 0 10rem;
  overflow: clip;
  isolation: isolate;
}

.hero__bg {
  position: absolute;
  inset: -10%;
  z-index: -3;
  background:
    radial-gradient(58% 58% at 74% 42%, rgba(58, 140, 255, 0.10), transparent 62%),
    radial-gradient(46% 52% at 16% 24%, rgba(255, 255, 255, 0.05), transparent 70%),
    var(--bg-dark);
}

.hero__grid {
  position: absolute;
  inset: 0;
  z-index: -2;
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: 4rem 4rem;
  -webkit-mask-image: radial-gradient(ellipse at 58% 46%, #000 16%, transparent 76%);
  mask-image: radial-gradient(ellipse at 58% 46%, #000 16%, transparent 76%);
  opacity: 0.85;
}

.hero__watermark {
  position: absolute;
  right: -2rem;
  top: 7rem;
  z-index: -1;
  font-family: var(--font-display);
  font-size: 28rem;
  font-weight: 900;
  line-height: 0.8;
  letter-spacing: -1.5rem;
  color: transparent;
  -webkit-text-stroke: 1px rgba(255, 255, 255, 0.06);
  user-select: none;
  pointer-events: none;
}

.hero__wrap {
  display: grid;
  grid-template-columns: minmax(0, 62rem) minmax(0, 1fr);
  align-items: center;
  gap: 4rem;
}

.hero__copy {
  position: relative;
  z-index: 2;
}

.hero__status {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.6rem 1.1rem;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 2px;
  color: var(--fg-dark);
  font-size: clamp(10px, 0.92rem, 16px);
  letter-spacing: 0.04em;
}

.pulse-dot {
  display: inline-block;
  width: 0.5rem;
  height: 0.5rem;
  background: var(--yellow);
  box-shadow: 0 0 0 0 rgba(58, 140, 255, 0.5);
  animation: pulse 2.4s ease-out infinite;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(58, 140, 255, 0.5); }
  60% { box-shadow: 0 0 0 0.5rem rgba(58, 140, 255, 0); }
  100% { box-shadow: 0 0 0 0 rgba(58, 140, 255, 0); }
}

.hero__kicker {
  margin-top: 2.5rem;
  font-family: var(--font-data);
  font-size: clamp(9px, 0.8rem, 14px);
  letter-spacing: 0.2em;
  color: var(--muted-fg-dark);
}

.hero__title {
  margin-top: 1.2rem;
  font-family: var(--font-sans);
  font-size: clamp(44px, 7.6rem, 132px);
  font-weight: 900;
  line-height: 0.98;
  letter-spacing: -0.03em;
}

.hero__title .line {
  display: block;
  overflow: hidden;
  padding-bottom: 0.06em;
}

.hero__title .line > span {
  display: inline-block;
}

.js .hero__title .line > span {
  opacity: 0;
}

.hero__title em {
  font-family: var(--font-display);
  font-style: normal;
  font-weight: 700;
  color: transparent;
  -webkit-text-stroke: 1.5px var(--white);
  letter-spacing: 0.01em;
  padding-right: 0.08em;
}

.hero__title-mark {
  display: inline-block;
  width: 0.16em;
  height: 0.16em;
  margin-left: 0.18em;
  background: var(--yellow);
  vertical-align: 0.08em;
}

.hero__desc {
  max-width: 41ch;
  margin-top: 2.2rem;
  color: var(--muted-fg-dark);
  font-size: clamp(13px, 1.35rem, 21px);
  line-height: 1.65;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 3rem;
}

.hero__stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2rem;
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
}

.hero__stats dt {
  display: block;
}

.hero__stats strong {
  display: block;
  font-size: clamp(26px, 3.4rem, 60px);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.hero__stats sup {
  font-size: 0.45em;
  vertical-align: 0.9em;
  color: var(--yellow);
}

.hero__stats dd {
  margin-top: 0.7rem;
  font-size: clamp(10px, 0.92rem, 16px);
  letter-spacing: 0.08em;
  color: var(--muted-fg-dark);
}

.hero__art {
  position: relative;
  justify-self: end;
  width: min(100%, 52rem);
  aspect-ratio: 1;
}

.hero__art-inner {
  position: relative;
  width: 100%;
  height: 100%;
}

.glyph {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.glyph__spin {
  animation: glyphSpin 110s linear infinite;
  transform-origin: 400px 400px;
  transform-box: view-box;
}

.glyph__petals {
  animation: glyphSpin 80s linear infinite reverse;
  transform-origin: 400px 400px;
  transform-box: view-box;
}

@keyframes glyphSpin {
  to { transform: rotate(360deg); }
}

.petal {
  fill: var(--bg-dark);
  stroke: var(--border-light);
  stroke-width: 2;
}

.petal--hot {
  fill: var(--yellow);
  stroke: var(--yellow);
}

.hero__scan {
  position: absolute;
  left: 6%;
  right: 6%;
  top: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(58, 140, 255, 0.65), transparent);
  box-shadow: 0 0 1.5rem rgba(58, 140, 255, 0.35);
  animation: scan 7.5s linear infinite;
  pointer-events: none;
}

@keyframes scan {
  0% { transform: translateY(8%); opacity: 0; }
  8% { opacity: 0.9; }
  92% { opacity: 0.9; }
  100% { transform: translateY(1200%); opacity: 0; }
}

.hero__tag {
  position: absolute;
  font-family: var(--font-data);
  font-size: clamp(8px, 0.72rem, 12px);
  letter-spacing: 0.16em;
  color: var(--muted-fg-dark);
}

.hero__tag--a {
  top: 2rem;
  right: 1rem;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--muted-fg-dark);
}

.hero__tag--a i {
  width: 0.45rem;
  height: 0.45rem;
  background: var(--pink);
  border-radius: 50%;
  animation: blink 1.6s steps(2, end) infinite;
}

.hero__tag--b {
  left: 1rem;
  bottom: 2.5rem;
}

@keyframes blink {
  50% { opacity: 0; }
}

.hero__side {
  position: absolute;
  right: 1.5rem;
  top: 50%;
  transform: translateY(-50%);
  writing-mode: vertical-rl;
  font-family: var(--font-data);
  font-size: clamp(8px, 0.7rem, 12px);
  letter-spacing: 0.3em;
  color: var(--muted-fg-dark);
}

.hero__cue {
  position: absolute;
  left: 50%;
  bottom: 2.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.8rem;
  transform: translateX(-50%);
  font-family: var(--font-data);
  font-size: clamp(8px, 0.68rem, 12px);
  letter-spacing: 0.28em;
  color: var(--muted-fg-dark);
}

.hero__cue i {
  display: block;
  width: 1px;
  height: 3.5rem;
  background: linear-gradient(var(--muted-fg-dark), transparent);
  animation: cue 2.6s ease-in-out infinite;
  transform-origin: top;
}

@keyframes cue {
  0%, 100% { transform: scaleY(0.35); opacity: 0.3; }
  50% { transform: scaleY(1); opacity: 1; }
}

/* ---------- dock ---------- */
.dock {
  position: relative;
  background: var(--card);
  color: var(--ink);
}

.dock__wrap {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.dock__item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 2.4rem 2rem;
  border-right: 1px solid var(--line);
  overflow: hidden;
  isolation: isolate;
}

.dock__item:last-child {
  border-right: 0;
}

.dock__item::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--yellow);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s var(--ease);
}

.dock__item:hover::before {
  transform: none;
}

.dock__index {
  font-family: var(--font-data);
  font-size: clamp(10px, 0.82rem, 14px);
  color: var(--gray);
  align-self: flex-start;
}

.dock__body {
  display: grid;
  gap: 0.35rem;
  flex: 1;
  min-width: 0;
}

.dock__body strong {
  font-size: clamp(14px, 1.5rem, 26px);
  font-weight: 700;
  line-height: 1.15;
}

.dock__body small {
  font-family: var(--font-data);
  font-size: clamp(8px, 0.7rem, 12px);
  letter-spacing: 0.14em;
  color: var(--gray);
}

.dock__arrow {
  width: 1.4rem;
  height: 1.4rem;
  transition: transform 0.25s var(--ease);
}

.dock__item:hover .dock__index,
.dock__item:hover .dock__body small {
  color: var(--ink);
}

.dock__item:hover .dock__arrow {
  transform: translateX(0.4rem);
}

/* ---------- yellow divider ---------- */
.ef-divider {
  position: relative;
  height: 9.125rem;
  padding: 2.25rem 0 0 30.625rem;
  overflow: hidden;
  background: var(--card);
  color: var(--ink);
  line-height: 1;
}

.ef-divider::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--yellow);
  transform: translateX(100%);
  transition: transform 0.4s ease 0.2s;
}

.ef-divider.is-active::before {
  transform: none;
}

.ef-divider__sub,
.ef-divider__title {
  position: relative;
  display: block;
  opacity: 0;
  transform: translateX(2rem);
}

.ef-divider__sub {
  font-family: var(--font-display);
  font-size: clamp(14px, 1.875rem, 32px);
  font-weight: 400;
  letter-spacing: 0.02em;
  transition: transform 0.3s ease 0.5s, opacity 0.3s ease 0.5s;
}

.ef-divider__title {
  margin-top: 0.25rem;
  font-family: var(--font-display);
  font-size: clamp(24px, 3.75rem, 64px);
  font-weight: 700;
  letter-spacing: 0.01em;
  transition: transform 0.3s ease 0.6s, opacity 0.3s ease 0.6s;
}

.ef-divider.is-active .ef-divider__sub,
.ef-divider.is-active .ef-divider__title {
  opacity: 1;
  transform: none;
}

/* ---------- section title ---------- */
.sec-title {
  position: relative;
  width: 40rem;
  height: 6rem;
}

.sec-title__bar {
  position: absolute;
  left: 0;
  top: 0;
  width: 6.5rem;
  height: 2rem;
}

.sec-title__inner {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  background: var(--steel);
  transform: translateX(-100%);
  transition: transform 0.5s ease-out;
}

.js .sec-title.is-active .sec-title__inner {
  transform: none;
}

.sec-title__arrow {
  position: absolute;
  right: 0.375rem;
  width: 0.75rem;
  height: 1.4375rem;
  background: var(--ink);
  clip-path: polygon(0 0, 100% 50%, 0 100%, 25% 50%);
  transform: rotate(-45deg);
  transition: transform 0.2s ease-out 0.3s;
}

.js .sec-title.is-active .sec-title__arrow {
  transform: rotate(0);
}

.sec-title__en {
  position: absolute;
  left: 6.5rem;
  top: 0;
  height: 2rem;
  padding-left: 0.5rem;
  display: flex;
  align-items: center;
  font-family: var(--font-display);
  font-size: clamp(16px, 2.25rem, 40px);
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--ink);
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.3s ease 0.15s;
}

.js .sec-title.is-active .sec-title__en {
  opacity: 1;
}

.sec-title__cn {
  position: absolute;
  left: 0;
  top: 2.5rem;
  font-size: clamp(24px, 3rem, 52px);
  font-weight: 800;
  line-height: 1;
  color: var(--ink);
  white-space: nowrap;
  opacity: 0;
  transform: translateX(-0.5rem);
  transition: opacity 0.3s ease 0.2s, transform 0.3s ease 0.2s;
}

.js .sec-title.is-active .sec-title__cn {
  opacity: 1;
  transform: none;
}

.sec-title.is-dark .sec-title__en,
.sec-title.is-dark .sec-title__cn {
  color: var(--white);
}

.sec-title.is-dark .sec-title__inner {
  background: var(--popover-dark);
}

.sec-title.is-dark .sec-title__arrow {
  background: var(--yellow);
}

/* ---------- section head ---------- */
.section__hollow {
  position: absolute;
  right: -2rem;
  top: 5rem;
  z-index: 0;
  font-family: var(--font-display);
  font-size: 15.625rem;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.625rem;
  white-space: nowrap;
  color: transparent;
  pointer-events: none;
  user-select: none;
}

.section__hollow--light {
  background-image: linear-gradient(
    -45deg,
    transparent 0 20.58%,
    var(--ink) 20.58% 29.42%,
    transparent 29.42% 70.58%,
    var(--ink) 70.58% 79.42%,
    transparent 79.42% 100%
  );
  background-size: 0.5rem 0.5rem;
  -webkit-background-clip: text;
  background-clip: text;
  opacity: 0.055;
}

.section__hollow--dark {
  background-image: linear-gradient(
    -45deg,
    transparent 0 20.58%,
    var(--fg-dark) 20.58% 29.42%,
    transparent 29.42% 70.58%,
    var(--fg-dark) 70.58% 79.42%,
    transparent 79.42% 100%
  );
  background-size: 0.5rem 0.5rem;
  -webkit-background-clip: text;
  background-clip: text;
  opacity: 0.06;
}

.section--lobby .wrap,
.section--library .wrap,
.section--notice .wrap {
  position: relative;
  z-index: 1;
}

.section__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 3rem;
  margin: 4.5rem 0 3.5rem;
}

.section__head > div:first-child {
  max-width: 58rem;
}

.overline {
  font-family: var(--font-data);
  font-size: clamp(9px, 0.82rem, 14px);
  letter-spacing: 0.18em;
  color: var(--gray);
  text-transform: uppercase;
}

.overline--dark {
  color: var(--muted-fg-dark);
}

.statement {
  margin-top: 1.2rem;
  font-size: clamp(28px, 3.2rem, 56px);
  font-weight: 800;
  line-height: 1.06;
  letter-spacing: -0.02em;
}

.section__intro {
  max-width: 52ch;
  margin-top: 1.4rem;
  color: var(--gray);
  font-size: clamp(13px, 1.3rem, 21px);
  line-height: 1.65;
}

.section__head--dark .section__intro {
  color: var(--muted-fg-dark);
}

.section__tools {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 1.2rem;
  flex: none;
  padding-bottom: 0.3rem;
}

.section__count {
  font-family: var(--font-data);
  font-size: clamp(10px, 0.85rem, 14px);
  letter-spacing: 0.1em;
  color: var(--gray);
}

.section--library .section__count {
  color: var(--muted-fg-dark);
}

/* ---------- filters ---------- */
.filterbar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 3rem;
  padding: 0.9rem 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.filterbar__group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.filterbar__line {
  flex: 1;
  height: 1px;
  margin: 0 1rem;
  background: repeating-linear-gradient(90deg, var(--steel) 0 0.3rem, transparent 0.3rem 0.6rem);
}

.filterbar__hint {
  font-family: var(--font-data);
  font-size: clamp(8px, 0.7rem, 12px);
  letter-spacing: 0.12em;
  color: var(--gray);
  white-space: nowrap;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.7rem 1.4rem;
  border: 1px solid transparent;
  border-radius: 2px;
  font-size: clamp(12px, 1.05rem, 18px);
  font-weight: 500;
  color: var(--gray-4);
  transition: background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.chip:hover {
  background: var(--off);
  color: var(--ink);
}

.chip.is-active {
  background: var(--ink);
  color: var(--white);
}

.chip.is-active::before {
  content: "";
  width: 0.38rem;
  height: 0.38rem;
  background: var(--yellow);
}

.filterbar--dark {
  border-color: var(--border-dark);
}

.filterbar--dark .filterbar__line {
  background: repeating-linear-gradient(90deg, var(--border-dark) 0 0.3rem, transparent 0.3rem 0.6rem);
}

.chip--dark {
  color: var(--muted-fg-dark);
}

.chip--dark:hover {
  background: var(--popover-dark);
  color: var(--white);
}

.chip--dark.is-active {
  background: var(--yellow);
  color: var(--ink);
}

.chip--dark.is-active::before {
  background: var(--ink);
}

.search {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin-left: auto;
  width: 26rem;
  max-width: 48%;
  padding: 0 1rem;
  border: 1px solid var(--border-dark);
  background: var(--card-dark);
  color: var(--muted-fg-dark);
  transition: border-color 0.2s ease;
}

.search:focus-within {
  border-color: var(--yellow);
}

.search .icon {
  width: 1.1rem;
  height: 1.1rem;
}

.search input {
  width: 100%;
  height: 3.2rem;
  border: 0;
  background: transparent;
  color: var(--white);
  font-size: clamp(11px, 0.95rem, 16px);
  outline: 0;
}

.search input::placeholder {
  color: var(--muted-fg-dark);
}

.search input::-webkit-search-cancel-button {
  filter: invert(1);
  opacity: 0.5;
}

/* ---------- post cards ---------- */
.post-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
}

.post {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 22rem;
  padding: 2.5rem;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--card);
  transition: background-color 0.22s ease, border-color 0.22s ease;
  overflow: hidden;
}

.post::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 0.25rem;
  background: var(--yellow);
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 0.35s var(--ease);
}

.post:hover {
  background: var(--bg-light);
  border-color: var(--steel);
}

.post:hover::before {
  transform: scaleY(1);
}

.post__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.post__index {
  font-family: var(--font-data);
  font-size: clamp(9px, 0.78rem, 13px);
  letter-spacing: 0.12em;
  color: var(--gray-2);
}

.post__status {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.35rem 0.75rem;
  border-radius: 2px;
  font-size: clamp(9px, 0.78rem, 13px);
  font-weight: 600;
  letter-spacing: 0.04em;
  background: var(--off);
  color: var(--gray-4);
}

.post__status.is-active {
  background: var(--yellow);
  color: var(--ink);
}

.post__status.is-active::before {
  content: "";
  width: 0.35rem;
  height: 0.35rem;
  background: var(--ink);
  animation: blink 1.6s steps(2, end) infinite;
}

.post__body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 2rem 0 1.8rem;
}

.post__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.1rem;
}

.tag {
  display: inline-flex;
  align-items: center;
  padding: 0.3rem 0.7rem;
  border-radius: 2px;
  background: var(--ink);
  color: var(--white);
  font-size: clamp(9px, 0.76rem, 13px);
  font-weight: 500;
  letter-spacing: 0.04em;
}

.tag--ghost {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--gray-4);
}

.post h3 {
  font-size: clamp(20px, 2.15rem, 38px);
  font-weight: 700;
  line-height: 1.18;
  letter-spacing: -0.015em;
  overflow-wrap: anywhere;
}

.post__body p {
  margin-top: 0.9rem;
  color: var(--gray-4);
  font-size: clamp(12px, 1.12rem, 18px);
  line-height: 1.65;
  overflow-wrap: anywhere;
}

.post__foot {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.8rem 1.4rem;
  padding-top: 1.3rem;
  border-top: 1px solid var(--line);
  font-size: clamp(10px, 0.88rem, 14px);
  color: var(--gray);
}

.post__author {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--ink);
  font-weight: 600;
}

.post__author::before {
  content: "";
  width: 0.55rem;
  height: 0.55rem;
  border: 1px solid var(--ink);
  transform: rotate(45deg);
}

.post__time {
  font-family: var(--font-data);
  font-size: 0.95em;
  letter-spacing: 0.04em;
}

.post__actions {
  display: inline-flex;
  gap: 1rem;
  margin-left: auto;
}

.post__action {
  font-size: inherit;
  color: var(--gray);
  border-bottom: 1px solid transparent;
  transition: color 0.18s ease, border-color 0.18s ease;
}

.post__action:hover {
  color: var(--ink);
  border-color: var(--ink);
}

.post__action[data-action="delete"]:hover {
  color: var(--pink);
  border-color: var(--pink);
}

/* featured post */
.post.is-featured {
  grid-column: 1 / -1;
  min-height: 24rem;
  padding: 3rem;
  border-color: var(--border-dark);
  background: var(--card-dark);
  color: var(--fg-dark);
}

.post__deco {
  position: absolute;
  right: 2.5rem;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-display);
  font-size: 14rem;
  font-weight: 900;
  line-height: 0.8;
  letter-spacing: -0.05em;
  color: transparent;
  -webkit-text-stroke: 1px rgba(255, 255, 255, 0.14);
  pointer-events: none;
  user-select: none;
}

.post.is-featured::before {
  background: var(--yellow);
}

.post.is-featured:hover {
  background: var(--popover-dark);
  border-color: var(--popover-dark);
}

.post.is-featured .post__index,
.post.is-featured .post__time {
  color: var(--muted-fg-dark);
}

.post.is-featured .post__status:not(.is-active) {
  background: var(--popover-dark);
  color: var(--muted-fg-dark);
}

.post.is-featured .post__body p {
  max-width: 70ch;
  color: var(--muted-fg-dark);
}

.post.is-featured .post__foot {
  border-top-color: var(--border-dark);
}

.post.is-featured .post__author {
  color: var(--white);
}

.post.is-featured .post__author::before {
  border-color: var(--yellow);
}

.post.is-featured .post__action {
  color: var(--muted-fg-dark);
}

.post.is-featured .post__action:hover {
  color: var(--white);
  border-color: var(--white);
}

.post.is-featured .tag {
  background: var(--yellow);
  color: var(--ink);
}

.post.is-featured .tag--ghost {
  background: transparent;
  border-color: var(--border-dark);
  color: var(--muted-fg-dark);
}

/* ---------- states ---------- */
.state {
  display: grid;
  justify-items: center;
  gap: 1.2rem;
  padding: 5rem 2rem;
  margin-top: 1.5rem;
  border: 1px solid var(--line);
  background:
    repeating-linear-gradient(-45deg, rgba(0, 0, 0, 0.02) 0 0.5rem, transparent 0.5rem 1rem),
    var(--white);
  text-align: center;
  color: var(--gray);
  font-size: clamp(12px, 1.05rem, 18px);
}

.state[hidden] {
  display: none;
}

.state__code {
  font-family: var(--font-display);
  font-size: clamp(34px, 5rem, 86px);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.03em;
  color: transparent;
  -webkit-text-stroke: 1px var(--steel);
}

.state strong {
  color: var(--ink);
  font-size: clamp(16px, 1.5rem, 26px);
  font-weight: 700;
}

.state p {
  max-width: 46ch;
  line-height: 1.6;
}

.state .btn {
  margin-top: 0.6rem;
}

.state--dark {
  border-color: var(--border-dark);
  background:
    repeating-linear-gradient(-45deg, rgba(255, 255, 255, 0.025) 0 0.5rem, transparent 0.5rem 1rem),
    var(--bg-dark);
  color: var(--muted-fg-dark);
}

.state--dark .state__code {
  -webkit-text-stroke-color: var(--border-dark);
}

.state--dark strong {
  color: var(--white);
}

/* ---------- library ---------- */
.archive {
  border-top: 1px solid var(--border-dark);
}

.archive__head,
.file {
  display: grid;
  grid-template-columns: 5rem minmax(0, 1fr) 9rem 9rem 10rem;
  gap: 2rem;
  align-items: center;
}

.archive__head {
  padding: 1rem 0;
  border-bottom: 1px solid var(--border-dark);
  font-family: var(--font-data);
  font-size: clamp(8px, 0.7rem, 12px);
  letter-spacing: 0.14em;
  color: var(--muted-fg-dark);
}

.archive__head span:last-child {
  justify-self: end;
}

.archive__list {
  display: grid;
}

.file {
  position: relative;
  padding: 1.7rem 0;
  border-bottom: 1px solid var(--border-dark);
  isolation: isolate;
}

.file::before {
  content: "";
  position: absolute;
  left: -1rem;
  right: -1rem;
  top: 0;
  bottom: 0;
  z-index: -1;
  background: var(--card-dark);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--ease);
}

.file:hover::before {
  transform: none;
}

.file__index {
  font-family: var(--font-data);
  font-size: clamp(10px, 0.82rem, 14px);
  letter-spacing: 0.08em;
  color: var(--muted-fg-dark);
}

.file__main {
  min-width: 0;
}

.file h3 {
  font-size: clamp(15px, 1.45rem, 26px);
  font-weight: 600;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.file p {
  margin-top: 0.35rem;
  color: var(--muted-fg-dark);
  font-size: clamp(10px, 0.92rem, 16px);
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.file__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 0.65rem;
  font-family: var(--font-data);
  font-size: clamp(8px, 0.68rem, 12px);
  letter-spacing: 0.08em;
  color: var(--muted-fg-dark);
}

.file__type {
  justify-self: start;
  padding: 0.3rem 0.6rem;
  border: 1px solid var(--border-dark);
  font-family: var(--font-data);
  font-size: clamp(8px, 0.68rem, 12px);
  letter-spacing: 0.1em;
  color: var(--yellow);
}

.file__size {
  font-family: var(--font-data);
  font-size: clamp(9px, 0.82rem, 14px);
  color: var(--muted-fg-dark);
  white-space: nowrap;
}

.file__action {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.75rem 1.2rem;
  border: 1px solid var(--border-dark);
  border-radius: 2px;
  font-size: clamp(10px, 0.88rem, 15px);
  white-space: nowrap;
  transition: background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.file__action .icon {
  width: 1rem;
  height: 1rem;
}

.file__action:hover {
  background: var(--yellow);
  border-color: var(--yellow);
  color: var(--ink);
}

.file__passcode {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-data);
  color: var(--muted-fg-dark);
}

.file__copy {
  color: var(--yellow);
  border-bottom: 1px dashed var(--muted-fg-dark);
  font-family: var(--font-data);
  font-size: 0.95em;
}

.file__copy:hover {
  color: var(--white);
  border-color: var(--white);
}

.library__note {
  margin-top: 2rem;
  font-family: var(--font-data);
  font-size: clamp(9px, 0.75rem, 13px);
  letter-spacing: 0.06em;
  color: var(--muted-fg-dark);
}

/* ---------- pagination ---------- */
.pager {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-dark);
}

.pager[hidden] {
  display: none !important;
}

.pager__meta {
  display: grid;
  gap: 0.35rem;
  font-family: var(--font-data);
  font-size: clamp(8px, 0.68rem, 12px);
  letter-spacing: 0.12em;
  color: var(--muted-fg-dark);
}

.pager__meta strong {
  font-size: clamp(14px, 1.5rem, 24px);
  letter-spacing: 0.06em;
  color: var(--yellow);
}

.pager__meta em {
  font-style: normal;
  color: var(--muted-fg-dark);
}

.pager__ctrl {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.6rem;
  max-width: 100%;
}

.pager__numbers {
  display: flex;
  gap: 0.4rem;
  max-width: 100%;
  overflow-x: auto;
}

.pager__arrow,
.pager__number {
  height: 4rem;
  min-width: 4rem;
  padding: 0 0.9rem;
  border: 1px solid var(--border-dark);
  font-family: var(--font-data);
  font-size: clamp(9px, 0.8rem, 14px);
  letter-spacing: 0.08em;
  color: var(--muted-fg-dark);
  transition:
    background-color 0.18s ease,
    color 0.18s ease,
    border-color 0.18s ease;
}

.pager__number {
  padding: 0;
}

.pager__arrow:hover:not(:disabled),
.pager__number:hover {
  border-color: var(--yellow);
  background: var(--yellow);
  color: var(--ink);
}

.pager__arrow:disabled {
  opacity: 0.28;
  cursor: not-allowed;
}

.pager__number.is-active {
  border-color: var(--yellow);
  background: var(--yellow);
  color: var(--ink);
  font-weight: 700;
}

/* ---------- notice ---------- */
.tower {
  position: absolute;
  left: var(--rail);
  top: 20rem;
  width: var(--pad);
  height: 40rem;
  display: grid;
  align-content: end;
  gap: 0.4rem;
  padding: 0.5rem;
  background: var(--secondary);
  clip-path: polygon(0 0, 100% 4%, 100% 100%, 0 96%);
  pointer-events: none;
  opacity: 0.9;
}

.tower span {
  display: block;
  height: 34%;
  background: var(--border-light);
  border-left: 0.25rem solid var(--steel);
}

.tower span:nth-child(2) {
  height: 22%;
  background: var(--card);
}

.tower span:nth-child(3) {
  height: 10%;
  background: var(--yellow);
  border-left-color: var(--ink);
}

.notice-grid {
  display: grid;
  grid-template-columns: 38rem minmax(0, 1fr);
  align-items: start;
  gap: 6rem;
  margin-top: 4.5rem;
}

.notice-intro {
  position: sticky;
  top: 10rem;
}

.notice-intro .statement {
  margin-top: 1.4rem;
}

.calibration {
  width: 67.5rem;
  max-width: 100%;
  height: 0.25rem;
  margin-top: 2.5rem;
  background-image: linear-gradient(
    90deg,
    var(--magenta) 0 11.25rem,
    var(--yellow) 11.25rem 22.5625rem,
    var(--cyan) 22.5625rem 100%
  );
}

.notice-stats {
  display: grid;
  gap: 0.8rem;
  margin-top: 2.5rem;
  font-family: var(--font-data);
  font-size: clamp(9px, 0.78rem, 13px);
  letter-spacing: 0.1em;
}

.notice-stats div {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  padding-bottom: 0.8rem;
  border-bottom: 1px solid var(--line);
}

.notice-stats dt {
  color: var(--gray);
}

.notice-stats dd {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--ink);
}

.notice-list {
  display: grid;
  gap: 1rem;
}

.announcement {
  position: relative;
  padding: 2rem 2.2rem;
  border: 1px solid var(--line);
  border-left: 0.25rem solid var(--ink);
  background: var(--card);
  transition: background-color 0.2s ease;
}

.announcement:hover {
  background: var(--bg-light);
}

.announcement[data-type="warning"] {
  border-left-color: var(--yellow);
}

.announcement[data-type="danger"] {
  border-left-color: var(--magenta);
}

.announcement__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.9rem;
}

.announcement__type {
  font-family: var(--font-data);
  font-size: clamp(8px, 0.7rem, 12px);
  letter-spacing: 0.14em;
  color: var(--gray);
}

.announcement__time {
  font-family: var(--font-data);
  font-size: clamp(8px, 0.7rem, 12px);
  letter-spacing: 0.06em;
  color: var(--gray-2);
}

.announcement h3 {
  font-size: clamp(16px, 1.55rem, 28px);
  font-weight: 700;
  line-height: 1.25;
}

.announcement p {
  margin-top: 0.7rem;
  color: var(--gray-4);
  font-size: clamp(12px, 1.08rem, 19px);
  line-height: 1.65;
  white-space: pre-line;
  overflow-wrap: anywhere;
}

.join {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 3rem;
  margin-top: 8rem;
  padding: 4rem;
  background: var(--ink);
  color: var(--white);
  overflow: hidden;
}

.join::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 0.5rem;
  background-image: repeating-linear-gradient(
    -45deg,
    var(--yellow) 0 1.25rem,
    var(--ink) 1.25rem 2.5rem
  );
}

.join__index {
  font-family: var(--font-data);
  font-size: clamp(9px, 0.75rem, 13px);
  letter-spacing: 0.16em;
  color: var(--yellow);
}

.join__title {
  margin-top: 1rem;
  font-size: clamp(28px, 3rem, 54px);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.join__desc {
  max-width: 52ch;
  margin-top: 1rem;
  color: var(--muted-fg-dark);
  font-size: clamp(12px, 1.1rem, 19px);
  line-height: 1.6;
}

.join .btn {
  flex: none;
}

/* ---------- footer ---------- */
.footer {
  position: relative;
  padding: 6rem 0 0 var(--rail);
  background: var(--card);
  border-top: 1px solid var(--line);
  overflow: clip;
}

.footer__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 3rem;
  padding-bottom: 4rem;
}

.footer__brand {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.footer__brand svg {
  width: 3rem;
  color: var(--ink);
}

.footer__brand span {
  display: grid;
  gap: 0.35rem;
}

.footer__brand b {
  font-size: clamp(14px, 1.3rem, 23px);
  font-weight: 800;
}

.footer__brand small {
  font-family: var(--font-data);
  font-size: clamp(8px, 0.68rem, 12px);
  letter-spacing: 0.14em;
  color: var(--gray);
}

.footer__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem 2rem;
  font-size: clamp(11px, 0.95rem, 16px);
  color: var(--gray-4);
}

.footer__nav a {
  border-bottom: 1px solid transparent;
  transition: color 0.18s ease, border-color 0.18s ease;
}

.footer__nav a:hover {
  color: var(--ink);
  border-color: var(--ink);
}

.footer__meta {
  font-family: var(--font-data);
  font-size: clamp(9px, 0.75rem, 13px);
  line-height: 1.8;
  color: var(--gray);
  text-align: right;
}

.footer__hollow {
  font-family: var(--font-display);
  font-size: clamp(60px, 14rem, 224px);
  font-weight: 900;
  line-height: 0.78;
  letter-spacing: -0.045em;
  text-align: center;
  white-space: nowrap;
  color: transparent;
  background-image: linear-gradient(
    -45deg,
    transparent 0 16.161%,
    var(--ink) 16.161% 33.839%,
    transparent 33.839% 66.161%,
    var(--ink) 66.161% 83.839%,
    transparent 83.839% 100%
  );
  background-size: 0.5rem 0.5rem;
  -webkit-background-clip: text;
  background-clip: text;
  opacity: 0.14;
  transform: translateY(0.12em);
  user-select: none;
}

/* ---------- modal ---------- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 2rem;
}

.modal[hidden] {
  display: none;
}

.modal__scrim {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal__panel {
  position: relative;
  width: min(72rem, 100%);
  max-height: 90vh;
  max-height: 90dvh;
  overflow: auto;
  background: var(--card);
  border-radius: 4px;
  box-shadow: 0 2rem 6rem rgba(0, 0, 0, 0.45);
  animation: panelIn 0.3s var(--ease);
}

@keyframes panelIn {
  from { opacity: 0; transform: translateY(1rem); }
  to { opacity: 1; transform: none; }
}

.modal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.2rem 2rem;
  background: var(--ink);
  color: var(--white);
  font-family: var(--font-data);
  font-size: clamp(9px, 0.78rem, 13px);
  letter-spacing: 0.16em;
}

.modal__close {
  display: grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  color: var(--white);
  transition: background-color 0.18s ease, color 0.18s ease;
}

.modal__close:hover {
  background: var(--yellow);
  color: var(--ink);
}

.modal__close .icon {
  width: 1.1rem;
  height: 1.1rem;
}

.modal__form {
  display: grid;
  gap: 1.5rem;
  padding: 2.5rem;
}

.field-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
}

.field {
  display: grid;
  gap: 0.6rem;
}

.field > span {
  font-family: var(--font-data);
  font-size: clamp(8px, 0.72rem, 12px);
  letter-spacing: 0.14em;
  color: var(--gray);
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 0.95rem 1rem;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: var(--off);
  color: var(--ink);
  font-size: clamp(13px, 1.05rem, 18px);
  transition: border-color 0.18s ease, background-color 0.18s ease;
}

.field textarea {
  resize: vertical;
  min-height: 9rem;
  line-height: 1.6;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: 0;
  border-color: var(--ink);
  background: var(--card);
}

.field input::placeholder,
.field textarea::placeholder {
  color: var(--gray-2);
}

.modal__hint {
  font-family: var(--font-data);
  font-size: clamp(9px, 0.75rem, 13px);
  color: var(--gray);
}

.modal__actions {
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
  margin-top: 0.5rem;
}

.modal__actions .btn--ghost {
  border-color: var(--line);
  color: var(--ink);
}

.modal__actions .btn--ghost:hover {
  border-color: var(--ink);
  background: var(--off);
  color: var(--ink);
}

/* ---------- toast ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 3rem;
  z-index: 140;
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  max-width: min(52rem, calc(100% - 3rem));
  padding: 1rem 1.8rem;
  background: var(--ink);
  color: var(--white);
  border-left: 0.25rem solid var(--yellow);
  box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.35);
  font-size: clamp(12px, 1rem, 17px);
  transform: translateX(-50%);
  animation: toastIn 0.26s var(--ease);
}

.toast[hidden] {
  display: none;
}

.toast[data-tone="error"] {
  border-left-color: var(--pink);
}

@keyframes toastIn {
  from { opacity: 0; transform: translate(-50%, 0.7rem); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

.noscript {
  position: fixed;
  left: 2rem;
  right: 2rem;
  bottom: 2rem;
  z-index: 100;
  padding: 1rem;
  background: var(--yellow);
  color: var(--ink);
  font-size: 14px;
  text-align: center;
}

/* ---------- narrow landscape / small screens ---------- */
@media (max-width: 1180px) {
  .tower {
    display: none;
  }

  .notice-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 3rem;
  }

  .notice-intro {
    position: static;
  }

  .archive__head,
  .file {
    grid-template-columns: 4rem minmax(0, 1fr) 7rem 7rem 8rem;
    gap: 1.25rem;
  }
}

@media (max-width: 900px) and (orientation: landscape) {
  .hero__wrap {
    grid-template-columns: minmax(0, 1fr) minmax(0, 0.8fr);
    gap: 2rem;
  }

  .hero__title {
    font-size: clamp(38px, 6.4rem, 100px);
  }

  .post-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ---------- portrait ---------- */
@media (orientation: portrait) {
  main {
    padding-left: 0;
    padding-top: 9rem;
    padding-bottom: 9.625rem;
  }

  .rail {
    display: none;
  }

  .mtop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 60;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 9rem;
    padding: 0 2rem;
    background: var(--card);
    border-bottom: 1px solid var(--line);
  }

  .mtop__brand {
    display: flex;
    align-items: center;
    gap: 0.8rem;
  }

  .mtop__brand svg {
    width: 3.6rem;
    color: var(--ink);
  }

  .mtop__brand span {
    display: grid;
    gap: 0.2rem;
  }

  .mtop__brand b {
    font-size: 1.9rem;
    font-weight: 800;
    line-height: 1;
  }

  .mtop__brand small {
    font-family: var(--font-data);
    font-size: clamp(8px, 1.05rem, 12px);
    letter-spacing: 0.18em;
    color: var(--gray);
  }

  .mtop__login {
    padding: 0.9rem 1.4rem;
    background: var(--ink);
    color: var(--white);
    border-radius: 2px;
    font-family: var(--font-data);
    font-size: clamp(10px, 1.15rem, 13px);
    letter-spacing: 0.14em;
  }

  .mtop__login.is-user {
    background: var(--yellow);
    color: var(--ink);
  }

  .mbottom {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 60;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    height: 9.625rem;
    padding-bottom: env(safe-area-inset-bottom, 0);
    background: var(--card);
    border-top: 1px solid var(--line);
  }

  .mbottom__item {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    color: var(--gray);
    font-size: clamp(11px, 1.35rem, 15px);
    line-height: 1;
  }

  .mbottom__item::before {
    content: "";
    position: absolute;
    top: 0;
    left: 20%;
    right: 20%;
    height: 0.25rem;
    background: var(--yellow);
    transform: scaleX(0);
    transition: transform 0.25s var(--ease);
  }

  .mbottom__item .icon {
    width: 2.4rem;
    height: 2.4rem;
  }

  .mbottom__item.is-active {
    color: var(--ink);
    font-weight: 700;
  }

  .mbottom__item.is-active::before {
    transform: none;
  }

  .wrap {
    width: min(54.375rem, calc(100% - 3.75rem));
  }

  .hero {
    min-height: calc(100svh - 9rem - 9.625rem);
    padding: 7rem 0 8rem;
  }

  .hero__wrap {
    grid-template-columns: minmax(0, 1fr);
    gap: 3rem;
  }

  .hero__copy {
    order: 2;
  }

  .hero__art {
    order: 1;
    justify-self: center;
    width: min(100%, 42rem);
  }

  .hero__watermark {
    top: auto;
    bottom: 10rem;
    font-size: 18rem;
    opacity: 0.7;
  }

  .hero__side,
  .hero__cue {
    display: none;
  }

  .hero__title {
    font-size: clamp(42px, 8.6rem, 112px);
  }

  .hero__stats {
    margin-top: 3rem;
  }

  .hero__desc {
    max-width: 100%;
  }

  .dock__wrap {
    grid-template-columns: minmax(0, 1fr);
  }

  .dock__item {
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding: 1.8rem 1.2rem;
  }

  .dock__item:last-child {
    border-bottom: 0;
  }

  .ef-divider {
    height: 7rem;
    padding: 1.4rem 0 0 3.75rem;
  }

  .section--lobby,
  .section--library,
  .section--notice {
    padding: 9rem 0 7rem;
  }

  .sec-title {
    width: 100%;
    height: 5rem;
  }

  .sec-title__bar {
    width: 5.5rem;
  }

  .sec-title__en {
    left: 5.5rem;
    font-size: 2.1rem;
  }

  .sec-title__cn {
    top: 2.2rem;
    font-size: 3.2rem;
  }

  .section__hollow {
    top: 2rem;
    right: -1rem;
    font-size: 10rem;
    letter-spacing: -0.4rem;
  }

  .section__head {
    flex-direction: column;
    align-items: flex-start;
    gap: 1.6rem;
    margin: 3rem 0 2.4rem;
  }

  .section__tools {
    align-items: center;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: space-between;
    width: 100%;
    gap: 1rem;
  }

  .statement {
    font-size: 4.8rem;
  }

  .section__intro {
    font-size: 2.5rem;
    line-height: 1.55;
  }

  .filterbar {
    flex-wrap: wrap;
    gap: 0.6rem;
    padding: 0.8rem 0;
    margin-bottom: 2rem;
  }

  .filterbar__line,
  .filterbar__hint {
    display: none;
  }

  .chip {
    padding: 0.6rem 1.1rem;
    font-size: 2rem;
  }

  .post-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 1rem;
  }

  .post,
  .post.is-featured {
    min-height: 0;
    padding: 2.2rem;
  }

  .post__deco {
    display: none;
  }

  .post h3 {
    font-size: 3.4rem;
  }

  .post__body {
    padding: 1.6rem 0 1.4rem;
  }

  .post__body p {
    font-size: 2.35rem;
  }

  .post__foot {
    font-size: 1.7rem;
  }

  .post__status,
  .tag {
    font-size: clamp(10px, 1.55rem, 15px);
  }

  .archive__head {
    display: none;
  }

  .file {
    grid-template-columns: 2.6rem minmax(0, 1fr);
    gap: 0.7rem 1.2rem;
    padding: 2rem 0;
  }

  .file__index {
    grid-row: 1 / span 3;
    font-size: 1.7rem;
  }

  .file h3 {
    font-size: 2.8rem;
  }

  .file p {
    font-size: 2rem;
  }

  .file__tags {
    font-size: clamp(10px, 1.5rem, 14px);
  }

  .file__type,
  .file__size {
    grid-column: 2;
    justify-self: start;
    font-size: clamp(10px, 1.5rem, 14px);
  }

  .file__size {
    display: inline;
  }

  .file__action {
    grid-column: 2;
    justify-self: start;
    margin-top: 0.4rem;
    font-size: 1.8rem;
  }

  .pager {
    flex-direction: column;
    align-items: stretch;
    gap: 1.6rem;
    margin-top: 3.2rem;
    padding-top: 2.4rem;
  }

  .pager__meta {
    grid-template-columns: 1fr auto;
    align-items: end;
    gap: 0.5rem 1rem;
    font-size: 1.6rem;
  }

  .pager__meta strong {
    font-size: 2.8rem;
  }

  .pager__meta em {
    grid-column: 1 / -1;
    font-size: 1.5rem;
  }

  .pager__ctrl {
    justify-content: space-between;
  }

  .pager__numbers {
    gap: 0.8rem;
    overflow-x: auto;
  }

  .pager__arrow,
  .pager__number {
    height: 7.6rem;
    min-width: 6rem;
    padding: 0 1.6rem;
    font-size: 1.9rem;
  }

  .pager__number {
    min-width: 5.4rem;
    padding: 0;
  }

  .notice-grid {
    margin-top: 3rem;
  }

  .notice-stats {
    font-size: 1.5rem;
  }

  .announcement {
    padding: 2rem;
  }

  .announcement h3 {
    font-size: 2.8rem;
  }

  .announcement p {
    font-size: 2.1rem;
  }

  .join {
    flex-direction: column;
    align-items: flex-start;
    padding: 2.4rem;
    margin-top: 5rem;
  }

  .join__title {
    font-size: 4.4rem;
  }

  .join__desc {
    font-size: 2.2rem;
  }

  .footer {
    padding: 4rem 0 9.625rem;
  }

  .footer__top {
    flex-direction: column;
    gap: 2rem;
    padding-bottom: 2.5rem;
  }

  .footer__meta {
    text-align: left;
    font-size: clamp(11px, 1.5rem, 16px);
  }

  .footer__nav {
    font-size: 2rem;
  }

  .footer__hollow {
    font-size: 12rem;
  }

  .modal {
    align-items: end;
    padding: 0;
  }

  .modal__panel {
    width: 100%;
    max-height: 92svh;
    border-radius: 4px 4px 0 0;
  }

  .modal__form {
    padding: 2rem;
    gap: 1.2rem;
  }

  .field-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 1.2rem;
  }

  .field input,
  .field select,
  .field textarea {
    font-size: 2.2rem;
    padding: 1rem;
  }

  .field input,
  .field select {
    min-height: 7rem;
  }

  .field textarea {
    min-height: 12rem;
  }

  .field > span,
  .modal__hint {
    font-size: 1.8rem;
  }

  .modal__actions {
    flex-direction: column-reverse;
  }

  .modal__actions .btn {
    width: 100%;
  }

  .toast {
    bottom: 11rem;
    font-size: 1.9rem;
    padding: 1.1rem 1.6rem;
  }

  .boot__rail {
    left: 2rem;
    width: 0.9rem;
  }

  .boot__meta {
    left: 4rem;
    bottom: 4rem;
    font-size: clamp(9px, 1.3rem, 14px);
  }

  .boot__foot {
    right: 2rem;
    bottom: 2rem;
    font-size: 1.1rem;
    max-width: 60%;
    text-align: right;
  }

  .boot__log {
    min-width: 0;
    width: 100%;
    font-size: clamp(9px, 1.3rem, 14px);
  }

  .boot__logo {
    width: 8rem;
  }

  .boot__word {
    font-size: 5rem;
  }

  .boot__sub {
    font-size: 1.4rem;
  }

  .section {
    scroll-margin-top: 9rem;
  }

  .btn {
    min-height: 7.5rem;
    padding: 0 1.8rem;
    font-size: 2.1rem;
  }

  .section__tools .btn {
    padding-left: 2.6rem;
  }

  .chip {
    min-height: 7rem;
    padding: 0.9rem 1.4rem;
  }

  .mtop__login {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 6.8rem;
  }

  .search input {
    height: 6rem;
  }

  .file__action {
    min-height: 6.8rem;
    padding: 0 1.6rem;
  }

  .modal__close {
    width: 7rem;
    height: 7rem;
  }

  .post__action {
    padding: 0.6rem 0;
  }
}

/* ---------- tiny portrait ---------- */
@media (orientation: portrait) and (max-width: 520px) {
  .search {
    width: 100%;
    max-width: 100%;
    margin-left: 0;
    order: 3;
  }

  .filterbar--dark {
    align-items: stretch;
  }

  .filterbar__group {
    flex-wrap: wrap;
  }
}

/* ---------- hover only ---------- */
@media (hover: none) {
  .rail__item:hover::before,
  .dock__item:hover::before,
  .file:hover::before {
    opacity: 0;
    transform: scaleX(0);
  }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .boot {
    display: none !important;
  }

  .hero__title .line > span,
  .hero__art,
  .post,
  .file,
  .announcement {
    opacity: 1 !important;
    clip-path: none !important;
    transform: none !important;
  }

  .sec-title__inner {
    transform: none !important;
  }

  .sec-title__en,
  .sec-title__cn,
  .ef-divider__sub,
  .ef-divider__title {
    opacity: 1 !important;
    transform: none !important;
  }

  .ef-divider::before {
    transform: none !important;
  }
}
