/* --- Hiyoko Root Core Styles --- */
:root {
  --primary: #FFD700;
  --bg: #020617;
  --text: #f8fafc;
}

html, body {
  background-color: var(--bg) !important;
  color: var(--text);
  margin: 0; padding: 0;
  overflow-x: hidden;
  font-family: 'Hiragino Sans', 'Inter', sans-serif;
}

.bg-glow {
  position: fixed; inset: 0;
  background: radial-gradient(circle at 80% 20%, rgba(255, 215, 0, 0.05), transparent 50%);
  z-index: -1; pointer-events: none;
}

/* ヘッダー */
.glass-header {
  position: fixed; top: 0; width: 100%;
  padding: 15px 20px; display: flex;
  justify-content: space-between; align-items: center;
  background: rgba(2, 6, 23, 0.85); backdrop-filter: blur(12px);
  z-index: 1000; border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

/* サイドナビ */
.side-nav {
  position: fixed; bottom: 0; left: 0; width: 100%;
  background: rgba(15, 23, 42, 0.95); z-index: 1100;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}
.nav-container { display: flex; overflow-x: auto; padding: 12px; gap: 8px; scrollbar-width: none; }
.nav-container::-webkit-scrollbar { display: none; }
.nav-item {
  flex: 0 0 auto; color: rgba(255, 255, 255, 0.5); text-decoration: none;
  font-size: 11px; font-weight: bold; padding: 10px 18px;
  border-radius: 10px; background: rgba(255, 255, 255, 0.03);
}
.nav-item.active { background: var(--primary); color: #000; }

/* PC用ナビ調整 */
@media (min-width: 769px) {
  .side-nav { top: 50%; bottom: auto; left: 20px; width: auto; transform: translateY(-50%); background: transparent; border: none; }
  .nav-container { flex-direction: column; padding: 0; }
  .nav-item { font-size: 12px; padding: 12px 25px; text-align: left; }
  main { padding-left: 140px; }
}

/* --- ページ下部のボタン・スクロール干渉対策 --- */
main[data-barba-namespace^="phase"],
main[data-barba-namespace="join"] {
  padding-bottom: 120px !important; 
}

.btn-primary {
  display: inline-block;
  margin-top: 20px;
  margin-bottom: 20px;
  width: auto;
  min-width: 280px; 
  max-width: 100%;
  transition: transform 0.2s, box-shadow 0.2s;
}

.btn-primary:active {
  transform: scale(0.96);
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

@media (min-width: 769px) {
  main[data-barba-namespace^="phase"],
  main[data-barba-namespace="join"] {
    padding-bottom: 60px !important;
  }
}

/* --- JOINページ専用：2カラムレイアウト設定 --- */
.page-layout {
  display: flex;
  flex-direction: column; /* スマホでは縦 */
  gap: 30px;
  padding: 120px 20px 100px;
}

/* PC：2列レイアウトをここで強制 */
@media (min-width: 769px) {
  .page-layout {
    flex-direction: row; /* 横に並べる */
    align-items: flex-start;
    justify-content: space-between;
  }
  .page-header-side {
    flex: 1;
    position: sticky;
    top: 120px;
    text-align: left; /* テキスト左寄せ */
  }
  .page-content-side {
    flex: 1.2;
  }
}

/* カレンダー：IDとクラス両方を7列に固定 */
#calendarDates, .h-cal-grid {
  display: grid !important;
  grid-template-columns: repeat(7, 1fr) !important;
  width: 100% !important;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 215, 0, 0.3);
  border-radius: 12px;
  overflow: hidden;
}

.h-cal-head {
  padding: 12px 0;
  background: rgba(255, 215, 0, 0.15);
  color: var(--primary);
  font-weight: 900;
  font-size: 0.75rem;
  text-align: center;
}

.h-cal-date {
  aspect-ratio: 1 / 1.1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  border-right: 1px solid rgba(255, 255, 255, 0.05);
  min-height: 65px;
}

.h-cal-join-btn {
  display: inline-block !important;
  background-color: var(--primary) !important;
  color: #000 !important;
  font-size: 0.65rem !important;
  font-weight: 900 !important;
  padding: 4px 10px !important;
  border-radius: 4px;
  cursor: pointer;
  border: none;
}

.accent { color: var(--primary); }

/* フォーム装飾 */
.input-field {
  width: 100%; padding: 12px; margin-bottom: 10px;
  background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.2);
  color: #fff; border-radius: 8px; font-size: 1rem;
}
.input-field::placeholder { color: rgba(255,255,255,0.4); }
.select-dark-text { background-color: #fff !important; color: #000 !important; }

@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }