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

:root {
  --ink: #26171a;
  --surface: #322227;
  --surface-hi: #3d2a30;
  --pink: #eb879c;
  --pink-soft: #ffb6c1;
  --text: #f8eef0;
  --body: #efdfe2;
  --muted: #cdb4ba;
  --line: rgba(255, 182, 193, 0.18);
  --r: 10px;
  --sh: 0 1px 2px rgba(0, 0, 0, 0.35), 0 6px 16px rgba(0, 0, 0, 0.28);
  --sh-hi: 0 2px 4px rgba(0, 0, 0, 0.36), 0 14px 30px rgba(0, 0, 0, 0.34);
  --sh-in: inset 0 1px 0 rgba(255, 246, 248, 0.06);
  --fast: 240ms cubic-bezier(0.2, 0.7, 0.3, 1);
  --pixel: 'Press Start 2P', 'PingFang SC', 'Hiragino Sans GB',
    'Microsoft YaHei', monospace;
}

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

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

body {
  margin: 0;
  background-color: var(--ink);
  background-image: radial-gradient(
      circle at 18% -8%,
      rgba(235, 135, 156, 0.2),
      transparent 52%
    ),
    radial-gradient(circle at 92% 2%, rgba(255, 182, 193, 0.1), transparent 44%);
  background-repeat: no-repeat;
  color: var(--text);
  font-family: 'VT323', ui-sans-serif, system-ui, 'PingFang SC',
    'Microsoft YaHei', sans-serif;
  font-size: 19px;
  line-height: 1.62;
}

body.lock {
  overflow: hidden;
}

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

a {
  color: var(--pink-soft);
  text-underline-offset: 3px;
}

a:hover {
  color: #ffffff;
}

:focus-visible {
  outline: 3px solid var(--pink-soft);
  outline-offset: 3px;
  border-radius: 6px;
}

article section[id] {
  scroll-margin-top: 104px;
}

/* ---------- 顶部两行 ---------- */
header.top {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(38, 23, 26, 0.86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.brandrow {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  min-height: 62px;
  max-width: 1180px;
  margin: 0 auto;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  padding: 0 4px;
  color: var(--pink-soft);
  text-decoration: none;
  border-radius: 8px;
}

.logo img {
  border-radius: 6px;
  box-shadow: var(--sh);
}

.logo-txt {
  font-family: var(--pixel);
  font-size: 13px;
  letter-spacing: 0.04em;
  line-height: 1.5;
}

.cta {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 10px 16px;
  border-radius: var(--r);
  background: linear-gradient(160deg, var(--pink-soft), var(--pink));
  color: var(--ink);
  font-weight: 700;
  font-size: 16px;
  text-decoration: none;
  box-shadow: var(--sh), var(--sh-in);
  transition: transform var(--fast), box-shadow var(--fast);
}

.cta:hover {
  color: var(--ink);
  transform: translateY(-2px);
  box-shadow: var(--sh-hi);
}

.burger {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 4px;
  width: 46px;
  height: 46px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--surface);
  box-shadow: var(--sh);
  cursor: pointer;
  transition: background var(--fast), transform var(--fast);
}

.burger span {
  width: 20px;
  height: 2px;
  border-radius: 2px;
  background: var(--pink-soft);
}

.burger:hover {
  background: var(--surface-hi);
  transform: translateY(-1px);
}

/* ---------- 全屏遮罩菜单 ---------- */
.menu {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 72px 18px 30px;
  overflow-y: auto;
  background: rgba(26, 15, 18, 0.97);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--fast), visibility var(--fast);
}

.menu.open {
  opacity: 1;
  visibility: visible;
}

.menu .close {
  position: absolute;
  top: 14px;
  right: 16px;
  min-height: 44px;
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 16px;
  cursor: pointer;
}

.menu .close:hover {
  color: var(--pink-soft);
  border-color: var(--pink);
}

.menu p {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0;
  width: 100%;
  max-width: 420px;
  text-align: center;
}

.menu p a {
  display: block;
  padding: 14px 16px;
  min-height: 50px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--surface);
  box-shadow: var(--sh);
  color: var(--text);
  text-decoration: none;
  font-family: var(--pixel);
  font-size: 13px;
  line-height: 1.6;
  letter-spacing: 0.03em;
  transition: transform var(--fast), color var(--fast),
    border-color var(--fast);
}

.menu p a:hover {
  color: var(--pink-soft);
  border-color: var(--pink);
  transform: translateY(-2px);
}

/* ---------- 首屏 ---------- */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: 26px;
  max-width: 1180px;
  min-height: 45vh;
  margin: 0 auto;
  padding: 30px 16px 12px;
}

.collage {
  position: relative;
  min-height: 250px;
}

.collage .shot {
  position: absolute;
  width: 64%;
  height: 76%;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--sh-hi);
}

.collage .shot:first-child {
  left: 0;
  top: 0;
  transform: rotate(-3deg);
  z-index: 1;
}

.collage .shot:last-child {
  right: 0;
  bottom: 0;
  width: 56%;
  height: 62%;
  transform: rotate(3deg);
  z-index: 2;
}

.collage .ph {
  background: linear-gradient(140deg, var(--surface-hi), var(--surface));
}

.badge {
  position: absolute;
  left: 4%;
  bottom: 4%;
  z-index: 3;
  transform: rotate(-6deg);
  padding: 8px 11px;
  border-radius: 8px;
  background: var(--pink);
  color: var(--ink);
  font-family: var(--pixel);
  font-size: 10px;
  line-height: 1.6;
  letter-spacing: 0.02em;
  box-shadow: var(--sh-hi);
}

.hero-txt {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 14px;
  text-align: right;
}

h1 {
  margin: 0;
  color: #ffffff;
  font-family: var(--pixel);
  font-size: clamp(21px, 3.5vw, 34px);
  line-height: 1.6;
  letter-spacing: 0.02em;
}

.scope {
  max-width: 44ch;
  margin: 0;
  color: var(--muted);
  font-size: 18px;
}

/* ---------- 正文骨架 ---------- */
.wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 26px 16px 0;
}

.stage {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 272px;
  align-items: start;
  gap: 26px;
}

article {
  min-width: 0;
}

article > section {
  margin-bottom: 20px;
  padding: 22px 20px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--surface);
  box-shadow: var(--sh), var(--sh-in);
}

article h2 {
  margin: 0;
  color: var(--pink-soft);
  font-family: var(--pixel);
  font-size: clamp(15px, 2.2vw, 20px);
  line-height: 1.65;
  letter-spacing: 0.01em;
}

h2 + hr {
  width: 68px;
  height: 3px;
  margin: 0.55rem 0 1.1rem;
  border: 0;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--pink), transparent);
}

article h3 {
  margin: 1.5rem 0 0.3rem;
  color: var(--pink);
  font-size: 21px;
  line-height: 1.55;
}

article p {
  margin: 0 0 1rem;
  color: var(--body);
}

article ul,
article ol {
  margin: 0 0 1rem;
  padding-left: 1.25em;
}

article li {
  margin: 0.35rem 0;
  color: var(--body);
}

article strong {
  color: #ffffff;
}

article blockquote {
  margin: 1rem 0;
  padding: 0.7rem 1rem;
  border-left: 3px solid var(--pink);
  border-radius: 0 var(--r) var(--r) 0;
  background: var(--surface-hi);
  color: var(--body);
}

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

article code {
  padding: 1px 5px;
  border-radius: 4px;
  background: var(--ink);
  color: var(--pink-soft);
  font-family: 'VT323', ui-monospace, monospace;
  font-size: 18px;
}

article table {
  display: block;
  width: 100%;
  overflow-x: auto;
  margin: 0 0 1rem;
  border-collapse: collapse;
  font-size: 17px;
}

article th,
article td {
  padding: 8px 10px;
  border: 1px solid var(--line);
  text-align: left;
  color: var(--body);
}

article th {
  background: var(--surface-hi);
  color: var(--pink-soft);
}

article img {
  margin: 1rem 0;
  border-radius: var(--r);
  box-shadow: var(--sh);
}

/* ---------- 右侧栏 ---------- */
.rail {
  position: sticky;
  top: 82px;
  padding: 16px 14px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--surface);
  box-shadow: var(--sh), var(--sh-in);
}

.rail h2 {
  margin: 0;
  color: var(--pink-soft);
  font-family: var(--pixel);
  font-size: 12px;
  line-height: 1.7;
  letter-spacing: 0.05em;
}

.rail hr {
  width: 44px;
  height: 3px;
  margin: 0.55rem 0 0.9rem;
  border: 0;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--pink), transparent);
}

.toc {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.toc a {
  display: block;
  min-height: 44px;
  padding: 10px;
  border-left: 2px solid transparent;
  border-radius: 8px;
  color: var(--text);
  text-decoration: none;
  font-size: 17px;
  line-height: 1.5;
  transition: background var(--fast), border-color var(--fast),
    color var(--fast);
}

.toc a:hover {
  color: #ffffff;
  background: var(--surface-hi);
  border-left-color: var(--pink);
}

.totop {
  width: 100%;
  min-height: 44px;
  margin-top: 14px;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-hi);
  color: var(--text);
  font: inherit;
  font-size: 16px;
  cursor: pointer;
  transition: color var(--fast), border-color var(--fast);
}

.totop:hover {
  color: var(--pink-soft);
  border-color: var(--pink);
}

/* ---------- 页脚 ---------- */
footer {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  align-items: start;
  gap: 22px;
  max-width: 1180px;
  margin: 44px auto 0;
  padding: 38px 16px 26px;
  border-top: 1px solid var(--line);
}

footer p {
  margin: 0;
}

.f-brand {
  color: var(--pink);
  font-family: var(--pixel);
  font-size: clamp(20px, 3.8vw, 34px);
  line-height: 1.55;
  letter-spacing: 0.02em;
  overflow-wrap: anywhere;
}

.f-brand a {
  color: inherit;
  text-decoration: none;
}

.f-title,
.f-host {
  color: var(--muted);
  font-size: 17px;
  overflow-wrap: anywhere;
}

footer small {
  grid-column: 1 / -1;
  margin-top: 6px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 16px;
}

/* ---------- 动效 ---------- */
.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 280ms ease, transform 280ms ease;
}

.reveal.in {
  opacity: 1;
  transform: none;
}

/* ---------- 断点 ---------- */
@media (max-width: 880px) {
  .hero {
    grid-template-columns: minmax(0, 1fr);
    min-height: 0;
    gap: 18px;
    padding-top: 18px;
  }

  .hero-txt {
    order: -1;
    align-items: flex-start;
    text-align: left;
  }

  .scope {
    max-width: 100%;
  }

  .collage {
    min-height: 210px;
  }

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

  .rail {
    position: static;
  }

  .toc {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .toc li {
    flex: 1 1 44%;
  }

  footer {
    grid-template-columns: 1fr 1fr;
  }

  .f-brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 520px) {
  .brandrow {
    gap: 8px;
  }

  .logo-txt {
    font-size: 11px;
  }

  .cta {
    padding: 10px 12px;
    font-size: 15px;
  }

  article > section {
    padding: 18px 16px;
  }

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

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

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  * {
    transition-duration: 1ms !important;
  }
}

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