@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@300;400;500;700&display=swap');

:root {
  --red: #ff0000;
  --pink: #ff1493;
  --ink: #261717;
  --bg: #180d0d;
  --line: rgba(255, 236, 232, 0.15);
  --text: #f6eae6;
  --dim: #ccb7b2;
  --faint: #9d8380;
}

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

html {
  background: var(--bg);
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  color: var(--text);
  font-family: "Noto Sans KR", -apple-system, BlinkMacSystemFont, "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 17px;
  line-height: 1.8;
  letter-spacing: 0.01em;
  overflow-x: hidden;
}

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

a {
  color: inherit;
  text-decoration: none;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.28;
  letter-spacing: -0.02em;
}

p {
  margin: 0;
}

/* ---------- 极光底层 ---------- */
body::before {
  content: "";
  position: fixed;
  inset: -18%;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(42% 38% at 12% 6%, rgba(255, 0, 0, 0.3), transparent 62%),
    radial-gradient(38% 36% at 88% 16%, rgba(255, 20, 147, 0.28), transparent 64%),
    radial-gradient(54% 46% at 46% 102%, rgba(255, 20, 147, 0.18), transparent 72%),
    conic-gradient(
      from 200deg at 62% 42%,
      rgba(255, 0, 0, 0.12),
      rgba(255, 20, 147, 0.1),
      rgba(255, 0, 0, 0.12)
    );
  background-size: 200% 200%;
  filter: saturate(1.25) blur(46px);
  animation: aurora 12s ease-in-out infinite alternate;
}

@keyframes aurora {
  0% {
    background-position: 0% 0%;
    transform: translate3d(0, 0, 0) scale(1);
  }
  100% {
    background-position: 100% 100%;
    transform: translate3d(0, -3%, 0) scale(1.08);
  }
}

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

/* ---------- 左侧竖排导航 ---------- */
.rail {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 12px;
  background: rgba(24, 13, 13, 0.88);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.rail .mark {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid rgba(255, 20, 147, 0.5);
  background: radial-gradient(circle at 30% 20%, rgba(255, 0, 0, 0.6), rgba(255, 20, 147, 0.35));
  color: #fff;
  font-weight: 700;
  font-size: 17px;
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.rail .mark:hover {
  transform: rotate(-6deg);
  box-shadow: 0 0 0 4px rgba(255, 20, 147, 0.18);
}

.rail nav {
  flex: 1 1 auto;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.rail nav::-webkit-scrollbar {
  display: none;
}

.rail nav p {
  display: flex;
  gap: 2px;
  margin: 0;
  white-space: nowrap;
}

.rail nav a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 10px;
  font-size: 16px;
  color: var(--dim);
  border-radius: 8px;
  transition: color 0.25s ease, background 0.25s ease;
}

.rail nav a:hover {
  color: #fff;
  background: rgba(255, 20, 147, 0.18);
}

.rail nav a.on {
  color: #fff;
  background: linear-gradient(90deg, rgba(255, 0, 0, 0.38), rgba(255, 20, 147, 0.28));
}

/* ---------- 主区骨架 ---------- */
main {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
}

/* ---------- 首屏 ---------- */
.hero {
  position: relative;
  isolation: isolate;
  grid-column: 1 / -1;
  display: flex;
  align-items: flex-end;
  min-height: 100vh;
  min-height: 100svh;
  padding: 0 20px 108px;
  overflow: hidden;
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: -2;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.52;
  filter: saturate(1.15);
}

.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    102deg,
    rgba(18, 9, 9, 0.94) 10%,
    rgba(18, 9, 9, 0.62) 52%,
    rgba(18, 9, 9, 0.24) 92%
  );
}

.hero-glow {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(50% 58% at 6% 90%, rgba(255, 0, 0, 0.42), transparent 62%),
    radial-gradient(46% 54% at 84% 20%, rgba(255, 20, 147, 0.4), transparent 64%),
    conic-gradient(
      from 160deg at 62% 58%,
      rgba(255, 0, 0, 0.16),
      rgba(255, 20, 147, 0.16),
      rgba(255, 0, 0, 0.16)
    );
  background-size: 200% 200%;
  filter: saturate(1.3) blur(10px);
  animation: aurora 11s ease-in-out infinite alternate;
}

.hero::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 64px;
  background: linear-gradient(90deg, rgba(255, 0, 0, 0.9), rgba(255, 20, 147, 0.9));
  clip-path: polygon(0 100%, 100% 0, 100% 100%);
}

.hero-inner {
  position: relative;
  z-index: 3;
  max-width: 840px;
}

.brand-tag {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 2px 13px;
  margin-bottom: 16px;
  border: 1px solid rgba(255, 20, 147, 0.55);
  border-radius: 10px;
  background: rgba(38, 23, 23, 0.55);
  color: #ffdbea;
  font-size: 16px;
  letter-spacing: 0.12em;
}

.hero h1 {
  font-size: clamp(2.1rem, 7.4vw, 4.6rem);
  font-weight: 700;
  text-shadow: 0 2px 28px rgba(0, 0, 0, 0.55);
}

.hero h1::after {
  content: "";
  display: block;
  width: 78px;
  height: 4px;
  margin-top: 22px;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--red), var(--pink));
}

/* ---------- 正文 ---------- */
.doc {
  min-width: 0;
  padding: 44px 20px 16px;
}

.doc > article {
  padding: 34px 0;
  border-top: 1px dashed rgba(255, 236, 232, 0.17);
  scroll-margin-top: 88px;
  animation: rise 0.8s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.doc > article:first-child {
  border-top: 0;
  padding-top: 0;
}

.doc > article:nth-child(2) {
  animation-delay: 0.05s;
}
.doc > article:nth-child(3) {
  animation-delay: 0.1s;
}
.doc > article:nth-child(4) {
  animation-delay: 0.15s;
}
.doc > article:nth-child(5) {
  animation-delay: 0.2s;
}
.doc > article:nth-child(6) {
  animation-delay: 0.25s;
}
.doc > article:nth-child(7) {
  animation-delay: 0.3s;
}

.doc h2 {
  margin: 0 0 0.55em;
  font-size: clamp(1.35rem, 3.4vw, 1.85rem);
  color: #fff;
}

.doc h3 {
  margin: 1.6em 0 0.5em;
  font-size: 1.15rem;
  color: #ffe3ec;
}

.doc p {
  margin: 0 0 1.05em;
}

.doc ul,
.doc ol {
  margin: 0 0 1.1em;
  padding-left: 1.35em;
}

.doc li {
  margin: 0.35em 0;
}

.doc a {
  color: #ff8fbd;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.doc a:hover {
  color: #fff;
}

.doc strong {
  color: #fff;
}

.doc blockquote {
  margin: 1.2em 0;
  padding: 0.85em 1.1em;
  border-left: 3px solid var(--pink);
  border-radius: 0 10px 10px 0;
  background: rgba(255, 20, 147, 0.09);
}

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

.doc table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.2em 0;
  font-size: 0.96em;
}

.doc th,
.doc td {
  border: 1px solid rgba(255, 236, 232, 0.22);
  padding: 0.5em 0.65em;
  text-align: left;
  vertical-align: top;
}

.doc th {
  background: rgba(255, 20, 147, 0.12);
  color: #fff;
}

.doc img {
  border-radius: 10px;
  margin: 1.1em 0;
}

.doc time {
  color: #cfac9f;
  font-size: 0.94em;
}

.doc hr {
  border: 0;
  border-top: 1px dashed var(--line);
  margin: 1.8em 0;
}

/* ---------- 侧栏 ---------- */
.side {
  padding: 0 20px 44px;
}

.side-card {
  border: 1px solid rgba(255, 20, 147, 0.35);
  border-radius: 10px;
  padding: 18px;
  background: radial-gradient(120% 90% at 100% 0, rgba(255, 20, 147, 0.16), rgba(38, 23, 23, 0.55));
  backdrop-filter: blur(6px);
}

.side-card h2 {
  font-size: 1.04rem;
  letter-spacing: 0.05em;
  color: #fff;
}

.side-card .subtitle {
  margin: 6px 0 14px;
  font-size: 16px;
  color: var(--dim);
}

.side-card ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 2px;
}

.side-card a {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 0 10px;
  border: 1px solid transparent;
  border-radius: 8px;
  font-size: 16px;
  color: var(--text);
  transition: transform 0.25s ease, background 0.25s ease, border-color 0.25s ease;
}

.side-card a:hover {
  background: rgba(255, 0, 0, 0.2);
  border-color: rgba(255, 20, 147, 0.5);
  transform: translateX(3px);
}

/* ---------- 页脚 ---------- */
.foot {
  position: relative;
  z-index: 1;
  margin-top: 26px;
  padding: 38px 20px 28px;
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(38, 23, 23, 0.42), rgba(18, 9, 9, 0.92));
}

.foot-brand {
  margin: 0 0 20px;
  font-size: clamp(2.5rem, 12.5vw, 6.4rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.045em;
  background: linear-gradient(92deg, #ffffff, var(--pink) 46%, var(--red));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.foot-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px 24px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.foot address {
  font-style: normal;
  font-size: 16px;
  color: var(--dim);
}

.foot ul {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.foot li a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 12px;
  font-size: 16px;
  color: var(--dim);
  border: 1px solid var(--line);
  border-radius: 10px;
  transition: color 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.foot li a:hover {
  color: #fff;
  border-color: rgba(255, 20, 147, 0.6);
  background: rgba(255, 20, 147, 0.15);
}

.foot-copy {
  margin: 14px 0 0;
  font-size: 16px;
  color: var(--faint);
}

/* ---------- 宽屏：左侧固定竖栏 + 右侧侧栏 ---------- */
@media (min-width: 1024px) {
  .rail {
    position: fixed;
    inset: 0 auto 0 0;
    width: 212px;
    flex-direction: column;
    align-items: flex-start;
    gap: 22px;
    padding: 22px 16px;
    border-right: 1px solid var(--line);
    border-bottom: 0;
    background: rgba(20, 11, 11, 0.82);
  }

  .rail nav {
    width: 100%;
    overflow: visible;
  }

  .rail nav p {
    flex-direction: column;
    gap: 2px;
    white-space: normal;
  }

  .rail nav a {
    width: 100%;
    padding: 0 12px;
  }

  body {
    padding-left: 212px;
  }

  main {
    grid-template-columns: minmax(0, 1fr) 300px;
  }

  .hero {
    padding: 0 50px 128px;
  }

  .doc {
    padding: 56px 40px 40px 50px;
  }

  .doc > article {
    padding: 42px 0;
    scroll-margin-top: 24px;
  }

  .side {
    position: sticky;
    top: 24px;
    align-self: start;
    padding: 56px 40px 40px 0;
  }

  .foot {
    padding: 46px 50px 32px;
  }
}

@media (min-width: 1440px) {
  body {
    font-size: 18px;
  }

  .rail {
    width: 236px;
  }

  body {
    padding-left: 236px;
  }
}

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

  body::before,
  .hero-glow,
  .doc > article {
    animation: none;
  }

  .rail .mark,
  .rail nav a,
  .doc a,
  .side-card a,
  .foot li a {
    transition: none;
  }
}

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