* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --ink: #0f0f10;
  --grey: #86868b;
  --line: #ececec;
  --bg: #ffffff;
  --accent: #0f0f10;
  --point: #16a34a; /* 적립/판매 포인트 그린 */
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Archivo', 'Noto Sans KR', sans-serif;
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}
a { text-decoration: none; color: inherit; }
button { font-family: inherit; background: none; border: none; cursor: pointer; color: inherit; }

/* ── 헤더 ──────────────────────────────── */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.88);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  max-width: 1500px;
  margin: 0 auto;
  padding: 0 28px;
  height: 62px;
}
.logo { font-size: 22px; font-weight: 900; letter-spacing: 0.02em; }
.logo span { color: transparent; -webkit-text-stroke: 1.3px var(--ink); }
.header-tag { font-size: 11px; letter-spacing: 0.24em; color: var(--grey); }
.header-actions { display: flex; align-items: center; gap: 12px; }
.myshop-btn {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  padding: 9px 18px;
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  transition: all 0.2s;
}
.myshop-btn:hover { background: var(--ink); color: #fff; }
.icon-btn { position: relative; width: 36px; height: 36px; display: grid; place-items: center; }
.icon-btn svg { width: 21px; height: 21px; }
.cart-count {
  position: absolute;
  top: 0; right: -2px;
  min-width: 16px; height: 16px;
  background: var(--ink);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  border-radius: 999px;
  display: grid;
  place-items: center;
  padding: 0 4px;
}

/* ── 인트로 ────────────────────────────── */
.intro { text-align: center; padding: 76px 24px 40px; }
.intro h1 {
  font-size: clamp(38px, 6.5vw, 84px);
  font-weight: 900;
  line-height: 1.0;
  letter-spacing: -0.01em;
  margin-bottom: 22px;
}
.intro h1 em { font-style: normal; color: transparent; -webkit-text-stroke: 1.6px var(--ink); }
.intro p { font-size: 14.5px; color: var(--grey); line-height: 1.8; margin-bottom: 26px; }
.intro-scroll { font-size: 11px; letter-spacing: 0.3em; color: var(--grey); }

/* ── 메인 레이아웃 ─────────────────────── */
.main {
  display: grid;
  grid-template-columns: 1fr;
  max-width: 1500px;
  margin: 0 auto;
  gap: 30px;
  padding: 10px 16px 90px;
}
@media (min-width: 1100px) {
  .main { grid-template-columns: minmax(0, 1fr) 360px; padding: 10px 32px 110px; }
}

/* ── 피드 (카드형 스냅) ─────────────────── */
.feed {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 26px;
}
.look-card {
  position: relative;
  width: min(440px, 92vw);
  scroll-margin-top: 90px;
  border-radius: 22px;
  overflow: hidden;
  background: #f4f4f2;
  box-shadow: 0 6px 26px rgba(15,15,16,0.10);
}
.look-media { position: relative; aspect-ratio: 2 / 3; }
.look-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.35s ease;
}
.look-media img.on { opacity: 1; }

/* 체형 변형 스위치 */
.variant-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px; height: 40px;
  border-radius: 50%;
  background: rgba(255,255,255,0.88);
  box-shadow: 0 3px 10px rgba(0,0,0,0.14);
  display: grid;
  place-items: center;
  z-index: 2;
  transition: transform 0.2s;
}
.variant-nav:hover { transform: translateY(-50%) scale(1.1); }
.variant-nav svg { width: 17px; height: 17px; }
.variant-nav--l { left: 10px; }
.variant-nav--r { right: 10px; }
.variant-dots {
  position: absolute;
  top: 14px; left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 5px;
  z-index: 2;
}
.vdot { width: 6px; height: 6px; border-radius: 50%; background: rgba(255,255,255,0.5); }
.vdot--on { background: #fff; }

.body-chip {
  position: absolute;
  top: 14px; left: 14px;
  z-index: 2;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  background: rgba(15,15,16,0.72);
  color: #fff;
  padding: 7px 12px;
  border-radius: 999px;
  backdrop-filter: blur(4px);
}
.sold-chip {
  position: absolute;
  top: 14px; right: 14px;
  z-index: 2;
  font-size: 10.5px;
  font-weight: 700;
  background: rgba(255,255,255,0.9);
  color: var(--point);
  padding: 7px 11px;
  border-radius: 999px;
}

/* 하단 오버레이 */
.look-overlay {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  z-index: 2;
  padding: 46px 16px 16px;
  background: linear-gradient(to top, rgba(0,0,0,0.66), rgba(0,0,0,0) 92%);
  color: #fff;
}
.look-creator { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; margin-bottom: 4px; }
.creator-avatar {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: #fff;
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
  display: grid;
  place-items: center;
}
.look-tags { font-size: 11.5px; color: #ddd; margin-bottom: 12px; }
.look-cta {
  display: flex;
  align-items: center;
  gap: 8px;
}
.look-buy {
  flex: 1;
  background: #fff;
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.04em;
  padding: 13px 0;
  border-radius: 12px;
  transition: transform 0.2s;
}
.look-buy:hover { transform: scale(1.02); }
.look-items-btn {
  background: rgba(255,255,255,0.18);
  border: 1px solid rgba(255,255,255,0.5);
  color: #fff;
  font-size: 11.5px;
  font-weight: 600;
  padding: 13px 14px;
  border-radius: 12px;
  backdrop-filter: blur(4px);
}

/* 카드 사이 타이포 인터루드 */
.interlude {
  width: min(440px, 92vw);
  text-align: center;
  padding: 26px 0 6px;
  font-size: clamp(22px, 3.2vw, 34px);
  font-weight: 900;
  letter-spacing: 0.01em;
  color: transparent;
  -webkit-text-stroke: 1.2px #d9d9d6;
  user-select: none;
}

/* ── PC 사이드 패널 ─────────────────────── */
.side { display: none; }
@media (min-width: 1100px) {
  .side { display: block; }
  .side-inner {
    position: sticky;
    top: 86px;
    border: 1px solid var(--line);
    border-radius: 20px;
    padding: 22px;
    background: #fff;
  }
}
.side-label { font-size: 10.5px; letter-spacing: 0.24em; color: var(--grey); margin-bottom: 14px; }
.side-creator { font-size: 15px; font-weight: 800; margin-bottom: 2px; }
.side-body { font-size: 12px; color: var(--grey); margin-bottom: 16px; }
.side-item { display: flex; gap: 11px; align-items: center; padding: 9px 0; border-top: 1px solid var(--line); }
.side-item img { width: 44px; height: 56px; object-fit: cover; border-radius: 8px; background: #f4f4f2; }
.side-item-name { font-size: 12px; font-weight: 600; line-height: 1.3; }
.side-item-price { font-size: 12px; color: var(--grey); }
.side-total { display: flex; justify-content: space-between; font-size: 13px; font-weight: 800; padding: 14px 0 4px; border-top: 1.5px solid var(--ink); margin-top: 6px; }

/* 핏 쌍둥이 미니 (사이드) */
.twin-mini { margin-top: 16px; background: #f7f7f5; border-radius: 14px; padding: 14px; }
.twin-mini-title { font-size: 11px; font-weight: 800; letter-spacing: 0.14em; margin-bottom: 9px; }
.twin-bar { display: flex; height: 8px; border-radius: 99px; overflow: hidden; margin-bottom: 7px; }
.twin-bar i { display: block; height: 100%; }
.twin-note { font-size: 11.5px; color: var(--grey); line-height: 1.5; }

/* ── 상세/장바구니 드로어 공통 ──────────── */
.drawer-dim {
  position: fixed; inset: 0;
  background: rgba(15,15,16,0.42);
  opacity: 0; pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 200;
}
.detail, .cart {
  position: fixed;
  top: 0; right: 0;
  width: min(420px, 94vw);
  height: 100%;
  background: #fff;
  z-index: 201;
  transform: translateX(105%);
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
  display: flex;
  flex-direction: column;
  box-shadow: -14px 0 44px rgba(15,15,16,0.16);
}
body.detail-open .detail, body.cart-open .cart { transform: none; }
body.detail-open #detailDim, body.cart-open #cartDim { opacity: 1; pointer-events: auto; }

.detail-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
}
.detail-head h3 { font-size: 14px; font-weight: 800; letter-spacing: 0.16em; }
.detail-body { flex: 1; overflow-y: auto; padding: 6px 20px 20px; }
.detail-foot { border-top: 1px solid var(--line); padding: 16px 20px 22px; }
.detail-total { display: flex; justify-content: space-between; align-items: baseline; font-size: 12.5px; color: var(--grey); margin-bottom: 12px; }
.detail-total strong { font-size: 19px; color: var(--ink); }
.detail-buy {
  width: 100%;
  background: var(--ink);
  color: #fff;
  font-size: 13.5px;
  font-weight: 800;
  letter-spacing: 0.06em;
  padding: 16px 0;
  border-radius: 13px;
  transition: opacity 0.2s;
}
.detail-buy:hover { opacity: 0.85; }

/* 상세 안 아이템 행 (제외 토글) */
.d-item { display: flex; gap: 13px; align-items: center; padding: 13px 0; border-bottom: 1px solid var(--line); }
.d-check {
  width: 22px; height: 22px;
  border: 1.6px solid var(--ink);
  border-radius: 7px;
  display: grid;
  place-items: center;
  flex: none;
  font-size: 13px;
  font-weight: 800;
  transition: all 0.15s;
}
.d-item.off .d-check { border-color: #ccc; color: transparent; }
.d-item img { width: 54px; height: 70px; object-fit: cover; border-radius: 9px; background: #f4f4f2; }
.d-item.off img, .d-item.off .d-info { opacity: 0.38; }
.d-info { flex: 1; min-width: 0; }
.d-name { font-size: 13px; font-weight: 600; line-height: 1.35; }
.d-brand { font-size: 10.5px; letter-spacing: 0.1em; color: var(--grey); margin: 2px 0 4px; }
.d-price { font-size: 13px; font-weight: 700; }
.d-own { font-size: 10.5px; color: var(--grey); }

/* 핏 쌍둥이 패널 (상세) */
.twin {
  margin-top: 16px;
  border: 1.5px solid var(--ink);
  border-radius: 16px;
  padding: 16px;
}
.twin-title { font-size: 12px; font-weight: 800; letter-spacing: 0.12em; margin-bottom: 4px; }
.twin-sub { font-size: 12px; color: var(--grey); margin-bottom: 12px; }
.twin-row { display: flex; align-items: center; gap: 9px; font-size: 12px; margin-bottom: 7px; }
.twin-row b { width: 26px; }
.twin-track { flex: 1; height: 9px; border-radius: 99px; background: #efefec; overflow: hidden; }
.twin-fill { height: 100%; background: var(--ink); border-radius: 99px; }
.twin-quote {
  margin-top: 10px;
  font-size: 12.5px;
  line-height: 1.55;
  background: #f7f7f5;
  border-radius: 10px;
  padding: 11px 13px;
}

/* ── 구매→미니숍 플로우 ─────────────────── */
.flow-dim {
  position: fixed; inset: 0;
  background: rgba(15,15,16,0.5);
  opacity: 0; pointer-events: none;
  transition: opacity 0.3s;
  z-index: 300;
}
.flow {
  position: fixed;
  top: 50%; left: 50%;
  transform: translate(-50%, -46%) scale(0.97);
  width: min(430px, 94vw);
  max-height: 88vh;
  overflow-y: auto;
  background: #fff;
  border-radius: 22px;
  padding: 30px 26px;
  z-index: 301;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s, transform 0.3s;
}
body.flow-open .flow { opacity: 1; pointer-events: auto; transform: translate(-50%, -50%) scale(1); }
body.flow-open .flow-dim { opacity: 1; pointer-events: auto; }

.flow-emoji { font-size: 40px; margin-bottom: 12px; }
.flow h3 { font-size: 21px; font-weight: 900; line-height: 1.25; margin-bottom: 8px; }
.flow p { font-size: 13.5px; color: var(--grey); line-height: 1.65; margin-bottom: 18px; }
.flow input {
  width: 100%;
  font-family: inherit;
  font-size: 14px;
  padding: 13px 15px;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  outline: none;
  margin-bottom: 10px;
}
.flow input:focus { border-color: var(--ink); }
.flow-btn {
  width: 100%;
  background: var(--ink);
  color: #fff;
  font-size: 13.5px;
  font-weight: 800;
  padding: 15px 0;
  border-radius: 12px;
  margin-top: 6px;
  transition: opacity 0.2s;
}
.flow-btn:hover { opacity: 0.85; }
.flow-btn--ghost { background: #fff; color: var(--ink); border: 1.5px solid var(--ink); }
.flow-close { position: absolute; top: 16px; right: 16px; }

/* 미니숍 카드 */
.shop-card {
  border: 1.5px solid var(--ink);
  border-radius: 18px;
  padding: 20px;
  margin-bottom: 14px;
}
.shop-handle { font-size: 17px; font-weight: 900; margin-bottom: 2px; }
.shop-comment { font-size: 12.5px; color: var(--grey); margin-bottom: 14px; }
.shop-link {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #f7f7f5;
  border-radius: 10px;
  padding: 10px 13px;
  font-size: 12px;
  margin-bottom: 14px;
  overflow: hidden;
  white-space: nowrap;
}
.shop-link code { flex: 1; overflow: hidden; text-overflow: ellipsis; font-family: inherit; }
.shop-link button { font-weight: 800; font-size: 11px; letter-spacing: 0.06em; flex: none; }
.shop-stats { display: flex; gap: 8px; }
.stat {
  flex: 1;
  background: #f7f7f5;
  border-radius: 12px;
  padding: 12px 8px;
  text-align: center;
}
.stat b { display: block; font-size: 17px; font-weight: 900; }
.stat.green b { color: var(--point); }
.stat span { font-size: 10.5px; color: var(--grey); letter-spacing: 0.06em; }

/* ── 토스트 / 푸터 ──────────────────────── */
.toast {
  position: fixed;
  left: 50%; bottom: 32px;
  transform: translate(-50%, 20px);
  background: var(--ink);
  color: #fff;
  font-size: 13px;
  padding: 13px 26px;
  border-radius: 999px;
  opacity: 0;
  pointer-events: none;
  transition: all 0.35s ease;
  z-index: 400;
}
.toast--show { opacity: 1; transform: translate(-50%, 0); }

.footer { border-top: 1px solid var(--line); text-align: center; padding: 44px 24px 52px; }
.footer-logo { font-size: 19px; font-weight: 900; margin-bottom: 8px; }
.footer-copy { font-size: 11.5px; color: var(--grey); margin-bottom: 12px; }
.footer-back { font-size: 12px; color: var(--grey); text-decoration: underline; }
