/* =========================================================
   線上轉播專區：沿用主視覺的配色、白色半透明卡片與橘色按鈕
   ========================================================= */
* { box-sizing: border-box; }
html, body { margin: 0; }
body.live {
  min-height: 100svh;
  display: flex; flex-direction: column;
  color: #3d3a39;
  background: #e9d6a8;
  font-family: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", system-ui, sans-serif;
  line-height: 1.65;
}

/* 背景：主視覺插畫，蓋一層淡白讓卡片更好讀 */
.live-bg {
  position: fixed; inset: 0; z-index: -2;
  width: 100%; height: 100%;
  object-fit: cover; object-position: center 70%;
}
body.live::before {
  content: ""; position: fixed; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(255, 250, 240, .55), rgba(255, 250, 240, .25));
}

/* 頂部：回首頁與語言切換 */
.live-top {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: clamp(14px, 2vw, 28px) clamp(16px, 3vw, 40px) 0;
}
.live-top a {
  display: inline-flex; align-items: center; gap: .4em;
  padding: .45em 1em; border-radius: 999px;
  background: #fffaf0e0; box-shadow: 0 2px 10px #7a4a1a1f;
  color: #3d3a39; font-weight: 700; font-size: 15px; text-decoration: none;
}
.live-top a:hover { background: #e7651f; color: #fff; }
.live-back::before { content: "←"; }

/* 主卡片 */
.live-card {
  flex: 1 0 auto;
  width: min(1080px, calc(100% - 32px));
  margin: clamp(16px, 3vw, 40px) auto;
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(20px, 3vw, 48px); align-items: center;
  padding: clamp(20px, 3vw, 44px);
  background: rgba(255, 255, 255, .74);
  -webkit-backdrop-filter: blur(18px) saturate(1.3);
  backdrop-filter: blur(18px) saturate(1.3);
  border: 1px solid rgba(255, 255, 255, .75);
  border-radius: 24px;
  box-shadow: 0 30px 70px -30px rgba(110, 60, 15, .5);
}
.live-poster { display: block; border-radius: 14px; overflow: hidden; box-shadow: 0 14px 34px -14px rgba(80, 45, 10, .55); }
.live-poster img { display: block; width: 100%; height: auto; }

.live-info { text-align: center; }
.live-logo { width: min(280px, 70%); height: auto; }
.live-eyebrow { margin: 1.2em 0 0; font-size: 13px; font-weight: 700; letter-spacing: .2em; color: #cf4a0c; }
.live-info h1 { margin: .15em 0 0; font-size: clamp(24px, 2.6vw, 34px); line-height: 1.3; text-wrap: balance; }
.live-sub { margin: .2em 0 0; font-size: clamp(17px, 1.5vw, 20px); font-weight: 700; color: #5b5652; }
.live-date {
  display: inline-block; margin: .9em 0 0; padding: .25em 1em;
  border-radius: 999px; background: rgba(231, 101, 31, .12);
  color: #b8460c; font-weight: 700; font-variant-numeric: tabular-nums;
}

/* 倒數計時 */
.live-countdown { margin: 1.4em 0 0; }
.live-status { margin: 0 0 .6em; font-weight: 700; color: #5b5652; }
.cd { display: flex; justify-content: center; gap: clamp(8px, 1.2vw, 14px); margin: 0; padding: 0; list-style: none; }
.cd li {
  min-width: 4.4em; padding: .55em .4em .45em;
  border-radius: 14px; background: rgba(255, 255, 255, .8);
  box-shadow: inset 0 0 0 1px rgba(61, 58, 57, .1);
}
.cd b {
  display: block; font-size: clamp(26px, 3vw, 38px); line-height: 1.1;
  color: #e7651f; font-variant-numeric: tabular-nums;
}
.cd small { font-size: 13px; color: #6f6a66; }
.is-live .cd { display: none; }
.is-live .live-status { color: #b8460c; }
.is-live .live-status::before {
  content: ""; display: inline-block; width: .55em; height: .55em; margin-right: .45em;
  border-radius: 50%; background: #e23b2e; vertical-align: .1em;
  animation: livePulse 1.8s ease-out infinite;
}
@keyframes livePulse { 0% { box-shadow: 0 0 0 0 #e23b2e80; } 70%, 100% { box-shadow: 0 0 0 8px #e23b2e00; } }

/* 按鈕 */
.live-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin: 1.6em 0 0; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 11em; padding: .8em 1.6em;
  border-radius: 999px; border: 2px solid #e7651f;
  font: inherit; font-weight: 700; font-size: 16px; line-height: 1.2;
  text-decoration: none; cursor: pointer;
  transition: background .2s, color .2s, transform .2s;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: #e7651f; color: #fff; }
.btn-primary:hover { background: #cf4a0c; border-color: #cf4a0c; }
.btn-ghost { background: rgba(255, 255, 255, .7); color: #cf4a0c; }
.btn-ghost:hover { background: #fff; }
.live-note { margin: 1.4em auto 0; max-width: 32em; font-size: 15px; color: #5b5652; }
.live-note a { color: #cf4a0c; font-weight: 700; }

a:focus-visible, button:focus-visible { outline: 3px solid #cf4a0c; outline-offset: 3px; }

.live-foot { padding: 0 16px 24px; text-align: center; font-size: 14px; color: #5b5652; }

/* 播放器對話框 */
.player {
  width: min(1100px, calc(100% - 24px));
  padding: 0; border: 0; border-radius: 20px;
  background: rgba(255, 255, 255, .9);
  -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px);
  box-shadow: 0 30px 80px -20px rgba(40, 20, 5, .6);
  color: #3d3a39;
}
.player::backdrop { background: rgba(40, 25, 10, .55); }
.player-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 18px;
}
.player-head h2 { margin: 0; font-size: 20px; }
.player-close {
  width: 40px; height: 40px; border: 0; border-radius: 50%;
  background: rgba(61, 58, 57, .08); color: #3d3a39; font-size: 24px; cursor: pointer;
}
.player video { display: block; width: 100%; aspect-ratio: 16 / 9; background: #000; }
.player-note { margin: 0; padding: 12px 18px 16px; font-size: 14px; color: #b8460c; }

/* 平板與手機 */
@media (max-width: 860px) {
  .live-card { grid-template-columns: 1fr; text-align: center; }
  .live-poster { width: min(320px, 80%); margin: 0 auto; }
}
@media (max-width: 420px) {
  .cd li { min-width: 0; flex: 1; }
  .btn { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
