/* ShortMix — Stripe HDS 토큰(다크 기본 · 라이트 전환) + Pretendard KR/JP */

@font-face { font-family: Pretendard; src: url("/fonts/Pretendard-Light.otf") format("opentype"); font-weight: 300; font-display: swap; }
@font-face { font-family: Pretendard; src: url("/fonts/Pretendard-Regular.otf") format("opentype"); font-weight: 400; font-display: swap; }
@font-face { font-family: Pretendard; src: url("/fonts/Pretendard-Medium.otf") format("opentype"); font-weight: 500; font-display: swap; }
@font-face { font-family: Pretendard; src: url("/fonts/Pretendard-SemiBold.otf") format("opentype"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Pretendard JP"; src: url("/fonts/PretendardJP-Light.otf") format("opentype"); font-weight: 300; font-display: swap; }
@font-face { font-family: "Pretendard JP"; src: url("/fonts/PretendardJP-Regular.otf") format("opentype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Pretendard JP"; src: url("/fonts/PretendardJP-Medium.otf") format("opentype"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Pretendard JP"; src: url("/fonts/PretendardJP-SemiBold.otf") format("opentype"); font-weight: 600; font-display: swap; }
/* 중국어(간체) — 中文 활성 시에만 브라우저가 지연 로드 */
@font-face { font-family: "Noto Sans SC"; src: url("/fonts/NotoSansSC-Light.ttf") format("truetype"); font-weight: 300; font-display: swap; }
@font-face { font-family: "Noto Sans SC"; src: url("/fonts/NotoSansSC-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Noto Sans SC"; src: url("/fonts/NotoSansSC-Medium.ttf") format("truetype"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Noto Sans SC"; src: url("/fonts/NotoSansSC-SemiBold.ttf") format("truetype"); font-weight: 600; font-display: swap; }

:root {
  /* 다크(기본) — Stripe HDS 팔레트의 deep-navy 파생 */
  --accent: #7f7dfc;
  --accent-strong: #533afd;
  --bg: #071120;
  --surface: #0d1d33;
  --surface-2: #0a1728;
  --border: #1d3350;
  --text-strong: #eef3fa;
  --text: #a9bad0;
  --subdued: #7086a1;
  --veil: rgba(4, 10, 20, 0.62);
  --overlay-bg: rgba(3, 8, 16, 0.72);

  --font: Pretendard, "Pretendard JP", "SF Pro Display", -apple-system, BlinkMacSystemFont, sans-serif;
  --s2: 4px; --s4: 8px; --s5: 10px; --s6: 12px; --s7: 16px;
  --s8: 20px; --s9: 24px; --s10: 32px; --s11: 40px; --s13: 64px;
  --r-sm: 4px; --r-md: 6px; --r-lg: 8px; --r-xl: 16px;
  --shadow-sm: 0px 2px 5px 0px rgba(0, 0, 0, 0.35);
  --shadow-md: 0px 15px 35px 0px rgba(0, 0, 0, 0.4);
  --wrap: 1120px;
}
/* 中文 활성 시 간체 자형(Noto Sans SC)을 최우선 — 다른 언어에선 지연 로드로 미다운로드 */
html[lang="zh"] {
  --font: "Noto Sans SC", Pretendard, "SF Pro Display", -apple-system, BlinkMacSystemFont, sans-serif;
}
[data-theme="light"] {
  /* Stripe HDS Light 원본 토큰 */
  --accent: #533afd;
  --accent-strong: #533afd;
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-2: #f8fafd;
  --border: #e5edf5;
  --text-strong: #061b31;
  --text: #50617a;
  --subdued: #64748d;
  --veil: rgba(6, 27, 49, 0.5);
  --overlay-bg: rgba(6, 27, 49, 0.45);
  --shadow-sm: 0px 2px 5px 0px rgba(0, 0, 0, 0.1);
  --shadow-md: 0px 15px 35px 0px rgba(23, 23, 23, 0.12);
}

* { box-sizing: border-box; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--font); font-size: 16px; font-weight: 300; line-height: 22.4px;
  -webkit-font-smoothing: antialiased; word-break: keep-all;
  transition: background 0.2s ease, color 0.2s ease;
}

/* ── 마이크로 인터랙션 (전역) ── */
button {
  transition: transform 0.16s cubic-bezier(0.2, 0.7, 0.3, 1), background 0.2s ease,
    color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease, opacity 0.2s ease;
}
button:not(:disabled):active { transform: scale(0.96); }
.auth-cta:not(:disabled):hover { filter: brightness(1.12); transform: translateY(-1px); box-shadow: 0 6px 18px color-mix(in srgb, var(--accent-strong) 35%, transparent); }
.chip:not([aria-selected="true"]):hover { transform: translateY(-1px); }
.overlay { animation: overlayIn 0.22s ease; }
.overlay > .modal { animation: modalIn 0.3s cubic-bezier(0.2, 0.8, 0.3, 1); }
@keyframes overlayIn { from { opacity: 0; } }
@keyframes modalIn { from { opacity: 0; transform: translateY(12px) scale(0.97); } }
.menu { animation: menuIn 0.18s ease; transform-origin: top right; }
@keyframes menuIn { from { opacity: 0; transform: scale(0.94) translateY(-4px); } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ── 게이트 → 앱 입장 전환 ── */
.auth-gate { transition: opacity 0.42s ease, transform 0.42s ease; }
.auth-gate.closing { opacity: 0; transform: scale(1.015); pointer-events: none; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } }
@keyframes fadeDown { from { opacity: 0; transform: translateY(-10px); } }
.app-enter .top { animation: fadeDown 0.5s ease both; }
.app-enter .chips-row, .app-enter .sub-row { animation: fadeUp 0.5s 0.1s ease both; }
.app-enter #gallery .vcard { animation: fadeUp 0.55s calc(0.16s + var(--i, 0) * 0.045s) cubic-bezier(0.2, 0.7, 0.3, 1) both; }
:focus-visible { outline: 1px solid var(--accent); outline-offset: -1px; }
body.no-scroll { overflow: hidden; }

/* ── 헤더: 검색 + 우측 액션 ── */
.top {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 84%, transparent); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.top-inner {
  max-width: var(--wrap); margin: 0 auto; padding: var(--s6) var(--s9);
  display: flex; align-items: center; gap: var(--s7);
}
.brand { flex: none; font-size: 22px; font-weight: 500; letter-spacing: -0.22px; color: var(--text-strong); cursor: pointer; }
.brand span { color: var(--accent); }
#search {
  flex: 1; max-width: 520px; font-family: var(--font);
  font-size: 14px; font-weight: 400; line-height: 14px; color: var(--text-strong);
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg);
  padding: var(--s5) var(--s7);
}
#search::placeholder { color: var(--subdued); font-weight: 300; }
#search:focus { outline: 1px solid var(--accent); outline-offset: -1px; border-color: var(--accent); }
.nav-actions { margin-left: auto; display: flex; gap: var(--s2); }
.icon-btn {
  appearance: none; background: none; cursor: pointer;
  width: 34px; height: 34px; display: grid; place-items: center;
  color: var(--subdued); border: 1px solid var(--border); border-radius: var(--r-lg);
  font-family: var(--font); font-size: 11px; font-weight: 500;
}
.icon-btn:hover { color: var(--text-strong); border-color: var(--accent); }
.icon-btn svg { width: 17px; height: 17px; }

/* ── 카테고리 칩 ── */
.chips-row { border-bottom: 1px solid var(--border); }
.chips-inner { max-width: var(--wrap); margin: 0 auto; padding: var(--s5) var(--s9); }
.chips { display: flex; gap: var(--s4); overflow-x: auto; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  appearance: none; cursor: pointer; white-space: nowrap;
  font-family: var(--font); font-size: 14px; font-weight: 400; line-height: 14px;
  color: var(--text); background: var(--surface); border: 1px solid var(--border);
  border-radius: 100px; padding: var(--s4) var(--s7);
}
.chip:hover { color: var(--text-strong); }
.chip[aria-selected="true"] {
  color: var(--bg); background: var(--text-strong); border-color: var(--text-strong); font-weight: 500;
}

/* ── 세로 갤러리 + 무한 스크롤 ── */
.gallery-wrap { max-width: var(--wrap); margin: 0 auto; padding: var(--s9) var(--s9) var(--s10); }
.gallery { display: grid; gap: var(--s8); grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.sentinel { height: 1px; }
.vcard { min-width: 0; }
.vthumb {
  position: relative; aspect-ratio: 9 / 16; width: 100%;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-xl);
  overflow: hidden; cursor: pointer; padding: 0; display: block;
  transition: transform 0.25s cubic-bezier(0.2, 0.7, 0.3, 1), border-color 0.2s ease, box-shadow 0.25s ease;
}
.vthumb:hover { border-color: var(--accent); box-shadow: var(--shadow-md); transform: translateY(-3px) scale(1.012); }
.vthumb:active { transform: scale(0.985); }
.vthumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.vthumb .veilg { position: absolute; inset: 0; background: linear-gradient(0deg, var(--veil), transparent 38%); }
.vthumb .views {
  position: absolute; left: var(--s6); bottom: var(--s5);
  color: #fff; font-size: 14px; font-weight: 500; line-height: 14px;
  display: flex; align-items: center; gap: var(--s2);
}
.vthumb .views svg { width: 12px; height: 12px; fill: currentColor; opacity: 0.9; }
.vthumb .dur {
  position: absolute; right: var(--s6); top: var(--s5);
  color: #fff; background: rgba(4, 10, 20, 0.6);
  font-size: 10px; font-weight: 400; letter-spacing: 0.1px; line-height: 14.5px;
  padding: 1px 6px; border-radius: var(--r-sm);
}
.vmeta { padding: var(--s4) var(--s2) 0; }
.vtitle {
  margin: 0 0 2px; font-size: 14px; font-weight: 400; line-height: 1.4; color: var(--text-strong);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.vchan { margin: 0; font-size: 11px; font-weight: 300; line-height: 15.95px; color: var(--subdued); }
.empty {
  grid-column: 1 / -1; padding: var(--s13) var(--s9); text-align: center;
  font-size: 14px; font-weight: 300; color: var(--subdued);
  background: var(--surface-2); border: 1px dashed var(--border); border-radius: var(--r-xl);
}

/* ── 팝업 공통 ── */
.overlay {
  position: fixed; inset: 0; z-index: 50; background: var(--overlay-bg);
  backdrop-filter: blur(8px); display: grid; place-items: center; padding: var(--s8);
}
.overlay[hidden] { display: none; }
.modal {
  position: relative; background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--r-xl); box-shadow: var(--shadow-md);
  width: min(880px, 100%); max-height: min(92vh, 720px);
  display: flex; gap: var(--s9); padding: var(--s9); overflow: auto;
}
.close {
  position: absolute; top: var(--s6); right: var(--s6); z-index: 2;
  appearance: none; background: var(--surface); border: 1px solid var(--border);
  color: var(--subdued); width: 30px; height: 30px; border-radius: 100px;
  cursor: pointer; font-size: 12px; line-height: 1;
}
.close:hover { color: var(--text-strong); border-color: var(--accent); }

/* 영상 팝업 */
.mplayer {
  flex: none; width: 320px; aspect-ratio: 9 / 16; align-self: center;
  background: #000; border-radius: var(--r-lg); overflow: hidden;
}
.mplayer iframe { width: 100%; height: 100%; border: 0; display: block; }
.minfo { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: var(--s6); padding-top: var(--s8); }
.mtitle { margin: 0; font-size: 22px; font-weight: 500; line-height: 1.25; letter-spacing: -0.22px; color: var(--text-strong); }
.mmeta { display: flex; gap: var(--s6); font-size: 12px; font-weight: 400; color: var(--subdued); }
.mmeta b { color: var(--text-strong); font-weight: 500; font-variant-numeric: tabular-nums; }
.kw { display: flex; gap: var(--s2); flex-wrap: wrap; }
.kw span {
  font-size: 11px; font-weight: 400; color: var(--text);
  border: 1px solid var(--border); border-radius: 100px; padding: 2px var(--s5);
}
.creator { display: flex; align-items: center; gap: var(--s4); }
.msubs { font-size: 12px; font-weight: 300; color: var(--subdued); font-variant-numeric: tabular-nums; }
.creator-name {
  appearance: none; background: none; border: none; cursor: pointer; padding: 0;
  font-family: var(--font); font-size: 14px; font-weight: 500; color: var(--text-strong);
}
.creator-name:hover { color: var(--accent); }
.bkm {
  appearance: none; background: none; border: 1px solid var(--border); border-radius: var(--r-md);
  width: 28px; height: 28px; display: grid; place-items: center; cursor: pointer; color: var(--subdued);
}
.bkm:hover { color: var(--accent); border-color: var(--accent); }
.bkm.on { color: var(--accent); border-color: var(--accent); }
.bkm.on #bkmPath { fill: currentColor; }
.bkm svg { width: 14px; height: 14px; }

.replays { display: flex; gap: var(--s4); }
.replay {
  appearance: none; cursor: pointer; display: flex; align-items: center; gap: var(--s4);
  font-family: var(--font); font-size: 13px; font-weight: 400;
  color: var(--text-strong); background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: var(--s5) var(--s7);
}
.replay:hover { border-color: var(--accent); }
.replay kbd {
  font-family: var(--font); font-size: 10px; font-weight: 600; color: var(--subdued);
  border: 1px solid var(--border); border-radius: var(--r-sm); padding: 1px 5px;
}
.replay:hover kbd { color: var(--accent); border-color: var(--accent); }

.rate { display: flex; gap: var(--s4); margin-top: auto; padding-top: var(--s6); border-top: 1px solid var(--border); }
.rate-btn {
  appearance: none; cursor: pointer; flex: 1; display: flex; flex-direction: column; align-items: center; gap: var(--s2);
  font-family: var(--font); font-size: 11px; font-weight: 400;
  color: var(--subdued); background: none; border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: var(--s5) var(--s4);
}
.rate-btn svg { width: 20px; height: 20px; }
.rate-btn:hover { color: var(--text-strong); border-color: var(--accent); }
.rate-btn.on { color: var(--accent); border-color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, transparent); }

/* 취향 관리 */
.modal.taste { display: block; width: min(720px, 100%); }
.taste-sub { margin: var(--s2) 0 var(--s8); font-size: 13px; font-weight: 300; color: var(--subdued); }
.taste-group { margin-bottom: var(--s8); }
.taste-group h3 { margin: 0 0 var(--s5); font-size: 13px; font-weight: 500; color: var(--text-strong); }
.taste-list { display: flex; flex-direction: column; gap: var(--s2); }
.taste-item {
  display: flex; align-items: center; gap: var(--s6);
  background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-lg);
  padding: var(--s4) var(--s6);
}
.taste-item img { width: 34px; height: 60px; object-fit: cover; border-radius: var(--r-sm); flex: none; }
.taste-item .t { flex: 1; min-width: 0; font-size: 13px; font-weight: 400; color: var(--text-strong); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.taste-item .c { flex: none; font-size: 11px; color: var(--subdued); }
.taste-remove {
  appearance: none; background: none; border: 1px solid var(--border); border-radius: var(--r-md);
  color: var(--subdued); cursor: pointer; font-family: var(--font); font-size: 11px; padding: 3px var(--s5);
}
.taste-remove:hover { color: var(--text-strong); border-color: var(--accent); }
.taste-empty { font-size: 13px; color: var(--subdued); }

/* ── 남은 시간 필 ── */
.pill {
  align-self: center; font-size: 11px; font-weight: 500; letter-spacing: 0.1px;
  color: var(--text); border: 1px solid var(--border); border-radius: 100px;
  padding: 4px var(--s5); font-variant-numeric: tabular-nums; white-space: nowrap;
}
.pill.low { color: var(--accent); border-color: var(--accent); }

/* ── 로그인 게이트 (토스식) ── */
.auth-gate {
  position: fixed; inset: 0; z-index: 100; background: var(--bg);
  display: grid; place-items: center; padding: var(--s8); overflow: auto;
}
.auth-gate[hidden] { display: none; }
.auth-card { width: min(420px, 100%); display: flex; flex-direction: column; gap: var(--s8); }
.auth-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--s10); }
.auth-head-actions { display: flex; align-items: center; gap: var(--s5); }
.auth-brand { font-size: 26px; }
.auth-restart {
  appearance: none; cursor: pointer; background: none; border: none; padding: 0;
  font-family: var(--font); font-size: 12px; font-weight: 400; color: var(--subdued);
}
.auth-restart:hover { color: var(--text-strong); }
.auth-restart[hidden] { display: none; }
.auth-step { display: flex; flex-direction: column; gap: var(--s5); animation: stepIn 0.28s ease; position: relative; }
.auth-step + .auth-step { margin-top: var(--s9); }
.auth-step.done { gap: var(--s2); opacity: 0.75; }
@keyframes stepIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .auth-step { animation: none; } }
.auth-label { font-size: 20px; font-weight: 500; letter-spacing: -0.2px; color: var(--text-strong); line-height: 1.3; margin-bottom: var(--s2); }
.auth-step.done .auth-label { font-size: 12px; font-weight: 400; color: var(--subdued); margin-bottom: 0; }
.auth-input {
  font-family: var(--font); font-size: 17px; font-weight: 400; color: var(--text-strong);
  background: none; border: none; border-bottom: 2px solid var(--border);
  padding: var(--s5) 0; border-radius: 0;
}
.auth-input:focus { outline: none; border-bottom-color: var(--accent); }
.auth-input::placeholder { color: var(--subdued); font-weight: 300; }
.auth-step.done .auth-input { font-size: 14px; color: var(--text); border-bottom-color: transparent; padding: 0 0 var(--s2); pointer-events: none; }
.auth-chips { display: flex; gap: var(--s5); flex-wrap: wrap; margin: var(--s2) 0; }
.auth-chips .chip[aria-selected="true"] { color: var(--bg); background: var(--accent); border-color: var(--accent); }
.auth-chips .chip { font-size: 14px; }
.auth-step.done .auth-chips .chip:not([aria-selected="true"]) { display: none; }
.auth-consent { display: flex; align-items: flex-start; gap: var(--s4); font-size: 12px; font-weight: 300; color: var(--subdued); cursor: pointer; }
.auth-consent input { accent-color: var(--accent-strong); margin-top: 2px; }
.auth-cta {
  appearance: none; cursor: pointer; font-family: var(--font);
  font-size: 15px; font-weight: 500; color: #fff;
  background: var(--accent-strong); border: none; border-radius: var(--r-lg);
  padding: var(--s6) var(--s7); margin-top: var(--s4);
}
.auth-cta:hover { filter: brightness(1.08); }
.auth-cta:disabled { opacity: 0.45; cursor: default; filter: none; }
.auth-error { margin: 0; font-size: 12px; color: #ff6a6a; }
.auth-foot { margin: 0; font-size: 11px; font-weight: 300; color: var(--subdued); line-height: 1.7; display: flex; flex-direction: column; gap: var(--s5); }
.auth-note { opacity: 0.85; }
.auth-alt { display: flex; align-items: center; gap: var(--s4); padding-top: var(--s5); border-top: 1px solid var(--border); font-size: 12px; }
.auth-alt .auth-switch { text-decoration: none; font-weight: 500; }
.auth-alt .auth-switch:hover { text-decoration: underline; text-underline-offset: 3px; }
/* 입력 힌트 (플레이스홀더 예시 — 본문보다 작게) */
.input-hint { font-size: 11px; font-weight: 300; color: var(--subdued); margin: calc(var(--s2) * -1) 0 var(--s2); }
/* 상호·SNS 검증 메시지 */
.biz-verify { margin: 0; font-size: 12px; font-weight: 400; line-height: 1.5; }
.biz-verify.ok { color: #3fbe87; }
.biz-verify.warn { color: #dfa23f; }
.biz-verify.err { color: #ff6a6a; }
.auth-switch {
  appearance: none; background: none; border: none; padding: 0; cursor: pointer;
  font-family: var(--font); font-size: 12px; font-weight: 400; color: var(--accent);
  text-decoration: underline; text-underline-offset: 3px;
}
/* 이메일 도메인 제안 드롭다운 */
.email-suggest {
  display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg);
  overflow: hidden; margin-top: var(--s2); box-shadow: var(--shadow-md);
}
.email-suggest[hidden] { display: none; }
.email-suggest button {
  appearance: none; cursor: pointer; text-align: left;
  font-family: var(--font); font-size: 14px; font-weight: 300; color: var(--text);
  background: none; border: none; padding: var(--s5) var(--s7);
}
.email-suggest button b { font-weight: 500; color: var(--accent); }
.email-suggest button:hover { background: var(--surface-2); color: var(--text-strong); }

/* 로그인 코드 온보딩 */
.auth-code { letter-spacing: 0.04em; }
.find-code { align-self: flex-start; margin-top: var(--s2); }
.code-card {
  display: flex; flex-direction: column; align-items: center; gap: var(--s6);
  background: var(--surface); border: 1px dashed var(--accent); border-radius: var(--r-lg);
  padding: var(--s8) var(--s7); margin: var(--s4) 0 var(--s2);
}
.code-big {
  font-size: clamp(20px, 6.5vw, 26px); font-weight: 600; letter-spacing: 0.08em;
  color: var(--text-strong); white-space: nowrap; font-variant-numeric: tabular-nums;
}
.code-copy-btn {
  appearance: none; cursor: pointer; font-family: var(--font);
  font-size: 12px; font-weight: 500; color: var(--accent);
  background: none; border: 1px solid var(--accent); border-radius: 100px;
  padding: var(--s2) var(--s8);
}
.code-copy-btn:hover { background: color-mix(in srgb, var(--accent) 10%, transparent); }
.reveal-sub { margin: 0; font-size: 12px; font-weight: 300; line-height: 1.7; color: var(--subdued); white-space: pre-line; }

/* 재확인 박스 (처음부터 다시) — 인라인 */
.consent-confirm {
  display: flex; flex-direction: column; gap: var(--s6);
  background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-xl);
  padding: var(--s9) var(--s8); margin-bottom: var(--s9); animation: stepIn 0.28s ease;
}
.confirm-title { font-size: 16px; font-weight: 500; color: var(--text-strong); line-height: 1.4; }
.confirm-sub { margin: 0; font-size: 12px; font-weight: 300; color: var(--subdued); line-height: 1.6; }
.confirm-btns { display: flex; gap: var(--s5); margin-top: var(--s4); }
.confirm-btns .auth-cta, .confirm-btns .pw-rate { flex: 1; margin: 0; padding: var(--s5) var(--s6); font-size: 13px; }

/* 재확인 오버레이 (주간 리포트) — 게이트 위, 배경 블러 */
.confirm-overlay { z-index: 130; }
.modal.confirm-modal {
  display: flex; flex-direction: column; gap: var(--s6);
  width: min(460px, 100%); padding: var(--s10) var(--s9) var(--s9); text-align: center;
}
.confirm-modal .mtitle { font-size: 19px; }
.confirm-modal .pw-sub { margin: 0 0 var(--s4); white-space: pre-line; line-height: 1.7; }

/* ── 페이월 + 블러 잠금 ── */
.modal.paywall { display: flex; flex-direction: column; align-items: center; text-align: center; width: min(420px, 100%); gap: var(--s5); }
.pw-icon { color: var(--accent); }
.pw-icon svg { width: 34px; height: 34px; }
.pw-sub { margin: 0; font-size: 14px; font-weight: 300; color: var(--text); }
.modal.paywall .auth-cta { width: 100%; }
.vcard.locked .vthumb { filter: blur(14px) saturate(0.7); pointer-events: none; }
.vcard.locked .vmeta { filter: blur(6px); }
.vcard.locked { user-select: none; }
.gate-banner {
  grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: var(--s7);
  background: var(--surface); border: 1px solid var(--accent); border-radius: var(--r-xl);
  padding: var(--s7) var(--s8);
}
.gate-banner p { margin: 0; font-size: 14px; font-weight: 400; color: var(--text-strong); }
.gate-banner .auth-cta { margin: 0; flex: none; padding: var(--s5) var(--s7); }

/* ── 드롭다운 메뉴 ── */
.menu-wrap { position: relative; }
.menu {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 30;
  min-width: 200px; max-width: 260px; padding: var(--s2);
  background: var(--bg); border: 1px solid var(--border); border-radius: var(--r-lg);
  box-shadow: var(--shadow-md); display: flex; flex-direction: column;
}
.menu[hidden] { display: none; }
.menu button {
  appearance: none; cursor: pointer; text-align: left;
  font-family: var(--font); font-size: 13px; font-weight: 400; color: var(--text);
  background: none; border: none; border-radius: var(--r-md); padding: var(--s5) var(--s6);
}
.menu button:hover { color: var(--text-strong); background: var(--surface); }
.menu-div { height: 1px; background: var(--border); margin: var(--s2) var(--s4); }
.lang-menu { min-width: 120px; }
.lang-menu button[aria-selected="true"] { color: var(--accent); font-weight: 500; }
.menu-tier {
  display: flex; align-items: center; gap: var(--s4);
  padding: var(--s5) var(--s6) var(--s4); border-bottom: 1px solid var(--border); margin-bottom: var(--s2);
}
.menu-tier[hidden] { display: none; }
.menu-phone {
  font-size: 12px; font-weight: 400; color: var(--text); font-variant-numeric: tabular-nums;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* 티어 표식 */
.tier-badge {
  display: inline-flex; align-items: center;
  font-size: 10px; font-weight: 600; letter-spacing: 0.06em;
  border-radius: 100px; padding: 2px var(--s5); line-height: 1.5;
}
.tier-badge.free { color: var(--subdued); border: 1px solid var(--border); }
.tier-badge.plus { color: #fff; background: var(--accent-strong); }
.tier-badge.pro { color: #d9b45a; border: 1px solid #d9b45a; }

/* 플랜 잠금 */
.lock-panel {
  display: flex; flex-direction: column; align-items: center; gap: var(--s4);
  padding: var(--s11) var(--s8); text-align: center;
}
.lock-panel svg { width: 30px; height: 30px; color: var(--accent); margin-bottom: var(--s2); }
.lock-t { margin: 0; font-size: 15px; font-weight: 500; color: var(--text-strong); }
.lock-s { margin: 0; font-size: 12px; font-weight: 300; color: var(--subdued); }
.lock-cta { width: auto; padding: var(--s5) var(--s10); margin-top: var(--s5); }
.lock-chip {
  appearance: none; cursor: pointer; font-family: var(--font);
  font-size: 11px; font-weight: 400; color: var(--subdued);
  background: none; border: 1px dashed var(--border); border-radius: var(--r-md); padding: 3px var(--s5);
}
.lock-chip:hover { color: var(--accent); border-color: var(--accent); }

/* 무료 등급: 저장 크리에이터 티저 (예시 1행 + 실제 목록 블러) */
.cr-teaser { margin: 0 0 var(--s6); font-size: 12px; font-weight: 400; color: var(--text); }
.cr-demo { margin-bottom: var(--s7); }
.demo-row { position: relative; border-color: var(--accent); border-style: dashed; }
.demo-badge {
  position: absolute; top: -9px; left: var(--s6);
  font-size: 9px; font-weight: 700; letter-spacing: 0.08em;
  color: #fff; background: var(--accent-strong); border-radius: 100px; padding: 2px var(--s5);
}
.cr-blur { filter: blur(6px); pointer-events: none; user-select: none; }
.cr-unlock {
  display: flex; align-items: center; justify-content: space-between; gap: var(--s6);
  margin-top: calc(var(--s8) * -1); position: relative; z-index: 1;
  padding: var(--s7); background: color-mix(in srgb, var(--bg) 75%, transparent);
  border: 1px solid var(--border); border-radius: var(--r-lg); backdrop-filter: blur(2px);
}
.cr-unlock span { font-size: 12px; font-weight: 400; color: var(--text-strong); }
.cr-unlock .lock-cta { margin: 0; width: auto; padding: var(--s4) var(--s8); }

/* ── 인기 키워드 리더보드 (영상 위 한 줄 스트립) ── */
.lb-row { border-bottom: 1px solid var(--border); background: linear-gradient(180deg, var(--surface-2), transparent); }
.lb-inner { display: flex; align-items: center; gap: var(--s7); padding-top: var(--s5); padding-bottom: var(--s5); }
.lb-label {
  flex: none; font-size: 10px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--accent); display: flex; align-items: center; gap: var(--s2);
}
.lb-label::before { content: '🏆'; font-size: 12px; }
.lb-label[hidden] { display: none; }
.lb-items { display: flex; gap: var(--s4); overflow-x: auto; scrollbar-width: none; flex: 1; }
.lb-items::-webkit-scrollbar { display: none; }
/* 칩 형태: 키워드 + 검색량만 (순위 없음) */
.lb-chip { font-size: 12px; padding: var(--s2) var(--s6); display: inline-flex; align-items: baseline; gap: var(--s3); flex: none; }
.lb-chip .v { font-size: 10px; font-weight: 500; color: var(--accent); font-variant-numeric: tabular-nums; }
.lb-chip[aria-selected="true"] .v { color: inherit; }
.lb-note { font-size: 12px; font-weight: 300; color: var(--text); }
.lb-links { display: flex; gap: var(--s6); margin-left: auto; flex: none; }
.lb-links[hidden] { display: none; }
.sub-label { display: none; }

/* ── 팝업 내 믹스 재료 추천 ── */
.recs { border-top: 1px solid var(--border); padding-top: var(--s6); }
.recs-label { font-size: 12px; font-weight: 500; color: var(--text-strong); }
.recs-sub { font-size: 11px; font-weight: 300; color: var(--subdued); margin: 2px 0 var(--s5); }
.recs-chips { display: flex; gap: var(--s2); margin-bottom: var(--s5); }
.recs-chips .chip { font-size: 11px; padding: 2px var(--s5); }
.recs-chips .chip[aria-selected="true"] { color: var(--bg); background: var(--accent); border-color: var(--accent); }
.recs-empty { font-size: 11px; color: var(--subdued); padding: var(--s4) 0; }
.recs-row { display: flex; gap: var(--s4); overflow-x: auto; padding-bottom: var(--s2); scrollbar-width: thin; }
.rec {
  appearance: none; padding: 0; cursor: pointer; position: relative;
  width: 74px; aspect-ratio: 9 / 16; flex: none;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg);
  overflow: hidden;
}
.rec:hover { border-color: var(--accent); }
.rec img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rec .v {
  position: absolute; left: 4px; bottom: 4px; color: #fff;
  font-size: 10px; font-weight: 500; text-shadow: 0 1px 4px rgba(0, 0, 0, 0.7);
}

/* ── 관심 영상 필터 ── */
.taste-filters { display: flex; gap: var(--s4); margin-bottom: var(--s7); }
.taste-filters .chip { font-size: 12px; padding: var(--s2) var(--s6); }

/* ── 크리에이터 패널 ── */
.cr-actions { display: flex; gap: var(--s2); flex: none; }
.cr-actions a, .cr-actions button {
  appearance: none; text-decoration: none; cursor: pointer;
  font-family: var(--font); font-size: 11px; font-weight: 400;
  color: var(--text); background: none; border: 1px solid var(--border);
  border-radius: var(--r-md); padding: 3px var(--s5);
}
.cr-actions a:hover, .cr-actions button:hover { color: var(--text-strong); border-color: var(--accent); }
.cr-stats { flex: none; font-size: 11px; color: var(--subdued); font-variant-numeric: tabular-nums; }

/* ── 정보(사업자) 모달 ── */
.biz { margin: var(--s2) 0 0; display: grid; grid-template-columns: auto 1fr; gap: var(--s2) var(--s7); }
.biz dt { font-size: 11px; font-weight: 400; color: var(--subdued); }
.biz dd { margin: 0; font-size: 12px; font-weight: 400; color: var(--text); }
.biz-links { display: flex; gap: var(--s4); margin-top: var(--s8); flex-wrap: wrap; }
.biz-links button {
  appearance: none; cursor: pointer; font-family: var(--font);
  font-size: 12px; font-weight: 400; color: var(--text);
  background: none; border: 1px solid var(--border); border-radius: var(--r-md);
  padding: var(--s2) var(--s6);
}
.biz-links button:hover { color: var(--text-strong); border-color: var(--accent); }
.foot-link {
  appearance: none; cursor: pointer; background: none; border: none; padding: 0;
  font-family: var(--font); font-size: 11px; font-weight: 400; color: var(--subdued);
  text-decoration: underline; text-underline-offset: 2px;
}
.foot-link:hover { color: var(--text); }

/* ── 저장 크리에이터 · 관심 영상 모달 여백 ── */
.modal.taste { padding: var(--s9); }
.modal.taste .mtitle { margin-bottom: var(--s2); }
.modal.taste .taste-sub { margin: var(--s2) 0 var(--s7); }
#crEmailNote { margin-top: var(--s5); }

/* ── 검색량 랭킹 ── */
.sub-row .chips-inner { justify-content: flex-start; }
.rank-link {
  appearance: none; cursor: pointer; background: none; border: none; padding: var(--s2) 0;
  flex: none; white-space: nowrap;
  font-family: var(--font); font-size: 11px; font-weight: 500; color: var(--accent);
}
.rank-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.modal.rank { width: min(520px, 100%); }
.rank-list { display: flex; flex-direction: column; gap: var(--s4); }
.rank-row { display: grid; grid-template-columns: 20px minmax(72px, auto) 1fr 58px; align-items: center; gap: var(--s6); }
.rank-n { font-size: 12px; font-weight: 600; color: var(--accent); font-variant-numeric: tabular-nums; }
.rank-kw { font-size: 14px; font-weight: 400; color: var(--text-strong); white-space: nowrap; }
.rank-bar { height: 6px; background: var(--surface-2); border-radius: 100px; overflow: hidden; }
.rank-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent-strong), var(--accent)); border-radius: 100px; transition: width 0.6s cubic-bezier(0.2, 0.7, 0.3, 1); }
.rank-vol { font-size: 12px; font-weight: 500; color: var(--text); text-align: right; font-variant-numeric: tabular-nums; }
.rank-srcs { display: flex; gap: var(--s2); margin-top: var(--s7); }
.rank-srcs span {
  font-size: 10px; font-weight: 400; letter-spacing: 0.04em; color: var(--subdued);
  border: 1px solid var(--border); border-radius: 100px; padding: 2px var(--s5);
}
/* 크리에이터 랭킹 행 */
.crr-row {
  display: grid; grid-template-columns: 20px 1fr auto; grid-template-areas: 'n name subs' 'n meta actions';
  align-items: center; column-gap: var(--s6); row-gap: 2px;
  padding: var(--s5) 0; border-bottom: 1px solid var(--border);
}
.crr-row:last-child { border-bottom: none; }
.crr-row .rank-n { grid-area: n; }
.crr-name { grid-area: name; font-size: 14px; font-weight: 500; color: var(--text-strong); }
.crr-name i { font-style: normal; font-size: 11px; font-weight: 300; color: var(--subdued); }
.crr-subs { grid-area: subs; font-size: 13px; font-weight: 600; color: var(--accent); font-variant-numeric: tabular-nums; text-align: right; }
.crr-meta { grid-area: meta; font-size: 11px; font-weight: 300; color: var(--subdued); font-variant-numeric: tabular-nums; }
.crr-row .cr-actions { grid-area: actions; justify-self: end; }
.prof-sns { color: var(--accent); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.prof-sns:hover { text-decoration: underline; text-underline-offset: 2px; }
.sns-chip {
  display: inline-flex; align-items: center; text-decoration: none;
  font-size: 12px; font-weight: 500; color: var(--accent);
  border: 1px solid var(--accent); border-radius: 100px; padding: 2px var(--s6);
  transition: background 0.2s ease, transform 0.16s ease;
}
.sns-chip:hover { background: color-mix(in srgb, var(--accent) 12%, transparent); transform: translateY(-1px); }

/* ── 내 정보 (여백 리듬) ── */
.modal.profile { padding: var(--s10) var(--s10) var(--s9); width: min(460px, 100%); }
.modal.profile .mtitle { margin-bottom: var(--s8); }
.biz.prof { grid-template-columns: 90px 1fr; gap: var(--s6) var(--s8); align-items: center; }
.biz.prof dt { font-size: 12px; }
.biz.prof dd { font-size: 14px; color: var(--text-strong); display: flex; align-items: center; gap: var(--s4); min-height: 24px; }
.prof-links { margin-top: var(--s9); padding-top: var(--s8); border-top: 1px solid var(--border); }
.code-mask { cursor: pointer; user-select: none; font-variant-numeric: tabular-nums; letter-spacing: 0.06em; }
.code-mask.shown { user-select: text; color: var(--text-strong); }

/* ── 가격 (중앙 강조) ── */
.modal.pricing { display: block; width: min(780px, 100%); }
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s6); margin-top: var(--s8); align-items: stretch; }
.plan {
  position: relative; display: flex; flex-direction: column; gap: var(--s5);
  background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-xl);
  padding: var(--s9) var(--s8);
}
.plan.featured {
  background: var(--surface); border-color: var(--accent);
  box-shadow: var(--shadow-md); transform: scale(1.04); z-index: 1;
}
.plan.selected { border-color: var(--accent); background: var(--surface); box-shadow: 0 0 0 1px var(--accent), var(--shadow-md); }
.plan-badge {
  position: absolute; top: -11px; left: 50%; transform: translateX(-50%);
  font-size: 10px; font-weight: 600; letter-spacing: 0.08em; white-space: nowrap;
  color: #fff; background: var(--accent-strong); border-radius: 100px; padding: 3px var(--s6);
}
.plan-name { font-size: 13px; font-weight: 500; color: var(--subdued); display: flex; align-items: center; gap: var(--s4); }
.sale-badge {
  font-size: 9px; font-weight: 700; letter-spacing: 0.05em;
  color: #ff8f6b; border: 1px solid color-mix(in srgb, #ff8f6b 55%, transparent);
  border-radius: 100px; padding: 1px var(--s4);
}
.plan-price { font-size: 26px; font-weight: 600; color: var(--text-strong); letter-spacing: -0.02em; }
.plan-price span { font-size: 12px; font-weight: 300; color: var(--subdued); margin-left: 2px; }
.plan-was { font-size: 14px; font-weight: 400; color: var(--subdued); margin-right: var(--s2); text-decoration-thickness: 1px; }
.plan-feats { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: var(--s3); flex: 1; }
.plan-feats li { font-size: 12px; font-weight: 300; color: var(--text); padding-left: var(--s6); position: relative; line-height: 1.5; }
.plan-feats li::before { content: '✓'; position: absolute; left: 0; color: var(--accent); font-weight: 600; }
.plan.featured .plan-feats li { color: var(--text-strong); }
.plan-cta { width: 100%; margin-top: var(--s5); }
.plan-cta:disabled { opacity: 0.45; cursor: default; }
@media (max-width: 640px) { .plans { grid-template-columns: 1fr; } .plan.featured { transform: none; } }

/* ── 문의하기 ── */
.modal.inquiry { width: min(480px, 100%); }
#inqText {
  width: 100%; margin: var(--s6) 0 var(--s4); resize: vertical;
  font-family: var(--font); font-size: 14px; font-weight: 300; line-height: 1.6;
  color: var(--text-strong); background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: var(--s6) var(--s7);
}
#inqText:focus { outline: 1px solid var(--accent); outline-offset: -1px; border-color: var(--accent); }

/* ── 평가 팝업 (+10분) ── */
.modal.rate-prompt { display: flex; flex-direction: column; width: min(560px, 100%); gap: var(--s5); }
.rp-list { display: flex; flex-direction: column; gap: var(--s4); overflow-y: auto; }
.rp-item {
  display: flex; align-items: center; gap: var(--s6);
  background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-lg);
  padding: var(--s5) var(--s6);
}
.rp-item img { width: 38px; height: 66px; object-fit: cover; border-radius: var(--r-sm); flex: none; }
.rp-item .t {
  flex: 1; min-width: 0; font-size: 13px; font-weight: 400; color: var(--text-strong);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.rp-rates { display: flex; gap: var(--s2); flex: none; }
.rp-rates .chip { font-size: 11px; padding: var(--s2) var(--s5); }
.rp-rates .chip[aria-selected="true"] { color: var(--bg); background: var(--accent); border-color: var(--accent); }
.rp-granted { margin: var(--s2) 0 0; font-size: 14px; font-weight: 500; color: var(--accent); text-align: center; }
.pw-rate {
  appearance: none; cursor: pointer; width: 100%;
  font-family: var(--font); font-size: 14px; font-weight: 500; color: var(--accent);
  background: none; border: 1px solid var(--accent); border-radius: var(--r-lg);
  padding: var(--s5) var(--s7);
}
.pw-rate:hover { background: color-mix(in srgb, var(--accent) 10%, transparent); }

/* ── Footer ── */
.foot { border-top: 1px solid var(--border); }
.foot-inner {
  max-width: var(--wrap); margin: 0 auto; padding: var(--s8) var(--s9) var(--s11);
  font-size: 11px; font-weight: 300; line-height: 15.95px; color: var(--subdued);
}

/* ── 모바일 레이아웃 ── */
@media (max-width: 720px) {
  .top-inner { flex-wrap: wrap; row-gap: var(--s5); padding: var(--s5) var(--s7); gap: var(--s6); }
  .brand { order: 1; font-size: 20px; }
  .nav-actions { order: 2; margin-left: auto; }
  #search { order: 3; flex-basis: 100%; max-width: none; }
  .pill { font-size: 10px; padding: 3px var(--s4); }
  .chips-inner { padding-left: var(--s7); padding-right: var(--s7); }
  .gallery-wrap { padding: var(--s7); }
  .gallery { gap: var(--s6); grid-template-columns: repeat(2, 1fr); }
  .overlay { padding: var(--s5); align-items: end; }
  .modal { flex-direction: column; align-items: center; max-height: 92vh; border-radius: var(--r-xl) var(--r-xl) 0 0; padding: var(--s8) var(--s7); }
  .overlay > .modal { animation: sheetIn 0.32s cubic-bezier(0.2, 0.8, 0.3, 1); }
  .mplayer { width: min(280px, 72vw); }
  .minfo { padding-top: 0; width: 100%; }
  .mtitle { font-size: 19px; }
  .modal.profile, .modal.pricing, .modal.rank { width: 100%; }
  .plans { grid-template-columns: 1fr; gap: var(--s7); }
  .plan.featured { transform: none; }
  .rank-row { grid-template-columns: 18px minmax(60px, auto) 1fr 52px; gap: var(--s4); }
  .auth-gate { padding: var(--s7); }
  .foot-inner { padding-left: var(--s7); padding-right: var(--s7); }
}
@keyframes sheetIn { from { opacity: 0; transform: translateY(28px); } }
