/* =========================================
   KCON LA 2026 レイヤーポップアップ CSS
   ========================================= */
/* サイト側CSSの干渉を防ぐリセット */
#kconPopupRoot, #kconPopupRoot * {
  box-sizing: border-box;
}
/* ラッパー自体はレイアウトに影響を与えない */
#kconPopupRoot {
  position: static;
  transform: none;
  filter: none;
}
#kconPopup h2, #kconPopup p {
  padding: 0;
}
#kconPopupOverlay {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0, 0, 0, 0.7);
  z-index: 2147483645; /* 最前面 (サイト側要素より上) */
}
#kconPopup {
  display: none;
  position: fixed;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 92%;
  max-width: 720px;
  max-height: 90vh;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  z-index: 2147483646; /* オーバーレイより上 */
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  flex-direction: column;
}
#kconPopup .kcon-popup-close {
  position: absolute;
  top: 10px; right: 10px;
  width: 36px; height: 36px;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  border: none;
  border-radius: 50%;
  font-size: 20px;
  line-height: 36px;
  text-align: center;
  cursor: pointer;
  z-index: 10;
  padding: 0;
}
#kconPopup .kcon-popup-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
#kconPopup .kcon-popup-body a.kcon-img-link {
  display: block;
  font-size: 0;
}
#kconPopup .kcon-popup-body .kcon-img-link img {
  width: 100%;
  height: auto;
  display: block;
}
#kconPopup .kcon-popup-info {
  padding: 16px 20px 20px;
  color: #222;
  font-size: 14px;
  line-height: 1.7;
}
#kconPopup .kcon-popup-info h2 {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 10px;
  text-align: center;
  background: linear-gradient(90deg, #00C8FF, #0064FF);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: #0064FF; /* fallback */
}
/* --- 応援棒(ペンライト)エフェクト --- */
#kconPopup .kcon-stick {
  width: 30px;
  height: auto;
  flex-shrink: 0;
  transform-origin: 50% 90%; /* 持ち手を軸に振る */
  animation: kconStickWave 0.9s ease-in-out infinite,
             kconStickGlow 1.8s ease-in-out infinite;
}
@keyframes kconStickWave {
  0%, 100% { transform: rotate(-16deg); }
  50%      { transform: rotate(16deg); }
}
@keyframes kconStickGlow {
  0%, 100% { filter: drop-shadow(0 0 3px rgba(0, 200, 255, 0.5)); }
  50%      { filter: drop-shadow(0 0 10px rgba(0, 100, 255, 0.95)); }
}
#kconPopup .kcon-popup-info .kcon-live {
  background: #f0f9ff;
  border-left: 4px solid #00C8FF;
  border-radius: 8px;
  padding: 12px 14px;
  margin-bottom: 12px;
}
#kconPopup .kcon-popup-info .kcon-live strong {
  display: block;
  color: #0064FF;
  margin-bottom: 4px;
}
#kconPopup .kcon-popup-info .kcon-note {
  font-size: 12px;
  color: #888;
}
#kconPopup .kcon-day {
  border-top: 1px solid #e5e5e5;
  padding: 10px 0;
}
#kconPopup .kcon-day:last-of-type {
  border-bottom: 1px solid #e5e5e5;
}
#kconPopup .kcon-day strong {
  display: block;
  color: #0064FF;
  margin-bottom: 4px;
}
#kconPopup .kcon-caution {
  margin: 12px 0 0;
  font-size: 11px;
  line-height: 1.6;
  color: #888;
}
#kconPopup .kcon-popup-btn {
  display: block;
  margin: 16px auto 0;
  max-width: 320px;
  background: linear-gradient(90deg, #00C8FF, #0064FF);
  color: #fff;
  text-align: center;
  text-decoration: none;
  font-weight: 700;
  font-size: 15px;
  padding: 13px 10px;
  border-radius: 999px;
  box-shadow: 0 4px 12px rgba(0, 100, 255, 0.35);
}
#kconPopup .kcon-popup-footer {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 16px;
  background: #f0f0f2;
  border-top: 1px solid #ddd;
}
#kconPopup .kcon-popup-footer label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #444;
  cursor: pointer;
  user-select: none;
}
#kconPopup .kcon-popup-footer input[type="checkbox"] {
  width: 16px; height: 16px;
  cursor: pointer;
}
#kconPopup .kcon-popup-footer .kcon-btn-close-text {
  background: #333;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 13px;
  padding: 8px 18px;
  cursor: pointer;
}
/* --- フローティング応援棒 (閉じた後の再表示ボタン) --- */
/* 左右どちらかの中央にランダム表示 (JSで .kcon-side-l / .kcon-side-r を付与) */
#kconStickToggle {
  display: none;
  position: fixed;
  top: 50%;
  right: 10px;
  transform: translateY(-50%);
  width: 36px;
  height: auto;
  padding: 0;
  border: none;
  background: none;
  cursor: pointer;
  z-index: 2147483644; /* ポップアップの下、サイト側要素より上 */
}
#kconStickToggle.kcon-side-l {
  left: 10px;
  right: auto;
}
#kconStickToggle.kcon-side-r {
  right: 10px;
  left: auto;
}
#kconStickToggle img {
  width: 100%;
  height: auto;
  display: block;
  transform-origin: 50% 90%;
  animation: kconStickWave 0.9s ease-in-out infinite,
             kconStickGlow 1.8s ease-in-out infinite;
}

/* --- Mobile: ポップアップは縦100% フルスクリーン --- */
@media screen and (max-width: 480px) {
  #kconStickToggle { width: 30px; }
  #kconPopup {
    top: 0;
    left: 0;
    transform: none;
    width: 100%;
    height: 100%;      /* fallback */
    height: 100dvh;    /* アドレスバーを除いた実表示領域 */
    max-height: none;
    border-radius: 0;
  }
  #kconPopup .kcon-popup-info { padding: 12px 14px 16px; font-size: 13px; }
  #kconPopup .kcon-popup-info h2 { font-size: 16px; gap: 6px; }
  #kconPopup .kcon-stick { width: 24px; }
  #kconPopup .kcon-popup-btn { font-size: 14px; padding: 12px 10px; }
  #kconPopup .kcon-popup-footer label { font-size: 12px; }
}
