* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
  color: #5f5363;
  background: #777;
  font-family: 'Nanum Gothic', 'Malgun Gothic','Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  font: inherit;
}

a {
  color: inherit;
}

.wiki-page {
  min-height: 100dvh;
  position: relative;
  isolation: isolate;
  padding: 2.25rem clamp(1rem, 3vw, 2rem) 4rem;
}

.wiki-page::before {
  content: '';
  position: fixed;
  z-index: -2;
  inset: 0;
  background:
    linear-gradient(rgba(25, 18, 33, 0.18), rgba(25, 18, 33, 0.18)),
    url('./background.png') center / cover no-repeat;
}

.wiki-page::after {
  content: '';
  position: fixed;
  z-index: -1;
  inset: 0;
  pointer-events: none;
  background: rgba(47, 28, 49, 0.17);
}

.wiki-shell {
  width: min(100%, 1060px);
  margin: 0 auto;
}

.site-header {
  position: relative;
  z-index: 10;
}

.site-title {
  display: block;
  width: fit-content;
  color: #fff8fc;
  text-decoration: none;
  text-shadow: 0 1px 8px rgba(48, 20, 37, 0.45);
}

.site-title-desktop {
  margin: 0 auto 0.85rem;
  font-size: clamp(1.45rem, 3vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.1em;
}

.site-title-mobile {
  display: none;
}

.navigation-wrap {
  position: relative;
}

.main-navigation {
  min-height: 2.65rem;
  display: flex;
  align-items: stretch;
  background: rgb(255, 88, 124);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 0.45rem;
  box-shadow: 0 5px 0 rgba(88, 27, 67, 0.24), 0 8px 22px rgba(50, 21, 45, 0.2);
}

.desktop-menu-items {
  display: flex;
  flex: 1;
  align-items: stretch;
}

.main-menu-button,
.all-menu-button {
  border: 0;
  color: #fff7fb;
  background: transparent;
}

.main-menu-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  padding: 0.58rem 0.7rem;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.05em;
  text-decoration: none;
  white-space: nowrap;
}

.main-menu-button:hover,
.main-menu-button:focus-visible,
.main-menu-button.is-active,
.all-menu-button:hover,
.all-menu-button:focus-visible,
.all-menu-button.is-active {
  color: #5a1728;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.35);
  outline: none;
}

.all-menu-button {
  width: 3rem;
  display: grid;
  place-items: center;
  flex: 0 0 3rem;
  cursor: pointer;
  border-left: 1px solid rgba(255, 255, 255, 0.24);
}

.all-menu-button svg {
  width: 20px;
  height: 20px;
}

.all-navigation {
  position: absolute;
  top: calc(100% + 0.55rem);
  right: 0;
  left: 0;
  overflow: hidden;
  padding: 1.1rem;
  border: 1px solid rgba(115, 57, 93, 0.25);
  border-radius: 0.45rem;
  background: rgba(255, 248, 252, 0.98);
  box-shadow: 0 15px 30px rgba(52, 25, 49, 0.22);
}

.all-navigation[hidden] {
  display: none;
}

.all-navigation-heading {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding-bottom: 0.8rem;
  border-bottom: 1px solid #d8c9dc;
}

.all-navigation-heading span {
  color: #746777;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
}

.all-navigation-heading small {
  color: #847689;
  font-size: 0.7rem;
}

.all-navigation-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.15rem 1rem;
  padding-top: 1rem;
}

.all-navigation-group a {
  text-decoration: none;
}

.all-navigation-group a:hover,
.all-navigation-group a:focus-visible {
  color: #d8497e;
  text-decoration: underline;
  text-underline-offset: 0.25rem;
  outline: none;
}

.all-navigation-group > a {
  display: inline-block;
  margin-bottom: 0.45rem;
  color: #d8497e;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.07em;
}

.all-navigation-group ul {
  display: grid;
  gap: 0.27rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.all-navigation-group li a {
  color: #746777;
  font-size: 14px;
  letter-spacing: -0.05em;
}

.page-layout {
  display: grid;
  grid-template-columns: 244px minmax(0, 1fr);
  gap: 0.6rem;
  align-items: start;
  margin-top: 0.6rem;
}

.submenu-block {
  min-width: 0;
  height: 400px;
  position: relative;
  background: url('./submenu-background.png') center / 100% 100% no-repeat;
}

.submenu-inner {
  position: absolute;
  top: 42px;
  left: 47px;
  width: 150px;
  height: 309px;
  padding-top: 5px;
  overflow: hidden;
  color: #756879;
}

.submenu-current-link,
.submenu-index-list a {
  color: inherit;
  text-decoration: none;
}

.submenu-current-link {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 3px 10px 2px;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.08em;
  white-space: nowrap;
}

.submenu-current-link img,
.submenu-index-list img {
  width: 25px;
  height: 26px;
  flex: 0 0 auto;
  object-fit: contain;
}

.submenu-current-link:hover,
.submenu-current-link:focus-visible,
.submenu-index-list a:hover,
.submenu-index-list a:focus-visible,
.submenu-section-list a:hover,
.submenu-section-list a:focus-visible {
  color: #d8497e;
  outline: none;
}

.submenu-divider {
  width: 130px;
  height: 2px;
  margin: 2px auto 22px;
  background: #9c8ab1;
}

.submenu-section-list,
.submenu-index-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.submenu-section-list {
  display: grid;
  gap: 10px;
  margin-left: 20px;
  padding: 0 12px 0 20px;
}

.submenu-section-list li {
  position: relative;
  min-width: 0;
}

.submenu-section-list li::before {
  content: '';
  position: absolute;
  top: 0.56em;
  left: -10px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #aa91b5;
}

.submenu-section-list a {
  display: block;
  color: #827787;
  font-size: 15px;
  line-height: 1.35;
  letter-spacing: -0.07em;
  text-decoration: none;
  word-break: keep-all;
}

.submenu-index-list {
  display: grid;
  gap: 8px;
  padding: 2px 8px;
}

.submenu-index-list a {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.08em;
  white-space: nowrap;
}

.content-column {
  min-width: 0;
}

.content-block {
  overflow: hidden;
  min-height: clamp(30rem, 70vh, 43rem);
  background: rgba(255, 251, 253, 1) url('./ssekdong.png') bottom repeat-x;
  border: 1px solid rgba(111, 76, 112, 0.16);
  border-radius: 0.15rem 0.15rem 0.4rem 0.4rem;
  box-shadow: 0 12px 24px rgba(43, 24, 45, 0.16);
}

.wiki-content {
  min-height: clamp(26rem, 63vh, 39rem);
  padding: clamp(1.5rem, 4vw, 3rem);
  padding-bottom: 7rem;
 
}

.wiki-content-header {
  margin-bottom: 2.25rem;
  padding-bottom: 1.25rem;
  border-bottom: 2px solid #d8c9dc;
}

.wiki-content-header h1,
.wiki-content-section h2 {
  margin: 0;
  color: #6d526f;
  letter-spacing: -0.07em;
}

.wiki-content-header h1 {
  font-size: clamp(1.65rem, 3vw, 2.1rem);
}

.wiki-content-header p {
  margin: 0.65rem 0 0;
  color: #847689;
  font-size: 16px;
  line-height: 1.7;
}

.wiki-content-section {
  scroll-margin-top: 1rem;
  margin-top: 2.4rem;
}

.wiki-content-section:first-of-type {
  margin-top: 0;
}

.wiki-content-section h2 {
  font-size: 21px;
}

.wiki-content-section p {
  margin: 0.75rem 0 0;
  color: #766b79;
  font-size: 16px;
  line-height: 1.8;
}

.wiki-content img {
  max-width: 100%;
  height: auto;
}

.wiki-content [data-fancybox] {
  display: inline-block;
  cursor: zoom-in;
}

.wiki-content [data-fancybox] img {
  display: block;
}

.site-info-block {
  min-height: 4.2rem;
  margin-top: 1.05rem;
  padding: 1.1rem 1.45rem;
  text-align: center;
  background: rgba(255, 250, 253, 0.96);
  border: 1px solid rgba(111, 76, 112, 0.18);
  border-radius: 0.4rem;
  box-shadow: 0 8px 18px rgba(43, 24, 45, 0.12);
}

.site-info-heading {
  display: block;
  color: #6d526f;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.04em;
}

.site-info-divider {
  width: 100%;
  height: 1px;
  margin: 0.75rem 0 0;
  background: #d8c9dc;
}

.site-credits {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.45rem 1.1rem;
  padding: 0.8rem 0 0.2rem;
  color: #766b79;
  font-size: 14px;
  line-height: 1.6;
}

.site-credit {
  display: inline-flex;
  gap: 0.3rem;
  align-items: baseline;
  white-space: nowrap;
}

.site-credit-role {
  font-weight: 400;
}

.site-credit-name {
  color: #5f4d63;
  font-weight: 800;
}

.server-open-date {
  margin-top: 0.7rem;
  color: #978b99;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.03em;
}

@media (max-width: 820px) {
  .wiki-page {
    padding-top: 1rem;
  }

  .site-title-desktop {
    display: none;
  }

  .site-title-mobile {
    display: flex;
    align-items: center;
    flex: 1;
    padding: 0 0.95rem;
    font-size: 0.95rem;
    font-weight: 800;
    letter-spacing: -0.1em;
    white-space: nowrap;
  }

  .main-navigation {
    min-height: 2.9rem;
  }

  .desktop-menu-items {
    display: none;
  }

  .all-navigation-group > a {
    margin-bottom: 0.55rem;
    font-size: 18px;
    line-height: 1.4;
  }

  .all-navigation-group ul {
    gap: 0.4rem;
  }

  .all-navigation-group li a {
    font-size: 16px;
    line-height: 1.45;
  }

  .all-menu-button {
    width: 3.1rem;
    flex-basis: 3.1rem;
  }

  .page-layout {
    display: block;
    margin-top: 0.7rem;
  }

  .submenu-block {
    display: none;
  }

  .content-block,
  .wiki-content {
    min-height: 70vh;
  }

  .wiki-content {
    padding: 1.5rem 1.25rem 6rem;
  }
}

@media (max-width: 560px) {
  .wiki-page {
    padding-right: 0.75rem;
    padding-bottom: 2rem;
    padding-left: 0.75rem;
  }

  .all-navigation {
    padding: 0.9rem;
  }

  .all-navigation-heading {
    display: block;
  }

  .all-navigation-heading small {
    display: block;
    margin-top: 0.35rem;
  }

  .all-navigation-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem 0.8rem;
    max-height: calc(100dvh - 9rem);
    overflow-y: auto;
  }

  .content-block,
  .wiki-content {
    min-height: 68vh;
  }

  .wiki-content-header {
    margin-bottom: 1.8rem;
  }

  .wiki-content-header p,
  .wiki-content-section p {
    font-size: 15px;
  }

  .site-info-block {
    min-height: 3.7rem;
    margin-top: 0.85rem;
    padding-inline: 1rem;
  }

  .site-credits {
    gap: 0.4rem 0.8rem;
    padding-top: 0.7rem;
  }
}

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