/* 상품 상세 단계 패널(11/12~13 에 만든 판을 반티원 11/18 에 옮김) — 상세 붙임(.bi-detail) · shop-web components/BiPanel.tsx
   (목록 서랍 .bi-drawer 규칙은 처음 판과 같게 두었지만 이 저장소엔 서랍 화면이 없음)
   흐름: 왼쪽 그림 고정 + 오른쪽 번호 단계(큰 고르기 칸, 고르면 굵은 테두리) + 아래 고정 요약 띠. 색은 반티원 초록(옛 style.css #006934 · 관리자 강조색) */
:root {
  --bi-main: #006934;
  --bi-main-2: #2f8a5b;
  --bi-main-weak: #ebf5ef;
  --bi-ink: #222;
  --bi-sub: #767676;
  --bi-line: #e2e2e6;
  --bi-bg: #fff;
  --bi-soft: #f7f7f9;
  --bi-warn: #d64545;
  --bi-radius: 12px;
}

/* ── 서랍 ── */
body.bi-drawer-on { overflow: hidden; }
.bi-drawer-root { position: fixed; inset: 0; z-index: 10050; }
.bi-overlay { position: absolute; inset: 0; background: rgba(17, 17, 24, .48); animation: bi-fade .2s ease-out; }
.bi-drawer { position: absolute; top: 0; right: 0; bottom: 0; width: 540px; max-width: 100%; background: var(--bi-bg);
  box-shadow: -8px 0 32px rgba(0, 0, 0, .18); display: flex; animation: bi-slide .26s cubic-bezier(.2, .8, .2, 1); }
.bi-drawer > .bi-panel { flex: 1; min-width: 0; }
@keyframes bi-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes bi-slide { from { transform: translateX(40px); opacity: .4; } to { transform: none; opacity: 1; } }
@keyframes bi-rise { from { transform: translateY(48px); opacity: .4; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .bi-overlay, .bi-drawer { animation: none; } }
.bi-drawer-msg { padding: 72px 24px; text-align: center; }
.bi-loading { color: var(--bi-sub); font-size: 15px; }

/* ── 패널 뼈대: 위 스크롤 칸 + 아래 고정 띠 ── */
.bi-panel { position: relative; display: flex; flex-direction: column; color: var(--bi-ink); font-size: 14px; line-height: 1.5; text-align: left; }
.bi-panel *, .bi-panel *::before, .bi-panel *::after { box-sizing: border-box; }
.bi-panel-drawer { height: 100%; }
.bi-panel-drawer .bi-panel-scroll { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 0 24px 24px; }
.bi-panel-docked .bi-panel-scroll { padding: 0 0 24px; }
.bi-panel-close { position: absolute; top: 12px; right: 12px; z-index: 3; width: 40px; height: 40px; border-radius: 50%; border: 0;
  background: rgba(255, 255, 255, .92); box-shadow: 0 1px 6px rgba(0, 0, 0, .16); font-size: 18px; line-height: 40px; color: var(--bi-ink); cursor: pointer; }
.bi-panel-close:hover { background: #fff; color: var(--bi-main); }
.bi-panel button { font-family: inherit; }
.bi-panel h2, .bi-panel h3, .bi-panel h4, .bi-panel p { margin: 0; }
.bi-panel ul { list-style: none; margin: 0; padding: 0; }

/* 그림 */
.bi-gallery-top { margin: 0 -24px 8px; }
.bi-gallery-main { background: var(--bi-soft); display: flex; align-items: center; justify-content: center; aspect-ratio: 1 / 1; overflow: hidden; }
.bi-gallery-top .bi-gallery-main { aspect-ratio: 4 / 3; }
.bi-gallery-main img { width: 100%; height: 100%; object-fit: contain; display: block; }
.bi-gallery-none { color: var(--bi-sub); }
.bi-gallery-thumbs { display: flex; gap: 8px; padding: 10px 0 0; overflow-x: auto; list-style: none; margin: 0; }
.bi-gallery-top .bi-gallery-thumbs { padding: 10px 24px 0; }
.bi-gallery-thumbs button { width: 60px; height: 60px; padding: 0; border: 2px solid transparent; border-radius: 8px; background: var(--bi-soft); overflow: hidden; cursor: pointer; display: block; }
.bi-gallery-thumbs button[aria-pressed="true"] { border-color: var(--bi-main); }
.bi-gallery-thumbs img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* 단계 */
.bi-step { border-bottom: 1px solid var(--bi-line); }
.bi-step-no { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 50%;
  background: var(--bi-soft); color: var(--bi-sub); font-size: 13px; font-weight: 700; }
.bi-step.open .bi-step-no, .bi-step-info .bi-step-no { background: var(--bi-main); color: #fff; }
.bi-step.done:not(.open) .bi-step-no { background: var(--bi-main-weak); color: var(--bi-main); }
.bi-step-head { width: 100%; display: flex; align-items: center; gap: 12px; padding: 18px 0; background: none; border: 0; text-align: left; cursor: pointer; color: inherit; }
.bi-step-head:disabled { cursor: default; opacity: .45; }
.bi-step-titles { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.bi-step-titles strong { font-size: 17px; font-weight: 700; letter-spacing: -.2px; }
.bi-step-titles small { font-size: 13px; color: var(--bi-sub); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bi-step-caret { flex: none; width: 10px; height: 10px; border-right: 2px solid #999; border-bottom: 2px solid #999; transform: rotate(45deg); margin: -4px 6px 0 0; transition: transform .2s; }
.bi-step.open .bi-step-caret { transform: rotate(-135deg); margin-top: 4px; }
.bi-step-body { padding: 0 0 24px 40px; display: flex; flex-direction: column; gap: 20px; }

.bi-info { display: flex; gap: 12px; padding: 20px 0 22px; }
.bi-panel-docked .bi-info { padding-top: 4px; }
.bi-info-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; padding-right: 44px; }
.bi-panel-docked .bi-info-text { padding-right: 0; }
.bi-name { font-size: 22px; font-weight: 700; line-height: 1.35; letter-spacing: -.4px; word-break: keep-all; }
.bi-price { font-size: 15px; }
.bi-price b { font-size: 22px; font-weight: 800; color: var(--bi-main); margin-right: 2px; }
.bi-price del { margin-left: 8px; color: #aaa; font-size: 13px; }
.bi-summary { color: #555; }
.bi-facts { display: flex; flex-direction: column; gap: 2px; color: var(--bi-sub); font-size: 13px; }
.bi-facts li::before { content: '·'; margin-right: 6px; color: var(--bi-main); font-weight: 700; }
.bi-attrs { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; font-size: 13px; }
.bi-attrs > div { display: contents; }
.bi-attrs dt { color: var(--bi-sub); font-weight: 400; }
.bi-attrs dd { margin: 0; }
.bi-detail-link { align-self: flex-start; font-size: 13px; color: var(--bi-main); text-decoration: underline; text-underline-offset: 3px; }

.bi-group { display: flex; flex-direction: column; gap: 10px; }
.bi-sub { font-size: 15px; font-weight: 700; }
.bi-sub small { font-weight: 400; color: var(--bi-sub); font-size: 12px; margin-left: 6px; }
.bi-note { font-size: 12px; color: var(--bi-sub); }
.bi-empty { color: var(--bi-sub); font-size: 13px; }

/* 큰 고르기 칸 */
.bi-cards { display: grid; gap: 10px; }
.bi-cards-2 { grid-template-columns: 1fr 1fr; }
.bi-cards-color { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); }
.bi-cards-art { grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); }
.bi-card { position: relative; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 2px; min-height: 64px; padding: 14px 16px;
  border: 1px solid #cfcfd6; border-radius: var(--bi-radius); background: #fff; color: var(--bi-ink); text-align: left; cursor: pointer; text-decoration: none;
  transition: border-color .15s, box-shadow .15s; }
.bi-card:hover { border-color: #9a9aa6; color: var(--bi-ink); text-decoration: none; }
.bi-card strong { font-size: 15px; font-weight: 700; }
.bi-card small { font-size: 12px; color: var(--bi-sub); }
.bi-card[aria-checked="true"], .bi-card[aria-pressed="true"], .bi-card[aria-current="true"] { border-color: var(--bi-main); box-shadow: inset 0 0 0 1px var(--bi-main); background: var(--bi-main-weak); }
.bi-card.off { opacity: .5; }
.bi-color { min-height: 48px; padding: 10px 14px; align-items: center; text-align: center; }
.bi-art { padding: 10px; align-items: stretch; text-align: center; }
.bi-art-img { display: flex; align-items: center; justify-content: center; aspect-ratio: 1 / 1; background: var(--bi-soft); border-radius: 8px; overflow: hidden; margin-bottom: 6px; }
.bi-art-img img { max-width: 100%; max-height: 100%; object-fit: contain; display: block; }
.bi-art strong { font-size: 13px; line-height: 1.35; word-break: keep-all; }
.bi-upload input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.bi-upload-plus { font-size: 30px; color: var(--bi-main); font-weight: 300; }

/* 사이즈 수량 */
.bi-comp-head { display: flex; gap: 12px; align-items: center; }
.bi-comp-head img, .bi-comp-noimg { width: 52px; height: 52px; border-radius: 8px; object-fit: cover; background: var(--bi-soft); flex: none; }
.bi-comp-head p { color: var(--bi-sub); font-size: 13px; }
.bi-comp + .bi-comp { padding-top: 18px; border-top: 1px dashed var(--bi-line); }
.bi-sizes { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 8px; }
.bi-sizes li { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 8px 8px 14px; border: 1px solid #cfcfd6; border-radius: var(--bi-radius); background: #fff; }
.bi-sizes li.on { border-color: var(--bi-main); box-shadow: inset 0 0 0 1px var(--bi-main); background: var(--bi-main-weak); }
.bi-sizes li.sold-out { opacity: .5; }
.bi-size-name { font-weight: 700; font-size: 15px; display: flex; flex-direction: column; line-height: 1.2; white-space: nowrap; }
/* 반티원: 사이즈 이름이 길다('S(아동용_초등저학년)') — PC 도 줄바꿈해 수량 단추가 칸 밖으로 안 나가게 */
.bi-size-name { white-space: normal; word-break: keep-all; min-width: 0; }
.bi-size-name small { font-weight: 400; font-size: 11px; color: var(--bi-sub); }
.bi-stepper { display: inline-flex; align-items: center; }
.bi-stepper button { width: 30px; height: 30px; border-radius: 50%; border: 1px solid #cfcfd6; background: #fff; font-size: 16px; line-height: 1; color: var(--bi-ink); cursor: pointer; padding: 0; }
.bi-stepper button:disabled { opacity: .35; cursor: default; }
.bi-stepper input { width: 40px; height: 30px; border: 0; background: transparent; text-align: center; font-size: 15px; font-weight: 700; color: var(--bi-ink); padding: 0; }
.bi-comp-total { align-self: flex-end; font-size: 13px; color: var(--bi-sub); }
.bi-sizechart summary { cursor: pointer; font-size: 13px; color: var(--bi-main); }
.bi-sizechart img { max-width: 100%; margin-top: 8px; }

/* 인쇄 위치 */
.bi-slot { display: flex; flex-direction: column; gap: 10px; padding: 14px; border: 1px solid var(--bi-line); border-radius: var(--bi-radius); background: #fcfcfd; }
.bi-slot-head { display: flex; align-items: center; gap: 12px; }
.bi-slot-head > div { flex: 1; min-width: 0; }
.bi-slot-head h4 { font-size: 15px; font-weight: 700; }
.bi-slot-head p { font-size: 13px; color: var(--bi-sub); }
.bi-slot-pos { width: 56px; height: 56px; object-fit: contain; border-radius: 8px; background: #fff; border: 1px solid var(--bi-line); flex: none; }
.bi-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.bi-chips button { padding: 6px 12px; border-radius: 999px; border: 1px solid #cfcfd6; background: #fff; font-size: 13px; cursor: pointer; color: var(--bi-ink); }
.bi-chips button[aria-pressed="true"] { border-color: var(--bi-main); background: var(--bi-main); color: #fff; }
.bi-link { background: none; border: 0; color: var(--bi-main); font-size: 13px; text-decoration: underline; cursor: pointer; padding: 4px; }
.bi-input, .bi-panel select, .bi-panel textarea, .bi-table input { width: 100%; height: 40px; padding: 0 12px; border: 1px solid #cfcfd6; border-radius: 8px; background: #fff; font-size: 14px; color: var(--bi-ink); font-family: inherit; }
.bi-panel textarea { height: auto; padding: 10px 12px; resize: vertical; }
.bi-input:focus, .bi-panel select:focus, .bi-panel textarea:focus, .bi-table input:focus { outline: none; border-color: var(--bi-main); box-shadow: 0 0 0 3px rgba(0, 105, 52, .18); }

/* 이니셜 표 */
.bi-fonts { display: flex; flex-wrap: wrap; gap: 10px; }
.bi-font { display: flex; flex-direction: column; gap: 4px; flex: 1 1 160px; font-size: 13px; color: var(--bi-sub); }
.bi-font b { color: var(--bi-ink); font-size: 14px; }
.bi-ini-tools { display: flex; flex-wrap: wrap; gap: 8px; }
.bi-tool { height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid #cfcfd6; background: #fff; font-size: 13px; font-weight: 600; color: var(--bi-ink); cursor: pointer; }
.bi-tool:hover:not(:disabled) { border-color: var(--bi-main); color: var(--bi-main); }
.bi-tool[aria-expanded="true"], .bi-tool.primary { background: var(--bi-main); border-color: var(--bi-main); color: #fff; }
.bi-paste { display: flex; flex-direction: column; gap: 8px; padding: 12px; border-radius: var(--bi-radius); background: var(--bi-main-weak); font-size: 13px; }
.bi-paste textarea { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 13px; }
.bi-paste-btns { display: flex; justify-content: flex-end; gap: 8px; }
.bi-ini .kan8-excel-btns { margin: 0 !important; }
.bi-ini .kan8-excel-btns button { background: #fff; border: 1px solid var(--bi-line); border-radius: 8px; padding: 6px 10px; font-size: 12px; line-height: 1.3; cursor: pointer; }
.bi-table-wrap { position: relative; overflow-x: auto; border: 1px solid var(--bi-line); border-radius: var(--bi-radius); }
.bi-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.bi-table th { background: var(--bi-soft); color: var(--bi-sub); font-weight: 600; padding: 8px 6px; text-align: left; white-space: nowrap; border-bottom: 1px solid var(--bi-line); }
.bi-table td { padding: 6px; border-bottom: 1px solid #f0f0f2; vertical-align: middle; }
.bi-table tr:last-child td { border-bottom: 0; }
.bi-table tr.need td { background: #fff6f6; }
.bi-table input, .bi-table select { height: 34px; min-width: 72px; padding: 0 8px; font-size: 13px; }
.bi-col-no { width: 32px; text-align: center !important; color: var(--bi-sub); }
.bi-col-size { width: 92px; }
.bi-col-del { width: 36px; text-align: center !important; }
.bi-x { width: 28px; height: 28px; border-radius: 50%; border: 0; background: transparent; color: #999; cursor: pointer; font-size: 13px; }
.bi-x:hover { background: #fde8e8; color: var(--bi-warn); }
.bi-ini-sum { font-size: 13px; color: var(--bi-sub); text-align: right; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* 무료 벌수·메모 */
.bi-bonus-row { display: grid; grid-template-columns: 56px 1fr 92px; gap: 8px; align-items: center; }
.bi-bonus-row input { grid-column: 2 / -1; }
.bi-bonus-label { font-size: 13px; font-weight: 700; color: var(--bi-main); }
.bi-memo { display: flex; flex-direction: column; gap: 8px; }
.bi-panel .hb-gift { margin: 0; }
.bi-alert { padding: 10px 14px; border-radius: 8px; font-size: 13px; }
.bi-alert.ok { background: #eef8f0; color: #1f6b33; }
.bi-alert.error { background: #fdecec; color: #a32020; }

.bi-next { align-self: flex-start; height: 44px; padding: 0 22px; border-radius: 999px; border: 0; background: var(--bi-ink); color: #fff; font-size: 14px; font-weight: 700; cursor: pointer; }
.bi-next:disabled { background: #d5d5da; cursor: default; }

/* 꾸미기 방식(인쇄·이니셜 따로) */
.bi-deco { gap: 14px; }
.bi-deco-row { display: flex; flex-direction: column; gap: 8px; }
.bi-deco-label { font-size: 13px; font-weight: 700; color: var(--bi-sub); }
.bi-deco + .bi-deco { padding-top: 16px; border-top: 1px dashed var(--bi-line); }

/* 인쇄 위치 칸(한 줄 카드): [위치 그림 64] [이름 / 고른 디자인·금액] [고른 디자인 그림 52 또는 '선택하기 ›'] [빼기] */
.bi-positions-wrap { display: flex; flex-direction: column; gap: 12px; }
.bi-positions { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.bi-pos { display: flex; align-items: center; min-width: 0; border: 1px solid #d9d9e0; border-radius: 12px; background: #fff; transition: border-color .15s, box-shadow .15s, background-color .15s; }
.bi-pos:hover { border-color: #a9a9b6; }
.bi-pos.chosen { border-color: var(--bi-main); box-shadow: inset 0 0 0 1px var(--bi-main); background: var(--bi-main-weak); }
.bi-pos-open { flex: 1; min-width: 0; display: flex; align-items: center; gap: 14px; padding: 16px; background: none; border: 0; border-radius: 12px; text-align: left; cursor: pointer; color: var(--bi-ink); font: inherit; }
.bi-pos-open:focus-visible { outline: 2px solid var(--bi-main); outline-offset: -2px; }
.bi-pos-thumb { flex: none; width: 64px; height: 64px; border-radius: 10px; background: #f6f6f8; overflow: hidden; display: block; }
.bi-pos-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.bi-pos-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.bi-pos-text strong { font-size: 15px; font-weight: 700; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bi-pos-sub { display: flex; align-items: center; gap: 6px; min-width: 0; }
.bi-pos-sub small { font-size: 13px; color: var(--bi-sub); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.bi-pos-sub small.on { color: var(--bi-main); font-weight: 600; }
.bi-pos-price { flex: none; font-size: 13px; font-weight: 700; color: var(--bi-main); white-space: nowrap; }
.bi-pos-badge { flex: none; font-style: normal; font-size: 11px; font-weight: 700; line-height: 18px; color: var(--bi-main); background: var(--bi-main-weak); border-radius: 999px; padding: 0 8px; }
.bi-pos-art { flex: none; width: 52px; height: 52px; border-radius: 10px; background: #fff; border: 1px solid #e6e3f5; padding: 4px; display: flex; align-items: center; justify-content: center; }
.bi-pos-art img { max-width: 100%; max-height: 100%; object-fit: contain; display: block; }
.bi-pos-pill { flex: none; font-size: 12px; font-weight: 700; color: var(--bi-ink); border: 1px solid #d9d9e0; border-radius: 999px; padding: 6px 12px; white-space: nowrap; background: #fff; }
.bi-pos:hover .bi-pos-pill { border-color: var(--bi-main); color: var(--bi-main); }
.bi-pos-del { flex: none; align-self: stretch; padding: 0 16px 0 4px; background: none; border: 0; font-size: 12px; color: var(--bi-sub); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.bi-pos-del:hover { color: var(--bi-warn); }

/* 디자인 고르기 창 — PC 가운데 창(900px) · 휴대폰 전체 화면 */
.bi-dp-root { position: fixed; inset: 0; z-index: 10060; display: flex; align-items: center; justify-content: center; padding: 24px; }
.bi-dp-overlay { position: absolute; inset: 0; background: rgba(17, 17, 24, .55); animation: bi-fade .2s ease-out; }
.bi-dp { position: relative; width: 900px; max-width: 100%; max-height: calc(100vh - 48px); display: flex; flex-direction: column; background: #fff; border-radius: 18px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .3); color: var(--bi-ink); font-size: 14px; line-height: 1.5; text-align: left; outline: none; animation: bi-rise .22s cubic-bezier(.2, .8, .2, 1); }
.bi-dp *, .bi-dp *::before, .bi-dp *::after { box-sizing: border-box; }
.bi-dp h3, .bi-dp h4, .bi-dp p { margin: 0; }
.bi-dp-head { display: flex; align-items: center; gap: 14px; padding: 18px 20px 14px 24px; border-bottom: 1px solid var(--bi-line); }
.bi-dp-title { flex: 1; min-width: 0; }
.bi-dp-title small { font-size: 12px; color: var(--bi-sub); }
.bi-dp-title h3 { font-size: 19px; font-weight: 800; letter-spacing: -.3px; }
.bi-dp-title p { font-size: 13px; color: var(--bi-main); font-weight: 600; }
.bi-dp-close { width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--bi-soft); font-size: 17px; color: var(--bi-ink); cursor: pointer; flex: none; }
.bi-dp-close:hover { background: var(--bi-main-weak); color: var(--bi-main); }
.bi-dp-tools { display: flex; flex-direction: column; gap: 10px; padding: 14px 24px; border-bottom: 1px solid var(--bi-line); }
.bi-dp-tabs { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 2px; }
.bi-dp-tabs button { white-space: nowrap; }
.bi-dp-tabs button span { color: var(--bi-sub); font-size: 11px; margin-left: 2px; }
.bi-chips button[aria-selected="true"] { border-color: var(--bi-main); background: var(--bi-main); color: #fff; }
.bi-chips button[aria-selected="true"] span { color: rgba(255, 255, 255, .8); }
.bi-dp-search { max-width: 320px; }
.bi-dp-body { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 18px 24px 24px; display: flex; flex-direction: column; gap: 18px; }
.bi-dp-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
/* 반티원 데이터: 디자인 이름에 긴 메일 주소(띄어쓰기 없음)가 있어 칸 밖으로 나감 → 아무 데서나 줄바꿈 */
.bi-art strong { overflow-wrap: anywhere; }
.bi-dp-pager { display: flex; justify-content: center; gap: 6px; }
.bi-dp-pager button { min-width: 36px; height: 36px; padding: 0 8px; border-radius: 999px; border: 1px solid #cfcfd6; background: #fff; font-size: 14px; color: var(--bi-ink); cursor: pointer; }
.bi-dp-pager button[aria-current="page"] { background: var(--bi-main); border-color: var(--bi-main); color: #fff; font-weight: 700; }
.bi-dp-pager button:disabled { opacity: .35; cursor: default; }
.bi-dp-upload { display: flex; flex-direction: column; gap: 10px; padding-top: 16px; border-top: 1px dashed var(--bi-line); }
.bi-dp-upload .bi-cards-art { grid-template-columns: repeat(auto-fill, minmax(150px, 180px)); }
@media not all {
  .bi-dp-root { padding: 0; align-items: stretch; }
  .bi-dp { width: 100%; max-height: none; height: 100%; border-radius: 0; }
  .bi-dp-head { padding: 12px 12px 10px 16px; }
  .bi-dp-title h3 { font-size: 17px; }
  .bi-dp-tools { padding: 10px 16px; }
  .bi-dp-search { max-width: none; }
  .bi-dp-body { padding: 14px 16px calc(20px + env(safe-area-inset-bottom)); }
  .bi-dp-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .bi-dp-upload .bi-cards-art { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bi-fonts-row { grid-auto-columns: 148px; }
  .bi-bulk { padding: 14px; }
}
@media not all { .bi-dp-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* 이니셜 서체 고르기(보기 그림·미리보기 글자) — 웹 글꼴은 테마에 이미 있는 나눔스퀘어(OFL)만 */
@font-face { font-family: 'BiNanumSquare'; src: url('../codefont/NanumSquareEB.woff2') format('woff2'); font-weight: 400 900; font-display: swap; }
.bi-fontpick { display: flex; flex-direction: column; gap: 10px; }
.bi-fontpick-head { display: flex; align-items: baseline; gap: 8px; }
.bi-fontpick-head small { font-size: 12px; color: var(--bi-sub); }
.bi-fontpick-head small b { color: var(--bi-main); font-weight: 700; }
.bi-ini-status { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.bi-tag-lock { color: #6b5f2a !important; background: #fbf3d9 !important; }
.bi-tag { font-style: normal; font-size: 11px; font-weight: 700; color: var(--bi-sub); background: var(--bi-soft); border-radius: 999px; padding: 2px 8px; }
.bi-fonts-row { display: grid; grid-auto-flow: column; grid-auto-columns: 168px; gap: 10px; overflow-x: auto; padding: 2px 2px 6px; scroll-snap-type: x proximity; }
.bi-fontcard { scroll-snap-align: start; display: flex; flex-direction: column; gap: 4px; padding: 10px; border: 1px solid #d9d9e0; border-radius: 12px; background: #fff; text-align: left; cursor: pointer; color: var(--bi-ink); font: inherit; transition: border-color .15s, box-shadow .15s; }
.bi-fontcard:hover:not(:disabled) { border-color: #a9a9b6; }
.bi-fontcard[aria-checked="true"] { border-color: var(--bi-main); box-shadow: inset 0 0 0 1px var(--bi-main); background: var(--bi-main-weak); }
.bi-fontcard:disabled { cursor: default; opacity: 1; }
.bi-fontcard-prev { display: flex; align-items: center; justify-content: center; height: 64px; border-radius: 8px; background: #f6f6f8; overflow: hidden; margin-bottom: 4px; }
.bi-fontcard-prev img { max-width: 100%; max-height: 100%; object-fit: contain; display: block; }
.bi-fontcard-live { font-size: 20px; font-weight: 800; letter-spacing: .5px; color: var(--bi-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; padding: 0 6px; }
.bi-fontcard strong { font-size: 13px; font-weight: 700; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bi-fontcard small { font-size: 11px; color: var(--bi-sub); }
.bi-fontcard-cap { font-size: 12px; font-weight: 700; color: var(--bi-main); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* 전체 입력 칸 */
.bi-bulk { display: flex; flex-direction: column; gap: 10px; padding: 16px; border: 1px solid #d9d9e0; border-radius: 12px; background: #fcfcfd; }
.bi-bulk-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.bi-count { font-size: 12px; font-weight: 700; color: var(--bi-sub); background: var(--bi-soft); border-radius: 999px; padding: 3px 10px; white-space: nowrap; }
.bi-count.ok { color: #1f6b33; background: #e9f6ec; }
.bi-count.warn { color: #9a5b00; background: #fff4e0; }
.bi-bulk textarea { font-size: 14px; line-height: 1.6; min-height: 150px; }
.bi-bulk-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.bi-bulk-msg { font-size: 12px; color: var(--bi-main); font-weight: 600; }
.bi-bulk-foot .bi-tool { flex: none; height: 40px; padding: 0 18px; }
.bi-tool:disabled { opacity: .45; cursor: default; }
.bi-same { display: flex; flex-direction: column; gap: 8px; padding-top: 12px; border-top: 1px dashed var(--bi-line); }
.bi-same-row { display: flex; gap: 8px; }
.bi-same-row .bi-input { flex: 1; min-width: 0; height: 40px; }
.bi-same-row .bi-tool { flex: none; height: 40px; }

/* 이니셜 표(옛 표 모양 — 칸마다 위치 이름·서체 고르기·폰트 보기, 그 아래 '일괄 적용' 줄, 줄 고르기·선택 삭제) */
.bi-table th.bi-col-ini { min-width: 132px; vertical-align: top; white-space: normal; }
.bi-colhead { display: flex; align-items: baseline; justify-content: space-between; gap: 6px; margin-bottom: 6px; }
.bi-colhead b { font-size: 13px; color: var(--bi-ink); font-weight: 700; white-space: nowrap; }
.bi-fontlink { flex: none; background: none; border: 0; padding: 0; font-size: 11px; color: var(--bi-main); text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.bi-table select.bi-colfont { height: 30px; font-size: 12px; font-weight: 400; color: var(--bi-ink); padding: 0 6px; min-width: 0; width: 100%; }
.bi-colfont-fixed { display: block; font-size: 12px; font-weight: 400; color: var(--bi-sub); }
.bi-table .bi-col-chk { width: 40px; min-width: 40px; max-width: 40px; padding: 0 !important; text-align: center !important; }
.bi-table .bi-col-no { width: 32px; min-width: 32px; max-width: 32px; padding: 0 !important; }
.bi-col-chk input { width: 16px; height: 16px; min-width: 0; accent-color: var(--bi-main); vertical-align: middle; }
.bi-table tr.bi-bulkrow th { background: #f7fbf8; border-bottom: 1px solid var(--bi-line); padding: 6px; }
.bi-bulkrow-label { font-size: 12px; color: var(--bi-main) !important; font-weight: 700 !important; }
.bi-bulkcell { display: flex; gap: 4px; }
.bi-bulkcell input { flex: 1; min-width: 0; height: 32px; font-size: 13px; padding: 0 8px; border: 1px dashed #b9b2e0; border-radius: 8px; background: #fff; }
.bi-bulkapply { flex: none; height: 32px; padding: 0 10px; border-radius: 8px; border: 0; background: var(--bi-main); color: #fff; font-size: 12px; font-weight: 700; cursor: pointer; }
.bi-bulkapply:disabled { background: #d5d2e8; cursor: default; }
.bi-table tr.checked td { background: #eef7f1; }
.bi-fontpick.flash .bi-fonts-row { animation: bi-flash 1.6s ease-out; border-radius: 12px; }
@keyframes bi-flash { 0%, 40% { box-shadow: 0 0 0 3px rgba(0, 105, 52, .45); } 100% { box-shadow: 0 0 0 0 rgba(0, 105, 52, 0); } }
/* 표는 칸 안에서 옆으로 넘기고, 고르기·순번·사이즈는 붙어 있음 */
.bi-table th.bi-col-chk, .bi-table td.bi-col-chk { position: sticky; left: 0; z-index: 1; background: #fff; }
.bi-table th.bi-col-no, .bi-table td.bi-col-no { position: sticky; left: 40px; z-index: 1; background: #fff; }
.bi-table th.bi-col-size, .bi-table td.bi-col-size { position: sticky; left: 72px; z-index: 1; background: #fff; box-shadow: 6px 0 6px -6px rgba(0, 0, 0, .18); }
.bi-table thead tr:first-child th.bi-col-chk, .bi-table thead tr:first-child th.bi-col-no, .bi-table thead tr:first-child th.bi-col-size { background: var(--bi-soft); }
.bi-table tr.bi-bulkrow th.bi-col-chk, .bi-table tr.bi-bulkrow th.bi-bulkrow-label { position: sticky; left: 0; z-index: 1; background: #f7fbf8; }
.bi-table tr.bi-bulkrow th.bi-bulkrow-label { left: 40px; }
.bi-table tr.checked td.bi-col-chk, .bi-table tr.checked td.bi-col-no, .bi-table tr.checked td.bi-col-size { background: #eef7f1; }
.bi-table tr.need td.bi-col-chk, .bi-table tr.need td.bi-col-no, .bi-table tr.need td.bi-col-size { background: #fff6f6; }

/* ── 아래 고정 띠 ── */
.bi-bar { position: sticky; bottom: 0; z-index: 2; display: flex; flex-direction: column; gap: 10px; padding: 14px 24px calc(14px + env(safe-area-inset-bottom));
  background: #fff; border-top: 1px solid var(--bi-line); box-shadow: 0 -6px 18px rgba(0, 0, 0, .06); }
.bi-panel-docked .bi-bar { padding-left: 0; padding-right: 0; margin-top: 8px; }
.bi-bar-sum { display: grid; grid-template-columns: 1fr auto; align-items: baseline; gap: 2px 12px; }
.bi-bar-chips { font-size: 13px; color: var(--bi-sub); }
.bi-bar-total { font-size: 15px; font-weight: 700; text-align: right; }
.bi-bar-total b { font-size: 24px; font-weight: 800; color: var(--bi-ink); letter-spacing: -.5px; margin-right: 2px; }
.bi-bar-err { grid-column: 1 / -1; font-size: 12px; color: var(--bi-warn); }
.bi-bar-break { grid-column: 1 / -1; font-size: 11px; color: #999; text-align: right; }
.bi-bar-btns { display: grid; grid-template-columns: 1fr 1.4fr; gap: 8px; }
.bi-btn { height: 50px; border-radius: 12px; border: 1px solid var(--bi-ink); background: #fff; color: var(--bi-ink); font-size: 16px; font-weight: 700; cursor: pointer; }
.bi-btn.primary { background: var(--bi-main); border-color: var(--bi-main); color: #fff; }
.bi-btn.primary:hover { background: #5d4fa8; }
.bi-btn:disabled { opacity: .6; cursor: progress; }

/* ── 상세 주소: 왼쪽 그림 고정 + 오른쪽 단계 ── */
.bi-detail-page #contents-inner { padding-top: 24px; }
.bi-detail { display: grid; grid-template-columns: minmax(0, 1fr) 520px; gap: 56px; align-items: start; max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.bi-detail-media { position: sticky; top: 24px; }
/* 반티원 틀: 360px 넘게 내리면 GNB(높이 159)가 위에 고정됨 — 왼쪽 그림이 그 아래에 붙게 */
html.hb-js .bi-detail-media { top: 183px; }
.bi-detail-media .bi-gallery-main { border-radius: 16px; }
.bi-detail-steps { min-width: 0; }
.bi-detail-below { max-width: 1200px; margin: 48px auto 0; padding: 0 20px; }

/* ── 휴대폰: 서랍 = 아래에서 올라오는 전체 화면 시트 · 상세 = 한 줄(그림 위) ── */
@media not all {
  .bi-drawer { top: 12px; width: 100%; border-radius: 16px 16px 0 0; overflow: hidden; animation-name: bi-rise; box-shadow: 0 -8px 32px rgba(0, 0, 0, .2); }
  .bi-panel-drawer .bi-panel-scroll { padding: 0 16px 20px; }
  .bi-gallery-top { margin: 0 -16px 4px; }
  .bi-gallery-top .bi-gallery-thumbs { padding: 8px 16px 0; }
  .bi-bar { padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); }
  .bi-step-body { padding-left: 0; }
  .bi-name { font-size: 19px; }
  .bi-sizes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bi-sizes li { padding: 6px 6px 6px 10px; gap: 4px; }
  .bi-size-name { font-size: 14px; min-width: 0; white-space: normal; word-break: keep-all; }
  .bi-stepper button { width: 28px; height: 28px; }
  .bi-stepper input { width: 30px; }
  .bi-panel-scroll { overflow-x: hidden; }
  .bi-cards-art { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .bi-art { padding: 8px 6px; }
  .bi-art strong { font-size: 12px; }
  .bi-art small { font-size: 11px; }
  .bi-slot { padding: 12px; }
  .bi-positions { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .bi-pos-open { padding: 14px; gap: 12px; }
  .bi-pos-del { padding-right: 14px; }
  .bi-step, .bi-positions-wrap { scroll-margin-top: 68px; }
  .bi-btn { height: 48px; font-size: 15px; }
  .bi-detail-page #contents-inner { padding-top: 0; }
  .bi-detail { display: block; padding: 0; }
  .bi-detail-media { position: static; margin: 0 -0px 8px; }
  .bi-detail-media .bi-gallery-main { border-radius: 0; }
  .bi-detail-media .bi-gallery-thumbs { padding: 8px 0 0; }
  .bi-detail-steps { padding: 0; }
  .bi-panel-docked .bi-bar { position: fixed; left: 0; right: 0; bottom: 0; margin: 0; padding-left: 16px; padding-right: 16px; }
  .bi-detail-page { padding-bottom: 150px; }
  .bi-detail-below { margin-top: 24px; padding: 0; }
  /* 반티원 옛 detail.css: .detailView-mb 는 옛 상세의 좌우 15px 안쪽 여백을 넘어 그리려고 -15px — 패널 쪽엔 그 여백이 없어 옆으로 넘침 */
  .bi-detail-below .detailView-mb { width: 100%; margin-left: 0; margin-right: 0; }
  /* 반티원 틀은 #contents-inner 좌우 여백이 0 — 단계 칸이 화면 끝에 붙지 않게 */
  .bi-detail-page .bi-detail-steps { padding: 0 16px; }
  /* 반티원 휴대폰 퀵메뉴(카톡·FAQ·리뷰·위아래, 화면 오른쪽 아래 고정)가 아래 고정 띠(총액·장바구니)를 가림 → 띠 위로 */
  body:has(.bi-panel-docked) .qm-wrap._mb { bottom: 150px; }
}
@media not all {
  .bi-detail { grid-template-columns: minmax(0, 1fr) 440px; gap: 32px; }
}
.bi-order-label { font-size: 13px; font-weight: 600; color: var(--bi-main); }

/* 휴대폰: iOS Safari 는 글자가 16px 보다 작은 입력 칸에 들어가면 화면을 확대함(승용님 11/12 "입력 후 모바일에서 화면 확대") —
   쇼핑몰 모든 입력 칸을 16px 로(확대 막기 user-scalable=no 는 쓰지 않음 — 접근성). 이 파일은 반티원 모든 쪽에 붙음 */
@media not all {
  input[type="text"], input[type="search"], input[type="email"], input[type="tel"], input[type="password"], input[type="number"], input[type="url"], input[type="date"],
  input:not([type]), textarea, select { font-size: 16px !important; }
  .bi-table input, .bi-table select { height: 40px; }
  .bi-table select.bi-colfont, .bi-bulkcell input, .bi-bulkapply { height: 40px; }
  .bi-table th.bi-col-ini { min-width: 168px; }
  .bi-col-size { width: 96px; }
  .bi-col-chk input { width: 20px; height: 20px; }
  .bi-stepper input { width: 34px; }
  .bi-dp-search, .bi-same-row .bi-input, .bi-input { height: 44px; }
  .bi-same-row .bi-tool { height: 44px; }
  .bi-paste textarea, .bi-bulk textarea { line-height: 1.5; }
}
