/* ================================================================
   Ironlily — Dark theme + DIVA Creates interface structure
   Header / Hero Carousel / Icon Grid / Footer
   ================================================================ */

/* ===== RESET ===== */
* { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #0c0f14;
  --bg-soft: #111621;
  --card: #161b26;
  --card-hov: #1c2231;
  --ink: #e0ddd5;
  --ink-soft: #b8b3a6;
  --ink-mute: #7a7670;
  --accent: #c8a84e;
  --accent-2: #e0c060;
  --line: rgba(200, 168, 78, 0.15);
  --radius: 10px;
  --serif: 'Cormorant Garamond', 'Playfair Display', serif;
  --shadow: 0 2px 12px rgba(0,0,0,0.4);
}

/* Global link no-underline */
a { text-decoration: none; }

body, main {
  font-family: 'Inter', 'Noto Sans TC', 'Noto Sans JP', 'Noto Sans KR', sans-serif;
  background: #0c0f14;
  color: #e0ddd5;
  line-height: 1.6;
}

/* Global link no-underline */
a { text-decoration: none; }

/* ===== mainなど背景を持つ要素の補正 ===== */
main, .content, .wrapper {
  background: #0c0f14;
  margin: 0;
  padding: 0;
}

/* Global link no-underline */
a { text-decoration: none; }

/* ===== 固定ヘッダー ===== */
.header-fixed {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 75px;
  overflow: visible;
  background: rgba(12, 15, 20, 0.90);
  color: #fff;
  z-index: 1000;
  padding: 0.8rem 0;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

/* Global link no-underline */
a { text-decoration: none; }
.header-fixed.scrolled {
  background: rgba(12, 15, 20, 0.97);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

/* Global link no-underline */
a { text-decoration: none; }

/* homeページのみ透明グラデーション */
body.home-page .header-fixed {
  background: linear-gradient(
    180deg,
    rgba(12, 15, 20, 0.35) 0%,
    rgba(12, 15, 20, 0.20) 35%,
    rgba(12, 15, 20, 0) 100%
  );
  box-shadow: none;
  backdrop-filter: blur(6px);
}

/* Global link no-underline */
a { text-decoration: none; }
body.home-page .header-fixed.scrolled {
  background: rgba(12, 15, 20, 0.97);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

/* Global link no-underline */
a { text-decoration: none; }

/* ===== ヘッダー内部配置 ===== */
.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 100%;
  margin: 0;
  padding: 0 1.5rem 0 2rem;
  position: relative;
  height: 100%;
}

/* Global link no-underline */
a { text-decoration: none; }

/* ===== ロゴ ===== */
.logo {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 3px;
  color: #c8a84e;
  text-decoration: none;
  margin-left: 100px;
}

/* Global link no-underline */
a { text-decoration: none; }

/* ===== ナビゲーション（中央配置、PC のみ） ===== */
.main-nav {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 2rem;
}

/* Global link no-underline */
a { text-decoration: none; }
.main-nav a {
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9rem;
  letter-spacing: 0.05em;
  transition: color 0.3s ease;
}

/* Global link no-underline */
a { text-decoration: none; }
.main-nav a:hover { color: #c8a84e; }
.main-nav a.active { color: #c8a84e; border-bottom: 2px solid #c8a84e; }

/* ===== SNS アイコン ===== */
.header-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  height: 100%;
}

/* Global link no-underline */
a { text-decoration: none; }
.lang-switcher {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  margin-right: 0.5rem;
}
.lang-dropdown {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}
@media (max-width: 480px) {
  .lang-switcher {
    display: inline-flex;
    align-items: center;
    position: relative;
    cursor: pointer;
  }
  .lang-switcher > .lang-btn:first-child { display: inline-flex; }
  .lang-dropdown { display: none; }
  .lang-switcher.expanded .lang-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
    background: rgba(12, 15, 20, 0.97);
    border: 1px solid rgba(200,168,78,0.25);
    border-radius: 6px;
    padding: 6px;
    z-index: 1200;
    min-width: 72px;
  }
  .lang-switcher.expanded .lang-dropdown .lang-btn {
    display: flex;
    width: 100%;
    white-space: nowrap;
  }
}

/* Global link no-underline */
a { text-decoration: none; }
.lang-btn {
  background: none;
  border: 1px solid rgba(255,255,255,0.2);
  color: rgba(255,255,255,0.6);
  padding: 0.2rem 0.5rem;
  border-radius: 3px;
  font-size: 0.75rem;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: inherit;
}

/* Global link no-underline */
a { text-decoration: none; }
.lang-btn:hover {
  color: #c8a84e;
  border-color: #c8a84e;
}

/* Global link no-underline */
a { text-decoration: none; }
.lang-btn.active {
  color: #c8a84e;
  border-color: #c8a84e;
  background: rgba(200,168,78,0.1);
}

/* Global link no-underline */
a { text-decoration: none; }
.sns-icons {
  display: flex;
  align-items: center;
  gap: 1rem;
  height: 100%;
}

/* Global link no-underline */
a { text-decoration: none; }
.sns-icons a {
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.7);
  transition: color 0.3s ease, transform 0.3s ease;
}

/* Global link no-underline */
a { text-decoration: none; }
.sns-icons a:hover {
  color: #c8a84e;
  transform: scale(1.15);
}

/* Global link no-underline */
a { text-decoration: none; }
.sns-icons svg {
  width: 28px;
  height: 28px;
}

/* Global link no-underline */
a { text-decoration: none; }

/* ===== ハンバーガーボタン ===== */
.menu-toggle {
  font-size: 27px;
  line-height: 1;
  display: none;
  background: none;
  border: none;
  color: rgba(255,255,255,0.8);
  cursor: pointer;
}

/* Global link no-underline */
a { text-decoration: none; }

/* ===== モバイルメニュー ===== */
.mobile-menu {
  position: fixed;
  top: 0;
  right: -280px;
  width: 260px;
  height: 100%;
  background: rgba(12, 15, 20, 0.97);
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 3rem 1.5rem;
  transition: right 0.3s ease;
  z-index: 1500;
}

/* Global link no-underline */
a { text-decoration: none; }
.mobile-menu.open { right: 0; }
.menu-close {
  align-self: flex-end;
  background: none;
  border: none;
  color: #fff;
  font-size: 2rem;
  cursor: pointer;
  margin-bottom: 1.5rem;
}

/* Global link no-underline */
a { text-decoration: none; }
.mobile-menu nav a {
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  font-size: 1.1rem;
  margin: 0.8rem 0;
  display: block;
  transition: color 0.2s;
}

/* Global link no-underline */
a { text-decoration: none; }
.mobile-menu nav a:hover { color: #c8a84e; }
.mobile-lang-switcher {
  display: flex;
  gap: 0.5rem;
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255,255,255,0.1);
}

/* Global link no-underline */
a { text-decoration: none; }

/* ===== HERO SLIDER ===== */
.hero-section {
  background: #0c0f14;
  padding-top: 75px;
}

/* Global link no-underline */
a { text-decoration: none; }
.hero-swiper {
  aspect-ratio: 5 / 2;
}

/* Global link no-underline */
a { text-decoration: none; }
.hero-swiper .swiper-slide {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Global link no-underline */
a { text-decoration: none; }
.hero-swiper .swiper-slide a {
  display: block;
  width: 100%;
  height: 100%;
}

/* Global link no-underline */
a { text-decoration: none; }
.hero-swiper .swiper-slide img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Global link no-underline */
a { text-decoration: none; }
/* 矢印 */
.hero-section .swiper-button-prev,
.hero-section .swiper-button-next {
  color: rgba(200,168,78,0.5);
  opacity: 0.6;
  transition: opacity 0.2s;
}

/* Global link no-underline */
a { text-decoration: none; }
.hero-section .swiper-button-prev:hover,
.hero-section .swiper-button-next:hover {
  opacity: 1;
  color: #c8a84e;
}

/* Global link no-underline */
a { text-decoration: none; }
.hero-section .swiper-button-prev::after,
.hero-section .swiper-button-next::after {
  font-size: 1.5rem !important;
}

/* Global link no-underline */
a { text-decoration: none; }
/* ドット */
.hero-section .swiper-pagination-bullet {
  background: rgba(200,168,78,0.3) !important;
  opacity: 1 !important;
}

/* Global link no-underline */
a { text-decoration: none; }
.hero-section .swiper-pagination-bullet-active {
  background: #c8a84e !important;
}

/* Global link no-underline */
a { text-decoration: none; }

/* ===== ICON LINKS ===== */
.icon-links {
  background: #0c0f14;
  padding: 2rem 0 0;
}

/* Global link no-underline */
a { text-decoration: none; }
.home-container {
  max-width: 1300px;
  margin: 0 auto;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
}

/* Global link no-underline */
a { text-decoration: none; }
.icon-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

/* Global link no-underline */
a { text-decoration: none; }
.home-container .icon-item {
  flex: 0 1 calc(100% / 6 - 2rem);
}

/* Global link no-underline */
a { text-decoration: none; }
.icon-item img {
  width: 100%;
  max-width: 150px;
  height: auto;
  transition: transform 0.25s ease;
  border-radius: 8px;
}

/* Global link no-underline */
a { text-decoration: none; }
/* 個別アイコンサイズ調整（実際の図に合わせて調整） */
.icon-item img[src*="archive"] { max-width: 180px; }
.icon-item img[src*="fanarts"] { max-width: 110px; }
.icon-item img[src*="wiki"],
.icon-item img[src*="faq"] { max-width: 77px; }
.icon-item img[src*="patreon"] { max-width: 52px; }
.icon-item img:hover { transform: scale(1.07); }

/* Patreon icon: 2段目、右下寄せ */
.home-container.patreon-row {
  width: 100%;
  max-width: none;
  justify-content: flex-end;
  margin: 2rem 0 -8px 0;
  margin-right: -2rem;
  padding-right: 0;
}

/* Global link no-underline */
a { text-decoration: none; }

/* 下側を画面端まで伸ばすボックス */
.bottom-edge-fill {
  width: 100%;
  min-height: 12px;
  background: #0c0f14;
}

/* Global link no-underline */
a { text-decoration: none; }

/* ===== FOOTER ===== */
.site-footer {
  background: #000;
  color: #fff;
  padding: 3rem 0 1rem 0;
  font-family: 'Inter', 'Noto Sans TC', 'Noto Sans JP', 'Noto Sans KR', sans-serif;
}

/* Global link no-underline */
a { text-decoration: none; }
.footer-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  max-width: 1200px;
  margin: 0 auto;
  width: 90%;
  gap: 2rem;
}

/* Global link no-underline */
a { text-decoration: none; }
.footer-credit {
  text-align: center;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.4);
  margin-top: 2rem;
  padding-top: 1rem;
  padding-bottom: 0.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Global link no-underline */
a { text-decoration: none; }
.footer-column h2,
.footer-column h3 {
  font-weight: 700;
  margin-bottom: 1rem;
  letter-spacing: 0.5px;
  color: #c8a84e;
}

/* Global link no-underline */
a { text-decoration: none; }
.footer-logo {
  font-size: 1.4rem;
  letter-spacing: 2px;
}

/* Global link no-underline */
a { text-decoration: none; }
.footer-column p {
  color: rgba(255,255,255,0.5);
  font-size: 0.9rem;
  line-height: 1.6;
}

/* Global link no-underline */
a { text-decoration: none; }
.footer-sns a {
  margin-right: 0.6rem;
  display: inline-block;
  color: rgba(255,255,255,0.5);
  transition: color 0.3s ease;
}

/* Global link no-underline */
a { text-decoration: none; }
.footer-sns a:hover { color: #c8a84e; }
.footer-sns {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.8rem;
}

/* Global link no-underline */
a { text-decoration: none; }
.footer-sns svg {
  width: 24px;
  height: 24px;
}

/* Global link no-underline */
a { text-decoration: none; }

/* ===== レスポンシブ ===== */
@media (max-width: 1200px) {
  .logo { margin-left: 2rem; }
  .main-nav { display: none; }
  .menu-toggle { display: inline-block; }
  .header-right { gap: 0.5rem; }
}

/* Global link no-underline */
a { text-decoration: none; }

@media (max-width: 1000px) {
  .logo { margin-left: 1.5rem; }
  .header-container { padding: 0 1rem 0 1.5rem; }
}

/* Global link no-underline */
a { text-decoration: none; }

@media (max-width: 768px) {
  .footer-container {
    grid-template-columns: 1fr 1fr;
    text-align: left;
  }
  .footer-logo { font-size: 1.2rem; }
  .footer-sns svg { width: 20px; }
}

/* Global link no-underline */
a { text-decoration: none; }

@media (max-width: 900px) {
  .home-container .icon-item {
    flex: 0 1 calc(100% / 3 - 2rem);
  }
}

/* Global link no-underline */
a { text-decoration: none; }

@media (max-width: 600px) {
  .header-container { padding: 0 0.8rem; }
  .logo { margin-left: 1rem; font-size: 0.95rem; }
  .footer-container {
    grid-template-columns: 1fr;
  }
}

/* Global link no-underline */
a { text-decoration: none; }

/* ===== MOBILE 480px ===== */
/* lang-switcher rules merged into .lang-dropdown @media block above */
@media (max-width: 480px) {
  .sns-icons a { display: none; }
  .menu-toggle { display: inline-block; }
  .logo { margin-left: 0; font-size: 0.85rem; }

  /* Hero */
  .hero-swiper { aspect-ratio: 4 / 3; }
  .hero-section .swiper-button-prev,
  .hero-section .swiper-button-next { display: none; }
  .hero-section .swiper-pagination-bullet { width: 6px; height: 6px; }

  /* Icon grid — 1 column */
  .home-container .icon-item { flex: 0 1 calc(100% - 2rem); }
  .icon-item img { max-width: 100px; }
  .icon-item span { font-size: 0.85rem; }

  /* Content pages */
  .about-hero { padding: 100px 1rem 40px; min-height: 40vh; }
  .about-hero h1 { font-size: 1.6rem; }
  .story-section { padding: 0 1rem 50px; }
  .story-section p { font-size: 0.9rem; }
  .content-section { padding: 40px 1rem; }
  .content-section h2 { font-size: 1.2rem; margin: 1.5rem 0 0.8rem; }
  .content-section p { font-size: 0.9rem; line-height: 1.7; }
  #larp-body p, #rules-body p { font-size: 0.9rem; }
  #larp-body ul, #rules-body ul { padding-left: 1.2rem; font-size: 0.9rem; }

  /* SNS icons — larger touch target */
  .sns-icons { gap: 0.6rem; }
  .sns-icons svg { width: 34px; height: 34px; }

  /* Footer */
  .footer-container { gap: 1.5rem; }
  .footer-logo { font-size: 1rem; }
}

/* ===== MOBILE 360px ===== */
@media (max-width: 360px) {
  .logo { font-size: 0.75rem; }
  .hero-swiper { aspect-ratio: 1 / 1; }
  .home-container .icon-item { flex: 0 1 100%; }
  .icon-item img { max-width: 80px; }
  .sns-icons svg { width: 28px; height: 28px; }
  .footer-container { gap: 1rem; }
}

/* ================================================================
   Ironlily — Gallery & Dropdown Navigation Additions
   ================================================================ */

/* Gallery grid fix — ensure grid display */
#galleryGrid.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}
@media (max-width: 1100px) {
  #galleryGrid.gallery-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 700px) {
  #galleryGrid.gallery-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
  #galleryGrid.gallery-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 360px) {
  #galleryGrid.gallery-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ===== DROPDOWN NAV ===== */
.main-nav .nav-dropdown {
  position: relative;
}

/* Global link no-underline */
a { text-decoration: none; }
.main-nav .nav-dropdown > a {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

/* Global link no-underline */
a { text-decoration: none; }
.main-nav .nav-dropdown > a::after {
  content: '▾';
  font-size: 0.7em;
  opacity: 0.6;
  transition: transform 0.2s;
}

/* Global link no-underline */
a { text-decoration: none; }
.main-nav .nav-dropdown:hover > a::after {
  transform: rotate(180deg);
}

/* Global link no-underline */
a { text-decoration: none; }
.main-nav .dropdown-menu {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(8px);
  min-width: 180px;
  background: rgba(12, 15, 20, 0.97);
  border: 1px solid rgba(200, 168, 78, 0.15);
  border-radius: 6px;
  padding: 0.5rem 0;
  display: flex;
  flex-direction: column;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s, transform 0.25s, visibility 0.25s;
  pointer-events: none;
  z-index: 1100;
  box-shadow: 0 8px 24px rgba(0,0,0,0.5);
}

/* Global link no-underline */
a { text-decoration: none; }
.main-nav .nav-dropdown:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

/* Global link no-underline */
a { text-decoration: none; }
.main-nav .dropdown-menu a {
  padding: 0.6rem 1.2rem;
  font-size: 0.85rem;
  white-space: nowrap;
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
}

/* Global link no-underline */
a { text-decoration: none; }
.main-nav .dropdown-menu a:hover {
  background: rgba(200, 168, 78, 0.1);
  color: #c8a84e;
}

/* Global link no-underline */
a { text-decoration: none; }



/* ===== Mobile dropdown submenu ===== */
.mobile-menu .mobile-dropdown-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
}

/* Global link no-underline */
a { text-decoration: none; }
.mobile-menu .mobile-dropdown-toggle .dropdown-arrow {
  font-size: 0.8em;
  transition: transform 0.3s;
  opacity: 0.5;
  margin-left: 0.5rem;
}

/* Global link no-underline */
a { text-decoration: none; }
.mobile-menu .mobile-submenu {
  display: none;
  padding-left: 1rem;
}
.mobile-menu .mobile-submenu.open {
  display: block !important;
}

/* Global link no-underline */
a { text-decoration: none; }
.mobile-menu .mobile-submenu a {
  font-size: 0.95rem;
  margin: 0.5rem 0;
  color: rgba(255,255,255,0.55);
}

/* Global link no-underline */
a { text-decoration: none; }


/* ===== Nested dropdown submenu (task-20260701-001500) ===== */
.main-nav .nav-dropdown-nested {
  position: relative;
}

.main-nav .dropdown-menu-nested {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 200px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
  background: rgba(12, 15, 20, 0.97);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 0.5rem 0;
  z-index: 1000;
}

.main-nav .nav-dropdown-nested:hover > .dropdown-menu-nested,
.main-nav .nav-dropdown-nested:focus-within > .dropdown-menu-nested {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

.main-nav .dropdown-menu-nested a {
  padding: 0.55rem 1.2rem;
  font-size: 0.85rem;
  white-space: nowrap;
  color: rgba(255,255,255,0.7);
  display: block;
}

.main-nav .dropdown-menu-nested a:hover {
  background: rgba(200, 168, 78, 0.1);
  color: var(--accent);
}

.mobile-menu .nav-dropdown-nested .dropdown-menu-nested {
  position: static;
  opacity: 1;
  visibility: visible;
  transform: none;
  background: transparent;
  border: none;
  box-shadow: none;
  padding-left: 1rem;
  display: none;
}
.mobile-menu .nav-dropdown-nested.open .dropdown-menu-nested {
  display: block;
}

/* ===== Filter subchips (gallery character filter) ===== */
.filter-group {
  display: inline-block;
  vertical-align: top;
  position: relative;
}
.filter-subchips {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 200;
  flex-wrap: wrap;
  gap: 0.3rem;
  padding: 0.4rem 0.6rem;
  background: rgba(12, 15, 20, 0.97);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 4px 12px rgba(0,0,0,0.4);
  min-width: 180px;
  max-width: 320px;
}
.filter-group:hover .filter-subchips,
.filter-group.open .filter-subchips {
  display: flex;
}
.filter-subchip {
  font-size: 0.78rem;
  padding: 0.25rem 0.7rem;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: rgba(255,255,255,0.6);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}
.filter-subchip.active {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(200, 168, 78, 0.15);
}
