/* 올바른책: 교재를 고른 뒤 각 상품의 자료 종류를 비교한다. 다른 뷰의 스타일은 바꾸지 않는다. */
#view-store.store-catalog { color: var(--ink-900); padding: 0 0 24px; }
#view-store .store-masthead { display: flex; align-items: center; gap: 28px; padding: 8px 0 22px; border-bottom: 1px solid var(--line); }
#view-store .store-wordmark { flex: 0 0 auto; display: grid; gap: 5px; }
#view-store .store-wordmark strong { font-size: 28px; letter-spacing: -1.5px; color: var(--brand-900); font-weight: 900; }
#view-store .store-wordmark span { font-size: 11px; color: var(--ink-700); }
#view-store .store-destinations { display: flex; justify-content: center; flex: 1; gap: 16px; align-self: stretch; }
#view-store .store-destination { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; padding: 5px 12px; border-bottom: 3px solid transparent; color: var(--ink-700); text-decoration: none; min-width: 0; }
#view-store .store-destination strong { font-size: 14px; font-weight: 750; white-space: nowrap; }
#view-store .store-destination small { font-size: 11px; color: var(--ink-500); white-space: nowrap; }
#view-store .store-destination.is-selected { border-bottom-color: var(--brand-700); color: var(--brand-700); }
#view-store .store-destination:hover { background: var(--line-soft); border-radius: var(--radius-sm) var(--radius-sm) 0 0; }
#view-store .store-library { display: flex; align-items: center; gap: 7px; color: var(--brand-900); font-size: 13px; font-weight: 650; text-decoration: none; white-space: nowrap; padding: 10px 0 10px 10px; }
#view-store .store-library svg, #view-store .store-search svg { width: 21px; height: 21px; flex: 0 0 auto; }
#view-store .store-intro { padding: 32px 0 22px; }
#view-store .store-intro .store-eyebrow { font-size: 12px; font-weight: 650; color: var(--ink-500); }
#view-store .store-intro h1 { margin: 9px 0; font-size: 30px; line-height: 1.3; letter-spacing: -1.2px; font-weight: 850; color: var(--ink-900); }
#view-store .store-intro p { font-size: 14px; color: var(--ink-500); margin: 0; }
#view-store .store-searchline { display: flex; gap: 10px; align-items: stretch; }
#view-store .store-search { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; padding: 0 16px; border: 1px solid var(--line); background: #fff; border-radius: var(--radius-sm); box-shadow: var(--shadow-xs); color: var(--ink-500); }
#view-store .store-search:focus-within { outline: 2px solid var(--brand-500); outline-offset: 2px; }
#view-store .store-search input { min-width: 0; width: 100%; height: 52px; font-size: 15px; padding: 0; border: 0; background: transparent; box-shadow: none; color: var(--ink-900); outline: none; }
#view-store .store-search input:focus { box-shadow: none; }
#view-store #bsSort { width: 132px; padding: 0 12px; font-size: 13px; color: var(--ink-700); background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm); }
#view-store .store-filterline { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 20px 0; }
#view-store .store-grade-filters { display: flex; gap: 8px; }
#view-store .store-grade-filters button { border: 1px solid var(--line); border-radius: 24px; min-width: 61px; padding: 8px 16px; background: #fff; color: var(--ink-700); font-size: 13px; font-weight: 650; box-shadow: none; }
#view-store .store-grade-filters button[aria-pressed="true"] { background: var(--brand-700); color: #fff; border-color: var(--brand-700); }
#view-store .store-result-count { color: var(--ink-500); font-size: 13px; white-space: nowrap; }
#view-store .store-textbook-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
#view-store .store-textbook-card { display: flex; align-items: flex-start; min-width: 0; gap: 15px; padding: 20px 16px; border-radius: var(--radius); border: 1px solid var(--line); background: #fff; color: var(--ink-900); text-decoration: none; box-shadow: var(--shadow-xs); transition: border-color .15s ease, box-shadow .15s ease; }
#view-store .store-textbook-card:hover { border-color: var(--brand-500); box-shadow: var(--shadow-sm); }
#view-store .store-textbook-card:focus-visible { outline: 3px solid var(--brand-500); outline-offset: 3px; }
#view-store .store-textbook-cover { flex: 0 0 31%; max-width: 105px; height: 150px; display: flex; align-items: center; justify-content: center; overflow: hidden; }
#view-store .store-textbook-cover img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(1px 3px 3px #0f172a12); }
#view-store .store-textbook-cover .store-cover-ic { width: 100%; height: 100%; background: var(--line-soft); border: 1px solid var(--line); border-radius: var(--radius-sm); color: var(--brand-700); }
#view-store .store-textbook-body { display: flex; flex-direction: column; flex: 1; min-width: 0; align-self: stretch; }
#view-store .store-textbook-kicker { color: var(--ink-500); font-size: 11px; line-height: 1.5; margin-bottom: 7px; }
#view-store .store-textbook-title { display: block; color: var(--ink-900); font-size: 16px; font-weight: 800; line-height: 1.4; letter-spacing: -.4px; word-break: keep-all; overflow-wrap: anywhere; }
#view-store .store-textbook-kinds { display: flex; flex-wrap: wrap; gap: 4px; margin: 12px 0 18px; }
#view-store .store-textbook-kinds span { color: var(--ink-700); border: 1px solid var(--line); background: var(--line-soft); font-size: 11px; line-height: 1.4; padding: 3px 5px; border-radius: 5px; white-space: nowrap; }
#view-store .store-textbook-bottom { display: grid; gap: 9px; margin-top: auto; }
#view-store .store-textbook-price { font-size: 17px; font-weight: 850; letter-spacing: -.5px; color: var(--brand-900); font-variant-numeric: tabular-nums; }
#view-store .store-textbook-price small { font-size: 12px; font-weight: 500; margin-left: 2px; }
#view-store .store-textbook-open { display: flex; justify-content: space-between; align-items: center; padding: 8px 10px; border: 1px solid var(--line); border-radius: 7px; font-size: 12px; font-weight: 700; color: var(--brand-700); }
#view-store .store-textbook-card:hover .store-textbook-open { color: #fff; background: var(--brand-700); border-color: var(--brand-700); }
#view-store .store-catalog-note { margin: 28px 0 0; padding-top: 18px; color: var(--ink-500); border-top: 1px solid var(--line); font-size: 12px; }
#view-store .store-empty { grid-column: 1 / -1; min-height: 180px; text-align: center; }
#view-store .store-clear { display: block; margin: 18px auto 0; padding: 8px 12px; background: #fff; border: 1px solid var(--line); color: var(--brand-700); border-radius: 8px; }

/* 상세에서는 기존 표지·갤러리·미리보기·상품별 구매 동작을 그대로 사용한다. */
#bookDetail.store-detail { max-width: 1100px; margin: 0 auto; }
#bookDetail .store-detail-top { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 42px; padding: 24px 0 30px; }
#bookDetail .store-detail-hero { display: flex; align-items: flex-start; gap: 24px; min-width: 0; }
#bookDetail .store-detail-hero .bd-cover { width: 140px; flex: 0 0 140px; min-width: 0; }
#bookDetail .store-detail-hero .bd-cover-main { height: 200px; margin: 0; padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
#bookDetail .store-detail-hero .bd-cover-main img { object-fit: contain; object-position: center top; }
#bookDetail .store-detail-hero .bd-head { flex: 1; min-width: 0; }
#bookDetail .store-eyebrow { color: var(--brand-700); font-size: 12px; font-weight: 650; }
#bookDetail .store-detail-hero .bd-title { font-size: 25px; font-weight: 850; letter-spacing: -.9px; margin: 12px 0; line-height: 1.4; overflow-wrap: anywhere; }
#bookDetail .store-detail-category { color: var(--ink-500); font-size: 12px; line-height: 1.6; }
#bookDetail .store-detail-author { color: var(--ink-700); font-size: 12px; line-height: 1.6; margin: 8px 0; }
#bookDetail .store-detail-format { color: var(--ink-500); border-top: 1px solid var(--line); padding-top: 14px; font-size: 12px; line-height: 1.7; margin: 18px 0 0; }
#bookDetail .store-detail-panel { min-width: 0; }
#bookDetail .store-options { padding: 0; border: 0; margin: 0 0 16px; display: grid; gap: 10px; min-width: 0; }
#bookDetail .store-options legend { padding: 0; margin: 0 0 14px; font-size: 18px; font-weight: 800; color: var(--ink-900); }
#bookDetail .store-option { display: flex; gap: 11px; align-items: flex-start; padding: 17px 15px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm); cursor: pointer; box-shadow: var(--shadow-xs); min-width: 0; }
#bookDetail .store-option.is-selected { border-color: var(--brand-500); background: #f5f8ff; }
#bookDetail .store-option:focus-within { outline: 2px solid var(--brand-500); outline-offset: 3px; }
#bookDetail .store-option input { width: 18px; height: 18px; margin: 3px 0 0; accent-color: var(--brand-700); flex: 0 0 auto; }
#bookDetail .store-option-copy { display: grid; gap: 5px; min-width: 0; flex: 1; }
#bookDetail .store-option-copy strong { font-size: 15px; font-weight: 750; line-height: 1.4; }
#bookDetail .store-option-copy small { color: var(--ink-500); font-size: 12px; line-height: 1.5; }
#bookDetail .store-option-includes { color: var(--brand-700); font-size: 12px; margin-top: 4px; line-height: 1.5; }
#bookDetail .store-option > b { margin: 3px 0 0; color: var(--brand-900); font-size: 16px; font-weight: 800; white-space: nowrap; font-variant-numeric: tabular-nums; }
#bookDetail .store-preview-button { display: flex; width: 100%; align-items: center; justify-content: center; gap: 10px; border: 1px solid var(--brand-700); border-radius: var(--radius-sm); padding: 12px; background: #fff; color: var(--brand-700); font-size: 14px; font-weight: 700; box-shadow: none; }
#bookDetail .store-selection-note { margin: 13px 0 18px; text-align: center; font-size: 12px; line-height: 1.6; color: var(--ink-500); }
#bookDetail .store-detail-checkout { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 0 0; border-top: 1px solid var(--line); background: #fff; }
#bookDetail .store-checkout-price { flex: 1; min-width: 0; }
#bookDetail .store-checkout-price > small { color: var(--ink-500); font-size: 12px; }
#bookDetail .store-checkout-price .bd-sale { margin: 3px 0 0; white-space: nowrap; font-size: 15px; }
#bookDetail .store-checkout-price .bd-sale b { font-size: 26px; }
#bookDetail .store-checkout-price .bd-point { margin: 5px 0 0; font-size: 11px; }
#bookDetail .store-detail-checkout .bd-actions { width: auto; margin: 0; flex: 0 1 190px; }
#bookDetail .store-detail-checkout .bd-cta { min-height: 48px; font-size: 15px; padding: 12px 15px; border-radius: var(--radius-sm); background: var(--brand-700); color: #fff; border-color: var(--brand-700); }
#bookDetail .store-more-details { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin-bottom: 16px; }
#bookDetail .store-more-details > summary { cursor: pointer; padding: 20px 3px; color: var(--ink-700); font-size: 15px; font-weight: 700; }
#bookDetail .store-more-details .bd-nav { position: static; }
#bookDetail .store-more-details book-material-guide { display: block; max-width: 760px; margin: auto; }

@media (max-width: 900px) {
  #view-store .store-masthead { flex-wrap: wrap; gap: 12px; padding-bottom: 8px; }
  #view-store .store-wordmark { flex: 1; }
  #view-store .store-wordmark strong { font-size: 25px; }
  #view-store .store-destinations { flex: 1 1 100%; order: 3; justify-content: flex-start; gap: 12px; }
  #view-store .store-destination { flex: 1; padding: 12px 6px; }
  #view-store .store-textbook-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #bookDetail .store-detail-top { gap: 25px; }
  #bookDetail .store-detail-hero { flex-direction: column; gap: 18px; }
  #bookDetail .store-detail-hero .bd-cover { width: 120px; flex: 0 0 auto; }
  #bookDetail .store-detail-hero .bd-cover-main { height: 166px; }
  #bookDetail .store-detail-hero .bd-title { font-size: 22px; }
}
@media (max-width: 640px) {
  #view-store .store-intro { padding: 23px 0 18px; }
  #view-store .store-intro h1 { font-size: 24px; margin: 8px 0; letter-spacing: -.8px; }
  #view-store .store-intro p { font-size: 13px; }
  #view-store .store-searchline { gap: 8px; flex-wrap: wrap; }
  #view-store .store-search { flex: 1 1 100%; }
  #view-store .store-search input { height: 48px; font-size: 14px; }
  #view-store #bsSort { height: 34px; width: 125px; margin-left: auto; font-size: 12px; }
  #view-store .store-filterline { gap: 12px; margin: 10px 0 17px; flex-wrap: wrap; }
  #view-store .store-grade-filters { gap: 6px; }
  #view-store .store-grade-filters button { min-width: 54px; padding: 8px 13px; }
  #view-store .store-result-count { font-size: 12px; margin-left: auto; }
  #view-store .store-textbook-grid { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  #view-store .store-textbook-card { padding: 18px; gap: 20px; }
  #view-store .store-textbook-cover { flex-basis: 94px; height: 140px; }
  #view-store .store-textbook-title { font-size: 17px; }
  #view-store .store-textbook-kinds { margin: 10px 0 12px; gap: 5px; }
  #view-store .store-textbook-bottom { grid-template-columns: 1fr auto; align-items: center; gap: 8px; }
  #view-store .store-textbook-open { gap: 9px; }
  #bookDetail .bd-crumb strong { display: none; }
  #bookDetail .store-detail-top { grid-template-columns: minmax(0, 1fr); padding-top: 15px; gap: 28px; }
  #bookDetail .store-detail-hero { flex-direction: row; gap: 18px; padding-bottom: 22px; border-bottom: 1px solid var(--line); }
  #bookDetail .store-detail-hero .bd-cover { width: 88px; flex: 0 0 88px; }
  #bookDetail .store-detail-hero .bd-cover-main { height: 124px; }
  #bookDetail .store-detail-hero .bd-title { margin: 8px 0 10px; font-size: 22px; }
  #bookDetail .store-detail-category { display: none; }
  #bookDetail .store-detail-author { font-size: 11px; }
  #bookDetail .store-detail-format { font-size: 11px; padding-top: 10px; margin-top: 12px; }
  #bookDetail .store-options legend { font-size: 18px; }
  #bookDetail .store-option { gap: 10px; padding: 16px 12px; }
  #bookDetail .store-option-copy strong { font-size: 14px; }
  #bookDetail .store-option > b { font-size: 15px; }
  #bookDetail .store-detail-checkout { position: fixed; left: 0; right: 0; bottom: var(--store-tabbar-offset, 84px); z-index: 45; padding: 12px 18px; box-shadow: 0 -5px 18px #0f172a0a; }
  #bookDetail .store-detail-checkout .bd-actions { flex-basis: 165px; }
  #bookDetail .store-checkout-price .bd-sale b { font-size: 25px; }
  #bookDetail .store-checkout-price .bd-point { display: none; }
  #bookDetail .bd-foot { padding-bottom: 118px; }
}
@media (prefers-reduced-motion: reduce) { #view-store .store-textbook-card { transition: none; } }

/* 복수 자료 선택 시연: 선택과 아래 상세 안내 탐색을 분리한다. */
#bookDetail .store-multiple-hint { margin: -5px 0 4px; color: var(--ink-500); font-size: 12px; line-height: 1.6; }
#bookDetail .store-option input[type="checkbox"] { border-radius: 3px; width: 19px; height: 19px; }
#bookDetail .store-option.is-unavailable { opacity: .6; cursor: default; }
#bookDetail .store-basket-lines { border-top: 1px solid var(--line); padding: 12px 0 0; margin-top: 16px; }
#bookDetail .store-basket-line, .store-basket-dialog .store-basket-line { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; padding: 7px 0; color: var(--ink-700); font-size: 13px; line-height: 1.5; }
#bookDetail .store-basket-line b, .store-basket-dialog .store-basket-line b { color: var(--ink-900); font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
#bookDetail .store-basket-equation { margin: 10px 0 14px; padding: 10px; border-radius: 8px; background: var(--line-soft); color: var(--ink-700); font-size: 12px; line-height: 1.7; text-align: right; overflow-wrap: anywhere; }
#bookDetail .store-basket-equation strong { color: var(--brand-700); white-space: nowrap; }
#bookDetail .store-basket-empty { font-size: 12px; color: var(--ink-500); margin: 0 0 15px; }
#bookDetail #storeBasketReviewBtn:disabled { color: var(--ink-500); background: var(--line-soft); border-color: var(--line); opacity: 1; cursor: default; }
#bookDetail .store-original-details { border-top: 1px solid var(--line); margin-top: 5px; padding-top: 24px; }
#bookDetail .store-detail-sectionhead { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 18px; }
#bookDetail .store-detail-sectionhead h2 { margin: 0; color: var(--ink-900); font-size: 19px; letter-spacing: -.4px; }
#bookDetail .store-detail-sectionhead .bd-cta-preview { width: auto; min-width: 110px; border: 1px solid var(--brand-700); background: #fff; color: var(--brand-700); border-radius: var(--radius-sm); font-size: 13px; padding: 10px 16px; }
#bookDetail .store-detail-types { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 13px; }
#bookDetail .store-detail-types button { border: 1px solid var(--line); background: #fff; color: var(--ink-700); border-radius: 8px; padding: 9px 11px; font-size: 12px; font-weight: 650; }
#bookDetail .store-detail-types button[aria-pressed="true"] { border-color: var(--brand-700); color: var(--brand-700); background: var(--line-soft); }
#bookDetail .store-detail-current { color: var(--ink-500); font-size: 12px; line-height: 1.6; margin: 0 0 22px; }
.store-basket-dialog { width: min(440px, calc(100% - 32px)); border: 1px solid var(--line); border-radius: var(--radius); padding: 25px; background: #fff; color: var(--ink-900); box-shadow: var(--shadow-lg); max-height: calc(100dvh - 48px); overflow-y: auto; }
.store-basket-dialog::backdrop { background: #0f172a70; }
.store-basket-dialog h2 { font-size: 21px; margin: 0 0 9px; color: var(--brand-900); }
.store-basket-dialog > p { font-size: 13px; line-height: 1.6; margin: 0 0 17px; }
.store-basket-dialog .store-dialog-items { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 10px 0; }
.store-basket-dialog .store-basket-line small { display: block; font-size: 11px; color: var(--ink-500); margin-top: 3px; }
.store-basket-dialog .store-dialog-total { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 19px 0; font-size: 13px; }
.store-basket-dialog .store-dialog-total strong { font-size: 24px; color: var(--brand-900); }
.store-basket-dialog .store-dialog-note { font-size: 12px; color: var(--ink-500); margin-bottom: 18px; }
.store-basket-dialog .store-dialog-close { display: block; width: 100%; border: 0; border-radius: var(--radius-sm); background: var(--brand-700); color: #fff; padding: 12px; font-size: 14px; font-weight: 700; }
@media(max-width:640px) {
  #bookDetail .store-basket-equation { text-align: left; }
  #bookDetail .store-detail-sectionhead h2 { font-size: 18px; }
  #bookDetail .store-detail-sectionhead .bd-cta-preview { min-width: 95px; }
  #bookDetail .store-detail-types { gap: 6px; }
  #bookDetail .store-detail-types button { flex: 1 1 auto; font-size: 11px; padding: 9px 7px; }
  #bookDetail .store-original-details .bd-nav { overflow-x: auto; white-space: nowrap; }
  #bookDetail .store-detail-checkout .bd-actions { flex-basis: 170px; }
  #bookDetail #storeBasketReviewBtn { font-size: 14px; }
}

/* 기존 데스크톱 고정 폭이 상세 구매 영역을 잘라 내지 않도록 이 화면만 유동 폭으로 맞춘다. */
body:has(#view-book:not([hidden]) #bookDetail.store-detail) { width: 100%; }
.app-shell:has(#view-book:not([hidden]) #bookDetail.store-detail) > .app-body { min-width: 0 !important; flex: 1 1 0; }
main.container:has(> #view-book:not([hidden]) #bookDetail.store-detail) { min-width: 0 !important; width: 100% !important; max-width: 100%; }
#bookDetail .store-original-details book-material-guide { display: block; width: 100%; max-width: 100%; min-width: 0; contain: inline-size; }

/* 상단을 압축하고 교재 분류를 한 곳에 모은다. */
#view-store .store-masthead { gap: 12px; padding: 0 0 10px; flex-wrap: nowrap; }
#view-store .store-wordmark { display: flex; flex: 1; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; min-width: 0; }
#view-store .store-wordmark strong { font-size: 22px; letter-spacing: -1px; }
#view-store .store-wordmark span { font-size: 11px; }
#view-store .store-library { padding: 5px 0 5px 6px; font-size: 12px; }
#view-store .store-library svg { width: 18px; height: 18px; }
#view-store .store-compact-tools { display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 1.2fr); gap: 18px; align-items: center; margin: 12px 0; }
#view-store .store-intro { padding: 0; }
#view-store .store-intro h1 { margin: 0; font-size: 21px; line-height: 1.35; letter-spacing: -.7px; word-break: keep-all; }
#view-store .store-searchline { display: flex; flex-wrap: nowrap; gap: 7px; min-width: 0; }
#view-store .store-search { flex: 1 1 0; padding: 0 10px; gap: 8px; }
#view-store .store-search input { height: 38px; font-size: 13px; }
#view-store .store-search svg { width: 18px; height: 18px; }
#view-store #bsSort { width: 110px; height: 40px; margin: 0; padding: 0 7px; font-size: 12px; flex: 0 0 110px; }
#view-store .store-category-filters { display: flex; flex-wrap: wrap; gap: 6px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 10px 0; }
#view-store .store-category-filters { align-items: center; gap: 10px 16px; container: store-category-menu / inline-size; }
#view-store .store-category-group { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; min-width: 0; }
#view-store .store-category-group-school { gap: 8px; }
#view-store .store-category-group-label { display: inline-flex; align-items: center; gap: 6px; flex: 0 0 auto; padding-right: 3px; color: var(--brand-700); font-size: 11px; line-height: 1.5; font-weight: 800; white-space: nowrap; }
#view-store .store-category-group-label::before { content: ''; width: 3px; height: 12px; border-radius: 3px; background: var(--brand-500); }
#view-store .store-category-group-items { display: flex; flex-wrap: wrap; gap: 6px; min-width: 0; }
#view-store .store-category-group-other { padding-left: 16px; border-left: 1px solid var(--ink-400); }
@container store-category-menu (max-width: 900px) {
  #view-store .store-category-group-school { width: 100%; }
  #view-store .store-category-group-other { width: 100%; padding: 8px 0 0; border-left: 0; border-top: 1px solid var(--line); }
}
#view-store .store-category-filters button { margin: 0; padding: 8px 11px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink-700); font-size: 13px; line-height: 1.4; font-weight: 650; white-space: nowrap; box-shadow: none; }
#view-store .store-category-filters button[aria-pressed="true"] { background: var(--brand-700); color: #fff; border-color: var(--brand-700); }
#view-store .store-filterline { margin: 8px 0 12px; min-height: 23px; flex-wrap: nowrap; }
#view-store .store-result-count { margin: 0; font-size: 12px; }
#view-store .store-subcategory-filters { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px 0; border-bottom: 1px solid var(--line); }
#view-store .store-subcategory-filters[hidden] { display: none; }
#view-store .store-subcategory-filters button { margin: 0; min-height: 34px; padding: 6px 13px; border: 1px solid transparent; border-radius: 7px; background: transparent; color: var(--ink-700); font-size: 12px; line-height: 1.5; font-weight: 650; white-space: nowrap; box-shadow: none; }
#view-store .store-subcategory-filters button[aria-pressed="true"] { border-color: var(--line); background: var(--line-soft); color: var(--brand-700); font-weight: 800; }
#view-store .store-all-categories { margin: 0; padding: 3px 7px; border: 0; border-radius: 5px; background: transparent; color: var(--ink-500); font-size: 12px; font-weight: 600; box-shadow: none; }
#view-store .store-all-categories[aria-pressed="true"] { color: var(--brand-700); background: var(--line-soft); }
#view-store .store-category-filters button:focus-visible, #view-store .store-subcategory-filters button:focus-visible, #view-store .store-all-categories:focus-visible { outline: 2px solid var(--brand-500); outline-offset: 2px; }
body:has(#view-store.store-catalog:not([hidden])) { width: 100%; }
.app-shell:has(#view-store.store-catalog:not([hidden])) > .app-body { min-width: 0 !important; flex: 1 1 0; }
main.container:has(> #view-store.store-catalog:not([hidden])) { min-width: 0 !important; width: 100% !important; max-width: 100%; }
@media(max-width:900px) {
  #view-store .store-compact-tools { grid-template-columns: minmax(0, 1fr); gap: 9px; }
  #view-store .store-category-group-school { width: 100%; }
  #view-store .store-category-group-other { width: 100%; padding: 8px 0 0; border-left: 0; border-top: 1px solid var(--line); }
}
@media(max-width:640px) {
  #view-store .store-wordmark strong { font-size: 20px; }
  #view-store .store-wordmark { gap: 3px 8px; }
  #view-store .store-masthead { gap: 8px; padding-bottom: 8px; }
  #view-store .store-wordmark span { font-size: 11px; }
  #view-store .store-compact-tools { margin: 9px 0; gap: 8px; }
  #view-store .store-intro h1 { font-size: 18px; line-height: 1.4; letter-spacing: -.6px; }
  #view-store .store-search { flex: 1 1 0; }
  #view-store .store-search input { height: 36px; font-size: 12px; }
  #view-store #bsSort { width: 99px; flex-basis: 99px; height: 38px; font-size: 11px; }
  #view-store .store-category-filters { padding: 8px 0; gap: 8px; }
  #view-store .store-category-group-school { gap: 6px; }
  #view-store .store-category-group-label { flex-basis: 100%; }
  #view-store .store-category-group-items { gap: 5px; }
  #view-store .store-category-filters button { font-size: 12px; padding: 7px 8px; }
  #view-store .store-filterline { margin: 6px 0 10px; }
}

#bookDetail .store-detail-delivery { display: grid; gap: 8px; margin: 11px 0; }
#bookDetail .store-detail-delivery strong { font-size: 12px; font-weight: 650; line-height: 1.5; color: var(--brand-700); }
#bookDetail .store-title-preview { display: inline-flex; align-items: center; min-height: 34px; padding: 7px 12px; border: 1px solid var(--brand-700); border-radius: 8px; background: #fff; color: var(--brand-700); font-size: 12px; font-weight: 700; box-shadow: none; }

/* 동일 교재의 분석노트와 변형문제 표지를 두 권으로 포개어 보여준다. */
#view-store .store-textbook-options-hint { display: block; margin: 10px 0 16px; color: var(--ink-500); font-size: 12px; line-height: 1.6; word-break: keep-all; }
#view-store .store-cover-stack { position: relative; flex: 0 0 38%; max-width: 128px; height: 176px; overflow: visible; align-self: center; }
#view-store .store-stacked-book { display: block; position: absolute; width: 76%; height: 82%; background: #fff; border: 1px solid var(--line); border-radius: 2px 5px 5px 2px; box-shadow: 2px 5px 8px #0f172a24; overflow: hidden; }
#view-store .store-stacked-book img { display: block; width: 100%; height: 100%; object-fit: cover; filter: none; }
#view-store .store-stacked-back { top: 1px; right: 0; transform: rotate(7deg); }
#view-store .store-stacked-front { bottom: 0; left: 0; transform: rotate(-5deg); }
#view-store .store-stacked-book > span:not(.store-october-cover) { position: absolute; left: 0; right: 0; padding: 4px 2px; color: #fff; background: var(--brand-700); font-size: 10px; font-weight: 700; text-align: center; line-height: 1.4; }
#view-store .store-stacked-back > span:not(.store-october-cover) { top: 0; }
#view-store .store-stacked-front > span:not(.store-october-cover) { bottom: 0; }
#bookDetail .store-option.store-option-pending { opacity: 1; background: var(--line-soft); border-style: dashed; }
#bookDetail .store-option-pending .store-option-copy { color: var(--ink-700); }
#bookDetail .store-option-pending > b { color: var(--ink-500); font-size: 12px; line-height: 1.6; }
@media(max-width:640px) {
  #view-store .store-cover-stack { flex-basis: 112px; max-width: 112px; height: 158px; }
  #view-store .store-textbook-options-hint { font-size: 11px; margin: 9px 0 14px; }
}

/* 선택 내역은 접고, 최종 금액과 구매 동작에 시선을 모은다. */
#bookDetail .store-detail-checkout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; padding: 22px; margin-top: 20px; border: 1px solid #dde5ef; border-radius: 16px; background: #fff; box-shadow: 0 6px 24px #17345708; }
#bookDetail .store-checkout-selection { min-width: 0; border-bottom: 1px solid var(--line); padding-bottom: 16px; }
#bookDetail .store-checkout-selection summary { display: flex; align-items: center; justify-content: space-between; gap: 10px; color: var(--ink-700); font-size: 13px; font-weight: 650; list-style: none; cursor: pointer; }
#bookDetail .store-checkout-selection summary::-webkit-details-marker { display: none; }
#bookDetail .store-checkout-selection summary > span:first-child { display: flex; align-items: center; gap: 8px; }
#bookDetail .store-checkout-selection summary:focus-visible { outline: 2px solid var(--brand-500); outline-offset: 5px; border-radius: 4px; }
#bookDetail #storeBasketCount { display: inline-flex; padding: 3px 9px; border-radius: 6px; background: var(--line-soft); color: var(--brand-700); font-size: 12px; font-weight: 750; font-variant-numeric: tabular-nums; }
#bookDetail .store-checkout-toggle { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-500); font-size: 11px; font-weight: 500; white-space: nowrap; }
#bookDetail .store-checkout-toggle svg { width: 16px; height: 16px; }
#bookDetail .store-checkout-selection[open] .store-checkout-toggle svg { transform: rotate(180deg); }
#bookDetail .store-checkout-selection .store-basket-lines { margin-top: 14px; padding-top: 10px; border-top: 1px dashed var(--line); max-height: 220px; overflow-y: auto; }
#bookDetail .store-checkout-selection .store-basket-line { font-size: 12px; padding: 6px 0; }
#bookDetail .store-checkout-selection .store-basket-empty { margin: 3px 0 0; }
#bookDetail .store-checkout-price { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
#bookDetail .store-checkout-label { color: var(--ink-700); font-size: 13px; font-weight: 600; }
#bookDetail .store-checkout-amount { display: flex; align-items: baseline; gap: 4px; white-space: nowrap; color: var(--brand-900); }
#bookDetail .store-checkout-amount b { font-size: 32px; line-height: 1.2; letter-spacing: -1px; font-weight: 850; font-variant-numeric: tabular-nums; }
#bookDetail .store-checkout-amount > span { font-size: 16px; font-weight: 600; }
#bookDetail .store-detail-checkout .bd-actions { width: 100%; margin: 0; }
#bookDetail #storeBasketReviewBtn { display: flex; justify-content: space-between; align-items: center; gap: 12px; width: 100%; min-height: 52px; padding: 14px 18px; border: 1px solid var(--brand-700); border-radius: 10px; background: var(--brand-700); color: #fff; font-size: 15px; line-height: 1.4; font-weight: 700; box-shadow: none; }
#bookDetail #storeBasketReviewBtn svg { width: 21px; height: 21px; flex: 0 0 auto; }
#bookDetail #storeBasketReviewBtn:not(:disabled):hover { background: var(--brand-900); border-color: var(--brand-900); }
#bookDetail #storeBasketReviewBtn:focus-visible { outline: 3px solid var(--brand-500); outline-offset: 3px; }
#bookDetail #storeBasketReviewBtn.is-empty { justify-content: center; font-size: 13px; }
#bookDetail #storeBasketReviewBtn.is-empty svg { display: none; }
#bookDetail .store-checkout-note { display: flex; justify-content: center; align-items: center; gap: 6px; margin: -6px 0 0; color: var(--ink-500); font-size: 11px; line-height: 1.5; }
#bookDetail .store-checkout-note svg { width: 14px; height: 14px; }
@media(max-width:640px) {
  #bookDetail .store-detail-checkout { grid-template-columns: minmax(0, 1fr) minmax(145px, 1.1fr); column-gap: 18px; row-gap: 12px; padding: 14px 18px; margin: 0; border-radius: 18px 18px 0 0; border-bottom: 0; box-shadow: 0 -5px 24px #1734570d; }
  #bookDetail .store-checkout-selection { grid-column: 1 / -1; padding-bottom: 10px; }
  #bookDetail .store-checkout-selection summary { font-size: 12px; }
  #bookDetail .store-checkout-selection .store-basket-lines { max-height: min(180px, 28dvh); }
  #bookDetail .store-checkout-price { display: grid; justify-content: start; gap: 3px; }
  #bookDetail .store-checkout-label { font-size: 11px; color: var(--ink-500); }
  #bookDetail .store-checkout-amount b { font-size: 26px; }
  #bookDetail .store-checkout-amount > span { font-size: 13px; }
  #bookDetail #storeBasketReviewBtn { min-height: 50px; padding: 13px 16px; font-size: 14px; }
  #bookDetail #storeBasketReviewBtn.is-empty { padding: 12px 8px; font-size: 11px; }
  #bookDetail .store-checkout-note { display: none; }
  #bookDetail .bd-foot { padding-bottom: 180px; }
}

/* 구매 선택은 두 줄의 타일과 짧은 요약으로 끝내고 책 설명을 위로 당긴다. */
#bookDetail .store-options { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-bottom: 0; }
#bookDetail .store-options legend { margin-bottom: 10px; font-size: 15px; line-height: 1.5; }
#bookDetail .store-options legend small { margin-left: 7px; color: var(--ink-500); font-size: 11px; font-weight: 500; }
#bookDetail .store-option { position: relative; display: grid; grid-template-columns: 18px minmax(0, 1fr); column-gap: 7px; row-gap: 3px; align-content: center; align-items: center; min-height: 66px; padding: 10px; border-radius: 9px; box-shadow: none; }
#bookDetail .store-option input[type="checkbox"] { grid-column: 1; grid-row: 1; width: 17px; height: 17px; margin: 0; }
#bookDetail .store-option-copy { grid-column: 2; grid-row: 1; display: block; }
#bookDetail .store-option-copy strong { display: block; font-size: 13px; line-height: 1.35; font-weight: 650; word-break: keep-all; }
#bookDetail .store-option > b { grid-column: 2; grid-row: 2; margin: 0; font-size: 14px; line-height: 1.4; font-weight: 750; }
#bookDetail .store-option-copy small, #bookDetail .store-option-includes { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
#bookDetail .store-option-pending > b { font-size: 11px; }
#bookDetail .store-detail-checkout { grid-template-columns: minmax(0, 1fr) 145px; column-gap: 16px; row-gap: 11px; margin-top: 12px; padding: 14px; border-radius: 12px; box-shadow: none; }
#bookDetail .store-checkout-selection { grid-column: 1 / -1; padding-bottom: 10px; }
#bookDetail .store-checkout-selection summary { font-size: 12px; }
#bookDetail #storeBasketCount { font-size: 11px; padding: 2px 7px; }
#bookDetail .store-checkout-price { display: grid; justify-content: start; gap: 2px; }
#bookDetail .store-checkout-label { font-size: 11px; color: var(--ink-500); }
#bookDetail .store-checkout-amount b { font-size: 26px; }
#bookDetail .store-checkout-amount > span { font-size: 13px; }
#bookDetail #storeBasketReviewBtn { min-height: 46px; padding: 11px 14px; font-size: 14px; }
#bookDetail #storeBasketReviewBtn.is-empty { padding: 11px 8px; font-size: 11px; }
#bookDetail .store-checkout-note { display: none; }
#bookDetail .store-checkout-selection .store-basket-line small { display: block; margin-top: 3px; color: var(--ink-500); font-size: 11px; font-weight: 400; line-height: 1.5; }
@media(max-width:640px) {
  #bookDetail .store-detail-top { gap: 18px; padding-bottom: 20px; }
  #bookDetail .store-detail-hero { padding-bottom: 14px; }
  #bookDetail .store-options legend { margin-bottom: 8px; }
  #bookDetail .store-option { padding: 9px; }
  #bookDetail .store-option-copy strong { font-size: 12px; }
  #bookDetail .store-option > b { font-size: 13px; }
  #bookDetail .store-option-pending > b { font-size: 11px; }
  #bookDetail .store-detail-checkout { grid-template-columns: minmax(0, 1fr) 145px; column-gap: 14px; row-gap: 9px; margin: 0; padding: 12px 16px; border-radius: 16px 16px 0 0; box-shadow: 0 -4px 18px #1734570a; }
  #bookDetail .store-checkout-selection { padding-bottom: 8px; }
  #bookDetail .bd-foot { padding-bottom: 165px; }
}

#bookDetail .store-title-download { display: flex; align-items: center; justify-content: center; gap: 9px; box-sizing: border-box; width: 100%; min-height: 48px; padding: 12px 16px; border: 1px solid var(--brand-700); border-radius: 9px; background: var(--brand-700); color: #fff; font-size: 14px; font-weight: 750; line-height: 1.4; text-decoration: none; box-shadow: none; }
#bookDetail .store-title-download svg { width: 20px; height: 20px; flex: 0 0 auto; }
#bookDetail .store-title-download:not(:disabled):hover { background: var(--brand-900); border-color: var(--brand-900); }
#bookDetail .store-title-download:focus-visible { outline: 3px solid var(--brand-500); outline-offset: 3px; }
#bookDetail .store-title-download:disabled { opacity: .5; cursor: default; }
#bookDetail .store-detail-types { gap: 8px; }
#bookDetail .store-detail-type-item { display: inline-flex; align-items: stretch; max-width: 100%; min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
#bookDetail .store-detail-type-item.is-current { border-color: var(--brand-500); }
#bookDetail .store-detail-type-item button { margin: 0; padding: 8px 10px; border: 0; border-radius: 0; background: transparent; font-size: 12px; line-height: 1.4; white-space: nowrap; }
#bookDetail .store-detail-type-item button[aria-pressed="true"] { background: var(--line-soft); }
#bookDetail .store-detail-type-item .store-material-preview { padding: 8px; border-left: 1px solid var(--line); color: var(--brand-700); font-size: 11px; font-weight: 600; }
#bookDetail .store-detail-type-item button:focus-visible { outline: 2px solid var(--brand-500); outline-offset: -3px; }
.store-download-dialog { position: fixed; width: min(390px, calc(100% - 36px)); box-sizing: border-box; max-height: calc(100dvh - 40px); overflow-y: auto; margin: auto; padding: 30px 26px 24px; border: 1px solid var(--line); border-radius: 18px; background: #fff; color: var(--ink-900); box-shadow: var(--shadow-lg); }
.store-download-dialog::backdrop { background: #0f172a70; }
.store-download-dialog .store-download-close { position: absolute; top: 13px; right: 13px; display: flex; padding: 5px; border: 0; background: transparent; color: var(--ink-500); box-shadow: none; }
.store-download-dialog .store-download-close svg { width: 20px; height: 20px; }
.store-download-dialog .store-download-symbol { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 12px; background: var(--line-soft); color: var(--brand-700); }
.store-download-dialog .store-download-symbol svg { width: 23px; height: 23px; }
.store-download-dialog h2 { margin: 18px 0 12px; color: var(--brand-900); font-size: 23px; font-weight: 800; letter-spacing: -.6px; line-height: 1.45; }
.store-download-dialog p { margin: 0 0 24px; color: var(--ink-500); font-size: 13px; line-height: 1.75; }
.store-download-dialog .store-download-purchase { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; padding: 13px 15px; min-height: 47px; border: 0; border-radius: 9px; background: var(--brand-700); color: #fff; font-size: 14px; font-weight: 700; line-height: 1.5; box-shadow: none; }
.store-download-dialog button:focus-visible { outline: 3px solid var(--brand-500); outline-offset: 3px; }
@media(max-width:640px) {
  #bookDetail .store-detail-types { gap: 6px; }
  #bookDetail .store-detail-type-item button { flex: 0 1 auto; padding: 8px; font-size: 11px; }
  #bookDetail .store-detail-type-item .store-material-preview { padding: 8px 7px; font-size: 10px; }
}

/* 자료 이름은 바깥 카드에, 미리보기만 독립된 작은 버튼으로 표시한다. */
#bookDetail .store-detail-type-item { align-items: center; gap: 7px; padding: 5px 6px; overflow: visible; }
#bookDetail .store-detail-type-item button { padding: 5px 4px; }
#bookDetail .store-detail-type-item button[aria-pressed="true"] { background: transparent; }
#bookDetail .store-detail-type-item .store-material-preview { min-height: 28px; padding: 4px 8px; border: 1px solid var(--brand-700); border-radius: 5px; background: var(--line-soft); color: var(--brand-700); font-size: 11px; line-height: 1.4; font-weight: 700; }
#bookDetail .store-detail-type-item .store-material-preview:not(:disabled):hover { background: var(--brand-700); color: #fff; }
#bookDetail .store-guide-context { margin: 0 0 18px; color: var(--ink-500); font-size: 12px; line-height: 1.7; word-break: keep-all; }
#bookDetail .store-guide-context strong { color: var(--brand-700); font-weight: 650; }
@media(max-width:640px) {
  #bookDetail .store-detail-type-item { gap: 5px; padding: 4px 5px; }
  #bookDetail .store-detail-type-item button { padding: 4px 3px; }
  #bookDetail .store-detail-type-item .store-material-preview { padding: 4px 6px; font-size: 11px; }
  #bookDetail .store-title-download { min-height: 42px; padding: 10px 12px; gap: 7px; font-size: 13px; }
  #bookDetail .store-title-download svg { width: 18px; height: 18px; }
}

#bookDetail .store-option-list { display: contents; }
@media(min-width:901px) {
  #bookDetail .store-options { display: block; }
  #bookDetail .store-options legend { margin-bottom: 7px; font-size: 14px; }
  #bookDetail .store-options legend small { font-size: 11px; }
  #bookDetail .store-option-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 204px), 1fr)); align-content: start; column-gap: 4px; row-gap: 4px; max-height: 172px; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-gutter: stable; padding: 6px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
  #bookDetail .store-option { grid-template-columns: 16px minmax(0, 1fr) auto; column-gap: 6px; row-gap: 0; min-height: 36px; padding: 7px 8px; margin: 0; border-color: transparent; border-radius: 5px; background: transparent; }
  #bookDetail .store-option.is-selected { background: #f0f5ff; border-color: transparent; }
  #bookDetail .store-option:not(.is-unavailable):hover { background: var(--line-soft); }
  #bookDetail .store-option input[type="checkbox"] { width: 16px; height: 16px; }
  #bookDetail .store-option-copy strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; line-height: 1.35; font-weight: 600; }
  #bookDetail .store-option > b { grid-column: 3; grid-row: 1; font-size: 13px; line-height: 1.35; font-weight: 700; }
  #bookDetail .store-option.store-option-pending { border-style: solid; border-color: transparent; background: transparent; }
  #bookDetail .store-option-pending > b { font-size: 11px; font-weight: 500; }
  #bookDetail .store-option:focus-within { outline-offset: -2px; }
}

/* 0원 단어장은 구매 선택과 분리한 직접 다운로드 링크다. */
#bookDetail a.store-option-free { color: #145b4b; background: #f0faf6; border: 1px solid #b9ddcf; text-decoration: none; }
#bookDetail .store-option-free .store-free-icon { grid-column: 1; grid-row: 1; font-size: 20px; font-weight: 700; text-align: center; }
#bookDetail .store-option-free > b { color: #145b4b; font-size: 12px; white-space: nowrap; }
#bookDetail a.store-option-free:hover { background: #e1f4eb; }
#bookDetail a.store-option-free:focus-visible { outline: 2px solid #145b4b; outline-offset: 2px; }

#bookDetail .store-material-guides { display: grid; gap: 24px; }

/* Keep the actual pages close to the purchase options, without a duplicate heading. */
#bookDetail .store-original-details.store-has-samples { padding-top: 10px; }
#bookDetail .bd-sec.store-sample-intro { padding-top: 14px; scroll-margin-top: 76px; }

/* October bookstore thumbnails share the registered analysis artwork; PDFs stay untouched. */
.store-october-cover{display:block;position:relative;width:100%;height:100%;overflow:hidden;background:#e7e6d5}
.store-october-cover>img{display:block;width:100%;height:100%;object-fit:cover;object-position:center}
.store-october-heading{position:absolute;inset:13.5% 0 auto;height:18.2%;display:flex;flex-direction:column;justify-content:center;align-items:center;gap:1px;padding:0 4px;background:#e7e6d5;text-align:center;color:#25242a}
.store-october-heading small{display:block;font-size:6px;font-weight:750;line-height:1.3;white-space:nowrap}
.store-october-heading strong{display:block;font-size:12px;font-weight:850;line-height:1.25;color:#564c85}
#bookDetail .store-october-heading small{font-size:8px}
#bookDetail .store-october-heading strong{font-size:17px}
