/* Custom styles for calendar layout and thumbnails */

.cell-body {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center; /* Revert to center for natural height */
    flex: 1;
}

.cell-tags-col {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.cell-thumb-yt {
    align-self: flex-end;
}

/* Remove .tag { flex: 1; } so they don't stretch vertically like empty boxes */

.cell-tags-col.items-1 .title-wrap {
    white-space: normal !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 3 !important; /* Max 3 lines so it still looks like a tag */
    -webkit-box-orient: vertical;
    word-break: keep-all;
}

.cell-tags-col.items-2 .title-wrap {
    white-space: normal !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical;
    word-break: keep-all;
}

.cell-tags-col.items-3 .title-wrap {
    white-space: normal !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical;
    word-break: keep-all;
}

.cell-tags-col.items-4 .title-wrap {
    white-space: nowrap !important; /* 4 items -> single line */
    text-overflow: ellipsis;
}

.cell-thumb-yt {
    flex-shrink: 0;
    width: clamp(36px, 30%, 56px);
    aspect-ratio: 1; height: auto;
    align-self: center;
    margin-left: 6px;
    border: 2px solid var(--border-strong);
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    display: block;
}

.cell-thumb-yt img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cell-thumb-yt .yt-play-icon {
    display: flex;
    position: absolute;
    right: 2px;
    bottom: 2px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--neon-red);
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 0 1px var(--bg-main);
}

.cell-thumb-yt .yt-play-icon::after {
    content: '';
    display: block;
    margin-left: 1px;
    border-style: solid;
    border-width: 3px 0 3px 5px;
    border-color: transparent transparent transparent #fff;
}

.cell-thumb-yt:hover {
    border-color: var(--neon-cyan);
}

/* 좁은 달력에서는 감추고 모바일 리스트의 전용 썸네일을 사용합니다. */
@media (max-width: 1050px) {
    .cell-thumb-yt {
        display: none !important;
    }
}

/* 노트북/일반 데스크톱의 세로로 여유 있는 달력:
   일정은 위쪽, 다시보기는 칸 하단의 16:5 가로 썸네일로 고정합니다. */
@media (min-width: 1051px) and (max-width: 1599px) and (min-height: 700px) {
  .cell-body {
    flex-direction: column;
    align-items: stretch;
  }
  .cell-tags-col {
    width: 100%;
    justify-content: center;
  }
  .cell-thumb-yt {
    display: block !important;
    width: 100%;
    height: clamp(30px, 5vh, 44px);
    aspect-ratio: auto;
    align-self: stretch;
    margin: auto 0 0;
    border-radius: 3px;
  }
  .cell-thumb-yt img {
    object-fit: cover;
    object-position: center;
  }
}

/* Final time/title composition: the icon may sit at the left edge, but the
   time and schedule name must always be one inline reading group. */
#scheduleGridSection .tag.has-time {
  display: flex !important;
  position: relative !important;
  align-items: center !important;
  justify-content: center !important;
  padding-left: 18px !important;
  padding-right: 5px !important;
  overflow: hidden !important;
}

#scheduleGridSection .tag.has-time .tag-icon {
  position: absolute !important;
  left: 5px !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  margin: 0 !important;
}

#scheduleGridSection .tag.has-time .title-wrap {
  display: block !important;
  flex: 0 1 auto !important;
  width: auto !important;
  max-width: 100% !important;
  min-width: 0 !important;
  overflow: visible !important;
  white-space: normal !important;
  text-overflow: clip !important;
  text-align: center !important;
  line-height: 1.12 !important;
}

#scheduleGridSection .tag.has-time .t-time {
  display: inline !important;
  grid-column: auto !important;
  grid-row: auto !important;
  flex: none !important;
  margin: 0 3px 0 0 !important;
  white-space: nowrap !important;
}

#scheduleGridSection .tag.has-time .tag-title {
  display: inline !important;
  flex: none !important;
  width: auto !important;
  max-width: 100% !important;
  overflow: visible !important;
  white-space: normal !important;
  text-overflow: clip !important;
  overflow-wrap: anywhere !important;
  word-break: keep-all !important;
  text-align: center !important;
}

/* Re-apply the narrow fallback after the inline-group rule. */
@media (max-width: 1050px) {
  #scheduleGridSection .cell-tags-col .tag .tag-icon,
  #scheduleGridSection .cell-tags-col .tag .tag-abbr,
  #scheduleGridSection .cell-tags-col .tag .t-time {
    display: none !important;
  }

  #scheduleGridSection .cell-tags-col .tag.has-time {
    padding-left: 5px !important;
  }

  #scheduleGridSection .cell-tags-col .tag.has-time .title-wrap {
    width: 100% !important;
    flex: 1 1 auto !important;
  }
}

/* 다시보기 출처를 눈으로 확인할 수 있게 해 우선순위 오동작을 빠르게 발견합니다. */
.cell-thumb-yt::before,
.timeline-yt::before {
  content: attr(data-source-label);
  position: absolute;
  right: 3px;
  bottom: 3px;
  z-index: 2;
  padding: 2px 4px;
  border: 1px solid rgba(255,255,255,.7);
  background: rgba(0,0,0,.78);
  color: #fff;
  font: 700 8px/1 'Paperozi', sans-serif;
  letter-spacing: .02em;
}
.cell-thumb-yt[data-source='chzzk']::before,
.timeline-yt[data-source='chzzk']::before { background: rgba(0,130,86,.92); }
.cell-thumb-yt[data-source='youtube']::before,
.timeline-yt[data-source='youtube']::before { background: rgba(190,0,35,.92); }
.cell-thumb-yt .yt-play-icon,
.timeline-yt .yt-play-icon { right:auto !important; left:2px; }
.timeline-yt::after { right:auto !important; left:4px; }

/* 리스트 화면의 빈 날짜 표시 토글 */
.list-tools {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  min-height: 30px;
  margin: 0 0 6px;
}
.empty-filter-btn {
  border: 1px solid var(--border-strong);
  background: var(--bg-panel);
  color: var(--text-dim);
  padding: 5px 9px;
  cursor: pointer;
  font: 700 10px/1.2 'Paperozi', sans-serif;
}
.empty-filter-btn[aria-pressed='true'] {
  border-color: var(--neon-cyan);
  color: var(--neon-cyan);
}


@media(min-width: 1600px) {
  .cell-thumb-yt { width: clamp(50px, 30%, 70px); aspect-ratio: 1; height: auto; margin-left: 8px; border-radius: 12px; }
  .cell-thumb-yt .yt-play-icon { width: 20px; height: 20px; }
  .cell-thumb-yt .yt-play-icon::after { border-width: 4px 0 4px 6px; }
}

@media(min-width: 2400px) {
  .cell-thumb-yt { width: clamp(60px, 30%, 90px); aspect-ratio: 1; height: auto; margin-left: 12px; border-radius: 14px; }
  .cell-thumb-yt .yt-play-icon { width: 24px; height: 24px; }
  .cell-thumb-yt .yt-play-icon::after { border-width: 5px 0 5px 7px; }
}

/* --------------------------------------------------------------------------
   New Schedule skin
   Rounded pastel cards inspired by the reference schedule.  The existing
   calendar/list JavaScript stays unchanged; this layer only improves layout,
   hierarchy, and responsive behavior.
   -------------------------------------------------------------------------- */
:root[data-theme='light'] {
  --bg-main: #f7f5fb;
  --bg-panel: #ffffff;
  --bg-panel-solid: #ffffff;
  --bg-cell: #ffffff;
  --bg-cell-hover: #f3effc;
  --text-primary: #3d3650;
  --text-main: #3d3650;
  --text-dim: #817895;
  --border: #e7e0f2;
  --border-strong: #cfc4e5;
  --neon-cyan: #7867d8;
  --neon-magenta: #cc78a0;
  --neon-amber: #d39a52;
  --neon-lime: #65a88a;
  --neon-violet: #8a73c9;
  --neon-red: #d66c89;
  --bg-body: #f7f5fb;
}

:root:not([data-theme='light']) {
  --bg-main: #17151d;
  --bg-panel: #23202d;
  --bg-panel-solid: #23202d;
  --bg-cell: #252231;
  --bg-cell-hover: #302b40;
  --text-primary: #f3effa;
  --text-main: #f3effa;
  --text-dim: #aba2bd;
  --border: #41394f;
  --border-strong: #5b4f70;
  --neon-cyan: #a99bff;
  --neon-magenta: #ee9abd;
  --neon-amber: #f0bc78;
  --neon-lime: #83d0a9;
  --neon-violet: #c2a7ff;
  --neon-red: #ff8faa;
  --bg-body: #17151d;
}

html,
body {
  background: var(--bg-main) !important;
}

body {
  padding: 0 12px 104px !important;
  font-size: 14px;
  letter-spacing: -0.01em;
}

body::after {
  display: none !important;
}

.wrap {
  width: min(100%, 1440px) !important;
  padding: 16px 0 28px !important;
}

.top-sticky {
  position: sticky !important;
  top: 0 !important;
  z-index: 50 !important;
  padding: 10px 0 16px !important;
  margin: 0 0 14px !important;
  background: color-mix(in srgb, var(--bg-main) 90%, transparent) !important;
  border-bottom: 0 !important;
  backdrop-filter: blur(14px);
}

.top-sticky::after {
  height: 0 !important;
}

.header {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto auto !important;
  align-items: center !important;
  gap: 18px !important;
  margin: 0 0 12px !important;
  padding: 14px 16px !important;
  border: 1px solid var(--border) !important;
  border-radius: 22px !important;
  background: var(--bg-panel) !important;
  box-shadow: 0 10px 30px rgba(70, 52, 110, .08) !important;
}

/* Keep the live state inside the header instead of consuming a full row. */
.live-banner {
  position: relative !important;
  width: 194px !important;
  min-width: 0 !important;
  height: 62px !important;
  min-height: 62px !important;
  display: none !important;
  padding: 0 !important;
  border: 1px solid color-mix(in srgb, #00ffa3 65%, var(--border)) !important;
  border-radius: 14px !important;
  background: #101817 !important;
  box-shadow: 0 10px 24px rgba(0, 0, 0, .2) !important;
  overflow: hidden !important;
  text-decoration: none !important;
  box-sizing: border-box !important;
  transition: transform .16s ease, border-color .16s ease !important;
}

.live-banner.show {
  display: block !important;
}

.live-banner:hover {
  border-color: #00ffa3 !important;
  transform: translateY(-1px) !important;
}

.live-banner .lb-copy {
  display: flex !important;
  position: absolute !important;
  inset: auto 0 0 0 !important;
  z-index: 2 !important;
  align-items: center !important;
  gap: 5px !important;
  padding: 19px 8px 6px !important;
  color: #fff !important;
  background: linear-gradient(transparent, rgba(3, 10, 9, .92)) !important;
  font: 800 10px/1.1 'Paperozi', sans-serif !important;
  white-space: nowrap !important;
  pointer-events: none !important;
}

.live-banner .lb-copy > span {
  display: flex !important;
  align-items: center !important;
  gap: 4px !important;
  margin: 0 !important;
  color: #75ffbd !important;
  font-size: inherit !important;
}

.live-banner .lb-dot {
  display: inline-block !important;
  width: 6px !important;
  height: 6px !important;
  border-radius: 50% !important;
  background: #00e693 !important;
  animation: pulse 1.2s infinite !important;
}

.live-banner img {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  border: 0 !important;
  border-radius: inherit !important;
  object-fit: cover !important;
}

@media (max-width: 900px) {
  body.is-live-now .video-cards {
    display: none !important;
  }
}

.header-left {
  overflow: visible !important;
}

.brand {
  gap: 7px !important;
}

.dot {
  width: 8px !important;
  height: 8px !important;
  border-radius: 50% !important;
  background: var(--neon-magenta) !important;
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--neon-magenta) 14%, transparent) !important;
}

.brand-text {
  color: var(--neon-magenta) !important;
  font-size: 11px !important;
  letter-spacing: .12em !important;
}

h1 {
  margin-top: 6px !important;
  color: var(--text-primary) !important;
  font-size: clamp(22px, 3vw, 34px) !important;
  letter-spacing: -.04em !important;
  white-space: nowrap !important;
}

h1 span {
  color: var(--neon-cyan) !important;
  text-shadow: none !important;
}

.nav {
  gap: 5px !important;
}

.nav button,
.theme-toggle-inline,
.view-toggle,
.nav .today-btn {
  height: 34px !important;
  border-color: var(--border) !important;
  border-radius: 11px !important;
  background: var(--bg-panel) !important;
  color: var(--text-primary) !important;
}

.nav button,
.theme-toggle-inline {
  width: 34px !important;
}

.nav .today-btn {
  width: auto !important;
  padding: 0 10px !important;
  font-weight: 700 !important;
}

.view-toggle {
  border: 1px solid var(--border) !important;
  overflow: hidden !important;
}

.view-toggle button {
  color: var(--text-dim) !important;
  background: transparent !important;
}

.view-toggle button.active {
  background: var(--neon-cyan) !important;
  color: #fff !important;
}

.month-label {
  min-width: 104px !important;
  margin: 0 2px !important;
  color: var(--text-primary) !important;
  font-size: 16px !important;
  font-weight: 800 !important;
}

.nav button:hover,
.nav .today-btn:hover,
.theme-toggle-inline:hover {
  border-color: var(--neon-cyan) !important;
  color: var(--neon-cyan) !important;
  transform: translateY(-1px);
}

.video-cards {
  width: min(100%, 1050px) !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 10px !important;
  margin: 0 auto !important;
}

.video-card {
  border: 1px solid var(--border) !important;
  border-radius: 16px !important;
  background: var(--bg-panel) !important;
  box-shadow: 0 8px 22px rgba(70, 52, 110, .07) !important;
}

.video-card:hover {
  border-color: var(--neon-cyan) !important;
  transform: translateY(-2px);
}

.video-card .vc-thumb {
  background: var(--bg-cell-hover) !important;
}

.video-card .vc-title {
  padding: 9px 10px !important;
  color: var(--text-primary) !important;
  font-size: 11px !important;
}

/* Tablet and narrow desktop widths cannot fit title, live card, and controls
   on one row. Reserve the first row for title/live and put controls below. */
@media (max-width: 900px) {
  .header {
    grid-template-columns: minmax(0, 1fr) auto !important;
    grid-template-areas:
      'title live'
      'nav nav' !important;
    position: relative !important;
    gap: 10px !important;
  }

  .header-left {
    grid-area: title !important;
    width: auto !important;
    max-width: none !important;
  }

  .live-banner {
    grid-area: live !important;
    position: relative !important;
    left: auto !important;
    top: auto !important;
    right: auto !important;
    width: 194px !important;
    align-self: center !important;
  }

  .nav {
    grid-area: nav !important;
    width: 100% !important;
    justify-content: flex-end !important;
    padding-top: 9px !important;
    border-top: 1px solid var(--border) !important;
    box-sizing: border-box !important;
  }
}

.weekdays {
  gap: 8px !important;
  margin-bottom: 8px !important;
  padding: 0 4px !important;
}

.weekdays div {
  padding: 5px 0 !important;
  border-radius: 10px !important;
  color: var(--text-dim) !important;
  font-size: 12px !important;
  font-weight: 800 !important;
  letter-spacing: 0 !important;
}

.weekdays div:first-child {
  color: var(--neon-magenta) !important;
  background: color-mix(in srgb, var(--neon-magenta) 10%, transparent) !important;
}

.weekdays div:last-child {
  color: var(--neon-cyan) !important;
  background: color-mix(in srgb, var(--neon-cyan) 10%, transparent) !important;
}

.grid {
  grid-template-columns: repeat(7, minmax(0, 1fr)) !important;
  grid-auto-rows: minmax(112px, auto) !important;
  gap: 8px !important;
  flex: none !important;
}

.cell {
  min-height: 112px !important;
  padding: 9px !important;
  gap: 7px !important;
  border: 1px solid var(--border) !important;
  border-radius: 16px !important;
  background: var(--bg-cell) !important;
  box-shadow: 0 5px 14px rgba(70, 52, 110, .05) !important;
}

.cell.empty {
  background: color-mix(in srgb, var(--bg-cell) 34%, transparent) !important;
  border-color: transparent !important;
  box-shadow: none !important;
}

.cell:not(.empty):hover {
  border-color: var(--border-strong) !important;
  background: var(--bg-cell-hover) !important;
  box-shadow: 0 8px 18px rgba(70, 52, 110, .1) !important;
  transform: translateY(-2px) !important;
}

.cell.today {
  border: 2px solid var(--neon-magenta) !important;
  background: color-mix(in srgb, var(--neon-magenta) 6%, var(--bg-cell)) !important;
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--neon-magenta) 12%, transparent) !important;
}

.date-num {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  min-height: 22px !important;
  padding: 0 2px !important;
  color: var(--text-dim) !important;
  font-size: 14px !important;
  font-weight: 800 !important;
}

.cell.today .date-num {
  color: var(--neon-magenta) !important;
}

.tags {
  gap: 6px !important;
}

.tag {
  min-height: 28px !important;
  padding: 5px 8px !important;
  border: 1px solid var(--tag-color, var(--border-strong)) !important;
  border-left-width: 4px !important;
  border-radius: 10px !important;
  background: color-mix(in srgb, var(--tag-color, var(--neon-cyan)) 12%, var(--bg-cell)) !important;
  color: var(--text-primary) !important;
  opacity: 1 !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  line-height: 1.25 !important;
}

.tag .tag-icon,
.tag .tag-abbr {
  color: var(--tag-color) !important;
}

.tag .t-time {
  color: var(--tag-color) !important;
  opacity: .9 !important;
  font-size: 10px !important;
  font-weight: 800 !important;
}

.cell-body {
  flex: 0 0 auto !important;
  min-height: 0 !important;
  flex-direction: row !important;
  align-items: center !important;
}

.cell-tags-col {
  justify-content: flex-start !important;
}

.cell-thumb-yt {
  width: 44px !important;
  height: 44px !important;
  aspect-ratio: 1 !important;
  margin-left: 7px !important;
  border: 2px solid var(--border-strong) !important;
  border-radius: 12px !important;
}

.cell-thumb-yt .yt-play-icon {
  width: 17px !important;
  height: 17px !important;
  right: 2px !important;
  bottom: 2px !important;
  left: auto !important;
}

.cell-thumb-yt::before,
.timeline-yt::before {
  border: 0 !important;
  border-radius: 5px !important;
  right: 3px !important;
  bottom: 3px !important;
  padding: 2px 4px !important;
  font-size: 8px !important;
}

.timeline-item {
  display: grid !important;
  grid-template-columns: 64px minmax(0, 1fr) auto !important;
  align-items: center !important;
  gap: 12px !important;
  min-height: 86px !important;
  padding: 12px !important;
  border: 1px solid var(--border) !important;
  border-radius: 16px !important;
  background: var(--bg-panel) !important;
  box-shadow: 0 6px 18px rgba(70, 52, 110, .06) !important;
}

.timeline-item:hover {
  background: var(--bg-cell-hover) !important;
  border-color: var(--border-strong) !important;
}

.timeline-item.is-today {
  margin: 0 !important;
  padding: 11px !important;
  border: 2px solid var(--neon-magenta) !important;
  border-radius: 16px !important;
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--neon-magenta) 12%, transparent) !important;
}

.timeline-date {
  width: auto !important;
  padding: 4px 8px 4px 0 !important;
  border-right: 1px solid var(--border) !important;
}

.timeline-date .m-d {
  color: var(--text-primary) !important;
  font-size: 15px !important;
  font-weight: 800 !important;
}

.timeline-date .dow {
  margin-top: 3px !important;
  color: var(--text-dim) !important;
  font-size: 11px !important;
  font-weight: 700 !important;
}

.timeline-date .today-mark {
  display: inline-block !important;
  margin-top: 5px !important;
  padding: 3px 5px !important;
  border-radius: 6px !important;
  background: var(--neon-magenta) !important;
  color: #fff !important;
  font-size: 8px !important;
  line-height: 1 !important;
}

.timeline-content {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  align-content: center !important;
  gap: 6px !important;
  min-width: 0 !important;
  max-height: none !important;
  padding: 0 !important;
  overflow: visible !important;
}

.schedule-tag {
  width: auto !important;
  max-width: 100% !important;
  min-height: 30px !important;
  padding: 6px 9px !important;
  border-width: 1px !important;
  border-style: solid !important;
  border-color: var(--schedule-color, var(--border-strong)) !important;
  border-radius: 10px !important;
  background: color-mix(in srgb, var(--schedule-color, var(--neon-cyan)) 12%, var(--bg-cell)) !important;
  color: var(--text-primary) !important;
  font-size: 12px !important;
  line-height: 1.3 !important;
  white-space: normal !important;
}

.schedule-tag .marquee-text {
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

.timeline-yt,
.timeline-yt-empty {
  width: 122px !important;
  height: 69px !important;
  border: 1px solid var(--border-strong) !important;
  border-radius: 12px !important;
  background: var(--bg-cell-hover) !important;
}

.timeline-yt-empty {
  gap: 3px !important;
  padding: 5px !important;
  font-size: 9px !important;
}

.timeline-yt-empty .yt-icon {
  font-size: 16px !important;
}

.list-tools {
  min-height: 34px !important;
  margin-bottom: 8px !important;
}

.empty-filter-btn {
  padding: 7px 11px !important;
  border: 1px solid var(--border) !important;
  border-radius: 999px !important;
  background: var(--bg-panel) !important;
  color: var(--text-dim) !important;
  font-size: 11px !important;
  font-weight: 800 !important;
}

.empty-filter-btn[aria-pressed='true'] {
  border-color: var(--neon-cyan) !important;
  color: var(--neon-cyan) !important;
  background: color-mix(in srgb, var(--neon-cyan) 10%, var(--bg-panel)) !important;
}

.bottom-nav {
  padding: 8px 8px max(8px, env(safe-area-inset-bottom)) !important;
  border-top: 1px solid var(--border) !important;
  background: color-mix(in srgb, var(--bg-panel) 94%, transparent) !important;
  backdrop-filter: blur(14px);
}

.bn-item {
  gap: 4px !important;
  padding: 6px 3px !important;
  border-radius: 12px !important;
  color: var(--text-dim) !important;
  font-size: 10px !important;
}

.bn-item.active {
  color: var(--neon-cyan) !important;
  background: color-mix(in srgb, var(--neon-cyan) 10%, transparent) !important;
}

.bn-item .bn-icon {
  font-size: 17px !important;
}

.popover,
.modal,
.pin-modal,
.entry,
.social-icon,
.tournament-card {
  border-radius: 16px !important;
}

@media (min-width: 1024px) {
  body {
    padding-left: 24px !important;
    padding-right: 24px !important;
  }

  .wrap {
    padding-top: 24px !important;
  }

  .top-sticky {
    padding-top: 0 !important;
  }

  .grid {
    grid-auto-rows: minmax(122px, 1fr) !important;
  }
}

@media (max-width: 900px) {
  .header {
    gap: 10px !important;
  }

  .video-cards {
    gap: 7px !important;
  }
}

@media (max-width: 680px) {
  body {
    padding: 0 10px 128px !important;
  }

  .wrap {
    padding: 8px 0 18px !important;
  }

  .top-sticky {
    padding: 6px 0 10px !important;
    margin-bottom: 8px !important;
  }

  .header {
    grid-template-columns: minmax(0, 1fr) auto !important;
    gap: 8px !important;
    padding: 10px 11px !important;
    border-radius: 18px !important;
  }

  .brand-text {
    font-size: 9px !important;
  }

  h1 {
    margin-top: 4px !important;
    font-size: 21px !important;
  }

  .nav {
    gap: 3px !important;
  }

  .nav button,
  .theme-toggle-inline,
  .view-toggle,
  .nav .today-btn {
    height: 30px !important;
    border-radius: 9px !important;
  }

  .nav button,
  .theme-toggle-inline {
    width: 30px !important;
    font-size: 13px !important;
  }

  .view-toggle button {
    padding: 0 7px !important;
    font-size: 13px !important;
  }

  .nav .today-btn {
    padding: 0 7px !important;
    font-size: 10px !important;
  }

  .month-label {
    min-width: 28px !important;
    margin: 0 1px !important;
    font-size: 13px !important;
  }

  .video-cards {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 6px !important;
  }

  .video-card {
    border-radius: 12px !important;
  }

  .timeline-item {
    grid-template-columns: 52px minmax(0, 1fr) auto !important;
    gap: 8px !important;
    min-height: 70px !important;
    padding: 9px !important;
    border-radius: 14px !important;
  }

  .timeline-item.is-today {
    padding: 8px !important;
    border-radius: 14px !important;
  }

  .timeline-date {
    padding-right: 6px !important;
  }

  .timeline-date .m-d {
    font-size: 13px !important;
  }

  .timeline-date .dow {
    font-size: 10px !important;
  }

  .timeline-content {
    gap: 4px !important;
  }

  .schedule-tag {
    min-height: 28px !important;
    padding: 5px 7px !important;
    font-size: 11px !important;
  }

  .timeline-yt,
  .timeline-yt-empty {
    width: 52px !important;
    height: 52px !important;
    border-radius: 12px !important;
  }

  .timeline-yt-empty .yt-label {
    display: none !important;
  }

  .timeline-yt-empty .yt-icon {
    font-size: 17px !important;
  }

  /* The compact calendar remains usable when a phone user explicitly selects it. */
  .weekdays {
    gap: 4px !important;
    padding: 0 2px !important;
  }

  .weekdays div {
    padding: 4px 0 !important;
    font-size: 10px !important;
  }

  .grid {
    gap: 4px !important;
    grid-auto-rows: minmax(76px, auto) !important;
  }

  .cell {
    min-height: 76px !important;
    padding: 5px !important;
    gap: 4px !important;
    border-radius: 11px !important;
  }

  .date-num {
    min-height: 17px !important;
    font-size: 11px !important;
  }

  .tag {
    min-height: 23px !important;
    padding: 3px 4px !important;
    border-left-width: 3px !important;
    border-radius: 7px !important;
    font-size: 9px !important;
  }

  .tag .t-time {
    display: none !important;
  }

  .cell-thumb-yt {
    width: 34px !important;
    height: 34px !important;
    margin-left: 4px !important;
    border-radius: 9px !important;
  }

  .cell-thumb-yt .yt-play-icon {
    width: 13px !important;
    height: 13px !important;
  }

  .bottom-nav {
    padding-left: 4px !important;
    padding-right: 4px !important;
  }

  .bn-item {
    font-size: 9px !important;
  }
}

/* Mobile calendar readability pass: keep the 7-column overview usable. */
@media (max-width: 680px) {
  .header {
    grid-template-columns: minmax(0, 1fr) auto !important;
    position: relative !important;
    gap: 10px !important;
    padding: 12px !important;
  }

  .header-left {
    align-items: flex-start !important;
    width: auto !important;
    max-width: none !important;
  }

  .live-banner {
    position: relative !important;
    left: auto !important;
    top: auto !important;
    right: auto !important;
    width: 168px !important;
    height: 54px !important;
    min-height: 54px !important;
  }

  .live-banner img {
    width: 100% !important;
  }

  h1 .h1-full {
    display: inline !important;
  }

  h1 .h1-short {
    display: none !important;
  }

  .nav {
    width: 100% !important;
    justify-content: space-between !important;
    padding-top: 9px !important;
    border-top: 1px solid var(--border) !important;
  }

  .month-label {
    min-width: 86px !important;
    font-size: 14px !important;
  }

  .grid {
    grid-auto-rows: minmax(112px, auto) !important;
  }

  #scheduleGridSection {
    padding-bottom: 28px !important;
  }

  .cell {
    min-height: 112px !important;
    padding: 0 0 5px !important;
    overflow: hidden !important;
  }

  .cell > div:first-child {
    position: relative !important;
    flex: 0 0 auto !important;
    min-height: 27px !important;
    margin: 0 !important;
    padding: 5px 6px !important;
    border-bottom: 1px solid var(--border) !important;
    background: color-mix(in srgb, var(--neon-cyan) 7%, var(--bg-cell)) !important;
  }

  .cell > div:first-child .special-badges {
    position: absolute !important;
    top: 3px !important;
    right: 0 !important;
    z-index: 2 !important;
    align-items: flex-end !important;
  }

  .cell.day-0 > div:first-child {
    background: color-mix(in srgb, var(--neon-magenta) 14%, var(--bg-cell)) !important;
  }

  .cell.day-6 > div:first-child {
    background: color-mix(in srgb, var(--neon-cyan) 14%, var(--bg-cell)) !important;
  }

  .cell.today > div:first-child {
    background: color-mix(in srgb, var(--neon-magenta) 22%, var(--bg-cell)) !important;
  }

  .date-num {
    min-height: 17px !important;
    justify-content: flex-start !important;
    padding: 0 !important;
    font-size: 11px !important;
  }

  .cell-body {
    flex: 1 1 auto !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 4px !important;
    padding: 5px !important;
  }

  .cell-tags-col {
    width: 100% !important;
    flex: 1 1 auto !important;
    min-height: 0 !important;
    display: grid !important;
    align-content: stretch !important;
    grid-template-columns: minmax(0, 1fr) !important;
    justify-content: stretch !important;
    gap: 4px !important;
  }

  .cell-tags-col.items-1 {
    grid-template-rows: max-content !important;
    align-content: center !important;
    padding-block: 8px !important;
  }
  .cell-tags-col.items-2,
  .cell-tags-col.items-3,
  .cell-tags-col.items-4 {
    align-content: start !important;
  }
.cell-tags-col.items-2 { align-content: center !important; }
.cell-tags-col.items-2 { grid-template-rows: repeat(2, max-content) !important; }
.cell-tags-col.items-3 { grid-template-rows: repeat(3, max-content) !important; }
.cell-tags-col.items-4 { grid-template-rows: repeat(4, max-content) !important; }
.cell-tags-col.items-2 { row-gap: 5px !important; }
.cell-tags-col.items-3,
.cell-tags-col.items-4 { row-gap: 4px !important; }

.tag {
  min-height: 36px !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    height: auto !important;
  padding: 7px 5px !important;
    border-left-width: 3px !important;
    border-radius: 7px !important;
    font-size: 9px !important;
    line-height: 1.18 !important;
    white-space: normal !important;
    align-items: center !important;
    justify-content: center !important;
    justify-self: stretch !important;
    text-align: center !important;
  }

  .tag .tag-icon,
  .tag .tag-abbr,
  .tag.tag-custom-icon .tag-abbr {
    display: none !important;
  }

  .tag.tag-custom-icon .tag-icon {
    display: none !important;
  }

  .tag.tag-custom-icon .tag-title {
    display: block !important;
    width: 100% !important;
    text-align: center !important;
  }

.cell-tags-col.items-1 .tag {
  min-height: 58px !important;
  padding-block: 10px !important;
}

.cell.is-rest .cell-tags-col.items-1 .tag {
  font-size: 12px !important;
  font-weight: 900 !important;
  min-height: 54px !important;
  padding-block: 10px !important;
}

  .tag .title-wrap,
  .cell-tags-col.items-1 .title-wrap,
  .cell-tags-col.items-2 .title-wrap,
  .cell-tags-col.items-3 .title-wrap,
  .cell-tags-col.items-4 .title-wrap {
    display: block !important;
    width: 100% !important;
    flex: 1 1 auto !important;
    max-height: none !important;
    overflow: visible !important;
    text-overflow: clip !important;
    white-space: normal !important;
    overflow-wrap: anywhere !important;
    word-break: keep-all !important;
  }

  .tag .tag-title {
    display: block !important;
    width: 100% !important;
    white-space: normal !important;
    overflow-wrap: normal !important;
    word-break: keep-all !important;
    line-height: 1.18 !important;
    -webkit-line-clamp: unset !important;
    -webkit-box-orient: initial !important;
    overflow: visible !important;
    text-overflow: clip !important;
    text-align: center !important;
  }

  .tag .title-wrap,
  .tag .tag-abbr,
  .tag .t-time {
    text-align: center !important;
  }

  .tag .t-time {
    /* 시간은 날짜 상세 모달에서 확인할 수 있으므로, 작은 달력 칸에서는
       제목이 먼저 읽히도록 숨깁니다. */
    display: none !important;
  }

  .cell-thumb-yt {
    display: none !important;
  }

  .special-badge.badge-circle {
    width: auto !important;
    min-width: 36px !important;
    height: 20px !important;
    padding: 0 6px !important;
    border-radius: 7px !important;
    overflow: visible !important;
    font-size: 9px !important;
    line-height: 1 !important;
    font-weight: 900 !important;
    box-shadow: none !important;
    text-shadow: none !important;
    text-align: center !important;
  }

  .special-badge.badge-circle .sp-abbr {
    display: inline-block !important;
    max-width: none !important;
    overflow: visible !important;
    font-size: 9px !important;
    line-height: 1 !important;
    letter-spacing: 0 !important;
    color: inherit !important;
    text-shadow: none !important;
    filter: none !important;
  }

  :root[data-theme='light'] .cell.is-rest .special-badge.badge-circle {
    color: #006b78 !important;
    background: #e2f8f8 !important;
    border-color: #0099a8 !important;
  }

  :root[data-theme='light'] .cell.is-trip .special-badge.badge-circle {
    color: #7a4b00 !important;
    background: #fff3d6 !important;
    border-color: #c27a12 !important;
  }

  :root:not([data-theme='light']) .cell.is-rest .special-badge.badge-circle {
    color: #b8ffff !important;
    background: #164348 !important;
    border-color: #54dfe0 !important;
  }

  :root:not([data-theme='light']) .cell.is-trip .special-badge.badge-circle {
    color: #fff0b8 !important;
    background: #573b18 !important;
    border-color: #f0bc78 !important;
  }

  .special-badge {
    max-width: 100% !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    font-size: 8px !important;
    padding: 2px 4px !important;
  }

  .more {
    padding-left: 1px !important;
    font-size: 9px !important;
  }
}

@media (max-width: 380px) {
  .header {
    align-items: stretch !important;
  }

  .nav {
    justify-content: space-between !important;
  }

  .nav button,
  .theme-toggle-inline {
    width: 32px !important;
  }

  .month-label {
    min-width: 70px !important;
  }

  .header-left {
    width: auto !important;
    max-width: none !important;
  }

  .live-banner {
    width: 108px !important;
    height: 48px !important;
    min-height: 48px !important;
  }

  .live-banner .lb-copy {
    gap: 3px !important;
    padding: 15px 5px 5px !important;
    font-size: 8px !important;
  }

  .live-banner .lb-copy > span {
    gap: 3px !important;
    font-size: 8px !important;
  }

  .live-banner img {
    width: 100% !important;
  }

  .grid {
    grid-auto-rows: minmax(104px, auto) !important;
  }

  .cell {
    min-height: 104px !important;
  }

  .cell > div:first-child {
    min-height: 44px !important;
  }

  .cell > div:first-child .special-badges {
    top: 22px !important;
  }

.tag {
  padding: 10px 4px !important;
  font-size: 8px !important;
}

  .tag .t-time {
    display: none !important;
  }
}

@media (max-width: 480px) {
  .header-left h1 {
    font-size: 18px !important;
  }
}

/* Show the year whenever the month control has enough room. */
@media (min-width: 381px) and (max-width: 560px) {
  .month-label .ml-full { display: inline !important; }
  .month-label .ml-short { display: none !important; }
}

@media (max-width: 380px) {
  .month-label .ml-full { display: none !important; }
  .month-label .ml-short { display: inline !important; }
}

@media (max-width: 340px) {
  .header-left {
    width: auto !important;
    max-width: none !important;
  }

  .live-banner {
    width: 70px !important;
  }

  .live-banner .lb-copy {
    display: none !important;
  }

  .live-banner img {
    width: 100% !important;
  }
}

/* ONSYDE team events use their own black/green card language instead of a
   text prefix, so the event title keeps the full available width. */
.tag.onsyde-tag,
.schedule-tag.onsyde-tag,
.agenda-tag.onsyde-tag {
  position: relative !important;
  border: 1px solid #39f27f !important;
  border-left: 6px solid #b6f23d !important;
  border-bottom-color: #1fbd5a !important;
  border-radius: 3px 11px 3px 11px !important;
  background:
    linear-gradient(135deg, rgba(182, 242, 61, .18) 0 11px, transparent 11px),
    repeating-linear-gradient(135deg, rgba(57, 242, 127, .035) 0 3px, transparent 3px 9px),
    linear-gradient(100deg, #050a07 0%, #10251a 58%, #07110b 100%) !important;
  color: #f7fff9 !important;
  box-shadow: inset 0 0 0 1px rgba(182, 242, 61, .10) !important;
}

.tag.onsyde-tag::after,
.schedule-tag.onsyde-tag::after,
.agenda-tag.onsyde-tag::after {
  content: "";
  position: absolute;
  top: 3px;
  right: 3px;
  width: 8px;
  height: 8px;
  border-top: 2px solid #b6f23d;
  border-right: 2px solid #39f27f;
  opacity: .95;
  pointer-events: none;
}

.tag.onsyde-tag .tag-inline-time,
.tag.onsyde-tag .tag-icon,
.tag.onsyde-tag .tag-abbr,
.schedule-tag.onsyde-tag .tag-inline-time,
.agenda-tag.onsyde-tag .tag-inline-time {
  color: #b6f23d !important;
}

.tag.onsyde-tag .tag-title,
.tag.onsyde-tag .title-wrap,
.schedule-tag.onsyde-tag .marquee-text,
.agenda-tag.onsyde-tag > span {
  color: #f7fff9 !important;
}

.entry.onsyde-entry {
  border: 1px solid #39f27f !important;
  border-left: 6px solid #b6f23d !important;
  border-radius: 3px 12px 3px 12px !important;
  background:
    repeating-linear-gradient(135deg, rgba(57, 242, 127, .035) 0 3px, transparent 3px 9px),
    linear-gradient(100deg, #050a07, #10251a) !important;
  color: #f7fff9 !important;
  box-shadow: inset 0 0 0 1px rgba(182, 242, 61, .10) !important;
}

:root[data-theme="light"] .tag.onsyde-tag,
:root[data-theme="light"] .schedule-tag.onsyde-tag,
:root[data-theme="light"] .agenda-tag.onsyde-tag {
  border-color: #20b957 !important;
  border-left-color: #9bcc28 !important;
  border-bottom-color: #148b41 !important;
  background:
    linear-gradient(135deg, rgba(182, 242, 61, .18) 0 11px, transparent 11px),
    repeating-linear-gradient(135deg, rgba(57, 242, 127, .035) 0 3px, transparent 3px 9px),
    linear-gradient(100deg, #050a07 0%, #10251a 58%, #07110b 100%) !important;
  color: #f7fff9 !important;
  box-shadow: inset 0 0 0 1px rgba(182, 242, 61, .10) !important;
}

:root[data-theme="light"] .entry.onsyde-entry {
  border-color: #20b957 !important;
  border-left-color: #9bcc28 !important;
  background:
    repeating-linear-gradient(135deg, rgba(57, 242, 127, .035) 0 3px, transparent 3px 9px),
    linear-gradient(100deg, #050a07, #10251a) !important;
  color: #f7fff9 !important;
}

/* At 1281px the header changes from stacked to side-by-side.  A fixed 600px
   replay strip leaves too little room for the full title and controls, so
   reserve a balanced middle-width track until the regular desktop layout fits. */
@media (min-width: 1281px) and (max-width: 1365px) {
  .top-sticky .video-cards {
    width: clamp(512px, 40vw, 520px) !important;
    max-width: 520px !important;
    flex: 0 0 clamp(512px, 40vw, 520px) !important;
  }

  .top-sticky .header {
    min-width: 0 !important;
    flex: 1 1 auto !important;
  }

  .top-sticky .header-left,
  .top-sticky h1 {
    min-width: 0 !important;
  }
}

@media (max-width: 560px) {
  /* 아주 좁은 7열 달력에서는 잘린 문장 대신 의미 있는 약칭을 보여줍니다.
     전체 제목은 날짜 상세 모달과 title 속성에서 계속 확인할 수 있습니다. */
  .tag {
    justify-content: center !important;
    align-items: center !important;
  }

  .tag .tag-abbr,
  .tag.tag-custom-icon .tag-abbr {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    color: var(--tag-color) !important;
    font-size: 9px !important;
    font-weight: 900 !important;
    letter-spacing: -0.04em !important;
    white-space: normal !important;
    overflow-wrap: keep-all !important;
    line-height: 1.08 !important;
  }

  .tag .title-wrap,
  .cell-tags-col .tag .title-wrap {
    display: none !important;
  }
}

@media (max-width: 560px) {
  .cell.is-trip .special-badge.badge-circle {
    width: 26px !important;
    min-width: 26px !important;
    padding: 0 !important;
  }

  .cell.is-trip .special-badge.badge-circle .sp-icon {
    display: inline-block !important;
    font-size: 12px !important;
    line-height: 1 !important;
  }

  .cell.is-trip .special-badge.badge-circle .sp-abbr,
  .cell.is-trip .special-badge.badge-circle .sp-label,
  .cell.is-trip .special-badge.badge-circle .sp-inner-text {
    display: none !important;
  }
}

/* Keep compact mobile labels crisp; the earlier legacy mobile rule adds a
   neon text shadow to abbreviations, which hurts readability in the cards. */
@media (max-width: 560px) {
  #scheduleGridSection .tag,
  #scheduleGridSection .tag .tag-abbr,
  #scheduleGridSection .tag .tag-title,
  #scheduleGridSection .tag .t-time,
  #scheduleGridSection .tag .tag-icon {
    text-shadow: none !important;
    filter: none !important;
  }
}

/* Show the full event name on mobile.  Keep the card compact with a smaller
   neutral label instead of replacing the name with an opaque abbreviation. */
@media (max-width: 560px) {
  #scheduleGridSection .tag {
    flex: 0 0 auto !important;
    min-height: 30px !important;
    height: auto !important;
    padding: 5px 3px !important;
    box-sizing: border-box !important;
    justify-content: center !important;
    align-items: center !important;
    text-align: center !important;
    overflow: hidden !important;
  }

  #scheduleGridSection .cell-tags-col.items-1 .tag {
    min-height: 54px !important;
    padding-block: 8px !important;
  }

  #scheduleGridSection .cell.is-rest .cell-tags-col.items-1 .tag {
    min-height: 50px !important;
    padding-block: 8px !important;
  }

  #scheduleGridSection .tag .tag-abbr {
    display: none !important;
  }

  #scheduleGridSection .tag .title-wrap,
  #scheduleGridSection .tag.tag-custom-icon .title-wrap {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    flex: 0 1 auto !important;
    overflow: visible !important;
    white-space: normal !important;
    text-overflow: clip !important;
  }

  #scheduleGridSection .tag .tag-title,
  #scheduleGridSection .tag.tag-custom-icon .tag-title {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow: visible !important;
    white-space: normal !important;
    word-break: break-all !important;
    overflow-wrap: anywhere !important;
    line-height: 1.08 !important;
    font-size: 8px !important;
    font-weight: 800 !important;
    color: #f7f8fc !important;
    text-align: center !important;
    text-shadow: none !important;
  }

  #scheduleGridSection .tag .tag-icon {
    display: none !important;
  }
}

/* Arrival is visually opposite to departure: lower-left, reversed plane,
   and a cool blue badge so it reads as returning home. */
@media (max-width: 560px) {
  #scheduleGridSection .cell {
    position: relative !important;
  }

  #scheduleGridSection .cell > div:first-child {
    position: static !important;
  }

  #scheduleGridSection .cell > div:first-child .special-badges {
    position: absolute !important;
    top: 3px !important;
    right: 0 !important;
    bottom: auto !important;
    left: auto !important;
  }

  #scheduleGridSection .cell > div:first-child .special-badges .badge-arrival {
    position: absolute !important;
    top: auto !important;
    right: auto !important;
    bottom: 5px !important;
    left: 3px !important;
    z-index: 3 !important;
  }

  #scheduleGridSection .cell > div:first-child .special-badges.has-arrival {
    position: static !important;
  }

  #scheduleGridSection .cell > div:first-child .special-badges.has-arrival .badge-departure {
    position: absolute !important;
    top: 3px !important;
    right: 0 !important;
    bottom: auto !important;
    left: auto !important;
    z-index: 3 !important;
  }

  #scheduleGridSection .badge-arrival .sp-icon {
    display: inline-block !important;
    transform: rotate(180deg) !important;
    transform-origin: center !important;
  }

  :root[data-theme='light'] .cell.is-trip .special-badge.badge-arrival {
    color: #005f8f !important;
    background: #e5f6ff !important;
    border-color: #2196d2 !important;
  }

  :root:not([data-theme='light']) .cell.is-trip .special-badge.badge-arrival {
    color: #b8e9ff !important;
    background: #173b52 !important;
    border-color: #57c7ff !important;
  }
}

/* Keep the arrival badge in the same upper-right location as departure.
   Only the plane direction changes to point down-left. */
@media (max-width: 560px) {
  #scheduleGridSection .cell > div:first-child {
    position: relative !important;
  }

  #scheduleGridSection .cell > div:first-child .special-badges,
  #scheduleGridSection .cell > div:first-child .special-badges.has-arrival {
    position: absolute !important;
    top: 3px !important;
    right: 0 !important;
    bottom: auto !important;
    left: auto !important;
  }

  #scheduleGridSection .cell > div:first-child .special-badges.has-arrival .badge-arrival,
  #scheduleGridSection .cell > div:first-child .special-badges.has-arrival .badge-departure {
    position: static !important;
    top: auto !important;
    right: auto !important;
    bottom: auto !important;
    left: auto !important;
  }

  #scheduleGridSection .badge-arrival .sp-icon {
    transform: rotate(180deg) !important;
  }
}

/* A rest day is a state, not an ordinary event: fill the whole rest card so
   it is immediately distinguishable from schedule cards. */
@media (max-width: 560px) {
  #scheduleGridSection .cell.is-rest {
    background: #302a30 !important;
    border-color: #b56f7d !important;
    box-shadow: inset 0 0 0 1px rgba(181, 111, 125, .28) !important;
  }

  #scheduleGridSection .cell.is-rest > div:first-child {
    background: #443139 !important;
    border-bottom-color: #bd8490 !important;
  }

  :root[data-theme='light'] #scheduleGridSection .cell.is-rest {
    background: #fff5f6 !important;
    border-color: #e2a9b2 !important;
    box-shadow: inset 0 0 0 1px rgba(210, 80, 100, .12) !important;
  }

  :root[data-theme='light'] #scheduleGridSection .cell.is-rest > div:first-child {
    background: #fbedef !important;
    border-bottom-color: #edc0c7 !important;
  }

  #scheduleGridSection .cell.is-rest .date-num {
    color: #e3b0b9 !important;
    font-weight: 900 !important;
  }

  :root[data-theme='light'] #scheduleGridSection .cell.is-rest .date-num {
    color: #a86a75 !important;
  }

  #scheduleGridSection .cell.is-rest .cell-tags-col.items-0 {
    min-height: 0 !important;
  }

  #scheduleGridSection .cell.is-rest .tag[data-first-char="휴"] {
    border: 1px solid #ff7182 !important;
    background: #7a3044 !important;
    color: #fff1f3 !important;
    font-weight: 900 !important;
    box-shadow: none !important;
  }

  #scheduleGridSection .cell.is-rest .tag[data-first-char="휴"] .tag-title {
    color: #fff1f3 !important;
    font-size: 9px !important;
    font-weight: 900 !important;
    letter-spacing: .01em !important;
  }

  :root[data-theme='light'] #scheduleGridSection .cell.is-rest .tag[data-first-char="휴"] {
    border-color: #d13d56 !important;
    background: #f7c7cf !important;
    color: #7f1930 !important;
  }

  :root[data-theme='light'] #scheduleGridSection .cell.is-rest .tag[data-first-char="휴"] .tag-title {
    color: #7f1930 !important;
  }
}

/* Use a single centered rest icon in the lower part of the day cell. */
#scheduleGridSection .cell.is-rest {
  padding-bottom: 5px !important;
}

#scheduleGridSection .cell.is-rest .cell-body {
  padding-bottom: 34px !important;
}

#scheduleGridSection .cell.is-rest .rest-label {
  position: absolute !important;
  left: 50% !important;
  bottom: 8px !important;
  transform: translateX(-50%) !important;
  z-index: 4 !important;
  width: 32px !important;
  min-height: 32px !important;
  box-sizing: border-box !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: #ffb4bf !important;
  font-size: 22px !important;
  font-weight: 900 !important;
  line-height: 1 !important;
  letter-spacing: 0 !important;
  text-align: center !important;
  box-shadow: none !important;
}

#scheduleGridSection .cell.is-rest .rest-icon {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100% !important;
  height: 100% !important;
  line-height: 1 !important;
}

:root[data-theme='light'] #scheduleGridSection .cell.is-rest .rest-label {
  color: #b52542 !important;
}

/* Light mode needs the same contrast as the dark cards.  The legacy mobile
   rule used a near-white title color, which disappears on the light canvas. */
:root[data-theme='light'] #scheduleGridSection .tag {
  color: #332a3b !important;
  background: color-mix(in srgb, var(--tag-color, #5a4b77) 18%, #ffffff) !important;
  border-color: var(--tag-color, #5a4b77) !important;
  opacity: 1 !important;
}

:root[data-theme='light'] #scheduleGridSection .tag .tag-title,
:root[data-theme='light'] #scheduleGridSection .tag .title-wrap {
  color: #332a3b !important;
  text-shadow: none !important;
}

:root[data-theme='light'] #scheduleGridSection .tag .tag-icon,
:root[data-theme='light'] #scheduleGridSection .tag .tag-abbr,
:root[data-theme='light'] #scheduleGridSection .tag .t-time {
  color: var(--tag-color) !important;
  text-shadow: none !important;
}

/* Wide desktop: use the full monitor width instead of the old 1440px cap. */
@media (min-width: 681px) {
  body {
    padding-left: clamp(24px, 2vw, 64px) !important;
    padding-right: clamp(24px, 2vw, 64px) !important;
  }

  .wrap {
    width: 100% !important;
    max-width: none !important;
  }

  #scheduleGridSection,
  #scheduleGridSection .weekdays,
  #scheduleGridSection .grid {
    width: 100% !important;
  }
}

/* Tablet-sized desktop windows cannot fit the title, controls, and video row
   side by side. Stack the top area before it starts compressing the header. */
@media (min-width: 681px) and (max-width: 1280px) {
  .top-sticky {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
  }

  .header {
    width: 100% !important;
    flex: 0 0 auto !important;
  }

  .video-cards {
    width: 100% !important;
    max-width: none !important;
    margin: 10px 0 0 !important;
  }
}

/* Center the rest icon in the usable body area, below the date header. */
#scheduleGridSection .cell.is-rest .cell-body {
  flex: 1 1 auto !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 5px 5px !important;
}

#scheduleGridSection .cell.is-rest .cell-tags-col.items-0 {
  display: none !important;
}

#scheduleGridSection .cell.is-rest .rest-label {
  position: static !important;
  left: auto !important;
  bottom: auto !important;
  transform: none !important;
  margin: 0 !important;
}

/* Desktop cards read more evenly when schedules and replay thumbnails share
   one centered vertical axis instead of splitting to opposite sides. */
@media (min-width: 681px) {
  #scheduleGridSection .cell-body {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
  }

  #scheduleGridSection .cell-tags-col {
    width: 100% !important;
    flex: 0 1 auto !important;
    align-items: center !important;
    justify-content: center !important;
  }

  #scheduleGridSection .cell-tags-col.items-0 {
    display: none !important;
  }

  #scheduleGridSection .cell-tags-col .tag {
    align-self: center !important;
    max-width: 100% !important;
  }

  #scheduleGridSection .cell-thumb-yt {
    align-self: center !important;
    margin: 0 !important;
  }
}

/* Keep rest days recognizable without making them the loudest cells on the
   calendar.  The icon remains the primary signal. */
#scheduleGridSection .cell.is-rest {
  background: #2b2730 !important;
  border-color: #765763 !important;
  box-shadow: inset 0 0 0 1px rgba(118, 87, 99, .18) !important;
}

#scheduleGridSection .cell.is-rest > div:first-child {
  background: #353039 !important;
  border-bottom-color: #65535d !important;
}

#scheduleGridSection .cell.is-rest .date-num {
  color: #bca3aa !important;
}

:root[data-theme='light'] #scheduleGridSection .cell.is-rest {
  background: #fff9fa !important;
  border-color: #ecd0d5 !important;
  box-shadow: inset 0 0 0 1px rgba(210, 140, 153, .1) !important;
}

:root[data-theme='light'] #scheduleGridSection .cell.is-rest > div:first-child {
  background: #fcf5f6 !important;
  border-bottom-color: #f0d5d9 !important;
}

:root[data-theme='light'] #scheduleGridSection .cell.is-rest .date-num {
  color: #b798a0 !important;
}

#scheduleGridSection .cell.is-rest .rest-label {
  opacity: .78 !important;
}

/* Restore the desktop reference layout: schedules on the left and replay
   thumbnails on the right, both centered on the cell's vertical axis. */
@media (min-width: 681px) {
  #scheduleGridSection .cell-body {
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 8px !important;
  }

  #scheduleGridSection .cell-tags-col {
    width: auto !important;
    flex: 1 1 auto !important;
    align-items: stretch !important;
    justify-content: center !important;
  }

  #scheduleGridSection .cell-tags-col .tag {
    align-self: stretch !important;
    max-width: 100% !important;
  }

  #scheduleGridSection .cell-thumb-yt {
    align-self: center !important;
    margin-left: 8px !important;
    margin-right: 0 !important;
  }
}

/* Desktop tags should wrap to the available cell height instead of applying
   an ellipsis after the first line. */
@media (min-width: 681px) {
  #scheduleGridSection .tag {
    height: auto !important;
    min-height: 28px !important;
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: clip !important;
    line-height: 1.2 !important;
  }

  #scheduleGridSection .tag .title-wrap {
    display: block !important;
    flex: 1 1 auto !important;
    min-width: 0 !important;
    max-height: none !important;
    overflow: visible !important;
    white-space: normal !important;
    text-overflow: clip !important;
    overflow-wrap: anywhere !important;
    word-break: keep-all !important;
  }

  #scheduleGridSection .tag .tag-title {
    display: block !important;
    width: 100% !important;
    max-height: none !important;
    overflow: visible !important;
    white-space: normal !important;
    text-overflow: clip !important;
    -webkit-line-clamp: unset !important;
    overflow-wrap: anywhere !important;
    word-break: keep-all !important;
  }

  /* Put metadata on a compact top row and give the full title the row below. */
  #scheduleGridSection .tag.has-time {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    grid-template-rows: auto auto !important;
    column-gap: 4px !important;
    row-gap: 2px !important;
    align-items: center !important;
  }

  #scheduleGridSection .tag.has-time .tag-icon {
    grid-column: 1 !important;
    grid-row: 1 !important;
    justify-self: start !important;
    align-self: center !important;
    margin: 0 !important;
  }

  #scheduleGridSection .tag.has-time .t-time {
    grid-column: 2 !important;
    grid-row: 1 !important;
    justify-self: end !important;
    align-self: center !important;
    margin: 0 !important;
  }

  #scheduleGridSection .tag.has-time .title-wrap {
    grid-column: 1 / -1 !important;
    grid-row: 2 !important;
    width: 100% !important;
    flex: none !important;
    text-align: center !important;
  }

  #scheduleGridSection .tag.has-time .tag-title {
    text-align: center !important;
  }

  /* A lone schedule should still have enough vertical presence to read as a
     card, instead of looking like a thin strip floating in the row. */
  #scheduleGridSection .cell-tags-col.items-1 .tag {
    min-height: 54px !important;
    padding-block: 8px !important;
  }

  /* On desktop, keep the metadata and title on one compact axis.  The
     two-row icon/time layout leaves an empty middle above and empty sides
     below when the card is wide enough. */
  #scheduleGridSection .tag.has-time {
    grid-template-columns: auto minmax(0, 1fr) auto !important;
    grid-template-rows: minmax(0, 1fr) !important;
    column-gap: 6px !important;
    row-gap: 0 !important;
  }

  #scheduleGridSection .tag.has-time .tag-icon {
    grid-column: 1 !important;
    grid-row: 1 !important;
    justify-self: start !important;
  }

  #scheduleGridSection .tag.has-time .title-wrap {
    grid-column: 2 !important;
    grid-row: 1 !important;
    width: auto !important;
    text-align: center !important;
  }

  #scheduleGridSection .tag.has-time .tag-title {
    text-align: center !important;
  }

  #scheduleGridSection .tag.has-time .t-time {
    grid-column: 3 !important;
    grid-row: 1 !important;
    justify-self: end !important;
  }

  /* Apply the same three-column geometry to cards without a time too.  An
     empty time column collapses, while the title remains centered in the
     same middle track as timed cards. */
  #scheduleGridSection .tag {
    display: grid !important;
    grid-template-columns: auto minmax(0, 1fr) auto !important;
    grid-template-rows: minmax(0, 1fr) !important;
    column-gap: 6px !important;
    row-gap: 0 !important;
    align-items: center !important;
  }

  #scheduleGridSection .tag .tag-icon,
  #scheduleGridSection .tag .tag-abbr {
    grid-column: 1 !important;
    grid-row: 1 !important;
    justify-self: start !important;
  }

  #scheduleGridSection .tag .tag-abbr {
    display: none !important;
  }

  #scheduleGridSection .tag .title-wrap {
    grid-column: 2 !important;
    grid-row: 1 !important;
    width: auto !important;
    min-width: 0 !important;
    flex: none !important;
    text-align: center !important;
  }

  #scheduleGridSection .tag .tag-title {
    display: block !important;
    width: 100% !important;
    text-align: center !important;
  }

  #scheduleGridSection .tag .t-time {
    grid-column: 3 !important;
    grid-row: 1 !important;
    justify-self: end !important;
  }

  #scheduleGridSection .tag.has-time .title-wrap {
    grid-column: 2 !important;
    grid-row: 1 !important;
    width: auto !important;
    flex: none !important;
    text-align: center !important;
  }

  /* Keep one-event rows compact; rows with several schedules grow from their
     actual content instead of inheriting a large empty minimum. */
  #scheduleGridSection .grid {
    flex: 0 0 auto !important;
    align-content: start !important;
    grid-auto-rows: minmax(122px, auto) !important;
  }
}

/* Keep the time in the same reading position as the title, e.g.:
   "6PM RSL 신희범 입중계 응원". */
#scheduleGridSection .tag.has-time .t-time {
  display: inline !important;
  grid-column: auto !important;
  grid-row: auto !important;
  justify-self: auto !important;
  margin: 0 4px 0 0 !important;
  white-space: nowrap !important;
}

#scheduleGridSection .tag.has-time .tag-title {
  display: inline !important;
  width: auto !important;
}

#scheduleGridSection .tag.has-time .t-time {
  font-size: inherit !important;
  font-weight: inherit !important;
  line-height: inherit !important;
}

@media (max-width: 560px) {
  #scheduleGridSection .tag.has-time .t-time,
  #scheduleGridSection .tag.has-time .tag-title {
    font-size: 8px !important;
    font-weight: 800 !important;
    line-height: 1.08 !important;
  }
}

@media (max-width: 380px) {
  #scheduleGridSection .tag.has-time .t-time {
    display: none !important;
  }
}

/* Narrow desktop/tablet widths cannot spare three inline columns for long
   titles.  Let the icon sit over the left edge and give the combined
   time/title line the full card width so text wraps by words, not characters. */
@media (min-width: 681px) and (max-width: 1050px) {
  #scheduleGridSection .tag {
    display: flex !important;
    position: relative !important;
    align-items: center !important;
    justify-content: center !important;
    padding-left: 17px !important;
    padding-right: 4px !important;
    overflow: hidden !important;
  }

  #scheduleGridSection .tag .tag-icon {
    position: absolute !important;
    left: 5px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    margin: 0 !important;
  }

  #scheduleGridSection .tag .title-wrap,
  #scheduleGridSection .tag.has-time .title-wrap {
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
    flex: 1 1 100% !important;
    text-align: center !important;
    white-space: normal !important;
    overflow: visible !important;
    overflow-wrap: break-word !important;
    word-break: keep-all !important;
  }

  #scheduleGridSection .tag .t-time,
  #scheduleGridSection .tag.has-time .t-time {
    display: inline !important;
    margin-right: 3px !important;
    font-size: inherit !important;
    line-height: inherit !important;
    white-space: nowrap !important;
  }

  #scheduleGridSection .tag .tag-title,
  #scheduleGridSection .tag.has-time .tag-title {
    display: inline !important;
    width: auto !important;
    white-space: normal !important;
    overflow-wrap: break-word !important;
    word-break: keep-all !important;
  }
}

/* Make light-mode rest days readable without turning them into the loudest
   cells on the calendar. */
:root[data-theme='light'] #scheduleGridSection .cell.is-rest {
  background: #fff1f4 !important;
  border-color: #dda0ad !important;
  box-shadow: inset 0 0 0 1px rgba(190, 83, 105, .16) !important;
}

:root[data-theme='light'] #scheduleGridSection .cell.is-rest > div:first-child {
  background: #f9e2e7 !important;
  border-bottom-color: #e8b6c0 !important;
}

:root[data-theme='light'] #scheduleGridSection .cell.is-rest .date-num {
  color: #a95769 !important;
}

/* Time and title use one exact typography rule at every responsive size. */
#scheduleGridSection .tag.has-time .t-time,
#scheduleGridSection .tag.has-time .tag-title {
  font-size: inherit !important;
  font-weight: inherit !important;
  line-height: inherit !important;
}

/* Keep the top header and latest-video group visually balanced while the
   calendar below can still use the full monitor width. */
@media (min-width: 1600px) {
  .top-sticky {
    width: 100% !important;
    max-width: none !important;
    margin-left: auto !important;
    margin-right: auto !important;
    gap: 16px !important;
  }

  .top-sticky .video-cards {
    width: 38% !important;
    max-width: 600px !important;
    flex: 0 0 38% !important;
  }

  .top-sticky .header {
    min-width: 0 !important;
  }

  /* Make in-calendar replay thumbnails read as real previews rather than
     tiny badges beside the schedule cards. */
  #scheduleGridSection .cell-thumb-yt {
    width: clamp(64px, 4vw, 96px) !important;
    height: auto !important;
    aspect-ratio: 1 !important;
    margin-left: 10px !important;
    align-self: center !important;
    border-radius: 13px !important;
  }
}

/* Use the empty upper-right area of the mobile header for compact latest
   video previews.  Keep them thumbnail-only so the controls remain below. */
@media (min-width: 360px) and (max-width: 680px) {
  .top-sticky {
    position: relative !important;
  }

  .header-left {
    max-width: 52% !important;
  }

  .video-cards {
    display: grid !important;
    position: absolute !important;
    /* Anchor to the brand/title row; the nav row below must remain clear. */
    top: 12px !important;
    right: 10px !important;
    z-index: 3 !important;
    width: min(46%, 230px) !important;
    max-width: 230px !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 4px !important;
    margin: 0 !important;
    transform: none !important;
  }

  .video-card {
    min-width: 0 !important;
    aspect-ratio: 16 / 9 !important;
    border-radius: 6px !important;
    overflow: hidden !important;
  }

  .video-card .vc-thumb {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    aspect-ratio: 16 / 9 !important;
    object-fit: cover !important;
  }

  .video-card .vc-title,
  .video-card .vc-label {
    display: none !important;
  }
}

@media (max-width: 359px) {
  .video-cards {
    display: none !important;
  }
}

/* Medium desktop widths need a different composition: keeping a replay
   thumbnail beside the schedule can reduce the text track to a few pixels.
   Stack the thumbnail below the full-width schedule column instead. */
@media (min-width: 681px) and (max-width: 1400px) {
  #scheduleGridSection .cell-body {
    flex-direction: column !important;
    align-items: stretch !important;
    justify-content: center !important;
    gap: 6px !important;
  }

  #scheduleGridSection .cell-tags-col {
    width: 100% !important;
    flex: 0 1 auto !important;
    align-items: stretch !important;
    justify-content: center !important;
  }

  #scheduleGridSection .cell-tags-col .tag {
    width: 100% !important;
    max-width: 100% !important;
  }

  #scheduleGridSection .cell-thumb-yt {
    display: block !important;
    width: 44px !important;
    height: 44px !important;
    aspect-ratio: 1 !important;
    align-self: center !important;
    margin: 2px auto 0 !important;
    border-radius: 10px !important;
  }

  /* Use the full tag width for the combined time/title line. */
  #scheduleGridSection .tag {
    display: flex !important;
    position: relative !important;
    padding-left: 18px !important;
    padding-right: 5px !important;
    overflow: hidden !important;
  }

  #scheduleGridSection .tag .tag-icon {
    position: absolute !important;
    left: 5px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    margin: 0 !important;
  }

  #scheduleGridSection .tag .title-wrap,
  #scheduleGridSection .tag.has-time .title-wrap {
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
    flex: 1 1 100% !important;
    white-space: normal !important;
    overflow: visible !important;
    overflow-wrap: break-word !important;
    word-break: keep-all !important;
    text-align: center !important;
  }

  #scheduleGridSection .tag .tag-title,
  #scheduleGridSection .tag.has-time .tag-title {
    display: inline !important;
    width: auto !important;
    white-space: normal !important;
    overflow-wrap: break-word !important;
    word-break: keep-all !important;
  }
}

/* Use the actual date-cell width rather than the viewport width.  Cropped,
   zoomed, or browser-scaled desktop views can have narrow cells even when
   the CSS viewport still reports a wide desktop size. */
#scheduleGridSection .cell {
  container: schedule-cell / inline-size;
}

@container schedule-cell (max-width: 220px) {
  #scheduleGridSection .cell-body {
    flex-direction: column !important;
    align-items: stretch !important;
    justify-content: center !important;
    gap: 6px !important;
  }

  #scheduleGridSection .cell-tags-col {
    width: 100% !important;
    flex: 0 1 auto !important;
    align-items: stretch !important;
    justify-content: center !important;
  }

  #scheduleGridSection .cell-tags-col .tag {
    width: 100% !important;
    max-width: 100% !important;
    display: flex !important;
    position: relative !important;
    padding-left: 18px !important;
    padding-right: 5px !important;
    overflow: hidden !important;
  }

  #scheduleGridSection .cell-thumb-yt {
    display: block !important;
    width: 44px !important;
    height: 44px !important;
    aspect-ratio: 1 !important;
    align-self: center !important;
    margin: 2px auto 0 !important;
    border-radius: 10px !important;
  }

  #scheduleGridSection .cell-tags-col .tag .tag-icon {
    position: absolute !important;
    left: 5px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    margin: 0 !important;
  }

  #scheduleGridSection .cell-tags-col .tag .title-wrap,
  #scheduleGridSection .cell-tags-col .tag.has-time .title-wrap,
  #scheduleGridSection .cell-tags-col.desktop-line-budget .tag.is-line-clamped .title-wrap {
    display: flex !important;
    align-items: center !important;
    width: 100% !important;
    min-width: 0 !important;
    flex: 1 1 100% !important;
    max-height: none !important;
    overflow: hidden !important;
    white-space: nowrap !important;
    text-overflow: clip !important;
    -webkit-line-clamp: unset !important;
  }

  #scheduleGridSection .cell-tags-col .tag .t-time,
  #scheduleGridSection .cell-tags-col .tag.has-time .t-time {
    flex: 0 0 auto !important;
    display: inline-block !important;
    white-space: nowrap !important;
    margin-right: 3px !important;
  }

  #scheduleGridSection .cell-tags-col .tag .tag-title,
  #scheduleGridSection .cell-tags-col .tag.has-time .tag-title {
    display: block !important;
    flex: 1 1 auto !important;
    min-width: 0 !important;
    width: auto !important;
    overflow: hidden !important;
    white-space: nowrap !important;
    text-overflow: ellipsis !important;
    word-break: normal !important;
  }
}

/* Date headers use two real columns: the date on the left and all actions on
   the right.  Keeping badges and replay in one flex row prevents overlap. */
#scheduleGridSection .cell > .cell-date-header {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  width: 100% !important;
}

#scheduleGridSection .cell > .cell-date-header > .date-num {
  flex: 0 0 auto !important;
}

#scheduleGridSection .cell > .cell-date-header > .cell-header-actions {
  position: static !important;
  display: flex !important;
  flex: 0 0 auto !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 3px !important;
  min-width: 0 !important;
  margin-left: auto !important;
}

#scheduleGridSection .cell > .cell-date-header > .cell-header-actions > .special-badges,
#scheduleGridSection .cell > .cell-date-header > .cell-header-actions > .special-badges.has-arrival {
  position: static !important;
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 2px !important;
  inset: auto !important;
  margin: 0 !important;
  transform: none !important;
}

#scheduleGridSection .cell > .cell-date-header > .cell-header-actions .badge-arrival,
#scheduleGridSection .cell > .cell-date-header > .cell-header-actions .badge-departure {
  position: static !important;
  inset: auto !important;
  margin: 0 !important;
}

#scheduleGridSection .cell > .cell-date-header > .cell-header-actions > .cell-replay-link {
  position: static !important;
  inset: auto !important;
  margin: 0 !important;
  transform: none;
}

/* Desktop calendar text budget: distribute at most five title lines across
   the schedules in one date cell, truncating the first item that exceeds the
   remaining budget with an ellipsis. */
@media (min-width: 681px) {
  #scheduleGridSection .cell-tags-col.desktop-line-budget .tag.is-line-clamped .title-wrap {
    display: -webkit-box !important;
    -webkit-box-orient: vertical !important;
    -webkit-line-clamp: var(--desktop-title-lines) !important;
    max-height: calc(var(--desktop-title-lines) * 1.2em) !important;
    overflow: hidden !important;
    white-space: normal !important;
    text-overflow: ellipsis !important;
  }

  #scheduleGridSection .cell-tags-col.desktop-line-budget .tag.is-line-hidden {
    display: none !important;
  }
}

/* At narrow desktop widths, a multi-line title can become narrower than a
   character. Keep each card readable on one line and ellipsize only the
   title portion. */
@media (min-width: 681px) and (max-width: 1050px) {
  #scheduleGridSection .cell-tags-col .tag .title-wrap,
  #scheduleGridSection .cell-tags-col .tag.has-time .title-wrap,
  #scheduleGridSection .cell-tags-col.desktop-line-budget .tag.is-line-clamped .title-wrap {
    display: flex !important;
    align-items: center !important;
    width: 100% !important;
    min-width: 0 !important;
    max-height: none !important;
    overflow: hidden !important;
    white-space: nowrap !important;
    text-overflow: clip !important;
    -webkit-line-clamp: unset !important;
  }

  #scheduleGridSection .cell-tags-col .tag .t-time,
  #scheduleGridSection .cell-tags-col .tag.has-time .t-time {
    flex: 0 0 auto !important;
    display: inline-block !important;
    white-space: nowrap !important;
    margin-right: 3px !important;
  }

  #scheduleGridSection .cell-tags-col .tag .tag-title,
  #scheduleGridSection .cell-tags-col .tag.has-time .tag-title {
    display: block !important;
    flex: 1 1 auto !important;
    min-width: 0 !important;
    width: auto !important;
    overflow: hidden !important;
    white-space: nowrap !important;
    text-overflow: ellipsis !important;
    word-break: normal !important;
  }
}

/* Mobile hides schedule icons, so do not keep the desktop icon gutter.
   Keep this last so the narrow-cell container rule cannot restore it. */
@media (max-width: 680px) {
  #scheduleGridSection .cell-tags-col .tag {
    padding-left: 5px !important;
    padding-right: 5px !important;
  }
}

/* Calendar replay links live beside the date instead of consuming the cell
   body with a separate thumbnail column. */
#scheduleGridSection .date-num {
  gap: 6px !important;
}

#scheduleGridSection .cell-replay-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-width: 0;
  height: 20px;
  padding: 0 7px;
  border: 1px solid color-mix(in srgb, var(--neon-cyan) 58%, var(--border));
  border-radius: 7px;
  background: color-mix(in srgb, var(--neon-cyan) 11%, var(--bg-cell));
  color: color-mix(in srgb, var(--neon-cyan) 82%, var(--text-main));
  font-size: 9px;
  font-weight: 800;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  flex: 0 0 auto;
}

#scheduleGridSection .cell-replay-link[data-source='youtube'] {
  border-color: color-mix(in srgb, #ff3355 58%, var(--border));
  background: color-mix(in srgb, #ff3355 10%, var(--bg-cell));
  color: color-mix(in srgb, #ff3355 82%, var(--text-main));
}

#scheduleGridSection .cell-replay-link:hover,
#scheduleGridSection .cell-replay-link:focus-visible {
  filter: brightness(1.12);
  transform: translateY(-1px);
}

@container schedule-cell (max-width: 160px) {
  #scheduleGridSection .cell-replay-link {
    width: 20px;
    padding: 0;
  }

  #scheduleGridSection .cell-replay-label {
    display: none;
  }
}

@media (max-width: 680px) {
  #scheduleGridSection .date-num {
    gap: 3px !important;
  }

  #scheduleGridSection .cell-replay-link {
    width: 17px;
    height: 17px;
    padding: 0;
    border-radius: 6px;
    font-size: 8px;
  }

  #scheduleGridSection .cell-replay-label {
    display: none;
  }
}

/* Keep replay in the top-right corner of the date header.  When a travel
   badge shares that header, reserve the replay button's width on its right. */
#scheduleGridSection .cell-date-header {
  position: relative !important;
  width: 100% !important;
  --cell-replay-offset: 74px;
}

#scheduleGridSection .cell-replay-link {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 5;
}

/* A replay and a trip marker share one top-right action row.  This overrides
   the older arrival rule that returned the badge group to normal flow. */
#scheduleGridSection .cell-date-header.has-replay > .special-badges,
#scheduleGridSection .cell-date-header.has-replay > .special-badges.has-arrival {
  position: absolute !important;
  top: 0 !important;
  right: var(--cell-replay-offset) !important;
  bottom: auto !important;
  left: auto !important;
  margin: 0 !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 2px !important;
  z-index: 4 !important;
}

#scheduleGridSection .cell-date-header.has-replay > .special-badges .badge-arrival,
#scheduleGridSection .cell-date-header.has-replay > .special-badges .badge-departure {
  position: static !important;
  inset: auto !important;
}

@container schedule-cell (max-width: 160px) {
  #scheduleGridSection .cell-date-header {
    --cell-replay-offset: 24px;
  }

  #scheduleGridSection .cell-date-header.has-replay .special-badge.badge-circle {
    width: 20px !important;
    min-width: 20px !important;
    height: 20px !important;
    padding: 0 !important;
    border-radius: 7px !important;
  }

  #scheduleGridSection .cell-date-header.has-replay .special-badge.badge-circle .sp-icon {
    display: inline-block !important;
    font-size: 10px !important;
    line-height: 1 !important;
  }

  #scheduleGridSection .cell-date-header.has-replay .special-badge.badge-circle .sp-abbr,
  #scheduleGridSection .cell-date-header.has-replay .special-badge.badge-circle .sp-label,
  #scheduleGridSection .cell-date-header.has-replay .special-badge.badge-circle .sp-inner-text {
    display: none !important;
  }
}

@media (max-width: 680px) {
  #scheduleGridSection .cell-date-header {
    --cell-replay-offset: 21px;
  }

  #scheduleGridSection .cell-date-header.has-replay .special-badge.badge-circle {
    width: 17px !important;
    min-width: 17px !important;
    height: 17px !important;
    border-radius: 6px !important;
  }

  /* The narrow-cell rule used a single-line ellipsis. Mobile cards have
     vertical room, so let time and title wrap naturally inside that room. */
  #scheduleGridSection .cell-tags-col .tag .title-wrap,
  #scheduleGridSection .cell-tags-col .tag.has-time .title-wrap,
  #scheduleGridSection .cell-tags-col.desktop-line-budget .tag.is-line-clamped .title-wrap {
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
    max-height: none !important;
    overflow: visible !important;
    white-space: normal !important;
    text-overflow: clip !important;
    -webkit-line-clamp: unset !important;
    text-align: center !important;
  }

  #scheduleGridSection .cell-tags-col .tag .t-time,
  #scheduleGridSection .cell-tags-col .tag.has-time .t-time {
    display: inline !important;
    white-space: nowrap !important;
    margin-right: 3px !important;
  }

  #scheduleGridSection .cell-tags-col .tag .tag-title,
  #scheduleGridSection .cell-tags-col .tag.has-time .tag-title {
    display: inline !important;
    width: auto !important;
    min-width: 0 !important;
    overflow: visible !important;
    white-space: normal !important;
    text-overflow: clip !important;
    overflow-wrap: anywhere !important;
    word-break: normal !important;
  }
}

/* Final calendar-header layout override. Keep this at EOF so legacy mobile
   arrival/departure positioning cannot separate or overlap the action row. */
#scheduleGridSection .cell > .cell-date-header {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  width: 100% !important;
}

#scheduleGridSection .cell > .cell-date-header > .date-num {
  flex: 0 0 auto !important;
}

#scheduleGridSection .cell > .cell-date-header > .cell-header-actions {
  position: static !important;
  display: flex !important;
  flex: 0 0 auto !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 3px !important;
  min-width: 0 !important;
  margin: 0 0 0 auto !important;
  inset: auto !important;
}

#scheduleGridSection .cell > .cell-date-header > .cell-header-actions > .special-badges,
#scheduleGridSection .cell > .cell-date-header > .cell-header-actions > .special-badges.has-arrival {
  position: static !important;
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 2px !important;
  inset: auto !important;
  margin: 0 !important;
  transform: none !important;
}

#scheduleGridSection .cell > .cell-date-header > .cell-header-actions > .special-badges > .badge-arrival,
#scheduleGridSection .cell > .cell-date-header > .cell-header-actions > .special-badges > .badge-departure,
#scheduleGridSection .cell > .cell-date-header > .cell-header-actions > .special-badges.has-arrival > .badge-arrival,
#scheduleGridSection .cell > .cell-date-header > .cell-header-actions > .special-badges.has-arrival > .badge-departure {
  position: static !important;
  inset: auto !important;
  margin: 0 !important;
}

#scheduleGridSection .cell > .cell-date-header > .cell-header-actions > .cell-replay-link {
  position: static !important;
  inset: auto !important;
  margin: 0 !important;
  transform: none !important;
}

/* Narrow desktop cells keep time and title as one centered reading unit.
   Only the title is allowed to shrink and ellipsize. */
@media (min-width: 681px) {
  @container schedule-cell (max-width: 220px) {
    #scheduleGridSection .cell-tags-col .tag.has-time .title-wrap,
    #scheduleGridSection .cell-tags-col.desktop-line-budget .tag.has-time.is-line-clamped .title-wrap {
      display: flex !important;
      align-items: center !important;
      justify-content: center !important;
      width: 100% !important;
      min-width: 0 !important;
      overflow: hidden !important;
      white-space: nowrap !important;
    }

    #scheduleGridSection .cell-tags-col .tag.has-time .t-time {
      display: inline-block !important;
      flex: 0 0 auto !important;
      margin: 0 3px 0 0 !important;
      white-space: nowrap !important;
    }

    #scheduleGridSection .cell-tags-col .tag.has-time .tag-title {
      display: block !important;
      flex: 0 1 auto !important;
      width: auto !important;
      min-width: 0 !important;
      overflow: hidden !important;
      white-space: nowrap !important;
      text-overflow: ellipsis !important;
      text-align: left !important;
    }

    /* Narrow desktop cells have enough vertical room for tournament names.
       Let the complete time/title group wrap instead of truncating every
       schedule to its first few characters. */
    #scheduleGridSection .cell-tags-col .tag,
    #scheduleGridSection .cell-tags-col .tag.has-time {
      height: auto !important;
      min-height: 34px !important;
      align-items: center !important;
    }

    #scheduleGridSection .cell-tags-col .tag .title-wrap,
    #scheduleGridSection .cell-tags-col .tag.has-time .title-wrap,
    #scheduleGridSection .cell-tags-col.desktop-line-budget .tag.is-line-clamped .title-wrap {
      display: block !important;
      flex: 1 1 auto !important;
      width: 100% !important;
      max-height: none !important;
      overflow: visible !important;
      white-space: normal !important;
      text-overflow: clip !important;
      -webkit-line-clamp: unset !important;
      text-align: center !important;
      line-height: 1.12 !important;
    }

    #scheduleGridSection .cell-tags-col .tag.has-time .t-time {
      display: inline !important;
      flex: none !important;
      white-space: nowrap !important;
      margin: 0 3px 0 0 !important;
    }

    #scheduleGridSection .cell-tags-col .tag .tag-title,
    #scheduleGridSection .cell-tags-col .tag.has-time .tag-title {
      display: inline !important;
      flex: none !important;
      width: auto !important;
      max-width: 100% !important;
      overflow: visible !important;
      white-space: normal !important;
      text-overflow: clip !important;
      overflow-wrap: anywhere !important;
      word-break: keep-all !important;
      text-align: center !important;
    }
  }
}

/* Very narrow cells prioritize the schedule name.  Hide only the metadata
   inside the schedule card; date-header actions such as replay and travel
   markers remain visible. */
@container schedule-cell (max-width: 145px) {
  #scheduleGridSection .cell-tags-col .tag {
    padding-left: 5px !important;
    padding-right: 5px !important;
  }

  #scheduleGridSection .cell-tags-col .tag .tag-icon,
  #scheduleGridSection .cell-tags-col .tag .tag-abbr,
  #scheduleGridSection .cell-tags-col .tag .t-time {
    display: none !important;
  }

  #scheduleGridSection .cell-tags-col .tag .title-wrap,
  #scheduleGridSection .cell-tags-col .tag.has-time .title-wrap,
  #scheduleGridSection .cell-tags-col.desktop-line-budget .tag.is-line-clamped .title-wrap {
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
    max-height: none !important;
    overflow: visible !important;
    white-space: normal !important;
    text-overflow: clip !important;
    -webkit-line-clamp: unset !important;
    text-align: center !important;
    line-height: 1.12 !important;
  }

  #scheduleGridSection .cell-tags-col .tag .tag-title,
  #scheduleGridSection .cell-tags-col .tag.has-time .tag-title {
    display: inline !important;
    width: auto !important;
    max-width: 100% !important;
    overflow: visible !important;
    white-space: normal !important;
    text-overflow: clip !important;
    overflow-wrap: anywhere !important;
    word-break: keep-all !important;
  }
}

/* EOF override: items-2/3/4 must not split the time away from the title. */
#scheduleGridSection .tag.has-time {
  display: flex !important;
  position: relative !important;
  align-items: center !important;
  justify-content: center !important;
  overflow: hidden !important;
}

#scheduleGridSection .tag.has-time .tag-icon {
  position: absolute !important;
  left: 5px !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  margin: 0 !important;
}

#scheduleGridSection .tag.has-time .title-wrap {
  display: block !important;
  flex: 0 1 auto !important;
  width: auto !important;
  max-width: 100% !important;
  min-width: 0 !important;
  overflow: visible !important;
  white-space: normal !important;
  text-overflow: clip !important;
  text-align: center !important;
  line-height: 1.12 !important;
}

#scheduleGridSection .tag.has-time .t-time {
  display: inline !important;
  flex: none !important;
  grid-column: auto !important;
  grid-row: auto !important;
  margin: 0 3px 0 0 !important;
  white-space: nowrap !important;
}

#scheduleGridSection .tag.has-time .tag-title {
  display: inline !important;
  flex: none !important;
  width: auto !important;
  max-width: 100% !important;
  overflow: visible !important;
  white-space: normal !important;
  text-overflow: clip !important;
  overflow-wrap: anywhere !important;
  word-break: keep-all !important;
  text-align: center !important;
}

@media (max-width: 1050px) {
  #scheduleGridSection .cell-tags-col .tag.has-time {
    padding-left: 5px !important;
    padding-right: 5px !important;
  }

  #scheduleGridSection .cell-tags-col .tag.has-time .tag-icon,
  #scheduleGridSection .cell-tags-col .tag.has-time .tag-abbr {
    display: none !important;
  }

  #scheduleGridSection .cell-tags-col .tag.has-time .title-wrap {
    flex: 1 1 auto !important;
    width: 100% !important;
  }
}

/* Fold outer-screen fallback.  Samsung Browser can expose a narrower CSS
   viewport than the device width suggests, so compact the cards before the
   seven-column calendar starts stacking one character per line. */
@media (max-width: 420px) {
  body {
    padding-left: 7px !important;
    padding-right: 7px !important;
  }

  .wrap {
    padding-top: 6px !important;
  }

  .header {
    padding: 10px !important;
    border-radius: 16px !important;
  }

  h1 {
    font-size: 19px !important;
  }

  #scheduleGridSection .grid {
    gap: 3px !important;
    grid-auto-rows: minmax(104px, auto) !important;
  }

  #scheduleGridSection .cell {
    min-height: 104px !important;
    padding: 0 0 4px !important;
    border-radius: 10px !important;
  }

  #scheduleGridSection .cell-tags-col {
    gap: 4px !important;
  }

  #scheduleGridSection .cell-tags-col .tag,
  #scheduleGridSection .cell-tags-col .tag.has-time {
    min-height: 23px !important;
    padding: 3px 3px !important;
    border-left-width: 2px !important;
    border-radius: 7px !important;
    font-size: 8px !important;
    line-height: 1.1 !important;
  }

  #scheduleGridSection .cell-tags-col .tag .title-wrap,
  #scheduleGridSection .cell-tags-col .tag.has-time .title-wrap {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    overflow: hidden !important;
    white-space: nowrap !important;
    text-overflow: ellipsis !important;
    text-align: center !important;
    line-height: 1.1 !important;
  }

  #scheduleGridSection .cell-tags-col .tag .tag-title,
  #scheduleGridSection .cell-tags-col .tag.has-time .tag-title {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow: hidden !important;
    white-space: nowrap !important;
    text-overflow: ellipsis !important;
    overflow-wrap: normal !important;
    word-break: normal !important;
    text-align: center !important;
  }

  #scheduleGridSection .cell-tags-col .tag.has-time .tag-inline-time,
  #scheduleGridSection .cell-tags-col .tag.has-time .t-time {
    display: none !important;
  }

  #scheduleGridSection .cell > .cell-date-header {
    min-height: 24px !important;
    padding: 4px 5px !important;
  }

  #scheduleGridSection .cell > .cell-date-header > .date-num {
    font-size: 10px !important;
  }

  #scheduleGridSection .cell > .cell-date-header > .cell-header-actions {
    transform: scale(.86) !important;
    transform-origin: top right !important;
  }
}

/* Live header state v2 ----------------------------------------------------
   During a broadcast the header itself becomes the live call-to-action.
   The banner is in normal flow and fills the header, so it cannot float,
   escape, or overlap the normal controls at any responsive width. */
body.is-live-now .header {
  display: flex !important;
  align-items: stretch !important;
  justify-content: stretch !important;
  width: 100% !important;
  height: 92px !important;
  min-height: 92px !important;
  padding: 0 !important;
  border: 1px solid #00d98b !important;
  border-radius: 20px !important;
  background:
    radial-gradient(circle at 15% 15%, rgba(0, 255, 163, .14), transparent 38%),
    linear-gradient(105deg, #07110e 0%, #0b1915 58%, #07100e 100%) !important;
  box-shadow: 0 12px 32px rgba(0, 95, 62, .20) !important;
  overflow: hidden !important;
  box-sizing: border-box !important;
}

body.is-live-now .header > .header-left,
body.is-live-now .header > .nav {
  display: none !important;
}

body.is-live-now .header > .live-banner.show {
  position: relative !important;
  inset: auto !important;
  z-index: 1 !important;
  display: grid !important;
  flex: 1 1 auto !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: none !important;
  height: 100% !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  grid-area: auto !important;
  grid-template-columns: minmax(0, 1fr) clamp(230px, 38%, 430px) !important;
  align-items: stretch !important;
  gap: 0 !important;
  border: 0 !important;
  border-radius: inherit !important;
  background: transparent !important;
  box-shadow: none !important;
  overflow: hidden !important;
  box-sizing: border-box !important;
  transform: none !important;
}

body.is-live-now .header > .live-banner.show .lb-copy {
  padding-right: 14px !important;
  padding-left: 14px !important;
}

body.is-live-now .header > .live-banner.show .lb-copy > strong {
  font-size: clamp(15px, 1.1vw, 19px) !important;
}

body.is-live-now .header > .live-banner.show::after {
  background: linear-gradient(90deg, transparent 45%, rgba(7, 17, 14, .32) 59%, transparent 76%) !important;
}

body.is-live-now .header .lb-short {
  display: none;
}

@media (max-width: 900px) {
  body.is-live-now .header {
    height: 112px !important;
    min-height: 112px !important;
    border-radius: 18px !important;
  }

  body.is-live-now .header > .live-banner.show {
    grid-template-columns: minmax(0, 1fr) minmax(180px, 42%) !important;
  }

  body.is-live-now .header .lb-title {
    display: none !important;
  }
}

@media (max-width: 680px) {
  body.is-live-now .header {
    height: 108px !important;
    min-height: 108px !important;
    border-radius: 16px !important;
  }

  body.is-live-now .header > .live-banner.show {
    grid-template-columns: minmax(0, 1fr) minmax(132px, 44%) !important;
  }
}

@media (max-width: 420px) {
  body.is-live-now .header {
    height: 104px !important;
    min-height: 104px !important;
    border-radius: 15px !important;
  }

  body.is-live-now .header > .live-banner.show {
    grid-template-columns: minmax(0, 1fr) 48% !important;
  }

  body.is-live-now .header .lb-full {
    display: none !important;
  }

  body.is-live-now .header .lb-short {
    display: inline !important;
  }
}

/* Keep emoji, raster icons, SVGs, and the ONSYDE mark on the same optical
   baseline. The wrapper owns the box; each asset is centered inside it. */
#scheduleGridSection .tag .tag-icon {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 13px !important;
  min-width: 13px !important;
  height: 13px !important;
  margin: 0 2px 0 0 !important;
  line-height: 1 !important;
  vertical-align: middle !important;
  flex: 0 0 13px !important;
}

#scheduleGridSection .tag .tag-icon > img,
#scheduleGridSection .tag .tag-icon > svg {
  display: block !important;
  width: 11px !important;
  height: 11px !important;
  margin: 0 !important;
  object-fit: contain !important;
  vertical-align: middle !important;
}

#scheduleGridSection .tag .tag-icon > .onsyde-event-logo {
  width: 13px !important;
  height: 13px !important;
  margin: 0 !important;
}

/* Compact ONSYDE switch: match the surrounding controls at every breakpoint. */
.schedule-switch-link {
  --onsyde-switch-size: 34px;
  --onsyde-logo-width: 42px;
  --onsyde-logo-crop-height: 24px;
  width: var(--onsyde-switch-size) !important;
  height: var(--onsyde-switch-size) !important;
  min-width: var(--onsyde-switch-size) !important;
  padding: 0 !important;
  border: 1px solid rgba(57, 242, 127, .48) !important;
  border-radius: 11px !important;
  background: rgba(57, 242, 127, .08) !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
  flex: 0 0 var(--onsyde-switch-size) !important;
  text-decoration: none !important;
}

.schedule-switch-link:hover {
  border-color: #39f27f !important;
  background: rgba(57, 242, 127, .15) !important;
  transform: translateY(-1px);
}

.schedule-switch-logo-crop {
  position: relative;
  display: block;
  width: calc(var(--onsyde-logo-width) * .56);
  height: var(--onsyde-logo-crop-height);
  overflow: hidden;
  flex: 0 0 auto;
}

.schedule-switch-logo {
  position: absolute;
  top: 0;
  left: 50%;
  width: var(--onsyde-logo-width);
  max-width: none;
  height: auto;
  transform: translateX(-50%);
  pointer-events: none;
}

.schedule-switch-logo-light { display: none; }
:root[data-theme="light"] .schedule-switch-logo-dark { display: none; }
:root[data-theme="light"] .schedule-switch-logo-light { display: block; }

@media (max-width: 900px) {
  .schedule-switch-link {
    --onsyde-switch-size: 30px;
    --onsyde-logo-width: 37px;
    --onsyde-logo-crop-height: 21px;
    border-radius: 9px !important;
  }
}

@media (max-width: 380px) {
  .schedule-switch-link {
    --onsyde-switch-size: 32px;
    --onsyde-logo-width: 40px;
    --onsyde-logo-crop-height: 23px;
  }
}

@media (max-width: 340px) {
  .nav {
    gap: 1px !important;
  }

  .nav button,
  .nav .today-btn,
  .theme-toggle-inline,
  .view-toggle {
    height: 28px !important;
  }

  .nav button,
  .theme-toggle-inline {
    width: 28px !important;
  }

  .view-toggle button,
  .nav .today-btn {
    padding-right: 5px !important;
    padding-left: 5px !important;
  }

  .month-label {
    min-width: 56px !important;
    margin: 0 !important;
  }

  #themeToggleBtn {
    width: 28px !important;
    height: 28px !important;
    margin-left: 0 !important;
  }

  .schedule-switch-link {
    --onsyde-switch-size: 28px;
    --onsyde-logo-width: 35px;
    --onsyde-logo-crop-height: 20px;
    border-radius: 8px !important;
  }
}

/* Protect two-digit dates when a narrow cell has both travel and replay
   actions. The date never shrinks; actions use the remaining column and wrap
   inside that column if the cell cannot fit them on one row. */
@media (max-width: 412px) {
@container schedule-cell (max-width: 115px) {
  #scheduleGridSection .cell > .cell-date-header {
    display: grid !important;
    grid-template-columns: auto 17px !important;
    column-gap: 3px !important;
    align-items: start !important;
    justify-content: initial !important;
  }

  #scheduleGridSection .cell > .cell-date-header > .date-num {
    min-width: max-content !important;
    flex: none !important;
    white-space: nowrap !important;
  }

  #scheduleGridSection .cell > .cell-date-header > .cell-header-actions {
    position: relative !important;
    display: block !important;
    width: 17px !important;
    height: 17px !important;
    min-width: 17px !important;
    max-width: 17px !important;
    flex: 0 0 17px !important;
    overflow: visible !important;
  }

  #scheduleGridSection .cell > .cell-date-header > .cell-header-actions > .special-badges,
  #scheduleGridSection .cell > .cell-date-header > .cell-header-actions > .special-badges.has-arrival {
    position: static !important;
    display: flex !important;
    width: 17px !important;
    height: 17px !important;
    min-width: 17px !important;
    max-width: 17px !important;
    flex: 0 0 17px !important;
    align-items: center !important;
    justify-content: center !important;
    flex-wrap: nowrap !important;
    gap: 0 !important;
  }

  #scheduleGridSection .cell > .cell-date-header > .cell-header-actions .special-badge {
    display: inline-flex !important;
    width: 17px !important;
    min-width: 17px !important;
    max-width: 17px !important;
    height: 17px !important;
    padding: 0 !important;
    border-radius: 5px !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 0 !important;
    line-height: 1 !important;
  }

  #scheduleGridSection .cell > .cell-date-header > .cell-header-actions .special-badge .sp-icon {
    display: inline-block !important;
    font-size: 9px !important;
    line-height: 1 !important;
  }

  #scheduleGridSection .cell > .cell-date-header > .cell-header-actions .special-badge .sp-abbr,
  #scheduleGridSection .cell > .cell-date-header > .cell-header-actions .special-badge .sp-label,
  #scheduleGridSection .cell > .cell-date-header > .cell-header-actions .special-badge .sp-inner-text {
    display: none !important;
  }

  #scheduleGridSection .cell > .cell-date-header > .cell-header-actions > .cell-replay-link {
    position: static !important;
    display: inline-flex !important;
    flex: 0 0 17px !important;
    width: 17px !important;
    min-width: 17px !important;
    height: 17px !important;
    padding: 0 !important;
  }

  /* When travel and replay share the action slot, replay becomes a tiny
     corner marker instead of creating a second header row. */
  #scheduleGridSection .cell > .cell-date-header > .cell-header-actions.has-special-action > .cell-replay-link {
    position: absolute !important;
    right: -2px !important;
    bottom: -2px !important;
    width: 9px !important;
    min-width: 9px !important;
    height: 9px !important;
    border-radius: 3px !important;
    font-size: 0 !important;
    z-index: 6 !important;
  }

  #scheduleGridSection .cell > .cell-date-header > .cell-header-actions.has-special-action > .cell-replay-link .cell-replay-icon {
    font-size: 6px !important;
    line-height: 1 !important;
  }
}
}

@media (max-width: 380px) {
  #scheduleGridSection .cell-tags-col .tag.has-time .t-time {
    display: none !important;
  }
}

/* Final narrow-calendar fallback.  Some browser zoom/crop combinations do
   not report the container width consistently, so the viewport rule must
   also remove metadata before it can cover the schedule title. */
@media (max-width: 1050px) {
  #scheduleGridSection .cell-tags-col .tag {
    padding-left: 5px !important;
    padding-right: 5px !important;
  }

  #scheduleGridSection .cell-tags-col .tag .tag-icon,
  #scheduleGridSection .cell-tags-col .tag .tag-abbr,
  #scheduleGridSection .cell-tags-col .tag .t-time {
    display: none !important;
  }

  #scheduleGridSection .cell-tags-col .tag .title-wrap,
  #scheduleGridSection .cell-tags-col .tag.has-time .title-wrap,
  #scheduleGridSection .cell-tags-col.desktop-line-budget .tag.is-line-clamped .title-wrap {
    display: block !important;
    flex: 1 1 auto !important;
    width: 100% !important;
    min-width: 0 !important;
    max-height: none !important;
    overflow: visible !important;
    white-space: normal !important;
    text-overflow: clip !important;
    -webkit-line-clamp: unset !important;
    text-align: center !important;
    line-height: 1.12 !important;
  }

  #scheduleGridSection .cell-tags-col .tag .tag-title,
  #scheduleGridSection .cell-tags-col .tag.has-time .tag-title {
    display: inline !important;
    width: auto !important;
    max-width: 100% !important;
    overflow: visible !important;
    white-space: normal !important;
    text-overflow: clip !important;
    overflow-wrap: anywhere !important;
    word-break: keep-all !important;
  }
}

/* Absolute final override: timed schedule text stays in one inline group
   even for items-2/items-3/items-4. */
#scheduleGridSection .cell-tags-col .tag.has-time {
  display: flex !important;
  position: relative !important;
  align-items: center !important;
  justify-content: center !important;
  overflow: hidden !important;
}

#scheduleGridSection .cell-tags-col .tag.has-time .tag-icon {
  position: absolute !important;
  left: 5px !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  margin: 0 !important;
}

#scheduleGridSection .cell-tags-col .tag.has-time .title-wrap {
  display: block !important;
  flex: 0 1 auto !important;
  width: auto !important;
  max-width: 100% !important;
  min-width: 0 !important;
  overflow: hidden !important;
  white-space: normal !important;
  text-overflow: clip !important;
  text-align: center !important;
  line-height: 1.12 !important;
}

#scheduleGridSection .cell-tags-col .tag.has-time .t-time {
  display: inline !important;
  flex: none !important;
  grid-column: auto !important;
  grid-row: auto !important;
  position: static !important;
  margin: 0 3px 0 0 !important;
  white-space: nowrap !important;
  vertical-align: baseline !important;
}

/* Time is part of the title's reading group. Keep the whole time token
   together so a narrow card can never leave only the final "M" visible. */
#scheduleGridSection .cell-tags-col .tag.has-time .tag-inline-time {
  display: inline-block !important;
  flex: none !important;
  position: static !important;
  margin: 0 3px 0 0 !important;
  color: var(--tag-color) !important;
  font: inherit !important;
  line-height: inherit !important;
  white-space: nowrap !important;
  vertical-align: baseline !important;
}

#scheduleGridSection .cell-tags-col .tag.has-time .tag-title {
  display: inline !important;
  flex: none !important;
  width: auto !important;
  max-width: 100% !important;
  overflow: visible !important;
  white-space: normal !important;
  text-overflow: clip !important;
  overflow-wrap: break-word !important;
  word-break: keep-all !important;
  text-align: center !important;
  vertical-align: baseline !important;
}

@media (max-width: 1050px) {
  #scheduleGridSection .cell-tags-col .tag.has-time {
    padding-left: 5px !important;
    padding-right: 5px !important;
  }

  #scheduleGridSection .cell-tags-col .tag.has-time .tag-icon,
  #scheduleGridSection .cell-tags-col .tag.has-time .tag-abbr {
    display: none !important;
  }

  #scheduleGridSection .cell-tags-col .tag.has-time .title-wrap {
    flex: 1 1 auto !important;
    width: 100% !important;
    white-space: normal !important;
    text-overflow: clip !important;
  }
}

/* Fold outer-screen final layout. A seven-column calendar leaves roughly
   48px per day at this viewport, so metadata is removed and titles use a
   predictable multi-line clamp. This avoids both one-letter columns and
   one-line labels that reveal only the first few characters. */
@media (max-width: 420px) {
  #scheduleGridSection .cell-tags-col {
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: stretch !important;
    gap: 3px !important;
    padding: 2px !important;
  }

  #scheduleGridSection .cell-tags-col .tag,
  #scheduleGridSection .cell-tags-col .tag.has-time {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    min-height: 22px !important;
    height: auto !important;
    padding: 3px 2px !important;
    font-size: 7.5px !important;
    line-height: 1.12 !important;
  }

  #scheduleGridSection .cell-tags-col .tag .tag-icon,
  #scheduleGridSection .cell-tags-col .tag .tag-abbr,
  #scheduleGridSection .cell-tags-col .tag .t-time,
  #scheduleGridSection .cell-tags-col .tag .tag-inline-time {
    display: none !important;
  }

  #scheduleGridSection .cell-tags-col .tag .title-wrap,
  #scheduleGridSection .cell-tags-col .tag.has-time .title-wrap,
  #scheduleGridSection .cell-tags-col.desktop-line-budget .tag.is-line-clamped .title-wrap {
    display: -webkit-box !important;
    flex: none !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    max-height: calc(3 * 1.12em) !important;
    overflow: hidden !important;
    white-space: normal !important;
    text-overflow: ellipsis !important;
    -webkit-box-orient: vertical !important;
    -webkit-line-clamp: 3 !important;
    text-align: center !important;
    overflow-wrap: anywhere !important;
    word-break: keep-all !important;
  }

  #scheduleGridSection .cell-tags-col.items-1 .tag .title-wrap {
    max-height: calc(5 * 1.12em) !important;
    -webkit-line-clamp: 5 !important;
  }

  #scheduleGridSection .cell-tags-col.items-3 .tag .title-wrap,
  #scheduleGridSection .cell-tags-col.items-4 .tag .title-wrap {
    max-height: calc(2 * 1.12em) !important;
    -webkit-line-clamp: 2 !important;
  }

  #scheduleGridSection .cell-tags-col .tag .tag-title,
  #scheduleGridSection .cell-tags-col .tag.has-time .tag-title {
    display: inline !important;
    width: auto !important;
    max-width: 100% !important;
    overflow: visible !important;
    white-space: normal !important;
    text-overflow: clip !important;
    overflow-wrap: anywhere !important;
    word-break: keep-all !important;
  }
}

/* Apply the shared five-line budget on Fold/mobile widths as well. */
@media (max-width: 420px) {
  #scheduleGridSection .cell-tags-col.desktop-line-budget .tag.is-line-clamped .title-wrap {
    display: -webkit-box !important;
    max-height: calc(var(--desktop-title-lines) * 1.12em) !important;
    overflow: hidden !important;
    -webkit-box-orient: vertical !important;
    -webkit-line-clamp: var(--desktop-title-lines) !important;
    text-overflow: ellipsis !important;
  }
}

/* Final ONSYDE skin: calendar/list responsive rules above must never turn a
   team event back into a regular pastel personal-event card. */
:root #scheduleGridSection .tag.onsyde-tag,
:root .schedule-tag.onsyde-tag,
:root .agenda-tag.onsyde-tag {
  border: 1px solid #245b3a !important;
  border-left: 6px solid #527a38 !important;
  border-bottom-color: #1d4c30 !important;
  border-radius: 3px 11px 3px 11px !important;
  background:
    linear-gradient(135deg, rgba(82, 122, 56, .13) 0 11px, transparent 11px),
    repeating-linear-gradient(135deg, rgba(45, 105, 67, .025) 0 3px, transparent 3px 9px),
    linear-gradient(100deg, #040705 0%, #09120d 62%, #050906 100%) !important;
  color: #c8d3cb !important;
  box-shadow: inset 0 0 0 1px rgba(82, 122, 56, .06) !important;
}

:root #scheduleGridSection .tag.onsyde-tag .tag-title,
:root #scheduleGridSection .tag.onsyde-tag .title-wrap,
:root .schedule-tag.onsyde-tag .marquee-text,
:root .agenda-tag.onsyde-tag > span {
  color: #c8d3cb !important;
}

:root #scheduleGridSection .tag.onsyde-tag .tag-inline-time,
:root #scheduleGridSection .tag.onsyde-tag .tag-icon,
:root #scheduleGridSection .tag.onsyde-tag .tag-abbr,
:root .schedule-tag.onsyde-tag .tag-inline-time,
:root .agenda-tag.onsyde-tag .tag-inline-time {
  color: #789c55 !important;
}

:root .entry.onsyde-entry {
  border: 1px solid #245b3a !important;
  border-left: 6px solid #527a38 !important;
  border-radius: 3px 12px 3px 12px !important;
  background:
    repeating-linear-gradient(135deg, rgba(45, 105, 67, .025) 0 3px, transparent 3px 9px),
    linear-gradient(100deg, #040705, #09120d) !important;
  color: #c8d3cb !important;
  box-shadow: inset 0 0 0 1px rgba(82, 122, 56, .06) !important;
}

/* ONSYDE events use the team symbol rather than the generic StarCraft II icon.
   Crop the wordmark from the source logo so it stays legible at tag size. */
.onsyde-event-logo {
  position: relative;
  display: inline-block;
  width: 13px;
  height: 13px;
  overflow: hidden;
  flex: 0 0 13px;
  vertical-align: -2px;
}

.onsyde-event-logo > img {
  position: absolute;
  top: 0;
  left: 50%;
  width: 22px !important;
  height: auto !important;
  max-width: none !important;
  margin: 0 !important;
  transform: translateX(-50%);
  object-fit: initial !important;
  border-radius: 0 !important;
}

.tag.onsyde-tag .tag-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 13px;
}

/* A team match that is also on CranK's personal broadcast schedule gets the
   full neon ONSYDE identity. Team-only events above intentionally stay muted. */
:root #scheduleGridSection .tag.onsyde-personal-tag,
:root .schedule-tag.onsyde-personal-tag {
  border-color: #39f27f !important;
  border-left-color: #b6f23d !important;
  border-bottom-color: #1fbd5a !important;
  background:
    linear-gradient(225deg, #39f27f 0 7px, transparent 7px),
    linear-gradient(135deg, rgba(182, 242, 61, .20) 0 11px, transparent 11px),
    repeating-linear-gradient(135deg, rgba(57, 242, 127, .05) 0 3px, transparent 3px 9px),
    linear-gradient(100deg, #030705 0%, #102b1c 60%, #06110a 100%) !important;
  box-shadow:
    inset 0 0 0 1px rgba(182, 242, 61, .13),
    0 0 0 1px rgba(57, 242, 127, .12) !important;
}

:root #scheduleGridSection .tag.onsyde-personal-tag .tag-title,
:root #scheduleGridSection .tag.onsyde-personal-tag .title-wrap,
:root .schedule-tag.onsyde-personal-tag .marquee-text {
  color: #f7fff9 !important;
}

:root #scheduleGridSection .tag.onsyde-personal-tag .tag-inline-time,
:root #scheduleGridSection .tag.onsyde-personal-tag .tag-icon,
:root #scheduleGridSection .tag.onsyde-personal-tag .tag-abbr,
:root .schedule-tag.onsyde-personal-tag .tag-inline-time {
  color: #b6f23d !important;
}

:root .entry.onsyde-personal-entry {
  border-color: #39f27f !important;
  border-left-color: #b6f23d !important;
  border-bottom-color: #1fbd5a !important;
  background:
    linear-gradient(225deg, #39f27f 0 7px, transparent 7px),
    repeating-linear-gradient(135deg, rgba(57, 242, 127, .05) 0 3px, transparent 3px 9px),
    linear-gradient(100deg, #030705, #102b1c) !important;
  color: #f7fff9 !important;
  box-shadow:
    inset 0 0 0 1px rgba(182, 242, 61, .13),
    0 0 0 1px rgba(57, 242, 127, .12) !important;
}

/* Final live-state layout --------------------------------------------------
   The live card is an overlay of the header itself, not another responsive
   grid item. Its outer bounds therefore always follow the header at every
   viewport width. Keep this block at EOF so it wins over legacy live rules. */
.header {
  isolation: isolate;
}

/* Do not leave the normal header UI underneath the live cover.  This keeps
   the result deterministic even when a narrow/wide legacy header rule wins
   elsewhere in the stylesheet. */
body.is-live-now .header > .header-left,
body.is-live-now .header > .nav {
  visibility: hidden !important;
  pointer-events: none !important;
}

body.is-live-now .header > .live-banner,
.header > .live-banner {
  position: absolute !important;
  inset: -1px !important;
  z-index: 20 !important;
  width: calc(100% + 2px) !important;
  min-width: 0 !important;
  max-width: none !important;
  height: calc(100% + 2px) !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  grid-area: auto !important;
  grid-template-columns: minmax(0, 1fr) clamp(230px, 38%, 430px) !important;
  align-items: stretch !important;
  gap: 0 !important;
  border: 1px solid #00d98b !important;
  border-radius: inherit !important;
  background:
    radial-gradient(circle at 18% 20%, rgba(0, 255, 163, .15), transparent 35%),
    linear-gradient(105deg, #07110e 0%, #0b1915 58%, #07100e 100%) !important;
  box-shadow: 0 12px 32px rgba(0, 95, 62, .22) !important;
  overflow: hidden !important;
  box-sizing: border-box !important;
  transform: none !important;
}

body.is-live-now .header > .live-banner.show,
.header > .live-banner.show {
  display: grid !important;
}

.header > .live-banner:hover {
  border-color: #00ffa3 !important;
  transform: none !important;
}

.header > .live-banner::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(90deg, transparent 46%, rgba(7, 17, 14, .3) 58%, transparent 72%);
  pointer-events: none;
}

.header > .live-banner .lb-copy {
  position: relative !important;
  inset: auto !important;
  z-index: 2 !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  justify-content: center !important;
  gap: 4px !important;
  min-width: 0 !important;
  padding: 14px 22px !important;
  color: #f5fff9 !important;
  background: none !important;
  white-space: normal !important;
  pointer-events: none !important;
}

.header > .live-banner .lb-status {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  margin: 0 !important;
  color: #52f5ad !important;
  font: 900 10px/1 'Paperozi', sans-serif !important;
  letter-spacing: .1em !important;
}

.header > .live-banner .lb-dot {
  width: 7px !important;
  height: 7px !important;
  flex: 0 0 7px !important;
  background: #00ffa3 !important;
  box-shadow: 0 0 0 4px rgba(0, 255, 163, .11) !important;
}

.header > .live-banner .lb-copy > strong {
  display: block !important;
  max-width: 100% !important;
  color: #fff !important;
  font: 900 clamp(17px, 1.45vw, 24px)/1.08 'Cafe24Surround','Paperozi',sans-serif !important;
  letter-spacing: -.025em !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

.header > .live-banner .lb-title {
  display: block !important;
  max-width: 100% !important;
  margin: 0 !important;
  color: rgba(230, 244, 236, .72) !important;
  font: 700 10px/1.15 'Paperozi', sans-serif !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

.header > .live-banner img {
  position: relative !important;
  z-index: 0 !important;
  display: block !important;
  width: 100% !important;
  min-width: 0 !important;
  height: 100% !important;
  min-height: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  object-fit: cover !important;
  object-position: center !important;
}

@media (max-width: 900px) {
  .header > .live-banner {
    grid-template-columns: minmax(0, 1fr) minmax(190px, 40%) !important;
  }

  .header > .live-banner .lb-copy {
    padding: 13px 18px !important;
  }
}

@media (max-width: 680px) {
  .header > .live-banner {
    grid-template-columns: minmax(0, 1fr) minmax(118px, 42%) !important;
  }

  .header > .live-banner .lb-copy {
    display: flex !important;
    gap: 4px !important;
    padding: 11px 13px !important;
  }

  .header > .live-banner .lb-copy > strong {
    font-size: clamp(14px, 4.2vw, 18px) !important;
  }

  .header > .live-banner .lb-title {
    font-size: 9px !important;
  }
}

@media (max-width: 420px) {
  .header > .live-banner {
    grid-template-columns: minmax(0, 1fr) 42% !important;
  }

  .header > .live-banner .lb-copy {
    display: flex !important;
    padding: 10px 11px !important;
  }

  .header > .live-banner .lb-copy > strong {
    font-size: 13px !important;
  }

  .header > .live-banner .lb-title {
    display: none !important;
  }

  .header > .live-banner .lb-status {
    font-size: 8px !important;
    letter-spacing: .06em !important;
  }
}

/* Live header state v3 ----------------------------------------------------
   Replace only the brand area while keeping every original navigation
   control available. Narrow screens use two explicit rows, so the live
   content and controls never compete for the same horizontal space. */
body.is-live-now .header {
  display: grid !important;
  grid-template-columns: minmax(250px, 1fr) auto !important;
  grid-template-areas: 'live nav' !important;
  align-items: center !important;
  justify-content: stretch !important;
  width: 100% !important;
  height: auto !important;
  min-height: 92px !important;
  padding: 9px !important;
  gap: 10px !important;
  border: 1px solid #00d98b !important;
  border-radius: 20px !important;
  background:
    radial-gradient(circle at 15% 15%, rgba(0, 255, 163, .12), transparent 38%),
    linear-gradient(105deg, #07110e 0%, #0b1915 58%, #07100e 100%) !important;
  box-shadow: 0 12px 32px rgba(0, 95, 62, .20) !important;
  overflow: hidden !important;
  box-sizing: border-box !important;
}

body.is-live-now .header > .header-left {
  display: none !important;
}

body.is-live-now .header > .nav {
  grid-area: nav !important;
  display: flex !important;
  visibility: visible !important;
  pointer-events: auto !important;
  width: auto !important;
  min-width: 0 !important;
  justify-content: flex-end !important;
  padding: 0 !important;
  border: 0 !important;
  gap: 5px !important;
}

body.is-live-now .header > .live-banner.show {
  position: relative !important;
  inset: auto !important;
  z-index: 1 !important;
  grid-area: live !important;
  display: grid !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: none !important;
  height: 72px !important;
  min-height: 72px !important;
  margin: 0 !important;
  padding: 0 !important;
  grid-template-columns: minmax(0, 1fr) clamp(190px, 40%, 360px) !important;
  align-items: stretch !important;
  gap: 0 !important;
  border: 1px solid rgba(0, 255, 163, .32) !important;
  border-radius: 13px !important;
  background: rgba(1, 9, 6, .34) !important;
  box-shadow: none !important;
  overflow: hidden !important;
  box-sizing: border-box !important;
  transform: none !important;
}

body.is-live-now .header > .nav button,
body.is-live-now .header > .nav .theme-toggle-inline,
body.is-live-now .header > .nav .view-toggle,
body.is-live-now .header > .nav .today-btn,
body.is-live-now .header .schedule-switch-link {
  border-color: rgba(117, 255, 189, .27) !important;
  background: rgba(255, 255, 255, .06) !important;
  color: #f4fff8 !important;
}

body.is-live-now .header > .nav .view-toggle button.active {
  background: #00b978 !important;
  color: #fff !important;
}

body.is-live-now .header > .nav .month-label {
  color: #f4fff8 !important;
}

body.is-live-now .header > .nav #themeToggleBtn {
  margin-left: 0 !important;
}

@media (max-width: 900px) {
  body.is-live-now .header {
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-areas:
      'live'
      'nav' !important;
    min-height: 0 !important;
    padding: 8px !important;
    gap: 8px !important;
    border-radius: 18px !important;
  }

  body.is-live-now .header > .live-banner.show {
    height: 72px !important;
    min-height: 72px !important;
    grid-template-columns: minmax(0, 1fr) minmax(180px, 42%) !important;
  }

  body.is-live-now .header > .nav {
    width: 100% !important;
    justify-content: space-between !important;
    padding-top: 8px !important;
    border-top: 1px solid rgba(117, 255, 189, .19) !important;
    box-sizing: border-box !important;
  }
}

@media (max-width: 680px) {
  body.is-live-now .header > .live-banner.show {
    grid-template-columns: minmax(0, 1fr) minmax(132px, 44%) !important;
  }
}

@media (max-width: 420px) {
  body.is-live-now .header {
    padding: 7px !important;
    gap: 7px !important;
    border-radius: 15px !important;
  }

  body.is-live-now .header > .live-banner.show {
    height: 68px !important;
    min-height: 68px !important;
    grid-template-columns: minmax(0, 1fr) 48% !important;
  }

  body.is-live-now .header > .nav {
    gap: 2px !important;
    padding-top: 7px !important;
  }
}

/* The icon and title occupy one centered group, rather than centering text
   inside a full-width flex child (which makes their apparent gap vary). */
@media (min-width: 1001px) {
  #scheduleGridSection .cell-tags-col .tag:not(.onsyde-labelled) {
    justify-content: center !important;
    gap: 2px !important;
    padding-left: 5px !important;
  }
  #scheduleGridSection .cell-tags-col .tag:not(.onsyde-labelled) .tag-icon {
    position: static !important;
    inset: auto !important;
    transform: none !important;
    flex: 0 0 13px !important;
  }
  #scheduleGridSection .cell-tags-col .tag:not(.onsyde-labelled) .title-wrap {
    flex: 0 1 auto !important;
    width: auto !important;
    max-width: calc(100% - 17px) !important;
  }
}

/* Fold inner screens: icon flows with the first line of the schedule text.
   Narrow phone layouts retain their existing text-first treatment. */
@media (min-width: 461px) and (max-width: 1050px),
       (min-width: 421px) and (max-width: 460px) and (min-aspect-ratio: 4/5) {
 @container schedule-cell (min-width: 48px) {
  #scheduleGridSection .cell-tags-col .tag:not(.onsyde-labelled),
  #scheduleGridSection .cell-tags-col .tag.has-time:not(.onsyde-labelled) {
    display: block !important;
    align-content: center !important;
    text-align: center !important;
    padding-left: 5px !important;
    padding-right: 5px !important;
  }

  #scheduleGridSection .cell-tags-col .tag:not(.onsyde-labelled) .tag-icon,
  #scheduleGridSection .cell-tags-col .tag.has-time:not(.onsyde-labelled) .tag-icon {
    display: inline-flex !important;
    position: static !important;
    inset: auto !important;
    transform: none !important;
    width: 10px !important;
    min-width: 10px !important;
    height: 10px !important;
    margin: 0 2px 0 0 !important;
    vertical-align: -1px !important;
  }

  #scheduleGridSection .cell-tags-col .tag:not(.onsyde-labelled) .tag-icon > img,
  #scheduleGridSection .cell-tags-col .tag:not(.onsyde-labelled) .tag-icon > svg {
    width: 10px !important;
    height: 10px !important;
  }

  #scheduleGridSection .cell-tags-col .tag:not(.onsyde-labelled) .tag-icon:empty {
    display: none !important;
  }

  #scheduleGridSection .cell-tags-col .tag:not(.onsyde-labelled) .title-wrap,
  #scheduleGridSection .cell-tags-col .tag.has-time:not(.onsyde-labelled) .title-wrap,
  #scheduleGridSection .cell-tags-col.desktop-line-budget .tag.is-line-clamped:not(.onsyde-labelled) .title-wrap {
    display: inline !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    overflow: visible !important;
    white-space: normal !important;
  }

  /* At larger mobile zoom levels, keep the icon and a time such as 6:30PM
     together on the first line without squeezing the remaining title. */
  @media (max-width: 560px) {
    #scheduleGridSection .cell-tags-col .tag:not(.onsyde-labelled),
    #scheduleGridSection .cell-tags-col .tag.has-time:not(.onsyde-labelled) {
      padding-left: 1px !important;
      padding-right: 1px !important;
    }
    #scheduleGridSection .cell-tags-col .tag:not(.onsyde-labelled) .tag-icon,
    #scheduleGridSection .cell-tags-col .tag.has-time:not(.onsyde-labelled) .tag-icon {
      width: 8px !important;
      min-width: 8px !important;
      height: 8px !important;
      margin-right: 0 !important;
    }
    #scheduleGridSection .cell-tags-col .tag:not(.onsyde-labelled) .tag-icon > img,
    #scheduleGridSection .cell-tags-col .tag:not(.onsyde-labelled) .tag-icon > svg {
      width: 8px !important;
      height: 8px !important;
    }
    #scheduleGridSection .cell-tags-col .tag.has-time:not(.onsyde-labelled) .tag-inline-time {
      margin-right: 1px !important;
    }
  }
  @media (max-width: 460px) {
    #scheduleGridSection .cell-tags-col .tag:not(.onsyde-labelled) .tag-icon,
    #scheduleGridSection .cell-tags-col .tag.has-time:not(.onsyde-labelled) .tag-icon {
      width: 7px !important;
      min-width: 7px !important;
      height: 7px !important;
    }
    #scheduleGridSection .cell-tags-col .tag:not(.onsyde-labelled) .tag-icon > img,
    #scheduleGridSection .cell-tags-col .tag:not(.onsyde-labelled) .tag-icon > svg {
      width: 7px !important;
      height: 7px !important;
    }
    #scheduleGridSection .cell-tags-col .tag.has-time:not(.onsyde-labelled) .tag-inline-time {
      font-size: 7px !important;
      margin-right: 0 !important;
    }
  }
 }
}

/* Shared icon slot for list rows, modal entries and preset chips. */
.schedule-inline-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 13px;
  height: 13px;
  margin-right: 4px;
  overflow: hidden;
  line-height: 1;
  vertical-align: -2px;
}
.schedule-inline-icon > img,
.schedule-inline-icon > svg {
  display: block !important;
  width: 11px !important;
  height: 11px !important;
  margin: 0 !important;
  object-fit: contain !important;
}
.schedule-inline-icon > .onsyde-event-logo {
  width: 13px !important;
  height: 13px !important;
  margin: 0 !important;
}

/* Replay source is visible before opening the link, including on tiny cells. */
#scheduleGridSection .cell-replay-link[data-source='youtube'] {
  background: #d8243d !important;
  border-color: #ff7585 !important;
  color: #fff !important;
  box-shadow: 0 1px 5px rgba(216, 36, 61, .28) !important;
}
#scheduleGridSection .cell-replay-link[data-source='chzzk'] {
  background: #061b14 !important;
  border-color: #00d995 !important;
  color: #00ffa3 !important;
  box-shadow: 0 1px 5px rgba(0, 180, 123, .3) !important;
}
#scheduleGridSection .cell-replay-link .cell-replay-icon {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 14px !important;
  height: 14px !important;
  flex: 0 0 14px !important;
}
#scheduleGridSection .cell-replay-link .cell-replay-icon img {
  display: block !important;
  width: 14px !important;
  height: 14px !important;
  object-fit: contain !important;
}
#scheduleGridSection .cell-replay-link[data-source='chzzk'] .cell-replay-icon img {
  mix-blend-mode: screen;
}
#scheduleGridSection .cell-replay-link .cell-replay-label {
  font-size: 9px !important;
  font-weight: 900 !important;
}

.timeline-yt[data-source='youtube'] {
  border: 2px solid #e22b42 !important;
  background: #30080f !important;
  box-shadow: 0 0 0 1px rgba(226, 43, 66, .2) !important;
}
.timeline-yt[data-source='chzzk'] {
  border: 2px solid #00db96 !important;
  background: #06281e !important;
  box-shadow: 0 0 0 1px rgba(0, 219, 150, .2) !important;
}
.timeline-yt[data-source]::before {
  content: attr(data-source-label) !important;
  top: 4px !important;
  bottom: auto !important;
  left: 4px !important;
  right: auto !important;
  z-index: 3 !important;
  padding: 3px 5px !important;
  border: 1px solid transparent !important;
  border-radius: 5px !important;
  font-size: 9px !important;
  font-weight: 900 !important;
  line-height: 1 !important;
  box-shadow: 0 1px 5px rgba(0, 0, 0, .35) !important;
}
.timeline-yt[data-source='youtube']::before {
  background: #d8243d !important;
  border-color: #ff7585 !important;
  color: #fff !important;
}
.timeline-yt[data-source='chzzk']::before {
  background: #06281e !important;
  border-color: #00d995 !important;
  color: #00ffa3 !important;
}
.timeline-yt[data-source]::after {
  content: '▶ 다시보기' !important;
  left: auto !important;
  right: 4px !important;
  bottom: 4px !important;
  border-radius: 4px !important;
  border-color: rgba(255, 255, 255, .7) !important;
}
.timeline-yt[data-source='youtube'] .yt-play-icon { background: #d8243d !important; }
.timeline-yt[data-source='chzzk'] .yt-play-icon { background: #00d995 !important; }

@media (max-width: 680px) {
  .timeline-yt[data-source]::before {
    top: 2px !important;
    left: 2px !important;
    padding: 2px 3px !important;
    font-size: 7px !important;
  }
  #scheduleGridSection .cell-replay-link .cell-replay-icon,
  #scheduleGridSection .cell-replay-link .cell-replay-icon img {
    width: 12px !important;
    height: 12px !important;
  }
  #scheduleGridSection .cell-replay-link .cell-replay-icon { flex-basis: 12px !important; }
}

/* Use the leading gold A from the franchise wordmark in the existing icon slot. */
img.aoe-series-icon,
#scheduleGridSection .tag .tag-icon > img.aoe-series-icon,
.schedule-inline-icon > img.aoe-series-icon {
  object-fit: cover !important;
  object-position: left center !important;
  border-radius: 0 !important;
}
