/* ============================================================
   유튜브 실시간 생중계 (2026. 11. 13.)
   - 모든 화면: 메뉴 바로 아래 빨간 띠(.live-bar) — 화면 흐름 안에 있어 다른 단추를 가리지 않음
   - 홈: 첫 화면 빨간 단추(.live-hero-btn) + 생중계 카드(#live, 그 자리에서 재생)
   - 문구는 live.js가 시각에 따라 바꿈(~10:00 예정 · 10:00~18:00 생중계 중 · 18:00~ 다시 보기)
   ============================================================ */
:root { --live-red: #E8322B; --live-red-d: #B9201A; }

/* ----- 모든 화면: 메뉴 아래 띠 ----- */
.live-bar {
  display: block; position: relative; z-index: 5;
  background: linear-gradient(100deg, var(--live-red-d) 0%, var(--live-red) 45%, #F04A2E 100%);
  color: #fff; text-decoration: none;
  border-bottom: 1px solid rgba(0,0,0,0.25);
  box-shadow: 0 10px 26px -14px rgba(232,50,43,0.85);
}
.live-bar .lb-in {
  display: flex; align-items: center; gap: 0.5rem 0.85rem;
  max-width: var(--maxw, 1240px); margin: 0 auto;
  padding: 0.62rem clamp(1rem, 4vw, 2.5rem);
}
.lb-chip, .live-badge {
  flex-shrink: 0; display: inline-flex; align-items: center; gap: 0.42rem;
  padding: 0.26rem 0.7rem 0.26rem 0.6rem; border-radius: 999px;
  background: #fff; color: var(--live-red);
  font-weight: 900; font-size: 0.8rem; letter-spacing: 0.06em; line-height: 1.2; white-space: nowrap;
}
.lb-chip i, .live-badge i, .live-hero-btn i {
  width: 8px; height: 8px; border-radius: 50%; background: currentColor; flex-shrink: 0;
  animation: livePulse 1.4s ease-in-out infinite;
}
@keyframes livePulse { 0%,100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.35; transform: scale(0.8); } }
.lb-txt { flex: 1; min-width: 0; font-weight: 700; font-size: 0.97rem; line-height: 1.45; word-break: keep-all; }
.lb-txt b { font-weight: 900; }
.lb-go {
  flex-shrink: 0; padding: 0.38rem 0.95rem; border-radius: 999px;
  background: rgba(0,0,0,0.22); border: 1px solid rgba(255,255,255,0.45);
  font-weight: 900; font-size: 0.9rem; white-space: nowrap;
  transition: background .2s;
}
.live-bar:hover .lb-go, .live-bar:focus-visible .lb-go { background: rgba(0,0,0,0.38); }
.live-bar:focus-visible { outline: 3px solid #fff; outline-offset: -4px; }
@media (max-width: 560px) {
  .live-bar .lb-in { gap: 0.45rem 0.6rem; padding: 0.6rem 1rem; }
  .lb-txt { font-size: 0.92rem; }
  .lb-go { display: none; }                        /* 띠 전체가 링크라 글 끝 화살표로 대신 */
  .lb-txt::after { content: ' →'; font-weight: 900; white-space: nowrap; }
}
/* 휴대폰 메뉴: 닫혀 있을 때 남던 위아래 여백(약 20px 어두운 줄)이 띠를 가리지 않게 */
@media (max-width: 1220px) {
  #siteNav:not(.open) { padding-top: 0; padding-bottom: 0; border-bottom-width: 0; }
}
/* 다시 보기(생중계가 끝난 뒤): 깜빡임 없이 조금 차분하게 */
.live-after .lb-chip i, .live-after .live-badge i, .live-after .live-hero-btn i { animation: none; }
.live-bar.live-after { background: linear-gradient(100deg, #8E1E19 0%, #B9201A 100%); }

/* ----- 홈 첫 화면: 빨간 단추 ----- */
.live-hero-btn {
  display: inline-flex; align-items: center; gap: 0.6rem;
  padding: 1rem 1.7rem; border-radius: 999px;
  background: linear-gradient(135deg, #F04A2E, var(--live-red) 55%, var(--live-red-d));
  color: #fff; font-weight: 900; font-size: 1.05rem; text-decoration: none;
  border: 2px solid rgba(255,255,255,0.55);
  box-shadow: 0 0 0 0 rgba(232,50,43,0.6), 0 16px 36px -10px rgba(232,50,43,0.75);
  animation: liveRing 2.2s ease-out infinite;
  transition: transform .25s var(--ease);
}
.live-hero-btn:hover { transform: translateY(-3px) scale(1.02); }
.live-hero-btn:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
@keyframes liveRing {
  0%   { box-shadow: 0 0 0 0 rgba(232,50,43,0.55), 0 16px 36px -10px rgba(232,50,43,0.75); }
  70%  { box-shadow: 0 0 0 16px rgba(232,50,43,0), 0 16px 36px -10px rgba(232,50,43,0.75); }
  100% { box-shadow: 0 0 0 0 rgba(232,50,43,0), 0 16px 36px -10px rgba(232,50,43,0.75); }
}
.live-hero-btn.live-after { animation: none; }
@media (max-width: 560px) { .live-hero-btn { width: 100%; justify-content: center; } }
/* 띠가 들어간 만큼 첫 화면 높이를 줄여 「스크롤」 표시가 화면 안에 남게(넓은 PC 화면만) */
@media (min-width: 901px) and (min-height: 761px) {
  body.home-page .home-hero {
    min-height: calc(100vh - var(--header-h) - var(--live-h, 46px));
    min-height: calc(100dvh - var(--header-h) - var(--live-h, 46px));
  }
}

/* ----- 홈: 생중계 카드 ----- */
.live-sec { padding-top: clamp(1.6rem, 4vw, 2.4rem); padding-bottom: 0; scroll-margin-top: calc(var(--header-h) + 12px); }
.live-card {
  display: grid; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.3fr);
  grid-template-areas: "head player" "foot player";
  align-items: center; gap: 0 clamp(1.2rem, 3.4vw, 2.4rem);
  max-width: 1080px; margin: 0 auto; padding: clamp(1.3rem, 3.4vw, 2.1rem);
  border-radius: var(--radius); border: 2px solid rgba(232,50,43,0.7);
  background:
    radial-gradient(70% 90% at 0% 0%, rgba(232,50,43,0.28), transparent 65%),
    linear-gradient(160deg, #1a1530 0%, #0a1027 100%);
  box-shadow: 0 30px 70px -28px rgba(0,0,0,0.85), 0 0 0 6px rgba(232,50,43,0.08);
}
.live-head { grid-area: head; align-self: end; }
.live-foot { grid-area: foot; align-self: start; }
.live-player { grid-area: player; }
.live-top { display: flex; flex-wrap: wrap; align-items: center; gap: 0.45rem 0.7rem; margin-bottom: 0.75rem; }
.live-badge { background: var(--live-red); color: #fff; font-size: 0.85rem; padding: 0.32rem 0.85rem 0.32rem 0.7rem; }
.live-ch { color: var(--c-text-dim); font-weight: 800; font-size: 0.9rem; }
.live-card h2 { font-size: clamp(1.9rem, 4.6vw, 2.8rem); font-weight: 900; letter-spacing: -0.03em; line-height: 1.15; color: #fff; }
.live-card h2 .r { color: #FF6A55; }
.live-when { margin-top: 0.6rem; font-size: clamp(1.05rem, 2.6vw, 1.22rem); font-weight: 900; color: var(--c-primary); }
.live-prog { list-style: none; display: flex; flex-wrap: wrap; gap: 0.45rem; margin: 0.8rem 0 0; }
.live-prog li {
  display: inline-flex; align-items: center; gap: 0.45rem; padding: 0.35rem 0.8rem; border-radius: 999px;
  background: rgba(255,255,255,0.07); border: 1px solid var(--c-border-2); font-weight: 800; font-size: 0.92rem;
}
.live-prog li span { color: var(--c-primary); font-weight: 900; }
.live-state { margin: 0.95rem 0 1.1rem; color: var(--c-text-dim); font-size: 0.97rem; line-height: 1.7; word-break: keep-all; }
.live-state b { color: #fff; }
.live-btns { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.live-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem;
  padding: 0.85rem 1.35rem; border-radius: 999px; cursor: pointer;
  background: var(--live-red); color: #fff; border: 2px solid var(--live-red);
  font-family: inherit; font-weight: 900; font-size: 0.98rem; text-decoration: none;
  transition: transform .2s var(--ease), background .2s;
}
.live-btn:hover { transform: translateY(-2px); background: #F04A2E; }
.live-btn.ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,0.4); }
.live-btn.ghost:hover { background: rgba(255,255,255,0.1); }
.live-btn:focus-visible, .live-facade:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.live-net { display: none; margin-top: 0.8rem; padding: 0.6rem 0.8rem; border-radius: 10px;
  background: rgba(232,50,43,0.16); color: #ffd1cb; font-size: 0.88rem; font-weight: 700; line-height: 1.55; word-break: keep-all; }
.yt-off .live-net { display: block; }

.live-player {
  position: relative; aspect-ratio: 16 / 9; border-radius: 14px; overflow: hidden;
  background: linear-gradient(135deg, #c9b8f0, #f3c6dc 55%, #a9c9f2);
  box-shadow: 0 22px 50px -20px rgba(0,0,0,0.9); border: 1px solid rgba(255,255,255,0.18);
}
.live-player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.live-facade {
  position: absolute; inset: 0; width: 100%; height: 100%; padding: 0; border: 0; cursor: pointer; background: none;
  display: flex; align-items: center; justify-content: center;
}
/* 유튜브 썸네일을 못 받을 때(학교망 차단 등): 그림 대신 글 + 그 아래 재생 단추 */
.live-facade.noimg { flex-direction: column; gap: 0.7rem; }
.live-facade.noimg::before {
  content: '유튜브 생중계\A 11. 14.(토) 10:00~18:00'; white-space: pre; text-align: center;
  color: #2a1d5c; font-weight: 900; font-size: clamp(1rem, 3.4vw, 1.6rem); line-height: 1.4;
}
.live-facade img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.live-pi {
  position: relative; z-index: 1; display: flex; align-items: center; justify-content: center;
  width: clamp(64px, 9vw, 84px); height: clamp(46px, 6.4vw, 60px); border-radius: 16px;
  background: rgba(232,50,43,0.95); color: #fff; font-size: clamp(1.3rem, 2.6vw, 1.7rem);
  box-shadow: 0 10px 30px -6px rgba(0,0,0,0.6); transition: transform .2s var(--ease), background .2s;
}
.live-pi::after { content: ''; border-style: solid; border-width: 0.6em 0 0.6em 1em; border-color: transparent transparent transparent #fff; margin-left: 0.2em; }
.live-facade:hover .live-pi { transform: scale(1.08); background: #F04A2E; }

@media (max-width: 860px) {
  .live-card { grid-template-columns: 1fr; grid-template-areas: "head" "player" "foot"; }
  .live-player { margin: 1rem 0 0.2rem; }
  .live-state { margin-top: 0.8rem; }
}
@media (max-width: 560px) {
  .live-btns .live-btn { flex: 1 1 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .lb-chip i, .live-badge i, .live-hero-btn i, .live-hero-btn { animation: none !important; }
}
@media print { .live-bar, .live-hero-btn { display: none !important; } }
