/* ============================================================
   app.css — 실데이터 연동으로 생긴 보강분만 담는다.

   원칙: styles.css / layout.css / gnb.css 는 시안 원본이므로 수정하지 않는다.
         여기에만 덧붙인다.

   이 파일이 필요한 이유(실측 근거):
   · 썸네일 원본이 전부 세로 포스터(비율 0.67~0.75)라 16:9 타일을 쓸 수 없다
   · 시안에는 색면 플레이스홀더(.still)만 있었고 실제 <img> 규칙이 없다
   · 히어로 3형태(SPLIT / MOSAIC / CINEMATIC)와 GRID 레일은 시안에 없는 구성이다
   ============================================================ */

/* ---------------- 공통 셸 ---------------- */
.app-scroll { min-height: 100vh; display: flex; flex-direction: column; }
.app-scroll > main { flex: 1 0 auto; }
.hero-gap { height: clamp(8px, 2vw, 20px); }

/* ---------------- 타일: 실제 이미지 ---------------- */
.tile-img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover; object-position: center 18%;   /* 포스터 상단의 인물·타이틀을 살린다 */
  background: var(--bg-3);
}
.tile-noimg {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-family: var(--font-head); font-size: 40px; font-weight: 700;
  color: var(--line-2); background: var(--bg-3);
}
/* 배지가 카테고리명(한글 2~6자)이라 시안의 영문 기준보다 여유가 필요하다 */
.tile-badge { max-width: calc(100% - 16px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------------- GRID 레일 ---------------- */
.grid-wrap { max-width: var(--maxw); margin-inline: auto; padding: 6px clamp(16px, 4vw, 60px); }
.tile-grid {
  display: grid; gap: clamp(10px, 1vw, 18px);
  grid-template-columns: repeat(auto-fill, minmax(clamp(118px, 11vw, 184px), 1fr));
}

/* 격자 안의 타일은 칸을 채운다.
   ⚠ 시안의 body[data-density="comfy"] .tile { width: clamp(178px,18vw,300px) } 이
   .grid .tile 보다 명시도가 높아 그대로 두면 타일이 칸을 넘쳐 가로 스크롤이 생긴다.
   density 속성을 함께 걸어 명시도를 올린다. */
.tile-grid .tile,
.grid .tile,
body[data-density] .tile-grid .tile,
body[data-density] .grid .tile { width: 100%; }

/* ---------------- 히어로 공통 ---------------- */
.hero-split, .hero-mosaic { position: relative; background: var(--bg); }

/* ---------------- 히어로 SPLIT ---------------- */
.hs-inner {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: clamp(24px, 4vw, 72px); align-items: center;
  padding-block: clamp(28px, 5vw, 72px);
}
.hs-copy { position: relative; min-height: clamp(280px, 30vw, 380px); }
.hs-slide {
  position: absolute; inset: 0; opacity: 0; pointer-events: none;
  transform: translateY(10px);
  transition: opacity .55s var(--ease), transform .55s var(--ease);
  display: flex; flex-direction: column; justify-content: center;
}
.hs-slide.on { opacity: 1; pointer-events: auto; transform: none; }
.hs-eyebrow { color: var(--accent-hi); margin-bottom: 14px; }
.hs-title {
  font-family: var(--font-head); font-weight: 700;
  font-size: clamp(30px, 4.2vw, 60px); line-height: 1.06; max-width: 15ch;
  margin: 0 0 14px;
}
.hs-sub { color: var(--ink-soft); font-size: clamp(14px, 1.2vw, 17px); max-width: 40ch; }
.hs-meta { margin-top: 14px; font-size: 12px; color: var(--muted); letter-spacing: .06em; }
.hs-cta { margin-top: clamp(18px, 2.4vw, 28px); }

.hs-stack {
  position: relative; display: flex; justify-content: center; align-items: center;
  min-height: clamp(300px, 32vw, 440px);
}
.hs-card {
  position: absolute; width: clamp(160px, 17vw, 260px); aspect-ratio: 2/3;
  border-radius: var(--r-md); overflow: hidden;
  border: 1px solid var(--line); background: var(--bg-3);
  box-shadow: 0 28px 60px -34px rgba(0, 0, 0, .95);
  opacity: 0; transform: translateX(0) scale(.86);
  transition: opacity .5s var(--ease), transform .5s var(--spring), border-color .3s var(--ease);
  pointer-events: none;
}
.hs-card img { width: 100%; height: 100%; object-fit: cover; object-position: center 15%; }
/* 활성 카드 + 좌우 1장씩만 노출. 나머지는 뒤에 숨긴다. */
.hs-card.on          { opacity: 1; transform: translateX(0) scale(1); z-index: 3; pointer-events: auto; border-color: var(--line-2); }
.hs-card.prev,
.hs-card.next        { opacity: .38; z-index: 2; }
.hs-card.prev        { transform: translateX(calc(-1 * clamp(96px, 10vw, 168px))) scale(.86); }
.hs-card.next        { transform: translateX(clamp(96px, 10vw, 168px)) scale(.86); }
.hs-card.on:hover    { transform: translateY(-5px) scale(1.02); }

.hs-ticks {
  display: flex; gap: 7px; justify-content: center;
  padding: 0 0 clamp(18px, 3vw, 30px);
}
.hs-tick {
  width: 30px; height: 3px; border: 0; padding: 0; border-radius: 99px;
  background: color-mix(in oklab, var(--ink) 26%, transparent); cursor: pointer;
  transition: background .25s var(--ease), width .25s var(--spring);
}
.hs-tick.on { background: var(--accent); width: 44px; }

@media (max-width: 900px) {
  .hs-inner { grid-template-columns: 1fr; gap: clamp(20px, 5vw, 32px); }
  .hs-copy { min-height: 0; position: static; }
  .hs-slide { position: absolute; }
  .hs-copy { position: relative; min-height: 240px; }
  .hs-stack { min-height: clamp(280px, 62vw, 380px); order: -1; }
  .hs-title { max-width: none; }
}

/* ---------------- 히어로 MOSAIC ---------------- */
/* 무대 높이를 컨테이너가 확정한다. 좌우 어느 쪽도 이미지 원본 높이로 늘어나지 않게 해야
   "리드는 짧은데 우측 격자만 길어지는" 어긋남이 생기지 않는다. */
.hm-inner {
  display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: clamp(12px, 1.4vw, 20px);
  padding-block: clamp(20px, 3vw, 40px);
  align-items: stretch;
  height: clamp(360px, 44vw, 620px);
}
.hm-lead {
  position: relative; display: block; border-radius: var(--r-md); overflow: hidden;
  border: 1px solid var(--line); background: var(--bg-3);
  height: 100%; min-height: 0;
  transition: border-color .3s var(--ease);
}
.hm-lead:hover { border-color: var(--line-2); }
/* 세로 포스터를 가로 무대에 올리기 위한 2겹 구성 */
.hm-lead-blur {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; filter: blur(34px) saturate(1.1) brightness(.5); transform: scale(1.14);
}
.hm-lead-fg {
  position: absolute; top: 50%; right: clamp(16px, 4vw, 56px); transform: translateY(-50%);
  height: 84%; width: auto; max-width: 46%; object-fit: contain;
  border-radius: var(--r-sm); box-shadow: 0 26px 60px -34px rgba(0, 0, 0, .95);
}
.hm-scrim {
  position: absolute; inset: 0;
  background: linear-gradient(90deg, var(--bg) 2%, color-mix(in oklab, var(--bg) 45%, transparent) 46%, transparent 76%),
              linear-gradient(0deg, var(--bg) 3%, transparent 46%);
}
.hm-cap {
  position: absolute; left: 0; bottom: 0; max-width: 60%;
  display: flex; flex-direction: column; align-items: flex-start; gap: 10px;
  padding: clamp(18px, 3vw, 34px);
}
.hm-cap .eyebrow { color: var(--accent-hi); }
.hm-title { font-family: var(--font-head); font-size: clamp(22px, 2.6vw, 40px); line-height: 1.1; }
.hm-sub { color: var(--ink-soft); font-size: clamp(13px, 1.1vw, 15px); max-width: 34ch; }
.hm-btn { margin-top: 6px; }

.hm-grid {
  display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr;
  gap: clamp(12px, 1.4vw, 20px);
  height: 100%; min-height: 0;
}
.hm-cell {
  position: relative; display: block; border-radius: var(--r-md); overflow: hidden;
  border: 1px solid var(--line); background: var(--bg-3);
  height: 100%; min-height: 0;   /* 격자 행 높이를 무대 높이에 맞춘다 */
  transition: transform .3s var(--spring), border-color .3s var(--ease);
}
.hm-cell:hover { transform: translateY(-3px); border-color: var(--line-2); }
.hm-cell img { width: 100%; height: 100%; object-fit: cover; object-position: center 12%; }
/* 셀 캡션은 아래에서 위로 어두워지는 스크림 위에 올린다(리드의 좌→우 스크림과 다르다) */
.hm-cell .hm-scrim {
  background: linear-gradient(0deg, var(--bg) 2%, color-mix(in oklab, var(--bg) 55%, transparent) 26%, transparent 58%);
}
.hm-cell-cap {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 12px 14px;
  font-size: 13px; font-weight: 600; color: var(--ink);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

@media (max-width: 900px) {
  .hm-inner { grid-template-columns: 1fr; height: auto; }
  .hm-lead { height: auto; aspect-ratio: 4 / 3; }
  .hm-cap { max-width: 100%; }
  .hm-grid { height: auto; grid-template-rows: auto auto; }
  .hm-cell { height: auto; aspect-ratio: 3 / 4; }
}

/* 이미지 위 텍스트 가독성 보강 — 밝은 포스터 위에서도 읽히게 */
.hm-cap .eyebrow, .hm-title, .hm-sub, .hm-cell-cap {
  text-shadow: 0 1px 2px rgba(0, 0, 0, .85), 0 0 14px rgba(0, 0, 0, .55);
}

/* ---------------- 히어로 CINEMATIC ---------------- */
/* 세로 포스터를 넓은 무대에 올리기 위해 같은 이미지를 흐린 배경으로 깐다 */
.hc-blur {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; filter: blur(38px) saturate(1.15) brightness(.55); transform: scale(1.12);
}
.hc-fg {
  position: absolute; left: auto; right: clamp(24px, 8vw, 140px); top: 50%;
  transform: translateY(-50%);
  height: 78%; width: auto; max-width: 42vw;
  object-fit: contain; border-radius: var(--r-md);
  box-shadow: 0 34px 80px -40px rgba(0, 0, 0, .95);
}
/* 두 번째 슬라이드부터는 h2 를 쓰므로 시안의 .hero h1 규칙을 그대로 이어 준다 */
.hero h2 {
  font-size: clamp(34px, 6vw, 76px); line-height: 1.04; max-width: 16ch; margin-bottom: 14px;
}
@media (max-width: 720px) {
  .hc-fg { display: none; }
  .hc-blur { filter: blur(22px) brightness(.5); }
}

/* ---------------- 푸터 보강 ---------------- */
.footer-company { max-width: 340px; }
.fc-line { display: flex; gap: 10px; font-size: 13px; color: var(--ink-soft); padding: 4px 0; }
.fc-k { color: var(--faint); flex: 0 0 62px; }
.fc-v { min-width: 0; }
.fl-biz { color: var(--faint); }
.fl-biz b { color: var(--ink-soft); font-weight: 600; }
.fl-copy { margin-left: auto; }
@media (max-width: 760px) { .fl-copy { margin-left: 0; } }

/* ---------------- 빈 상태 ---------------- */
.empty-note { padding: clamp(40px, 8vw, 90px) 0; text-align: center; color: var(--muted); }
.empty-hint { font-size: 13px; color: var(--faint); margin-top: 8px; }

/* ================================================================
   목록 화면 (/Vod/List)
   ================================================================ */

/* 분류 필터 칩 */
.catbar {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin-top: clamp(18px, 2.6vw, 28px);
}
.catchip {
  display: inline-flex; align-items: center; gap: 7px;
  height: 34px; padding: 0 14px;
  border: 1px solid var(--line); border-radius: 99px;
  background: var(--bg-2); color: var(--ink-soft);
  font-size: 13px; white-space: nowrap;
  transition: border-color .2s var(--ease), color .2s var(--ease), background .2s var(--ease);
}
.catchip:hover { color: var(--ink); border-color: var(--line-2); }
.catchip.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.catchip .cnt { font-family: var(--font-mono); font-size: 10.5px; color: var(--muted); }
.catchip.on .cnt { color: color-mix(in oklab, var(--accent-ink) 78%, transparent); }

/* 정렬 세그먼트는 시안이 button 기준이라 링크에도 같은 규칙을 적용한다 */
.sort-seg a {
  border: 0; background: transparent; color: var(--ink-soft);
  font-size: 13px; padding: 7px 15px; border-radius: var(--r-xs);
  transition: background .2s var(--ease), color .2s var(--ease);
}
.sort-seg a.on { background: var(--accent); color: var(--accent-ink); }
.sort-seg a:not(.on):hover { color: var(--ink); }
.clear-search { margin-left: auto; height: 34px; padding: 0 12px; font-size: 12.5px; }

/* 스포트라이트 — 세로 포스터를 와이드 무대에 올리기 위한 2겹 구성 */
.spot-blur {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; filter: blur(36px) saturate(1.1) brightness(.5); transform: scale(1.14);
}
.spot-fg {
  position: absolute; top: 50%; right: clamp(20px, 6vw, 90px); transform: translateY(-50%);
  height: 82%; width: auto; max-width: 40%; object-fit: contain;
  border-radius: var(--r-sm); box-shadow: 0 26px 60px -34px rgba(0, 0, 0, .95);
}
.spot-meta { color: var(--muted); font-size: 12px; margin-bottom: 18px; }
/* 시안의 21:9 무대는 넓은 화면에서 지나치게 커진다. 상한을 둔다. */
.cat-spot-stage { max-height: min(52vh, 460px); }
@media (max-width: 720px) {
  .spot-fg { display: none; }
  .cat-spot-stage { max-height: none; }
}

/* 페이지 이동 */
.pager { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: center; margin-top: 6px; }
.pg {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 38px; height: 38px; padding: 0 12px;
  border: 1px solid var(--line); border-radius: var(--r-sm);
  background: var(--bg-2); color: var(--ink-soft); font-size: 13.5px;
  transition: border-color .2s var(--ease), color .2s var(--ease), background .2s var(--ease);
}
.pg:hover { color: var(--ink); border-color: var(--line-2); }
.pg.num { font-family: var(--font-mono); }
.pg.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }

/* ================================================================
   상세 화면 (/Vod/Detail/{id})
   ================================================================ */
.dt-hero { position: relative; overflow: hidden; }
.dt-backdrop {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; filter: blur(46px) saturate(1.1) brightness(.34); transform: scale(1.16);
}
.dt-scrim {
  position: absolute; inset: 0;
  background: linear-gradient(0deg, var(--bg) 4%, color-mix(in oklab, var(--bg) 62%, transparent) 52%, color-mix(in oklab, var(--bg) 40%, transparent) 100%);
}
.dt-inner {
  position: relative;
  display: grid; grid-template-columns: clamp(180px, 22vw, 300px) minmax(0, 1fr);
  gap: clamp(22px, 4vw, 54px);
  padding-block: clamp(28px, 5vw, 64px);
  align-items: start;
}
.dt-poster {
  position: relative; aspect-ratio: 2/3; border-radius: var(--r-md); overflow: hidden;
  border: 1px solid var(--line-2); background: var(--bg-3);
  box-shadow: 0 30px 70px -38px rgba(0, 0, 0, .95);
}
.dt-poster img { width: 100%; height: 100%; object-fit: cover; }
.dt-noimg {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-family: var(--font-head); font-size: 52px; color: var(--line-2);
}

.dt-crumb { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted); margin-bottom: 14px; }
.dt-crumb a { color: var(--ink-soft); }
.dt-crumb a:hover { color: var(--accent-hi); }

.dt-title { font-size: clamp(28px, 4vw, 54px); line-height: 1.06; margin-bottom: 16px; }
.dt-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 20px; }
.dt-meta .pill {
  border: 1px solid var(--line-2); border-radius: var(--r-xs);
  padding: 3px 10px; font-size: 11.5px; color: var(--ink-soft);
}
.dt-desc { color: var(--ink-soft); font-size: clamp(14px, 1.2vw, 16px); line-height: 1.85; max-width: 58ch; }
.dt-desc.is-fallback { color: var(--muted); font-style: normal; }
.dt-tags { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 20px; }
.dt-tags .tag:hover { color: var(--ink); border-color: var(--ink-soft); }
.dt-cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: clamp(22px, 3vw, 32px); }
.btn.is-disabled { opacity: .5; pointer-events: none; }

@media (max-width: 720px) {
  .dt-inner { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .dt-poster { width: min(64vw, 260px); }
  .dt-crumb, .dt-meta, .dt-tags, .dt-cta { justify-content: center; }
  .dt-desc { text-align: left; }
}

/* ================================================================
   재생 화면 (/Vod/Play/{id})
   ================================================================ */
.player-page { padding-block: clamp(16px, 2.6vw, 30px); }
.pl-top { display: flex; align-items: center; gap: 16px; margin-bottom: 14px; flex-wrap: wrap; }
.pl-back {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; color: var(--ink-soft);
  border: 1px solid var(--line); border-radius: var(--r-sm);
  height: 34px; padding: 0 12px; background: var(--bg-2);
  transition: color .2s var(--ease), border-color .2s var(--ease);
}
.pl-back:hover { color: var(--ink); border-color: var(--line-2); }
.pl-title { font-size: clamp(18px, 2vw, 26px); line-height: 1.2; min-width: 0; }

.pl-stage {
  position: relative; background: #000;
  border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden;
  aspect-ratio: 16/9;
}
.pl-video { width: 100%; height: 100%; display: block; background: #000; }
.pl-stage-empty { display: grid; place-items: center; background: var(--bg-3); }
.pl-note { margin-top: 14px; font-size: 12.5px; color: var(--faint); line-height: 1.7; }
.pl-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }

@media (max-width: 560px) { .pl-stage { aspect-ratio: 4/3; } }

/* 재생 차단 안내 */
.pl-gate { display: flex; flex-direction: column; align-items: center; gap: 16px; padding: clamp(28px, 5vw, 56px); text-align: center; }
.pl-lock {
  width: 56px; height: 56px; border-radius: 99px; display: grid; place-items: center;
  border: 1.5px solid var(--line-2); color: var(--accent-hi);
}
.pl-gate-msg { font-size: clamp(14px, 1.4vw, 17px); color: var(--ink-soft); max-width: 34ch; line-height: 1.7; }
.pl-gate-cta { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }

/* ================================================================
   회원 화면 (/Account/*, /Terms, /Privacy)
   ================================================================ */
.acc-page { padding-block: clamp(24px, 4vw, 52px) clamp(40px, 6vw, 80px); }
.acc-wrap { display: flex; justify-content: center; }
.acc-page .auth-form { width: 100%; max-width: 440px; }

.acc-head { display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.acc-head h1 { font-size: clamp(24px, 3vw, 36px); }
.acc-head .acc-sub { font-size: 13.5px; color: var(--muted); margin-top: 6px; }
.acc-head-right { margin-left: auto; display: flex; gap: 8px; }
.acc-inline { display: inline; }

/* 알림 */
.acc-alert {
  border: 1px solid var(--line-2); border-radius: var(--r-sm);
  padding: 13px 16px; font-size: 13.5px; line-height: 1.7; margin-bottom: 20px;
}
/* 성공 알림에 액센트(커튼레드)를 쓰면 오류처럼 읽힌다. 골드 계열로 구분한다. */
.acc-alert.ok {
  border-color: color-mix(in oklab, var(--gold) 45%, transparent);
  background: color-mix(in oklab, var(--gold) 7%, transparent);
  color: var(--gold-soft);
}
.acc-alert.err { border-color: color-mix(in oklab, #d9534f 50%, transparent); background: color-mix(in oklab, #d9534f 10%, transparent); }
.acc-alert.warn { border-color: color-mix(in oklab, var(--gold) 45%, transparent); background: color-mix(in oklab, var(--gold) 7%, transparent); color: var(--ink-soft); }
.acc-alert ul { margin: 10px 0 0; padding-left: 18px; }
.acc-alert li { margin-top: 5px; }
.acc-alert .warn-strong { color: var(--gold-soft); }

/* 폼 보강 — 시안의 .check 는 JS 커스텀 박스 전제라 기본 체크박스로 대체한다 */
.check input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--accent); flex: 0 0 auto; }
.check span { line-height: 1.6; }
.check b { color: var(--accent-hi); font-weight: 600; }
.check a { color: var(--ink-soft); text-decoration: underline; text-underline-offset: 3px; margin-left: 6px; font-size: 12.5px; }
.check a:hover { color: var(--accent-hi); }
.field .opt { color: var(--faint); font-weight: 400; }
.field .ctrl.is-readonly { background: var(--bg-2); opacity: .75; }
.field .ctrl input:disabled { color: var(--muted); }

/* 마이페이지 요약 카드 */
.acc-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; margin-bottom: 32px; }
.acc-card {
  background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--r-md);
  padding: 18px; display: flex; flex-direction: column; gap: 8px;
}
.acc-card .k { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .14em; color: var(--muted); }
.acc-card .v { font-family: var(--font-head); font-size: 22px; font-weight: 700; line-height: 1.3; }
.acc-card .v.on { color: var(--gold); }
.acc-card .v small { font-size: 13px; font-weight: 400; color: var(--muted); margin-left: 3px; }
.acc-card-btn { margin-top: auto; align-self: flex-start; height: 32px; padding: 0 13px; font-size: 12.5px; }
.acc-card-note { font-size: 11.5px; color: var(--faint); margin-top: auto; }

/* 섹션 */
.acc-sec { margin-bottom: 34px; }
.acc-sec h2 { font-size: 17px; margin-bottom: 16px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.acc-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 0 18px; }
.acc-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 20px; }
.acc-leave { margin-left: auto; color: var(--faint); }
.acc-leave:hover { color: var(--accent-hi); }
.acc-danger { background: transparent; color: #e07b77; border: 1px solid color-mix(in oklab, #d9534f 45%, transparent); }
.acc-danger:hover { background: color-mix(in oklab, #d9534f 14%, transparent); color: #f0a09c; }

/* 목록 */
.acc-list { list-style: none; margin: 0; padding: 0; }
.acc-list li { display: flex; align-items: center; gap: 14px; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.acc-list li span { margin-left: auto; font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.acc-list a:hover { color: var(--accent-hi); }

.acc-table-wrap { overflow-x: auto; }
.acc-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.acc-table th, .acc-table td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--line); }
.acc-table th { font-size: 11.5px; letter-spacing: .06em; color: var(--muted); font-weight: 600; white-space: nowrap; }
.acc-table tbody tr:hover { background: var(--bg-2); }
.acc-table td.mono { font-family: var(--font-mono); font-size: 12px; color: var(--muted); white-space: nowrap; }
.acc-table td.act { text-align: right; white-space: nowrap; }
.acc-table .strong a:hover { color: var(--accent-hi); }
.btn.btn-sm { height: 30px; padding: 0 12px; font-size: 12.5px; }

/* 약관 */
.policy-body {
  white-space: pre-wrap; font-size: 13.5px; line-height: 1.9; color: var(--ink-soft);
  background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--r-md);
  padding: clamp(20px, 3vw, 34px); max-width: 80ch;
}

/* GNB 유저 메뉴의 로그아웃 버튼 — 링크와 같은 모양으로 맞춘다 */
.gnb-user-menu .logout-btn {
  display: flex; align-items: center; gap: 9px; width: 100%;
  padding: 9px 12px; font-size: 13px; font-family: inherit;
  color: var(--ink-soft); background: none; border: 0; border-radius: var(--r-sm); text-align: left;
}
.gnb-user-menu .logout-btn:hover { background: var(--bg-4); color: var(--ink); }

/* ================================================================
   결제 화면 (/Pay/*)
   ================================================================ */
.pay-items { display: flex; flex-direction: column; gap: 10px; margin-bottom: 30px; }
.pay-item {
  display: flex; align-items: center; gap: 16px; cursor: pointer;
  background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--r-md);
  padding: 18px 20px;
  transition: border-color .2s var(--ease), background .2s var(--ease);
}
.pay-item:hover { border-color: var(--line-2); }
.pay-item:has(input:checked) {
  border-color: var(--accent);
  background: color-mix(in oklab, var(--accent) 7%, var(--bg-2));
}
.pay-item input[type="radio"] { width: 20px; height: 20px; accent-color: var(--accent); flex: 0 0 auto; }
.pi-body { display: flex; flex-direction: column; gap: 5px; min-width: 0; flex: 1; }
.pi-top { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.pi-name { font-size: 15.5px; font-weight: 700; }
.pi-badge {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: .06em;
  color: var(--gold); border: 1px solid color-mix(in oklab, var(--gold) 42%, transparent);
  border-radius: var(--r-xs); padding: 2px 7px;
}
.pi-desc { font-size: 12.5px; color: var(--muted); }
.pi-give { font-size: 11.5px; color: var(--ink-soft); letter-spacing: .04em; }
.pi-price { text-align: right; white-space: nowrap; display: flex; flex-direction: column; gap: 2px; align-items: flex-end; }
.pi-price b { font-family: var(--font-head); font-size: 21px; }
.pi-price b small { font-size: 12px; font-weight: 400; color: var(--muted); margin-left: 2px; }
.pi-before { font-size: 11.5px; color: var(--faint); text-decoration: line-through; }
.pi-off { font-size: 10.5px; color: var(--gold); font-family: var(--font-mono); }

.pay-method-list { display: flex; gap: 10px; flex-wrap: wrap; }
.pay-method {
  display: inline-flex; align-items: center; gap: 9px; cursor: pointer;
  background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--r-sm);
  padding: 11px 16px; font-size: 13.5px;
  transition: border-color .2s var(--ease), background .2s var(--ease);
}
.pay-method:hover { border-color: var(--line-2); }
.pay-method:has(input:checked) { border-color: var(--accent); background: color-mix(in oklab, var(--accent) 8%, var(--bg-2)); }
.pay-method input[type="radio"] { width: 17px; height: 17px; accent-color: var(--accent); }
.pay-note { font-size: 12px; color: var(--faint); margin-top: 12px; line-height: 1.7; }

/* 결제창 */
.pg-window { max-width: 460px; }
.pg-head { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.pg-head h1 { font-size: 24px; }
.pg-tag {
  font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .12em;
  color: var(--gold); border: 1px solid color-mix(in oklab, var(--gold) 45%, transparent);
  border-radius: var(--r-xs); padding: 3px 9px;
}
.pg-info {
  margin: 0 0 24px; padding: 18px 20px;
  background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--r-md);
}
.pg-info > div { display: flex; align-items: baseline; gap: 14px; padding: 7px 0; }
.pg-info > div + div { border-top: 1px solid var(--line); }
.pg-info dt { font-size: 12.5px; color: var(--muted); flex: 0 0 84px; }
.pg-info dd { margin: 0; font-size: 13.5px; min-width: 0; word-break: break-all; }
.pg-info .pg-amount { font-family: var(--font-head); font-size: 20px; font-weight: 700; }
.pg-cancel { margin-top: 10px; }

/* 결제 결과 */
.pay-result-top { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; }
.pay-result-top h1 { font-size: clamp(20px, 2.4vw, 28px); }
.pay-result-mark {
  width: 46px; height: 46px; border-radius: 99px; display: grid; place-items: center;
  font-size: 22px; font-weight: 700; flex: 0 0 auto; border: 2px solid var(--line-2); color: var(--muted);
}
.pay-result-mark.ok { border-color: color-mix(in oklab, var(--gold) 60%, transparent); color: var(--gold); }
.pay-result-mark.wait { border-color: color-mix(in oklab, var(--gold) 45%, transparent); color: var(--gold-soft); }
.pay-result-mark.fail { border-color: color-mix(in oklab, #d9534f 55%, transparent); color: #e07b77; }
.pay-result-actions { flex-direction: column; align-items: stretch; }
.pay-result-actions .btn { width: 100%; }

.bill-no { display: block; font-size: 11px; color: var(--faint); margin-top: 3px; }

/* 상태 칩은 관리자 화면과 같은 규칙을 쓴다 */
.ad-chip {
  display: inline-block; font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .04em;
  border: 1px solid var(--line-2); border-radius: var(--r-xs); padding: 2px 7px; color: var(--ink-soft);
}
.ad-chip.ok { border-color: color-mix(in oklab, var(--gold) 50%, transparent); color: var(--gold); }
.ad-chip.wait { border-color: color-mix(in oklab, var(--gold) 35%, transparent); color: var(--gold-soft); }
.ad-chip.off { color: var(--faint); }

@media (max-width: 560px) {
  .pay-item { flex-wrap: wrap; }
  .pi-price { width: 100%; align-items: flex-start; text-align: left; }
}

/* ================================================================
   공지 · 문의 (/Notice, /Help)
   ================================================================ */
.post {
  background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--r-md);
  padding: clamp(20px, 3vw, 32px); margin-bottom: 28px;
}
.post-head { padding-bottom: 16px; margin-bottom: 18px; border-bottom: 1px solid var(--line); }
.post-title { font-size: clamp(18px, 2.2vw, 26px); margin: 10px 0 8px; }
.post-meta { font-size: 11.5px; color: var(--muted); }
.post-body { white-space: pre-wrap; font-size: 14px; line-height: 1.9; color: var(--ink-soft); }
.post-answer {
  margin-top: 24px; padding: 18px 20px;
  background: color-mix(in oklab, var(--accent) 6%, var(--bg-3));
  border: 1px solid color-mix(in oklab, var(--accent) 30%, transparent); border-radius: var(--r-sm);
}
.post-answer-head { font-size: 12.5px; font-weight: 700; color: var(--accent-hi); margin-bottom: 10px; }
.post-answer-head .mono { font-weight: 400; color: var(--muted); font-size: 11px; margin-left: 6px; }

/* ============================================================
   약관 팝업 (가입·결제의 '전문 보기')
   폼을 떠나지 않고 읽게 한다. JS 가 없으면 링크가 새 탭으로 열린다.
   ============================================================ */
.pmodal { position: fixed; inset: 0; z-index: 500; display: none; }
.pmodal.open { display: grid; place-items: center; padding: clamp(12px, 4vw, 40px); }
.pmodal-back { position: absolute; inset: 0; background: rgba(0,0,0,.72); }
.pmodal-box {
  position: relative; z-index: 1;
  width: min(760px, 100%); max-height: min(760px, 88vh);
  display: flex; flex-direction: column;
  background: var(--bg-2); border: 1px solid var(--line-2); border-radius: var(--r-lg, 14px);
  box-shadow: 0 40px 90px -40px rgba(0,0,0,.9);
  animation: pmIn .18s var(--ease, ease) both;
}
@keyframes pmIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .pmodal-box { animation: none; } }

.pmodal-head {
  display: flex; align-items: center; gap: 12px;
  padding: 18px clamp(16px, 3vw, 26px); border-bottom: 1px solid var(--line);
}
.pmodal-title { font-size: 17px; font-weight: 700; }
.pmodal-close {
  margin-left: auto; width: 34px; height: 34px; flex: 0 0 auto;
  display: grid; place-items: center; border-radius: var(--r-sm);
  background: transparent; border: 1px solid var(--line-2); color: var(--ink-soft); font-size: 13px;
  transition: background .16s var(--ease), color .16s;
}
.pmodal-close:hover { background: var(--bg-3); color: var(--ink); }

.pmodal-body {
  flex: 1; min-height: 0; overflow-y: auto;
  padding: clamp(16px, 3vw, 26px);
  font-size: 13.5px; line-height: 1.9; color: var(--ink-soft);
}
/* 팝업 안에서는 본문의 테두리·배경·폭 제한을 걷어낸다.
   전용 페이지에서 쓰는 카드 틀을 그대로 두면 상자 안에 상자가 겹쳐 보인다. */
.pmodal-body .policy-body {
  white-space: pre-wrap; word-break: keep-all;
  background: none; border: 0; border-radius: 0; padding: 0; max-width: none;
}
.pmodal-body:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.pmodal-loading { color: var(--faint); }

.pmodal-foot {
  display: flex; align-items: center; gap: 10px;
  padding: 14px clamp(16px, 3vw, 26px); border-top: 1px solid var(--line);
}
.pmodal-foot .pmodal-newtab { margin-right: auto; }

@media (max-width: 560px) {
  .pmodal.open { padding: 0; place-items: stretch; }
  .pmodal-box { width: 100%; max-height: 100%; border-radius: 0; border: 0; }
}

.pin {
  display: inline-block; font-family: var(--font-mono); font-size: 10px; letter-spacing: .06em;
  color: var(--accent-hi); border: 1px solid color-mix(in oklab, var(--accent) 40%, transparent);
  border-radius: var(--r-xs); padding: 1px 6px; margin-right: 7px;
}
.acc-table tr.is-current { background: color-mix(in oklab, var(--accent) 7%, transparent); }

/* 입력칸 오른쪽에 붙는 버튼(중복확인 등).
   시안의 .ctrl 은 입력 하나만 담는 틀이라, 버튼을 넣을 때는 오른쪽 여백을 줄여 붙인다. */
.ctrl.ctrl-with-btn { padding-right: 6px; gap: 8px; }
.ctrl.ctrl-with-btn input { flex: 1; min-width: 0; }
.btn.btn-check {
  flex: 0 0 auto; height: 34px; padding: 0 14px; font-size: 13px; white-space: nowrap;
}
.btn.btn-check:disabled { opacity: .5; cursor: progress; }

/* 여러 줄 입력 — 시안의 .ctrl 은 한 줄 입력 기준이라 별도로 둔다 */
.ctrl.ctrl-area { align-items: stretch; padding: 0; }
.ctrl.ctrl-area textarea {
  width: 100%; border: 0; background: transparent; color: var(--ink);
  font-family: inherit; font-size: 14px; line-height: 1.8; padding: 12px 14px;
  resize: vertical; outline: none; min-height: 120px;
}
.ctrl select {
  width: 100%; border: 0; background: transparent; color: var(--ink);
  font-family: inherit; font-size: 14px; outline: none;
}

/* ---------------- 모션 감소 ---------------- */
@media (prefers-reduced-motion: reduce) {
  .hs-slide, .hs-card { transition: none; }
}
