/* ==== 기존 방송장비 연결 — /announcementsystem (views/include/announce_connect.ejs · announce-connect.js) ====
   "소리 길" 그림: 계산대 PC → (선택기) → 방송장비 → 매장 스피커. 기기 이미지는 투명 배경이라
   층(아래 케이블 1 < 선택기 2 < 가운데 케이블 3 < 기기 4 < 표시 5·6)으로 케이블이 기기 뒤로 들어간다.
   이 파일을 고치면 preview_broadcast.ejs 의 ?v= 를 올린다(정적 파일 1년 캐시). */

.bcn {
  --bcn-teal: #0b9fb3;
  --bcn-feed: #3b3f48;
  --bcn-off: #c3c7cf;
  --bcn-stage-bg: #f3f4f7;
  padding: clamp(72px, 8vw, 104px) 0;
  background: var(--w-cool-99);
}
.bcn :lang(ko) { word-break: keep-all; }
.bcn small { color: inherit; font: inherit; letter-spacing: inherit; } /* 전역 small(회색 캡션) 끊기 */

/* ---------- 머리 ---------- */
.bcn-head {
  max-width: 780px;
  margin: 0 auto 30px;
  text-align: center;
}
.bcn-head h2 {
  margin-top: 16px;
  color: var(--fg-primary);
  font: 800 clamp(32px, 4vw, 50px)/1.12 var(--font-sans);
  letter-spacing: -.045em;
  text-wrap: balance;
}
.bcn-head .lead {
  max-width: 640px;
  margin: 16px auto 0;
  color: var(--fg-neutral-subtle);
  font: 500 17px/1.65 var(--font-sans);
  text-wrap: pretty;
}

/* ---------- 껍데기 + 탭 ---------- */
.bcn-shell {
  overflow: hidden;
  max-width: 1180px;
  margin: 0 auto;
  border: 1px solid var(--line-neutral-subtle);
  border-radius: 26px;
  background: #fff;
  box-shadow: 0 22px 60px rgba(24, 20, 54, .08);
}
.bcn-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  padding: 8px;
  border-bottom: 1px solid var(--line-neutral-subtle);
  background: var(--w-cool-98);
}
.bcn-tab {
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 4px;
  min-width: 0;
  min-height: 70px;
  padding: 12px 14px;
  border-radius: 14px;
  color: var(--fg-neutral-subtle);
  text-align: center;
  transition: background .18s ease, color .18s ease, box-shadow .18s ease;
}
.bcn-tab-label {
  display: flex;
  align-items: baseline;
  gap: 7px;
  font: 800 clamp(15px, 1.6vw, 17px)/1.25 var(--font-sans);
  letter-spacing: -.02em;
}
.bcn-tab-step { color: var(--fg-neutral-muted); font: 800 10px/1 var(--font-mono); letter-spacing: .1em; }
.bcn-tab-sub { color: var(--fg-neutral-muted); font: 600 12.5px/1.35 var(--font-sans); }
.bcn-tab:hover { color: var(--fg-primary); }
.bcn-tab[aria-selected="true"] {
  background: #fff;
  color: var(--fg-primary);
  box-shadow: 0 5px 18px rgba(24, 20, 54, .09);
}
.bcn-tab[aria-selected="true"] .bcn-tab-step { color: var(--w-blue-50); }
.bcn-tab:focus-visible { outline: 3px solid rgba(79, 55, 255, .24); outline-offset: 2px; }

/* ---------- 탭 내용 ---------- */
.bcn-panel { padding: clamp(20px, 3vw, 34px); }
.bcn-panel[hidden] { display: none; }
.bcn-panel-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px 28px;
  margin-bottom: 18px;
}
.bcn-kicker { color: var(--w-blue-50); font: 700 13px/1.35 var(--font-sans); }
.bcn-panel-head h3 {
  margin-top: 6px;
  color: var(--fg-primary);
  font: 800 clamp(22px, 2.4vw, 30px)/1.25 var(--font-sans);
  letter-spacing: -.032em;
  text-wrap: balance;
}

/* 선택기 버튼 모양 스위치(미리듣기 탭) — 실물 윗면처럼 검은 판 위 버튼 두 개 */
.bcn-switch { display: flex; align-items: center; gap: 12px; }
.bcn-switch-cap { color: var(--fg-neutral-muted); font: 600 13px/1.35 var(--font-sans); }
.bcn-switch-pad {
  display: inline-flex;
  gap: 5px;
  padding: 5px;
  border-radius: 14px;
  background: #23252b;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06), 0 6px 16px rgba(17, 18, 24, .18);
}
.bcn-switch-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 14px 0 6px;
  border-radius: 10px;
  color: rgba(255, 255, 255, .7);
  font: 700 14px/1 var(--font-sans);
  transition: background .2s ease, color .2s ease;
}
.bcn-switch-btn b {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: #3a3d45;
  color: #fff;
  font: 800 14px/1 var(--font-sans);
  box-shadow: 0 2px 0 #101114;
  transition: background .2s ease, transform .15s ease, box-shadow .15s ease;
}
.bcn-switch-btn:hover { color: #fff; }
.bcn-switch-btn[aria-pressed="true"] { background: #fff; color: var(--fg-primary); }
.bcn-switch-btn[aria-pressed="true"] b { transform: translateY(1px); box-shadow: 0 1px 0 #101114; }
.bcn-switch-btn[data-bcn-mode="preview"][aria-pressed="true"] b { background: var(--bcn-teal); }
.bcn-switch-btn[data-bcn-mode="broadcast"][aria-pressed="true"] b { background: var(--w-blue-50); }
.bcn-switch-btn:focus-visible { outline: 3px solid rgba(79, 55, 255, .35); outline-offset: 2px; }

/* ---------- 그림(무대) ---------- */
.bcn-figure {
  position: relative;
  margin: 0;
  padding: clamp(12px, 2.4vw, 26px);
  border-radius: 20px;
  background: var(--bcn-stage-bg);
}
.bcn-stage { position: relative; width: 100%; }
.bcn-stage.is-narrow { display: none; }
.bcn-stage > * { position: absolute; }
.bcn-wires { inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.bcn-wires.is-under { z-index: 1; }
.bcn-wires.is-mid { z-index: 3; }
.bcn-dev { display: block; height: auto; max-width: none; pointer-events: none; user-select: none; }
.bcn-photo {
  overflow: hidden;
  margin: 0;
  aspect-ratio: 4 / 3;
  border-radius: 14px;
  box-shadow: 0 16px 34px -14px rgba(10, 14, 30, .5), 0 0 0 1px rgba(10, 14, 30, .06);
}
.bcn-photo img { display: block; width: 100%; height: 100%; object-fit: cover; }

/* 케이블: 방송=인디고, 미리듣기=청록, PC→선택기=진회색, 기존 스피커 배선=회색 점선.
   .flow = 소리가 흐르는 방향으로 움직이는 흰 점(화면에 보일 때만) */
.bcn-w path { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.bcn-w .halo { stroke: var(--bcn-stage-bg); stroke-width: 11; }
.bcn-w .line { stroke-width: 5.5; transition: stroke .35s ease; }
.bcn-w.is-main .line { stroke: var(--w-blue-50); }
.bcn-w.is-preview .line { stroke: var(--bcn-teal); }
.bcn-w.is-feed .line { stroke: var(--bcn-feed); }
.bcn-w.is-exist .halo { stroke-width: 8; }
.bcn-w.is-exist .line { stroke: #9aa0ab; stroke-width: 3; stroke-dasharray: 1 9; }
.bcn-w .flow {
  stroke: rgba(255, 255, 255, .95);
  stroke-width: 2.6;
  stroke-dasharray: .5 17;
  opacity: 0;
  transition: opacity .3s ease;
}
.bcn-w.is-exist .flow { display: none; }
.bcn-w .cap { stroke: #fff; stroke-width: 2.4; transition: fill .35s ease; }
.bcn-w.is-main .cap { fill: var(--w-blue-50); }
.bcn-w.is-preview .cap { fill: var(--bcn-teal); }
.bcn-w.is-feed .cap { fill: var(--bcn-feed); }
.bcn.is-live .bcn-w .flow { opacity: 1; animation: bcnFlow 1.15s linear infinite; }
.bcn.is-live .bcn-w.is-exist .line { animation: bcnFlowDot 1.15s linear infinite; }
@keyframes bcnFlow { to { stroke-dashoffset: -17.5; } }
@keyframes bcnFlowDot { to { stroke-dashoffset: -10; } }

/* 소리 파동 — 매장 사진(어두움)은 흰색, 소형 스피커(밝은 바탕)는 청록 */
.bcn-rings {
  z-index: 5;
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  pointer-events: none;
  transition: opacity .35s ease;
}
.bcn-rings i {
  position: absolute;
  inset: 0;
  border: 2.5px solid rgba(255, 255, 255, .95);
  border-radius: 50%;
}
.bcn-rings.on-preview i { border-color: var(--bcn-teal); }
/* 멈춘 그림(동작 줄이기·화면 밖): 퍼지는 고리 세 개를 그대로 보여 준다 */
.bcn-rings i:nth-child(1) { transform: scale(.8); opacity: .95; }
.bcn-rings i:nth-child(2) { transform: scale(1.35); opacity: .55; }
.bcn-rings i:nth-child(3) { transform: scale(1.9); opacity: .25; }
.bcn.is-live .bcn-rings i { animation: bcnRing 1.8s ease-out infinite; }
.bcn.is-live .bcn-rings i:nth-child(2) { animation-delay: .6s; }
.bcn.is-live .bcn-rings i:nth-child(3) { animation-delay: 1.2s; }
@keyframes bcnRing {
  0% { transform: scale(.55); opacity: .95; }
  100% { transform: scale(2.2); opacity: 0; }
}

/* 번호 핀 — 아래 단계 번호와 같다(주석은 브랜드 인디고) */
.bcn-pin {
  z-index: 6;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  margin: -14px 0 0 -14px;
  border-radius: 50%;
  background: var(--w-blue-50);
  color: #fff;
  font: 800 14px/1 var(--font-sans);
  box-shadow: 0 0 0 3px #fff, 0 6px 14px rgba(20, 16, 60, .28);
}
/* 기기 이름 */
.bcn-name {
  z-index: 6;
  transform: translateX(-50%);
  color: var(--fg-neutral-subtle);
  font: 700 14px/1.2 var(--font-sans);
  letter-spacing: -.01em;
  white-space: nowrap;
}
/* 선택기 단자 이름표(케이블 위) */
.bcn-port {
  z-index: 6;
  transform: translate(-50%, -50%);
  padding: 5px 9px;
  border-radius: 999px;
  color: #fff;
  font: 800 12px/1 var(--font-sans);
  letter-spacing: .02em;
  white-space: nowrap;
  box-shadow: 0 0 0 2.5px #fff, 0 4px 10px rgba(0, 0, 0, .16);
  transition: background .35s ease;
}
.bcn-port.is-feed { background: var(--bcn-feed); }
.bcn-port.is-preview { background: var(--bcn-teal); }
.bcn-port.is-main { background: var(--w-blue-50); }
/* 눌린 버튼 표시(선택기 윗면) */
.bcn-press {
  z-index: 5;
  width: 34px;
  height: 34px;
  margin: -17px 0 0 -17px;
  border: 3px solid;
  border-radius: 50%;
  opacity: 0;
  transition: opacity .3s ease;
}
.bcn-press.on-preview { border-color: var(--bcn-teal); box-shadow: 0 0 14px rgba(11, 159, 179, .55); }
.bcn-press.on-broadcast { border-color: var(--w-blue-50); box-shadow: 0 0 14px rgba(79, 55, 255, .5); }
/* 장비 전원 불빛(예약방송 탭) */
.bcn-glow {
  z-index: 5;
  width: 26px;
  height: 26px;
  margin: -13px 0 0 -13px;
  border-radius: 50%;
  box-shadow: 0 0 0 2px rgba(34, 197, 94, .95), 0 0 18px 5px rgba(34, 197, 94, .45);
}
.bcn.is-live .bcn-glow { animation: bcnGlow 1.6s ease-in-out infinite; }
@keyframes bcnGlow { 50% { box-shadow: 0 0 0 2px rgba(34, 197, 94, .6), 0 0 8px 2px rgba(34, 197, 94, .25); } }
/* 예약 시각 딱지(예약방송 탭, PC 화면 위) */
.bcn-chip {
  z-index: 6;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transform: translateY(-50%);
  padding: 6px 10px 6px 8px;
  border-radius: 999px;
  background: #15171c;
  color: #fff;
  font: 700 12.5px/1 var(--font-sans);
  white-space: nowrap;
  box-shadow: 0 6px 16px rgba(0, 0, 0, .22);
}
.bcn-chip svg { width: 14px; height: 14px; flex: none; }

/* 미리듣기 탭: 1번(미리듣기) ↔ 2번(방송) — 지금 쓰지 않는 길은 회색으로 */
.bcn-figure[data-mode="preview"] .bcn-w.on-broadcast .line,
.bcn-figure[data-mode="broadcast"] .bcn-w.on-preview .line { stroke: var(--bcn-off); }
.bcn-figure[data-mode="preview"] .bcn-w.on-broadcast .cap,
.bcn-figure[data-mode="broadcast"] .bcn-w.on-preview .cap { fill: var(--bcn-off); }
.bcn-figure[data-mode="preview"] .bcn-w.on-broadcast .flow,
.bcn-figure[data-mode="broadcast"] .bcn-w.on-preview .flow { opacity: 0; animation: none; }
.bcn-figure[data-mode="preview"] .bcn-w.is-exist.on-broadcast .line { animation: none; stroke: #d3d6dc; }
.bcn-figure[data-mode="preview"] .bcn-rings.on-broadcast,
.bcn-figure[data-mode="broadcast"] .bcn-rings.on-preview { opacity: 0; }
.bcn-figure[data-mode="preview"] .bcn-port.on-broadcast,
.bcn-figure[data-mode="broadcast"] .bcn-port.on-preview { background: var(--bcn-off); }
.bcn-figure[data-mode="preview"] .bcn-press.on-preview,
.bcn-figure[data-mode="broadcast"] .bcn-press.on-broadcast { opacity: 1; }

/* 지금 상태 한 줄(미리듣기 탭) */
.bcn-state {
  display: flex;
  justify-content: center;
  margin-top: clamp(4px, 1vw, 10px);
  color: var(--fg-primary);
  font: 700 14.5px/1.4 var(--font-sans);
  text-align: center;
}
.bcn-state span { display: none; align-items: center; gap: 8px; }
.bcn-state span::before { content: ""; flex: none; width: 9px; height: 9px; border-radius: 50%; }
.bcn-state .on-preview::before { background: var(--bcn-teal); }
.bcn-state .on-broadcast::before { background: var(--w-blue-50); }
.bcn-figure[data-mode="preview"] .bcn-state .on-preview,
.bcn-figure[data-mode="broadcast"] .bcn-state .on-broadcast { display: inline-flex; }

/* ---------- 단계(그림 번호와 같은 번호) ---------- */
.bcn-steps {
  display: grid;
  grid-template-columns: repeat(var(--n, 3), minmax(0, 1fr)); /* 단계 수만큼(예약방송 탭은 2개) */
  gap: 12px;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}
.bcn-step {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  padding: 14px;
  border: 1px solid var(--line-neutral-subtle);
  border-radius: 16px;
  background: #fff;
}
.bcn-step-thumb {
  display: block;
  overflow: hidden;
  width: 92px;
  aspect-ratio: 4 / 3;
  border-radius: 10px;
  background: var(--bcn-stage-bg);
}
.bcn-step-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.bcn-step-thumb.is-contain img { object-fit: contain; padding: 6px; }
.bcn-step-mark {
  display: inline-grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  margin-bottom: 7px;
  padding: 0 7px;
  border-radius: 999px;
  background: var(--w-blue-50);
  color: #fff;
  font: 800 12px/1 var(--font-sans);
}
.bcn-step-mark.is-feed { background: var(--bcn-feed); }
.bcn-step-mark.is-preview { background: var(--bcn-teal); }
.bcn-step-mark.is-main { background: var(--w-blue-50); }
.bcn-step strong {
  display: block;
  color: var(--fg-primary);
  font: 800 15.5px/1.35 var(--font-sans);
  letter-spacing: -.02em;
}
.bcn-step p {
  margin-top: 5px;
  color: var(--fg-neutral-subtle);
  font: 500 13.5px/1.6 var(--font-sans);
}
.bcn-note {
  margin-top: 12px;
  padding: 11px 14px;
  border-radius: 12px;
  background: #fff6ed;
  color: #9a3412;
  font: 600 13px/1.55 var(--font-sans);
}

/* ---------- 체험 + 부품 신청 ---------- */
.bcn-cta {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px 28px;
  align-items: center;
  max-width: 1180px;
  margin: 22px auto 0;
  padding: 22px 24px;
  border: 1px solid var(--line-neutral-subtle);
  border-radius: 22px;
  background: #fff;
}
.bcn-cta-copy strong { color: var(--fg-primary); font: 800 18px/1.35 var(--font-sans); letter-spacing: -.02em; }
.bcn-cta-copy p { margin-top: 6px; color: var(--fg-neutral-muted); font: 500 13.5px/1.65 var(--font-sans); }
.bcn-cta > .btn { justify-self: end; white-space: nowrap; }
.bcn-kits {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.bcn-kit {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  grid-template-rows: auto auto;
  align-content: center;
  column-gap: 12px;
  row-gap: 3px;
  padding: 10px 12px;
  border-radius: 14px;
  background: var(--w-cool-98);
}
.bcn-kit-img {
  grid-row: 1 / span 2;
  display: grid;
  place-items: center;
  overflow: hidden;
  width: 72px;
  aspect-ratio: 4 / 3;
  border-radius: 10px;
  background: #fff;
}
.bcn-kit-img img { display: block; width: 100%; height: 100%; object-fit: cover; }
.bcn-kit.is-none .bcn-kit-img svg { width: 26px; height: 26px; color: var(--w-green-60); }
.bcn-kit strong { align-self: end; color: var(--fg-primary); font: 800 14px/1.3 var(--font-sans); }
.bcn-kit small { align-self: start; color: var(--fg-neutral-muted); font: 500 12px/1.45 var(--font-sans); }
.bcn-footnote {
  max-width: 1180px;
  margin: 14px auto 0;
  color: var(--fg-neutral-muted);
  font: 500 12.5px/1.5 var(--font-sans);
  text-align: center;
}

/* ---------- 좁은 화면: 세로 그림 · 단계 한 줄씩 ---------- */
/* 그림은 700px 아래에서만 세로 배치 — 태블릿은 가로 그림이 더 알아보기 쉽다 */
@media (max-width: 699px) {
  .bcn-stage.is-wide { display: none; }
  .bcn-stage.is-narrow { display: block; }
}
@media (max-width: 899px) {
  .bcn-name { font-size: 13px; }
  .bcn-pin { width: 26px; height: 26px; margin: -13px 0 0 -13px; font-size: 13px; }
  .bcn-steps { grid-template-columns: minmax(0, 1fr); }
  .bcn-panel-head { align-items: stretch; }
  .bcn-switch { flex-wrap: wrap; width: 100%; }
  .bcn-switch-pad { flex: 1 1 auto; }
  .bcn-switch-btn { flex: 1 1 0; justify-content: flex-start; }
  .bcn-cta { grid-template-columns: minmax(0, 1fr); }
  .bcn-cta > .btn { justify-self: stretch; }
  .bcn-kits { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 600px) {
  .bcn-head { text-align: left; margin-bottom: 22px; }
  .bcn-head .lead { margin-left: 0; font-size: 16px; }
  .bcn-shell { border-radius: 20px; }
  .bcn-tab { min-height: 62px; padding: 9px 4px; gap: 3px; }
  .bcn-tab-label { gap: 4px; font-size: 13.5px; }
  .bcn-tab-step { font-size: 9.5px; letter-spacing: .04em; }
  .bcn-tab-sub { font-size: 11.5px; }
  .bcn-panel { padding: 16px; }
  .bcn-figure { padding: 10px; border-radius: 16px; }
  .bcn-step { grid-template-columns: 76px minmax(0, 1fr); gap: 12px; padding: 12px; }
  .bcn-step-thumb { width: 76px; }
  .bcn-cta { padding: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  /* 스크립트가 늦게 알아채도(설정을 페이지를 연 채로 바꿈) CSS 가 먼저 멈춘다 */
  .bcn.is-live .bcn-w .flow,
  .bcn.is-live .bcn-w.is-exist .line,
  .bcn.is-live .bcn-rings i,
  .bcn.is-live .bcn-glow { animation: none; }
  .bcn.is-live .bcn-w .flow { opacity: 0; }
  .bcn-tab,
  .bcn-switch-btn,
  .bcn-switch-btn b,
  .bcn-w .line,
  .bcn-w .flow,
  .bcn-rings,
  .bcn-port,
  .bcn-press { transition: none; }
}
