:root {
  --bg: #0f1120;
  --bg-soft: #161a30;
  --bg-card: rgba(30, 34, 58, 0.62);
  --bg-card-solid: #1b1f36;
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.16);
  --text: #e8ebf5;
  --text-soft: #b3b9cf;
  --text-mute: #8a91ab;
  --brand: #e94560;
  --brand-2: #ff7a5c;
  --brand-3: #7b5cff;
  --accent: #35d0ba;
  --link: #7fb4ff;
  --shadow-sm: 0 4px 14px rgba(0, 0, 0, 0.28);
  --shadow-md: 0 12px 34px rgba(0, 0, 0, 0.38);
  --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.5);
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --radius-pill: 999px;
  --maxw: 1180px;
  --header-h: 66px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --grad-brand: linear-gradient(120deg, #e94560 0%, #ff7a5c 46%, #ffb35c 100%);
  --grad-banner: linear-gradient(135deg, #1a1a2e 0%, #2b1d4a 38%, #4a1d3d 68%, #0f3460 100%);
  --glass: saturate(150%) blur(14px);
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #f4f5fb;
    --bg-soft: #ffffff;
    --bg-card: rgba(255, 255, 255, 0.72);
    --bg-card-solid: #ffffff;
    --border: rgba(20, 24, 48, 0.09);
    --border-strong: rgba(20, 24, 48, 0.16);
    --text: #1a1f36;
    --text-soft: #454c66;
    --text-mute: #6a7189;
    --link: #2b62d6;
    --shadow-sm: 0 4px 14px rgba(24, 30, 60, 0.08);
    --shadow-md: 0 12px 34px rgba(24, 30, 60, 0.12);
    --shadow-lg: 0 24px 60px rgba(24, 30, 60, 0.16);
    --grad-banner: linear-gradient(135deg, #1a1a2e 0%, #3a2456 40%, #6b2340 70%, #123a63 100%);
  }
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC",
    system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.8;
  color: var(--text);
  background-color: var(--bg);
  background-image:
    radial-gradient(900px 520px at 12% -10%, rgba(233, 69, 96, 0.16), transparent 62%),
    radial-gradient(820px 520px at 92% 4%, rgba(123, 92, 255, 0.16), transparent 60%),
    radial-gradient(760px 620px at 50% 108%, rgba(53, 208, 186, 0.1), transparent 62%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

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

a {
  color: var(--link);
  text-decoration: none;
  transition: color 0.25s var(--ease), opacity 0.25s var(--ease);
}

a:hover,
a:focus-visible {
  color: var(--brand-2);
}

a:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--brand-2);
  outline-offset: 3px;
  border-radius: 6px;
}

p {
  margin: 0 0 1em;
  color: var(--text-soft);
}

h1,
h2,
h3,
h4 {
  color: var(--text);
  line-height: 1.35;
  font-weight: 700;
  letter-spacing: 0.01em;
  margin: 0 0 0.6em;
  scroll-margin-top: calc(var(--header-h) + 20px);
}

h1 {
  font-size: clamp(1.55rem, 3.4vw, 2.5rem);
  letter-spacing: 0.01em;
}

h2 {
  font-size: clamp(1.28rem, 2.3vw, 1.75rem);
  padding-bottom: 0.5em;
  position: relative;
}

h2::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 62px;
  height: 3px;
  border-radius: 3px;
  background: var(--grad-brand);
}

h3 {
  font-size: clamp(1.06rem, 1.6vw, 1.24rem);
  margin-top: 1.6em;
}

h4 {
  font-size: 1rem;
  color: var(--brand-2);
  margin-top: 1.4em;
}

ul,
ol {
  padding-left: 1.35em;
  margin: 0 0 1em;
  color: var(--text-soft);
}

li {
  margin: 0.35em 0;
}

li::marker {
  color: var(--brand-2);
}

strong,
b {
  color: var(--text);
}

blockquote {
  margin: 1.2em 0;
  padding: 1em 1.2em;
  border-left: 4px solid var(--brand);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  -webkit-backdrop-filter: var(--glass);
  backdrop-filter: var(--glass);
  border-top: 1px solid var(--border);
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

blockquote p {
  margin: 0;
  color: var(--text-soft);
  font-style: italic;
}

::selection {
  background: rgba(233, 69, 96, 0.35);
  color: #fff;
}

/* ---------- Header ---------- */

header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(15, 17, 32, 0.72);
  -webkit-backdrop-filter: saturate(160%) blur(18px);
  backdrop-filter: saturate(160%) blur(18px);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.22);
}

@media (prefers-color-scheme: light) {
  header {
    background: rgba(255, 255, 255, 0.78);
    box-shadow: 0 6px 24px rgba(24, 30, 60, 0.08);
  }
}

header > div {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 20px;
  min-height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
}

header > div > a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: 1.02rem;
  letter-spacing: 0.02em;
  color: var(--text);
  padding: 8px 0;
  white-space: nowrap;
}

header > div > a::before {
  content: "";
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--grad-brand);
  box-shadow: 0 0 0 4px rgba(233, 69, 96, 0.16);
  flex: none;
}

header > div > a:hover {
  color: var(--brand-2);
}

header nav ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 0;
  padding: 0;
}

header nav a {
  display: inline-block;
  padding: 7px 12px;
  font-size: 0.9rem;
  color: var(--text-soft);
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  transition: color 0.25s var(--ease), background 0.25s var(--ease),
    border-color 0.25s var(--ease), transform 0.25s var(--ease);
}

header nav a:hover,
header nav a:focus-visible {
  color: var(--text);
  background: rgba(233, 69, 96, 0.14);
  border-color: rgba(233, 69, 96, 0.32);
  transform: translateY(-1px);
}

/* ---------- Layout ---------- */

main {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 20px 20px;
}

section {
  margin: 0 0 22px;
  padding: clamp(18px, 3vw, 34px);
  background: var(--bg-card);
  -webkit-backdrop-filter: var(--glass);
  backdrop-filter: var(--glass);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  animation: rise 0.7s var(--ease) both;
  transition: border-color 0.35s var(--ease), box-shadow 0.35s var(--ease),
    transform 0.35s var(--ease);
}

section:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-lg);
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(22px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

section:nth-of-type(2) { animation-delay: 0.04s; }
section:nth-of-type(3) { animation-delay: 0.08s; }
section:nth-of-type(4) { animation-delay: 0.12s; }
section:nth-of-type(5) { animation-delay: 0.16s; }
section:nth-of-type(6) { animation-delay: 0.2s; }
section:nth-of-type(7) { animation-delay: 0.24s; }
section:nth-of-type(8) { animation-delay: 0.28s; }

/* ---------- Hero ---------- */

#hero {
  position: relative;
  margin-top: 22px;
  padding: clamp(24px, 4.5vw, 52px);
  border-radius: var(--radius-lg);
  background: var(--grad-banner);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  isolation: isolate;
}

#hero::before {
  content: "";
  position: absolute;
  inset: -40% -10% auto auto;
  width: 460px;
  height: 460px;
  background: radial-gradient(circle, rgba(233, 69, 96, 0.5), transparent 66%);
  filter: blur(6px);
  z-index: -1;
  animation: float 14s ease-in-out infinite alternate;
}

#hero::after {
  content: "";
  position: absolute;
  inset: auto auto -50% -14%;
  width: 480px;
  height: 480px;
  background: radial-gradient(circle, rgba(53, 208, 186, 0.32), transparent 66%);
  filter: blur(8px);
  z-index: -1;
  animation: float 18s ease-in-out infinite alternate-reverse;
}

@keyframes float {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(-26px, 22px, 0) scale(1.08); }
}

#hero h1 {
  color: #fff;
  text-shadow: 0 2px 22px rgba(0, 0, 0, 0.45);
  max-width: 24ch;
}

#hero p {
  color: rgba(255, 255, 255, 0.86);
  max-width: 78ch;
}

#hero p:last-of-type {
  margin-bottom: 1.4em;
}

#hero figure {
  margin: 0;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(0, 0, 0, 0.24);
  box-shadow: var(--shadow-md);
  transition: transform 0.5s var(--ease), box-shadow 0.5s var(--ease);
}

#hero figure:hover {
  transform: translateY(-4px) scale(1.006);
  box-shadow: var(--shadow-lg);
}

#hero figure svg {
  width: 100%;
  height: auto;
  display: block;
}

#hero figcaption {
  padding: 10px 16px;
  font-size: 0.86rem;
  color: rgba(255, 255, 255, 0.72);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.2);
}

/* ---------- Table of contents ---------- */

main > nav[aria-label="页面内锚点导航"] {
  margin: 0 0 22px;
  padding: clamp(18px, 3vw, 30px);
  background: var(--bg-card);
  -webkit-backdrop-filter: var(--glass);
  backdrop-filter: var(--glass);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  animation: rise 0.7s var(--ease) both;
}

main > nav[aria-label="页面内锚点导航"] h2 {
  font-size: 1.12rem;
  margin-bottom: 0.9em;
}

main > nav[aria-label="页面内锚点导航"] ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 8px;
}

main > nav[aria-label="页面内锚点导航"] a {
  display: block;
  padding: 10px 14px;
  font-size: 0.92rem;
  color: var(--text-soft);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: transform 0.28s var(--ease), color 0.28s var(--ease),
    background 0.28s var(--ease), border-color 0.28s var(--ease);
}

main > nav[aria-label="页面内锚点导航"] a:hover,
main > nav[aria-label="页面内锚点导航"] a:focus-visible {
  color: var(--text);
  background: rgba(233, 69, 96, 0.14);
  border-color: rgba(233, 69, 96, 0.4);
  transform: translateX(4px);
}

/* ---------- Articles ---------- */

#articles article {
  position: relative;
  margin: 0 0 14px;
  padding: 18px 20px 18px 22px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: transform 0.32s var(--ease), border-color 0.32s var(--ease),
    background 0.32s var(--ease), box-shadow 0.32s var(--ease);
}

@media (prefers-color-scheme: light) {
  #articles article {
    background: rgba(24, 30, 60, 0.025);
  }
}

#articles article::before {
  content: "";
  position: absolute;
  left: 0;
  top: 18px;
  bottom: 18px;
  width: 3px;
  border-radius: 3px;
  background: var(--grad-brand);
  opacity: 0.85;
  transition: opacity 0.32s var(--ease), top 0.32s var(--ease),
    bottom 0.32s var(--ease);
}

#articles article:hover {
  transform: translateY(-3px);
  border-color: rgba(233, 69, 96, 0.4);
  background: rgba(233, 69, 96, 0.06);
  box-shadow: var(--shadow-sm);
}

#articles article:hover::before {
  opacity: 1;
  top: 12px;
  bottom: 12px;
}

#articles article h3 {
  margin-top: 0;
  font-size: 1.06rem;
}

#articles article p {
  font-size: 0.94rem;
}

#articles article p:first-of-type {
  font-size: 0.82rem;
  color: var(--text-mute);
  letter-spacing: 0.02em;
}

#articles article a {
  display: inline-block;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(233, 69, 96, 0.4);
  color: var(--brand-2);
  background: rgba(233, 69, 96, 0.1);
  transition: transform 0.28s var(--ease), background 0.28s var(--ease),
    color 0.28s var(--ease), box-shadow 0.28s var(--ease);
}

#articles article a:hover,
#articles article a:focus-visible {
  color: #fff;
  background: var(--grad-brand);
  border-color: transparent;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(233, 69, 96, 0.36);
}

/* ---------- FAQ ---------- */

#faq details {
  margin: 0 0 10px;
  padding: 0;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.3s var(--ease), background 0.3s var(--ease),
    box-shadow 0.3s var(--ease);
}

@media (prefers-color-scheme: light) {
  #faq details {
    background: rgba(24, 30, 60, 0.025);
  }
}

#faq details:hover {
  border-color: var(--border-strong);
}

#faq details[open] {
  border-color: rgba(233, 69, 96, 0.42);
  background: rgba(233, 69, 96, 0.06);
  box-shadow: var(--shadow-sm);
}

#faq summary {
  cursor: pointer;
  list-style: none;
  padding: 15px 48px 15px 18px;
  position: relative;
  font-weight: 600;
  font-size: 0.98rem;
  color: var(--text);
  transition: color 0.25s var(--ease), background 0.25s var(--ease);
}

#faq summary::-webkit-details-marker {
  display: none;
}

#faq summary::after {
  content: "+";
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  font-size: 1.1rem;
  font-weight: 400;
  line-height: 1;
  color: var(--brand-2);
  border: 1px solid rgba(233, 69, 96, 0.4);
  border-radius: 50%;
  background: rgba(233, 69, 96, 0.1);
  transition: transform 0.3s var(--ease), background 0.3s var(--ease),
    color 0.3s var(--ease);
}

#faq details[open] summary::after {
  content: "−";
  transform: translateY(-50%) rotate(180deg);
  color: #fff;
  background: var(--grad-brand);
  border-color: transparent;
}

#faq details[open] summary {
  color: var(--brand-2);
  border-bottom: 1px solid var(--border);
}

#faq details p {
  margin: 0;
  padding: 14px 18px 16px;
  font-size: 0.94rem;
  animation: fadeIn 0.4s var(--ease) both;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- Contact / notice lists ---------- */

#contact ul,
#notice ul,
#drama ul,
#howto ul {
  list-style: none;
  padding: 0;
}

#contact ul li,
#notice ul li,
#drama ul li,
#howto ul li {
  position: relative;
  padding: 10px 14px 10px 38px;
  margin: 0 0 8px;
  font-size: 0.94rem;
  color: var(--text-soft);
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: transform 0.28s var(--ease), border-color 0.28s var(--ease),
    background 0.28s var(--ease);
}

@media (prefers-color-scheme: light) {
  #contact ul li,
  #notice ul li,
  #drama ul li,
  #howto ul li {
    background: rgba(24, 30, 60, 0.025);
  }
}

#contact ul li::before,
#notice ul li::before,
#drama ul li::before,
#howto ul li::before {
  content: "";
  position: absolute;
  left: 15px;
  top: 50%;
  width: 8px;
  height: 8px;
  transform: translateY(-50%) rotate(45deg);
  background: var(--grad-brand);
  border-radius: 2px;
}

#contact ul li:hover,
#notice ul li:hover,
#drama ul li:hover,
#howto ul li:hover {
  transform: translateX(4px);
  border-color: rgba(233, 69, 96, 0.38);
  background: rgba(233, 69, 96, 0.07);
}

#contact ul a {
  color: var(--link);
}

#howto h4 {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  background: rgba(123, 92, 255, 0.14);
  border: 1px solid rgba(123, 92, 255, 0.3);
  color: #b7a6ff;
}

@media (prefers-color-scheme: light) {
  #howto h4 {
    color: #5b3fd6;
  }
}

/* ---------- News ---------- */

#news h3 {
  display: inline-block;
  margin-bottom: 0.25em;
}

#news h3 + p {
  font-size: 0.82rem;
  color: var(--text-mute);
  margin-bottom: 0.5em;
  letter-spacing: 0.02em;
}

#news h3 + p::before {
  content: "🕒 ";
  font-size: 0.9em;
}

#news > p {
  padding-bottom: 1.1em;
  margin-bottom: 1.1em;
  border-bottom: 1px dashed var(--border);
}

#news > p:last-of-type {
  border-bottom: 0;
  padding-bottom: 0;
  margin-bottom: 0;
}

/* ---------- Cases ---------- */

#cases blockquote {
  position: relative;
  padding-left: 2.4em;
}

#cases blockquote::before {
  content: "“";
  position: absolute;
  left: 0.35em;
  top: 0.05em;
  font-size: 2.6rem;
  line-height: 1;
  color: var(--brand);
  opacity: 0.5;
  font-family: Georgia, "Times New Roman", serif;
}

/* ---------- Footer ---------- */

footer {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 28px 20px 44px;
  text-align: center;
  border-top: 1px solid var(--border);
}

footer p {
  margin: 0 0 8px;
  font-size: 0.86rem;
  color: var(--text-mute);
}

footer a {
  display: inline-block;
  margin-top: 6px;
  padding: 8px 22px;
  font-size: 0.88rem;
  font-weight: 600;
  color: #fff;
  border-radius: var(--radius-pill);
  background: var(--grad-brand);
  box-shadow: 0 8px 22px rgba(233, 69, 96, 0.32);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease),
    filter 0.3s var(--ease);
}

footer a:hover,
footer a:focus-visible {
  color: #fff;
  transform: translateY(-3px);
  filter: brightness(1.08);
  box-shadow: 0 14px 30px rgba(233, 69, 96, 0.45);
}

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
  header > div {
    padding: 10px 16px;
    gap: 8px;
  }

  header nav {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 4px;
  }

  header nav::-webkit-scrollbar {
    display: none;
  }

  header nav ul {
    flex-wrap: nowrap;
    width: max-content;
  }

  header nav a {
    white-space: nowrap;
    font-size: 0.86rem;
    padding: 6px 11px;
  }

  main {
    padding: 0 14px 14px;
  }

  #hero {
    margin-top: 14px;
  }

  #hero h1 {
    max-width: none;
  }

  section {
    margin-bottom: 16px;
  }

  main > nav[aria-label="页面内锚点导航"] ul {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  }
}

@media (max-width: 560px) {
  body {
    font-size: 15.5px;
    line-height: 1.75;
  }

  header > div > a {
    font-size: 0.94rem;
  }

  section,
  main > nav[aria-label="页面内锚点导航"] {
    border-radius: var(--radius);
    padding: 16px 15px;
  }

  #hero {
    padding: 20px 16px;
    border-radius: var(--radius);
  }

  #hero figure svg {
    height: 160px;
  }

  h2 {
    font-size: 1.16rem;
  }

  main > nav[aria-label="页面内锚点导航"] ul {
    grid-template-columns: 1fr 1fr;
    gap: 6px;
  }

  main > nav[aria-label="页面内锚点导航"] a {
    font-size: 0.84rem;
    padding: 8px 10px;
  }

  #articles article {
    padding: 14px 14px 14px 18px;
  }

  #faq summary {
    padding: 13px 44px 13px 14px;
    font-size: 0.94rem;
  }

  #faq details p {
    padding: 12px 14px 14px;
    font-size: 0.9rem;
  }

  #contact ul li,
  #notice ul li,
  #drama ul li,
  #howto ul li {
    padding: 9px 12px 9px 34px;
    font-size: 0.9rem;
  }
}

/* ---------- Motion & print ---------- */

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

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

@media print {
  body {
    background: #fff;
    color: #000;
  }

  header,
  footer,
  main > nav[aria-label="页面内锚点导航"] {
    display: none;
  }

  section {
    box-shadow: none;
    border: 1px solid #ccc;
    animation: none;
    break-inside: avoid;
  }
}