/*
 * ヘッダー専用。important宣言（感嘆符+important）は使わない。
 * `.header-*` の旧実装は main.css 側に残っているため、有効化時にそちらを撤去すること。
 */

.fh {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: #0f0f1a;
}

.fh::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #c8a45a, #e0c078, #c8a45a);
}

.fh-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 2rem;
  height: 56px;
}

.fh-logo {
  flex: 0 0 auto;
  color: #e0c078;
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: 0.02em;
  text-decoration: none;
  white-space: nowrap;
}

.fh-media {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  overflow: hidden;
}

.fh-media a {
  color: #fff;
  text-decoration: none;
  white-space: nowrap;
  padding-bottom: 2px;
  border-bottom: 2px solid transparent;
}

.fh-media a:hover,
.fh-media a.is-active {
  color: #e0c078;
}

.fh-media a.is-active {
  border-bottom: 2px solid #e0c078;
}

.fh-cta {
  flex: 0 0 auto;
  display: inline-block;
  border: 1px solid #e0c078;
  background: transparent;
  color: #e0c078;
  font-weight: 600;
  text-decoration: none;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  white-space: nowrap;
}

.fh-cta:hover {
  background: #e0c078;
  color: #0f0f1a;
}

.fh-burger {
  display: none;
  flex: 0 0 auto;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.fh-burger span {
  display: block;
  width: 22px;
  height: 2px;
  background: #fff;
}

.fh-tools {
  background: #151525;
  border-top: 1px solid rgba(200, 164, 90, 0.2);
}

.fh-toolnav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 2rem;
  height: 44px;
  min-width: 0;
}

.fh-toolnav > a {
  color: #fff;
  text-decoration: none;
  white-space: nowrap;
}

.fh-toolnav > a:hover,
.fh-toolnav > a.is-active {
  color: #e0c078;
}

.fh-dd {
  position: relative;
}

.fh-dd-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: transparent;
  border: 0;
  color: #fff;
  font: inherit;
  cursor: pointer;
  padding: 0;
  white-space: nowrap;
}

.fh-dd-btn:hover,
.fh-dd-btn.is-active {
  color: #e0c078;
}

.fh-dd-arrow {
  font-size: 0.6rem;
}

.fh-dd-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 200px;
  background: #151525;
  border: 1px solid rgba(200, 164, 90, 0.3);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.6);
  padding: 0.5rem 0;
}

.fh-dd.is-open .fh-dd-menu {
  display: block;
}

.fh-dd-menu a {
  display: block;
  padding: 0.5rem 1rem;
  color: #e0e0e0;
  text-decoration: none;
  white-space: nowrap;
}

.fh-dd-menu a:hover,
.fh-dd-menu a.is-active {
  color: #e0c078;
}

.fh-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(86vw, 340px);
  background: #0f0f1a;
  overflow-y: auto;
  transform: translateX(100%);
  transition: transform 0.25s ease;
  z-index: 1100;
}

.fh-drawer.is-open {
  transform: translateX(0);
}

.fh-drawer-inner {
  padding: 1.5rem;
}

.fh-drawer-head {
  color: #e0c078;
  font-size: 0.75rem;
  font-weight: 700;
  margin: 1.25rem 0 0.25rem;
}

.fh-drawer-head:first-child {
  margin-top: 0;
}

.fh-drawer-nav {
  display: flex;
  flex-direction: column;
}

.fh-drawer-nav a {
  display: block;
  padding: 12px 0;
  color: #fff;
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.fh-drawer-nav a:hover,
.fh-drawer-nav a.is-active {
  color: #e0c078;
}

.fh-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1090;
  display: none;
}

.fh-overlay.is-open {
  display: block;
}

@media (max-width: 768px) {
  .fh-bar {
    padding: 0 1rem;
  }

  .fh-logo {
    margin-right: auto;
    font-size: 1.1rem;
  }

  .fh-media,
  .fh-tools {
    display: none;
  }

  .fh-burger {
    display: flex;
  }

  .fh-cta {
    font-size: 0.75rem;
    padding: 0.4rem 0.7rem;
  }
}
