@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&family=VT323&display=swap');

:root {
  --ink: #000000;
  --paper: #ffffff;
  --line: rgba(0, 0, 0, 0.16);
  --pad: clamp(1.1rem, 5vw, 4rem);
  --pix: "Press Start 2P", "VT323", ui-monospace, monospace;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: system-ui, -apple-system, "Segoe UI", "Noto Sans SC", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 17px;
  line-height: 1.75;
  padding-bottom: clamp(120px, 24vw, 156px);
  overflow-x: hidden;
}

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

a {
  color: var(--ink);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ---------- 底部固定面板 ---------- */

.dock {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 90;
  background: var(--paper);
  border-top: 3px solid var(--ink);
}

.dock-top {
  padding: 0.55rem var(--pad);
  border-bottom: 1px solid var(--ink);
}

.brand {
  display: inline-block;
  font-size: clamp(1rem, 4.4vw, 1.35rem);
  font-weight: 900;
  letter-spacing: -0.04em;
  text-decoration: none;
  padding: 0.25rem 0;
  min-height: 28px;
  line-height: 1.2;
}

.brand:hover {
  background: var(--ink);
  color: var(--paper);
}

.dock-bot {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem var(--pad);
}

.nav {
  position: relative;
  z-index: 95;
  flex: 0 0 auto;
}

.nav > summary {
  list-style: none;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 0.95rem;
  border: 2px solid var(--ink);
  font-weight: 800;
  font-size: 0.95rem;
  letter-spacing: 0.06em;
  cursor: pointer;
  background: var(--paper);
  color: var(--ink);
  user-select: none;
}

.nav > summary::-webkit-details-marker {
  display: none;
}

.nav > summary:hover,
.nav[open] > summary {
  background: var(--ink);
  color: var(--paper);
}

.nav:focus-within > summary {
  outline: 3px solid var(--ink);
  outline-offset: 2px;
}

.nav > menu {
  position: fixed;
  inset: 0;
  z-index: 92;
  margin: 0;
  padding: clamp(2.5rem, 9vw, 5rem) var(--pad) 12rem;
  list-style: none;
  background: var(--ink);
  color: var(--paper);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.nav > menu li {
  border-bottom: 1px solid rgba(255, 255, 255, 0.28);
}

.nav > menu a {
  display: block;
  min-height: 44px;
  padding: 0.45rem 0.15rem;
  color: var(--paper);
  text-decoration: none;
  font-size: clamp(1.35rem, 6.2vw, 3rem);
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1.2;
}

.nav > menu a:hover {
  color: var(--ink);
  background: var(--paper);
  padding-left: 0.7rem;
}

.find {
  flex: 1 1 auto;
  display: flex;
  min-width: 0;
}

.find input {
  width: 100%;
  min-height: 44px;
  border: 2px solid var(--ink);
  border-radius: 0;
  background: var(--paper);
  color: var(--ink);
  padding: 0 0.75rem;
  font-family: inherit;
  font-size: 16px;
  line-height: 1.4;
}

.find input::placeholder {
  color: rgba(0, 0, 0, 0.5);
}

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

/* ---------- 首屏 ---------- */

.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  grid-template-rows: 1fr auto;
  gap: 1.25rem;
  padding: clamp(1rem, 4vw, 2.5rem) var(--pad) clamp(1.5rem, 5vw, 3rem);
  border-bottom: 6px solid var(--ink);
}

.art {
  position: relative;
  min-height: 0;
}

.art img {
  position: absolute;
  object-fit: cover;
  border: 3px solid var(--ink);
  box-shadow: 12px 12px 0 var(--ink);
  background: #ededed;
}

.art .hero-a {
  width: min(52%, 340px);
  height: min(62%, 320px);
  left: 0;
  top: 8%;
}

.art .hero-b {
  width: min(38%, 250px);
  height: min(48%, 230px);
  right: 4%;
  bottom: 2%;
}

.say {
  position: relative;
  z-index: 2;
  text-align: right;
}

.say h1 {
  margin: 0;
  font-size: clamp(2.6rem, 10vw, 9rem);
  font-weight: 900;
  letter-spacing: -0.05em;
  line-height: 0.92;
  overflow-wrap: anywhere;
}

.lede {
  margin: 1.1rem 0 0 auto;
  max-width: 46ch;
  font-size: clamp(1rem, 1.7vw, 1.15rem);
  line-height: 1.8;
}

/* ---------- 主体框架 ---------- */

.wrap {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(1.5rem, 5vw, 3rem);
  max-width: 1200px;
  margin: 0 auto;
  padding: clamp(2rem, 6vw, 4.5rem) var(--pad) clamp(2rem, 7vw, 5rem);
}

.side {
  border-top: 5px solid var(--ink);
  padding-top: 0.7rem;
}

.side small {
  display: block;
  font-family: var(--pix);
  font-size: 9px;
  letter-spacing: 0.22em;
  color: rgba(0, 0, 0, 0.7);
}

.side h2 {
  margin: 0.5rem 0 0.65rem;
  font-size: 1.2rem;
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.side ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.side li + li {
  border-top: 1px solid var(--line);
}

.side a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0.35rem 0.1rem;
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.4;
}

.side a:hover {
  background: var(--ink);
  color: var(--paper);
  padding-left: 0.55rem;
}

.doc {
  min-width: 0;
}

/* ---------- 正文 ---------- */

section {
  min-width: 0;
}

section > div {
  padding-bottom: clamp(2.2rem, 6vw, 3.6rem);
  border-bottom: 1px solid var(--line);
  margin-bottom: clamp(2rem, 5vw, 3rem);
  scroll-margin-top: 1.5rem;
}

section > div:last-child {
  border-bottom: 0;
  margin-bottom: 0;
  padding-bottom: 0;
}

section h2 {
  margin: 0 0 1rem;
  font-size: clamp(1.6rem, 4.4vw, 2.5rem);
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1.16;
}

section h3 {
  margin: 2rem 0 0.7rem;
  font-size: clamp(1.15rem, 2.6vw, 1.4rem);
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1.3;
}

section small {
  display: block;
  font-family: var(--pix);
  font-size: 9px;
  letter-spacing: 0.2em;
  line-height: 2;
  margin-bottom: 0.55rem;
  color: rgba(0, 0, 0, 0.66);
}

section p {
  margin: 0 0 1.15rem;
  max-width: 68ch;
}

section ul,
section ol {
  margin: 0 0 1.3rem;
  padding-left: 1.3rem;
  max-width: 66ch;
}

section li {
  margin-bottom: 0.5rem;
}

section li::marker {
  font-weight: 800;
}

section strong {
  font-weight: 800;
  background: var(--ink);
  color: var(--paper);
  padding: 0 0.22em;
}

section a {
  text-underline-offset: 3px;
  text-decoration-thickness: 2px;
}

section a:hover {
  background: var(--ink);
  color: var(--paper);
  text-decoration: none;
}

section blockquote {
  margin: 1.6rem 0;
  padding: 0.35rem 0 0.35rem 1.1rem;
  border-left: 6px solid var(--ink);
  font-size: 1.05rem;
}

section blockquote p:last-child {
  margin-bottom: 0;
}

section img {
  border: 3px solid var(--ink);
  margin: 1.5rem 0;
}

section figure {
  margin: 1.5rem 0;
}

section figcaption {
  font-size: 0.85rem;
  padding-top: 0.5rem;
  color: rgba(0, 0, 0, 0.7);
}

section time {
  display: inline-block;
  font-family: ui-monospace, "SFMono-Regular", "VT323", monospace;
  font-size: 0.9rem;
  letter-spacing: 0.05em;
  border-bottom: 2px solid var(--ink);
}

section table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.95rem;
}

section th,
section td {
  border: 2px solid var(--ink);
  padding: 0.6rem 0.7rem;
  text-align: left;
  vertical-align: top;
}

section th {
  font-weight: 900;
  background: var(--ink);
  color: var(--paper);
}

section code {
  font-family: ui-monospace, "SFMono-Regular", monospace;
  font-size: 0.92em;
  border: 1px solid var(--ink);
  padding: 0 0.25em;
}

section pre {
  overflow-x: auto;
  border: 3px solid var(--ink);
  padding: 1rem;
}

section pre code {
  border: 0;
  padding: 0;
}

section hr {
  border: 0;
  border-top: 6px solid var(--ink);
  margin: 2.5rem 0;
}

/* ---------- 滚动显现 ---------- */

.rv {
  opacity: 0;
  transform: translateY(22px);
}

.rv.in {
  opacity: 1;
  transform: none;
  transition: opacity 0.55s ease, transform 0.55s ease;
}

/* ---------- 页脚 ---------- */

footer {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem 1.1rem;
  align-items: start;
  border-top: 6px solid var(--ink);
  padding: clamp(2rem, 6vw, 4rem) var(--pad) clamp(1.5rem, 4vw, 2.5rem);
}

footer p {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.7;
  overflow-wrap: anywhere;
}

footer .foot-brand {
  grid-column: 1 / -1;
  font-size: clamp(2.4rem, 13vw, 9rem);
  font-weight: 900;
  letter-spacing: -0.06em;
  line-height: 0.86;
  word-break: break-all;
}

footer .foot-kw {
  font-weight: 800;
  border-top: 3px solid var(--ink);
  padding-top: 0.5rem;
}

footer .foot-nav {
  grid-column: span 2;
  border-top: 3px solid var(--ink);
  padding-top: 0.5rem;
  line-height: 2.1;
}

footer .foot-nav a {
  text-decoration: none;
  font-weight: 600;
}

footer .foot-nav a:hover {
  background: var(--ink);
  color: var(--paper);
}

footer .foot-top {
  border-top: 3px solid var(--ink);
  padding-top: 0.5rem;
}

footer .foot-top a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-weight: 700;
  text-decoration: none;
  border-bottom: 3px solid var(--ink);
}

footer .foot-top a:hover {
  background: var(--ink);
  color: var(--paper);
}

footer small {
  grid-column: 1 / -1;
  display: block;
  text-align: center;
  border-top: 1px solid var(--line);
  padding-top: 1rem;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
}

/* ---------- 断点 ---------- */

@media (min-width: 720px) {
  footer {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  footer .foot-nav {
    grid-column: span 2;
  }
}

@media (min-width: 880px) {
  .wrap {
    grid-template-columns: minmax(150px, 208px) minmax(0, 1fr);
  }
  .side {
    position: sticky;
    top: 2rem;
  }
  .hero {
    padding-bottom: clamp(2rem, 4vw, 3rem);
  }
  .say h1 {
    line-height: 0.88;
  }
}

@media (max-width: 480px) {
  .art .hero-a {
    width: 58%;
    height: 54%;
    top: 6%;
  }
  .art .hero-b {
    width: 40%;
    height: 38%;
    right: 0;
    bottom: 4%;
    box-shadow: 8px 8px 0 var(--ink);
  }
  .art .hero-a {
    box-shadow: 8px 8px 0 var(--ink);
  }
  .side small,
  section small {
    letter-spacing: 0.14em;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .rv {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .nav > menu a,
  .side a,
  .rv.in {
    transition: none;
  }
}

button[aria-expanded]{min-width:44px;min-height:44px}
