:root {
  --blue: #3bb1ff;
  --red: #ff5252;
  --ink: #000000;
  --paper: #fdfbf5;
  --card: #ffffff;
  --line: #d9d3c6;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: 'Noto Sans KR', system-ui, -apple-system, 'Segoe UI', 'Microsoft YaHei', sans-serif;
  font-size: 17px;
  line-height: 1.7;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--ink); }

h1, h2, h3 {
  margin: 0 0 .55em;
  line-height: 1.25;
  font-weight: 700;
  letter-spacing: -.015em;
}

p { margin: 0 0 1em; }

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

.mark {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 60;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  background: var(--card);
  border: 3px solid var(--ink);
  border-radius: 6px;
  box-shadow: 4px 4px 0 var(--ink);
  font-size: 18px;
  font-weight: 700;
  text-decoration: none;
}
.mark img { width: 26px; height: 26px; object-fit: contain; }

/* 头图 */
.hero {
  position: relative;
  min-height: 70vh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 420px);
  align-items: center;
  gap: 28px;
  padding: 84px clamp(18px, 5vw, 64px) 64px;
  background: var(--blue);
  border-bottom: 4px solid var(--ink);
}

.hero-txt { text-align: right; }

.hero h1 { font-size: clamp(30px, 5.2vw, 54px); margin: 0 0 .45em; }

.hero .lead {
  margin: 0 0 0 auto;
  max-width: 34ch;
  font-size: 17px;
  background: var(--card);
  border: 3px solid var(--ink);
  border-radius: 4px;
  box-shadow: 4px 4px 0 var(--ink);
  padding: 8px 12px;
}

.badge {
  position: absolute;
  top: 22px;
  right: clamp(18px, 5vw, 64px);
  margin: 0;
  background: var(--red);
  color: #fff;
  border: 3px solid var(--ink);
  border-radius: 999px;
  padding: 5px 16px;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: .06em;
  box-shadow: 4px 4px 0 var(--ink);
  transform: rotate(4deg);
}

.collage { position: relative; margin: 0; min-height: 340px; }
.collage img {
  position: absolute;
  width: 64%;
  max-width: 290px;
  object-fit: cover;
  background: var(--card);
  border: 4px solid var(--ink);
  border-radius: 6px;
  box-shadow: 8px 8px 0 var(--ink);
}
.collage .s1 { top: 0; left: 0; transform: rotate(-4deg); z-index: 2; }
.collage .s2 { bottom: 0; right: 0; transform: rotate(5deg); z-index: 1; }

/* 舞台 */
.stage {
  max-width: 1180px;
  margin: 0 auto;
  padding: 40px clamp(16px, 4vw, 32px) 24px;
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
  gap: 26px;
  align-items: start;
}

.rail {
  position: sticky;
  top: 20px;
  background: var(--card);
  border: 3px solid var(--ink);
  border-radius: 6px;
  box-shadow: 5px 5px 0 var(--ink);
  padding: 14px 16px 18px;
}
.rail h2 { font-size: 19px; margin: 0 0 10px; }
.rail h2 > span {
  display: inline-block;
  background: var(--blue);
  border: 3px solid var(--ink);
  border-radius: 4px;
  padding: 1px 10px;
  box-shadow: 3px 3px 0 var(--ink);
}
.rail ol { list-style: none; margin: 0; padding: 0; counter-reset: r; }
.rail li { counter-increment: r; }
.rail a {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 4px 2px;
  font-weight: 500;
  text-decoration: none;
  border-bottom: 2px dashed var(--line);
}
.rail a::before {
  content: counter(r);
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  display: grid;
  place-items: center;
}
.rail a:hover { color: var(--red); }

/* 正文 */
.body { min-width: 0; }

.body > section {
  background: var(--card);
  border: 3px solid var(--ink);
  border-radius: 6px;
  box-shadow: 5px 5px 0 var(--ink);
  padding: 24px clamp(16px, 3vw, 30px) 10px;
  margin: 0 0 26px;
  scroll-margin-top: 24px;
}
.body > section:target {
  border-color: var(--red);
  box-shadow: 6px 6px 0 var(--red);
}

.body h2 { font-size: clamp(22px, 3.2vw, 30px); margin: .1em 0 .7em; }
.body h2 > span {
  display: inline-block;
  background: var(--blue);
  border: 3px solid var(--ink);
  border-radius: 4px;
  padding: 0 10px;
  box-shadow: 3px 3px 0 var(--ink);
}
.body h3 { font-size: 20px; margin: 1.1em 0 .5em; }
.body h3 > span { border-bottom: 4px solid var(--red); padding-bottom: 1px; }

.body a {
  font-weight: 500;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}
.body a:hover { background: var(--blue); }

.body figure {
  margin: 0 0 1.1em;
  border: 3px solid var(--ink);
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 4px 4px 0 var(--ink);
}
.body figcaption { padding: 6px 12px; font-size: 16px; border-top: 3px solid var(--ink); }
.body img { border: 3px solid var(--ink); border-radius: 4px; }
.body ul, .body ol { padding-left: 1.2em; margin: 0 0 1em; }
.body li { margin: 0 0 .4em; }
.body blockquote {
  margin: 0 0 1.1em;
  padding: 4px 0 4px 14px;
  border-left: 6px solid var(--red);
  background: #fff2f2;
}
.body table { width: 100%; border-collapse: collapse; margin: 0 0 1.1em; }
.body th, .body td { border: 2px solid var(--ink); padding: 8px 10px; text-align: left; }

/* 页脚 */
.docket {
  margin-top: 44px;
  background: var(--ink);
  color: #fff;
  border-top: 4px solid var(--ink);
  padding: 36px clamp(16px, 4vw, 32px) 118px;
}

.fcols {
  max-width: 1180px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 22px;
}

.fbrand strong { display: block; font-size: 24px; line-height: 1.3; letter-spacing: -.02em; }

.fcol h3 { font-size: 16px; margin: 0 0 10px; color: var(--blue); }
.fcol h3 > span { border-bottom: 3px solid var(--red); padding-bottom: 2px; }
.fcol dl { margin: 0; }
.fcol dt { margin: 0; }
.fcol dd { display: none; }
.fcol a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  color: #fff;
  text-decoration: none;
  font-weight: 500;
}
.fcol a:hover { color: var(--blue); text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: 4px; }

.fbase {
  max-width: 1180px;
  margin: 26px auto 0;
  padding-top: 16px;
  border-top: 3px solid #fff;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  font-size: 16px;
}
.fbase p { margin: 0; }
.fend { display: flex; gap: 18px; }
.fend a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  color: #fff;
  text-decoration: none;
  font-weight: 500;
}
.fend a:hover { color: var(--blue); }

/* 底部固定导航 */
.dock {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 55;
  background: var(--card);
  border-top: 4px solid var(--ink);
  padding: 8px 10px calc(8px + env(safe-area-inset-bottom));
}
.dock dl {
  max-width: 1180px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: thin;
  padding-bottom: 3px;
}
.dock dt {
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
}
.dock dd { flex: 0 0 auto; margin: 0 6px 0 0; }
.dock a {
  display: flex;
  align-items: center;
  min-height: 42px;
  padding: 8px 14px;
  border: 3px solid var(--ink);
  border-radius: 999px;
  background: var(--card);
  color: var(--ink);
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 3px 3px 0 var(--ink);
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
}
.dock a:hover, .dock a:focus-visible { background: var(--blue); transform: translate(-1px, -1px); box-shadow: 5px 5px 0 var(--ink); }
.dock a:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }

@keyframes rise {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
.dock dt, .dock dd { animation: rise .4s ease both; }
.dock dd:nth-of-type(1) { animation-delay: .04s; }
.dock dd:nth-of-type(2) { animation-delay: .08s; }
.dock dd:nth-of-type(3) { animation-delay: .12s; }
.dock dd:nth-of-type(4) { animation-delay: .16s; }
.dock dd:nth-of-type(5) { animation-delay: .2s; }
.dock dd:nth-of-type(6) { animation-delay: .24s; }
.dock dd:nth-of-type(7) { animation-delay: .28s; }
.dock dd:nth-of-type(8) { animation-delay: .32s; }

.rv { opacity: 0; transform: translateY(16px); transition: opacity .5s ease, transform .5s ease; }
.rv.in { opacity: 1; transform: translateY(0); }

@media (max-width: 880px) {
  .hero { grid-template-columns: 1fr; min-height: 0; padding-top: 92px; padding-bottom: 40px; }
  .hero .lead { max-width: none; }
  .collage { min-height: 250px; margin-top: 6px; }
  .collage img { width: 58%; max-width: 230px; }
  .stage { grid-template-columns: 1fr; padding-top: 26px; }
  .rail { position: static; }
  .fcols { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 560px) {
  .fcols { grid-template-columns: 1fr; }
  .body > section { padding: 18px 14px 6px; }
  .dock a { padding: 8px 12px; }
  .badge { top: 18px; right: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .dock dt, .dock dd { animation: none; }
  .rv { opacity: 1; transform: none; transition: none; }
  * { transition-duration: .001s !important; }
}

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