/* BLACK FRIDAY 라이브 데모 — ClickMate 결 · 화이트 글래스 + 도파민 컬러
   모바일 세로 9:16 기준. 영상 위 UI 는 전부 반투명 흰 유리, 포인트만 도파민 컬러. */

:root {
  --ink: #111114;
  --ink-2: rgba(17, 17, 20, .62);
  --ink-3: rgba(17, 17, 20, .40);
  --paper: #ffffff;
  --line: rgba(17, 17, 20, .08);
  --glass: rgba(255, 255, 255, .88);
  --glass-2: rgba(255, 255, 255, .74);
  --pink: #FF2E93;
  --lime: #C6FF3D;
  --blue: #3D5CFF;
  --orange: #FF7A1A;
  --purple: #8A3DFF;
  --yellow: #FFD60A;
  --font: 'Pretendard Variable', Pretendard, -apple-system, BlinkMacSystemFont, system-ui, 'Apple SD Gothic Neo', 'Noto Sans KR', sans-serif;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --blur: blur(14px) saturate(160%);
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  overscroll-behavior: none;
  -webkit-tap-highlight-color: transparent;
}
button, input { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
img { display: block; }
.hidden { display: none !important; }
svg { width: 18px; height: 18px; flex: none; }

/* ---------- 워드마크 ---------- */
.wordmark {
  font-weight: 900; letter-spacing: -.04em; line-height: .92; text-transform: uppercase; font-style: italic;
}
.wordmark em { font-style: italic; color: var(--pink); }

/* ---------- 공용 버튼 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 50px; padding: 0 20px; border-radius: 14px; font-weight: 800; font-size: 15px;
  transition: transform .08s ease, opacity .15s ease;
}
.btn:active { transform: scale(.97); }
.btn[disabled] { opacity: .4; cursor: default; }
.btn-ink { background: var(--ink); color: #fff; }
.btn-lime { background: var(--lime); color: var(--ink); }
.btn-pink { background: var(--pink); color: #fff; }
.btn-ghost { background: rgba(17,17,20,.06); color: var(--ink); }
.btn-sm { height: 34px; padding: 0 12px; border-radius: 10px; font-size: 13px; }

/* ---------- 로그인 ---------- */
.login {
  position: relative; min-height: 100dvh; overflow: hidden;
  padding: calc(28px + var(--safe-top)) 22px calc(28px + var(--safe-bottom));
  max-width: 440px; margin: 0 auto;
}
.blob { position: absolute; border-radius: 50%; filter: blur(60px); opacity: .55; pointer-events: none; }
.blob.pink { width: 280px; height: 280px; background: var(--pink); top: -90px; right: -80px; }
.blob.lime { width: 260px; height: 260px; background: var(--lime); bottom: 120px; left: -110px; }
.blob.blue { width: 200px; height: 200px; background: var(--blue); bottom: -80px; right: -40px; opacity: .35; }
.login > * { position: relative; }
.login .wordmark { font-size: 54px; margin: 0; }
.login .slogan { margin: 14px 0 0; font-size: 17px; font-weight: 900; letter-spacing: -.02em; line-height: 1.25; }
.login .slogan span { font-weight: 600; color: var(--ink-2); font-size: 13px; }
.login .tag { display: inline-flex; align-items: center; gap: 6px; margin: 6px 0 16px; font-size: 12.5px; font-weight: 700; color: var(--ink-2); }
.login .tag i { width: 8px; height: 8px; border-radius: 50%; background: var(--pink); display: inline-block; }
/* 이미지 프레임 규칙: 프레임 비율 = 이미지 비율(16:9), 잘리지 않음. 여백이 생겨도 배경색 = 이미지 배경색 */
.hero-card {
  position: relative; aspect-ratio: 16 / 9; border-radius: 22px; overflow: hidden; margin-bottom: 22px;
  background: #E04776; box-shadow: 0 18px 40px -20px rgba(17,17,20,.45);
}
.hero-card img { width: 100%; height: 100%; object-fit: contain; }
.hero-card .chip {
  position: absolute; left: 12px; bottom: 12px;
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--glass); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur);
  border-radius: 999px; padding: 7px 12px 7px 8px; font-size: 12px; font-weight: 800;
}
.hero-card .chip b { background: var(--pink); color: #fff; border-radius: 999px; padding: 3px 8px; font-size: 10px; letter-spacing: .06em; }
.field { margin-bottom: 10px; }
.field label { display: block; font-size: 12px; font-weight: 600; color: var(--ink-2); margin: 0 0 6px 4px; }
.field input {
  width: 100%; height: 50px; padding: 0 16px; border-radius: 14px;
  background: #f4f4f6; border: 1.5px solid transparent; outline: none; color: var(--ink); font-size: 16px;
}
.field input:focus { border-color: var(--ink); background: #fff; }
.form-error { min-height: 18px; color: var(--pink); font-size: 12px; font-weight: 600; margin: 4px 4px 10px; }
.btn-primary { width: 100%; }
.continue {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  background: #f4f4f6; border-radius: 14px; padding: 12px 14px; margin-bottom: 14px;
}
.continue b { font-weight: 800; }
.continue small { color: var(--ink-2); display: block; font-size: 12px; }
.continue .btn { height: 36px; padding: 0 12px; border-radius: 10px; font-size: 13px; }
.demo-accounts { margin-top: 22px; border-top: 1px solid var(--line); padding-top: 12px; }
.demo-accounts > button { color: var(--ink-2); font-size: 13px; font-weight: 600; }
.demo-accounts .grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.demo-accounts .grid button {
  text-align: left; padding: 10px 12px; border-radius: 12px; background: #f4f4f6; font-size: 13px; font-weight: 700;
}
.demo-accounts .grid button b { display: block; font-size: 11px; color: var(--ink-3); font-weight: 600; margin-bottom: 2px; }
.demo-accounts .grid button.host { background: rgba(255,46,147,.10); }

/* ---------- 스테이지 ---------- */
.stage { position: fixed; inset: 0; overflow: hidden; background: #111; }
.stage video, .stage .poster-img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: #111;
}
.stage .poster-img { object-fit: contain; background: transparent; }
.stage .poster-bg { position: absolute; inset: -6%; width: 112%; height: 112%; object-fit: cover; filter: blur(28px) saturate(1.1); }
.stage video.mirror { transform: scaleX(-1); }
.poster { position: absolute; inset: 0; }
.poster .poster-img { filter: saturate(1.05); }
.poster::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(0,0,0,.25), rgba(0,0,0,0) 30%, rgba(0,0,0,0) 60%, rgba(0,0,0,.45)); }
.poster .card {
  position: absolute; left: 20px; right: 20px; top: 50%; transform: translateY(-50%);
  background: var(--glass); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur);
  border-radius: 22px; padding: 20px 18px; text-align: center;
}
.poster .card .eyebrow { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 800; letter-spacing: .1em; color: var(--pink); text-transform: uppercase; }
.poster .card .eyebrow i { width: 7px; height: 7px; border-radius: 50%; background: var(--pink); animation: blink 1.2s infinite; }
.poster .card h2 { margin: 8px 0 4px; font-size: 20px; font-weight: 900; letter-spacing: -.02em; line-height: 1.25; }
.poster .card p { margin: 0 0 14px; color: var(--ink-2); font-size: 13px; }
.poster .card .btn { width: 100%; height: 46px; }
.poster .card .btn.on { background: var(--ink); color: #fff; }

.glass {
  background: var(--glass); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur);
  border-radius: 999px; color: var(--ink);
}

/* 상단 */
.topbar {
  position: absolute; left: 0; right: 0; top: 0; z-index: 5;
  padding: calc(10px + var(--safe-top)) 12px 0;
  display: flex; align-items: center; gap: 8px;
}
.who { display: flex; align-items: center; gap: 8px; min-width: 0; flex: 1; padding: 4px 12px 4px 4px; }
.avatar { width: 34px; height: 34px; border-radius: 50%; flex: none; overflow: hidden; background: var(--lime); display: flex; align-items: center; justify-content: center; font-weight: 900; font-size: 14px; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.who .t { min-width: 0; line-height: 1.15; }
.who .title { font-size: 12.5px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.who .sub { font-size: 11px; color: var(--ink-2); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.icon-btn { width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex: none; }
.statbar {
  position: absolute; left: 12px; right: 12px; top: calc(56px + var(--safe-top)); z-index: 5;
  display: flex; align-items: center; gap: 6px;
}
.badge {
  display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 10px; border-radius: 999px;
  font-size: 11px; font-weight: 900; letter-spacing: .06em; background: var(--glass-2); color: var(--ink);
  backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur);
}
.badge.live { background: var(--pink); color: #fff; }
.badge.live::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: #fff; animation: blink 1.2s infinite; }
@keyframes blink { 50% { opacity: .25; } }
.stat { display: inline-flex; align-items: center; gap: 4px; height: 26px; padding: 0 10px; font-size: 12px; font-weight: 800; }
.stat svg { width: 14px; height: 14px; }
.stat.timer { font-variant-numeric: tabular-nums; }

/* 공지 */
.notice-bar {
  position: absolute; left: 12px; right: 12px; top: calc(92px + var(--safe-top)); z-index: 5;
  display: flex; align-items: center; gap: 8px; padding: 6px 12px 6px 6px; border-radius: 14px; font-size: 12.5px; font-weight: 600;
  background: var(--glass); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur);
}
.notice-bar b { flex: none; background: var(--lime); color: var(--ink); border-radius: 8px; padding: 3px 7px; font-size: 10.5px; font-weight: 900; letter-spacing: .04em; }
.notice-bar span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* 하단 */
.bottom {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 6;
  padding: 0 12px calc(10px + var(--safe-bottom));
  display: flex; flex-direction: column; gap: 8px;
}
.bottom::before { content: ''; position: absolute; inset: -60px 0 0; background: linear-gradient(to top, rgba(0,0,0,.35), rgba(0,0,0,0)); pointer-events: none; z-index: -1; }
.row { display: flex; align-items: flex-end; gap: 10px; }
.row .grow { flex: 1; min-width: 0; }
.side { display: flex; flex-direction: column; align-items: center; gap: 10px; flex: none; }
.side .fab { width: 50px; height: 50px; border-radius: 50%; display: flex; align-items: center; justify-content: center; position: relative; }
.side .fab svg { width: 24px; height: 24px; }
.side .fab.like svg { color: var(--pink); }
.side .fab.like:active { transform: scale(.9); }
.side .fab .dot { position: absolute; top: -2px; right: -2px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--ink); color: #fff; font-size: 10px; font-weight: 900; display: flex; align-items: center; justify-content: center; }
.side .cnt { font-size: 11px; font-weight: 800; margin-top: -4px; padding: 3px 8px; }

/* 채팅 */
.chat-list {
  list-style: none; margin: 0; padding: 0 0 2px;
  max-height: 30vh; overflow-y: auto; overscroll-behavior: contain;
  display: flex; flex-direction: column; gap: 5px;
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 16%);
  mask-image: linear-gradient(to bottom, transparent, #000 16%);
  scrollbar-width: none;
}
.chat-list::-webkit-scrollbar { display: none; }
.chat-list li {
  align-self: flex-start; max-width: 92%;
  background: var(--glass-2); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur);
  border-radius: 14px; padding: 6px 11px; font-size: 13px; word-break: break-word; line-height: 1.35;
}
.chat-list li b { font-weight: 800; margin-right: 6px; }
.chat-list li.host b::before { content: '셀러'; font-size: 9.5px; background: var(--pink); color: #fff; border-radius: 5px; padding: 1px 5px; margin-right: 5px; vertical-align: 1px; letter-spacing: .04em; }
.chat-list li.system { background: rgba(17,17,20,.35); color: #fff; font-size: 12px; font-weight: 600; padding: 5px 10px; }
.chat-list li.buy { background: var(--lime); color: var(--ink); font-weight: 800; }
.chat-list li.buy::before { content: '🛍️ '; }

.chat-form { display: flex; gap: 8px; align-items: center; }
.chat-form input {
  flex: 1; height: 44px; padding: 0 16px; border-radius: 999px; min-width: 0;
  background: var(--glass); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur);
  border: 0; outline: none; color: var(--ink); font-size: 16px; font-weight: 600;
}
.chat-form input::placeholder { color: var(--ink-3); font-weight: 500; }
.chat-form button { width: 44px; height: 44px; border-radius: 50%; background: var(--ink); color: #fff; display: flex; align-items: center; justify-content: center; flex: none; }

/* 상품 미니카드 */
.pcard {
  display: flex; align-items: center; gap: 10px; padding: 6px 10px 6px 6px; border-radius: 16px; max-width: 78%;
  background: var(--glass); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur);
}
.pcard img { width: 50px; height: 50px; border-radius: 11px; object-fit: cover; flex: none; background: #f0f0f2; }
.pcard .info { min-width: 0; flex: 1; }
.pcard .name { font-size: 12px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pcard .price { display: flex; align-items: baseline; gap: 5px; font-size: 13px; font-weight: 900; margin-top: 2px; }
.pcard .price em { font-style: normal; color: var(--pink); }
.pcard .price s { color: var(--ink-3); font-weight: 500; font-size: 11px; }
.pcard .buy { flex: none; height: 32px; padding: 0 12px; border-radius: 10px; background: var(--ink); color: #fff; font-size: 12px; font-weight: 800; }
.pcard .pin-tag { flex: none; font-size: 10px; font-weight: 900; color: var(--pink); }

/* 하트 */
.hearts { position: absolute; right: 22px; bottom: calc(150px + var(--safe-bottom)); width: 60px; height: 320px; pointer-events: none; z-index: 5; }
.hearts svg { position: absolute; bottom: 0; left: 18px; width: 26px; height: 26px; animation: rise 1.6s ease-out forwards; }
@keyframes rise {
  0% { transform: translate(0, 0) scale(.6); opacity: 0; }
  12% { opacity: 1; transform: translate(0, -20px) scale(1.1); }
  100% { transform: translate(var(--dx, 0px), -300px) scale(.8); opacity: 0; }
}

/* 소리/탭 오버레이 */
.unmute {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 7;
  display: inline-flex; align-items: center; gap: 8px; padding: 12px 18px; font-weight: 800; font-size: 14px;
}
.tap-overlay { position: absolute; inset: 0; z-index: 8; display: flex; align-items: center; justify-content: center; background: rgba(0,0,0,.5); color: #fff; font-weight: 800; font-size: 16px; }
.notice {
  position: absolute; left: 12px; right: 12px; top: calc(92px + var(--safe-top)); z-index: 7;
  display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 14px; font-size: 13px; font-weight: 600;
  background: var(--glass); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur);
}
.notice.warn { border-left: 4px solid var(--orange); }
.notice.err { border-left: 4px solid var(--pink); }
.notice .spin { width: 14px; height: 14px; border: 2px solid var(--line); border-top-color: var(--ink); border-radius: 50%; animation: spin .8s linear infinite; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }
.toast {
  position: absolute; left: 50%; bottom: calc(170px + var(--safe-bottom)); transform: translateX(-50%); z-index: 9;
  background: var(--ink); color: #fff; border-radius: 999px; padding: 10px 16px; font-size: 13px; font-weight: 700; white-space: nowrap;
  opacity: 0; transition: opacity .25s ease; pointer-events: none;
}
.toast.show { opacity: 1; }
.conn { position: absolute; left: 50%; transform: translateX(-50%); top: calc(130px + var(--safe-top)); z-index: 7; font-size: 11px; font-weight: 800; padding: 5px 10px; background: var(--orange); color: #fff; border-radius: 999px; }

/* 셀러 컨트롤 */
.controls { display: flex; align-items: center; gap: 8px; }
.controls .round { width: 46px; height: 46px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex: none; position: relative; }
.controls .round svg { width: 20px; height: 20px; }
.controls .round.off { background: var(--pink); color: #fff; }
.controls .round .lbl { position: absolute; bottom: -14px; font-size: 9.5px; font-weight: 800; color: #fff; text-shadow: 0 1px 4px rgba(0,0,0,.6); white-space: nowrap; }
.controls .btn { flex: 1; height: 46px; border-radius: 999px; }

/* 바텀시트 */
.sheet-bg { position: absolute; inset: 0; z-index: 20; background: rgba(0,0,0,.35); }
.sheet {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 21; max-height: 78%; display: flex; flex-direction: column;
  background: var(--paper); border-radius: 24px 24px 0 0; padding: 8px 0 calc(12px + var(--safe-bottom));
  transform: translateY(100%); transition: transform .28s cubic-bezier(.2,.8,.2,1);
}
.sheet.open { transform: translateY(0); }
.sheet .handle { width: 40px; height: 4px; border-radius: 2px; background: rgba(17,17,20,.15); margin: 4px auto 10px; }
.sheet .head { display: flex; align-items: center; justify-content: space-between; padding: 0 18px 10px; }
.sheet .head h3 { margin: 0; font-size: 16px; font-weight: 900; }
.sheet .head h3 span { color: var(--pink); margin-left: 4px; }
.sheet .list { overflow-y: auto; padding: 0 12px; display: flex; flex-direction: column; gap: 6px; }
.prow { display: flex; align-items: center; gap: 12px; padding: 8px; border-radius: 16px; background: #f6f6f8; }
.prow.pinned { background: rgba(255,46,147,.08); box-shadow: inset 0 0 0 1.5px var(--pink); }
.prow img { width: 64px; height: 64px; border-radius: 12px; object-fit: cover; flex: none; background: #eee; }
.prow .info { flex: 1; min-width: 0; }
.prow .tag { display: inline-block; font-size: 10px; font-weight: 900; color: #fff; background: var(--purple); border-radius: 6px; padding: 2px 6px; margin-bottom: 3px; }
.prow .tag.pin { background: var(--pink); }
.prow .name { font-size: 13px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.prow .price { display: flex; align-items: baseline; gap: 6px; font-size: 15px; font-weight: 900; margin-top: 3px; }
.prow .price em { font-style: normal; color: var(--pink); }
.prow .price s { color: var(--ink-3); font-weight: 500; font-size: 12px; }
.prow .act { flex: none; height: 36px; padding: 0 12px; border-radius: 10px; background: var(--ink); color: #fff; font-size: 12px; font-weight: 800; }
.prow .act.alt { background: var(--lime); color: var(--ink); }
.sheet .field { padding: 0 18px; }
.sheet .actions { display: flex; gap: 8px; padding: 6px 18px 0; }
.sheet .actions .btn { flex: 1; height: 46px; }
