@charset "utf-8";
/* 삼신담 모듈형 동화책 미리보기 */
.sd-shop__container:has(.sd-book) > .sd-pagehead { display: none; }
.sd .sd-main #container.sd-shop__container:has(.sd-book) { width: min(1300px, 100% - 48px); padding-top: 56px; }

.sd-book__intro { text-align: center; margin-bottom: 40px; }
.sd-book__title { margin: 12px 0 0; font-family: var(--sd-serif); font-weight: 600; font-size: 36px; line-height: 1.35; letter-spacing: -.04em; color: var(--sd-ink); }
.sd-book__lead { margin: 10px 0 0; font-size: 15px; color: var(--sd-muted); }

.sd-book__layout { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 40px; align-items: start; }

/* ---------- 미리보기 ---------- */
.sd-book__viewer { position: sticky; top: 104px; }
.sd-book__stage {
    position: relative; padding: 28px; border-radius: 16px;
    background: radial-gradient(120% 80% at 50% 0%, #fbf8f1 0%, #f2ecdc 100%);
    border: 1px solid #ebe6db;
}
.sd-book__flip { margin: 0 auto; }
.sd-pg { background: #fff; overflow: hidden; container-type: inline-size; user-select: none; -webkit-user-select: none; }
.sd-pg__img { position: absolute; inset: 0; background: #eef1f6 no-repeat; background-size: 200% 100%; transition: opacity .35s; }
.sd-pg--left .sd-pg__img { background-position: left center; }
.sd-pg--right .sd-pg__img { background-position: right center; }
.sd-pg__texts { position: absolute; inset: 0; pointer-events: none; }
.sd-tx {
    position: absolute; margin: 0; transform: translateX(-50%); white-space: nowrap; text-align: center;
    font-family: var(--sd-serif); font-weight: 500; font-size: 2.3cqw; line-height: 1.75; color: #2e2b26;
    text-shadow: 0 0 6px rgba(255,255,255,.55);
}
.sd-tx--l { font-size: 3.05cqw; line-height: 1.65; }
.sd-name { font-weight: inherit; color: inherit; }
.has-name .sd-name { color: #5e332b; font-weight: 700; }
.sd-pg__mark {
    position: absolute; right: 4%; bottom: 3%; font-size: 1.6cqw; letter-spacing: .2em; font-weight: 700;
    color: rgba(255,255,255,.55); text-shadow: 0 1px 2px rgba(0,0,0,.15); pointer-events: none;
}
.sd-book__flip.is-fallback { display: grid; grid-template-columns: 1fr 1fr; aspect-ratio: 2 / 1; }
.sd-book__flip.is-fallback .sd-pg { position: relative; aspect-ratio: 1 / 1; }
.sd-book__flip.is-fallback .sd-pg[hidden] { display: none; }

.sd-book__loading {
    position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 5;
    display: flex; align-items: center; gap: 10px; padding: 10px 16px; border-radius: 99px;
    background: rgba(255,253,248,.95); box-shadow: 0 6px 20px rgba(0,0,0,.08); font-size: 13px; color: var(--sd-muted);
}
.sd-book__loading[hidden] { display: none; }
.sd-book__loading span { width: 14px; height: 14px; border-radius: 50%; border: 2px solid #d9d2c5; border-top-color: var(--sd-green); animation: sd-spin .8s linear infinite; }
@keyframes sd-spin { to { transform: rotate(360deg); } }

.sd-book__nav { display: flex; align-items: center; justify-content: center; gap: 18px; margin-top: 16px; }
.sd-shop .sd-book__arrow {
    width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center;
    background: #fff; border: 1px solid #e2ddd3; color: var(--sd-green); transition: background-color .2s, border-color .2s;
}
.sd-shop .sd-book__arrow:hover { border-color: var(--sd-green); background: #f8f4eb; }
.sd-book__page { min-width: 60px; text-align: center; font-size: 14px; font-weight: 600; color: var(--sd-body); font-variant-numeric: tabular-nums; }
.sd-book__hint { margin: 10px 0 0; text-align: center; font-size: 12px; color: #8a8478; }

/* ---------- 선택 패널 ---------- */
.sd-book__panel { margin: 0; padding: 8px 24px 24px; background: #fff; border: 1px solid #ebe6db; border-radius: 16px; }
.sd-opt { margin: 0; padding: 20px 0; border: 0; border-bottom: 1px solid #f2ede3; min-width: 0; }
.sd-opt legend { float: left; width: 100%; margin: 0 0 12px; padding: 0; font-size: 14px; font-weight: 700; color: var(--sd-ink); }
.sd-opt legend b {
    display: inline-grid; place-items: center; width: 22px; height: 22px; margin-right: 6px; border-radius: 50%;
    background: var(--sd-green); color: #fff; font-size: 12px;
}
.sd-opt > :not(legend) { clear: both; }
.sd-opt input[type="radio"] { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }

.sd-opt__stories { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.sd-story { position: relative; display: flex; flex-direction: column; gap: 6px; cursor: pointer; text-align: center; }
.sd-story__img { display: block; aspect-ratio: 1; border-radius: 10px; overflow: hidden; background: #f2ecdc; border: 2px solid transparent; transition: border-color .2s; }
.sd-story__img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sd-story__name { font-size: 12px; font-weight: 600; color: var(--sd-body); }
.sd-story__soon { position: absolute; left: 50%; top: 32%; transform: translateX(-50%); padding: 3px 8px; border-radius: 99px; background: rgba(255,255,255,.9); font-size: 11px; color: #9a887a; white-space: nowrap; }
.sd-story.is-soon { cursor: default; opacity: .6; }
.sd-story input:checked + .sd-story__img { border-color: var(--sd-green); }
.sd-story input:checked ~ .sd-story__name { color: var(--sd-green); }

.sd-opt__pills { display: flex; gap: 8px; }
.sd-pill { flex: 1; cursor: pointer; }
.sd-pill span {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 46px; padding: 6px 10px;
    border: 1px solid #e2ddd3; border-radius: 10px; font-size: 14px; font-weight: 600; color: var(--sd-body); transition: all .2s;
}
.sd-pill em { font-style: normal; font-size: 12px; font-weight: 500; color: #8a8478; }
.sd-pill input:checked + span { border-color: var(--sd-green); background: #f6f2ec; color: var(--sd-green); box-shadow: inset 0 0 0 1px var(--sd-green); }
.sd-pill input:checked + span em { color: var(--sd-green); }
.sd-pill input:focus-visible + span, .sd-thumb input:focus-visible ~ img, .sd-swatch input:focus-visible + i { outline: 2px solid var(--sd-green); outline-offset: 2px; }

.sd-opt__thumbs { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.sd-opt__thumbs--3 { grid-template-columns: repeat(3, 1fr); }
.sd-thumb { display: flex; flex-direction: column; gap: 6px; cursor: pointer; text-align: center; }
.sd-thumb[hidden] { display: none; }
.sd-thumb img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 12px; border: 2px solid transparent; transition: border-color .2s, transform .2s; }
.sd-thumb:hover img { transform: translateY(-2px); }
.sd-thumb span { font-size: 12px; font-weight: 600; color: var(--sd-body); }
.sd-thumb input:checked ~ img { border-color: var(--sd-green); box-shadow: 0 6px 16px rgba(72,46,41,.15); }
.sd-thumb input:checked ~ span { color: var(--sd-green); }

.sd-opt__swatches { display: flex; gap: 18px; }
.sd-swatch { display: flex; flex-direction: column; align-items: center; gap: 6px; cursor: pointer; }
.sd-swatch i { width: 40px; height: 40px; border-radius: 50%; box-shadow: inset 0 -4px 8px rgba(0,0,0,.18); border: 3px solid #fff; outline: 1px solid #e2ddd3; transition: outline-color .2s; }
.sd-swatch span { font-size: 12px; color: var(--sd-body); }
.sd-swatch input:checked + i { outline: 2px solid var(--sd-green); }
.sd-swatch input:checked ~ span { color: var(--sd-green); font-weight: 600; }

.sd-shop .sd-opt__input {
    width: 100%; height: 50px; padding: 0 14px; border: 1px solid var(--sd-line); border-radius: 10px; font-size: 16px; background: #fff;
}
.sd-shop .sd-opt__input:focus { border-color: var(--sd-green); box-shadow: 0 0 0 4px rgba(72,46,41,.1); outline: none; }
.sd-opt__help { margin: 8px 0 0; font-size: 12px; color: #8a8478; }

.sd-book__summary { padding-top: 20px; }
.sd-book__picked { margin: 0 0 12px; font-size: 13px; line-height: 1.6; color: var(--sd-muted); }
.sd-book__price { display: flex; align-items: baseline; justify-content: space-between; margin: 0 0 14px; }
.sd-book__price span { font-size: 14px; color: var(--sd-body); }
.sd-book__price strong { font-family: var(--sd-serif); font-size: 26px; color: var(--sd-green); }
.sd-shop .sd-book__cta {
    width: 100%; height: 56px; border-radius: 10px; border: 0; font-size: 16px; font-weight: 700;
    background: var(--sd-green); color: #fff; cursor: pointer;
}
.sd-shop .sd-book__cta:disabled { background: #d9d2c5; color: #fff; cursor: default; }
.sd-book__note { margin: 10px 0 0; font-size: 12px; line-height: 1.6; color: #8a8478; text-align: center; }

@media (max-width: 1080px) {
    .sd-book__layout { grid-template-columns: 1fr; }
    .sd-book__viewer { position: static; }
}
@media (max-width: 860px) {
    .sd .sd-main #container.sd-shop__container:has(.sd-book) { width: auto; padding-top: 28px; }
    .sd-book__title { font-size: 26px; }
    .sd-book__stage { padding: 12px; border-radius: 12px; }
    .sd-book__panel { padding: 4px 18px 20px; }
}

/* 그누보드 기본 legend 숨김 해제 */
.sd-shop .sd-opt legend {
    position: static; width: 100%; height: auto; overflow: visible; text-indent: 0;
    font-size: 14px; line-height: 22px; border: 0;
}

/* 모바일 넘침 방지 */
.sd-book, .sd-book__layout > * { min-width: 0; max-width: 100%; }
.sd-book__flip { max-width: 100%; }
@media (max-width: 860px) {
    .sd .sd-main #container.sd-shop__container:has(.sd-book) { width: auto; margin: 0 16px; }
    .sd-book__title { font-size: 24px; }
    .sd-book__intro { margin-bottom: 24px; }
    .sd-tx { font-size: 2.6cqw; }
    .sd-tx--l { font-size: 3.3cqw; }
}

/* ---------- 크게 보기 버튼 ---------- */
.sd-shop .sd-book__full {
    position: absolute; right: 0; display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 14px;
    border-radius: 99px; border: 1px solid #e2ddd3; background: #fff; color: var(--sd-green); font-size: 13px; font-weight: 600;
    transition: background-color .2s, border-color .2s;
}
.sd-shop .sd-book__full:hover { border-color: var(--sd-green); background: #f8f4eb; }
.sd-book__nav { position: relative; }
.sd-book__full .sd-ico-close { display: none; }

/* ---------- 크게 보기 모드 ---------- */
html.sd-book-full { overflow: hidden; }
html.sd-book-full .sd-header, html.sd-book-full .sd-totop { visibility: hidden; }
.sd-book__viewer.is-full {
    position: fixed; inset: 0; z-index: 2000; top: 0;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0;
    padding: 24px 24px 20px; background: #231d1b;
    animation: sd-full-in .25s ease;
}
@keyframes sd-full-in { from { opacity: 0; } to { opacity: 1; } }
.sd-book__viewer.is-full .sd-book__stage {
    width: 100%; padding: 0; background: none; border: 0; border-radius: 0;
    display: flex; justify-content: center; align-items: center; flex: 1; min-height: 0;
}
/* 양면 펼침(2:1) 기준: 화면 폭과 높이 중 작은 쪽에 맞춤 */
.sd-book__viewer.is-full .sd-book__flip { width: min(100%, calc((100dvh - 120px) * 2)); margin: 0 auto; }
.sd-book__viewer.is-full .sd-book__nav { margin-top: 14px; width: min(100%, 1400px); }
.sd-shop .sd-book__viewer.is-full .sd-book__arrow,
.sd-shop .sd-book__viewer.is-full .sd-book__full { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.25); color: #fff; }
.sd-shop .sd-book__viewer.is-full .sd-book__arrow:hover,
.sd-shop .sd-book__viewer.is-full .sd-book__full:hover { background: rgba(255,255,255,.2); }
.sd-book__viewer.is-full .sd-book__page { color: rgba(255,255,255,.85); }
.sd-book__viewer.is-full .sd-book__hint { display: none; }
.sd-book__viewer.is-full .sd-book__full .sd-ico-open { display: none; }
.sd-book__viewer.is-full .sd-book__full .sd-ico-close { display: block; }

@media (max-width: 860px) {
    .sd-shop .sd-book__full { position: static; padding: 0 12px; }
    .sd-book__nav { gap: 12px; }
    .sd-book__viewer.is-full { padding: 16px 12px; }
    /* 한 쪽씩(1:1) 보이는 모바일 기준 */
    .sd-book__viewer.is-full .sd-book__flip { width: min(100%, calc(100dvh - 120px)); }
}

/* ---------- 크게 보기 v2: 크기 제한은 바깥(stage)에서, 버튼은 화면에 고정 ---------- */
.sd-book__viewer.is-full { padding: 64px 24px 92px; }
.sd-book__viewer.is-full .sd-book__stage {
    flex: none; display: block;
    width: min(100%, calc((100dvh - 156px) * 2));   /* 양면(2:1) 높이가 화면을 넘지 않도록 */
}
.sd-book__viewer.is-full .sd-book__flip { width: 100%; }
.sd-book__viewer.is-full .sd-book__nav {
    position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 2010;
    width: auto; margin: 0; padding: 8px 14px; gap: 14px;
    background: rgba(24,20,20,.85); border: 1px solid rgba(255,255,255,.12); border-radius: 99px;
    box-shadow: 0 10px 30px rgba(0,0,0,.35); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.sd-shop .sd-book__viewer.is-full .sd-book__arrow { width: 44px; height: 44px; background: rgba(255,255,255,.14); border-color: rgba(255,255,255,.3); color: #fff; }
.sd-shop .sd-book__viewer.is-full .sd-book__arrow:hover { background: rgba(255,255,255,.26); }
.sd-book__viewer.is-full .sd-book__page { color: #fff; font-size: 15px; }
.sd-shop .sd-book__viewer.is-full .sd-book__full {
    position: fixed; top: 14px; right: 16px; z-index: 2010; height: 42px; padding: 0 16px;
    background: #fff; border-color: #fff; color: var(--sd-ink); font-size: 14px;
    box-shadow: 0 6px 20px rgba(0,0,0,.3);
}
.sd-shop .sd-book__viewer.is-full .sd-book__full:hover { background: #f2ecdc; }
@media (max-width: 860px) {
    .sd-book__viewer.is-full { padding: 64px 12px 92px; }
    .sd-book__viewer.is-full .sd-book__stage { width: min(100%, calc(100dvh - 156px)); }  /* 한 쪽(1:1) 기준 */
    .sd-shop .sd-book__viewer.is-full .sd-book__full { position: fixed; }
}
/* transform·backdrop-filter 는 안쪽 position:fixed(닫기 버튼)의 기준을 바꾸므로 사용하지 않음 */
.sd-book__viewer.is-full .sd-book__nav {
    left: 0; right: 0; transform: none; width: fit-content; margin: 0 auto;
    -webkit-backdrop-filter: none; backdrop-filter: none; background: rgba(24,20,20,.94);
}

/* =========================================================
   미리보기 아래 요약 카드 + 상품 상세
   ========================================================= */
.sd-book__viewer { position: static; }
@media (min-width: 1081px) {
    .sd-book__viewer { position: sticky; top: 100px; }   /* 화면이 충분히 클 때만 따라 내려옴 */
}
.sd-book__info {
    margin-top: 18px; padding: 18px 20px; border-radius: 14px; background: #fff; border: 1px solid #ebe6db;
    display: flex; flex-direction: column; gap: 14px;
}
.sd-book__info-row { display: flex; align-items: baseline; gap: 12px; }
.sd-book__info-label { flex: none; font-size: 12px; font-weight: 700; color: var(--sd-green); }
.sd-book__info-picked { margin: 0; font-size: 13px; line-height: 1.6; color: var(--sd-ink); }
.sd-book__chips { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 0; padding: 0; list-style: none; }
.sd-book__chips li { display: flex; flex-direction: column; gap: 3px; padding: 10px 12px; border-radius: 10px; background: #f8f4eb; }
.sd-book__chips span { font-size: 11px; color: #8a8478; }
.sd-book__chips b { font-size: 13px; font-weight: 700; color: var(--sd-ink); }
.sd-book__extras { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0; font-size: 12px; color: #8a8478; }
.sd-book__extras span { margin-right: 4px; }
.sd-book__extras em { font-style: normal; padding: 4px 10px; border-radius: 99px; background: #f2ece4; color: #5d3f39; font-weight: 600; }

/* ---------- 상세 ---------- */
.sd-detail { margin-top: 96px; }
.sd-detail__tabs {
    position: sticky; top: 83px; z-index: 20; display: flex; justify-content: center; gap: 4px;
    background: rgba(255,253,248,.96); border-bottom: 1px solid #e2ddd3; margin-bottom: 8px;
}
.sd-shop .sd-detail__tabs a {
    position: relative; padding: 18px 22px; font-size: 15px; font-weight: 600; color: #8a8478 !important;
}
.sd-shop .sd-detail__tabs a.is-active { color: var(--sd-ink) !important; }
.sd-detail__tabs a.is-active::after { content: ""; position: absolute; left: 22px; right: 22px; bottom: -1px; height: 2px; background: var(--sd-green); }
.sd-detail__sec { padding: 72px 0 24px; scroll-margin-top: 150px; }
.sd-detail__sec + .sd-detail__sec { border-top: 1px solid #f0ebe1; }
.sd-detail__title { margin: 0 0 24px; font-family: var(--sd-serif); font-weight: 600; font-size: 26px; letter-spacing: -.03em; color: var(--sd-ink); }
.sd-detail__title-row { display: flex; align-items: baseline; justify-content: space-between; }
.sd-shop .sd-detail__more { font-size: 14px; color: var(--sd-green) !important; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.sd-detail__sub { margin: 48px 0 16px; font-family: var(--sd-serif); font-weight: 600; font-size: 20px; color: var(--sd-ink); }
.sd-detail__caption { margin: 14px 0 0; text-align: center; font-size: 13px; color: #8a8478; }

.sd-detail__lead { text-align: center; max-width: 720px; margin: 0 auto 48px; }
.sd-detail__h { margin: 12px 0 14px; font-family: var(--sd-serif); font-weight: 600; font-size: 36px; line-height: 1.4; letter-spacing: -.04em; color: var(--sd-ink); }
.sd-detail__lead p:last-child { margin: 0; font-size: 16px; line-height: 1.8; color: var(--sd-muted); }
.sd-detail__features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 0 0 48px; padding: 0; list-style: none; }
.sd-detail__features li { padding: 28px 26px; border-radius: 14px; background: #f8f4eb; }
.sd-detail__badge { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: #fff; font-family: var(--sd-serif); font-size: 14px; color: var(--sd-green); }
.sd-detail__features h3 { margin: 16px 0 8px; font-family: var(--sd-serif); font-weight: 600; font-size: 19px; color: var(--sd-ink); }
.sd-detail__features p { margin: 0; font-size: 14px; line-height: 1.75; color: var(--sd-body); }
.sd-detail__gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.sd-detail__gallery figure { margin: 0; }
.sd-detail__gallery img { width: 100%; aspect-ratio: 2 / 1; object-fit: cover; border-radius: 12px; background: #eef1f6; display: block; }
.sd-detail__gallery figcaption { margin-top: 10px; text-align: center; font-family: var(--sd-serif); font-size: 14px; color: var(--sd-body); }

.sd-detail__table { width: 100%; border-collapse: collapse; border-top: 1px solid var(--sd-ink); font-size: 14px; }
.sd-detail__table th { width: 200px; padding: 16px 20px; text-align: left; vertical-align: top; background: #f8f4eb; color: #4e493f; font-weight: 600; border-bottom: 1px solid #e8e2d6; }
.sd-detail__table td { padding: 16px 20px; color: var(--sd-body); border-bottom: 1px solid #e8e2d6; line-height: 1.6; }
.sd-detail__price + .sd-detail__price::before { content: "·"; margin: 0 8px; color: #c9c1b3; }

.sd-detail__steps { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; margin: 0; padding: 0; list-style: none; counter-reset: none; }
.sd-detail__steps li { padding: 22px 18px; border-radius: 12px; background: #f2ece4; }
.sd-detail__no { font-family: var(--sd-serif); font-size: 13px; color: rgba(72,46,41,.5); }
.sd-detail__steps strong { display: block; margin: 10px 0 6px; font-family: var(--sd-serif); font-weight: 600; font-size: 15px; color: var(--sd-ink); }
.sd-detail__steps p { margin: 0; font-size: 12.5px; line-height: 1.65; color: #6b5e5c; }

.sd-detail__reviews { padding: 0; }

.sd-detail__policy { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 0; }
.sd-detail__policy > div { padding: 24px 24px 20px; border: 1px solid #ebe6db; border-radius: 14px; background: #fff; }
.sd-detail__policy dt { margin: 0 0 12px; font-family: var(--sd-serif); font-weight: 600; font-size: 17px; color: var(--sd-ink); }
.sd-detail__policy dd { margin: 0; }
.sd-detail__policy ul { margin: 0; padding: 0 0 0 16px; list-style: disc; }
.sd-detail__policy li { margin: 0 0 8px; font-size: 13.5px; line-height: 1.7; color: var(--sd-body); }

@media (max-width: 1080px) {
    .sd-book__chips { grid-template-columns: repeat(2, 1fr); }
    .sd-detail__steps { grid-template-columns: repeat(3, 1fr); }
    .sd-detail__policy { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
    .sd-detail { margin-top: 56px; }
    .sd-detail__tabs { top: 63px; justify-content: flex-start; overflow-x: auto; scrollbar-width: none; }
    .sd-shop .sd-detail__tabs a { padding: 14px 14px; font-size: 14px; white-space: nowrap; }
    .sd-detail__tabs a.is-active::after { left: 14px; right: 14px; }
    .sd-detail__sec { padding: 48px 0 16px; scroll-margin-top: 120px; }
    .sd-detail__h { font-size: 26px; }
    .sd-detail__features, .sd-detail__gallery { grid-template-columns: 1fr; }
    .sd-detail__steps { grid-template-columns: repeat(2, 1fr); }
    .sd-detail__table th { width: 110px; padding: 12px; }
    .sd-detail__table td { padding: 12px; }
}

/* =========================================================
   상품 페이지 공통 (빌더 + 일반 상품)
   ========================================================= */
.shop-content:has(.sd-book) #sct_location, .shop-content:has(.sd-book) #sit_siblings { display: none; }
.shop-content:has(.sd-book) .sit_admin { position: relative; z-index: 5; text-align: right; margin-top: 16px; }
.sd .sd-main #container.sd-shop__container:has(.sd-book) .sd-pagehead { display: none; }

.sd-book__ctas { display: flex; gap: 8px; }
.sd-book__ctas .sd-book__cta { flex: 1; }
.sd-shop .sd-book__cta--line { background: #fff !important; color: var(--sd-green) !important; box-shadow: inset 0 0 0 1px var(--sd-green); }
.sd-shop .sd-book__cta--line:hover { background: #f8f4eb !important; }

/* 일반 상품: 이미지 갤러리 */
.sd-item__main { padding: 0; overflow: hidden; aspect-ratio: 1 / 1; display: grid; place-items: center; background: #f8f4eb; }
.sd-item__main img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sd-item__noimg { font-size: 14px; color: #8a8478; }
.sd-item__thumbs { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 0; padding: 0; list-style: none; }
.sd-item__thumbs button { width: 72px; height: 72px; padding: 0; border-radius: 10px; overflow: hidden; border: 2px solid transparent; background: #f8f4eb; }
.sd-item__thumbs button.is-active { border-color: var(--sd-green); }
.sd-item__thumbs img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* 일반 상품: 구매 패널 */
.sd-item__panel { padding: 24px; }
.sd-item__price { display: flex; align-items: baseline; gap: 10px; padding-bottom: 16px; border-bottom: 1px solid #f2ede3; }
.sd-item__price strong { font-family: var(--sd-serif); font-size: 28px; color: var(--sd-green); }
.sd-item__price del { font-size: 14px; color: #aaa197; }
.sd-item__meta { margin: 0; padding: 14px 0; border-bottom: 1px solid #f2ede3; }
.sd-item__meta > div { display: flex; justify-content: space-between; padding: 5px 0; font-size: 13px; }
.sd-item__meta dt { color: #8a8478; }
.sd-item__meta dd { margin: 0; color: var(--sd-ink); }
.sd-item__opt { margin: 16px 0 0; }
.sd-item__opt h3 { margin: 0 0 8px; font-size: 14px; font-weight: 700; color: var(--sd-ink); }
.sd-shop .sd-item__opt select { width: 100%; height: 48px; padding: 0 12px; border: 1px solid var(--sd-line); border-radius: 10px; background-color: #fff; font-size: 14px; }
.sd-shop .sd-item__opt label { font-size: 13px; color: var(--sd-body); }
.sd-item__sel { margin-top: 16px; }
.sd-shop .sd-item__sel .sit_opt_list { padding: 12px 14px; margin-bottom: 8px; border-radius: 10px; background: #f8f4eb; border: 0; list-style: none; }
.sd-item__sel ul { margin: 0; padding: 0; }
.sd-item__sel .opt_count { display: flex; align-items: center; gap: 4px; margin-top: 8px; }
.sd-shop .sd-item__sel .num_input { width: 52px; height: 34px; text-align: center; border: 1px solid var(--sd-line); border-radius: 8px; }
.sd-shop .sd-item__sel button { width: 34px; height: 34px; border-radius: 8px; border: 1px solid var(--sd-line); background: #fff; }
.sd-item__sel .sit_opt_prc { margin-left: auto; font-weight: 700; color: var(--sd-ink); }
.sd-item__total { margin: 16px 0; text-align: right; font-size: 14px; color: var(--sd-body); }
.sd-item__total strong { font-family: var(--sd-serif); font-size: 26px; color: var(--sd-green); }
.sd-item__soldout { margin: 12px 0; font-size: 13px; color: #c4553f; }
.sd-shop a.sd-item__wish { display: block; margin-top: 12px; text-align: center; font-size: 13px; color: #8a8478 !important; }

/* 상세: 관리자 입력 상세설명, 후기·문의 게시판 */
.sd-detail__explan { max-width: 900px; margin: 56px auto 0; text-align: center; }
.sd-detail__explan img { max-width: 100%; height: auto; }
.sd-detail__empty { padding: 40px 0; text-align: center; font-size: 14px; color: #8a8478; }
.sd-detail__tabs small { font-size: 12px; color: #b4ad9f; font-weight: 500; }
.sd-detail__board { font-size: 14px; }
.sd-detail__policy--html { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.sd-detail__policy--html > div { padding: 24px; border: 1px solid #ebe6db; border-radius: 14px; background: #fff; font-size: 14px; line-height: 1.75; color: var(--sd-body); }
.sd-detail__policy--html h3 { margin: 0 0 10px; font-family: var(--sd-serif); font-weight: 600; font-size: 17px; color: var(--sd-ink); }
@media (max-width: 860px) {
    .sd-detail__policy--html { grid-template-columns: 1fr; }
    .sd-item__panel { padding: 18px; }
}

/* 후기·문의 (영카트 itemuse/itemqa 스킨) 정돈 */
.sd-detail__board #sit_use_list > h3,
.sd-detail__board #sit_qa_list > h3 { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.sd-detail__board .sit_use_top {
    position: relative; display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
    margin: 0 0 8px; padding: 20px 24px; border: 1px solid #ebe6db; border-radius: 14px; background: #fff;
}
.sd-detail__board .sit_use_top h4 { margin: 0; font-size: 15px; font-weight: 700; color: var(--sd-ink); }
.sd-detail__board .sit_use_top h4 span { font-weight: 400; font-size: 13px; color: #8a8478; }
.sd-detail__board #sit_use_wbtn, .sd-detail__board #sit_qa_wbtn {
    position: static; display: flex; gap: 8px; margin: 0 0 0 auto; text-align: right;
}
.sd-detail__board #sit_qa_wbtn { justify-content: flex-end; margin-bottom: 8px; }
.sd-shop .sd-detail__board #sit_use_wbtn a, .sd-shop .sd-detail__board #sit_qa_wbtn a {
    display: inline-flex; align-items: center; height: 44px; padding: 0 18px; line-height: 1; border-radius: 10px; font-size: 14px;
}
.sd-detail__board .sit_empty {
    margin: 0; padding: 48px 0; text-align: center; font-size: 14px; color: #8a8478;
    border: 1px dashed #e2ddd3; border-radius: 14px; background: #fbf9f4;
}
.sd-detail__board .sit_use_li, .sd-detail__board .sit_qa_li { border-color: #f0ebe1; }
/* 후기 상단: 박스 없이 문의와 같은 형태 (평점이 있으면 왼쪽에 표시) */
.sd-detail__board .sit_use_top { padding: 0; border: 0; background: none; border-radius: 0; }

/* ---------- '선택한 구성' 카드 v2 ---------- */
.sd-cfg { gap: 18px; padding: 22px 24px; border-radius: 16px; }
.sd-cfg__head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.sd-cfg__label { font-size: 12px; font-weight: 700; letter-spacing: .08em; color: var(--sd-sage); }
.sd-cfg__title { font-family: var(--sd-serif); font-weight: 600; font-size: 19px; letter-spacing: -.02em; color: var(--sd-ink); }
.sd-cfg__chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.sd-cfg__chip {
    display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px 0 5px;
    border-radius: 99px; background: #f8f4eb; border: 1px solid #efe9db; font-size: 13px; font-weight: 600; color: var(--sd-ink);
    animation: sd-chip-in .3s ease;
}
@keyframes sd-chip-in { from { opacity: .4; } to { opacity: 1; } }
.sd-cfg__chip img { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; background: #fff; }
.sd-cfg__dot { width: 22px; height: 22px; margin: 0 4px 0 4px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px #e2ddd3, inset 0 -3px 6px rgba(0,0,0,.2); }
.sd-cfg__chip:not(:has(img, i)) { padding-left: 14px; }
.sd-cfg__chip.is-name { background: var(--sd-green); border-color: var(--sd-green); color: #fff; padding-left: 12px; }
.sd-cfg__star { font-style: normal; color: #f2c35b; font-size: 13px; }
.sd-cfg__chip.is-empty { background: none; border: 1px dashed #c9bfae; color: #9a887a; font-weight: 500; padding-left: 14px; }

.sd-specs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; margin: 0; padding: 14px 0; list-style: none; border-top: 1px solid #f2ede3; border-bottom: 1px solid #f2ede3; }
.sd-specs li { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 10px; align-items: center; padding: 4px 14px; }
.sd-specs li + li { border-left: 1px solid #f2ede3; }
.sd-specs i { grid-row: 1 / span 2; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; background: #f2ece4; color: var(--sd-green); }
.sd-specs span { font-size: 11px; color: #8a8478; }
.sd-specs b { font-size: 13px; font-weight: 700; color: var(--sd-ink); white-space: nowrap; }

.sd-extras__label { margin: 0 0 10px; font-size: 12px; font-weight: 700; color: #8a8478; }
.sd-extras ul { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 0; padding: 0; list-style: none; }
.sd-extras li {
    display: grid; grid-template-columns: auto 1fr; column-gap: 10px; align-items: center;
    padding: 12px 14px; border-radius: 12px; border: 1px dashed #d9cfbe; background: #fffdf8;
}
.sd-extras i { grid-row: 1 / span 2; color: #b5654a; display: grid; place-items: center; }
.sd-extras strong { font-size: 13px; color: var(--sd-ink); }
.sd-extras small { font-size: 11.5px; color: #8a8478; }

@media (max-width: 1240px) {
    .sd-specs { grid-template-columns: repeat(2, 1fr); row-gap: 10px; }
    .sd-specs li:nth-child(3) { border-left: 0; }
}
@media (max-width: 600px) {
    .sd-cfg { padding: 18px; }
    .sd-extras ul { grid-template-columns: 1fr; }
}

/* 크게 보기에서는 구성 카드 숨김 */
.sd-book__viewer.is-full .sd-book__info { display: none; }

/* ---------- 왼쪽 칸: 따라오는 영역(책+칩) / 맨 아래(책 정보) ---------- */
.sd-book__layout { align-items: stretch; }
.sd-book__panel { align-self: start; }
.sd-book__viewer:not(.is-full) { position: static; top: auto; display: flex; flex-direction: column; }
.sd-book__sticky { position: relative; }
@media (min-width: 1081px) {
    .sd-book__sticky { position: sticky; top: 100px; z-index: 2; }
    .sd-cfg-more { margin-top: auto; }   /* 오른쪽 선택이 끝나는 높이에 맞춰 맨 아래 */
}
.sd-book__sticky .sd-cfg { gap: 14px; }
.sd-cfg-more { margin-top: 16px; padding-top: 18px; }
.sd-cfg-more .sd-specs { border-top: 0; padding-top: 0; }
.sd-book__viewer.is-full .sd-book__sticky { position: static; display: contents; }
/* 보정: 따라오는 영역은 track 안에서만 움직이고, 책 정보 카드는 칸 맨 아래 */
.sd-book__track { flex: 1 1 auto; }
@media (min-width: 1081px) {
    .sd-book__viewer > .sd-cfg-more { margin-top: 16px; }
}
.sd-book__viewer.is-full .sd-book__track { display: contents; }

/* 옵션 패널 하단 '내 동화책 미리보기' (PC·모바일 공통) */
.sd-book__preview { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; height: 48px; margin: 0 0 16px; border: 1px solid #e5ddd2; border-radius: 12px; background: #f5f2ee; color: #482e29; font: inherit; font-size: 15px; font-weight: 600; cursor: pointer; transition: background .2s, border-color .2s; }
.sd-book__preview:hover { background: #efe9e1; border-color: #d8cbbd; }
.sd-book__preview:focus-visible { outline: 2px solid #482e29; outline-offset: 2px; }

/* '주문 단계에서 함께 담겨요' 를 선택한 구성 카드 안으로 */
.sd-book__sticky .sd-extras { margin: 2px 0 0; padding-top: 14px; border-top: 1px solid #efeae0; }

/* ---------- 맨 앞(주인공 소개) · 맨 뒤(마지막 편지) 페이지 ---------- */
.sd-pg--sp { background: #fbf7ef; }
.sd-sp { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 9cqw; text-align: center; color: #2e2b26; font-family: var(--sd-serif); }
.sd-sp--intro-left, .sd-sp--letter-right {
    background:
        radial-gradient(60cqw 40cqw at 20% 8%, rgba(176,205,236,.45), transparent 70%),
        radial-gradient(50cqw 35cqw at 90% 100%, rgba(244,214,196,.45), transparent 70%),
        #fbf7ef;
}
.sd-sp--intro-right, .sd-sp--letter-left {
    background:
        radial-gradient(55cqw 40cqw at 100% 0%, rgba(231,212,208,.5), transparent 70%),
        #fdfaf4;
}
/* 책 가운데 접히는 부분 그림자 */
.sd-pg--sp::after { content: ""; position: absolute; top: 0; bottom: 0; width: 7cqw; pointer-events: none; }
.sd-pg--sp.sd-pg--left::after { right: 0; background: linear-gradient(to left, rgba(60,50,30,.10), transparent); }
.sd-pg--sp.sd-pg--right::after { left: 0; background: linear-gradient(to right, rgba(60,50,30,.10), transparent); }

.sd-sp__photo {
    width: 58cqw; aspect-ratio: 4 / 5; border-radius: 29cqw 29cqw 2cqw 2cqw; overflow: hidden;
    border: 1.6cqw solid #fff; box-shadow: 0 1.6cqw 4cqw rgba(60,50,30,.16); background: #f1ece2;
}
.sd-sp__photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sd-sp__photo.is-empty { display: grid; place-items: center; border: .5cqw dashed #d9cfbd; box-shadow: none; background: rgba(255,255,255,.6); }
.sd-sp__photo.is-empty span { display: grid; justify-items: center; gap: 1.6cqw; font-family: var(--sd-sans, 'Pretendard Variable', sans-serif); font-size: 3cqw; color: #a59a88; }
.sd-sp__photo.is-empty svg { width: 9cqw; height: 9cqw; }
.sd-sp__cap { margin: 5cqw 0 0; font-size: 3.4cqw; letter-spacing: -.01em; color: #5d574d; }

.sd-sp__eyebrow { margin: 0; font-family: var(--sd-sans, 'Pretendard Variable', sans-serif); font-size: 2.6cqw; font-weight: 700; letter-spacing: .3em; color: #9d807a; }
.sd-sp__name { margin: 3cqw 0 0; font-size: 10cqw; font-weight: 700; letter-spacing: -.02em; line-height: 1.15; color: #5e332b; word-break: keep-all; }
.sd-sp__orn { margin: 2.5cqw 0 4cqw; font-family: Tinos, serif; font-size: 5cqw; line-height: 1; color: #b5654a; }
.sd-sp__birth { display: grid; gap: 2.6cqw; width: 100%; max-width: 70cqw; margin: 0; }
.sd-sp__birth div { display: flex; justify-content: space-between; gap: 3cqw; padding-bottom: 2.2cqw; border-bottom: .3cqw dotted #d8cdb9; }
.sd-sp__birth dt { font-family: var(--sd-sans, 'Pretendard Variable', sans-serif); font-size: 2.7cqw; color: #8a8478; white-space: nowrap; }
.sd-sp__birth dd { margin: 0; font-size: 3.3cqw; font-weight: 600; color: #2e2b26; text-align: right; word-break: keep-all; }
.sd-sp__birth .is-empty dd { color: #c9bfae; font-weight: 400; }

.sd-sp--letter-left .sd-sp { align-items: stretch; justify-content: flex-start; padding: 11cqw 10cqw; text-align: left; }
.sd-sp__letter { font-family: 'Nanum Pen Script', var(--sd-serif); color: #3a3a35; }
.sd-sp__to, .sd-sp__body { font-family: 'Nanum Pen Script', var(--sd-serif); }
.sd-sp__to { margin: 0 0 4cqw; font-size: calc(var(--fs, 4.7cqw) * 1.35); color: #5e332b; }
.sd-sp__body {
    margin: 0; font-size: var(--fs, 4.7cqw); line-height: 1.75; word-break: keep-all; overflow-wrap: anywhere;
    background-image: linear-gradient(transparent calc(100% - .25cqw), rgba(181,101,74,.18) 0); background-size: 100% calc(var(--fs, 4.7cqw) * 1.75);
}
.sd-sp__body.is-empty { color: #b3a998; }
.sd-sp__sign { display: grid; justify-items: center; }
.sd-sp__love { margin: 0; font-family: 'Nanum Pen Script', var(--sd-serif); font-size: 6cqw; color: #5d574d; }
.sd-sp__from { margin: 2cqw 0 0; font-family: 'Nanum Pen Script', var(--sd-serif); font-size: 9cqw; color: #5e332b; word-break: keep-all; }
.sd-sp__brand { position: absolute; bottom: 7cqw; left: 0; right: 0; height: 4.2cqw; margin: 0; overflow: hidden; text-indent: -999px; white-space: nowrap; background-color: #a59a88; -webkit-mask: url(../img/brand/logo-word.png) center / contain no-repeat; mask: url(../img/brand/logo-word.png) center / contain no-repeat; }

/* ---------- 7. 아이 사진 · 출생 정보 · 편지 (선택) ---------- */
.sd-opt__opt { margin-left: 6px; padding: 2px 8px; border-radius: 99px; background: #f5f2ee; color: #6c5f5d; font-size: 11px; font-weight: 600; vertical-align: 1px; }
.sd-info-wrap { border: 1px solid #e7e1d5; border-radius: 12px; background: #fff; overflow: hidden; }
.sd-info-wrap__btn { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 0 16px; cursor: pointer; list-style: none; font-size: 14px; font-weight: 600; color: #482e29; }
.sd-info-wrap__btn::-webkit-details-marker { display: none; }
.sd-info-wrap__plus { position: relative; flex: 0 0 22px; height: 22px; border-radius: 50%; background: #f5f2ee; }
.sd-info-wrap__plus::before, .sd-info-wrap__plus::after { content: ""; position: absolute; left: 50%; top: 50%; width: 10px; height: 1.6px; margin: -.8px 0 0 -5px; background: currentColor; border-radius: 1px; transition: transform .2s; }
.sd-info-wrap__plus::after { transform: rotate(90deg); }
.sd-info-wrap[open] .sd-info-wrap__plus::after { transform: rotate(0deg); }
.sd-info-wrap[open] .sd-info-wrap__btn { border-bottom: 1px solid #f2ede3; }
.sd-info-wrap .sd-info { padding: 4px 16px 16px; }
.sd-opt--info .sd-opt__help b { font-weight: 600; color: #5d574d; }
/* 2. 아이 정보: 이름 아래 사진·출생 정보 펼침 */
.sd-opt--info .sd-opt__input + .sd-opt__help + .sd-info-wrap { margin-top: 14px; }
.sd-info-wrap__btn .sd-opt__opt { margin-left: auto; }
.sd-opt--info .sd-info-wrap + .sd-opt__help { margin-top: 8px; }

/* 일반 상품(프리미엄 등): 이미지가 화면을 꽉 채우지 않게 폭 제한 */
@media (min-width: 1081px) {
    /* 모듈형과 같은 1300px 폭: 이미지 넓게 + 구매 칸 400px. 이미지는 4:3 칸 안에 잘림 없이 */
    .sd-book__layout:has(.sd-item__gallery) { grid-template-columns: minmax(0, 1fr) 400px; gap: 48px; }
    .sd-item__gallery > .sd-item__main { aspect-ratio: 4 / 3; }
    .sd-item__gallery > .sd-item__main { position: relative; }
    .sd-item__gallery > .sd-item__main img { position: absolute; inset: 0; object-fit: contain; }
}
.sd-item__main:has(.sd-item__noimg) { aspect-ratio: 4 / 3; }
@media (max-width: 1080px) { .sd-item__gallery { width: 100%; max-width: 640px; margin: 0 auto; } }
/* 일반 상품: 이미지와 구매 칸 높이 맞춤 (PC) — 금액·버튼은 칸 아래쪽에 붙임 */
@media (min-width: 1081px) {
    .sd-book__layout:has(.sd-item__gallery) { align-items: stretch; }
    .sd-book__layout:has(.sd-item__gallery) > .sd-item__gallery { position: static; display: flex; flex-direction: column; }
    .sd-book__layout:has(.sd-item__gallery) > .sd-item__panel { align-self: stretch; display: flex; flex-direction: column; }
    .sd-item__panel > .sd-item__total { margin-top: auto; }
    .sd-item__gallery > .sd-item__main:has(.sd-item__noimg) { flex: 1; aspect-ratio: auto; min-height: 420px; }
}
.sd-shop .sd-item__panel > #sit_sel_option.sd-item__sel { background: none; }

/* 상세 설명: 통이미지 상세페이지는 틈 없이 이어 붙임 */
.sd-detail__explan p:has(> img:only-child) { margin: 0; line-height: 0; }
.sd-detail__explan img { display: block; margin: 0 auto; }
.sd-detail #sit_inf_explan.sd-detail__explan { margin: 72px auto 0; }

/* 선택한 옵션 줄: 추가옵션도 기본 줄과 같은 카드 */
.sd-shop .sd-item__sel .sit_spl_list { padding: 12px 14px; margin-bottom: 8px; border-radius: 10px; background: #f8f4eb; border: 0; list-style: none; }
.sd-item__sel .opt_name { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--sd-ink); }
.sd-item__sel .sd-opt-subj { padding: 2px 8px; border-radius: 99px; background: #ece4d6; color: #6b5a50; font-size: 11px; font-weight: 600; }
.sd-shop .sd-item__sel .sit_opt_del { width: 26px; height: 26px; margin-left: auto; border: 0; background: transparent; color: #8a8478; font-size: 18px; line-height: 1; }
.sd-shop .sd-item__sel .sit_opt_del:hover { color: var(--sd-ink); }
.sd-shop .sd-item__sel .sit_opt_del::before { content: "×"; }
.sd-shop .sd-item__sel #sit_opt_added { background: none; border: 0; }
.sd-shop .sd-item__sel #sit_opt_added li { border-radius: 10px; }
.sd-shop .sd-item__sel #sit_opt_added .sit_opt_del { position: absolute; top: 8px; right: 8px; width: 28px; height: 28px; border: 0; border-radius: 8px; background: transparent; color: #8a8478; font-size: 18px; }
.sd-shop .sd-item__sel #sit_opt_added .sit_opt_del:hover { background: #efe8dc; color: var(--sd-ink); }
.sd-item__sel .sit_spl_list .opt_name { padding-right: 30px; }

/* 모바일 크게 보기: 세로 화면이면 가로로 돌려 보라는 안내 */
.sd-book__rotate { display: none; }
@media (max-width: 860px) and (orientation: portrait) {
  .sd-book__viewer.is-full .sd-book__rotate { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 18px; font-size: 13px; color: rgba(255,255,255,.8); }
  .sd-book__viewer.is-full .sd-book__rotate::before { content: ""; width: 18px; height: 18px; border: 1.5px solid currentColor; border-radius: 4px; transform: rotate(90deg); }
}
.sd-book__hint-m { display: none; }
@media (max-width: 860px) { .sd-book__hint-pc { display: none; } .sd-book__hint-m { display: inline; } }
