@font-face {
  font-family: "Piano Display";
  src: url("/assets/piano-display.woff") format("woff");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --page: #0b1018;
  --surface: #101823;
  --line: #243141;
  --text: #eef3f8;
  --muted: #a5b2c2;
  --accent: #afd9f0;
  --ink: #0a1b2a;
  --display: "Piano Display", "Songti SC", "Noto Serif CJK SC", SimSun, serif;
  --body: system-ui, -apple-system, "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--page);
  color: var(--text);
  font-family: var(--body);
  font-size: 1rem;
  line-height: 1.75;
}

[hidden] { display: none !important; }
::selection { background: var(--accent); color: var(--ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
img { display: block; max-width: 100%; }
a { color: inherit; }
p, h1, h2, h3 { margin: 0; }

.container {
  width: min(72rem, calc(100% - 5rem));
  margin-inline: auto;
}

.skip-link {
  position: fixed;
  z-index: 10;
  inset: .5rem auto auto .5rem;
  transform: translateY(-150%);
  padding: .5rem 1rem;
  border-radius: .375rem;
  background: var(--accent);
  color: var(--ink);
}

.skip-link:focus { transform: none; }

.site-header {
  position: relative;
  z-index: 2;
  border-bottom: 1px solid #253242a3;
  background: #0c121b;
}

.header-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  min-height: 4.625rem;
  gap: 1.5rem;
}

.brand {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: .75rem;
  color: var(--text);
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: .07em;
  text-decoration: none;
  white-space: nowrap;
}

.brand img { flex-shrink: 0; }

.main-nav { display: flex; gap: 2.25rem; }

.main-nav a, .back-top {
  color: var(--muted);
  font-size: .875rem;
  text-decoration: none;
  white-space: nowrap;
  transition: color .18s ease;
}

.main-nav a:hover, .back-top:hover { color: var(--accent); }
.header-cta { justify-self: end; }

.button {
  display: inline-flex;
  min-height: 3.125rem;
  align-items: center;
  justify-content: center;
  gap: .625rem;
  padding: .625rem 1.25rem;
  border: 1px solid transparent;
  border-radius: .5rem;
  font: 650 .9375rem/1.4 var(--body);
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color .18s ease, border-color .18s ease, color .18s ease;
}

.button-primary {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--ink);
}

.button-primary:hover { border-color: #d3edff; background: #d3edff; }
.button-outline { border-color: #3a4d61; background: #101924b8; color: #e4edf5; }
.button-outline:hover { border-color: #81b4d0; background: #172433; color: #fff; }

.header-cta.button {
  min-height: 2.5rem;
  padding-inline: 1rem;
  font-size: .875rem;
}

.icon {
  position: relative;
  display: inline-block;
  flex: 0 0 auto;
  width: 1.125rem;
  height: 1.125rem;
}

.icon::before, .icon::after { position: absolute; content: ""; }

.icon-chat::before {
  inset: .125rem .0625rem .25rem;
  border: 1.5px solid currentColor;
  border-radius: .3rem;
}

.icon-chat::after {
  width: .3125rem;
  height: .3125rem;
  left: .3125rem;
  bottom: .125rem;
  border: solid currentColor;
  border-width: 0 0 1.5px 1.5px;
  background: var(--accent);
  transform: skewY(-35deg);
}

.button-primary:hover .icon-chat::after { background: #d3edff; }

.icon-copy::before {
  inset: .0625rem .3125rem .3125rem .0625rem;
  border: solid currentColor;
  border-width: 1.5px 0 0 1.5px;
  border-radius: .1875rem 0 0;
}

.icon-copy::after {
  inset: .3125rem .0625rem .0625rem .3125rem;
  border: 1.5px solid currentColor;
  border-radius: .1875rem;
}

.hero {
  position: relative;
  display: grid;
  align-items: center;
  min-height: clamp(34rem, 43vw, 42rem);
  isolation: isolate;
  overflow: hidden;
  background: #0a0f16;
  border-bottom: 1px solid #223040;
}

.hero-art {
  position: absolute;
  inset: 0 0 0 12%;
  z-index: -2;
}

.hero-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 54%;
}

.hero::after {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, #0a0f16 8%, #0a0f16eb 20%, #0a0f1640 56%, transparent 75%),
    linear-gradient(0deg, #0a0f16bf, transparent 27%);
  content: "";
}

.hero-inner { padding-block: 3.75rem 4.125rem; }
.hero-copy { max-width: max-content; }

.eyebrow {
  display: flex;
  align-items: center;
  gap: .625rem;
  margin-bottom: 1.25rem;
  color: #bcdef2;
  font-size: .875rem;
  font-weight: 650;
  letter-spacing: .15em;
}

.eyebrow span { width: 1.75rem; height: 1px; background: #87b8d6; }

.display-title { font-family: var(--display); font-weight: 700; }

.hero h1 {
  font-size: clamp(3.125rem, 4.6vw, 4.5rem);
  line-height: 1.27;
  letter-spacing: .012em;
}

.hero h1 span, .hero h1 em { display: block; }
.hero h1 em { color: var(--accent); font-style: normal; }

.hero-description {
  max-width: 25.5rem;
  margin-top: 1.375rem;
  color: #b7c4d2;
  font-size: 1.0625rem;
  line-height: 1.85;
}

.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.875rem; }

.hero-group {
  display: flex;
  align-items: center;
  gap: .625rem;
  margin-top: 1rem;
  color: var(--muted);
  font-size: .875rem;
}

.hero-group strong {
  color: #d4e1ed;
  font: 600 .9375rem/1 ui-monospace, "Consolas", monospace;
  letter-spacing: .075em;
}

.section {
  padding-top: 5rem;
  scroll-margin-top: .75rem;
}

.section-heading { margin-bottom: 1.75rem; }
.section h2 { font-size: clamp(1.75rem, 2.8vw, 2.375rem); line-height: 1.35; }
.section-heading p, .join-intro p { margin-top: .625rem; color: var(--muted); }

.score-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.125rem;
}

.score-card {
  display: flex;
  flex-direction: column;
  padding: 1.5rem;
  border: 1px solid var(--line);
  border-radius: .75rem;
  background: linear-gradient(140deg, #121d2a, var(--surface) 68%);
}

.card-icon {
  display: grid;
  width: 2.625rem;
  height: 2.625rem;
  place-items: center;
  margin-bottom: 1.0625rem;
  border: 1px solid #2e4a60;
  border-radius: .5rem;
  background: #172a3a;
  color: #a6d7ee;
}

.card-icon .icon { width: 1.25rem; height: 1.25rem; }

.icon-note::before {
  bottom: .125rem;
  left: .1875rem;
  width: .5rem;
  height: .375rem;
  border-radius: 50%;
  background: currentColor;
  transform: rotate(-18deg);
}

.icon-note::after {
  top: .125rem;
  left: .5625rem;
  width: .4375rem;
  height: .8125rem;
  border: solid currentColor;
  border-width: 2px 0 0 1.5px;
  transform: skewY(-15deg);
}

.icon-film {
  border: 1.5px solid currentColor;
  border-radius: .1875rem;
  background: linear-gradient(currentColor, currentColor) center / 100% 1px no-repeat;
}

.icon-film::before {
  inset: 0 auto 0 .1875rem;
  width: 1px;
  background: currentColor;
}

.icon-film::after {
  inset: 0 .1875rem 0 auto;
  width: 1px;
  background: currentColor;
}

.icon-book::before {
  inset: .125rem 50% .125rem .0625rem;
  border: 1.5px solid currentColor;
  border-radius: .1875rem .125rem .125rem .1875rem;
  transform: skewY(7deg);
}

.icon-book::after {
  inset: .125rem .0625rem .125rem calc(50% - 1px);
  border: 1.5px solid currentColor;
  border-radius: .125rem .1875rem .1875rem .125rem;
  transform: skewY(-7deg);
}

.score-card h3 { margin-bottom: .5rem; font-size: 1.125rem; line-height: 1.45; }
.score-card p { color: var(--muted); }

.score-card .score-example {
  margin-top: auto;
  padding-top: 1.125rem;
  color: #c1d6e6;
  font-size: .875rem;
}

.score-example span {
  margin-right: .4rem;
  padding-right: .625rem;
  border-right: 1px solid #3b5265;
  color: #a1c3d8;
}

.join-panel {
  padding: clamp(1.5rem, 4vw, 3.25rem);
  border: 1px solid #355168;
  border-radius: .875rem;
  background: radial-gradient(ellipse at 96% 0%, #1a344b, transparent 75%), #111c2a;
}

.join-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(21rem, 24rem);
  align-items: center;
  gap: 1.75rem;
}

.group-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .875rem 1.25rem;
  padding: 1rem 1.125rem;
  border: 1px solid #547288;
  border-radius: .625rem;
  background: #0c1926c9;
}

.group-field { display: grid; gap: .125rem; }
.group-field label { color: #a9c4d5; font-size: .875rem; }
.group-field input {
  width: 9ch;
  padding: 0;
  border: 0;
  border-radius: .125rem;
  background: transparent;
  color: #ecf6ff;
  font: 650 clamp(1.5rem, 2.2vw, 1.875rem)/1.3 ui-monospace, "Consolas", monospace;
}

.group-copy.button { min-height: 2.625rem; padding-inline: .875rem; font-size: .875rem; }

.join-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
  margin: 1.75rem 0 0;
  padding: 1.5rem 0 0;
  border-top: 1px solid #3a5266;
  list-style: none;
}

.join-steps li { display: flex; align-items: flex-start; gap: .75rem; }
.step-marker {
  display: grid;
  flex: 0 0 1.75rem;
  height: 1.75rem;
  place-items: center;
  margin-top: .0625rem;
  border: 1px solid #4a6a83;
  border-radius: 50%;
  background: #1b3042;
  color: #c5e3f4;
  font: 600 .875rem/1 ui-monospace, monospace;
}

.join-steps strong { font-weight: 650; }
.join-steps p { margin-top: .2rem; color: #aebccc; font-size: .875rem; }
.faq-section { max-width: 52rem; padding-bottom: 5rem; }
.faq-section .section-heading { text-align: center; }
.faq-list { border-top: 1px solid var(--line); }
.faq-list details { border-bottom: 1px solid var(--line); }

.faq-list summary {
  position: relative;
  display: block;
  padding: 1.125rem 2.25rem 1.125rem .125rem;
  font-weight: 650;
  cursor: pointer;
  list-style: none;
}

.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary:hover { color: var(--accent); }

.faq-list summary::before, .faq-list summary::after {
  position: absolute;
  top: 50%;
  right: .3125rem;
  width: .875rem;
  height: 1.5px;
  background: var(--accent);
  content: "";
  transform: translateY(-50%);
}

.faq-list summary::after { transform: translateY(-50%) rotate(90deg); }
.faq-list details[open] summary::after { display: none; }
.faq-list details p { max-width: 44rem; padding: 0 .125rem 1.25rem; color: var(--muted); }

.site-footer { border-top: 1px solid var(--line); background: #0a0f16; }
.footer-inner { display: flex; align-items: center; gap: 1.25rem; min-height: 5.25rem; }
.footer-brand { font-size: 1rem; }
.footer-note { color: var(--muted); font-size: .875rem; }
.back-top { margin-left: auto; }
.footer-records {
  display: flex;
  flex-wrap: wrap;
  gap: .25rem 1.25rem;
  padding-block: .75rem 1rem;
  border-top: 1px solid var(--line);
}
.footer-records a { font-size: .875rem; text-decoration: none; }
.footer-records a:hover { text-decoration: underline; }

.toast {
  position: fixed;
  z-index: 3;
  right: 1.5rem;
  bottom: 1.5rem;
  max-width: calc(100% - 3rem);
  padding: .75rem 1rem;
  border: 1px solid #4e6f86;
  border-radius: .5rem;
  background: #142637;
  color: #f0f8fc;
  box-shadow: 0 .375rem 1.5rem #0006;
  opacity: 0;
  pointer-events: none;
  transform: translateY(.5rem);
  transition: opacity .18s ease, transform .18s ease;
}

.toast.is-visible { opacity: 1; transform: none; }

.not-found { padding-block: clamp(3rem, 10vw, 7rem); }
.not-found h1 { margin-top: 1.5rem; font-family: var(--display); }
.not-found p { margin: .5rem 0 1.5rem; color: var(--muted); }

@media (max-width: 900px) {
  .container { width: calc(100% - 3.5rem); }
  .main-nav { gap: 1.125rem; }
  .hero h1 { font-size: clamp(2.75rem, 6vw, 3.625rem); }
  .hero-art { left: 0; }
  .hero::after { background: linear-gradient(90deg, #0a0f16 4%, #0a0f16b8 42%, #0a0f160d 85%), linear-gradient(0deg, #0a0f16bf, transparent 30%); }
  .score-card { padding: 1.125rem; }
  .join-main { grid-template-columns: 1fr; gap: 1.25rem; }
  .group-card { max-width: 26rem; }
}

@media (max-width: 680px) {
  .container { width: calc(100% - 2.5rem); }
  .header-inner { min-height: 4rem; grid-template-columns: 1fr auto; gap: .75rem; }
  .main-nav { display: none; }
  .brand { gap: .5625rem; font-size: 1rem; }
  .site-header .brand img { width: 34px; height: 34px; }
  .header-cta.button { min-height: 2.375rem; padding-inline: .75rem; }
  .hero { min-height: 34rem; align-items: end; }
  .hero-art { inset: 0; }
  .hero-art img { object-position: 68% top; }
  .hero::after {
    background:
      linear-gradient(0deg, #090e15 0%, #090e15f0 29%, #090e15b8 59%, #090e1515 100%),
      linear-gradient(90deg, #090e1580, transparent 100%);
  }
  .hero-inner { padding-block: 7rem 2.75rem; }
  .hero h1 { font-size: clamp(1.875rem, 7.9vw, 3.125rem); }
  .eyebrow { margin-bottom: .875rem; }
  .hero-description { margin-top: 1rem; font-size: 1rem; }
  .hero-actions { margin-top: 1.375rem; gap: .5rem; }
  .hero-actions .button { padding-inline: .75rem; font-size: .875rem; }
  .section { padding-top: 3.375rem; }
  .section-heading { margin-bottom: 1.25rem; }
  .score-grid, .join-steps { grid-template-columns: 1fr; gap: .875rem; }
  .score-card { padding: 1.25rem; }
  .join-panel { padding: 1.25rem; }
  .group-card { padding: .75rem; gap: .625rem; }
  .join-steps { margin-top: 1.25rem; padding-top: 1.125rem; }
  .faq-section { padding-bottom: 3.5rem; }
  .faq-section .section-heading { text-align: start; }
  .footer-inner { flex-wrap: wrap; gap: .625rem 1rem; padding-block: 1rem; }
  .footer-note { order: 1; flex-basis: 100%; }
  .toast { right: 1rem; bottom: 1rem; max-width: calc(100% - 2rem); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
