:root {
  color-scheme: light;
  --ink: #2d1f24;
  --muted: #796b70;
  --accent: #d44f72;
  --accent-dark: #ad3657;
  --line: #f0dfe4;
  --paper: rgba(255, 255, 255, 0.88);
}

* {
  box-sizing: border-box;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  font-family: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  background:
    radial-gradient(circle at 8% 10%, rgba(244, 177, 194, 0.38), transparent 30%),
    radial-gradient(circle at 92% 88%, rgba(242, 201, 181, 0.42), transparent 31%),
    #fff8f8;
}

button {
  font: inherit;
}

.page-shell {
  width: min(860px, calc(100% - 32px));
  margin: 0 auto;
  padding: 64px 0;
}

.card {
  overflow: hidden;
  border: 1px solid rgba(222, 177, 189, 0.7);
  border-radius: 28px;
  background: var(--paper);
  box-shadow: 0 24px 70px rgba(104, 53, 68, 0.12);
  backdrop-filter: blur(12px);
}

.card-header {
  padding: 38px 44px 34px;
  border-bottom: 1px solid var(--line);
}

.intro {
  margin: 0;
  color: #111;
  font-size: clamp(20px, 3vw, 25px);
  font-weight: 600;
  line-height: 1.65;
}

.copy-code {
  border: 0;
  cursor: pointer;
  transition: transform 160ms ease, background-color 160ms ease, color 160ms ease;
}

.test-list {
  padding: 10px 44px 22px;
}

.test-row {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  align-items: center;
  gap: 12px;
  min-height: 90px;
  border-bottom: 1px solid var(--line);
}

.test-row:last-child {
  border-bottom: 0;
}

.test-number {
  align-self: start;
  padding-top: 29px;
  color: #c9a8b1;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
}

.test-content h2 {
  margin: 0 0 8px;
  font-size: 17px;
  font-weight: 600;
}

.code-line {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.code-line code {
  color: var(--accent-dark);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.copy-code {
  padding: 9px 13px;
  border: 1px solid #e6c4cd;
  border-radius: 10px;
  color: var(--accent-dark);
  font-size: 13px;
  background: transparent;
}

.copy-code:hover {
  color: white;
  background: var(--accent);
}

button:focus-visible {
  outline: 3px solid rgba(212, 79, 114, 0.28);
  outline-offset: 3px;
}

.copy-status {
  position: fixed;
  z-index: 10;
  bottom: 28px;
  left: 50%;
  margin: 0;
  padding: 11px 18px;
  border-radius: 999px;
  color: white;
  font-size: 14px;
  background: #34272b;
  box-shadow: 0 10px 30px rgba(52, 39, 43, 0.2);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 12px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.copy-status.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.copy-status.is-error {
  background: #9e2f49;
}

@media (max-width: 640px) {
  .page-shell {
    width: min(100% - 20px, 860px);
    padding: 20px 0;
  }

  .card {
    border-radius: 20px;
  }

  .card-header {
    padding: 30px 24px 26px;
  }

  .test-list {
    padding: 4px 24px 14px;
  }

  .test-row {
    grid-template-columns: 32px 1fr;
    gap: 8px;
    padding: 18px 0;
  }

  .test-number {
    padding-top: 3px;
  }

  .copy-code {
    grid-column: 2;
    justify-self: start;
  }
}

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