/* ===== NINE CITY — Site-wide header / logo ===== */

.site-logo {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  line-height: 1;
  transition: opacity .25s;
  filter: drop-shadow(0 1px 6px rgba(0,0,0,.8));
}

/* タップ領域を44px相当に拡張(見た目のサイズは変えない) */
.site-logo::after {
  content: '';
  position: absolute;
  inset: -6px;
}

.site-logo img {
  display: block;
  height: 36px;
  width: auto;
  opacity: .9;
}

.site-logo:hover img { opacity: 1; }

/* fixed top-left (ninecity / location pages) */
.site-logo--fixed {
  position: fixed;
  top: 18px;
  left: 20px;
  z-index: 9999;
}

/* D9 rotating badge — bottom right */
.site-d9-badge {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 88px;
  height: 88px;
  z-index: 9999;
  text-decoration: none;
  opacity: .55;
  transition: opacity .3s;
}
.site-d9-badge:hover { opacity: 1; }

.site-d9-badge__ring {
  animation: d9-spin 14s linear infinite;
  transform-box: fill-box;
  transform-origin: center;
}

@keyframes d9-spin {
  to { transform: rotate(360deg); }
}

@media (max-width: 640px) {
  .site-d9-badge { width: 68px; height: 68px; bottom: 16px; right: 16px; }
}

/* ===== Site footer / CTA ===== */
.site-footer {
  padding: clamp(24px,4vh,48px) clamp(24px,6vw,80px) calc(var(--fixed-h, 0px) + 72px);
  border-top: 1px solid rgba(255,255,255,.08);
  text-align: center;
}

.site-footer__label {
  font-family: 'Space Mono', monospace;
  font-size: clamp(9px,1.2vw,11px);
  letter-spacing: .25em;
  color: rgba(255,255,255,.35);
  margin: 0 0 20px;
}

.site-footer__links {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.site-footer__link {
  flex: 1;
  min-width: 140px;
  max-width: 220px;
}

.site-footer__link {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(13px,1.7vw,16px);
  font-weight: 400;
  letter-spacing: .3em;
  white-space: nowrap;
  color: #38e8ff;
  text-decoration: none;
  padding: 10px 24px;
  border: 1px solid rgba(56,232,255,.35);
  transition: color .22s, border-color .22s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.site-footer__link::after {
  content: '';
  display: inline-block;
  width: 11px;
  height: 10px;
  background-color: currentColor;
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 103.23 97.85'%3E%3Cline stroke='white' stroke-linecap='round' stroke-linejoin='round' stroke-width='10' x1='98.23' y1='48.92' x2='5' y2='48.92' fill='none'/%3E%3Cpolyline stroke='white' stroke-linecap='round' stroke-linejoin='round' stroke-width='10' points='54.3 5 98.23 48.92 54.3 92.85' fill='none'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 103.23 97.85'%3E%3Cline stroke='white' stroke-linecap='round' stroke-linejoin='round' stroke-width='10' x1='98.23' y1='48.92' x2='5' y2='48.92' fill='none'/%3E%3Cpolyline stroke='white' stroke-linecap='round' stroke-linejoin='round' stroke-width='10' points='54.3 5 98.23 48.92 54.3 92.85' fill='none'/%3E%3C/svg%3E");
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  transition: transform .22s;
}

.site-footer__link:hover { color: #7ff4ff; border-color: rgba(56,232,255,.7); }
.site-footer__link:hover::after { transform: translateX(3px); }

/* ===== Character nav (right top) ===== */
.site-char-nav {
  position: fixed;
  top: 16px;
  right: 20px;
  z-index: 9999;
  display: flex;
  gap: 6px;
}

.site-char-nav__item {
  position: relative;
  z-index: 0;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .1em;
  color: rgba(255,255,255,.85);
  text-decoration: none;
  padding: 5px 13px;
  border: 1px solid rgba(255,255,255,.25);
  transition: color .22s, border-color .22s;
}

/* タップ領域を44px相当に拡張(見た目のサイズは変えない) */
.site-char-nav__item::after {
  content: '';
  position: absolute;
  inset: -9px;
}

/* HOVER/ACTIVEは背景塗りなし、文字だけキャラ名見出しと同じグラデーションでハイライト */
.site-char-nav__item:hover,
.site-char-nav__item.is-active {
  background: linear-gradient(180deg, #e8f8ff 0%, #a0eeff 28%, #38e8ff 62%, #00ccff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  border-color: rgba(56,232,255,.5);
}

/* ACTIVEはHOVERと見分けがつくよう、常時表示のアンダーラインを追加 */
.site-char-nav__item.is-active {
  box-shadow: inset 0 -2px 0 0 #38e8ff;
}

@media (max-width: 640px) {
  .site-logo--fixed { left: 14px; top: 14px; }
  .site-logo img { height: 24px; }
  .site-char-nav { right: 12px; top: 14px; gap: 4px; }
  .site-char-nav__item { padding: 4px 8px; font-size: 8px; letter-spacing: .12em; }
  .site-footer { padding-bottom: 116px; text-align: left; }
}
