/*
  Home page (Ver.0034)
  - Standard landing layout: Hero (value prop + primary CTA) -> Quick actions -> Content feed -> About
  - Container width is controlled by --container (1300px) in static/css/style.css
*/

.home {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* HERO */
.home-hero {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 16px;
  box-shadow: var(--shadow-xs);
  overflow: hidden;
}

.home-hero__inner {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  gap: 14px;
  padding: 18px;
}

.home-hero__eyebrow {
  font-size: 13px;
  color: var(--muted);
  letter-spacing: 0.02em;
  margin-bottom: 8px;
}

.home-hero__title {
  margin: 0;
  font-size: 28px;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.home-hero__desc {
  margin: 10px 0 0;
  color: color-mix(in oklab, var(--text) 75%, var(--muted));
  line-height: 1.55;
}

.home-hero__cta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.home-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
  font-weight: 800;
  box-shadow: var(--shadow-xs);
}

.home-btn:hover {
  filter: brightness(1.05);
}

.home-btn--primary {
  background: color-mix(in oklab, var(--accent) 85%, black);
  border-color: color-mix(in oklab, var(--accent) 70%, var(--line));
  color: white;
}

.home-btn--ghost {
  background: transparent;
}

/* --- Home main visuals (works / actors) --- */
.home-works-cols{
  display: grid;
  /* auto-fit + minmax: VR/JAV 2블록을 화면 폭에 따라 2열/1열로 자동 전환 */
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 14px;
}

.home-works-col__label{
  font-size: 12px;
  font-weight: 1000;
  color: var(--muted);
  margin: 2px 0 8px;
}

.home-actorstrip{
  display: grid;
  /* clamp 기반 트랙 최소폭을 고정하여 썸네일 카드 크기 들쭉날쭉 방지 */
  grid-template-columns: repeat(auto-fit, minmax(clamp(110px, 12vw, 150px), 1fr));
  gap: 10px;
}

.home-actorthumb{
  display: block;
  text-decoration: none;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  background: color-mix(in oklab, var(--surface) 95%, black);
  box-shadow: var(--shadow-xs);
}

.home-actorthumb:hover{
  filter: brightness(1.04);
}

.home-actorthumb__img{
  width: 100%;
  aspect-ratio: 3 / 4;
  background: #000;
  overflow: hidden;
}

.home-actorthumb__img img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.home-actorthumb__cap{
  padding: 8px 10px;
  font-weight: 900;
  font-size: 13px;
  line-height: 1.25;
  /* 배우명 길이로 카드 높이 흔들림 방지: 2줄 고정 클램프 */
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
  /* 2줄 높이 확보(여백 포함) */
  min-height: calc(1.25em * 2);
}

.home-thumb__ph{
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: rgba(255,255,255,0.7);
  background: #222;
}

.home-hero__panel {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: color-mix(in oklab, var(--surface) 94%, black);
  padding: 12px;
}

.home-hero__panel-title {
  font-size: 14px;
  font-weight: 900;
  margin-bottom: 10px;
  color: var(--muted);
}

/* Quick actions */
.home-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.home-action {
  display: block;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 12px;
  padding: 10px 12px;
  text-decoration: none;
  color: var(--text);
  box-shadow: var(--shadow-xs);
}

.home-action:hover {
  filter: brightness(1.04);
}

.home-action__t {
  font-weight: 900;
}

.home-action__d {
  margin-top: 4px;
  font-size: 12px;
  color: var(--muted);
}

/* FEED GRID */
.home-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

/* Main cards placement */
.home-card--works{ min-width: 0; }
.home-card--actors{ min-width: 0; }

.home-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--shadow-xs);
  padding: 14px;
  min-width: 0;
}

.home-card__head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.home-card__actions{
  margin-left: auto;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.home-card__title {
  margin: 0;
  font-size: 16px;
  font-weight: 1000;
  letter-spacing: -0.01em;
}

.home-card__more {
  font-size: 12px;
  color: var(--muted);
  text-decoration: none;
}

.home-card__more:hover {
  text-decoration: underline;
}

.home-card__hint {
  font-size: 12px;
  color: var(--muted);
  margin-left: auto;
}

.home-empty {
  padding: 12px 2px;
  color: var(--muted);
  font-size: 13px;
}

/* Works */
.home-worklist {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.home-work {
  display: flex;
  gap: 10px;
  align-items: center;
  text-decoration: none;
  color: var(--text);
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: color-mix(in oklab, var(--surface) 95%, black);
}

.home-work:hover {
  filter: brightness(1.04);
}

.home-work__thumb {
  /* 썸네일 비율 고정(작품 썸네일은 세로형 비율이 대부분이므로 7:10 기준)
     - width만 반응형으로 바꾸고 aspect-ratio로 높이를 산출
     - 고정 height를 강제하지 않아서 폰트/라인높이 변화에도 레이아웃이 덜 깨짐 */
  width: clamp(52px, 6vw, 64px);
  aspect-ratio: 7 / 10;
  border-radius: 10px;
  overflow: hidden;
  background: #000;
  flex: 0 0 auto;
}

.home-work__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.home-work__thumb-empty {
  width: 100%;
  height: 100%;
  background: #222;
}

.home-work__meta {
  min-width: 0;
  flex: 1 1 auto;
}

.home-work__code {
  font-size: 12px;
  font-weight: 900;
  color: color-mix(in oklab, var(--accent) 80%, white);
  /* 코드가 길어도 줄바꿈으로 높이가 튀지 않도록 1줄 ellipsis */
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.home-work__title {
  margin-top: 2px;
  font-size: 14px;
  font-weight: 900;
  /* 제목은 2줄까지만 보여주고 넘치면 잘라 카드 높이/정렬을 안정화 */
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  line-height: 1.25;
  max-height: calc(1.25em * 2);
}

.home-work__sub {
  margin-top: 4px;
  font-size: 12px;
  color: var(--muted);
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.home-work__rating {
  color: color-mix(in oklab, gold 80%, white);
}

/* Boards */
.home-boardlist {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.home-board {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px;
  background: color-mix(in oklab, var(--surface) 95%, black);
  text-decoration: none;
  color: var(--text);
  display: block;
}

.home-board:hover {
  filter: brightness(1.04);
}

.home-board__t {
  font-weight: 900;
  font-size: 13px;
  display: flex;
  gap: 8px;
  align-items: center;
}

.home-board__badge {
  font-size: 11px;
  font-weight: 900;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: color-mix(in oklab, var(--surface) 88%, black);
  color: color-mix(in oklab, var(--text) 80%, white);
  flex: 0 0 auto;
}

.home-board__title {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.home-board__d {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  max-height: 36px;
  overflow: hidden;
}

.home-board__meta {
  margin-top: 6px;
  font-size: 11px;
  color: color-mix(in oklab, var(--muted) 85%, white);
}

/* Actors */
.home-actorlist {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.home-actor {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 8px 10px;
  background: color-mix(in oklab, var(--surface) 95%, black);
  text-decoration: none;
  color: var(--text);
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.home-actor:hover {
  filter: brightness(1.04);
}

.home-actor__name {
  font-weight: 900;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.home-actor__count {
  color: var(--muted);
  font-size: 12px;
}

/* Stats */
.home-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 10px;
}

.home-stat {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px;
  background: color-mix(in oklab, var(--surface) 95%, black);
}

.home-stat__k {
  font-size: 12px;
  color: var(--muted);
  font-weight: 900;
}

.home-stat__v {
  font-size: 22px;
  font-weight: 1100;
  margin-top: 4px;
}

.home-pillbox {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.home-pill {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  background: var(--surface);
}

/* ABOUT */
.home-about {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 16px;
  box-shadow: var(--shadow-xs);
}

.home-about__inner {
  padding: 16px;
}

.home-about__title {
  margin: 0 0 8px 0;
  font-size: 16px;
  font-weight: 1000;
}

.home-about__desc {
  color: color-mix(in oklab, var(--text) 80%, var(--muted));
  line-height: 1.6;
  font-size: 13px;
}

.home-about__desc ul {
  margin: 10px 0 0;
  padding-left: 18px;
}

.home-about__desc li {
  margin: 6px 0;
}

.home-about__cta {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* --- Latest blocks (boards / subtitle requests) --- */
.home-latest{ }

.home-section-head{
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 4px 0 10px;
}

.home-section-actions{
  margin-left: auto;
  display: flex;
  gap: 10px;
}

.home-section-title{
  margin: 0;
  font-size: 16px;
  font-weight: 1000;
}

.home-link{
  font-size: 12px;
  color: var(--muted);
  text-decoration: none;
}

.home-link:hover{
  text-decoration: underline;
}

.home-latest-grid{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
}

.home-latest-card{
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--shadow-xs);
  padding: 14px;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.home-latest-card__head{
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 10px;
}

.home-latest-card__title{
  margin: 0;
  font-size: 14px;
  font-weight: 1000;
}

.home-mini{
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1 1 auto;
}

.home-mini__a{
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
}

.home-mini__a:hover{ text-decoration: underline; }

.home-mini__t{
  flex: 1 1 auto;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.home-mini__m{
  flex: 0 0 auto;
  font-size: 11px;
  color: var(--muted);
}

.home-mini__empty{
  font-size: 12px;
  color: var(--muted);
}

/* RESPONSIVE */
@media (max-width: 980px) {
  .home-hero__inner { grid-template-columns: 1fr; }
  .home-actions { grid-template-columns: 1fr 1fr; }
  .home-grid { grid-template-columns: 1fr; }
  .home-actorlist { grid-template-columns: 1fr; }
  .home-works-cols { grid-template-columns: 1fr; }
  /* 좁은 폭에서는 트랙 최소폭을 조금 낮춰 카드가 과도하게 커지지 않게 */
  .home-actorstrip { grid-template-columns: repeat(auto-fit, minmax(clamp(104px, 18vw, 140px), 1fr)); }
  .home-latest-grid { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
}

@media (max-width: 520px) {
  .home-actions { grid-template-columns: 1fr; }
  .home-hero__title { font-size: 22px; }
  .home-actorstrip { grid-template-columns: repeat(auto-fit, minmax(clamp(96px, 30vw, 132px), 1fr)); }
  .home-latest-grid { grid-template-columns: 1fr; }
}
/* Tabs (JAV / VR) — uses global .boardbar */
.home-card__head--tabs{
  display:block;
}
.home-boardbar{
  margin-bottom: 10px;
}


.home-tabpanels {
  margin-top: 8px;
}

.home-tabpanel[hidden] {
  display: none !important;
}

/* Subtitle request card */
.home-subreq__filters {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.home-subreq__chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.home-chip {
  appearance: none;
  border: 1px solid var(--line);
  background: color-mix(in oklab, var(--surface) 92%, var(--bg));
  color: var(--text);
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

.home-chip.is-active {
  background: var(--bg);
  border-color: var(--line);
}

.home-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: color-mix(in oklab, var(--surface) 92%, var(--bg));
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
  user-select: none;
}

.home-toggle.is-on {
  background: var(--bg);
}

.home-toggle.is-disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.home-subreq__by {
  opacity: 0.95;
}

.home-subreq__summary {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.home-subreq__pill {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: color-mix(in oklab, var(--surface) 85%, var(--bg));
  font-size: 12px;
}

.home-subreq__pill .k {
  color: var(--muted);
  font-weight: 800;
}

.home-subreq__pill .v {
  font-weight: 1000;
}

.home-subreq__cta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.home-subreq__list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.home-subreq {
  display: block;
  padding: 10px 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: color-mix(in oklab, var(--surface) 92%, var(--bg));
  text-decoration: none;
  color: inherit;
}

.home-subreq:hover {
  background: color-mix(in oklab, var(--surface) 80%, var(--bg));
}

.home-subreq__row {
  display: flex;
  gap: 10px;
  align-items: baseline;
}

.home-subreq__code {
  font-weight: 1000;
  letter-spacing: -0.01em;
}

.home-subreq__status {
  margin-left: auto;
  font-size: 12px;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--muted);
}

.home-subreq__meta {
  margin-top: 4px;
  font-size: 12px;
  color: var(--muted);
}


