/* ==========================================================
   전후사진 게시판 스킨 (bnapic)
========================================================== */
.bna {
	--accent: #844ad7;
	--accent-deep: #5b2aa6;
	--ink: #121212;
	--text: #4b4b52;
	--muted: #8b8b94;
	--line: #e9e7ee;
	--soft: #f7f6f9;
	max-width: calc(var(--wrap, 1200px) + var(--gutter, 40px) * 2);
	margin: 0 auto;
	padding: clamp(40px, 6vw, 88px) var(--gutter, 20px) clamp(64px, 8vw, 120px);
	box-sizing: border-box;
	color: var(--ink);
	font-family: 'Pretendard Variable', Pretendard, sans-serif;
	font-size: 16px;
	line-height: 1.6;
	word-break: keep-all;
}
.bna :where(*, *:before, *:after) { box-sizing: border-box; }
.bna :where(ul, ol, dl, dd) { margin: 0; padding: 0; list-style: none; }
.bna :where(h1, h2, p) { margin: 0; }
.bna :where(a) { text-decoration: none; color: inherit; }
.bna img { display: block; max-width: 100%; }
.bna [hidden] { display: none !important; }

/* 머리말 */
.bna-head { margin-bottom: clamp(28px, 4vw, 48px); text-align: center; }
.bna-eyebrow { margin-bottom: 12px; font-size: 14px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); }
.bna-title { font-size: clamp(36px, 5vw, 64px); line-height: 1.1; font-weight: 900; letter-spacing: -0.045em; }
.bna-desc { margin-top: 16px; font-size: 17px; color: var(--muted); }
.bna-head--small .bna-title { font-size: clamp(28px, 3.4vw, 40px); }

/* 분류 */
.bna-cats { margin-bottom: clamp(28px, 4vw, 44px); }
.bna-cats ul { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.bna-cats a {
	display: block;
	padding: 10px 20px;
	border-radius: 999px;
	border: 1px solid var(--line);
	background: #fff;
	font-size: 15px; font-weight: 600;
	color: var(--text);
	transition: border-color .2s, color .2s, background-color .2s;
}
.bna-cats a:hover { border-color: var(--accent); color: var(--accent); }
.bna-cats a.is-active { background: var(--ink); border-color: var(--ink); color: #fff; }

/* 버튼 */
.bna-btn {
	display: inline-flex; align-items: center; justify-content: center;
	height: 52px; padding: 0 26px;
	border-radius: 999px;
	border: 1px solid transparent;
	font-family: inherit; font-size: 15px; font-weight: 700;
	cursor: pointer;
	transition: transform .2s, background-color .2s, color .2s;
}
.bna-btn:hover { transform: translateY(-2px); }
.bna-btn--primary { background: var(--accent); color: #fff !important; box-shadow: 0 10px 26px rgba(132, 74, 215, .3); }
.bna-btn--primary:hover { background: var(--accent-deep); }
.bna-btn--line { border-color: var(--line); background: #fff; color: var(--ink); }
.bna-btn--line:hover { border-color: var(--ink); }
.bna-btn--dark { background: var(--ink); color: #fff !important; }


/* ----------------------------------------------------------
   비교 뷰어
---------------------------------------------------------- */
.bna-stage {
	display: grid;
	grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
	gap: clamp(24px, 4vw, 56px);
	align-items: center;
	margin-bottom: clamp(48px, 6vw, 80px);
	padding: clamp(16px, 2vw, 24px);
	border-radius: 32px;
	background: var(--soft);
}
.bna-compare {
	--pos: 50%;
	position: relative;
	overflow: hidden;
	aspect-ratio: 4 / 3;
	border-radius: 24px;
	background: #e9e6ee;
	user-select: none;
}
.bna-compare__before,
.bna-compare__after img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.bna-compare__after { position: absolute; inset: 0; clip-path: inset(0 0 0 var(--pos)); }
.bna-compare__range {
	position: absolute; inset: 0;
	width: 100%; height: 100%;
	margin: 0;
	opacity: 0;
	cursor: ew-resize;
	z-index: 3;
}
.bna-compare__handle {
	position: absolute; top: 0; bottom: 0; left: var(--pos);
	z-index: 2;
	width: 2px;
	margin-left: -1px;
	background: #fff;
	box-shadow: 0 0 12px rgba(0, 0, 0, .25);
	pointer-events: none;
}
.bna-compare__handle:after {
	content: '';
	position: absolute; top: 50%; left: 50%;
	width: 48px; height: 48px;
	margin: -24px 0 0 -24px;
	border-radius: 50%;
	background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23121212' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 6l-6 6 6 6M15 6l6 6-6 6'/%3E%3C/svg%3E") no-repeat center / 22px;
	box-shadow: 0 6px 18px rgba(0, 0, 0, .2);
}
.bna-compare__range:focus-visible ~ .bna-compare__handle:after { outline: 3px solid var(--accent); outline-offset: 2px; }
.bna-tag {
	position: absolute; top: 16px; z-index: 2;
	padding: 6px 12px;
	border-radius: 999px;
	background: rgba(18, 18, 18, .55);
	-webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
	color: #fff;
	font-size: 12px; font-weight: 800; letter-spacing: .12em;
	pointer-events: none;
}
.bna-tag--before { left: 16px; }
.bna-tag--after { right: 16px; background: rgba(132, 74, 215, .75); }

/* 비회원 : 수술 후 영역 잠금 */
.bna-compare.is-locked .bna-compare__before { clip-path: inset(0 50% 0 0); }
.bna-lock {
	position: absolute; top: 0; right: 0; bottom: 0; left: 50%;
	display: flex; align-items: center; justify-content: center;
	padding: 16px;
	background: linear-gradient(160deg, #2a2233, #121016);
	color: #fff;
	text-align: center;
}
.bna-lock__box strong { display: block; margin: 14px 0 8px; font-size: 16px; line-height: 1.45; }
.bna-lock__box p { margin-bottom: 18px; font-size: 13px; color: rgba(255, 255, 255, .6); }
.bna-lock__icon {
	display: inline-flex; align-items: center; justify-content: center;
	width: 48px; height: 48px;
	border-radius: 50%;
	border: 1px solid rgba(255, 255, 255, .25);
	color: #c4a3ff;
}
.bna-lock .bna-btn { height: 44px; padding: 0 22px; box-shadow: none; }

/* 정보 패널 */
.bna-info { padding: clamp(4px, 1vw, 16px) clamp(4px, 1vw, 16px) clamp(4px, 1vw, 16px) 0; }
.bna-info__cat { display: inline-block; margin-bottom: 14px; padding: 5px 12px; border-radius: 999px; background: #fff; font-size: 13px; font-weight: 700; color: var(--accent); }
.bna-info__cat:empty { display: none; }
.bna-info__title { font-size: clamp(26px, 2.8vw, 38px); line-height: 1.25; font-weight: 800; letter-spacing: -0.035em; }
.bna-info__meta { display: flex; flex-wrap: wrap; gap: 8px 28px; margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--line); }
.bna-info__meta div { display: flex; gap: 10px; font-size: 15px; }
.bna-info__meta dt { color: var(--muted); }
.bna-info__meta dd { font-weight: 700; }
.bna-info__content { margin-top: 20px; font-size: 16px; color: var(--text); }
.bna-info__note { margin-top: 20px; font-size: 13px; color: var(--muted); }
.bna-info__btns { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; }


/* ----------------------------------------------------------
   카드 목록
---------------------------------------------------------- */
.bna-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(12px, 1.6vw, 24px); }
.bna-card { display: block; border-radius: 22px; transition: transform .25s; }
.bna-card:hover { transform: translateY(-4px); }
.bna-card__pair {
	display: grid; grid-template-columns: 1fr 1fr; gap: 2px;
	overflow: hidden;
	border-radius: 20px;
	background: #fff;
	box-shadow: 0 10px 30px rgba(0, 0, 0, .06);
	outline: 2px solid transparent;
	outline-offset: 3px;
	transition: outline-color .2s, box-shadow .25s;
}
.bna-card:hover .bna-card__pair { box-shadow: 0 16px 40px rgba(0, 0, 0, .1); }
.bna-card.is-selected .bna-card__pair { outline-color: var(--accent); }
.bna-card__img { position: relative; aspect-ratio: 3 / 4; background: #ece9f1; overflow: hidden; }
.bna-card__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.bna-card:hover .bna-card__img img { transform: scale(1.04); }
.bna-card__img em {
	position: absolute; left: 8px; bottom: 8px;
	padding: 2px 8px;
	border-radius: 999px;
	background: rgba(18, 18, 18, .55);
	color: #fff;
	font-size: 11px; font-style: normal; font-weight: 700;
}
.bna-card__img.is-locked { background: linear-gradient(160deg, #2a2233, #121016); }
.bna-card__img.is-locked i {
	position: absolute; inset: 0;
	display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
	color: rgba(255, 255, 255, .75);
	font-size: 12px; font-style: normal; font-weight: 600;
}
.bna-card__img.is-locked .mc-icon { width: 22px; height: 22px; color: #c4a3ff; }
.bna-card__body { padding: 14px 4px 0; }
.bna-card__cat { display: block; margin-bottom: 4px; font-size: 13px; font-weight: 700; color: var(--accent); }
.bna-card__title { display: block; font-size: 16px; font-weight: 700; line-height: 1.4; }

.bna-empty { padding: 96px 0; border-radius: 24px; background: var(--soft); text-align: center; color: var(--muted); }

/* 페이지 / 등록 */
.bna-foot { position: relative; display: flex; justify-content: center; align-items: center; margin-top: clamp(40px, 5vw, 64px); min-height: 52px; }
.bna-foot__write { position: absolute; right: 0; top: 0; }
.bna .pg_wrap { float: none; margin: 0; }
.bna .pg { display: flex; gap: 6px; }
.bna .pg_page, .bna .pg_current {
	display: inline-flex; align-items: center; justify-content: center;
	min-width: 40px; height: 40px;
	padding: 0 10px;
	border-radius: 999px;
	border: 1px solid var(--line);
	background: #fff;
	font-size: 14px; font-weight: 600; color: var(--text);
}
.bna .pg_current { background: var(--ink); border-color: var(--ink); color: #fff; }


/* ----------------------------------------------------------
   상세
---------------------------------------------------------- */
.bna-crumb { display: flex; gap: 8px; margin-bottom: 20px; font-size: 14px; color: var(--muted); }
.bna-crumb span:before { content: '/'; margin-right: 8px; color: #c8c4cf; }
.bna-crumb a:hover { color: var(--accent); }
.bna-nav { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-top: 24px; border-top: 1px solid var(--line); }
.bna-nav__link { font-size: 15px; font-weight: 700; }
.bna-nav__link:before { content: '← '; }
.bna-nav__link--next:before { content: ''; }
.bna-nav__link--next:after { content: ' →'; }
.bna-nav__admin { display: flex; gap: 14px; font-size: 14px; color: var(--muted); }
.bna-nav__admin a:hover { color: var(--ink); }


/* ----------------------------------------------------------
   등록 폼
---------------------------------------------------------- */
.bna--write { max-width: 880px; }
.bna-form { display: flex; flex-direction: column; gap: 20px; }
.bna-form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.bna-field { display: flex; flex-direction: column; gap: 8px; }
.bna-field > span { font-size: 15px; font-weight: 700; }
.bna-field b { color: var(--accent); }
.bna-field small { font-weight: 400; color: var(--muted); }
.bna-field input[type=text], .bna-field input[type=password], .bna-field select, .bna-field textarea {
	width: 100%;
	height: 52px;
	padding: 0 16px;
	border: 1px solid var(--line);
	border-radius: 14px;
	background: #fff;
	font-family: inherit; font-size: 16px;
	color: var(--ink);
	transition: border-color .2s, box-shadow .2s;
}
.bna-field textarea { height: auto; padding: 14px 16px; line-height: 1.6; resize: vertical; }
.bna-field input:focus, .bna-field select:focus, .bna-field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px rgba(132, 74, 215, .12); }
.bna-upload { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.bna-upload__label { display: block; margin-bottom: 8px; font-size: 15px; font-weight: 700; }
.bna-upload__label b { color: var(--accent); }
.bna-upload__drop {
	position: relative;
	display: flex; align-items: center; justify-content: center;
	aspect-ratio: 4 / 3;
	overflow: hidden;
	border: 2px dashed #d9d4e2;
	border-radius: 20px;
	background: var(--soft);
	cursor: pointer;
	transition: border-color .2s, background-color .2s;
}
.bna-upload__drop:hover { border-color: var(--accent); background: #f4effc; }
.bna-upload__drop.has-image { border-style: solid; border-color: var(--line); }
.bna-upload__preview { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.bna-upload__hint { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 15px; font-weight: 700; color: var(--text); }
.bna-upload__hint small { font-size: 12px; font-weight: 400; color: var(--muted); }
.bna-upload__drop.has-image .bna-upload__hint { padding: 8px 14px; border-radius: 999px; background: rgba(255, 255, 255, .85); opacity: 0; transition: opacity .2s; }
.bna-upload__drop.has-image:hover .bna-upload__hint { opacity: 1; }
.bna-upload__input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.bna-upload__del { display: block; margin-top: 8px; font-size: 13px; color: var(--muted); }
.bna-form__btns { display: flex; justify-content: center; gap: 10px; margin-top: 12px; }
.bna-form__btns .bna-btn { min-width: 140px; }


/* ==========================================================
   반응형
========================================================== */
@media screen and (max-width: 1024px) {
	.bna-stage { grid-template-columns: 1fr; }
	.bna-info { padding: 4px 8px 8px; }
	.bna-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media screen and (max-width: 767px) {
	.bna-cats ul { flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; margin: 0 calc(var(--gutter, 20px) * -1); padding: 0 var(--gutter, 20px) 4px; scrollbar-width: none; }
	.bna-cats ul::-webkit-scrollbar { display: none; }
	.bna-cats a { white-space: nowrap; padding: 9px 16px; font-size: 14px; }
	.bna-stage { padding: 10px; border-radius: 24px; }
	.bna-compare { border-radius: 18px; aspect-ratio: 1 / 1; }
	.bna-lock__box strong { font-size: 14px; }
	.bna-lock__box p { display: none; }
	.bna-info__btns .bna-btn { flex: 1 1 0; padding: 0 12px; }
	.bna-grid { grid-template-columns: 1fr 1fr; }
	.bna-card__title { font-size: 15px; }
	.bna-foot { flex-direction: column; gap: 16px; }
	.bna-foot__write { position: static; }
	.bna-form__row, .bna-upload { grid-template-columns: 1fr; }
}

/* 비회원 : '전' 사진을 왼쪽 절반 칸에 잘리지 않게 통째로 (사진 속 글씨가 잘리지 않도록) */
.bna-compare.is-locked .bna-compare__before { clip-path: none; right: auto; width: 50%; object-fit: contain; background: #f3f2f6; }
