/**
 * AI CineCatch — AI 단편 & 쇼츠 페이지 전용 스타일
 * 다크 시네마틱 톤 · 기존 portal/filter/card/modal 패턴 재사용
 */

body[data-page="shorts"] .portal-layout-container {
  margin-top: 110px;
  margin-bottom: 40px;
}

/*
 * 포탈 본문 섹션 간격 — 메인 페이지(.portal-left-column gap)와 동일
 * · PC 40px / 모바일·태블릿 16px (common.css 기본값 유지)
 * · shorts-section margin-bottom(28px) 등 개별 여백은 gap과 중복되므로 제거
 */
body[data-page="shorts"] .portal-left-column > .section-space {
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  background: none;
}

body[data-page="shorts"] .portal-left-column > .shorts-section {
  margin-bottom: 0 !important;
}

body[data-page="shorts"] #shortsHeroBanner.section-space {
  padding: 24px !important;
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}

body[data-page="shorts"] .portal-left-column .section-header {
  margin-bottom: 14px;
  align-items: flex-start;
}

/* ── 히어로 ── */
.shorts-hero {
  padding: 24px !important;
  margin-bottom: 0 !important;
  background: #0c0b0e !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 16px !important;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4) !important;
  position: relative;
  overflow: hidden;
}

.shorts-hero-bg {
  position: absolute;
  inset: 0;
  opacity: 0.28;
  z-index: 1;
  pointer-events: none;
}

.shorts-hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(12, 11, 14, 0.98) 0%, rgba(12, 11, 14, 0.82) 35%, rgba(12, 11, 14, 0.5) 70%, rgba(12, 11, 14, 0.95) 100%),
    linear-gradient(0deg, rgba(12, 11, 14, 0.92) 0%, rgba(12, 11, 14, 0.12) 100%);
  z-index: 2;
  pointer-events: none;
}

.shorts-hero-inner {
  gap: 5px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  z-index: 3;
  position: relative;
}

.shorts-hero-title {
  font-size: 2.1rem;
  font-weight: 800;
  background: linear-gradient(135deg, #ffd175 0%, #e89528 50%, #b55a00 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin: 0;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.shorts-hero-desc {
  font-size: 0.92rem;
  color: rgba(255, 255, 255, 0.85) !important;
  line-height: 1.4;
  margin: 0;
  font-weight: 500;
}

/* ── 필터 바 ── */
.shorts-filter-bar {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 18px;
  margin-bottom: 0;
  box-sizing: border-box;
}

.shorts-filter-bar .mobile-only-filter-bar {
  align-items: center;
  justify-content: space-between;
  width: 100%;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  height: 43px;
  padding: 0 18px;
  cursor: pointer;
  user-select: none;
  box-sizing: border-box;
}

.shorts-mobile-filter-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

#mobileShortsFilterSummary {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.02em;
}

.shorts-mobile-filter-right {
  display: flex;
  align-items: center;
  gap: 5px;
  color: rgba(217, 138, 31, 0.55);
  font-size: 0.78rem;
  font-weight: 700;
}

.shorts-filter-chevron {
  font-size: 0.62rem;
  color: rgba(255, 255, 255, 0.35);
  margin-left: 2px;
}

.shorts-pc-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.shorts-search-wrap {
  position: relative;
  display: flex;
  align-items: center;
  background-color: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 99px;
  padding: 9px 18px;
  width: 280px;
  max-width: 100%;
}

.shorts-search-wrap svg {
  color: var(--text-sub);
  margin-right: 10px;
  flex-shrink: 0;
}

.shorts-search-wrap .search-input {
  width: 100%;
  font-size: 0.82rem;
  color: var(--text-main);
  background: none;
  border: none;
  outline: none;
}

.shorts-pc-select-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.shorts-pc-select-row select {
  background-color: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  font-size: 0.82rem;
  font-weight: 650;
  padding: 9px 32px 9px 14px;
  border-radius: 8px;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  outline: none;
}

.shorts-select-arrow {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  color: var(--text-muted);
  font-size: 0.65rem;
}

.shorts-chips-section {
  margin-bottom: 0;
  padding: 0;
  position: relative;
}

.shorts-chips-scroll {
  display: flex;
  overflow-x: auto;
  gap: 8px;
  padding-bottom: 4px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.shorts-chips-scroll::-webkit-scrollbar {
  display: none;
}

/* 빠른 필터 칩 — pill 형태, 아이콘·텍스트 한 줄 정렬 */
.shorts-chips-scroll .chip-filter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  flex-shrink: 0;
  white-space: nowrap;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-sub);
  background-color: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  padding: 8px 14px;
  min-height: 34px;
  border-radius: 99px;
  cursor: pointer;
  line-height: 1;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.shorts-chips-scroll .chip-filter .chip-icon {
  font-size: 0;
  line-height: 0;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.shorts-chips-scroll .chip-filter .chip-icon img,
.shorts-chips-scroll .chip-filter .filter-chip-icon {
  width: 16px;
  height: 16px;
}

.shorts-chips-scroll .chip-filter .chip-text {
  display: inline-flex;
  align-items: center;
  line-height: 1.2;
}

.shorts-chips-scroll .chip-filter.active {
  font-weight: 700;
  color: #fff;
  background-color: var(--accent-orange);
  border-color: rgba(255, 255, 255, 0.05);
}

/* 칩 가로 스크롤 우측 페이드 */
.shorts-chips-section::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 4px;
  width: 34px;
  background: linear-gradient(270deg, rgba(15, 17, 19, 0.88) 0%, transparent 100%);
  pointer-events: none;
}

/* ── 섹션 공통 (본문 블록 간격은 portal-left-column gap으로 통일) ── */
.shorts-section {
  margin-bottom: 0;
}

.shorts-section .shorts-section-header {
  margin-bottom: 12px;
}

.shorts-section-header .section-title {
  font-size: 1.45rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  margin: 0;
}

.shorts-section-header .badge-count {
  background-color: var(--accent-orange);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 800;
  border: none;
  padding: 2px 8px;
  border-radius: 4px;
  margin-left: 8px;
}

/* 추천 섹션 3곳 — 카드 잘림 방지 */
#shortsTodaySection,
#shortsUnder10Section,
#shortsMusicExpSection {
  overflow: visible;
}
#shortsTodaySection .shorts-scroll-wrap,
#shortsUnder10Section .shorts-scroll-wrap,
#shortsMusicExpSection .shorts-scroll-wrap {
  position: relative;
  margin: 0;
  padding: 0;
  overflow: visible;
}

#shortsTodaySection .shorts-scroll-wrap::after,
#shortsUnder10Section .shorts-scroll-wrap::after,
#shortsMusicExpSection .shorts-scroll-wrap::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 6px;
  width: 28px;
  background: linear-gradient(270deg, rgba(15, 17, 19, 0.92) 0%, transparent 100%);
  pointer-events: none;
  z-index: 2;
  display: none;
}

#shortsTodaySection .shorts-scroll-row,
#shortsUnder10Section .shorts-scroll-row,
#shortsMusicExpSection .shorts-scroll-row {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  overflow-y: visible;
  padding-bottom: 6px;
  padding-right: 16px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

#shortsTodaySection .shorts-scroll-row::-webkit-scrollbar,
#shortsUnder10Section .shorts-scroll-row::-webkit-scrollbar,
#shortsMusicExpSection .shorts-scroll-row::-webkit-scrollbar {
  display: none;
}

#shortsTodaySection .shorts-scroll-card,
#shortsUnder10Section .shorts-scroll-card,
#shortsMusicExpSection .shorts-scroll-card {
  flex: 0 0 168px;
  width: 168px;
  min-width: 0;
  cursor: pointer;
  border-radius: 12px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  flex-direction: column;
}

#shortsTodaySection .shorts-scroll-card:hover,
#shortsUnder10Section .shorts-scroll-card:hover,
#shortsMusicExpSection .shorts-scroll-card:hover {
  border-color: rgba(242, 142, 53, 0.35);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35), 0 0 10px rgba(242, 142, 53, 0.1);
}

#shortsTodaySection .shorts-scroll-thumb,
#shortsUnder10Section .shorts-scroll-thumb,
#shortsMusicExpSection .shorts-scroll-thumb {
  width: 100%;
  /* 16/10 대비 높이 25% 확대 — 하단 정보 영역과 시각 균형 */
  aspect-ratio: 32 / 25;
  height: auto;
  background-size: cover;
  background-position: center;
  background-color: #16161a;
  position: relative;
  flex-shrink: 0;
}

#shortsTodaySection .shorts-scroll-type-badge,
#shortsUnder10Section .shorts-scroll-type-badge,
#shortsMusicExpSection .shorts-scroll-type-badge {
  position: absolute;
  top: 6px;
  left: 6px;
  z-index: 3;
  max-width: calc(100% - 12px);
}

#shortsTodaySection .shorts-scroll-type-badge .badge,
#shortsUnder10Section .shorts-scroll-type-badge .badge,
#shortsMusicExpSection .shorts-scroll-type-badge .badge {
  font-size: 0.58rem;
  font-weight: 750;
  padding: 2px 6px;
  border-radius: 4px;
  line-height: 1.2;
  display: inline-block;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  border: none;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
}

/* 추천 행 — 홈 AI Films 타입 배지(그라디언트) 그대로 사용, 큐레이터만 테두리 스타일 유지 */
#shortsTodaySection .shorts-scroll-type-badge .badge-curator,
#shortsUnder10Section .shorts-scroll-type-badge .badge-curator,
#shortsMusicExpSection .shorts-scroll-type-badge .badge-curator {
  background: rgba(242, 193, 78, 0.15) !important;
  color: #f5d78e !important;
  border: 1px solid rgba(242, 193, 78, 0.35) !important;
  box-shadow: none !important;
}

#shortsTodaySection .shorts-scroll-runtime,
#shortsUnder10Section .shorts-scroll-runtime,
#shortsMusicExpSection .shorts-scroll-runtime {
  position: absolute;
  bottom: 6px;
  right: 6px;
  background: rgba(0, 0, 0, 0.85);
  border: 1px solid rgba(255, 165, 0, 0.25);
  color: #ffb549;
  font-size: 10px;
  font-family: var(--font-mono);
  font-weight: 800;
  padding: 2px 5px;
  border-radius: 4px;
  z-index: 3;
  line-height: 1;
}

#shortsTodaySection .shorts-scroll-info,
#shortsUnder10Section .shorts-scroll-info,
#shortsMusicExpSection .shorts-scroll-info {
  padding: 10px 10px 11px;
  display: flex;
  flex-direction: column;
  gap: 0;
  flex: 1;
  min-width: 0;
}

#shortsTodaySection .shorts-scroll-title,
#shortsUnder10Section .shorts-scroll-title,
#shortsMusicExpSection .shorts-scroll-title {
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.35;
  max-height: 2.7em;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  margin: 0 0 5px 0;
}

#shortsTodaySection .shorts-scroll-type-genre,
#shortsUnder10Section .shorts-scroll-type-genre,
#shortsMusicExpSection .shorts-scroll-type-genre {
  font-size: 0.66rem;
  color: rgba(255, 255, 255, 0.42);
  font-weight: 700;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 6px;
}

#shortsTodaySection .shorts-scroll-stats,
#shortsUnder10Section .shorts-scroll-stats,
#shortsMusicExpSection .shorts-scroll-stats {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.68rem;
  color: rgba(255, 255, 255, 0.48);
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 8px;
}

#shortsTodaySection .shorts-scroll-rating,
#shortsUnder10Section .shorts-scroll-rating,
#shortsMusicExpSection .shorts-scroll-rating {
  color: var(--accent-gold);
  font-weight: 700;
  flex-shrink: 0;
}

#shortsTodaySection .shorts-scroll-rating .rating-star,
#shortsUnder10Section .shorts-scroll-rating .rating-star,
#shortsMusicExpSection .shorts-scroll-rating .rating-star {
  font-size: 0.62rem;
}

#shortsTodaySection .shorts-scroll-dot,
#shortsUnder10Section .shorts-scroll-dot,
#shortsMusicExpSection .shorts-scroll-dot {
  opacity: 0.55;
  flex-shrink: 0;
}

#shortsTodaySection .shorts-scroll-views,
#shortsUnder10Section .shorts-scroll-views,
#shortsMusicExpSection .shorts-scroll-views {
  overflow: hidden;
  text-overflow: ellipsis;
  color: rgba(255, 255, 255, 0.48);
  font-weight: 600;
}

/*
 * 추천 행 카드 — 크리에이터·출처 위 구분선 (신작·연재 카탈로그 푸터와 동일 톤)
 */
#shortsTodaySection .shorts-scroll-footer,
#shortsUnder10Section .shorts-scroll-footer,
#shortsMusicExpSection .shorts-scroll-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-top: 2px;
  padding-top: 6px;
  border-top: 1px solid rgba(255, 255, 255, 0.075);
  font-size: 0.62rem;
  line-height: 1.2;
}

#shortsTodaySection .shorts-scroll-creator,
#shortsUnder10Section .shorts-scroll-creator,
#shortsMusicExpSection .shorts-scroll-creator {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: rgba(255, 255, 255, 0.52);
  font-weight: 600;
}

#shortsTodaySection .shorts-scroll-source,
#shortsUnder10Section .shorts-scroll-source,
#shortsMusicExpSection .shorts-scroll-source {
  flex-shrink: 0;
  color: rgba(255, 255, 255, 0.55);
  font-weight: 600;
}

/* ── AI 쇼츠 픽 — 9:16 세로 3D 캐러셀 ── */
.shorts-pick-section {
  overflow: visible;
}

.shorts-pick-desc {
  margin: 4px 0 0;
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.52);
  font-weight: 500;
}

.shorts-pick-carousel-wrap {
  overflow: visible;
  margin: 0 -8px;
}

/*
 * AI 쇼츠 픽 — 3D Coverflow (데스크탑 포함)
 * common.css .completed-grid 규칙은 @media (max-width:768px) 안에만 있어
 * PC에서는 .series-grid 기본 grid가 적용되어 카드가 세로로 쌓임 → 여기서 flex·3D 재정의
 */
body[data-page="shorts"] #shortsPickSection {
  overflow: visible;
}

body[data-page="shorts"] #shortsPickGrid.shorts-pick-grid.completed-grid {
  display: flex !important;
  flex-wrap: nowrap !important;
  grid-template-columns: none !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  scroll-snap-type: x mandatory !important;
  gap: 10px !important;
  padding: 8px calc(50% - 74px) 24px calc(50% - 74px) !important;
  margin-left: -8px !important;
  margin-right: -8px !important;
  scroll-behavior: smooth !important;
  scrollbar-width: none !important;
  perspective: 1200px !important;
  transform-style: preserve-3d !important;
  -webkit-overflow-scrolling: touch !important;
  touch-action: pan-x pan-y !important;
  user-select: none;
}

body[data-page="shorts"] #shortsPickGrid.shorts-pick-grid.completed-grid::-webkit-scrollbar {
  display: none !important;
}

body[data-page="shorts"] #shortsPickGrid .shorts-pick-card {
  position: relative !important;
  flex: 0 0 148px !important;
  width: 148px !important;
  min-width: 148px !important;
  max-width: 148px !important;
  scroll-snap-align: center !important;
  margin: 0 !important;
  box-sizing: border-box !important;
  transform-style: preserve-3d !important;
  background: #12131c !important;
  border: 1px solid rgba(255, 255, 255, 0.09) !important;
  border-radius: 12px !important;
  overflow: hidden !important;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.42) !important;
  cursor: pointer;
  --ratio: 0;
  --abs-ratio: 0;
  /* 좌우로 갈수록 크기·기울기 차이를 줄여 더 많은 카드가 읽히도록 */
  transform:
    translateX(calc(var(--ratio) * -14px))
    translateZ(calc(var(--abs-ratio) * -40px))
    rotateY(calc(var(--ratio) * -10deg))
    scale(calc(1 - (var(--abs-ratio) * 0.045))) !important;
  opacity: calc(1 - (var(--abs-ratio) * 0.14)) !important;
  transition: transform 0.18s cubic-bezier(0.25, 0.8, 0.25, 1), opacity 0.18s ease-out, box-shadow 0.2s ease !important;
}

/* PC — 드래그 스크롤 커서 */
@media (min-width: 769px) {
  body[data-page="shorts"] #shortsPickGrid.shorts-pick-grid.completed-grid {
    cursor: grab;
  }

  body[data-page="shorts"] #shortsPickGrid.shorts-pick-grid.completed-grid.is-dragging {
    cursor: grabbing;
    scroll-snap-type: none !important;
    scroll-behavior: auto !important;
  }
}

body[data-page="shorts"] #shortsPickGrid .shorts-pick-card::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: inherit;
  pointer-events: none;
  box-shadow: inset 0 0 16px rgba(242, 193, 78, calc(0.35 * (1 - var(--abs-ratio)))) !important;
  border: 1.5px solid rgba(242, 193, 78, calc(0.6 * (1 - var(--abs-ratio)))) !important;
  opacity: calc(1 - var(--abs-ratio));
  transition: opacity 0.15s ease !important;
  z-index: 6;
}

/* PC에서도 닷 표시 — common.css는 .completed-dots를 데스크탑에서 숨김 */
body[data-page="shorts"] .shorts-pick-dots.completed-dots {
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  gap: 6px !important;
}

body[data-page="shorts"] .shorts-pick-dots .completed-dot {
  width: 7px !important;
  height: 7px !important;
  border-radius: 50% !important;
  background: rgba(255, 255, 255, 0.25) !important;
  cursor: pointer !important;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

body[data-page="shorts"] .shorts-pick-dots .completed-dot.active {
  background: var(--accent-gold) !important;
  width: 18px !important;
  border-radius: 4px !important;
}

body[data-page="shorts"] #shortsPickGrid .shorts-pick-poster {
  position: relative;
  width: 100%;
  aspect-ratio: 9 / 16;
  background-size: cover;
  background-position: center;
  border-radius: 12px 12px 0 0;
  overflow: hidden;
}

body[data-page="shorts"] #shortsPickGrid .shorts-pick-poster-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 3;
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  padding: 3px 6px;
}

body[data-page="shorts"] #shortsPickGrid .shorts-pick-runtime {
  position: absolute;
  bottom: 8px;
  right: 8px;
  z-index: 3;
  background: rgba(0, 0, 0, 0.82);
  border: 1px solid rgba(255, 165, 0, 0.28);
  color: #ffb549;
  font-size: 10px;
  font-family: var(--font-mono);
  font-weight: 850;
  padding: 2px 6px;
  border-radius: 4px;
}

body[data-page="shorts"] #shortsPickGrid .shorts-pick-play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.18);
  opacity: 0;
  transition: opacity 0.2s ease;
}

body[data-page="shorts"] #shortsPickGrid .shorts-pick-card:hover .shorts-pick-play,
body[data-page="shorts"] #shortsPickGrid .shorts-pick-card:focus-within .shorts-pick-play {
  opacity: 1;
}

body[data-page="shorts"] #shortsPickGrid .shorts-pick-body {
  padding: 10px 10px 12px;
  text-align: left;
}

body[data-page="shorts"] #shortsPickGrid .shorts-pick-title {
  margin: 0 0 6px;
  font-size: 0.84rem;
  font-weight: 750;
  line-height: 1.35;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

body[data-page="shorts"] #shortsPickGrid .shorts-pick-meta-row {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.68rem;
  color: rgba(255, 255, 255, 0.48);
  margin-bottom: 4px;
  min-width: 0;
}

body[data-page="shorts"] #shortsPickGrid .shorts-pick-platform,
body[data-page="shorts"] #shortsPickGrid .shorts-pick-creator {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

body[data-page="shorts"] #shortsPickGrid .shorts-pick-creator {
  flex: 1;
}

body[data-page="shorts"] #shortsPickGrid .shorts-pick-meta-sep {
  flex-shrink: 0;
  opacity: 0.5;
}

body[data-page="shorts"] #shortsPickGrid .shorts-pick-views {
  font-size: 0.68rem;
  color: rgba(255, 255, 255, 0.42);
  font-weight: 650;
}

body[data-page="shorts"] .shorts-pick-dots {
  margin-top: 8px !important;
}

/* 카탈로그 — 쇼츠 전용 다중 배지 스택 */
.shorts-format-badge-stack {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  top: 8px !important;
  left: 8px !important;
  right: auto !important;
}

.badge-shorts-format {
  font-size: 0.58rem !important;
  font-weight: 800 !important;
  letter-spacing: 0.03em;
  padding: 3px 6px !important;
  border-radius: 4px !important;
  line-height: 1.2 !important;
  border: 1px solid transparent;
}

.badge-shorts-tag {
  background: rgba(255, 90, 120, 0.18) !important;
  color: #ff8fa8 !important;
  border-color: rgba(255, 90, 120, 0.35) !important;
}

.badge-shorts-vertical {
  background: rgba(120, 180, 255, 0.15) !important;
  color: #9ec5ff !important;
  border-color: rgba(120, 180, 255, 0.32) !important;
}

.badge-shorts-under1 {
  background: rgba(242, 193, 78, 0.15) !important;
  color: #f5d78e !important;
  border-color: rgba(242, 193, 78, 0.32) !important;
}

/* ── 메인 카탈로그 그리드 ── */
.shorts-catalog-grid {
  margin-bottom: 8px;
}

/* 모바일 슬림 3D Coverflow 스택 — PC에서는 숨김 */
.shorts-catalog-slim-stack {
  display: none;
  overflow: visible;
}

.shorts-catalog-slim-stack.is-active {
  display: block;
}

/* 3D 줄 사이 간격 — 마지막 줄은 더보기 버튼과 맞닿음 */
.shorts-slim-carousel-row + .shorts-slim-carousel-row {
  margin-top: 10px;
}

/* 슬림 3D 영역 — common.css .completed-grid 규칙 재사용, 섹션 가로 스크롤 허용 */
body[data-page="shorts"] #shortsCatalogSection {
  overflow: visible;
}

@media (max-width: 768px) {
  body[data-page="shorts"] .shorts-catalog-slim-stack.is-active {
    margin-top: 6px;
    margin-bottom: 0;
  }

  /* 더보기 버튼 — 3D 캐러셀 스택 바로 아래 배치 */
  body[data-page="shorts"] #shortsCatalogSection .shorts-load-more-wrap {
    margin-top: 12px;
  }

  body[data-page="shorts"] .shorts-catalog-slim-dots {
    margin-top: 16px !important;
    margin-bottom: 4px !important;
  }

  /*
   * 단편 슬림 3D — 스냅·smooth 제거 + 가로 스크롤 명시
   * (줄당 12장 상한으로 스크롤·3D 연산 부담 완화)
   */
  body[data-page="shorts"] .shorts-catalog-slim-grid.completed-grid {
    overflow-x: auto !important;
    overflow-y: hidden !important;
    scroll-snap-type: none !important;
    scroll-behavior: auto !important;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
  }

  body[data-page="shorts"] .shorts-catalog-slim-grid.completed-grid .series-card {
    scroll-snap-align: none !important;
  }

  /* 슬림 카드 본문 — 완결 명작 섹션과 동일한 좌측 정렬·패딩 */
  body[data-page="shorts"] .shorts-slim-3d-card .series-body {
    padding: 10px 10px 12px !important;
    text-align: left !important;
  }

  body[data-page="shorts"] .shorts-slim-3d-card .series-card-title {
    font-size: 0.88rem;
    line-height: 1.35;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  body[data-page="shorts"] .shorts-slim-3d-card .series-card-footer {
    font-size: 12px;
    gap: 4px;
    padding-top: 6px;
    margin-top: 2px;
  }

  body[data-page="shorts"] .shorts-slim-3d-card .series-progress {
    color: rgba(255, 255, 255, 0.42);
    font-weight: 700;
    font-size: 0.7rem;
  }

  body[data-page="shorts"] .shorts-slim-3d-card .series-card-footer > span {
    color: rgba(255, 255, 255, 0.52);
    font-weight: 600;
  }
}

@media (min-width: 769px) {
  .shorts-catalog-slim-stack,
  .shorts-catalog-slim-stack.is-active {
    display: none !important;
  }
}

/* PC — 6열 균일 그리드, 마지막 행 정렬 보정 */
@media (min-width: 1025px) {
  body[data-page="shorts"] #shortsCatalogGrid {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 16px !important;
    width: 100% !important;
    justify-content: flex-start !important;
    align-items: stretch !important;
  }

  body[data-page="shorts"] #shortsCatalogGrid .shorts-catalog-card {
    width: calc((100% - (16px * 5)) / 6) !important;
    min-width: 0 !important;
    max-width: calc((100% - (16px * 5)) / 6) !important;
    display: flex !important;
    flex-direction: column !important;
    height: auto !important;
  }
}

@media (min-width: 1025px) and (max-width: 1400px) {
  body[data-page="shorts"] #shortsCatalogGrid .shorts-catalog-card {
    width: calc((100% - (16px * 3)) / 4) !important;
    max-width: calc((100% - (16px * 3)) / 4) !important;
  }
}

body[data-page="shorts"] .shorts-catalog-card .poster-wrap {
  aspect-ratio: 2 / 3;
  position: relative;
  overflow: hidden;
}

/* 영화·영상 전체 목록만 16:9. 추천 행·쇼츠 9:16·다른 페이지는 그대로. */
body[data-catalog="films"] #shortsCatalogGrid .shorts-catalog-card .poster-wrap {
  aspect-ratio: 16 / 9;
  background-color: #14161f;
}

body[data-page="shorts"] .shorts-catalog-card .poster-art-generic {
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
}

/* 세로 원본에 가로 썸네일이 없으면 16:9 안에 맞추고 늘리지 않는다. */
body[data-catalog="films"] #shortsCatalogGrid .shorts-catalog-card .poster-wrap.is-letterbox .poster-art-generic {
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}

body[data-page="shorts"] .shorts-catalog-card .series-body,
body[data-page="shorts"] .shorts-catalog-card .shorts-card-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding-bottom: 12px;
  min-width: 0;
}

.shorts-catalog-card {
  cursor: pointer;
  height: 100%;
}

.shorts-runtime-badge {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(0, 0, 0, 0.85);
  border: 1px solid rgba(255, 165, 0, 0.25);
  color: #ffb549;
  font-size: 11px;
  font-family: var(--font-mono);
  font-weight: 850;
  padding: 2.5px 6px;
  border-radius: 4px;
  z-index: 3;
  line-height: 1;
}

/* 카드 상단 타입 배지 — 위치·크기 통일 */
.shorts-catalog-card .shorts-type-badge {
  top: 8px;
  left: 8px;
  right: auto;
  z-index: 4;
}

.shorts-catalog-card .shorts-type-badge .badge {
  font-size: 0.62rem;
  font-weight: 750;
  padding: 3px 7px;
  border-radius: 5px;
  line-height: 1.2;
  max-width: 100%;
  display: inline-block;
}

/* 신작 에피소드 카탈로그와 동일한 신규·큐레이터 배지 테두리 스타일 */
body[data-page="shorts"] #shortsCatalogGrid .series-card .badge-ongoing {
  background: rgba(79, 124, 255, 0.15) !important;
  color: #8faeff !important;
  border: 1px solid rgba(79, 124, 255, 0.35) !important;
  box-shadow: none !important;
}

body[data-page="shorts"] #shortsCatalogGrid .series-card .badge-curator {
  background: rgba(242, 193, 78, 0.15) !important;
  color: #f5d78e !important;
  border: 1px solid rgba(242, 193, 78, 0.35) !important;
  box-shadow: none !important;
}

/* 전체 카탈로그 — 인기 배지 (신규·큐레이터 다음 우선순위) */
body[data-page="shorts"] #shortsCatalogGrid .series-card .badge-rising {
  font-size: 0.58rem !important;
  padding: 2px 6px !important;
  line-height: 1.2 !important;
}

/* 배지 없는 카드 — 빈 슬롯 숨김 */
body[data-page="shorts"] .shorts-type-badge:empty {
  display: none !important;
}

.shorts-catalog-card .badge-label-short {
  display: none !important;
}

.shorts-card-title {
  font-size: 13.5px;
  line-height: 1.35;
  font-weight: 800;
  margin-bottom: 5px;
  display: block;
  width: 100%;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 🌐 — 제목 바로 옆, 같은 줄 (줄 끝 정렬 방지) */
body[data-page="shorts"] #shortsCatalogGrid .shorts-card-body .title-assist-wrapper,
.shorts-card-body .title-assist-wrapper {
  width: fit-content !important;
  max-width: 100% !important;
  min-width: 0;
  margin-bottom: 5px;
  display: inline-flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  justify-content: flex-start !important;
  align-self: flex-start !important;
  overflow: visible !important;
}

body[data-page="shorts"] #shortsCatalogGrid .shorts-card-body .title-assist-wrapper > .shorts-card-title,
.shorts-card-body .title-assist-wrapper > .shorts-card-title {
  margin-bottom: 0 !important;
  flex: 0 1 auto !important;
  min-width: 0 !important;
  max-width: 100%;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

body[data-page="shorts"] #shortsCatalogGrid .shorts-card-body .title-assist-wrapper .title-assist-icon,
.shorts-card-body .title-assist-wrapper .title-assist-icon {
  margin-top: 0 !important;
  align-self: center !important;
  flex: 0 0 auto !important;
  flex-shrink: 0 !important;
}

.shorts-card-meta {
  margin-bottom: 6px;
  flex-shrink: 0;
}

.shorts-type-genre {
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.42);
  font-weight: 700;
  line-height: 1.3;
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.shorts-rating-views {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  flex-wrap: nowrap;
  margin-bottom: 10px;
}

.shorts-rating-views .rating-container {
  flex-shrink: 0;
}

/*
 * 전체 AI 단편 & 쇼츠 카탈로그 — PC 평점·조회수 (연재 catalog-rating-stats 12px와 동일)
 * · PC에 font-size 미지정 시 브라우저 기본(16px)으로 과대 표시되던 문제 보정
 */
body[data-page="shorts"] #shortsCatalogGrid .shorts-rating-views {
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
}

body[data-page="shorts"] #shortsCatalogGrid .shorts-rating-views .rating-container {
  display: flex;
  align-items: center;
  gap: 3px;
  color: var(--accent-gold);
  font-weight: 700;
}

body[data-page="shorts"] #shortsCatalogGrid .shorts-rating-views .rating-star,
body[data-page="shorts"] #shortsCatalogGrid .shorts-rating-views .rating-value {
  font-size: 1em;
  line-height: 1.2;
  font-weight: 700;
}

body[data-page="shorts"] #shortsCatalogGrid .shorts-rating-views .rating-star {
  font-size: 1em;
}

.shorts-views-text {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.48);
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.shorts-views-text .views-label {
  font-weight: 500;
  opacity: 0.9;
}

/*
 * 메인 카탈로그·전체 단편 그리드 — 크리에이터·출처 구분선 (연재·신작과 동일)
 */
.shorts-card-footer {
  padding-top: 8px;
  margin-top: auto;
  border-top: 1px solid rgba(255, 255, 255, 0.075);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  min-height: 22px;
}

.shorts-card-footer .creator-name-update {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: rgba(255, 255, 255, 0.52);
  font-weight: 600;
}

.shorts-source-tag {
  color: rgba(255, 255, 255, 0.55);
  font-size: 10px;
  font-weight: 600;
  flex-shrink: 0;
}

/* 단편 페이지 전역 — 카탈로그·슬림 카드 푸터 구분선·메타 가독성 (common.css .series-card-footer 0.04 덮어씀) */
body[data-page="shorts"] #shortsCatalogGrid .series-card .series-card-footer,
body[data-page="shorts"] .shorts-catalog-card .shorts-card-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.075) !important;
}

body[data-page="shorts"] #shortsCatalogGrid .series-card .series-card-footer .creator-name-update,
body[data-page="shorts"] .shorts-catalog-card .shorts-card-footer .creator-name-update {
  color: rgba(255, 255, 255, 0.52) !important;
  font-weight: 600 !important;
}

body[data-page="shorts"] #shortsCatalogGrid .series-card .series-card-footer .shorts-source-tag,
body[data-page="shorts"] .shorts-catalog-card .shorts-card-footer .shorts-source-tag {
  color: rgba(255, 255, 255, 0.55) !important;
  font-weight: 600 !important;
}

.badge-curator {
  background: rgba(212, 175, 55, 0.15);
  color: var(--accent-gold);
  border: 1px solid rgba(212, 175, 55, 0.3);
}

.shorts-load-more-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
}

.shorts-load-more-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 750;
  font-size: 0.9rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
  color: #fff;
  padding: 14px 48px;
  border-radius: 12px;
  cursor: pointer;
  min-width: 220px;
  height: 48px;
}

.shorts-load-more-chevron {
  font-size: 0.72rem;
  color: var(--accent-gold);
  transition: transform 0.2s ease;
}

/* 모바일: 더보기 후 3D 캐러셀에 항목이 추가됐음을 ▲로 안내 */
.shorts-load-more-btn.is-carousel-expanded .shorts-load-more-chevron {
  transform: translateY(-1px);
}

.shorts-empty-state {
  grid-column: 1 / -1;
  padding: 60px 20px;
  text-align: center;
  background: rgba(255, 255, 255, 0.01);
  border: 1px dashed var(--border-color);
  border-radius: 12px;
}

.shorts-empty-icon {
  font-size: 2.2rem;
  margin-bottom: 12px;
}

.shorts-empty-state p {
  color: var(--text-main);
  font-size: 1rem;
  font-weight: 700;
  margin: 0 0 6px;
}

.shorts-empty-sub {
  color: var(--text-muted) !important;
  font-size: 0.85rem !important;
  font-weight: 500 !important;
}

/* ── PC 사이드바 — 메인 portal-right-sidebar gap(36px)과 동일 ── */
body[data-page="shorts"] .portal-right-sidebar.shorts-page-sidebar {
  display: flex;
  flex-direction: column;
  gap: 36px;
}

.shorts-sidebar-block,
.shorts-mobile-block {
  margin-bottom: 0;
}

.shorts-sidebar-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.shorts-live-badge {
  color: var(--accent-orange);
  font-size: 0.72rem;
  font-weight: 850;
  display: flex;
  align-items: center;
  gap: 4px;
}

.shorts-live-badge .live-blink-dot {
  width: 6px;
  height: 6px;
  background: var(--accent-orange);
  border-radius: 50%;
  display: inline-block;
}

.shorts-sidebar-thumb {
  width: 64px;
  height: 44px;
  border-radius: 6px;
  background-size: cover;
  background-position: center;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 0;
  line-height: 0;
  color: transparent;
}

.shorts-sidebar-rank-item {
  padding: 10px 12px;
  display: flex;
  align-items: stretch;
  gap: 0;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  cursor: pointer;
  transition: var(--transition-fast);
  min-height: 64px;
}

.shorts-sidebar-rank-item:hover {
  border-color: rgba(242, 142, 53, 0.25);
}

/* 실시간 인기·숨은 명작 TOP 5 — 신작 실시간 인기 신작 위젯과 동일 톤 */
.shorts-sidebar-hot-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-width: 0;
}

.shorts-hot-rank-num {
  font-size: 1.2rem;
  font-weight: 800;
  font-style: italic;
  width: 22px;
  min-width: 22px;
  text-align: center;
  flex-shrink: 0;
  line-height: 1;
}

.shorts-hot-rank-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
}

.shorts-hot-rank-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.25;
  width: 100%;
}

.shorts-hot-rank-sub-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  min-width: 0;
}

.shorts-hot-rank-format {
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--text-sub);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  min-width: 0;
  line-height: 1.2;
}

.shorts-hot-rank-runtime-badge {
  flex-shrink: 0;
  margin-left: auto;
  font-family: var(--font-mono, ui-monospace, monospace);
  font-size: 0.62rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--accent-orange);
  background: rgba(242, 142, 53, 0.12);
  border: 1px solid rgba(242, 142, 53, 0.22);
  padding: 2px 6px;
  border-radius: 4px;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.shorts-sidebar-hot-row:hover .shorts-hot-rank-runtime-badge {
  background: rgba(242, 142, 53, 0.2);
  border-color: rgba(242, 142, 53, 0.38);
  color: #ffb549;
}

.shorts-hot-rank-stats {
  font-size: 0.68rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: nowrap;
  width: 100%;
  line-height: 1.2;
}

.shorts-hot-stat-rating {
  color: var(--accent-gold);
  font-weight: 700;
  flex-shrink: 0;
}

.shorts-hot-stat-rating.sidebar-rank-hot {
  color: var(--accent-orange);
}

.shorts-hot-stat-sep {
  opacity: 0.55;
  flex-shrink: 0;
}

.shorts-hot-stat-views {
  flex-shrink: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 사이드바 10분 이하·큐레이터 픽 — 신작 에피소드 10분 이하 추천 위젯과 동일 카드 톤 */
.shorts-sidebar-compact-list {
  display: flex;
  flex-direction: column;
  gap: 11px;
}

/* 10분 이하 추천 — 스택형 카드 (신작 ne-sidebar-stack-card 동형) */
.shorts-sidebar-stack-card {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  cursor: pointer;
  transition: var(--transition-fast);
  min-height: 68px;
}

.shorts-sidebar-stack-card:hover {
  border-color: rgba(168, 85, 247, 0.28);
}

.shorts-stack-row-top {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 20px;
}

.shorts-stack-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  min-width: 0;
}

.shorts-stack-runtime {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  flex-shrink: 0;
  color: #a855f7;
  background: rgba(168, 85, 247, 0.12);
  line-height: 1.2;
}

.shorts-stack-row-bottom {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.72rem;
  color: var(--text-muted);
  opacity: 0.9;
  min-height: 18px;
}

.shorts-stack-meta-left {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  min-width: 0;
  font-weight: 600;
  color: var(--text-sub);
}

.shorts-stack-trailing {
  flex-shrink: 0;
  white-space: nowrap;
  color: var(--accent-gold);
  font-weight: 700;
}

.shorts-sidebar-pick-card {
  padding: 12px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 5px;
  background-color: transparent;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  cursor: pointer;
  transition: var(--transition-fast);
}

.shorts-sidebar-pick-card:hover {
  border-color: rgba(168, 85, 247, 0.28);
  background-color: transparent;
  transform: none;
}

.shorts-pick-card-row {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.shorts-pick-card-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  min-width: 0;
}

.shorts-pick-curator-badge {
  font-size: 0.68rem;
  color: var(--accent-gold);
  font-weight: 700;
  background: rgba(212, 175, 55, 0.12);
  padding: 2px 6px;
  border-radius: 4px;
  flex-shrink: 0;
  border: 1px solid rgba(212, 175, 55, 0.22);
  line-height: 1.2;
}

.shorts-pick-card-row-bottom {
  font-size: 0.72rem;
  color: var(--text-muted);
  opacity: 0.85;
}

.shorts-pick-card-stats {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.shorts-pick-card-rating {
  color: var(--accent-gold);
  flex-shrink: 0;
}

.shorts-pick-card-runtime {
  font-size: 0.68rem;
  color: #a855f7;
  font-weight: 700;
  background: rgba(168, 85, 247, 0.12);
  padding: 2px 6px;
  border-radius: 4px;
  flex-shrink: 0;
  line-height: 1.2;
}

/* 모바일 하단 사이드바 — 기본 숨김 (PC) */
.shorts-mobile-bottom-sections {
  display: none;
}

/* 단편 상세 모달 관련 추천 리스트 → common.css 공용 정의 */

/* PC — 모바일 전용 필터 바만 숨김 */
@media (min-width: 769px) {
  .shorts-filter-bar .mobile-only-filter-bar {
    display: none !important;
  }

  .shorts-pc-filters {
    display: flex !important;
  }
}

/* PC — 사이드바 노출 (common.css 1024px 숨김 보정) */
@media (min-width: 992px) {
  body[data-page="shorts"] .portal-right-sidebar.shorts-page-sidebar {
    display: flex !important;
  }
}

/* 모바일 */
@media (max-width: 768px) {
  body[data-page="shorts"] .portal-layout-container {
    margin-top: 96px;
  }

  /* AI 쇼츠 픽 — 모바일 3D: 메인 완결 명작(completed-grid)과 동일 입체감 */
  body[data-page="shorts"] #shortsPickGrid.shorts-pick-grid.completed-grid {
    gap: 12px !important;
    padding: 16px calc(50% - 80px) 28px calc(50% - 80px) !important;
    margin-left: -16px !important;
    margin-right: -16px !important;
    perspective: 1000px !important;
    /*
     * CSS mandatory snap + 3D transform 조합 시 오른쪽 스와이프만 초기 카드로 튕김
     * → snap 해제 후 shorts.js scroll-end JS 스냅으로 대체 (슬림 3D 카탈로그와 동일)
     */
    scroll-snap-type: none !important;
    scroll-behavior: auto !important;
    overscroll-behavior-x: contain;
  }

  body[data-page="shorts"] #shortsPickGrid .shorts-pick-card {
    scroll-snap-align: none !important;
    scroll-snap-stop: normal;
    flex: 0 0 160px !important;
    width: 160px !important;
    min-width: 160px !important;
    max-width: 160px !important;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.5) !important;
    /* 메인 completed-grid — translateZ·rotateY·scale 동일 */
    transform:
      translateX(calc(var(--ratio) * -38px))
      translateZ(calc(var(--abs-ratio) * -120px))
      rotateY(calc(var(--ratio) * -22deg))
      scale(calc(1 - (var(--abs-ratio) * 0.12))) !important;
    opacity: calc(1.05 - (var(--abs-ratio) * 0.32)) !important;
    transition: transform 0.15s cubic-bezier(0.25, 0.8, 0.25, 1), opacity 0.15s ease-out, box-shadow 0.2s ease !important;
  }

  /* hover 시 common.css translateY(-8px) 간섭 차단 */
  body[data-page="shorts"] #shortsPickGrid .shorts-pick-card:hover {
    transform:
      translateX(calc(var(--ratio) * -38px))
      translateZ(calc(var(--abs-ratio) * -120px))
      rotateY(calc(var(--ratio) * -22deg))
      scale(calc(1 - (var(--abs-ratio) * 0.12))) !important;
  }

  body[data-page="shorts"] #shortsPickGrid .shorts-pick-title {
    font-size: 0.8rem;
  }

  .shorts-pc-filters {
    display: none !important;
  }

  .shorts-filter-bar .mobile-only-filter-bar {
    display: flex !important;
  }

  body[data-page="shorts"] .portal-right-sidebar.shorts-page-sidebar {
    display: none !important;
  }

  .shorts-mobile-bottom-sections {
    display: block;
    margin-top: 0;
    margin-bottom: 16px;
  }

  /* 카탈로그 ↔ 하단 탭 — 홈 #seriesOngoing + #mobilePopularAndAwards 와 동일 */
  body[data-page="shorts"] #shortsCatalogSection + .shorts-mobile-bottom-sections {
    margin-top: 8px !important;
  }

  /* 탭바·패널·제목·카드 폭 — components/catalog-mobile-tabs.css (쇼츠 표준) */

  /*
   * 모바일 탭 섹션 — 연재·신작 주간·업데이트 탭 카드와 동일 타이포
   * · 인기 TOP (실시간 인기·숨은 명작): weeklyPopularMobile — 제목 0.88rem, 메타 0.75rem, HOT 0.70rem, 순위 1.26rem
   * · 10분 이하 스택: newEpisodeUpdatesMobile — 제목 0.88rem, 배지 0.74rem, 하단 0.78rem
   * · 큐레이터 픽: newEpisodeUpdatesMobile 동일
   */
  body[data-page="shorts"] .shorts-mobile-bottom-sections .sidebar-rank-title,
  body[data-page="shorts"] .shorts-mobile-bottom-sections .shorts-hot-rank-title,
  body[data-page="shorts"] .shorts-mobile-bottom-sections .shorts-stack-title,
  body[data-page="shorts"] .shorts-mobile-bottom-sections .shorts-pick-card-title {
    font-size: 0.88rem !important;
  }

  body[data-page="shorts"] .shorts-mobile-bottom-sections .sidebar-rank-num,
  body[data-page="shorts"] .shorts-mobile-bottom-sections .shorts-hot-rank-num {
    font-size: 1.26rem !important;
  }

  body[data-page="shorts"] .shorts-mobile-bottom-sections .sidebar-rank-meta {
    font-size: 0.75rem !important;
  }

  body[data-page="shorts"] .shorts-mobile-bottom-sections .sidebar-rank-meta .sidebar-rank-hot,
  body[data-page="shorts"] .shorts-mobile-bottom-sections .sidebar-rank-meta > span:first-child {
    font-size: 0.70rem !important;
  }

  /* 인기·숨은 명작 — 타입·평점 줄 (연재 weeklyPopularMobile .sidebar-rank-meta 동급) */
  body[data-page="shorts"] .shorts-mobile-bottom-sections .shorts-hot-rank-format,
  body[data-page="shorts"] .shorts-mobile-bottom-sections .shorts-hot-rank-stats {
    font-size: 0.75rem !important;
  }

  body[data-page="shorts"] .shorts-mobile-bottom-sections .shorts-hot-stat-rating,
  body[data-page="shorts"] .shorts-mobile-bottom-sections .shorts-hot-stat-rating.sidebar-rank-hot {
    font-size: 0.70rem !important;
  }

  body[data-page="shorts"] .shorts-mobile-bottom-sections .shorts-hot-rank-runtime-badge {
    font-size: 0.74rem !important;
  }

  /* 10분 이하 스택 · 큐레이터 — 하단 메타 줄 (연재·신작 업데이트 탭 0.78rem) */
  body[data-page="shorts"] .shorts-mobile-bottom-sections .shorts-stack-row-bottom,
  body[data-page="shorts"] .shorts-mobile-bottom-sections .shorts-pick-card-row-bottom {
    font-size: 0.78rem !important;
  }

  body[data-page="shorts"] .shorts-mobile-bottom-sections .shorts-stack-runtime,
  body[data-page="shorts"] .shorts-mobile-bottom-sections .shorts-pick-curator-badge,
  body[data-page="shorts"] .shorts-mobile-bottom-sections .shorts-pick-card-runtime {
    font-size: 0.74rem !important;
  }

  /* 모바일 2열 카드 그리드 */
  .shorts-catalog-grid.series-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px !important;
  }

  .shorts-catalog-card.style-poster-hover {
    grid-column: auto !important;
    width: 100% !important;
  }

  .shorts-card-title,
  body[data-page="shorts"] #shortsCatalogGrid .shorts-card-title,
  body[data-page="shorts"] #shortsCatalogGrid .shorts-card-body .title-assist-wrapper > .shorts-card-title {
    font-size: 14px !important;
    line-height: 1.35 !important;
  }

  body[data-page="shorts"] #shortsCatalogGrid .shorts-card-body .title-assist-wrapper,
  .shorts-card-body .title-assist-wrapper {
    margin-bottom: 5px !important;
  }

  body[data-page="shorts"] #shortsCatalogGrid .shorts-card-body .title-assist-wrapper > .shorts-card-title,
  .shorts-card-body .title-assist-wrapper > .shorts-card-title {
    min-width: 0 !important;
    flex: 0 1 auto !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  .shorts-card-body {
    padding: 10px 10px 12px !important;
  }

  .shorts-type-genre {
    font-size: 0.7rem !important;
    color: rgba(255, 255, 255, 0.42);
  }

  /* 모바일 카탈로그 — 평점·조회수 (신작·연재 모바일 12.5px 수준) */
  body[data-page="shorts"] #shortsCatalogGrid .shorts-rating-views {
    font-size: 12.5px !important;
  }

  body[data-page="shorts"] #shortsCatalogGrid .shorts-rating-views .rating-container,
  body[data-page="shorts"] #shortsCatalogGrid .shorts-rating-views .rating-value {
    font-size: 12.5px !important;
  }

  body[data-page="shorts"] #shortsCatalogGrid .shorts-rating-views .rating-star {
    font-size: 13px !important;
  }

  body[data-page="shorts"] .shorts-views-text,
  body[data-page="shorts"] #shortsCatalogGrid .shorts-views-text {
    font-size: 12px !important;
    color: rgba(255, 255, 255, 0.48);
  }

  /*
   * 모바일 — 3행(평점·조회수)과 푸터 구분선 사이 여백 50% 축소
   */
  body[data-page="shorts"] #shortsCatalogGrid .shorts-rating-views,
  body[data-page="shorts"] .shorts-catalog-card .shorts-rating-views {
    margin-bottom: 5px !important;
  }

  /*
   * 모바일 푸터 구분선 — 기기·DPR별 border-top 서브픽셀 번짐 방지
   * · common.css .series-card-footer(0.04) 와의 충돌 제거 후 ::before 1px 고정선 사용
   * · 카탈로그·슬림 3D·추천 행 푸터 공통 적용
   */
  body[data-page="shorts"] #shortsCatalogGrid .series-card .series-card-footer,
  body[data-page="shorts"] #shortsCatalogGrid .shorts-card-footer,
  body[data-page="shorts"] .shorts-catalog-card .shorts-card-footer,
  body[data-page="shorts"] .shorts-slim-3d-card .series-card-footer,
  #shortsTodaySection .shorts-scroll-footer,
  #shortsUnder10Section .shorts-scroll-footer,
  #shortsMusicExpSection .shorts-scroll-footer {
    position: relative;
    border-top: none !important;
    isolation: isolate;
  }

  body[data-page="shorts"] #shortsCatalogGrid .series-card .series-card-footer::before,
  body[data-page="shorts"] #shortsCatalogGrid .shorts-card-footer::before,
  body[data-page="shorts"] .shorts-catalog-card .shorts-card-footer::before,
  body[data-page="shorts"] .shorts-slim-3d-card .series-card-footer::before,
  #shortsTodaySection .shorts-scroll-footer::before,
  #shortsUnder10Section .shorts-scroll-footer::before,
  #shortsMusicExpSection .shorts-scroll-footer::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    height: 1px;
    background-color: rgba(255, 255, 255, 0.1);
    pointer-events: none;
    transform: translateZ(0);
  }

  body[data-page="shorts"] #shortsCatalogGrid .series-card .series-card-footer,
  body[data-page="shorts"] #shortsCatalogGrid .shorts-card-footer,
  body[data-page="shorts"] .shorts-catalog-card .shorts-card-footer {
    font-size: 12px !important;
  }

  /* 모바일 카탈로그 — 연재·신작과 동일 (크리에이터·출처 12px) */
  body[data-page="shorts"] #shortsCatalogGrid .series-card .series-card-footer .creator-name-update,
  body[data-page="shorts"] .shorts-catalog-card .shorts-card-footer .creator-name-update {
    font-size: 12px !important;
  }

  body[data-page="shorts"] #shortsCatalogGrid .series-card .series-card-footer .shorts-source-tag,
  body[data-page="shorts"] .shorts-catalog-card .shorts-card-footer .shorts-source-tag {
    font-size: 12px !important;
  }

  /* 모바일 배지 축약 라벨 — common.css .badge * { display:inline-block !important } 보다 우선 */
  body[data-page="shorts"] #shortsCatalogGrid .shorts-catalog-card .badge-label-long,
  body[data-page="shorts"] .shorts-catalog-card .badge-label-long {
    display: none !important;
  }

  body[data-page="shorts"] #shortsCatalogGrid .shorts-catalog-card .badge-label-short,
  body[data-page="shorts"] .shorts-catalog-card .badge-label-short {
    display: inline !important;
  }

  .shorts-catalog-card .shorts-type-badge .badge {
    max-width: 64px;
    padding: 2px 6px;
    font-size: 0.58rem;
  }

  /* 추천 행 — 모바일 가로 스크롤, 좌우 여백 확보 */
  #shortsTodaySection .shorts-scroll-wrap,
  #shortsUnder10Section .shorts-scroll-wrap,
  #shortsMusicExpSection .shorts-scroll-wrap,
  #shortsPickSection .shorts-pick-carousel-wrap {
    margin: 0 -4px;
    padding: 0 4px;
  }

  #shortsTodaySection .shorts-scroll-wrap::after,
  #shortsUnder10Section .shorts-scroll-wrap::after,
  #shortsMusicExpSection .shorts-scroll-wrap::after {
    display: block;
  }

  #shortsTodaySection .shorts-scroll-row,
  #shortsUnder10Section .shorts-scroll-row,
  #shortsMusicExpSection .shorts-scroll-row {
    padding-left: 4px;
    padding-right: 28px;
    gap: 10px;
  }

  #shortsTodaySection .shorts-scroll-card,
  #shortsUnder10Section .shorts-scroll-card,
  #shortsMusicExpSection .shorts-scroll-card {
    flex: 0 0 160px;
    width: 160px;
  }

  #shortsTodaySection .shorts-scroll-type-badge .badge-label-long,
  #shortsUnder10Section .shorts-scroll-type-badge .badge-label-long,
  #shortsMusicExpSection .shorts-scroll-type-badge .badge-label-long {
    display: none !important;
  }

  #shortsTodaySection .shorts-scroll-type-badge .badge-label-short,
  #shortsUnder10Section .shorts-scroll-type-badge .badge-label-short,
  #shortsMusicExpSection .shorts-scroll-type-badge .badge-label-short {
    display: inline !important;
  }

  /* 추천 행 카드 — 모바일 본문 텍스트 한 단계 확대 (카탈로그와 동일 톤) */
  #shortsTodaySection .shorts-scroll-title,
  #shortsUnder10Section .shorts-scroll-title,
  #shortsMusicExpSection .shorts-scroll-title {
    font-size: 0.85rem !important;
  }

  #shortsTodaySection .shorts-scroll-type-genre,
  #shortsUnder10Section .shorts-scroll-type-genre,
  #shortsMusicExpSection .shorts-scroll-type-genre {
    font-size: 0.7rem !important;
  }

  #shortsTodaySection .shorts-scroll-stats,
  #shortsUnder10Section .shorts-scroll-stats,
  #shortsMusicExpSection .shorts-scroll-stats {
    font-size: 0.75rem !important;
    margin-bottom: 4px !important;
  }

  /* 추천 행 카드 — 모바일 푸터도 카탈로그와 동일 12px */
  #shortsTodaySection .shorts-scroll-footer,
  #shortsUnder10Section .shorts-scroll-footer,
  #shortsMusicExpSection .shorts-scroll-footer {
    font-size: 12px;
    margin-top: 1px !important;
  }
}

@media (max-width: 480px) {
  .shorts-hero-title {
    font-size: 1.75rem;
  }

  .shorts-hero-desc {
    font-size: 0.86rem;
  }

  .shorts-chips-scroll .chip-filter {
    font-size: 0.76rem;
    padding: 7px 12px;
    min-height: 32px;
  }
}

/* PC — 추천 행 6열 그리드: 컨테이너 안에서 잘리지 않게 정렬 */
@media (min-width: 1025px) {
  #shortsTodaySection .shorts-scroll-wrap::after,
  #shortsUnder10Section .shorts-scroll-wrap::after,
  #shortsMusicExpSection .shorts-scroll-wrap::after {
    display: none !important;
  }

  #shortsTodaySection .shorts-scroll-row,
  #shortsUnder10Section .shorts-scroll-row,
  #shortsMusicExpSection .shorts-scroll-row {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 12px;
    overflow: visible;
    padding-right: 0;
    padding-left: 0;
  }

  #shortsTodaySection .shorts-scroll-card,
  #shortsUnder10Section .shorts-scroll-card,
  #shortsMusicExpSection .shorts-scroll-card {
    flex: none;
    width: 100%;
    max-width: 100%;
  }

  #shortsTodaySection .shorts-scroll-type-badge .badge-label-long,
  #shortsUnder10Section .shorts-scroll-type-badge .badge-label-long,
  #shortsMusicExpSection .shorts-scroll-type-badge .badge-label-long {
    display: inline !important;
  }

  #shortsTodaySection .shorts-scroll-type-badge .badge-label-short,
  #shortsUnder10Section .shorts-scroll-type-badge .badge-label-short,
  #shortsMusicExpSection .shorts-scroll-type-badge .badge-label-short {
    display: none !important;
  }
}

/* 태블릿 — 가로 스크롤 유지, 마지막 카드까지 여백 확보 */
@media (min-width: 769px) and (max-width: 1024px) {
  body[data-page="shorts"] #shortsCatalogGrid {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 14px !important;
    width: 100% !important;
    justify-content: flex-start !important;
  }

  body[data-page="shorts"] #shortsCatalogGrid .shorts-catalog-card {
    width: calc((100% - 28px) / 3) !important;
    min-width: 0 !important;
    max-width: calc((100% - 28px) / 3) !important;
  }

  #shortsTodaySection .shorts-scroll-wrap,
  #shortsUnder10Section .shorts-scroll-wrap,
  #shortsMusicExpSection .shorts-scroll-wrap,
  #shortsPickSection .shorts-pick-carousel-wrap {
    margin: 0;
    padding: 0;
  }

  #shortsTodaySection .shorts-scroll-wrap::after,
  #shortsUnder10Section .shorts-scroll-wrap::after,
  #shortsMusicExpSection .shorts-scroll-wrap::after {
    display: block;
  }

  #shortsTodaySection .shorts-scroll-row,
  #shortsUnder10Section .shorts-scroll-row,
  #shortsMusicExpSection .shorts-scroll-row {
    display: flex;
    padding-right: 32px;
    gap: 12px;
  }

  #shortsTodaySection .shorts-scroll-card,
  #shortsUnder10Section .shorts-scroll-card,
  #shortsMusicExpSection .shorts-scroll-card {
    flex: 0 0 180px;
    width: 180px;
  }
}

/* PC — 배지 전체 라벨 표시 */
@media (min-width: 769px) {
  body[data-page="shorts"] #shortsCatalogGrid .shorts-catalog-card .badge-label-long,
  body[data-page="shorts"] .shorts-catalog-card .badge-label-long {
    display: inline !important;
  }

  body[data-page="shorts"] #shortsCatalogGrid .shorts-catalog-card .badge-label-short,
  body[data-page="shorts"] .shorts-catalog-card .badge-label-short {
    display: none !important;
  }
}

/*
 * 쇼츠 페이지 전체 목록만 9:16.
 * 영화·영상(data-catalog=films)의 카드 크기·열 배치는 그대로 둔다.
 */
body[data-catalog="shortform"] #shortsCatalogGrid .shorts-catalog-card .poster-wrap {
  aspect-ratio: 9 / 16;
}

@media (max-width: 768px) {
  body[data-catalog="shortform"] #shortsCatalogGrid .shorts-card-body,
  body[data-catalog="shortform"] #shortsCatalogGrid .shorts-card-footer,
  body[data-catalog="shortform"] #shortsCatalogGrid .shorts-card-meta,
  body[data-catalog="shortform"] #shortsCatalogGrid .shorts-rating-views {
    min-width: 0;
    max-width: 100%;
  }

  body[data-catalog="shortform"] #shortsCatalogGrid .shorts-card-title,
  body[data-catalog="shortform"] #shortsCatalogGrid .shorts-type-genre,
  body[data-catalog="shortform"] #shortsCatalogGrid .creator-name-update,
  body[data-catalog="shortform"] #shortsCatalogGrid .shorts-source-tag {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
  }
}
