/* ==========================================================================
   OnAir 메인(/onair) 리뉴얼 전용 스타일 (oh- 접두사)
   - 색은 modern-main.css 변수(--card-bg, --text-primary 등)를 써서 다크 모드 자동 대응
   - 공유 페이지(onair-profile.css)의 '본캐 장면' 톤과 맞춘다
   - 메인 페이지(/)와 같이 쓰는 modern-onair.css 는 건드리지 않는다
   ========================================================================== */

#onair {
  --oh-accent: #ff7f50;
  --oh-accent-strong: #f0623a;
  --oh-live: #ff3b30;
  --oh-radius: 18px;
  --oh-sub-bg: rgba(15, 23, 42, 0.04);
}

[data-bs-theme="dark"] #onair {
  --oh-sub-bg: rgba(255, 255, 255, 0.05);
}

.oh-top {
  padding-top: 16px;
}

/* ---------- 히어로 ---------- */
.oh-hero {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--oh-radius);
  box-shadow: 0 2px 14px var(--shadow-color);
  padding: 14px 14px 14px;
  color: var(--text-primary);
}

.oh-hero-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 2px 4px 12px;
}

.oh-hero-title {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  font-size: 1.12rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--text-primary);
}

.oh-live-dot,
.oh-dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--oh-live);
  box-shadow: 0 0 0 0 rgba(255, 59, 48, 0.55);
  animation: ohPulse 1.8s ease-out infinite;
}

.oh-dot {
  width: 6px;
  height: 6px;
  background: currentColor;
}

@keyframes ohPulse {
  0% { box-shadow: 0 0 0 0 rgba(255, 59, 48, 0.55); }
  70% { box-shadow: 0 0 0 7px rgba(255, 59, 48, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 59, 48, 0); }
}

.oh-hero-count {
  color: var(--oh-live);
}

.oh-hero-sub {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.oh-hero-ctrl {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.oh-ctrl-btn {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid var(--border-color);
  background: var(--oh-sub-bg);
  color: var(--text-secondary);
  font-size: 12px;
  transition: background 0.15s ease, color 0.15s ease;
}

.oh-ctrl-btn:hover,
.oh-ctrl-btn:focus-visible {
  background: var(--oh-accent);
  border-color: var(--oh-accent);
  color: #fff;
}

.oh-ctrl-btn[aria-pressed="true"] {
  color: var(--oh-accent-strong);
  border-color: var(--oh-accent);
}

.oh-hero-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 12px;
}

/* 무대: 데스크톱·태블릿은 슬라이드를 겹쳐 두고 활성 슬라이드만 보인다 */
.oh-stage {
  position: relative;
  height: 340px;
  border-radius: 14px;
  overflow: hidden;
  background: #8fb8d8;
}

.oh-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.45s ease, visibility 0s linear 0.45s;
}

.oh-slide.is-active {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.45s ease, visibility 0s;
}

/* 장면: 레벨 구간 배경 + 방송 화면 + 캐릭터 */
.oh-scene {
  position: absolute;
  inset: 0;
}

.oh-scene-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 70%;
}

[data-bs-theme="dark"] .oh-scene-bg {
  filter: brightness(0.8);
}

/* 글자를 읽을 수 있게 왼쪽을 어둡게 */
.oh-scene::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(10, 14, 22, 0.86) 0%, rgba(10, 14, 22, 0.62) 36%, rgba(10, 14, 22, 0.08) 62%, rgba(10, 14, 22, 0) 100%);
  pointer-events: none;
}

.oh-screen {
  position: absolute;
  z-index: 1;
  right: 4.5%;
  top: 9%;
  width: 46%;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  overflow: hidden;
  background: #111;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45), 0 0 0 3px rgba(255, 255, 255, 0.85);
}

.oh-screen img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* 넥슨 캐릭터 이미지(96px)는 여백이 넓어 발 위치(위에서 약 65%)를 기준으로 확대한다 (공유 페이지와 같은 방식) */
.oh-char {
  position: absolute;
  z-index: 2;
  left: 48%;
  bottom: 14px;
  width: 120px;
  height: 160px;
  pointer-events: none;
}

.oh-char img {
  position: absolute;
  left: 50%;
  bottom: -6px;
  width: 96px;
  height: 96px;
  margin-left: -48px;
  object-fit: contain;
  transform: scale(3.3);
  transform-origin: 50% 65%;
  filter: drop-shadow(0 5px 6px rgba(0, 0, 0, 0.4));
}

/* 부캐: 본캐 오른쪽, 방송 화면 아래에 조금 작게 */
.oh-sub {
  z-index: 2;
  width: 100px;
  height: 140px;
}

.oh-main {
  z-index: 3;
}

.oh-sub img {
  transform: scale(2.7);
}

.oh-sub .oh-nameplate {
  max-width: 100px;
  font-size: 10px;
  background: rgba(0, 0, 0, 0.6);
}

/* 캐릭터 중심 위치: 본캐 50%, 부캐 58 · 66 · 74 · 82 · 90% (방송 화면 아래 바닥에 나란히) */
.oh-main { left: calc(50% - 60px); }
.oh-sub-1 { left: calc(58% - 50px); }
.oh-sub-2 { left: calc(66% - 50px); }
.oh-sub-3 { left: calc(74% - 50px); }
.oh-sub-4 { left: calc(82% - 50px); }
.oh-sub-5 { left: calc(90% - 50px); }

.oh-nameplate {
  position: absolute;
  left: 50%;
  bottom: -8px;
  transform: translateX(-50%);
  max-width: 130px;
  padding: 1px 7px;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.5;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 정보: 장면 왼쪽 위에 겹친다 */
.oh-info {
  position: absolute;
  z-index: 3;
  left: 0;
  top: 0;
  bottom: 0;
  width: 46%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 22px 0 22px 28px;
  color: #fff;
}

.oh-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.85);
}

.oh-meta-text .fa {
  margin-right: 2px;
}

.oh-meta-text.is-long {
  padding: 1px 8px;
  border-radius: 999px;
  background: rgba(255, 127, 80, 0.9);
  color: #fff;
}

.oh-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 22px;
  padding: 0 9px;
  border-radius: 11px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.05em;
  color: #fff;
}

.oh-pill-live {
  background: var(--oh-live);
  box-shadow: 0 2px 8px rgba(255, 59, 48, 0.45);
}

.oh-pill-new {
  background: var(--oh-accent);
}

.oh-name {
  margin: 0 0 8px;
  font-size: 1.9rem;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.oh-name-btn {
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

.oh-name-btn:hover,
.oh-name-btn:focus-visible {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.oh-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.oh-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 25px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #fff;
  font-size: 0.76rem;
  font-weight: 600;
  white-space: nowrap;
  backdrop-filter: blur(2px);
}

.oh-chip img {
  width: 16px;
  height: 16px;
  border-radius: 3px;
}

.oh-title {
  margin: 0 0 14px;
  font-size: 0.95rem;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.92);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-all;
}

.oh-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.oh-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 38px;
  padding: 0 14px;
  border-radius: 10px;
  border: 1px solid transparent;
  font-size: 0.86rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 0.15s ease, background 0.15s ease;
}

.oh-btn img {
  width: 18px;
  height: 18px;
  border-radius: 4px;
}

.oh-btn-primary {
  background: var(--oh-accent);
  color: #fff;
  box-shadow: 0 4px 14px rgba(255, 127, 80, 0.45);
}

.oh-btn-primary:hover,
.oh-btn-primary:focus-visible {
  background: var(--oh-accent-strong);
  color: #fff;
  transform: translateY(-1px);
}

.oh-btn-sub,
.oh-btn-ghost {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.3);
  color: #fff;
}

.oh-btn-sub {
  width: 38px;
  padding: 0;
  justify-content: center;
}

.oh-btn-sub:hover,
.oh-btn-ghost:hover,
.oh-btn-sub:focus-visible,
.oh-btn-ghost:focus-visible {
  background: rgba(255, 255, 255, 0.26);
  color: #fff;
}

/* 대기열: 다른 방송 중 크리에이터 */
.oh-queue {
  list-style: none;
  margin: 0;
  padding: 0;
  height: 340px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
  scrollbar-width: thin;
}

.oh-queue-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 7px 8px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  color: var(--text-primary);
  text-align: left;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.oh-queue-item:hover,
.oh-queue-item:focus-visible {
  background: var(--oh-sub-bg);
}

.oh-queue-item.is-active {
  background: rgba(255, 127, 80, 0.1);
  border-color: rgba(255, 127, 80, 0.45);
}

.oh-queue-thumb {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border-radius: 50%;
  object-fit: cover;
  background: var(--oh-sub-bg);
}

.oh-hero.is-live .oh-queue-thumb {
  box-shadow: 0 0 0 2px var(--card-bg), 0 0 0 4px var(--oh-live);
}

.oh-queue-text {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.oh-queue-name {
  font-size: 0.88rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.oh-queue-sub {
  font-size: 0.74rem;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.oh-queue-view {
  color: var(--oh-live);
  font-weight: 700;
}

/* ---------- 확성기 티커 ---------- */
.oh-ticker {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 10px;
  padding: 0 8px 0 14px;
  height: 46px;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  box-shadow: 0 1px 8px var(--shadow-color);
  color: var(--text-primary);
}

.oh-ticker-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--oh-accent-strong);
}

.oh-ticker-viewport {
  position: relative;
  flex: 1;
  min-width: 0;
  height: 100%;
  overflow: hidden;
}

.oh-ticker-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.oh-ticker-item {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  opacity: 0;
  visibility: hidden;
  transform: translateY(60%);
  transition: opacity 0.35s ease, transform 0.35s ease, visibility 0s linear 0.35s;
}

.oh-ticker-item.is-active {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition: opacity 0.35s ease, transform 0.35s ease, visibility 0s;
}

.oh-ticker-item.is-leaving {
  transform: translateY(-60%);
}

.oh-ticker-link {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  max-width: 100%;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font-size: 0.9rem;
  text-align: left;
}

.oh-ticker-link .badge {
  flex-shrink: 0;
}

.oh-ticker-title {
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.oh-ticker-title.is-notice {
  font-weight: 700;
}

.oh-ticker-link:hover .oh-ticker-title,
.oh-ticker-link:focus-visible .oh-ticker-title {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.oh-ticker-name {
  flex-shrink: 0;
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.oh-ticker-name::before {
  content: "· ";
}

.oh-ticker-empty {
  font-size: 0.88rem;
  color: var(--text-secondary);
}

.oh-ticker-ctrl {
  display: flex;
  align-items: center;
  gap: 2px;
  flex-shrink: 0;
}

.oh-ticker-pos {
  margin-right: 4px;
  font-size: 0.74rem;
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
}

.oh-ticker-btn {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text-secondary);
  font-size: 11px;
}

.oh-ticker-btn:hover,
.oh-ticker-btn:focus-visible {
  background: var(--oh-sub-bg);
  color: var(--text-primary);
}

/* 데스크톱 테이크오버 광고(#vm_desktop): 페이지 맨 위, 헤더 바로 아래 (Venatus 규정) */
.oh-ad {
  margin-top: 0;
}

/* 데스크톱 테이크오버 슬롯은 1024px 이하에서 표시되지 않는데 ads.css 가 250px 를 비워 둬
   모바일 검색창이 밀렸다. 이 페이지에서는 데스크톱에서만 자리를 잡는다 */
@media (max-width: 1024px) {
  .oh-ad {
    margin: 0;
  }

  .oh-ad #vm_desktop {
    min-height: 0;
  }
}

/* ---------- 태블릿: 대기열을 가로 줄로 ---------- */
@media (max-width: 991.98px) {
  .oh-hero-body {
    grid-template-columns: minmax(0, 1fr);
  }

  .oh-stage {
    height: 300px;
  }

  .oh-info {
    width: 54%;
    padding-left: 22px;
  }

  .oh-screen {
    width: 40%;
  }

  .oh-char img {
    transform: scale(3);
  }

  .oh-sub img {
    transform: scale(2.3);
  }

  .oh-main { left: calc(56% - 60px); }
  .oh-sub-1 { left: calc(64% - 50px); }
  .oh-sub-2 { left: calc(71% - 50px); }
  .oh-sub-3 { left: calc(78% - 50px); }
  .oh-sub-4 { left: calc(85% - 50px); }
  .oh-sub-5 { left: calc(92% - 50px); }

  .oh-name {
    font-size: 1.6rem;
  }

  .oh-queue {
    flex-direction: row;
    height: auto;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 4px;
  }

  .oh-queue li {
    flex: 0 0 auto;
  }

  .oh-queue-item {
    width: auto;
    max-width: 190px;
  }
}

/* ---------- 모바일: 가로로 넘기는 카드 ---------- */
@media (max-width: 767.98px) {
  .oh-top {
    padding-top: 10px;
  }

  .oh-hero {
    padding: 10px 0 12px;
    border-radius: 16px;
  }

  .oh-hero-head {
    padding: 0 12px 8px;
  }

  .oh-hero-title {
    font-size: 1rem;
  }

  .oh-hero-sub {
    display: none;
  }

  .oh-ctrl-btn {
    width: 28px;
    height: 28px;
  }

  .oh-ctrl-btn[data-oh-prev],
  .oh-ctrl-btn[data-oh-next] {
    display: none;
  }

  .oh-stage {
    display: flex;
    gap: 10px;
    height: auto;
    padding: 0 12px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding: 0 12px;
    background: transparent;
    border-radius: 0;
    scrollbar-width: none;
  }

  .oh-stage::-webkit-scrollbar {
    display: none;
  }

  .oh-slide {
    position: relative;
    inset: auto;
    flex: 0 0 88%;
    height: 168px;
    opacity: 1;
    visibility: visible;
    transition: none;
    scroll-snap-align: start;
    border-radius: 14px;
    overflow: hidden;
    background: #8fb8d8;
  }

  .oh-slide:only-child {
    flex-basis: 100%;
  }

  .oh-scene::after {
    background: linear-gradient(90deg, rgba(10, 14, 22, 0.88) 0%, rgba(10, 14, 22, 0.7) 52%, rgba(10, 14, 22, 0.1) 78%, rgba(10, 14, 22, 0) 100%);
  }

  /* 모바일은 방송 화면을 빼고(데이터 절약) 본캐와 부캐 2명을 오른쪽에 겹쳐 세운다 (카드 폭 때문에 더는 못 넣는다) */
  .oh-screen,
  .oh-sub-3,
  .oh-sub-4,
  .oh-sub-5 {
    display: none;
  }

  .oh-sub {
    left: auto;
    bottom: 16px;
    width: 70px;
    height: 110px;
  }

  .oh-sub img {
    transform: scale(1.75);
  }

  .oh-sub .oh-nameplate {
    display: none;
  }

  .oh-sub-1 { right: 56px; }
  .oh-sub-2 { right: 90px; }

  .oh-char.oh-main {
    left: auto;
    right: 8px;
    bottom: 16px;
    width: 96px;
    height: 120px;
  }

  .oh-char img {
    transform: scale(2.4);
  }

  .oh-nameplate {
    font-size: 10px;
    max-width: 96px;
  }

  .oh-info {
    width: 64%;
    padding: 12px 0 12px 14px;
    justify-content: flex-start;
  }

  .oh-meta {
    margin-bottom: 4px;
    font-size: 0.72rem;
    gap: 6px;
  }

  .oh-name {
    margin-bottom: 4px;
    font-size: 1.2rem;
  }

  .oh-name-btn {
    display: block;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .oh-chips {
    margin-bottom: 4px;
    gap: 4px;
  }

  .oh-chip {
    height: 21px;
    padding: 0 7px;
    font-size: 0.68rem;
  }

  .oh-chip img {
    width: 13px;
    height: 13px;
  }

  .oh-title {
    margin-bottom: 8px;
    font-size: 0.78rem;
    -webkit-line-clamp: 1;
  }

  .oh-actions {
    margin-top: auto;
    flex-wrap: nowrap;
  }

  .oh-btn {
    height: 30px;
    padding: 0 10px;
    font-size: 0.75rem;
    border-radius: 8px;
  }

  .oh-btn img {
    width: 15px;
    height: 15px;
  }

  /* 모바일 카드에는 대표 시청 버튼과 프로필만 (다른 플랫폼은 모달·프로필에서) */
  .oh-btn-sub {
    display: none;
  }

  /* 모바일은 카드 자체가 목록이라 대기열을 숨긴다 */
  .oh-queue {
    display: none;
  }

  .oh-ticker {
    height: 42px;
    margin-top: 8px;
    padding-left: 12px;
    gap: 8px;
  }

  .oh-ticker-label {
    font-size: 0;
    gap: 0;
  }

  .oh-ticker-link {
    font-size: 0.82rem;
    gap: 6px;
  }

  .oh-ticker-name,
  .oh-ticker-pos {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .oh-slide,
  .oh-slide.is-active,
  .oh-ticker-item,
  .oh-ticker-item.is-active {
    transition: none;
  }

  .oh-live-dot,
  .oh-dot {
    animation: none;
  }
}

/* ==========================================================================
   검색·필터 바 (스크롤하면 고정 헤더 아래에 붙는다)
   ========================================================================== */
.oh-filter {
  position: sticky;
  top: var(--oh-sticky-top, 60px);
  z-index: 1020;
  margin: 14px 0 6px;
  padding: 10px 12px 8px;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  box-shadow: 0 4px 18px var(--shadow-color);
  color: var(--text-primary);
}

.oh-filter-bar {
  display: flex;
  align-items: center;
  gap: 8px;
}

.oh-search {
  position: relative;
  flex: 1 1 320px;
  min-width: 0;
}

.oh-search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-secondary);
  pointer-events: none;
}

.oh-search-input {
  width: 100%;
  height: 42px;
  padding: 0 38px 0 38px;
  border: 1.5px solid var(--border-color);
  border-radius: 12px;
  background: var(--oh-sub-bg);
  color: var(--text-primary);
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.oh-search-input::placeholder {
  color: var(--text-secondary);
}

.oh-search-input:focus {
  border-color: var(--oh-accent);
  background: var(--card-bg);
  box-shadow: 0 0 0 3px rgba(255, 127, 80, 0.18);
}

/* 브라우저 기본 지우기 버튼 대신 직접 만든 버튼 */
.oh-search-input::-webkit-search-cancel-button {
  -webkit-appearance: none;
  appearance: none;
}

.oh-search-clear {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text-secondary);
}

.oh-search-clear:hover,
.oh-search-clear:focus-visible {
  color: var(--text-primary);
  background: var(--oh-sub-bg);
}

.oh-filter-btns {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.oh-fbtn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 42px;
  padding: 0 13px;
  border: 1.5px solid var(--border-color);
  border-radius: 12px;
  background: var(--card-bg);
  color: var(--text-primary);
  font-size: 0.88rem;
  font-weight: 600;
  white-space: nowrap;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.oh-fbtn > .fa:first-child {
  color: var(--text-secondary);
}

.oh-fbtn:hover,
.oh-fbtn:focus-visible,
.oh-dd.is-open > .oh-fbtn {
  border-color: var(--oh-accent);
}

.oh-fbtn.is-set {
  border-color: var(--oh-accent);
  background: rgba(255, 127, 80, 0.08);
  color: var(--oh-accent-strong);
}

.oh-fbtn.is-set > .fa:first-child {
  color: var(--oh-accent-strong);
}

.oh-caret {
  font-size: 0.8rem;
  color: var(--text-secondary);
  transition: transform 0.15s ease;
}

.oh-dd.is-open .oh-caret {
  transform: rotate(180deg);
}

.oh-fbtn-badge {
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: var(--oh-accent);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  line-height: 18px;
  text-align: center;
}

.oh-live-toggle .oh-live-dot {
  width: 8px;
  height: 8px;
  background: var(--text-secondary);
  box-shadow: none;
  animation: none;
}

.oh-live-toggle[aria-pressed="true"] {
  border-color: var(--oh-live);
  background: rgba(255, 59, 48, 0.08);
  color: var(--oh-live);
}

.oh-live-toggle[aria-pressed="true"] .oh-live-dot {
  background: var(--oh-live);
  animation: ohPulse 1.8s ease-out infinite;
}

.oh-sheet-open {
  display: none;
}

/* 드롭다운 패널 */
.oh-dd {
  position: relative;
}

.oh-panel {
  position: absolute;
  z-index: 5;
  top: calc(100% + 8px);
  right: 0;
  width: 420px;
  max-height: min(70vh, 520px);
  overflow-y: auto;
  padding: 12px;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  box-shadow: 0 14px 40px rgba(15, 23, 42, 0.22);
}

.oh-panel-job {
  width: 520px;
}

.oh-panel-platform {
  width: 360px;
}

.oh-panel-sort {
  width: 260px;
  padding: 6px;
}

.oh-opt-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(118px, 1fr));
  gap: 6px;
}

.oh-chip-opt {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  height: 36px;
  padding: 0 10px;
  border: 1.5px solid var(--border-color);
  border-radius: 10px;
  background: var(--card-bg);
  color: var(--text-primary);
  font-size: 0.84rem;
  font-weight: 600;
  text-align: left;
  transition: border-color 0.12s ease, background 0.12s ease;
}

.oh-chip-opt span:not(.oh-chip-count) {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.oh-chip-opt img {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  border-radius: 4px;
}

.oh-chip-count {
  flex-shrink: 0;
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
}

.oh-chip-opt:hover:not([disabled]),
.oh-chip-opt:focus-visible {
  border-color: var(--oh-accent);
}

.oh-chip-opt.is-on {
  border-color: var(--oh-accent);
  background: rgba(255, 127, 80, 0.12);
  color: var(--oh-accent-strong);
}

.oh-chip-opt.is-on .oh-chip-count {
  color: var(--oh-accent-strong);
}

.oh-chip-opt[disabled] {
  opacity: 0.42;
  cursor: default;
}

.oh-job-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 8px;
}

.oh-job-tab {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 30px;
  padding: 0 11px;
  border: 0;
  border-radius: 999px;
  background: var(--oh-sub-bg);
  color: var(--text-secondary);
  font-size: 0.82rem;
  font-weight: 700;
}

.oh-job-tab img {
  width: 16px;
  height: 16px;
  border-radius: 4px;
}

.oh-job-tab.is-on {
  background: var(--text-primary);
  color: var(--card-bg);
}

.oh-job-search {
  position: relative;
  margin-bottom: 10px;
}

.oh-job-search .fa {
  position: absolute;
  left: 11px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-secondary);
  font-size: 0.8rem;
}

.oh-job-search input {
  width: 100%;
  height: 34px;
  padding: 0 10px 0 30px;
  border: 1px solid var(--border-color);
  border-radius: 9px;
  background: var(--oh-sub-bg);
  color: var(--text-primary);
  font-size: 0.85rem;
  outline: none;
}

.oh-job-search input:focus {
  border-color: var(--oh-accent);
}

.oh-job-group + .oh-job-group {
  margin-top: 10px;
}

.oh-job-group-name {
  margin: 0 2px 5px;
  font-size: 0.74rem;
  font-weight: 800;
  color: var(--text-secondary);
}

.oh-job-none {
  margin: 6px 2px;
}

.oh-panel-foot {
  display: flex;
  justify-content: flex-end;
  margin-top: 10px;
}

.oh-link-btn {
  padding: 2px 4px;
  border: 0;
  background: none;
  color: var(--text-secondary);
  font-size: 0.8rem;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.oh-link-btn:hover,
.oh-link-btn:focus-visible {
  color: var(--oh-accent-strong);
}

.oh-sort-list,
.oh-panel-sort {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.oh-panel-sort[hidden] {
  display: none;
}

.oh-sort-opt {
  display: flex;
  align-items: baseline;
  gap: 6px;
  width: 100%;
  padding: 9px 12px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--text-primary);
  font-size: 0.88rem;
  font-weight: 600;
  text-align: left;
}

.oh-sort-opt:hover,
.oh-sort-opt:focus-visible {
  background: var(--oh-sub-bg);
}

.oh-sort-opt[aria-pressed="true"] {
  color: var(--oh-accent-strong);
}

/* 설명은 다음 줄, 선택 표시는 오른쪽 */
.oh-sort-opt {
  position: relative;
  display: block;
  padding-right: 32px;
}

.oh-sort-opt .oh-muted {
  display: block;
  margin-top: 1px;
}

.oh-sort-opt[aria-pressed="true"]::after {
  content: "\f00c";
  font-family: FontAwesome;
  position: absolute;
  right: 12px;
  top: 10px;
}

.oh-muted {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-secondary);
}

/* 적용된 조건 · 인기 태그 · 결과 수 */
.oh-filter-state {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  min-height: 28px;
}

.oh-active,
.oh-tags {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.oh-active::-webkit-scrollbar,
.oh-tags::-webkit-scrollbar {
  display: none;
}

.oh-active[hidden],
.oh-tags[hidden] {
  display: none;
}

.oh-active-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  height: 28px;
  padding: 0 10px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 127, 80, 0.14);
  color: var(--oh-accent-strong);
  font-size: 0.8rem;
  font-weight: 700;
}

.oh-active-chip .fa {
  font-size: 0.72rem;
  opacity: 0.8;
}

.oh-active-chip:hover,
.oh-active-chip:focus-visible {
  background: rgba(255, 127, 80, 0.26);
}

.oh-active .oh-link-btn {
  flex-shrink: 0;
}

.oh-tags-label {
  flex-shrink: 0;
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--text-secondary);
}

.oh-tag {
  flex-shrink: 0;
  height: 26px;
  padding: 0 10px;
  border: 1px solid var(--border-color);
  border-radius: 999px;
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.78rem;
  font-weight: 600;
}

.oh-tag:hover,
.oh-tag:focus-visible {
  border-color: var(--oh-accent);
  color: var(--oh-accent-strong);
}

.oh-result {
  flex-shrink: 0;
  margin: 0 0 0 auto;
  font-size: 0.8rem;
  color: var(--text-primary);
  white-space: nowrap;
}

.oh-result strong {
  color: var(--oh-accent-strong);
}

/* 검색·필터 중에는 즐겨찾기·신규 띠를 숨긴다 (onair.js 의 show() 인라인 스타일보다 우선) */
.oh-filtering .oh-browse-only {
  display: none !important;
}

/* 빈 결과: 등록 유도 */
.oh-empty {
  margin: 8px 0 24px;
  padding: 36px 20px;
  border: 1.5px dashed var(--border-color);
  border-radius: 16px;
  text-align: center;
  color: var(--text-primary);
}

.oh-empty-title {
  margin: 0 0 6px;
  font-size: 1.05rem;
  font-weight: 800;
}

.oh-empty-desc {
  margin: 0 auto 16px;
  max-width: 420px;
  font-size: 0.88rem;
  color: var(--text-secondary);
  word-break: keep-all;
}

.oh-empty-actions {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.oh-btn-line,
.oh-btn-solid {
  display: inline-flex;
  align-items: center;
  height: 40px;
  padding: 0 16px;
  border-radius: 10px;
  font-size: 0.88rem;
  font-weight: 700;
  text-decoration: none;
}

.oh-btn-line {
  border: 1.5px solid var(--border-color);
  background: var(--card-bg);
  color: var(--text-primary);
}

.oh-btn-solid {
  border: 0;
  background: var(--oh-accent);
  color: #fff;
}

.oh-btn-solid:hover,
.oh-btn-solid:focus-visible {
  background: var(--oh-accent-strong);
  color: #fff;
}

/* ---------- 모바일 필터 시트 ---------- */
.oh-sheet {
  position: fixed;
  inset: 0;
  z-index: 1060;
}

.oh-sheet[hidden] {
  display: none;
}

.oh-sheet-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 14, 22, 0.5);
}

.oh-sheet-panel {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  max-height: 86vh;
  max-height: 86dvh;
  background: var(--card-bg);
  border-radius: 20px 20px 0 0;
  box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.2);
  color: var(--text-primary);
  transform: translateY(16px);
  opacity: 0.6;
  transition: transform 0.22s ease, opacity 0.22s ease;
}

.oh-sheet.is-open .oh-sheet-panel {
  transform: none;
  opacity: 1;
}

.oh-sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px 6px;
}

.oh-sheet-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 800;
}

.oh-sheet-x {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 10px;
  background: var(--oh-sub-bg);
  color: var(--text-secondary);
}

.oh-sheet-tabs {
  display: flex;
  gap: 4px;
  padding: 4px 12px 10px;
  border-bottom: 1px solid var(--border-color);
}

.oh-sheet-tab {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 34px;
  padding: 0 12px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 700;
}

.oh-sheet-tab[aria-selected="true"] {
  background: var(--text-primary);
  color: var(--card-bg);
}

.oh-sheet-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 12px 14px;
  overscroll-behavior: contain;
}

.oh-sheet-body .oh-opt-grid {
  grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
}

/* 직업 이름이 길어(아크메이지(불,독) 등) 좁은 화면에서는 2열 */
.oh-sheet-body .oh-job-group .oh-opt-grid {
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
}

.oh-sheet-foot {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--border-color);
}

.oh-sheet-foot .oh-live-toggle {
  height: 44px;
  padding: 0 11px;
  font-size: 0.82rem;
}

.oh-sheet-reset {
  height: 44px;
  padding: 0 12px;
  border: 0;
  border-radius: 12px;
  background: var(--oh-sub-bg);
  color: var(--text-secondary);
  font-size: 0.88rem;
  font-weight: 700;
}

.oh-sheet-apply {
  flex: 1;
  height: 44px;
  border: 0;
  border-radius: 12px;
  background: var(--oh-accent);
  color: #fff;
  font-size: 0.95rem;
  font-weight: 800;
}

html.oh-sheet-lock,
html.oh-sheet-lock body {
  overflow: hidden;
}

/* 태블릿: 버튼 글자 줄임 */
@media (max-width: 1199.98px) {
  .oh-filter-btns .oh-fbtn {
    padding: 0 10px;
  }

  .oh-filter-btns .oh-fbtn > .fa:first-child {
    display: none;
  }
}

@media (max-width: 991.98px) {
  .oh-filter-bar {
    flex-wrap: wrap;
  }

  .oh-search {
    flex-basis: 100%;
  }

  .oh-filter-btns {
    flex: 1;
    flex-wrap: wrap;
  }

  .oh-dd-sort {
    margin-left: auto;
  }

  .oh-panel {
    left: 0;
    right: auto;
  }

  .oh-dd-sort .oh-panel {
    left: auto;
    right: 0;
  }
}

/* 모바일: 검색창 + 필터 버튼만, 나머지는 시트에서 */
@media (max-width: 767.98px) {
  .oh-filter {
    margin: 10px -4px 4px;
    padding: 8px 8px 6px;
    border-radius: 14px;
  }

  .oh-filter-bar {
    flex-wrap: nowrap;
  }

  .oh-search {
    flex-basis: auto;
  }

  .oh-search-input {
    height: 40px;
    font-size: 16px; /* iOS 확대 방지 */
  }

  .oh-filter-btns {
    display: none;
  }

  .oh-sheet-open {
    display: inline-flex;
    height: 40px;
    padding: 0 12px;
  }

  .oh-filter-state {
    margin-top: 6px;
    min-height: 26px;
  }

  .oh-result {
    font-size: 0.74rem;
  }

  .oh-result .oh-muted {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .oh-sheet-panel {
    transition: none;
  }
}

/* ==========================================================================
   즐겨찾기·신규 띠 (아바타 가로 줄)
   ========================================================================== */
.oh-strip-sec {
  margin-top: 16px;
}

.oh-strip-title {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0 2px 8px;
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--text-primary);
}

#favorites-area .oh-strip-title .fa {
  color: #f5b301;
}

#new_creators .oh-strip-title .fa {
  color: var(--oh-accent);
}

.oh-strip {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 2px 6px;
  scrollbar-width: thin;
}

.oh-strip > .col {
  flex: 0 0 auto;
  width: auto;
  max-width: none;
  padding: 0;
}

.oh-strip-item {
  position: relative;
}

.oh-strip-open {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  width: 88px;
  padding: 12px 6px 9px;
  border: 1px solid var(--border-color);
  border-radius: 14px;
  background: var(--card-bg);
  color: var(--text-primary);
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.oh-strip-open:hover,
.oh-strip-open:focus-visible {
  border-color: var(--oh-accent);
  transform: translateY(-1px);
}

.oh-strip-open img {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--oh-sub-bg);
}

.oh-strip-item.is-live .oh-strip-open img {
  box-shadow: 0 0 0 2px var(--card-bg), 0 0 0 4px var(--oh-live);
}

.oh-strip-name {
  max-width: 100%;
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.oh-strip-live {
  position: absolute;
  top: 54px;
  left: 50%;
  transform: translateX(-50%);
  padding: 0 6px;
  border-radius: 6px;
  background: var(--oh-live);
  color: #fff;
  font-size: 9px;
  font-weight: 800;
  line-height: 15px;
  letter-spacing: 0.04em;
}

.oh-strip-fav {
  position: absolute;
  top: 2px;
  right: 2px;
}

/* ==========================================================================
   크리에이터 목록
   ========================================================================== */
.oh-list {
  margin-top: 22px;
  color: var(--text-primary);
}

.oh-list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 4px;
}

.oh-list-title {
  margin: 0;
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--text-primary);
}

.oh-view {
  display: inline-flex;
  padding: 3px;
  gap: 2px;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  background: var(--card-bg);
}

.oh-view-btn {
  width: 36px;
  height: 32px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--text-secondary);
}

.oh-view-btn[aria-pressed="true"] {
  background: var(--text-primary);
  color: var(--card-bg);
}

.oh-group {
  margin-top: 14px;
}

.oh-group[hidden] {
  display: none;
}

.oh-group-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 2px 10px;
  font-size: 1rem;
  font-weight: 800;
  color: var(--text-primary);
}

.oh-group-count {
  padding: 0 8px;
  border-radius: 999px;
  background: var(--oh-sub-bg);
  color: var(--text-secondary);
  font-size: 0.78rem;
  line-height: 22px;
}

.oh-ad-inline {
  margin: 18px 0 4px;
}

/* 광고가 채워지지 않았을 때(onair-home.js initAdCollapse) 비워 둔 높이·여백을 접는다. 광고가 있으면 그대로 */
.oh-ad-inline.is-empty {
  margin: 0;
}

.oh-ad-inline.is-empty #vm_horizon_sm,
.oh-ad-inline.is-empty #vm_horizon_mo {
  min-height: 0;
}

.oh-grid {
  display: grid;
  gap: 10px;
}

.oh-grid-live {
  grid-template-columns: repeat(auto-fill, minmax(255px, 1fr));
  gap: 14px;
}

.oh-grid-main {
  grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
}

/* JS 전 깜빡임 방지: 오프라인 13번째부터 숨김 (JS가 실행되면 클래스를 뗀다) */
.oh-collapsed > .oh-item:nth-child(n+13) {
  display: none;
}

.oh-item[hidden] {
  display: none !important;
}

/* ---------- 한 명 (기본: 목록 보기 행) ---------- */
.oh-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 10px 44px 10px 10px;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.oh-item:hover {
  border-color: rgba(255, 127, 80, 0.55);
  box-shadow: 0 6px 18px var(--shadow-color);
}

.oh-item:has(.oh-item-open:focus-visible) {
  outline: 2px solid var(--oh-accent);
  outline-offset: 2px;
}

.oh-item-media {
  position: relative;
  flex-shrink: 0;
  width: 52px;
  height: 52px;
}

.oh-item-avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  background: var(--oh-sub-bg);
}

.oh-item-screen {
  display: none;
}

.oh-item.is-live .oh-item-avatar {
  box-shadow: 0 0 0 2px var(--card-bg), 0 0 0 4px var(--oh-live);
}

.oh-item-live {
  position: absolute;
  left: 50%;
  bottom: -6px;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0 6px;
  border-radius: 7px;
  background: var(--oh-live);
  color: #fff;
  font-size: 9px;
  font-weight: 800;
  line-height: 15px;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.oh-item-live .oh-dot {
  width: 5px;
  height: 5px;
  animation: none;
}

.oh-item-view {
  display: none;
}

.oh-item-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.oh-item-name {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  margin: 0;
  font-size: 0.96rem;
  font-weight: 800;
  line-height: 1.3;
}

.oh-item-open {
  display: block;
  min-width: 0;
  text-decoration: none;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 카드 전체를 누르면 프로필 모달 (링크·즐겨찾기는 위에 올린다) */
.oh-item-open::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: inherit;
}

.oh-item-open:focus-visible {
  outline: none;
}

.oh-item-new {
  flex-shrink: 0;
  padding: 0 6px;
  border-radius: 6px;
  background: rgba(255, 127, 80, 0.16);
  color: var(--oh-accent-strong);
  font-size: 10px;
  font-weight: 800;
  line-height: 17px;
}

.oh-item-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 10px;
  font-size: 0.76rem;
  color: var(--text-secondary);
}

.oh-item-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.oh-item-tag img {
  width: 15px;
  height: 15px;
  border-radius: 3px;
}

.oh-item-line {
  margin: 0;
  font-size: 0.78rem;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.oh-item-line.is-live {
  color: var(--text-primary);
}

.oh-item-foot {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  margin-top: 1px;
}

.oh-item-plats {
  display: inline-flex;
  gap: 5px;
}

.oh-plat {
  position: relative;
  z-index: 2;
  display: inline-flex;
  border-radius: 6px;
  transition: transform 0.12s ease;
}

.oh-plat img {
  width: 20px;
  height: 20px;
  border-radius: 5px;
}

.oh-plat:hover,
.oh-plat:focus-visible {
  transform: translateY(-1px);
}

.oh-plat.is-on {
  box-shadow: 0 0 0 2px var(--card-bg), 0 0 0 3.5px var(--oh-live);
}

.oh-item-when {
  margin-left: auto;
  font-size: 0.72rem;
  color: var(--text-secondary);
  white-space: nowrap;
}

.oh-item.is-live .oh-item-when {
  color: var(--oh-live);
  font-weight: 700;
}

.oh-item-when.is-long {
  padding: 0 7px;
  border-radius: 999px;
  background: var(--oh-accent);
  color: #fff !important;
  line-height: 18px;
}

/* 즐겨찾기 별 */
.oh-fav {
  position: absolute;
  z-index: 2;
  top: 8px;
  right: 8px;
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #c3cad6;
  font-size: 15px;
  transition: color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}

[data-bs-theme="dark"] .oh-fav {
  color: #5b6577;
}

.oh-fav:hover,
.oh-fav:focus-visible {
  background: var(--oh-sub-bg);
  color: #f5b301;
}

.oh-fav.on,
.oh-fav.active {
  color: #f5b301;
}

/* ---------- 카드 보기 (오프라인·정렬 결과) ---------- */
.oh-view-card .oh-grid-main {
  grid-template-columns: repeat(auto-fill, minmax(172px, 1fr));
}

.oh-view-card .oh-grid-main .oh-item {
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 18px 10px 12px;
  text-align: center;
}

.oh-view-card .oh-grid-main .oh-item-media {
  width: 72px;
  height: 72px;
}

.oh-view-card .oh-grid-main .oh-item-body {
  width: 100%;
  align-items: center;
}

.oh-view-card .oh-grid-main .oh-item-name {
  justify-content: center;
  max-width: 100%;
}

.oh-view-card .oh-grid-main .oh-item-tags {
  justify-content: center;
}

.oh-view-card .oh-grid-main .oh-item-line {
  max-width: 100%;
}

.oh-view-card .oh-grid-main .oh-item-foot {
  flex-direction: column;
  gap: 6px;
  margin-top: 4px;
}

.oh-view-card .oh-grid-main .oh-item-when {
  margin-left: 0;
}

/* ---------- 방송 중 카드 (방송 화면) ---------- */
.oh-grid-live .oh-item {
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  padding: 0 0 12px;
  overflow: hidden;
}

.oh-grid-live .oh-item-media {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, #2b3344, #161b26);
}

.oh-grid-live .oh-item-screen {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.oh-grid-live .oh-item:hover .oh-item-screen {
  transform: scale(1.03);
}

.oh-grid-live .oh-item-media {
  overflow: visible;
}

.oh-grid-live .oh-item-screen {
  border-radius: 13px 13px 0 0;
}

.oh-grid-live .oh-item-avatar {
  position: absolute;
  left: 12px;
  bottom: -20px;
  width: 46px;
  height: 46px;
  border: 3px solid var(--card-bg);
  box-shadow: 0 0 0 2px var(--oh-live);
}

.oh-grid-live .oh-item-live {
  left: 10px;
  top: 10px;
  bottom: auto;
  transform: none;
  padding: 0 8px;
  font-size: 11px;
  line-height: 22px;
  border-radius: 11px;
  box-shadow: 0 2px 8px rgba(255, 59, 48, 0.4);
}

.oh-grid-live .oh-item-live .oh-dot {
  width: 6px;
  height: 6px;
  animation: ohPulse 1.8s ease-out infinite;
}

.oh-grid-live .oh-item-view {
  display: inline;
  margin-left: 2px;
  font-weight: 700;
  letter-spacing: 0;
}

.oh-grid-live .oh-item-body {
  padding: 26px 14px 0;
}

.oh-grid-live .oh-item-name {
  font-size: 1.02rem;
}

.oh-grid-live .oh-item-line {
  font-size: 0.82rem;
}

.oh-grid-live .oh-fav {
  top: 8px;
  right: 8px;
  background: rgba(10, 14, 22, 0.45);
  color: rgba(255, 255, 255, 0.85);
}

.oh-grid-live .oh-fav.on,
.oh-grid-live .oh-fav.active {
  color: #ffc83d;
}

/* 더보기 */
.oh-more {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  height: 48px;
  margin-top: 12px;
  border: 1.5px solid var(--border-color);
  border-radius: 14px;
  background: var(--card-bg);
  color: var(--text-primary);
  font-size: 0.92rem;
  font-weight: 700;
}

.oh-more[hidden] {
  display: none;
}

.oh-more strong {
  color: var(--oh-accent-strong);
}

.oh-more:hover,
.oh-more:focus-visible {
  border-color: var(--oh-accent);
}

/* 등록 유도 */
.oh-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 26px 0 10px;
  padding: 18px 22px;
  border: 1px solid rgba(255, 127, 80, 0.3);
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(255, 127, 80, 0.14) 0%, rgba(255, 127, 80, 0.04) 100%);
}

.oh-cta-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.oh-cta-text strong {
  font-size: 1.02rem;
  color: var(--text-primary);
}

.oh-cta-text span {
  font-size: 0.86rem;
  color: var(--text-secondary);
  word-break: keep-all;
}

.oh-cta .oh-btn-solid {
  flex-shrink: 0;
}

/* ---------- 태블릿 ---------- */
@media (max-width: 991.98px) {
  .oh-grid-live {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .oh-grid-main {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  }
}

/* ---------- 모바일: 방송 중도 가로 행으로 (긴 목록 피로 줄이기) ---------- */
@media (max-width: 767.98px) {
  .oh-list {
    margin-top: 16px;
  }

  .oh-list-title {
    font-size: 1.12rem;
  }

  .oh-grid {
    gap: 8px;
  }

  .oh-grid-live,
  .oh-grid-main {
    grid-template-columns: minmax(0, 1fr);
  }

  .oh-grid-live .oh-item {
    flex-direction: row;
    align-items: center;
    gap: 10px;
    padding: 8px 40px 8px 8px;
    overflow: visible;
  }

  .oh-grid-live .oh-item-media {
    width: 128px;
    border-radius: 10px;
  }

  .oh-grid-live .oh-item-screen {
    border-radius: 10px;
  }

  .oh-grid-live .oh-item:hover .oh-item-screen {
    transform: none;
  }

  .oh-grid-live .oh-item-avatar {
    left: 4px;
    bottom: 4px;
    width: 28px;
    height: 28px;
    border-width: 2px;
  }

  .oh-grid-live .oh-item-live {
    left: 5px;
    top: 5px;
    padding: 0 6px;
    font-size: 9px;
    line-height: 17px;
  }

  .oh-grid-live .oh-item-body {
    padding: 0;
  }

  .oh-grid-live .oh-item-name {
    font-size: 0.94rem;
  }

  .oh-grid-live .oh-item-line {
    font-size: 0.76rem;
  }

  .oh-grid-live .oh-fav {
    top: 6px;
    right: 6px;
    background: transparent;
    color: #c3cad6;
  }

  .oh-item {
    padding: 9px 40px 9px 9px;
  }

  .oh-item-media {
    width: 46px;
    height: 46px;
  }

  .oh-view-card .oh-grid-main {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .oh-view-card .oh-grid-main .oh-item {
    padding: 14px 8px 10px;
  }

  .oh-view-card .oh-grid-main .oh-item-media {
    width: 60px;
    height: 60px;
  }

  .oh-cta {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
    padding: 18px 16px;
  }

  .oh-cta .oh-btn-solid {
    justify-content: center;
  }

  .oh-strip-open {
    width: 78px;
    padding: 10px 4px 8px;
  }

  .oh-strip-open img {
    width: 50px;
    height: 50px;
  }

  .oh-strip-live {
    top: 48px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .oh-item,
  .oh-grid-live .oh-item-screen,
  .oh-strip-open {
    transition: none;
  }
}

/* 키보드 이동·스크롤 시 상단에 붙은 헤더·검색 바에 가리지 않게 */
#onair [data-oh-item],
#onair .oh-strip-item,
#onair .oh-more,
#onair .oh-list-head {
  scroll-margin-top: 200px;
}

/* ---------- 360px 대 (가장 작은 지원 폭) ---------- */
@media (max-width: 380px) {
  /* 히어로 카드: 한 줄 메타. 부캐는 버튼과 겹쳐 본캐만 (글자와 버튼이 카드 밖으로 밀리지 않게) */
  .oh-meta {
    flex-wrap: nowrap;
    gap: 5px;
    white-space: nowrap;
    overflow: hidden;
    font-size: 0.68rem;
  }

  .oh-chips {
    flex-wrap: nowrap;
    overflow: hidden;
  }

  .oh-sub {
    display: none;
  }

  .oh-info {
    width: 66%;
  }
}

/* 모바일: 적용된 조건이 있으면 결과 수는 다음 줄로 (조건 칩을 가리지 않게) */
@media (max-width: 767.98px) {
  .oh-filter-state:has(.oh-active:not([hidden])) {
    flex-wrap: wrap;
    row-gap: 4px;
  }

  .oh-filter-state:has(.oh-active:not([hidden])) .oh-active {
    flex: 1 1 100%;
  }
}

/* 목록 이름 링크: 방문한 링크 색·밑줄 없이 */
.oh-item-open:link,
.oh-item-open:visited,
.oh-item-open:hover {
  color: inherit;
  text-decoration: none;
}

/* ---------- 월드·직업 랜딩 (/onair/world/..., /onair/job/..., templates/onair/home_landing.php) ---------- */
.ol-head {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--oh-radius);
  box-shadow: 0 2px 14px var(--shadow-color);
  padding: 18px 20px;
  color: var(--text-primary);
}

.ol-crumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-bottom: 10px;
}

.ol-crumb a {
  color: var(--oh-accent-strong);
  font-weight: 700;
  text-decoration: none;
}

.ol-crumb a:hover {
  text-decoration: underline;
}

.ol-title-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ol-icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  object-fit: contain;
  padding: 6px;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  background: var(--input-bg, var(--card-bg));
}

.ol-icon.is-job {
  padding: 0;
  object-fit: cover;
}

.ol-title-text {
  min-width: 0;
}

.ol-title {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.25;
  word-break: keep-all;
}

.ol-title span {
  font-weight: 700;
  color: var(--text-secondary);
}

.ol-sub {
  margin: 4px 0 0;
  font-size: 0.88rem;
  color: var(--text-secondary);
}

.ol-sub strong {
  color: var(--text-primary);
}

.ol-sep {
  margin: 0 6px;
}

.ol-live {
  white-space: nowrap;
}

.ol-live .oh-live-dot {
  width: 7px;
  height: 7px;
  margin-right: 5px;
  vertical-align: 1px;
}

.ol-live strong {
  color: var(--oh-live);
}

.ol-desc {
  margin: 12px 0 0;
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--text-secondary);
  word-break: keep-all;
}

.ol-related {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px dashed var(--border-color);
}

.ol-related-title {
  flex-shrink: 0;
  padding-top: 6px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-secondary);
}

.ol-related-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
}

.ol-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 30px;
  padding: 0 11px;
  border-radius: 999px;
  border: 1px solid var(--border-color);
  background: var(--card-bg);
  color: var(--text-primary);
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: border-color 0.15s, color 0.15s;
}

.ol-link span {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-secondary);
}

.ol-link:hover {
  border-color: var(--oh-accent);
  color: var(--oh-accent-strong);
}

.ol-link.is-on {
  border-color: var(--oh-accent);
  background: rgba(255, 127, 80, 0.12);
  color: var(--oh-accent-strong);
}

/* 하단 월드·직업별 링크 */
.ol-browse {
  margin: 28px 0 8px;
  padding: 18px 20px;
  border: 1px solid var(--border-color);
  border-radius: var(--oh-radius);
  background: var(--card-bg);
}

.ol-browse-title {
  margin: 0 0 12px;
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-primary);
}

.ol-browse-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 8px 0;
}

.ol-browse-row + .ol-browse-row {
  border-top: 1px dashed var(--border-color);
}

.ol-browse-sub {
  flex: 0 0 64px;
  margin: 0;
  padding-top: 7px;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-secondary);
}

@media (max-width: 575.98px) {
  .ol-head {
    padding: 14px;
  }

  .ol-title {
    font-size: 1.25rem;
  }

  .ol-related,
  .ol-browse-row {
    flex-direction: column;
    gap: 6px;
  }

  .ol-related-title,
  .ol-browse-sub {
    padding-top: 0;
    flex-basis: auto;
  }

  .ol-browse {
    padding: 14px;
  }
}

/* ---------- 미등록 방송인 (templates/onair/home_unreg.php): 글자만, 등록 크리에이터와 구분되는 옅은 판 ---------- */
.oh-unreg {
  margin: 22px 0 8px;
  padding: 16px;
  border: 1px dashed var(--border-color);
  border-radius: var(--oh-radius);
  background: var(--oh-sub-bg);
}

.oh-unreg-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin-bottom: 12px;
}

.oh-unreg-head .oh-group-title {
  margin: 0 2px;
}

.oh-unreg-sub {
  font-weight: 700;
  color: var(--text-secondary);
}

.oh-unreg-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 127, 80, 0.45);
  background: rgba(255, 127, 80, 0.1);
  color: var(--oh-accent-strong);
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: none;
  word-break: keep-all;
}

.oh-unreg-cta:hover {
  background: rgba(255, 127, 80, 0.18);
  color: var(--oh-accent-strong);
}

.oh-unreg-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.oh-unreg-list.oh-collapsed > .oh-unreg-row:nth-child(n+7),
.oh-unreg-row[hidden] {
  display: none;
}

.oh-unreg-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 9px 12px;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  background: var(--card-bg);
}

.oh-unreg-pfs {
  display: inline-flex;
  gap: 4px;
}

.oh-unreg-pf img {
  display: block;
  width: 22px;
  height: 22px;
  border-radius: 6px;
}

.oh-unreg-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
  color: var(--text-primary);
  text-decoration: none;
}

.oh-unreg-main:hover .oh-unreg-name {
  color: var(--oh-accent-strong);
}

.oh-unreg-name {
  font-size: 0.9rem;
  font-weight: 700;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.oh-unreg-title {
  font-size: 0.78rem;
  color: var(--text-secondary);
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.oh-unreg-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  font-size: 0.74rem;
  color: var(--text-secondary);
  white-space: nowrap;
}

.oh-unreg-view {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-weight: 700;
  color: var(--text-primary);
}

.oh-unreg-view .fa {
  color: var(--oh-live);
  font-size: 0.7rem;
}

.oh-unreg-time.is-long {
  color: var(--oh-accent-strong);
  font-weight: 700;
}

.oh-unreg .oh-more {
  height: 42px;
  margin-top: 10px;
}

.oh-unreg-foot {
  margin: 10px 2px 0;
  font-size: 0.74rem;
  color: var(--text-secondary);
  word-break: keep-all;
}

.oh-unreg-foot a {
  color: inherit;
  text-decoration: underline;
}

@media (max-width: 767.98px) {
  .oh-unreg {
    padding: 12px;
  }

  .oh-unreg-list {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* 이름 옆 인증 체크 (스타일은 onair-profile.css .oa-vmark). 카드 전체 링크(::after) 위로 올려 툴팁이 뜨게 한다 */
.oh-item-name .oa-vmark { position: relative; z-index: 2; margin-left: -2px; }
