/* =========================================================================
 * UbuCon × MiniDebConf Korea 2026 - 행사장 아젠다 보드 (키오스크)
 * 형식: 시간축 기준 "전체 타임테이블" 한 화면 (4개 룸 열 + 시간비례 블록,
 *       오전/폐회 공통 세션은 전 열 스팬). 상단 로고 + 하단 후원사 상시 고정.
 * 색상: 포토월 시안 톤(따뜻한 코랄 그라데이션 · 크림 · 데비안 퍼플).
 * 대상: 65" 4K TV. 1920×1080 논리 캔버스를 app.js 가 scale-to-fit.
 * 플랫 CSS (네이티브 네스팅 / :has() 미사용 - 삼성 인터넷 호환)
 * ========================================================================= */

:root {
  --bg-a: #F3A469; --bg-b: #DD8463; --bg-c: #C0635A;
  --cream: #FEF7F0;
  --cream-dim: rgba(254, 247, 240, 0.75);
  --ubuntu: #E95420;
  --purple: #5E2750;
  --purple-deep: #3B1730;
  --card: #FEFAF5;
  --ink: #331021;
  --ink-dim: rgba(51, 16, 33, 0.55);
  --line: rgba(51, 16, 33, 0.12);
  --fade: 700ms;
  --font: "Ubuntu", "Noto Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif;
}

/* ---- 스케일 컨테이너 ---------------------------------------------------- */
#stage-viewport { position: fixed; inset: 0; transition: transform 4s ease-in-out; }
#stage {
  position: absolute; top: 0; left: 0;
  width: 1920px; height: 1080px;
  transform-origin: top left; overflow: hidden;
  color: var(--cream); font-family: var(--font);
  background:
    radial-gradient(1200px 560px at 90% 4%, rgba(255, 226, 190, 0.42), transparent 55%),
    linear-gradient(208deg, var(--bg-a) 0%, var(--bg-b) 46%, var(--bg-c) 100%);
  display: grid;
  grid-template-rows: 84px 1fr 86px;
  grid-template-areas: "top" "board" "sponsors";
  gap: 10px;
  padding: 12px 46px;
}
#stage::before {
  content: ""; position: absolute; inset: 0;
  background: url("../assets/decor.svg") center / cover no-repeat;
  pointer-events: none; z-index: 0;
}
.topbar, .board, .sponsors { position: relative; z-index: 1; }

/* ---- 상단 바 (행사 로고 상시 고정) ------------------------------------- */
.topbar { grid-area: top; display: flex; align-items: center; justify-content: space-between; }
.brand { display: flex; align-items: center; gap: 20px; min-width: 0; }
.brand__badge { height: 76px; width: auto; }
.brand__wordmark { height: 56px; width: auto; }
.topbar__meta { text-align: right; line-height: 1.1; }
.topbar__clock { font-size: 48px; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: 1px; color: var(--cream); }
.topbar__sec { font-size: 40px; font-weight: 700; color: var(--cream); margin-left: 4px; }
.topbar__info { font-size: 20px; color: var(--cream-dim); margin-top: 2px; }

/* ---- 아젠다 보드 -------------------------------------------------------- */
.board {
  grid-area: board;
  background: var(--card); border-radius: 22px;
  box-shadow: 0 20px 56px rgba(59, 23, 48, 0.30);
  color: var(--ink);
  display: flex; flex-direction: column; min-height: 0;
  padding: 10px 24px 12px;
}
.board__head { display: flex; align-items: center; justify-content: space-between; gap: 22px; margin-bottom: 8px; }
.board__title { font-size: 27px; font-weight: 700; color: var(--ink); white-space: nowrap; }
.board__title span { font-size: 17px; font-weight: 500; color: var(--ink-dim); margin-left: 12px; }
/* 트랙 색상 범례 (키노트·키사이닝 제외) */
.tt-legend { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px 15px; }
.tt-legend .lg { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 600; color: var(--ink-dim); white-space: nowrap; }
.tt-legend .lg i { width: 11px; height: 11px; border-radius: 3px; background: var(--tc); }
.qr-mini { display: flex; gap: 18px; }
.qr-mini__item { display: flex; align-items: center; gap: 9px; }
.qr-mini__item img { width: 48px; height: 48px; display: block; background: #fff; border-radius: 6px; }
.qr-mini__item b { font-size: 15px; font-weight: 700; color: var(--ink); }
.qr-mini__item span { display: block; font-size: 12px; color: var(--ink-dim); font-weight: 500; }

/* ---- 타임테이블 그리드 ------------------------------------------------- */
.tt { flex: 1; min-height: 0; overflow: hidden; }
.tt-grid { display: grid; column-gap: 8px; row-gap: 2px; align-content: start; width: 100%; transform-origin: top left; }
.tt__room {
  align-self: end; text-align: center;
  font-size: 18px; font-weight: 700; color: var(--ink);
  padding-bottom: 7px; border-bottom: 2px solid var(--line);
}
.tt__hour { align-self: start; text-align: right; padding-right: 8px; font-size: 12px; font-weight: 700; color: var(--ink-dim); font-variant-numeric: tabular-nums; }

.tt-block {
  border-radius: 8px; overflow: hidden; min-width: 0;
  padding: 4px 12px; box-sizing: border-box;
  display: flex; flex-direction: column; justify-content: center;
  background: var(--tc-soft, rgba(94,39,80,0.06));
  border-left: 4px solid var(--tc, #9b8);
}
.tt-block__time { font-size: 11px; font-weight: 700; color: var(--ubuntu); font-variant-numeric: tabular-nums; line-height: 1.2; }
.tt-block__body { margin-top: 1px; }
/* 제목(굵게)과 발표자(연하게)를 인라인으로 흐르게 → 마지막 줄 여백에 발표자 배치 */
.tt-block__title { font-size: 14px; font-weight: 600; color: var(--ink); line-height: 1.18; }
.tt-block__spk { font-size: 12px; font-weight: 500; color: var(--ink-dim); }
.tt-block.is-common .tt-block__title { font-size: 15px; }
.tt-block.is-common .tt-block__spk { font-size: 13px; }
.tt-block.is-break, .tt-block.is-info { background: rgba(51,16,33,0.04); border-left-color: rgba(51,16,33,0.16); }
.tt-block.is-break .tt-block__title, .tt-block.is-info .tt-block__title { font-weight: 400; color: var(--ink-dim); }
/* 15분 이하: 시간과 제목을 한 줄에 */
.tt-block--slim { display: flex; flex-direction: row; align-items: baseline; justify-content: flex-start; gap: 8px; }
.tt-block--slim .tt-block__time { flex: none; }
.tt-block--slim .tt-block__body { margin-top: 0; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* 트랙 색상 */
.trk-keynote  { --tc: #5E2750; --tc-soft: rgba(94,39,80,0.12); }
.trk-ai       { --tc: #E95420; --tc-soft: rgba(233,84,32,0.11); }
.trk-infra    { --tc: #2F6FB0; --tc-soft: rgba(47,111,176,0.11); }
.trk-else     { --tc: #C0635A; --tc-soft: rgba(192,99,90,0.13); }
.trk-desktop  { --tc: #3E8E5A; --tc-soft: rgba(62,142,90,0.11); }
.trk-workshop { --tc: #B8791F; --tc-soft: rgba(184,121,31,0.12); }
.trk-talk     { --tc: #D70A53; --tc-soft: rgba(215,10,83,0.10); }
.trk-keysign  { --tc: #6B7280; --tc-soft: rgba(107,114,128,0.11); }

/* 현재 진행 세션 하이라이트 + 현재시각 라인 */
.tt-block.is-now {
  border-color: var(--ubuntu) !important;
  border-left-color: var(--ubuntu) !important;
  box-shadow: 0 0 0 3px var(--ubuntu), 0 8px 20px rgba(233,84,32,0.30);
  z-index: 3;
}
.tt-block__now { display: none; }
.tt-block.is-now .tt-block__now { display: inline-block; margin-left: 6px; background: var(--ubuntu); color: #fff; font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 999px; vertical-align: middle; }

/* ---- 스팟라이트 (5분마다 30초: 현재세션 / 시작전 / 종료후) ------------- */
#spotlight {
  position: absolute; inset: 0; z-index: 6;
  background: var(--card); border-radius: 22px;
  padding: 32px 40px; opacity: 0; pointer-events: none;
  transition: opacity var(--fade) ease-in-out;
  display: flex; flex-direction: column; color: var(--ink);
}
#spotlight.is-on { opacity: 1; }
.spot__kicker { font-size: 24px; font-weight: 700; color: var(--ubuntu); letter-spacing: 1px; display: flex; align-items: center; gap: 12px; }
.spot__kicker .live-dot { width: 15px; height: 15px; border-radius: 50%; background: var(--ubuntu); }
.spot__cards { flex: 1; min-height: 0; display: grid; gap: 18px; margin-top: 22px; align-content: stretch; grid-auto-rows: minmax(0, 1fr); }
.spot-card { border-radius: 16px; padding: 20px 26px; background: var(--tc-soft, rgba(94,39,80,0.06)); border-left: 10px solid var(--tc, var(--purple)); overflow: hidden; display: flex; flex-direction: column; justify-content: center; }
.spot-card__room { font-size: 32px; font-weight: 700; color: var(--purple); }
.spot-card__time { font-size: 32px; font-weight: 700; color: var(--ubuntu); float: right; }
.spot-card__title { font-size: 56px; font-weight: 700; color: var(--ink); margin-top: 10px; line-height: 1.16; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.spot-card__spk { font-size: 30px; color: var(--ink-dim); margin-top: 10px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
/* 휴식·안내 카드 (진행 중 화면에서 누락 없이 무채색으로) */
.spot-card.is-rest { background: rgba(51,16,33,0.05); border-left-color: rgba(51,16,33,0.20); }
.spot-card.is-rest .spot-card__room { color: var(--ink-dim); }
.spot-card.is-rest .spot-card__title { color: var(--ink-dim); font-weight: 600; }
/* 3장 이상: 2열 그리드로, 크기 소폭 축소 */
.spot__cards--grid { gap: 16px 18px; }
.spot__cards--grid .spot-card { padding: 18px 26px; border-left-width: 8px; }
.spot__cards--grid .spot-card__room, .spot__cards--grid .spot-card__time { font-size: 27px; }
.spot__cards--grid .spot-card__title { font-size: 42px; margin-top: 8px; line-height: 1.14; }
.spot__cards--grid .spot-card__spk { font-size: 25px; margin-top: 8px; -webkit-line-clamp: 2; }

/* ---- 행사장 지도 슬라이드 ---------------------------------------------- */
#venuemap {
  position: absolute; inset: 0; z-index: 6;
  background: var(--card); border-radius: 22px;
  padding: 20px 32px 24px; opacity: 0; pointer-events: none;
  transition: opacity var(--fade) ease-in-out;
  display: flex; flex-direction: column;
}
#venuemap.is-on { opacity: 1; }
.venuemap__title { font-size: 27px; font-weight: 700; color: var(--ink); flex: none; }
.venuemap__title span { font-size: 17px; font-weight: 500; color: var(--ink-dim); margin-left: 12px; }
.venuemap__frame { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; margin-top: 10px; }
.venuemap__frame img { max-width: 100%; max-height: 100%; width: auto; height: auto; }

.spot--center { align-items: center; justify-content: center; text-align: center; gap: 12px; }
.spot__mascot { width: 168px; height: auto; margin-bottom: 6px; }
.spot__big { font-size: 60px; font-weight: 700; color: var(--ink); line-height: 1.12; }
.spot__sub { font-size: 28px; color: var(--ink-dim); }
.spot__accent { color: var(--ubuntu); }
.spot__chips { margin-top: 10px; font-size: 22px; color: var(--purple); font-weight: 700; letter-spacing: 0.5px; }

@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.4; } }

/* ---- 후원사 스트립 (상시 고정) - 등급 라벨 없이, 등급순 크기 축소 ------- */
.sponsors {
  grid-area: sponsors;
  background: var(--card); border-radius: 18px;
  box-shadow: 0 14px 38px rgba(59, 23, 48, 0.28);
  display: flex; align-items: center; gap: 30px;
  padding: 10px 34px; overflow: hidden;
}
.sponsors__label { font-size: 17px; font-weight: 700; color: var(--ink-dim); letter-spacing: 0.5px; white-space: nowrap; font-style: italic; }
.sp-row { flex: 1; display: flex; align-items: center; justify-content: center; gap: 46px; }
.sp-row img { width: auto; display: block; }
.sp-gold   { height: 68px; }
.sp-bronze { height: 40px; }
.sp-comm   { height: 44px; }
.sp-ph { display: flex; align-items: center; padding: 0 13px; border-radius: 8px; background: rgba(94,39,80,0.06); color: var(--ink); font-weight: 700; border: 1px dashed rgba(94,39,80,0.32); white-space: nowrap; }
.sp-ph.sp-comm { height: 34px; font-size: 15px; }

/* ---- 시작 오버레이 ------------------------------------------------------ */
#start-overlay {
  position: fixed; inset: 0; z-index: 1000;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 22px; text-align: center; cursor: pointer;
  background:
    radial-gradient(1200px 700px at 50% 26%, rgba(255, 226, 190, 0.35), transparent 60%),
    linear-gradient(208deg, var(--bg-a) 0%, var(--bg-b) 48%, var(--bg-c) 100%);
  color: var(--cream); font-family: var(--font); padding: 6vw;
}
#start-overlay[hidden] { display: none; }
.start__raccoon { width: clamp(120px, 15vw, 200px); height: auto; opacity: 0.95; animation: wave 2.6s ease-in-out infinite; transform-origin: 60% 82%; }
@keyframes wave { 0%,100% { transform: rotate(0deg); } 50% { transform: rotate(-4deg); } }
.start__logo { font-size: clamp(30px, 5.5vw, 64px); font-weight: 700; line-height: 1.15; }
.start__hint { font-size: clamp(15px, 2.2vw, 24px); color: var(--cream-dim); }
.start__cta { margin-top: 6px; background: var(--purple); color: var(--cream); font-size: clamp(19px, 2.8vw, 28px); font-weight: 700; padding: 15px 42px; border-radius: 16px; box-shadow: 0 8px 0 rgba(59, 23, 48, 0.35); animation: pulse 2s ease-in-out infinite; }

@media (prefers-reduced-motion: reduce) {
  .spot__kicker .live-dot, .start__cta, .start__raccoon { animation: none; }
  #stage-viewport { transition: none; }
}
[hidden] { display: none !important; }
