/* ===== OE Custom Header ===== */
.oe-header {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 40px);
    max-width: 1400px;
    z-index: 9998;
    padding: 0;
}

.oe-header__inner {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 50px;
    padding: 12px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    box-shadow:
        0 4px 24px rgba(0, 0, 0, 0.06),
        0 1px 3px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.8);
    transition: background .2s ease, box-shadow .2s ease;
}

.oe-site-title a {
    font-size: 22px;
    font-weight: 700;
    text-decoration: none;
    color: #111827;
    transition: opacity 0.2s ease;
}

.oe-site-title a:hover { opacity: 0.7; }

/* Desktop menu */
.oe-desktop-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 32px;
    align-items: center;
}

.oe-desktop-nav a {
    text-decoration: none;
    color: #374151;
    font-size: 15px;
    font-weight: 500;
    transition: color 0.2s ease;
    position: relative;
}

.oe-desktop-nav a:hover { color: #111827; }

.oe-desktop-nav a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: #111827;
    transition: width 0.3s ease;
}

.oe-desktop-nav a:hover::after { width: 100%; }

/* Mobile button */
.oe-menu-toggle {
    appearance: none;
    border: none;
    background: transparent;
    padding: 8px;
    border-radius: 10px;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    color: #374151;
    transition: opacity 0.2s ease;
}

.oe-menu-toggle:hover { opacity: 0.7; }

.oe-menu-toggle:focus-visible {
    outline: 2px solid rgba(59, 130, 246, 0.5);
    outline-offset: 2px;
}

.oe-menu-toggle svg { width: 26px; height: 26px; }

/* Modal */
.oe-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
}

.oe-modal.is-open { display: block; }

.oe-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.oe-modal__panel {
    position: relative;
    max-width: 360px;
    margin: 100px auto 0;
    padding: 18px 16px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.9);
}

.oe-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.oe-modal__title {
    font-weight: 700;
    font-size: 14px;
    color: #111827;
    opacity: 0.85;
    margin: 0;
}

.oe-modal__close {
    appearance: none;
    border: none;
    background: transparent;
    padding: 8px;
    border-radius: 10px;
    cursor: pointer;
    color: #374151;
    transition: opacity 0.2s ease;
}

.oe-modal__close:hover { opacity: 0.7; }

.oe-modal__close:focus-visible {
    outline: 2px solid rgba(59, 130, 246, 0.5);
    outline-offset: 2px;
}

.oe-modal__close svg { width: 22px; height: 22px; }

.oe-mobile-nav ul {
    list-style: none;
    margin: 0;
    padding: 8px 6px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.oe-mobile-nav a {
    display: block;
    padding: 12px 16px;
    border-radius: 14px;
    text-decoration: none;
    color: #111827;
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(0, 0, 0, 0.05);
    font-weight: 500;
    transition: all 0.2s ease;
}

.oe-mobile-nav a:hover {
    background: rgba(255, 255, 255, 0.8);
    transform: translateX(4px);
}

/* Responsive */
@media (max-width: 767px) {
    .oe-header { top: 12px; width: calc(100% - 24px); }
    .oe-header__inner { padding: 10px 20px; border-radius: 40px; }
    .oe-site-title a { font-size: 18px; }
    .oe-desktop-nav { display: none; }
    .oe-menu-toggle { display: inline-flex; }
}

@media (min-width: 768px) {
    .oe-desktop-nav { display: block; }
    .oe-menu-toggle { display: none; }
}

/* ロゴ表示 */
.oe-site-logo-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.oe-site-logo {
    display: block;
    height: 40px;   /* PC */
    width: auto;
}

@media (max-width: 767px) {
    .oe-site-logo {
        height: 30px; /* SP */
    }
}

/* ロゴ未設定時のフォールバック文字 */
.oe-site-logo-text {
    font-size: 22px;
    font-weight: 700;
    color: #111827;
}

@media (max-width: 767px) {
    .oe-site-logo-text {
        font-size: 18px;
    }
}

/* ===== その他 dropdown ===== */
.oe-has-dropdown {
  position: relative;
}

/* 重要：リンクの下線アニメが button にも影響しないように */
.oe-nav-item button.oe-dropdown-toggle::after {
  content: none !important;
}

.oe-dropdown-toggle,
.oe-mobile-dropdown-toggle {
  appearance: none;
  border: none;
  background: transparent;
  padding: 0;
  cursor: pointer;
  font: inherit;
  color: inherit;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.oe-dropdown-toggle {
  text-decoration: none;
  color: #374151;
  font-size: 15px;
  font-weight: 500;
  position: relative;
}

.oe-dropdown-toggle:hover {
  color: #111827;
}

.oe-caret {
  width: 10px;
  height: 10px;
  display: inline-block;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  opacity: 0.7;
}

/* =========================================================
   ここが今回の修正ポイント
   - 初期は必ず隠す（上書きされても隠れるように）
   - is-open のときだけ表示
   - display だけだと上書きされる事があるので
     visibility / opacity / pointer-events も併用
========================================================= */

/* PC dropdown menu */
.oe-dropdown-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 280px;
  list-style: none;
  margin: 0;
  padding: 10px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.9);
  z-index: 10000;

  /* 初期は絶対に隠す */
  display: none !important;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-4px);
  transition: opacity .15s ease, transform .15s ease, visibility .15s ease;
}

.oe-has-dropdown.is-open .oe-dropdown-menu {
  display: block !important;
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.oe-dropdown-menu a {
  display: block;
  padding: 12px 14px;
  border-radius: 14px;
  text-decoration: none;
  color: #111827;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(0,0,0,0.05);
  font-weight: 500;
  transition: all 0.2s ease;
}

.oe-dropdown-menu a:hover {
  background: rgba(255, 255, 255, 0.85);
  transform: translateX(4px);
}

/* SP: dropdown menu inside modal */
.oe-mobile-other .oe-mobile-dropdown-menu {
  list-style: none;
  margin: 6px 0 0;
  padding: 0 0 0 10px;

  /* 初期は必ず隠す */
  display: none !important;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-2px);
  transition: opacity .15s ease, transform .15s ease, visibility .15s ease;
}

.oe-mobile-other.is-open .oe-mobile-dropdown-menu {
  display: block !important;
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.oe-mobile-dropdown-toggle {
  width: 100%;
  text-align: left;
  padding: 12px 16px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(0,0,0,0.05);
  font-weight: 600;
}

.oe-mobile-dropdown-toggle:hover {
  background: rgba(255,255,255,0.8);
}