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

:root {
  --ink: #1c1726;
  --violet: #6514ff;
  --magenta: #bf00ff;
  --paper: #f7f4ff;
  --tint: #ece2ff;
  --edge: 3px solid #1c1726;
  --r: 28px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 100px;
  overflow-x: clip;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  position: relative;
  font-family: "Noto Sans KR", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.75;
  color: var(--ink);
  background: var(--paper);
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  z-index: 0;
  inset: 0;
  pointer-events: none;
  background-image: repeating-linear-gradient(135deg, rgba(101, 20, 255, .085) 0 2px, transparent 2px 17px);
  background-size: 48px 48px;
  animation: drift 26s linear infinite;
}

@keyframes drift {
  to { background-position: 48px 48px; }
}

img { max-width: 100%; }

a { color: inherit; }

:focus-visible {
  outline: 3px solid var(--magenta);
  outline-offset: 2px;
}

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* 顶部：品牌居中，菜单分列两侧 */
.masthead {
  position: sticky;
  top: 0;
  z-index: 60;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  grid-template-areas: "l b r" "f f f";
  align-items: center;
  gap: 6px 10px;
  padding: 9px clamp(12px, 3vw, 26px);
  background: rgba(247, 244, 255, .95);
  backdrop-filter: blur(8px);
  border-bottom: var(--edge);
}

.wing { display: flex; align-items: center; gap: 4px; min-width: 0; }
.wing-l { grid-area: l; justify-content: flex-start; }
.wing-r { grid-area: r; justify-content: flex-end; }

.brand {
  grid-area: b;
  justify-self: center;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 46px;
  padding: 4px 6px;
  text-decoration: none;
  color: var(--ink);
  font-weight: 700;
  font-size: 17px;
  letter-spacing: .01em;
}

.brand-text { white-space: nowrap; }

.brand .glyph {
  display: grid;
  place-items: center;
  width: 36px; height: 36px;
  border-radius: 12px;
  background: var(--violet);
  color: #fff;
  border: var(--edge);
  font-size: 19px;
  font-weight: 700;
}

.brand img {
  width: 36px; height: 36px;
  border-radius: 12px;
  border: var(--edge);
  background: #fff;
  object-fit: cover;
}

.fold { position: relative; display: flex; align-items: center; min-width: 0; }

.fold > summary {
  list-style: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 44px;
  padding: 8px 11px;
  border-radius: 14px;
  border: 2px solid transparent;
  font-size: 16px;
  font-weight: 700;
  color: var(--violet);
  white-space: nowrap;
  user-select: none;
}

.fold > summary::-webkit-details-marker { display: none; }
.fold > summary::after { content: "＋"; font-size: 15px; }
.fold[open] > summary::after { content: "－"; }
.fold > summary:hover { background: var(--tint); border-color: var(--violet); }

.fold > menu {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 2px;
  min-width: 0;
}

.fold > menu li { min-width: 0; }

.fold > menu li a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 10px;
  border-radius: 14px;
  text-decoration: none;
  color: var(--ink);
  font-size: 16px;
  font-weight: 500;
  white-space: nowrap;
  transition: background-color .2s ease, color .2s ease;
}

.fold > menu li a:hover {
  background: var(--ink);
  color: #fff;
}

.find {
  grid-area: f;
  justify-self: stretch;
  display: flex;
  align-items: center;
  min-width: 0;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: #fff;
  overflow: hidden;
  margin-bottom: 2px;
}

.find input {
  flex: 1 1 auto;
  min-width: 0;
  width: 100%;
  min-height: 40px;
  border: 0;
  padding: 0 14px;
  font: inherit;
  font-size: 16px;
  background: transparent;
  color: var(--ink);
}

.find input::placeholder { color: #6c6280; }
.find input:focus { outline: none; }

.find button {
  flex: 0 0 auto;
  min-height: 40px;
  padding: 0 15px;
  border: 0;
  border-left: 2px solid var(--ink);
  background: var(--violet);
  color: #fff;
  font: inherit;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: background-color .2s ease;
}

.find button:hover { background: var(--magenta); }

/* 头图 */
.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 45vh;
  padding: clamp(34px, 7vw, 88px) clamp(18px, 5vw, 64px);
  background: var(--violet);
  color: #fff;
  border-bottom: var(--edge);
}

.hero::before {
  content: "";
  position: absolute;
  z-index: -1;
  right: -10%;
  top: -34%;
  width: min(62vw, 540px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle at 34% 34%, var(--magenta), rgba(191, 0, 255, 0) 70%);
}

.hero::after {
  content: "";
  position: absolute;
  z-index: -1;
  left: 6%;
  bottom: -74px;
  width: 190px;
  height: 190px;
  border: 7px solid rgba(255, 255, 255, .3);
  border-radius: 50%;
}

.hero-inner { position: relative; z-index: 2; min-width: 0; }

.eyebrow {
  display: inline-block;
  margin: 0;
  padding: 5px 15px;
  border-radius: 999px;
  background: #fff;
  color: var(--violet);
  border: 2px solid var(--ink);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: .08em;
}

.hero h1 {
  margin: 16px 0 0;
  font-size: clamp(2.1rem, 8.2vw, 5.2rem);
  line-height: 1.04;
  letter-spacing: -.035em;
  font-weight: 700;
  text-wrap: balance;
  overflow-wrap: break-word;
}

.lede {
  margin: 18px 0 0;
  max-width: 44ch;
  font-size: clamp(17px, 2.3vw, 20px);
  line-height: 1.6;
  color: #f1e9ff;
}

.badges {
  position: absolute;
  z-index: 3;
  right: 5%;
  top: 14%;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 14px;
}

.badge {
  margin: 0;
  padding: 9px 17px;
  border: var(--edge);
  border-radius: 16px;
  font-size: 16px;
  font-weight: 700;
  white-space: nowrap;
}

.badge-a {
  background: #fff;
  color: var(--ink);
  transform: rotate(8deg);
}

.badge-b {
  background: var(--magenta);
  color: #fff;
  transform: rotate(-6deg);
}

/* 主体：左栏 + 正文 */
.wrap {
  position: relative;
  z-index: 1;
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(34px, 6vw, 70px) clamp(16px, 4vw, 32px);
  display: grid;
  grid-template-columns: 236px minmax(0, 1fr);
  gap: clamp(24px, 4vw, 54px);
  align-items: start;
}

.rail {
  position: sticky;
  top: 104px;
  padding: 20px 16px;
  border: var(--edge);
  border-radius: var(--r);
  background: #fff;
}

.rail h2 {
  margin: 0;
  font-size: 18px;
  letter-spacing: .04em;
}

.rail hr {
  border: 0;
  height: 6px;
  width: 54px;
  border-radius: 3px;
  background: var(--violet);
  margin: 11px 0 14px;
}

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

.rail-list a {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 40px;
  padding: 6px 8px;
  border-radius: 12px;
  text-decoration: none;
  color: var(--ink);
  font-size: 16px;
  font-weight: 500;
  transition: background-color .2s ease, color .2s ease;
}

.rail-list a:hover { background: var(--tint); color: var(--violet); }
.rail-list .num { font-weight: 700; color: var(--magenta); min-width: 1.9em; }

.rail-note {
  margin: 15px 0 0;
  font-size: 16px;
  line-height: 1.6;
  color: #524665;
}

.board { min-width: 0; }
.post { min-width: 0; overflow-wrap: break-word; }

.post > section {
  padding: 34px 0;
  border-top: 3px dashed rgba(28, 23, 38, .16);
  scroll-margin-top: 104px;
}

.post > section:first-child { border-top: 0; padding-top: 0; }

.post h2, .signup h2 {
  margin: 0;
  font-size: clamp(1.45rem, 3.4vw, 2.15rem);
  line-height: 1.25;
  letter-spacing: -.02em;
  overflow-wrap: break-word;
}

.post hr, .signup hr {
  border: 0;
  height: 8px;
  width: 76px;
  border-radius: 4px;
  background: var(--magenta);
  margin: 14px 0 24px;
}

.post h3 { margin: 28px 0 10px; font-size: 1.22rem; line-height: 1.35; }
.post p { margin: 0 0 1.05em; }
.post h2 + p, .post h3 + p { margin-top: 14px; }

.post ul, .post ol { margin: 0 0 1.15em; padding-left: 1.35em; }
.post li { margin: 8px 0; }

.post a {
  color: var(--violet);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

.post strong {
  background: var(--tint);
  padding: 1px 5px;
  border-radius: 6px;
}

.post blockquote {
  margin: 24px 0;
  padding: 16px 22px;
  border-left: 8px solid var(--magenta);
  background: var(--tint);
  border-radius: 0 18px 18px 0;
}

.post blockquote p:last-child { margin: 0; }
.post img { border-radius: 18px; border: var(--edge); height: auto; }

.post table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 1.2em;
  font-size: 16px;
}

.post th, .post td { border: 2px solid var(--ink); padding: 10px 12px; text-align: left; }

/* 订阅块 */
.signup {
  position: relative;
  z-index: 1;
  max-width: 1180px;
  margin: 0 auto clamp(40px, 7vw, 84px);
  padding: clamp(24px, 5vw, 54px);
  margin-inline: clamp(16px, 4vw, 32px);
  border: var(--edge);
  border-radius: var(--r);
  background: var(--ink);
  color: #fff;
}

.signup > p { margin: 0; color: #ddd2f2; }

.sub-form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 22px;
  min-width: 0;
}

.sub-form label { font-weight: 700; }

.sub-form input {
  flex: 1 1 210px;
  min-width: 0;
  min-height: 48px;
  padding: 0 16px;
  border: var(--edge);
  border-radius: 14px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 16px;
}

.sub-form button {
  flex: 0 0 auto;
  min-height: 48px;
  padding: 0 26px;
  border: var(--edge);
  border-radius: 14px;
  background: var(--magenta);
  color: #fff;
  font: inherit;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: background-color .2s ease, transform .2s ease;
}

.sub-form button:hover { background: var(--violet); transform: translateY(-2px); }

.sub-tip {
  flex-basis: 100%;
  margin: 0;
  min-height: 1.5em;
  font-size: 16px;
  color: #d8c5ff;
}

/* 页脚：只有 p 与 small */
.foot {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 26px;
  padding: 18px clamp(16px, 4vw, 32px);
  border-top: var(--edge);
  background: #fff;
}

.foot p { margin: 0; font-size: 16px; min-width: 0; }
.foot small { display: flex; flex-wrap: wrap; gap: 6px 20px; font-size: 16px; }

.foot small a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  color: var(--violet);
  font-weight: 700;
  text-decoration: none;
}

.foot small a:hover { text-decoration: underline; text-decoration-thickness: 2px; }

/* 动效 */
.will { opacity: 0; transform: translateY(14px); }
.will.in { opacity: 1; transform: none; transition: opacity .5s ease, transform .5s ease; }

@keyframes flash {
  0%, 100% { box-shadow: 0 0 0 0 rgba(191, 0, 255, 0); }
  40% { box-shadow: 0 0 0 9px rgba(191, 0, 255, .3); }
}

.post > section.flash {
  animation: flash 1s ease;
  border-radius: 18px;
}

/* 断点 */
@media (max-width: 1100px) {
  .fold > menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    min-width: min(214px, 78vw);
    padding: 10px;
    background: #fff;
    border: var(--edge);
    border-radius: 20px;
    z-index: 70;
  }

  .wing-r .fold > menu { left: auto; right: 0; }
  .fold > menu li a { justify-content: flex-start; }
}

@media (min-width: 1101px) {
  .masthead {
    grid-template-columns: 1fr auto 1.5fr;
    grid-template-areas: "l b r";
    padding-block: 12px;
  }

  .wing-r { padding-right: 158px; }

  .find {
    grid-area: auto;
    grid-column: 3;
    grid-row: 1;
    justify-self: end;
    width: 148px;
    margin-bottom: 0;
  }

  .find input { width: 100px; padding: 0 12px; }
}

@media (max-width: 880px) {
  .wrap { grid-template-columns: minmax(0, 1fr); }
  .rail { position: static; }
  .badges {
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-top: 22px;
  }
  .badge { padding: 7px 13px; }
  .hero { min-height: 0; padding-bottom: 30px; }
}

@media (max-width: 520px) {
  body { font-size: 16px; }
  .masthead { gap: 6px 8px; padding-inline: 12px; }
  .brand { gap: 7px; padding: 4px 2px; }
  .brand-text { font-size: 16px; }
  .fold > summary { padding: 8px 8px; gap: 3px; font-size: 16px; }
  .signup { margin-inline: 12px; }
  .foot { justify-content: flex-start; }
}

@media (max-width: 400px) {
  .brand-text { display: none; }
  .fold > summary { padding: 8px 6px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  body::before { animation: none; }
  .will { opacity: 1; transform: none; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

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