/* ===== 카페 대문 / 전체 일정 레이아웃 (기준 폭 850px) ===== */
.board { max-width: 850px; margin: 0 auto; padding: 22px 40px 44px; }
body.mode-home .board { padding-top: 32px; }

/* --- 상단 바 --- */
.topbar { display: flex; align-items: center; gap: 12px; height: 34px; position: relative; z-index: 1; }
.logo { display: inline-flex; align-items: center; flex: none; }
.logo img { width: 22px; height: 22px; display: block; }
.cafe-name { font-size: 16px; font-weight: 800; letter-spacing: -0.02em; }

/* --- 히어로 --- */
.hero { position: relative; height: 300px; margin-top: 10px; }
.hero-bg {
  position: absolute; inset: 0; border-radius: var(--radius-lg); overflow: hidden;
  background:
    radial-gradient(260px 260px at 78% 42%, rgba(255, 255, 255, .95), rgba(255, 255, 255, 0) 70%),
    radial-gradient(420px 220px at 15% 0%, rgba(255, 255, 255, .85), transparent 70%),
    linear-gradient(118deg, #f5faff 0%, #e3f1fd 42%, #c8e4fa 100%);
  box-shadow: var(--shadow); border: 1px solid rgba(255, 255, 255, .9);
}
.hero-bg::before { /* 은은한 줄무늬 광택 */
  content: ''; position: absolute; inset: 0;
  background: repeating-linear-gradient(115deg, rgba(255, 255, 255, .22) 0 2px, transparent 2px 9px);
  mask-image: linear-gradient(90deg, transparent 30%, #000 70%);
}
.spark { position: absolute; color: #fff; text-shadow: 0 0 10px rgba(89, 178, 236, .8); font-size: 14px; pointer-events: none; }
.spark.s1 { top: 34px; left: 52%; font-size: 18px; }
.spark.s2 { top: 120px; left: 61%; font-size: 11px; opacity: .8; }
.spark.s3 { top: 52px; right: 20px; font-size: 12px; }
.spark.s4 { top: 180px; left: 45%; font-size: 10px; opacity: .7; }

/* 방송 중: 치지직 방송 썸네일을 메인 구좌 배경으로 */
.hero-thumb { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero.has-thumb .hero-bg::before {
  mask-image: none; z-index: 1;
  background: linear-gradient(90deg, rgba(10, 22, 38, .82) 0%, rgba(10, 22, 38, .55) 38%, rgba(10, 22, 38, .05) 70%, transparent 100%);
}
.hero.has-thumb .spark { display: none; }
.hero.has-thumb .hero-title { color: #fff; text-shadow: 0 2px 12px rgba(0, 0, 0, .35); }
.hero.has-thumb .hero-sub { color: rgba(255, 255, 255, .9); }
.hero.has-thumb .chip-dark { background: var(--red); }
/* 방송 중: 메인 구좌 전체가 방송 링크 (글씨는 클릭을 통과) */
.hero-live-link {
  position: absolute; left: 0; right: 0; top: 0; bottom: 46px; z-index: 2;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0; cursor: pointer;
}
.hero-live-link[hidden] { display: none; }
.hero.is-live .hero-copy { pointer-events: none; }
.hero.has-thumb:has(.hero-live-link:hover) .hero-bg::before { opacity: .8; }
.hero-live-link:focus-visible { outline: 3px solid var(--sky); outline-offset: -3px; }
.hero-copy { position: absolute; left: 30px; top: 26px; right: 300px; z-index: 2; }
.chip-dark {
  display: inline-block; background: var(--navy); color: #fff; border-radius: 999px;
  padding: 3px 11px; font-size: 12px; font-weight: 700;
}
.hero-title { font-size: 34px; font-weight: 800; letter-spacing: -0.035em; margin-top: 12px; display: flex; align-items: center; gap: 12px; line-height: 1.15; }
.live-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--sky); flex: none; }
.hero.is-live .live-dot { background: var(--red); animation: pulse 1.6s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(229, 72, 77, .55); } 70% { box-shadow: 0 0 0 9px rgba(229, 72, 77, 0); } 100% { box-shadow: 0 0 0 0 rgba(229, 72, 77, 0); } }
.hero-sub { font-size: 14px; color: var(--ink-2); margin-top: 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* --- 공지 배너 (가로로 긴 구좌) --- */
.notice-slot { margin-top: 22px; }
.notice-bar {
  display: flex; align-items: center; gap: 14px; min-height: 64px; padding: 12px 16px 12px 14px;
  background: #fff; border: 1px solid var(--tile-line); border-radius: 16px; box-shadow: var(--shadow);
  transition: border-color .15s, transform .15s;
}
a.notice-bar:hover { border-color: var(--sky); transform: translateY(-1px); }
.nb-icon {
  width: 38px; height: 38px; flex: none; border-radius: 50%; background: var(--sky-soft); color: var(--sky-deep);
  display: grid; place-items: center; font-size: 19px;
}
img.nb-icon { border-radius: 11px; background: none; object-fit: cover; }
.nb-label { flex: none; display: flex; flex-direction: column; font-size: 13px; font-weight: 800; color: var(--navy); line-height: 1.25; min-width: 52px; }
.nb-label small { font-size: 11px; font-weight: 500; color: var(--ink-soft); }
.nb-text {
  flex: 1; min-width: 0; font-size: 14px; color: var(--ink); line-height: 1.45;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.nb-thumb { flex: none; width: 72px; height: 40px; border-radius: 8px; object-fit: cover; background: var(--tile); border: 1px solid var(--tile-line); }
.nb-go {
  flex: none; display: inline-flex; align-items: center; gap: 2px; font-size: 12px; font-weight: 700; color: var(--sky-deep);
  background: var(--sky-soft); border-radius: 999px; padding: 6px 10px 6px 12px;
}
a.notice-bar:hover .nb-go { background: var(--sky-deep); color: #fff; }
.notice-slot + .sec { margin-top: 28px; }

.hero-char {
  position: absolute; right: 34px; bottom: 26px; height: 342px; width: auto; z-index: 2;
  filter: drop-shadow(0 8px 18px rgba(22, 50, 82, .18));
  transform-origin: 50% 100%; transition: transform .25s ease, opacity .18s ease;
}
.hero-char-wrap:hover .hero-char { transform: rotate(-1.5deg) scale(1.015); }
.hero-char.wink { opacity: 0; }
.hero-char-wrap:hover .hero-char.wink, .hero-char-wrap:focus-within .hero-char.wink { opacity: 1; }
.hero-char-wrap:hover .hero-char.base, .hero-char-wrap:focus-within .hero-char.base { opacity: 0; }

.hero-bar {
  position: absolute; left: 0; right: 0; bottom: 0; height: 46px; background: #fff; z-index: 3;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  display: flex; justify-content: flex-end; align-items: center; gap: 4px; padding-right: 14px;
}
.hero-tab {
  position: absolute; left: 0; bottom: 0; width: 196px; height: 72px; background: #fff; z-index: 4;
  /* 탭이 바 위로 올라온 높이 26px = 둥근 모서리 16px + 아래 오목 곡선 10px (둘 다 정원 → 끊김 없이 둥글게) */
  border-radius: 0 16px 0 var(--radius-lg); padding: 10px 0 0 30px;
}
.hero-tab::after { /* 탭과 하단 바 사이 오목한 곡선 (아래로 1px 겹쳐 이음새 방지) */
  content: ''; position: absolute; left: calc(100% - 1px); bottom: 45px; width: 11px; height: 11px;
  background: radial-gradient(circle 10px at 100% 0, transparent calc(100% - .8px), #fff 100%);
}
.live-pill {
  display: inline-flex; align-items: center; gap: 4px; border: 1.5px solid #b9c7d4; color: #8ea0b2;
  border-radius: 999px; padding: 0 8px; font-size: 11px; font-weight: 800; letter-spacing: .02em; height: 19px;
}
.live-pill::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.hero.is-live .live-pill { border-color: var(--red); color: var(--red); }
.streamer { font-size: 20px; font-weight: 800; margin-top: 2px; line-height: 1.25; letter-spacing: -0.03em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-right: 20px; }
.hero-btn {
  display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 14px; border-radius: 999px;
  font-size: 13px; font-weight: 600; color: var(--ink-2);
}
.hero-btn:hover { background: var(--tile); }
.hero-btn.primary { background: var(--navy); color: #fff; }
.hero-btn.primary:hover { background: var(--sky-deep); }
.hero-btn .ico { font-size: 15px; }
.btn-logo { width: 18px; height: 18px; border-radius: 5px; flex: none; margin-left: -4px; }

/* --- 섹션 헤더 --- */
.sec { margin-top: 34px; }
.sec-head { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; min-height: 34px; }
.sec-head h2 { font-size: 16px; letter-spacing: -0.03em; flex: none; }
.sec-line { flex: 1; height: 1px; background: var(--line); }
.sec-reset { font-size: 12px; color: var(--ink-soft); padding: 4px 2px; }
.sec-reset:hover:not(:disabled) { color: var(--sky-deep); }
.sec-reset:disabled { cursor: default; }
.pager {
  display: flex; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: 999px;
  height: 34px; padding: 0 4px;
}
.pager button { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; color: var(--ink-2); font-size: 13px; }
.pager button:hover { background: var(--tile); }
.pager-label { font-size: 13px; min-width: 104px; text-align: center; font-variant-numeric: tabular-nums; }

/* --- 주간 일정 --- */
.week-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 9px; }
.wk {
  height: 408px; background: var(--tile); border: 1px solid var(--tile-line); border-radius: var(--radius);
  padding: 13px 10px 12px; display: flex; flex-direction: column; cursor: pointer; text-align: left; min-width: 0;
  transition: background .15s, transform .15s;
}
.wk:hover { background: #fff; transform: translateY(-2px); }
.wk:focus-visible { outline: 3px solid var(--sky); outline-offset: 2px; }
.wk.is-today { background: #fff; border: 2px solid var(--navy); padding: 12px 9px 11px; }
.wk-head { display: flex; justify-content: space-between; align-items: center; }
.wk-dow { font-size: 12px; color: var(--ink-2); }
.badge-today { background: var(--navy); color: #fff; font-size: 11px; font-weight: 700; padding: 1px 8px; border-radius: 999px; }
.wk-num { font-size: 24px; font-weight: 500; margin-top: 4px; line-height: 1.2; }
.wk.holiday .wk-num { color: var(--holiday); }
.wk-hname { font-size: 11px; color: var(--holiday); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wk-time { font-size: 12px; color: var(--ink-2); margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wk-list { display: flex; flex-direction: column; gap: 9px; margin-top: 12px; min-height: 0; }
.wk-game { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.wk-thumb-wrap { position: relative; display: block; }
.wk-steam { position: absolute; right: 3px; bottom: 3px; width: 15px; height: 15px; border-radius: 50%; box-shadow: 0 0 0 1.5px #fff; }
a.wk-game.is-steam:hover .wk-title { color: var(--sky-deep); text-decoration: underline; }
a.wk-game.is-steam:hover .wk-thumb { box-shadow: 0 0 0 2px var(--sky); }
.wk-thumb { width: 100%; height: 40px; border-radius: 6px; object-fit: cover; background: #dbe8f3; }
.wk-thumb.ph { display: grid; place-items: center; color: #fff; font-size: 16px; background: linear-gradient(135deg, #a9d6f5, #6fb7ea); }
.wk-title { font-size: 12px; line-height: 1.35; color: var(--ink); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.wk-more { margin-top: 2px; background: #e6eef6; color: var(--ink); font-size: 11px; font-weight: 700; padding: 5px 0; border-radius: 6px; text-align: center; }
.wk-tag { margin-top: auto; padding-top: 8px; font-size: 11px; color: var(--ink-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wk-center { margin: auto 0; text-align: center; color: var(--ink-soft); font-size: 12px; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.wk-center .ico { font-size: 18px; color: #a2b3c3; }
/* 휴방: 옅은 핑크 */
.wk.is-off { background: #ffeef5; border-color: #fbd5e5; }
.wk.is-off .wk-center { color: #e0679a; font-size: 15px; font-weight: 800; }
.wk.is-off .wk-center .ico { color: #f0a3c3; width: 22px; height: 22px; }

/* --- 예정 게임 --- */
.upcoming {
  min-height: 186px; background: rgba(255, 255, 255, .6); border: 1px solid var(--tile-line); border-radius: 16px;
  padding: 16px; display: flex; align-items: stretch;
}
.upcoming > .empty { margin: auto; padding: 0; }
.up-row { display: flex; gap: 12px; overflow-x: auto; width: 100%; padding-bottom: 4px; scrollbar-width: thin; scrollbar-color: #c4d8e8 transparent; }
.up-card {
  flex: none; width: 176px; background: #fff; border: 1px solid var(--tile-line); border-radius: 12px; overflow: hidden;
  display: flex; flex-direction: column; cursor: pointer; transition: transform .15s;
}
.up-card:hover { transform: translateY(-2px); }
.up-cover { position: relative; aspect-ratio: 16 / 9; background: linear-gradient(135deg, #a9d6f5, #6fb7ea); display: grid; place-items: center; color: #fff; font-size: 24px; }
.up-cover > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.up-dday { position: absolute; top: 7px; left: 7px; background: var(--navy); color: #fff; font-size: 11px; font-weight: 800; padding: 1px 8px; border-radius: 999px; z-index: 1; }
.up-steam {
  position: absolute; left: 7px; bottom: 7px; z-index: 1; display: inline-flex; align-items: center; gap: 4px;
  background: rgba(23, 26, 33, .85); color: #fff; font-size: 10px; font-weight: 700; padding: 2px 8px 2px 3px; border-radius: 999px;
}
.up-steam img, .steam-logo { width: 16px; height: 16px; border-radius: 50%; flex: none; }
.up-body { padding: 9px 11px 11px; display: flex; flex-direction: column; gap: 3px; }
.up-kind { font-size: 11px; color: var(--sky-deep); font-weight: 700; }
.up-title { font-size: 13px; font-weight: 700; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.up-date { font-size: 11px; color: var(--ink-soft); }

/* --- 월간 달력 --- */
.month-dows, .month-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 9px; }
.month-dows { margin-bottom: 8px; }
.month-dows span { font-size: 12px; color: var(--ink-2); padding-left: 10px; }
.month-grid { row-gap: 9px; }
.mc {
  height: 102px; background: var(--tile); border: 1px solid var(--tile-line); border-radius: 10px; padding: 8px 9px;
  display: flex; flex-direction: column; gap: 1px; overflow: hidden; cursor: pointer; min-width: 0; text-align: left;
}
.mc:hover { background: #fff; }
.mc:focus-visible { outline: 3px solid var(--sky); outline-offset: 2px; }
.mc-top { display: flex; align-items: center; gap: 5px; min-width: 0; }
.mc-num { font-size: 14px; font-weight: 700; line-height: 1.3; }
.mc.other .mc-num { font-weight: 400; color: var(--ink-2); }
.mc.holiday .mc-num { color: var(--holiday); }
.mc-hname { font-size: 11px; color: var(--holiday); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mc-line { font-size: 11px; color: var(--ink-2); line-height: 1.38; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mc { position: relative; }
/* 메인 일정 1개 (최대 2줄) + 아래쪽: 왼쪽 +N, 오른쪽 시작 시간 */
.mc-main {
  margin-top: 5px; flex-shrink: 0; font-size: 13px; font-weight: 700; color: var(--ink); line-height: 1.32;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; word-break: keep-all;
}
.mc-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 4px; }
.mc-foot .mc-more {
  font-size: 11px; font-weight: 800; color: var(--sky-deep); background: var(--sky-soft);
  padding: 1px 7px; border-radius: 999px; line-height: 1.5;
}
.mc-time { font-size: 11.5px; font-weight: 700; color: var(--ink-soft); white-space: nowrap; }
.mc.other .mc-main { color: var(--ink-soft); font-weight: 600; }
/* 휴방: 칸 정가운데 */
.mc-off {
  position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none;
  font-size: 16px; font-weight: 800; color: #e0679a;
}
.mc.is-off { background: #ffeef5; border-color: #fbd5e5; }
.mc.is-off.other { background: #fff5f9; }
.mc.is-off.other .mc-off { opacity: .6; }
.mc-more { font-size: 11px; color: var(--ink-soft); }
.mc.is-today { background: #fff; border: 2px solid var(--navy); padding: 7px 8px; }
.mc.is-today .mc-num {
  background: var(--navy); color: #fff; width: 22px; height: 22px; border-radius: 50%;
  display: grid; place-items: center; font-size: 12px; margin-left: -2px;
}
.mc-todaytxt { font-size: 11px; font-weight: 800; }

/* --- 추천 영상 --- */
.vids {
  background: #fff; border-radius: 18px; padding: 14px; box-shadow: var(--shadow);
  display: grid; grid-template-columns: minmax(0, 1.04fr) minmax(0, 1fr); gap: 18px; height: 312px;
}
.vid-main { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.vid-player { position: relative; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; background: #0d1b2a; }
.vid-player img { width: 100%; height: 100%; object-fit: cover; }
.vid-player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.vid-play {
  position: absolute; left: 12px; bottom: 12px; display: inline-flex; align-items: center; gap: 6px;
  background: rgba(13, 27, 42, .82); color: #fff; font-size: 13px; font-weight: 700; padding: 6px 13px; border-radius: 8px;
}
.vid-player:hover .vid-play { background: var(--sky-deep); }
.vid-main-title { font-size: 14px; font-weight: 800; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.vid-main-title:hover { color: var(--sky-deep); }
.vid-side { display: flex; flex-direction: column; min-height: 0; }
.vid-side-label { font-size: 12px; font-weight: 700; color: var(--ink-2); margin: 2px 0 8px; }
.vid-list { display: flex; flex-direction: column; gap: 6px; overflow-y: auto; min-height: 0; padding-right: 4px; scrollbar-width: thin; scrollbar-color: #c4d8e8 transparent; }
.vid-item { display: flex; gap: 10px; align-items: center; padding: 5px; border-radius: 10px; border: 1px solid transparent; text-align: left; width: 100%; }
.vid-item:hover { background: var(--tile); }
.vid-item.active { background: #eef4fa; border-color: var(--line); }
.vid-item img { width: 82px; height: 46px; border-radius: 6px; object-fit: cover; flex: none; background: #dbe8f3; }
.vid-item span { font-size: 13px; line-height: 1.35; font-weight: 600; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.vids-empty {
  height: 312px; background: rgba(255, 255, 255, .6); border: 1px solid var(--tile-line); border-radius: 18px;
  display: grid; place-items: center;
}
.footer { text-align: center; color: var(--ink-soft); font-size: 12px; margin-top: 30px; }

/* 높이 고정 모드 (?h=2200) */
html.fixed-height, html.fixed-height body { height: var(--fixed-h); overflow: hidden; }

/* --- 반응형 --- */
@media (max-width: 760px) {
  .board { padding: 16px 14px 32px; }
  html.fixed-height, html.fixed-height body { height: auto; overflow: auto; }
  .hero { height: 270px; }
  .hero-copy { right: 150px; left: 20px; }
  .hero-title { font-size: 24px; }
  .hero-char { height: 270px; right: 6px; }
  .hero-tab { width: 150px; padding-left: 20px; }
  .hero-btn .txt { display: none; }
  .nb-label { display: none; }
  .nb-go { display: none; }
  .hero-btn.primary .txt { display: inline; }
  .week-grid { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 40%; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 6px; }
  .wk { scroll-snap-align: start; height: 360px; }
  .month-dows, .month-grid { gap: 4px; }
  .mc { height: 64px; padding: 5px; }
  .mc-line, .mc-main, .mc-foot, .mc-more, .mc-hname { display: none; }
  .mc-off { font-size: 12px; padding-top: 14px; }
  .mc.is-off::after { display: none; }
  .mc.has-events::after { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--sky); margin-top: 4px; }
  .vids { grid-template-columns: minmax(0, 1fr); height: auto; }
  .vid-list { max-height: 260px; }
  .pager-label { min-width: 84px; }
}
