/* ==========================================================================
   page: actor (model profile)
   ========================================================================== */

.actor-page {
  min-height: 100vh;
  background: #fff;
}

.actor-page-header {
  height: 76px;
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 40px;
  position: sticky;
  top: 0;
  background: rgba(255, 255, 255, .96);
  z-index: 4;
}

.back-btn {
  font-size: 12px;
  color: #777;
  justify-self: start;
}

.back-btn:hover {
  color: var(--accent);
}

.actor-page-main {
  width: 100%;
  margin: 0;
  padding: 40px 40px 90px;
  box-sizing: border-box;
}

@media (min-width: 2560px) {
  .actor-page-main {
    max-width: 2560px;
    margin: auto;
  }
}

/* two-column split: left = profile+photos, right = works (wide screens only) */
.actor-split {
  display: grid;
  grid-template-columns: 1fr;
  gap: 44px;
  align-items: start;
}

@media (min-width: 1100px) {
  .actor-split {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
    gap: 64px;
  }
}

.actor-col {
  min-width: 0;
}

@media (min-width: 1100px) {
  .actor-col-right {
    position: sticky;
    top: calc(var(--topbar-h) + 24px);
    align-self: start;
  }
}

.actor-page-hero {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 40px;
  align-items: center;
  padding-bottom: 55px;
  border-bottom: 1px solid var(--line);
}

.actor-main-photo {
  width: 280px;
  aspect-ratio: 1;
  overflow: hidden;
  background: var(--cream);
}

.actor-main-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-empty {
  height: 100%;
  display: grid;
  place-items: center;
  color: #aaa;
  font-size: 12px;
}

.actor-info h1 {
  font-size: 48px;
  letter-spacing: -.06em;
  margin: 0 0 5px;
}

.actor-original {
  color: #999;
  margin: 0 0 22px;
  font-size: 14px;
}

.actor-intro {
  color: #777;
  font-size: 13px;
  line-height: 1.75;
  max-width: 560px;
}

.actor-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  border-top: 1px solid var(--line);
  padding-top: 22px;
  margin-top: 28px;
}

.actor-stats span {
  display: block;
  color: #aaa;
  font-size: 9px;
  letter-spacing: .12em;
  margin-bottom: 6px;
}

.actor-stats b {
  font-size: 12px;
}

.actor-section {
  padding-top: 48px;
}

.section-title h1 {
  font-size: 46px;
  letter-spacing: -.06em;
  margin: 0;
}

.section-title h2 {
  font-size: 28px;
  letter-spacing: -.05em;
  margin: 0;
}

.actor-photo-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-top: 22px;
}

.actor-photo-grid img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  background: var(--cream);
}

/* works column: keep the default 2-column grid, just drop the full-width top divider */
.actor-col-right .works-section {
  border-top: 0;
  margin-top: 0;
  padding-top: 0;
  padding-right: 40px;
}

/* 작품정보: 항상 3열 (사용자 요청) */
.actor-col-right .works-list {
  grid-template-columns: repeat(3, 1fr);
}

@media (max-width: 1300px) {
  .actor-col-right .works-list {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* AI 정리 프로필 카드 */
.ai-summary {
  margin-top: 22px;
  border: 1px solid var(--line);
  background: var(--cream);
  border-radius: 12px;
  padding: 22px 24px;
}

.ai-summary-loading,
.ai-summary-empty {
  color: #999;
  font-size: 13px;
}

.ai-summary-loading .spin {
  margin-right: 6px;
  vertical-align: -1px;
}

.ai-summary-text {
  font-size: 14px;
  line-height: 1.7;
  color: var(--ink);
  margin: 0;
}

.ai-facts {
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}

.ai-facts li {
  font-size: 12px;
  color: #666;
  line-height: 1.5;
  padding-left: 14px;
  position: relative;
}

.ai-facts li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
}

.ai-tags {
  margin-top: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.ai-tag {
  font-size: 11px;
  color: var(--accent);
  background: #fff;
  border: 1px solid #f0d6d6;
  border-radius: 14px;
  padding: 4px 11px;
}

/* 작품 상세: 스펙 블록 (styles.css 미로드로 인해 여기 정의) */
.detail-block {
  min-width: 70px;
}

.detail-block span {
  display: block;
  color: #aaa;
  font-size: 9px;
  letter-spacing: .12em;
  margin-bottom: 6px;
}

.detail-block b {
  font-size: 13px;
  font-weight: 600;
}

/* 작품 상세: 출연 배우 */
.movie-cast {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(84px, 1fr));
  gap: 18px 14px;
  margin-top: 22px;
}

.movie-cast-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 9px;
  text-align: center;
  color: var(--ink);
}

.movie-cast-item:hover { color: var(--accent); }

.cast-thumb {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--cream);
  border: 1px solid var(--line);
}

.cast-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.movie-cast-item span {
  font-size: 12px;
  line-height: 1.3;
}

/* 모바일 상세페이지: 우측 하단 '상단으로' 플로팅 버튼 */
.to-top-btn {
  display: none;
}

/* 상세페이지 좌측 상단 고정 'G' 홈 버튼 (모바일만) */
.detail-home-btn {
  display: none;
}

@media (max-width: 700px) {
  .to-top-btn {
    display: grid;
    place-items: center;
    position: fixed;
    right: 16px;
    bottom: 16px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--accent);
    color: #fff;
    font-size: 16px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, .22);
    z-index: 20;
  }

  .detail-home-btn {
    display: grid;
    place-items: center;
    position: fixed;
    left: 12px;
    top: calc(var(--topbar-h) + 10px);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #fff;
    border: 1px solid var(--line);
    color: var(--accent);
    font-family: Georgia, serif;
    font-style: italic;
    font-size: 22px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .12);
    z-index: 20;
  }
}

/* 이미지 모달 */
.image-modal {
  position: relative;
  max-width: 92vw;
  max-height: 88vh;
}

.image-modal img {
  width: 100%;
  max-width: 92vw;
  max-height: 88vh;
  object-fit: contain;
  border-radius: 12px;
  background: var(--cream);
}

.image-modal .modal-close {
  position: absolute;
  top: -14px;
  right: -14px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid var(--line);
  color: #333;
  font-size: 16px;
  display: grid;
  place-items: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .2);
}
