/* ============================================================
   multilingual.css — Takumi Senpai · Navigation + Compass Menu
   Path:  /css/multilingual.css

   Contents:
     1.  Google Translate suppression
     2.  Site nav bar (desktop + mobile)
     3.  Desktop lang switch
     4.  Desktop search box + results dropdown
     5.  Compass FAB  (mobile only)
     6.  Full-screen overlay menu
     7.  Overlay: lang grid
     8.  Overlay: mobile search box + results strip
     9.  Search result cards (shared)
    10.  Overlay: nav links
    11.  Responsive rules
   ============================================================ */


/* ── 1. Google Translate suppression ─────────────────────── */
.goog-te-banner-frame,
.goog-te-balloon-frame,
#goog-gt-tt,
.goog-tooltip,
.goog-tooltip:hover,
.goog-text-highlight {
  display: none !important;
  box-shadow: none !important;
}
iframe.goog-te-menu-frame { display: none !important; }
.goog-te-gadget           { display: none !important; }
#google_translate_element  { display: none !important; }
.goog-te-combo            { display: none !important; }


/* ── 2. Site nav bar ─────────────────────────────────────── */
.site-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;

  padding: 0 40px;
  height: 56px;

  background: rgba(8, 8, 6, 0.82);
  backdrop-filter: blur(16px) saturate(1.5);
  -webkit-backdrop-filter: blur(16px) saturate(1.5);
  border-bottom: 1px solid rgba(201, 168, 76, 0.12);
  font-family: 'Space Mono', monospace;
}

/* Push page content below nav */
#hero,
.article-hero {
  padding-top: 56px;
}

/* Logo */
.site-nav__logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: rgba(240, 236, 228, 0.85);
  transition: color 0.2s;
  flex-shrink: 0;
}
.site-nav__logo:hover { color: var(--accent, #c9a84c); }

.site-nav__logo-mark {
  font-size: 0.85rem;
  color: var(--accent, #c9a84c);
  opacity: 0.8;
}
.site-nav__logo-text {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

/* Right cluster */
.site-nav__right {
  display: flex;
  align-items: center;
  gap: 1.4rem;
}

/* Desktop nav links */
.site-nav__link {
  font-size: 0.50rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(240, 236, 228, 0.55);
  text-decoration: none;
  transition: color 0.2s;
}
.site-nav__link:hover { color: var(--accent, #c9a84c); }


/* ── 3. Desktop lang switch ──────────────────────────────── */
.lang-switch {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}
.lang-switch__divider {
  width: 1px;
  height: 14px;
  background: rgba(201, 168, 76, 0.20);
  margin: 0 0.25rem;
}

.lang-btn {
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
  font-family: 'Space Mono', monospace;
  font-size: 0.46rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(240, 236, 228, 0.42);
  padding: 4px 8px;
  border-radius: 2px;
  transition: color 0.18s, border-color 0.18s, background 0.18s;
  white-space: nowrap;
}
.lang-btn:hover {
  color: rgba(240, 236, 228, 0.80);
  border-color: rgba(201, 168, 76, 0.30);
}
.lang-btn--active,
.lang-btn[aria-pressed="true"] {
  color: var(--accent, #c9a84c);
  border-color: rgba(201, 168, 76, 0.45);
  background: rgba(201, 168, 76, 0.08);
}
.lang-btn:focus-visible {
  outline: 1px solid rgba(201, 168, 76, 0.6);
  outline-offset: 2px;
}


/* ── 4. Desktop search box + results ─────────────────────── */
.nav-search-wrap {
  position: relative;
  flex-shrink: 0;
}

.nav-search-box {
  display: flex;
  align-items: center;
  gap: 7px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(201, 168, 76, 0.18);
  border-radius: 4px;
  padding: 5px 12px;
  transition: border-color 0.2s;
}
.nav-search-box:focus-within {
  border-color: rgba(201, 168, 76, 0.45);
  background: rgba(255, 255, 255, 0.06);
}

.nav-search-icon {
  width: 13px;
  height: 13px;
  stroke: rgba(201, 168, 76, 0.50);
  flex-shrink: 0;
}

.nav-search-box input {
  background: none;
  border: none;
  outline: none;
  color: rgba(240, 236, 228, 0.85);
  font-family: 'Montserrat', sans-serif;
  font-size: 0.72rem;
  width: 150px;
  min-width: 0;
}
.nav-search-box input::placeholder {
  color: rgba(201, 168, 76, 0.35);
}

/* Dropdown results panel */
.nav-search-results {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  width: 420px;
  max-width: 90vw;
  background: rgba(8, 8, 6, 0.96);
  border: 1px solid rgba(201, 168, 76, 0.22);
  border-radius: 6px;
  padding: 10px;
  z-index: 999;
  box-shadow: 0 12px 40px rgba(0,0,0,0.6);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}
.nav-search-results.is-visible {
  display: block;
}


/* ── 5. Compass FAB (mobile only) ────────────────────────── */
.compass-btn {
  position: fixed;
  right: 20px;
  bottom: 28px;
  z-index: 300;

  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 1px solid rgba(201, 168, 76, 0.50);
  background: rgba(8, 8, 6, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.55),
              inset 0 1px 0 rgba(201, 168, 76, 0.15);
  cursor: pointer;
  padding: 0;

  display: none; /* shown via media query */
  align-items: center;
  justify-content: center;

  color: var(--accent, #c9a84c);
  transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s;
}

.compass-btn .compass-svg {
  width: 26px;
  height: 26px;
  transition: transform 0.55s cubic-bezier(.34,1.56,.64,1);
}

.compass-btn:hover,
.compass-btn:active {
  border-color: rgba(201, 168, 76, 0.80);
  box-shadow: 0 6px 32px rgba(0, 0, 0, 0.70),
              0 0 0 4px rgba(201, 168, 76, 0.10);
}

.compass-btn.is-open .compass-svg {
  transform: rotate(180deg);
}


/* ── 6. Full-screen overlay ──────────────────────────────── */
.compass-overlay {
  display: none; /* re-shown via media query */

  position: fixed;
  inset: 0;
  z-index: 500;

  background: rgba(5, 6, 8, 0.97);
  backdrop-filter: blur(24px) saturate(1.4);
  -webkit-backdrop-filter: blur(24px) saturate(1.4);

  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 0;
  padding: 88px 32px 40px; /* top: ×ボタン(36px+44px=80px)を確実にクリア */
  overflow-y: auto;

  opacity: 0;
  transform: scale(0.96);
  transition: opacity 0.30s ease, transform 0.30s cubic-bezier(.16,.84,.26,1);
  pointer-events: none;
}

.compass-overlay.is-open {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

/* Close button (X) */
.cm-close {
  position: fixed;
  top: 36px;   /* ×ボタン: コンテンツ開始(88px)より上に収まる位置 */
  right: 18px;
  z-index: 600;
  width: 44px;
  height: 44px;
  background: rgba(5, 6, 8, 0.80);
  border: 1px solid rgba(201, 168, 76, 0.18);
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 8px;
  opacity: 0.80;
  transition: opacity 0.2s, background 0.2s;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.cm-close:hover { opacity: 1; background: rgba(201, 168, 76, 0.12); }

.cm-close-bar {
  display: block;
  width: 22px;
  height: 1.5px;
  background: rgba(240, 236, 228, 0.85);
  border-radius: 2px;
  transform-origin: center;
  transition: transform 0.2s;
}
.cm-close-bar:first-child { transform: translateY(3px) rotate(45deg); }
.cm-close-bar:last-child  { transform: translateY(-3px) rotate(-45deg); }


/* ── 7. Overlay: language grid ───────────────────────────── */
.cm-lang-section {
  width: 100%;
  max-width: 340px;
  margin-bottom: 20px;
  text-align: center;
  flex-shrink: 0;
}

.cm-lang-eyebrow {
  font-family: 'Cormorant Garamond', serif;
  font-size: 0.68rem;
  font-style: italic;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: rgba(201, 168, 76, 0.55);
  margin-bottom: 16px;
}

.cm-lang-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.cm-lang-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 14px 10px;

  background: rgba(201, 168, 76, 0.04);
  border: 1px solid rgba(201, 168, 76, 0.18);
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.18s, border-color 0.18s, transform 0.15s;
}
.cm-lang-btn:hover,
.cm-lang-btn:active {
  background: rgba(201, 168, 76, 0.10);
  border-color: rgba(201, 168, 76, 0.50);
  transform: scale(1.03);
}
.cm-lang-btn--active {
  background: rgba(201, 168, 76, 0.12);
  border-color: rgba(201, 168, 76, 0.60);
}

.cm-lang-native {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.35rem;
  font-weight: 600;
  color: rgba(240, 236, 228, 0.90);
  line-height: 1.1;
  letter-spacing: 0.02em;
}
.cm-lang-btn--active .cm-lang-native {
  color: var(--accent, #c9a84c);
}

.cm-lang-code {
  font-family: 'Space Mono', monospace;
  font-size: 0.44rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(201, 168, 76, 0.45);
}
.cm-lang-btn--active .cm-lang-code {
  color: rgba(201, 168, 76, 0.75);
}


/* ── 8. Overlay: mobile search ───────────────────────────── */
.cm-search-section {
  width: 100%;
  max-width: 340px;
  margin-bottom: 20px;
  flex-shrink: 0;
}

.cm-search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(201, 168, 76, 0.22);
  border-radius: 6px;
  padding: 10px 14px;
  transition: border-color 0.2s;
}
.cm-search-box:focus-within {
  border-color: rgba(201, 168, 76, 0.50);
  background: rgba(255, 255, 255, 0.06);
}

.cm-search-icon {
  width: 15px;
  height: 15px;
  stroke: rgba(201, 168, 76, 0.50);
  flex-shrink: 0;
}

.cm-search-box input {
  background: none;
  border: none;
  outline: none;
  color: rgba(240, 236, 228, 0.88);
  font-family: 'Montserrat', sans-serif;
  font-size: 0.85rem;
  width: 100%;
  min-width: 0;
}
.cm-search-box input::placeholder {
  color: rgba(201, 168, 76, 0.35);
  font-size: 0.82rem;
}

/* Results strip (horizontal scroll) */
.cm-search-results {
  display: none;
  margin-top: 10px;
  width: 100%;
}
.cm-search-results.is-visible {
  display: block;
}


/* ── 9. Search result cards (shared desktop + mobile) ────── */

/* Horizontal scroll strip */
.sr-strip {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 6px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: rgba(201, 168, 76, 0.25) transparent;
}
.sr-strip::-webkit-scrollbar {
  height: 3px;
}
.sr-strip::-webkit-scrollbar-track {
  background: transparent;
}
.sr-strip::-webkit-scrollbar-thumb {
  background: rgba(201, 168, 76, 0.30);
  border-radius: 2px;
}

/* Card — fixed height to keep strip uniform */
.sr-card {
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  width: 110px;          /* fixed card width */
  height: 148px;         /* fixed card height — all cards identical */
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid rgba(201, 168, 76, 0.16);
  background: rgba(20, 20, 18, 0.90);
  text-decoration: none;
  transition: border-color 0.18s, transform 0.18s;
  cursor: pointer;
}
.sr-card:hover {
  border-color: rgba(201, 168, 76, 0.50);
  transform: translateY(-2px);
}

/* Thumbnail */
.sr-card-thumb {
  width: 100%;
  height: 72px;          /* fixed thumbnail height */
  flex-shrink: 0;
  background-color: rgba(201, 168, 76, 0.06);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* Text body — fills remaining 76px */
.sr-card-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
  padding: 6px 8px;
  overflow: hidden;
}

/* Title: single line, ellipsis via JS (TITLE_MAX=36 chars) */
.sr-card-title {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.58rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: rgba(240, 236, 228, 0.90);
  line-height: 1.3;
  /* CSS safety net: hard clamp to 2 lines */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Location label */
.sr-card-loc {
  font-family: 'Space Mono', monospace;
  font-size: 0.42rem;
  letter-spacing: 0.06em;
  color: rgba(201, 168, 76, 0.55);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Empty / no-result message */
.sr-empty {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.72rem;
  color: rgba(240, 236, 228, 0.40);
  padding: 8px 2px;
  font-style: italic;
}


/* ── 10. Overlay: nav links ──────────────────────────────── */
.cm-rule {
  width: 100%;
  max-width: 340px;
  height: 1px;
  background: rgba(201, 168, 76, 0.12);
  margin-bottom: 20px;
  flex-shrink: 0;
}

.cm-nav {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  width: 100%;
  max-width: 340px;
  flex-shrink: 0;
}

.cm-link {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 14px 0;
  border-bottom: 1px solid rgba(240, 236, 228, 0.05);
  text-decoration: none;
  color: rgba(240, 236, 228, 0.70);
  transition: color 0.18s, padding-left 0.18s;
}
.cm-link:last-child { border-bottom: none; }
.cm-link:hover,
.cm-link:active {
  color: var(--accent, #c9a84c);
  padding-left: 6px;
}

.cm-link-icon {
  font-size: 1.0rem;
  color: var(--accent, #c9a84c);
  opacity: 0.70;
  flex-shrink: 0;
  width: 24px;
  text-align: center;
}
.cm-link-compass {
  width: 20px;
  height: 20px;
  color: var(--accent, #c9a84c);
  opacity: 0.70;
  flex-shrink: 0;
}

.cm-link-label {
  font-family: 'Montserrat', sans-serif;
  font-size: 1.10rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}


/* ── 11. Responsive ───────────────────────────────────────── */
@media (max-width: 768px) {

  /* Compact nav, logo only */
  .site-nav {
    padding: 0 20px;
    height: 50px;
  }
  #hero,
  .article-hero {
    padding-top: 50px;
  }

  /* Hide desktop items */
  .site-nav__link         { display: none; }
  .site-nav__lang-desktop { display: none; }
  .nav-search-wrap        { display: none; } /* search moves to overlay */
  .site-nav__right        { gap: 0; }

  /* Show compass FAB */
  .compass-btn { display: flex; }

  /* Show overlay (hidden by default, shown when .is-open) */
  .compass-overlay { display: flex; }
}

@media (max-width: 380px) {
  .cm-lang-native { font-size: 1.15rem; }
  .cm-link-label  { font-size: 1.0rem; }
  .compass-btn    { width: 46px; height: 46px; right: 16px; bottom: 22px; }
  .cm-lang-grid   { gap: 8px; }
  .cm-lang-btn    { padding: 12px 8px; }
  .sr-card        { width: 98px; height: 140px; }
  .sr-card-thumb  { height: 64px; }
}