/* ===== Header — 여백은 Tailwind 유틸리티(마크업), 드롭다운 애니메이션·가상요소는 예외 ===== */
.header {
  background: var(--color-header-bg);
  height: 80px;
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
}
.header-inner {
  width: 100%;
  max-width: var(--max-width);
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
}
.header-left {
  position: relative;
  display: flex;
  align-items: center;
}
.badge-issue {
  padding: 2.4px 10px;
  background: var(--color-accent);
  border-radius: 4px 0 0px 4px;
  letter-spacing: -0.5px;
  font-weight: 700;
  font-size: var(--fs-13);
  color: #000;
  white-space: nowrap;
}
.badge-date-wrap {
  position: relative;
}
.badge-date {
  border: 1px solid var(--color-accent);
  display: flex;
  align-items: center;
  border-radius: 0 4px 4px 0;
  gap: 10px;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.25s ease, border-color 0.25s ease, color 0.25s ease;
  color: var(--color-accent);
}
.badge-date span,
.badge-date .badge-date-text {
  font-weight: 300;
  font-size: var(--fs-11);
  color: #fff;
  white-space: nowrap;
  transition: color 0.25s ease;
}
.badge-date__chevron {
  flex-shrink: 0;
  transition: transform 0.3s ease;
  color: var(--color-accent);
}
.badge-date.is-open {
  background-color: #fff;
  border-color: var(--color-accent);
}
.badge-date.is-open .badge-date-text,
.badge-date.is-open span.badge-date-text {
  color: #000;
}
.badge-date.is-open .badge-date__chevron {
  transform: rotate(180deg);
  color: #000;
}

/* 호수 드롭다운: padding/margin 은 펼침 애니메이션용으로 유지 */
.vol-dropdown {
  position: absolute;
  top: 89%;
  left: 0;
  right: 0;
  width: 100%;
  box-sizing: border-box;
  margin-top: 4px;
  background: black;
  border: 1px solid var(--color-accent-alpha);
  border-radius: 4px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
  z-index: 200;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  padding: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-6px);
  transition:
    max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1),
    opacity 0.28s ease,
    transform 0.35s cubic-bezier(0.4, 0, 0.2, 1),
    padding 0.2s ease,
    visibility 0s linear 0.35s;
}
/* .vol-dropdown.is-open — sub.css에서 .related-link-dropdown과 공통 정의 */
.vol-dropdown[hidden] {
  display: none !important;
}
.vol-dropdown__list {
  list-style: none;
  margin: 0;
  padding: 0;
  background: transparent;
}
.vol-dropdown__item {
  margin: 0;
  border: none;
  background: transparent;
  text-align: center;
}
.vol-dropdown__link {
  display: block;
  padding: 0.5rem 0.75rem;
  font-weight: 300;
  letter-spacing: -0.5px;
  font-size: var(--fs-11);
  color: #fff;
  text-decoration: none;
  white-space: nowrap;
  background: transparent;
}
.vol-dropdown__link:hover {
  background: rgba(255, 255, 255, 0.1);
  font-weight: 700;
  color: var(--color-accent);
}

.vol-dropdown__item--past {
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  background: transparent;
}
.vol-dropdown__link--past {
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 300;
  font-size: var(--fs-11);
  color: #fff;
  text-decoration: none;
  background: transparent;
}
.vol-dropdown__link--past:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--color-accent);
}
.header-left img {
  width: 200px;
  height: 90px;
  object-fit: contain;
}
.header-logo {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 200px;
  height: 90px;
}
.header-logo-left {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 200px;
  height: 90px;
}
.header-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.header-right {
  display: flex;
  /* gap: 12px; */
  align-items: center;
  z-index: 1;
}
.btn-icon {
  background: none;
  border: none;
  cursor: pointer;
  color: #fff;
  display: flex;
}
.btn-icon.menu-open .icon-menu { display: none; }
.btn-icon.menu-open .icon-close { display: block !important; }
.icon-search, .icon-menu,
.btn-icon .icon-img {
  display: block;
}
.btn-icon .icon-img.icon-close {
  display: none;
}

#btn-menu .btn-menu-icon-wrap {
  display: inline-block;
  position: relative;
  perspective: 100px;
  transform-style: preserve-3d;
  transition: transform 0.4s ease;
}
#btn-menu .btn-menu-icon-wrap .icon-menu {
  display: block;
  backface-visibility: hidden;
  transform: rotateY(0deg);
}
#btn-menu .btn-menu-icon-wrap .icon-close {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  backface-visibility: hidden;
  transform: rotateY(180deg);
}
#btn-menu.menu-open .btn-menu-icon-wrap {
  transform: rotateY(180deg);
}

.search-panel {
  position: fixed;
  top: 90px;
  left: 0;
  right: 0;
  z-index: 95;
  background: var(--color-nav-bg);
  border-bottom: 1px solid var(--color-muted);
}
.search-panel[hidden] {
  display: none !important;
}
.search-panel form {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.search-panel fieldset {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px 16px;
  border: none;
}
.search-panel select,
.search-panel input[type="text"],
.search-panel .SWS__btn {
  box-sizing: border-box;
  height: 2.75rem;
  min-height: 2.75rem;
  font-size: var(--fs-13);
  font-family: inherit;
  border-radius: 4px;
  vertical-align: middle;
}
.search-panel select,
.search-panel input[type="text"] {
  color: #000;
  background: #fff;
  border: 1px solid var(--color-border);
}
.search-panel .SWS__btn {
  font-weight: 700;
  color: #fff;
  background: var(--color-accent);
  border: none;
  cursor: pointer;
}
.search-panel .SWS__btn:hover {
  background: var(--color-accent-hover);
}
.search-panel .btn__close {
  display: block;
  font-weight: 700;
  font-size: var(--fs-09);
  color: #fff;
  background: none;
  border: none;
  cursor: pointer;
}
.search-panel .btn__close:hover {
  color: var(--color-accent);
}

.app-search-open #SW_search ~ * {
  pointer-events: none;
}
#app.app-search-open::after {
  content: '';
  position: fixed;
  top: 120px;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 94;
  background: rgba(0, 0, 0, 0.5);
  pointer-events: auto;
}

.nav-mobile {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--color-nav-bg);
  z-index: 90;
  min-height: 100vh;
  height: 100vh;
  overflow-y: auto;
  transform: translateY(-100%);
  transition: transform 0.22s ease-out;
  pointer-events: none;
}
.nav-mobile.nav-mobile--open {
  transform: translateY(0);
  pointer-events: auto;
}
.nav-mobile[hidden] {
  display: none !important;
  transition: none;
}

.nav-mobile__main {
  list-style: none;
  border-bottom: 1px solid #444;
  text-align: left;
}

.nav-mobile__item {
  border-bottom: 1px solid #444;
}
.nav-mobile__item:last-child { border-bottom: none; }

.nav-mobile__label {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  color: #fff;
  font-weight: 700;
  font-size: var(--fs-15);
  text-decoration: none;
  text-align: left;
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  border-bottom: 1px dashed gray;
  padding-left: 16px;
}
.nav-mobile__label-text {
  display: inline-block;
  position: relative;
}
.nav-mobile__label-text::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  height: 2px;
  width: 0;
  background: currentColor;
  transition: width 0.25s ease;
}
.nav-mobile__label:hover { color: var(--color-accent); }
.nav-mobile__label:hover .nav-mobile__label-text::before { width: 100%; }
.nav-mobile__item.has-sub .nav-mobile__label::after {
  content: '';
  width: 8px;
  height: 8px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  transition: transform 0.2s ease;
  flex-shrink: 0;
  margin-left: 8px;
}
.nav-mobile__main .nav-mobile__label-text::before {
  left: 50%;
  transform: translateX(-50%);
}
.nav-mobile__item.has-sub .nav-mobile__label.is-open::after {
  transform: rotate(-135deg);
}

.nav-mobile__sub {
  list-style: none;
  text-align: center;
}
.nav-mobile__sub[hidden] { display: none !important; }
.nav-mobile__sub a {
  position: relative;
  display: inline-block;
  color: rgba(255, 255, 255, 0.9);
  font-weight: 500;
  font-size: var(--fs-13);
  text-decoration: none;
  border: none;
}
.nav-mobile__sub a::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  height: 2px;
  width: 0;
  background: currentColor;
  transition: width 0.25s ease;
}
.nav-mobile__sub a:hover { color: var(--color-accent); }
.nav-mobile__sub a:hover::before { width: 100%; }
.nav-mobile__sub button.nav-mobile__bottom-action {
  position: relative;
  display: inline-block;
  color: rgba(255, 255, 255, 0.9);
  font-weight: 500;
  background: none;
  border: none;
  font: inherit;
  cursor: pointer;
  text-align: left;
  text-decoration: none;
}
.nav-mobile__sub button.nav-mobile__bottom-action::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  height: 2px;
  width: 0;
  background: currentColor;
  transition: width 0.25s ease;
}
.nav-mobile__sub button.nav-mobile__bottom-action:hover { color: var(--color-accent); }
.nav-mobile__sub button.nav-mobile__bottom-action:hover::before { width: 100%; }

.nav-mobile__bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 24px;
  border-top: 1px solid var(--color-muted);
}
.nav-mobile__bottom-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  align-items: center;
  border: 1px solid var(--color-muted);
  border-radius: 4px;
}
.nav-mobile__bottom-group a,
.nav-mobile__bottom-group button.nav-mobile__bottom-action {
  display: inline-block;
  color: #fff;
  font-weight: 600;
  background: none;
  border: none;
  font: inherit;
  cursor: pointer;
  text-align: left;
  font-size: var(--fs-13);
  text-decoration: none;
}
.nav-mobile__bottom-group .nav-mobile__bottom-link-text {
  display: inline-block;
  position: relative;
}
.nav-mobile__bottom-group .nav-mobile__bottom-link-text::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  height: 2px;
  width: 0;
  background: currentColor;
  transition: width 0.25s ease;
}
.nav-mobile__bottom-group a:not(:last-child)::after,
.nav-mobile__bottom-group button.nav-mobile__bottom-action:not(:last-child)::after {
  content: '';
  display: inline-block;
  width: 1px;
  height: 1em;
  background: rgba(255, 255, 255, 0.3);
  margin-left: 20px;
  vertical-align: middle;
}
.nav-mobile__bottom-group a:hover,
.nav-mobile__bottom-group button.nav-mobile__bottom-action:hover { color: var(--color-accent); }
.nav-mobile__bottom-group a:hover .nav-mobile__bottom-link-text::before,
.nav-mobile__bottom-group button.nav-mobile__bottom-action:hover .nav-mobile__bottom-link-text::before { width: 100%; }

@media (min-width: 769px) {
  .nav-mobile__main {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;

    border-bottom: none;
  }

  .nav-mobile__item {
    flex: 1 1 auto;
    min-width: 180px;
    border-bottom: none;
    border-right: 1px solid var(--color-muted);
  }
  .nav-mobile__item:last-of-type {
    border-right: none;
  }

  .nav-mobile__label {
    justify-content: center;
    padding-left: 0;
  }

  .nav-mobile__item.has-sub .nav-mobile__label {
    cursor: default;
  }
  .nav-mobile__item.has-sub .nav-mobile__label::after {
    display: none;
  }

  .nav-mobile__sub {
    display: block !important;
  }
  .nav-mobile__sub[hidden] {
    display: block !important;
  }
}

@media (max-width: 1200px) {
  .badge-date { display: none; }
}

@media (max-width: 768px) {
  .header { height: 60px; }
  .search-panel { top: 60px; }
  .search-panel fieldset {
    flex-direction: column;
    width: 100%;
    max-width: 100%;
  }
  .search-panel fieldset select,
  .search-panel fieldset input[type="text"],
  .search-panel fieldset .SWS__btn {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }
  #app.app-search-open::after { top: 72px; }
  .badge-issue, .badge-date {
    border-radius: 4px;
  }
  .badge-issue { font-size: var(--fs-10); }
  .header-logo { width: 140px; height: 44px; }
  .header-right { gap: 0px; }
  .nav-mobile__main {
    text-align: left;
  }
  .nav-mobile__label {
    justify-content: flex-start;
    text-align: left;
  }
  .nav-mobile__main .nav-mobile__label-text::before {
    left: 0;
    transform: none;
  }
  .nav-mobile__sub {
    text-align: left;
  }
  .nav-mobile__bottom {
    justify-content: center;
  }
  .nav-mobile__bottom-group {
    justify-content: center;
  }
  .nav-mobile__bottom-group a,
  .nav-mobile__bottom-link-text {
    font-size: var(--fs-10);
  }
  .nav-mobile__label{
    border-bottom: none;
    font-size: var(--fs-13);
  }
}
