@keyframes page-enter {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes page-exit {
  from {
    opacity: 1;
  }

  to {
    opacity: 0;
  }
}

body {
  animation: page-enter 260ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

html.is-page-leaving body {
  animation: page-exit 180ms ease both;
  pointer-events: none;
}

body > .page-marker {
  position: fixed;
  top: 112px;
  right: clamp(26px, 4vw, 64px);
  z-index: 20;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: #777168;
  font-size: 10px;
  line-height: 1;
  letter-spacing: 0;
  writing-mode: vertical-rl;
  pointer-events: none;
}

body > .page-marker i {
  width: 1px;
  height: 65px;
  background: #bdb7ae;
}

.header-actions,
.guest-actions,
.member-actions {
  display: flex;
  align-items: center;
  gap: 22px;
  font-size: 12px;
}

.guest-actions[hidden],
.member-actions[hidden] {
  display: none;
}

.instagram-link,
.intro-qna-link,
.board-link,
.inquiry-trigger,
.purchase-link,
.login-link {
  color: #1a1918;
}

.instagram-link:hover,
.intro-qna-link:hover,
.board-link:hover,
.inquiry-trigger:hover,
.purchase-link:hover,
.login-link:hover {
  color: var(--accent, #c65436);
}

.instagram-link {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
}

.instagram-icon {
  display: block;
  width: 22px;
  height: 22px;
  stroke-width: 1.85;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.inquiry-menu {
  position: relative;
}

.inquiry-trigger {
  height: 30px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: default;
  font: inherit;
}

.inquiry-dropdown {
  position: absolute;
  top: 100%;
  left: 50%;
  z-index: 40;
  display: grid;
  min-width: 86px;
  padding: 10px 0 8px;
  border: 1px solid var(--hairline, #ded7ce);
  border-top: 8px solid transparent;
  background: rgba(255, 254, 250, 0.98);
  background-clip: padding-box;
  box-shadow: 0 12px 28px rgba(17, 16, 14, 0.08);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -4px);
  transition:
    opacity 140ms ease,
    transform 140ms ease;
}

.inquiry-dropdown a {
  padding: 8px 14px;
  color: #1a1918;
  font-size: 12px;
  line-height: 1;
  white-space: nowrap;
}

.inquiry-dropdown a:hover {
  color: var(--accent, #c65436);
}

.inquiry-menu:hover .inquiry-dropdown,
.inquiry-menu:focus-within .inquiry-dropdown {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, 0);
}

.header-divider {
  width: 1px;
  height: 17px;
  background: var(--hairline, #ded7ce);
}

.join-button,
.logout-button {
  display: inline-grid;
  place-items: center;
  min-width: 54px;
  height: 28px;
  padding: 0 12px;
  border: 1px solid #0c0c0b;
  border-radius: 0;
  background: #0c0c0b;
  color: #fff;
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
}

.member-nickname {
  display: inline-block;
  max-width: 150px;
  overflow: hidden;
  color: #1a1918;
  text-overflow: ellipsis;
  text-decoration: underline;
  text-underline-offset: 4px;
  white-space: nowrap;
}

.member-nickname:hover {
  color: var(--accent, #c65436);
}

.purchase-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
}

.purchase-modal[hidden] {
  display: none;
}

.purchase-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(17, 16, 14, 0.55);
  backdrop-filter: blur(4px);
}

.purchase-modal-panel {
  position: relative;
  z-index: 1;
  width: min(460px, calc(100vw - 48px));
  padding: 44px 46px 38px;
  border: 1px solid var(--hairline, #ded7ce);
  background: #fffefa;
  text-align: center;
  box-shadow: 0 24px 70px rgba(17, 16, 14, 0.18);
}

.purchase-modal-panel h2 {
  margin: 0;
  color: #1f1d19;
  font-size: 21px;
  font-weight: 700;
}

.purchase-modal-panel p {
  margin: 19px 0 0;
  color: #6c665e;
  font-size: 13px;
  line-height: 1.85;
}

.purchase-modal-button {
  min-width: 92px;
  height: 42px;
  margin-top: 27px;
  border: 0;
  border-radius: 7px;
  background: var(--accent, #c65436);
  color: #fff;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
}

@media (prefers-reduced-motion: reduce) {
  body,
  html.is-page-leaving body {
    animation: none;
  }
}

@media (max-width: 980px) {
  body > .page-marker {
    display: none;
  }
}

/* Shared responsive header: keep navigation labels intact and let groups wrap. */
@media (max-width: 900px) {
  html,
  body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }

  body > .site-header {
    display: flex !important;
    width: 100% !important;
    height: auto !important;
    min-height: 72px;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 20px;
    padding: 14px 20px !important;
  }

  body > .site-header > .wordmark {
    flex: 0 0 auto;
  }

  body > .site-header > .header-actions {
    display: flex;
    min-width: 0;
    flex: 1 1 540px;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px 16px;
  }

  body > .site-header .header-actions > *,
  body > .site-header .guest-actions > *,
  body > .site-header .member-actions > * {
    flex-shrink: 0;
    white-space: nowrap;
    word-break: keep-all;
  }

  body > .site-header .guest-actions,
  body > .site-header .member-actions {
    max-width: 100%;
    flex-wrap: nowrap;
    gap: 10px;
  }

  body > .site-header .member-nickname {
    max-width: min(150px, 30vw);
  }
}

@media (max-width: 720px) {
  body > .site-header {
    align-items: flex-start;
    gap: 11px;
    padding: 13px 16px !important;
  }

  body > .site-header > .wordmark {
    font-size: 30px !important;
  }

  body > .site-header > .header-actions {
    width: 100%;
    flex: 1 0 100%;
    justify-content: flex-start;
    gap: 7px 14px;
  }

  body > .site-header .header-divider {
    display: none;
  }

  body > .site-header .member-actions {
    margin-left: auto;
  }

  body > .site-header .member-nickname {
    max-width: min(120px, 32vw);
  }

  body[data-hide-notifications] > .site-header {
    flex-wrap: nowrap;
    align-items: center;
  }

  body[data-hide-notifications] > .site-header > .header-actions {
    width: auto;
    flex: 0 1 auto;
    justify-content: flex-end;
    margin-left: auto;
  }
}

@media (max-width: 420px) {
  body > .site-header > .header-actions {
    column-gap: 12px;
  }

  body > .site-header .member-nickname {
    max-width: 104px;
  }
}
