/* ============== Fonts ============== */
@font-face {
  font-family: 'Noh Optique Display';
  src: url('/fonts/NohOptiqueDisplay-Bold.otf') format('opentype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Pretendard';
  src: url('https://cdn.jsdelivr.net/gh/Project-Noonnu/noonfonts_2107@1.1/Pretendard-ExtraLight.woff') format('woff');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

/* ============== Reset ============== */
* { box-sizing: border-box; }

html, body {
  min-height: 100%;
  margin: 0;
  padding: 0;
}

/* ============== Theme System ============== */
/* 기본(다크) 테마 — 기존 디자인 유지 */
:root {
  --text-primary:    rgba(255,255,255,1);
  --text-strong:     rgba(255,255,255,0.90);
  --text-secondary:  rgba(255,255,255,0.80);
  --text-muted:      rgba(255,255,255,0.60);
  --text-soft:       rgba(255,255,255,0.40);
  --text-faint:      rgba(255,255,255,0.25);
  --text-ghost:      rgba(255,255,255,0.15);

  --card-bg:         rgba(0,0,0,0.22);
  --card-border:     rgba(255,255,255,0.12);
  --card-blur:       14px;
  --card-saturate:   120%;
  --card-radius:     18px;
  --card-radius-sm:  12px;
  --card-shadow:     0 8px 28px rgba(61,42,30,0.22);

  --input-bg:        rgba(255,255,255,0.10);
  --input-border:    rgba(255,255,255,0.12);
  --input-focus:     rgba(255,255,255,0.25);

  --btn-bg:          rgba(255,255,255,0.18);
  --btn-border:      rgba(255,255,255,0.25);
  --btn-hover:       rgba(255,255,255,0.25);

  --divider:         rgba(255,255,255,0.18);
  --row-bg:          rgba(255,255,255,0.10);
  --row-hover:       rgba(255,255,255,0.18);

  --glow-color:      rgba(255,255,255,.10);
}

/* 라이트 테마 — 벚꽃/웜톤 배경용, 초코 브라운 텍스트 */
body.theme-light {
  --text-primary:    #3d2a1e;
  --text-strong:     #4a3526;
  --text-secondary:  #5a4131;
  --text-muted:      #6b5044;
  --text-soft:       #9d8478;
  --text-faint:      #b9a598;
  --text-ghost:      rgba(61,42,30,0.25);

  --card-bg:         rgba(255,255,255,0.45);
  --card-border:     rgba(61,42,30,0.15);
  --card-blur:       20px;
  --card-saturate:   140%;
  --card-radius:     18px;
  --card-radius-sm:  12px;
  --card-shadow:     0 6px 24px rgba(61,42,30,0.14);

  --input-bg:        rgba(255,255,255,0.55);
  --input-border:    rgba(61,42,30,0.15);
  --input-focus:     rgba(61,42,30,0.35);

  --btn-bg:          rgba(255,255,255,0.55);
  --btn-border:      rgba(61,42,30,0.2);
  --btn-hover:       rgba(255,255,255,0.75);

  --divider:         rgba(61,42,30,0.15);
  --row-bg:          rgba(255,255,255,0.35);
  --row-hover:       rgba(255,255,255,0.55);

  --glow-color:      rgba(255,255,255,.30);
}

/* 고정 배경 */
.bg-cover{
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image: url('/images/bg.png');
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  pointer-events: none;
}

/* ============== Header / Footer ============== */
.site-header, .site-footer { padding: 12px 16px; }

.nav{
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav a{
  color: var(--text-primary);
  text-decoration: none;
  opacity: .9;
  transition: opacity .2s ease;
}
.nav a:hover{ opacity: 1; }

.brand{
  font-family: 'Noh Optique Display', sans-serif;
  font-weight: 700;
}

.site-footer{
  text-align: center;
  font-family: 'Pretendard', sans-serif;
  font-size: .9rem;
  color: var(--text-primary);
  opacity: .9;
}

/* ============== Hero ============== */
.content{
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 16px 64px;
}

.hero{
  text-align: center;
  padding: 64px 12px 40px;
}

.logo img{
  max-width: 600px;
  width: 100%;
  height: auto;
}

.site-quote{
  text-align: center;
  font-family: 'Pretendard', serif;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: .5px;
  margin: 40px auto;
  max-width: 600px;
  color: var(--text-muted);
  text-transform: uppercase;
}

/* Hero 메뉴 */
.hero-menu{
  margin-top: 1.5rem;
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
}
.hero-menu a{
  color: var(--text-primary);
  text-decoration: none;
  opacity: .7;
  font-weight: 600;
  position: relative;
}
.hero-menu a:hover{ opacity: 1; }
.hero-menu a.on{ opacity: 1; font-weight: 800; }

.hero-menu a::after{
  content:"";
  position:absolute;
  left:50%;
  bottom:-4px;
  width:100%;
  height:2px;
  background:currentColor;
  transform:translateX(-50%) scaleX(0);
  transition:.3s;
  opacity:0;
}
.hero-menu a:hover::after{
  transform:translateX(-50%) scaleX(1);
  opacity:1;
}

/* on일 때도 underline 유지 */
.hero-menu a.on::after{
  transform:translateX(-50%) scaleX(1);
  opacity:1;
}

/* ============== Submenu (서브 메뉴) ============== */
/* 부모 메뉴 아이템 - 서브 메뉴를 담는 컨테이너 */
.hero-menu .menu-item.has-sub{
  position: relative;
  display: inline-flex;
  align-items: center;
}

/* 부모 링크 — 기본 메뉴 스타일 그대로 사용 */
.hero-menu .menu-parent{
  cursor: pointer;
}

/* 서브 메뉴 박스 */
.hero-menu .submenu{
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(-4px);
  margin-top: 14px;

  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 14px;
  min-width: 120px;

  /* 글래스모피즘 유리알 */
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--card-radius-sm);
  backdrop-filter: saturate(var(--card-saturate)) blur(var(--card-blur));
  -webkit-backdrop-filter: saturate(var(--card-saturate)) blur(var(--card-blur));
  box-shadow: var(--card-shadow);

  /* 기본 숨김 + fade/slide 준비 */
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s ease, transform .3s ease;
  z-index: 50;
  white-space: nowrap;
}

/* 호버 간극 메우는 투명 브릿지 (부모 메뉴와 서브 메뉴 사이) */
.hero-menu .submenu::before{
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: -20px;     /* 부모 메뉴 아래 쪽까지 확장 */
  height: 20px;
  /* 투명하지만 마우스는 받음 → hover 유지됨 */
}

/* 호버 시 펼침 (PC) */
.hero-menu .menu-item.has-sub:hover .submenu,
.hero-menu .menu-item.has-sub.open .submenu{
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
  transition-delay: 0s;
}

/* 호버 해제 시 약간의 딜레이 → 빠르게 지나가도 안 사라짐 */
.hero-menu .menu-item.has-sub .submenu{
  transition-delay: 0.15s;
}

/* 서브 메뉴 링크 */
.hero-menu .submenu a{
  color: var(--text-primary);
  text-decoration: none;
  opacity: .6;
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 1.5px;
  padding: 4px 8px;
  text-align: center;
  transition: opacity .2s ease, color .2s ease;
  position: static; /* 부모의 ::after underline 방지 */
}

.hero-menu .submenu a:hover{
  opacity: 1;
}

/* 서브 메뉴는 부모의 ::after underline 효과 제거 */
.hero-menu .submenu a::after{
  display: none;
}

/* 서브 메뉴 현재 선택 상태 — 부모와는 다른 스타일 */
.hero-menu .submenu a.on{
  opacity: 1;
  color: var(--text-primary);
  font-weight: 700;
  /* 서브 고유 표시: 좌측 ✦ 포인트 */
  position: relative;
}
.hero-menu .submenu a.on::before{
  content: '✦';
  position: absolute;
  left: -4px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.6rem;
  opacity: 0.7;
}

/* 부모 메뉴 = 서브가 선택되었을 때도 'on' 표시 (기존 underline 그대로) */
/* (JS에서 처리됨) */

/* 키보드 포커스 마감(PC에서 진짜 고급스러워짐) */
.hero-menu a:focus-visible,
.nav a:focus-visible,
.bgm-btn:focus-visible{
  outline: none;
  box-shadow: 0 0 0 6px rgba(255,255,255,.10);
  border-radius: 10px;
}

/* ============== Board Section ============== */
.board-section{
  padding: 24px 0 48px;
  text-align: center;
}

/* 글래스 카드 */
.board-box-glass{
  position: relative;
  width: min(92vw, 980px);
  max-width: 100%;
  margin: 0 auto;
  padding: 16px;
  border-radius: var(--card-radius);

  background: var(--card-bg);
  border: 1px solid var(--card-border);
  box-shadow: var(--card-shadow);

  overflow: visible;
}

/* 글래스 블러 레이어 */
.board-box-glass::before{
  content:"";
  position:absolute;
  inset:0;
  border-radius:inherit;
  backdrop-filter: saturate(var(--card-saturate)) blur(var(--card-blur));
  -webkit-backdrop-filter: saturate(var(--card-saturate)) blur(var(--card-blur));
  pointer-events:none;
  z-index:0;
}

/* 카드 내용 레이어 */
.board-box-glass > .board-inner{
  position: relative;
  z-index: 1;
}

/* 카드 안쪽 클리핑 */
.board-inner-i{
  overflow: hidden;
  border-radius: var(--card-radius-sm);
}

/* iframe (JS가 높이 제어) */
#boardFrame{
  display: block;
  width: 100%;
  border: 0;
  overflow: hidden;
  background: transparent;

  opacity: 0;
  transition: opacity .25s ease;
}
#boardFrame.is-on{
  opacity: 1;
}

/* ============== Effects ============== */
.reveal{
  opacity:0;
  transform:translateY(16px);
  transition:opacity 1s ease, transform 1s ease;
}
.reveal.is-visible{
  opacity:1;
  transform:none;
}

.page-fade{ opacity:1; transition:opacity 1.2s ease; }
.page-fade.is-leaving{ opacity:0; }

.board-fade{ opacity:1; transition:opacity 1.2s ease; }
.board-fade.is-loading{ opacity:0; }

/* ============== Mobile ============== */
@media (max-width:600px){
  .hero{
    padding: 40px 8px 24px;
  }
  .hero-menu{
    gap: 0.7rem;
    row-gap: 0.5rem;
    font-size: 0.82rem;
  }
  .hero-menu a{
    padding: 6px 4px;          /* 터치 영역 확보 (44px 이상) */
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }
  .site-quote{
    font-size: 9px;
    margin: 24px auto;
  }
  .board-box-glass{
    padding: 10px;
    border-radius: 10px;
    width: 96vw;
  }
  .board-inner-i{
    border-radius: 10px;
  }
  .content{
    padding: 12px 8px 48px;
  }
  .logo img{
    max-width: 280px;
  }

  /* 모바일 서브 메뉴 — 살짝 작게, 아래로 자연스럽게 */
  .hero-menu .submenu{
    padding: 8px 12px;
    min-width: 100px;
    gap: 2px;
    margin-top: 8px;
  }
  .hero-menu .submenu a{
    font-size: 0.78rem;
    padding: 8px 6px;
    min-height: 36px;
  }
}

/* ── 터치 기기 전용: hover 효과 대신 .open 클래스만으로 펼침 ── */
@media (hover:none){
  /* 터치 기기에서는 hover로 열리지 않게 */
  .hero-menu .menu-item.has-sub:hover .submenu{
    opacity: 0;
    pointer-events: none;
    transform: translateX(-50%) translateY(-4px);
  }
  /* .open 클래스가 있을 때만 열림 (JS가 첫 탭에 추가) */
  .hero-menu .menu-item.has-sub.open .submenu{
    opacity: 1;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
  }
}

/* ── 터치 기기: 커스텀 커서 숨김 ── */
@media (hover:none){
  .cursor{ display:none !important; }
}

/* ============== Misc ============== */
img{ background: transparent; }


/* ===== Cursor glow (PC only) ===== */
.cursor-glow{
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0; /* bg-cover(-1) 위, 내용(기본) 아래 */
}

.cursor-glow::before{
  content:"";
  position: absolute;
  width: 300px;
  height: 300px;
  left: var(--x, 50%);
  top: var(--y, 50%);
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,.10), transparent 60%);
  filter: blur(2px);
  opacity: .55;
  transition: opacity .25s ease;
}

@media (hover:none){
  .cursor-glow{ display:none; }
}



.bgm-btn {
  position: fixed;
  left: 50%;
  bottom: 24px;
  bottom: calc(24px + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  padding: 10px 25px;  /* ← 기존 12px 28px → 약 10% 축소 */
  border: 1px solid var(--btn-border);
  border-radius: 999px;

  /* 유리알 글래스모피즘 */
  background: var(--btn-bg);
  backdrop-filter: blur(12px) saturate(180%);
  -webkit-backdrop-filter: blur(12px) saturate(180%);
  box-shadow: 0 4px 16px rgba(61,42,30,0.22);

  color: var(--text-primary);
  font-size: 12px;   /* ← 기존 15px에서 -10% */
  font-weight: 500;
  cursor: pointer;
  transition: all .3s ease;
  z-index: 9999;
}

.bgm-btn:hover {
  background: var(--btn-hover);
  transform: translateX(-50%) translateY(-3px);
  box-shadow: 0 8px 22px rgba(61,42,30,0.30);
}


/* 커서 기본 스타일 */
.cursor {
  position: fixed;
  top: 0;
  left: 0;
  width: 30px; /* 커서 크기 */
  height: 30px;
  border: 1px solid rgba(255, 255, 255, 0.5); /* 얇은 테두리 */
  background-color: rgba(255, 255, 255, 0.1); /* 약간의 흰색 채우기 */
  border-radius: 50%;
  pointer-events: none; /* 클릭 방지 */
  z-index: 9999;
  transform: translate(-50%, -50%); /* 중앙 정렬 */
  transition: transform 0.2s ease, width 0.3s, height 0.3s; /* 호버 시 반응 속도 */
  mix-blend-mode: difference; /* 배경색과 반전되어 보이게 함 (고급스러운 효과) */
}

/* 링크에 마우스 올렸을 때 커서가 커지는 효과 */
.cursor.active {
  width: 50px;
  height: 50px;
  background-color: white; /* 꽉 찬 흰색으로 변경 */
  border-color: transparent;
  mix-blend-mode: difference;
}



.home-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none; /* 클릭 방해 X */
  z-index: 5;
}

.home-overlay-inner {
  text-align: center;
  color: rgba(255,255,255,0.55);
  font-family: inherit;
  animation: fadeBreath 4s ease-in-out infinite;
  transform: translateY(-25px);
}

.home-overlay-inner p {
  margin: 0;
  font-size: 0.95rem;
  letter-spacing: 0.12em;
}

.home-overlay-inner span {
  display: block;
  margin-top: 0.6em;
  font-size: 0.75rem;
  opacity: 0.6;
}

.home-overlay.off {
  opacity: 0;
  transition: opacity 0.6s ease;
}


@keyframes fadeBreath {
  0%, 100% { opacity: 0.35; }
  50% { opacity: 0.7; }
}



.pair-card img{
  width:100%;
  height: 260px;
  object-fit: cover;
  display:block;

 filter: grayscale(100%) brightness(.9);
  transition: filter .35s ease;
}

.pair-card:hover img{
   filter: grayscale(0%) brightness(1);
}


/* ===== Secret Login Dot ===== */
.site-footer {
  position: relative;
}

.secret-dot {
  display: inline-block;
  margin-left: 12px;
  color: var(--text-ghost);
  font-size: 0.7rem;
  text-decoration: none;
  letter-spacing: 0;
  transition: all .5s ease;
  cursor: pointer;
  vertical-align: middle;
  line-height: 1;
}

.secret-dot:hover {
  color: var(--text-muted);
  text-shadow: 0 0 8px var(--glow-color);
  transform: scale(1.3);
}

/* 로그인 상태일 때 — 은은하게 숨 쉬는 별 */
.secret-dot.is-on {
  color: var(--text-soft);
  animation: secretPulse 4s ease-in-out infinite;
}

.secret-dot.is-on:hover {
  color: rgba(255,120,120,0.9);
  text-shadow: 0 0 10px rgba(255,180,180,0.5);
}

@keyframes secretPulse {
  0%, 100% { opacity: 0.4; }
  50%      { opacity: 0.8; }
}

/* ===== Theme Toggle ===== */
.theme-toggle {
  display: inline-block;
  margin-left: 10px;
  color: var(--text-ghost);
  font-size: 0.85rem;
  text-decoration: none;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  vertical-align: middle;
  line-height: 1;
  transition: color .3s ease, transform .3s ease, text-shadow .3s ease;
  font-family: inherit;
}

.theme-toggle:hover {
  color: var(--text-muted);
  text-shadow: 0 0 8px var(--glow-color);
  transform: scale(1.2);
}