/* ===== Site Header（濃いネイビー・メインカードが主役に） ===== */
.site-header {
  background: #1e293b;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  position: sticky;
  top: 0;
  z-index: 100;
}

.site-header__inner {
  max-width: 1600px;
  margin: 0 auto;
  padding: 0 32px;
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  width: 100%;
}

/* Logo */
.site-header__logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: #fff;
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: -0.02em;
  flex-shrink: 0;
}

.site-header__logo:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.6);
  outline-offset: 2px;
  border-radius: 6px;
}

.site-header__logo-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.88);
  border-radius: 6px;
  flex-shrink: 0;
  opacity: 0.82;
  transition: opacity 0.2s, background 0.2s, color 0.2s;
}

.site-header__logo:hover .site-header__logo-icon {
  opacity: 1;
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.site-header__logo-icon svg {
  width: 18px;
  height: 18px;
}

.site-header__logo-text {
  color: #fff;
}

.site-header__logo-suffix {
  font-weight: 500;
  opacity: 0.92;
  margin-left: 1px;
}

/* Main navigation */
.site-header__main-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: 8px;
  flex-shrink: 0;
}

.site-header__menu {
  position: relative;
}

.site-header__menu-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 12px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.03);
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.86rem;
  font-weight: 600;
  cursor: pointer;
}

.site-header__menu-btn:hover,
.site-header__menu.is-open .site-header__menu-btn {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.28);
  color: #fff;
}

.site-header__menu-panel {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 220px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.18);
  padding: 8px;
  display: none;
  z-index: 120;
}

.site-header__menu.is-open .site-header__menu-panel {
  display: block;
}

.site-header__menu-link {
  display: block;
  padding: 9px 10px;
  border-radius: 8px;
  color: #1e293b;
  text-decoration: none;
  font-size: 0.87rem;
  font-weight: 600;
}

.site-header__menu-link:hover {
  background: #f8fafc;
  color: #0f172a;
}

.nav-group-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--color-text-tertiary, #94a3b8);
  padding: 8px 16px 4px;
  cursor: default;
  user-select: none;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.nav-divider {
  height: 1px;
  background: var(--color-border-tertiary, #e2e8f0);
  margin: 4px 0;
}

/* Mobile toggle */
.site-header__mobile-toggle {
  display: none;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.site-header__mobile-toggle svg {
  width: 18px;
  height: 18px;
}

.site-header__mobile-panel {
  display: none;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: #1e293b;
  padding: 10px 16px 14px;
}

.site-header__mobile-panel.is-open {
  display: block;
}

.site-header__mobile-group + .site-header__mobile-group {
  margin-top: 10px;
}

.site-header__mobile-title {
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.74rem;
  font-weight: 700;
  margin: 6px 0;
  letter-spacing: 0.02em;
}

.site-header__mobile-link {
  display: block;
  text-decoration: none;
  color: rgba(255, 255, 255, 0.92);
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 0.88rem;
}

.site-header__mobile-link:hover {
  background: rgba(255, 255, 255, 0.1);
}

.site-header__mobile-panel .nav-group-label {
  color: rgba(255, 255, 255, 0.62);
  padding: 8px 10px 4px;
}

.site-header__mobile-panel .nav-divider {
  background: rgba(255, 255, 255, 0.16);
}

/* Language switcher */
.site-header__lang {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.lang-switcher__link {
  padding: 6px 12px;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  border-radius: 6px;
  transition: background 0.2s, color 0.2s;
}

.lang-switcher__link:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
}

.lang-switcher__link.is-current {
  color: #fff;
  background: rgba(255, 255, 255, 0.18);
  font-weight: 600;
}

.lang-switcher__link:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.6);
  outline-offset: 2px;
}

/* Feedback: compare summary + auth (limits + login) */
.site-header__feedback {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 20px;
  flex: 1;
  min-width: 0;
  margin-left: 24px;
}

.site-header__compare-summary {
  display: inline-block;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.92);
  padding: 6px 14px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  white-space: nowrap;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.site-header__compare-summary:empty {
  display: none;
}

/* Actions (auth) */
.site-header__actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.site-header__status {
  display: none;
  align-items: center;
  gap: 12px;
}

.site-header__guest {
  display: flex;
  align-items: center;
}

.site-header__actions.is-logged-in .site-header__status {
  display: flex;
}

.site-header__actions.is-logged-in .site-header__guest {
  display: none;
}

.site-header__limits {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.92);
  margin-right: 8px;
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  white-space: nowrap;
}

/* Login / Logout buttons (reference: dark bg, white border, white text) */
.site-header__btn {
  font: inherit;
  padding: 8px 20px;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
  border: 1px solid transparent;
}

.site-header__btn--login {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.5);
}

.site-header__btn--login:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.8);
}

.site-header__btn--logout {
  background: transparent;
  color: rgba(255, 255, 255, 0.85);
  border-color: rgba(255, 255, 255, 0.35);
}

.site-header__btn--logout:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.6);
}

.site-header__btn:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.6);
  outline-offset: 2px;
}

/* Responsive */
@media (max-width: 768px) {
  .site-header__inner {
    padding: 0 16px;
    gap: 10px;
  }

  .site-header__main-nav {
    display: none;
  }

  .site-header__mobile-toggle {
    display: inline-flex;
  }

  .site-header__feedback {
    margin-left: 12px;
    gap: 8px;
  }

  .site-header__limits {
    font-size: 0.8rem;
    padding: 4px 8px;
  }

  .site-header__compare-summary {
    font-size: 0.8rem;
    padding: 4px 10px;
    max-width: 100px;
  }

  .site-header__lang {
    gap: 2px;
  }

  .lang-switcher__link {
    padding: 5px 8px;
    font-size: 0.78rem;
  }
}
