.category-area .social-info {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding: 8px 0;
}

.category-area .social-info a {
    display: inline-block;
    flex: 0 0 auto;             /* 버튼이 flex에 의해 늘어나지 않도록 고정 */
    min-width: 100px;           /* 버튼 최소 너비 */
    max-width: 120px;           /* 버튼 최대 너비 */
    text-align: center;
    margin-right: 10px;
    padding: 6px 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: #fff;
    white-space: nowrap;        /* 줄바꿈 방지 */
    text-overflow: ellipsis;    /* 길면 ... 처리 */
    overflow: hidden;
}
.search_by_terms {
    width: 50%;   /* 기본값: PC */
}

/* 모바일 (예: 최대 768px 이하) */
@media (max-width: 768px) {
    .search_by_terms {
        width: 100%;
    }
}

.search_by_terms form {
    display: flex;       /* 가로 정렬 */
    width: 100%;
}

.search_by_terms select,
.search_by_terms input,
.search_by_terms button {
    flex: 1;             /* 동일 비율로 늘어나도록 */
    min-width: 0;        /* flex 아이템 줄바꿈 방지 */
}

.search_by_terms select {
    max-width: 150px;    /* 필요 시 제한 */
    flex: 0 0 auto;      /* 셀렉트는 고정폭 */
}

.search_by_terms input {
    flex: 1;             /* 입력창은 남는 공간 모두 사용 */
}

.search_by_terms button {
    flex: 0 0 50px;      /* 버튼은 고정폭 */
}


.cat-list {
  display: flex;
  flex-wrap: wrap;   /* 줄바꿈 허용 */
  padding: 0;
  margin: 0;
  list-style: none;
}

/* 각 li 공통 스타일 */
.cat-list > li {
  flex: 1 0 0;          /* PC에서 남은 공간 균등 분배 */
  text-align: center;
  padding: 10px 0;
}

/* 버튼 */
.cat-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: #333;
}

/* 아이콘 감싸는 원/사각 */
.icon-wrap {
  width: 56px;
  height: 56px;
  border-radius: 8px;
  background: #f6f7f9;
  border: 1px solid #e6e9f0;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 4px;
}

.icon-wrap img {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.cat-label {
  font-size: 13px;
  text-align: center;
  display: block;
  font-weight: 400
}

/* 모바일 (최대 576px 이하)에서는 한 줄 4개 */
@media (max-width: 576px) {
  .cat-list > li {
    flex: 0 0 20%;   /* 100% / 4 = 25% */
  }
}
 
/* 한 줄 고정 + 가로 스크롤 */
.tag-strip{
  display: flex;
  flex-wrap: nowrap;        /* 절대 줄바꿈 금지 */
  gap: 8px;
  overflow-x: auto;         /* 가로 스크롤 */
  overflow-y: hidden;
  white-space: nowrap;      /* (안전장치) */
  -webkit-overflow-scrolling: touch; /* iOS 부드러운 스크롤 */
  padding: 6px 2px;
}

/* 각 태그(칩) */
.tag-chip{
  flex: 0 0 auto;           /* 줄바꿈/수축 방지 */
  padding: 8px 12px;
  background: #f4f4f4;
  border-radius: 6px;
}

/* =========================
   모바일: 카테고리 한 줄 + 가로 스크롤
   기존 576px 규칙(flex:0 0 20%)을 덮어씁니다.
========================= */
@media (max-width: 768px){
  .cat-list{
    /*flex-wrap: nowrap;              /* 줄바꿈 금지 */
    overflow-x: auto;               /* 가로 스크롤 */
    -webkit-overflow-scrolling: touch;
    gap: 10px;
    padding: 6px 2px;
    scrollbar-width: none;          /* Firefox */
    -ms-overflow-style: none;       /* IE/Edge */
  }
  .cat-list::-webkit-scrollbar{ display:none; }  /* WebKit */

  .cat-list > li{
    flex: 1 0 auto;                 /* 아이템 폭 고정 */
  }

  /* 아이템(버튼) 크기 고정 → 가로로 일정하게 흘러가게 */
  .cat-btn{
    width: 60px;                    /* 필요시 86~104px로 조절 */
  }

  .icon-wrap{
    width: 58px; height: 58px;
    margin-bottom: 4px;
  }
  .icon-wrap img{ width: 32px; height: 32px; }
  .cat-label{ font-size: 13px; }
}

.video-scroll-wrapper {
    display: flex;
    gap: 15px;
    overflow-x: auto;
    padding-bottom: 10px;
    scroll-snap-type: x mandatory;
}
.video-card {
    flex: 0 0 auto;         /* 줄바꿈 방지 */
    width: 278px;           /* 카드 가로 크기 */
    scroll-snap-align: start;
}
.video-scroll-wrapper::-webkit-scrollbar {
    display: none; /* 모바일에서 스크롤바 숨김 */
}

/* ===== Shorts 리스트/카드 ===== */
.shorts-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
}
.shorts-card {
  flex: 0 0 260px;   /* ★ 기본부터 고정폭 (PC/태블릿 모두 적용) */
  max-width: 260px;
  cursor: pointer;
  border-radius: 10px;
  overflow: hidden;
  background: #000;
}

/* 썸네일 */
.shorts-thumb img {
  width: 100%;
  aspect-ratio: 9 / 16;
  object-fit: cover;
  display: block;
}

/* 텍스트 */
.shorts-info {
  padding: 8px;
  color: #fff;
}
.shorts-info .title {
  font-size: .825rem;
  font-weight: 400;
  line-height: 1.2;
  margin: 0 0 4px;
}
.shorts-info .meta {
  font-size: 12px;
  opacity: .8;
  margin: 0;
}

/* ===== 모달 ===== */
.shorts-modal {
  display: none;
  position: fixed;
  top:0; left:0; right:0; bottom:0;
  background: rgba(0,0,0,0.9);
  justify-content: center;
  align-items: center;
  z-index: 99999;
}
.shorts-container iframe {
  border-radius: 15px;
  width: 360px;
  height: 640px;
}
.shorts-modal .close {
  position: absolute;
  top: 20px; right: 20px;
  font-size: 32px;
  color: #fff;
  cursor: pointer;
}
.shorts-modal .prev, .shorts-modal .next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 28px;
  color: #fff;
  background: none;
  border: none;
  cursor: pointer;
}
.shorts-modal .prev { left: 10px; }
.shorts-modal .next { right: 10px; }

/* ===== 가로 스크롤 컨테이너 ===== */
.shorts-hscroll {
  display: flex;
  flex-wrap: nowrap;
  gap: 12px;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  padding: 1px;
  scrollbar-width: none;
  -ms-overflow-style: none;
  overscroll-behavior-inline: contain; /* ★ 추가: 세로 스크롤과 간섭 방지 */
}
.shorts-hscroll::-webkit-scrollbar { display: none; }

/* ===== 모바일 카드 폭 줄이기 ===== */
@media (max-width: 768px) {
  .shorts-card {
    flex: 0 0 155px;
    max-width: 160px;
  }
}


.shorts-meta {
  position: absolute;
  bottom: 20px;       /* 영상 하단에 위치 */
  left: 20px;
  display: flex;
  align-items: center;
  background: rgba(0,0,0,0.6);  /* 반투명 배경 */
  padding: 8px 12px;
  border-radius: 8px;
  color: #fff;
}

.shorts-meta-thumb {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  margin-right: 10px;
  border: 2px solid #fff;
}

.shorts-meta-name {
  font-size: 14px;
  font-weight: 600;
  margin: 0;
}

.shorts-meta-id {
  font-size: 12px;
  opacity: 0.8;
  margin: 0;
}
