/* === HydeyTools 共通ヘッダ — ロゴ & ドロップダウン ===
   各 HTML 側で .ht-header / .ht-header-inner / .ht-title / .ht-nav は
   既存インラインに任せ、ここではロゴボタンとドロップダウン部分だけを定義する。
   ロゴ画像の高さは画面ごとに違うため、ここでは height を指定しない。 */

.ht-logo-wrap {
  position: relative;
  flex-shrink: 0;
}

/* a タグ・button タグどちらでも同じ見た目になるよう両方をターゲットにする。
   <button> の UA デフォルト背景 (灰色のピル) が透けないよう、
   background-color と background-image を明示的にリセットする。 */
.ht-logo {
  position: relative;
  isolation: isolate;
  display: inline-flex;
  align-items: center;
  background-color: transparent;
  background-image: none;
  border: 0;
  border-radius: 999px;
  padding: 5px 8px 11px 12px;
  margin: -5px -8px -11px -12px;
  cursor: pointer;
  color: inherit;
  font: inherit;
  outline: none;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
  -webkit-appearance: none;
  appearance: none;
}
.ht-logo::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border: 1px solid rgba(106, 183, 255, 0.22);
  border-radius: inherit;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.1), rgba(106, 183, 255, 0.04)),
    rgba(255, 255, 255, 0.03);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    0 8px 18px rgba(0, 0, 0, 0.18);
  opacity: 0;
  transform: scale(0.96);
  transition:
    opacity 180ms ease,
    transform 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease;
}
.ht-logo::after {
  content: "";
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 3px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, #6ab7ff, #7ee7c6, #c6e6ff);
  box-shadow: 0 0 10px rgba(106, 183, 255, 0.42);
  opacity: 0;
  transform: scaleX(0.34);
  transform-origin: center;
  transition:
    opacity 180ms ease,
    transform 220ms cubic-bezier(0.2, 0.8, 0.2, 1);
}
.ht-logo img {
  position: relative;
  z-index: 1;
  top: 2px;
  display: block;
  transition: filter 180ms ease, transform 180ms ease;
}
.ht-logo:hover::before,
.ht-logo:focus-visible::before,
.ht-logo[aria-expanded="true"]::before {
  opacity: 1;
  transform: scale(1);
}
.ht-logo:hover::after,
.ht-logo:focus-visible::after,
.ht-logo[aria-expanded="true"]::after {
  opacity: 1;
  transform: scaleX(1);
}
.ht-logo:hover img,
.ht-logo:focus-visible img {
  filter: brightness(1.08) saturate(1.06) drop-shadow(0 4px 10px rgba(0, 0, 0, 0.28));
  transform: translateY(-1px);
}
.ht-logo:active img,
.ht-logo[aria-expanded="true"] img {
  filter: brightness(1.14) saturate(1.12) drop-shadow(0 0 12px rgba(126, 231, 198, 0.42));
  transform: translateY(1px);
}
.ht-logo[aria-expanded="true"]::before {
  border-color: rgba(126, 231, 198, 0.48);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    0 0 0 1px rgba(106, 183, 255, 0.14),
    0 10px 22px rgba(0, 0, 0, 0.26);
}

/* ドロップダウンメニュー */
.ht-logo-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 280px;
  background: rgba(15, 25, 45, 0.97);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  padding: 6px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.55);
  z-index: 1200;
  backdrop-filter: blur(8px);
}
.ht-logo-menu[hidden] { display: none; }
.ht-logo-menu a {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  align-items: center;
  column-gap: 12px;
  padding: 8px 12px;
  color: #e6f0ff;
  text-decoration: none;
  border-radius: 8px;
  transition: background 120ms;
}
.ht-logo-menu a:hover { background: rgba(255, 255, 255, 0.08); }
.ht-logo-menu a:focus-visible { outline: 2px solid #6ab7ff; outline-offset: -2px; }
.ht-logo-menu .ht-menu-icon {
  grid-row: 1 / 3;
  font-size: 22px;
  line-height: 1;
}
.ht-logo-menu .ht-menu-name {
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.02em;
}
.ht-logo-menu .ht-menu-desc {
  font-size: 11px;
  opacity: 0.65;
  line-height: 1.3;
}
.ht-menu-sep {
  height: 1px;
  background: rgba(255, 255, 255, 0.1);
  margin: 4px 6px;
}
