:root {
  --bg: #f7f3ee;
  --card: #ffffff;
  --ink: #2a2420;
  --muted: #8b8179;
  --line: #e9e2d9;
  --accent: #b5543c;
  --accent-ink: #ffffff;
  --soft: #f2ebe3;
  --radius: 14px;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', 'Noto Sans KR', sans-serif;
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
img { display: block; max-width: 100%; }
a { color: inherit; }

.wrap { max-width: 520px; margin: 0 auto; padding: 0 16px 120px; }

/* 헤더 */
.top {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.top-in { max-width: 520px; margin: 0 auto; padding: 12px 16px; display: flex; align-items: center; gap: 10px; }
.brand { font-weight: 800; letter-spacing: .04em; font-size: 18px; flex: 1; cursor: pointer; }
.back { background: none; border: 0; padding: 4px 6px 4px 0; font-size: 15px; color: var(--muted); }
.cart-btn {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--card); border: 1px solid var(--line); border-radius: 999px;
  padding: 6px 12px; font-size: 14px; font-weight: 600;
}
.badge-count {
  background: var(--accent); color: var(--accent-ink);
  min-width: 20px; height: 20px; border-radius: 999px; font-size: 12px;
  display: inline-grid; place-items: center; padding: 0 6px;
}

/* 소개 / 공지 */
.hero { padding: 22px 0 6px; }
.hero h1 { margin: 0; font-size: 24px; letter-spacing: -.01em; }
.hero p { margin: 4px 0 0; color: var(--muted); }
.notice {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px 16px; margin-top: 14px; font-size: 13.5px;
}
.notice .bank { font-weight: 700; margin-bottom: 8px; }
.notice .body { margin-top: 10px; color: #4f4741; white-space: pre-wrap; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 1px solid var(--line); background: var(--card);
  border-radius: 12px; padding: 12px 16px; font-weight: 600;
}
.btn.block { width: 100%; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:disabled { opacity: .45; cursor: not-allowed; }
.btn.ghost { background: transparent; }
.btn.sm { padding: 7px 11px; font-size: 13px; border-radius: 10px; }
.btn.danger { color: #b3261e; }
.row { display: flex; gap: 8px; }
.row > * { flex: 1; }

/* 카테고리 / 검색 */
.filters { position: sticky; top: 55px; z-index: 10; background: var(--bg); padding: 12px 0 8px; margin-top: 8px; }
.search {
  width: 100%; border: 1px solid var(--line); background: var(--card);
  border-radius: 12px; padding: 11px 14px; outline: none;
}
.search:focus, .field input:focus, .field textarea:focus, .field select:focus { border-color: var(--accent); }
.chips { display: flex; gap: 6px; overflow-x: auto; padding: 10px 0 2px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; border: 1px solid var(--line); background: var(--card);
  border-radius: 999px; padding: 7px 14px; font-size: 13.5px; white-space: nowrap;
}
.chip.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.chip:disabled { opacity: .35; text-decoration: line-through; }

/* 상품 목록 */
.count { color: var(--muted); font-size: 13px; margin: 6px 0 10px; }
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 12px; }
.card { cursor: pointer; background: none; border: 0; padding: 0; text-align: left; }
.thumb { position: relative; aspect-ratio: 4 / 5; border-radius: 12px; overflow: hidden; background: var(--soft); }
.thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.card:hover .thumb img { transform: scale(1.03); }
.tag {
  position: absolute; top: 8px; left: 8px; font-size: 11px; font-weight: 800;
  background: var(--card); color: var(--accent); border-radius: 6px; padding: 2px 7px; letter-spacing: .04em;
}
.soldout-cover { position: absolute; inset: 0; background: rgba(255,255,255,.55); display: grid; place-items: center; font-weight: 800; color: var(--ink); }
.card .cat { font-size: 12px; color: var(--muted); margin-top: 8px; }
.card .name { font-size: 14px; margin-top: 1px; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.card .price { font-weight: 800; margin-top: 2px; }
.empty { text-align: center; color: var(--muted); padding: 50px 0; }

/* 상품 상세 */
.gallery { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 8px; margin: 14px -16px 0; padding: 0 16px; scrollbar-width: none; }
.gallery::-webkit-scrollbar { display: none; }
.gallery img { flex: none; width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: var(--radius); scroll-snap-align: center; background: var(--soft); }
.dots { display: flex; justify-content: center; gap: 5px; margin-top: 8px; }
.dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--line); }
.dots i.on { background: var(--ink); }
.detail-head { margin-top: 16px; }
.detail-head .cat { color: var(--accent); font-size: 13px; font-weight: 700; }
.detail-head h2 { margin: 2px 0 4px; font-size: 20px; }
.detail-head .price { font-size: 22px; font-weight: 800; }
.desc { white-space: pre-wrap; color: #4f4741; margin-top: 12px; font-size: 14px; }
.opt { margin-top: 18px; }
.opt .label { font-size: 13px; font-weight: 700; margin-bottom: 6px; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 10px; background: var(--card); }
.qty button { background: none; border: 0; width: 36px; height: 36px; font-size: 18px; }
.qty span { min-width: 28px; text-align: center; font-weight: 700; }

.bottom-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  background: color-mix(in srgb, var(--bg) 94%, transparent); backdrop-filter: blur(8px);
  border-top: 1px solid var(--line);
}
.bottom-bar .in { max-width: 520px; margin: 0 auto; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); display: flex; gap: 8px; }
.bottom-bar .in > .btn { flex: 1; }

/* 시트(모달) */
.sheet-bg { position: fixed; top: 0; left: 0; right: 0; height: 100%; background: rgba(30, 24, 20, .45); z-index: 50; display: flex; align-items: flex-end; justify-content: center; }
.sheet {
  width: 100%; max-width: 520px; max-height: 92%; overflow-y: auto; overscroll-behavior: contain;
  background: var(--bg); border-radius: 20px 20px 0 0; padding: 18px 16px calc(24px + env(safe-area-inset-bottom));
  animation: up .22s ease-out;
}
@keyframes up { from { transform: translateY(30px); opacity: 0; } }
.sheet-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.sheet-head h3 { margin: 0; font-size: 18px; }
.x { background: none; border: 0; font-size: 22px; line-height: 1; color: var(--muted); padding: 4px; }

.line-item { display: flex; gap: 12px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 10px; margin-bottom: 8px; }
.line-item img { width: 64px; height: 80px; object-fit: cover; border-radius: 8px; }
.line-item .info { flex: 1; min-width: 0; font-size: 14px; }
.line-item .opt-txt { color: var(--muted); font-size: 12.5px; }
.line-item .bottom { display: flex; justify-content: space-between; align-items: center; margin-top: 6px; }
.link-btn { background: none; border: 0; color: var(--muted); font-size: 12.5px; text-decoration: underline; padding: 0; }

.section-title { font-weight: 800; margin: 20px 0 8px; font-size: 15px; }
.field { margin-bottom: 10px; }
.field label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 4px; }
.field input, .field textarea, .field select {
  width: 100%; border: 1px solid var(--line); background: var(--card);
  border-radius: 10px; padding: 11px 12px; outline: none;
}
.field textarea { resize: vertical; min-height: 70px; }
.field .hint { font-size: 12px; color: var(--muted); margin-top: 3px; }
.addr-row { display: flex; gap: 8px; }
.addr-row input { flex: 1; }

.summary { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; font-size: 14px; }
.summary .r { display: flex; justify-content: space-between; padding: 3px 0; }
.summary .total { border-top: 1px solid var(--line); margin-top: 6px; padding-top: 9px; font-weight: 800; font-size: 16px; }
.bankbox { background: var(--soft); border-radius: 12px; padding: 12px 14px; font-size: 13.5px; margin-top: 10px; }
.check { display: flex; gap: 8px; align-items: flex-start; font-size: 13.5px; margin: 14px 0; }
.check input { margin-top: 3px; accent-color: var(--accent); }

.done { text-align: center; padding: 10px 0; }
.done .big { font-size: 40px; }
.done h3 { margin: 6px 0 4px; }
.done .no { font-weight: 800; font-size: 18px; letter-spacing: .03em; }

.order-card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin-bottom: 10px; font-size: 14px; }
.order-card .head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.order-card .no { font-weight: 800; }
.order-card .meta { color: var(--muted); font-size: 12.5px; }
.order-card ul { margin: 8px 0; padding-left: 18px; }
.status { font-size: 12px; font-weight: 700; border-radius: 999px; padding: 3px 10px; background: var(--soft); white-space: nowrap; }
.s-new { background: #fdf0d5; color: #8a5a00; }
.s-paid { background: #dff1e4; color: #1d6b37; }
.s-prep { background: #e3ecfb; color: #2251a3; }
.s-ship { background: #e8e2f8; color: #5a3ea8; }
.s-done { background: #ece9e6; color: #5c544e; }
.s-cancel { background: #fbe3e1; color: #a2271f; }

.demo-banner { background: #fff6d6; color: #6b5200; font-size: 12.5px; text-align: center; padding: 6px 12px; }

#toast {
  position: fixed; left: 50%; bottom: 96px; transform: translate(-50%, 20px); opacity: 0;
  background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 999px; font-size: 14px;
  transition: .2s; z-index: 100; pointer-events: none; white-space: nowrap;
}
#toast.show { opacity: 1; transform: translate(-50%, 0); }

footer.foot { color: var(--muted); font-size: 12px; text-align: center; margin-top: 40px; }

/* 관리자 */
.admin-tabs { display: flex; gap: 6px; margin: 14px 0; }
.admin-tabs .chip { flex: 1; text-align: center; }
.p-row { display: flex; gap: 12px; align-items: center; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 10px; margin-bottom: 8px; }
.p-row img { width: 52px; height: 64px; object-fit: cover; border-radius: 8px; background: var(--soft); }
.p-row .info { flex: 1; min-width: 0; font-size: 14px; }
.p-row .info .sub { color: var(--muted); font-size: 12.5px; }
.img-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.img-list .im { width: 84px; display: flex; flex-direction: column; gap: 5px; }
.img-list .im .pic { position: relative; width: 84px; height: 105px; }
.img-list .im .pic img { width: 100%; height: 100%; object-fit: cover; border-radius: 8px; }
.img-list .im .rm { position: absolute; top: -6px; right: -6px; width: 22px; height: 22px; border-radius: 50%; border: 0; background: var(--ink); color: #fff; font-size: 12px; line-height: 1; }
.img-list .im .first, .img-list .im .make-first { font-size: 11.5px; text-align: center; border-radius: 6px; padding: 4px 0; }
.img-list .im .first { background: var(--accent); color: #fff; font-weight: 700; }
.img-list .im .make-first { background: var(--card); border: 1px solid var(--line); color: var(--ink); }
.field label.upload, .upload { width: 84px; height: 105px; display: grid !important; margin: 0; font-weight: 400; border: 1.5px dashed var(--line); border-radius: 8px; display: grid; place-items: center; color: var(--muted); font-size: 24px; background: var(--card); cursor: pointer; }
.toggle-row { display: flex; gap: 16px; margin: 8px 0 14px; font-size: 14px; }
.toggle-row label { display: flex; gap: 6px; align-items: center; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 12px; }
.stats div { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 10px; text-align: center; font-size: 12.5px; color: var(--muted); }
.stats b { display: block; font-size: 18px; color: var(--ink); }

/* Netlify 무료 플랜 배지 숨김 */
#nl-badge-frame { display: none !important; }

/* 색상·사이즈 하나씩 추가 */
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; min-height: 22px; }
.tags .hint { font-size: 12.5px; color: var(--muted); }
.tag-chip { display: inline-flex; align-items: center; gap: 4px; background: var(--ink); color: #fff; border-radius: 999px; padding: 5px 6px 5px 12px; font-size: 13.5px; }
.tag-chip button { background: rgba(255,255,255,.18); border: 0; color: #fff; width: 20px; height: 20px; border-radius: 50%; font-size: 11px; line-height: 1; }
.quick { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.quick .chip { padding: 6px 11px; font-size: 13px; }
.quick .chip:disabled { text-decoration: none; }

/* 사이즈별 추가금액 */
.extras { background: var(--soft); border-radius: 10px; padding: 10px 12px; margin-top: 10px; }
.extras-title { font-size: 13px; font-weight: 700; margin-bottom: 6px; }
.extras .hint { font-weight: 400; color: var(--muted); font-size: 12px; }
.field label.extra-row { display: flex; justify-content: space-between; align-items: center; font-weight: 600; margin: 6px 0 0; font-size: 14px; }
.won-in { display: inline-flex; align-items: center; gap: 4px; font-weight: 400; color: var(--muted); }
.field .won-in input { width: 96px; padding: 7px 9px; text-align: right; }
.chip small { font-size: 11.5px; opacity: .75; }

/* 관리자 상품 목록: 게시글 보기 */
.p-row .p-link { display: flex; gap: 12px; align-items: center; flex: 1; min-width: 0; text-decoration: none; color: inherit; }
.p-row .p-link:hover .info > div:first-child { text-decoration: underline; }
.p-actions { display: flex; flex-direction: column; gap: 6px; }
.p-actions .btn { text-decoration: none; }
.saved-banner { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 12px; padding: 12px 14px; border-radius: 12px; background: #dff1e4; color: #1d6b37; text-decoration: none; font-size: 14px; }

/* 게시글: 대표 사진 + 상세 이미지 세로 나열 */
.cover { margin-top: 14px; }
.cover img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: var(--radius); background: var(--soft); }
.detail-images { margin: 28px -16px 0; border-top: 1px solid var(--line); padding-top: 18px; }
.detail-title { font-weight: 800; font-size: 15px; padding: 0 16px 12px; }
.detail-images img { width: 100%; height: auto; display: block; }

/* 관리자: 상세 이미지 순서 */
.img-list .im .order { position: absolute; left: 5px; top: 5px; background: rgba(0,0,0,.55); color: #fff; font-size: 11px; border-radius: 5px; padding: 0 6px; }
.img-list .im .move { display: flex; gap: 4px; }
.img-list .im .move button { flex: 1; border: 1px solid var(--line); background: var(--card); border-radius: 6px; padding: 2px 0; font-size: 15px; line-height: 1.2; }
.img-list .im .move button:disabled { opacity: .3; }
.field label.make-first { display: block; margin: 0; cursor: pointer; font-weight: 400; }

/* 주문 상태 관리 */
.stats.four { grid-template-columns: repeat(4, 1fr); margin-bottom: 6px; }
.stats .stat { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 10px 4px; text-align: center; font: inherit; font-size: 12px; color: var(--muted); cursor: pointer; }
.stats .stat b { display: block; font-size: 18px; color: var(--ink); }
.stats .stat.on { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.sales-line { font-size: 12.5px; color: var(--muted); text-align: right; margin-bottom: 10px; }
.sales-line b { color: var(--ink); }
.o-search { width: 100%; box-sizing: border-box; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; font: inherit; font-size: 14px; background: var(--card); }
.sel-all { display: flex; gap: 6px; align-items: center; font-size: 13px; color: var(--muted); margin: 0 2px 8px; }
.order-card .pick { display: flex; gap: 6px; align-items: center; }
.order-card input[type=checkbox], .sel-all input { width: 18px; height: 18px; accent-color: var(--accent); margin: 0; }
.order-card.picked { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.order-card.canceled { opacity: .6; }
.order-card .late { color: #a2271f; font-weight: 700; }
.steps { display: grid; grid-template-columns: repeat(5, 1fr); gap: 3px; margin: 8px 0 2px; }
.steps span { font-size: 10.5px; text-align: center; color: var(--muted); padding-top: 6px; border-top: 3px solid var(--line); }
.steps span.on { color: var(--ink); font-weight: 700; border-top-color: var(--accent); }
.next-btn { margin-top: 10px; }
.o-tools { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; justify-content: space-between; margin-top: 10px; }
.o-tools label { display: flex; gap: 6px; align-items: center; }
.link-btn.danger { color: #a2271f; }
.bulk-bar { position: fixed; left: 50%; transform: translateX(-50%); bottom: 16px; width: calc(100% - 32px); max-width: 560px; box-sizing: border-box; display: grid; gap: 8px; background: var(--ink); color: #fff; border-radius: 14px; padding: 10px 12px; z-index: 50; font-size: 14px; }
.bulk-bar .row1, .bulk-bar .row2 { display: flex; gap: 8px; align-items: center; }
.bulk-bar .row1 span { flex: 1; }
.bulk-bar .row2 select { flex: 1; }
.bulk-bar .btn.ghost { color: #fff; border-color: rgba(255,255,255,.4); }
#bulkbar:not(:empty) { height: 110px; }
.bulk-bar select { color: var(--ink); background: #fff; }

/* 옵션 선택 서랍 */
.sheet-actions { display: grid; grid-template-columns: 1fr 1.4fr; gap: 8px; margin-top: 14px; }
.sheet #opts .opt:first-child { margin-top: 4px; }

/* 택배 선택 (합배송) */
.ship-box { display: grid; gap: 8px; }
.ship-opt { display: grid; gap: 3px; text-align: left; font: inherit; background: var(--card); border: 1.5px solid var(--line); border-radius: 12px; padding: 11px 13px; cursor: pointer; color: var(--ink); }
.ship-opt .t { font-weight: 700; font-size: 14.5px; }
.ship-opt .t small { font-weight: 600; color: var(--accent); margin-left: 4px; }
.ship-opt .d { font-size: 12.5px; color: var(--muted); }
.ship-opt .n { font-size: 12px; color: var(--muted); }
.ship-opt .n.ok { color: #1d6b37; font-weight: 600; }
.ship-opt.on { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.ship-opt:disabled { opacity: .55; cursor: not-allowed; }
.order-card .combine { margin-top: 8px; background: #eef4ff; color: #2251a3; border-radius: 8px; padding: 7px 10px; font-size: 12.5px; }
.order-card .combine.warn { background: #fbe3e1; color: #a2271f; }

/* 계좌 복사 · 공유 · 조회 */
.copy-btn { font: inherit; font-size: 12px; font-weight: 700; border: 1px solid var(--line); background: var(--card); color: var(--ink); border-radius: 999px; padding: 3px 10px; margin-left: 4px; vertical-align: 1px; cursor: pointer; white-space: nowrap; }
.title-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.share-btn { flex: none; font: inherit; font-size: 13px; border: 1px solid var(--line); background: var(--card); color: var(--ink); border-radius: 999px; padding: 6px 12px; margin-top: 2px; cursor: pointer; }
.lk-count { font-size: 13px; color: var(--muted); margin: 0 2px 8px; }
#lk-result .bankbox { margin-top: 10px; }

/* 관리자: 상품 빠른 설정 · 탭 배지 */
.p-row { flex-wrap: wrap; }
.p-quick { flex-basis: 100%; display: flex; gap: 6px; padding-left: 64px; }
.p-quick .mini { font: inherit; font-size: 12px; border: 1px solid var(--line); background: var(--card); color: var(--ink); border-radius: 999px; padding: 4px 10px; cursor: pointer; }
.p-quick .mini.on { background: var(--soft); font-weight: 700; }
.p-quick .mini.danger { color: #a2271f; border-color: #e9b9b4; }
.tab-badge { display: inline-block; min-width: 18px; padding: 0 5px; border-radius: 999px; background: var(--accent); color: #fff; font-size: 11px; line-height: 18px; margin-left: 2px; }
.field input.invalid, input.invalid { border-color: #c0392b !important; box-shadow: 0 0 0 3px rgba(192,57,43,.15); }

/* 관리자: 오픈 전 체크리스트 · 기간 선택 */
.setup-box { background: #fff6d6; border: 1px solid #f0dc9a; border-radius: 12px; padding: 10px 12px; margin: 0 0 12px; font-size: 13.5px; color: #6b5200; display: grid; gap: 4px; }
.setup-item { font: inherit; text-align: left; background: none; border: 0; color: inherit; padding: 2px 0; display: flex; justify-content: space-between; gap: 8px; cursor: pointer; }
.setup-item span { opacity: .6; }
.sales-line { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.month-sel { font: inherit; font-size: 12.5px; border: 1px solid var(--line); border-radius: 8px; padding: 4px 6px; background: var(--card); color: var(--ink); }

/* 상품 페이지 요약 표 */
.info-table { margin: 14px 0 0; padding: 10px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); display: grid; gap: 6px; font-size: 13.5px; }
.info-table div { display: flex; gap: 12px; }
.info-table dt { width: 48px; flex: none; color: var(--muted); }
.info-table dd { margin: 0; }
.info-table small { color: var(--muted); }

/* 사진 크게 보기 */
.cover { position: relative; }
/* 사진을 버튼으로 감싸 아이폰에서도 탭이 확실히 인식되게 */
.zoom-btn { display: block; width: 100%; padding: 0; margin: 0; border: 0; background: none; cursor: zoom-in; font: inherit; -webkit-tap-highlight-color: transparent; }
.zoom-btn img { display: block; }
[data-open] { cursor: pointer; }
.zoom-hint { position: absolute; right: 10px; bottom: 10px; background: rgba(30,24,20,.55); color: #fff; font-size: 11.5px; padding: 4px 9px; border-radius: 999px; pointer-events: none; }
.sheet-bg.viewer { background: #111; align-items: stretch; }
.sheet-bg.viewer .sheet { background: #111; max-height: 100%; height: 100%; border-radius: 0; padding: 0; animation: none; max-width: 720px; display: flex; flex-direction: column; }
.viewer-in { margin: auto 0; padding: 0 0 20px; }
.sheet-bg.viewer .sheet img { width: 100%; height: auto; display: block; margin-bottom: 4px; }
.viewer-x { position: sticky; top: 10px; align-self: flex-end; flex: none; margin: 10px 10px -46px 0; z-index: 2; width: 36px; height: 36px; border-radius: 50%; border: 0; background: rgba(255,255,255,.9); font-size: 16px; cursor: pointer; }
.viewer-hint { color: #aaa; font-size: 12px; text-align: center; padding: 12px; }

/* 무료배송 진행 막대 */
.free-bar { display: grid; gap: 5px; margin: 6px 0 2px; font-size: 12.5px; color: var(--muted); }
.free-bar .track { height: 6px; background: var(--soft); border-radius: 999px; overflow: hidden; }
.free-bar .track i { display: block; height: 100%; background: var(--accent); border-radius: 999px; }
.free-bar b { color: var(--accent); }
.free-bar.done { color: #1d6b37; font-weight: 600; }

/* 주문 완료 버튼 */
.done-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 14px; }

/* 첫 화면 불러오는 중 */
.skeleton .sk { background: linear-gradient(90deg, var(--soft) 25%, #efe8e0 50%, var(--soft) 75%); background-size: 200% 100%; animation: sk 1.2s infinite; border-radius: 10px; }
.skeleton .sk-title { height: 30px; width: 55%; margin: 24px 0 12px; }
.skeleton .sk-box { height: 120px; margin-bottom: 20px; }
.skeleton .sk-thumb { aspect-ratio: 4 / 5; }
.skeleton .sk-line { height: 12px; margin-top: 8px; width: 80%; }
.skeleton .sk-line.short { width: 45%; }
@keyframes sk { to { background-position: -200% 0; } }
.order-card .repeat { font-size: 11.5px; font-weight: 700; color: var(--accent); background: #fbeee8; border-radius: 999px; padding: 2px 8px; margin-left: 4px; white-space: nowrap; }
#toast { max-width: calc(100% - 40px); white-space: normal; text-align: center; box-sizing: border-box; }

/* 서랍 안 주소 검색 */
#postcode-box { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; margin: -4px 0 12px; background: #fff; }
#postcode-box .pc-head { display: flex; justify-content: space-between; align-items: center; padding: 8px 12px; font-size: 13px; font-weight: 700; border-bottom: 1px solid var(--line); background: var(--card); }
#postcode-box .pc-body { height: 420px; }
.o-foot { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

/* 사업자 정보 · 개인정보 안내 */
footer.foot { display: grid; gap: 8px; line-height: 1.6; padding-bottom: 20px; }
footer.foot .biz { font-size: 11.5px; }
footer.foot .sep { opacity: .5; }
.privacy summary { cursor: pointer; text-decoration: underline; font-size: 12px; }
.privacy-dl { text-align: left; margin: 8px 0 4px; display: grid; gap: 4px; font-size: 12px; }
.privacy-dl div { display: flex; gap: 10px; }
.privacy-dl dt { width: 60px; flex: none; font-weight: 700; }
.privacy-dl dd { margin: 0; }
.privacy-note { font-size: 11.5px; margin: 4px 0 0; text-align: left; }
.privacy.inline { margin-top: 4px; color: var(--muted); }
.privacy.inline summary { font-size: 12px; }

/* 옵션 서랍: 고르기 전 안내 */
.opt-need { margin-top: 10px; font-size: 13px; color: var(--accent); font-weight: 600; text-align: center; }
.sheet-actions .btn:disabled { opacity: .4; cursor: not-allowed; }
.bottom-bar .in > .btn.primary:only-child { flex: 1; }
