/* 共通ヘッダ/フッタ（SVWBAnalytics の静的ページ向け） */
:root {
  --bg: #F6F8FB;
  --panel: #FFFFFF;
  --line: #E6EAF0;
  --text: #1A1F2B;
  --muted: #4B5565;
  --accent: #2563EB;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  backdrop-filter: blur(10px);
  background: rgba(10, 23, 40, 0.92);
  border-bottom: 1px solid rgba(255, 255, 255, 0.10);
}
.site-ready .fallback-topbar { display: none; }
.site-ready .fallback-footer { display: none; }
.topbar-inner {
  max-width: 1020px;
  margin: 0 auto;
  padding: 10px 20px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
}
.topbar a { text-decoration: none; }
.brand,
.brand:visited {
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  color: #ffffff;
  font-weight: 950;
  letter-spacing: 0.8px;
  white-space: nowrap;
  font-size: 18px;
}

nav.links {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-start;
  font-size: 13.5px;
  font-weight: 750;
  color: rgba(255,255,255,0.78);
  margin-left: 12px;
  flex: 1 1 auto;
}
nav.links a,
nav.links a:visited {
  color: rgba(255,255,255,0.78);
  font-weight: 800;
  position: relative;
  padding: 10px 6px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
nav.links a:hover { color: #fff; }
nav.links a.active { color: #fff; }
nav.links a.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 5px;
  height: 3px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
}
.nav-icon {
  display: inline-flex;
  width: 18px;
  height: 18px;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  opacity: 0.85;
}
nav.links a:hover .nav-icon,
nav.links a.active .nav-icon { opacity: 1; }
.nav-icon img {
  width: 18px;
  height: 18px;
  display: block;
  object-fit: contain;
  filter: invert(1) brightness(1.1);
}

.topbar .actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
  margin-left: auto;
}
.topbar .btn {
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.92);
  height: 36px;
  padding: 0 14px;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 850;
  letter-spacing: 0.2px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.12s ease, background 0.12s ease, border-color 0.12s ease;
}
.topbar .btn:hover { background: rgba(255,255,255,0.12); transform: translateY(-1px); }
.topbar .btn.primary {
  border-color: rgba(37, 99, 235, 0.72);
  background: rgba(37, 99, 235, 0.92);
  color: #fff;
}
.topbar .btn.primary:hover { background: rgba(37, 99, 235, 1); }
.nav-hidden { display: none !important; }

.menu { position: relative; display: inline-flex; align-items: center; }
#mobile-menu { display: none; }
#mobile-nav { display: none; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.mobile-nav {
  position: relative;
  display: inline-flex;
  align-items: center;
}
.mobile-nav::after {
  content: "▼";
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 11px;
  color: rgba(255,255,255,0.78);
  pointer-events: none;
}
.mobile-nav-select {
  height: 36px;
  padding: 0 28px 0 6px;
  border: 0;
  border-bottom: 2px solid rgba(255,255,255,0.22);
  border-radius: 0;
  background: transparent;
  color: rgba(255,255,255,0.92);
  font-weight: 850;
  letter-spacing: 0.2px;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  cursor: pointer;
}
.mobile-nav-select option {
  color: #111827;
  background: #ffffff;
}
.mobile-nav-select:focus {
  outline: none;
  border-bottom-color: rgba(255,255,255,0.72);
}
.menu-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  min-width: 240px;
  background: rgba(5, 18, 30, 0.95);
  border: 1px solid rgba(180, 210, 230, 0.20);
  border-radius: 14px;
  padding: 10px;
  box-shadow: 0 16px 36px rgba(0,0,0,0.45);
  display: none;
}
.menu.open .menu-panel { display: block; }
.menu-panel a, .menu-panel button {
  width: 100%;
  text-align: left;
  display: block;
  border: 0;
  background: transparent;
  color: rgba(240, 250, 255, 0.92);
  padding: 10px 10px;
  border-radius: 10px;
  font-weight: 800;
  cursor: pointer;
}
.menu-panel a:hover, .menu-panel button:hover { background: rgba(98, 231, 214, 0.10); }
.menu-panel .menu-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 4px;
}
.menu-panel .menu-list li {
  margin: 0;
  padding: 0;
}

.topbar .nav-toggle { display: none; }
@media (max-width: 900px) {
  .topbar-inner { padding: 10px 16px; }
  .brand { font-size: 16px; }
  /* JSが動かない環境向けにfallbackのナビは残す（site_nav.js注入側だけ非表示） */
  .topbar[data-site-topbar="1"] nav.links { display: none !important; }
  #login-link { display: none !important; }
  #account-menu { display: none !important; }
  #mobile-menu { display: inline-flex !important; }
  #mobile-nav { display: none !important; }
  .topbar .actions { flex-wrap: nowrap; gap: 8px; }
  .topbar .btn { padding: 0 10px; }
  .mobile-menu .btn {
    height: 36px;
    border-radius: 999px;
    border-color: rgba(255, 255, 255, 0.16);
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.94);
    font-weight: 800;
  }
  .mobile-menu .btn:hover {
    background: rgba(255, 255, 255, 0.12);
  }
  .mobile-menu .menu-panel {
    min-width: 220px;
    padding: 8px;
    border-radius: 16px;
    border-color: rgba(255, 255, 255, 0.14);
    background: rgba(21, 34, 54, 0.98);
  }
  .mobile-menu .menu-panel a,
  .mobile-menu .menu-panel button {
    border-radius: 12px;
    color: rgba(245, 250, 255, 0.95);
    padding: 10px 12px;
  }
  .mobile-menu .menu-panel a:hover,
  .mobile-menu .menu-panel button:hover {
    background: rgba(255, 255, 255, 0.12);
  }
  .mobile-menu .menu-panel .nav-icon { display: none; }
}

footer.site-footer:not(.site-footer--stacked) {
  margin-top: 22px;
  color: rgba(255,255,255,0.82);
  font-size: 12.5px;
  font-weight: 650;
  text-align: center;
  padding: 12px 0 18px;
  line-height: 1.8;
  background: rgba(10, 23, 40, 0.92);
  border-top: 1px solid rgba(255, 255, 255, 0.10);
}
footer.site-footer:not(.site-footer--stacked) a {
  color: rgba(255,255,255,0.92);
  text-decoration: none;
  font-weight: 750;
}
footer.site-footer:not(.site-footer--stacked) a:hover { text-decoration: underline; color: #fff; }

footer.site-footer.site-footer--stacked {
  margin-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.10);
}
.site-footer-sitemap {
  background: rgba(10, 23, 40, 0.92);
  padding: 14px 0 14px;
}
.site-footer-links {
  max-width: 1020px;
  margin: 0 auto;
  padding: 0 18px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 22px;
  flex-wrap: wrap;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.2px;
}
.site-footer-links a,
.site-footer-links a:visited {
  color: rgba(255, 255, 255, 0.92);
  text-decoration: none;
  font-weight: 800;
  padding: 6px 4px;
}
.site-footer-links a:hover { color: #fff; text-decoration: underline; }

.site-footer-disclaimer {
  background: rgba(6, 16, 28, 0.96);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 14px 0 18px;
}
.site-footer-disclaimer-text {
  max-width: 1020px;
  margin: 0 auto;
  padding: 0 18px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 11.5px;
  line-height: 1.85;
  font-weight: 650;
  text-align: center;
}
.site-footer-disclaimer-text a,
.site-footer-disclaimer-text a:visited {
  color: rgba(255, 255, 255, 0.92);
  text-decoration: none;
  font-weight: 750;
}
.site-footer-disclaimer-text a:hover { color: #fff; text-decoration: underline; }
